diff --git a/cypress/e2e/playlist.cy.ts b/cypress/e2e/playlist.cy.ts index 82ed08c..78847d8 100644 --- a/cypress/e2e/playlist.cy.ts +++ b/cypress/e2e/playlist.cy.ts @@ -1,4 +1,3 @@ -// @ts-expect-error Module '"@playkit-js/kaltura-player-js"' has no exported member 'core' import {core} from '@playkit-js/kaltura-player-js'; import {mockKalturaBe, loadPlayer, MANIFEST, MANIFEST_SAFARI} from './env'; @@ -49,7 +48,7 @@ describe('Playlist plugin', () => { cy.get('[data-testid="playlist_title"]').should('exist'); cy.get('[data-testid="playlist_title"]').should('have.text', 'new playlist'); cy.get('[data-testid="playlist_duration"]').should('exist'); - cy.get('[data-testid="playlist_duration"]').should('have.text', '3 videos, 34 min 16 sec'); + cy.get('[data-testid="playlist_duration"]').should('have.text', '3 videos, 17 min 27 sec'); }); }); it('should render 3 playlist items', () => { diff --git a/cypress/fixtures/playlist.json b/cypress/fixtures/playlist.json index d601d12..ef38874 100644 --- a/cypress/fixtures/playlist.json +++ b/cypress/fixtures/playlist.json @@ -58,5 +58,10 @@ "thumbnailUrl": "https://cfvod.kaltura.com/p/27017/sp/2701700/thumbnail/entry_id/1_l4h9vq7r/version/100001", "objectType": "KalturaMediaEntry" } - ] + ], + { + "objectType": "KalturaUserEntryListResponse", + "objects": [], + "totalCount": 0 + } ] diff --git a/cypress/public/ui-conf.js b/cypress/public/ui-conf.js index 13cb0a1..8943272 100644 --- a/cypress/public/ui-conf.js +++ b/cypress/public/ui-conf.js @@ -1,87 +1,38 @@ /** -* Bundle builder 2.2.0/588c57d -* Created at Tue Jun 06 2023 11:55:54 GMT+0000 (Coordinated Universal Time) -* ------------------- -* Kaltura Player lib -* kaltura-ovp-player v3.14.5-canary.0-b8ba362 -* playkit-kaltura-cuepoints v3.0.6-canary.0-a25cd20 -* playkit-kava v1.5.5-canary.0-76e3c44 -* playkit-timeline v3.0.3-canary.0-c77d2c8 -* playkit-ui-managers v1.3.10-canary.0-8aec7a5 -*/ -var KalturaPlayer=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=324)}([function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){var r;!function(i,a){"use strict";var o="model",s="name",l="type",u="vendor",c="version",p="mobile",d="tablet",f="smarttv",h=function(e){for(var t={},n=0;n0?2===a.length?"function"==typeof a[1]?this[a[0]]=a[1].call(this,s):this[a[0]]=a[1]:3===a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?this[a[0]]=s?s.replace(a[1],a[2]):void 0:this[a[0]]=s?a[1].call(this,s,a[2]):void 0:4===a.length&&(this[a[0]]=s?a[3].call(this,s.replace(a[1],a[2])):void 0):this[a]=s||void 0;l+=2}},b=function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r255?v(e,255):e,this},this.setUA(n),this};k.VERSION="1.0.2",k.BROWSER=h([s,c,"major"]),k.CPU=h(["architecture"]),k.DEVICE=h([o,u,l,"console",p,f,d,"wearable","embedded"]),k.ENGINE=k.OS=h([s,c]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=k),t.UAParser=k):n(4)?void 0===(r=function(){return k}.call(t,n,t,e))||(e.exports=r):void 0!==i&&(i.UAParser=k);var T=void 0!==i&&(i.jQuery||i.Zepto);if(T&&!T.ua){var A=new k;T.ua=A.getResult(),T.ua.get=function(){return A.getUA()},T.ua.set=function(e){A.setUA(e);var t=A.getResult();for(var n in t)T.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t,n){var r,i; -/*! - * js-logger - http://github.com/jonnyreeves/js-logger - * Jonny Reeves, http://jonnyreeves.co.uk/ - * js-logger may be freely distributed under the MIT license. - */!function(a){"use strict";var o,s={VERSION:"1.6.0"},l={},u=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t=t.value},trace:function(){this.invoke(s.TRACE,arguments)},debug:function(){this.invoke(s.DEBUG,arguments)},info:function(){this.invoke(s.INFO,arguments)},warn:function(){this.invoke(s.WARN,arguments)},error:function(){this.invoke(s.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(s.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(s.TIME,[e,"end"])},invoke:function(e,t){o&&this.enabledFor(e)&&o(t,c({level:e},this.context))}};var f,h=new d({filterLevel:s.OFF});(f=s).enabledFor=u(h,h.enabledFor),f.trace=u(h,h.trace),f.debug=u(h,h.debug),f.time=u(h,h.time),f.timeEnd=u(h,h.timeEnd),f.info=u(h,h.info),f.warn=u(h,h.warn),f.error=u(h,h.error),f.log=f.info,s.setHandler=function(e){o=e},s.setLevel=function(e){for(var t in h.setLevel(e),l)l.hasOwnProperty(t)&&l[t].setLevel(e)},s.getLevel=function(){return h.getLevel()},s.get=function(e){return l[e]||(l[e]=new d(c({name:e},h.context)))},s.createDefaultHandler=function(e){(e=e||{}).formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var a,o=console.log;i.level===s.TIME?(a=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(a):t[a]=(new Date).getTime():console.timeEnd?console.timeEnd(a):n(o,[a+": "+((new Date).getTime()-t[a])+"ms"])):(i.level===s.WARN&&console.warn?o=console.warn:i.level===s.ERROR&&console.error?o=console.error:i.level===s.INFO&&console.info?o=console.info:i.level===s.DEBUG&&console.debug?o=console.debug:i.level===s.TRACE&&console.trace&&(o=console.trace),e.formatter(r,i),n(o,r))}},s.useDefaults=function(e){s.setLevel(e&&e.defaultLevel||s.DEBUG),s.setHandler(s.createDefaultHandler(e))},void 0===(i="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=i)}()},function(e){e.exports=JSON.parse('{"heartbeatTimeout":30000}')},function(e){e.exports=JSON.parse('{"a":"data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE="}')},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){var r=n(6),i=n(7);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]),r(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function o(e){for(var t=-1,n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._map.values());!(e=n()).done;){var r=e.value;t=t.concat(r)}return t},t.remove=function(e,t){if(this._map.has(e)){var n=this._map.get(e);if(Array.isArray(n)){for(var r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._bindingMap.getAll());!(e=t()).done;)e.value.unlisten();this._bindingMap&&this._bindingMap.clear()}},e}(),P=function(){function e(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.options=r,this.target.addEventListener(t,n,!1)}return e.prototype.unlisten=function(){this.target&&(this.target.removeEventListener(this.type,this.listener,this.options),this.target=null,this.listener=null,this.options=null)},e}(),D=I,R={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,LIVE_MANIFEST_REFRESH_ERROR:1008,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_CREATE_TEXT_CUE:2009,DASH_ADAPTER_ERROR_PARSE_ISSUE:2010,UNKNOWN_FILE_TYPE:2011,UNKNOWN_LANGUAGE:2012,INVALID_VTT_THUMBNAILS_FILE:2013,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,HLS_FATAL_MEDIA_ERROR:3018,HLS_FRAG_PARSING_ERROR:3019,HLS_BUFFER_APPEND_ISSUE:3020,HLS_BUFFER_APPENDING_ISSUE:3021,NATIVE_ADAPTER_LOAD_FAILED:3022,HLS_BUFFER_STALLED_ERROR:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_LIVE_CONTENT_NOT_SUPPORTED:4029,HLSJS_CANNOT_PARSE:4030,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,BAD_FAIRPLAY_RESPONSE:6015,COULD_NOT_CREATE_MEDIA_KEYS:6016,COULD_NOT_CREATE_KEY_SESSION:6017,LOAD_INTERRUPTED:7e3,BITRATE_SWITCH_ISSUE:7001,LOAD_FAILED:7002,RUNTIME_ERROR_NOT_REGISTERED_PLUGIN:7003,RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED:7004,RUNTIME_ERROR_NOT_VALID_HANDLER:7005,NO_SOURCE_PROVIDED:7006,NO_ENGINE_FOUND_TO_PLAY_THE_SOURCE:7007,ENTER_PICTURE_IN_PICTURE_FAILED:7008,EXIT_PICTURE_IN_PICTURE_FAILED:7009,PLUGIN_LOAD_FAILED:7010,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,CONTENT_UNSUPPORTED_BY_BROWSER:9009,CANNOT_ADD_ITEM:9010,DOWNLOAD_FAILED:9011,COULD_NOT_GET_INFO_FROM_MEDIA_PROVIDER:9012,ENTRY_DOES_NOT_EXIST:9013,PAUSE_FAILED:9014,RESUME_FAILED:9015,RENEW_LICENSE_FAILED:9016,ENTRY_ALREADY_EXISTS:9017,REMOVE_FAILED:9018,CAST_LOAD_MEDIA_FAILED:10001,CAST_CUSTOM_MESSAGE_PARSING_ERROR:10002,CAST_EDIT_TRACKS_INFO_ERROR:10003,VR_NOT_SUPPORTED:11e3};function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.assign(R,{XML_PARSING_ERROR:8100,VAST_SCHEMA_VALIDATION_ERROR:8101,VAST_RESPONSE_VERSION_NOT_SUPPORTED:8102,TRAFFICKING_ERROR:8200,VAST_UNEXPECTED_LINEARITY:8201,VAST_UNEXPECTED_DURATION_ERROR:8202,VAST_UNEXPECTED_SIZE_ERROR:8203,VAST_WRAPPER_ERROR:8300,VAST_URI_ERROR:8301,VAST_TOO_MANY_REDIRECTS:8302,NO_ADS_VAST_RESPONSE:8303,GENERAL_LINEAR_ERROR:8400,FILE_NOT_FOUND:8401,VAST_MEDIA_LOAD_TIMEOUT:8402,MEDIA_FILE_NOT_FOUND:8403,MEDIA_FILE_DISPLAY_ERROR:8405,MEZZANINE_FILE_NOT_PROVIDED:8406,MEZZANINE_DOWNLOADED_FOR_THE_FIRST_TIME:8407,VAST_RESPONSE_AD_REJECTED:8408,CREATIVE_WAS_NOT_EXECUTED:8409,CODE_REFERENCED_NOT_EXECUTED:8410,GENERAL_NON_LINEAR_AD_ERROR:8500,NON_LINEAR_CREATIVE_DIMENSIONS_NOT_ALIGN_ERROR:8501,NON_LINEAR_FETCH_ERROR:8502,NON_LINEAR_RESOURCE_NOT_FOUND:8503,GENERAL_COMPANION_ADS_ERROR:8600,COMPANION_DIMENSIONS_NOT_FIT:8601,COMPANION_CANNOT_BE_DISPLAY:8602,COMPANION_CANNOT_BE_FETCHED:8603,COMPANION_TYPE_NOT_FOUND:8604,AD_UNDEFINED_ERROR:8900,GENERAL_VPAID_ERROR:8901});var L=function e(t,n,r,i){void 0===i&&(i={}),this.severity=t,this.category=n,this.code=r,this.data=i,A("Error")!==_.OFF&&e._logger.error("Category:"+n+" | Code:"+r+" |",i)};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(t=r()).done;){var i=t.value;Object.assign(n,i)}return n},isObject:function(e){return e&&"object"==typeof e&&!Array.isArray(e)},isClassInstance:function(e){return e&&e.constructor&&e.constructor.name&&"Object"!==e.constructor.name},mergeDeep:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0?e.slice(0):[]).forEach((function(e,r){("object"==typeof e&&e!=={}||Array.isArray(e)&&e.length>0)&&(t[r]=n.copyDeep(e))})):null!==e&&"object"==typeof e?e.clone&&"function"==typeof e.clone?t=e.clone():(t=Object.assign({__proto__:e.__proto__},e),Object.keys(t).forEach((function(e){("object"==typeof t[e]&&t[e]!=={}||Array.isArray(t[e])&&t[e].length>0)&&(t[e]=n.copyDeep(t[e]))}))):t=e,t},isEmptyObject:function(e){for(var t in e)if(window.Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},getPropertyPath:function(e,t){return t.split(".").reduce((function(e,t){return null==e?e:e[t]}),e)},hasPropertyPath:function(e,t){if(!t)return!1;for(var n=t.split("."),r=0;r1;){var a=r,o=a[0];r=a.slice(1),void 0===i[o]&&(i[o]={}),i=i[o]}return i[r[0]]=n,e},deletePropertyPath:function(e,t){if(e&&t){for(var n=t.split("."),r=0;ro[u]?1:-1}return a.length!==o.length?-1:0}};function K(e,t){for(var n=0;n=0&&e<=100}var pe,de=function(){function e(){le(this,"_width",100),le(this,"_lines",3),le(this,"_regionAnchorX",0),le(this,"_regionAnchorY",100),le(this,"_viewportAnchorX",0),le(this,"_viewportAnchorY",100),le(this,"_scroll","")}var t,n;return t=e,(n=[{key:"width",get:function(){return this._width},set:function(e){if(!ce(e))throw new Error("Width must be between 0 and 100.");this._width=e}},{key:"scroll",get:function(){return this._scroll},set:function(e){var t=function(e){return"string"==typeof e&&!!ue[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");this._scroll=t}},{key:"viewportAnchorY",get:function(){return this._viewportAnchorY},set:function(e){if(!ce(e))throw new Error("ViewportAnchorY must be between 0 and 100.");this._viewportAnchorY=e}},{key:"viewportAnchorX",get:function(){return this._viewportAnchorX},set:function(e){if(!ce(e))throw new Error("ViewportAnchorX must be between 0 and 100.");this._viewportAnchorX=e}},{key:"regionAnchorX",get:function(){return this._regionAnchorX},set:function(e){if(!ce(e))throw new Error("RegionAnchorY must be between 0 and 100.");this._regionAnchorX=e}},{key:"lines",get:function(){return this._lines},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");this._lines=e}},{key:"regionAnchorY",get:function(){return this._regionAnchorY},set:function(e){if(!ce(e))throw new Error("RegionAnchorX must be between 0 and 100.");this._regionAnchorY=e}}])&&se(t.prototype,n),e}();function fe(e,t){for(var n=0;n59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}var me={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},be={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},_e={v:"title",lang:"lang"},Ee={rt:"ruby"};function ke(){this.values=Oe(null)}function Te(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}function Ae(e,t,n){var r=e;function i(){var t=ve(e);if(null===t)throw new Le(Le.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.substr(0,3))throw new Le(Le.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),a(),t.endTime=i(),a(),function(e,t){var r=new ke;Te(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line",t.line||"auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}t.position=r.get("position",t.position||"auto"),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}function we(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]+>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e){return me[e]}function i(e){for(var t;t=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(t[0],r);return e}function a(e,t){return!Ee[t.localName]||Ee[t.localName]===e.localName}function o(t,n){var r=be[t];if(!r)return null;var i=e.document.createElement(r),a=_e[t];return a&&n&&(i[a]=n.trim()),i}for(var s,l=e.document.createElement("div"),u=l,c=[];null!==(s=n());)if("<"!==s[0])u.appendChild(e.document.createTextNode(i(s)));else{if("/"===s[1]){c.length&&c[c.length-1]===s.substr(2).replace(">","")&&(c.pop(),u=u.parentNode);continue}var p=ve(s.substr(1,s.length-2)),d=void 0;if(p){d=e.document.createProcessingInstruction("timestamp",p),u.appendChild(d);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=o(f[1],f[3])))continue;if(!a(u,d))continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),c.push(f[1]),u.appendChild(d),u=d}return l}ke.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r=0&&t<=100)&&(this.set(e,t),!0)}};var Se=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Ce(e){for(var t=0;t=n[0]&&e<=n[1])return!0}return!1}var xe=function(e){var t,n;function r(t,n,r){var i;i=e.call(this)||this;var a="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent);"undefined"!=typeof WebVTTSet&&(WebVTTSet.fontSet,WebVTTSet.backgroundSet,WebVTTSet.edgeSet),i.cue=n,i.cueDiv=we(t,n.text);var o={color:r.color,backgroundColor:r.backgroundColor,textShadow:r.textShadow,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};a||(o.writingMode=""===n.vertical?"horizontal-tb":"lr"===n.vertical?"vertical-lr":"vertical-rl",o.unicodeBidi="plaintext"),i.applyStyles(o,i.cueDiv),i.div=t.document.createElement("div"),o={textAlign:"middle"===n.align?"center":n.align,font:r.font,whiteSpace:"pre-line",position:"absolute"},a||(o.direction=function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;ae.left&&this.tope.top})),e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=t||e.lineHeight||13}var t=e.prototype;return t.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},t.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},t.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},t.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},t.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},e.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},e}();function Pe(e,t,n,r){var i=new Ie(t),a=t.cue,o=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;ip&&(c=c<0?-1:1,c*=Math.ceil(p/u)*u),o<0&&(c+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(d,c)}else{var f=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":o-=f/2;break;case"end":o-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new Ie(t)}var h=function(e,t){for(var i,a=new Ie(e),o=1,s=0;sl&&(i=new Ie(e),o=l),e=new Ie(a)}return i||a}(i,s);t.move(h.toCSSCompatValues(n))}var De=function(e,t){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=t||new TextDecoder("utf8"),this.regionList=[]},Re=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Oe=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function Le(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function Me(e,t){for(var n=0;n100)throw new Error("Position must be between 0 and 100.");this._position=e,this.resetCue()}},{key:"positionAlign",get:function(){return this._positionAlign},set:function(e){var t=je(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._positionAlign=t,this.resetCue())}},{key:"size",get:function(){return this._size},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");this._size=e,this.resetCue()}},{key:"align",get:function(){return this._align},set:function(e){var t=je(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._align=t,this.resetCue())}}])&&Me(t.prototype,n),e}();function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(t=r()).done;){var i=t.value;if(window.VTTCue&&i instanceof window.VTTCue||window.DataCue&&i instanceof window.DataCue)n.push(i);else if(window.TextTrackCue&&i instanceof window.TextTrackCue)try{n.push(new Be(i.startTime,i.endTime,i.text))}catch(e){new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.UNABLE_TO_CREATE_TEXT_CUE,e)}}return n}qe.MODE={DISABLED:"disabled",SHOWING:"showing",HIDDEN:"hidden"},qe.KIND={METADATA:"metadata",SUBTITLES:"subtitles",CAPTIONS:"captions"},qe.EXTERNAL_TRACK_ID="playkit-external-track",qe.isMetaDataTrack=function(e){return e&&e.kind===qe.KIND.METADATA},qe.isNativeTextTrack=function(e){return e&&[qe.KIND.SUBTITLES,qe.KIND.CAPTIONS].includes(e.kind)},qe.isExternalTrack=function(e){return e&&[e.language,e.label].includes(qe.EXTERNAL_TRACK_ID)};var $e=qe,Qe=Object.freeze({VIDEO:"video",AUDIO:"audio",TEXT:"text",IMAGE:"image"}),Ze={DASH:"dash",HLS:"hls",PROGRESSIVE:"progressive",IMAGE:"image"},Je={HTML5:"html5",FLASH:"flash",SILVERLIGHT:"silverlight",CAST:"cast",YOUTUBE:"youtube",IMAGE:"image"},et={VOD:"Vod",LIVE:"Live",AUDIO:"Audio",IMAGE:"Image",UNKNOWN:"Unknown"},tt={MANUAL:"manual",AUTO:"auto"},nt={ANONYMOUS:"anonymous",USE_CREDENTIALS:"use-credentials"},rt=function(){function e(){}return e.prototype.callNext=function(e){e&&e()},e}(),it=function(){function e(e){this._actions=e,this._middlewares=new v,this._logger=S("Middleware")}var t=e.prototype;return t.use=function(e){for(var t in this._actions){var n=this._actions[t];"function"==typeof e[n]&&(this._logger.debug("Register <"+e.id+"> for action "+n),this._middlewares.push(n,e[n].bind(e)))}},t.run=function(e,t){var n=this;this._logger.debug("Start middleware chain for action "+e);for(var r=this._middlewares.get(e),i=arguments.length,a=new Array(i>2?i-2:0),o=2;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=(t||0)&&e<=(n||1/0)},r=t.maxHeight,i=t.minHeight,a=t.maxWidth,o=t.minWidth;if(0!==i||0!==o||r!==1/0||a!==1/0)return e.filter((function(e){return n(e.height,i,r)})).filter((function(e){return n(e.width,o,a)}));var s=t.maxBitrate,l=t.minBitrate;return 0!==l||s!==1/0?e.filter((function(e){return n(e.bandwidth,l,s)})):e}(e,t);return n.length?n:[]}gt(yt,"id","BaseAdapter"),gt(yt,"getLogger",S),gt(yt,"_logger",yt.getLogger(yt.id));var bt={WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"},_t=S("FairPlay"),Et=function(){function e(){}return e.isConfigured=function(e,t){return bt.FAIRPLAY===t.keySystem&&!!e.find((function(e){return e.scheme===t.keySystem}))},e.canPlayDrm=function(e){var t=e.some((function(e){return e.scheme===bt.FAIRPLAY}))&&!!window.WebKitMediaKeys;return _t.debug("Can play DRM scheme of: "+bt.FAIRPLAY+" is "+t.toString()),t},e.setDrmPlayback=function(e,t){_t.debug("Sets drm playback");var n=t.find((function(e){return e.scheme===bt.FAIRPLAY}));n&&(e.licenseUrl=n.licenseUrl,e.certificate=n.certificate)},e}(),kt=n(2);function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var At={NEED_KEY:"webkitneedkey",KEY_MESSAGE:"webkitkeymessage",KEY_ADDED:"webkitkeyadded",KEY_ERROR:"webkitkeyerror"},wt=function(){function e(t,n,r,i){var a=this;Tt(this,"_logger",S("FairPlayDrmHandler")),Tt(this,"_retryLicenseRequest",4),Tt(this,"_defaultConfig",{licenseUrl:"",certificate:"",network:{responseFilter:function(t,n){var r={};try{var i=new DataView(n.data),o=(new TextDecoder).decode(i).trim();r=JSON.parse(o)}catch(e){return void a._onError(L.Code.BAD_FAIRPLAY_RESPONSE,{error:e,responseText:n.data})}var s=e._validateResponse(r);s.valid?n.data=e._base64DecodeUint8Array(r.ckc):a._onError(L.Code.BAD_FAIRPLAY_RESPONSE,s)}}}),this._config=F.mergeDeep({},this._defaultConfig,n),this._errorCallback=r,this._drmResponseCallback=i,this._videoElement=t,this._onWebkitNeedKeyHandler=function(e){return a._onWebkitNeedKey(e)},this._eventManager=new D,this._eventManager.listen(this._videoElement,At.NEED_KEY,this._onWebkitNeedKeyHandler)}var t=e.prototype;return t._onWebkitNeedKey=function(t){var n=this;this._logger.debug("Webkit need key triggered");var r=t.target,i=t.initData,a=e._extractContentId(i),o=e._base64DecodeUint8Array(this._config.certificate);if(i=e._concatInitDataIdAndCertificate(i,a,o),!r.webkitKeys){var s=this._selectKeySystem();this._logger.debug("Sets media keys"),r.webkitSetMediaKeys(new window.WebKitMediaKeys(s))}r.webkitKeys||this._onError(L.Code.COULD_NOT_CREATE_MEDIA_KEYS),this._logger.debug("Creates session"),this._keySession=r.webkitKeys.createSession("video/mp4",i),this._keySession||this._onError(L.Code.COULD_NOT_CREATE_KEY_SESSION),this._keySession.contentId=a,this._eventManager.listen(this._keySession,At.KEY_MESSAGE,(function(e){return n._onWebkitKeyMessage(e)})),this._eventManager.listen(this._keySession,At.KEY_ADDED,(function(){return n._onWebkitKeyAdded()})),this._eventManager.listen(this._keySession,At.KEY_ERROR,(function(e){return n._onWebkitKeyError(e)}))},t.getDrmInfo=function(){var e=this._config;return{certificate:e.certificate,licenseUrl:e.licenseUrl,scheme:bt.FAIRPLAY}},t.destroy=function(){this._eventManager.destroy(),this._keySession.close(),this._keySession=null},t._onWebkitKeyMessage=function(t){var n=this;this._logger.debug("Webkit key message triggered");var r=t.message,i=new XMLHttpRequest;i.responseType="arraybuffer",this._eventManager.listenOnce(i,"load",(function(e){return n._licenseRequestLoaded(e)}));var a,o={url:this._config.licenseUrl,body:e._base64EncodeUint8Array(r),headers:{}},s=this._config.network.requestFilter;if(s){this._logger.debug("Apply request filter");try{a=s(ut.LICENSE,o)}catch(e){a=Promise.reject(e)}}(a=a||Promise.resolve(o)).then((function(e){i.open("POST",e.url,!0);var t=!0;e.headers&&Object.entries(e.headers).forEach((function(e){var n=e[0],r=e[1];"string"==typeof r&&i.setRequestHeader(n,r),t&&(t="content-type"!==n.toLowerCase())})),"boolean"==typeof e.withCredentials&&(i.withCredentials=e.withCredentials),t&&i.setRequestHeader("Content-type","application/json"),n._logger.debug("Ready for license request"),i.onerror=function(){n._onError(L.Code.LICENSE_REQUEST_FAILED,{status:i.status,responseText:i.responseText})},n._licenseRequestTime=Date.now(),i.send(e.body)})).catch((function(e){n._errorCallback(new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.REQUEST_FILTER_ERROR,e)),n.destroy()}))},t._onWebkitKeyAdded=function(){this._logger.debug("Decryption key was added to session")},t._onWebkitKeyError=function(e){this._logger.error("A decryption key error was encountered",e),this._retryLicenseRequest<=0&&this._onError(L.Code.LICENSE_REQUEST_FAILED,e.target.error),this._retryLicenseRequest--},t._licenseRequestLoaded=function(e){var t=this;this._logger.debug("License request loaded");var n=e.target;if(n.status>299)this._onError(L.Code.LICENSE_REQUEST_FAILED,{status:n.status,error:n.responseText});else{if(this._drmResponseCallback){var r=Date.now()-this._licenseRequestTime;this._drmResponseCallback({licenseTime:r/1e3,scheme:bt.FAIRPLAY})}var i,a=n.responseURL,o=n.response,s={url:a,originalUrl:this._config.licenseUrl,data:o,headers:V.convertHeadersToDictionary(n.getAllResponseHeaders())};this._logger.debug("Apply response filter");try{i=this._config.network.responseFilter(ut.LICENSE,s)}catch(e){i=Promise.reject(e)}(i=i||Promise.resolve(s)).then((function(e){t._keySession.update(e.data)})).catch((function(e){t._errorCallback(new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.RESPONSE_FILTER_ERROR,e)),t.destroy()}))}},t._onError=function(e,t){this._errorCallback(new L(L.Severity.CRITICAL,L.Category.DRM,e,t))},e._validateResponse=function(e){return e.message&&e.message.indexOf("error")>0||null===e.reference||500===e.status_code?{valid:!1,details:"internal server error"}:""===e.ckc?{valid:!1,details:"ckc is missing"}:{valid:!0}},t._selectKeySystem=function(){var e=null;return window.WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4")?e="com.apple.fps.1_0":this._logger.warn("Key System not supported"),e},e._extractContentId=function(t){var n=document.createElement("a");return n.href=e._arrayToString(t),n.hostname},e._arrayToString=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},e._base64DecodeUint8Array=function(e){for(var t=window.atob(e),n=t.length,r=new Uint8Array(new ArrayBuffer(n)),i=0;i>2,a=(3&t)<<4|(n=c>4,o=(15&n)<<2|(r=c>6,s=63&r,isNaN(n)?o=s=64:isNaN(r)&&(s=64),u+=l.charAt(i)+l.charAt(a)+l.charAt(o)+l.charAt(s);return u},e}();function St(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(i=s()).done;){var l=i.value,u=Math.abs(l.width-t);uv||!_.bandwidth)&&(v=_.bandwidth||v,r=_)}}return r}(this._progressiveSources,this._videoElement.offsetWidth,this._videoElement.offsetHeight);e&&(this._sourceObj=e)},o._isProgressivePlayback=function(){return!!this._sourceObj&&r._progressiveMimeTypes.includes(this._sourceObj.mimetype.toLowerCase())},o.load=function(e){var t=this;return this._wasCurrentTimeSetSuccessfully=!1,this._maybeSetDrmPlayback(),this._loadPromise||(this._loadPromise=new Promise((function(n,r){t._lastTimeUpdate=e||0;var i=t._startTimeAttach||e||0;t._loadPromiseReject=r,t._eventManager.listenOnce(t._videoElement,W.LOADED_DATA,(function(){return t._onLoadedData(n,i)})),t._eventManager.listenOnce(t._videoElement,W.PLAYING,(function(){return t._onPlaying(i)})),t._eventManager.listen(t._videoElement,W.TIME_UPDATE,(function(){return t._onTimeUpdate()})),t._eventManager.listen(t._videoElement,W.PLAY,(function(){return t._resetHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.PAUSE,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.ENDED,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.ABORT,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.SEEKED,(function(){return t._syncCurrentTime()})),t._eventManager.listen(t._videoElement,W.WAITING,(function(){return t._waitingEventTriggered=!0})),t._eventManager.listen(t._videoElement,W.PLAYING,(function(){return t._waitingEventTriggered=!1})),t._eventManager.listen(window,"focus",(function(){setTimeout((function(){g.isIOS&&(t._videoElement.currentTime=t._videoElement.currentTime>.1?t._videoElement.currentTime-.1:0),t._syncCurrentTime()}),1e3)})),t._isProgressivePlayback()&&t._setProgressiveSource(),t._sourceObj&&t._sourceObj.url?t._setSrc().then((function(){t._trigger(Y.ABR_MODE_CHANGED,{mode:t._isProgressivePlayback()?"manual":"auto"}),t._videoElement.load()})):t._videoElement.load()}))),this._loadPromise},o._handleDecodeError=function(e){var t=this;r._logger.debug("handleDecodeError",e);var n=this._videoElement.currentTime,i=this._getActivePKAudioTrack(),a=this._getActivePKTextTrack();this._videoElement.load(),this._eventManager.listenOnce(this._videoElement,W.PLAYING,(function(){t._mediaErrorRecoveryAttempts=0})),this._eventManager.listenOnce(this._videoElement,W.CAN_PLAY,(function(){r._logger.debug("CAN_PLAY"),t._videoElement.currentTime=n,t._videoElement.play(),t._videoElement.pause(),i&&t.selectAudioTrack(i),a?t.selectTextTrack(a):t.disableNativeTextTracks()}))},o.handleMediaError=function(e){return this._loadPromiseReject?(this._loadPromiseReject(new L(L.Severity.CRITICAL,L.Category.MEDIA,L.Code.NATIVE_ADAPTER_LOAD_FAILED,e)),!0):!!(e&&e.code===window.MediaError.MEDIA_ERR_DECODE&&(this._mediaErrorRecoveryAttempts++,this._mediaErrorRecoveryAttempts<=3))&&(this._handleDecodeError(e),!0)},o.attachMediaSource=function(){this._startTimeAttach=this._lastTimeDetach,this._lastTimeDetach=NaN},o.detachMediaSource=function(){this._lastTimeDetach=this._videoElement.currentTime,this._videoElement&&this._videoElement.src&&(B.setAttribute(this._videoElement,"src",""),B.removeAttribute(this._videoElement,"src")),this._loadPromise=null},o._setSrc=function(){var e,t=this,n={url:this._sourceObj?this._sourceObj.url:"",body:null,headers:{}};if("function"==typeof F.getPropertyPath(this._config,"network.requestFilter"))try{r._logger.debug("Apply request filter"),e=this._config.network.requestFilter(ut.MANIFEST,n)}catch(t){e=Promise.reject(t)}return(e=e||Promise.resolve(n)).then((function(e){t._videoElement.src=e.url})).catch((function(e){t._trigger(W.ERROR,new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.REQUEST_FILTER_ERROR,e))})),e},o._onPlaying=function(e){this.isLive()&&this._setStartTime(e)},o._onLoadedData=function(e,t){var n=this,i=function(){n._playerTracks=n._getParsedTracks(),n._addNativeAudioTrackChangeListener(),n._addNativeTextTrackChangeListener(),n._addNativeTextTrackAddedListener(),r._logger.debug("The source has been loaded successfully"),n._loadPromiseReject=null,e({tracks:n._playerTracks}),n.isLive()&&n._handleLiveDurationChange()};this.isLive()||this._setStartTime(t),this._videoElement.textTracks.length>0?i():this._eventManager.listenOnce(this._videoElement,W.CAN_PLAY,i.bind(this)),this._startTimeAttach=NaN},o._setStartTime=function(e){"number"==typeof e&&e>-1&&(this._videoElement.currentTime=e),this._wasCurrentTimeSetSuccessfully=!0},o._onTimeUpdate=function(){this._videoElement.paused||(this._videoElement.currentTime>this._lastTimeUpdate?(this._waitingEventTriggered&&(this._waitingEventTriggered=!1,this._trigger(W.PLAYING)),this._resetHeartbeatTimeout()):this._videoElement.currentTime "+t+")"),this._onTrackChanged(a))}},o.selectTextTrack=function(e){if(e instanceof $e&&$e.isNativeTextTrack(e)){this._removeNativeTextTrackChangeListener();var t=this._nativeTextTracksMap[e.index];t&&(this.disableNativeTextTracks(),t.mode=this._getDisplayTextTrackModeString(),this._onTrackChanged(e),this._addNativeTextTrackChangeListener())}},o._removeNativeTextTrackChangeListener=function(){this._videoElement.textTracks&&this._eventManager.unlisten(this._videoElement.textTracks,"change")},o._addNativeTextTrackChangeListener=function(){var e=this;this._videoElement.textTracks&&this._eventManager.listen(this._videoElement.textTracks,"change",(function(){return e._onNativeTextTrackChange()}))},o._getPKTextTracks=function(){return this._playerTracks.filter((function(e){return e instanceof $e}))},o._getActivePKTextTrack=function(){return this._getPKTextTracks().find((function(e){return!0===e.active}))},o._onNativeTextTrackChange=function(){var e=this,t=this._getPKTextTracks(),n=t.find((function(e){return"off"===e.language})),i=function(){for(var t in e._nativeTextTracksMap)if(e._getDisplayTextTrackModeString()===e._nativeTextTracksMap[t].mode)return Number(t);return-1}(),a=this._getActivePKTextTrack(),o=a?a.index:-1;if(i!==o)if(-1==i)n&&(r._logger.debug("Native selection of track, update the player text track ("+o+" -> off)"),this._onTrackChanged(n));else{var s=t.find((function(e){return e.index===i}));s&&(r._logger.debug("Native selection of track, update the player text track ("+o+" -> "+i+")"),this._onTrackChanged(s))}},o._getDisplayTextTrackModeString=function(){return this._config.displayTextTrack?$e.MODE.SHOWING:$e.MODE.HIDDEN},o._addNativeTextTrackAddedListener=function(){var e=this;!this._config.displayTextTrack&&this._videoElement.textTracks&&this._eventManager.listen(this._videoElement.textTracks,"addtrack",(function(){return e._onNativeTextTrackAdded()}))},o._onNativeTextTrackAdded=function(){this._playerTracks=this._getParsedTracks(),this._trigger(Y.TRACKS_CHANGED,{tracks:this._playerTracks})},o.hideTextTrack=function(){this.disableNativeTextTracks()},o.enableAdaptiveBitrate=function(){r._logger.warn("Enabling adaptive bitrate is not supported for native playback")},o.isAdaptiveBitrateEnabled=function(){return!this._isProgressivePlayback()},o.applyABRRestriction=function(e){F.createPropertyPath(this._config,"abr.restrictions",e),this._maybeApplyAbrRestrictions(e)},o._maybeApplyAbrRestrictions=function(e){if(this._isProgressivePlayback()){var t=mt(this._playerTracks.filter((function(e){return e instanceof ae})),e);!t.find((function(e){return e.active}))&&t.length?this.selectVideoTrack(t[0]):r._logger.warn("Invalid restrictions, there are not tracks within the restriction range")}},o._disableVideoTracks=function(){var e=this._videoElement.videoTracks;if(e)for(var t=0;t is already registered, do not register again"):(e._logger.debug("Adapter <"+t.id+"> has been registered successfully"),e._mediaSourceAdapters.push(t)))},e.unRegister=function(t){var n=e._mediaSourceAdapters.indexOf(t);n>-1&&(e._logger.debug("Unregistered <"+t.id+"> adapter"),e._mediaSourceAdapters.splice(n,1))},e.canPlaySource=function(t,n,r){void 0===n&&(n=!0),e._orderMediaSourceAdapters(n);var i=e._mediaSourceAdapters;if(t&&t.mimetype)for(var a=0;a"),!0;return!1},e._orderMediaSourceAdapters=function(t){e._mediaSourceAdapters=e._mediaSourceAdapters.filter((function(e){return"NativeAdapter"!==e.id})),t?e._mediaSourceAdapters.unshift(Dt):e._mediaSourceAdapters.push(Dt)},e.getMediaSourceAdapter=function(t,n,r){return t&&n&&r?(e._selectedAdapter||e.canPlaySource(n,!0,r.drm),e._selectedAdapter?e._selectedAdapter.createAdapter(t,n,r):null):null},e.destroy=function(){e._selectedAdapter=null},e}();Rt(Ot,"_logger",S("MediaSourceProvider")),Rt(Ot,"_mediaSourceAdapters",[Dt]),Rt(Ot,"_selectedAdapter",null);var Lt=Ot.register,Mt=function(e,t,n,r,i){this.startTime=e,this.endTime=t,this.id=n,this.type=r,this.metadata=i};function Nt(e){try{var t=e.startTime,n=e.endTime,r=e.id,i=e.type,a=e.metadata,o={};window.VTTCue?o=new window.VTTCue(t,n,""):window.TextTrackCue&&(o=new window.TextTrackCue(t,n,""));var s={key:i,data:a};return o.id=r,o.value=s,o}catch(e){return null}}function Ut(e){if(e){var t=e.startTime,n=e.endTime,r=e.id;if(Ft(e)){var i=Ft(e),a=i.type,o=i.metadata;return new Mt(t,n,r,a,o)}}return null}function Ft(e){if(e){var t=e.type,n=e.value,r=e.track;if(n){var i=n.key,a=n.data,o="org.id3"===t||"id3"===(r&&r.label),s=Object.values(Mt.TYPE).find((function(e){return e===i}));return s||(s=o?Mt.TYPE.ID3:Mt.TYPE.CUSTOM),{type:s,metadata:o||!a?n:a}}}return null}Mt.TYPE={ID3:"id3",EMSG:"emsg",CUE_POINT:"cuepoint",CUSTOM:"custom"};var jt,Bt,Vt=n(3);function Ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kt=(Bt=jt=function(){function e(){}return e.runCapability=function(){e._capabilities.autoplay||"boolean"==typeof e._capabilities.autoplay&&"boolean"==typeof e._capabilities.mutedAutoPlay?e._playPromiseResult=Promise.resolve(e._capabilities):(e._vid||(e._vid=B.createElement("video"),e._vid.src=Vt.a,e._vid.setAttribute("playsinline","")),e._playPromiseResult=new Promise((function(t){e._setMuted(!1),e._getPlayPromise().then((function(){return t({autoplay:!0,mutedAutoPlay:!0})})).catch((function(){e._setMuted(!0),e._getPlayPromise().then((function(){return t({autoplay:!1,mutedAutoPlay:!0})})).catch((function(){return t({autoplay:!1,mutedAutoPlay:!1})}))}))})))},e.getCapability=function(){return e._playPromiseResult.then((function(t){var n;return t.autoplay?n=Promise.resolve(t):(e.runCapability(),n=e._playPromiseResult),n.then((function(t){return F.mergeDeep(t,e._capabilities)}))}))},e.setCapabilities=function(t){e._logger.debug("Set player capabilities",t);var n=t.autoplay,r=t.mutedAutoPlay;"boolean"==typeof n&&(e._capabilities.autoplay=n),"boolean"==typeof r&&(e._capabilities.mutedAutoPlay=r)},e._getPlayPromise=function(){return e._vid.play()||e._forcePromiseReturnValue()},e._setMuted=function(t){t?(e._vid.muted=!0,e._vid.setAttribute("muted","")):(e._vid.muted=!1,e._vid.removeAttribute("muted"))},e._forcePromiseReturnValue=function(){return new Promise((function(t,n){e._vid.addEventListener(W.ERROR,(function(){n()}));var r=setTimeout((function(){e._logger.debug("Timeout 500 ms has been reached"),n()}),500);!0===e._vid.paused?(clearTimeout(r),n()):(clearTimeout(r),t())}))},e}(),Ht(jt,"_logger",S("Html5AutoPlayCapability")),Ht(jt,"_capabilities",{}),Bt);function Gt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wt=function(e){var t,n;function r(t,n,i){var a;return zt(Gt(a=e.call(this)||this),"_droppedFramesInterval",null),zt(Gt(a),"_lastDroppedFrames",0),zt(Gt(a),"_lastDecodedFrames",0),zt(Gt(a),"_lastTime",0),zt(Gt(a),"_currentBitrate",0),a._eventManager=new D,a._mediaSourceAdapter=t,a._config=n,a._videoElement=i,a._mediaSourceAdapter.capabilities.fpsControl?(a._eventManager.listen(a._mediaSourceAdapter,Y.FPS_DROP,(function(e){return a._triggerFPSDrop(e.payload.data)})),Gt(a)):(-1===a._getDroppedAndDecodedFrames()[0]?r._logger.debug("Dropped frame watcher is not supported"):a._config.capLevelOnFPSDrop?(r._logger.debug("Initialized capLevelOnFPSDrop = true"),a._init()):r._logger.debug("Not Initialized"),a)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._init=function(){var e=this;this._eventManager.listen(this._mediaSourceAdapter,Y.VIDEO_TRACK_CHANGED,(function(t){return e._currentBitrate=t.payload.selectedVideoTrack.bandwidth})),this._droppedFramesInterval=setInterval((function(){return e._checkFPS()}),this._config.fpsDroppedFramesInterval)},i._triggerFPSDrop=function(e){this.dispatchEvent(new m(Y.FPS_DROP,e))},i._getDroppedAndDecodedFrames=function(){if("function"==typeof this._videoElement.getVideoPlaybackQuality){var e=this._videoElement.getVideoPlaybackQuality();return[e.droppedVideoFrames,e.totalVideoFrames]}return"number"==typeof this._videoElement.webkitDroppedFrameCount&&"number"==typeof this._videoElement.webkitDecodedFrameCount?[this._videoElement.webkitDroppedFrameCount,this._videoElement.webkitDecodedFrameCount]:[-1,-1]},i._checkFPS=function(){var e=this._getDroppedAndDecodedFrames(),t=e[0],n=e[1];try{var i=performance.now();if(n){if(this._lastTime){var a=i-this._lastTime,o=t-this._lastDroppedFrames,s=n-this._lastDecodedFrames,l=1e3*o/a;l>0&&(r._logger.debug("checkFPS : droppedFPS/decodedFPS:"+l/(1e3*s/a)),o>this._config.fpsDroppedMonitoringThreshold*s&&(this._mediaSourceAdapter.setMaxBitrate(this._currentBitrate-1),this._triggerFPSDrop({currentDropped:o,currentDecoded:s,totalDroppedFrames:l})))}this._lastTime=i,this._lastDroppedFrames=t,this._lastDecodedFrames=n}}catch(e){r._logger.error("Error occur while trying to check dropFrames: ",e)}},i.destroy=function(){this._droppedFramesInterval&&clearInterval(this._droppedFramesInterval),this._droppedFramesInterval=null,this._eventManager.destroy()},r}(C);function Yt(e,t){for(var n=0;n has been registered successfully"),e._engineProviders[t]=n):e._logger.debug("Engine <"+t+"> is already registered, do not register again")},e.unRegister=function(t){e._engineProviders[t]&&(e._logger.debug("Unregistered <"+t+"> Engine"),delete e._engineProviders[t])},e.getEngines=function(){return Object.keys(e._engineProviders).map((function(t){return e._engineProviders[t]}))},e.destroy=function(){e._engineProviders={}},e}();$t(Qt,"_logger",S("EngineProvider")),$t(Qt,"_engineProviders",{}),Xt.isSupported()&&Qt.register(Xt.id,Xt);var Zt=Qt.register,Jt=Qt.unRegister;function en(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nn="srt",rn="vtt",an=function(e){var t,n;function r(t){var n;return tn(en(n=e.call(this)||this),"_externalCueIndex",0),tn(en(n),"_textTrackModel",{}),tn(en(n),"_activeTextCues",[]),tn(en(n),"_isTextTrackActive",!1),tn(en(n),"_lastTimeUpdate",0),n._player=t,n._eventManager=new D,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.hideTextTrack=function(){this._player.config.text.useNativeTextTrack?(this._removeCueChangeListeners(),this._resetExternalNativeTextTrack()):this._isTextTrackActive&&(this._eventManager.unlisten(this._player,W.TIME_UPDATE),this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:[]})),this._resetCurrentTrack())},i.getExternalTracks=function(e){var t=this,n=this._player.sources.captions;if(!n)return[];this._player.config.text.useNativeTextTrack&&this._addNativeTextTrack();var r=e.filter((function(e){return e instanceof $e})),i=[];return n.forEach((function(e){if(e.language){var n=t._createTextTrack(e);t._maybeAddTrack(n,e,r,i)}else{var a=new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.UNKNOWN_LANGUAGE,{caption:e});t.dispatchEvent(new m(W.ERROR,a))}})),i},i._maybeAddTrack=function(e,t,n,i){var a=n.find((function(e){return e.available&&re.langComparer(t.language,e.language)}));a?r._logger.warn("duplicated language, taking the inband option. Language: ",a.language):(i.push(e),this._updateTextTracksModel(t))},i._createTextTrack=function(e){return new $e({active:!!e.default,kind:$e.KIND.SUBTITLES,label:e.label,language:e.language,external:!0})},i._updateTextTracksModel=function(e){this._textTrackModel[e.language]={cuesStatus:1,cues:[],url:e.url,type:e.type}},i.selectTextTrack=function(e){var t=this;this._textTrackModel[e.language]&&(3===this._textTrackModel[e.language].cuesStatus?this._selectTextTrack(e):1===this._textTrackModel[e.language].cuesStatus&&this._downloadAndParseCues(e).then((function(){t._textTrackModel[e.language].cuesStatus=3,t._selectTextTrack(e)})).catch((function(e){return t.dispatchEvent(new m(W.ERROR,e))})))},i._selectTextTrack=function(e){this.hideTextTrack(),this._player.config.text.useNativeTextTrack?(this._addCuesToNativeTextTrack(this._textTrackModel[e.language].cues),this._addCueChangeListener()):this._setTextTrack(e),e.active=!0,this.dispatchEvent(new m(Y.TEXT_TRACK_CHANGED,{selectedTextTrack:e}))},i.resetAllCues=function(){for(var e in this._textTrackModel)this._textTrackModel[e].cues.forEach((function(e){e.hasBeenReset=!0}))},i._addCueChangeListener=function(){var e=this,t=this._player.getVideoElement();if(t&&t.textTracks){var n=Array.from(t.textTracks).find((function(e){return $e.isNativeTextTrack(e)&&e.mode===$e.MODE.SHOWING}));n&&this._eventManager.listen(n,"cuechange",(function(t){return e._onCueChange(t)}))}},i._removeCueChangeListeners=function(){var e=this._player.getVideoElement();if(e&&e.textTracks)for(var t=0;t (\d\d:\d\d:\d\d),(\d\d\d)/g,(function(e,t,n,r,i){return t+"."+n+" --\x3e "+r+"."+i}))},i._downloadAndParseCues=function(e){var t=this;return this._textTrackModel[e.language].cuesStatus=2,new Promise((function(n,r){t._getCuesString(e).then((function(e){return t._parseCues(e)})).then((function(r){t._textTrackModel[e.language].cues=r,n()})).catch((function(e){return r(e)}))}))},i._getFileType=function(e){return e.split(/[#?]/)[0].split(".").pop().trim()},i._handleCaptionOnTimeUpdate=function(e){var t=this._player.currentTime;if(t){var n=!1;this._hadSeeked()&&(this._activeTextCues=[],n=this._maybeSetExternalCueIndex());var r=this._maybeRemoveActiveCues(),i=this._maybeAddToActiveCues(e);(n||i||r)&&this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._lastTimeUpdate=t}},i._hadSeeked=function(){return!!this._player.currentTime&&Math.abs(this._player.currentTime-this._lastTimeUpdate)>1},i._maybeRemoveActiveCues=function(){var e=this._player.currentTime;if(!e)return!1;var t=this._activeTextCues.filter((function(t){return t.startTimer[this._externalCueIndex].startTime;)tthis._player.currentTime&&t[n].startTime>this._player.currentTime);n++);return this._externalCueIndex=n,!0}return!1},i._resetExternalNativeTextTrack=function(){var e=this._player.getVideoElement();if(e&&e.textTracks){var t=Array.from(e.textTracks).find((function(e){return!!e&&$e.isExternalTrack(e)}));t&&(t.cues&&Object.values(t.cues).forEach((function(e){return t.removeCue(e)})),t.mode=$e.MODE.DISABLED)}},i._addCuesToNativeTextTrack=function(e){var t=this._player.getVideoElement();if(t&&t.textTracks){var n=Array.from(t.textTracks).find((function(e){return!!e&&$e.isExternalTrack(e)}));n&&(n.mode=$e.MODE.SHOWING,void 0===window.VTTCue?this._convertCues(e).forEach((function(e){return n.addCue(e)})):e.forEach((function(e){return n.addCue(e)})))}},i._convertCues=function(e){return e.map((function(e){return new window.TextTrackCue(e.startTime,e.endTime,e.text)}))},i._addNativeTextTrack=function(){var e=this._player.getVideoElement();e&&e.textTracks&&(Array.from(e.textTracks).findIndex((function(e){return!!e&&$e.isExternalTrack(e)}))>-1?this._resetExternalNativeTextTrack():e.addTextTrack($e.KIND.SUBTITLES,$e.EXTERNAL_TRACK_ID,$e.EXTERNAL_TRACK_ID))},i._setTextTrack=function(e){var t=this;this._player.config.text.useNativeTextTrack||(this._isTextTrackActive=!0,r._logger.debug("External text track changed",e),this._activeTextCues=[],this._externalCueIndex=0,this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._eventManager.listen(this._player,W.TIME_UPDATE,(function(){return t._handleCaptionOnTimeUpdate(e)})))},r}(C);tn(an,"_logger",S("ExternalCaptionsHandler"));var on={PRE:"preroll",MID:"midroll",POST:"postroll",OVERLAY:"overlay"},sn={VAST:"vast",VMAP:"vmap"},ln=function(e){var t,n;function r(){return e.call(this)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){this._observer&&this._observer.disconnect(),this._observer=null,this._el=null},i.init=function(e){this._observer||(this._el=e,window.ResizeObserver?this._createNativeObserver():this._createIframeObserver(),this._el instanceof HTMLElement&&this._observer&&this._observer.observe(this._el))},i._createNativeObserver=function(){var e=this;this._observer=new window.ResizeObserver((function(t){t.forEach((function(){e._triggerResize()}))}))},i._createIframeObserver=function(){this._observer=new un(this._triggerResize.bind(this))},i._triggerResize=function(){this.dispatchEvent(new m(Y.RESIZE))},r}(C),un=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_observersStore",{}),this._onChangeCallback=e}var t=e.prototype;return t.observe=function(e){var t=this,n=this._createIframe(),r=e.getAttribute("id");this._observersStore[r]=n,e.appendChild(n),n.contentWindow.onresize=function(){return t._onChangeCallback()}},t.disconnect=function(){for(var e in this._observersStore){var t=document.getElementById(e),n=this._observersStore[e];n.onresize=null,t&&(t.removeChild(n),delete this._observersStore[t.getAttribute("id")])}},t._createIframe=function(){var e=document.createElement("iframe");return e.className="playkit-size-iframe",e},e}();function cn(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=function(){return 1}),0===e.length||1===e.length&&0!==t(e[0]))return null;var n=Math.floor(e.length/2);return 0===t(e[n])?e[n]:t(e[n])>0?cn(e.slice(0,n),t):cn(e.slice(n+1),t)}function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dn=function(){function e(e){pn(this,"_isElementInFullscreen",!1),pn(this,"_isScreenLocked",!1),pn(this,"_isScreenOrientationSupport",!!screen&&!!screen.orientation&&"function"==typeof screen.orientation.unlock&&"function"==typeof screen.orientation.lock),pn(this,"_isFullscreenEventDispatched",!1),this._player=e,this._isInBrowserFullscreen=!1,this._eventManager=new D}var t=e.prototype;return t._isNativeDocumentFullscreen=function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)},t._isIOSFullscreen=function(){var e="function"==typeof this._player.getVideoElement?this._player.getVideoElement():null;return"iOS"===this._player.env.os.name&&!!e&&("fullscreen"===e.webkitPresentationMode||!e.webkitPresentationMode&&e.webkitDisplayingFullscreen)},t.isFullscreen=function(){return this._isNativeDocumentFullscreen()&&this._isElementInFullscreen||this._isIOSFullscreen()||this._isInBrowserFullscreen},t.enterFullscreen=function(e){if(!this.isFullscreen()){this.registerFullScreenEvents();var t=e&&B.getElementById(e),n=this._player.config.playback;if(t||(t=this._player.getView()),"iOS"===this._player.env.os.name)if(n.inBrowserFullscreen&&n.playsinline||this._player._engineType===Je.YOUTUBE)this._enterInBrowserFullscreen(t);else{var r=this._player.getVideoElement();r&&"function"==typeof r.webkitEnterFullScreen&&(this._player.isInPictureInPicture()?(setTimeout((function(){return r.webkitEnterFullScreen()}),1e3),this._player.exitPictureInPicture()):r.webkitEnterFullScreen())}else this._requestFullscreen(t)}},t.exitFullscreen=function(){if(this.isFullscreen())if("iOS"===this._player.env.os.name)if(this._isInBrowserFullscreen||this._player._engineType===Je.YOUTUBE)this._exitInBrowserFullscreen();else{var e=this._player.getVideoElement();e&&"function"==typeof e.webkitExitFullscreen&&e.webkitExitFullscreen()}else this._requestExitFullscreen()},t._nativeEnterFullScreen=function(e){return"function"==typeof e.requestFullscreen?e.requestFullscreen():"function"==typeof e.mozRequestFullScreen?e.mozRequestFullScreen():"function"==typeof e.webkitRequestFullScreen?e.webkitRequestFullScreen():"function"==typeof e.msRequestFullscreen?e.msRequestFullscreen():void 0},t._requestFullscreen=function(e){var t=this;this._player.isInPictureInPicture()&&this._player.exitPictureInPicture(),Promise.resolve(this._nativeEnterFullScreen(e)).then((function(){t._isElementInFullscreen=!0;var e=F.getPropertyPath(t._player,"config.playback.screenLockOrientionMode"),n=e!==ot.NONE&&Object.values(ot).includes(e);t._isScreenOrientationSupport&&n&&screen.orientation.lock(e).then((function(){return t._isScreenLocked=!0})).catch((function(){return t._isScreenLocked=!1}))}),(function(){}))},t._nativeExitFullScreen=function(){return"function"==typeof document.exitFullscreen?document.exitFullscreen():"function"==typeof document.webkitExitFullscreen?document.webkitExitFullscreen():"function"==typeof document.mozCancelFullScreen?document.mozCancelFullScreen():"function"==typeof document.msExitFullscreen?document.msExitFullscreen():void 0},t._requestExitFullscreen=function(){var e=this;Promise.resolve(this._nativeExitFullScreen()).then((function(){e._isElementInFullscreen=!1,e._isScreenOrientationSupport&&e._isScreenLocked&&(screen.orientation.unlock(),e._isScreenLocked=!1)}),(function(){}))},t._enterInBrowserFullscreen=function(e){this._player.isInPictureInPicture()&&this._player.exitPictureInPicture(),B.addClassName(e,"playkit-in-browser-fullscreen-mode"),this._isInBrowserFullscreen=!0,this._fullscreenEnterHandler(),this._player.dispatchEvent(new m(this._player.Event.RESIZE))},t._exitInBrowserFullscreen=function(){var e=B.getElementBySelector(".playkit-in-browser-fullscreen-mode");e&&B.removeClassName(e,"playkit-in-browser-fullscreen-mode"),this._isInBrowserFullscreen=!1,this._fullscreenExitHandler(),this._player.dispatchEvent(new m(this._player.Event.RESIZE))},t.registerFullScreenEvents=function(){var e=this;"iOS"===this._player.env.os.name?this._handleIosFullscreen():(this._eventManager.listen(document,"webkitfullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"mozfullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"fullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"MSFullscreenChange",(function(){return e._fullscreenChangeHandler()})))},t._handleIosFullscreen=function(){var e=this,t=function(){var t=e._player.getVideoElement();t&&(e._eventManager.listen(t,"webkitbeginfullscreen",(function(){return e._fullscreenEnterHandler()})),e._eventManager.listen(t,"webkitendfullscreen",(function(){return e._fullscreenExitHandler()})))};this._player.getVideoElement()?t():this._eventManager.listenOnce(this._player,this._player.Event.SOURCE_SELECTED,(function(){return t()}))},t._fullscreenChangeHandler=function(){this.isFullscreen()?this._fullscreenEnterHandler():this._fullscreenExitHandler()},t._fullscreenEnterHandler=function(){this.isFullscreen()&&!this._isFullscreenEventDispatched&&(this._isFullscreenEventDispatched=!0,this._player.dispatchEvent(new m(this._player.Event.ENTER_FULLSCREEN)))},t._fullscreenExitHandler=function(){!this.isFullscreen()&&this._isFullscreenEventDispatched&&(this._isFullscreenEventDispatched=!1,this._eventManager.removeAll(),this._player.dispatchEvent(new m(this._player.Event.EXIT_FULLSCREEN)))},t.destroy=function(){this._eventManager.destroy()},e}();function fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hn=function(){function e(){fn(this,"_decoratorProviders",new Map),fn(this,"_logger",S("EngineDecoratorManager"))}var t=e.prototype;return t.register=function(e){this._decoratorProviders.has(e.getName())?this._logger.warn("decorator already registered for "+e.getName()):this._decoratorProviders.set(e.getName(),e)},t.createDecorators=function(e,t){return this._logger.debug("decorators created for "+Array.from(this._decoratorProviders.keys()).toString()),Array.from(this._decoratorProviders.values(),(function(n){return n.getEngineDecorator(e,t)}))},t.destroy=function(){this._logger.debug("decorators destroyed"),this._decoratorProviders.clear()},e}();function gn(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=a.startTime&&ee.length)&&(t=e.length);for(var n=0,r=new Array(t);n0}))},s._createPlayerContainer=function(){var e=this._el=B.createElement("div");B.addClassName(e,"playkit-container"),B.setAttribute(e,"id",this._playerId),B.setAttribute(e,"tabindex","-1")},s._appendEngineEl=function(){if(this._el){var e=this._engine.getVideoElement();B.addClassName(e,"playkit-engine");var t="playkit-engine-"+this._engine.id;B.addClassName(e,t),B.prependTo(e,this._el),"youtube"===this._engine.id&&(this._el.style.zIndex=1)}},s._appendDomElements=function(){this._blackCoverEl=B.createElement("div"),B.addClassName(this._blackCoverEl,"playkit-black-cover"),B.appendChild(this._el,this._blackCoverEl);var e=this._posterManager.getElement();B.addClassName(e,"playkit-poster"),B.appendChild(this._el,e),this._textDisplayEl=B.createElement("div"),B.addClassName(this._textDisplayEl,"playkit-subtitles"),B.appendChild(this._el,this._textDisplayEl)},s._createReadyPromise=function(){var e=this;this._readyPromise=new Promise((function(t,n){e._eventManager.listenOnce(e,Y.TRACKS_CHANGED,(function(){e.dispatchEvent(new m(Y.MEDIA_LOADED)),t()})),e._eventManager.listen(e,W.ERROR,(function(e){e.payload.severity===L.Severity.CRITICAL&&n()}))})).catch((function(){}))},s._selectEngineByPriority=function(){for(var e,t=this,n=this._config.playback.streamPriority,i=this._config.playback.preferNative,a=this._sources,o=function(){var n=e.value,o="string"==typeof n.engine?n.engine.toLowerCase():"",s="string"==typeof n.format?n.format.toLowerCase():"",l=Qt.getEngines().find((function(e){return e.id===o}));if(l){var u=a[s];if(u&&u.length>0){var c=u[0];if(l.canPlaySource(c,i[s],t._config.drm))return r._logger.debug("Source selected: ",u),t._loadEngine(l,c),t._engineType=o,t._streamType=s,{v:!0}}}},s=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(n);!(e=s()).done;){var l=o();if("object"==typeof l)return l.v}return!1},s._loadEngine=function(e,t){this._engine?this._engine.id===e.id?this._engine.restore(t,In({},this._config,{sources:this._sources})):(this._engine.destroy(),this._createEngine(e,t),this._appendEngineEl()):(this._createEngine(e,t),this._appendEngineEl())},s._createEngine=function(e,t){var n=e.createEngine(t,In({},this._config,{sources:this._sources}),this._playerId);this._engine=this._engineDecoratorManager?new vn(n,this._engineDecoratorManager):n},s._attachMedia=function(){var e=this;if(this._engine){Object.keys(W).forEach((function(t){e._eventManager.listen(e._engine,W[t],(function(t){return e.dispatchEvent(t)}))})),this._eventManager.listen(this._engine,W.SEEKING,(function(){e.isLive()&&(e._isOnLiveEdge=!(!e.duration||!e.currentTime)&&e.currentTime>=e.duration-1&&!e.paused)})),this._eventManager.listen(this._engine,W.SEEKED,(function(){var t=e._env.browser.name;"Edge"!==t&&"IE"!==t||e._removeTextCuePatch()})),this._eventManager.listen(this._engine,Y.MEDIA_RECOVERED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.IMAGE_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TEXT_TRACK_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.VIDEO_TRACK_CHANGED,(function(t){return e._markActiveTrack(t.payload.selectedVideoTrack),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.AUDIO_TRACK_CHANGED,(function(t){e.ready().then((function(){return e._playbackAttributesState.audioLanguage=t.payload.selectedAudioTrack.language})),e._markActiveTrack(t.payload.selectedAudioTrack),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this._eventManager.listen(this._engine,Y.TRACKS_CHANGED,(function(t){return e._onTracksChanged(t)})),this._eventManager.listen(this._engine,Y.TEXT_CUE_CHANGED,(function(t){return e._onCueChange(t)})),this._eventManager.listen(this._engine,Y.ABR_MODE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TIMED_METADATA,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TIMED_METADATA_CHANGE,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TIMED_METADATA_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.PLAY_FAILED,(function(t){e._onPlayFailed(t),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.FPS_DROP,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.FRAG_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.DRM_LICENSE_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.MANIFEST_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.MEDIA_RECOVERED,(function(){return e._handleRecovered()})),this._eventManager.listen(this,W.PLAY,this._onPlay.bind(this)),this._eventManager.listen(this,W.PAUSE,this._onPause.bind(this)),this._eventManager.listen(this,W.PLAYING,this._onPlaying.bind(this)),this._eventManager.listen(this,W.ENDED,this._onEnded.bind(this)),this._eventManager.listen(this,Y.MUTE_CHANGE,(function(){e._playbackAttributesState.muted=e.muted})),this._eventManager.listen(this,W.VOLUME_CHANGE,(function(){e._playbackAttributesState.volume=e.volume})),this._eventManager.listen(this,W.RATE_CHANGE,(function(){e._playbackAttributesState.rate=e.playbackRate})),this._eventManager.listen(this,Y.ENTER_FULLSCREEN,(function(){return e._resetTextCuesAndReposition()})),this._eventManager.listen(this,Y.EXIT_FULLSCREEN,(function(){return e._resetTextCuesAndReposition()})),this._eventManager.listen(this._resizeWatcher,Y.RESIZE,(function(t){e._resetTextCuesAndReposition(),e.dispatchEvent(t)})),this._eventManager.listen(this._externalCaptionsHandler,Y.TEXT_CUE_CHANGED,(function(t){return e._onCueChange(t)})),this._eventManager.listen(this._externalCaptionsHandler,Y.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this._eventManager.listen(this._externalCaptionsHandler,W.ERROR,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._externalThumbnailsHandler,W.ERROR,(function(t){return e.dispatchEvent(t)}));var t=B.getElementBySelector("#"+this.config.targetId);t&&this._eventManager.listen(t,"click",(function(){e._hasUserInteracted=!0,e.dispatchEvent(new m(Y.USER_GESTURE))}),{capture:!0})}},s._handleRecovered=function(){this._stateManager.currentState.type===J.PLAYING&&this.play()},s._onTextTrackChanged=function(e){var t=this;this.ready().then((function(){return t._playbackAttributesState.textLanguage=e.payload.selectedTextTrack.language})),this._markActiveTrack(e.payload.selectedTextTrack),this.dispatchEvent(e)},s._resetTextCuesAndReposition=function(){this._engine.resetAllCues(),this._externalCaptionsHandler.resetAllCues(),this._updateTextDisplay([]);for(var e=0;er)return t}));this._updateTextDisplay(t)},s._handlePlaybackOptions=function(){if(this._config.playback=this._config.playback||{},"boolean"==typeof this._playbackAttributesState.muted?this.muted=this._playbackAttributesState.muted:"boolean"==typeof this._config.playback.muted&&(this.muted=this._config.playback.muted),"number"==typeof this._playbackAttributesState.volume?this.volume=this._playbackAttributesState.volume:"number"==typeof this._config.playback.volume&&(this.volume=this._config.playback.volume),"boolean"==typeof this._config.playback.playsinline&&(this.playsinline=this._config.playback.playsinline),"string"==typeof this._config.playback.crossOrigin&&(this.crossOrigin=this._config.playback.crossOrigin),Array.isArray(this._config.playback.playbackRates)){var e=this._config.playback.playbackRates.filter((function(e,t,n){return e>0&&e<=16&&n.indexOf(e)===t})).sort((function(e,t){return e-t}));e&&(this._playbackRates=e)}},s._handlePreload=function(){"auto"!==this._config.playback.preload||this._config.playback.autoplay||this.load()},s._autoPlay=function(){var e=this,t=this._config.playback.allowMutedAutoPlay;r.getCapabilities(this.engineType).then((function(r){r.autoplay?n():r.mutedAutoPlay?e.muted&&!e._fallbackToMutedAutoPlay?i():t?a():o():o()}));var n=function(){r._logger.debug("Start autoplay"),e._fallbackToMutedAutoPlay&&(e._fallbackToMutedAutoPlay=!1,e.muted=!1),e.play()},i=function(){r._logger.debug("Start muted autoplay"),e.play()},a=function(){r._logger.debug("Fallback to muted autoplay"),e._fallbackToMutedAutoPlay=!0,e.muted=!0,e.dispatchEvent(new m(Y.FALLBACK_TO_MUTED_AUTOPLAY)),e.play()},o=function(){r._logger.warn("Autoplay failed, pause player"),e._posterManager.show(),e.load(),e.dispatchEvent(new m(Y.AUTOPLAY_FAILED))}},s._handleAutoPlay=function(){(this.isAudio()||this._config.playback.autoplay!==mn.TRUE)&&this._posterManager.show(),this._config.playback.autoplay===mn.TRUE&&this._autoPlay()},s._playAfterAsyncMiddleware=function(){var e=this;this._engine?this._play():this._eventManager.listenOnce(this,Y.SOURCE_SELECTED,(function(){return e._play()}))},s._load=function(){var e=this;if(this._engine&&!this.src&&!this._loading){this._loading=!0;var t=this._sources.startTime;this._engine.load(t).then((function(n){e.isLive()&&(-1===t||Number(t)>=Number(e.duration))&&(e._isOnLiveEdge=!0),e._updateTracks(n.tracks),e.dispatchEvent(new m(Y.TRACKS_CHANGED,{tracks:e._tracks})),e._externalThumbnailsHandler.load(e.sources.thumbnails)})).finally((function(){e._loading=!1,e._reset=!1}))}},s._handleDimensions=function(){var e=this.config.dimensions;F.isObject(e)&&!F.isEmptyObject(e)&&(this.dimensions=e)},s._play=function(){var e=this;this._shouldLoadAfterAttach&&(this._load(),this._shouldLoadAfterAttach=!1),this.ready().then((function(){e._shouldPlayerSeekToLiveEdge()&&e.seekToLiveEdge(),e._engine.play()}))},s._shouldPlayerSeekToLiveEdge=function(){if(this.isLive()){var e=!this.isDvr()||"number"==typeof this.currentTime&&this.currentTime<0;return this._firstPlay?!!this.src&&!this.isOnLiveEdge():e}return!1},s._pause=function(){this._engine.pause()},s._setCurrentTime=function(e){if(this._engine&&N.isNumber(e)){var t=e;e<0&&(t=0);var n=this.isLive()?this._engine.duration:this._engine.duration-.1;t>n&&(t=n),this._engine.currentTime=t}},s._onPause=function(){this._isOnLiveEdge=!1},s._onPlay=function(){this._firstPlay&&(this._firstPlay=!1,this.dispatchEvent(new m(Y.FIRST_PLAY)),this.hideBlackCover(),"number"==typeof this._playbackAttributesState.rate&&(this.playbackRate=this._playbackAttributesState.rate))},s._onPlaying=function(){this._firstPlaying||(this._firstPlaying=!0,this.isAudio()||this._posterManager.hide(),this.dispatchEvent(new m(Y.FIRST_PLAYING))),this._engine&&this._pendingSelectedVideoTrack&&(this._engine.selectVideoTrack(this._pendingSelectedVideoTrack),this._pendingSelectedVideoTrack=null)},s._onPlayFailed=function(e){this._firstPlay&&this._config.playback.autoplay&&(this._posterManager.show(),this.dispatchEvent(new m(Y.AUTOPLAY_FAILED,e.payload)))},s._onEnded=function(){this.paused||this._pause()},s._resetStateFlags=function(){this._loading=!1,this._firstPlay=!0,this._loadingMedia=!1,this._playbackStart=!1,this._firstPlaying=!1},s._calcRatio=function(e,t){if(void 0!==t.ratio&&(this._aspectRatio=t.ratio),this._aspectRatio){var n=this._aspectRatio.split(":").map((function(e){return Number(e)})),r=n[0],i=n[1];if(t.width||!t.width&&!t.height){var a=i/r*e.clientWidth;e.style.height=a+"px"}else if(t.height&&!t.width){var o=r/i*e.clientHeight;e.style.width=o+"px"}}},s._onTracksChanged=function(e){this._updateTracks(e.payload.tracks),this.dispatchEvent(e)},s._updateTracks=function(e){r._logger.debug("Tracks changed",e),this._tracks=e.concat(this._externalCaptionsHandler.getExternalTracks(e)),this._applyABRRestriction(this._config),this._addTextTrackOffOption(),this._maybeSetTracksLabels(),this._setDefaultTracks()},s._getTracksByType=function(e){return this._tracks.reduce((function(t,n){return n instanceof e&&n.available&&t.push(n),t}),[])},s._getImageTracks=function(){return this._getTracksByType(pt)},s._getTextTracks=function(){return this._getTracksByType($e)},s._getVideoTracks=function(){return this._getTracksByType(ae)},s._getAudioTracks=function(){return this._getTracksByType(oe)},s._markActiveTrack=function(e){var t;if(e instanceof ae?t=this._getVideoTracks():e instanceof oe?t=this._getAudioTracks():e instanceof $e&&(t=this._getTextTracks()),t)for(var n=0;n0&&(r=e[0].language)}return r},s._setDefaultTrack=function(e,t,n,r){var i=this,a=function(e){i.selectTrack(e),i._markActiveTrack(e)},o=e.find((function(e){return re.langComparer(t,e.language,r,!0)}));if(o)a(o);else{var s=e.find((function(e){return re.langComparer(t,e.language,r,!1)}));s?a(s):n&&!n.active&&this.selectTrack(n)}},s._setDefaultVideoTrack=function(){var e=this,t=this._getVideoTracks().sort((function(e,t){return t.bandwidth-e.bandwidth})),n=t.find((function(t){var n;return t.label&&t.label===(null==(n=e._playbackAttributesState.videoTrack)?void 0:n.label)}));n||(n=t.find((function(t){var n;return t.height&&t.height===(null==(n=e._playbackAttributesState.videoTrack)?void 0:n.height)}))),n&&this.selectTrack(n)},s._maybeSetTracksLabels=function(){var e=this._config.customLabels;if(e)for(var t in e){if(!Object.prototype.hasOwnProperty.call(e,t))return;switch(t){case"qualities":this._setTracksCustomLabels(this._getVideoTracks(),e[t]);break;case"audio":this._setTracksCustomLabels(this._getAudioTracks(),e[t]);break;case"captions":this._setTracksCustomLabels(this._getTextTracks(),e[t])}}},s._setTracksCustomLabels=function(e,t){e.forEach((function(e){var n=t(F.copyDeep(e));n&&(e.label=n)}))},i=r,o=[{key:"_defaultConfig",get:function(){return F.copyDeep(st)}}],(a=[{key:"videoHeight",get:function(){return this._engine?this._engine.videoHeight:null}},{key:"videoWidth",get:function(){return this._engine?this._engine.videoWidth:null}},{key:"buffered",get:function(){return this._engine?this._engine.buffered:null}},{key:"stats",get:function(){var e={targetBuffer:NaN,availableBuffer:NaN};return this._engine&&(e.targetBuffer=this._engine.targetBuffer,e.availableBuffer=this._engine.availableBuffer),e}},{key:"currentTime",set:function(e){this._playbackMiddleware.setCurrentTime(e,this._setCurrentTime.bind(this))},get:function(){return this._engine?this._engine.currentTime:null}},{key:"duration",get:function(){return this._engine?this._engine.duration:null}},{key:"liveDuration",get:function(){return this._engine?this._engine.liveDuration:null}},{key:"volume",set:function(e){if(this._engine&&(N.isFloat(e)||0===e||1===e)){var t=e;t<0&&(t=0),t>1&&(t=1),this._engine.volume=t}},get:function(){return this._engine?this._engine.volume:null}},{key:"paused",get:function(){return this._engine?this._engine.paused:null}},{key:"seeking",get:function(){return this._engine?this._engine.seeking:null}},{key:"playsinline",set:function(e){this._engine&&(this._engine.playsinline=e)},get:function(){return this._engine?this._engine.playsinline:null}},{key:"muted",set:function(e){this._engine&&(this._engine.muted=e,this.dispatchEvent(new m(Y.MUTE_CHANGE,{mute:e})),!1===e&&(this._fallbackToMutedAutoPlay=e))},get:function(){return this._engine?this._engine.muted:null}},{key:"src",get:function(){return this._engine?this._engine.src:null}},{key:"dimensions",set:function(e){var t=this._getTargetElement();if(!e||F.isEmptyObject(e))this._aspectRatio=null,t.style.width=null,t.style.height=null;else{var n=F.mergeDeep(this.dimensions,e),r=n.height,i=n.width;t.style.width="number"==typeof i?i+"px":i,t.style.height="number"==typeof r?r+"px":r,this._calcRatio(t,e)}},get:function(){return{width:this._el.clientWidth,height:this._el.clientHeight}}},{key:"poster",get:function(){return this._posterManager.src}},{key:"playbackRate",set:function(e){this._engine&&(this._engine.playbackRate=e)},get:function(){return this._engine?this._engine.playbackRate:null}},{key:"playbackRates",get:function(){return this._playbackRates?this._playbackRates:this._engine?this._engine.playbackRates:[]}},{key:"defaultPlaybackRate",get:function(){return this._engine?this._engine.defaultPlaybackRate:1}},{key:"engineType",get:function(){return this._engineType}},{key:"streamType",get:function(){return this._streamType}},{key:"env",get:function(){return this._env}},{key:"config",get:function(){return F.mergeDeep({},this._config)}},{key:"sources",get:function(){return F.mergeDeep({},this._sources)}},{key:"hasUserInteracted",get:function(){return this._hasUserInteracted}},{key:"loadingMedia",set:function(e){this._loadingMedia=e}},{key:"crossOrigin",set:function(e){this._engine&&(this._engine.crossOrigin=e)},get:function(){return this._engine?this._engine.crossOrigin:null}},{key:"ended",get:function(){return this._engine?this._engine.ended:null}},{key:"playbackMiddleware",get:function(){return this._playbackMiddleware}},{key:"posterManager",get:function(){return this._posterManager}},{key:"textDisplaySetting",get:function(){return F.copyDeep(this._textDisplaySettings)}},{key:"textStyle",set:function(e){if(!(e instanceof ye))throw new Error("Style must be instance of TextStyle");var t=B.getElementBySelector("."+this._playerId+".playkit-subtitles-style");t||(t=B.createElement("style"),B.addClassName(t,this._playerId),B.addClassName(t,"playkit-subtitles-style"),B.appendChild(document.head,t));for(var n=t.sheet;n.cssRules.length;)n.deleteRule(0);try{this._textStyle=e,this._config.text.useNativeTextTrack?n.insertRule("#"+this._playerId+" video.playkit-engine::cue { "+e.toCSS()+" }",0):this._engine&&(this._engine.resetAllCues(),this._externalCaptionsHandler.resetAllCues(),this._updateTextDisplay(this._activeTextCues)),this.dispatchEvent(new m(Y.TEXT_STYLE_CHANGED))}catch(e){r._logger.error(e.message)}},get:function(){return this._textStyle.clone()}},{key:"Event",get:function(){return q}},{key:"TextStyle",get:function(){return ye}},{key:"State",get:function(){return J}},{key:"Track",get:function(){return Qe}},{key:"LogLevelType",get:function(){return E}},{key:"LogLevel",get:function(){return _}},{key:"AbrMode",get:function(){return tt}},{key:"MediaType",get:function(){return et}},{key:"StreamType",get:function(){return Ze}},{key:"EngineType",get:function(){return Je}},{key:"CorsType",get:function(){return nt}},{key:"AdBreakType",get:function(){return on}},{key:"AdTagType",get:function(){return sn}},{key:"Error",get:function(){return L}}])&&Dn(i.prototype,a),o&&Dn(i,o),r}(C);On(Mn,"_logger",S("Player"));var Nn=function(){function e(e){this._name=e.getName(),this._getEngineDecorator=e.getEngineDecorator.bind(e)}var t=e.prototype;return t.getEngineDecorator=function(e,t){return this._getEngineDecorator(e,t)},t.getName=function(){return this._name},e}(),Un={HLS:["application/x-mpegurl","application/vnd.apple.mpegurl"],DASH:["application/dash+xml"],PROGRESSIVE:["video/mp4"],SMOOTH_STREAMING:["application/vnd.ms-sstr+xml"]},Fn="0.82.4-canary.0-78c2401",jn="@playkit-js/playkit-js";function Bn(e){return new Mn(e||{})}var Vn=Mn.getCapabilities,Hn=Mn.setCapabilities;t.default=Bn}])},function(e,t,n){var r=n(2),i=n(8),a=n(16),o=n(12),s=n(19),l=function(e,t,n){var u,c,p,d,f=e&l.F,h=e&l.G,g=e&l.S,y=e&l.P,v=e&l.B,m=h?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?i:i[t]||(i[t]={}),_=b.prototype||(b.prototype={});for(u in h&&(n=t),n)p=((c=!f&&m&&void 0!==m[u])?m:n)[u],d=v&&c?s(p,r):y&&"function"==typeof p?s(Function.call,p):p,m&&o(m,u,p,e&l.U),b[u]!=p&&a(b,u,d),y&&_[u]!=p&&(_[u]=p)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(51)("wks"),i=n(31),a=n(2).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){var r=n(21),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(3)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(4),i=n(93),a=n(28),o=Object.defineProperty;t.f=n(9)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(26);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(2),i=n(16),a=n(15),o=n(31)("src"),s=n(130),l=(""+s).split("toString");n(8).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(a(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(a(n,o)||i(n,o,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,t,n){var r=n(1),i=n(3),a=n(26),o=/"/g,s=function(e,t,n,r){var i=String(a(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(o,""")+'"'),s+">"+i+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){var r=n(13),i=n(14);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]),r(i,{attributes:{id:"@playkit-js/playkit-js-ui"},insert:"head",singleton:!1}),e.exports=i.locals||{}},function(e,t,n){"use strict";e.exports=n(10)},function(e,t,n){"use strict";var r=n(1),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=f(n);i&&i!==h&&e(t,i,r)}var o=c(n);p&&(o=o.concat(p(n)));for(var s=l(t),g=l(n),y=0;y\") no-repeat;background-size:16px;background-position:100% center;background-repeat:no-repeat;padding-right:24px}.playkit-checkbox{font-size:15px;position:relative}.playkit-checkbox input{display:none}.playkit-checkbox label:before{height:16px;width:16px;border:1px solid rgba(255,255,255,.2);border-radius:4px;background-color:rgba(0,0,0,.4);margin-right:8px;display:inline-block;content:\"\";vertical-align:middle}.playkit-checkbox input:checked+label:before{content:\"✔\";text-align:center;font-size:14px}.playkit-form-group-row{font-size:15px;margin:24px 0}.playkit-form-group-row:after{clear:both;content:\" \";display:block}.playkit-form-group-row label{float:left;color:rgba(244,244,244,.8)}.playkit-form-group-row .playkit-dropdown{float:right}.playkit-btn{text-decoration:none;height:36px;border-radius:18px;color:#fff;line-height:36px;font-weight:bold;cursor:pointer;display:inline-block;padding:0 24px}.playkit-btn.playkit-btn-block{display:block}.playkit-btn.playkit-btn-dark-transparent{background-color:rgba(0,0,0,.5);border:2px solid rgba(255,255,255,.2);line-height:32px}.playkit-btn.playkit-btn-dark-transparent:hover{color:#fff;border:2px solid rgba(255,255,255,.4)}.playkit-btn.playkit-btn-branded{background-color:var(--playkit-primary-color)}.playkit-btn.playkit-btn-branded:hover{color:#fff}.playkit-btn-rounded{height:36px;width:36px;min-width:36px;min-height:36px;border-radius:18px;background-color:rgba(0,0,0,.4);display:inline-block;padding:2px}.playkit-player button:focus{outline:none}.playkit-btn-borderless{display:flex;flex-direction:row;justify-content:center;align-items:center;border-radius:4px;border:none;padding:8px 12px 8px 8px;width:82px;height:40px;background-color:rgba(0,0,0,0);cursor:pointer}.playkit-btn-borderless.playkit-only-icon{padding:4px;width:40px;height:40px}.playkit-btn-borderless.playkit-only-label{padding:8px;width:50px;height:40px}.playkit-btn-borderless i{width:32px;height:32px}.playkit-btn-borderless label{color:var(--playkit-tone-1-color)}.playkit-btn-borderless:hover{background-color:var(--playkit-tone-4-color)}.playkit-player.playkit-size-sm .playkit-btn-borderless,.playkit-player.playkit-size-xs .playkit-btn-borderless{height:32px}.playkit-player.playkit-size-sm .playkit-btn-borderless i,.playkit-player.playkit-size-xs .playkit-btn-borderless i{width:24px;height:24px}.playkit-player.playkit-size-sm .playkit-btn-borderless.playkit-only-icon,.playkit-player.playkit-size-xs .playkit-btn-borderless.playkit-only-icon{padding:4px;width:32px;height:32px}.playkit-player.playkit-size-sm .playkit-btn-borderless.playkit-only-label,.playkit-player.playkit-size-xs .playkit-btn-borderless.playkit-only-label{padding:8px;width:50px;height:32px}.playkit-icon{display:inline-block;font-size:0;width:100%;height:100%;margin:0 auto;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.playkit-badge-icon:after{content:\"\";position:absolute;height:16px;width:16px;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.playkit-player{--playkit-icon-vr-stereo-full-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M864 255.996c53.019 0 96 42.981 96 96v384.004c0 53.019-42.981 96-96 96h-219.764c-33.721 0-64.97-17.693-82.319-46.608l-49.917-83.195-49.917 83.195c-17.349 28.916-48.598 46.608-82.319 46.608h-219.764c-53.019 0-96-42.981-96-96v-384.003c0-53.019 42.981-96 96-96h704zM304 624c44.183 0 80-35.817 80-80s-35.817-80-80-80c-44.183 0-80 35.817-80 80s35.817 80 80 80zM720 624c44.183 0 80-35.817 80-80s-35.817-80-80-80c-44.183 0-80 35.817-80 80s35.817 80 80 80z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-chromecast-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M160 704v96h96c0-53.12-42.88-96-96-96zM160 576v64c88.32 0 160 71.68 160 160h64c0-123.84-100.16-224-224-224zM736 352h-448v52.16c126.72 40.96 226.88 141.12 267.84 267.84h180.16v-320zM160 448v64c159.040 0 288 128.96 288 288h64c0-194.56-157.76-352-352-352zM800 224h-576c-35.2 0-64 28.8-64 64v96h64v-96h576v448h-224v64h224c35.2 0 64-28.8 64-64v-448c0-35.2-28.8-64-64-64z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-quality-HD-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M3.73939861,5 L2,5 L2,11 L3.73939861,11 L3.73918396,8.56940659 L5.96845644,8.56940659 L5.9691596,11 L7.69930609,11 L7.69930609,5 L5.9691596,5 L5.96845644,7.32457143 L3.73918396,7.32457143 L3.73939861,5 Z M10.849653,5 L8.65690054,5 L8.65690054,11 L10.8774094,11 L11.1387878,10.9921562 C11.5670397,10.9660102 11.9583976,10.8744992 12.3128614,10.7176232 L12.3128614,10.7176232 L12.4919044,10.6311813 L12.686671,10.5199596 C13.0639309,10.2858264 13.3675515,9.98155416 13.5975328,9.60714286 C13.827514,9.23273155 13.9589319,8.81088809 13.9917864,8.34161247 L13.9917864,8.34161247 L14,8.10302198 L14,7.9010989 L13.9917864,7.66145717 C13.9589319,7.19033135 13.827514,6.76815149 13.5975328,6.39491758 C13.3292213,5.95947802 12.9583655,5.61813187 12.4849653,5.37087912 C12.0791937,5.15894819 11.6207417,5.03784481 11.1096093,5.00756896 L11.1096093,5.00756896 L10.849653,5 Z M10.849653,6.24862637 C11.154973,6.24862637 11.4101773,6.30906593 11.615266,6.42994505 C11.8203547,6.55082418 11.9745567,6.73282967 12.077872,6.97596154 C12.1605243,7.17046703 12.2101157,7.40497253 12.2266461,7.67947802 L12.2266461,7.67947802 L12.232845,7.89285714 L12.232845,8.10302198 L12.2265536,8.31796703 C12.2097764,8.59445055 12.1594449,8.83049451 12.075559,9.0260989 C11.9707016,9.2706044 11.8180416,9.4532967 11.617579,9.57417582 C11.4572089,9.67087912 11.2672321,9.7289011 11.0476484,9.74824176 L11.0476484,9.74824176 L10.8774094,9.75549451 L10.3957366,9.75600879 L10.3957366,6.24937143 Z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-quality-4K-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M6.52117789,5 L4.77853973,5 L4.7778117,5.01381978 L2,8.80769231 L2.10649455,9.76785714 L4.7778117,9.76866813 L4.77853973,11 L6.52117789,11 L6.52063574,9.76866813 L7.19402985,9.76785714 L7.19402985,8.5728022 L6.52063574,8.57362637 L6.52117789,5 Z M9.81282775,5 L7.99273901,5 L7.99273901,11 L9.81282775,11 L9.8119758,9.5061978 L10.4712352,8.88589011 L11.8313836,11 L13.9806374,11 L11.6856603,7.6629978 L14,5 L11.7587737,5 L10.3549818,6.78434066 L9.8119758,7.5229011 L9.81282775,5 Z M4.7778117,7.01905934 L4.7778117,8.57362637 L3.65066559,8.5728022 L4.69624849,7.13873626 L4.7778117,7.01905934 Z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-quality-8K-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M4.5,5 C4.04427083,5 3.6389974,5.06279225 3.28417969,5.18837675 C2.92936198,5.31396126 2.65104167,5.499666 2.44921875,5.74549098 C2.24739583,5.99131597 2.14648438,6.29458918 2.14648438,6.65531062 C2.14648438,6.96259185 2.24820964,7.23112892 2.45166016,7.46092184 C2.58729384,7.61411712 2.75692636,7.74445187 2.96055773,7.85192607 L2.96055773,7.85192607 L3.07972656,7.90981323 L3.04817708,7.92134269 L2.87890625,8.000668 C2.71614583,8.08483634 2.57291667,8.18353373 2.44921875,8.29676019 L2.44921875,8.29676019 L2.33203125,8.41482966 L2.24394133,8.52320968 C2.08131378,8.74602266 2,9.00515316 2,9.3006012 C2,9.67735471 2.10986328,9.99131597 2.32958984,10.242485 C2.54931641,10.493654 2.84879557,10.6826987 3.22802734,10.8096192 C3.60725911,10.9365397 4.03613281,11 4.51464844,11 C4.99641927,11 5.42366536,10.9365397 5.79638672,10.8096192 C6.16910807,10.6826987 6.46289063,10.493654 6.67773438,10.242485 C6.89257813,9.99131597 7,9.67735471 7,9.3006012 C7,8.95591182 6.89176432,8.66065464 6.67529297,8.41482966 L6.67529297,8.41482966 L6.56041124,8.29676019 C6.3983742,8.14579158 6.20089157,8.02065242 5.96796332,7.92134269 L5.96796332,7.92134269 L5.94,7.911 L6.06141493,7.85192607 L6.20532227,7.76703407 C6.29701063,7.70758183 6.38019929,7.64241446 6.45488824,7.57153195 L6.45488824,7.57153195 L6.56054688,7.46092184 L6.65155707,7.3427967 C6.78945132,7.14054034 6.85839844,6.91137831 6.85839844,6.65531062 C6.85839844,6.29458918 6.75830078,5.99131597 6.55810547,5.74549098 C6.35791016,5.499666 6.08121745,5.31396126 5.72802734,5.18837675 C5.37483724,5.06279225 4.96549479,5 4.5,5 Z M9.8178888,5 L8,5 L8,11 L9.8178888,11 L9.81771088,9.5061978 L10.4751832,8.88673407 L11.8340048,11 L13.9806608,11 L11.6891307,7.6629978 L14,5 L11.7614827,5 L10.3593876,6.78434066 L9.81771088,7.5229011 L9.8178888,5 Z M4.50488281,8.51903808 C4.6546224,8.51903808 4.78401693,8.54375418 4.89306641,8.59318637 C5.00211589,8.64261857 5.0867513,8.71543086 5.14697266,8.81162325 C5.20719401,8.90781563 5.23730469,9.02805611 5.23730469,9.17234469 C5.23730469,9.30861723 5.20800781,9.4261857 5.14941406,9.5250501 C5.09082031,9.6239145 5.0069987,9.7007348 4.89794922,9.75551102 C4.78889974,9.81028724 4.66113281,9.83767535 4.51464844,9.83767535 C4.36490885,9.83767535 4.23388672,9.81028724 4.12158203,9.75551102 C4.00927734,9.7007348 3.92220052,9.6239145 3.86035156,9.5250501 C3.7985026,9.4261857 3.76757812,9.30861723 3.76757812,9.17234469 C3.76757812,9.02805611 3.7985026,8.90781563 3.86035156,8.81162325 C3.92220052,8.71543086 4.00846354,8.64261857 4.11914062,8.59318637 C4.22981771,8.54375418 4.35839844,8.51903808 4.50488281,8.51903808 Z M4.5,6.16232465 C4.63671875,6.16232465 4.74902344,6.18570474 4.83691406,6.23246493 C4.92480469,6.27922512 4.99072266,6.34535738 5.03466797,6.43086172 C5.07861328,6.51636607 5.10058594,6.62057448 5.10058594,6.74348697 C5.10058594,6.86372745 5.08024089,6.96993988 5.03955078,7.06212425 C4.99886068,7.15430862 4.93538411,7.22645291 4.84912109,7.27855711 C4.76285807,7.33066132 4.65136719,7.35671343 4.51464844,7.35671343 C4.37792969,7.35671343 4.2648112,7.33066132 4.17529297,7.27855711 C4.08577474,7.22645291 4.01985677,7.15430862 3.97753906,7.06212425 C3.93522135,6.96993988 3.9140625,6.86372745 3.9140625,6.74348697 C3.9140625,6.62057448 3.93522135,6.51636607 3.97753906,6.43086172 C4.01985677,6.34535738 4.08496094,6.27922512 4.17285156,6.23246493 C4.26074219,6.18570474 4.36979167,6.16232465 4.5,6.16232465 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-maximize{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M800 269.255v114.745c0 17.673 14.327 32 32 32s32-14.327 32-32v-192c0-17.673-14.327-32-32-32h-192c-17.673 0-32 14.327-32 32s14.327 32 32 32h114.745l-137.373 137.373c-12.497 12.497-12.497 32.758 0 45.255s32.758 12.497 45.255 0l137.373-137.373z' /%3E %3Cpath fill='%23fff' d='M224 754.745v-114.745c0-17.673-14.327-32-32-32s-32 14.327-32 32v192c0 17.673 14.327 32 32 32h192c17.673 0 32-14.327 32-32s-14.327-32-32-32h-114.745l137.373-137.373c12.497-12.497 12.497-32.758 0-45.255s-32.758-12.497-45.255 0l-137.373 137.373z' /%3E%3C/svg%3E\")}.playkit-icon-minimize{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M672 306.745v-114.745c0-17.673-14.327-32-32-32s-32 14.327-32 32v192c0 17.673 14.327 32 32 32h192c17.673 0 32-14.327 32-32s-14.327-32-32-32h-114.745l137.373-137.373c12.497-12.497 12.497-32.758 0-45.255s-32.758-12.497-45.255 0l-137.373 137.373z' /%3E%3Cpath fill='%23fff' d='M352 717.255v114.745c0 17.673 14.327 32 32 32s32-14.327 32-32v-192c0-17.673-14.327-32-32-32h-192c-17.673 0-32 14.327-32 32s14.327 32 32 32h114.745l-137.373 137.373c-12.497 12.497-12.497 32.758 0 45.255s32.758 12.497 45.255 0l137.373-137.373z' /%3E%3C/svg%3E\")}.playkit-icon-play{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M796.806 461.202c44.919 28.075 44.739 73.706 0 101.668l-459.472 287.171c-44.919 28.075-81.334 7.915-81.334-45.305v-585.4c0-53.096 36.595-73.266 81.334-45.305l459.472 287.171z' /%3E%3C/svg%3E\")}.playkit-icon-pause{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M256 287.843c0-35.259 28.407-63.843 64-63.843 35.346 0 64 28.564 64 63.843v448.314c0 35.259-28.407 63.843-64 63.843-35.346 0-64-28.564-64-63.843v-448.314zM640 287.843c0-35.259 28.407-63.843 64-63.843 35.346 0 64 28.564 64 63.843v448.314c0 35.259-28.407 63.843-64 63.843-35.346 0-64-28.564-64-63.843v-448.314z' /%3E%3C/svg%3E\")}.playkit-icon-volume-base{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M128 416v192h96v-192h-96zM64 383.853c0-17.592 14.012-31.853 32.094-31.853h159.813c17.725 0 32.094 14.581 32.094 31.853v256.295c0 17.592-14.012 31.853-32.094 31.853h-159.813c-17.725 0-32.094-14.581-32.094-31.853v-256.295z' /%3E%3Cpath fill='%23fff' d='M288 634.342l160 88.889v-422.462l-160 88.889v244.684zM224 352l231.787-128.771c31.046-17.248 56.213-2.487 56.213 32.476v512.589c0 35.184-25.054 49.786-56.213 32.476l-231.787-128.771v-320z' /%3E%3C/svg%3E\")}.playkit-icon-volume-waves{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M802.017 837.177c82.359-86.627 129.183-201.774 129.183-324.26 0-123.976-47.976-240.409-132.127-327.329-12.293-12.697-32.552-13.025-45.249-0.732s-13.025 32.552-0.732 45.249c72.692 75.084 114.109 175.597 114.109 282.812 0 105.928-40.422 205.331-111.566 280.162-12.177 12.808-11.666 33.063 1.143 45.24s33.063 11.666 45.24-1.143z' /%3E%3Cpath fill='%23fff' d='M667.436 743.221c67.761-60.884 107.273-147.888 107.273-241.233 0-87.318-34.552-169.203-94.836-229.446-12.501-12.493-32.762-12.486-45.255 0.015s-12.486 32.762 0.015 45.255c48.375 48.342 76.075 113.989 76.075 184.176 0 75.021-31.679 144.776-86.048 193.627-13.146 11.812-14.227 32.044-2.416 45.19s32.044 14.227 45.19 2.416z' /%3E%3C/svg%3E\")}.playkit-icon-volume-wave{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M667.436 743.221c67.761-60.884 107.273-147.888 107.273-241.233 0-87.318-34.552-169.203-94.836-229.446-12.501-12.493-32.762-12.486-45.255 0.015s-12.486 32.762 0.015 45.255c48.375 48.342 76.075 113.989 76.075 184.176 0 75.021-31.679 144.776-86.048 193.627-13.146 11.812-14.227 32.044-2.416 45.19s32.044 14.227 45.19 2.416z'/%3E%3C/svg%3E\")}.playkit-icon-volume-mute{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M768 466.745l-67.986-67.986c-12.213-12.213-32.654-12.393-45.151 0.104-12.584 12.584-12.543 32.711-0.104 45.151l67.986 67.986-67.986 67.986c-12.213 12.213-12.393 32.654 0.104 45.151 12.584 12.584 32.711 12.543 45.151 0.104l67.986-67.986 67.986 67.986c12.213 12.213 32.654 12.393 45.151-0.104 12.584-12.584 12.543-32.711 0.104-45.151l-67.986-67.986 67.986-67.986c12.213-12.213 12.393-32.654-0.104-45.151-12.584-12.584-32.711-12.543-45.151-0.104l-67.986 67.986z' /%3E%3C/svg%3E\")}.playkit-icon-close{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M573.162 512l214.269-214.269c16.772-16.772 16.688-44.071-0.202-60.96-17.007-17.007-44.182-16.98-60.96-0.202l-214.269 214.269-214.269-214.269c-16.772-16.772-44.071-16.688-60.96 0.202-17.007 17.007-16.98 44.182-0.202 60.96l214.269 214.269-214.269 214.269c-16.772 16.772-16.688 44.071 0.202 60.96 17.007 17.007 44.182 16.98 60.96 0.202l214.269-214.269 214.269 214.269c16.772 16.772 44.071 16.688 60.96-0.202 17.007-17.007 16.98-44.182 0.202-60.96l-214.269-214.269z' /%3E%3C/svg%3E\")}.playkit-icon-settings{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M803.451 546.033c2.552-22.107 2.552-44.408 0.246-64.81-1.084-6.208-6.499-10.721-12.535-10.671-30.286 0.533-57.727-17.773-68.866-45.941s-3.64-60.291 18.795-80.593c3.935-3.569 4.416-9.583 0.92-13.959-13.595-17.35-29.146-33.073-46.311-46.83-4.23-3.38-10.359-2.886-14.783 1.966-14.421 14.721-34.212 22.938-54.434 22.761-9.009 0.041-17.942-1.652-26.865-5.212-28.414-11.992-46.226-40.546-44.49-71.542 0.335-5.319-3.547-9.972-8.785-10.588-21.926-2.538-44.068-2.595-65.961-0.176-5.349 0.6-9.341 5.207-9.175 10.514 1.027 30.384-16.802 58.251-45.764 70.431-8.238 3.138-16.993 4.701-25.207 4.609-20.599 0.206-40.395-7.982-55.482-23.363-2.014-2.187-4.849-3.435-7.553-3.445-2.441 0.015-4.811 0.83-6.513 2.139-17.541 13.798-33.455 29.547-47.262 46.729-3.418 4.337-2.922 10.575 0.97 14.162 22.816 20.692 30.19 53.479 17.807 83.351-13.035 27.396-41.135 44.394-71.446 43.222-5.112-0.197-9.499 3.606-10.086 9.179-2.673 22.023-2.673 44.289-0.212 64.867 1.080 6.27 6.559 10.824 13.309 10.737l2.225 0.006c28.935 0.604 54.726 18.391 65.634 45.374 11.22 28.205 3.921 60.407-18.565 81.204-3.866 3.509-4.341 9.418-0.895 13.742 13.545 17.354 29.027 33.106 46.042 46.867 4.303 3.449 10.547 2.954 14.986-1.907 14.414-14.76 34.226-23.001 54.43-22.82 9.070-0.052 18.063 1.668 27.041 5.299 28.19 12.071 45.891 40.41 44.347 71.468-0.342 5.312 3.536 9.962 8.802 10.578 21.915 2.548 44.049 2.605 65.929 0.176 5.364-0.604 9.364-5.227 9.191-10.598-0.997-30.358 16.84-58.183 45.452-70.201 8.263-3.256 17.070-4.908 25.521-4.865 20.676-0.206 40.533 8.070 55.398 23.38 2.039 2.195 4.898 3.446 7.673 3.455 2.268-0.011 4.468-0.776 6.321-2.228 17.625-13.724 33.599-29.444 47.415-46.611 3.426-4.348 2.928-10.6-0.863-14.097-22.358-20.082-30.057-51.85-19.372-79.939s37.55-46.71 67.745-46.857h5.229c5.12-0.026 9.413-3.875 9.996-8.962zM861.733 552.735c-3.961 34.572-33.157 60.748-68.129 60.926h-5.235c-5.803 0.028-10.991 3.624-13.054 9.048s-0.577 11.558 4.020 15.69c26.602 24.519 29.853 65.381 7.275 94.034-16.847 20.934-36.063 39.845-57.197 56.302-12.034 9.427-26.861 14.584-42.368 14.658-19.254-0.051-37.623-8.090-50.269-21.718-3.221-3.315-7.66-5.165-12.712-5.118-1.425-0.007-2.839 0.258-3.554 0.532-5.581 2.346-9.136 7.892-8.937 13.966 1.152 35.958-25.509 66.771-61.307 70.804-26.332 2.923-52.909 2.854-79.246-0.208-36.286-4.245-62.897-36.157-60.576-72.186 0.304-6.123-3.235-11.788-8.302-13.964-1.328-0.536-2.748-0.808-4.606-0.8-4.651-0.041-9.118 1.817-11.635 4.367-24.544 27.036-65.886 30.311-94.481 7.394-20.587-16.65-39.207-35.595-55.308-56.226-22.552-28.277-19.261-69.208 7.317-93.334 4.474-4.138 5.939-10.604 3.748-16.115-2.052-5.076-6.932-8.442-11.794-8.55-36.436 0.464-66.759-24.741-72.949-60.89-3.243-26.718-3.243-53.731-0.055-79.964 3.744-35.827 34.642-62.605 70.642-61.219 6.877 0.266 13.251-3.59 15.584-8.401 2.309-5.59 0.861-12.028-3.789-16.247-26.603-24.51-29.856-65.368-7.293-93.994 16.767-20.868 35.856-39.76 57.129-56.491 12.099-9.322 26.921-14.42 42.463-14.513 19.308 0.059 37.717 8.166 50.145 21.684 3.263 3.322 7.737 5.172 12.994 5.126 1.471 0.015 2.933-0.245 3.363-0.39 5.601-2.359 9.165-7.93 8.957-14.077-1.126-35.941 25.542-66.721 61.322-70.731 26.322-2.909 52.889-2.84 79.251 0.212 36.244 4.265 62.828 36.125 60.546 72.343-0.339 6.047 3.159 11.654 8.186 13.782 1.381 0.55 2.855 0.829 4.726 0.823 4.663 0.040 9.142-1.819 11.615-4.312 24.439-26.99 65.656-30.312 94.137-7.557 20.721 16.607 39.456 35.549 55.655 56.225 22.667 28.35 19.38 69.439-7.531 93.846-4.33 3.918-5.776 10.112-3.628 15.542s7.438 8.96 13.543 8.854c34.999-0.298 65.076 24.766 71.337 60.925 3.065 26.552 3.065 53.368 0 79.92zM511.956 589.951c43.215-0.108 78.137-35.17 78.072-78.385 0-31.732-19.132-60.334-48.461-72.448s-63.068-5.35-85.461 17.133c-22.393 22.483-29.022 56.249-16.791 85.529s40.909 48.298 72.641 48.171zM512.146 648.617c-55.438 0.221-105.58-33.029-126.965-84.224s-9.796-110.233 29.358-149.543c39.153-39.31 98.144-51.136 149.424-29.956s84.731 71.189 84.732 126.627c0.114 75.549-60.999 136.907-136.548 137.096z' /%3E%3C/svg%3E\")}.playkit-icon-check{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M342.481 563.894c-12.577-12.416-32.838-12.285-45.254 0.292s-12.285 32.838 0.292 45.254l118.857 117.333c13.275 13.105 34.901 12.123 46.933-2.131l297.143-352c11.4-13.505 9.694-33.694-3.811-45.094s-33.694-9.694-45.094 3.811l-274.828 325.566-94.238-93.030z' /%3E%3C/svg%3E\")}.playkit-icon-check-active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M342.481 563.894c-12.577-12.416-32.838-12.285-45.254 0.292s-12.285 32.838 0.292 45.254l118.857 117.333c13.275 13.105 34.901 12.123 46.933-2.131l297.143-352c11.4-13.505 9.694-33.694-3.811-45.094s-33.694-9.694-45.094 3.811l-274.828 325.566-94.238-93.030z' /%3E%3C/svg%3E\")}.playkit-icon-language{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c159.058 0 288-128.942 288-288s-128.942-288-288-288c-159.058 0-288 128.942-288 288s128.942 288 288 288zM512 864c-194.404 0-352-157.596-352-352s157.596-352 352-352c194.404 0 352 157.596 352 352s-157.596 352-352 352z' /%3E%3Cpath fill='%23fff' d='M441.231 173.324c-76.632 84.62-121.231 207.208-121.231 338.676 0 134.304 46.556 259.282 126.083 343.936l46.646-43.82c-68.041-72.429-108.728-181.651-108.728-300.116 0-116.001 39.001-223.203 104.669-295.716l-47.438-42.96z' /%3E%3Cpath fill='%23fff' d='M584.297 173.324c76.632 84.62 121.231 207.208 121.231 338.676 0 134.304-46.556 259.282-126.083 343.936l-46.646-43.82c68.041-72.429 108.728-181.651 108.728-300.116 0-116.001-39.001-223.203-104.669-295.716l47.438-42.96z' /%3E%3Cpath fill='%23fff' d='M840.432 419.786c-81.65-22.637-200.551-35.786-328.432-35.786-128.056 0-247.103 13.185-328.758 35.876l17.136 61.663c75.47-20.972 188.938-33.539 311.622-33.539 122.521 0 235.854 12.533 311.334 33.459l17.099-61.674z' /%3E%3Cpath fill='%23fff' d='M840.432 605.754c-81.65 22.637-200.551 35.786-328.432 35.786-128.056 0-247.103-13.185-328.758-35.876l17.136-61.663c75.47 20.972 188.938 33.539 311.622 33.539 122.521 0 235.854-12.533 311.334-33.459l17.099 61.674z' /%3E%3Cpath fill='%23fff' d='M480 192h64v640h-64v-640z' /%3E%3C/svg%3E\")}.playkit-icon-quality{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M159.904 192h288.234c17.277 0 31.862 14.323 31.862 31.992 0 17.792-14.261 31.993-31.853 31.994l-288.147 0.014v544.174c-0.017-0.18 704-0.174 704-0.174v-128.006c0-17.795 14.327-31.994 32-31.994 17.796 0 32 14.34 32 32.029v128.145c0 35.25-28.639 63.826-63.904 63.826h-704.192c-35.293 0-63.904-28.875-63.904-63.826v-544.348c0-35.25 28.639-63.826 63.904-63.826zM501.818 378.182c108.449 0 196.364-87.915 196.364-196.364 0-29.091 43.636-29.091 43.636 0 0 108.449 87.915 196.364 196.364 196.364 29.091 0 29.091 43.636 0 43.636-108.449 0-196.364 87.915-196.364 196.364 0 29.091-43.636 29.091-43.636 0 0-108.449-87.915-196.364-196.364-196.364-29.091 0-29.091-43.636 0-43.636z' /%3E%3C/svg%3E\")}.playkit-icon-captions{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M160 771.213c-0.017-0.172 704-0.166 704-0.166v-518.261c0.017 0.172-704 0.166-704 0.166v518.261zM96 252.787c0-33.572 28.639-60.787 63.904-60.787h704.192c35.293 0 63.904 27.5 63.904 60.787v518.427c0 33.572-28.639 60.787-63.904 60.787h-704.192c-35.293 0-63.904-27.5-63.904-60.787v-518.427z' /%3E%3Cpath fill='%23fff' d='M490.583 568.655c0 7.729-2.311 15.987-6.933 24.777s-11.668 17.162-21.14 25.118c-9.471 7.956-21.405 14.358-35.801 19.208s-30.611 7.274-48.644 7.274c-38.34 0-68.268-11.176-89.787-33.528s-32.278-52.319-32.278-89.901c0-25.459 4.925-47.962 14.775-67.511s24.095-34.665 42.734-45.348c18.639-10.684 40.916-16.025 66.829-16.025 16.063 0 30.8 2.349 44.212 7.047s24.777 10.759 34.096 18.185c9.32 7.425 16.442 15.343 21.367 23.754s7.388 16.253 7.388 23.527c0 7.425-2.766 13.714-8.297 18.867s-12.237 7.729-20.117 7.729c-5.152 0-9.433-1.326-12.843-3.978s-7.236-6.933-11.479-12.843c-7.577-11.517-15.495-20.155-23.754-25.913s-18.753-8.638-31.482-8.638c-18.336 0-33.111 7.16-44.325 21.481s-16.821 33.907-16.821 58.759c0 11.669 1.44 22.39 4.319 32.164s7.047 18.109 12.502 25.004c5.455 6.895 12.047 12.123 19.776 15.684s16.215 5.342 25.459 5.342c12.426 0 23.072-2.879 31.937-8.638s16.707-14.548 23.527-26.368c3.789-6.971 7.88-12.426 12.275-16.366s9.774-5.91 16.139-5.91c7.577 0 13.866 2.879 18.867 8.638s7.501 11.896 7.501 18.412zM767.219 568.655c0 7.729-2.311 15.987-6.933 24.777s-11.668 17.162-21.14 25.118c-9.471 7.956-21.405 14.358-35.801 19.208s-30.611 7.274-48.644 7.274c-38.34 0-68.268-11.176-89.787-33.528s-32.278-52.319-32.278-89.901c0-25.459 4.925-47.962 14.775-67.511s24.095-34.665 42.734-45.348c18.639-10.684 40.916-16.025 66.829-16.025 16.063 0 30.8 2.349 44.212 7.047s24.777 10.759 34.096 18.185c9.32 7.425 16.442 15.343 21.367 23.754s7.388 16.253 7.388 23.527c0 7.425-2.766 13.714-8.297 18.867s-12.237 7.729-20.117 7.729c-5.152 0-9.433-1.326-12.843-3.978s-7.236-6.933-11.479-12.843c-7.577-11.517-15.495-20.155-23.754-25.913s-18.753-8.638-31.482-8.638c-18.336 0-33.111 7.16-44.325 21.481s-16.821 33.907-16.821 58.759c0 11.669 1.44 22.39 4.319 32.164s7.047 18.109 12.502 25.004c5.455 6.895 12.047 12.123 19.776 15.684s16.215 5.342 25.459 5.342c12.426 0 23.072-2.879 31.937-8.638s16.707-14.548 23.527-26.368c3.789-6.971 7.88-12.426 12.275-16.366s9.774-5.91 16.139-5.91c7.577 0 13.866 2.879 18.867 8.638s7.501 11.896 7.501 18.412z' /%3E%3C/svg%3E\")}.playkit-icon-speed{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 832c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM480.239 643.971c-0.158-1.272-0.239-2.566-0.239-3.876v-192.19c0-17.621 14.204-31.905 32-31.905 17.673 0 32 14.497 32 31.905v192.19c0 1.313-0.079 2.607-0.232 3.878 55.325 14.128 96.232 64.301 96.232 124.027 0 70.692-57.308 128-128 128s-128-57.308-128-128c0-59.729 40.91-109.903 96.239-124.029zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z' /%3E%3C/svg%3E\")}.playkit-icon-speed-down{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM401.852 670.758c-1.056-0.826-2.077-1.728-3.055-2.706l-113.005-113.005c-12.533-12.533-12.65-32.737-0.066-45.321 12.497-12.497 32.536-12.719 45.321 0.066l113.005 113.005c0.976 0.976 1.876 1.998 2.701 3.059 19.106-11.343 41.416-17.855 65.248-17.855 70.692 0 128 57.308 128 128s-57.308 128-128 128c-70.692 0-128-57.308-128-128 0-23.829 6.511-46.137 17.852-65.242zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z'/%3E%3C/svg%3E\")}.playkit-icon-speed-up{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM546.516 612.708c0.524-1.23 1.129-2.446 1.819-3.64l79.906-138.402c8.862-15.35 28.348-20.692 43.76-11.794 15.305 8.837 20.707 28.135 11.666 43.794l-79.906 138.402c-0.693 1.201-1.451 2.34-2.268 3.416 23.761 23.238 38.508 55.655 38.508 91.516 0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 11.959 0 23.535 1.64 34.516 4.708zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z'/%3E%3C/svg%3E\")}.playkit-icon-audio{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M768 625.124v-354.531l-352 135.385v330.022c0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 23.314 0 45.173 6.233 64 17.124v-241.124c0-13.241 8.155-25.114 20.513-29.867l416-160c20.96-8.062 43.487 7.41 43.487 29.867v512c0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 23.314 0 45.173 6.233 64 17.124zM288 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM704 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64z' /%3E%3C/svg%3E\")}.playkit-icon-arrow-down{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M301.255 338.745c-24.994-24.994-65.516-24.994-90.51 0s-24.994 65.516 0 90.51l256 256c24.994 24.994 65.516 24.994 90.51 0l256-256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0l-210.745 210.745-210.745-210.745z' /%3E%3C/svg%3E\")}.playkit-icon-start-over{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M255.271 339.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z' /%3E%3C/svg%3E\")}.playkit-icon-seek-end{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M742.494 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'/%3E%3C/svg%3E\")}.playkit-icon-rewind{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' opacity='0.5' d='M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M816.068 431.974c-20.553-78.699-71.369-149.456-147.375-193.338-139.923-80.785-316.040-42.095-410.222 84.418l89.738-4.499c20.299-1.018 37.579 14.613 38.596 34.911s-14.613 37.579-34.911 38.596l-159.799 8.011c-16.335 0.819-31.25-9.242-36.61-24.694l-52.434-151.164c-6.66-19.202 3.506-40.167 22.708-46.828s40.167 3.506 46.828 22.708l27.226 78.49c116.254-155.703 333.248-203.244 505.682-103.69 91.184 52.645 152.976 136.648 179.618 230.523l-69.044 26.555z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-rewind-10{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M413.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM596.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM529.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-forward{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' opacity='0.5' d='M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M207.932 431.974c20.553-78.699 71.369-149.456 147.375-193.338 139.923-80.785 316.040-42.095 410.222 84.418l-89.738-4.499c-20.299-1.018-37.579 14.613-38.596 34.911s14.613 37.579 34.911 38.596l159.799 8.011c16.335 0.819 31.25-9.242 36.61-24.694l52.434-151.164c6.66-19.202-3.506-40.167-22.708-46.828s-40.167 3.506-46.828 22.708l-27.226 78.49c-116.254-155.703-333.248-203.244-505.682-103.69-91.184 52.645-152.976 136.648-179.618 230.523l69.044 26.555z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-forward-10{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M365.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM548.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM481.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-vr-stereo{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M864 255.996c53.019 0 96 42.981 96 96v384.004c0 53.019-42.981 96-96 96h-219.764c-33.721 0-64.97-17.693-82.319-46.608l-49.917-83.195-49.917 83.195c-17.349 28.916-48.598 46.608-82.319 46.608h-219.764c-53.019 0-96-42.981-96-96v-384.003c0-53.019 42.981-96 96-96h704zM128 351.997v384.003c0 17.673 14.327 32 32 32h219.764c11.24 0 21.657-5.898 27.44-15.536l49.917-83.195c5.405-9.008 12.944-16.547 21.952-21.952 30.309-18.185 69.622-8.357 87.807 21.952l49.917 83.195c5.783 9.639 16.199 15.536 27.44 15.536h219.764c17.673 0 32-14.327 32-32v-384.004c0-17.673-14.327-32-32-32h-704c-17.673 0-32 14.327-32 32zM304 624c-44.183 0-80-35.817-80-80s35.817-80 80-80c44.183 0 80 35.817 80 80s-35.817 80-80 80zM720 624c-44.183 0-80-35.817-80-80s35.817-80 80-80c44.183 0 80 35.817 80 80s-35.817 80-80 80z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-vr-stereo-full{background-image:var(--playkit-icon-vr-stereo-full-url)}.playkit-icon-chromecast{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M160 704v96h96c0-53.12-42.88-96-96-96zM160 576v64c88.32 0 160 71.68 160 160h64c0-123.84-100.16-224-224-224zM736 352h-448v52.16c126.72 40.96 226.88 141.12 267.84 267.84h180.16v-320zM160 448v64c159.040 0 288 128.96 288 288h64c0-194.56-157.76-352-352-352zM800 224h-576c-35.2 0-64 28.8-64 64v96h64v-96h576v448h-224v64h224c35.2 0 64-28.8 64-64v-448c0-35.2-28.8-64-64-64z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-chromecast-brand{background-image:var(--playkit-icon-chromecast-url)}.playkit-icon-next{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M640 549.333l-264.982 154.573c-30.386 17.725-55.018 3.388-55.018-32.094v-319.625c0-35.45 24.605-49.835 55.018-32.094l264.982 154.573v-154.448c0-17.794 14.204-32.219 32-32.219 17.673 0 32 14.398 32 32.219v383.562c0 17.794-14.204 32.219-32 32.219-17.673 0-32-14.398-32-32.219v-154.448z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-prev{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M384 549.333l264.982 154.573c30.386 17.725 55.018 3.388 55.018-32.094v-319.625c0-35.45-24.605-49.835-55.018-32.094l-264.982 154.573v-154.448c0-17.794-14.204-32.219-32-32.219-17.673 0-32 14.398-32 32.219v383.562c0 17.794 14.204 32.219 32 32.219 17.673 0 32-14.398 32-32.219v-154.448z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-picture-in-picture-start{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M224 256c-17.673 0-32 14.327-32 32v448c0 17.673 14.327 32 32 32h576c17.673 0 32-14.327 32-32v-448c0-17.673-14.327-32-32-32h-576zM224 192h576c53.019 0 96 42.981 96 96v448c0 53.019-42.981 96-96 96h-576c-53.019 0-96-42.981-96-96v-448c0-53.019 42.981-96 96-96z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M544 512h192c17.673 0 32 14.327 32 32v128c0 17.673-14.327 32-32 32h-192c-17.673 0-32-14.327-32-32v-128c0-17.673 14.327-32 32-32z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-picture-in-picture-stop{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M800 192c51.126 0 92.917 39.965 95.837 90.359l0.163 5.641v448c0 51.126-39.965 92.917-90.359 95.837l-5.641 0.163h-576c-51.126 0-92.917-39.965-95.837-90.359l-0.163-5.641v-64c0-17.673 14.327-32 32-32 16.411 0 29.936 12.353 31.785 28.268l0.215 3.732v64c0 16.411 12.353 29.936 28.268 31.785l3.732 0.215h576c16.411 0 29.936-12.353 31.785-28.268l0.215-3.732v-448c0-16.411-12.353-29.936-28.268-31.785l-3.732-0.215h-192c-17.673 0-32-14.327-32-32 0-16.411 12.353-29.936 28.268-31.785l3.732-0.215h192z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M416 192c17.673 0 32 14.327 32 32 0 16.411-12.353 29.936-28.268 31.785l-3.732 0.215-178.752-0.032 202.711 202.736c12.497 12.497 12.497 32.758 0 45.255-11.535 11.535-29.687 12.423-42.24 2.662l-3.015-2.662-202.704-202.679v178.72c0 16.411-12.353 29.936-28.268 31.785l-3.732 0.215c-16.411 0-29.936-12.353-31.785-28.268l-0.215-3.732v-256l0.005-0.588c0.014-0.757 0.054-1.514 0.122-2.268l-0.127 2.856c0-1.62 0.12-3.212 0.353-4.767 0.083-0.544 0.182-1.101 0.295-1.656 0.141-0.705 0.307-1.399 0.495-2.084 0.14-0.5 0.288-0.992 0.449-1.482 0.204-0.629 0.434-1.262 0.684-1.885 0.227-0.568 0.466-1.121 0.722-1.669 0.311-0.661 0.644-1.314 0.998-1.954 0.212-0.388 0.439-0.779 0.676-1.166 0.503-0.818 1.040-1.614 1.61-2.382 0.174-0.238 0.351-0.47 0.532-0.7 1.588-2.021 3.42-3.854 5.45-5.446l-2.891 2.563c1.133-1.133 2.329-2.163 3.578-3.090 0.774-0.571 1.569-1.108 2.389-1.609 0.386-0.239 0.777-0.466 1.171-0.685 0.633-0.348 1.285-0.681 1.951-0.993 0.544-0.255 1.098-0.495 1.656-0.718 0.632-0.253 1.265-0.483 1.907-0.694 0.476-0.154 0.969-0.302 1.464-0.438 0.69-0.192 1.384-0.359 2.086-0.502 0.557-0.111 1.115-0.209 1.674-0.293 0.327-0.051 0.672-0.097 1.019-0.137l0.876-0.088c0.755-0.067 1.511-0.108 2.268-0.122l0.588-0.005h256z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-advanced-audio-description{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 24 24' width='24' height='24' fill-rule='nonzero'%3E%3Cpath d='M6.647 12.958h1.547V10.81l-1.547 2.147ZM12.226 10.408c.99 0 1.787.717 1.787 1.595 0 .881-.798 1.598-1.787 1.598h-.467v-3.193h.467Z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.536 4C2.688 4 2 4.68 2 5.52v12.96c0 .832.688 1.52 1.536 1.52h16.928c.848 0 1.536-.68 1.536-1.52V5.52C22 4.688 21.312 4 20.464 4H3.536Zm15.335 5h.826c.83.87 1.303 1.982 1.303 3.14a4.504 4.504 0 0 1-1.033 2.837h-.792c.745-.793 1.165-1.792 1.165-2.838 0-1.178-.537-2.311-1.47-3.139ZM8.185 15h1.47V9.004H7.819L3 15h2.158l.566-.793h2.461V15Zm4.223-.003c1.851 0 3.357-1.343 3.357-2.994 0-1.657-1.49-2.997-3.341-2.997h-2.075v5.993h2.059v-.002ZM18.008 9h-.826c.932.828 1.47 1.961 1.47 3.14 0 1.045-.421 2.044-1.166 2.837h.787a4.48 4.48 0 0 0 1.038-2.838c0-1.157-.472-2.27-1.303-3.139Zm-2.515 0h.82c.837.87 1.304 1.982 1.304 3.14a4.474 4.474 0 0 1-1.033 2.837h-.787c.74-.793 1.16-1.792 1.16-2.838 0-1.178-.532-2.311-1.464-3.139Z' fill='%23fff'/%3E%3C/svg%3E\")}.playkit-icon-quality-hd:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M3.73939861,5 L2,5 L2,11 L3.73939861,11 L3.73918396,8.56940659 L5.96845644,8.56940659 L5.9691596,11 L7.69930609,11 L7.69930609,5 L5.9691596,5 L5.96845644,7.32457143 L3.73918396,7.32457143 L3.73939861,5 Z M10.849653,5 L8.65690054,5 L8.65690054,11 L10.8774094,11 L11.1387878,10.9921562 C11.5670397,10.9660102 11.9583976,10.8744992 12.3128614,10.7176232 L12.3128614,10.7176232 L12.4919044,10.6311813 L12.686671,10.5199596 C13.0639309,10.2858264 13.3675515,9.98155416 13.5975328,9.60714286 C13.827514,9.23273155 13.9589319,8.81088809 13.9917864,8.34161247 L13.9917864,8.34161247 L14,8.10302198 L14,7.9010989 L13.9917864,7.66145717 C13.9589319,7.19033135 13.827514,6.76815149 13.5975328,6.39491758 C13.3292213,5.95947802 12.9583655,5.61813187 12.4849653,5.37087912 C12.0791937,5.15894819 11.6207417,5.03784481 11.1096093,5.00756896 L11.1096093,5.00756896 L10.849653,5 Z M10.849653,6.24862637 C11.154973,6.24862637 11.4101773,6.30906593 11.615266,6.42994505 C11.8203547,6.55082418 11.9745567,6.73282967 12.077872,6.97596154 C12.1605243,7.17046703 12.2101157,7.40497253 12.2266461,7.67947802 L12.2266461,7.67947802 L12.232845,7.89285714 L12.232845,8.10302198 L12.2265536,8.31796703 C12.2097764,8.59445055 12.1594449,8.83049451 12.075559,9.0260989 C11.9707016,9.2706044 11.8180416,9.4532967 11.617579,9.57417582 C11.4572089,9.67087912 11.2672321,9.7289011 11.0476484,9.74824176 L11.0476484,9.74824176 L10.8774094,9.75549451 L10.3957366,9.75600879 L10.3957366,6.24937143 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-hd-active:after{background-image:var(--playkit-icon-quality-HD-active-url)}.playkit-icon-quality-4k:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M6.52117789,5 L4.77853973,5 L4.7778117,5.01381978 L2,8.80769231 L2.10649455,9.76785714 L4.7778117,9.76866813 L4.77853973,11 L6.52117789,11 L6.52063574,9.76866813 L7.19402985,9.76785714 L7.19402985,8.5728022 L6.52063574,8.57362637 L6.52117789,5 Z M9.81282775,5 L7.99273901,5 L7.99273901,11 L9.81282775,11 L9.8119758,9.5061978 L10.4712352,8.88589011 L11.8313836,11 L13.9806374,11 L11.6856603,7.6629978 L14,5 L11.7587737,5 L10.3549818,6.78434066 L9.8119758,7.5229011 L9.81282775,5 Z M4.7778117,7.01905934 L4.7778117,8.57362637 L3.65066559,8.5728022 L4.69624849,7.13873626 L4.7778117,7.01905934 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-4k-active:after{background-image:var(--playkit-icon-quality-4K-active-url)}.playkit-icon-quality-8k:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M4.5,5 C4.04427083,5 3.6389974,5.06279225 3.28417969,5.18837675 C2.92936198,5.31396126 2.65104167,5.499666 2.44921875,5.74549098 C2.24739583,5.99131597 2.14648438,6.29458918 2.14648438,6.65531062 C2.14648438,6.96259185 2.24820964,7.23112892 2.45166016,7.46092184 C2.58729384,7.61411712 2.75692636,7.74445187 2.96055773,7.85192607 L2.96055773,7.85192607 L3.07972656,7.90981323 L3.04817708,7.92134269 L2.87890625,8.000668 C2.71614583,8.08483634 2.57291667,8.18353373 2.44921875,8.29676019 L2.44921875,8.29676019 L2.33203125,8.41482966 L2.24394133,8.52320968 C2.08131378,8.74602266 2,9.00515316 2,9.3006012 C2,9.67735471 2.10986328,9.99131597 2.32958984,10.242485 C2.54931641,10.493654 2.84879557,10.6826987 3.22802734,10.8096192 C3.60725911,10.9365397 4.03613281,11 4.51464844,11 C4.99641927,11 5.42366536,10.9365397 5.79638672,10.8096192 C6.16910807,10.6826987 6.46289063,10.493654 6.67773438,10.242485 C6.89257813,9.99131597 7,9.67735471 7,9.3006012 C7,8.95591182 6.89176432,8.66065464 6.67529297,8.41482966 L6.67529297,8.41482966 L6.56041124,8.29676019 C6.3983742,8.14579158 6.20089157,8.02065242 5.96796332,7.92134269 L5.96796332,7.92134269 L5.94,7.911 L6.06141493,7.85192607 L6.20532227,7.76703407 C6.29701063,7.70758183 6.38019929,7.64241446 6.45488824,7.57153195 L6.45488824,7.57153195 L6.56054688,7.46092184 L6.65155707,7.3427967 C6.78945132,7.14054034 6.85839844,6.91137831 6.85839844,6.65531062 C6.85839844,6.29458918 6.75830078,5.99131597 6.55810547,5.74549098 C6.35791016,5.499666 6.08121745,5.31396126 5.72802734,5.18837675 C5.37483724,5.06279225 4.96549479,5 4.5,5 Z M9.8178888,5 L8,5 L8,11 L9.8178888,11 L9.81771088,9.5061978 L10.4751832,8.88673407 L11.8340048,11 L13.9806608,11 L11.6891307,7.6629978 L14,5 L11.7614827,5 L10.3593876,6.78434066 L9.81771088,7.5229011 L9.8178888,5 Z M4.50488281,8.51903808 C4.6546224,8.51903808 4.78401693,8.54375418 4.89306641,8.59318637 C5.00211589,8.64261857 5.0867513,8.71543086 5.14697266,8.81162325 C5.20719401,8.90781563 5.23730469,9.02805611 5.23730469,9.17234469 C5.23730469,9.30861723 5.20800781,9.4261857 5.14941406,9.5250501 C5.09082031,9.6239145 5.0069987,9.7007348 4.89794922,9.75551102 C4.78889974,9.81028724 4.66113281,9.83767535 4.51464844,9.83767535 C4.36490885,9.83767535 4.23388672,9.81028724 4.12158203,9.75551102 C4.00927734,9.7007348 3.92220052,9.6239145 3.86035156,9.5250501 C3.7985026,9.4261857 3.76757812,9.30861723 3.76757812,9.17234469 C3.76757812,9.02805611 3.7985026,8.90781563 3.86035156,8.81162325 C3.92220052,8.71543086 4.00846354,8.64261857 4.11914062,8.59318637 C4.22981771,8.54375418 4.35839844,8.51903808 4.50488281,8.51903808 Z M4.5,6.16232465 C4.63671875,6.16232465 4.74902344,6.18570474 4.83691406,6.23246493 C4.92480469,6.27922512 4.99072266,6.34535738 5.03466797,6.43086172 C5.07861328,6.51636607 5.10058594,6.62057448 5.10058594,6.74348697 C5.10058594,6.86372745 5.08024089,6.96993988 5.03955078,7.06212425 C4.99886068,7.15430862 4.93538411,7.22645291 4.84912109,7.27855711 C4.76285807,7.33066132 4.65136719,7.35671343 4.51464844,7.35671343 C4.37792969,7.35671343 4.2648112,7.33066132 4.17529297,7.27855711 C4.08577474,7.22645291 4.01985677,7.15430862 3.97753906,7.06212425 C3.93522135,6.96993988 3.9140625,6.86372745 3.9140625,6.74348697 C3.9140625,6.62057448 3.93522135,6.51636607 3.97753906,6.43086172 C4.01985677,6.34535738 4.08496094,6.27922512 4.17285156,6.23246493 C4.26074219,6.18570474 4.36979167,6.16232465 4.5,6.16232465 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-8k-active:after{background-image:var(--playkit-icon-quality-8K-active-url)}.playkit-icon-closed-captions-on{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M15.114 18.545c0.144-0.275 0.217-0.533 0.217-0.774 0-0.204-0.078-0.395-0.234-0.575s-0.353-0.27-0.59-0.27c-0.199 0-0.367 0.061-0.504 0.185s-0.265 0.294-0.384 0.511c-0.213 0.369-0.458 0.644-0.735 0.824s-0.61 0.27-0.998 0.27c-0.289 0-0.554-0.056-0.796-0.167s-0.447-0.275-0.618-0.49c-0.171-0.215-0.301-0.476-0.391-0.781s-0.135-0.64-0.135-1.005c0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27s0.505 0.45 0.742 0.81c0.133 0.185 0.252 0.318 0.359 0.401s0.24 0.124 0.401 0.124c0.246 0 0.456-0.081 0.629-0.242s0.259-0.357 0.259-0.59c0-0.227-0.077-0.472-0.231-0.735s-0.377-0.51-0.668-0.742c-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 1.174 0.336 2.111 1.009 2.809s1.608 1.048 2.806 1.048c0.564 0 1.070-0.076 1.52-0.227s0.823-0.352 1.119-0.6c0.296-0.249 0.516-0.51 0.661-0.785z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M23.759 18.545c0.145-0.275 0.217-0.533 0.217-0.774 0-0.204-0.078-0.395-0.234-0.575s-0.353-0.27-0.59-0.27c-0.199 0-0.367 0.061-0.504 0.185s-0.265 0.294-0.384 0.511c-0.213 0.369-0.458 0.644-0.735 0.824s-0.61 0.27-0.998 0.27c-0.289 0-0.554-0.056-0.796-0.167s-0.448-0.275-0.618-0.49c-0.17-0.215-0.301-0.476-0.391-0.781s-0.135-0.64-0.135-1.005c0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27s0.506 0.45 0.742 0.81c0.133 0.185 0.252 0.318 0.359 0.401s0.24 0.124 0.401 0.124c0.246 0 0.456-0.081 0.629-0.242s0.259-0.357 0.259-0.59c0-0.227-0.077-0.472-0.231-0.735s-0.377-0.51-0.668-0.742c-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 1.174 0.336 2.111 1.009 2.809s1.608 1.048 2.806 1.048c0.564 0 1.070-0.076 1.52-0.227s0.823-0.352 1.119-0.6 0.516-0.51 0.661-0.785z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M3 7.9c0-1.049 0.895-1.9 1.997-1.9h22.006c1.103 0 1.997 0.859 1.997 1.9v16.201c0 1.049-0.895 1.9-1.997 1.9h-22.006c-1.103 0-1.997-0.859-1.997-1.9v-16.201zM5 24.1c-0.001-0.005 22-0.005 22-0.005v-16.196c0 0.005-22 0.005-22 0.005v16.196z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-closed-captions-off{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M30.133 6.838l-1.143 0.863c0.007 0.065 0.011 0.131 0.011 0.198v16.201c0 1.049-0.895 1.9-1.997 1.9h-22.006c-0.080 0-0.159-0.005-0.236-0.013l-1.128 0.851c-0.463 0.349-1.121 0.257-1.471-0.206s-0.257-1.121 0.206-1.471l26.5-20c0.463-0.349 1.121-0.257 1.471 0.206s0.257 1.121-0.206 1.471zM27 9.202l-4.619 3.486c0.222 0.109 0.421 0.233 0.596 0.373 0.291 0.232 0.514 0.479 0.668 0.742s0.231 0.508 0.231 0.735c0 0.232-0.086 0.429-0.259 0.59s-0.382 0.242-0.629 0.242c-0.161 0-0.295-0.041-0.401-0.124s-0.226-0.217-0.359-0.401c-0.237-0.36-0.484-0.63-0.742-0.81-0.164-0.114-0.357-0.193-0.578-0.234l-2.249 1.697c-0.045 0.237-0.068 0.495-0.068 0.774 0 0.365 0.045 0.7 0.135 1.005s0.22 0.566 0.391 0.781c0.171 0.215 0.377 0.379 0.618 0.49s0.507 0.167 0.796 0.167c0.388 0 0.721-0.090 0.998-0.27s0.522-0.455 0.735-0.824c0.118-0.218 0.246-0.388 0.384-0.511s0.305-0.185 0.504-0.185c0.237 0 0.433 0.090 0.59 0.27s0.234 0.372 0.234 0.575c0 0.241-0.072 0.5-0.217 0.774s-0.365 0.536-0.661 0.785-0.669 0.449-1.119 0.6c-0.45 0.152-0.957 0.227-1.52 0.227-1.198 0-2.133-0.349-2.806-1.048-0.536-0.557-0.858-1.265-0.967-2.123l-1.382 1.043c-0.033 0.165-0.096 0.337-0.19 0.516-0.145 0.275-0.365 0.536-0.661 0.785s-0.669 0.449-1.119 0.6c-0.246 0.083-0.508 0.143-0.788 0.18l-5.283 3.987c5.615-0.003 19.737-0.003 19.737-0.003v-14.893z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M4.997 6h19.546l-2.492 1.903c-6.487 0.002-17.051 0.002-17.051 0.002v13.019l-2 1.527v-14.551c0-1.049 0.895-1.9 1.997-1.9z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M12.841 14.034c0.179 0.125 0.353 0.293 0.521 0.504l1.399-1.068c-0.121-0.141-0.264-0.277-0.428-0.409-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 0.77 0.144 1.437 0.433 2.002l1.598-1.22c-0.056-0.252-0.085-0.522-0.085-0.81 0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27z'%3E%3C/path%3E%3C/svg%3E\")}@keyframes playkit-openDropmenu{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.playkit-dropdown{position:relative;font-size:15px}.playkit-dropdown .playkit-label-badge{position:relative}.playkit-dropdown .playkit-label-badge:after{top:-5px;right:-18px}.playkit-dropdown.playkit-active .playkit-dropdown-menu{display:block;opacity:1}.playkit-dropdown.playkit-active .playkit-dropdown-button .playkit-icon-arrow-down{transform:rotate(180deg)}.playkit-dropdown .playkit-dropdown-button{font-weight:bold;line-height:18px;color:#fff;cursor:pointer;padding-left:20px;display:flex}.playkit-dropdown .playkit-dropdown-button .playkit-icon{width:16px;height:16px;vertical-align:middle;margin-left:6px;transition:150ms transform;will-change:transform}.playkit-dropdown .playkit-dropdown-button>.playkit-label-badge.playkit-badge-icon{margin-right:13px}.playkit-dropdown-menu{display:block;opacity:1;position:absolute;background-color:#333;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);border-radius:4px;padding:6px 0;z-index:5;animation:playkit-openDropmenu 100ms ease-out forwards;max-height:220px;overflow-y:auto;font-size:15px;text-align:left;font-weight:normal}.playkit-dropdown-menu.playkit-top{margin-bottom:10px;bottom:100%}.playkit-dropdown-menu.playkit-bottom{margin-top:10px;top:100%}.playkit-dropdown-menu.playkit-right{left:0}.playkit-dropdown-menu.playkit-left{right:0}.playkit-dropdown-menu.playkit-stick-bottom{bottom:-95px;margin:5px 0}.playkit-dropdown-menu .playkit-dropdown-menu-item{display:flex;justify-content:space-between;align-items:center;padding:2px 10px 2px 16px;white-space:nowrap;min-height:30px;cursor:pointer}.playkit-dropdown-menu .playkit-dropdown-menu-item:hover{color:#fff}.playkit-dropdown-menu .playkit-dropdown-menu-item.playkit-active .playkit-menu-icon-container{opacity:1}.playkit-dropdown-menu .playkit-dropdown-menu-item .playkit-icon-check-active{display:inline-block;margin-left:16px;vertical-align:middle;width:24px;height:24px}.playkit-dropdown-menu .playkit-dropdown-menu-item .playkit-menu-icon-container{opacity:0}.playkit-dropdown-menu .playkit-dropdown-menu-item>.playkit-label-badge.playkit-badge-icon{margin-right:5px}.playkit-player .playkit-control-button{width:32px;height:32px;background:rgba(0,0,0,0);display:inline-block;opacity:.8;border:none;padding:0;cursor:pointer}.playkit-player .playkit-control-button.playkit-button-badge{position:relative}.playkit-player .playkit-control-button.playkit-button-badge:after{top:-4px;right:-1px}.playkit-player .playkit-control-button i{width:32px;height:32px}.playkit-player .playkit-control-button.playkit-active{opacity:1}.playkit-player .playkit-control-button:disabled{opacity:.4;cursor:default}.playkit-player .playkit-control-button.playkit-control-button-rounded{width:36px;height:36px;padding:2px}.playkit-player:not(.playkit-touch) .playkit-control-button:not(:disabled):hover{opacity:1}.playkit-player:not(.playkit-touch) .playkit-control-button:not(:disabled).playkit-control-button-rounded:hover{background-color:rgba(0,0,0,.4);border-radius:18px}.playkit-player .playkit-control-button-container{display:inline-block;position:relative;vertical-align:top}.playkit-player.playkit-touch .playkit-player .playkit-control-button-container{position:static}.playkit-player.playkit-touch .playkit-control-button{position:relative}.playkit-player.playkit-state-idle .playkit-no-idle-control{display:none}.playkit-rotate{-moz-animation:playkit-spin .3s 1 linear;-o-animation:playkit-spin .3s 1 linear;-webkit-animation:playkit-spin .3s 1 linear;animation:playkit-spin .3s 1 linear}.playkit-reverse-rotate{-moz-animation:playkit-reverse-spin .3s 1 linear;-o-animation:playkit-reverse-spin .3s 1 linear;-webkit-animation:playkit-reverse-spin .3s 1 linear;animation:playkit-reverse-spin .3s 1 linear}@-webkit-keyframes playkit-spin{0%{-webkit-transform:rotate(359deg)}100%{-webkit-transform:rotate(0deg)}}@-moz-keyframes playkit-spin{0%{-moz-transform:rotate(359deg)}100%{-moz-transform:rotate(0deg)}}@-o-keyframes playkit-spin{0%{-o-transform:rotate(359deg)}100%{-o-transform:rotate(0deg)}}@-ms-keyframes playkit-spin{0%{-ms-transform:rotate(359deg)}100%{-ms-transform:rotate(0deg)}}@keyframes playkit-spin{0%{transform:rotate(359deg)}100%{transform:rotate(0deg)}}@-webkit-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-moz-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-o-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-ms-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.playkit-upper-bar-icon{width:36px;height:36px;border-radius:4px;padding:2px;cursor:pointer;color:var(--playkit-tone-1-color);display:flex;align-items:center;justify-content:center;opacity:.8;border:none;background-color:rgba(0,0,0,0);margin:0 4px}.playkit-upper-bar-icon:hover{background-color:var(--playkit-tone-4-color);opacity:1}.playkit-upper-bar-icon:active{background-color:var(--playkit-tone-6-color);opacity:1}.playkit-upper-bar-icon:disabled{opacity:.4}.playkit-player a{font-size:15px;line-height:18px;cursor:pointer;--primary-hover-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-hsl-saturation) calc(var(--playkit-hsl-lightness) - 10%))}.playkit-player a:hover{color:var(--primary-hover-color)}.playkit-player a:active{opacity:.7}.playkit-emptyUrl a{cursor:auto;pointer-events:none}.playkit-player{overflow:hidden;user-select:none;width:100%;height:100%;position:relative;outline:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:none;font-family:Lato,Helvetica Neue,Segoe UI,sans-serif}.playkit-player:-webkit-full-screen{width:100%;height:100%;max-width:none}.playkit-player *{box-sizing:border-box;outline:none}.playkit-player ::selection{background-color:rgba(0,0,0,.1)}.playkit-player video{width:100%;left:0}.playkit-player video::-webkit-media-controls-panel-container,.playkit-player video::-webkit-media-controls{display:none !important;-webkit-appearance:none}.playkit-player video::-webkit-media-controls-start-playback-button{display:none !important;-webkit-appearance:none}.playkit-player .playkit-player-gui{overflow:hidden;font-size:0}.playkit-player .playkit-player-gui label{margin-bottom:0}.playkit-player .overlay-portal{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.playkit-player.playkit-overlay-active .overlay-portal{z-index:11;pointer-events:initial}.playkit-player.playkit-nav *:focus{outline:1px solid var(--playkit-tab-focus-color) !important}.playkit-player [id^=\"playkit-ads-container\"]{transition:transform 100ms}.playkit-player [id^=\"playkit-ads-container\"][data-adtype=\"overlay\"]{z-index:1}.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-hover [id^=\"playkit-ads-container\"],.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-state-paused [id^=\"playkit-ads-container\"],.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-state-idle [id^=\"playkit-ads-container\"]{transform:translateY(-60px);-webkit-transform:translateY(-60px);-ms-transform:translateY(-60px)}.playkit-player.playkit-pre-playback,.playkit-player.playkit-casting,.playkit-player.playkit-metadata-loaded.playkit-hover,.playkit-player.playkit-state-paused,.playkit-player.playkit-state-idle,.playkit-player.playkit-ad-break,.playkit-player.playkit-menu-active,.playkit-player.playkit-overlay-active{cursor:auto}.playkit-player video::-webkit-media-text-track-container{max-height:none}.playkit-player.playkit-iOS video::-webkit-media-text-track-container{position:absolute;top:0;bottom:0;left:0;right:0}.playkit-player.playkit-state-paused video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle video::-webkit-media-text-track-container,.playkit-player.playkit-hover video::-webkit-media-text-track-container{padding:0 0 50px 0}.playkit-player.playkit-state-paused.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-state-paused.playkit-iOS video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle.playkit-iOS video::-webkit-media-text-track-container,.playkit-player.playkit-hover.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-hover.playkit-iOS video::-webkit-media-text-track-container{padding:initial;max-height:calc(100% - 50px)}.playkit-player.playkit-state-paused.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display,.playkit-player.playkit-state-idle.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display,.playkit-player.playkit-hover.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display{transform:translateY(-50px);-webkit-transform:translateY(-50px);-ms-transform:translateY(-50px)}.playkit-player.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-container{max-height:none}.playkit-player.playkit-overlay-active .playkit-subtitles{visibility:hidden}.playkit-player .playkit-subtitles{top:50px;transform:translateY(0px);-webkit-transform:translateY(0px);-ms-transform:translateY(0px);transition:ease-in 100ms}.playkit-player:not(.playkit-overlay-active).playkit-state-paused .playkit-subtitles,.playkit-player:not(.playkit-overlay-active).playkit-state-idle .playkit-subtitles,.playkit-player:not(.playkit-overlay-active).playkit-hover .playkit-subtitles{transform:translateY(-50px);-webkit-transform:translateY(-50px);-ms-transform:translateY(-50px)}.playkit-player:not(.playkit-overlay-active).playkit-fullscreen.playkit-iOS .playkit-subtitles{transform:translateY(0px);-webkit-transform:translateY(0px);-ms-transform:translateY(0px)}.playkit-video-player{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--playkit-player-background-color);transition:all 500ms;transition-property:left,right,bottom,top,width,height;display:flex}.playkit-overlay-active .playkit-video-player{filter:blur(16px)}@keyframes playkit-openOverlay{from{opacity:0}to{opacity:1}}.playkit-overlay{position:absolute;width:100%;height:100%;display:none;opacity:0;animation:playkit-openOverlay 100ms ease-in-out forwards;z-index:11}.playkit-overlay.playkit-active{display:block;opacity:1}.playkit-overlay .playkit-overlay-contents{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:4;text-align:center;color:#fff;padding:60px 20px 30px 20px;overflow-y:auto}.playkit-overlay .playkit-title{font-size:24px;font-weight:bold;line-height:29px;margin-bottom:60px}.playkit-overlay .playkit-close-overlay{position:absolute;top:48px;right:48px;z-index:5;cursor:pointer}.playkit-overlay .playkit-close-overlay .playkit-icon-close{width:24px;height:24px}.playkit-overlay .playkit-overlay-screen{display:none}.playkit-overlay .playkit-overlay-screen.playkit-active{display:block}.playkit-player.playkit-size-md .playkit-overlay .playkit-overlay-contents{padding:36px 20px}.playkit-player.playkit-size-md .playkit-overlay .playkit-close-overlay{top:38px}.playkit-player.playkit-size-md .playkit-overlay .playkit-title{margin-bottom:24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-overlay-contents,.playkit-player.playkit-size-xs .playkit-overlay .playkit-overlay-contents{padding:16px 24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-close-overlay,.playkit-player.playkit-size-xs .playkit-overlay .playkit-close-overlay{top:15px;right:24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-title,.playkit-player.playkit-size-xs .playkit-overlay .playkit-title{font-size:20px;line-height:19px;margin-bottom:24px}@keyframes playkit-openSmartContainer{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes playkit-closeSmartContainer{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(10px)}}.playkit-player:not(.playkit-touch) .playkit-smart-container{background-color:#222;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);border-radius:4px;position:absolute;right:0px;min-width:193px;font-size:15px;z-index:10;display:block;animation:playkit-openSmartContainer 100ms ease-out forwards}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-leaving{animation:playkit-closeSmartContainer 100ms ease-out forwards}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-top{bottom:100%;margin-bottom:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-top:before{display:block;content:\" \";position:absolute;bottom:-6px;left:0;width:100%;height:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-bottom{top:100%;margin-top:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-right{left:0px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-left{right:0px}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item{margin:16px;color:rgba(244,244,244,.8);white-space:nowrap;display:flex;justify-content:space-between}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon{display:none}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item select{align-self:flex-end}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown span:not(.playkit-badge-icon){overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item select{text-align-last:right}.playkit-player.playkit-touch .playkit-smart-container-item,.playkit-player.playkit-size-sm .playkit-smart-container-item,.playkit-player.playkit-size-xs .playkit-smart-container-item{width:300px;max-width:100%;margin:16px auto;color:rgba(244,244,244,.8);white-space:nowrap;text-align:left;display:flex;justify-content:space-between}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item label,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item label,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item label{font-size:16px;color:rgba(255,255,255,.8);margin-right:20px}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon{width:24px;height:24px;display:inline-block;vertical-align:middle;margin-right:16px}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item select{align-self:flex-end}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item select{text-align-last:right;min-width:1px;line-height:24px}.playkit-player.playkit-touch.playkit-Windows select option,.playkit-player.playkit-size-sm.playkit-Windows select option,.playkit-player.playkit-size-xs.playkit-Windows select option{color:#000;background-color:#fff}.playkit-overlay.playkit-cvaa-overlay .playkit-sample{border:2px solid rgba(255,255,255,.2);border-radius:4px;font-size:16px;font-weight:bold;line-height:36px;text-align:center;padding:0 31px;display:inline-block;margin:0 12px;position:relative}.playkit-overlay.playkit-cvaa-overlay .playkit-sample:not(.playkit-custom){cursor:pointer}.playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-black-bg{background-color:#000}.playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-yellow-text{color:#faff00}.playkit-overlay.playkit-cvaa-overlay .playkit-sample .playkit-active-tick{height:16px;width:16px;border-radius:8px;background-color:var(--playkit-primary-color);position:absolute;top:-5px;right:-5px}.playkit-overlay.playkit-cvaa-overlay .playkit-sample .playkit-active-tick .playkit-icon{vertical-align:top}.playkit-overlay.playkit-cvaa-overlay .playkit-sample span{font-size:16px !important;line-height:1;vertical-align:middle}.playkit-overlay.playkit-cvaa-overlay .playkit-button-save-cvaa{margin-top:50px;height:40px;width:400px;max-width:100%;border:2px solid rgba(255,255,255,.2);border-radius:4px;font-size:16px;font-weight:bold;line-height:38px;text-align:center;display:inline-block;color:#fff;text-decoration:none;cursor:pointer}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied{margin-top:50px}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied a{color:var(--playkit-primary-brighter-color)}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form{width:300px;max-width:100%;margin:0 auto}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a{color:#fff;line-height:36px;text-decoration:none}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a:hover,.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a:focus{text-decoration:underline}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form .playkit-slider{float:right;width:100px;margin-top:5px}.playkit-overlay.playkit-cvaa-overlay .playkit-preview-container{width:100%;text-align:center;font-size:16px}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample{width:30%;margin:2.33%;padding:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample:first-child{margin-left:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample:last-child{margin-right:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-custom{width:auto;padding:0 10px}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-button-save-cvaa,.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied{margin-top:20px}.playkit-font-size,.playkit-font-color,.playkit-font-family,.playkit-font-style,.playkit-font-opacity,.playkit-background-color,.playkit-background-opacity{background:initial}.playkit-loading-backdrop{position:absolute;top:50%;left:50%;transition:100ms opacity;opacity:0;z-index:5}.playkit-loading-backdrop.playkit-show{opacity:1}.playkit-loading-backdrop.playkit-show .playkit-spinner-container{display:block}.playkit-loading-backdrop .playkit-spinner-container{display:none;position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button{transition:400ms transform}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button .playkit-icon-pause{transition:400ms opacity;opacity:0;display:none}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button .playkit-icon-play{transition:400ms opacity;opacity:1;display:block}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing{transform:rotate(360deg)}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing .playkit-icon-pause{opacity:1;display:block}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing .playkit-icon-play{opacity:0;display:none}.playkit-control-button-container.playkit-control-volume,.playkit-control-button-container.playkit-volume-control{display:inline-block !important}.playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-volume-control-bar,.playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-volume-control-bar{display:block !important}.playkit-control-button-container.playkit-control-volume.playkit-is-muted .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control.playkit-is-muted .playkit-icon-volume-waves{opacity:0;-webkit-transform:translateX(-5px);-ms-transform:translateX(-5px);transform:translateX(-5px)}.playkit-control-button-container.playkit-control-volume.playkit-is-muted .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control.playkit-is-muted .playkit-icon-volume-mute{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.playkit-control-button-container.playkit-control-volume.playkit-dragging-active .playkit-volume-control-bar,.playkit-control-button-container.playkit-volume-control.playkit-dragging-active .playkit-volume-control-bar{display:block}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-waves{-webkit-transform:translateX(0px);-ms-transform:translateX(0px);transform:translateX(0px)}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-mute{opacity:1;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-waves,.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-mute{transition:300ms transform,300ms opacity}.playkit-control-button-container.playkit-control-volume i,.playkit-control-button-container.playkit-volume-control i{position:absolute;top:0;left:0}.playkit-volume-control-bar{position:absolute;z-index:2;bottom:38px;left:0;height:112px;width:34px;border-radius:4px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);background-color:#333;padding:6px;display:none}.playkit-volume-control-bar:before{position:absolute;width:34px;height:14px;bottom:-8px;left:0;content:\" \";display:block}.playkit-volume-control-bar .playkit-bar{background-color:#424242;height:100%;position:relative;cursor:pointer}.playkit-volume-control-bar .playkit-progress{position:absolute;bottom:0;left:0;width:100%;border-radius:0 0 2px 2px;background-color:var(--playkit-primary-color)}.playkit-player.playkit-smart-container-open .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-player.playkit-smart-container-open .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-size-ty .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-size-ty .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-touch .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-touch .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button{transition:100ms transform;transform:scale(1)}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button .playkit-icon-minimize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-maximize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-minimize{display:block}.playkit-player:not(.playkit-touch) .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button:hover{transform:scale(1.1)}.playkit-player .playkit-seek-bar{padding:12px 0 12px 0;cursor:pointer;position:relative}.playkit-player .playkit-seek-bar:hover .playkit-time-preview,.playkit-player .playkit-seek-bar:hover .playkit-frame-preview:not(.playkit-hide-frame-preview),.playkit-player .playkit-seek-bar.playkit-hover .playkit-time-preview,.playkit-player .playkit-seek-bar.playkit-hover .playkit-frame-preview:not(.playkit-hide-frame-preview){display:block}.playkit-player .playkit-seek-bar:hover .playkit-progress-bar .playkit-scrubber,.playkit-player .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-scrubber{transform:scale(1)}.playkit-player .playkit-seek-bar:hover .playkit-progress-bar .playkit-virtual-progress,.playkit-player .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-virtual-progress{display:block}.playkit-player .playkit-seek-bar.playkit-ad-break{cursor:initial}.playkit-player .playkit-seek-bar.playkit-ad-break .playkit-progress-bar .playkit-progress{background-color:var(--playkit-ads-color)}.playkit-player .playkit-seek-bar.playkit-live .playkit-progress-bar .playkit-progress{background-color:var(--playkit-live-color)}.playkit-player .playkit-seek-bar .playkit-progress-bar{width:100%;height:4px;background-color:rgba(255,255,255,.3);border-radius:2px;position:absolute;transition:height 200ms ease,transform 200ms ease}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-progress{position:absolute;top:0;left:0;height:100%;border-radius:inherit;background-color:var(--playkit-primary-color)}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress{display:none}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-buffered,.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress{position:absolute;top:0;left:0;height:100%;border-radius:inherit}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-buffered{background-color:rgba(255,255,255,.3)}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress-indicator{width:1px;height:100%;background-color:var(--playkit-tone-1-color);float:right}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-scrubber{position:absolute;cursor:pointer;display:block;top:-6px;right:-8px;border-radius:8px;height:16px;width:16px;background-color:var(--playkit-tone-1-color);box-shadow:0 0 31px 0 rgba(0,0,0,.3);transform:scale(0);transition:100ms transform;z-index:1;pointer-events:none}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-scrubber:active{opacity:1;cursor:grabbing}.playkit-player .playkit-seek-bar .playkit-frame-preview{position:absolute;bottom:20px;left:0}.playkit-player .playkit-seek-bar .playkit-time-preview{position:absolute;bottom:26px;left:0;height:22px;min-width:48px;padding:0 3px;text-align:center;border-radius:3px;background-color:rgba(0,0,0,.7);font-size:13px;font-weight:bold;line-height:22px;color:#fff;z-index:1;pointer-events:none}.playkit-player .playkit-seek-bar .playkit-time-preview,.playkit-player .playkit-seek-bar .playkit-frame-preview{display:none}.playkit-player .playkit-seek-bar .playkit-non-sticky:hover{display:none}.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar:hover .playkit-progress-bar,.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar.playkit-hover .playkit-progress-bar{height:8px;border-radius:4px;transform:translateY(-2px)}.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar:hover .playkit-progress-bar .playkit-scrubber,.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-scrubber{top:-4px}.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress,.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-time-preview,.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-frame-preview{display:none}.playkit-player.playkit-size-ty .playkit-seek-bar{padding:12px 0;cursor:pointer;position:relative;float:left;width:calc(100% - 45px);margin:1px 0}.playkit-player.playkit-size-ty .playkit-seek-bar .playkit-frame-preview{display:none}.playkit-player.playkit-size-ty .playkit-seek-bar .playkit-time-preview{bottom:16px}.playkit-frame-preview .playkit-frame-preview-img-container{border:2px solid rgba(255,255,255,.2);border-radius:4px}.playkit-frame-preview .playkit-frame-preview-img-container .playkit-frame-preview-img{background-size:auto 100%;width:100%;height:100%;position:relative}.playkit-player .playkit-time-display{display:inline-block;line-height:32px;vertical-align:top;font-size:14px;padding:0 23px;font-weight:bold}.playkit-touch .playkit-time-display{padding-left:0}.playkit-player.playkit-size-md .playkit-time-display{padding:0 12px}.playkit-player.playkit-size-xs .playkit-time-display,.playkit-player.playkit-size-sm .playkit-time-display{padding:0 12px 0 0}.playkit-player .playkit-video-playing-title{font-size:15px;font-weight:bold;line-height:18px;padding:6px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.playkit-player .playkit-bottom-bar{background:linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);color:#fff;visibility:hidden;height:auto;max-height:0;transition:100ms max-height ease-in-out,100ms visibility ease-in-out,0ms padding linear 100ms;width:100%;margin-top:auto;bottom:0;left:0;z-index:1;pointer-events:auto;position:relative;padding:0}.playkit-player .playkit-bottom-bar.playkit-hide{display:none}.playkit-player .playkit-bottom-bar .playkit-left-controls{float:left;text-align:left;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-left-controls .playkit-control-button-container:first-child{margin-left:0px}.playkit-player .playkit-bottom-bar .playkit-bottom-bar-area{position:relative;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-right-controls{float:right;text-align:left;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-right-controls .playkit-control-button-container:last-child{margin-right:0px}.playkit-player .playkit-bottom-bar .playkit-control-button-container{margin:0 6px}.playkit-player.playkit-size-ty .playkit-left-controls{display:none}.playkit-player.playkit-size-ty .playkit-control-button-container{display:none;margin:0}.playkit-player.playkit-size-xs .playkit-left-controls .playkit-control-button-container{display:none}.playkit-player.playkit-size-xs .playkit-control-button-container,.playkit-player.playkit-size-sm .playkit-control-button-container{margin:0 3px}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-bottom-bar{visibility:visible;padding:0 16px 4px;max-height:60px;transition:100ms max-height ease-in-out,100ms visibility ease-in-out}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break{max-height:92px}.playkit-player.playkit-size-sm .playkit-bottom-bar{padding:0 8px 4px}.playkit-player.playkit-size-sm .playkit-bottom-bar .playkit-time-display{padding-left:0}.playkit-player .playkit-bottom-bar .playkit-left-controls>*,.playkit-player .playkit-bottom-bar .playkit-right-controls>*,.playkit-player .playkit-bottom-bar .playkit-bottom-bar-area>*{pointer-events:auto}.playkit-player .playkit-top-bar{background:linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);color:#fff;visibility:hidden;position:relative;height:auto;min-height:60px;max-height:60px;margin-top:-60px;transition:100ms visibility ease-in-out,100ms margin-top ease-in-out,100ms min-height ease-in-out;width:100%;top:0;left:0;z-index:1;pointer-events:auto}.playkit-player .playkit-top-bar .playkit-top-bar-area{position:absolute;top:0;left:0;height:calc(100% - 28px);width:calc(100% - 32px);margin:14px 16px;pointer-events:none}.playkit-player .playkit-top-bar .playkit-top-bar-area:empty{margin:0;height:0;width:0}.playkit-player .playkit-top-bar.playkit-disabled{pointer-events:none}.playkit-player .playkit-top-bar.playkit-hide{display:none}.playkit-player .playkit-top-bar .playkit-left-controls{float:left;text-align:left;min-width:0;margin:14px 0 14px 16px;pointer-events:none}.playkit-player .playkit-top-bar .playkit-left-controls:empty{margin:0}.playkit-player .playkit-top-bar .playkit-right-controls{float:right;text-align:left;margin:14px 16px 14px 0;pointer-events:none}.playkit-player .playkit-top-bar .playkit-right-controls:empty{margin:0}.playkit-player .playkit-top-bar .playkit-right-controls .playkit-control-button-container{margin:0 6px}.playkit-player .playkit-top-bar .playkit-right-controls .playkit-control-button-container:last-child{margin-right:0}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-top-bar{visibility:visible;margin-top:0;min-height:16px}.playkit-player .playkit-top-bar .playkit-left-controls>*,.playkit-player .playkit-top-bar .playkit-right-controls>*,.playkit-player .playkit-top-bar .playkit-top-bar-area>*{pointer-events:auto}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-left-controls{margin:14px 0 14px 8px}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-left-controls:empty{margin:0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-right-controls{margin:14px 8px 14px 0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-right-controls:empty{margin:0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-top-bar-area{width:calc(100% - 16px);margin:14px 8px}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-top-bar-area:empty{margin:0}@keyframes playkit-overlayActionIconIn{0%{opacity:0;transform:scale(0)}10%{opacity:.1;transform:scale(0.1)}20%{opacity:.3;transform:scale(0.2)}30%{opacity:.5;transform:scale(0.3)}40%{opacity:.7;transform:scale(0.4)}50%{opacity:.9;transform:scale(0.5)}60%{opacity:.9;transform:scale(0.5)}70%{opacity:.9;transform:scale(0.5)}75%{opacity:.9;transform:scale(0.5)}80%{opacity:1;transform:scale(0.5)}85%{opacity:1;transform:scale(0.5)}90%{opacity:1;transform:scale(0.5)}93%{opacity:.7;transform:scale(0.5)}95%{opacity:.5;transform:scale(0.5)}98%{opacity:.2;transform:scale(0.5)}100%{opacity:0;transform:scale(0.5)}}.playkit-overlay-action .playkit-icon{width:144px;height:144px;position:absolute;top:50%;left:50%;margin:-72px 0 0 -72px;opacity:0}.playkit-player:not(.playkit-touch):not(.playkit-size-sm) .playkit-overlay-action.playkit-in .playkit-icon{animation:playkit-overlayActionIconIn 300ms linear forwards}.playkit-pre-playback-play-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button{z-index:1;position:absolute;top:50%;left:50%;height:108px;width:108px;border:2px solid rgba(255,255,255,.2);background-color:rgba(0,0,0,.5);transform:translate(-50%, -50%);-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);border-radius:54px;padding:20px;cursor:pointer}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button:hover{border:2px solid rgba(255,255,255,.4)}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button:active{opacity:.7;transform:scale(1) translate(-50%, -50%)}.playkit-pre-playback .playkit-bottom-bar,.playkit-pre-playback .playkit-top-bar{opacity:0;display:none}.playkit-player.playkit-size-ty .playkit-pre-playback-play-button{width:75px;height:75px;padding:12px}.playkit-player.playkit-size-xs .playkit-pre-playback-play-button{width:85px;height:85px;padding:15px}.playkit-player .playkit-btn-skip-ad{font-weight:lighter;position:absolute;bottom:60px;right:16px;line-height:36px}.playkit-player .playkit-skip-ad{color:#fff;font-size:20px;font-weight:lighter;line-height:24px;text-shadow:0 0 6px rgba(0,0,0,.6);position:absolute;bottom:66px;right:16px}.playkit-row{display:block}.playkit-row:after{content:\"\";clear:both;display:block}.playkit-d-inline-block{display:inline-block}.playkit-mobile-hidden-select{display:block;opacity:0;position:absolute;top:0;left:0px;width:100%;height:100%}.playkit-font-size-base,.playkit-ad-notice{font-size:15px}.playkit-ad-notice{pointer-events:none}.playkit-live-tag{display:inline-block;background-color:var(--playkit-live-color);color:#fff;border-radius:4px;padding:3px 4px;margin:5px 10px;text-transform:uppercase;font-size:15px;cursor:default}.playkit-live-tag.playkit-non-live-playhead{background-color:#666;cursor:pointer}.playkit-player.playkit-size-sm .playkit-live-tag{margin-left:0}.playkit-interactive-area .playkit-unmute-button-container{top:0;left:0}.playkit-unmute-button-container{display:inline-block;position:absolute;top:16px;left:16px;z-index:15}.playkit-unmute-button-container a{color:#fff}.playkit-unmute-button-container.playkit-show-icon-only .playkit-btn.playkit-unmute-button{max-width:64px}.playkit-unmute-button-container.playkit-show-icon-only .playkit-btn.playkit-unmute-button span{transform:translateX(10px);opacity:0}.playkit-btn.playkit-unmute-button{font-size:15px;max-width:200px;transition:max-width 200ms;padding:0 16px;white-space:nowrap}.playkit-btn.playkit-unmute-button span{transform:translateX(0px);opacity:1;transition:transform 100ms,opacity 100ms;display:inline-block;color:#fff}.playkit-btn.playkit-unmute-button.playkit-has-top-bar{transition:100ms transform}.playkit-unmute-icon-container{width:32px;height:32px;display:inline-block;vertical-align:top;position:relative;margin-right:3px}.playkit-unmute-icon-container i{position:absolute;top:0;left:0}.playkit-player.playkit-hover .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-state-paused .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-state-idle .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-menu-active .playkit-unmute-button-container.playkit-has-top-bar{transform:translateY(32px)}.playkit-overlay.playkit-error-overlay{background-color:var(--playkit-tone-7-color);font-size:0em}.playkit-overlay-contents .playkit-error-overlay{padding-top:20px}.playkit-error-overlay{position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column;height:100%}.playkit-error-overlay .playkit-copy-url-row{display:flex;margin-bottom:10px}.playkit-error-overlay .playkit-svg-container{flex:4;display:flex;justify-content:space-around;flex-flow:column}.playkit-error-overlay .playkit-headline{color:var(--playkit-tone-1-color);font-size:18px;margin:10px 0 14px 0;flex:1}.playkit-error-overlay .playkit-error-session{font-size:14px;color:var(--playkit-tone-2-color);margin:auto;user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.playkit-error-overlay .playkit-control-button-container{flex:5}.playkit-error-overlay .playkit-retry-btn{height:36px;width:auto;min-width:120px;padding:0 8px;border:2px solid var(--playkit-tone-7-color);border-radius:18px;background-color:#000;color:var(--playkit-tone-1-color);font-size:15px;font-weight:bold;line-height:32px;cursor:pointer}.playkit-error-overlay .playkit-error-text{height:0px;visibility:hidden}.playkit-link-options-container{width:auto}.playkit-link-options-container .playkit-copy-url-row .playkit-input-copy-url{margin:0}.playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url{margin-left:8px;height:32px;width:32px}.playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url .playkit-icon{height:24px;width:24px;margin-top:-3px}.playkit-slider{height:8px;border-radius:4px;background-color:rgba(255,255,255,.2)}.playkit-slider .playkit-progress{background-color:var(--playkit-primary-color);height:8px;border-radius:4px;position:relative}.playkit-slider .playkit-progress .playkit-handle{height:12px;width:12px;border-radius:5px;background-color:#fff;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);position:absolute;right:0;top:0px;transform:translate3d(6px, -2px, 0);cursor:pointer}.playkit-player .playkit-learn-more{font-weight:lighter}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button{transition:100ms transform;transform:scale(1)}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button .playkit-icon-minimize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-maximize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-minimize{display:block}.playkit-player:not(.playkit-touch) .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button:hover{transform:scale(1.1)}.playkit-player .playkit-watermark{position:absolute;transition:visibility 0s 1s,opacity 1s linear,transform ease-out 100ms}.playkit-player .playkit-watermark.playkit-hide-watermark{visibility:hidden;opacity:0}.playkit-player .playkit-watermark.playkit-top{top:0}.playkit-player .playkit-watermark.playkit-bottom{bottom:0}.playkit-player .playkit-watermark.playkit-right{right:0}.playkit-player .playkit-watermark.playkit-left{left:0}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button .playkit-icon-vr-stereo-full{display:none}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button.playkit-vr-stereo-mode .playkit-icon-vr-stereo{display:none}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button.playkit-vr-stereo-mode .playkit-icon-vr-stereo-full{display:block}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button .playkit-icon-closed-captions-on{display:none}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button.playkit-cc-on .playkit-icon-closed-captions-off{display:none}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button.playkit-cc-on .playkit-icon-closed-captions-on{display:block}.playkit-player .playkit-cast-button{display:block;width:28px;height:30px;background-color:rgba(255,255,255,0);border:none;cursor:pointer;--connected-color: var(--playkit-tone-2-color);--disconnected-color: var(--playkit-tone-2-color)}.playkit-player .playkit-cast-button:hover{--connected-color: #ffffffff;--disconnected-color: #ffffffff}.playkit-player .playkit-cast-button.playkit-cast-button-active{--connected-color: rgba(1, 172, 205, 0.8)}.playkit-player .playkit-cast-button.playkit-cast-button-active:hover{--connected-color: var(--playkit-primary-color)}.playkit-player .playkit-cast-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.playkit-player .playkit-cast-overlay .playkit-cast-poster{all:inherit;background-size:contain;background:#000 no-repeat center center}.playkit-player .playkit-cast-overlay .playkit-cast-poster.playkit-has-poster{background-color:#000}.playkit-player .playkit-cast-overlay .playkit-cast-black-cover{all:inherit;background:linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, 0) 100%)}.playkit-player .playkit-cast-box .playkit-cast-icon{position:absolute;bottom:0;left:46px;height:128px}.playkit-player .playkit-cast-box .playkit-cast-icon .playkit-icon{width:30px;height:22px;color:rgba(255,255,255,.6);opacity:.6}.playkit-player .playkit-cast-box .playkit-cast-connecting-spinner{height:21px;width:21px;-webkit-animation:playkit-spin .9s infinite linear;border:3px solid rgba(255,255,255,.4);border-top-color:rgba(255,255,255,.8);border-radius:100%}.playkit-player .playkit-cast-box .playkit-cast-text{position:absolute;bottom:0;left:89px;height:128px;font-weight:lighter}.playkit-player .playkit-cast-box .playkit-cast-text .playkit-cast-status{display:inline-block;margin-top:3px;font-size:16px;color:rgba(255,255,255,.6);float:left;font-weight:inherit}.playkit-player .playkit-cast-box .playkit-cast-text .playkit-cast-device{left:0;display:inline-block;font-weight:inherit;font-size:25px;color:#fff;line-height:40px}@keyframes playkit-castOnTVAnimation{0%{opacity:0;transform:rotateY(70deg)}33%{opacity:.3;transform:rotateY(50deg)}66%{opacity:.6;transform:rotateY(30deg)}100%{opacity:1;transform:rotateY(0)}}.playkit-player .playkit-cast-on-tv-button-container{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.playkit-player .playkit-cast-on-tv-button-container span{font-weight:lighter;color:#fff}.playkit-player .playkit-cast-on-tv-button-container.playkit-show-cast-on-tv{animation:playkit-castOnTVAnimation 300ms linear forwards}.playkit-player .playkit-btn.playkit-cast-on-tv-button{font-size:15px;max-width:200px;transition:max-width 200ms;padding:0 16px;white-space:nowrap;position:absolute;bottom:0;transform:translate(-50%, -50%);left:50%}.playkit-player .playkit-btn.playkit-cast-on-tv-button span{transform:translateX(0px);opacity:1;transition:transform 100ms,opacity 100ms;display:inline-block}.playkit-player .playkit-cast-on-tv-icon-container{width:32px;height:32px;display:inline-block;vertical-align:top;position:relative;margin-right:3px}.playkit-player .playkit-cast-on-tv-icon-container i{position:absolute;top:0;left:0}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview{position:absolute;bottom:35px;width:280px;height:72px;display:flex;border-radius:4px;box-shadow:0px 0px 0px 1px rgba(0,0,0,.2),0px 8px 60px -16px rgba(0,0,0,.2);opacity:0;transition:400ms opacity;pointer-events:none}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview:hover{opacity:0 !important}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-img{width:128px;height:inherit;border-radius:4px 0 0 4px;background-size:contain;background-repeat:round}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text{width:152px;height:inherit;padding:8px;background-color:rgba(0,0,0,.7);border-radius:0 4px 4px 0}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text .playkit-poster-preview-text-title{font-size:14px;font-weight:400;margin-bottom:3px;opacity:.7}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text .playkit-poster-preview-text-name{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400}.playkit-control-button-container.playkit-control-playlist-button:hover .playkit-poster-preview{opacity:1}.playkit-icon-picture-in-picture-stop{display:none}.playkit-is-in-picture-in-picture .playkit-icon-picture-in-picture-start{display:none}.playkit-is-in-picture-in-picture .playkit-icon-picture-in-picture-stop{display:block}.playkit-player-gui>.playkit-playback-controls,.playkit-center-playback-controls{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);white-space:nowrap;z-index:1}.playkit-bottom-bar .playkit-playback-controls{display:inline}.playkit-player.playkit-size-sm.playkit-state-idle .playkit-control-playlist-button,.playkit-player.playkit-size-xs.playkit-state-idle .playkit-control-playlist-button,.playkit-player.playkit-touch.playkit-state-idle .playkit-control-playlist-button{display:none}.playkit-player.playkit-size-sm:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls{display:none}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls{display:block}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button{width:auto;height:auto;padding:0 16px;-webkit-filter:drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5));filter:drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5))}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon{width:64px;height:64px}.playkit-player.playkit-overlay-active .playkit-gui-area .playkit-playback-controls{opacity:0;visibility:hidden}@keyframes playkit-slideIn{0%{right:-160px}100%{right:0}}.playkit-player .playkit-playlist-countdown{display:flex;height:72px;position:absolute;right:0;bottom:0;border-radius:4px;transition:opacity 400ms,bottom 300ms;cursor:pointer;box-shadow:0px 0px 0px 1px rgba(0,0,0,.2),0px 8px 60px -16px rgba(0,0,0,.2)}.playkit-player .playkit-playlist-countdown.playkit-slideIn{right:-160px;animation:playkit-slideIn 500ms 500ms forwards}.playkit-player .playkit-playlist-countdown.playkit-hidden{pointer-events:none;opacity:0}.playkit-player .playkit-playlist-countdown.playkit-hidden .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{width:0}.playkit-player .playkit-playlist-countdown.playkit-hidden .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content{opacity:0}.playkit-player .playkit-playlist-countdown.playkit-canceled{bottom:-50px;opacity:0}.playkit-player .playkit-playlist-countdown:hover .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{background-color:#000}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-poster{width:128px;height:inherit;border-radius:4px 0 0 4px;background-size:contain;background-repeat:round}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:152px;height:inherit}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{width:inherit;border-radius:0 4px 3px 0;background-color:rgba(0,0,0,.7);height:inherit;transition:width 500ms 1000ms}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content{width:inherit;transition:opacity 300ms 1200ms}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{width:100%;padding:10px;font-size:14px;font-weight:400;text-align:left;color:#fff;float:left;line-height:initial}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{margin-bottom:12px;opacity:.7}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title .playkit-playlist-countdown-time-left{display:inline;margin-left:4px}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{position:absolute;top:5px;right:5px;width:24px;height:24px}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel *{width:inherit;height:inherit}.playkit-player.playkit-size-md .playkit-playlist-countdown{height:54px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-poster{width:96px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:152px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{padding:8px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{margin-bottom:4px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{top:3px;right:3px}.playkit-player.playkit-size-sm .playkit-playlist-countdown,.playkit-player.playkit-size-xs .playkit-playlist-countdown,.playkit-player.playkit-size-ty .playkit-playlist-countdown{z-index:1;height:36px;margin:8px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-poster,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-poster,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-poster{display:none}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:108px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{transition:width 500ms;border-radius:2px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{width:90%;padding:3px 0 0 4px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{font-size:12px;margin-bottom:0}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name{font-size:12px;font-weight:400}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{top:0;right:0}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay{position:absolute;width:100%;height:100%;background-color:rgba(0,0,0,.5)}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content{position:relative;top:50%;transform:translateY(-50%)}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text{position:absolute;width:100%;top:-90px;font-size:15px;color:#fff;padding:4px 8px 12px 8px;text-align:center}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-title{padding:4px;font-weight:100}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-name{padding:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{position:relative;margin:auto;width:384px}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio{width:100%;padding-top:56%}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster{position:absolute;top:0;left:0;bottom:0;right:0;border:2px solid rgba(255,255,255,.2);border-radius:4px;cursor:pointer}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img{height:100%;border-radius:3px;background-size:contain;background-repeat:round}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:64px;height:64px}.playkit-player.playkit-state-idle.playkit-size-lg .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:37.5%}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text{top:-58px}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-name{padding:0}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:42%}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:32px}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster{border:0}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img{display:none}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon{width:32px;height:32px}.playkit-picture-in-picture-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster{all:inherit;background-size:contain;background:#000 no-repeat center center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster.playkit-has-poster{background-color:#000}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster .playkit-dark-layer{background-color:rgba(0,0,0,.4);position:absolute;top:0;left:0;width:100%;height:100%}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control{position:absolute;display:flex;flex-direction:column;height:100%}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control::after{content:\"\";flex:3}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control::before{content:\"\";flex:1}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-text{color:var(--playkit-tone-1-color);font-size:18px;white-space:nowrap;overflow:hidden}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-button{height:36px;width:120px;border:2px solid var(--playkit-tone-6-color);border-radius:18px;background-color:var(--playkit-tone-7-color);color:var(--playkit-tone-1-color);font-size:15px;font-weight:bold;line-height:30px;cursor:pointer;margin-top:20px;align-self:center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-button:hover{background-color:var(--playkit-tone-6-color)}.playkit-copy-url-row .playkit-input-copy-url{margin:0}.playkit-copy-url-row .playkit-btn-copy-url{margin:0 8px}.playkit-copy-url-row .playkit-btn-copy-url .playkit-icon{height:24px;width:24px;margin-top:-3px;display:none}.playkit-copy-url-row .playkit-btn-copy-url .playkit-icon-copy{display:block}.playkit-copy-url-row .playkit-btn-copy-url.playkit-copied .playkit-icon-copy{display:none}.playkit-copy-url-row .playkit-btn-copy-url.playkit-copied .playkit-icon-check{display:block}.playkit-IE.playkit-player .playkit-tooltip .playkit-tooltip-label{white-space:nowrap}.playkit-player .playkit-tooltip{position:relative;display:inline-block;height:100%;width:100%}.playkit-player .playkit-tooltip .playkit-tooltip-label{visibility:hidden;background-color:var(--playkit-tooltip-background-color);color:var(--playkit-tooltip-color);text-align:center;padding:4px 6px;border-radius:4px;position:absolute;line-height:normal;font-weight:bold;font-size:13px;opacity:0;transition:opacity 1s;width:max-content;display:table}.playkit-player .playkit-tooltip .playkit-tooltip-label:after{content:\"\";position:absolute;border-width:5px;border-style:solid;border-radius:3px;color:var(--playkit-tooltip-background-color);z-index:-1}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top{bottom:calc(100% + 10px);left:50%;transform:translate(-50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top:after{bottom:-4px;left:50%;transform:translate(-50%) rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-left{bottom:calc(100% + 10px);left:50%;transform:translate(-100%);margin-left:16px}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-left:after{bottom:-4px;right:0;margin-right:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-right{bottom:calc(100% + 10px);left:50%;transform:translate(-16px)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-right:after{bottom:-4px;left:0;margin-left:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom{top:calc(100% + 10px);left:50%;transform:translate(-50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom:after{top:-4px;left:50%;margin-left:-5px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-right{top:calc(100% + 10px);left:50%;transform:translate(-16px)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-right:after{top:-4px;left:0;margin-left:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-left{top:calc(100% + 10px);transform:translate(-100%);left:50%;margin-left:16px}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-left:after{top:-4px;right:0;margin-right:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-left{top:50%;right:calc(100% + 10px);transform:translate(0, -50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-left:after{top:50%;left:100%;margin-left:-6px;margin-top:-5px;transform:rotate(135deg) skew(10deg, 10deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-right{top:50%;left:calc(100% + 10px);transform:translate(0, -50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-right:after{top:50%;right:100%;margin-top:-5px;margin-right:-6px;transform:rotate(135deg) skew(10deg, 10deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-show{visibility:visible;opacity:1}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-hide{transition:opacity .15s ease-in-out}.playkit-side-panel{position:absolute;overflow:hidden;transition:all 500ms;transition-property:left,right,bottom,top,opacity;z-index:1}.playkit-vertical-side-panel{height:100%}.playkit-horizontal-side-panel{height:0;left:0;right:0}.playkit-side-panel-content{width:100%;height:100%}.playkit-player.playkit-overlay-active .playkit-interactive-area{filter:blur(16px)}.playkit-interactive-area{pointer-events:none;position:relative;top:0;margin:16px;transition:margin 100ms ease-in-out;flex:1}.playkit-player.playkit-size-sm .playkit-interactive-area{margin:8px}.playkit-player.playkit-casting:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-state-paused:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-state-idle:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-ad-break:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-menu-active:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area{margin:0px 8px}.playkit-player.playkit-casting .playkit-interactive-area,.playkit-player.playkit-metadata-loaded.playkit-hover .playkit-interactive-area,.playkit-player.playkit-state-paused .playkit-interactive-area,.playkit-player.playkit-state-idle .playkit-interactive-area,.playkit-player.playkit-ad-break .playkit-interactive-area,.playkit-player.playkit-menu-active .playkit-interactive-area{margin:0px 16px}.playkit-video-area{pointer-events:none;transition:all 500ms;transition-property:left,right,bottom,top,width,height}.playkit-gui-area{pointer-events:none;transition:all 500ms;transition-property:left,right,bottom,top;display:flex;flex-flow:column nowrap}@keyframes playkit-kaltura-spinner{0%{transform:rotate(0deg) scale(0.7);opacity:1}70%{transform:rotate(360deg) scale(0.7);opacity:1}82%{transform:rotate(360deg) scale(0);opacity:0}87%{transform:rotate(360deg) scale(0.9);opacity:1}100%{transform:rotate(360deg) scale(0.7);opacity:1}}.playkit-spinner{width:100px;height:100px;position:relative;animation:playkit-kaltura-spinner 2.5s infinite}.playkit-spinner span{width:8px;height:8px;background-color:#fff;display:block;border-radius:8px;position:absolute;top:50%;left:50%;margin-top:-4px;margin-left:-4px}.playkit-spinner span:nth-child(1){transform:rotate(45deg) translateX(-25px) translateY(-25px);background-color:#da1f26}.playkit-spinner span:nth-child(2){transform:rotate(90deg) translateX(-25px) translateY(-25px);background-color:#06a885}.playkit-spinner span:nth-child(3){transform:rotate(135deg) translateX(-25px) translateY(-25px);background-color:#009344}.playkit-spinner span:nth-child(4){transform:rotate(180deg) translateX(-25px) translateY(-25px);background-color:#f8a61a}.playkit-spinner span:nth-child(5){transform:rotate(225deg) translateX(-25px) translateY(-25px);background-color:#1b4a97}.playkit-spinner span:nth-child(6){transform:rotate(270deg) translateX(-25px) translateY(-25px);background-color:#00abcc}.playkit-spinner span:nth-child(7){transform:rotate(315deg) translateX(-25px) translateY(-25px);background-color:#b1d238}.playkit-spinner span:nth-child(8){transform:rotate(360deg) translateX(-25px) translateY(-25px);background-color:#fcd203}.playkit-switch{position:relative;display:inline-block;width:32px;height:16px}.playkit-switch .playkit-toggle-input{opacity:0;width:0;height:0}.playkit-switch .playkit-toggle-input:checked+.playkit-slider{background-color:#2196f3}.playkit-switch .playkit-toggle-input:focus+.playkit-slider{box-shadow:0 0 1px #2196f3}.playkit-switch .playkit-toggle-input:checked+.playkit-slider:before{transform:translateX(14px);-webkit-transform:translateX(14px);-ms-transform:translateX(14px)}.playkit-switch .playkit-slider{height:100%;position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:34px}.playkit-switch .playkit-slider:before{position:absolute;content:\"\";height:12px;width:12px;left:3px;top:2px;background-color:#fff;-webkit-transition:.3s;transition:.3s;border-radius:50%}",""]),t.locals={primaryColor:"var(--playkit-primary-color)",primaryDarkerColor:"var(--playkit-primary-darker-color)",primaryBrighterColor:"var(--playkit-primary-brighter-color)",primaryTextContrastColor:"var(--playkit-primary-text-contrast-color)",secondaryColor:"var(--playkit-secondary-color)",secondaryDarkerColor:"var(--playkit-secondary-darker-color)",secondaryBrighterColor:"var(--playkit-secondary-brighter-color)",secondaryTextContrastColor:"var(--playkit-secondary-text-contrast-color)",successDarkerColor:"var(--playkit-success-darker-color)",successBrighterColor:"var(--playkit-success-brighter-color)",successTextContrastColor:"var(--playkit-success-text-contrast-color)",dangerColor:"var(--playkit-danger-color)",dangerDarkerColor:"var(--playkit-danger-darker-color)",dangerBrighterColor:"var(--playkit-danger-brighter-color)","danger-text-contrast-color":"var(--playkit-danger-text-contrast-color)",dangerTextContrastColor:"var(--playkit-danger-text-contrast-color)",warningColor:"var(--playkit-warning-color)",warningDarkerColor:"var(--playkit-warning-darker-color)",warningBrighterColor:"var(--playkit-warning-brighter-color)",warningTextContrastColor:"var(--playkit-warning-text-contrast-color)",tone1Color:"var(--playkit-tone-1-color)",tone2Color:"var(--playkit-tone-2-color)",tone3Color:"var(--playkit-tone-3-color)",tone4Color:"var(--playkit-tone-4-color)",tone5Color:"var(--playkit-tone-5-color)",tone6Color:"var(--playkit-tone-6-color)",tone7Color:"var(--playkit-tone-7-color)",tone8Color:"var(--playkit-tone-8-color)",liveColor:"var(--playkit-live-color)",playerBackgroundColor:"var(--playkit-player-background-color)",tabFocusColor:"var(--playkit-tab-focus-color)",tooltipBackgroundColor:"var(--playkit-tooltip-background-color)",tooltipColor:"var(--playkit-tooltip-color)",adsColor:"var(--playkit-ads-color)",progressBarHeight:"4px",progressBarBorderRadius:"2px",defaultTransitionTime:"500",bottomBarMaxHeight:"60",brandColor:"#006bff",white:"#fff",player:"playkit-player",row:"playkit-row","d-inline-block":"playkit-d-inline-block",dInlineBlock:"playkit-d-inline-block","mobile-hidden-select":"playkit-mobile-hidden-select",mobileHiddenSelect:"playkit-mobile-hidden-select","font-size-base":"playkit-font-size-base",fontSizeBase:"playkit-font-size-base","ad-notice":"playkit-ad-notice",adNotice:"playkit-ad-notice","form-group":"playkit-form-group",formGroup:"playkit-form-group","has-error":"playkit-has-error",hasError:"playkit-has-error","form-control":"playkit-form-control",formControl:"playkit-form-control","has-icon":"playkit-has-icon",hasIcon:"playkit-has-icon",icon:"playkit-icon",checkbox:"playkit-checkbox","form-group-row":"playkit-form-group-row",formGroupRow:"playkit-form-group-row",dropdown:"playkit-dropdown",btn:"playkit-btn","btn-block":"playkit-btn-block",btnBlock:"playkit-btn-block","btn-dark-transparent":"playkit-btn-dark-transparent",btnDarkTransparent:"playkit-btn-dark-transparent","btn-branded":"playkit-btn-branded",btnBranded:"playkit-btn-branded","btn-rounded":"playkit-btn-rounded",btnRounded:"playkit-btn-rounded","btn-borderless":"playkit-btn-borderless",btnBorderless:"playkit-btn-borderless","only-icon":"playkit-only-icon",onlyIcon:"playkit-only-icon","only-label":"playkit-only-label",onlyLabel:"playkit-only-label","size-sm":"playkit-size-sm",sizeSm:"playkit-size-sm","size-xs":"playkit-size-xs",sizeXs:"playkit-size-xs","badge-icon":"playkit-badge-icon",badgeIcon:"playkit-badge-icon","icon-maximize":"playkit-icon-maximize",iconMaximize:"playkit-icon-maximize","icon-minimize":"playkit-icon-minimize",iconMinimize:"playkit-icon-minimize","icon-play":"playkit-icon-play",iconPlay:"playkit-icon-play","icon-pause":"playkit-icon-pause",iconPause:"playkit-icon-pause","icon-volume-base":"playkit-icon-volume-base",iconVolumeBase:"playkit-icon-volume-base","icon-volume-waves":"playkit-icon-volume-waves",iconVolumeWaves:"playkit-icon-volume-waves","icon-volume-wave":"playkit-icon-volume-wave",iconVolumeWave:"playkit-icon-volume-wave","icon-volume-mute":"playkit-icon-volume-mute",iconVolumeMute:"playkit-icon-volume-mute","icon-close":"playkit-icon-close",iconClose:"playkit-icon-close","icon-settings":"playkit-icon-settings",iconSettings:"playkit-icon-settings","icon-check":"playkit-icon-check",iconCheck:"playkit-icon-check","icon-check-active":"playkit-icon-check-active",iconCheckActive:"playkit-icon-check-active","icon-language":"playkit-icon-language",iconLanguage:"playkit-icon-language","icon-quality":"playkit-icon-quality",iconQuality:"playkit-icon-quality","icon-captions":"playkit-icon-captions",iconCaptions:"playkit-icon-captions","icon-speed":"playkit-icon-speed",iconSpeed:"playkit-icon-speed","icon-speed-down":"playkit-icon-speed-down",iconSpeedDown:"playkit-icon-speed-down","icon-speed-up":"playkit-icon-speed-up",iconSpeedUp:"playkit-icon-speed-up","icon-audio":"playkit-icon-audio",iconAudio:"playkit-icon-audio","icon-arrow-down":"playkit-icon-arrow-down",iconArrowDown:"playkit-icon-arrow-down","icon-start-over":"playkit-icon-start-over",iconStartOver:"playkit-icon-start-over","icon-seek-end":"playkit-icon-seek-end",iconSeekEnd:"playkit-icon-seek-end","icon-rewind":"playkit-icon-rewind",iconRewind:"playkit-icon-rewind","icon-rewind-10":"playkit-icon-rewind-10",iconRewind10:"playkit-icon-rewind-10","icon-forward":"playkit-icon-forward",iconForward:"playkit-icon-forward","icon-forward-10":"playkit-icon-forward-10",iconForward10:"playkit-icon-forward-10","icon-vr-stereo":"playkit-icon-vr-stereo",iconVrStereo:"playkit-icon-vr-stereo","icon-vr-stereo-full":"playkit-icon-vr-stereo-full",iconVrStereoFull:"playkit-icon-vr-stereo-full","icon-chromecast":"playkit-icon-chromecast",iconChromecast:"playkit-icon-chromecast","icon-chromecast-brand":"playkit-icon-chromecast-brand",iconChromecastBrand:"playkit-icon-chromecast-brand","icon-next":"playkit-icon-next",iconNext:"playkit-icon-next","icon-prev":"playkit-icon-prev",iconPrev:"playkit-icon-prev","icon-picture-in-picture-start":"playkit-icon-picture-in-picture-start",iconPictureInPictureStart:"playkit-icon-picture-in-picture-start","icon-picture-in-picture-stop":"playkit-icon-picture-in-picture-stop",iconPictureInPictureStop:"playkit-icon-picture-in-picture-stop","icon-advanced-audio-description":"playkit-icon-advanced-audio-description",iconAdvancedAudioDescription:"playkit-icon-advanced-audio-description","icon-quality-hd":"playkit-icon-quality-hd",iconQualityHd:"playkit-icon-quality-hd","icon-quality-hd-active":"playkit-icon-quality-hd-active",iconQualityHdActive:"playkit-icon-quality-hd-active","icon-quality-4k":"playkit-icon-quality-4k",iconQuality4K:"playkit-icon-quality-4k","icon-quality-4k-active":"playkit-icon-quality-4k-active",iconQuality4KActive:"playkit-icon-quality-4k-active","icon-quality-8k":"playkit-icon-quality-8k",iconQuality8K:"playkit-icon-quality-8k","icon-quality-8k-active":"playkit-icon-quality-8k-active",iconQuality8KActive:"playkit-icon-quality-8k-active","icon-closed-captions-on":"playkit-icon-closed-captions-on",iconClosedCaptionsOn:"playkit-icon-closed-captions-on","icon-closed-captions-off":"playkit-icon-closed-captions-off",iconClosedCaptionsOff:"playkit-icon-closed-captions-off","label-badge":"playkit-label-badge",labelBadge:"playkit-label-badge",active:"playkit-active","dropdown-menu":"playkit-dropdown-menu",dropdownMenu:"playkit-dropdown-menu","dropdown-button":"playkit-dropdown-button",dropdownButton:"playkit-dropdown-button",openDropmenu:"playkit-openDropmenu",top:"playkit-top",bottom:"playkit-bottom",right:"playkit-right",left:"playkit-left","stick-bottom":"playkit-stick-bottom",stickBottom:"playkit-stick-bottom","dropdown-menu-item":"playkit-dropdown-menu-item",dropdownMenuItem:"playkit-dropdown-menu-item","menu-icon-container":"playkit-menu-icon-container",menuIconContainer:"playkit-menu-icon-container","control-button":"playkit-control-button",controlButton:"playkit-control-button","button-badge":"playkit-button-badge",buttonBadge:"playkit-button-badge","control-button-rounded":"playkit-control-button-rounded",controlButtonRounded:"playkit-control-button-rounded",touch:"playkit-touch","control-button-container":"playkit-control-button-container",controlButtonContainer:"playkit-control-button-container","state-idle":"playkit-state-idle",stateIdle:"playkit-state-idle","no-idle-control":"playkit-no-idle-control",noIdleControl:"playkit-no-idle-control",rotate:"playkit-rotate",spin:"playkit-spin","reverse-rotate":"playkit-reverse-rotate",reverseRotate:"playkit-reverse-rotate","reverse-spin":"playkit-reverse-spin",reverseSpin:"playkit-reverse-spin","upper-bar-icon":"playkit-upper-bar-icon",upperBarIcon:"playkit-upper-bar-icon",emptyUrl:"playkit-emptyUrl","player-gui":"playkit-player-gui",playerGui:"playkit-player-gui","overlay-active":"playkit-overlay-active",overlayActive:"playkit-overlay-active",nav:"playkit-nav","ad-break":"playkit-ad-break",adBreak:"playkit-ad-break","metadata-loaded":"playkit-metadata-loaded",metadataLoaded:"playkit-metadata-loaded",hover:"playkit-hover","state-paused":"playkit-state-paused",statePaused:"playkit-state-paused","pre-playback":"playkit-pre-playback",prePlayback:"playkit-pre-playback",casting:"playkit-casting","menu-active":"playkit-menu-active",menuActive:"playkit-menu-active",iOS:"playkit-iOS",iOs:"playkit-iOS",Safari:"playkit-Safari",safari:"playkit-Safari",fullscreen:"playkit-fullscreen","video-player":"playkit-video-player",videoPlayer:"playkit-video-player",overlay:"playkit-overlay",openOverlay:"playkit-openOverlay","overlay-contents":"playkit-overlay-contents",overlayContents:"playkit-overlay-contents",title:"playkit-title","close-overlay":"playkit-close-overlay",closeOverlay:"playkit-close-overlay","overlay-screen":"playkit-overlay-screen",overlayScreen:"playkit-overlay-screen","size-md":"playkit-size-md",sizeMd:"playkit-size-md","smart-container":"playkit-smart-container",smartContainer:"playkit-smart-container",openSmartContainer:"playkit-openSmartContainer",leaving:"playkit-leaving",closeSmartContainer:"playkit-closeSmartContainer","smart-container-item":"playkit-smart-container-item",smartContainerItem:"playkit-smart-container-item","select-menu-item":"playkit-select-menu-item",selectMenuItem:"playkit-select-menu-item","label-icon":"playkit-label-icon",labelIcon:"playkit-label-icon",Windows:"playkit-Windows",windows:"playkit-Windows","cvaa-overlay":"playkit-cvaa-overlay",cvaaOverlay:"playkit-cvaa-overlay",sample:"playkit-sample",custom:"playkit-custom","black-bg":"playkit-black-bg",blackBg:"playkit-black-bg","yellow-text":"playkit-yellow-text",yellowText:"playkit-yellow-text","active-tick":"playkit-active-tick",activeTick:"playkit-active-tick","button-save-cvaa":"playkit-button-save-cvaa",buttonSaveCvaa:"playkit-button-save-cvaa","custom-captions-applied":"playkit-custom-captions-applied",customCaptionsApplied:"playkit-custom-captions-applied","custom-caption-form":"playkit-custom-caption-form",customCaptionForm:"playkit-custom-caption-form",slider:"playkit-slider","preview-container":"playkit-preview-container",previewContainer:"playkit-preview-container","font-size":"playkit-font-size",fontSize:"playkit-font-size","font-color":"playkit-font-color",fontColor:"playkit-font-color","font-family":"playkit-font-family",fontFamily:"playkit-font-family","font-style":"playkit-font-style",fontStyle:"playkit-font-style","font-opacity":"playkit-font-opacity",fontOpacity:"playkit-font-opacity","background-color":"playkit-background-color",backgroundColor:"playkit-background-color","background-opacity":"playkit-background-opacity",backgroundOpacity:"playkit-background-opacity","loading-backdrop":"playkit-loading-backdrop",loadingBackdrop:"playkit-loading-backdrop",show:"playkit-show","spinner-container":"playkit-spinner-container",spinnerContainer:"playkit-spinner-container","control-play-pause":"playkit-control-play-pause",controlPlayPause:"playkit-control-play-pause","is-playing":"playkit-is-playing",isPlaying:"playkit-is-playing","control-volume":"playkit-control-volume",controlVolume:"playkit-control-volume","volume-control":"playkit-volume-control",volumeControl:"playkit-volume-control","volume-control-bar":"playkit-volume-control-bar",volumeControlBar:"playkit-volume-control-bar","is-muted":"playkit-is-muted",isMuted:"playkit-is-muted","dragging-active":"playkit-dragging-active",draggingActive:"playkit-dragging-active",bar:"playkit-bar",progress:"playkit-progress","smart-container-open":"playkit-smart-container-open",smartContainerOpen:"playkit-smart-container-open","control-volume-bar":"playkit-control-volume-bar",controlVolumeBar:"playkit-control-volume-bar","size-ty":"playkit-size-ty",sizeTy:"playkit-size-ty","control-fullscreen":"playkit-control-fullscreen",controlFullscreen:"playkit-control-fullscreen","is-fullscreen":"playkit-is-fullscreen",isFullscreen:"playkit-is-fullscreen","seek-bar":"playkit-seek-bar",seekBar:"playkit-seek-bar","time-preview":"playkit-time-preview",timePreview:"playkit-time-preview","frame-preview":"playkit-frame-preview",framePreview:"playkit-frame-preview","hide-frame-preview":"playkit-hide-frame-preview",hideFramePreview:"playkit-hide-frame-preview","progress-bar":"playkit-progress-bar",progressBar:"playkit-progress-bar",scrubber:"playkit-scrubber","virtual-progress":"playkit-virtual-progress",virtualProgress:"playkit-virtual-progress",live:"playkit-live",buffered:"playkit-buffered","virtual-progress-indicator":"playkit-virtual-progress-indicator",virtualProgressIndicator:"playkit-virtual-progress-indicator","non-sticky":"playkit-non-sticky",nonSticky:"playkit-non-sticky","frame-preview-img-container":"playkit-frame-preview-img-container",framePreviewImgContainer:"playkit-frame-preview-img-container","frame-preview-img":"playkit-frame-preview-img",framePreviewImg:"playkit-frame-preview-img","time-display":"playkit-time-display",timeDisplay:"playkit-time-display","video-playing-title":"playkit-video-playing-title",videoPlayingTitle:"playkit-video-playing-title","bottom-bar":"playkit-bottom-bar",bottomBar:"playkit-bottom-bar",hide:"playkit-hide","left-controls":"playkit-left-controls",leftControls:"playkit-left-controls","bottom-bar-area":"playkit-bottom-bar-area",bottomBarArea:"playkit-bottom-bar-area","right-controls":"playkit-right-controls",rightControls:"playkit-right-controls","line-break":"playkit-line-break",lineBreak:"playkit-line-break","top-bar":"playkit-top-bar",topBar:"playkit-top-bar","top-bar-area":"playkit-top-bar-area",topBarArea:"playkit-top-bar-area",disabled:"playkit-disabled","overlay-action":"playkit-overlay-action",overlayAction:"playkit-overlay-action",in:"playkit-in",overlayActionIconIn:"playkit-overlayActionIconIn","pre-playback-play-overlay":"playkit-pre-playback-play-overlay",prePlaybackPlayOverlay:"playkit-pre-playback-play-overlay","pre-playback-play-button":"playkit-pre-playback-play-button",prePlaybackPlayButton:"playkit-pre-playback-play-button","btn-skip-ad":"playkit-btn-skip-ad",btnSkipAd:"playkit-btn-skip-ad","skip-ad":"playkit-skip-ad",skipAd:"playkit-skip-ad","live-tag":"playkit-live-tag",liveTag:"playkit-live-tag","non-live-playhead":"playkit-non-live-playhead",nonLivePlayhead:"playkit-non-live-playhead","interactive-area":"playkit-interactive-area",interactiveArea:"playkit-interactive-area","unmute-button-container":"playkit-unmute-button-container",unmuteButtonContainer:"playkit-unmute-button-container","show-icon-only":"playkit-show-icon-only",showIconOnly:"playkit-show-icon-only","unmute-button":"playkit-unmute-button",unmuteButton:"playkit-unmute-button","has-top-bar":"playkit-has-top-bar",hasTopBar:"playkit-has-top-bar","unmute-icon-container":"playkit-unmute-icon-container",unmuteIconContainer:"playkit-unmute-icon-container","error-overlay":"playkit-error-overlay",errorOverlay:"playkit-error-overlay","copy-url-row":"playkit-copy-url-row",copyUrlRow:"playkit-copy-url-row","svg-container":"playkit-svg-container",svgContainer:"playkit-svg-container",headline:"playkit-headline","error-session":"playkit-error-session",errorSession:"playkit-error-session","retry-btn":"playkit-retry-btn",retryBtn:"playkit-retry-btn","error-text":"playkit-error-text",errorText:"playkit-error-text","link-options-container":"playkit-link-options-container",linkOptionsContainer:"playkit-link-options-container","input-copy-url":"playkit-input-copy-url",inputCopyUrl:"playkit-input-copy-url","btn-copy-url":"playkit-btn-copy-url",btnCopyUrl:"playkit-btn-copy-url",handle:"playkit-handle","learn-more":"playkit-learn-more",learnMore:"playkit-learn-more",watermark:"playkit-watermark","hide-watermark":"playkit-hide-watermark",hideWatermark:"playkit-hide-watermark","control-vr-stereo":"playkit-control-vr-stereo",controlVrStereo:"playkit-control-vr-stereo","vr-stereo-mode":"playkit-vr-stereo-mode",vrStereoMode:"playkit-vr-stereo-mode","control-closed-captions":"playkit-control-closed-captions",controlClosedCaptions:"playkit-control-closed-captions","cc-on":"playkit-cc-on",ccOn:"playkit-cc-on","cast-button":"playkit-cast-button",castButton:"playkit-cast-button","cast-button-active":"playkit-cast-button-active",castButtonActive:"playkit-cast-button-active","cast-overlay":"playkit-cast-overlay",castOverlay:"playkit-cast-overlay","cast-poster":"playkit-cast-poster",castPoster:"playkit-cast-poster","has-poster":"playkit-has-poster",hasPoster:"playkit-has-poster","cast-black-cover":"playkit-cast-black-cover",castBlackCover:"playkit-cast-black-cover","cast-box":"playkit-cast-box",castBox:"playkit-cast-box","cast-icon":"playkit-cast-icon",castIcon:"playkit-cast-icon","cast-connecting-spinner":"playkit-cast-connecting-spinner",castConnectingSpinner:"playkit-cast-connecting-spinner","cast-text":"playkit-cast-text",castText:"playkit-cast-text","cast-status":"playkit-cast-status",castStatus:"playkit-cast-status","cast-device":"playkit-cast-device",castDevice:"playkit-cast-device","cast-on-tv-button-container":"playkit-cast-on-tv-button-container",castOnTvButtonContainer:"playkit-cast-on-tv-button-container","show-cast-on-tv":"playkit-show-cast-on-tv",showCastOnTv:"playkit-show-cast-on-tv",castOnTVAnimation:"playkit-castOnTVAnimation",castOnTvAnimation:"playkit-castOnTVAnimation","cast-on-tv-button":"playkit-cast-on-tv-button",castOnTvButton:"playkit-cast-on-tv-button","cast-on-tv-icon-container":"playkit-cast-on-tv-icon-container",castOnTvIconContainer:"playkit-cast-on-tv-icon-container","control-playlist-button":"playkit-control-playlist-button",controlPlaylistButton:"playkit-control-playlist-button","poster-preview":"playkit-poster-preview",posterPreview:"playkit-poster-preview","poster-preview-img":"playkit-poster-preview-img",posterPreviewImg:"playkit-poster-preview-img","poster-preview-text":"playkit-poster-preview-text",posterPreviewText:"playkit-poster-preview-text","poster-preview-text-title":"playkit-poster-preview-text-title",posterPreviewTextTitle:"playkit-poster-preview-text-title","poster-preview-text-name":"playkit-poster-preview-text-name",posterPreviewTextName:"playkit-poster-preview-text-name","is-in-picture-in-picture":"playkit-is-in-picture-in-picture",isInPictureInPicture:"playkit-is-in-picture-in-picture","playback-controls":"playkit-playback-controls",playbackControls:"playkit-playback-controls","center-playback-controls":"playkit-center-playback-controls",centerPlaybackControls:"playkit-center-playback-controls","gui-area":"playkit-gui-area",guiArea:"playkit-gui-area","playlist-countdown":"playkit-playlist-countdown",playlistCountdown:"playkit-playlist-countdown",slideIn:"playkit-slideIn",hidden:"playkit-hidden","playlist-countdown-content-placeholder":"playkit-playlist-countdown-content-placeholder",playlistCountdownContentPlaceholder:"playkit-playlist-countdown-content-placeholder","playlist-countdown-content-background":"playkit-playlist-countdown-content-background",playlistCountdownContentBackground:"playkit-playlist-countdown-content-background","playlist-countdown-content":"playkit-playlist-countdown-content",playlistCountdownContent:"playkit-playlist-countdown-content",canceled:"playkit-canceled","playlist-countdown-poster":"playkit-playlist-countdown-poster",playlistCountdownPoster:"playkit-playlist-countdown-poster","playlist-countdown-text":"playkit-playlist-countdown-text",playlistCountdownText:"playkit-playlist-countdown-text","playlist-countdown-text-title":"playkit-playlist-countdown-text-title",playlistCountdownTextTitle:"playkit-playlist-countdown-text-title","playlist-countdown-time-left":"playkit-playlist-countdown-time-left",playlistCountdownTimeLeft:"playkit-playlist-countdown-time-left","playlist-countdown-text-name":"playkit-playlist-countdown-text-name",playlistCountdownTextName:"playkit-playlist-countdown-text-name","playlist-countdown-cancel":"playkit-playlist-countdown-cancel",playlistCountdownCancel:"playkit-playlist-countdown-cancel","playlist-next-screen-overlay":"playkit-playlist-next-screen-overlay",playlistNextScreenOverlay:"playkit-playlist-next-screen-overlay","playlist-next-screen-content":"playkit-playlist-next-screen-content",playlistNextScreenContent:"playkit-playlist-next-screen-content","playlist-next-screen-text":"playkit-playlist-next-screen-text",playlistNextScreenText:"playkit-playlist-next-screen-text","playlist-next-screen-text-title":"playkit-playlist-next-screen-text-title",playlistNextScreenTextTitle:"playkit-playlist-next-screen-text-title","playlist-next-screen-text-name":"playkit-playlist-next-screen-text-name",playlistNextScreenTextName:"playkit-playlist-next-screen-text-name","playlist-next-screen-poster-placeholder":"playkit-playlist-next-screen-poster-placeholder",playlistNextScreenPosterPlaceholder:"playkit-playlist-next-screen-poster-placeholder","playlist-next-screen-poster-aspect-ratio":"playkit-playlist-next-screen-poster-aspect-ratio",playlistNextScreenPosterAspectRatio:"playkit-playlist-next-screen-poster-aspect-ratio","playlist-next-screen-poster":"playkit-playlist-next-screen-poster",playlistNextScreenPoster:"playkit-playlist-next-screen-poster","playlist-next-screen-poster-img":"playkit-playlist-next-screen-poster-img",playlistNextScreenPosterImg:"playkit-playlist-next-screen-poster-img","size-lg":"playkit-size-lg",sizeLg:"playkit-size-lg","picture-in-picture-overlay":"playkit-picture-in-picture-overlay",pictureInPictureOverlay:"playkit-picture-in-picture-overlay","picture-in-picture-poster":"playkit-picture-in-picture-poster",pictureInPicturePoster:"playkit-picture-in-picture-poster","dark-layer":"playkit-dark-layer",darkLayer:"playkit-dark-layer","picture-in-picture-control":"playkit-picture-in-picture-control",pictureInPictureControl:"playkit-picture-in-picture-control","picture-in-picture-text":"playkit-picture-in-picture-text",pictureInPictureText:"playkit-picture-in-picture-text","picture-in-picture-button":"playkit-picture-in-picture-button",pictureInPictureButton:"playkit-picture-in-picture-button","icon-copy":"playkit-icon-copy",iconCopy:"playkit-icon-copy",copied:"playkit-copied",IE:"playkit-IE",ie:"playkit-IE",tooltip:"playkit-tooltip","tooltip-label":"playkit-tooltip-label",tooltipLabel:"playkit-tooltip-label","tooltip-top":"playkit-tooltip-top",tooltipTop:"playkit-tooltip-top","tooltip-top-left":"playkit-tooltip-top-left",tooltipTopLeft:"playkit-tooltip-top-left","tooltip-top-right":"playkit-tooltip-top-right",tooltipTopRight:"playkit-tooltip-top-right","tooltip-bottom":"playkit-tooltip-bottom",tooltipBottom:"playkit-tooltip-bottom","tooltip-bottom-right":"playkit-tooltip-bottom-right",tooltipBottomRight:"playkit-tooltip-bottom-right","tooltip-bottom-left":"playkit-tooltip-bottom-left",tooltipBottomLeft:"playkit-tooltip-bottom-left","tooltip-left":"playkit-tooltip-left",tooltipLeft:"playkit-tooltip-left","tooltip-right":"playkit-tooltip-right",tooltipRight:"playkit-tooltip-right","side-panel":"playkit-side-panel",sidePanel:"playkit-side-panel","vertical-side-panel":"playkit-vertical-side-panel",verticalSidePanel:"playkit-vertical-side-panel","horizontal-side-panel":"playkit-horizontal-side-panel",horizontalSidePanel:"playkit-horizontal-side-panel","side-panel-content":"playkit-side-panel-content",sidePanelContent:"playkit-side-panel-content","video-area":"playkit-video-area",videoArea:"playkit-video-area",spinner:"playkit-spinner","kaltura-spinner":"playkit-kaltura-spinner",kalturaSpinner:"playkit-kaltura-spinner",switch:"playkit-switch","toggle-input":"playkit-toggle-input",toggleInput:"playkit-toggle-input"},e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(n=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(l).concat([s]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a3)for(n=[n],r=3;r1&&e(a,n,r),n=Y(r,a,a,t.__k,null,a.__e,n),"function"==typeof t.type&&(t.__d=n)))}(t,s,e);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(y,c.__s,m),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(d,f,h)}))}c.context=m,c.props=y,c.state=c.__s,(u=A.__r)&&u(t),c.__d=!1,c.__v=t,c.__P=e,u=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=L(L({},r),c.getChildContext())),p||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(d,f)),b=null!=u&&u.type==j&&null==u.key?u.props.children:u,z(e,Array.isArray(b)?b:[b],t,n,r,i,a,o,s,l),c.base=t.__e,c.__h.length&&o.push(c),g&&(c.__E=c.__=null),c.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,a,o,s){var l,u,c,p,d,f=n.props,h=t.props;if(i="svg"===t.type||i,null!=a)for(l=0;l2&&(t.children=R.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return U(e.type,n,t.key||e.key,t.ref||e.ref,null)}function ae(e){var t={},n={__c:"__cC"+P++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,K(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}A={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return K(n.__E=n)}catch(t){e=t}throw e}},w=function(e){return null!=e&&void 0===e.constructor},B.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=L({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&L(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),K(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),K(this))},B.prototype.render=j,S=[],C="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,G.__r=0,I=D,P=0;var oe,se,le,ue=0,ce=[],pe=A.__r,de=A.diffed,fe=A.__c,he=A.unmount;function ge(e,t){A.__h&&A.__h(se,e,ue||t),ue=0;var n=se.__H||(se.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ye(e){return ue=1,ve(Re,e)}function ve(e,t,n){var r=ge(oe++,2);return r.t=e,r.__c||(r.__c=se,r.__=[n?n(t):Re(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}]),r.__}function me(e,t){var n=ge(oe++,3);!A.__s&&De(n.__H,t)&&(n.__=e,n.__H=t,se.__H.__h.push(n))}function be(e,t){var n=ge(oe++,4);!A.__s&&De(n.__H,t)&&(n.__=e,n.__H=t,se.__h.push(n))}function _e(e){return ue=5,ke((function(){return{current:e}}),[])}function Ee(e,t,n){ue=6,be((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function ke(e,t){var n=ge(oe++,7);return De(n.__H,t)?(n.__H=t,n.__h=e,n.__=e()):n.__}function Te(e,t){return ue=8,ke((function(){return e}),t)}function Ae(e){var t=se.context[e.__c],n=ge(oe++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(se)),t.props.value):e.__}function we(e,t){A.useDebugValue&&A.useDebugValue(t?t(e):e)}function Se(e){var t=ge(oe++,10),n=ye();return t.__=e,se.componentDidCatch||(se.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Ce(){ce.some((function(e){if(e.__P)try{e.__H.__h.forEach(Ie),e.__H.__h.forEach(Pe),e.__H.__h=[]}catch(t){return e.__H.__h=[],A.__e(t,e.__v),!0}})),ce=[]}A.__r=function(e){pe&&pe(e),oe=0;var t=(se=e.__c).__H;t&&(t.__h.forEach(Ie),t.__h.forEach(Pe),t.__h=[])},A.diffed=function(e){de&&de(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==ce.push(t)&&le===A.requestAnimationFrame||((le=A.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),xe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);xe&&(t=requestAnimationFrame(n))})(Ce))},A.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ie),e.__h=e.__h.filter((function(e){return!e.__||Pe(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],A.__e(n,e.__v)}})),fe&&fe(e,t)},A.unmount=function(e){he&&he(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Ie)}catch(e){A.__e(e,t.__v)}};var xe="function"==typeof requestAnimationFrame;function Ie(e){"function"==typeof e.u&&e.u()}function Pe(e){e.u=e.__()}function De(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function Re(e,t){return"function"==typeof t?t(e):t}function Oe(e,t){for(var n in t)e[n]=t[n];return e}function Le(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}var Me=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return Le(this.props,e)||Le(this.state,t)},r}(B),Ne=A.__b;A.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ne&&Ne(e)};var Ue="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fe(e){function t(t,n){var r=Oe({},t);return delete r.ref,e(r,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=Ue,t.render=t,t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var je=function(e,t){return e?W(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},Be={map:je,forEach:je,count:function(e){return e?W(e).length:0},only:function(e){if(1!==(e=W(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:W},Ve=A.__e;function He(e){return e&&((e=Oe({},e)).__c=null,e.__k=e.__k&&e.__k.map(He)),e}function Ke(){this.__u=0,this.o=null,this.__b=null}function Ge(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function ze(){this.i=null,this.l=null}A.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return r.__c(e,t.__c);Ve(e,t,n)},(Ke.prototype=new B).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=Ge(n.__v),i=!1,a=function(){i||(i=!0,r?r(o):o())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){a(),t.__c&&t.__c()};var o=function(){var e;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(a,a)},Ke.prototype.render=function(e,t){return this.__b&&(this.__v.__k&&(this.__v.__k[0]=He(this.__b)),this.__b=null),[N(j,null,t.u?null:e.children),t.u&&e.fallback]};var We=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]=0||(i[n]=e[n]);return i}var dt=n(2),ft=n.n(dt),ht=n(1),gt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?be:me,yt=[],vt=[null,null];function mt(e,t){var n=e[1];return[t.payload,n+1]}function bt(e,t,n){gt((function(){return e.apply(void 0,t)}),n)}function _t(e,t,n,r,i,a,o){e.current=r,t.current=i,n.current=!1,a.current&&(a.current=null,o())}function Et(e,t,n,r,i,a,o,s,l,u){if(e){var c=!1,p=null,d=function(){if(!c){var e,n,d=t.getState();try{e=r(d,i.current)}catch(e){n=e,p=e}n||(p=null),e===a.current?o.current||l():(a.current=e,s.current=e,o.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=d,n.trySubscribe(),d(),function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}}var kt=function(){return[null,0]};function Tt(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,i=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,a=n.methodName,o=void 0===a?"connectAdvanced":a,s=n.renderCountProp,l=void 0===s?void 0:s,u=n.shouldHandleStateChanges,c=void 0===u||u,p=n.storeKey,d=void 0===p?"store":p,f=(n.withRef,n.forwardRef),h=void 0!==f&&f,g=n.context,y=void 0===g?at:g,v=pt(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),m=y;return function(t){var n=t.displayName||t.name||"Component",r=i(n),a=ct({},v,{getDisplayName:i,methodName:o,renderCountProp:l,shouldHandleStateChanges:c,storeKey:d,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=v.pure,u=s?ke:function(e){return e()};function p(n){var r=ke((function(){var e=n.reactReduxForwardedRef,t=pt(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),i=r[0],o=r[1],s=r[2],l=ke((function(){return i&&i.Consumer&&Object(ht.isContextConsumer)(it.createElement(i.Consumer,null))?i:m}),[i,m]),p=Ae(l),d=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(p)&&Boolean(p.store);var f=d?n.store:p.store,h=ke((function(){return function(t){return e(t.dispatch,a)}(f)}),[f]),g=ke((function(){if(!c)return vt;var e=new lt(f,d?null:p.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[f,d,p]),y=g[0],v=g[1],b=ke((function(){return d?p:ct({},p,{subscription:y})}),[d,p,y]),_=ve(mt,yt,kt),E=_[0][0],k=_[1];if(E&&E.error)throw E.error;var T=_e(),A=_e(s),w=_e(),S=_e(!1),C=u((function(){return w.current&&s===A.current?w.current:h(f.getState(),s)}),[f,E,s]);bt(_t,[A,T,S,s,C,w,v]),bt(Et,[c,f,y,h,A,T,S,w,v,k],[f,y,h]);var x=ke((function(){return it.createElement(t,ct({},C,{ref:o}))}),[o,t,C]);return ke((function(){return c?it.createElement(l.Provider,{value:b},x):x}),[l,x,b])}var f=s?it.memo(p):p;if(f.WrappedComponent=t,f.displayName=r,h){var g=it.forwardRef((function(e,t){return it.createElement(f,ct({},e,{reactReduxForwardedRef:t}))}));return g.displayName=r,g.WrappedComponent=t,ft()(g,t)}return ft()(f,t)}}function At(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function wt(e,t){if(At(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Xt(e,t){return e===t}var $t=function(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Tt:n,i=t.mapStateToPropsFactories,a=void 0===i?Ht:i,o=t.mapDispatchToPropsFactories,s=void 0===o?Vt:o,l=t.mergePropsFactories,u=void 0===l?Gt:l,c=t.selectorFactory,p=void 0===c?Yt:c;return function(e,t,n,i){void 0===i&&(i={});var o=i,l=o.pure,c=void 0===l||l,d=o.areStatesEqual,f=void 0===d?Xt:d,h=o.areOwnPropsEqual,g=void 0===h?wt:h,y=o.areStatePropsEqual,v=void 0===y?wt:y,m=o.areMergedPropsEqual,b=void 0===m?wt:m,_=pt(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=qt(e,a,"mapStateToProps"),k=qt(t,s,"mapDispatchToProps"),T=qt(n,u,"mergeProps");return r(p,ct({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:k,initMergeProps:T,pure:c,areStatesEqual:f,areOwnPropsEqual:g,areStatePropsEqual:v,areMergedPropsEqual:b},_))}}();function Qt(){return Ae(at)}function Zt(e){void 0===e&&(e=at);var t=e===at?Qt:function(){return Ae(e)};return function(){return t().store}}var Jt=Zt();function en(e){void 0===e&&(e=at);var t=e===at?Jt:Zt(e);return function(){return t().dispatch}}var tn=en(),nn=function(e,t){return e===t};function rn(e){void 0===e&&(e=at);var t=e===at?Qt:function(){return Ae(e)};return function(e,n){void 0===n&&(n=nn);var r=t(),i=function(e,t,n,r){var i,a=ve((function(e){return e+1}),0)[1],o=ke((function(){return new lt(n,r)}),[n,r]),s=_e(),l=_e(),u=_e(),c=_e(),p=n.getState();try{i=e!==l.current||p!==u.current||s.current?e(p):c.current}catch(e){throw s.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+s.current.stack+"\n\n"),e}return gt((function(){l.current=e,u.current=p,c.current=i,s.current=void 0})),gt((function(){function e(){try{var e=l.current(n.getState());if(t(e,c.current))return;c.current=e}catch(e){s.current=e}a()}return o.onStateChange=e,o.trySubscribe(),e(),function(){return o.tryUnsubscribe()}}),[n,o]),i}(e,n,r.store,r.subscription);return we(i),i}}var an=rn();ot=rt;var on=n(4),sn=n.n(on);function ln(e){return null!=e}function un(e,t){for(var n in t)e[n]=t[n];return e}var cn=/[?&#]intl=show/,pn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getChildContext=function(){var e=this.props,t=e.scope,n=e.definition,r=e.mark,i=un({},this.context.intl||{});return t&&(i.scope=t),n&&(i.dictionary=function e(t,n){var r=un({},t);for(var i in n)n.hasOwnProperty(i)&&(t[i]&&n[i]&&"object"==typeof t[i]&&"object"==typeof n[i]?r[i]=e(t[i],n[i]):r[i]=t[i]||n[i]);return r}(i.dictionary||{},n)),(r||"undefined"!=typeof location&&String(location).match(cn))&&(i.mark=!0),{intl:i}},t.prototype.render=function(e){return e.children},t}(B);function dn(e,t){if(arguments.length<2)return t=e,function(e){return dn(e,t)};function n(n){return N(pn,t||{},N(e,n))}return n.getWrappedComponent=e&&e.getWrappedComponent||function(){return e},n}var fn,hn={};function gn(e,t){return fn=t||hn,e&&e.replace(/\{\{([\w.-]+)\}\}/g,yn)}function yn(e,t){for(var n=t.split("."),r=fn,i=0;i1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._map.values());!(e=n()).done;){var r=e.value;t=t.concat(r)}return t},t.remove=function(e,t){if(this._map.has(e)){var n=this._map.get(e);if(Array.isArray(n))for(var r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._bindingMap.getAll());!(e=t()).done;)e.value.unlisten();this._bindingMap&&this._bindingMap.clear()}},e}(),Mr=function(){function e(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.options=r,this.target.addEventListener(t,n,!1)}return e.prototype.unlisten=function(){this.target&&(this.target.removeEventListener(this.type,this.listener,this.options),this.target=null,this.listener=null,this.options=null)},e}();function Nr(){return(Nr=Object.assign||function(e){for(var t=1;t480){if(i===er.ALONGSIDE||a===er.ALONGSIDE){var l=Ai(Ti({},e,{isVideo:!0})),u=l.verticalPanelWidth,c=l.videoWidth;r.left=i===er.ALONGSIDE?u:0,r.right=a===er.ALONGSIDE?u:0,r.width=c,r.position="absolute"}if(o===er.ALONGSIDE||s===er.ALONGSIDE){var p=wi(Ti({},e,{isVideo:!0})),d=p.horizontalPanelHeight,f=p.videoHeight;r.top=o===er.ALONGSIDE?d:0,r.bottom=s===er.ALONGSIDE?d:0,r.height=f,r.position="absolute"}}return r}function Ci(e){var t=e.position,n=e.sidePanelsModes,r=n[Jn.LEFT],i=n[Jn.RIGHT],a=n[Jn.TOP],o=n[Jn.BOTTOM];if(-1!==[Jn.RIGHT,Jn.LEFT].indexOf(t)){var s={},l=Ai(e).verticalPanelWidth;return s.width=l,t===Jn.RIGHT?(i===er.HIDDEN?(s.right=-l,s.opacity=0):(s.right=0,s.opacity=1),s):(r===er.HIDDEN?(s.left=-l,s.opacity=0):(s.left=0,s.opacity=1),s)}var u={},c=wi(e).horizontalPanelHeight,p=Ai(e).verticalPanelWidth;return u.height=c,r!==er.HIDDEN&&(u.left=p),i!==er.HIDDEN&&(u.right=p),t===Jn.TOP?(a===er.HIDDEN?(u.top=-c,u.opacity=0):(u.top=0,u.opacity=1),u):(o===er.HIDDEN?(u.bottom=-c,u.opacity=0):(u.bottom=0,u.opacity=1),u)}function xi(){return(xi=Object.assign||function(e){for(var t=1;t480){if(s!==er.HIDDEN||l!==er.HIDDEN){var p=Ai(e).verticalPanelWidth;s!==er.HIDDEN&&(i.left=p),l!==er.HIDDEN&&(i.right=p)}if(u!==er.HIDDEN||c!==er.HIDDEN){var d=wi(e).horizontalPanelHeight;u!==er.HIDDEN&&(i.top=d),c!==er.HIDDEN&&(i.bottom=d)}a=a-i.right-i.left,o=o-i.top-i.bottom}var f=n.left+(s!==er.HIDDEN?i.left:0),h=n.top+(u!==er.HIDDEN?i.top:0);return{style:i,rect:{x:f,y:h,width:a,height:o,top:h,right:n.right+(l!==er.HIDDEN?i.right:0),bottom:n.bottom+(c!==er.HIDDEN?i.bottom:0),left:f}}}(e),n=t.style,r=t.rect;this.props.updateLayoutStyles({gui:n,video:Si(e),sidePanels:Ii(e)}),this.props.updateGuiClientRect(r)},i.render=function(){return null},r}(B))||_i;function Ri(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Li=jn("PlayerAreaProvider")(Pi=$t((function(e){return{activePresetName:e.shell.activePresetName}}))(Pi=function(e){var t,n;function r(){var t;return Oi(Ri(t=e.call(this)||this),"_validateComponentData",(function(e){var n=e.container||e.area;return!!(e.get&&e.presets&&n)||(t.props.logger.warn("component data with label '"+(e.label||"")+"' is invalid (did you remember to set 'get', 'presets' and 'area'?)"),!1)})),Oi(Ri(t),"_addNewComponentAndUpdateListeners",(function(e){return t._addNewComponent(e,!0)})),Oi(Ri(t),"_addNewComponent",(function(e,n){var r=Object.assign({},e);if(r.container&&(r.area=r.area||r.container,delete r.container),!t._validateComponentData(r))return function(){};var i=r.area;return r.presets.forEach((function(e){if((t._componentsByPreset[e]||(t._componentsByPreset[e]=[])).push(r),n){var a=t._findListeners(i,e);t._emitListeners(a)}})),function(){t._removeNewComponent(r)}})),Oi(Ri(t),"_removeNewComponent",(function(e){t._validateComponentData(e)&&e.presets.forEach((function(n){var r=t._componentsByPreset[n]||[],i=r.indexOf(e);if(-1!==i){r.splice(i,1);var a=t._findListeners(e.area,e.presetName);t._emitListeners(a)}}))})),Oi(Ri(t),"_findListeners",(function(e,n){return e?t._listeners.filter((function(t){return(!n||t.presetName===n)&&t.areaName===e})):[]})),Oi(Ri(t),"_listen",(function(e,n,r){if(!e||!n||!r)return function(){};var i=t._findListeners(n,e);i&&i.length>0&&(t.props.logger.warn("Another component is already registered to updates for player area '"+n+"' in preset '"+e+"'. Unlisten to previous listener"),i.forEach((function(e){t._unlisten(e)})));var a={presetName:e,areaName:n,callback:r};return t._listeners.push(a),t._emitListeners([a]),function(){t._unlisten(a)}})),Oi(Ri(t),"_unlisten",(function(e){var n=t._listeners.indexOf(e);-1!==n&&t._listeners.splice(n,1)})),Oi(Ri(t),"_getAreaComponents",(function(e,n){if(!n||!e)return[];var r=t._componentsByPreset[e];return(r?r.filter((function(e){return e.area===n})):[])||[]})),t._listeners=[],t._componentsByPreset={},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._initializePlayerComponents=function(){this.props.uiComponents&&this.props.uiComponents.length>0&&(this.props.uiComponents.forEach(this._addNewComponent),this._emitAllListeners())},i._emitListeners=function(e){var t=this,n=this.props.activePresetName;(e||[]).forEach((function(e){var r=e.presetName===n?t._getAreaComponents(n,e.areaName):[];try{e.callback(r)}catch(n){t.props.logger.error("Error occurred when handling player area "+e.areaName+" of preset "+e.presetName+".",n)}}))},i._emitAllListeners=function(){this._emitListeners(this._listeners)},i.componentDidMount=function(){this.props.setApi(this._addNewComponentAndUpdateListeners),this._initializePlayerComponents()},i.componentDidUpdate=function(e){e.activePresetName!==this.props.activePresetName&&this._emitAllListeners()},i.getChildContext=function(){return{playerAreaComponentsStore:{listen:this._listen,addNewComponent:this._addNewComponentAndUpdateListeners,getAreaComponents:this._getAreaComponents}}},i.render=function(e){return N(j,null,N(Di,null),e.children)},r}(B))||Pi)||Pi,Mi={allowSidePanels:!1,allowPlayerArea:!1},Ni=function(e){return function(t){var n;return $t(null,ur(sr))(n=function(n){var r,i;function a(){return n.apply(this,arguments)||this}i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var o=a.prototype;return o.componentDidMount=function(){var t=Object.assign({},Mi,e),n=t.allowSidePanels,r=t.allowPlayerArea;this.props.updatePresetSettings({allowSidePanels:n,allowPlayerArea:r})},o.shouldComponentUpdate=function(){return!1},o.render=function(e){return N(t,e)},a}(B))||n}};function Ui(){return(Ui=Object.assign||function(e){for(var t=1;t=0;i--){var a=parseInt(t[i]);if(isNaN(a)||a>59){n=0;break}n+=a*r,r*=60}return n}function Ga(e){var t=parseInt(e);return t<10?"00:0"+e:t<=59?"00:"+e:Ha(t)}function za(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(r=i()).done;){var a=r.value;if(void 0===a.condition||a.condition(t)){n=a;break}}return n},i.render=function(e){var t,n=this.props,i=n.uis,a=n.state.shell.activePresetName;if(i.length>0){var o=(t=this.getMatchedUI(i,e.state))?t.template(e):i[i.length-1].template(e),s=o&&o.type.displayName||"";return a!==s&&(e.notifyChange({from:a,to:s}),e.updateActivePresetName(s),e.updatePresetSettings(null),r.logger.debug("update active preset to '"+a+"' and reset preset settings")),o}},r}(B))||Ba)||Ba,Za=$t((function(e){return{sidePanelsStyles:e.shell.layoutStyles.sidePanels,playerClientRect:e.shell.playerClientRect}}))(Wa=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e){var t=this.props,n=t.sidePanelsStyles,r=t.position,i=e.sidePanelsStyles,a=e.position;return n[r]!==i[a]},i.render=function(e){var t=e.position,n=e.sidePanelsStyles,r=-1!==[Jn.RIGHT,Jn.LEFT].indexOf(t)?"verticalSidePanel":"horizontalSidePanel",i=[pr.a.sidePanel,pr.a[r]],a="SidePanel"+(t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());return N("div",{style:n[t],className:i.join(" ")},N("div",{className:pr.a.sidePanelContent},N(qn,{name:a})))},r}(B))||Wa,Ja=$t((function(e){return{allowSidePanels:e.shell.presetSettings.allowSidePanels,allowPlayerArea:e.shell.presetSettings.allowPlayerArea,sidePanelsConfig:e.config.components.sidePanels}}),ur(sr))(Ya=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(){var e=this.props.sidePanelsConfig,t=e.verticalSizes,n=e.horizontalSizes;t&&this.props.updateSidePanelSize(Zn.VERTICAL,t),n&&this.props.updateSidePanelSize(Zn.HORIZONTAL,n)},i.render=function(){var e=this.props,t=e.uis,n=e.playerContainer,r=e.allowSidePanels,i=e.allowPlayerArea;return N(j,null,N(Qa,{uis:t,playerContainer:n}),r?N(j,null,N(Za,{position:Jn.RIGHT}),N(Za,{position:Jn.LEFT}),N(Za,{position:Jn.TOP}),N(Za,{position:Jn.BOTTOM})):void 0,i?N(qn,{name:"PlayerArea"}):void 0)},r}(B))||Ya,eo=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){return N("div",{className:pr.a.spinner},Array(8).fill(0).map((function(e,t){return N("span",{key:t+1})})))},r}(B);eo.displayName="Spinner";var to,no=(qa=$t((function(e){return{show:e.loading.show,isMobile:e.shell.isMobile,adBreak:e.engine.adBreak,adIsLinear:e.engine.adIsLinear}}),ur(Qi)),Xa=jn("Loading"),qa($a=Sr($a=Br($a=Xa($a=function(e){var t,n;function r(){return e.call(this)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props,n=t.player,r=t.eventManager;r.listen(n,n.Event.PLAYER_STATE_CHANGED,(function(t){var r=n.State;t.payload.newState.type===r.IDLE||t.payload.newState.type===r.PLAYING||t.payload.newState.type===r.PAUSED?e.props.updateLoadingSpinnerState(!1):e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.AD_BREAK_START,(function(){e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.AD_PROGRESS,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.AD_STARTED,(function(){e.props.adIsLinear&&e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.ALL_ADS_COMPLETED,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.AUTOPLAY_FAILED,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.PLAYING,(function(){e.props.updateLoadingSpinnerState(!1)}))},i.render=function(e){if(e.show)return N("div",{className:[pr.a.loadingBackdrop,pr.a.show].join(" ")},N("div",{className:pr.a.spinnerContainer},N(qn,{name:nr.LoadingSpinner},N(eo,null))))},r}(B))||$a)||$a)||$a)||$a);function ro(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function io(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}no.displayName="Loading";var ao,oo=$t((function(e){return{guiStyles:e.shell.layoutStyles.gui}}))(to=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i'+e+"",o=[['"',"'"],["%","%25"],["&","%26"],["#","%23"],["{","%7B"],["}","%7D"],["<","%3C"],[">","%3E"]],s=Math.ceil(a.length/2e3),l=0,u="",c=0;c"})).join(" ")}));var r=t.path,i=t.id;if(r&&i){n._className="playkit-icon-"+i;var a=Array.from(document.styleSheets).find((function(e){return e.ownerNode.id===gf}));a&&Array.from(a.rules).find((function(e){return e.selectorText==="."+n._className}))||n.createDynamicIconClass(t)}return n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUpdate=function(e){this._className&&this.props.state!==e.state&&this.createDynamicIconClass(e)},i.render=function(e){if(this._className)return N("i",{className:[pr.a.icon,this._className].join(" ")});switch(e.type){case vo.Maximize:return N("i",{className:[pr.a.icon,pr.a.iconMaximize].join(" ")});case vo.Minimize:return N("i",{className:[pr.a.icon,pr.a.iconMinimize].join(" ")});case vo.Play:return N("i",{className:[pr.a.icon,pr.a.iconPlay].join(" ")});case vo.Pause:return N("i",{className:[pr.a.icon,pr.a.iconPause].join(" ")});case vo.VolumeBase:return N("i",{className:[pr.a.icon,pr.a.iconVolumeBase].join(" ")});case vo.VolumeWaves:return N("i",{className:[pr.a.icon,pr.a.iconVolumeWaves].join(" ")});case vo.VolumeWave:return N("i",{className:[pr.a.icon,pr.a.iconVolumeWave].join(" ")});case vo.VolumeMute:return N("i",{className:[pr.a.icon,pr.a.iconVolumeMute].join(" ")});case vo.Close:return N("i",{className:[pr.a.icon,pr.a.iconClose].join(" ")});case vo.Settings:return N("i",{className:[pr.a.icon,pr.a.iconSettings].join(" ")});case vo.Check:return N("i",{className:[pr.a.icon,pr.a.iconCheck].join(" ")});case vo.CheckActive:return N("i",{className:[pr.a.icon,pr.a.iconCheckActive].join(" ")});case vo.Language:return N("i",{className:[pr.a.icon,pr.a.iconLanguage].join(" ")});case vo.Quality:return N("i",{className:[pr.a.icon,pr.a.iconQuality].join(" ")});case vo.Captions:return N("i",{className:[pr.a.icon,pr.a.iconCaptions].join(" ")});case vo.Speed:return N("i",{className:[pr.a.icon,pr.a.iconSpeed].join(" ")});case vo.SpeedDown:return N("i",{className:[pr.a.icon,pr.a.iconSpeedDown].join(" ")});case vo.SpeedUp:return N("i",{className:[pr.a.icon,pr.a.iconSpeedUp].join(" ")});case vo.Audio:return N("i",{className:[pr.a.icon,pr.a.iconAudio].join(" ")});case vo.ArrowDown:return N("i",{className:[pr.a.icon,pr.a.iconArrowDown].join(" ")});case vo.StartOver:return N("i",{className:[pr.a.icon,pr.a.iconStartOver].join(" ")});case vo.SeekEnd:return N("i",{className:[pr.a.icon,pr.a.iconSeekEnd].join(" ")});case vo.Rewind:return N("i",{className:[pr.a.icon,pr.a.iconRewind].join(" ")});case vo.Rewind10:return N("i",{className:[pr.a.icon,pr.a.iconRewind10].join(" ")});case vo.Forward:return N("i",{className:[pr.a.icon,pr.a.iconForward].join(" ")});case vo.Forward10:return N("i",{className:[pr.a.icon,pr.a.iconForward10].join(" ")});case vo.vrStereo:return N("i",{className:[pr.a.icon,pr.a.iconVrStereo].join(" ")});case vo.vrStereoFull:return N("i",{className:[pr.a.icon,pr.a.iconVrStereoFull].join(" ")});case vo.Cast:return N("i",{className:[pr.a.icon,pr.a.iconChromecast].join(" ")});case vo.CastBrand:return N("i",{className:[pr.a.icon,pr.a.iconChromecastBrand].join(" ")});case vo.Next:return N("i",{className:[pr.a.icon,pr.a.iconNext].join(" ")});case vo.Prev:return N("i",{className:[pr.a.icon,pr.a.iconPrev].join(" ")});case vo.PictureInPictureStart:return N("i",{className:[pr.a.icon,pr.a.iconPictureInPictureStart].join(" ")});case vo.PictureInPictureStop:return N("i",{className:[pr.a.icon,pr.a.iconPictureInPictureStop].join(" ")});case vo.ClosedCaptionsOn:return N("i",{className:[pr.a.icon,pr.a.iconClosedCaptionsOn].join(" ")});case vo.ClosedCaptionsOff:return N("i",{className:[pr.a.icon,pr.a.iconClosedCaptionsOff].join(" ")});case vo.AdvancedAudioDescription:return N("i",{className:[pr.a.icon,pr.a.iconAdvancedAudioDescription].join(" ")})}},r}(B),Eo=_o,ko=function(e){return e.adBreak&&e.adIsPlaying||!e.adBreak&&e.isPlaying};function To(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ao(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wo(){return(wo=Object.assign||function(e){for(var t=1;t5||Math.abs(n-this._pointerDownPosY)>5},i.overlayClick=function(){var e=this;if(!this.props.isSmartContainerOpen){if(!this.props.fullscreenConfig.disableDoubleClick){var t=Date.now();if(t-this._firstClickTime<200)return this.cancelClickTimeout(),void this.toggleFullscreen();if(t-this._firstClickTime<500)return this.cancelClickTimeout(),this.togglePlayPause(),this.toggleFullscreen(),void(this._firstClickTime=0);this._firstClickTime=t}this._clickTimeout=setTimeout((function(){e._clickTimeout=null,e.togglePlayPause()}),200)}},i.cancelClickTimeout=function(){this._clickTimeout&&(clearTimeout(this._clickTimeout),this._clickTimeout=null)},i.cancelIconTimeout=function(){this._iconTimeout&&(clearTimeout(this._iconTimeout),this._iconTimeout=null)},i.shouldComponentUpdate=function(e){return e.iconType&&this.toggleOverlayActionIcon(e.iconType),!0},i.toggleOverlayActionIcon=function(e){var t=this,n=function(){t.setState({animation:!0,iconType:e},(function(){t._iconTimeout=setTimeout((function(){t._iconTimeout=null,t.setState({animation:!1})}),300)}))};null!==this._iconTimeout?(this.cancelIconTimeout(),this.setState({animation:!1},(function(){t.forceUpdate(),n()}))):n()},i.render=function(){return N("div",{style:this.props.guiStyles,className:pr.a.overlayAction+" "+(this.state.animation?pr.a.in:""),onMouseDown:this.onOverlayPointerDown,onTouchStart:this.onOverlayPointerDown,onMouseUp:this.onOverlayMouseUp,onTouchEnd:this.onOverlayTouchEnd},this.state.animation?this.renderIcons():void 0)},i.renderIcons=function(){return Array.isArray(this.state.iconType)?this.state.iconType.map((function(e,t){return N(Eo,{key:t,type:e})})):N(Eo,{type:this.state.iconType})},i.componentDidUpdate=function(){this.state.animation&&this.props.updateOverlayActionIcon(null)},r}(B))||yo)||yo)||yo)||yo);function Po(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Do(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Io.displayName="OverlayAction";var Ro={Top:"top",Bottom:"bottom",TopRight:"top-right",TopLeft:"top-left",BottomRight:"bottom-right",BottomLeft:"bottom-left",Left:"left",Right:"right"},Oo=$t((function(e){return{playerClientRect:e.shell.playerClientRect,guiClientRect:e.shell.guiClientRect,isMobile:e.shell.isMobile}}))(So=Br((xo=Co=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;ie.lastAlternativeTypeIndex&&t!=e.props.type&&(e.lastAlternativeTypeIndex=n,!0)}))},i.isToolTipInBoundaries=function(){var e=this.textElement.getBoundingClientRect(),t=this.props.playerClientRect;return e.top>t.top+5&&e.bottomt.left+5},i.componentWillMount=function(){this.setState({valid:!1,type:this.props.type})},i.componentDidMount=function(){var e=this;this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)}))},i.handleClickOutside=function(e){var t;!(null==(t=this.tooltipElement)?void 0:t.contains(e.target))&&this.state.showTooltip&&this.hideTooltip()},i.componentDidUpdate=function(e){if(this.props.guiClientRect!==e.guiClientRect)this.lastAlternativeTypeIndex=-1,this.setState({valid:!1,type:this.props.type});else if(this.state.showTooltip)if(this.isToolTipInBoundaries())this.state.valid||this.setState({valid:!0});else{var t=this.getAlternateType();t&&this.setState({valid:!1,type:t})}},i.componentWillUnmount=function(){this._clearHoverTimeout()},i.render=function(e){var t=this,n=[pr.a.tooltipLabel,pr.a["tooltip-"+this.state.type]];if(this.state.showTooltip&&this.state.valid?n.push(pr.a.show):n.push(pr.a.hide),e.isMobile)return W(e.children)[0];var r=ie(e.children,{onFocus:this.handleFocusOnChildren,onBlur:this.handleBlurOnChildren});return N("div",{className:pr.a.tooltip,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,ref:function(e){return e?t.tooltipElement=e:void 0}},r,N("span",{style:{maxWidth:e.maxWidth},ref:function(e){return e?t.textElement=e:void 0},className:n.join(" ")},e.label))},r}(B),Do(Co,"defaultProps",{type:Ro.Top,maxWidth:"240px"}),So=xo))||So)||So;function Lo(){return(Lo=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,["className","children","name"]),o=[pr.a.controlButtonContainer,"playkit-control-"+ns(i)];if(n){var s=Array.isArray(n)?n:[n];o=o.concat(s)}return N("div",qo({className:o.join(" "),ref:t},a),r)})),ns=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()};function rs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function is(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var as,os,ss,ls,us,cs,ps=(Xo=$t((function(e){return{isDvr:e.engine.isDvr,isLive:e.engine.isLive}})),$o=jn("Rewind"),Qo=fi("Rewind"),Zo=Yo(pr.a.rotate),Jo=An({rewindText:"controls.rewind"}),Xo(es=Sr(es=$o(es=Qo(es=Zo(es=Jo(es=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;ia?n.isOnLiveEdge()||(e=a):e=n.currentTime+r,n.currentTime=e,t.props.notifyClick({from:i,to:e})})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return e.isLive&&!e.isDvr?void 0:N(ts,{name:"Forward",className:pr.a.noIdleControl},N(Oo,{label:this.props.forwardText},N(Bo,{tabIndex:"0","aria-label":this.props.forwardText,className:""+pr.a.controlButton,ref:this.props.innerRef,onClick:this.onClick},N(Eo,{type:e.step&&10!==e.step?vo.Forward:vo.Forward10}))))},r}(B))||cs)||cs)||cs)||cs)||cs)||cs);function bs(){return(bs=Object.assign||function(e){for(var t=1;t1?1:e,r.props.logger.debug("Changing volume. "+r.props.player.volume+" => "+e),r.props.player.muted&&(r.props.player.muted=!1),r.props.player.volume=e,r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]),{preventDefault:!0,payload:{volume:r.props.player.volume}}},n[Ln.DOWN]=function(){var e=(Math.round(100*r.props.player.volume)-5)/100;return e=e<0?0:e,r.props.logger.debug("Changing volume. "+r.props.player.volume+" => "+e),r.props.player.volume=e,0===e?(r.props.player.muted=!0,r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute])):r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWave]),{preventDefault:!0,payload:{volume:r.props.player.volume}}},n[Ln.F]=function(){return r.props.player.isFullscreen()?{preventDefault:!0,payload:null}:(r.props.logger.debug("Enter fullscreen"),r.props.player.enterFullscreen(),{preventDefault:!0,payload:!0})},n[Ln.P]=function(){return r.props.player.isInPictureInPicture()?(r.props.logger.debug("Exit Picture In Picture"),r.props.player.exitPictureInPicture()):(r.props.logger.debug("Enter Picture In Picture"),r.props.player.enterPictureInPicture()),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:!0}},n[Ln.ESC]=function(){return r.props.player.isFullscreen()?(r.props.logger.debug("Exit fullscreen"),r.props.player.exitFullscreen(),{preventDefault:!0,payload:!0}):{preventDefault:!0,payload:null}},n[Ln.LEFT]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime-5,t=r.props.player.currentTime,n=e>0?e:0;return r.props.logger.debug("Seek. "+t+" => "+n),r.props.player.currentTime=n,r.props.updateOverlayActionIcon(vo.Rewind),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:t,to:n}}}return{preventDefault:!0,payload:null}},n[Ln.RIGHT]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime+5,t=r.props.player.currentTime,n=e>r.props.player.duration?r.props.player.duration:e;return r.props.logger.debug("Seek. "+t+" => "+n),r.props.player.currentTime=e>r.props.player.duration?r.props.player.duration:e,r.props.updateOverlayActionIcon(vo.Forward),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:t,to:n}}}return{preventDefault:!0,payload:null}},n[Ln.HOME]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime;return r.props.logger.debug("Seek. "+e+" => 0"),r.props.player.currentTime=0,r.props.updateOverlayActionIcon(vo.StartOver),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:e,to:0}}}return{preventDefault:!0,payload:null}},n[Ln.END]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime,t=r.props.player.duration;return r.props.logger.debug("Seek. "+e+" => "+t),r.props.player.currentTime=t,r.props.updateOverlayActionIcon(vo.SeekEnd),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:e,to:t}}}return{preventDefault:!0,payload:null}},n[Ln.M]=function(){return r.props.logger.debug(r.props.player.muted?"Umnute":"Mute"),r.props.player.muted=!r.props.player.muted,r.props.player.muted?r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute]):r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]),{preventDefault:!0,payload:!0}},n[Ln.SEMI_COLON]=function(e){return e.shiftKey?r.props.player.playbackRate!==r.props.player.defaultPlaybackRate?(r.props.logger.debug("Changing playback rate. "+r.props.player.playbackRate+" => "+r.props.player.defaultPlaybackRate),r.props.player.playbackRate=r.props.player.defaultPlaybackRate,r.props.updateOverlayActionIcon(vo.Speed),{preventDefault:!0,payload:{speed:r.props.player.defaultPlaybackRate}}):{preventDefault:!0,payload:null}:ws},n[Ln.PERIOD]=function(e){if(e.shiftKey){var t=r.props.player.playbackRate,n=r.props.player.playbackRates.indexOf(t);return n "+r.props.player.playbackRates[n+1]),r.props.player.playbackRate=r.props.player.playbackRates[n+1],r.props.updateOverlayActionIcon(vo.SpeedUp),{preventDefault:!0,payload:{speed:r.props.player.playbackRates[n+1]}}):{preventDefault:!0,payload:null}}return ws},n[Ln.COMMA]=function(e){if(e.shiftKey){var t=r.props.player.playbackRate,n=r.props.player.playbackRates.indexOf(t);return n>0?(r.props.logger.debug("Changing playback rate. "+t+" => "+r.props.player.playbackRates[n-1]),r.props.player.playbackRate=r.props.player.playbackRates[n-1],r.props.updateOverlayActionIcon(vo.SpeedDown),{preventDefault:!0,payload:{speed:r.props.player.playbackRates[n-1]}}):{preventDefault:!0,payload:null}}return ws},n[Ln.C]=function(e){var t=r.props.player.getActiveTracks().text;if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return ws;if(t){if("off"===t.language&&r._lastActiveTextLanguage){r.props.logger.debug("Changing text track to language",r._lastActiveTextLanguage);var n=r.props.player.getTracks("text").find((function(e){return e.language===r._lastActiveTextLanguage}));return r.props.player.selectTrack(n),{preventDefault:!0,payload:{track:n}}}"off"===t.language||r._lastActiveTextLanguage||(r.props.logger.debug("Hiding text track"),r._lastActiveTextLanguage=t.language,r.props.player.hideTextTrack())}return{preventDefault:!0,payload:null}},n));var i=document.getElementById(t.config.targetId);return i?(i.onkeydown=function(e){var t=e.target instanceof Node&&e.target.nodeName||"";if(-1===["INPUT","SELECT","TEXTAREA"].indexOf(t)&&!r.props.overlayOpen&&!r.props.playerNav&&"function"==typeof r.keyboardHandlers[e.keyCode]){r.props.logger.debug("KeyDown -> keyName: "+function(e){for(var t in Ln)if(Ln[t]===e)return t;return"NOT_FOUND"}(e.keyCode)+", shiftKey: "+e.shiftKey.toString());var n=r.keyboardHandlers[e.keyCode](e),i=n.preventDefault,a=n.payload;i&&e.preventDefault(),a&&r.props.notifyClick(bs({key:e.keyCode},a))}},r):_s(r)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.componentWillReceiveProps=function(e){var t=this.props.textTracks.find((function(e){return e.active})),n=e.textTracks.find((function(e){return e.active}));t&&"off"!==t.language&&n&&"off"===n.language?this._lastActiveTextLanguage=t.language:n&&"off"!==n.language&&(this._lastActiveTextLanguage="")},r}(B))||vs)||vs)||vs)||vs);function Cs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Is=["keydown","keyup"],Ps=(ks=$t((function(e){return{playerNav:e.shell.playerNav,overlayOpen:e.overlay.isOpen}})),Ts=jn("KEYBOARD_PROVIDER"),ks(As=Br(As=Ts(As=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i1,r=e.showAdvancedAudioDescToggle,i=e.showCaptionsMenu&&e.textTracks.length>1,a=e.showQualityMenu&&e.videoTracks.length>1,o=e.showSpeedMenu&&e.player.playbackRates.length>1&&!e.isLive;if((n||i||a||o)&&(!(e.isLive&&e.videoTracks.length<=1)||n||i)){var s=this.getButtonBadgeType()||"",l=document.getElementById(this.props.player.config.targetId)||document;return N(ts,{name:"Settings",ref:function(e){return e?t._controlSettingsElement=e:void 0}},N(Oo,{label:e.buttonLabel},N(Bo,{tabIndex:"0","aria-label":e.buttonLabel,className:[pr.a.controlButton,pr.a.buttonBadge,mo[s+"Active"],this.state.smartContainerOpen?pr.a.active:""].join(" "),onClick:this.onControlButtonClick},N(Eo,{type:vo.Settings}))),this.state.smartContainerOpen&&!this.state.cvaaOverlay&&N(fc,{targetId:e.player.config.targetId,title:N(bn,{id:"settings.title"}),onClose:this.onControlButtonClick},r&&N(pd,null),n&&N(Bp,null),i&&N(Xp,{onAdvancedCaptionsClick:this.toggleCVAAOverlay}),a&&N(sd,null),o&&N(nd,null)),this.state.cvaaOverlay?Xe(N(Mu,{onClose:this.onCVAAOverlayClose}),l.querySelector(".overlay-portal")):N("div",null))}},r}(B))||sl)||sl)||sl)||sl;function bl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function El(){return(El=Object.assign||function(e){for(var t=1;t "+!e.muted),e.muted=!e.muted),t.props.notifyClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props.player;this.props.eventManager.listen(t,t.Event.LOADED_METADATA,(function(){e.props.updateVolume(t.volume),e.props.updateMuted(t.muted)})),this.props.eventManager.listen(t,t.Event.VOLUME_CHANGE,(function(){e.props.updateMuted(t.muted),e.props.updateVolume(t.volume)})),this.props.eventManager.listen(document,"mouseup",this.onVolumeProgressBarMouseUp),this.props.eventManager.listen(document,"mousemove",this.onVolumeProgressBarMouseMove),this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)})),this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.handleClickOutside=function(e){!this.props.isMobile&&this._volumeControlElement&&!this._volumeControlElement.contains(e.target)&&this.state.hover&&this.setState({hover:!1})},i.getVolumeProgressHeight=function(){return this.props.muted?"0%":Math.round(100*this.props.volume)+"%"},i.handleKeydown=function(e){var t,n=this,r=this.props.player,i=function(e){e===r.volume||e>100||e<0||(r.muted=e<5,r.volume=e/100,n.props.notifyChange({volume:r.volume}))};switch(e.keyCode){case Ln.UP:this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]),i(t=Math.min(Math.round(100*r.volume)+5,100));break;case Ln.DOWN:0===(t=Math.max(Math.round(100*r.volume)-5,0))?this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute]):this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWave]),i(t);break;case Ln.M:r.muted?this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]):this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute]),this.toggleMute();break;case Ln.ENTER:case Ln.SPACE:this.toggleMute()}},i.changeVolume=function(e){var t,n=this.props.player,r=this._volumeProgressBarElement.getBoundingClientRect();t=r.height>r.width?this._getVerticalVolume(r,e):this._getHorizontalVolume(r,e),(t=parseFloat(t.toFixed(2)))<=1&&t>=0&&(this.props.logger.debug("Change volume from "+n.volume+" => "+t),n.volume=t,this.props.muted&&(n.muted=!1),this.props.notifyChange({volume:n.volume}))},i._getHorizontalVolume=function(e,t){var n=e.width,r=e.left,i=t.clientX;return 0!=n?(i-r)/n:0},i._getVerticalVolume=function(e,t){var n=e.height,r=e.top,i=t.clientY;return 0!=n?1-(i-r)/n:0},i.render=function(){var e=this;if(!this.props.player.isImage()){var t=this.props,n=t.player,r=t.isDraggingActive,i=t.muted,a=t.volume,o=t.smartContainerOpen,s=[pr.a.volumeControl];return r&&s.push(pr.a.draggingActive),(i||0===a)&&s.push(pr.a.isMuted),this.state.hover&&!o&&s.push(pr.a.hover),N(ts,{role:"application",name:"Volume",ref:function(t){return t?e._volumeControlElement=t:void 0},className:s,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut},N(Oo,{label:this.props.tooltipLabel,type:this.props.toolTipType?this.props.toolTipType:Ro.Left},N(Bo,{tabIndex:"0","aria-live":"polite","aria-label":this.props.volBtnAriaLabel,className:pr.a.controlButton,onMouseUp:this.toggleMute,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown,onFocus:this.onFocus},N(Eo,{type:vo.VolumeBase}),N(Eo,{type:vo.VolumeWaves}),N(Eo,{type:vo.VolumeMute}))),N("div",{className:pr.a.volumeControlBar,role:"slider","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":100*n.volume,"aria-valuetext":100*n.volume+"% volume "+(n.muted?"muted":"")},N("div",{className:pr.a.bar,ref:function(t){return t?e._volumeProgressBarElement=t:void 0},onMouseDown:this.onVolumeProgressBarMouseDown},N("div",{className:pr.a.progress,style:{height:this.getVolumeProgressHeight()}}))))}},r}(B))||vl)||vl)||vl)||vl)||vl)||vl)||vl);function Cl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Il(){return(Il=Object.assign||function(e){for(var t=1;tpr.a.bottomBarMaxHeight;this.state.lineBreak!==e&&this.setState({lineBreak:e})},i.render=function(e){var t=e.leftControls,n=e.rightControls,r=[pr.a.bottomBar];return e.isCasting&&e.isPlaybackEnded&&r.push(pr.a.hide),this.state.lineBreak&&r.push(pr.a.lineBreak),N("div",{ref:this._ref,className:r.join(" ")},N("div",{className:pr.a.bottomBarArea},N(qn,{name:"BottomBar"},e.children)),N("div",{className:pr.a.leftControls},N(qn,{name:"BottomBarLeftControls"},t)),N("div",{className:pr.a.rightControls},N(qn,{name:"BottomBarRightControls"},n)))},r}(B))||$l;tu.displayName="BottomBar";var nu,ru=function(e){var t=_e(null);return me((function(){var n;e.isActive&&(null==(n=t)||n.focus())}),[]),N("div",{role:"button",tabIndex:"0",ref:function(n){t=n,e.addAccessibleChild(n)},className:e.classNames.join(" "),onClick:e.changeCaptionsStyle,onKeyDown:function(t){t.keyCode===Ln.ENTER&&e.changeCaptionsStyle()}},e.children,e.isActive?N("div",{className:pr.a.activeTick},N(Eo,{type:vo.Check})):void 0)};function iu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function au(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ou,su=Sr(nu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i=t.top?[pr.a.top,pr.a.left]:e.bottom+e.heightthis.state.max&&(n=this.state.max);break;case Ln.LEFT:(n-=5)0?e.touches[0].clientX:e.changedTouches?e.changedTouches[0].pageX:e.clientX)-this._sliderElement.getBoundingClientRect().left,r=Math.round(n/this._sliderElement.clientWidth*100);return this.getValueByPersentage(r)t.max?t.max:this.getValueByPersentage(r)},i.getValueByPersentage=function(e){return this.state.max/100*e},i.getPercentageByValue=function(){return Math.round(this.state.value/this.state.max*100)},i.render=function(e){var t=this;return N("div",{role:"slider","aria-valuemin":this.state.min,"aria-valuenow":this.state.value,"aria-valuemax":this.state.max,"aria-labelledby":e.name,tabIndex:"0",ref:function(n){n&&(t._sliderElement=n,e.pushRef&&e.pushRef(n))},className:pr.a.slider,onMouseDown:this.mouseDownHandler,onTouchStart:this.mouseDownHandler,onKeyDown:this.onKeyDown},N("div",{className:pr.a.progress,style:{width:this.getPercentageByValue()+"%"}},N("div",{className:pr.a.handle,onMouseDown:this.mouseDownHandler,onTouchStart:this.mouseDownHandler})))},r}(B);_u.displayName="Slider";var Eu,ku=function(e){return N("div",{className:e.classNames.join(" ")},N("label",{id:e.styleName},N(bn,{id:e.labelId})),N(_u,{name:e.styleName,pushRef:function(t){e.addAccessibleChild(t)},min:0,max:100,value:100*e.value,onChange:function(t){var n={};n[e.styleName]=t/100,e.changeCustomStyle(n)}}))};function Tu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Au(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wu,Su,Cu,xu,Iu=Sr(Eu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i0&&(e._timeoutId=setTimeout((function(){return e.setState({show:!1})}),e.props.config.timeout))},n=this.props.player;this.props.eventManager.listenOnce(n,n.Event.PLAYING,t),this.props.eventManager.listen(n,n.Event.CHANGE_SOURCE_ENDED,(function(){e.setState({show:!0}),e.props.eventManager.listenOnce(n,n.Event.PLAYING,t)}))},i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},i.render=function(e){if(e.config.img){var t=[pr.a.watermark];return e.config.placement.split("-").forEach((function(e){t.push(pr.a[e])})),e.config.url||t.push(pr.a.emptyUrl),this.state.show||t.push(pr.a.hideWatermark),N("div",{className:t.join(" ")},N("a",{href:e.config.url,target:"_blank",rel:"noopener noreferrer"},N("img",{src:e.config.img})))}},r}(B))||Dc)||Dc)||Dc)||Dc);Nc.displayName="Watermark";var Uc,Fc,jc,Bc=(Oc=$t((function(e){return{isMobile:e.shell.isMobile,playerSize:e.shell.playerSize,config:e.config.components.logo}})),Lc=jn("Logo"),Oc(Mc=Sr(Mc=Lc(Mc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._shouldRender=function(){return!(0===Object.keys(this.props.config).length&&this.props.config.constructor===Object)},i.render=function(e){if(this._shouldRender()){var t=[Ei.TINY,Ei.EXTRA_SMALL,Ei.SMALL].includes(this.props.playerSize);return e.config.img&&!t?N("div",{className:[pr.a.controlButtonContainer,e.config.url?"":pr.a.emptyUrl].join(" "),"aria-label":N(bn,{id:"controls.logo"}),title:e.config.text},N("a",{className:pr.a.controlButton,href:e.config.url,target:"_blank",rel:"noopener noreferrer"},N("img",{className:pr.a.icon,src:e.config.img}))):void 0}},r}(B))||Mc)||Mc)||Mc);Bc.displayName="Logo";var Vc,Hc,Kc,Gc,zc,Wc=$t((function(e){return{poster:e.engine.poster,castSession:e.engine.castSession,isIdle:e.engine.isIdle,isPlaying:e.engine.isPlaying,isPlaybackEnded:e.engine.isPlaybackEnded,isPaused:e.engine.isPaused,isChangingSource:e.engine.isChangingSource}}))(Uc=jn("CastOverlay")((jc=Fc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getStatus=function(){return this.props.isPlaying||this.props.isPaused?N(bn,{id:"cast.status.playing_on"}):this.props.isPlaybackEnded||this.props.isChangingSource||this.props.castSession.resuming?N(bn,{id:"cast.status.connected_to"}):N(bn,{id:"cast.status.connecting_to"})},i.getIcon=function(){return this.props.isPlaying||this.props.isPaused||this.props.isPlaybackEnded||this.props.isChangingSource||this.props.castSession.resuming?N(_o,{type:this.props.icon}):N("div",{className:pr.a.castConnectingSpinner})},i.render=function(e){if(e.castSession){var t={},n=[pr.a.castPoster];e.poster&&(t={backgroundImage:e.isChangingSource?"":"url("+e.poster+")",backgroundSize:"contain"},n.push(pr.a.hasPoster));var r=this.getStatus(),i=this.getIcon();return N("div",null,N("div",{className:pr.a.castOverlay},N("div",{className:n.join(" "),style:t,onMouseOver:function(e){return e.stopPropagation()}}),N("div",{className:pr.a.castBlackCover})),N("div",{className:pr.a.castBox},N("div",{className:pr.a.castIcon},i),N("div",{className:pr.a.castText},N(En,null,N("span",{className:pr.a.castStatus},r)),N("br",null),N("span",{className:pr.a.castDevice},e.castSession.deviceFriendlyName))))}},r}(B),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Fc,"defaultProps",{icon:vo.Cast}),Uc=jc))||Uc)||Uc;function Yc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Wc.displayName="CastOverlay";var Xc,$c,Qc,Zc,Jc,ep=(Vc=$t((function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,prePlayback:e.engine.prePlayback,loading:e.loading.show,isCastAvailable:e.engine.isCastAvailable}})),Hc=jn("CastBeforePlay"),Vc(Kc=Sr(Kc=Hc((zc=Gc=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i-1&&-1===e.sources.poster.indexOf("/width/")?e.sources.poster+"/width/384":e.sources.poster:""},i.render=function(e){var t=this;if(this._shouldRender(e)){var n=e.playlist.next;return N("div",{className:pr.a.playlistNextScreenOverlay},N("div",{className:pr.a.playlistNextScreenContent},N("div",{id:"playlistNextScreenTextId",className:pr.a.playlistNextScreenText},N(En,null,N("div",{className:pr.a.playlistNextScreenTextTitle},N(bn,{id:"playlist.next"}))),N("div",{className:pr.a.playlistNextScreenTextName},""+(n.sources.metadata?n.sources.metadata.name:""))),N("div",{className:pr.a.playlistNextScreenPosterPlaceholder},N("div",{className:pr.a.playlistNextScreenPosterAspectRatio},N("div",{role:"button","aria-labelledby":"playlistNextScreenTextId",ref:function(e){return e?t.focusElement=e:void 0},tabIndex:"0",className:pr.a.playlistNextScreenPoster,onClick:this.onPosterClick,onKeyDown:this.onKeyDown},N("div",{className:pr.a.playlistNextScreenPosterImg,style:"background-image: url("+this._getPosterUrl()+");"}),N(Eo,{type:vo.Play}))))))}},r}(B))||pp)||pp)||pp);function kp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ep.displayName="PlaylistNextScreen";var Ap,wp=(gp=$t((function(e){return{isPictureInPictureSupported:e.engine.isPictureInPictureSupported,isInPictureInPicture:e.engine.isInPictureInPicture,playerSize:e.shell.playerSize}}),ur(sr)),yp=Fs("PictureInPicture"),vp=jn("PictureInPicture"),mp=fi("PictureInPicture"),bp=An({pictureInPictureText:"controls.pictureInPicture",pictureInPictureExitText:"controls.pictureInPictureExit",pictureInPictureExpandText:"controls.pictureInPictureExpand"}),gp(_p=Sr(_p=yp(_p=vp(_p=mp(_p=bp(_p=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i "+i.playbackRates[n+1]),i.playbackRate=i.playbackRates[n+1],this.props.updateOverlayActionIcon(vo.SpeedUp),i.dispatchEvent(new Wr(i.playbackRate)));break;case Ln.SEMI_COLON:i.playbackRate!==i.defaultPlaybackRate&&(a.debug("Changing playback rate. "+i.playbackRate+" => "+i.defaultPlaybackRate),i.playbackRate=i.defaultPlaybackRate,this.props.updateOverlayActionIcon(vo.Speed),i.dispatchEvent(new Wr(i.playbackRate)));break;case Ln.COMMA:t=i.playbackRate,(n=i.playbackRates.indexOf(t))>0&&(a.debug("Changing playback rate. "+t+" => "+i.playbackRates[n-1]),i.playbackRate=i.playbackRates[n-1],this.props.updateOverlayActionIcon(vo.SpeedDown),i.dispatchEvent(new Wr(i.playbackRate)))}},i.render=function(e){var t=e.player.playbackRates.reduce((function(t,n){var r={value:n,label:1===n?e.speedNormalLabelText:n,active:!1};return n===e.player.playbackRate&&(r.active=!0),t.push(r),t}),[]);return N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.Speed,label:e.speedLabelText,options:t,onMenuChosen:this.onSpeedChange})},r}(B))||qp)||qp)||qp)||qp)||qp)||qp);nd.displayName="SpeedMenu";var rd={HD:1080,UHD_4K:2160,UHD_8K:4320};function id(e){var t=Object.keys(mo),n=t[0],r=t[2],i=t[4];return e>=rd.HD&&e=rd.UHD_4K&&e=rd.UHD_8K?i:null}var ad,od=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],sd=(Zp=$t((function(e){return{videoTracks:e.engine.videoTracks}}),ur(sa)),Jp=fi("QualityMenu"),ed=An({qualityLabelText:"settings.quality",qualityAutoLabelText:"settings.qualityAuto"}),Zp(td=Sr(td=Jp(td=ed(td=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.onQualityChange=function(e){this.props.updateQuality(e);var t=this.props.player;"auto"===e?t.enableAdaptiveBitrate():t.selectTrack(e),this.props.notifyClick({type:t.Track.VIDEO,track:e})},i.filterUniqueQualities=function(e,t){var n=e.length-1,r=e[n];return n>-1&&t.label===r.label?(t.bandwidth>r.bandwidth&&(e[n]=t),e[n].active=t.active||r.active):e.push(t),e},i.render=function(e){var t=this,n=e.videoTracks.sort((function(e,t){return e.height1&&"progressive"!==e.player.streamType){var r,i=n.find((function(e){return!0===e.value.active})).value;r=od.includes(this.props.player._localPlayer._config.ui.locale)?i.label+" - "+this.props.qualityAutoLabelText:this.props.qualityAutoLabelText+" - "+i.label,n.unshift({label:this.props.qualityAutoLabelText,dropdownOptions:{label:r,badgeType:id(i.height)},active:e.player.isAdaptiveBitrateEnabled(),value:"auto"})}return N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.Quality,label:e.qualityLabelText,options:n,onMenuChosen:function(e){return t.onQualityChange(e)}})},r}(B))||td)||td)||td)||td);function ld(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ud(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}sd.displayName="QualityMenu";var cd,pd=$t((function(e){return{isAdvancedAudioDescChecked:e.settings.advancedAudioDesc}}),ur(sa))(ad=fi("AdvancedAudioDescToggle")(ad=An({advancedAudioText:"settings.advancedAudioDescription"})(ad=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i0?a-5:0);break;case Ln.RIGHT:t||this.props.updateOverlayActionIcon(vo.Forward),o(a,a+5>i?i:a+5);break;case Ln.HOME:t||this.props.updateOverlayActionIcon(vo.StartOver),o(a,0);break;case Ln.END:t||this.props.updateOverlayActionIcon(vo.SeekEnd),o(a,i)}},i.updateSeekBarProgress=function(e,t,n){void 0===n&&(n=!1),n?this.props.updateVirtualTime(e):this.props.updateCurrentTime(e)},i.getOffset=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft+this._getTransformX(e),n+=e.offsetTop-e.scrollTop,e=e.offsetParent;return this.props.player.isFullscreen()&&(t=0),{top:n,left:t}},i._getTransformX=function(e){var t=getComputedStyle(e),n=(t.getPropertyValue("transform")||t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")).match(/-?\d+/g),r=0;return n&&n.length>0&&(r=parseFloat(n[4])),r},i.getTime=function(e){var t,n=("number"==typeof e.clientX?e.clientX:null==e||null==(t=e.changedTouches[0])?void 0:t.clientX)-this._seekBarElement.getBoundingClientRect().left,r=parseFloat((this.props.duration/this._seekBarElement.offsetWidth*n).toFixed(2));return r<0?0:r>this.props.duration?this.props.duration:r},i.getBufferedPercent=function(){var e=this.props.player;if(this.props.duration>0&&e.buffered.length>0){var t=(e.isLive()?e.buffered.end(0)-e.getStartTimeOfDvrWindow():e.buffered.end(0))/this.props.duration*100;return t<100?t:100}return 0},i.getFramePreviewOffset=function(){if(this._seekBarElement&&this._framePreviewElement){var e=this.props.virtualTime/this.props.duration*this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth/2;return e<0?0:e>this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth?this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth:e}return 0},i.getTimeBubbleOffset=function(){if(this._timeBubbleElement){var e=this.props.virtualTime/this.props.duration*this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth/2;return e<0?0:e>this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth?this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth:e}return 0},i.renderFramePreview=function(){var e=this;if(this.props.showFramePreview&&!this.props.isMobile)return N("div",{className:this.props.hidePreview?[pr.a.framePreview,pr.a.hideFramePreview].join(" "):pr.a.framePreview,style:this._getFramePreviewStyle(),ref:function(t){return t?e._framePreviewElement=t:void 0}},N(Ed,{virtualTime:this.props.virtualTime}))},i._getFramePreviewStyle=function(){return"left: "+this.getFramePreviewOffset()+"px;"},i.renderTimeBubble=function(){var e=this;if(!this.props.hideTimeBubble&&this.props.showTimeBubble&&!this.props.isMobile){var t="left: "+this.getTimeBubbleOffset()+"px",n=this.props.isDvr?"-"+Ha(this.props.duration-this.props.virtualTime):Ha(this.props.virtualTime);return N("div",{className:pr.a.timePreview,style:t,ref:function(t){return t?e._timeBubbleElement=t:void 0}},n)}},i.render=function(e,t){var n=this,r=e.virtualTime/e.duration*100+"%",i=(e.forceFullProgress?100:e.currentTime/e.duration*100)+"%",a=Math.round(this.getBufferedPercent())+"%",o=[pr.a.seekBar];return e.adBreak&&o.push(pr.a.adBreak),e.isDvr&&o.push(pr.a.live),e.isMobile&&o.push(pr.a.hover),e.isDraggingActive&&o.push(pr.a.hover),t.resizing&&o.push(pr.a.resizing),N("div",{tabIndex:"0",className:o.join(" "),ref:function(e){return e?n._seekBarElement=e:void 0},role:"slider","aria-label":e.sliderAriaLabel,"aria-valuemin":"0","aria-valuemax":Math.round(this.props.duration),"aria-valuenow":Math.round(this.props.currentTime),"aria-valuetext":Ha(this.props.currentTime)+" of "+Ha(this.props.duration),onMouseOver:this.onSeekbarMouseOver,onMouseLeave:this.onSeekbarMouseLeave,onMouseMove:this.onSeekbarMouseMove,onMouseDown:this.onSeekbarMouseDown,onTouchStart:this.onSeekbarTouchStart,onTouchMove:this.onSeekbarTouchMove,onTouchEnd:this.onSeekbarTouchEnd,onKeyDown:this.onKeyDown},N("div",{className:pr.a.progressBar},N(qn,{name:"SeekBar",shouldUpdate:!0},this.renderFramePreview(),this.renderTimeBubble(),N("div",{className:pr.a.buffered,style:{width:a}}),e.dataLoaded?N("div",{className:pr.a.progress,style:{width:i}},e.adBreak?void 0:N("a",{className:pr.a.scrubber})):void 0,N("div",{className:pr.a.virtualProgress,style:{width:r}},N("div",{className:pr.a.virtualProgressIndicator})))))},r}(B))||md)||md)||md)||md)||md);Id.displayName="SeekBar";var Pd,Dd,Rd,Od=(wd=$t((function(e){return{currentTime:e.seekbar.currentTime,virtualTime:e.seekbar.virtualTime,duration:e.engine.duration,isDraggingActive:e.seekbar.draggingActive,isMobile:e.shell.isMobile,poster:e.engine.poster,dataLoaded:e.engine.dataLoaded}}),ur(Vi)),Sd=jn("SeekBarPlaybackContainer"),Cd=fi("SeekBarPlaybackContainer"),wd(xd=Sr(xd=Br(xd=Sd(xd=Cd(xd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this.props.eventManager.listen(this.props.player,this.props.player.Event.TIME_UPDATE,(function(){e.props.isDraggingActive||e.props.updateCurrentTime(e.props.player.currentTime)}))},i.render=function(){var e=this;return N(Id,{playerElement:this.props.playerContainer,showFramePreview:this.props.showFramePreview,showTimeBubble:this.props.showTimeBubble,changeCurrentTime:function(t){return e.props.player.currentTime=t},playerPoster:this.props.poster,updateSeekbarDraggingStatus:function(t){return e.props.updateSeekbarDraggingStatus(t)},updateSeekbarHoverActive:function(t){return e.props.updateSeekbarHoverActive(t)},updateSeekbarClientRect:function(t){return e.props.updateSeekbarClientRect(t)},updateCurrentTime:function(t){return e.props.updateCurrentTime(t)},updateVirtualTime:function(t){return e.props.updateVirtualTime(t)},currentTime:this.props.currentTime,virtualTime:this.props.virtualTime,duration:this.props.duration,isDraggingActive:this.props.isDraggingActive,isMobile:this.props.isMobile,notifyChange:function(t){return e.props.notifyChange(t)},dataLoaded:this.props.dataLoaded})},r}(B))||xd)||xd)||xd)||xd)||xd);function Ld(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Md(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Od.displayName="SeekBarPlaybackContainer";var Nd,Ud,Fd,jd=(Pd=$t((function(e){return{playlist:e.engine.playlist,currentTime:e.engine.currentTime,duration:e.engine.duration,lastSeekPoint:e.engine.lastSeekPoint,isSeeking:e.engine.isSeeking,isPlaybackEnded:e.engine.isPlaybackEnded,countdownCanceled:e.playlist.countdownCanceled}}),ur(va)),Dd=jn("PlaylistCountdown"),Pd(Rd=Sr(Rd=Br(Rd=Dd(Rd=function(e){var t,n;function r(t){var n;return Md(Ld(n=e.call(this,t)||this),"onClick",(function(){n.props.player.playlist.playNext()})),Md(Ld(n),"cancelNext",(function(e){n.props.logger.debug("Cancel auto play next item"),e.stopPropagation(),n.props.updatePlaylistCountdownCanceled(!0)})),Md(Ld(n),"onKeyDown",(function(e){switch(e.keyCode){case Ln.ENTER:n.onClick();break;case Ln.ESC:n.cancelNext(e)}})),Md(Ld(n),"onCancelButtonKeyDown",(function(e){e.keyCode===Ln.ENTER&&n.cancelNext(e)})),n.setState({focusable:!1}),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._shouldRender=function(e){return this.state.timeToShow&&e.playlist&&e.playlist.next&&e.playlist.next.sources&&e.player.playlist.countdown.showing&&(e.player.playlist.options.autoContinue||e.player.playlist.options.loop)},i._getTimeToShow=function(){var e=this.props.player.playlist.countdown,t=this.props.duration-e.duration;return e.timeToShow>=0&&e.timeToShow<=this.props.duration&&(t=Math.max(e.timeToShow,this.props.lastSeekPoint)),Math.max(0,Math.min(t,this.props.duration))},i.componentWillUpdate=function(e){var t=this._getTimeToShow();e.currentTime>=t?this.setState({timeToShow:!0}):(this.setState({timeToShow:!1}),this.props.updatePlaylistCountdownCanceled(!1))},i.isHidden=function(e){return!e.timeToShow||this.props.player.playlist.countdown.duration>=this.props.duration},i.isCanceled=function(){return this.props.countdownCanceled},i.isShown=function(e){return!this.isHidden(e)&&!this.isCanceled()},i.componentDidUpdate=function(e,t){var n=this;if(this._shouldRender(e)){var r=this._getTimeToShow(),i=this.props.player.playlist.countdown;e.isSeeking||this.props.countdownCanceled||!(this.props.isPlaybackEnded||this.props.currentTime>=r+i.duration&&this.props.currentTime0&&!e.isSeeking&&!this.props.isPlaybackEnded},i.render=function(e){var t=this;if(this._shouldRender(e)&&(this.isShown(this.state)&&(this.nextShown=e.playlist.next),e.playlist.next&&e.playlist.next.sources&&this.nextShown)){var n=this.props.player.playlist.countdown,r=this._getTimeToShow(),i=e.currentTime-r,a=Math.min(n.duration,e.duration-r),o=Math.ceil(a-(i>0?i:0)),s=[pr.a.playlistCountdown];return this.isHidden(this.state)?s.push(pr.a.hidden):this.isCanceled()?s.push(pr.a.canceled):s.push(pr.a.slideIn),N("div",{role:"button","aria-labelledby":"playlistCountdownTextId",ref:function(e){return e?t.focusElement=e:void 0},tabIndex:this.state.focusable?0:-1,className:s.join(" "),onKeyDown:this.onKeyDown,onClick:this.onClick},N("div",{className:pr.a.playlistCountdownPoster,style:"background-image: url("+this.nextShown.sources.poster+");"}),N("div",{className:pr.a.playlistCountdownContentPlaceholder},N("div",{className:pr.a.playlistCountdownContentBackground},N("div",{className:pr.a.playlistCountdownContent},N(En,null,N("div",{id:"playlistCountdownTextId",className:pr.a.playlistCountdownText},N("div",{className:pr.a.playlistCountdownTextTitle},N(bn,{id:"playlist.up_next_in"}),N("div",{className:pr.a.playlistCountdownTimeLeft},o)),N("div",{className:pr.a.playlistCountdownTextName},""+(this.nextShown.sources.metadata?this.nextShown.sources.metadata.name:"")))),N("div",{className:[pr.a.controlButtonContainer,pr.a.playlistCountdownCancel].join(" ")},N(En,null,N(Bo,{tabIndex:this.state.focusable?0:-1,"aria-label":N(bn,{id:"playlist.cancel"}),className:[pr.a.controlButton,pr.a.playlistCountdownCancelButton].join(" "),onClick:this.cancelNext,onKeyDown:this.onCancelButtonKeyDown},N(Eo,{type:vo.Close}))))))))}},r}(B))||Rd)||Rd)||Rd)||Rd);jd.displayName="PlaylistCountdown";var Bd,Vd=(Nd=$t((function(e){return{poster:e.engine.poster,isInPictureInPicture:e.engine.isInPictureInPicture,isChangingSource:e.engine.isChangingSource}})),Ud=jn("PictureInPictureOverlay"),Nd(Fd=Sr(Fd=Ud(Fd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._handleClick=function(){this.props.player.exitPictureInPicture()},i.render=function(){if(this.props.isInPictureInPicture){var e={},t=[pr.a.pictureInPicturePoster];return this.props.poster&&(e={backgroundImage:this.props.isChangingSource?"":"url("+this.props.poster+")",backgroundSize:"contain"},t.push(pr.a.hasPoster)),N("div",null,N("div",{className:pr.a.pictureInPictureOverlay},N("div",{className:t.join(" "),style:e,onMouseOver:function(e){return e.stopPropagation()}},N("div",{className:pr.a.darkLayer})),N("div",{className:pr.a.pictureInPictureControl},N(En,null,N("span",{className:pr.a.pictureInPictureText},N(bn,{id:"pictureInPicture.overlay_text"}))))))}},r}(B))||Fd)||Fd)||Fd);Vd.displayName="PictureInPictureOverlay";var Hd,Kd=Ni({allowSidePanels:!0,allowPlayerArea:!0})(Bd=Fs("Playback")(Bd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.updateIsKeyboardEnabled(!0)},i.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(Io,null),N(bd,null),N(oo,null,N(j,null,N(Rc,null),N(no,null),N(sc,null),N(Vd,null),N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls}),N(Ep,null),N(Ko,null),N(ep,null)),(function(e){var t=e.containerRef;return N(j,null,N(Sc,null),N(_d,null,N(Nc,null),N(jd,null)),N(tu,{leftControls:N(j,null,N(Sp,{name:"BottomBarPlaybackControls",showPreview:!0}),N(ps,{step:10}),N(ms,{step:10}),N(kc,{format:"current / total"})),rightControls:N(j,null,N(Pl,null),N(Sl,null),N(Rl,null),N(ml,null),N(qs,null),N(wp,null),N(rl,null),N(Bc,null))},N(Od,{showFramePreview:!0,showTimeBubble:!0,playerContainer:t})))})))))},r}(B))||Bd)||Bd;function Gd(e){return N(Kd,e)}Kd.displayName="Playback";var zd=$t((function(e){return{isBumper:e.engine.adIsBumper}}))(Hd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){return this.props.isBumper?null:N(Bl,null)},r}(B))||Hd;zd.displayName="AdLeftControls";var Wd,Yd=$t((function(e){return{state:{shell:e.shell,engine:{adIsLinear:e.engine.adIsLinear,adContentType:e.engine.adContentType}}}}))(Fs("Ads")((function(e,t){if(e.updateIsKeyboardEnabled(!0),function(e,t){var n=e.state.shell.isMobile&&!t.player.env.isIPadOS,r=!1;try{var i=t.player.config.plugins.ima.adsRenderingSettings;r=i&&i.useStyledLinearAds}catch(e){}return n||r}(e,t))return N("div",{className:pr.a.adGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(oo,null,N(j,null,N(no,null),N(Rc,{hasTopBar:!0})),N(j,null,N(Sc,{disabled:!0,leftControls:N(zd,null)}))))));var n=!1,r=!1,i=N(tu,{leftControls:N(j,null,N(Sp,{name:"BottomBarPlaybackControls",showPreview:!0}),N(bc,null)),rightControls:N(j,null,N(Sl,null),N(rl,null))}),a=N(tu,{rightControls:N(j,null,N(rl,null))});return N("div",{className:pr.a.adGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(oo,null,N(j,null,N(no,null),N(Rc,{hasTopBar:!0}),r?N(jl,null):void 0,N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls})),N(j,null,N(Sc,{disabled:!0,leftControls:N(zd,null),rightControls:n?N(Nl,null):void 0}),function(e){var t=e.state.engine,n=t.adIsLinear,r=t.adContentType;return!(n&&r&&!r.startsWith("video"))}(e)?i:a)))))})));function qd(e){return N(Yd,e)}function Xd(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N(oo,null,N(j,null,N(Ju,null)))))}function $d(e){return N(Xd,e)}Yd.displayName="Ads",Xd.displayName="Error";var Qd,Zd=Ni({allowSidePanels:!0,allowPlayerArea:!0})(Wd=Fs("Live")(Wd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.updateIsKeyboardEnabled(!0)},i.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(Io,null),N(bd,null),N(oo,null,N(j,null,N(no,null),N(sc,null),N(Vd,null),N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls}),N(Ko,null),N(ep,null)),(function(e){var t=e.containerRef;return N(j,null,N(Sc,null),N(_d,null,N(Nc,null),N(Rc,null)),N(tu,{leftControls:N(j,null,N(Sp,{name:"BottomBarPlaybackControls",showPreview:!0}),N(ps,{step:10}),N(ms,{step:10}),N(nc,null)),rightControls:N(j,null,N(Pl,null),N(Sl,null),N(Rl,null),N(ml,null),N(qs,null),N(wp,null),N(rl,null),N(Bc,null))},N(cc,{showFramePreview:!0,showTimeBubble:!0,playerContainer:t})))})))))},r}(B))||Wd)||Wd;function Jd(e){return N(Zd,e)}Zd.displayName="Live";var ef,tf=Ni({allowSidePanels:!0,allowPlayerArea:!0})(Qd=Fs("Img")(Qd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.updateIsKeyboardEnabled(!0)},i.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(bd,null),N(oo,null,N(j,null,N(Rc,null),N(no,null),N(sc,null),N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls}),N(ep,null)),(function(){return N(j,null,N(Sc,null),N(_d,null,N(Nc,null)),N(tu,{rightControls:N(j,null,N(Pl,null),N(qs,null),N(rl,null),N(Bc,null))}))})))))},r}(B))||Qd)||Qd;function nf(e){return N(tf,e)}tf.displayName="Img";var rf=function(e,t){return function(){for(var e=arguments.length,t=new Array(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n>16&255,r>>8&255,255&r]}(e))}(t),p=c[0],d=c[1],f=c[2];null==(n=this.playerContainerElement)||null==(r=n.querySelector("."+pr.a.player))||r.style.setProperty("--playkit-{name}-color".replace("{name}",e),t),null==(i=this.playerContainerElement)||null==(a=i.querySelector("."+pr.a.player))||a.style.setProperty("--playkit-{name}-hsl-hue".replace("{name}",e),Math.round(p)+"deg"),null==(o=this.playerContainerElement)||null==(s=o.querySelector("."+pr.a.player))||s.style.setProperty("--playkit-{name}-hsl-saturation".replace("{name}",e),Math.round(d)+"%"),null==(l=this.playerContainerElement)||null==(u=l.querySelector("."+pr.a.player))||u.style.setProperty("--playkit-{name}-hsl-lightness".replace("{name}",e),Math.round(f)+"%")},t.setColor=function(e,t){var n,r;null==(n=this.playerContainerElement)||null==(r=n.querySelector("."+pr.a.player))||r.style.setProperty(e,t)},t.setSvgFillColor=function(e){for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return af(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?af(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(lf);!(t=n()).done;){var r,i,a,o=t.value,s=getComputedStyle(null==(r=this.playerContainerElement)?void 0:r.querySelector("."+pr.a.player)).getPropertyValue(o),l=e.replace("#","%23");null==(i=this.playerContainerElement)||null==(a=i.querySelector("."+pr.a.player))||a.style.setProperty(o,s.replace(/fill='%23([a-f0-9]{3}){1,2}\b'/,"fill='"+l+"'"))}},e}();function cf(e,t){for(var n=0;n0)this._buildUI(e);else{var t=[{template:function(e){return Gd(e)}}];this._buildUI(t)}this._themesManager.applyUserTheme()},r._setLocaleTranslations=function(e){var t=this;e.translations&&Object.entries(e.translations).forEach((function(e){var n=e[0],r=e[1];r=Cn({},t._translations.en,r),t._translations[n]=r})),e.locale&&this._translations[e.locale]&&(this._locale=e.locale)},r._createStore=function(e){var t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Ut;this.store=Pt(Sa,t(rf(this.player,e)))},r._buildUI=function(e){var t=this;this.player&&(this.container=document.getElementById(this.targetId),this.container&&ne(N(ut,{store:this.store},N(Li,{uiComponents:this._uiComponents,setApi:function(e){e&&(t.addComponent=e)}},N(pn,{definition:this._translations[this._locale]},N(Ar,{player:this.player},N(Jr,{player:this.player,store:this.store},N(Ps,{playerContainer:this.container},N(ki,null,N(Ra,null),N(Ma,null),N(Ja,{uis:e,playerContainer:this.container})))))))),this.container))},r.destroy=function(){this.container&&(this.container.prepend(this.player.getView()),ne("",this.container))},r.getLogLevel=function(e){return function(e){return Pn(e).getLevel()}(e)},r.setLogLevel=function(e,t){!function(e,t){Pn(t).setLevel(e)}(e,t)},t=e,(n=[{key:"config",get:function(){return function e(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,r){("object"==typeof t&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[r]=e(t))})):"object"==typeof t?(n=Object.assign({},t),Object.keys(n).forEach((function(t){("object"==typeof n[t]&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))}))):n=t,n}(this.store.getState().config)}},{key:"LogLevel",get:function(){return In}},{key:"Event",get:function(){return On}}])&&cf(t.prototype,n),e}(),ff=On,hf="0.77.3-canary.0-6bce5fb",gf="@playkit-js/playkit-js-ui"}])},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(10),i=n(30);e.exports=n(9)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(47),i=n(26);e.exports=function(e){return r(i(e))}},function(e,t,n){"use strict";var r=n(3);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){var r=n(20);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(48),i=n(30),a=n(17),o=n(28),s=n(15),l=n(93),u=Object.getOwnPropertyDescriptor;t.f=n(9)?u:function(e,t){if(e=a(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(1),i=n(8),a=n(3);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*a((function(){n(1)})),"Object",o)}},function(e,t,n){var r=n(19),i=n(47),a=n(11),o=n(7),s=n(109);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,p=6==e,d=5==e||p,f=t||s;return function(t,s,h){for(var g,y,v=a(t),m=i(v),b=r(s,h,3),_=o(m.length),E=0,k=n?f(t,_):l?f(t,0):void 0;_>E;E++)if((d||E in m)&&(y=b(g=m[E],E,v),e))if(n)k[E]=y;else if(y)switch(e){case 3:return!0;case 5:return g;case 6:return E;case 2:k.push(g)}else if(c)return!1;return p?-1:u||c?c:k}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";if(n(9)){var r=n(32),i=n(2),a=n(3),o=n(1),s=n(62),l=n(88),u=n(19),c=n(44),p=n(30),d=n(16),f=n(45),h=n(21),g=n(7),y=n(120),v=n(34),m=n(28),b=n(15),_=n(49),E=n(5),k=n(11),T=n(80),A=n(35),w=n(37),S=n(36).f,C=n(82),x=n(31),I=n(6),P=n(24),D=n(52),R=n(50),O=n(84),L=n(42),M=n(55),N=n(43),U=n(83),F=n(111),j=n(10),B=n(22),V=j.f,H=B.f,K=i.RangeError,G=i.TypeError,z=i.Uint8Array,W=Array.prototype,Y=l.ArrayBuffer,q=l.DataView,X=P(0),$=P(2),Q=P(3),Z=P(4),J=P(5),ee=P(6),te=D(!0),ne=D(!1),re=O.values,ie=O.keys,ae=O.entries,oe=W.lastIndexOf,se=W.reduce,le=W.reduceRight,ue=W.join,ce=W.sort,pe=W.slice,de=W.toString,fe=W.toLocaleString,he=I("iterator"),ge=I("toStringTag"),ye=x("typed_constructor"),ve=x("def_constructor"),me=s.CONSTR,be=s.TYPED,_e=s.VIEW,Ee=P(1,(function(e,t){return Se(R(e,e[ve]),t)})),ke=a((function(){return 1===new z(new Uint16Array([1]).buffer)[0]})),Te=!!z&&!!z.prototype.set&&a((function(){new z(1).set({})})),Ae=function(e,t){var n=h(e);if(n<0||n%t)throw K("Wrong offset!");return n},we=function(e){if(E(e)&&be in e)return e;throw G(e+" is not a typed array!")},Se=function(e,t){if(!E(e)||!(ye in e))throw G("It is not a typed array constructor!");return new e(t)},Ce=function(e,t){return xe(R(e,e[ve]),t)},xe=function(e,t){for(var n=0,r=t.length,i=Se(e,r);r>n;)i[n]=t[n++];return i},Ie=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Pe=function(e){var t,n,r,i,a,o,s=k(e),l=arguments.length,c=l>1?arguments[1]:void 0,p=void 0!==c,d=C(s);if(null!=d&&!T(d)){for(o=d.call(s),r=[],t=0;!(a=o.next()).done;t++)r.push(a.value);s=r}for(p&&l>2&&(c=u(c,arguments[2],2)),t=0,n=g(s.length),i=Se(this,n);n>t;t++)i[t]=p?c(s[t],t):s[t];return i},De=function(){for(var e=0,t=arguments.length,n=Se(this,t);t>e;)n[e]=arguments[e++];return n},Re=!!z&&a((function(){fe.call(new z(1))})),Oe=function(){return fe.apply(Re?pe.call(we(this)):we(this),arguments)},Le={copyWithin:function(e,t){return F.call(we(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Z(we(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return U.apply(we(this),arguments)},filter:function(e){return Ce(this,$(we(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return J(we(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(we(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){X(we(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(we(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(we(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(we(this),arguments)},lastIndexOf:function(e){return oe.apply(we(this),arguments)},map:function(e){return Ee(we(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(we(this),arguments)},reduceRight:function(e){return le.apply(we(this),arguments)},reverse:function(){for(var e,t=we(this).length,n=Math.floor(t/2),r=0;r1?arguments[1]:void 0)},sort:function(e){return ce.call(we(this),e)},subarray:function(e,t){var n=we(this),r=n.length,i=v(e,r);return new(R(n,n[ve]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,g((void 0===t?r:v(t,r))-i))}},Me=function(e,t){return Ce(this,pe.call(we(this),e,t))},Ne=function(e){we(this);var t=Ae(arguments[1],1),n=this.length,r=k(e),i=g(r.length),a=0;if(i+t>n)throw K("Wrong length!");for(;a255?255:255&r),i.v[f](n*t+i.o,r,ke)}(this,n,e)},enumerable:!0})};b?(h=n((function(e,n,r,i){c(e,h,u,"_d");var a,o,s,l,p=0,f=0;if(E(n)){if(!(n instanceof Y||"ArrayBuffer"==(l=_(n))||"SharedArrayBuffer"==l))return be in n?xe(h,n):Pe.call(h,n);a=n,f=Ae(r,t);var v=n.byteLength;if(void 0===i){if(v%t)throw K("Wrong length!");if((o=v-f)<0)throw K("Wrong length!")}else if((o=g(i)*t)+f>v)throw K("Wrong length!");s=o/t}else s=y(n),a=new Y(o=s*t);for(d(e,"_d",{b:a,o:f,l:o,e:s,v:new q(a)});pdocument.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[a[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(95),i=n(67).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(15),i=n(11),a=n(66)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){var r=n(6)("unscopables"),i=Array.prototype;null==i[r]&&n(16)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(5);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var r=n(10).f,i=n(15),a=n(6)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){var r=n(1),i=n(26),a=n(3),o=n(70),s="["+o+"]",l=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),c=function(e,t,n){var i={},s=a((function(){return!!o[e]()||"​…"!="​…"[e]()})),l=i[e]=s?t(p):o[e];n&&(i[n]=l),r(r.P+r.F*s,"String",i)},p=c.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(u,"")),e};e.exports=c},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(9),o=n(6)("species");e.exports=function(e){var t=r[e];a&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(12);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),window._babelPolyfill||n(126);var r,i,a,o=function(){function e(){}return e.register=function(t){e._polyfills.push(t)},e.installAll=function(){for(var t=0;tc;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(25);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(6)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(4);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(49),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";n(113);var r=n(12),i=n(16),a=n(3),o=n(26),s=n(6),l=n(85),u=s("species"),c=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),p=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=s(e),f=!a((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),h=f?!a((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[u]=function(){return n}),n[d](""),!t})):void 0;if(!f||!h||"replace"===e&&!c||"split"===e&&!p){var g=/./[d],y=n(o,d,""[e],(function(e,t,n,r,i){return t.exec===l?f&&!i?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=y[0],m=y[1];r(String.prototype,e,v),i(RegExp.prototype,d,2==t?function(e,t){return m.call(e,this,t)}:function(e){return m.call(e,this)})}}},function(e,t,n){var r=n(19),i=n(108),a=n(80),o=n(4),s=n(7),l=n(82),u={},c={};(t=e.exports=function(e,t,n,p,d){var f,h,g,y,v=d?function(){return e}:l(e),m=r(n,p,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(a(v)){for(f=s(e.length);f>b;b++)if((y=t?m(o(h=e[b])[0],h[1]):m(e[b]))===u||y===c)return y}else for(g=v.call(e);!(h=g.next()).done;)if((y=i(g,m,h.value,t))===u||y===c)return y}).BREAK=u,t.RETURN=c},function(e,t,n){var r=n(2).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(2),i=n(1),a=n(12),o=n(45),s=n(29),l=n(59),u=n(44),c=n(5),p=n(3),d=n(55),f=n(40),h=n(71);e.exports=function(e,t,n,g,y,v){var m=r[e],b=m,_=y?"set":"add",E=b&&b.prototype,k={},T=function(e){var t=E[e];a(E,e,"delete"==e||"has"==e?function(e){return!(v&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(v||E.forEach&&!p((function(){(new b).entries().next()})))){var A=new b,w=A[_](v?{}:-0,1)!=A,S=p((function(){A.has(1)})),C=d((function(e){new b(e)})),x=!v&&p((function(){for(var e=new b,t=5;t--;)e[_](t,t);return!e.has(-0)}));C||((b=t((function(t,n){u(t,b,e);var r=h(new m,t,b);return null!=n&&l(n,y,r[_],r),r}))).prototype=E,E.constructor=b),(S||x)&&(T("delete"),T("has"),y&&T("get")),(x||w)&&T(_),v&&E.clear&&delete E.clear}else b=g.getConstructor(t,e,y,_),o(b.prototype,n),s.NEED=!0;return f(b,e),k[e]=b,i(i.G+i.W+i.F*(b!=m),k),v||g.setStrong(b,e,y),b}},function(e,t,n){for(var r,i=n(2),a=n(16),o=n(31),s=o("typed_array"),l=o("view"),u=!(!i.ArrayBuffer||!i.DataView),c=u,p=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");p<9;)(r=i[d[p++]])?(a(r.prototype,s,!0),a(r.prototype,l,!0)):c=!1;e.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:l}},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function e(t,n,r,i){void 0===i&&(i={}),this.severity=t,this.category=n,this.code=r,this.data=i,e._logger.error("Category:"+n+" | Code:"+r+" |",i)};i(a,"Severity",{RECOVERABLE:1,CRITICAL:2}),i(a,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),i(a,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),i(a,"_logger",Object(r.b)("Error"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(8);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(){this.metadata=new Map,this.sources=new r.a,this.type=e.Type.UNKNOWN}return e.prototype.toJSON=function(){return{id:this.id,name:this.name,sources:this.sources.toJSON(),duration:this.duration,dvrStatus:this.dvrStatus,status:this.status,metadata:this.metadata,type:this.type,poster:this.poster,assetReferenceType:this.assetReferenceType}},e}();i(a,"Type",{VOD:"Vod",LIVE:"Live",IMAGE:"Image",AUDIO:"Audio",UNKNOWN:"Unknown"}),i(a,"DvrStatus",{ON:1,OFF:0})},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return i}));var r={get:function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}}},i={};function a(e){e&&"function"==typeof e.getLogger&&(r.get=e.getLogger),e&&e.LogLevel&&(i=e.LogLevel)}function o(e){return r.get(e)}function s(e){return o(e).getLevel()}function l(e,t){o(t).setLevel(e)}t.b=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(e){void 0===e&&(e=new Map),i(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),i(this,"_attemptCounter",1),this.headers=e}var t=e.prototype;return t.getUrl=function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")},t.doHttpRequest=function(){var e=this,t=new Promise((function(t,n){e._requestPromise={resolve:t,reject:n}}));return this.url||this._requestPromise.reject(new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,r.a.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t},t._createXHR=function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var n=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(n)}catch(n){e._requestPromise.reject(e._createError(t,r.a.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var n=performance.now();t.ontimeout=function(){e._handleError(t,r.a.Code.TIMEOUT,{timeout:(performance.now()-n)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,r.a.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,n){t.setRequestHeader(n,e)})),t.send(this.params)},t._getResponseHeaders=function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))},t._handleError=function(e,t,n){var r=this._createError(e,t,n);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter0&&(e.drmData=[],this.drmData.forEach((function(t){Array.isArray(e.drmData)&&e.drmData.push(t.toJSON())}))),e},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n(11);var r=n(0);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(e){i(this,"_loadersResponseMap",new Map),i(this,"_loaders",new Map),this._networkRetryConfig=e}var t=e.prototype;return t.add=function(e,t,n){var r=this,i=new e(t);if(i.isValid()){this._loaders.set(e.id,i);var a=this._multiRequest.requests.length,o=i.requests;this._multiRequest.retryConfig=this._networkRetryConfig,o.forEach((function(e){e.params=e.params||{},e.params.ks=e.params.ks||n,r._multiRequest.add(e)}));var s=Array.from(new Array(o.length),(function(e,t){return t+a}));this._loadersResponseMap.set(e.id,s)}},t.fetchData=function(e){var t=this;return new Promise((function(n,i){t._multiRequest.execute(e).then((function(e){t._multiResponse=e.response,t.prepareData(e.response).success?n(t._loaders):i(new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,r.a.Code.API_RESPONSE_MISMATCH,{headers:e.headers}))}),(function(e){i(e)}))}))},t.prepareData=function(e){var t=this;return this._loaders.forEach((function(n,r){var i=t._loadersResponseMap.get(r);try{i&&i.length>0&&(n.response=e.results.slice(i[0],i[i.length-1]+1))}catch(e){return{success:!1,error:e}}})),{success:!0,data:this._loaders}},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(3),i=n(2),a=n(4),o=n(0);function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i0?t.slice(0):[]).forEach((function(t,r){("object"==typeof t&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[r]=e(t))})):"object"==typeof t?(n=Object.assign({},t),Object.keys(n).forEach((function(t){("object"==typeof n[t]&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))}))):n=t,n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n(1);var r=function(){this.items=[]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){this.url=e.url,this.clickThroughUrl=e.clickThroughUrl}},function(e,t,n){"use strict";n.r(t),n.d(t,"Provider",(function(){return ke})),n.d(t,"ProviderParser",(function(){return K})),n.d(t,"NAME",(function(){return Te})),n.d(t,"VERSION",(function(){return Ae})),n.d(t,"RequestBuilder",(function(){return G.a})),n.d(t,"ResponseTypes",(function(){return r}));var r={};n.r(r),n.d(r,"KalturaBaseEntryListResponse",(function(){return $})),n.d(r,"KalturaMediaEntry",(function(){return S})),n.d(r,"KalturaAccessControlModifyRequestHostRegexAction",(function(){return y})),n.d(r,"KalturaBumper",(function(){return m})),n.d(r,"KalturaFlavorAsset",(function(){return v})),n.d(r,"KalturaMediaEntries",(function(){return oe})),n.d(r,"KalturaMetadata",(function(){return T})),n.d(r,"KalturaMetadataListResponse",(function(){return A})),n.d(r,"KalturaPlaybackContext",(function(){return E})),n.d(r,"KalturaPlaybackSource",(function(){return h})),n.d(r,"KalturaPlaylist",(function(){return ae})),n.d(r,"KalturaRuleAction",(function(){return g})),n.d(r,"KalturaUIConfResponse",(function(){return ye})),n.d(r,"KalturaDrmPlaybackPluginData",(function(){return f.a})),n.d(r,"KalturaAccessControlMessage",(function(){return d.a})),n.d(r,"BaseServiceResult",(function(){return p.a}));var i,a,o,s=n(2),l=n(15),u={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0,loadThumbnailWithKs:!1,replaceHostOnlyManifestUrls:!1},c=function(){function e(){}return e.set=function(e){e&&Object.assign(u,e)},e.get=function(){return Object(l.a)(u)},e}(),p=n(4),d=n(7),f=n(6),h=function(){function e(e){var t,n=this;t=[],"drm"in this?Object.defineProperty(this,"drm",{value:t,enumerable:!0,configurable:!0,writable:!0}):this.drm=t,this.format=e.format,this.deliveryProfileId=e.deliveryProfileId,this.url=e.url,this.protocols=e.protocols,this.flavorIds=e.flavorIds,e.drm&&e.drm.map((function(e){return n.drm.push(new f.a(e))}))}var t=e.prototype;return t.hasDrmData=function(){return this.drm&&this.drm.length>0},t.hasFlavorIds=function(){return!!this.flavorIds&&this.flavorIds.length>0},t.getProtocol=function(e){var t="";if(this.protocols&&this.protocols.length>0)this.protocols.split(",").forEach((function(n){n===e&&(t=n)}));else if("http"===e)return e;return t},e}(),g=function(e){this.type=e.type};o={DRM_POLICY:"drm.DRM_POLICY",BLOCK:1,PREVIEW:2,LIMIT_FLAVORS:3,ADD_TO_STORAGE:4,LIMIT_DELIVERY_PROFILES:5,SERVE_FROM_REMOTE_SERVER:6,REQUEST_HOST_REGEX:7,LIMIT_THUMBNAIL_CAPTURE:8},(a="Type")in(i=g)?Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[a]=o;var y=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).pattern=t.pattern,n.replacement=t.replacement,n.replacmenServerNodeId=t.replacmenServerNodeId,n.checkAliveTimeoutMs=t.checkAliveTimeoutMs,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(g),v=function(e){this.id=e.id,this.flavorParamsId=e.flavorParamsId,this.fileExt=e.fileExt,this.bitrate=e.bitrate,this.width=e.width,this.height=e.height,this.id=e.id,this.frameRate=e.frameRate,this.isOriginal=e.isOriginal,this.isWeb=e.isWeb,this.containerFormat=e.containerFormat,this.videoCodecId=e.videoCodecId,this.status=e.status,this.language=e.language,this.label=e.label};!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(v,"Status",{ERROR:-1,QUEUED:0,CONVERTING:1,READY:2,DELETED:3,NOT_APPLICABLE:4,TEMP:5,WAIT_FOR_CONVERT:6,IMPORTING:7,VALIDATING:8,EXPORTING:9});var m=function(e){this.entryId=e.entryId,this.clickThroughUrl=e.url,this.sources=e.sources?e.sources.map((function(e){return new h(e)})):[]};function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){var t,n;function r(t){var n;if(_(b(n=e.call(this,t)||this),"sources",[]),_(b(n),"actions",[]),_(b(n),"messages",[]),_(b(n),"flavorAssets",[]),_(b(n),"bumperData",[]),!n.hasError){var r=t.messages;r&&r.map((function(e){return n.messages.push(new d.a(e))}));var i=t.actions;i&&i.map((function(e){e.type===g.Type.REQUEST_HOST_REGEX?n.actions.push(new y(e)):n.actions.push(new g(e))}));var a=t.sources;a&&a.map((function(e){return n.sources.push(new h(e))}));var o=t.flavorAssets;o&&o.map((function(e){return n.flavorAssets.push(new v(e))}));var s=t.bumperData;s&&s.map((function(e){return n.bumperData.push(new m(e))}))}return n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.hasBlockAction=function(){return void 0!==this.getBlockAction()},i.getBlockAction=function(){return this.actions.find((function(e){return e.type===g.Type.BLOCK}))},i.getErrorMessages=function(){return this.messages},i.getRequestHostRegexAction=function(){var e=this.actions.find((function(e){return e.type===g.Type.REQUEST_HOST_REGEX}));if(e instanceof y)return e},r}(p.a);function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T=function(e){this.id=e.id,this.metadataProfileId=e.metadataProfileId,this.metadataProfileVersion=e.metadataProfileVersion,this.metadataProfileId=e.metadataProfileId,this.metadataObjectType=e.metadataObjectType,this.objectId=e.objectId,this.version=e.version,this.created=new Date(0),this.created.setUTCSeconds(e.createdAt),this.updated=new Date(0),this.updated.setUTCSeconds(e.updatedAt),this.status=e.status,this.xml=e.xml};k(T,"ObjectType",{AD_CUE_POINT:"adCuePointMetadata.AdCuePoint",ANNOTATION:"annotationMetadata.Annotation",CODE_CUE_POINT:"codeCuePointMetadata.CodeCuePoint",THUMB_CUE_POINT:"thumbCuePointMetadata.thumbCuePoint",ENTRY:1,CATEGORY:2,USER:3,PARTNER:4,DYNAMIC_OBJECT:5}),k(T,"Status",{VALID:1,INVALID:2,DELETED:3});var A=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.totalCount=t.totalCount,n.totalCount>0&&(n.metas=[],t.objects.map((function(e){return n.metas.push(new T(e))})))),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(p.a);function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=function(e){this.id=e.id,this.referenceId=e.referenceId,this.externalSourceType=e.externalSourceType,this.name=e.name,this.description=e.description,this.dataUrl=e.dataUrl,this.type=e.type,this.entryType=e.mediaType,this.flavorParamsIds=e.flavorParamsIds,this.duration=e.duration,this.poster=e.thumbnailUrl,this.status=e.status,this.dvrStatus=e.dvrStatus,this.tags=e.tags,this.createdAt=e.createdAt,this.endDate=e.endDate};w(S,"EntryType",{AUTOMATIC:{value:-1},EXTERNAL_MEDIA:{value:"externalMedia.externalMedia"},MEDIA_CLIP:{value:1},MIX:{value:2},PLAYLIST:{value:5},DATA:{value:6},LIVE_STREAM:{value:7},LIVE_CHANNEL:{value:8},DOCUMENT:{value:10}}),w(S,"MediaType",{VIDEO:{value:1},IMAGE:{value:2},AUDIO:{value:5},LIVE_STREAM_FLASH:{value:201},LIVE_STREAM_WINDOWS_MEDIA:{value:202},LIVE_STREAM_REAL_MEDIA:{value:203},LIVE_STREAM_QUICK_TIME:{value:204}}),w(S,"EntryStatus",{ERROR_IMPORTING:-2,ERROR_CONVERTING:-1,SCAN_FAILURE:"virusScan.ScanFailure",IMPORT:0,INFECTED:"virusScan.Infected",PRECONVERT:1,READY:2,DELETED:3,PENDING:4,MODERATE:5,BLOCKED:6,NO_CONTENT:7}),w(S,"EntryModerationStatus",{PENDING_MODERATION:1,APPROVED:2,REJECTED:3,FLAGGED_FOR_REVIEW:4,MODERATE:5,AUTO_APPROVED:6});var C=function(){function e(){}return e.build=function(e){var t=c.get(),n=t.serviceUrl.substr(0,t.serviceUrl.lastIndexOf("/")),r=e.partnerId,i=e.entryId,a=e.ks,o=e.uiConfId,s=e.format,l=e.protocol,u=e.extension,p=e.flavorIds;if(!n||isNaN(Number.parseInt(r))||!i||!s||!l)return"";var d=n;return n.endsWith("/")||(d+="/"),d+="p/"+r+"/sp/"+r+"00/playManifest/entryId/"+i+"/protocol/"+l+"/format/"+s,p?d+="/flavorIds/"+p:o&&(d+="/uiConfId/"+o),""!==a&&(d+="/ks/"+a),""!==u&&(d+="/a."+u),o&&""!==p&&(d+="?uiConfId="+o),d},e}(),x=function(){function e(){}return e.xmlToJson=function(e){var t={};if(1===e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n0&&(t.filter((function(e){return!Object(O.c)(e.format)})).forEach((function(t){var s=e._parseAdaptiveSource(t,o,n,r,i,a.id);if(s){var l=O.b.get(t.format);u.map(s,l)}})),s=t.find((function(t){return Object(O.c)(t.format)&&""!==t.getProtocol(e._getBaseProtocol())})),u.progressive=e._parseProgressiveSources(s,o,n,r,i,a.id)),u},e._parseAdaptiveSource=function(t,n,r,i,a,o){var s=new D.a;if(t){var l="",u=O.b.get(t.format),c=t.getProtocol(e._getBaseProtocol()),p=t.deliveryProfileId,d=t.format,h="";if(u&&(h=u.pathExt,s.mimetype=u.mimeType),t.hasFlavorIds()?(!h&&n.flavorAssets&&n.flavorAssets.length>0&&(h=n.flavorAssets[0].fileExt),l=C.build({entryId:o,flavorIds:t.flavorIds,format:d,ks:r,partnerId:i,uiConfId:a,extension:h,protocol:c})):l=e.addKsToUrl(t.url,r),!l){var g="failed to create play url from source, discarding source: ("+o+"_"+p+"), "+d;return e._logger.warn(g),null}if(s.url=l,s.id=o+"_"+p+","+d,t.hasDrmData()){var y=[];t.drm.forEach((function(e){y.push(new P.a(e.licenseURL,f.a.Scheme[e.scheme],e.certificate))})),s.drmData=y}}return s},e._parseProgressiveSources=function(t,n,r,i,a,o){var s=[],l=[];if(t){var u=t.getProtocol(e._getBaseProtocol()),c=t.format,p=t.deliveryProfileId,d=p+","+c;n.flavorAssets.map((function(t){var n=new D.a;n.id=t.id+d,n.mimetype="mp3"===t.fileExt?"audio/mp3":"video/mp4",n.height=t.height,n.width=t.width,n.bandwidth=1024*t.bitrate,n.label=t.label||t.language;var f=C.build({entryId:o,flavorIds:t.id,format:c,ks:r,partnerId:i,uiConfId:a,extension:t.fileExt,protocol:u});if(""===f)return e._logger.warn("failed to create play url from source, discarding source: ("+o+"_"+p+"), "+c+"."),null;n.url=f,t.height&&t.width?s.push(n):l.push(n)}))}return l.length&&!s.length?l:s},e._parseMetadata=function(e){var t={};return e&&e.metas&&e.metas.length>0&&e.metas.forEach((function(e){if(e.xml){var n,r=new DOMParser;e.xml=e.xml.replace(/\r?\n|\r/g,""),e.xml=e.xml.replace(/>\s*/g,">"),e.xml=e.xml.replace(/>\s*/g,">"),n=r.parseFromString(e.xml,"text/xml");var i=x.xmlToJson(n);Object.keys(i.metadata).forEach((function(e){t[e]=i.metadata[e]["#text"]}))}})),t},e._getBaseProtocol=function(){var e=c.get(),t=/^https?:/.exec(e.cdnUrl),n=t?t[0]:document.location.protocol;return"string"==typeof n?n.slice(0,-1):"https"},e.hasBlockAction=function(e){return e.playBackContextResult.hasBlockAction()},e.getBlockAction=function(e){return e.playBackContextResult.getBlockAction()},e.getErrorMessages=function(e){return e.playBackContextResult.getErrorMessages()},e}();!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(V,"_logger",Object(s.b)("OVPProviderParser"));var H=V.addKsToUrl,K=V,G=n(3),z=n(11),W=function(){function e(){}return e.getMultiRequest=function(e,t,n){var r=c.get(),i=r.serviceParams;Object.assign(i,{ks:t,clientTag:"html5:v"+e}),n&&Object.assign(i,{partnerId:n});var a=new Map;a.set("Content-Type","application/json");var o=new z.a(a);return o.method="POST",o.service="multirequest",o.url=o.getUrl(r.serviceUrl),o.params=i,o},e}(),Y=function e(t){void 0===t&&(t={}),this.type=t.type||e.Type.INCLUDE_FIELDS,this.fields=t.fields||"id,referenceId,name,description,thumbnailUrl,dataUrl,duration,msDuration,flavorParamsIds,mediaType,type,tags,dvrStatus,externalSourceType,status,createdAt,endDate"};!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Y,"Type",{INCLUDE_FIELDS:1,EXCLUDE_FIELDS:2});var q=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.getPlaybackContext=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new G.a(r);return i.service="baseEntry",i.action="getPlaybackContext",i.method="POST",i.url=i.getUrl(e),i.tag="baseEntry-getPlaybackContext",i.params={entryId:n,ks:t,contextDataParams:{objectType:"KalturaContextDataParams",flavorTags:"all"}},i},r.list=function(e,t,n,i,a){var o=new Map;o.set("Content-Type","application/json");var s=new G.a(o);return s.service="baseEntry",s.action="list",s.method="POST",s.url=s.getUrl(e),s.tag="list",s.params=r.getEntryListReqParams(n,t,i,a),s},r.getEntryListReqParams=function(e,t,n,r){var i={};return e?i=n?{redirectFromEntryId:e}:{idEqual:e}:r&&(i={objectType:"KalturaBaseEntryFilter",referenceIdEqual:r}),{ks:t,filter:i,responseProfile:new Y}},r}(W),X=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.list=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new G.a(r);i.service="metadata_metadata",i.action="list",i.method="POST",i.url=i.getUrl(e),i.tag="metadata_metadata-list";var a={objectType:"KalturaMetadataFilter",objectIdEqual:n,metadataObjectTypeEqual:"1"};return i.params={filter:a,ks:t},i},r}(W),$=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.totalCount=t.totalCount,n.totalCount>0&&(n.entries=[],t.objects.map((function(e){return n.entries.push(new S(e))})))),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(p.a);function Q(e,t){for(var n=0;n0,!t.t1){t.next=10;break}return t.next=9,e._isECDNUrlAlive(a,i.replace(o,a.replacement));case 9:t.t1=!t.sent;case 10:t.t0=!t.t1;case 11:if(!t.t0){t.next=14;break}return e._replaceHostUrls(n,a),t.abrupt("return",n);case 14:return e._logger.debug("exiting handleRegexAction - not applying regex action."),t.abrupt("return",n);case 16:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e._replaceHostUrls=function(t,n){e._logger.debug("Starting to modify urls...");var r=t.sources,i=r.hls,a=r.dash,o=r.progressive,s=r.image;[].concat(i,a,o,s).forEach((function(t){return t.url=e._applyRegexAction(n,t.url)})),c.get().replaceHostOnlyManifestUrls||(e._logger.debug("replaceHostOnlyManifestUrls flag is off - modifying captions and poster URLs"),r.captions&&r.captions.forEach((function(t){return t.url=e._applyRegexAction(n,t.url)})),"string"==typeof r.poster&&(r.poster=e._applyRegexAction(n,r.poster))),e._logger.debug("Finished modifying urls")},e._extractRegexActionFromData=function(e){var t,n;return null==(t=e.get(J.id))||null==(n=t.response)?void 0:n.playBackContextResult.getRequestHostRegexAction()},e._getRegExp=function(e){if(e&&e.pattern&&e.replacement)return new RegExp(e.pattern,"i")},e}();!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(be,"_logger",Object(s.b)("RegexActionHandler"));var _e=be;function Ee(e,t){for(var n=0;n0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(21),i=n(26);e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(32),i=n(1),a=n(12),o=n(16),s=n(42),l=n(107),u=n(40),c=n(37),p=n(6)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,h,g,y,v){l(n,t,h);var m,b,_,E=function(e){if(!d&&e in w)return w[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",T="values"==g,A=!1,w=e.prototype,S=w[p]||w["@@iterator"]||g&&w[g],C=S||E(g),x=g?T?E("entries"):C:void 0,I="Array"==t&&w.entries||S;if(I&&(_=c(I.call(new e)))!==Object.prototype&&_.next&&(u(_,k,!0),r||"function"==typeof _[p]||o(_,p,f)),T&&S&&"values"!==S.name&&(A=!0,C=function(){return S.call(this)}),r&&!v||!d&&!A&&w[p]||o(w,p,C),s[t]=C,s[k]=f,g)if(m={values:T?C:E("values"),keys:y?C:E("keys"),entries:x},v)for(b in m)b in w||a(w,b,m[b]);else i(i.P+i.F*(d||A),t,m);return m}},function(e,t,n){var r=n(78),i=n(26);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(5),i=n(25),a=n(6)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(6)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var r=n(42),i=n(6)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,t,n){"use strict";var r=n(10),i=n(30);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(49),i=n(6)("iterator"),a=n(42);e.exports=n(8).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,t,n){"use strict";var r=n(11),i=n(34),a=n(7);e.exports=function(e){for(var t=r(this),n=a(t.length),o=arguments.length,s=i(o>1?arguments[1]:void 0,n),l=o>2?arguments[2]:void 0,u=void 0===l?n:i(l,n);u>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(38),i=n(112),a=n(42),o=n(17);e.exports=n(76)(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r,i,a=n(56),o=RegExp.prototype.exec,s=String.prototype.replace,l=o,u=(r=/a/,i=/b*/g,o.call(r,"a"),o.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(u||c)&&(l=function(e){var t,n,r,i,l=this;return c&&(n=new RegExp("^"+l.source+"$(?!\\s)",a.call(l))),u&&(t=l.lastIndex),r=o.call(l,e),u&&r&&(l.lastIndex=l.global?r.index+r[0].length:t),c&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;in;)t.push(arguments[n++]);return v[++y]=function(){s("function"==typeof e?e:Function(e),t)},r(y),y},f=function(e){delete v[e]},"process"==n(25)(p)?r=function(e){p.nextTick(o(m,e,1))}:g&&g.now?r=function(e){g.now(o(m,e,1))}:h?(a=(i=new h).port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),m.call(e)}}:function(e){setTimeout(o(m,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,n){"use strict";var r=n(2),i=n(9),a=n(32),o=n(62),s=n(16),l=n(45),u=n(3),c=n(44),p=n(21),d=n(7),f=n(120),h=n(36).f,g=n(10).f,y=n(83),v=n(40),m=r.ArrayBuffer,b=r.DataView,_=r.Math,E=r.RangeError,k=r.Infinity,T=m,A=_.abs,w=_.pow,S=_.floor,C=_.log,x=_.LN2,I=i?"_b":"buffer",P=i?"_l":"byteLength",D=i?"_o":"byteOffset";function R(e,t,n){var r,i,a,o=new Array(n),s=8*n-t-1,l=(1<>1,c=23===t?w(2,-24)-w(2,-77):0,p=0,d=e<0||0===e&&1/e<0?1:0;for((e=A(e))!=e||e===k?(i=e!=e?1:0,r=l):(r=S(C(e)/x),e*(a=w(2,-r))<1&&(r--,a*=2),(e+=r+u>=1?c/a:c*w(2,1-u))*a>=2&&(r++,a/=2),r+u>=l?(i=0,r=l):r+u>=1?(i=(e*a-1)*w(2,t),r+=u):(i=e*w(2,u-1)*w(2,t),r=0));t>=8;o[p++]=255&i,i/=256,t-=8);for(r=r<0;o[p++]=255&r,r/=256,s-=8);return o[--p]|=128*d,o}function O(e,t,n){var r,i=8*n-t-1,a=(1<>1,s=i-7,l=n-1,u=e[l--],c=127&u;for(u>>=7;s>0;c=256*c+e[l],l--,s-=8);for(r=c&(1<<-s)-1,c>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===c)c=1-o;else{if(c===a)return r?NaN:u?-k:k;r+=w(2,t),c-=o}return(u?-1:1)*r*w(2,c-t)}function L(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function M(e){return[255&e]}function N(e){return[255&e,e>>8&255]}function U(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function F(e){return R(e,52,8)}function j(e){return R(e,23,4)}function B(e,t,n){g(e.prototype,t,{get:function(){return this[n]}})}function V(e,t,n,r){var i=f(+n);if(i+t>e[P])throw E("Wrong index!");var a=e[I]._b,o=i+e[D],s=a.slice(o,o+t);return r?s:s.reverse()}function H(e,t,n,r,i,a){var o=f(+n);if(o+t>e[P])throw E("Wrong index!");for(var s=e[I]._b,l=o+e[D],u=r(+i),c=0;cW;)(K=z[W++])in m||s(m,K,T[K]);a||(G.constructor=m)}var Y=new b(new m(2)),q=b.prototype.setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||l(b.prototype,{setInt8:function(e,t){q.call(this,e,t<<24>>24)},setUint8:function(e,t){q.call(this,e,t<<24>>24)}},!0)}else m=function(e){c(this,m,"ArrayBuffer");var t=f(e);this._b=y.call(new Array(t),0),this[P]=t},b=function(e,t,n){c(this,b,"DataView"),c(e,m,"DataView");var r=e[P],i=p(t);if(i<0||i>r)throw E("Wrong offset!");if(i+(n=void 0===n?r-i:d(n))>r)throw E("Wrong length!");this[I]=e,this[D]=i,this[P]=n},i&&(B(m,"byteLength","_l"),B(b,"buffer","_b"),B(b,"byteLength","_l"),B(b,"byteOffset","_o")),l(b.prototype,{getInt8:function(e){return V(this,1,e)[0]<<24>>24},getUint8:function(e){return V(this,1,e)[0]},getInt16:function(e){var t=V(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=V(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return L(V(this,4,e,arguments[1]))},getUint32:function(e){return L(V(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return O(V(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return O(V(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){H(this,1,e,M,t)},setUint8:function(e,t){H(this,1,e,M,t)},setInt16:function(e,t){H(this,2,e,N,t,arguments[2])},setUint16:function(e,t){H(this,2,e,N,t,arguments[2])},setInt32:function(e,t){H(this,4,e,U,t,arguments[2])},setUint32:function(e,t){H(this,4,e,U,t,arguments[2])},setFloat32:function(e,t){H(this,4,e,j,t,arguments[2])},setFloat64:function(e,t){H(this,8,e,F,t,arguments[2])}});v(m,"ArrayBuffer"),v(b,"DataView"),s(b.prototype,o.VIEW,!0),t.ArrayBuffer=m,t.DataView=b},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(125)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=!n(9)&&!n(3)((function(){return 7!=Object.defineProperty(n(64)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(2),i=n(8),a=n(32),o=n(65),s=n(10).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t,n){var r=n(15),i=n(17),a=n(52)(!1),o=n(66)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),l=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(u,n)||u.push(n));return u}},function(e,t,n){var r=n(10),i=n(4),a=n(33);e.exports=n(9)?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){var r=n(17),i=n(36).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return i(e)}catch(e){return o.slice()}}(e):i(r(e))}},function(e,t,n){"use strict";var r=n(9),i=n(33),a=n(53),o=n(48),s=n(11),l=n(47),u=Object.assign;e.exports=!u||n(3)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r}))?function(e,t){for(var n=s(e),u=arguments.length,c=1,p=a.f,d=o.f;u>c;)for(var f,h=l(arguments[c++]),g=p?i(h).concat(p(h)):i(h),y=g.length,v=0;y>v;)f=g[v++],r&&!d.call(h,f)||(n[f]=h[f]);return n}:u},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(20),i=n(5),a=n(101),o=[].slice,s={},l=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i>>0||(o.test(n)?16:10))}:r},function(e,t,n){var r=n(2).parseFloat,i=n(41).trim;e.exports=1/r(n(70)+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(25);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(5),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){"use strict";var r=n(35),i=n(30),a=n(40),o={};n(16)(o,n(6)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(4);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},function(e,t,n){var r=n(220);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(20),i=n(11),a=n(47),o=n(7);e.exports=function(e,t,n,s,l){r(t);var u=i(e),c=a(u),p=o(u.length),d=l?p-1:0,f=l?-1:1;if(n<2)for(;;){if(d in c){s=c[d],d+=f;break}if(d+=f,l?d<0:p<=d)throw TypeError("Reduce of empty array with no initial value")}for(;l?d>=0:p>d;d+=f)d in c&&(s=t(s,c[d],d,u));return s}},function(e,t,n){"use strict";var r=n(11),i=n(34),a=n(7);e.exports=[].copyWithin||function(e,t){var n=r(this),o=a(n.length),s=i(e,o),l=i(t,o),u=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===u?o:i(u,o))-l,o-s),p=1;for(l0;)l in n?n[s]=n[l]:delete n[s],s+=p,l+=p;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(85);n(1)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){n(9)&&"g"!=/./g.flags&&n(10).f(RegExp.prototype,"flags",{configurable:!0,get:n(56)})},function(e,t,n){"use strict";var r,i,a,o,s=n(32),l=n(2),u=n(19),c=n(49),p=n(1),d=n(5),f=n(20),h=n(44),g=n(59),y=n(50),v=n(87).set,m=n(240)(),b=n(116),_=n(241),E=n(60),k=n(117),T=l.TypeError,A=l.process,w=A&&A.versions,S=w&&w.v8||"",C=l.Promise,x="process"==c(A),I=function(){},P=i=b.f,D=!!function(){try{var e=C.resolve(1),t=(e.constructor={})[n(6)("species")]=function(e){e(I,I)};return(x||"function"==typeof PromiseRejectionEvent)&&e.then(I)instanceof t&&0!==S.indexOf("6.6")&&-1===E.indexOf("Chrome/66")}catch(e){}}(),R=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},O=function(e,t){if(!e._n){e._n=!0;var n=e._c;m((function(){for(var r=e._v,i=1==e._s,a=0,o=function(t){var n,a,o,s=i?t.ok:t.fail,l=t.resolve,u=t.reject,c=t.domain;try{s?(i||(2==e._h&&N(e),e._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&(c.exit(),o=!0)),n===t.promise?u(T("Promise-chain cycle")):(a=R(n))?a.call(n,l,u):l(n)):u(r)}catch(e){c&&!o&&c.exit(),u(e)}};n.length>a;)o(n[a++]);e._c=[],e._n=!1,t&&!e._h&&L(e)}))}},L=function(e){v.call(l,(function(){var t,n,r,i=e._v,a=M(e);if(a&&(t=_((function(){x?A.emit("unhandledRejection",i,e):(n=l.onunhandledrejection)?n({promise:e,reason:i}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=x||M(e)?2:1),e._a=void 0,a&&t.e)throw t.v}))},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},N=function(e){v.call(l,(function(){var t;x?A.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},U=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},F=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw T("Promise can't be resolved itself");(t=R(e))?m((function(){var r={_w:n,_d:!1};try{t.call(e,u(F,r,1),u(U,r,1))}catch(e){U.call(r,e)}})):(n._v=e,n._s=1,O(n,!1))}catch(e){U.call({_w:n,_d:!1},e)}}};D||(C=function(e){h(this,C,"Promise","_h"),f(e),r.call(this);try{e(u(F,this,1),u(U,this,1))}catch(e){U.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(45)(C.prototype,{then:function(e,t){var n=P(y(this,C));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=x?A.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r;this.promise=e,this.resolve=u(F,e,1),this.reject=u(U,e,1)},b.f=P=function(e){return e===C||e===o?new a(e):i(e)}),p(p.G+p.W+p.F*!D,{Promise:C}),n(40)(C,"Promise"),n(43)("Promise"),o=n(8).Promise,p(p.S+p.F*!D,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),p(p.S+p.F*(s||!D),"Promise",{resolve:function(e){return k(s&&this===o?C:this,e)}}),p(p.S+p.F*!(D&&n(55)((function(e){C.all(e).catch(I)}))),"Promise",{all:function(e){var t=this,n=P(t),r=n.resolve,i=n.reject,a=_((function(){var n=[],a=0,o=1;g(e,!1,(function(e){var s=a++,l=!1;n.push(void 0),o++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--o||r(n))}),i)})),--o||r(n)}));return a.e&&i(a.v),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,i=_((function(){g(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t,n){"use strict";var r=n(20);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(4),i=n(5),a=n(116);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(10).f,i=n(35),a=n(45),o=n(19),s=n(44),l=n(59),u=n(76),c=n(112),p=n(43),d=n(9),f=n(29).fastKey,h=n(39),g=d?"_s":"size",y=function(e,t){var n,r=f(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var c=e((function(e,r){s(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[g]=0,null!=r&&l(r,n,e[u],e)}));return a(c.prototype,{clear:function(){for(var e=h(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[g]=0},delete:function(e){var n=h(this,t),r=y(n,e);if(r){var i=r.n,a=r.p;delete n._i[r.i],r.r=!0,a&&(a.n=i),i&&(i.p=a),n._f==r&&(n._f=i),n._l==r&&(n._l=a),n[g]--}return!!r},forEach:function(e){h(this,t);for(var n,r=o(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!y(h(this,t),e)}}),d&&r(c.prototype,"size",{get:function(){return h(this,t)[g]}}),c},def:function(e,t,n){var r,i,a=y(e,t);return a?a.v=n:(e._l=a={i:i=f(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=a),r&&(r.n=a),e[g]++,"F"!==i&&(e._i[i]=a)),e},getEntry:y,setStrong:function(e,t,n){u(e,t,(function(e,n){this._t=h(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))}),n?"entries":"values",!n,!0),p(t)}}},function(e,t,n){"use strict";var r=n(45),i=n(29).getWeak,a=n(4),o=n(5),s=n(44),l=n(59),u=n(24),c=n(15),p=n(39),d=u(5),f=u(6),h=0,g=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},v=function(e,t){return d(e.a,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var n=v(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,a){var u=e((function(e,r){s(e,u,t,"_i"),e._t=t,e._i=h++,e._l=void 0,null!=r&&l(r,n,e[a],e)}));return r(u.prototype,{delete:function(e){if(!o(e))return!1;var n=i(e);return!0===n?g(p(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!o(e))return!1;var n=i(e);return!0===n?g(p(this,t)).has(e):n&&c(n,this._i)}}),u},def:function(e,t,n){var r=i(a(t),!0);return!0===r?g(e).set(t,n):r[e._i]=n,e},ufstore:g}},function(e,t,n){var r=n(21),i=n(7);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var r=n(36),i=n(53),a=n(4),o=n(2).Reflect;e.exports=o&&o.ownKeys||function(e){var t=r.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(7),i=n(72),a=n(26);e.exports=function(e,t,n,o){var s=String(a(e)),l=s.length,u=void 0===n?" ":String(n),c=r(t);if(c<=l||""==u)return s;var p=c-l,d=i.call(u,Math.ceil(p/u.length));return d.length>p&&(d=d.slice(0,p)),o?d+s:s+d}},function(e,t,n){var r=n(9),i=n(33),a=n(17),o=n(48).f;e.exports=function(e){return function(t){for(var n,s=a(t),l=i(s),u=l.length,c=0,p=[];u>c;)n=l[c++],r&&!o.call(s,n)||p.push(e?[n,s[n]]:s[n]);return p}}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";n(127);var r,i=(r=n(299))&&r.__esModule?r:{default:r};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},function(e,t,n){"use strict";n(128),n(271),n(273),n(276),n(278),n(280),n(282),n(284),n(286),n(288),n(290),n(292),n(294),n(298)},function(e,t,n){n(129),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(210),n(211),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(84),n(234),n(113),n(235),n(114),n(236),n(237),n(238),n(239),n(115),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),e.exports=n(8)},function(e,t,n){"use strict";var r=n(2),i=n(15),a=n(9),o=n(1),s=n(12),l=n(29).KEY,u=n(3),c=n(51),p=n(40),d=n(31),f=n(6),h=n(65),g=n(94),y=n(131),v=n(54),m=n(4),b=n(5),_=n(11),E=n(17),k=n(28),T=n(30),A=n(35),w=n(97),S=n(22),C=n(53),x=n(10),I=n(33),P=S.f,D=x.f,R=w.f,O=r.Symbol,L=r.JSON,M=L&&L.stringify,N=f("_hidden"),U=f("toPrimitive"),F={}.propertyIsEnumerable,j=c("symbol-registry"),B=c("symbols"),V=c("op-symbols"),H=Object.prototype,K="function"==typeof O&&!!C.f,G=r.QObject,z=!G||!G.prototype||!G.prototype.findChild,W=a&&u((function(){return 7!=A(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=P(H,t);r&&delete H[t],D(e,t,n),r&&e!==H&&D(H,t,r)}:D,Y=function(e){var t=B[e]=A(O.prototype);return t._k=e,t},q=K&&"symbol"==typeof O.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof O},X=function(e,t,n){return e===H&&X(V,t,n),m(e),t=k(t,!0),m(n),i(B,t)?(n.enumerable?(i(e,N)&&e[N][t]&&(e[N][t]=!1),n=A(n,{enumerable:T(0,!1)})):(i(e,N)||D(e,N,T(1,{})),e[N][t]=!0),W(e,t,n)):D(e,t,n)},$=function(e,t){m(e);for(var n,r=y(t=E(t)),i=0,a=r.length;a>i;)X(e,n=r[i++],t[n]);return e},Q=function(e){var t=F.call(this,e=k(e,!0));return!(this===H&&i(B,e)&&!i(V,e))&&(!(t||!i(this,e)||!i(B,e)||i(this,N)&&this[N][e])||t)},Z=function(e,t){if(e=E(e),t=k(t,!0),e!==H||!i(B,t)||i(V,t)){var n=P(e,t);return!n||!i(B,t)||i(e,N)&&e[N][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=R(E(e)),r=[],a=0;n.length>a;)i(B,t=n[a++])||t==N||t==l||r.push(t);return r},ee=function(e){for(var t,n=e===H,r=R(n?V:E(e)),a=[],o=0;r.length>o;)!i(B,t=r[o++])||n&&!i(H,t)||a.push(B[t]);return a};K||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===H&&t.call(V,n),i(this,N)&&i(this[N],e)&&(this[N][e]=!1),W(this,e,T(1,n))};return a&&z&&W(H,e,{configurable:!0,set:t}),Y(e)}).prototype,"toString",(function(){return this._k})),S.f=Z,x.f=X,n(36).f=w.f=J,n(48).f=Q,C.f=ee,a&&!n(32)&&s(H,"propertyIsEnumerable",Q,!0),h.f=function(e){return Y(f(e))}),o(o.G+o.W+o.F*!K,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)f(te[ne++]);for(var re=I(f.store),ie=0;re.length>ie;)g(re[ie++]);o(o.S+o.F*!K,"Symbol",{for:function(e){return i(j,e+="")?j[e]:j[e]=O(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in j)if(j[t]===e)return t},useSetter:function(){z=!0},useSimple:function(){z=!1}}),o(o.S+o.F*!K,"Object",{create:function(e,t){return void 0===t?A(e):$(A(e),t)},defineProperty:X,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:ee});var ae=u((function(){C.f(1)}));o(o.S+o.F*ae,"Object",{getOwnPropertySymbols:function(e){return C.f(_(e))}}),L&&o(o.S+o.F*(!K||u((function(){var e=O();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!q(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),r[1]=t,M.apply(L,r)}}),O.prototype[U]||n(16)(O.prototype,U,O.prototype.valueOf),p(O,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(51)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(33),i=n(53),a=n(48);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),l=a.f,u=0;s.length>u;)l.call(e,o=s[u++])&&t.push(o);return t}},function(e,t,n){var r=n(1);r(r.S,"Object",{create:n(35)})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(9),"Object",{defineProperty:n(10).f})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(9),"Object",{defineProperties:n(96)})},function(e,t,n){var r=n(17),i=n(22).f;n(23)("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(e),t)}}))},function(e,t,n){var r=n(11),i=n(37);n(23)("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(11),i=n(33);n(23)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){n(23)("getOwnPropertyNames",(function(){return n(97).f}))},function(e,t,n){var r=n(5),i=n(29).onFreeze;n(23)("freeze",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(5),i=n(29).onFreeze;n(23)("seal",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(5),i=n(29).onFreeze;n(23)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(5);n(23)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(5);n(23)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(5);n(23)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(98)})},function(e,t,n){var r=n(1);r(r.S,"Object",{is:n(99)})},function(e,t,n){var r=n(1);r(r.S,"Object",{setPrototypeOf:n(69).set})},function(e,t,n){"use strict";var r=n(49),i={};i[n(6)("toStringTag")]="z",i+""!="[object z]"&&n(12)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(1);r(r.P,"Function",{bind:n(100)})},function(e,t,n){var r=n(10).f,i=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in i||n(9)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(5),i=n(37),a=n(6)("hasInstance"),o=Function.prototype;a in o||n(10).f(o,a,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(1),i=n(102);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(e,t,n){var r=n(1),i=n(103);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){"use strict";var r=n(2),i=n(15),a=n(25),o=n(71),s=n(28),l=n(3),u=n(36).f,c=n(22).f,p=n(10).f,d=n(41).trim,f=r.Number,h=f,g=f.prototype,y="Number"==a(n(35)(g)),v="trim"in String.prototype,m=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,i,a=(t=v?t.trim():d(t,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var o,l=t.slice(2),u=0,c=l.length;ui)return NaN;return parseInt(l,r)}}return+t};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof f&&(y?l((function(){g.valueOf.call(n)})):"Number"!=a(n))?o(new h(m(t)),n,f):m(t)};for(var b,_=n(9)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;_.length>E;E++)i(h,b=_[E])&&!i(f,b)&&p(f,b,c(h,b));f.prototype=g,g.constructor=f,n(12)(r,"Number",f)}},function(e,t,n){"use strict";var r=n(1),i=n(21),a=n(104),o=n(72),s=1..toFixed,l=Math.floor,u=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",p=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*u[n],u[n]=r%1e7,r=l(r/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=u[t],u[t]=l(n/e),n=n%e*1e7},f=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var n=String(u[e]);t=""===t?n:t+o.call("0",7-n.length)+n}return t},h=function(e,t,n){return 0===t?n:t%2==1?h(e,t-1,n*e):h(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(3)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,l=a(this,c),u=i(e),g="",y="0";if(u<0||u>20)throw RangeError(c);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(g="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*h(2,69,1))-69)<0?l*h(2,-t,1):l/h(2,t,1),n*=4503599627370496,(t=52-t)>0){for(p(0,n),r=u;r>=7;)p(1e7,0),r-=7;for(p(h(10,r,1),0),r=t-1;r>=23;)d(1<<23),r-=23;d(1<0?g+((s=y.length)<=u?"0."+o.call("0",u-s)+y:y.slice(0,s-u)+"."+y.slice(s-u)):g+y}})},function(e,t,n){"use strict";var r=n(1),i=n(3),a=n(104),o=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==o.call(1,void 0)}))||!i((function(){o.call({})}))),"Number",{toPrecision:function(e){var t=a(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(1);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(1),i=n(2).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(1);r(r.S,"Number",{isInteger:n(105)})},function(e,t,n){var r=n(1);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(1),i=n(105),a=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&a(e)<=9007199254740991}})},function(e,t,n){var r=n(1);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(1);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(1),i=n(103);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(1),i=n(102);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(1),i=n(106),a=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+a(e-1)*a(e+1))}})},function(e,t,n){var r=n(1),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(1),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(1),i=n(73);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(1),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(1),i=n(74);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t,n){var r=n(1);r(r.S,"Math",{fround:n(174)})},function(e,t,n){var r=n(73),i=Math.pow,a=i(2,-52),o=i(2,-23),s=i(2,127)*(2-o),l=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),u=r(e);return is||n!=n?u*(1/0):u*n}},function(e,t,n){var r=n(1),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,a=0,o=0,s=arguments.length,l=0;o0?(r=n/l)*r:n;return l===1/0?1/0:l*Math.sqrt(a)}})},function(e,t,n){var r=n(1),i=Math.imul;r(r.S+r.F*n(3)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(e,t){var n=+e,r=+t,i=65535&n,a=65535&r;return 0|i*a+((65535&n>>>16)*a+i*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log1p:n(106)})},function(e,t,n){var r=n(1);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(1);r(r.S,"Math",{sign:n(73)})},function(e,t,n){var r=n(1),i=n(74),a=Math.exp;r(r.S+r.F*n(3)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(a(e-1)-a(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(1),i=n(74),a=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(a(e)+a(-e))}})},function(e,t,n){var r=n(1);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(1),i=n(34),a=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(1),i=n(17),a=n(7);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=a(t.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(t[s++])),s=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(1),i=n(75)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(1),i=n(7),a=n(77),o="".endsWith;r(r.P+r.F*n(79)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:Math.min(i(n),r),l=String(e);return o?o.call(t,l,s):t.slice(s-l.length,s)===l}})},function(e,t,n){"use strict";var r=n(1),i=n(77);r(r.P+r.F*n(79)("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(1);r(r.P,"String",{repeat:n(72)})},function(e,t,n){"use strict";var r=n(1),i=n(7),a=n(77),o="".startsWith;r(r.P+r.F*n(79)("startsWith"),"String",{startsWith:function(e){var t=a(this,e,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(13)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(13)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(13)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(13)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(13)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(13)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(13)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(13)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(13)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(13)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(13)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(13)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(13)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var r=n(1);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(1),i=n(11),a=n(28);r(r.P+r.F*n(3)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=i(this),n=a(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(1),i=n(209);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(e,t,n){"use strict";var r=n(3),i=Date.prototype.getTime,a=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=a.call(new Date(-50000000000001))}))||!r((function(){a.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:a},function(e,t,n){var r=Date.prototype,i=r.toString,a=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(12)(r,"toString",(function(){var e=a.call(this);return e==e?i.call(this):"Invalid Date"}))},function(e,t,n){var r=n(6)("toPrimitive"),i=Date.prototype;r in i||n(16)(i,r,n(212))},function(e,t,n){"use strict";var r=n(4),i=n(28);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),"number"!=e)}},function(e,t,n){var r=n(1);r(r.S,"Array",{isArray:n(54)})},function(e,t,n){"use strict";var r=n(19),i=n(1),a=n(11),o=n(108),s=n(80),l=n(7),u=n(81),c=n(82);i(i.S+i.F*!n(55)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,p,d=a(e),f="function"==typeof this?this:Array,h=arguments.length,g=h>1?arguments[1]:void 0,y=void 0!==g,v=0,m=c(d);if(y&&(g=r(g,h>2?arguments[2]:void 0,2)),null==m||f==Array&&s(m))for(n=new f(t=l(d.length));t>v;v++)u(n,v,y?g(d[v],v):d[v]);else for(p=m.call(d),n=new f;!(i=p.next()).done;v++)u(n,v,y?o(p,g,[i.value,v],!0):i.value);return n.length=v,n}})},function(e,t,n){"use strict";var r=n(1),i=n(81);r(r.S+r.F*n(3)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(1),i=n(17),a=[].join;r(r.P+r.F*(n(47)!=Object||!n(18)(a)),"Array",{join:function(e){return a.call(i(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(1),i=n(68),a=n(25),o=n(34),s=n(7),l=[].slice;r(r.P+r.F*n(3)((function(){i&&l.call(i)})),"Array",{slice:function(e,t){var n=s(this.length),r=a(this);if(t=void 0===t?n:t,"Array"==r)return l.call(this,e,t);for(var i=o(e,n),u=o(t,n),c=s(u-i),p=new Array(c),d=0;d1&&(r=Math.min(r,a(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(1);r(r.P,"Array",{copyWithin:n(111)}),n(38)("copyWithin")},function(e,t,n){var r=n(1);r(r.P,"Array",{fill:n(83)}),n(38)("fill")},function(e,t,n){"use strict";var r=n(1),i=n(24)(5),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(38)("find")},function(e,t,n){"use strict";var r=n(1),i=n(24)(6),a="findIndex",o=!0;a in[]&&Array(1)[a]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(38)(a)},function(e,t,n){n(43)("Array")},function(e,t,n){var r=n(2),i=n(71),a=n(10).f,o=n(36).f,s=n(78),l=n(56),u=r.RegExp,c=u,p=u.prototype,d=/a/g,f=/a/g,h=new u(d)!==d;if(n(9)&&(!h||n(3)((function(){return f[n(6)("match")]=!1,u(d)!=d||u(f)==f||"/a/i"!=u(d,"i")})))){u=function(e,t){var n=this instanceof u,r=s(e),a=void 0===t;return!n&&r&&e.constructor===u&&a?e:i(h?new c(r&&!a?e.source:e,t):c((r=e instanceof u)?e.source:e,r&&a?l.call(e):t),n?this:p,u)};for(var g=function(e){e in u||a(u,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})},y=o(c),v=0;y.length>v;)g(y[v++]);p.constructor=u,u.prototype=p,n(12)(r,"RegExp",u)}n(43)("RegExp")},function(e,t,n){"use strict";n(114);var r=n(4),i=n(56),a=n(9),o=/./.toString,s=function(e){n(12)(RegExp.prototype,"toString",e,!0)};n(3)((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!a&&e instanceof RegExp?i.call(e):void 0)})):"toString"!=o.name&&s((function(){return o.call(this)}))},function(e,t,n){"use strict";var r=n(4),i=n(7),a=n(86),o=n(57);n(58)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=r(e),u=String(this);if(!l.global)return o(l,u);var c=l.unicode;l.lastIndex=0;for(var p,d=[],f=0;null!==(p=o(l,u));){var h=String(p[0]);d[f]=h,""===h&&(l.lastIndex=a(u,i(l.lastIndex),c)),f++}return 0===f?null:d}]}))},function(e,t,n){"use strict";var r=n(4),i=n(11),a=n(7),o=n(21),s=n(86),l=n(57),u=Math.max,c=Math.min,p=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,f=/\$([$&`']|\d\d?)/g;n(58)("replace",2,(function(e,t,n,h){return[function(r,i){var a=e(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,a,i):n.call(String(a),r,i)},function(e,t){var i=h(n,e,this,t);if(i.done)return i.value;var p=r(e),d=String(this),f="function"==typeof t;f||(t=String(t));var y=p.global;if(y){var v=p.unicode;p.lastIndex=0}for(var m=[];;){var b=l(p,d);if(null===b)break;if(m.push(b),!y)break;""===String(b[0])&&(p.lastIndex=s(d,a(p.lastIndex),v))}for(var _,E="",k=0,T=0;T=k&&(E+=d.slice(k,w)+P,k=w+A.length)}return E+d.slice(k)}];function g(e,t,r,a,o,s){var l=r+e.length,u=a.length,c=f;return void 0!==o&&(o=i(o),c=d),n.call(s,c,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(l);case"<":s=o[i.slice(1,-1)];break;default:var c=+i;if(0===c)return n;if(c>u){var d=p(c/10);return 0===d?n:d<=u?void 0===a[d-1]?i.charAt(1):a[d-1]+i.charAt(1):n}s=a[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r=n(4),i=n(99),a=n(57);n(58)("search",1,(function(e,t,n,o){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=o(n,e,this);if(t.done)return t.value;var s=r(e),l=String(this),u=s.lastIndex;i(u,0)||(s.lastIndex=0);var c=a(s,l);return i(s.lastIndex,u)||(s.lastIndex=u),null===c?-1:c.index}]}))},function(e,t,n){"use strict";var r=n(78),i=n(4),a=n(50),o=n(86),s=n(7),l=n(57),u=n(85),c=n(3),p=Math.min,d=[].push,f="length",h=!c((function(){RegExp(4294967295,"y")}));n(58)("split",2,(function(e,t,n,c){var g;return g="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[f]||2!="ab".split(/(?:ab)*/)[f]||4!=".".split(/(.?)(.?)/)[f]||".".split(/()()/)[f]>1||"".split(/.?/)[f]?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var a,o,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,h=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,c+"g");(a=u.call(g,i))&&!((o=g.lastIndex)>p&&(l.push(i.slice(p,a.index)),a[f]>1&&a.index=h));)g.lastIndex===a.index&&g.lastIndex++;return p===i[f]?!s&&g.test("")||l.push(""):l.push(i.slice(p)),l[f]>h?l.slice(0,h):l}:"0".split(void 0,0)[f]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,i,r):g.call(String(i),n,r)},function(e,t){var r=c(g,e,this,t,g!==n);if(r.done)return r.value;var u=i(e),d=String(this),f=a(u,RegExp),y=u.unicode,v=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(h?"y":"g"),m=new f(h?u:"^(?:"+u.source+")",v),b=void 0===t?4294967295:t>>>0;if(0===b)return[];if(0===d.length)return null===l(m,d)?[d]:[];for(var _=0,E=0,k=[];E0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(118),i=n(39);e.exports=n(61)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,i=n(2),a=n(24)(0),o=n(12),s=n(29),l=n(98),u=n(119),c=n(5),p=n(39),d=n(39),f=!i.ActiveXObject&&"ActiveXObject"in i,h=s.getWeak,g=Object.isExtensible,y=u.ufstore,v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(c(e)){var t=h(e);return!0===t?y(p(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(p(this,"WeakMap"),e,t)}},b=e.exports=n(61)("WeakMap",v,m,u,!0,!0);d&&f&&(l((r=u.getConstructor(v,"WeakMap")).prototype,m),s.NEED=!0,a(["delete","has","get","set"],(function(e){var t=b.prototype,n=t[e];o(t,e,(function(t,i){if(c(t)&&!g(t)){this._f||(this._f=new r);var a=this._f[e](t,i);return"set"==e?this:a}return n.call(this,t,i)}))})))},function(e,t,n){"use strict";var r=n(119),i=n(39);n(61)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(1),i=n(62),a=n(88),o=n(4),s=n(34),l=n(7),u=n(5),c=n(2).ArrayBuffer,p=n(50),d=a.ArrayBuffer,f=a.DataView,h=i.ABV&&c.isView,g=d.prototype.slice,y=i.VIEW;r(r.G+r.W+r.F*(c!==d),{ArrayBuffer:d}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(e){return h&&h(e)||u(e)&&y in e}}),r(r.P+r.U+r.F*n(3)((function(){return!new d(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==g&&void 0===t)return g.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),a=new(p(this,d))(l(i-r)),u=new f(this),c=new f(a),h=0;r=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new a(e)}})},function(e,t,n){var r=n(22),i=n(37),a=n(15),o=n(1),s=n(5),l=n(4);o(o.S,"Reflect",{get:function e(t,n){var o,u,c=arguments.length<3?t:arguments[2];return l(t)===c?t[n]:(o=r.f(t,n))?a(o,"value")?o.value:void 0!==o.get?o.get.call(c):void 0:s(u=i(t))?e(u,n,c):void 0}})},function(e,t,n){var r=n(22),i=n(1),a=n(4);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(a(e),t)}})},function(e,t,n){var r=n(1),i=n(37),a=n(4);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(a(e))}})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(1),i=n(4),a=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!a||a(e)}})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{ownKeys:n(121)})},function(e,t,n){var r=n(1),i=n(4),a=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return a&&a(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(10),i=n(22),a=n(37),o=n(15),s=n(1),l=n(30),u=n(4),c=n(5);s(s.S,"Reflect",{set:function e(t,n,s){var p,d,f=arguments.length<4?t:arguments[3],h=i.f(u(t),n);if(!h){if(c(d=a(t)))return e(d,n,s,f);h=l(0)}if(o(h,"value")){if(!1===h.writable||!c(f))return!1;if(p=i.f(f,n)){if(p.get||p.set||!1===p.writable)return!1;p.value=s,r.f(f,n,p)}else r.f(f,n,l(0,s));return!0}return void 0!==h.set&&(h.set.call(f,s),!0)}})},function(e,t,n){var r=n(1),i=n(69);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){n(272),e.exports=n(8).Array.includes},function(e,t,n){"use strict";var r=n(1),i=n(52)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(38)("includes")},function(e,t,n){n(274),e.exports=n(8).Array.flatMap},function(e,t,n){"use strict";var r=n(1),i=n(275),a=n(11),o=n(7),s=n(20),l=n(109);r(r.P,"Array",{flatMap:function(e){var t,n,r=a(this);return s(e),t=o(r.length),n=l(r,0),i(n,r,r,t,0,1,e,arguments[1]),n}}),n(38)("flatMap")},function(e,t,n){"use strict";var r=n(54),i=n(5),a=n(7),o=n(19),s=n(6)("isConcatSpreadable");e.exports=function e(t,n,l,u,c,p,d,f){for(var h,g,y=c,v=0,m=!!d&&o(d,f,3);v0)y=e(t,n,h,a(h.length),y,p-1)-1;else{if(y>=9007199254740991)throw TypeError();t[y]=h}y++}v++}return y}},function(e,t,n){n(277),e.exports=n(8).String.padStart},function(e,t,n){"use strict";var r=n(1),i=n(122),a=n(60),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);r(r.P+r.F*o,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){n(279),e.exports=n(8).String.padEnd},function(e,t,n){"use strict";var r=n(1),i=n(122),a=n(60),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);r(r.P+r.F*o,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){n(281),e.exports=n(8).String.trimLeft},function(e,t,n){"use strict";n(41)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){n(283),e.exports=n(8).String.trimRight},function(e,t,n){"use strict";n(41)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){n(285),e.exports=n(65).f("asyncIterator")},function(e,t,n){n(94)("asyncIterator")},function(e,t,n){n(287),e.exports=n(8).Object.getOwnPropertyDescriptors},function(e,t,n){var r=n(1),i=n(121),a=n(17),o=n(22),s=n(81);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),l=o.f,u=i(r),c={},p=0;u.length>p;)void 0!==(n=l(r,t=u[p++]))&&s(c,t,n);return c}})},function(e,t,n){n(289),e.exports=n(8).Object.values},function(e,t,n){var r=n(1),i=n(123)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){n(291),e.exports=n(8).Object.entries},function(e,t,n){var r=n(1),i=n(123)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";n(115),n(293),e.exports=n(8).Promise.finally},function(e,t,n){"use strict";var r=n(1),i=n(8),a=n(2),o=n(50),s=n(117);r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,i.Promise||a.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){n(295),n(296),n(297),e.exports=n(8)},function(e,t,n){var r=n(2),i=n(1),a=n(60),o=[].slice,s=/MSIE .\./.test(a),l=function(e){return function(t,n){var r=arguments.length>2,i=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};i(i.G+i.B+i.F*s,{setTimeout:l(r.setTimeout),setInterval:l(r.setInterval)})},function(e,t,n){var r=n(1),i=n(87);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(84),i=n(33),a=n(12),o=n(2),s=n(16),l=n(42),u=n(6),c=u("iterator"),p=u("toStringTag"),d=l.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(f),g=0;g=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){n(300),e.exports=n(124).global},function(e,t,n){var r=n(301);r(r.G,{global:n(89)})},function(e,t,n){var r=n(89),i=n(124),a=n(302),o=n(304),s=n(311),l=function(e,t,n){var u,c,p,d=e&l.F,f=e&l.G,h=e&l.S,g=e&l.P,y=e&l.B,v=e&l.W,m=f?i:i[t]||(i[t]={}),b=m.prototype,_=f?r:h?r[t]:(r[t]||{}).prototype;for(u in f&&(n=t),n)(c=!d&&_&&void 0!==_[u])&&s(m,u)||(p=c?_[u]:n[u],m[u]=f&&"function"!=typeof _[u]?n[u]:y&&c?a(p,r):v&&_[u]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(p):g&&"function"==typeof p?a(Function.call,p):p,g&&((m.virtual||(m.virtual={}))[u]=p,e&l.R&&b&&!b[u]&&o(b,u,p)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){var r=n(303);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(305),i=n(310);e.exports=n(91)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(306),i=n(307),a=n(309),o=Object.defineProperty;t.f=n(91)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(90);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(91)&&!n(125)((function(){return 7!=Object.defineProperty(n(308)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(90),i=n(89).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(90);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";(function(e){var t=n(46);var r,i,a,o=function(){function t(){}return t.install=function(){if(!e.performance||!e.performance.now){var t=Date.now();e.performance||(e.performance={}),e.performance.now=function(){return Date.now()-t}}},t}();r=o,a="performance.now",(i=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(i="id"))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,t.a.register(o)}).call(this,n(92))},function(e,t,n){(function(e,t){var n;(n=void 0!==e&&"[object process]"==={}.toString.call(e)||"undefined"!=typeof navigator&&"ReactNative"===navigator.product?t:self).Proxy||(n.Proxy=function(){function e(){return null}function t(e){return!!e&&("object"==typeof e||"function"==typeof e)}function n(e){if(null!==e&&!t(e))throw new TypeError("Object prototype may only be an Object or null: "+e)}var r=null,i=Object,a=!(!i.create&&{__proto__:null}instanceof i),o=i.create||(a?function(e){return n(e),{__proto__:e}}:function(e){function t(){}if(n(e),null===e)throw new SyntaxError("Native Object.create is required to create objects with null prototype");return t.prototype=e,new t}),s=i.getPrototypeOf||([].__proto__===Array.prototype?function(e){return t(e=e.__proto__)?e:null}:e),l=function(u,c){function p(){}if(void 0===(this&&this instanceof l?this.constructor:void 0))throw new TypeError("Constructor Proxy requires 'new'");if(!t(u)||!t(c))throw new TypeError("Cannot create proxy with a non-object as target or handler");r=function(){u=null,p=function(e){throw new TypeError("Cannot perform '"+e+"' on a proxy that has been revoked")}},setTimeout((function(){r=null}),0);var d=c;for(var f in c={get:null,set:null,apply:null,construct:null},d){if(!(f in c))throw new TypeError("Proxy polyfill does not support trap '"+f+"'");c[f]=d[f]}"function"==typeof d&&(c.apply=d.apply.bind(d)),d=s(u);var h=!1,g=!1;if("function"==typeof u){var y=function(){var e=this&&this.constructor===y,t=Array.prototype.slice.call(arguments);return p(e?"construct":"apply"),e&&c.construct?c.construct.call(this,u,t):!e&&c.apply?c.apply(u,this,t):e?(t.unshift(u),new(u.bind.apply(u,t))):u.apply(this,t)};h=!0}else u instanceof Array?(y=[],g=!0):y=a||null!==d?o(d):{};var v=c.get?function(e){return p("get"),c.get(this,e,y)}:function(e){return p("get"),this[e]},m=c.set?function(e,t){p("set"),c.set(this,e,t,y)}:function(e,t){p("set"),this[e]=t},b={};if(i.getOwnPropertyNames(u).forEach((function(e){if(!h&&!g||!(e in y)){var t=i.getOwnPropertyDescriptor(u,e);i.defineProperty(y,e,{enumerable:!!t.enumerable,get:v.bind(u,e),set:m.bind(u,e)}),b[e]=!0}})),f=!0,h||g){var _=i.setPrototypeOf||([].__proto__===Array.prototype?function(e,t){return n(t),e.__proto__=t,e}:e);d&&_(y,d)||(f=!1)}if(c.get||!f)for(var E in u)b[E]||i.defineProperty(y,E,{get:v.bind(u,E)});return i.seal(u),i.seal(y),y};return l.revocable=function(e,t){return{proxy:new l(e,t),revoke:r}},l}(),n.Proxy.revocable=n.Proxy.revocable)}).call(this,n(314),n(92))},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,u=[],c=!1,p=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):p=-1,u.length&&f())}function f(){if(!c){var e=s(d);c=!0;for(var t=u.length;t;){for(l=u,u=[];++p1)for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=o._config.network.maxStaleLevelReloads){r._logger.error("Same frag loading reached max count");var i=new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.NETWORK,s.Error.Code.LIVE_MANIFEST_REFRESH_ERROR,{fragSN:n});return o._trigger(s.EventType.ERROR,i),o.destroy()}r._logger.debug("Last frag SN is: "+n)}else o._sameFragSNLoadedCount=0;o._lastLoadedFragSN=n}})),o._config=s.Utils.Object.mergeDeep({},c,o._config),o._init(),o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.createAdapter=function(e,t,n){var i=s.Utils.Object.copyDeep(c);if(s.Utils.Object.hasPropertyPath(n,"sources.options")){var a=n.sources.options;i.forceRedirectExternalStreams=a.forceRedirectExternalStreams,i.redirectExternalStreamsHandler=a.redirectExternalStreamsHandler,i.redirectExternalStreamsTimeout=a.redirectExternalStreamsTimeout,f.redirectExternalStreamsHandler=i.redirectExternalStreamsHandler,f.redirectExternalStreamsTimeout=i.redirectExternalStreamsTimeout}if(s.Utils.Object.hasPropertyPath(n,"sources.startTime")&&s.Utils.Object.getPropertyPath(n,"sources.startTime")>-1&&(i.hlsConfig.startPosition=n.sources.startTime),s.Utils.Object.hasPropertyPath(n,"text.useNativeTextTrack")&&(i.subtitleDisplay=s.Utils.Object.getPropertyPath(n,"text.useNativeTextTrack")),s.Utils.Object.hasPropertyPath(n,"abr.fpsDroppedFramesInterval")&&(i.hlsConfig.fpsDroppedFramesInterval=n.abr.fpsDroppedFramesInterval),s.Utils.Object.hasPropertyPath(n,"abr.fpsDroppedMonitoringThreshold")&&(i.hlsConfig.fpsDroppedMonitoringThreshold=n.abr.fpsDroppedMonitoringThreshold),s.Utils.Object.hasPropertyPath(n,"abr.capLevelOnFPSDrop")&&(r._logger.debug("capLevelOnFPSDrop = ",n.abr.capLevelOnFPSDrop),i.hlsConfig.capLevelOnFPSDrop=n.abr.capLevelOnFPSDrop),s.Utils.Object.hasPropertyPath(n,"text")&&(i.hlsConfig.enableCEA708Captions=n.text.enableCEA708Captions,i.hlsConfig.captionsTextTrack1Label=n.text.captionsTextTrack1Label,i.hlsConfig.captionsTextTrack1LanguageCode=n.text.captionsTextTrack1LanguageCode,i.hlsConfig.captionsTextTrack2Label=n.text.captionsTextTrack2Label,i.hlsConfig.captionsTextTrack2LanguageCode=n.text.captionsTextTrack2LanguageCode),s.Utils.Object.hasPropertyPath(n,"abr")){var o=n.abr;"boolean"==typeof o.enabled&&(i.abr.enabled=o.enabled),"boolean"==typeof o.capLevelToPlayerSize&&(i.hlsConfig.capLevelToPlayerSize=o.capLevelToPlayerSize),o.defaultBandwidthEstimate&&(i.hlsConfig.abrEwmaDefaultEstimate=o.defaultBandwidthEstimate),o.restrictions&&s.Utils.Object.createPropertyPath(i,"abr.restrictions",o.restrictions)}return s.Utils.Object.hasPropertyPath(n,"streaming.lowLatencyMode")&&(i.hlsConfig.lowLatencyMode=s.Utils.Object.getPropertyPath(n,"streaming.lowLatencyMode")),s.Utils.Object.hasPropertyPath(n,"playback.options.html5.hls")&&s.Utils.Object.mergeDeep(i.hlsConfig,n.playback.options.html5.hls),i.network=n.network,new this(e,t,i)},r.canPlayType=function(e){var t="string"==typeof e&&r._hlsMimeTypes.includes(e.toLowerCase())&&r.isMSESupported();return r._logger.debug("canPlayType result for mimeType:"+e+" is "+t.toString()),t},r.canPlayDrm=function(){return r._logger.warn("canPlayDrm result is false"),!1},r.isSupported=function(){var e=u.a.isSupported();return r._logger.debug("isSupported:"+e),e};var i,a,o=r.prototype;return o._init=function(){this._config.forceRedirectExternalStreams&&(this._config.hlsConfig.pLoader=f),this._maybeSetFilters(),this._hls=new u.a(this._config.hlsConfig),this._capabilities.fpsControl=!0,this._hls.subtitleDisplay=this._config.subtitleDisplay,this._addBindings()},o._maybeSetFilters=function(){var e=this;if("function"==typeof s.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(r._logger.debug("Register request filter"),s.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:d,xhrSetup:function(t,n,r){var i,a={url:n,body:null,headers:{}};try{"manifest"===r.type&&(i=e._config.network.requestFilter(s.RequestType.MANIFEST,a)),r.frag&&"subtitle"!==r.frag.type&&(i=e._config.network.requestFilter(s.RequestType.SEGMENT,a))}catch(e){i=Promise.reject(e)}return(i=i||Promise.resolve(a)).then((function(e){r.url=e.url,t.open("GET",e.url,!0),Object.entries(e.headers).forEach((function(e){t.setRequestHeader.apply(t,e)})),"boolean"==typeof e.withCredentials&&(t.withCredentials=e.withCredentials)})).catch((function(t){throw e._requestFilterError=!0,t}))}})),"function"==typeof s.Utils.Object.getPropertyPath(this._config,"network.responseFilter")){var t=this;r._logger.debug("Register response filter"),s.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:d,readystatechange:function(e){var n=this,i=e.currentTarget,a=i.readyState,o=this.stats,l=this.context,u=this.config;if(!o.aborted&&a>=2){window.clearTimeout(this.requestTimeout);var c=o.loading;if(0===c.first&&(c.first=Math.max(performance.now(),c.start)),4===a){var p=i.status;if(p>=200&&p<300){var d,f;c.end=Math.max(o.tfirst,performance.now()),f="arraybuffer"===l.responseType?(d=i.response).byteLength:(d=i.responseText).length,o.loaded=o.total=f;var h,g={url:i.responseURL,originalUrl:l.url,data:d,headers:s.Utils.Http.convertHeadersToDictionary(i.getAllResponseHeaders())};try{"manifest"===l.type&&(h=t._config.network.responseFilter(s.RequestType.MANIFEST,g)),l.frag&&"subtitle"!==l.frag.type&&(h=t._config.network.responseFilter(s.RequestType.SEGMENT,g))}catch(e){h=Promise.reject(e)}return(h=h||Promise.resolve(g)).then((function(e){n.callbacks.onSuccess(e,o,l,i)})).catch((function(e){t._responseFilterError=!0,n.callbacks.onError({code:p,text:e.message},l,i)}))}o.retry>=u.maxRetry||p>=400&&p<499?(r._logger.error(p+" while loading "+l.url),this.callbacks.onError({code:p,text:i.statusText},l,i)):(r._logger.warn(p+" while loading "+l.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,u.maxRetryDelay),o.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),u.timeout)}}})}},o._addBindings=function(){var e=this;this._mediaAttachedPromise=new Promise((function(t){return e._onMediaAttached=t}));for(var t=0,n=Object.entries(this._adapterEventsBindings);t0&&(this._config.hlsConfig.startPosition=this.currentTime),this._reset(),null==(e=this._loadPromiseHandlers)||e.reject(new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,"media detached while loading")),this._loadPromiseHandlers=null,this._loadPromise=null,this._hls=null)},o.handleMediaError=function(e){return e.code===e.MEDIA_ERR_DECODE&&(r._logger.debug("The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",e.message),this._handleMediaError(u.a.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR))},o.load=function(e){var t=this;return this._loadPromise||(this._startTime=e,this._loadPromise=new Promise((function(e,n){t._loadPromiseHandlers={resolve:e,reject:n},t._loadInternal()}))),this._loadPromise},o._loadInternal=function(){var e;this._hls&&this._sourceObj&&this._sourceObj.url?(this._hls.loadSource(this._sourceObj.url),this._hls.attachMedia(this._videoElement),this._trigger(s.EventType.ABR_MODE_CHANGED,{mode:this.isAdaptiveBitrateEnabled()?"auto":"manual"})):null==(e=this._loadPromiseHandlers)||e.reject(new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,"no url provided"))},o._reloadWithDirectManifest=function(){this._triedReloadWithRedirect=!0,this._reset(),this._config.hlsConfig.pLoader=f,this._hls=new u.a(this._config.hlsConfig),this._addBindings(),this._loadInternal()},o.destroy=function(){var t=this;return new Promise((function(n,i){e.prototype.destroy.call(t).then((function(){var e;r._logger.debug("destroy"),t._playerTracks=[],t._nativeTextTracksMap={},t._sameFragSNLoadedCount=0,t._lastLoadedFragSN=-1,null==(e=t._loadPromiseHandlers)||e.reject(new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,"The adapter has been destroyed while loading")),t._loadPromiseHandlers=null,t._loadPromise=null,t._reset(),n()}),(function(){return i()}))}))},o._reset=function(){this._removeBindings(),this._requestFilterError=!1,this._responseFilterError=!1,this._hls.detachMedia(),this._hls.destroy()},o._parseTracks=function(){var e=this._parseAudioTracks(this._hls.audioTracks||[]),t=this._parseVideoTracks(this._hls.levels||[]),n=this._parseTextTracks(this._hls.subtitleTracks||[]);return e.concat(t).concat(n)},o._parseAudioTracks=function(e){for(var t=[],n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(t=r()).done;){var i=t.value,a={id:i.id,active:!1,default:i.default,label:i.name,kind:i.type.toLowerCase(),language:i.lang};n.push(new s.TextTrack(a))}return n},o._parseCEATextTrack=function(e){var t=null;if("captions"===e.kind){var n={id:e.id,active:"showing"===e.mode,label:e.label,kind:e.kind,language:e.language};t=new s.TextTrack(n),this._nativeTextTracksMap[t.index]=e}return t},o.selectAudioTrack=function(e){e instanceof s.AudioTrack&&!e.active&&this._hls.audioTracks&&(this._hls.audioTrack=e.id)},o.selectVideoTrack=function(e){e instanceof s.VideoTrack&&(!e.active||this.isAdaptiveBitrateEnabled())&&this._hls.levels&&(this.isAdaptiveBitrateEnabled()&&this._trigger(s.EventType.ABR_MODE_CHANGED,{mode:"manual"}),this._hls.currentLevel=e.index)},o.selectTextTrack=function(e){e instanceof s.TextTrack&&!e.active&&this._hls&&(this._hls.subtitleTracks.length?(this._hls.subtitleTrack=e.id,this._notifyTrackChanged(e)):this._selectNativeTextTrack(e))},o._selectNativeTextTrack=function(e){var t=this._nativeTextTracksMap[e.index];t&&(this.disableNativeTextTracks(),t.mode=this._config.subtitleDisplay?"showing":"hidden",this._notifyTrackChanged(e))},o._notifyTrackChanged=function(e){this._onTrackChanged(e)},o.hideTextTrack=function(){this._hls&&(this._hls.subtitleTracks.length?this._hls.subtitleTrack=-1:this.disableNativeTextTracks())},o.enableAdaptiveBitrate=function(){this.isAdaptiveBitrateEnabled()||(this._trigger(s.EventType.ABR_MODE_CHANGED,{mode:"auto"}),this._hls.nextLevel=-1)},o.isAdaptiveBitrateEnabled=function(){return!!this._hls&&this._hls.autoLevelEnabled},o.applyABRRestriction=function(e){s.Utils.Object.createPropertyPath(this._config,"abr.restrictions",e),this._hls.capLevelToPlayerSize||this._maybeApplyAbrRestrictions(e)},o._getLevelDetails=function(){var e=this._hls.levels[this._hls.currentLevel]||this._hls.levels[this._hls.nextLevel]||this._hls.levels[this._hls.nextAutoLevel]||this._hls.levels[this._hls.nextLoadLevel];return e&&e.details?e.details:{}},o._getLiveEdge=function(){try{var e;return(e=this._hls.liveSyncPosition?this._hls.liveSyncPosition:this._hls.config.liveSyncDuration?this._videoElement.duration-this._hls.config.liveSyncDuration:this._videoElement.duration-this._hls.config.liveSyncDurationCount*this._getLevelDetails().targetduration)>0?e:this._videoElement.duration}catch(e){return r._logger.debug("Live edge calculation failed, fall back to duration"),this._videoElement.duration}},o.seekToLiveEdge=function(){try{this._videoElement.currentTime=this._getLiveEdge()}catch(e){return}},o.getSegmentDuration=function(){var e=s.Utils.Object.getPropertyPath(this._hls,"streamController.fragCurrent");return e?e.duration:0},o.isLive=function(){try{return!!this._getLevelDetails().live}catch(e){return!1}},o._onManifestLoaded=function(e){var t=this;r._logger.debug("The source has been loaded successfully"),this._hls.config.autoStartLoad||this._hls.startLoad(this._startTime),this._playerTracks=this._parseTracks(),this._config.abr.enabled||(this._hls.currentLevel=0),this._mediaAttachedPromise.then((function(){var e;null==(e=t._loadPromiseHandlers)||e.resolve({tracks:t._playerTracks}),t._loadPromiseHandlers=null}));var n=e.stats.loading,i=n.end-n.start;this._trigger(s.EventType.MANIFEST_LOADED,{miliSeconds:i})},o._maybeApplyAbrRestrictions=function(e){var t=this._playerTracks.filter((function(e){return e instanceof s.VideoTrack})),n=Object(s.filterTracksByRestriction)(t,e);if(n.length){var i=n[0],a=n.pop();this._hls.config.minAutoBitrate=i.bandwidth,this._hls.autoLevelCapping=a.index;var o=n.some((function(e){return e.active}));this.isAdaptiveBitrateEnabled()||o||this.selectVideoTrack(i)}else r._logger.warn("Invalid restrictions, there are not tracks within the restriction range")},o._onLevelSwitched=function(e,t){var n=this._playerTracks.find((function(e){return e instanceof s.VideoTrack&&e.index===t.level}));this._onTrackChanged(n)},o._onAudioTrackSwitched=function(e,t){var n=this._playerTracks.find((function(e){return e instanceof s.AudioTrack&&e.id===t.id}));this._onTrackChanged(n),this._handleWaitingUponAudioTrackSwitch()},o._handleWaitingUponAudioTrackSwitch=function(){var e=this;["IE","Edge"].includes(s.Env.browser.name)&&this._eventManager.listenOnce(this._videoElement,s.EventType.TIME_UPDATE,(function(){e._trigger(s.EventType.PLAYING)}))},o._getErrorDataObject=function(e){var t={};switch(t.name=e.details,t.name){case u.a.ErrorDetails.MANIFEST_LOAD_ERROR:case u.a.ErrorDetails.LEVEL_LOAD_ERROR:case u.a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:t.url=e.url,t.responseCode=e.response?e.response.code:null;break;case u.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case u.a.ErrorDetails.LEVEL_LOAD_TIMEOUT:case u.a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:t.url=e.url;break;case u.a.ErrorDetails.MANIFEST_PARSING_ERROR:t.url=e.url,t.reason=e.reason;break;case u.a.ErrorDetails.LEVEL_SWITCH_ERROR:t.level=e.level,t.reason=e.reason;break;case u.a.ErrorDetails.FRAG_LOAD_ERROR:t.fragUrl=e.frag?e.frag.url:null,t.responseCode=e.response?e.response.code:null;break;case u.a.ErrorDetails.FRAG_LOAD_TIMEOUT:t.fragUrl=e.frag?e.frag.url:null;break;case u.a.ErrorDetails.FRAG_DECRYPT_ERROR:case u.a.ErrorDetails.FRAG_PARSING_ERROR:t.reason=e.reason;break;case u.a.ErrorDetails.KEY_LOAD_ERROR:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null,t.responseCode=e.response?e.response.code:null;break;case u.a.ErrorDetails.KEY_LOAD_TIMEOUT:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null;break;case u.a.ErrorDetails.BUFFER_ADD_CODEC_ERROR:t.mimeType=e.mimeType,t.errorMsg=e.err?e.err.message:null;break;case u.a.ErrorDetails.BUFFER_STALLED_ERROR:t.buffer=e.buffer}return(this._requestFilterError||this._responseFilterError)&&(t.reason=e.response.text),t},o._onError=function(e){var t=e.type,n=e.details,i=e.fatal,a=this._getErrorDataObject(e);if(i){var o,l;switch(t){case u.a.ErrorTypes.NETWORK_ERROR:var c;c=this._requestFilterError?s.Error.Code.REQUEST_FILTER_ERROR:this._responseFilterError?s.Error.Code.RESPONSE_FILTER_ERROR:s.Error.Code.HTTP_ERROR,![u.a.ErrorDetails.MANIFEST_LOAD_ERROR,u.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT].includes(n)||this._triedReloadWithRedirect||this._config.forceRedirectExternalStreams||this._requestFilterError||this._responseFilterError?o=new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.NETWORK,c,a):(o=new s.Error(s.Error.Severity.RECOVERABLE,s.Error.Category.NETWORK,c,a),this._reloadWithDirectManifest());break;case u.a.ErrorTypes.MEDIA_ERROR:o=this._handleMediaError(n)?new s.Error(s.Error.Severity.RECOVERABLE,s.Error.Category.MEDIA,s.Error.Code.HLS_FATAL_MEDIA_ERROR,a):new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.MEDIA,s.Error.Code.HLS_FATAL_MEDIA_ERROR,a);break;default:o=new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,a)}this._trigger(s.EventType.ERROR,o),o&&o.severity===s.Error.Severity.CRITICAL&&(this._loadPromiseHandlers&&(null==(l=this._loadPromiseHandlers)||l.reject(o),this._loadPromiseHandlers=null,this._loadPromise=null),this.destroy())}else{var d=this._requestFilterError||this._responseFilterError?{category:s.Error.Category.NETWORK,code:this._requestFilterError?s.Error.Code.REQUEST_FILTER_ERROR:s.Error.Code.RESPONSE_FILTER_ERROR}:p[n]||{category:0,code:0},f=d.category,h=d.code;r._logger.warn(new s.Error(s.Error.Severity.RECOVERABLE,f,h,a))}this._requestFilterError=!1,this._responseFilterError=!1},o._handleMediaError=function(e){r._logger.error("_handleMediaError mediaErrorName:",e);var t=performance.now(),n=!0;return e===u.a.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR?(r._logger.error("recover aborted due to: MANIFEST_INCOMPATIBLE_CODECS_ERROR"),n=!1):this._checkTimeDeltaHasPassed(t,this._recoverDecodingErrorDate,this._config.recoverDecodingErrorDelay)?(this._eventManager.listen(this._videoElement,s.EventType.LOADED_METADATA,this._onRecoveredCallback),r._logger.debug("try to recover using: _recoverDecodingError()"),this._recoverDecodingError()):this._checkTimeDeltaHasPassed(t,this._recoverSwapAudioCodecDate,this._config.recoverSwapAudioCodecDelay)?(this._eventManager.listen(this._videoElement,s.EventType.LOADED_METADATA,this._onRecoveredCallback),r._logger.debug("try to recover using: _recoverSwapAudioCodec()"),this._recoverSwapAudioCodec()):(r._logger.error("cannot recover, last media error recovery failed error: ",e),n=!1),n},o._onRecovered=function(){this._trigger(s.EventType.MEDIA_RECOVERED),this._videoElement.removeEventListener(s.EventType.LOADED_METADATA,this._onRecoveredCallback)},o._checkTimeDeltaHasPassed=function(e,t,n){return!t||e-t>n},o._recoverDecodingError=function(){this._recoverDecodingErrorDate=performance.now(),r._logger.warn("try to recover media Error"),this._hls.recoverMediaError()},o._recoverSwapAudioCodec=function(){this._recoverSwapAudioCodecDate=performance.now(),r._logger.warn("try to swap Audio Codec and recover media Error"),this._hls.swapAudioCodec(),this._hls.recoverMediaError()},o._removeBindings=function(){for(var e=0,t=Object.entries(this._adapterEventsBindings);e(()=>{var e={21:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=function(){function e(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),i=function(){function e(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}(),a=n(145),o=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],u=s[1],c=s[2],p=s[3],d=new Uint32Array(256),f=0,h=0,g=0;for(g=0;g<256;g++)d[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){var y=h^h<<1^h<<2^h<<3^h<<4;y=y>>>8^255&y^99,e[f]=y,t[y]=f;var v=d[f],m=d[v],b=d[m],_=257*d[y]^16843008*y;r[f]=_<<24|_>>>8,i[f]=_<<16|_>>>16,a[f]=_<<8|_>>>24,o[f]=_,_=16843009*b^65537*m^257*v^16843008*f,l[y]=_<<24|_>>>8,u[y]=_<<16|_>>>16,c[y]=_<<8|_>>>24,p[y]=_,f?(f=v^d[d[d[b^v]]],h^=d[d[h]]):f=h=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r{"use strict";n.r(t),n.d(t,{canParse:()=>l,decodeFrame:()=>f,getID3Data:()=>o,getID3Frames:()=>d,getTimeStamp:()=>u,isFooter:()=>a,isHeader:()=>i,isTimeStampFrame:()=>c,testables:()=>b,utf8ArrayToStr:()=>m});var r,i=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},a=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},o=function(e,t){for(var n=t,r=0;i(e,t);)r+=10,r+=s(e,t+6),a(e,t+10)&&(r+=10),t+=r;if(r>0)return e.subarray(n,n+r)},s=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]},l=function(e,t){return i(e,t)&&s(e,t+6)+10<=e.length-t},u=function(e){for(var t=d(e),n=0;n>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:u+=String.fromCharCode(a);break;case 12:case 13:o=e[c++],u+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e[c++],s=e[c++],u+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return u},b={decodeTextFrame:g};function _(){return r||void 0===self.TextDecoder||(r=new self.TextDecoder("utf-8")),r}},182:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(544),i=n(851),a=n(93),o=n(729),s=n(973);function l(e){var t=new o.EventEmitter,n=function(t,n){e.postMessage({event:t,data:n})};t.on(i.Events.FRAG_DECRYPTED,n),t.on(i.Events.ERROR,n),e.addEventListener("message",(function(o){var l=o.data;switch(l.cmd){case"init":var c=JSON.parse(l.config);e.transmuxer=new r.default(t,l.typeSupported,c,l.vendor,l.id),(0,a.enableLogs)(c.debug,l.id),function(){var e=function(e){a.logger[e]=function(t){n("workerLog",{logType:e,message:t})}};for(var t in a.logger)e(t)}(),n("init",null);break;case"configure":e.transmuxer.configure(l.config);break;case"demux":var d=e.transmuxer.push(l.data,l.decryptdata,l.chunkMeta,l.state);(0,r.isPromise)(d)?(e.transmuxer.async=!0,d.then((function(t){u(e,t)})).catch((function(e){n(i.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:l.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker push error"})}))):(e.transmuxer.async=!1,u(e,d));break;case"flush":var f=l.chunkMeta,h=e.transmuxer.flush(f);(0,r.isPromise)(h)||e.transmuxer.async?((0,r.isPromise)(h)||(h=Promise.resolve(h)),h.then((function(t){p(e,t,f)})).catch((function(e){n(i.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:l.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker flush error"})}))):p(e,h,f)}}))}function u(e,t){if(!((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment))return!1;var n,r=[],i=t.remuxResult,a=i.audio,o=i.video;return a&&c(r,a),o&&c(r,o),e.postMessage({event:"transmuxComplete",data:t},r),!0}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function p(e,t,n){t.reduce((function(t,n){return u(e,n)||t}),!1)||e.postMessage({event:"transmuxComplete",data:t[0]}),e.postMessage({event:"flush",data:n})}},544:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TransmuxConfig:()=>oe,TransmuxState:()=>se,default:()=>re,isPromise:()=>ae});var r=n(851),i=n(973),a=n(21),o=n(965),s=n(181),l=n(856);function u(e,t){return void 0===e&&(e=""),void 0===t&&(t=9e4),{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}var c=n(63),p=n(145),d=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(e){this.initPTS=e,this.resetContiguity()},t.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=(0,c.appendUint8Array)(this.cachedData,e),this.cachedData=null);var n,r=s.getID3Data(e,0),i=r?r.length:0,a=this._audioTrack,d=this._id3Track,h=r?s.getTimeStamp(r):void 0,g=e.length;for((null===this.basePTS||0===this.frameIndex&&(0,o.isFiniteNumber)(h))&&(this.basePTS=f(h,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),r&&r.length>0&&d.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:l.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});i>>5}function b(e,t){return t+1=e.length)return!1;var r=m(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||b(e,i)}return!1}function E(e,t,n,a,o){if(!e.samplerate){var s=function(e,t,n,a){var o,s,l,u,c=navigator.userAgent.toLowerCase(),p=a,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];o=1+((192&t[n+2])>>>6);var f=(60&t[n+2])>>>2;if(!(f>d.length-1))return l=(1&t[n+2])<<2,l|=(192&t[n+3])>>>6,g.logger.log("manifest codec:"+a+", ADTS type:"+o+", samplingIndex:"+f),/firefox/i.test(c)?f>=6?(o=5,u=new Array(4),s=f-3):(o=2,u=new Array(2),s=f):-1!==c.indexOf("android")?(o=2,u=new Array(2),s=f):(o=5,u=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&f>=6?s=f-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(f>=6&&1===l||/vivaldi/i.test(c))||!a&&1===l)&&(o=2,u=new Array(2)),s=f)),u[0]=o<<3,u[0]|=(14&f)>>1,u[1]|=(1&f)<<7,u[1]|=l<<3,5===o&&(u[1]|=(14&s)>>1,u[2]=(1&s)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:d[f],channelCount:l,codec:"mp4a.40."+o,manifestCodec:p};e.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+f})}(t,n,a,o);if(!s)return;e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,g.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function k(e){return 9216e4/e}function T(e,t,n,r,i){var a,o=r+i*k(e.samplerate),s=function(e,t){var n=v(e,t);if(t+n<=e.length){var r=m(e,t)-n;if(r>0)return{headerLength:n,frameLength:r}}}(t,n);if(s){var l=s.frameLength,u=s.headerLength,c=u+l,p=Math.max(0,n+c-t.length);p?(a=new Uint8Array(c-u)).set(t.subarray(n+u,t.length),0):a=t.subarray(n+u,n+c);var d={unit:a,pts:o};return p||e.samples.push(d),{sample:d,length:c,missing:p}}var f=t.length-n;return(a=new Uint8Array(f)).set(t.subarray(n,t.length),0),{sample:{unit:a,pts:o},length:f,missing:-1}}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const w=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this).observer=void 0,r.config=void 0,r.observer=t,r.config=n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var i=r.prototype;return i.resetInitSegment=function(t,n,r,i){e.prototype.resetInitSegment.call(this,t,n,r,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(s.getID3Data(e,0)||[]).length,n=e.length;t16384?e.subarray(0,16384):e,(0,c.findBox)(e,["moof"]).length>0},t.demux=function(e,t){this.timeOffset=t;var n=e,r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=(0,c.appendUint8Array)(this.remainderData,e));var a=(0,c.segmentValidRange)(n);this.remainderData=a.remainder,r.samples=a.valid||new Uint8Array}else r.samples=n;var o=this.extractID3Track(r,t);return i.samples=(0,c.parseSamples)(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:o,textTrack:this.txtTrack}},t.flush=function(){var e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;var r=this.extractID3Track(t,this.timeOffset);return n.samples=(0,c.parseSamples)(e,t),{videoTrack:t,audioTrack:u(),id3Track:r,textTrack:u()}},t.extractID3Track=function(e,t){var n=this.id3Track;if(e.samples.length){var r=(0,c.findBox)(e.samples,["emsg"]);r&&r.forEach((function(e){var r=(0,c.parseEmsg)(e);if(S.test(r.schemeIdUri)){var i=(0,o.isFiniteNumber)(r.presentationTime)?r.presentationTime/r.timeScale:t+r.presentationTimeDelta/r.timeScale,a=4294967295===r.eventDuration?Number.POSITIVE_INFINITY:r.eventDuration/r.timeScale;a<=.001&&(a=Number.POSITIVE_INFINITY);var s=r.payload;n.samples.push({data:s,len:s.byteLength,dts:i,pts:i,type:l.MetadataSchema.emsg,duration:a})}}))}return n},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();var x=null,I=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],P=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],D=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],R=[0,1,1,4];function O(e,t,n,r,i){if(!(n+24>t.length)){var a=L(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function L(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==n&&0!==i&&15!==i&&3!==a){var o=e[t+2]>>1&1,s=e[t+3]>>6,l=1e3*I[14*(3===n?3-r:3===r?3:4)+i-1],u=P[3*(3===n?0:2===n?1:2)+a],c=3===s?1:2,p=D[n][r],d=R[r],f=8*p*d,h=Math.floor(p*l/u+o)*d;if(null===x){var g=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);x=g?parseInt(g[1]):0}return!!x&&x<=87&&2===r&&l>=224e3&&0===s&&(e[t+3]=128|e[t+3]),{sampleRate:u,channelCount:c,frameLength:h,samplesPerFrame:f}}}function M(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function N(e,t){return t+1e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;if(e>32&&g.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r=e.length)return void n();if(!(e[t].unit.length<32||(this.decryptAacSample(e,t,n),this.decrypter.isSync())))return}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,n,r,a),this.decrypter.isSync())))return}}},e}();function B(){return(B=Object.assign?Object.assign.bind():function(e){for(var t=1;t1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var u=t[7];192&u&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&u?i-(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(g.logger.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var c=(r=t[8])+9;if(e.size<=c)return null;e.size-=c;for(var p=new Uint8Array(e.size),d=0,f=s.length;dh){c-=h;continue}t=t.subarray(c),h-=c,c=0}p.set(t,o),o+=h}return n&&(n-=r+3),{data:p,pts:i,dts:a,len:n}}return null}function Y(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&g.logger.log(e.pts+"/"+e.dts+":"+e.debug)}const q=function(){function e(e,t,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=t,this.typeSupported=n}e.probe=function(t){var n=e.syncOffset(t);return n>0&&g.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n),-1!==n},e.syncOffset=function(e){for(var t=e.length,n=Math.min(940,e.length-V)+1,r=0;rn)return r;r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:c.RemuxerTrackIdConfig[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}};var t=e.prototype;return t.resetInitSegment=function(t,n,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video"),this._audioTrack=e.createTrack("audio",i),this._id3Track=e.createTrack("id3"),this._txtTrack=e.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=n,this.videoCodec=r,this._duration=i},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._avcTrack,n=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null},t.demux=function(t,n,a,o){var s;void 0===a&&(a=!1),void 0===o&&(o=!1),a||(this.sampleAes=null);var l=this._avcTrack,u=this._audioTrack,p=this._id3Track,d=this._txtTrack,f=l.pid,h=l.pesData,y=u.pid,v=p.pid,m=u.pesData,b=p.pesData,_=null,E=this.pmtParsed,k=this._pmtId,T=t.length;if(this.remainderData&&(T=(t=(0,c.appendUint8Array)(this.remainderData,t)).length,this.remainderData=null),T>4>1){if((I=S+5+t[S+4])===S+V)continue}else I=S+4;switch(x){case f:C&&(h&&(s=W(h))&&this.parseAVCPES(l,d,s,!1),h={data:[],size:0}),h&&(h.data.push(t.subarray(I,S+V)),h.size+=S+V-I);break;case y:if(C){if(m&&(s=W(m)))switch(u.segmentCodec){case"aac":this.parseAACPES(u,s);break;case"mp3":this.parseMPEGPES(u,s)}m={data:[],size:0}}m&&(m.data.push(t.subarray(I,S+V)),m.size+=S+V-I);break;case v:C&&(b&&(s=W(b))&&this.parseID3PES(p,s),b={data:[],size:0}),b&&(b.data.push(t.subarray(I,S+V)),b.size+=S+V-I);break;case 0:C&&(I+=t[I]+1),k=this._pmtId=G(t,I);break;case k:C&&(I+=t[I]+1);var P=z(t,I,this.typeSupported,a);(f=P.avc)>0&&(l.pid=f),(y=P.audio)>0&&(u.pid=y,u.segmentCodec=P.segmentCodec),(v=P.id3)>0&&(p.pid=v),null===_||E||(g.logger.warn("MPEG-TS PMT found at "+S+" after unknown PID '"+_+"'. Backtracking to sync byte @"+A+" to parse all TS packets."),_=null,S=A-188),E=this.pmtParsed=!0;break;case 17:case 8191:break;default:_=x}}else w++;w>0&&this.observer.emit(r.Events.ERROR,r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"Found "+w+" TS packet/s that do not start with 0x47"}),l.pesData=h,u.pesData=m,p.pesData=b;var D={audioTrack:u,videoTrack:l,id3Track:p,textTrack:d};return o&&this.extractRemainingSamples(D),D},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.videoTrack,i=e.id3Track,a=e.textTrack,o=r.pesData,s=n.pesData,l=i.pesData;if(o&&(t=W(o))?(this.parseAVCPES(r,a,t,!0),r.pesData=null):r.pesData=o,s&&(t=W(s))){switch(n.segmentCodec){case"aac":this.parseAACPES(n,t);break;case"mp3":this.parseMPEGPES(n,t)}n.pesData=null}else null!=s&&s.size&&g.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=s;l&&(t=W(l))?(this.parseID3PES(i,t),i.pesData=null):i.pesData=l},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new j(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.videoTrack;r.samples&&"aac"===r.segmentCodec?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._duration=0},t.parseAVCPES=function(e,t,n,r){var i,a=this,o=this.parseAVCNALu(e,n.data),s=this.avcSample,l=!1;n.data=null,s&&o.length&&!e.audFound&&(Y(s,e),s=this.avcSample=H(!1,n.pts,n.dts,"")),o.forEach((function(r){switch(r.type){case 1:i=!0,s||(s=a.avcSample=H(!0,n.pts,n.dts,"")),s.frame=!0;var o=r.data;if(l&&o.length>4){var u=new F(o).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(s.key=!0)}break;case 5:i=!0,s||(s=a.avcSample=H(!0,n.pts,n.dts,"")),s.key=!0,s.frame=!0;break;case 6:i=!0,(0,c.parseSEIMessageFromNALu)(r.data,1,n.pts,t.samples);break;case 7:if(i=!0,l=!0,!e.sps){var p=new F(r.data).readSPS();e.width=p.width,e.height=p.height,e.pixelRatio=p.pixelRatio,e.sps=[r.data],e.duration=a._duration;for(var d=r.data.subarray(1,4),f="avc1.",h=0;h<3;h++){var g=d[h].toString(16);g.length<2&&(g="0"+g),f+=g}e.codec=f}break;case 8:i=!0,e.pps||(e.pps=[r.data]);break;case 9:i=!1,e.audFound=!0,s&&Y(s,e),s=a.avcSample=H(!1,n.pts,n.dts,"");break;case 12:i=!0;break;default:i=!1,s&&(s.debug+="unknown NAL "+r.type+" ")}s&&i&&s.units.push(r)})),r&&s&&(Y(s,e),this.avcSample=null)},t.getLastNalUnit=function(e){var t,n,r=this.avcSample;if(r&&0!==r.units.length||(r=e[e.length-1]),null!==(t=r)&&void 0!==t&&t.units){var i=r.units;n=i[i.length-1]}return n},t.parseAVCNALu=function(e,t){var n,r,i=t.byteLength,a=e.naluState||0,o=a,s=[],l=0,u=-1,c=0;for(-1===a&&(u=0,c=31&t[0],a=0,l=1);l=0){var p={data:t.subarray(u,l-a-1),type:c};s.push(p)}else{var d=this.getLastNalUnit(e.samples);if(d&&(o&&l<=4-o&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-o)),(r=l-a-1)>0)){var f=new Uint8Array(d.data.byteLength+r);f.set(d.data,0),f.set(t.subarray(0,r),d.data.byteLength),d.data=f,d.state=0}}l=0&&a>=0){var h={data:t.subarray(u,i),type:c,state:a};s.push(h)}if(0===s.length){var g=this.getLastNalUnit(e.samples);if(g){var y=new Uint8Array(g.data.byteLength+t.byteLength);y.set(g.data,0),y.set(t,g.data.byteLength),g.data=y}}return e.naluState=a,s},t.parseAACPES=function(e,t){var n,a,o,s,l,u=0,c=this.aacOverFlow,p=t.data;if(c){this.aacOverFlow=null;var d=c.missing,f=c.sample.unit.byteLength;if(-1===d){var h=new Uint8Array(f+p.byteLength);h.set(c.sample.unit,0),h.set(p,f),p=h}else{var y=f-d;c.sample.unit.set(p.subarray(0,d),y),e.samples.push(c.sample),u=c.missing}}for(n=u,a=p.length;n4?n:"hvc1"===n||"hev1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===Z.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}const ee=function(){function e(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndTime=null}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndTime=null},t.resetNextTimestamp=function(){this.lastEndTime=null},t.resetInitSegment=function(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment((0,c.patchEncyptionData)(e,r)),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=(0,c.parseInitSegment)(e);t||(t=J(r.audio,Z.ElementaryStreamTypes.AUDIO)),n||(n=J(r.video,Z.ElementaryStreamTypes.VIDEO));var i={};r.audio&&r.video?i.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?i.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?i.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:g.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},t.remux=function(e,t,n,r,i){var a,s=this.initPTS,l=this.lastEndTime,u={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};(0,o.isFiniteNumber)(l)||(l=this.lastEndTime=i||0);var p=t.samples;if(!p||!p.length)return u;var d={initPTS:void 0,timescale:1},f=this.initData;if(f&&f.length||(this.generateInitSegment(p),f=this.initData),!f||!f.length)return g.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),u;this.emitInitSegment&&(d.tracks=this.initTracks,this.emitInitSegment=!1);var h=(0,c.getStartDTS)(f,p);(0,o.isFiniteNumber)(s)||(this.initPTS=d.initPTS=s=h-i);var y=(0,c.getDuration)(p,f),v=e?h-s:l,m=v+y;(0,c.offsetStartDTS)(f,p,s),y>0?this.lastEndTime=m:(g.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var b=!!f.audio,_=!!f.video,E="";b&&(E+="audio"),_&&(E+="video");var k={data1:p,startPTS:v,startDTS:v,endPTS:m,endDTS:m,type:E,hasAudio:b,hasVideo:_,nb:1,dropped:0};u.audio="audio"===k.type?k:void 0,u.video="audio"!==k.type?k:void 0,u.initSegment=d;var T=null!=(a=this.initPTS)?a:0;return u.id3=(0,Q.flushTextTrackMetadataCueSamples)(n,i,T,T),r.samples.length&&(u.text=(0,Q.flushTextTrackUserdataCueSamples)(r,i,T)),u},e}();var te;try{te=self.performance.now.bind(self.performance)}catch(e){g.logger.debug("Unable to use Performance API on this environment"),te=self.Date.now}var ne=[{demux:C,remux:ee},{demux:q,remux:Q.default},{demux:w,remux:Q.default},{demux:$,remux:Q.default}],re=function(){function e(e,t,n,r,i){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,r){var i=this,a=n.transmuxing;a.executeStart=te();var o=new Uint8Array(e),s=this.currentTransmuxState,l=this.transmuxConfig;r&&(this.currentTransmuxState=r);var u=r||s,c=u.contiguous,p=u.discontinuity,d=u.trackSwitch,f=u.accurateTimeOffset,h=u.timeOffset,g=u.initSegmentChange,y=l.audioCodec,v=l.videoCodec,m=l.defaultInitPts,b=l.duration,_=l.initSegmentData,E=function(e,t){var n=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}(o,t);if(E&&"AES-128"===E.method){var k=this.getDecrypter();if(!k.isSync())return this.decryptionPromise=k.webCryptoDecrypt(o,E.key.buffer,E.iv.buffer).then((function(e){var t=i.push(e,null,n);return i.decryptionPromise=null,t})),this.decryptionPromise;var T=k.softwareDecrypt(o,E.key.buffer,E.iv.buffer);if(n.part>-1&&(T=k.flush()),!T)return a.executeEnd=te(),ie(n);o=new Uint8Array(T)}var A=this.needsProbing(p,d);A&&this.configureTransmuxer(o),(p||d||g||A)&&this.resetInitSegment(_,y,v,b,t),(p||g||A)&&this.resetInitialTimestamp(m),c||this.resetContiguity();var w=this.transmux(o,E,h,f,n),S=this.currentTransmuxState;return S.contiguous=!0,S.discontinuity=!1,S.trackSwitch=!1,a.executeEnd=te(),w},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=te();var a=this.decrypter,o=this.currentTransmuxState,s=this.decryptionPromise;if(s)return s.then((function(){return t.flush(e)}));var l=[],u=o.timeOffset;if(a){var c=a.flush();c&&l.push(this.push(c,null,e))}var p=this.demuxer,d=this.remuxer;if(!p||!d)return this.observer.emit(r.Events.ERROR,r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=te(),[ie(e)];var f=p.flush(u);return ae(f)?f.then((function(n){return t.flushRemux(l,n,e),l})):(this.flushRemux(l,f,e),l)},t.flushRemux=function(e,t,n){var r=t.audioTrack,i=t.videoTrack,a=t.id3Track,o=t.textTrack,s=this.currentTransmuxState,l=s.accurateTimeOffset,u=s.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var c=this.remuxer.remux(r,i,a,o,u,l,!0,this.id);e.push({remuxResult:c,chunkMeta:n}),n.transmuxing.executeEnd=te()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r,i){var a=this.demuxer,o=this.remuxer;a&&o&&(a.resetInitSegment(e,t,n,r),o.resetInitSegment(e,t,n,i))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),a=i.audioTrack,o=i.videoTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var a=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,n,r,!1,a.id),chunkMeta:i}}))},t.configureTransmuxer=function(e){for(var t,n=this.config,r=this.observer,i=this.typeSupported,a=this.vendor,o=0,s=ne.length;o{"use strict";var r,i;n.r(t),n.d(t,{ErrorDetails:()=>i,ErrorTypes:()=>r}),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(r||(r={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown"}(i||(i={}))},851:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{Events:()=>r}),function(e){e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached"}(r||(r={}))},76:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Tr});var r,i=n(945),a=n(965),o=n(851),s=n(973),l=n(93),u=/^(\d+)x(\d+)$/,c=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,p=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&(this[n]=t[n])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=u.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(c.lastIndex=0;null!==(t=c.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}();function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(!this.endOnNext||!!this.class)}}])&&function(e,t){for(var n=0;ne.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(n=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&(0,a.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&function(e,t){for(var n=0;n>8*(15-n)&255;return t}(t);return new e(this.method,this.uri,"identity",this.keyFormatVersions,n)}var r=function(e){var t,n,r=e.split(":"),i=null;if("data"===r[0]&&2===r.length){var a=r[1].split(";"),o=a[a.length-1].split(",");if(2===o.length){var s="base64"===o[0],l=o[1];s?(a.splice(-1,1),i=b(l)):(t=_(l).subarray(0,16),(n=new Uint8Array(16)).set(t,16-t.length),i=n)}}return i}(this.uri);if(r)switch(this.keyFormat){case h.WIDEVINE:this.pssh=r,r.length>=22&&(this.keyId=r.subarray(r.length-22,r.length-6));break;case h.PLAYREADY:var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=(0,w.mp4pssh)(i,null,r);var a=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),o=String.fromCharCode.apply(null,Array.from(a)),s=o.substring(o.indexOf("<"),o.length),u=(new DOMParser).parseFromString(s,"text/xml").getElementsByTagName("KID")[0];if(u){var c=u.childNodes[0]?u.childNodes[0].nodeValue:u.getAttribute("VALUE");if(c){var p=b(c).subarray(0,16);!function(e){var t=function(e,t,n){var r=e[t];e[t]=e[n],e[n]=r};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(p),this.keyId=p}}break;default:var d=r.subarray(0,16);if(16!==d.length){var f=new Uint8Array(16);f.set(d,16-d.length),d=f}this.keyId=d}if(!this.keyId||16!==this.keyId.byteLength){var g=S[this.uri];if(!g){var y=Object.keys(S).length%Number.MAX_SAFE_INTEGER;g=new Uint8Array(16),new DataView(g.buffer,12,4).setUint32(0,y),S[this.uri]=g}this.keyId=g}return this},e}(),x={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function I(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}function P(){return(P=Object.assign?Object.assign.bind():function(e){for(var t=1;t2){var n=t.shift()+".";return(n+=parseInt(t.shift()).toString(16))+("000"+parseInt(t.shift()).toString(16)).slice(-4)}return e},e.resolve=function(e,t){return(0,i.buildAbsoluteURL)(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[],a=[],o={},s=[],u=!1;for(D.lastIndex=0;null!=(r=D.exec(t));)if(r[1]){var c,d=new p(r[1]),f={attrs:d,bitrate:d.decimalInteger("AVERAGE-BANDWIDTH")||d.decimalInteger("BANDWIDTH"),name:d.NAME,url:e.resolve(r[2],n)},h=d.decimalResolution("RESOLUTION");h&&(f.width=h.width,f.height=h.height),U((d.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),f),f.videoCodec&&-1!==f.videoCodec.indexOf("avc1")&&(f.videoCodec=e.convertAVC1ToAVCOTI(f.videoCodec)),null!==(c=f.unknownCodecs)&&void 0!==c&&c.length||a.push(f),i.push(f)}else if(r[3]){var g=new p(r[3]);g["DATA-ID"]&&(u=!0,o[g["DATA-ID"]]=g)}else if(r[4]){var y=r[4],v=N(y,n);v.encrypted&&v.isSupported()?s.push(v):l.logger.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+y+'"')}return{levels:a.length>0&&a.length0&&q.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=q.optionalFloat("PART-HOLD-BACK",0),c.holdBack=q.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var X=new p(I);c.partTarget=X.decimalFloatingPoint("PART-TARGET");break;case"PART":var $=c.partList;$||($=c.partList=[]);var Q=g>0?$[$.length-1]:void 0,Z=g++,J=new v.Part(new p(I),k,t,Z,Q);$.push(J),k.duration+=J.duration;break;case"PRELOAD-HINT":var ee=new p(I);c.preloadHint=ee;break;case"RENDITION-REPORT":var te=new p(I);c.renditionReports=c.renditionReports||[],c.renditionReports.push(te);break;default:l.logger.warn("line parsed but not handled: "+o)}}}E&&!E.relurl?(d.pop(),b-=E.duration,c.partList&&(c.fragmentHint=E)):c.partList&&(j(k,E),k.cc=_,c.fragmentHint=k,u&&V(k,u,c));var ne=d.length,re=d[0],ie=d[ne-1];if((b+=c.skippedSegments*c.targetduration)>0&&ne&&ie){c.averagetargetduration=b/ne;var ae=ie.sn;c.endSN="initSegment"!==ae?ae:0,c.live||(ie.endList=!0),re&&(c.startCC=re.cc)}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(b+=c.fragmentHint.duration),c.totalduration=b,c.endCC=_,T>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(d,T),c},e}();function N(e,t){var n,r,i=new p(e),a=null!=(n=i.enumeratedString("METHOD"))?n:"",o=i.URI,s=i.hexadecimalInteger("IV"),u=i.enumeratedString("KEYFORMATVERSIONS"),c=null!=(r=i.enumeratedString("KEYFORMAT"))?r:"identity";o&&i.IV&&!s&&l.logger.error("Invalid IV: "+i.IV);var d=o?M.resolve(o,t):"",f=(u||"1").split("/").map(Number).filter(Number.isFinite);return new C(a,d,c,f,s)}function U(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return function(e,t){var n=x[t];return!!n&&!0===n[e.slice(0,4)]}(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function F(e,t,n){var r=t[n];r&&(e[n]=r)}function j(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),(0,a.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function B(e,t,n,r){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=n,e.sn="initSegment",r&&(e.levelkeys=r),e.initSegment=null}function V(e,t,n){e.levelkeys=t;var r=n.encryptedFragments;r.length&&r[r.length-1].levelkeys===t||!Object.keys(t).some((function(e){return t[e].isCommonEncryption}))||r.push(e)}var H=n(308);function K(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}const G=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.startLoad=function(e){},t.stopLoad=function(){this.destroyInternalLoaders()},t.registerListeners=function(){var e=this.hls;e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(o.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(o.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(o.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:H.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:H.PlaylistContextType.LEVEL,url:i,deliveryDirectives:a})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:H.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:a})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:H.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i,a,o,s=this.hls.config,u=this.getInternalLoader(e);if(u){var c=u.context;if(c&&c.url===e.url)return void l.logger.trace("[playlist-loader]: playlist request ongoing");l.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),u.abort()}switch(e.type){case H.PlaylistContextType.MANIFEST:n=s.manifestLoadingMaxRetry,r=s.manifestLoadingTimeOut,i=s.manifestLoadingRetryDelay,a=s.manifestLoadingMaxRetryTimeout;break;case H.PlaylistContextType.LEVEL:case H.PlaylistContextType.AUDIO_TRACK:case H.PlaylistContextType.SUBTITLE_TRACK:n=0,r=s.levelLoadingTimeOut;break;default:n=s.levelLoadingMaxRetry,r=s.levelLoadingTimeOut,i=s.levelLoadingRetryDelay,a=s.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===H.PlaylistContextType.LEVEL&&null!==e.level?o=this.hls.levels[e.level].details:e.type===H.PlaylistContextType.AUDIO_TRACK&&null!==e.id?o=this.hls.audioTracks[e.id].details:e.type===H.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(o=this.hls.subtitleTracks[e.id].details),o)){var p=o.partTarget,d=o.targetduration;p&&d&&(r=Math.min(1e3*Math.max(3*p,.8*d),r))}var f={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:a,highWaterMark:0},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(e,f,h)},t.loadsuccess=function(e,t,n,r){void 0===r&&(r=null),this.resetInternalLoader(n.type);var i=e.data;0===i.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,n,r):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},t.loaderror=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!1,e)},t.loadtimeout=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!0)},t.handleMasterPlaylist=function(e,t,n,r){var i=this.hls,a=e.data,s=K(e,n),u=M.parseMasterPlaylist(a,s),c=u.levels,d=u.sessionData,f=u.sessionKeys;if(c.length){var h=c.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),g=c.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),y=M.parseMasterPlaylistMedia(a,s,"AUDIO",h),v=M.parseMasterPlaylistMedia(a,s,"SUBTITLES",g),m=M.parseMasterPlaylistMedia(a,s,"CLOSED-CAPTIONS");y.length&&(y.some((function(e){return!e.url}))||!c[0].audioCodec||c[0].attrs.AUDIO||(l.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),y.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new p({}),bitrate:0,url:""}))),i.trigger(o.Events.MANIFEST_LOADED,{levels:c,audioTracks:y,subtitles:v,captions:m,url:s,stats:t,networkDetails:r,sessionData:d,sessionKeys:f})}else this.handleManifestParsingError(e,n,"no level found in manifest",r)},t.handleTrackOrLevelPlaylist=function(e,t,n,r){var i=this.hls,l=n.id,u=n.level,c=n.type,d=K(e,n),f=(0,a.isFiniteNumber)(l)?l:0,h=(0,a.isFiniteNumber)(u)?u:f,g=function(e){switch(e.type){case H.PlaylistContextType.AUDIO_TRACK:return H.PlaylistLevelType.AUDIO;case H.PlaylistContextType.SUBTITLE_TRACK:return H.PlaylistLevelType.SUBTITLE;default:return H.PlaylistLevelType.MAIN}}(n),y=M.parseLevelPlaylist(e.data,d,h,g,f);if(y.fragments.length){if(c===H.PlaylistContextType.MANIFEST){var v={attrs:new p({}),bitrate:0,details:y,name:"",url:d};i.trigger(o.Events.MANIFEST_LOADED,{levels:[v],audioTracks:[],url:d,stats:t,networkDetails:r,sessionData:null,sessionKeys:null})}t.parsing.end=performance.now(),n.levelDetails=y,this.handlePlaylistLoaded(e,t,n,r)}else i.trigger(o.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:d,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},t.handleManifestParsingError=function(e,t,n,r){this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===H.PlaylistContextType.MANIFEST,url:e.url,reason:n,response:e,context:t,networkDetails:r})},t.handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),l.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var i=s.ErrorDetails.UNKNOWN,a=!1,u=this.getInternalLoader(e);switch(e.type){case H.PlaylistContextType.MANIFEST:i=n?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,a=!0;break;case H.PlaylistContextType.LEVEL:i=n?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,a=!1;break;case H.PlaylistContextType.AUDIO_TRACK:i=n?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,a=!1;break;case H.PlaylistContextType.SUBTITLE_TRACK:i=n?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,a=!1}u&&this.resetInternalLoader(e.type);var c={type:s.ErrorTypes.NETWORK_ERROR,details:i,fatal:a,url:e.url,loader:u,context:e,networkDetails:t};r&&(c.response=r),this.hls.trigger(o.Events.ERROR,c)},t.handlePlaylistLoaded=function(e,t,n,r){var i=n.type,a=n.level,s=n.id,l=n.groupId,u=n.loader,c=n.levelDetails,p=n.deliveryDirectives;if(null!=c&&c.targetduration){if(u)switch(c.live&&(u.getCacheAge&&(c.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(c.ageHeader)||(c.ageHeader=0)),i){case H.PlaylistContextType.MANIFEST:case H.PlaylistContextType.LEVEL:this.hls.trigger(o.Events.LEVEL_LOADED,{details:c,level:a||0,id:s||0,stats:t,networkDetails:r,deliveryDirectives:p});break;case H.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(o.Events.AUDIO_TRACK_LOADED,{details:c,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:p});break;case H.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(o.Events.SUBTITLE_TRACK_LOADED,{details:c,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:p})}}else this.handleManifestParsingError(e,n,"invalid target duration",r)},e}();function z(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function W(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){l.logger.debug("[texttrack-utils]: "+n);var r=new self.TextTrackCue(t.startTime,t.endTime,t.text);r.id=t.id,e.addCue(r)}"disabled"===n&&(e.mode=n)}function Y(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function q(e,t,n,r){var i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var a=function(e,t,n){var r=[],i=function(e,t){if(te[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(te[a].startTime&&r-1)for(var a=i,o=e.length;a=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}(e.cues,t,n),o=0;oZ&&(p=Z),p-c<=0&&(p=c+.25);for(var d=0;di.startDate&&e.push(n),e}),[]).sort((function(e,t){return e.startDate.getTime()-t.startDate.getTime()}))[0];y&&(d=J(y.startDate,h),c=!0)}for(var v,m=Object.keys(i.attr),b=0;b.05&&this.forwardBufferLength>1){var u=Math.min(2,Math.max(1,a)),c=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(u,Math.max(1,c))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},r.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},r.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,u=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===u)&&(u=void 0!==a?a:o*r);var c=r;return u+Math.min(1*this.stallCount,c)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}}])&&function(e,t){for(var n=0;ne.sn?(i=n-e.start,r=e):(i=e.start-n,r=t),r.duration!==i&&(r.duration=i)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function ce(e,t,n,r,i,o){r-n<=0&&(l.logger.warn("Fragment should have a positive duration",t),r=n+t.duration,o=i+t.duration);var s=n,u=r,c=t.startPTS,p=t.endPTS;if((0,a.isFiniteNumber)(c)){var d=Math.abs(c-n);(0,a.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(d,t.deltaPTS):t.deltaPTS=d,s=Math.max(n,c),n=Math.min(n,c),i=Math.min(i,t.startDTS),u=Math.min(r,p),r=Math.max(r,p),o=Math.max(o,t.endDTS)}t.duration=r-n;var f=n-t.start;t.start=t.startPTS=n,t.maxStartPTS=s,t.startDTS=i,t.endPTS=r,t.minEndPTS=u,t.endDTS=o;var h,g=t.sn;if(!e||ge.endSN)return 0;var y=g-e.startSN,v=e.fragments;for(v[y]=t,h=y;h>0;h--)ue(v[h],v[h-1]);for(h=y;h=r.length||de(t,r[n].start)}function de(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r=0&&u>t.partTarget&&(s+=1)}return new ie(o,s>=0?s:void 0,te.No)}}},t.loadPlaylist=function(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())},t.shouldLoadTrack=function(e){return this.canLoad&&e&&!!e.url&&(!e.details||e.details.live)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,o=t.stats,s=self.performance.now(),u=o.loading.first?Math.max(0,s-o.loading.first):0;if(i.advancedDateTime=Date.now()-u,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&function(e,t){for(var n=null,r=e.fragments,i=r.length-1;i>=0;i--){var o=r[i].initSegment;if(o){n=o;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var s,u,c,p,d,f=0;if(function(e,t,n){for(var r=t.skippedSegments,i=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(r?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,s=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,u=i;u<=a;u++){var c=l[o+u],p=s[u];r&&!p&&u0){if(n&&E>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+E+" with playlist age: "+i.age),E=0;else{var k=Math.floor(E/i.targetduration);p+=k,void 0!==d&&(d+=Math.round(E%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+b.toFixed(2)+"s goal: "+E+" skip sn "+k+" to part "+d)}i.tuneInGoal=E}if(c=this.getDeliveryDirectives(i,t.deliveryDirectives,p,d),f||!m)return void this.loadPlaylist(c)}else c=this.getDeliveryDirectives(i,t.deliveryDirectives,p,d);var T=this.hls.mainForwardBufferInfo,A=T?T.end-T.len:0,w=function(e,t){void 0===t&&(t=1/0);var n=1e3*e.targetduration;if(e.updated){var r=e.fragments;if(r.length&&4*n>t){var i=1e3*r[r.length-1].duration;ithis.requestScheduled+w&&(this.requestScheduled=o.loading.start):this.requestScheduled=-1,void 0!==p&&i.canBlockReload?this.requestScheduled=o.loading.first+w-(1e3*i.partTarget||1e3):this.requestScheduled=(-1===this.requestScheduled?s:this.requestScheduled)+w;var S=this.requestScheduled-s;S=Math.max(0,S),this.log("reload live playlist "+e+" in "+Math.round(S)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(c)}),S)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var i=function(e,t){var n=e.canSkipUntil,r=e.canSkipDateRanges,i=e.endSN;return n&&(void 0!==t?t-i:0)-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return i},e}();function he(){return(he=Object.assign?Object.assign.bind():function(e){for(var t=1;t0){n=i[0].bitrate,i.sort((function(e,t){return e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"]?(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1:e.bitrate!==t.bitrate?e.bitrate-t.bitrate:e.attrs.SCORE!==t.attrs.SCORE?e.attrs.decimalFloatingPoint("SCORE")-t.attrs.decimalFloatingPoint("SCORE"):c&&e.height!==t.height?e.height-t.height:0})),this._levels=i;for(var f=0;fthis.hls.config.fragLoadingMaxRetry&&(l=p)):l=p}break;case s.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:var f=o.attrs["HDCP-LEVEL"];f&&(this.hls.maxHdcpLevel=re[re.indexOf(f)-1],this.warn('Restricting playback to HDCP-LEVEL of "'+this.hls.maxHdcpLevel+'" or lower'));case s.ErrorDetails.FRAG_PARSING_ERROR:case s.ErrorDetails.KEY_SYSTEM_NO_SESSION:l=(null===(r=n.frag)||void 0===r?void 0:r.type)===H.PlaylistLevelType.MAIN?n.frag.level:this.currentLevelIndex,n.levelRetry=!1;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:a&&(a.deliveryDirectives&&(c=!1),l=a.level),u=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:l=null!=(i=n.level)?i:this.currentLevelIndex,u=!0}void 0!==l&&this.recoverLevel(n,l,u,c)}}},l.recoverLevel=function(e,t,n,r){var i=e.details,a=this._levels[t];if(a.loadError++,n){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(r){var o=a.url.length;if(o>1&&a.loadError-1&&this.currentLevelIndex!==s?(this.warn(i+": switch to "+s),e.levelRetry=!0,this.hls.nextAutoLevel=s):!1===e.levelRetry&&(e.fatal=!0)}}},l.redundantFailover=function(e){var t=this._levels[e],n=t.url.length;if(n>1){var r=(t.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(e){e.urlId=r})),this.level=e}},l.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===H.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},l.onLevelLoaded=function(e,t){var n,r,i=t.level,a=t.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,o.details)):null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(a.deltaUpdateFailed=!0)},l.onAudioTrackSwitched=function(e,t){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[t.id].groupId,a=0;a0){var i=r.urlId,a=r.url[i];if(t)try{a=t.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+n+(void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+i+" "+a),this.clearTimer(),this.hls.trigger(o.Events.LEVEL_LOADING,{url:a,level:n,id:i,deliveryDirectives:t||null})}},l.removeLevel=function(e,t){var n=function(e,n){return n!==t},r=this._levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(e,t){var n=e.details;return null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(o.Events.LEVELS_UPDATED,{levels:r})},i=r,(a=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==e||null===(t=n[e])||void 0===t||!t.details)){if(e<0||e>=n.length){var r=e<0;if(this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:r,reason:"invalid level idx"}),r)return;e=Math.min(e,n.length-1)}this.clearTimer();var i=this.currentLevelIndex,a=n[i],l=n[e];this.log("switching to level "+e+" from "+i),this.currentLevelIndex=e;var u=he({},l,{level:e,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete u._urlId,this.hls.trigger(o.Events.LEVEL_SWITCHING,u);var c=l.details;if(!c||c.live){var p=this.switchParams(l.uri,null==a?void 0:a.details);this.loadPlaylist(p)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&function(e,t){for(var n=0;n9&&(this.activeParts=r.slice(i-9)),a}else if(n.start<=e&&void 0!==n.appendedPTS&&e<=n.appendedPTS)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===t&&a.buffered){var o=a.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,n){var r=this;this.timeRanges&&(this.timeRanges[e]=t),Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a)if(a.buffered||a.loaded){var o=a.range[e];o&&o.time.some((function(e){var n=!r.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&r.removeFragment(a.body),n}))}else a.body.type===n&&r.removeFragment(a.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=Ee(r),o=this.fragments[a];o&&(Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var s=n[e],l=null!==i||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,l,s)}})),o.loaded=null,Object.keys(o.range).length?(o.buffered=!0,o.body.endList&&(this.endListFragments[o.body.type]=o)):this.removeFragment(o.body))}},t.fragBuffered=function(e){var t=Ee(e),n=this.fragments[t];n&&(n.loaded=null,n.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=t?t.start:e.start,o=t?t.end:e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,u=0;u=c&&s<=p){i.time.push({startPTS:Math.max(a,r.start(u)),endPTS:Math.min(o,r.end(u))});break}if(ac)i.partial=!0,i.time.push({startPTS:Math.max(a,r.start(u)),endPTS:Math.min(o,r.end(u))});else if(o<=c)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,a=0,o=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach((function(l){var u=s[l];u&&_e(u)&&(n=u.body.start-o,r=u.body.end+o,e>=n&&e<=r&&(t=Math.min(e-n,r-e),a<=t&&(i=u.body,a=t)))})),i},t.isEndListAppended=function(e){var t=this.endListFragments[e];return void 0!==t&&(t.buffered||_e(t))},t.getState=function(e){var t=Ee(e),n=this.fragments[t];return n?n.buffered?_e(n)?ye.PARTIAL:ye.OK:ye.APPENDING:ye.NOT_LOADED},t.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=Ee(n);this.fragments[i]={body:n,loaded:t,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,a=t.timeRanges;if(r.type===H.PlaylistLevelType.MAIN)if(this.activeFragment!==r&&(this.activeFragment=r,r.appendedPTS=void 0),i){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(i)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach((function(e){var t=a[e];if(n.detectEvictedFragments(e,t),!i&&r.type===H.PlaylistLevelType.MAIN){var o=r.elementaryStreams[e];if(!o)return;for(var s=0;so.startPTS?r.appendedPTS=Math.max(l,r.appendedPTS||0):r.appendedPTS=o.endPTS}}}))},t.onFragBuffered=function(e,t){this.detectPartialFragments(t)},t.hasFragment=function(e){var t=Ee(e);return!!this.fragments[t]},t.removeFragmentsInRange=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a&&a.buffered){var o=a.body;o.type===n&&o.starte&&r.removeFragment(o)}}))},t.removeFragment=function(e){var t=Ee(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),e.appendedPTS=void 0,delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function _e(e){var t,n;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(n=e.range.audio)||void 0===n?void 0:n.partial))}function Ee(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}function ke(e){var t="function"==typeof Map?new Map:void 0;return(ke=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Te(e,arguments,Se(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),we(r,e)})(e)}function Te(e,t,n){return(Te=Ae()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&we(i,n.prototype),i}).apply(null,arguments)}function Ae(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function we(e,t){return(we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Se(e){return(Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ce=Math.pow(2,17),xe=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,r=e.url;if(!r)return Promise.reject(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var i=this.config,a=i.fLoader,o=i.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var u=n.loader=e.loader=a?new a(i):new o(i),c=Ie(e),p={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:"initSegment"===e.sn?1/0:Ce};e.stats=u.stats,u.load(c,p,{onSuccess:function(t,i,a,o){n.resetLoader(e,u);var s=t.data;a.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(s.slice(0,16)),s=s.slice(16)),r({frag:e,part:null,payload:s,networkDetails:o})},onError:function(t,r,i){n.resetLoader(e,u),l(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:i}))},onAbort:function(t,r,i){n.resetLoader(e,u),l(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:i}))},onTimeout:function(t,r,i){n.resetLoader(e,u),l(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:i}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var r=this;this.abort();var i=this.config,a=i.fLoader,o=i.loader;return new Promise((function(l,u){r.loader&&r.loader.destroy();var c=r.loader=e.loader=a?new a(i):new o(i),p=Ie(e,t),d={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:Ce};t.stats=c.stats,c.load(p,d,{onSuccess:function(i,a,o,s){r.resetLoader(e,c),r.updateStatsFromPart(e,t);var u={frag:e,part:t,payload:i.data,networkDetails:s};n(u),l(u)},onError:function(n,i,a){r.resetLoader(e,c),u(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:n,networkDetails:a}))},onAbort:function(n,i,a){e.stats.aborted=t.stats.aborted,r.resetLoader(e,c),u(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:a}))},onTimeout:function(n,i,a){r.resetLoader(e,c),u(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:a}))}})}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(e.duration/t.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,u=r.loading;l.start?l.first+=u.first-u.start:(l.start=u.start,l.first=u.first),l.end=u.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function Ie(e,t){void 0===t&&(t=null);var n=t||e,r={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},i=n.byteRangeStartOffset,o=n.byteRangeEndOffset;if((0,a.isFiniteNumber)(i)&&(0,a.isFiniteNumber)(o)){var s,l=i,u=o;if("initSegment"===e.sn&&"AES-128"===(null===(s=e.decryptdata)||void 0===s?void 0:s.method)){var c=o-i;c%16&&(u=o+(16-c%16)),0!==i&&(r.resetIV=!0,l=i-16)}r.rangeStart=l,r.rangeEnd=u}return r}var Pe=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}(),Oe={length:0,start:function(){return 0},end:function(){return 0}},Le=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,a=e.getBuffered(t),o=[];for(i=0;io&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,u=t,c=t,p=0;p=d&&t0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null};function Ve(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=null;if(e?i=t[e.sn-t[0].sn+1]||null:0===n&&0===t[0].start&&(i=t[0]),i&&0===He(n,r,i))return i;var a=Be(t,He.bind(null,n,r));return!a||a===e&&i?i:a}function He(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=0),n.start<=e&&n.start+n.duration>e)return 0;var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function Ke(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}var Ge=n(21);function ze(e,t){return(ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var We="STOPPED",Ye="IDLE",qe="KEY_LOADING",Xe="FRAG_LOADING",$e="FRAG_LOADING_WAITING_RETRY",Qe="WAITING_TRACK",Ze="PARSING",Je="PARSED",et="ENDED",tt="ERROR",nt="WAITING_INIT_PTS",rt="WAITING_LEVEL",it=function(e){var t,n;function r(t,n,r,i){var a;return(a=e.call(this)||this).hls=void 0,a.fragPrevious=null,a.fragCurrent=null,a.fragmentTracker=void 0,a.transmuxer=null,a._state=We,a.media=null,a.mediaBuffer=null,a.config=void 0,a.bitrateTest=!1,a.lastCurrentTime=0,a.nextLoadPosition=0,a.startPosition=0,a.loadedmetadata=!1,a.fragLoadError=0,a.retryDate=0,a.levels=null,a.fragmentLoader=void 0,a.keyLoader=void 0,a.levelLastLoaded=null,a.startFragRequested=!1,a.decrypter=void 0,a.initPTS=[],a.onvseeking=null,a.onvended=null,a.logPrefix="",a.log=void 0,a.warn=void 0,a.logPrefix=i,a.log=l.logger.log.bind(l.logger,i+":"),a.warn=l.logger.warn.bind(l.logger,i+":"),a.hls=t,a.fragmentLoader=new xe(t.config),a.keyLoader=r,a.fragmentTracker=n,a.config=t.config,a.decrypter=new Ge.default(t.config),t.on(o.Events.LEVEL_SWITCHING,a.onLevelSwitching,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a)),a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ze(t,n);var i,u,c=r.prototype;return c.doTick=function(){this.onTickEnd()},c.onTickEnd=function(){},c.startLoad=function(e){},c.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort();var e=this.fragCurrent;e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=We},c._streamEnded=function(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;var n=t.partList;if(null!=n&&n.length){var r=n[n.length-1];return Le.isBuffered(this.media,r.start+r.duration/2)}var i=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(i)},c.getLevelDetails=function(){var e;if(this.levels&&null!==this.levelLastLoaded)return null===(e=this.levels[this.levelLastLoaded])||void 0===e?void 0:e.details},c.onMediaAttached=function(e,t){var n=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.state===We&&this.startLoad(r.startPosition)},c.onMediaDetaching=function(){var e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,n=this.media,r=this.mediaBuffer,i=this.state,o=n?n.currentTime:0,s=Le.bufferInfo(r||n,o,e.maxBufferHole);if(this.log("media seeking to "+((0,a.isFiniteNumber)(o)?o.toFixed(3):o)+", state: "+i),this.state===et)this.resetLoadingState();else if(t){var l=e.maxFragLookUpTolerance,u=t.start-l,c=t.start+t.duration+l;if(!s.len||cs.end){var p=o>c;(o0&&a&&a.key&&a.iv&&"AES-128"===a.method){var s=self.performance.now();return n.decrypter.decrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).then((function(n){var i=self.performance.now();return r.trigger(o.Events.FRAG_DECRYPTED,{frag:e,payload:n,stats:{tstart:s,tdecrypt:i}}),t.payload=n,t}))}return t})).then((function(t){var r=n.fragCurrent,i=n.hls,a=n.levels;if(!a)throw new Error("init load aborted, missing levels");a[e.level].details;var s=e.stats;n.state=Ye,n.fragLoadError=0,e.data=new Uint8Array(t.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),t.frag===r&&i.trigger(o.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:e.type}),n.tick()})).catch((function(t){n.state!==We&&n.state!==tt&&(n.warn(t),n.resetFragmentLoading(e))}))},c.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},c.fragBufferedComplete=function(e,t){var n,r,i,a,o=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" (frag:["+(null!=(n=e.startPTS)?n:NaN).toFixed(3)+"-"+(null!=(r=e.endPTS)?r:NaN).toFixed(3)+"] > buffer:"+(o?function(e){for(var t="",n=e.length,r=0;re.end&&t.fragmentHint&&(e=t.fragmentHint);var c=this.getNextPart(u,e,n);if(c>-1){var p=u[c];return this.log("Loading part sn: "+e.sn+" p: "+p.index+" cc: "+e.cc+" of playlist ["+t.startSN+"-"+t.endSN+"] parts [0-"+c+"-"+(u.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=p.start+p.duration,this.state=Xe,this.hls.trigger(o.Events.FRAG_LOADING,{frag:e,part:u[c],targetBufferTime:n}),this.throwIfFragContextChanged("FRAG_LOADING parts"),l?l.then((function(t){return!t||s.fragContextChanged(t.frag)?null:s.doFragPartsLoad(e,u,c,r)})).catch((function(e){return s.handleFragLoadError(e)})):this.doFragPartsLoad(e,u,c,r).catch((function(e){return s.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(u,n))return Promise.resolve(null)}}this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(t?"of ["+t.startSN+"-"+t.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),(0,a.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Xe,this.hls.trigger(o.Events.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.throwIfFragContextChanged("FRAG_LOADING");var d=this.config.progressive;return d&&l?l.then((function(t){return!t||s.fragContextChanged(null==t?void 0:t.frag)?null:s.fragmentLoader.load(e,r)})).catch((function(e){return s.handleFragLoadError(e)})):Promise.all([this.fragmentLoader.load(e,d?r:void 0),l]).then((function(e){var t=e[0];return!d&&t&&r&&r(t),t})).catch((function(e){return s.handleFragLoadError(e)}))},c.throwIfFragContextChanged=function(e){if(null===this.fragCurrent)throw new Error("frag load aborted, context changed in "+e)},c.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,s){var l=[];!function n(u){var c=t[u];i.fragmentLoader.loadPart(e,c,r).then((function(r){l[c.index]=r;var s=r.part;i.hls.trigger(o.Events.FRAG_LOADED,r);var p=t[u+1];if(!p||p.fragment!==e)return a({frag:e,part:s,partsLoaded:l});n(u+1)})).catch(s)}(n)}))},c.handleFragLoadError=function(e){if("data"in e){var t=e.data;e.data&&t.details===s.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(o.Events.ERROR,t)}else this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,err:e,fatal:!0});return null},c._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===Ze){var n=t.frag,r=t.part,i=t.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||this.state===We||this.state===tt||(this.state=Ye)},c.getCurrentContext=function(e){var t=this.levels,n=e.level,r=e.sn,i=e.part;if(!t||!t[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var a=t[n],o=i>-1?function(e,t,n){if(!e||!e.details)return null;var r=e.details.partList;if(r)for(var i=r.length;i--;){var a=r[i];if(a.index===n&&a.fragment.sn===t)return a}return null}(a,r,i):null,s=o?o.fragment:function(e,t,n){if(!e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:ta&&this.flushMainBuffer(o,e.start)}else this.flushMainBuffer(0,e.start)},c.getFwdBufferInfo=function(e,t){var n=this.config,r=this.getLoadPosition();if(!(0,a.isFiniteNumber)(r))return null;var i=Le.bufferInfo(e,r,n.maxBufferHole);if(0===i.len&&void 0!==i.nextStart){var o=this.fragmentTracker.getBufferedFrag(r,t);if(o&&i.nextStart=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},c.getNextFragment=function(e,t){var n=t.fragments,r=n.length;if(!r)return null;var i,a=this.config,o=n[0].start;if(t.live){var s=a.initialLiveManifestSize;if(r-1&&nn.start&&n.loaded},c.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=function(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!(0,a.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var r=0;r=e.startSN&&i<=e.endSN){var o=t[i-e.startSN];n.cc===o.cc&&(r=o,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=function(e,t){return Be(e,(function(e){return e.cct?-1:0}))}(t,n.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var s=this.hls.liveSyncPosition;null!==s&&(r=this.getFragmentAtPosition(s,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r},c.getFragmentAtPosition=function(e,t,n){var r,i=this.config,a=this.fragPrevious,o=n.fragments,s=n.endSN,l=n.fragmentHint,u=i.maxFragLookUpTolerance,c=!!(i.lowLatencyMode&&n.partList&&l);if(c&&l&&!this.bitrateTest&&(o=o.concat(l),s=l.sn),r=et-u?0:u):o[o.length-1]){var p=r.sn-n.startSN;if(this.fragmentTracker.getState(r)===ye.OK&&(a=r),a&&r.sn===a.sn&&!c&&a&&r.level===a.level){var d=o[p+1];r.sn=a-t.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(in.startCC||e&&e.cc"+e.startSN+" prev-sn: "+(i?i.sn:"na")+" fragments: "+s),d}return u},c.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},c.setStartPosition=function(e,t){var n=this.startPosition;if(n"+e))}}])&&function(e,t){for(var n=0;n/);if(!o)return i;for(var s,l=o[1],u=new RegExp("(\\\\n|\\W)"+ut(l)+lt,"g");s=u.exec(a);)"dll-reference"!==s[3]&&i[r].push(s[3]);for(u=new RegExp("\\("+ut(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)'+lt,"g");s=u.exec(a);)e[s[2]]||(i[r].push(s[1]),e[s[2]]=n(s[1]).m),i[s[2]]=i[s[2]]||[],i[s[2]].push(s[4]);for(var c,p=Object.keys(i),d=0;d0}),!1)}function dt(e,t,n,r){var i=e[r].map((function(e){return'"'+e+'": '+t[r][e].toString().replace(/^"[^"]+"/,"function")})).join(",");return st[0]+"{"+i+"}"+st[1]+'"'+n+'"'+st[2]}var ft=n(544),ht=n(729),gt=n.n(ht),yt=at()||{isTypeSupported:function(){return!1}},vt=function(){function e(e,t,r,i){var a=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;var u=e.config;this.hls=e,this.id=t,this.useWorker=!!u.enableWorker,this.onTransmuxComplete=r,this.onFlush=i;var c=function(e,t){(t=t||{}).frag=a.frag,t.id=a.id,a.hls.trigger(e,t)};this.observer=new ht.EventEmitter,this.observer.on(o.Events.FRAG_DECRYPTED,c),this.observer.on(o.Events.ERROR,c);var p={mp4:yt.isTypeSupported("video/mp4"),mpeg:yt.isTypeSupported("audio/mpeg"),mp3:yt.isTypeSupported('audio/mp4; codecs="mp3"')},d=navigator.vendor;if(this.useWorker&&"undefined"!=typeof Worker){var f;l.logger.log("demuxing in webworker");try{f=this.worker=function(e,t){t=t||{};var r={main:n.m},i=t.all?{main:Object.keys(r.main)}:function(e,t){for(var n={main:[182]},r={main:[]},i={main:{}};pt(n);)for(var a=Object.keys(n),o=0;o1&&u.id===(null==m?void 0:m.stats.chunkCount),A=!_&&(1===E||0===E&&(1===k||T&&k<=0)),w=self.performance.now();(_||E||0===i.stats.parsing.start)&&(i.stats.parsing.start=w),!a||!k&&A||(a.stats.parsing.start=w);var S=!(m&&(null===(p=i.initSegment)||void 0===p?void 0:p.url)===(null===(d=m.initSegment)||void 0===d?void 0:d.url)),C=new ft.TransmuxState(b,A,s,_,y,S);if(!A||b||S){l.logger.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+b+"\n trackSwitch: "+_+"\n contiguous: "+A+"\n accurateTimeOffset: "+s+"\n timeOffset: "+y+"\n initSegmentChange: "+S);var x=new ft.TransmuxConfig(n,r,t,o,c);this.configureTransmuxer(x)}if(this.frag=i,this.part=a,g)g.postMessage({cmd:"demux",data:e,decryptdata:v,chunkMeta:u,state:C},e instanceof ArrayBuffer?[e]:[]);else if(h){var I=h.push(e,v,u,C);(0,ft.isPromise)(I)?(h.async=!0,I.then((function(e){f.handleTransmuxComplete(e)})).catch((function(e){f.transmuxerError(e,u,"transmuxer-interface push error")}))):(h.async=!1,this.handleTransmuxComplete(I))}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:e});else if(n){var i=n.flush(e);(0,ft.isPromise)(i)||n.async?((0,ft.isPromise)(i)||(i=Promise.resolve(i)),i.then((function(n){t.handleFlushResult(n,e)})).catch((function(n){t.transmuxerError(n,e,"transmuxer-interface flush error")}))):this.handleFlushResult(i,e)}},t.transmuxerError=function(e,t,n){this.hls&&this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:n})},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":l.logger[t.data.logType]&&l.logger[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,n=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):n&&n.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}(),mt=function(){function e(e,t,n,r){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},t.poll=function(e,t){var n=this.config,r=this.media,i=this.stalled;if(null!==r){var a=r.currentTime,o=r.seeking,s=this.seeking&&!o,u=!this.seeking&&o;if(this.seeking=o,a===e){if((u||s)&&(this.stalled=null),!(r.paused&&!o||r.ended||0===r.playbackRate)&&Le.getBuffered(r).length){var c=Le.bufferInfo(r,a,0),p=c.len>0,d=c.nextStart||0;if(p||d){if(o){var f=c.len>2,h=!d||t&&t.start<=a||d-a>2&&!this.fragmentTracker.getPartialFragment(a);if(f||h)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var g,y=Math.max(d,c.start||0)-a,v=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,m=(null==v||null===(g=v.details)||void 0===g?void 0:g.live)?2*v.details.targetduration:2;if(y>0&&y<=m)return void this._trySkipBufferHole(null)}var b=self.performance.now();if(null!==i){var _=b-i;if(o||!(_>=250)||(this._reportStall(c),this.media)){var E=Le.bufferInfo(r,a,n.maxBufferHole);this._tryFixBufferStall(E,_)}}else this.stalled=b}}}else if(this.moved=!0,null!==i){if(this.stallReported){var k=self.performance.now()-i;l.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media;if(null!==i){var a=i.currentTime,o=r.getPartialFragment(a);if(o&&(this._trySkipBufferHole(o)||!this.media))return;e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(l.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},t._reportStall=function(e){var t=this.hls,n=this.media;!this.stallReported&&n&&(this.stallReported=!0,l.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer ("+JSON.stringify(e)+")"),t.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e.len}))},t._trySkipBufferHole=function(e){var t=this.config,n=this.hls,r=this.media;if(null===r)return 0;for(var i=r.currentTime,a=0,u=Le.getBuffered(r),c=0;c=a&&i1?(r=0,this.bitrateTest=!0):r=n.nextAutoLevel),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=Ye,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=We},u.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},u.doTick=function(){switch(this.state){case Ye:this.doTickIdle();break;case rt:var e,t=this.levels,n=this.level,r=null==t||null===(e=t[n])||void 0===e?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=Ye;break}break;case $e:var i,a=self.performance.now(),o=this.retryDate;(!o||a>=o||null!==(i=this.media)&&void 0!==i&&i.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.level),this.state=Ye)}this.onTickEnd()},u.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},u.doTickIdle=function(){var e=this.hls,t=this.levelLastLoaded,n=this.levels,r=this.media,i=e.config,a=e.nextLoadLevel;if(null!==t&&(r||!this.startFragRequested&&i.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&n&&n[a]){var s=n[a],l=this.getMainFwdBufferInfo();if(null!==l){var u=this.getLevelDetails();if(u&&this._streamEnded(l,u)){var c={};return this.altAudio&&(c.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,c),void(this.state=et)}this.level=e.nextLoadLevel=a;var p=s.details;if(!p||this.state===rt||p.live&&this.levelLastLoaded!==a)return this.level=a,void(this.state=rt);if(!(l.len>=this.getMaxBufferLength(s.maxBitrate))){this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);var d=this.backtrackFragment?this.backtrackFragment.start:l.end,f=this.getNextFragment(d,p);if(this.couldBacktrack&&!this.fragPrevious&&f&&"initSegment"!==f.sn&&this.fragmentTracker.getState(f)!==ye.OK){var h,g=(null!=(h=this.backtrackFragment)?h:f).sn-p.startSN,y=p.fragments[g-1];y&&f.cc===y.cc&&(f=y,this.fragmentTracker.removeFragment(y))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(f&&this.fragmentTracker.getState(f)===ye.OK&&this.nextLoadPosition>d){var m=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO,b=(m===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,m,H.PlaylistLevelType.MAIN),f=this.getNextFragment(this.nextLoadPosition,p)}f&&(!f.initSegment||f.initSegment.data||this.bitrateTest||(f=f.initSegment),this.loadFragment(f,p,d))}}}},u.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);this.fragCurrent=t,a===ye.NOT_LOADED?"initSegment"===t.sn?this._loadInitSegment(t,n):this.bitrateTest?(this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t,n)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):a===ye.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},u.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,H.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},u.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,H.PlaylistLevelType.MAIN)},u.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},u.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},u.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],a=this.fragLastKbps;n=a&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*a)+1:0}else n=0;var o=this.getBufferedFrag(t.currentTime+n);if(o){var s=this.followingBufferedFrag(o);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,u=s.duration,c=Math.max(o.end,l+Math.min(Math.max(u-this.config.maxFragLookUpTolerance,.5*u),.75*u));this.flushMainBuffer(c,Number.POSITIVE_INFINITY)}}}},u.abortCurrentFrag=function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&e.abortRequests(),this.state){case qe:case Xe:case $e:case Ze:case Je:this.state=Ye}this.nextLoadPosition=this.getLoadPosition()},u.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},u.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new mt(this.config,r,this.fragmentTracker,this.hls)},u.onMediaDetaching=function(){var t=this.media;t&&this.onvplaying&&this.onvseeked&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},u.onMediaPlaying=function(){this.tick()},u.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;(0,a.isFiniteNumber)(t)&&this.log("Media seeked to "+t.toFixed(3)),this.tick()},u.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(o.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null,this.backtrackFragment=null},u.onManifestParsed=function(e,t){var n,r,i,a=!1,o=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(a=!0),-1!==n.indexOf("mp4a.40.5")&&(o=!0))})),this.audioCodecSwitch=a&&o&&!("function"==typeof(null==(i=ot())||null===(r=i.prototype)||void 0===r?void 0:r.changeType)),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},u.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===Ye){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=rt)}},u.onLevelLoaded=function(e,t){var n,r=this.levels,i=t.level,a=t.details,s=a.totalduration;if(r){this.log("Level "+i+" loaded ["+a.startSN+","+a.endSN+"], cc ["+a.startCC+", "+a.endCC+"] duration:"+s);var l=this.fragCurrent;!l||this.state!==Xe&&this.state!==$e||l.level!==t.level&&l.loader&&(this.state=Ye,this.backtrackFragment=null,l.abortRequests());var u=r[i],c=0;if(a.live||null!==(n=u.details)&&void 0!==n&&n.live){if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed)return;c=this.alignPlaylists(a,u.details)}if(u.details=a,this.levelLastLoaded=i,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:a,level:i}),this.state===rt){if(this.waitForCdnTuneIn(a))return;this.state=Ye}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,c),this.tick()}else this.warn("Levels were reset while loading level "+i)},u._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(s){var l=o.videoCodec,u=s.PTSKnown||!s.live,c=null===(t=n.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(o),d=this.transmuxer=this.transmuxer||new vt(this.hls,H.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),f=r?r.index:-1,h=-1!==f,g=new Me(n.level,n.sn,n.stats.chunkCount,i.byteLength,f,h),y=this.initPTS[n.cc];d.push(i,c,p,l,n,r,s.totalduration,u,g,y)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},u.onAudioTrackSwitching=function(e,t){var n=this.altAudio,r=!!t.url,i=t.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;a&&(this.log("Switching to main audio track, cancel main fragment load"),a.abortRequests()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:i})}},u.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},u.onBufferCreated=function(e,t){var n,r,i=t.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},u.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===H.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===Je&&(this.state=Ye));var i=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*i.total/(i.buffering.end-i.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},u.onError=function(e,t){if(t.type!==s.ErrorTypes.KEY_SYSTEM_ERROR)switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.FRAG_PARSING_ERROR:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(H.PlaylistLevelType.MAIN,t);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==tt&&(t.fatal?(this.warn(""+t.details),this.state=tt):t.levelRetry||this.state!==rt||(this.state=Ye));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if("main"===t.parent&&(this.state===Ze||this.state===Je)){var n=!0,r=this.getFwdBufferInfo(this.media,H.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}else this.onFragmentOrKeyLoadError(H.PlaylistLevelType.MAIN,t)},u.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){if(this.loadedmetadata||!Le.getBuffered(e).length){var n=this.state!==Ye?this.fragCurrent:null;t.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}},u.onFragLoadEmergencyAborted=function(){this.state=Ye,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},u.onBufferFlushed=function(e,t){var n=t.type;if(n!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,H.PlaylistLevelType.MAIN)}},u.onLevelsUpdated=function(e,t){this.levels=t.levels},u.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},u.seekToStartPos=function(){var e=this.media;if(e){var t=e.currentTime,n=this.startPosition;if(n>=0&&t0&&(i1&&!1===e.seeking){var n=e.currentTime;if(Le.isBuffered(e,n)?t=this.getAppendedFrag(n):Le.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.fragPlaying=t,this.hls.trigger(o.Events.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:i}))}}},i=r,(l=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentFrag",get:function(){var e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}},{key:"currentProgramDateTime",get:function(){var e=this.media;if(e){var t=e.currentTime,n=this.currentFrag;if(n&&(0,a.isFiniteNumber)(t)&&(0,a.isFiniteNumber)(n.programDateTime)){var r=n.programDateTime+1e3*(t-n.start);return new Date(r)}}return null}},{key:"currentLevel",get:function(){var e=this.currentFrag;return e?e.level:-1}},{key:"nextBufferedFrag",get:function(){var e=this.currentFrag;return e?this.followingBufferedFrag(e):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&function(e,t){for(var n=0;n=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}(),Tt=function(){function e(e){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;var t=e.config;this.bwEstimator=new kt(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}var t,n,r=e.prototype;return r.registerListeners=function(){var e=this.hls;e.on(o.Events.FRAG_LOADING,this.onFragLoading,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e.off(o.Events.FRAG_LOADING,this.onFragLoading,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},r.onFragLoading=function(e,t){var n,r=t.frag;r.type===H.PlaylistLevelType.MAIN&&(this.timer||(this.fragCurrent=r,this.partCurrent=null!=(n=t.part)?n:null,this.timer=self.setInterval(this.onCheck,100)))},r.onLevelLoaded=function(e,t){var n=this.hls.config;t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},r._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.autoLevelEnabled,i=n.media;if(e&&i){var s=t?t.stats:e.stats,u=t?t.duration:e.duration;if(s.aborted||s.loaded&&s.loaded===s.total||0===e.level)return this.clearTimer(),void(this._nextAutoLevel=-1);if(r&&!i.paused&&i.playbackRate&&i.readyState){var c=n.mainForwardBufferInfo;if(null!==c){var p=performance.now()-s.loading.start,d=Math.abs(i.playbackRate);if(!(p<=500*u/d)){var f=s.loaded&&s.loading.first,h=this.bwEstimator.getEstimate(),g=n.levels,y=n.minAutoLevel,v=g[e.level],m=s.total||Math.max(s.loaded,Math.round(u*v.maxBitrate/8)),b=f?1e3*s.loaded/p:0,_=b?(m-s.loaded)/b:8*m/h,E=c.len/d;if(!(_<=E)){var k,T=Number.POSITIVE_INFINITY;for(k=e.level-1;k>y;k--){var A=g[k].maxBitrate;if((T=b?u*A/(6.4*b):u*A/h)=_||(l.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+k+"\n Current BW estimate: "+((0,a.isFiniteNumber)(h)?(h/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+_.toFixed(3)+" s\n Estimated load time for the next fragment: "+T.toFixed(3)+" s\n Time to underbuffer: "+E.toFixed(3)+" s"),n.nextLoadLevel=k,f&&this.bwEstimator.sample(p,s.loaded),this.clearTimer(),(e.loader||e.keyLoader)&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),n.trigger(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:s}))}}}}}},r.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if(n.type===H.PlaylistLevelType.MAIN&&(0,a.isFiniteNumber)(n.sn)){var i=r?r.stats:n.stats,s=r?r.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var l=this.hls.levels[n.level],u=(l.loaded?l.loaded.bytes:0)+i.loaded,c=(l.loaded?l.loaded.duration:0)+s;l.loaded={bytes:u,duration:c},l.realBitrate=Math.round(8*u/c)}if(n.bitrateTest){var p={stats:i,frag:n,part:r,id:n.type};this.onFragBuffered(o.Events.FRAG_BUFFERED,p)}}},r.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===H.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var a=i.parsing.end-i.loading.start;this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},r.onError=function(e,t){var n;if((null===(n=t.frag)||void 0===n?void 0:n.type)===H.PlaylistLevelType.MAIN){if(t.type===s.ErrorTypes.KEY_SYSTEM_ERROR)return void this.clearTimer();switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.clearTimer()}}},r.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},r.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,o=n.media,s=t?t.duration:e?e.duration:0,u=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,p=n.mainForwardBufferInfo,d=(p?p.len:0)/u,f=this.findBestLevel(c,a,r,d,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(f>=0)return f;l.logger.trace((d?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var h=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,y=i.abrBandWidthUpFactor;if(!d){var v=this.bitrateTestDelay;v&&(h=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-v,l.logger.trace("bitrate test took "+Math.round(1e3*v)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*h)+" ms"),g=y=1)}return f=this.findBestLevel(c,a,r,d+h,g,y),Math.max(f,0)},r.findBestLevel=function(e,t,n,r,i,o){for(var s,u=this.fragCurrent,c=this.partCurrent,p=this.lastLoadedFragLevel,d=this.hls.levels,f=d[p],h=!(null==f||null===(s=f.details)||void 0===s||!s.live),g=null==f?void 0:f.codecSet,y=c?c.duration:u?u.duration:0,v=n;v>=t;v--){var m=d[v];if(m&&(!g||m.codecSet===g)){var b,_=m.details,E=(c?null==_?void 0:_.partTarget:null==_?void 0:_.averagetargetduration)||y;b=v<=p?i*e:o*e;var k=d[v].maxBitrate,T=k*E/b;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(b)+"/"+k+"/"+E+"/"+r+"/"+T),b>k&&(0===T||!(0,a.isFiniteNumber)(T)||h&&!this.bitrateTestDelay||T0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t,this.state=Ye):(this.loadedmetadata=!1,this.state=Qe),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},i.doTick=function(){switch(this.state){case Ye:this.doTickIdle();break;case Qe:var t,n=this.levels,r=this.trackId,i=null==n||null===(t=n[r])||void 0===t?void 0:t.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=nt}break;case $e:var a,o=performance.now(),s=this.retryDate;(!s||o>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=Ye);break;case nt:var l=this.waitingData;if(l){var u=l.frag,c=l.part,p=l.cache,d=l.complete;if(void 0!==this.initPTS[u.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=Xe;var f={frag:u,part:c,payload:p.flush(),networkDetails:null};this._handleFragmentLoadProgress(f),d&&e.prototype._handleFragmentLoadComplete.call(this,f)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log("Waiting fragment cc ("+u.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var h=this.getLoadPosition(),g=Le.bufferInfo(this.mediaBuffer,h,this.config.maxBufferHole);He(g.end,this.config.maxFragLookUpTolerance,u)<0&&(this.log("Waiting fragment cc ("+u.cc+") @ "+u.start+" cancelled because another fragment at "+g.end+" is needed"),this.clearWaitingFragment())}}else this.state=Ye}this.onTickEnd()},i.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=Ye)},i.resetLoadingState=function(){this.clearWaitingFragment(),e.prototype.resetLoadingState.call(this)},i.onTickEnd=function(){var e=this.media;e&&e.readyState&&(this.lastCurrentTime=e.currentTime)},i.doTickIdle=function(){var e=this.hls,t=this.levels,n=this.media,r=this.trackId,i=e.config;if(t&&t[r]&&(n||!this.startFragRequested&&i.startFragPrefetch)){var a=t[r].details;if(!a||a.live&&this.levelLastLoaded!==r||this.waitForCdnTuneIn(a))this.state=Qe;else{var s=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&s&&(this.bufferFlushed=!1,this.afterBufferFlushed(s,v.ElementaryStreamTypes.AUDIO,H.PlaylistLevelType.AUDIO));var l=this.getFwdBufferInfo(s,H.PlaylistLevelType.AUDIO);if(null!==l){var u=this.audioSwitch;if(!u&&this._streamEnded(l,a))return e.trigger(o.Events.BUFFER_EOS,{type:"audio"}),void(this.state=et);var c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,H.PlaylistLevelType.MAIN);if(!(l.len>=this.getMaxBufferLength(null==c?void 0:c.len))||u){var p=a.fragments[0].start,d=l.end;if(u&&n){var f=this.getLoadPosition();d=f,a.PTSKnown&&fp||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=p+.05)}if(!(c&&d>c.end+a.targetduration)&&(c&&c.len||!l.len)){var h=this.getNextFragment(d,a);h?this.loadFragment(h,a,d):this.bufferFlushed=!0}}}}}},i.getMaxBufferLength=function(t){var n=e.prototype.getMaxBufferLength.call(this);return t?Math.max(n,t):n},i.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},i.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new ae(e)}))},i.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;r&&r.abortRequests(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=Ye):this.state=We,this.tick()},i.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},i.onLevelLoaded=function(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(o.Events.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},i.onAudioTrackLoaded=function(e,t){var n;if(null!=this.mainDetails){var r=this.levels,i=t.details,a=t.id;if(r){this.log("Track "+a+" loaded ["+i.startSN+","+i.endSN+"],duration:"+i.totalduration);var o=r[a],s=0;if(i.live||null!==(n=o.details)&&void 0!==n&&n.live){var l=this.mainDetails;if(i.fragments[0]||(i.deltaUpdateFailed=!0),i.deltaUpdateFailed||!l)return;!o.details&&i.hasProgramDateTime&&l.hasProgramDateTime?(je(i,l),s=i.fragments[0].start):s=this.alignPlaylists(i,o.details)}o.details=i,this.levelLastLoaded=a,this.startFragRequested||!this.mainDetails&&i.live||this.setStartPosition(o.details,s),this.state!==Qe||this.waitForCdnTuneIn(i)||(this.state=Ye),this.tick()}else this.warn("Audio tracks were reset while loading level "+a)}else this.cachedTrackLoadedData=t},i._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.config,o=this.trackId,s=this.levels;if(s){var l=s[o],u=l.details,c=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2",p=this.transmuxer;p||(p=this.transmuxer=new vt(this.hls,H.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var d=this.initPTS[n.cc],f=null===(t=n.initSegment)||void 0===t?void 0:t.data;if(void 0!==d){var h=r?r.index:-1,g=-1!==h,y=new Me(n.level,n.sn,n.stats.chunkCount,i.byteLength,h,g);p.push(i,f,c,"",n,r,u.totalduration,!1,y,d)}else this.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+u.startSN+" ,"+u.endSN+"],track "+o),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new At,complete:!1}).cache.push(new Uint8Array(i)),this.waitingVideoCC=this.videoTrackCC,this.state=nt}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},i._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},i.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},i.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)},i.onFragBuffered=function(e,t){var n,r=t.frag,i=t.part;r.type===H.PlaylistLevelType.AUDIO?this.fragContextChanged(r)?this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==r.sn&&(this.fragPrevious=r,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(r,i)):this.loadedmetadata||r.type!==H.PlaylistLevelType.MAIN||null!==(n=this.videoBuffer||this.media)&&void 0!==n&&n.buffered.length&&(this.loadedmetadata=!0)},i.onError=function(t,n){if(n.type!==s.ErrorTypes.KEY_SYSTEM_ERROR)switch(n.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.FRAG_PARSING_ERROR:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(H.PlaylistLevelType.AUDIO,n);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==tt&&this.state!==We&&(this.state=n.fatal?tt:Ye,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===Ze||this.state===Je)){var r=!0,i=this.getFwdBufferInfo(this.mediaBuffer,H.PlaylistLevelType.AUDIO);i&&i.len>.5&&(r=!this.reduceMaxBufferLength(i.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}else this.onFragmentOrKeyLoadError(H.PlaylistLevelType.AUDIO,n)},i.onBufferFlushed=function(e,t){t.type===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0,this.state===et&&(this.state=Ye))},i._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,i=e.remuxResult,a=e.chunkMeta,s=this.getCurrentContext(a);if(!s)return this.warn("The loading context changed while buffering fragment "+a.sn+" of level "+a.level+". This chunk will not be buffered."),void this.resetStartWhenNotLoaded(a.level);var l=s.frag,u=s.part,c=s.level.details,p=i.audio,d=i.text,f=i.id3,h=i.initSegment;if(!this.fragContextChanged(l)&&c){if(this.state=Ze,this.audioSwitch&&p&&this.completeAudioSwitch(),null!=h&&h.tracks&&(this._bufferInitSegment(h.tracks,l,a),r.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:l,id:n,tracks:h.tracks})),p){var g=p.startPTS,y=p.endPTS,m=p.startDTS,b=p.endDTS;u&&(u.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:y,startDTS:m,endDTS:b}),l.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,g,y,m,b),this.bufferFragmentData(p,l,u,a)}if(null!=f&&null!==(t=f.samples)&&void 0!==t&&t.length){var _=wt({id:n,frag:l,details:c},f);r.trigger(o.Events.FRAG_PARSING_METADATA,_)}if(d){var E=wt({id:n,frag:l,details:c},d);r.trigger(o.Events.FRAG_PARSING_USERDATA,E)}}},i._bufferInitSegment=function(e,t,n){if(this.state===Ze){e.video&&delete e.video;var r=e.audio;if(r){r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,e);var i=r.initSegment;if(null!=i&&i.byteLength){var a={type:"audio",frag:t,part:null,chunkMeta:n,parent:t.type,data:i};this.hls.trigger(o.Events.BUFFER_APPENDING,a)}this.tick()}}},i.loadFragment=function(t,n,r){var i=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||i===ye.NOT_LOADED||i===ye.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t,n):n.live&&!(0,a.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=nt):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)))},i.completeAudioSwitch=function(){var t=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:r})},r}(it);function xt(e,t){return(xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const It=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,"[audio-track-controller]")||this).tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.trackName="",n.selectDefaultTrack=!0,n.registerListeners(),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,xt(t,n);var i,a,l=r.prototype;return l.registerListeners=function(){var e=this.hls;e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(o.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(o.Events.ERROR,this.onError,this)},l.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,e.prototype.destroy.call(this)},l.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},l.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},l.onAudioTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.tracksInGroup[n];if(i){var a=i.details;i.details=t.details,this.log("audioTrack "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,a))}else this.warn("Invalid audio track id "+n)},l.onLevelLoading=function(e,t){this.switchLevel(t.level)},l.onLevelSwitching=function(e,t){this.switchLevel(t.level)},l.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.audioGroupIds){var n=t.audioGroupIds[t.urlId];if(this.groupId!==n){this.groupId=n;var r=this.tracks.filter((function(e){return!n||e.groupId===n}));this.selectDefaultTrack&&!r.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),this.tracksInGroup=r;var i={audioTracks:r};this.log("Updating audio tracks, "+r.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(o.Events.AUDIO_TRACKS_UPDATED,i),this.selectInitialTrack()}}},l.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===H.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},l.setAudioTrack=function(e){var t=this.tracksInGroup;if(e<0||e>=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+e);var r=t[e],i=r.id,a=r.groupId,s=void 0===a?"":a,l=r.name,u=r.type,c=r.url;if(this.trackId=e,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHING,{id:i,groupId:s,name:l,type:u,url:c}),!r.details||r.details.live){var p=this.switchParams(r.url,null==n?void 0:n.details);this.loadPlaylist(p)}}},l.selectInitialTrack=function(){this.tracksInGroup;var e=this.trackName,t=this.findTrackId(e)||this.findTrackId();-1!==t?this.setAudioTrack(t):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},l.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n)}}},s.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,a=this.levels;if(!a.length||!a[i]||!a[i].details)return;var o=r-a[i].details.targetduration;if(o<=0)return;t.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(e){for(var t=0;t=o.length||i!==a)&&s){this.mediaBuffer=this.mediaBufferTimeRanges;var l=0;if(r.live||null!==(n=s.details)&&void 0!==n&&n.live){var u=this.mainDetails;if(r.deltaUpdateFailed||!u)return;var c=u.fragments[0];s.details?0===(l=this.alignPlaylists(r,s.details))&&c&&de(r,l=c.start):r.hasProgramDateTime&&u.hasProgramDateTime?(je(r,u),l=r.fragments[0].start):c&&de(r,l=c.start)}s.details=r,this.levelLastLoaded=i,this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(s.details,l),this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===Ye&&(Ve(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),s.details=void 0))}}},s._handleFragmentLoadComplete=function(e){var t=this,n=e.frag,r=e.payload,i=n.decryptdata,a=this.hls;if(!this.fragContextChanged(n)&&r&&r.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var s=performance.now();this.decrypter.decrypt(new Uint8Array(r),i.key.buffer,i.iv.buffer).then((function(e){var t=performance.now();a.trigger(o.Events.FRAG_DECRYPTED,{frag:n,payload:e,stats:{tstart:s,tdecrypt:t}})})).catch((function(e){t.warn(e.name+": "+e.message),t.state=Ye}))}},s.doTick=function(){if(this.media){if(this.state===Ye){var e=this.currentTrackId,t=this.levels;if(!t.length||!t[e]||!t[e].details)return;var n=t[e].details,r=n.targetduration,i=this.config,a=this.getLoadPosition(),o=Le.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],a-r,i.maxBufferHole),s=o.end,l=o.len,u=this.getFwdBufferInfo(this.media,H.PlaylistLevelType.MAIN);if(l>this.getMaxBufferLength(null==u?void 0:u.len)+r)return;var c=n.fragments,p=c.length,d=n.edge,f=null,h=this.fragPrevious;if(s>>=0)>r-1)throw new DOMException("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+n+") is greater than the maximum bound ("+r+")");return e[n][t]};this.buffered={get length(){return e.length},end:function(n){return t("end",n,e.length)},start:function(n){return t("start",n,e.length)}}};function Ot(e,t){return(Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Lt(e){for(var t=[],n=0;n-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},s.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},s.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),Lt(this.media.textTracks).forEach((function(e){Y(e)})),this.subtitleTrack=-1,this.media=null)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},s.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},s.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.trackId,a=this.tracksInGroup[i];if(a){var o=a.details;a.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,o))}else this.warn("Invalid subtitle track id "+n)},s.onLevelLoading=function(e,t){this.switchLevel(t.level)},s.onLevelSwitching=function(e,t){this.switchLevel(t.level)},s.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId];if(this.groupId!==n){var r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,i=this.tracks.filter((function(e){return!n||e.groupId===n}));this.tracksInGroup=i;var a=this.findTrackId(null==r?void 0:r.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:i};this.log("Updating subtitle tracks, "+i.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(o.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==a&&this.setSubtitleTrack(a,r)}}},s.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n=r.length)){this.clearTimer();var i=r[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,i){var a=i.id,s=i.groupId,l=void 0===s?"":s,u=i.name,c=i.type,p=i.url;this.hls.trigger(o.Events.SUBTITLE_TRACK_SWITCH,{id:a,groupId:l,name:u,type:c,url:p});var d=this.switchParams(i.url,null==t?void 0:t.details);this.loadPlaylist(d)}else this.hls.trigger(o.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},s.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=Lt(this.media.textTracks),n=0;n-1&&this.toggleTrackModes(this.trackId)}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,t)}}])&&function(e,t){for(var n=0;n "+e.src+")")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},t.registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.BUFFER_RESET,this.onBufferReset,this),e.on(o.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(o.Events.BUFFER_EOS,this.onBufferEos,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(o.Events.FRAG_PARSED,this.onFragParsed,this),e.on(o.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.BUFFER_RESET,this.onBufferReset,this),e.off(o.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(o.Events.BUFFER_EOS,this.onBufferEos,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(o.Events.FRAG_PARSED,this.onFragParsed,this),e.off(o.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new Ut(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,l.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&Ft){var r=this.mediaSource=new Ft;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src,n.addEventListener("emptied",this._onMediaEmptied)}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(l.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){l.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(e.removeEventListener("emptied",this._onMediaEmptied),n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):l.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(o.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(e){l.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var a=t[e],o=a.id,s=a.codec,u=a.levelCodec,c=a.container,p=a.metadata,d=(i.levelCodec||i.codec).replace(jt,"$1"),f=(u||s).replace(jt,"$1");if(d!==f){var h=c+";codecs="+(u||s);n.appendChangeType(e,h),l.logger.log("[buffer-controller]: switching codec "+d+" to "+f),n.tracks[e]={buffer:i.buffer,codec:s,container:c,levelCodec:u,metadata:p,id:o}}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(l.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){l.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,i=this.operationQueue,a=this.tracks,u=t.data,c=t.type,p=t.frag,d=t.part,f=t.chunkMeta,h=f.buffering[c],g=self.performance.now();h.start=g;var y=p.stats.buffering,v=d?d.stats.buffering:null;0===y.start&&(y.start=g),v&&0===v.start&&(v.start=g);var m=a.audio,b=!1;"audio"===c&&"audio/mpeg"===(null==m?void 0:m.container)&&(b=!this.lastMpegAudioChunk||1===f.id||this.lastMpegAudioChunk.sn!==f.sn,this.lastMpegAudioChunk=f);var _=p.start,E={execute:function(){if(h.executeStart=self.performance.now(),b){var e=n.sourceBuffer[c];if(e){var t=_-e.timestampOffset;Math.abs(t)>=.1&&(l.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_+" (delta: "+t+") sn: "+p.sn+")"),e.timestampOffset=_)}}n.appendExecutor(u,c)},onStart:function(){},onComplete:function(){var e=self.performance.now();h.executeEnd=h.end=e,0===y.first&&(y.first=e),v&&0===v.first&&(v.first=e);var t=n.sourceBuffer,r={};for(var i in t)r[i]=Le.getBuffered(t[i]);n.appendError=0,n.hls.trigger(o.Events.BUFFER_APPENDED,{type:c,frag:p,part:d,chunkMeta:f,parent:p.type,timeRanges:r})},onError:function(e){l.logger.error("[buffer-controller]: Error encountered while trying to append to the "+c+" SourceBuffer",e);var t={type:s.ErrorTypes.MEDIA_ERROR,parent:p.type,details:s.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=s.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,t.details=s.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(l.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0,r.stopLoad())),r.trigger(o.Events.ERROR,t)}};i.append(E,c)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,i=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(o.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){l.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(i(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(i(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,i=t.part,a=[],s=i?i.elementaryStreams:r.elementaryStreams;s[v.ElementaryStreamTypes.AUDIOVIDEO]?a.push("audiovideo"):(s[v.ElementaryStreamTypes.AUDIO]&&a.push("audio"),s[v.ElementaryStreamTypes.VIDEO]&&a.push("video")),0===a.length&&l.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,i&&(i.stats.buffering.end=e);var t=i?i.stats:r.stats;n.hls.trigger(o.Events.FRAG_BUFFERED,{frag:r,part:i,stats:t,id:r.type})}),a)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return!i||t.type&&t.type!==r||(i.ending=!0,i.ended||(i.ended=!0,l.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS"))),e&&!(i&&!i.ended)}),!0)&&(l.logger.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers((function(){n.getSourceBufferTypes().forEach((function(e){var t=n.sourceBuffer[e];t&&(t.ending=!1)}));var e=n.mediaSource;e&&"open"===e.readyState?(l.logger.log("[buffer-controller]: Calling mediaSource.endOfStream()"),e.endOfStream()):e&&l.logger.info("[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: "+e.readyState)})))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,r=this.sourceBuffer;if(n&&null!==t){var i=this.getSourceBufferTypes();if(i.length){var s=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if((0,a.isFiniteNumber)(s)&&!(s<0)){var u=n.currentTime,c=t.levelTargetDuration,p=Math.max(s,c),d=Math.floor(u/c)*c-p;i.forEach((function(n){var i=r[n];if(i){var a=Le.getBuffered(i);if(a.length>0&&d>a.start(0)){if(e.trigger(o.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),t.live)e.trigger(o.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d});else if(i.ended&&a.end(a.length-1)-u<2*c)return void l.logger.info("[buffer-controller]: Cannot flush "+n+" back buffer while SourceBuffer is in ended state");e.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:n})}}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,r=this.mediaSource,i=e.fragments[0].start+e.totalduration,o=n.duration,s=(0,a.isFiniteNumber)(r.duration)?r.duration:0;e.live&&t.config.liveDurationInfinity?(l.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),r.duration=1/0,this.updateSeekableRange(e)):(i>s&&i>o||!(0,a.isFiniteNumber)(o))&&(l.logger.log("[buffer-controller]: Updating Media Source duration to "+i.toFixed(3)),r.duration=i)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var i=this.getSourceBufferTypes();if(0===i.length)return void this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});i.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var i in e)if(!t[i]){var a=e[i];if(!a)throw Error("source buffer exists for track "+i+", however track does not");var u=a.levelCodec||a.codec,c=a.container+";codecs="+u;l.logger.log("[buffer-controller]: creating sourceBuffer("+c+")");try{var p=t[i]=n.addSourceBuffer(c),d=i;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[i]={buffer:p,codec:u,container:a.container,levelCodec:a.levelCodec,metadata:a.metadata,id:a.id},r++}catch(e){l.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:c})}}r&&this.hls.trigger(o.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){l.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(e);n&&n.onError(t)},t.removeExecutor=function(e,t,n){var r=this.media,i=this.mediaSource,o=this.operationQueue,s=this.sourceBuffer[e];if(!r||!i||!s)return l.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void o.shiftAndExecuteNext(e);var u=(0,a.isFiniteNumber)(r.duration)?r.duration:1/0,c=(0,a.isFiniteNumber)(i.duration)?i.duration:1/0,p=Math.max(0,t),d=Math.min(n,u,c);d>p&&!s.ending?(s.ended=!1,l.logger.log("[buffer-controller]: Removing ["+p+","+d+"] from the "+e+" SourceBuffer"),s.remove(p,d)):o.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return l.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return l.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}(),Vt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Ht=function(e){var t=e;return Vt.hasOwnProperty(e)&&(t=Vt[e]),String.fromCharCode(t)},Kt=100,Gt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},zt={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Wt={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Yt={25:2,26:4,29:6,30:8,31:10,27:13,28:15},qt=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(Nt||(Nt={}));var Xt=function(){function e(){this.time=null,this.verboseLevel=Nt.ERROR}return e.prototype.log=function(e,t){if(this.verboseLevel>=e){var n="function"==typeof t?t():t;l.logger.log(this.time+" ["+e+"] "+n)}},e}(),$t=function(e){for(var t=[],n=0;nKt&&(this.logger.log(Nt.DEBUG,"Too large cursor position "+this.pos),this.pos=Kt)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n=144&&this.backSpace();var n=Ht(e);this.pos>=Kt?this.logger.log(Nt.ERROR,(function(){return"Cannot insert "+e.toString(16)+" ("+n+") at position "+t.pos+". Skipping it!"})):(this.chars[this.pos].setChar(n,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),tn=function(){function e(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new en(n),this.nonDisplayedMemory=new en(n),this.lastOutputScreen=new en(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(Nt.INFO,(function(){return"MODE="+e})),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=this,n=0;n=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(Nt.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}();function nn(e,t,n){n.a=e,n.b=t}function rn(e,t,n){return n.a===e&&n.b===t}const an=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new Xt;this.channels=[null,new tn(e,t,r),new tn(e+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,r,i,a=!1;this.logger.time=e;for(var o=0;o ("+$t([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(a=this.parseChars(r,i))){var s=this.currentChannel;s&&s>0?this.channels[s].insertChars(a):this.logger.log(Nt.WARNING,"No channel found yet. TEXT-MODE?")}n||a||this.logger.log(Nt.WARNING,"Couldn't parse cleaned data "+$t([r,i])+" orig: "+$t([t[o],t[o+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(rn(e,t,n))return nn(null,null,n),this.logger.log(Nt.DEBUG,"Repeated command ("+$t([e,t])+") is dropped"),!0;var r=20===e||21===e||23===e?1:2,i=this.channels[r];return 20===e||21===e||28===e||29===e?32===t?i.ccRCL():33===t?i.ccBS():34===t?i.ccAOF():35===t?i.ccAON():36===t?i.ccDER():37===t?i.ccRU(2):38===t?i.ccRU(3):39===t?i.ccRU(4):40===t?i.ccFON():41===t?i.ccRDC():42===t?i.ccTR():43===t?i.ccRTD():44===t?i.ccEDM():45===t?i.ccCR():46===t?i.ccENM():47===t&&i.ccEOC():i.ccTO(t-32),nn(e,t,n),this.currentChannel=r,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(Nt.ERROR,"Mismatch channel in midrow parsing"),!1;var r=this.channels[n];return!!r&&(r.ccMIDROW(t),this.logger.log(Nt.DEBUG,"MIDROW ("+$t([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(rn(e,t,r))return nn(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?Gt[e]:Wt[e]:1===i?zt[e]:Yt[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),nn(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,r,i=null,a=null;if(e>=25?(n=2,a=e-8):(n=1,a=e),a>=17&&a<=19?(r=17===a?t+80:18===a?t+112:t+144,this.logger.log(Nt.INFO,"Special char '"+Ht(r)+"' in channel "+n),i=[r]):e>=32&&e<=127&&(i=0===t?[e]:[e,t]),i){var o=$t(i);this.logger.log(Nt.DEBUG,"Char codes = "+o.join(",")),nn(e,t,this.cmdHistory)}return i},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=qt[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),nn(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;ee)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[],this.startTime=null},e}();const sn=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var e=["","lr","rl"],t=["start","middle","end","left","right"];function n(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;var n=t.toLowerCase();return!!~e.indexOf(n)&&n}function r(e){return n(t,e)}function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return _},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return k},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");k=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();var ln=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function un(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var cn=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r=0&&n<=100)return this.set(e,n),!0}return!1},e}();function pn(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}var dn=new sn(0,0,""),fn="middle"===dn.align?"middle":"center";function hn(e,t,n){var r=e;function i(){var t=un(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.slice(3),a(),t.endTime=i(),a(),function(e,t){var r=new cn;pn(e,(function(e,t){var i;switch(e){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===t){r.set(e,n[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",fn,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",fn,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",fn,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===dn.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",fn);var a=r.get("position","auto");"auto"===a&&50===dn.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function gn(e){return e.replace(//gi,"\n")}var yn=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new ln,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=gn(e);n>>0).toString()};function kn(e,t,n){return En(e.toString())+En(t.toString())+En(n)}function Tn(){return(Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),c=!0,f/(n-t)>.5))return}if(c||i.push([t,n]),this.config.renderTextTracksNatively){var h=this.captionsTracks[e];this.Cues.newCue(h,t,n,r)}else{var g=this.Cues.newCue(null,t,n,r);this.hls.trigger(o.Events.CUES_PARSED,{type:"captions",cues:g,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,i=t.id,a=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===i&&(this.initPTS[r.cc]=a,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.onFragLoaded(o.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n0&&d.push(e)},c.onparsingerror=function(e){u=e},c.onflush=function(){u?l(u):s(d)},p.forEach((function(e){if(v){if(_n(e,"X-TIMESTAMP-MAP=")){v=!1,e.slice(16).split(",").forEach((function(e){_n(e,"LOCAL:")?h=e.slice(6):_n(e,"MPEGTS:")&&(g=parseInt(e.slice(7)))}));try{y=function(e){var t=parseInt(e.slice(-3)),n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!((0,a.isFiniteNumber)(t)&&(0,a.isFiniteNumber)(n)&&(0,a.isFiniteNumber)(r)&&(0,a.isFiniteNumber)(i)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,(t+=6e4*r)+36e5*i}(h)/1e3}catch(e){u=e}return}""===e&&(v=!1)}c.parse(e+"\n")})),c.flush()}(null!==(r=e.initSegment)&&void 0!==r&&r.data?(0,w.appendUint8Array)(e.initSegment.data,new Uint8Array(t)):t,this.initPTS[e.cc],this.timescale[e.cc],n,e.cc,e.start,(function(t){i._appendCues(t,e.level),s.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(n){i._fallbackToIMSC1(e,t),l.logger.log("Failed to parse VTT cue: "+n),s.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})}))},t._fallbackToIMSC1=function(e,t){var n=this,r=this.tracks[e.level];r.textCodec||xn(t,this.initPTS[e.cc],this.timescale[e.cc],(function(){r.textCodec=An,n._parseIMSC1(e,t)}),(function(){r.textCodec="wvtt"}))},t._appendCues=function(e,t){var n=this.hls;if(this.config.renderTextTracksNatively){var r=this.textTracks[t];if(!r||"disabled"===r.mode)return;e.forEach((function(e){return W(r,e)}))}else{var i=this.tracks[t];if(!i)return;var a=i.default?"default":"subtitles"+t;n.trigger(o.Events.CUES_PARSED,{type:"subtitles",cues:e,track:a})}},t.onFragDecrypted=function(e,t){var n=t.frag;if(n.type===H.PlaylistLevelType.SUBTITLE){if(!(0,a.isFiniteNumber)(this.initPTS[n.cc]))return void this.unparsedVttFrags.push(t);this.onFragLoaded(o.Events.FRAG_LOADED,t)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2;if(this.enabled&&n&&r){var i=t.frag,a=t.samples;if(i.type!==H.PlaylistLevelType.MAIN||"NONE"!==this.closedCaptionsForLevel(i))for(var o=0;o0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},r.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},r.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},r.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},r.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,n){if(!e||!e.length)return-1;for(var r,i,a=e.length-1,o=0;o=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},t=e,(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}}])&&function(e,t){for(var n=0;n0&&a>c.config.fpsDroppedMonitoringThreshold*s){var p=c.currentLevel;l.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+p),p>0&&(-1===c.autoLevelCapping||c.autoLevelCapping>=p)&&(p-=1,c.trigger(o.Events.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:c.currentLevel}),c.autoLevelCapping=p,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();var Fn=n(300);function jn(e){var t="function"==typeof Map?new Map:void 0;return(jn=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Bn(e,arguments,Kn(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Hn(r,e)})(e)}function Bn(e,t,n){return(Bn=Vn()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Hn(i,n.prototype),i}).apply(null,arguments)}function Vn(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Hn(e,t){return(Hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Kn(e){return(Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn="[eme]",zn=function(){function e(t){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=e.CDMCleanupPromise?[e.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=l.logger.debug.bind(l.logger,Gn),this.log=l.logger.log.bind(l.logger,Gn),this.warn=l.logger.warn.bind(l.logger,Gn),this.error=l.logger.error.bind(l.logger,Gn),this.hls=t,this.config=t.config,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null},t.registerListeners=function(){this.hls.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(o.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},t.unregisterListeners=function(){this.hls.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(o.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},t.getLicenseServerUrl=function(e){var t=this.config,n=t.drmSystems,r=t.widevineLicenseUrl,i=n[e];if(i)return i.licenseUrl;if(e===f.WIDEVINE&&r)return r;throw new Error('no license server URL configured for key-system "'+e+'"')},t.getServerCertificateUrl=function(e){var t=this.config.drmSystems[e];if(t)return t.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+e+'"]')},t.attemptKeySystemAccess=function(e){var t=this,n=this.hls.levels,r=function(e,t,n){return!!e&&n.indexOf(e)===t},i=n.map((function(e){return e.audioCodec})).filter(r),a=n.map((function(e){return e.videoCodec})).filter(r);return i.length+a.length===0&&a.push("avc1.42e01e"),new Promise((function(n,r){!function e(o){var l=o.shift();t.getMediaKeysPromise(l,i,a).then((function(e){return n({keySystem:l,mediaKeys:e})})).catch((function(t){o.length?e(o):r(t instanceof Wn?t:new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))}(e)}))},t.requestMediaKeySystemAccess=function(e,t){var n=this.config.requestMediaKeySystemAccessFunc;if("function"!=typeof n){var r="Configured requestMediaKeySystemAccess is not a function "+n;return null===A&&"http:"===self.location.protocol&&(r="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(r))}return n(e,t)},t.getMediaKeysPromise=function(e,t,n){var r=this,i=function(e,t,n,r){var i;switch(e){case f.FAIRPLAY:i=["cenc","sinf"];break;case f.WIDEVINE:case f.PLAYREADY:i=["cenc"];break;case f.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+e)}return function(e,t,n,r){return[{initDataTypes:e,persistentState:r.persistentState||"not-allowed",distinctiveIdentifier:r.distinctiveIdentifier||"not-allowed",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:t.map((function(e){return{contentType:'audio/mp4; codecs="'+e+'"',robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null}})),videoCapabilities:n.map((function(e){return{contentType:'video/mp4; codecs="'+e+'"',robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}}))}]}(i,t,n,r)}(e,t,n,this.config.drmSystemOptions),a=this.keySystemAccessPromises[e],o=null==a?void 0:a.keySystemAccess;if(!o){this.log('Requesting encrypted media "'+e+'" key-system access with config: '+JSON.stringify(i)),o=this.requestMediaKeySystemAccess(e,i);var s=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch((function(t){r.log('Failed to obtain access to key-system "'+e+'": '+t)})),o.then((function(t){r.log('Access for key-system "'+t.keySystem+'" obtained');var n=r.fetchServerCertificate(e);return r.log('Create media-keys for "'+e+'"'),s.mediaKeys=t.createMediaKeys().then((function(t){return r.log('Media-keys created for "'+e+'"'),n.then((function(n){return n?r.setMediaKeysServerCertificate(t,e,n):t}))})),s.mediaKeys.catch((function(t){r.error('Failed to create media-keys for "'+e+'"}: '+t)})),s.mediaKeys}))}return o.then((function(){return a.mediaKeys}))},t.createMediaKeySessionContext=function(e){var t=e.decryptdata,n=e.keySystem,r=e.mediaKeys;this.log('Creating key-system session "'+n+'" keyId: '+Fn.default.hexDump(t.keyId||[]));var i=r.createSession(),a={decryptdata:t,keySystem:n,mediaKeys:r,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(a),a},t.renewKeySession=function(e){var t=e.decryptdata;if(t.pssh){var n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t);this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,"cenc",t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)},t.getKeyIdString=function(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return Fn.default.hexDump(e.keyId)},t.updateKeySession=function(e,t){var n,r=e.mediaKeysSession;return this.log('Updating key-session "'+r.sessionId+'" for keyID '+Fn.default.hexDump((null===(n=e.decryptdata)||void 0===n?void 0:n.keyId)||[])+"\n } (data length: "+(t?t.byteLength:t)+")"),r.update(t)},t.selectKeySystemFormat=function(e){var t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+e.sn+" "+e.type+": "+e.level+") key formats "+t.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise},t.getKeyFormatPromise=function(e){var t=this;return new Promise((function(n,r){var i=T(t.config),a=e.map(E).filter((function(e){return!!e&&-1!==i.indexOf(e)}));return t.getKeySystemSelectionPromise(a).then((function(e){var t=e.keySystem,i=k(t);i?n(i):r(new Error('Unable to find format for key-system "'+t+'"'))})).catch(r)}))},t.loadKey=function(e){var t=this,n=e.keyInfo.decryptdata,r=this.getKeyIdString(n),i="(keyId: "+r+' format: "'+n.keyFormat+'" method: '+n.method+" uri: "+n.uri+")";this.log("Starting session for key "+i);var a=this.keyIdToKeySessionPromise[r];return a||(a=this.keyIdToKeySessionPromise[r]=this.getKeySystemForKeyPromise(n).then((function(r){var a=r.keySystem,o=r.mediaKeys;return t.throwIfDestroyed(),t.log("Handle encrypted media sn: "+e.frag.sn+" "+e.frag.type+": "+e.frag.level+" using key "+i),t.attemptSetMediaKeys(a,o).then((function(){t.throwIfDestroyed();var e=t.createMediaKeySessionContext({keySystem:a,mediaKeys:o,decryptdata:n});return t.generateRequestWithPreferredKeySession(e,"cenc",n.pssh,"playlist-key")}))}))).catch((function(e){return t.handleError(e)})),a},t.throwIfDestroyed=function(e){if(void 0===e&&(e="Invalid state"),!this.hls)throw new Error("invalid state")},t.handleError=function(e){this.hls&&(this.error(e.message),e instanceof Wn?this.hls.trigger(o.Events.ERROR,e.data):this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))},t.getKeySystemForKeyPromise=function(e){var t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){var r=E(e.keyFormat),i=r?[r]:T(this.config);return this.attemptKeySystemAccess(i)}return n},t.getKeySystemSelectionPromise=function(e){if(e.length||(e=T(this.config)),0===e.length)throw new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+JSON.stringify({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(e)},t._onMediaEncrypted=function(e){var t=this,n=e.initDataType,r=e.initData;if(this.debug('"'+e.type+'" event: init data type: "'+n+'"'),null!==r){var i,a;if("sinf"===n&&this.config.drmSystems[f.FAIRPLAY]){var o=(0,w.bin2str)(new Uint8Array(r));try{var s=b(JSON.parse(o).sinf),l=(0,w.parseSinf)(new Uint8Array(s));if(!l)return;i=l.subarray(8,24),a=f.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{var u=(0,w.parsePssh)(r);if(null===u)return;0===u.version&&u.systemId===g.WIDEVINE&&u.data&&(i=u.data.subarray(8,24)),a=function(e){if(e===g.WIDEVINE)return f.WIDEVINE}(u.systemId)}if(a&&i){for(var c=Fn.default.hexDump(i),p=this.keyIdToKeySessionPromise,d=this.mediaKeySessions,h=p[c],y=function(e){var a=d[e],o=a.decryptdata;if(o.pssh||!o.keyId)return"continue";var s=Fn.default.hexDump(o.keyId);return c===s||-1!==o.uri.replace(/-/g,"").indexOf(c)?(h=p[s],delete p[s],o.pssh=new Uint8Array(r),o.keyId=i,h=p[c]=h.then((function(){return t.generateRequestWithPreferredKeySession(a,n,r,"encrypted-event-key-match")})),"break"):void 0},v=0;v3||o.status>=400&&o.status<500)i(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o},"License Request XHR failed ("+a+"). Status: "+o.status+" ("+o.statusText+")"));else{var c=3-n._requestLicenseFailureCount+1;n.warn("Retrying license request, "+c+" attempts left"),n.requestLicense(e,t).then(r,i)}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,n.setupLicenseXHR(o,a,e,t).then((function(e){var t=e.xhr,n=e.licenseChallenge;t.send(n)}))}))},t.onMediaAttached=function(e,t){if(this.config.emeEnabled){var n=t.media;this.media=n,n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}},t.onMediaDetached=function(){var t=this,n=this.media,r=this.mediaKeySessions;n&&(n.removeEventListener("encrypted",this.onMediaEncrypted),n.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},C.clearKeyUriToKeyIdMap();var i=r.length;e.CDMCleanupPromise=Promise.all(r.map((function(e){return t.removeSession(e)})).concat(null==n?void 0:n.setMediaKeys(null).catch((function(e){t.log("Could not clear media keys: "+e+". media.src: "+(null==n?void 0:n.src))})))).then((function(){i&&(t.log("finished closing key sessions and clearing media keys"),r.length=0)})).catch((function(e){t.log("Could not close sessions and clear media keys: "+e+". media.src: "+(null==n?void 0:n.src))}))},t.onManifestLoaded=function(e,t){var n=t.sessionKeys;if(n&&this.config.emeEnabled&&!this.keyFormatPromise){var r=n.reduce((function(e,t){return-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e}),[]);this.log("Selecting key-system from session-keys "+r.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(r)}},t.removeSession=function(e){var t=this,n=e.mediaKeysSession,r=e.licenseXhr;if(n){this.log("Remove licenses and keys and close session "+n.sessionId),n.onmessage=null,n.onkeystatuseschange=null,r&&r.readyState!==XMLHttpRequest.DONE&&r.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;var i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),n.remove().catch((function(e){t.log("Could not remove session: "+e)})).then((function(){return n.close()})).catch((function(e){t.log("Could not close session: "+e)}))}},e}();zn.CDMCleanupPromise=void 0;var Wn=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,n)||this).data=void 0,r.data=t,t.err=t.error,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Hn(t,n),r}(jn(Error));const Yn=zn;var qn,Xn,$n;function Qn(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1?i+1:r.levels.length;t=r.levels.slice(0,a)}for(var o,s=Jn(t);!(o=s()).done;){var l=o.value;l.bitrate>n&&(n=l.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===qn.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*Le.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},Zn(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},Zn(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)},e.serialize=function(e){for(var t,n=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},i=function(e){return Math.round(e)},a=function(e){return 100*i(e/100)},o={br:i,d:i,bl:a,dl:a,mtp:a,nor:function(e){return encodeURIComponent(e)},rtp:a,tb:i},s=Jn(Object.keys(e||{}).sort());!(t=s()).done;){var l=t.value,u=e[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var c=o[l];c&&(u=c(u));var p,d=typeof u;p="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===d?l:"number"===d?l+"="+u:l+"="+JSON.stringify(u),n.push(p)}}return n.join(",")},e.toHeaders=function(t){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},o=0,s=Object.keys(t);o=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===r){t.onreadystatechange=null,t.onprogress=null;var a=t.status,o="arraybuffer"===t.responseType;if(a>=200&&a<300&&(o&&t.response||null!==t.responseText)){var s,u;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),u=o?(s=t.response).byteLength:(s=t.responseText).length,n.loaded=n.total=u,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,e,s,t),!this.callbacks)return;var p={url:t.responseURL,data:s};this.callbacks.onSuccess(p,n,e,t)}else n.retry>=i.maxRetry||a>=400&&a<499?(l.logger.error(a+" while loading "+e.url),this.callbacks.onError({code:a,text:t.statusText},e,t)):(l.logger.warn(a+" while loading "+e.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,i.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout)}},t.loadtimeout=function(){l.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&ir.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();function or(e){var t="function"==typeof Map?new Map:void 0;return(or=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return sr(e,arguments,cr(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ur(r,e)})(e)}function sr(e,t,n){return(sr=lr()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&ur(i,n.prototype),i}).apply(null,arguments)}function lr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ur(e,t){return(ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cr(e){return(cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pr(){return(pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=r&&i(t,n,a.flush(),e)):i(t,n,l,e),s()})).catch((function(){return Promise.reject()}))}()},e}();function fr(e,t){return new self.Request(e.url,t)}var hr=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ur(t,n),r}(or(Error));const gr=dr;var yr=/\s/;function vr(){return(vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=16?s--:s++;var f=gn(l.trim()),h=kn(t,n,f);e&&e.cues&&e.cues.getCueById(h)||((a=new c(t,n,f)).id=h,a.line=p+1,a.align="left",a.position=10+Math.min(80,10*Math.floor(8*s/32)),u.push(a))}return e&&u.length&&(u.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),u.forEach((function(t){return W(e,t)}))),u}},enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:Dt,subtitleTrackController:Mt,timelineController:Ln,audioStreamController:Ct,audioTrackController:It,emeController:Yn,cmcdController:nr});function kr(e,t){for(var n=0;n-1&&(this._maxHdcpLevel=e)}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var n=e.length,r=0;r=t)return r;return 0}},{key:"maxAutoLevel",get:function(){var e,t=this.levels,n=this.autoLevelCapping,r=this.maxHdcpLevel;if(e=-1===n&&t&&t.length?t.length-1:n,r)for(var i=e;i--;){var a=t[i].attrs["HDCP-LEVEL"];if(a&&a<=r)return i}return e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}])&&kr(t.prototype,n),r&&kr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();Tr.defaultConfig=void 0},923:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseSegment:()=>p,ElementaryStreamTypes:()=>r,Fragment:()=>d,Part:()=>f});var r,i=n(965),a=n(945),o=n(408);function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,l(e,t)}function l(e,t){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){for(var n=0;n1||1===n&&this.levelkeys[t[0]].encrypted)return!0}return!1}}]),t}(p),f=function(e){function t(t,n,r,i,a){var s;(s=e.call(this,r)||this).fragOffset=0,s.duration=0,s.gap=!1,s.independent=!1,s.relurl=void 0,s.fragment=void 0,s.index=void 0,s.stats=new o.LoadStats,s.duration=t.decimalFloatingPoint("DURATION"),s.gap=t.bool("GAP"),s.independent=t.bool("INDEPENDENT"),s.relurl=t.enumeratedString("URI"),s.fragment=n,s.index=i;var l=t.enumeratedString("BYTERANGE");return l&&s.setByteRange(l,a),a&&(s.fragOffset=a.fragOffset+a.duration),s}return s(t,e),c(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(p)},408:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LoadStats:()=>r});var r=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},965:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MAX_SAFE_INTEGER:()=>i,isFiniteNumber:()=>r});var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.MAX_SAFE_INTEGER||9007199254740991},524:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>y,flushTextTrackMetadataCueSamples:()=>m,flushTextTrackUserdataCueSamples:()=>b,normalizePts:()=>v});var r=n(965);const i=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},e}();var a=Math.pow(2,32)-1,o=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),a=0,t=8;a>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var r=Math.floor(n/(a+1)),i=Math.floor(n%(a+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(n=0;n>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,u=t.height,c=t.pixelRatio[0],p=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,p>>24,p>>16&255,p>>8&255,255&p])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?"mp3"===t.segmentCodec&&"mp3"===t.codec?e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,r=t.duration*t.timescale,i=t.width,o=t.height,s=Math.floor(r/(a+1)),l=Math.floor(r%(a+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var r=e.sdtp(t),i=t.id,o=Math.floor(n/(a+1)),s=Math.floor(n%(a+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,r.length+16+20+8+16+8+8),r)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,u=t.samples||[],c=u.length,p=12+16*c,d=new Uint8Array(p);for(n+=8+p,d.set(["video"===t.type?1:0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,d)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();o.types=void 0,o.HDLR_TYPES=void 0,o.STTS=void 0,o.STSC=void 0,o.STCO=void 0,o.STSZ=void 0,o.VMHD=void 0,o.SMHD=void 0,o.STSD=void 0,o.FTYP=void 0,o.DINF=void 0;const s=o;var l=n(851),u=n(973),c=n(93),p=n(308),d=n(673);function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?e:n.pts}),e[0].pts);return t&&c.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var l,u,d,f,h,g,y=i,_=i,E=e.pid>-1,k=t.pid>-1,T=t.samples.length,A=e.samples.length>0,w=o&&T>0||T>1;if((!E||A)&&(!k||w)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(e,t,i));var S,C=this.isVideoContiguous,x=-1;if(w&&(x=function(e){for(var t=0;t0){c.logger.warn("[mp4-remuxer]: Dropped "+x+" out of "+T+" video samples due to a missing keyframe");var I=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(x),t.dropped+=x,S=_+=(t.samples[0].pts-I)/t.inputTimeScale}else-1===x&&(c.logger.warn("[mp4-remuxer]: No keyframe found out of "+T+" video samples"),g=!1);if(this.ISGenerated){if(A&&w){var P=this.getVideoStartPts(t.samples),D=(v(e.samples[0].pts,P)-P)/t.inputTimeScale;y+=Math.max(0,D),_+=Math.max(0,-D)}if(A){if(e.samplerate||(c.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,i)),u=this.remuxAudio(e,y,this.isAudioContiguous,a,k||w||s===p.PlaylistLevelType.AUDIO?_:void 0),w){var R=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(c.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,i)),l=this.remuxVideo(t,_,C,R)}}else w&&(l=this.remuxVideo(t,_,C,0));l&&(l.firstKeyFrame=x,l.independent=-1!==x,l.firstKeyFramePTS=S)}}return this.ISGenerated&&(n.samples.length&&(h=m(n,i,this._initPTS,this._initDTS)),r.samples.length&&(f=b(r,i,this._initPTS))),{audio:u,video:l,initSegment:d,independent:g,text:f,id3:h}},t.generateIS=function(e,t,n){var i,a,o,l=e.samples,u=t.samples,c=this.typeSupported,p={},d=!(0,r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(i=a=1/0),e.config&&l.length&&(e.timescale=e.samplerate,"mp3"===e.segmentCodec&&(c.mpeg?(f="audio/mpeg",e.codec=""):c.mp3&&(e.codec="mp3")),p.audio={id:"audio",container:f,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&c.mpeg?new Uint8Array(0):s.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(o=e.inputTimeScale,i=a=l[0].pts-Math.round(o*n))),t.sps&&t.pps&&u.length&&(t.timescale=t.inputTimeScale,p.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:s.initSegment([t]),metadata:{width:t.width,height:t.height}},d)){o=t.inputTimeScale;var h=this.getVideoStartPts(u),g=Math.round(o*n);a=Math.min(a,v(u[0].dts,h)-g),i=Math.min(i,h-g)}if(Object.keys(p).length)return this.ISGenerated=!0,d&&(this._initPTS=i,this._initDTS=a),{tracks:p,initPTS:i,timescale:o}},t.remuxVideo=function(e,t,n,r){var i,a,o=e.inputTimeScale,p=e.samples,y=[],m=p.length,b=this._initPTS,E=this.nextAvcDts,k=8,T=this.videoSampleDuration,A=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,S=!1;n&&null!==E||(E=t*o-(p[0].pts-v(p[0].dts,p[0].pts)));for(var C=0;C0?C-1:C].dts&&(S=!0)}S&&p.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),i=p[0].dts;var I=p[p.length-1].dts-i,P=I?Math.round(I/(m-1)):T||e.inputTimeScale/30;if(n){var D=i-E,R=D>P,O=D<-1;if((R||O)&&(R?c.logger.warn("AVC: "+(0,d.toMsFromMpegTsClock)(D,!0)+" ms ("+D+"dts) hole between fragments detected, filling it"):c.logger.warn("AVC: "+(0,d.toMsFromMpegTsClock)(-D,!0)+" ms ("+D+"dts) overlapping between fragments detected"),!O||E>p[0].pts)){i=E;var L=p[0].pts-D;p[0].dts=i,p[0].pts=L,c.logger.log("Video: First PTS/DTS adjusted: "+(0,d.toMsFromMpegTsClock)(L,!0)+"/"+(0,d.toMsFromMpegTsClock)(i,!0)+", delta: "+(0,d.toMsFromMpegTsClock)(D,!0)+" ms")}}i=Math.max(0,i);for(var M=0,N=0,U=0;U0?Z.dts-p[Q-1].dts:P;if(oe=Q>0?Z.pts-p[Q-1].pts:P,se.stretchShortVideoTrack&&null!==this.nextAudioPts){var ue=Math.floor(se.maxBufferHole*o),ce=(r?A+r*o:this.nextAudioPts)-Z.pts;ce>ue?((T=ce-le)<0?T=le:W=!0,c.logger.log("[mp4-remuxer]: It is approximately "+ce/90+" ms to the next segment; using duration "+T/90+" ms for the last video frame.")):T=le}else T=le}var pe=Math.round(Z.pts-Z.dts);Y=Math.min(Y,T),X=Math.max(X,T),q=Math.min(q,oe),$=Math.max($,oe),y.push(new _(Z.key,T,ee,pe))}if(y.length)if(h){if(h<70){var de=y[0].flags;de.dependsOn=2,de.isNonSync=0}}else if(g&&$-q0&&(r&&Math.abs(A-T)<9e3||Math.abs(v(E[0].pts-g,A)-T)<20*h),E.forEach((function(e){e.pts=v(e.pts-g,A)})),!n||T<0){if(!(E=E.filter((function(e){return e.pts>=0}))).length)return;T=0===a?0:r&&!b?Math.max(0,A):E[0].pts}if("aac"===e.segmentCodec)for(var w=this.config.maxAudioFramesDrift,S=0,C=T;S=w*h&&D<1e4&&b){var R=Math.round(P/h);(C=I-R*h)<0&&(R--,C+=h),0===S&&(this.nextAudioPts=T=C),c.logger.warn("[mp4-remuxer]: Injecting "+R+" audio frame @ "+(C/o).toFixed(3)+"s due to "+Math.round(1e3*P/o)+" ms gap.");for(var O=0;O0))return;j+=k;try{N=new Uint8Array(j)}catch(e){return void this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:u.ErrorTypes.MUX_ERROR,details:u.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating audio mdat "+j})}y||(new DataView(N.buffer).setUint32(0,j),N.set(s.types.mdat,4))}N.set(G,k);var W=G.byteLength;k+=W,m.push(new _(!0,d,W,0)),F=z}var Y=m.length;if(Y){var q=m[m.length-1];this.nextAudioPts=T=F+p*q.duration;var X=y?new Uint8Array(0):s.moof(e.sequenceNumber++,U/p,f({},e,{samples:m}));e.samples=[];var $=U/o,Q=T/o,Z={data1:X,data2:N,startPTS:$,endPTS:Q,startDTS:$,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:Y};return this.isAudioContiguous=!0,Z}},t.remuxEmptyAudio=function(e,t,n,r){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,l=(null!==s?s:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,p=1024*o,d=Math.ceil((u-l)/p),f=i.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(c.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var h=[],g=0;g4294967296;)e+=n;return e}function m(e,t,n,r){var i=e.samples.length;if(i){for(var a=e.inputTimeScale,o=0;o{"use strict";var r;n.r(t),n.d(t,{MetadataSchema:()=>r}),function(e){e.audioId3="org.id3",e.dateRange="com.apple.quicktime.HLS",e.emsg="https://aomedia.org/emsg/ID3"}(r||(r={}))},308:(e,t,n)=>{"use strict";var r,i;n.r(t),n.d(t,{PlaylistContextType:()=>r,PlaylistLevelType:()=>i}),function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(r||(r={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(i||(i={}))},300:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={hexDump:function(e){for(var t="",n=0;n{"use strict";n.r(t),n.d(t,{enableLogs:()=>s,logger:()=>l});var r=function(){},i={trace:r,debug:r,log:r,warn:r,info:r,error:r},a=i;function o(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):r}function s(e,t){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{"use strict";n.r(t),n.d(t,{RemuxerTrackIdConfig:()=>c,appendUint8Array:()=>S,bin2str:()=>p,computeRawDurationFromSamples:()=>T,discardEPB:()=>P,findBox:()=>y,getDuration:()=>k,getStartDTS:()=>E,mp4Box:()=>R,mp4pssh:()=>O,offsetStartDTS:()=>A,parseEmsg:()=>D,parseInitSegment:()=>m,parsePssh:()=>L,parseSEIMessageFromNALu:()=>I,parseSamples:()=>C,parseSegmentIndex:()=>v,parseSinf:()=>_,patchEncyptionData:()=>b,readSint32:()=>h,readUint16:()=>d,readUint32:()=>f,segmentValidRange:()=>w,writeUint32:()=>g});var r=n(923),i=n(145),a=n(181),o=n(93),s=n(300),l=Math.pow(2,32)-1,u=[].push,c={video:1,audio:2,id3:3,text:4};function p(e){return String.fromCharCode.apply(null,e)}function d(e,t){var n=e[t]<<8|e[t+1];return n<0?65536+n:n}function f(e,t){var n=h(e,t);return n<0?4294967296+n:n}function h(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function g(e,t,n){e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function y(e,t){var n=[];if(!t.length)return n;for(var r=e.byteLength,i=0;i1?i+a:r;if(p(e.subarray(i+4,i+8))===t[0])if(1===t.length)n.push(e.subarray(i+8,o));else{var s=y(e.subarray(i+8,o),t.slice(1));s.length&&u.apply(n,s)}i=o}return n}function v(e){var t=[],n=e[0],r=8,i=f(e,r);r+=4,r+=0===n?8:16,r+=2;var a=e.length+0,o=d(e,r);r+=2;for(var s=0;s>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var p=f(e,l);l+=4,t.push({referenceSize:c,subsegmentDuration:p,info:{duration:p/i,start:a,end:a+c-1}}),a+=c,r=l+=4}return{earliestPresentationTime:0,timescale:i,version:n,referencesCount:o,references:t}}function m(e){for(var t=[],n=y(e,["moov","trak"]),i=0;i0;i||(r=y(t,["encv"])),r.forEach((function(e){y(i?e.subarray(28):e.subarray(78),["sinf"]).forEach((function(e){var t=_(e);if(t){var r=t.subarray(8,24);r.some((function(e){return 0!==e}))||(o.logger.log("[eme] Patching keyId in 'enc"+(i?"a":"v")+">sinf>>tenc' box: "+s.default.hexDump(r)+" -> "+s.default.hexDump(n)),t.set(n,8))}}))}))})),e}function _(e){var t=y(e,["schm"])[0];if(t){var n=p(t.subarray(4,8));if("cbcs"===n||"cenc"===n)return y(e,["schi","tenc"])[0]}return o.logger.error("[eme] missing 'schm' box"),null}function E(e,t){return y(t,["moof","traf"]).reduce((function(t,n){var r=y(n,["tfdt"])[0],i=r[0],a=y(n,["tfhd"]).reduce((function(t,n){var a=f(n,4),o=e[a];if(o){var s=f(r,4);1===i&&(s*=Math.pow(2,32),s+=f(r,8));var l=s/(o.timescale||9e4);if(isFinite(l)&&(null===t||l>1&63;return 39===n||40===n}return 6==(31&t)}function I(e,t,n,r){var i=P(e),o=0;o+=t;for(var s=0,l=0,u=!1,c=0;o=i.length)break;s+=c=i[o++]}while(255===c);l=0;do{if(o>=i.length)break;l+=c=i[o++]}while(255===c);var p=i.length-o;if(!u&&4===s&&o16){for(var k=[],T=0;T<16;T++){var A=i[o++].toString(16);k.push(1==A.length?"0"+A:A),3!==T&&5!==T&&7!==T&&9!==T||k.push("-")}for(var w=l-16,S=new Uint8Array(w),C=0;Cp)break}}function P(e){for(var t=e.byteLength,n=[],r=1;r1?t-1:0),r=1;r>24&255,s[1]=a>>16&255,s[2]=a>>8&255,s[3]=255&a,s.set(e,4),o=0,a=8;o0?(a=new Uint8Array(4),t.length>0&&new DataView(a.buffer).setUint32(0,t.length,!1)):a=new Uint8Array;var l=new Uint8Array(4);return n&&n.byteLength>0&&new DataView(l.buffer).setUint32(0,n.byteLength,!1),R([112,115,115,104],new Uint8Array([r,0,0,0]),e,a,i,l,n||new Uint8Array)}function L(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;var t={version:0,systemId:"",kids:null,data:null},n=new DataView(e),r=n.getUint32(0);if(e.byteLength!==r&&r>44)return null;if(1886614376!==n.getUint32(4))return null;if(t.version=n.getUint32(8)>>>24,t.version>1)return null;t.systemId=s.default.hexDump(new Uint8Array(e,12,16));var i=n.getUint32(28);if(0===t.version){if(r-32{"use strict";function r(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=e*t*n;return r?Math.round(i):i}function i(e,t,n,i){return void 0===n&&(n=1),void 0===i&&(i=!1),r(e,t,1/n,i)}function a(e,t){return void 0===t&&(t=!1),r(e,1e3,1/9e4,t)}function o(e,t){return void 0===t&&(t=1),r(e,9e4,1/t)}n.r(t),n.d(t,{toMpegTsClockFromTimescale:()=>o,toMsFromMpegTsClock:()=>a,toTimescaleFromBase:()=>r,toTimescaleFromScale:()=>i})},145:(e,t,n)=>{"use strict";function r(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}n.r(t),n.d(t,{sliceUint8:()=>r})},729:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,a||e,o),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,o=new Array(a);i{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(76).default})(),e.exports=r())},function(e,t,n){var r,i;window,e.exports=(r=n(0),i=n(318),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=r},function(e,t){e.exports=i},function(e){e.exports=JSON.parse('{"shakaConfig":{"streaming":{"ignoreTextStreamFailures":true,"bufferingGoal":60,"alwaysStreamText":true},"abr":{"enabled":true,"restrictions":{}}},"forceRedirectExternalStreams":false,"trackEmsgEvents":true,"switchDynamicToStatic":false}')},function(e,t,n){(t=n(5)(!1)).push([e.i,".shaka-text-container {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n width: 100%;\n min-width: 48px;\n transition: bottom cubic-bezier(0.4, 0, 0.6, 1) 0.1s;\n transition-delay: 0s;\n font-size: 20px;\n line-height: 1.4;\n color: #fff;\n font-family: Roboto-Regular, Roboto, sans-serif, TengwarTelcontar;\n}\n.shaka-text-container span.shaka-text-wrapper {\n display: inline;\n background: 0 0;\n text-align: center;\n}\n\n:fullscreen .shaka-text-container {\n font-size: 4.4vmin;\n}\n\n:-webkit-full-screen .shaka-text-container {\n font-size: 4.4vmin;\n}\n\n:-moz-full-screen .shaka-text-container {\n font-size: 4.4vmin;\n}\n\n:-ms-fullscreen .shaka-text-container {\n font-size: 4.4vmin;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function o(e){for(var t=-1,n=0;n0?t:null},parseFloat:function(e){var t=Number(e);return isNaN(t)?null:t}};function w(e,t){for(var n=0;n0&&e[0].innerHTML&&(n._baseURL=e[0].textContent);var t=A.findElements(n._xmlDoc,T.TagTypes.ADAPTATION_SET),r=Array.from(t).filter((function(e){return A.parseAttr(e,T.AttributeTypes.CONTENT_TYPE)===P.ContentType.IMAGE}));r.length>0?(n._adaptationSets=r.map((function(e){return new P(e)})),n._logger.debug("Found image adaptation set",n._adaptationSets)):n._logger.debug("No image adaptations were found in manifest")})),this._logger.debug("Initialize manifest parser"),this._adaptationSets=[],(t=e instanceof ArrayBuffer?function(e){return TextDecoder?(new TextDecoder).decode(new Uint8Array(e)):null}(e):e)&&(this._xmlDoc=A.parseXml(t))}e.isValid=function(){return window.TextEncoder&&window.TextDecoder};var t,n,r=e.prototype;return r.parseManifest=function(){try{this._logger.debug("Start parsing dash manifest"),this._parseAdaptionSets(),this._logger.debug("Manifest parsing finished successfully")}catch(e){this._logger.warn("Manifest parsing failed",e)}},r.getBaseUrl=function(){return this._baseURL||""},r.getImageSet=function(){return this._adaptationSets.find((function(e){return e.contentType===P.ContentType.IMAGE}))},r.hasImageSet=function(){return!!this.getImageSet()},t=e,(n=[{key:"adaptationSets",get:function(){return this._adaptationSets}}])&&D(t.prototype,n),e}();function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M=function(){function e(e,t,n){var r=this;L(this,"_tracks",[]),L(this,"_parseTracks",(function(e,t,n){var i=e.representations,a=e.segmentTemplate,o=e.essentialProperty;i.forEach((function(e,i){var s=e.id,l=e.bandwidth,u=e.width,p=e.height,d=a.startNumber,f=a.duration,h=a.media,g=a.timescale,y=a.presentationTimeOffset,v=r._getEssentialValue(o,e),m=r._getDimensions(v),b=m[0],_=m[1];r._tracks.push(new c.ImageTrack({id:s,index:i,active:!1,width:u,height:p,duration:f,rows:b,cols:_,url:r._buildTemplateUrl(h,s,t,n),customData:{bitrate:l,startNumber:d,timescale:g,presentationTimeOffset:y}}))}))})),L(this,"_getDimensions",(function(e){var t=1,n=1;if(e.includes("x")){var r=e.split("x");n=parseInt(r[0]),t=parseInt(r[1])}return[t,n]})),L(this,"_getEssentialValue",(function(e,t){return e?e.value:t.essentialProperty?t.essentialProperty.value:""})),L(this,"_buildTemplateUrl",(function(e,t,n,r){var i=n.split("/").pop(),a=n.replace(i,"");return(r=r.replace(/^\.\/|^\./,"")).length>0&&!r.endsWith("/")&&(r+="/"),k(""+a+r+e,{id:t})})),L(this,"_buildUrlFromTemplate",(function(e,t){return k(e.url,{index:t,time:(t-1)*e.duration*e.customData.timescale,bitrate:e.customData.bitrate})})),this._parseTracks(e,t,n),this._tracks.length>0&&(this._tracks.sort((function(e,t){return e.customData.bitrate-t.customData.bitrate})),this.selectTrack(this._tracks[this._tracks.length-1]))}var t=e.prototype;return t.selectTrack=function(e){this._tracks.forEach((function(t){return t.index===e.index?t.active=!0:t.active=!1}))},t.getTracks=function(){return this._tracks},t.getActiveTrack=function(){return this._tracks.find((function(e){return e.active}))},t.getThumbnail=function(e){var t=this.getActiveTrack(),n=t.duration,r=t.rows,i=t.cols,a=t.sliceWidth,o=t.sliceHeight,s=t.customData,l=Math.floor(e/n)+s.startNumber,u=e%n,p=Math.floor(u*r*i/n);return new c.ThumbnailInfo({width:Math.floor(a),height:Math.floor(o),x:Math.floor(p%i)*a,y:Math.floor(p/i)*o,url:this._buildUrlFromTemplate(t,l)})},e}();function N(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function U(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){N(a,r,i,o,s,"next",e)}function s(e){N(a,r,i,o,s,"throw",e)}o(void 0)}))}}function F(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n3&&!e._videoElement.paused&&(r===e._videoElement.currentTime&&(o._logger.debug("stall found, break the stall"),e._videoElement.currentTime=parseFloat(e._videoElement.currentTime.toFixed(1))+.1),e._clearStallInterval()),r=e._videoElement.currentTime}),500)},a._maybeBreakStalls=function(){var e=this;this._config.forceBreakStall&&this._eventManager.listen(this._videoElement,c.EventType.SEEKING,(function(){return e._stallHandler()}))},a._maybeGetRedirectedUrl=function(e){var t=this._config.forceRedirectExternalStreams,n=this._config.redirectExternalStreamsTimeout,r=this._config.redirectExternalStreamsHandler;return new Promise((function(i){if(!t)return i(e);c.Utils.Http.jsonp(e,r,{timeout:n}).then((function(e){i(e)})).catch((function(){return i(e)}))}))},a._maybeSetFilters=function(){var e=this;"function"==typeof c.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(o._logger.debug("Register request filter"),this._shaka.getNetworkingEngine().registerRequestFilter((function(t,n){if(Object.values(c.RequestType).includes(t)){var r,i={url:n.uris[0],body:n.body,headers:n.headers};try{r=e._config.network.requestFilter(t,i)}catch(e){r=Promise.reject(e)}return(r=r||Promise.resolve(i)).then((function(e){n.uris=[e.url],n.headers=e.headers,"boolean"==typeof e.withCredentials&&(n.allowCrossSiteCredentials=e.withCredentials),"POST"===n.method?n.body=e.body:e.body&&o._logger.warn("Request with "+n.method+" method cannot have body")})).catch((function(t){throw e._requestFilterError=!0,t}))}}))),"function"==typeof c.Utils.Object.getPropertyPath(this._config,"network.responseFilter")&&(o._logger.debug("Register response filter"),this._shaka.getNetworkingEngine().registerResponseFilter((function(t,n){if(Object.values(c.RequestType).includes(t)){var r,i=n.uri,a=n.data,o=n.headers,s={url:i,originalUrl:e._sourceObj.url,data:a,headers:o};try{r=e._config.network.responseFilter(t,s)}catch(e){r=Promise.reject(e)}return(r=r||Promise.resolve(s)).then((function(e){n.data=e.data})).catch((function(t){throw e._responseFilterError=!0,t}))}})))},a._maybeSetDrmConfig=function(){if(this._sourceObj&&this._sourceObj.drmData)for(var e,t={},n=F(o._availableDrmProtocol);!(e=n()).done;)e.value.setDrmPlayback(t,this._sourceObj.drmData),this._config.shakaConfig.drm&&c.Utils.Object.mergeDeep(t.drm,this._config.shakaConfig.drm),c.Utils.Object.mergeDeep(this._config.shakaConfig,t)},a._maybeCapLevelToPlayerSize=function(){var e=this;if(this._config.capLevelToPlayerSize){var t=function(){return{minHeight:0,maxHeight:e._videoHeight,minWidth:0,maxWidth:e._videoWidth,minBitrate:0,maxBitrate:1/0}};this._clearVideoUpdateTimer(),this._videoSizeUpdateTimer=setInterval((function(){return e._updateRestriction(t())}),1e3),this._updateRestriction(t())}},a._maybeApplyAbrRestrictions=function(){this._config.capLevelToPlayerSize||(this._clearVideoUpdateTimer(),c.Utils.Object.hasPropertyPath(this._config,"abr.restrictions")&&this._updateRestriction(this._config.abr.restrictions))},a._updateRestriction=function(e){var t=this._getRestrictionShakaConfig(e);this._shaka.configure({abr:{restrictions:t}})},a._getRestrictionShakaConfig=function(e){var t=this,n=function(e){var n=t._getVideoTracks();return Math.min.apply(null,n.map((function(t){return t[e]})))},r={};if(e){var i=e.maxHeight,a=e.maxWidth,s=e.maxBitrate,l=e.minHeight,u=e.minWidth,c=e.minBitrate,p=Math.max(l,0),d=Math.max(i,n("height"));d>=p?(r.minHeight=p,r.maxHeight=d):o._logger.warn("Invalid maxHeight restriction, maxHeight must be greater than minHeight",l,i);var f=Math.max(u,0),h=Math.max(a,n("width"));h>=f?(r.minWidth=f,r.maxWidth=h):o._logger.warn("Invalid maxWidth restriction, maxWidth must be greater than minWidth",u,a);var g=Math.max(c,0),y=Math.max(s,n("bandwidth"));y>=g?(r.minBandwidth=g,r.maxBandwidth=y):o._logger.warn("Invalid maxBitrate restriction, maxBitrate must be greater than minBitrate",c,s)}return r},a.attachMediaSource=function(){this._shaka||(this._videoElement&&this._videoElement.src&&(c.Utils.Dom.setAttribute(this._videoElement,"src",""),c.Utils.Dom.removeAttribute(this._videoElement,"src")),this._init())},a.detachMediaSource=function(){var e=this;return this._shaka?(0===Math.floor(this.duration-this.currentTime)?this._lastTimeDetach=0:this.currentTime>0&&(this._lastTimeDetach=this.currentTime),this._reset().then((function(){e._shaka=null,e._loadPromise=null}))):Promise.resolve()},a._clearVideoUpdateTimer=function(){this._videoSizeUpdateTimer&&(clearInterval(this._videoSizeUpdateTimer),this._videoSizeUpdateTimer=null)},a._addBindings=function(){var e=this;this._eventManager.listen(this._shaka,G,this._adapterEventsBindings.adaptation),this._eventManager.listen(this._shaka,K,this._adapterEventsBindings.error),this._eventManager.listen(this._shaka,W,this._adapterEventsBindings.drmsessionupdate),this._eventManager.listen(this._videoElement,c.EventType.WAITING,this._adapterEventsBindings.waiting),this._eventManager.listen(this._videoElement,c.EventType.PLAYING,this._adapterEventsBindings.playing),this._eventManager.listen(this._videoElement,c.EventType.LOADED_DATA,(function(){return e._onLoadedData()})),this._eventManager.listenOnce(this._videoElement,c.EventType.PLAYING,(function(){e._eventManager.listen(e._shaka,z,e._adapterEventsBindings.buffering)})),this._config.trackEmsgEvents&&this._eventManager.listen(this._shaka,Y,this._adapterEventsBindings.emsg),this._shaka.getNetworkingEngine().registerResponseFilter((function(t,n){switch(t){case d.a.net.NetworkingEngine.RequestType.SEGMENT:e._trigger(c.EventType.FRAG_LOADED,{miliSeconds:n.timeMs,bytes:n.data.byteLength,url:n.uri}),e.isLive()&&e._dispatchNativeEvent(c.EventType.DURATION_CHANGE);break;case d.a.net.NetworkingEngine.RequestType.MANIFEST:e._parseManifest(n.data),e._playbackActualUri=n.uri,e._trigger(c.EventType.MANIFEST_LOADED,{miliSeconds:n.timeMs}),setTimeout((function(){var t,r;e._isLive=e._isLive||(null==(t=e._shaka)?void 0:t.isLive()),e._isLive&&!(null==(r=e._shaka)?void 0:r.isLive())&&!e._isStaticLive&&e._config.switchDynamicToStatic&&(e._sourceObj.url=n.uri,e._switchFromDynamicToStatic())}))}}))},a._onLoadedData=function(){var e=this;this._setLowLatencyMode();var t=this.getSegmentDuration();this._seekRangeStart=this._shaka.seekRange().start,this._startOverTimeout=setTimeout((function(){e._shaka.seekRange().start-e._seekRangeStart>=t&&(e._isStartOver=!1)}),1e3*(t+1))},a._switchFromDynamicToStatic=function(){var e=U(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o._logger.info("Switching from dynamic manifest to static"),this._dispatchNativeEvent(c.EventType.WAITING),t=this._videoElement.currentTime-this._seekRangeStart,n=this.isAdaptiveBitrateEnabled(),r=this._videoElement.paused,e.next=7,this.detachMediaSource();case 7:return this._isStaticLive=!0,this._isLive=!0,this.attachMediaSource(),e.next=12,this.load();case 12:this._videoElement.currentTime=t,r||this._videoElement.play(),n?this._onAdaptation():this._selectedVideoTrack&&this.selectVideoTrack(this._selectedVideoTrack);case 15:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),a._setLowLatencyMode=function(){this._shaka.configure({streaming:{lowLatencyMode:"boolean"==typeof this._config.lowLatencyMode?this._config.lowLatencyMode:this.isLive()}})},a._parseManifest=function(e){!this._manifestParser&&O.isValid()&&(o._logger.debug("Creating parser for the first time"),this._manifestParser=new O(e),this._manifestParser.parseManifest())},a.load=function(){var e=U(regeneratorRuntime.mark((function e(t){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._loadPromise){e.next=5;break}return e.next=3,this._removeMediaKeys();case 3:this._shaka.attach(this._videoElement),this._loadPromise=new Promise((function(e,r){if(n._sourceObj&&n._sourceObj.url){n._trigger(c.EventType.ABR_MODE_CHANGED,{mode:n.isAdaptiveBitrateEnabled()?"auto":"manual"});var i="number"==typeof t&&t>-1?t:void 0;i=isNaN(n._lastTimeDetach)?i:n._lastTimeDetach,n._lastTimeDetach=NaN,n._maybeGetRedirectedUrl(n._sourceObj.url).then((function(e){return n._shaka.load(e,i)})).then((function(){var t={tracks:n._getParsedTracks()};n._maybeCapLevelToPlayerSize(),o._logger.debug("The source has been loaded successfully"),e(t)})).catch((function(e){r(new c.Error(n._isDestroyInProgress?c.Error.Severity.RECOVERABLE:e.severity,e.category,e.code,e.data))}))}}));case 5:return e.abrupt("return",this._loadPromise);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),a.destroy=function(){var t=this;return this._isDestroyInProgress=!0,new Promise((function(n,r){e.prototype.destroy.call(t).then((function(){o._logger.debug("destroy"),t._loadPromise=null,t._adapterEventsBindings={},t._reset().then((function(e){t._isDestroyInProgress=!1,n(e)})).catch((function(e){t._isDestroyInProgress=!1,r(e)}))}))}))},a.getThumbnail=function(e){if(this._thumbnailController)return this._thumbnailController.getThumbnail(e)},a._reset=function(){return this._buffering=!1,this._waitingSent=!1,this._playingSent=!1,this._isLive=!1,this._isStaticLive=!1,this._requestFilterError=!1,this._responseFilterError=!1,this._manifestParser=null,this._thumbnailController=null,this._clearStallInterval(),this._clearVideoUpdateTimer(),clearTimeout(this._startOverTimeout),this._eventManager&&this._eventManager.removeAll(),this._shaka?this._shaka.destroy():Promise.resolve()},a._removeMediaKeys=function(){var e=U(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._videoElement||!this._videoElement.mediaKeys){e.next=16;break}return e.prev=1,o._logger.debug("Removing mediaKeys from the video element"),e.next=5,this._videoElement.setMediaKeys(null);case 5:o._logger.debug("mediaKeys removed"),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this._logger.warn("mediaKeys not cleared");case 11:return e.prev=11,e.abrupt("return",Promise.resolve());case 14:e.next=17;break;case 16:return e.abrupt("return",Promise.resolve());case 17:case"end":return e.stop()}}),e,this,[[1,8,11,14]])})));return function(){return e.apply(this,arguments)}}(),a._getVideoTracks=function(){var e=this._shaka.getVariantTracks(),t=this._getActiveTrack();return e.filter((function(e){return e.audioId===t.audioId}))},a._getActiveTrack=function(){return this._shaka.getVariantTracks().find((function(e){return e.active}))},a._getAudioTracks=function(){var e=this._shaka.getVariantTracks(),t=this._shaka.getAudioLanguagesAndRoles();return t.forEach((function(t){var n=e.filter((function(e){return e.language===t.language})),r=n.map((function(e){return e.id})).join("_"),i=n.some((function(e){return e.active}));t.id=r,t.label=n[0].label,t.active=i})),t},a._getParsedTracks=function(){if(this._shaka){var e=this._getParsedVideoTracks(),t=this._getParsedAudioTracks(),n=this._getParsedTextTracks(),r=this._getParsedImageTracks();return e.concat(t).concat(n).concat(r)}return[]},a._getParsedVideoTracks=function(){var e=this._getVideoTracks(),t=[];if(e)for(var n=0;n0&&(this._videoElement.currentTime=this._getLiveEdge())},a.isLive=function(){var e;return(null==(e=this._shaka)?void 0:e.isLive())||this._isLive},a.getSegmentDuration=function(){return this._shaka?this._shaka.getStats().maxSegmentDuration:0},a._onAdaptation=function(){var e=this._getParsedVideoTracks().find((function(e){return e.active}));this._onTrackChanged(e)},a._onError=function(e){if(e&&e.detail){var t=e.detail;if(t.code===this.VIDEO_ERROR_CODE)return;(this._requestFilterError||this._responseFilterError)&&t.data[0]instanceof d.a.util.Error&&(t=t.data[0],this._requestFilterError?this._requestFilterError=!1:this._responseFilterError=!1),this._trigger(c.EventType.ERROR,new c.Error(t.severity,t.category,t.code,t.data)),o._logger.error(t),t.severity===c.Error.Severity.CRITICAL&&this.destroy()}},a._onBuffering=function(e){e.buffering?this._waitingSent||(this._dispatchNativeEvent(c.EventType.WAITING),this._buffering=!0):(this._buffering=!1,this._videoElement.paused||this._playingSent||this._dispatchNativeEvent(c.EventType.PLAYING))},a._dispatchNativeEvent=function(e){var t;"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),this._videoElement.dispatchEvent(t)},a._onDrmSessionUpdate=function(){this._trigger(c.EventType.DRM_LICENSE_LOADED,{licenseTime:this._shaka.getStats().licenseTime,scheme:this._shaka.drmInfo().keySystem})},a._onEmsg=function(e){var t=e.detail,n=e.type,r=Array.from(this._videoElement.textTracks).find((function(e){return e.label===n}));r||(r=this._videoElement.addTextTrack(c.TextTrack.KIND.METADATA,n));var i=t.startTime,a=t.endTime,o=t.id,s=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(t,["startTime","endTime","id"]),l=new c.TimedMetadata(i,a,o,c.TimedMetadata.TYPE.EMSG,s),u=Object(c.createTextTrackCue)(l);r.addCue(u),this._trigger(c.EventType.TIMED_METADATA_ADDED,{cues:[l]})},a._onWaiting=function(){this._waitingSent=!0,this._playingSent=!1},a._onPlaying=function(){this._playingSent=!0,this._waitingSent=!1,this._buffering&&this._dispatchNativeEvent(c.EventType.WAITING)},a.getStartTimeOfDvrWindow=function(){return this.isLive()&&this._shaka?(this._isStartOver?this._seekRangeStart:this._shaka.seekRange().start)+this._shaka.getConfiguration().streaming.safeSeekOffset:0},a.getDrmInfo=function(){var e=this._shaka.drmInfo();if(e){var t=e.licenseServerUri,n=e.keySystem,r=e.serverCertificateUri,i={licenseUrl:t,scheme:n};return r&&(i.certificate=r),i}return null},r=o,(i=[{key:"_videoWidth",get:function(){var e,t=this._videoElement;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=this._contentScaleFactor),e}},{key:"_videoHeight",get:function(){var e,t=this._videoElement;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=this._contentScaleFactor),e}},{key:"_contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){o._logger.debug("failed reading devicePixelRatio, assume 1")}return e}},{key:"liveDuration",get:function(){return this._getLiveEdge()}},{key:"targetBuffer",get:function(){var e=NaN;return this._shaka?(e=this.isLive()?this._getLiveEdge()-this._videoElement.currentTime:this._videoElement.duration-this._videoElement.currentTime,e=Math.min(e,this._shaka.getConfiguration().streaming.bufferingGoal+this._shaka.getStats().maxSegmentDuration)):NaN}}])&&B(r.prototype,i),o}(c.BaseMediaSourceAdapter);H(q,"id","DashAdapter"),H(q,"_logger",c.BaseMediaSourceAdapter.getLogger(q.id)),H(q,"_dashMimeType","application/dash+xml"),H(q,"_drmProtocols",[f,h]),H(q,"_availableDrmProtocol",[]);var X="1.34.3-canary.0-d041ba8",$="@playkit-js/playkit-js-dash";t.default=q,q.isSupported()&&Object(c.registerMediaSourceAdapter)(q)}]))},function(e,t,n){(function(e){ -/* - @license - Shaka Player - Copyright 2016 Google LLC - SPDX-License-Identifier: Apache-2.0 -*/ -!function(){var n="undefined"!=typeof window?window:e,r={};for(var i in function(e,t,n){ -/* - @license - Shaka Player - Copyright 2016 Google LLC - SPDX-License-Identifier: Apache-2.0 -*/ -var r;function i(e){var t=0;return function(){return t>>0)+"_",r=0;return function e(i){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(i||"")+"_"+r++,i)}})),s("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n(t=t||0)&&(t=Math.max(t+r,0));t=i}})),s("Array.prototype.keys",(function(e){return e||function(){return U(this,(function(e){return e}))}}));var F="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;ne||1342177279>>=1)&&(t+=t);return n}})),s("Number.isNaN",(function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}})),s("Object.values",(function(e){return e||function(e){var t,n=[];for(t in e)L(e,t)&&n.push(e[t]);return n}})),s("Math.log2",(function(e){return e||function(e){return Math.log(e)/Math.LN2}})),s("Math.trunc",(function(e){return e||function(e){if(e=Number(e),isNaN(e)||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return 0>e?-t:t}})),s("Object.entries",(function(e){return e||function(e){var t,n=[];for(t in e)L(e,t)&&n.push([t,e[t]]);return n}}));var j=this||self;function B(e,t){e=e.split(".");var n,r=j;e[0]in r||void 0===r.execScript||r.execScript("var "+e[0]);for(;e.length&&(n=e.shift());)e.length||void 0===t?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=t}function V(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function H(e){return e.h/(1-Math.pow(e.g,e.i))}function K(){this.h=new V(2),this.j=new V(5),this.g=0,this.i=128e3,this.l=16e3}function G(){}function z(){}function W(){}function Y(e){var t=O.apply(1,arguments);X.has(e)||(X.add(e),W.apply(G,c(t)))}function q(){}V.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.i+=e)},K.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},K.prototype.sample=function(e,t){if(!(tt)throw Error("Bad port number "+t);e.Kb=t}else e.Kb=null}function Ne(e,t,n){t instanceof ze?e.g=t:(n||(t=Fe(t,Ke)),e.g=new ze(t))}function Ue(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Fe(e,t,n){return null!=e?(e=encodeURI(e).replace(t,je),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function je(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(r=Oe.prototype).Ea="",r.pb="",r.Ha="",r.Kb=null,r.qa="",r.fb="",r.toString=function(){var e=[],t=this.Ea;if(t&&e.push(Fe(t,Be,!0),":"),t=this.Ha){e.push("//");var n=this.pb;n&&e.push(Fe(n,Be,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Kb)&&e.push(":",String(t))}return(t=this.qa)&&(this.Ha&&"/"!=t.charAt(0)&&e.push("/"),e.push(Fe(t,"/"==t.charAt(0)?He:Ve,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.fb)&&e.push("#",Fe(t,Ge)),e.join("")},r.resolve=function(e){var t=this.clone();"data"===t.Ea&&(t=new Oe);var n=!!e.Ea;n?Le(t,e.Ea):n=!!e.pb,n?t.pb=e.pb:n=!!e.Ha,n?t.Ha=e.Ha:n=null!=e.Kb;var r=e.qa;if(n)Me(t,e.Kb);else if(n=!!e.qa){if("/"!=r.charAt(0))if(this.Ha&&!this.qa)r="/"+r;else{var i=t.qa.lastIndexOf("/");-1!=i&&(r=t.qa.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o=r+2&&192==(224&t[r])&&128==(192&t[r+1])?(i=(31&t[r])<<6|63&t[r+1],r+=1):t.length>=r+3&&224==(240&t[r])&&128==(192&t[r+1])&&128==(192&t[r+2])?(i=(15&t[r])<<12|(63&t[r+1])<<6|63&t[r+2],r+=2):t.length>=r+4&&240==(241&t[r])&&128==(192&t[r+1])&&128==(192&t[r+2])&&128==(192&t[r+3])&&(i=(7&t[r])<<18|(63&t[r+1])<<12|(63&t[r+2])<<6|63&t[r+3],r+=3),65535>=i)n+=String.fromCharCode(i);else{var a=1023&(i-=65536);n+=String.fromCharCode(55296+(i>>10)),n+=String.fromCharCode(56320+a)}}return n}function kt(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new De(2,2,2004);n=Math.floor(e.byteLength/2);var r=new Uint16Array(n);e=Ie(e);for(var i=0;i=n[e]}if(!e)return"";var n=xe(e);if(239==n[0]&&187==n[1]&&191==n[2])return Et(n);if(254==n[0]&&255==n[1])return kt(n.subarray(2),!1);if(255==n[0]&&254==n[1])return kt(n.subarray(2),!0);if(0==n[0]&&0==n[2])return kt(e,!1);if(0==n[1]&&0==n[3])return kt(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return Et(e);throw new De(2,2,2003)}function At(t){if(e.TextEncoder&&!ht()){var n=new TextEncoder;return Ce(n.encode(t))}t=encodeURIComponent(t),t=unescape(t),n=new Uint8Array(t.length);for(var r=0;r>4).toString(16),n+=(15&i).toString(16),t=t.replace(e[0],n)}return t}function Ht(){}function Kt(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Gt(e,t,n){return Ft(t=Kt(e,t),n)?Bt(n,t):"video/mp2t"!=e&&"audio"==n?t.replace("video","audio"):t}function zt(e){var t=Yt(e);switch(e=t[0],t=t[1].toLowerCase(),!0){case"mp4a"===e&&"69"===t:case"mp4a"===e&&"6b"===t:return"mp3";case"mp4a"===e&&"66"===t:case"mp4a"===e&&"67"===t:case"mp4a"===e&&"68"===t:case"mp4a"===e&&"40.2"===t:case"mp4a"===e&&"40.02"===t:case"mp4a"===e&&"40.5"===t:case"mp4a"===e&&"40.05"===t:case"mp4a"===e&&"40.29"===t:case"mp4a"===e&&"40.42"===t:return"aac";case"mp4a"===e&&"a5"===t:return"ac-3";case"mp4a"===e&&"a6"===t:return"ec-3";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";case"avc1"===e:case"avc3"===e:return"avc";case"hvc1"===e:case"hev1"===e:return"hevc";case"dvh1"===e:case"dvhe"===e:return"dovi"}return e}function Wt(e){return(e=e.split(/ *; */)).shift(),(e=e.find((function(e){return e.startsWith("codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}function Yt(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}function qt(e){this.j=null,this.i=e,this.u=!1,this.l=this.s=0,this.m=1/0,this.h=this.g=null,this.B="",this.o=new Map}function Xt(e){return!(!Jt[e]&&"application/cea-608"!=e&&"application/cea-708"!=e)}function $t(e,t,n){if(e.B=t,t=e.o.get(t))for(var r=u(t.keys()),i=r.next();!i.done;i=r.next())(i=t.get(i.value).filter((function(e){return e.endTime<=n})))&&e.i.append(i)}function Qt(e,t,n){t.startTime+=n,t.endTime+=n;for(var r=(t=u(t.nestedCues)).next();!r.done;r=t.next())Qt(e,r.value,n)}function Zt(e,t,n,r,i){for(var a=n+" "+r,o=new Map,s=(t=u(t)).next();!s.done;s=t.next()){var l=s.value;s=l.stream,l=l.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),Qt(e,l,i),l.startTime>=e.l&&l.startTime=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&tn.g&&t>=n.h&&(n.h=e)),E(r)}))},B("shaka.text.TextEngine",qt),qt.prototype.destroy=qt.prototype.destroy,qt.findParser=function(e){return Jt[e]},qt.unregisterParser=function(e){delete Jt[e]},qt.registerParser=function(e,t){Jt[e]=t};var Jt={};function en(){}function tn(e,t){return e=an(e),t=an(t),e.split("-")[0]==t.split("-")[0]}function nn(e,t){return e=an(e),t=an(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function rn(e,t){return e=an(e),t=an(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function an(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=cn.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function on(e,t){return e=an(e),(t=an(t))==e?4:nn(t,e)?3:rn(t,e)?2:nn(e,t)?1:0}function sn(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),cn.get(e)||e}function ln(e){return e.language?an(e.language):e.audio&&e.audio.language?an(e.audio.language):e.video&&e.video.language?an(e.video.language):"und"}function un(e,t){e=an(e);var n=new Set,r=u(t);for(t=r.next();!t.done;t=r.next())n.add(an(t.value));for(t=(r=u(n)).next();!t.done;t=r.next())if((t=t.value)==e)return t;for(t=(r=u(n)).next();!t.done;t=r.next())if(nn(t=t.value,e))return t;for(t=(r=u(n)).next();!t.done;t=r.next())if(rn(t=t.value,e))return t;for(t=(n=u(n)).next();!t.done;t=n.next())if(nn(e,t=t.value))return t;return null}B("shaka.util.LanguageUtils",en),en.findClosestLocale=un,en.getLocaleForVariant=ln,en.getLocaleForText=function(e){return an(e.language||"und")},en.getBase=sn,en.relatedness=on,en.areSiblings=function(e,t){var n=sn(e),r=sn(t);return e!=n&&t!=r&&n==r},en.normalize=an,en.isSiblingOf=rn,en.isParentOf=nn,en.areLanguageCompatible=tn,en.areLocaleCompatible=function(e,t){return(e=an(e))==(t=an(t))};var cn=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function pn(){this.g={}}function dn(e,t,n,r,i){var a=e.variants;(t.length||n.length)&&(a=function(e,t,n){for(var r={},i=(t=u(t)).next();!i.done;r={xd:r.xd},i=t.next())if(r.xd=i.value,(i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.xd)}}(r))).length){e=i;break}for(r={},n=u(n),t=n.next();!t.done;r={jd:r.jd},t=n.next())if(r.jd=t.value,(t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.jd)}}(r))).length){e=t;break}return e}(a,t,n));var o=function(e,t){for(var n=(t=u(t)).next();!n.done;n=t.next())if((n=n.value)==jn||n==Bn){if(1==(e=fn(e,n)).size())return e.keys()[0]}else if(n==Vn)break;return function(e){var t="",n=1/0;return e.forEach((function(e,r){for(var i=0,a=0,o=(r=u(r)).next();!o.done;o=r.next())i+=o.value.bandwidth||0,++a;(i/=a)n?(r.g={},r.push(e,i),n=a):a==n&&r.push(e,i)})),r}function hn(e){var t="";e.video&&(t=zt(e.video.codecs));var n="";return e.audio&&(n=zt(e.audio.codecs)),t+"-"+n}function gn(e,t,n){function r(e,t,n){return e>=t&&e<=n}var i=e.video;if(0!=e.disabledUntilTime){if(e.disabledUntilTime>Date.now()/1e3)return!1;e.disabledUntilTime=0}return!(i&&i.width&&i.height&&(!r(i.width,t.minWidth,Math.min(t.maxWidth,n.width))||!r(i.height,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function yn(e,t,n){for(var r=!1,i=(e=u(e)).next();!i.done;i=e.next()){var a=(i=i.value).allowedByApplication;i.allowedByApplication=gn(i,t,n),a!=i.allowedByApplication&&(r=!0)}return r}function vn(e,t){return R((function(n){return 1==n.g?_(n,mn(t,0=s&&n<=o&&r.bandwidth!=a.bandwidth&&(r=a)}return this.s=Date.now(),r},r.enable=function(){this.o=!0},r.disable=function(){this.o=!1},r.segmentDownloaded=function(e,t){if(this.i.sample(e,t),null!=this.s&&this.o)e:{if(this.B){if(Date.now()-this.s<1e3*this.g.switchInterval)break e}else{if(!((e=this.i).g>=e.i))break e;this.B=!0}e=this.chooseVariant(),this.i.getBandwidthEstimate(zn(this)),e&&this.l(e)}},r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(zn(this))},r.setVariants=function(e){this.m=e},r.playbackRateChanged=function(e){this.u=e},r.setMediaElement=function(t){var n=this;this.j=t,this.h&&(this.h.disconnect(),this.h=null),this.j&&"ResizeObserver"in e&&(this.h=new ResizeObserver((function(){n.D.N(Yn)})),this.h.observe(this.j))},r.configure=function(e){this.g=e,this.i&&this.g&&this.i.configure(this.g.advanced)},B("shaka.abr.SimpleAbrManager",Gn),Gn.prototype.configure=Gn.prototype.configure,Gn.prototype.setMediaElement=Gn.prototype.setMediaElement,Gn.prototype.playbackRateChanged=Gn.prototype.playbackRateChanged,Gn.prototype.setVariants=Gn.prototype.setVariants,Gn.prototype.getBandwidthEstimate=Gn.prototype.getBandwidthEstimate,Gn.prototype.segmentDownloaded=Gn.prototype.segmentDownloaded,Gn.prototype.disable=Gn.prototype.disable,Gn.prototype.enable=Gn.prototype.enable,Gn.prototype.chooseVariant=Gn.prototype.chooseVariant,Gn.prototype.init=Gn.prototype.init,Gn.prototype.stop=Gn.prototype.stop;var Yn=1;function qn(e,t){this.g=e,this.h=t}function Xn(e,t){var n=new qn(5,0),r=Zn,i=r.g,a=n.h-i.h;(0<(n.g-i.g||a)?r.i:r.h)(r.g,n,e,t)}function $n(e,t,n,r){W([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function Qn(e,t,n,r){z([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(""))}qn.prototype.toString=function(){return"v"+this.g+"."+this.h};var Zn=null;function Jn(e,t){for(this.h=e,this.g=new Set([e]),t=(e=u(t=t||[])).next();!t.done;t=e.next())this.add(t.value)}function er(e,t){var n;if(!(n=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(n=e.audio&&t.audio)){n=e.audio;var r=t.audio;n=!((!(!n.channelsCount||!r.channelsCount||2=e.l){if(!e.i)throw new De(2,7,1010);e.g=1,e.h=e.j}return t=e.g,e.g++,0==t?r.return():(n=e.h*(1+(2*Math.random()-1)*e.o),_(r,new Promise((function(e){new ot(e).N(n/1e3)})),2))}e.h*=e.m,E(r)}))}function pr(e,t){this.promise=e,this.i=t,this.g=!1}function dr(e){return new pr(Promise.reject(e),(function(){return Promise.resolve()}))}function fr(){var e=Promise.reject(new De(2,7,7001));return e.catch((function(){})),new pr(e,(function(){return Promise.resolve()}))}function hr(e){return new pr(Promise.resolve(e),(function(){return Promise.resolve()}))}function gr(e){return new pr(e,(function(){return e.catch((function(){}))}))}function yr(e){return new pr(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function vr(t,n){if(n)if(n instanceof Map)for(var r=u(n.keys()),i=r.next();!i.done;i=r.next())i=i.value,Object.defineProperty(this,i,{value:n.get(i),writable:!0,enumerable:!0});else for(r in n)Object.defineProperty(this,r,{value:n[r],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function mr(e){var t,n=new vr(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}pr.prototype.abort=function(){return this.g=!0,this.i()},pr.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},pr.prototype.Y=function(e,t){function n(n){return function(s){if(i.g&&n)a.reject(o);else{var l=n?e:t;l?r=function(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then((function(){}),(function(){}))})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(l,s,a):(n?a.resolve:a.reject)(s)}}}function r(){return a.reject(o),i.abort()}var i=this,a=new rt,o=new De(2,7,7001);return this.promise.then(n(!0),n(!1)),new pr(a,(function(){return r()}))},B("shaka.util.AbortableOperation",pr),pr.prototype.chain=pr.prototype.Y,pr.prototype.finally=pr.prototype.finally,pr.all=yr,pr.prototype.abort=pr.prototype.abort,pr.notAbortable=gr,pr.completed=hr,pr.aborted=fr,pr.failed=dr,vr.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},vr.prototype.stopImmediatePropagation=function(){this.g=!0},vr.prototype.stopPropagation=function(){},B("shaka.util.FakeEvent",vr);var br={Ig:"abrstatuschanged",Jg:"adaptation",Kg:"buffering",Lg:"downloadfailed",Mg:"downloadheadersreceived",Ng:"drmsessionupdate",Pg:"emsg",ah:"prft",Error:"error",Qg:"expirationupdated",Rg:"gapjumped",Tg:"loaded",Ug:"loading",Wg:"manifestparsed",Xg:"mediaqualitychanged",Metadata:"metadata",Zg:"onstatechange",$g:"onstateidle",bh:"ratechange",eh:"segmentappended",fh:"sessiondata",gh:"stalldetected",hh:"streaming",ih:"textchanged",jh:"texttrackvisibility",kh:"timelineregionadded",lh:"timelineregionenter",mh:"timelineregionexit",nh:"trackschanged",ph:"unloading",qh:"variantchanged"};function _r(){this.da=new pn,this.Wc=this}function Er(e){var t=new Set;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var r=n.constructor==Array;if(n.constructor!=Object&&!r)return null;t.add(n);var i,a=r?[]:{};for(i in n)a[i]=e(n[i]);return r&&(a.length=n.length),a}}(e)}function kr(e){var t,n={};for(t in e)n[t]=e[t];return n}function Tr(){this.g=[]}function Ar(e,t){e.g.push(t.finally((function(){te(e.g,t)})))}function wr(e,t,n){_r.call(this),this.i=!1,this.m=new Tr,this.g=new Set,this.h=new Set,this.l=e||null,this.j=t||null,this.s=n||null,this.o=!1}function Sr(e,t,n,r){n=n||Dr;var i=Rr[e];(!i||n>=i.priority)&&(Rr[e]={priority:n,jg:t,kg:void 0!==r&&r})}function Cr(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===n?null:n}}function xr(){this.g=0}function Ir(e,t,n){pr.call(this,e,t),this.h=n}_r.prototype.addEventListener=function(e,t){this.da&&this.da.push(e,t)},_r.prototype.removeEventListener=function(e,t){this.da&&this.da.remove(e,t)},_r.prototype.dispatchEvent=function(e){if(!this.da)return!0;var t=this.da.get(e.type)||[],n=this.da.get("All");for(n&&(t=t.concat(n)),n=(t=u(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.Wc,e.currentTarget=this.Wc;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},_r.prototype.release=function(){this.da=null},Tr.prototype.destroy=function(){for(var e=[],t=u(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch((function(){})),e.push(n.abort());return this.g=[],Promise.all(e)},y(wr,_r),(r=wr.prototype).je=function(e){this.o=e},r.lg=function(e){this.g.add(e)},r.Bg=function(e){this.g.delete(e)},r.rf=function(){this.g.clear()},r.mg=function(e){this.h.add(e)},r.Cg=function(e){this.h.delete(e)},r.tf=function(){this.h.clear()},r.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),_r.prototype.release.call(this),this.m.destroy()},r.request=function(e,t){var n=this,r=new xr;if(this.i){var i=Promise.reject(new De(2,7,7001));return i.catch((function(){})),new Ir(i,(function(){return Promise.resolve()}),r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Er(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=Er(t.uris);var a=(i=function(e,t,n){for(var r=hr(void 0),i={},a=(e=u(e.g)).next();!a.done;i={sd:i.sd},a=e.next())i.sd=a.value,r=r.Y(function(e){return function(){return n.body&&(n.body=Ce(n.body)),e.sd(t,n)}}(i));return r.Y(void 0,(function(e){if(e instanceof De&&7001==e.code)throw e;throw new De(2,1,1006,e)}))}(this,e,t)).Y((function(){return function e(t,n,r,i,a,o,s){t.o&&(r.uris[a]=r.uris[a].replace("http://","https://"));var l=new Oe(r.uris[a]),u=l.Ea,c=!1;u||(u=(u=location.protocol).slice(0,-1),Le(l,u),r.uris[a]=l.toString()),u=u.toLowerCase();var p=(u=Rr[u])?u.jg:null;if(!p)return dr(new De(2,1,1e3,l));var d,f=u.kg,h=null,g=null,y=!1,v=!1;return gr(cr(i)).Y((function(){if(t.i)return fr();d=Date.now();var e=p(r.uris[a],r,n,(function(e,r,i){h&&h.stop(),g&&g.N(o/1e3),t.l&&n==Pr&&(t.l(e,r),c=!0,s.g=i)}),(function(e){t.j&&t.j(e,r,n),v=!0}));if(!f)return e;var i=r.retryParameters.connectionTimeout;i&&(h=new ot((function(){y=!0,e.abort()}))).N(i/1e3);var o=r.retryParameters.stallTimeout;return o&&(g=new ot((function(){y=!0,e.abort()}))),e})).Y((function(e){h&&h.stop(),g&&g.stop(),null==e.timeMs&&(e.timeMs=Date.now()-d);var i={response:e,Yf:c};return!v&&t.j&&t.j(e.headers,r,n),i}),(function(l){if(h&&h.stop(),g&&g.stop(),t.s){var u=null,c=0;l instanceof De&&(u=l,1001==l.code&&(c=l.data[1])),t.s(r,u,c,y)}if(t.i)return fr();if(y&&(l=new De(1,1,1003,r.uris[a],n)),l instanceof De){if(7001==l.code)throw l;if(1010==l.code)throw o;if(1==l.severity)return u=new vr("retry",u=(new Map).set("error",l)),t.dispatchEvent(u),a=(a+1)%r.uris.length,e(t,n,r,i,a,l,s)}throw l}))}(n,e,t,new ur(t.retryParameters,!1),0,null,r)})),o=a.Y((function(t){return function(e,t,n){for(var r=hr(void 0),i={},a=(e=u(e.h)).next();!a.done;i={td:i.td},a=e.next())i.td=a.value,r=r.Y(function(e){return function(){var r=n.response;return r.data&&(r.data=Ce(r.data)),e.td(t,r)}}(i));return r.Y((function(){return n}),(function(e){var t=2;if(e instanceof De){if(7001==e.code)throw e;t=e.severity}throw new De(t,1,1007,e)}))}(n,e,t)})),s=Date.now(),l=0;i.promise.then((function(){l=Date.now()-s}),(function(){}));var c=0;a.promise.then((function(){c=Date.now()}),(function(){}));var p=o.Y((function(t){var r=Date.now()-c,i=t.response;return i.timeMs+=l,i.timeMs+=r,t.Yf||!n.l||i.fromCache||e!=Pr||n.l(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}));return i=new Ir(p.promise,(function(){return p.abort()}),r),Ar(this.m,i),i},B("shaka.net.NetworkingEngine",wr),wr.prototype.request=wr.prototype.request,wr.prototype.destroy=wr.prototype.destroy,wr.makeRequest=Cr,wr.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},wr.prototype.clearAllResponseFilters=wr.prototype.tf,wr.prototype.unregisterResponseFilter=wr.prototype.Cg,wr.prototype.registerResponseFilter=wr.prototype.mg,wr.prototype.clearAllRequestFilters=wr.prototype.rf,wr.prototype.unregisterRequestFilter=wr.prototype.Bg,wr.prototype.registerRequestFilter=wr.prototype.lg,wr.unregisterScheme=function(e){delete Rr[e]},wr.registerScheme=Sr,wr.prototype.setForceHTTPS=wr.prototype.je,wr.NumBytesRemainingClass=xr,y(Ir,pr),wr.PendingRequest=Ir;var Pr=1;wr.RequestType={MANIFEST:0,SEGMENT:Pr,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var Dr=3;wr.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Dr};var Rr={};function Or(e){this.g=!1,this.h=new rt,this.i=e}function Lr(e,t){if(e.g){if(t instanceof De&&7003==t.code)throw t;throw new De(2,7,7003,t)}}function Mr(){this.g=new pn}function Nr(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!n.has(e)})),function(e){var t=Ur;if(null==t){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch(e){t=!1}Ur=t}return t||!1}(e)?t:t.capture||!1}(e,r),this.target.addEventListener(t,n,this.g)}Or.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then((function(){e.h.resolve()}),(function(){e.h.resolve()})))},(r=Mr.prototype).release=function(){this.nb(),this.g=null},r.C=function(e,t,n,r){this.g&&(e=new Nr(e,t,n,r),this.g.push(t,e))},r.ma=function(e,t,n,r){var i=this;this.C(e,t,(function r(a){i.zc(e,t,r),n(a)}),r)},r.zc=function(e,t,n){if(this.g)for(var r=this.g.get(t)||[],i=(r=u(r)).next();!i.done;i=r.next())(i=i.value).target!=e||n!=i.listener&&n||(i.zc(),this.g.remove(t,i))},r.nb=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,c(t.g[e]));for(n=(t=u(n)).next();!n.done;n=t.next())n.value.zc();this.g.g={}}},B("shaka.util.EventManager",Mr),Mr.prototype.removeAll=Mr.prototype.nb,Mr.prototype.unlisten=Mr.prototype.zc,Mr.prototype.listenOnce=Mr.prototype.ma,Mr.prototype.listen=Mr.prototype.C,Mr.prototype.release=Mr.prototype.release,Nr.prototype.zc=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Ur=void 0;function Fr(e,t){for(var n=[],r=(e=u(e)).next();!r.done;r=e.next())n.push(t(r.value));return n}function jr(e){for(var t=new Map,n=u(Object.keys(e)),r=n.next();!r.done;r=n.next())r=r.value,t.set(r,e[r]);return t}function Br(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function Vr(e,t){if(!e&&!t)return!0;if(e&&!t||t&&!e)return!1;if(e.size!=t.size)return!1;for(var n=(e=u(e)).next();!n.done;n=e.next()){var r=u(n.value);if(n=r.next().value,r=r.next().value,!t.has(n))return!1;if((n=t.get(n))!=r||null==n)return!1}return!0}function Hr(e,t){this.S=Ie(e),this.h=t==Gr,this.g=0}function Kr(){return new De(2,3,3e3)}(r=Hr.prototype).ha=function(){return this.gthis.S.byteLength)throw Kr();var t=xe(this.S,this.g,e);return this.g+=e,t},r.skip=function(e){if(this.g+e>this.S.byteLength)throw Kr();this.g+=e},r.sg=function(e){if(this.ge||e>this.S.byteLength)throw Kr();this.g=e},r.sc=function(){for(var e=this.g;this.ha()&&0!=this.S.getUint8(this.g);)this.g+=1;return e=xe(this.S,e,this.g-e),this.g+=1,Et(e)},B("shaka.util.DataViewReader",Hr),Hr.prototype.readTerminatedString=Hr.prototype.sc,Hr.prototype.seek=Hr.prototype.seek,Hr.prototype.rewind=Hr.prototype.sg,Hr.prototype.skip=Hr.prototype.skip,Hr.prototype.readBytes=Hr.prototype.Za,Hr.prototype.readUint64=Hr.prototype.$a,Hr.prototype.readInt32=Hr.prototype.Pe,Hr.prototype.readUint32=Hr.prototype.K,Hr.prototype.readUint16=Hr.prototype.$d,Hr.prototype.readUint8=Hr.prototype.Ra,Hr.prototype.getLength=Hr.prototype.Gf,Hr.prototype.getPosition=Hr.prototype.Z,Hr.prototype.hasMoreData=Hr.prototype.ha;var Gr=1;function zr(){this.i=[],this.h=[],this.g=!1}function Wr(e){for(var t=Zr(e);e.reader.ha()&&!e.parser.g;)e.parser.qc(e.start+t,e.reader,e.partialOkay)}function Yr(e){for(var t=Zr(e),n=e.reader.K(),r=0;r>24&255,e>>16&255,e>>8&255,255&e)}function Zr(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}Hr.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Gr},(r=zr.prototype).box=function(e,t){return e=$r(e),this.i[e]=Jr,this.h[e]=t,this},r.P=function(e,t){return e=$r(e),this.i[e]=ei,this.h[e]=t,this},r.stop=function(){this.g=!0},r.parse=function(e,t,n){for(e=new Hr(e,0),this.g=!1;e.ha()&&!this.g;)this.qc(0,e,t,n)},r.qc=function(e,t,n,r){var i=t.Z();if(r&&i+8>t.S.byteLength)this.g=!0;else{var a=t.K(),o=t.K(),s=Qr(o),l=!1;switch(a){case 0:a=t.S.byteLength-i;break;case 1:if(r&&t.Z()+8>t.S.byteLength)return void(this.g=!0);a=t.$a(),l=!0}var u=this.h[o];if(u){var c=null,p=null;if(this.i[o]==ei){if(r&&t.Z()+4>t.S.byteLength)return void(this.g=!0);c=(p=t.K())>>>24,p&=16777215}o=i+a,n&&o>t.S.byteLength&&(o=t.S.byteLength),r&&o>t.S.byteLength?this.g=!0:(r=o-t.Z(),u({name:s,parser:this,partialOkay:n||!1,version:c,flags:p,reader:t=new Hr(t=0r?s.setUint32(l,0):s.setUint32(l,16777216),l+=4,o.set(t,l),l+=t.length,0r&&(r+=Math.pow(2,32)),r="0x"+r.toString(16)}e.m(new De(2,6,6006,t.message,t,r))}}))}(e,t,n,e.g.sessionType)}}function Pi(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function Di(e){return e=Fr(e=e.i.keys(),(function(e){return e.sessionId})),Array.from(e)}function Ri(e,t,n){var r,i,a,o,s,l,c,p,d,f,h,g,y;return R((function(v){switch(v.g){case 1:if(r=new Map,n.length){i=function(e,t,n){for(var r=u(t),i=r.next();!i.done;i=r.next()){var a=u(Fi(i.value));for(i=a.next();!i.done;i=a.next())i=i.value,n.has(i.keySystem)||n.set(i.keySystem,[]),n.get(i.keySystem).push(i)}if(1==n.size&&n.has(""))throw new De(2,6,6e3);for(r={},e=u(e.h.preferredKeySystems),i=e.next();!i.done;r={qd:r.qd},i=e.next())for(r.qd=i.value,a=u(t),i=a.next();!i.done;i=a.next())if(i=i.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.qd}}(r)))return i.keySystemAccess;for(e=u([!0,!1]),i=e.next();!i.done;i=e.next())for(r=i.value,a=u(t),i=a.next();!i.done;i=a.next()){var o=u(i.value.decodingInfos);for(i=o.next();!i.done;i=o.next()){var s=i.value;if(s.supported&&s.keySystemAccess){var l=u(i=n.get(s.keySystemAccess.keySystem));for(i=l.next();!i.done;i=l.next())if(!!i.value.licenseServerUri==r)return s.keySystemAccess}}}return null}(e,n,r),v.A(2);break}return _(v,function(e,t){var n,r,i,a,o,s,l,c,p,d,f,h,g,y;return R((function(v){switch(v.g){case 1:if(1==t.size&&t.has(""))throw new De(2,6,6e3);for(r=u(t.values()),i=r.next();!i.done;i=r.next())0==(a=i.value).audioCapabilities.length&&delete a.audioCapabilities,0==a.videoCapabilities.length&&delete a.videoCapabilities;o=u(e.h.preferredKeySystems),s=o.next();case 2:if(s.done){v.A(4);break}if(l=s.value,!t.has(l)){v.A(3);break}return c=t.get(l),k(v,6),_(v,navigator.requestMediaKeySystemAccess(l,[c]),8);case 8:return n=v.h,v.return(n);case 6:w(v);case 7:Lr(e.j);case 3:s=o.next(),v.A(2);break;case 4:p=u([!0,!1]),d=p.next();case 9:if(d.done){v.A(11);break}f=d.value,h=u(t.keys()),s=h.next();case 12:if(s.done){d=p.next(),v.A(9);break}if(g=s.value,y=t.get(g),y.drmInfos.some((function(e){return!!e.licenseServerUri}))!=f){v.A(13);break}return k(v,15),_(v,navigator.requestMediaKeySystemAccess(g,[y]),17);case 17:return n=v.h,v.return(n);case 15:w(v);case 16:Lr(e.j);case 13:s=h.next(),v.A(12);break;case 11:return v.return(n)}}))}(e,t),3);case 3:i=v.h;case 2:if(!(a=i))throw new De(2,6,6001);for(Lr(e.j),k(v,4),e.G.clear(),o=a.getConfiguration(),s=o.audioCapabilities||[],l=o.videoCapabilities||[],c=u(s),p=c.next();!p.done;p=c.next())d=p.value,e.G.add(d.contentType.toLowerCase());for(f=u(l),p=f.next();!p.done;p=f.next())h=p.value,e.G.add(h.contentType.toLowerCase());if(n.length){var m=a.keySystem,b=r.get(a.keySystem),E=[],T=[],S=[],C=[],x=new Set;Bi(b,E,S,T,C,x);var I=e.L?"persistent-license":"temporary";for(m={keySystem:m,licenseServerUri:E[0],distinctiveIdentifierRequired:b[0].distinctiveIdentifierRequired,persistentStateRequired:b[0].persistentStateRequired,sessionType:b[0].sessionType||I,audioRobustness:b[0].audioRobustness||"",videoRobustness:b[0].videoRobustness||"",serverCertificate:S[0],serverCertificateUri:T[0],initData:C,keyIds:x},E=(b=u(b)).next();!E.done;E=b.next())(E=E.value).distinctiveIdentifierRequired&&(m.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(m.persistentStateRequired=E.persistentStateRequired);b=m}else b=a.keySystem,m=t.get(a.keySystem),E=[],T=[],S=[],C=[],x=new Set,Bi(m.drmInfos,E,S,T,C,x),b={keySystem:b,licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==m.distinctiveIdentifier,persistentStateRequired:"required"==m.persistentState,sessionType:m.sessionTypes[0]||"temporary",audioRobustness:(m.audioCapabilities?m.audioCapabilities[0].robustness:"")||"",videoRobustness:(m.videoCapabilities?m.videoCapabilities[0].robustness:"")||"",serverCertificate:S[0],serverCertificateUri:T[0],initData:C,keyIds:x};if(e.g=b,!e.g.licenseServerUri)throw new De(2,6,6012,e.g.keySystem);return _(v,a.createMediaKeys(),6);case 6:return g=v.h,Lr(e.j),e.u=g,e.W=!0,_(v,Ci(e),7);case 7:Lr(e.j),A(v,0);break;case 4:if(y=w(v),Lr(e.j,y),e.g=null,e.G.clear(),y instanceof De)throw y;throw new De(2,6,6002,y.message)}}))}function Oi(e,t){var n,r,i,a,o;return R((function(s){switch(s.g){case 1:try{n=e.u.createSession("persistent-license")}catch(t){return r=new De(2,6,6005,t.message),e.m(r),s.return(Promise.reject(r))}return e.s.C(n,"message",(function(t){e.l&&e.h.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.M?e.J.push(t):Li(e,t)})),e.s.C(n,"keystatuseschange",(function(t){return Mi(e,t)})),i={initData:null,initDataType:null,loaded:!1,Vd:1/0,Ja:null,type:"persistent-license"},e.i.set(n,i),k(s,2),_(s,n.load(t),4);case 4:return a=s.h,Lr(e.j),a?(i.loaded=!0,ji(e)&&e.o.resolve(),s.return(n)):(e.i.delete(n),e.m(new De(2,6,6013)),s.return(Promise.resolve()));case 2:o=w(s),Lr(e.j,o),e.i.delete(n),e.m(new De(2,6,6005,o.message));case 3:return s.return(Promise.resolve())}}))}function Li(e,t){var n,r,i,a,o,s,l,c,p,d,f,h;R((function(g){switch(g.g){case 1:return n=t.target,e.h.logLicenseExchange&&It(t.message),r=e.i.get(n),i=e.g.licenseServerUri,a=e.h.advanced[e.g.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),(o=Cr([i],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.g,r&&(o.initData=r.initData,o.initDataType=r.initDataType),Pi(e.g.keySystem)&&function(e){var t=kt(e.body,!0,!0);if(t.includes("PlayReadyKeyMessage")){for(var n=u((t=_i(t,"PlayReadyKeyMessage")).getElementsByTagName("HttpHeader")),r=n.next();!r.done;r=n.next())r=r.value,e.headers[r.getElementsByTagName("name")[0].textContent]=r.getElementsByTagName("value")[0].textContent;e.body=Pt(t.getElementsByTagName("Challenge")[0].textContent)}else e.headers["Content-Type"]="text/xml; charset=utf-8"}(o),s=Date.now(),k(g,2),_(g,e.D.kb.request(2,o).promise,4);case 4:l=g.h,A(g,3);break;case 2:return c=w(g),p=new De(2,6,6007,c),e.m(p),r&&r.Ja&&r.Ja.reject(p),g.return();case 3:return e.j.g?g.return():(e.H+=(Date.now()-s)/1e3,e.h.logLicenseExchange&&It(l.data),k(g,5),_(g,n.update(l.data),7));case 7:A(g,6);break;case 5:return d=w(g),f=new De(2,6,6008,d.message),e.m(f),r&&r.Ja&&r.Ja.reject(f),g.return();case 6:if(e.j.g)return g.return();h=new vr("drmsessionupdate"),e.D.onEvent(h),r&&(r.Ja&&r.Ja.resolve(),new ot((function(){r.loaded=!0,ji(e)&&e.o.resolve()})).N(Ki)),E(g)}}))}function Mi(e,t){t=t.target;var n=e.i.get(t),r=!1;t.keyStatuses.forEach((function(t,i){if("string"==typeof i){var a=i;i=t,t=a}if(Pi(e.g.keySystem)&&16==i.byteLength&&(ut()||ht())){var o=(a=Ie(i)).getUint32(0,!0),s=a.getUint16(4,!0),l=a.getUint16(6,!0);a.setUint32(0,o,!1),a.setUint16(4,s,!1),a.setUint16(6,l,!1)}"status-pending"!=t&&(n.loaded=!0),"expired"==t&&(r=!0),i=Rt(i).slice(0,32),e.ea.set(i,t)}));var i=t.expiration-Date.now();(0>i||r&&1e3>i)&&n&&!n.Ja&&(e.i.delete(t),t.close().catch((function(){}))),ji(e)&&(e.o.resolve(),e.O.N(Gi))}function Ni(e){var t;return R((function(n){return t=Array.from(e.i.entries()),e.i.clear(),_(n,Promise.all(t.map((function(t){var n=(t=u(t)).next().value,r=t.next().value;return R((function(t){return 1==t.g?(k(t,2),e.da||e.B.includes(n.sessionId)||"persistent-license"!==r.type?_(t,function(e){var t;return R((function(n){return 1==n.g?(t=new Promise((function(e,t){new ot(t).N(Hi)})),k(n,2),_(n,Promise.race([Promise.all([e.close(),e.closed]),t]),4)):2!=n.g?A(n,0):(w(n),void E(n))}))}(n),5):_(t,n.remove(),5)):2!=t.g?A(t,0):(w(t),void E(t))}))}))),0)}))}function Ui(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],r=(e=u(e)).next();!r.done;r=e.next()){r=r.value;for(var i={},a=u(t),o=a.next();!o.done;i={Da:i.Da},o=a.next())if(o=o.value,r.keySystem==o.keySystem){i.Da=[],i.Da=i.Da.concat(r.initData||[]),i.Da=i.Da.concat(o.initData||[]),i.Da=i.Da.filter(function(e){return function(t,n){return void 0===t.keyId||n===e.Da.findIndex((function(e){return e.keyId===t.keyId}))}}(i)),a=r.keyIds&&o.keyIds?new Set([].concat(c(r.keyIds),c(o.keyIds))):r.keyIds||o.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||o.persistentStateRequired,videoRobustness:r.videoRobustness||o.videoRobustness,audioRobustness:r.audioRobustness||o.audioRobustness,serverCertificate:r.serverCertificate||o.serverCertificate,serverCertificateUri:r.serverCertificateUri||o.serverCertificateUri,initData:i.Da,keyIds:a});break}}return n}function Fi(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function ji(e){return function(e,t){for(var n=(e=u(e)).next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}(e=e.i.values(),(function(e){return e.loaded}))}function Bi(e,t,n,r,i,a){for(var o={},s=(e=u(e)).next();!s.done;o={oa:o.oa},s=e.next()){if(o.oa=s.value,t.includes(o.oa.licenseServerUri)||t.push(o.oa.licenseServerUri),r.includes(o.oa.serverCertificateUri)||r.push(o.oa.serverCertificateUri),o.oa.serverCertificate&&(n.some(function(e){return function(t){return we(t,e.oa.serverCertificate)}}(o))||n.push(o.oa.serverCertificate)),o.oa.initData){s={};for(var l=u(o.oa.initData),c=l.next();!c.done;s={Dc:s.Dc},c=l.next())s.Dc=c.value,i.some(function(e){return function(t){var n=e.Dc;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&we(t.initData,n.initData)}}(s))||i.push(s.Dc)}if(o.oa.keyIds)for(l=(s=u(o.oa.keyIds)).next();!l.done;l=s.next())a.add(l.value)}}function Vi(t,n,r,i){var a=t.keySystem;!a||"org.w3.clearkey"==a&&t.licenseServerUri||(n.size&&(n=n.get(a)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=new Set),(r=r.get(a))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=r.persistentStateRequired),t.videoRobustness||(t.videoRobustness=r.videoRobustness),t.audioRobustness||(t.audioRobustness=r.audioRobustness),t.serverCertificate||(t.serverCertificate=r.serverCertificate),r.sessionType&&(t.sessionType=r.sessionType),t.serverCertificateUri||(t.serverCertificateUri=r.serverCertificateUri)),i[a]&&(t.keySystem=i[a]),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==a&&(t.keySystem="com.chromecast.playready"))}(r=Ti.prototype).destroy=function(){return this.j.destroy()},r.configure=function(e){this.h=e},r.Yb=function(e){var t,n=this;return R((function(r){if(1==r.g)return n.u?(n.l=e,n.s.ma(n.l,"play",(function(){for(var e=u(n.J),t=e.next();!t.done;t=e.next())Li(n,t.value);n.M=!0,n.J=[]})),"webkitCurrentPlaybackTargetIsWireless"in n.l&&n.s.C(n.l,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Ni(n)})),(t=n.g?n.g.initData.find((function(e){return 0>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}var ea=new it((function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}));function ta(e,t,n,r,i){if(r>=i)return null;for(var a=-1,o=-1,s=0;sn||127n||0>t))if(t>=n)for(--r;0<=r;r--)e.i[t+r]=e.i[n+r].map((function(e){return e}));else for(var i=0;it;t++)e.i.push(Da())}function Da(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function Ra(e,t){Oa(e)&&(e.i[e.h][e.g]=new ia(t,e.u,e.o,e.m,e.s),e.g++)}function Oa(e){var t=e.g=n)r=7&n,e.h[r]&&(e.g=e.h[r]);else{if(136===n){n=Va(t).value,t=null;for(var i=(n=u(Ga(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()&&(t=La(i,r,e.i)),Pa(i);return t}if(137===n)for(n=(t=u(Ga(e,t=Va(t).value))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=r),n.l=!0;else{if(138===n){for(n=Va(t).value,t=null,i=(n=u(Ga(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()&&(t=La(i,r,e.i)),i.l=!1;return t}if(139===n){for(n=Va(t).value,t=null,i=(n=u(Ga(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()?t=La(i,r,e.i):i.j=r,i.l=!i.l;return t}if(140===n)return za(e,t=Va(t).value,r);if(143===n)return r=za(e,255,r),Wa(e),r;if(144===n)t.skip(1),r=Va(t).value,e.g&&(e.g.o=0<(128&r),e.g.u=0<(64&r));else if(145===n)r=Va(t).value,n=Va(t).value,t.skip(1),e.g&&(t=Ya((48&n)>>4,(12&n)>>2,3&n),e.g.s=Ya((48&r)>>4,(12&r)>>2,3&r),e.g.m=t);else if(146===n)r=Va(t).value,t=Va(t).value,e.g&&((e=e.g).h=15&r,e.g=63&t);else if(151===n)t.skip(1),t.skip(1),r=Va(t).value,t.skip(1),e.g&&(e.g.D=3&r);else if(152<=n&&159>=n){if(n=(15&n)-8,!(i=null!==e.h[n])){var a=new Ia;a.j=r,e.h[n]=a}r=Va(t).value,Va(t),Va(t),a=Va(t).value;var o=Va(t).value;t=Va(t).value,i&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.u=!1,t.o=!1,t.s="white",t.m="black"),(t=e.h[n]).l=0<(32&r),t.F=1+(15&a),t.B=1+(63&o),e.g=e.h[n]}}}return null}function Ga(e,t){for(var n=[],r=0;8>r;r++)1==(1&t)&&e.h[r]&&n.push(r),t>>=1;return n}function za(e,t,n){for(var r=null,i=(t=u(Ga(e,t))).next();!i.done;i=t.next()){i=i.value;var a=e.h[i];a.isVisible()&&(r=La(a,n,e.i)),e.h[i]=null}return r}function Wa(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function Ya(e,t,n){var r={0:0,1:0,2:1,3:1};return Xa[(e=r[e])<<2|(t=r[t])<<1|(n=r[n])]}Ba.prototype.ha=function(){return this.gthis.h.length)throw new De(2,2,3e3);this.g+=e};var qa=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),Xa="black blue green cyan red magenta yellow white".split(" ");function $a(){this.h=[],this.g=[],this.i=new Fa,this.l=0,this.s=new Map([["CC1",new ba(0,0)],["CC2",new ba(0,1)],["CC3",new ba(1,0)],["CC4",new ba(1,1)]]),this.o=this.m=0,this.j=new Map,Qa(this)}function Qa(e){e.m=0,e.o=0;for(var t=(e=u(e.s.values())).next();!t.done;t=e.next())(t=t.value).h=2,t.g=t.i,t.m=null,sa(t.i),sa(t.l),sa(t.o)}function Za(e,t){var n=t.type;if(16==(112&t.xa)){var r=t.xa>>3&1;0===n?e.m=r:e.o=r}if(n=e.s.get("CC"+(n<<1|(n?e.o:e.m)+1)),255===t.xa&&255===t.La||!t.xa&&!t.La||!eo(t.xa)||!eo(t.La))return 45<=++e.l&&Qa(e),null;if(e.l=0,t.xa&=127,t.La&=127,!t.xa&&!t.La)return null;if(e=null,16==(112&t.xa))e:{if(r=t.xa,e=t.La,n.m===(r<<8|e))n.m=null;else if(n.m=r<<8|e,16==(240&r)&&64==(192&e)){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&r)<<1|e>>5&1];var i=(30&e)>>1;r="white";var a=!1;if(7>i?r=xa[i]:7===i&&(a=!0),e=1==(1&e),n.h!==Sa){if(i=n.g,n.h===wa&&t!==i.g){var o=1+t-i.h;ua(i,o,1+i.g-i.h,i.h),ca(i,0,o-1),ca(i,t+1,15-t)}i.g=t,n.g.m=e,n.g.j=a,n.g.l=r,n.g.o="black"}}else if(17==(247&r)&&32==(240&e))n.g.m=!1,n.g.j=!1,n.g.l="white",la(n.g,pa,32),r=!1,"white_italics"===(t=xa[(14&e)>>1])&&(t="white",r=!0),n.g.m=1==(1&e),n.g.j=r,n.g.l=t;else if(16==(247&r)&&32==(240&e)||23==(247&r)&&45==(255&e))t="black",0==(7&r)&&(t=Ca[(14&e)>>1]),n.g.o=t;else if(17==(247&r)&&48==(240&e))la(n.g,da,e);else if(18==(246&r)&&32==(224&e))la(n.g,1&r?ha:fa,e);else if(20==(246&r)&&32==(240&e)){switch(e=t.pts,r=null,t.La){case 32:Ea(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:r=_a(n,2,e);break;case 38:r=_a(n,3,e);break;case 39:r=_a(n,4,e);break;case 40:la(n.g,pa,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.j=e;break;case 42:sa(n.o),ka(n);break;case 43:ka(n);break;case 44:t=n.i,r=null,n.h!==Sa&&(r=oa(t,n.j,e)),ca(t,0,15);break;case 45:t=n.g,n.h!==wa?r=null:(r=oa(t,n.j,e),ua(t,(a=t.g-t.h+1)-1,a,t.h),ca(t,0,a-1),ca(t,t.g,15-t.g),n.j=e);break;case 46:ca(n.l,0,15);break;case 47:t=null,n.h!==Sa&&(t=oa(n.i,n.j,e)),r=n.l,n.l=n.i,n.i=r,Ea(n),n.j=e,r=t}e=r;break e}e=null}else r=t.La,la(n.g,pa,t.xa),la(n.g,pa,r);return e}function Ja(e,t){var n=[];try{for(;t.ha();){var r=Va(t).value,i=(224&r)>>5,a=31&r;if(7===i&&0!=a&&(i=63&Va(t).value),0!=i){e.j.has(i)||e.j.set(i,new Ha(i));for(var o=e.j.get(i),s=t.Z();t.Z()-s=u){var p=c;if(o.g){var d=o.g;switch(i=null,u){case 8:!Oa(d)||0>=d.g&&0>=d.h||(0>=d.g?(d.g=d.B-1,d.h--):d.g--,d.i[d.h][d.g]=null);break;case 13:if(d.isVisible()&&(i=La(d,p,o.i)),d.h+1>=d.F){p=d;for(var f=0,h=1;16>h;h++,f++)p.i[f]=p.i[h];for(h=0;1>h;h++,f++)p.i[f]=Da()}else d.h++;d.g=0;break;case 14:d.isVisible()&&(i=La(d,p,o.i)),d.i[d.h]=Da(),d.g=0;break;case 12:d.isVisible()&&(i=La(d,p,o.i)),Pa(d),(p=d).h=0,p.g=0}var g=i}else g=null}else if(128<=u&&159>=u)g=Ka(o,i,u,c);else{if(4096<=u&&4127>=u)8<=(p=255&u)&&15>=p?i.skip(1):16<=p&&23>=p?i.skip(2):24<=p&&31>=p&&i.skip(3);else if(4224<=u&&4255>=u)128<=(p=255&u)&&135>=p?i.skip(4):136<=p&&143>=p&&i.skip(5);else if(32<=u&&127>=u)i=u,o.g&&Ra(o.g,127===i?"♪":String.fromCharCode(i));else if(160<=u&&255>=u)o.g&&Ra(o.g,String.fromCharCode(u));else if(4128<=u&&4223>=u){if(i=255&u,o.g)if(qa.has(i)){var y=qa.get(i);Ra(o.g,y)}else Ra(o.g,"_")}else 4256<=u&&4351>=u&&o.g&&Ra(o.g,160!=(255&u)?"_":"[CC]");g=null}(i=g)&&n.push(i)}}}}catch(e){if(!(e instanceof De&&3e3===e.code))throw e;Y("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function eo(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function to(){}function no(e,t){var n=null,r=null,i=null,a=e.K();return 1&t&&(i=e.$a()),2&t&&e.skip(4),8&t&&(n=e.K()),16&t&&(r=e.K()),{trackId:a,Ce:n,xf:r,rh:i}}function ro(e,t){return{we:1==t?e.$a():e.K()}}function io(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),{timescale:e.K()}}function ao(e,t,n){var r=e.K(),i=[],a=null;1&n&&(a=e.K()),4&n&&e.skip(4);for(var o=0;o>1&63)||40==_;break;default:break e}if(_){_=0,v.length>m&&(_=v[m].ed||0),_=(f+_)/h;for(var E,k=[],T=d.Za(e-1),A=E=0;Am?f+(v[m].ee||g):f+g,m++,b=v.length>m&&v[m].sampleSize||y)}}})).parse(e,!1),n};var so=0,lo=1,uo=2,co={avc1:lo,avc3:lo,hev1:uo,hvc1:uo,dvh1:uo,dvhe:uo};function po(e){this.h=new to,e.includes("video/mp4")&&(this.h=new oo),this.g=new $a}function fo(e,t){for(var n=(t=u(t=e.h.parse(t))).next();!n.done;n=t.next()){var r=n.value,i=xe(r.ig);if(0>2,p=i.Ra(),d=i.Ra();l&&(0===(s&=3)||1===s?n.h.push({pts:r,type:s,xa:p,La:d,order:n.h.length}):(n.g.push({pts:r,type:s,value:p,order:n.g.length}),n.g.push({pts:r,type:2,value:d,order:n.g.length})))}}}}return function(e){function t(e,t){return e.pts-t.pts||e.order-t.order}var n=[];e.h.sort(t),e.g.sort(t);for(var r=u(e.h),i=r.next();!i.done;i=r.next())(i=Za(e,i.value))&&n.push(i);for(i=(r=u(e.g)).next();!i.done;i=r.next())ja(e.i,i.value);for(i=(r=u(e.i.i)).next();!i.done;i=r.next())i=Ja(e,i.value),n.push.apply(n,c(i));return e.i.i=[],e.h=[],e.g=[],n}(e.g)}function ho(e,t,n,r,i){this.ya=e,this.Ba=t,this.ka=n,this.Od=void 0===r?null:r,this.timescale=i}function go(e,t,n,r,i,a,o,s,l,u,c,p,d,f,h){u=void 0===u?[]:u,f=void 0===f?yo:f,this.startTime=e,this.j=this.endTime=t,this.u=n,this.Ba=r,this.ka=i,this.h=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=l,this.i=u,this.tilesLayout=void 0===c?"":c,this.s=void 0===p?null:p,this.g=void 0===d?null:d,this.status=f,this.l=void 0===h?null:h,this.o=null,this.m=0}po.prototype.init=function(e){this.h.init(e)},ho.prototype.lc=function(){return this.Ba},ho.prototype.hc=function(){return this.ka},B("shaka.media.InitSegmentReference",ho),ho.prototype.getEndByte=ho.prototype.hc,ho.prototype.getStartByte=ho.prototype.lc,(r=go.prototype).ya=function(){return this.u()},r.getStartTime=function(){return this.startTime},r.Ef=function(){return this.endTime},r.lc=function(){return this.Ba},r.hc=function(){return this.ka},r.Vf=function(){return this.tilesLayout},r.Uf=function(){return this.s},r.Eb=function(){return this.status},r.bg=function(){this.status=vo},r.Ye=function(e){this.o=e},r.Sf=function(){return this.o},r.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=u(this.i),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.j+=e},r.oe=function(e){null==this.g?z("Sync attempted without sync time!"):(e=this.g-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},B("shaka.media.SegmentReference",go),go.prototype.syncAgainst=go.prototype.oe,go.prototype.offset=go.prototype.offset,go.prototype.getThumbnailSprite=go.prototype.Sf,go.prototype.setThumbnailSprite=go.prototype.Ye,go.prototype.markAsUnavailable=go.prototype.bg,go.prototype.getStatus=go.prototype.Eb,go.prototype.getTileDuration=go.prototype.Uf,go.prototype.getTilesLayout=go.prototype.Vf,go.prototype.getEndByte=go.prototype.hc,go.prototype.getStartByte=go.prototype.lc,go.prototype.getEndTime=go.prototype.Ef,go.prototype.getStartTime=go.prototype.getStartTime,go.prototype.getUris=go.prototype.ya;var yo=0,vo=1;function mo(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null}function bo(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function _o(e,t){return!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t>=e.start(0)}function Eo(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,r=(e=u(ko(e))).next();!r.done;r=e.next()){var i=r.value;r=i.start,(i=i.end)>t&&(n+=i-Math.max(r,t))}return n}function ko(e){if(!e)return[];for(var t=[],n=0;ne.size||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var r=Et(xe(e.data,1,n));return e=Et(xe(e.data,2+n)).replace(/\0*$/,""),t.description=r,t.data=e,t}return"WXXX"===e.type?2>e.size||3!==e.data[0]||-1===(n=e.data.subarray(1).indexOf(0))?null:(r=Et(xe(e.data,1,n)),e=Et(xe(e.data,2+n)).replace(/\0*$/,""),t.description=r,t.data=e,t):"PRIV"===e.type?2>e.size||-1===(r=e.data.indexOf(0))?null:(r=Et(xe(e.data,0,r)),e=Ce(e.data.subarray(r.length+1)),t.description=r,t.data=e,t):"T"===e.type[0]?2>e.size||3!==e.data[0]?null:(e=Et(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):"W"===e.type[0]?(e=Et(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=Ce(e.data),t):null}function So(e){for(var t=0,n=[];t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9];){var r=Ao(e,t+6);for(e[t+5]>>6&1&&(t+=10),r=(t+=10)+r;t+10e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]&&(t+=10)}return n}function Co(){this.o=null,this.s=!1,this.l=this.m=null,this.B=[],this.g=this.h=null,this.u=[],this.j=null,this.i=[]}function xo(e){if(1!=(e[0]<<16|e[1]<<8|e[2]))return null;var t={data:new Uint8Array(0),vh:6+(e[4]<<8|e[5]),pts:null,dts:null},n=e[7];return 192&n&&(t.pts=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,t.dts=t.pts,64&n&&(t.dts=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)),t.data=e.subarray(9+e[8]),t}function Io(e){for(var t=Math.min(1e3,e.length-564),n=0;ne.length)return this;for(var t=Math.max(0,Io(e)),n=e.length-(e.length+t)%188,r=!1,i=t;i>4){var s=i+5+e[i+4];if(s===i+188)continue}else s=i+4;switch(o){case 0:a&&(s+=e[s]+1),this.o=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.o:a&&(s+=e[s]+1),o={audio:-1,video:-1,Ed:-1,audioCodec:"",videoCodec:""};var l=s+3+((15&(a=e)[s+1])<<8|a[s+2])-4;for(s+=12+((15&a[s+10])<<8|a[s+11]);s=e.l&&t.startTimeIo(c)?es.includes(p)&&((g=So(c)).length&&r&&(y={cueTime:r.startTime,data:c,frames:g,dts:r.startTime,pts:r.startTime},e.V([y],0,r.endTime))):(d=(new Co).parse(c),f=r.startTime-(d.getStartTime()[t]||0),(h=function(e){for(var t=[],n=new Uint8Array(0),r=e.i.length-1;0<=r;r--){var i=xo(n=Ot(e.i[r],n));i&&(t.unshift({cueTime:i.pts?i.pts/9e4:null,data:i.data,frames:So(i.data),dts:i.dts,pts:i.pts}),n=new Uint8Array(0))}return t}(d)).length&&e.V(h,f,r?r.endTime:null)),!e.o[t]){i&&t==s.va&&(e.g||No(e,"text/vtt",e.B),e.s||(e.s=new po(p)),r?(v=fo(e.s,n)).length&&(m=e.h[s.va].timestampOffset,Zt(e.g,v,r.startTime,r.endTime,m)):e.s.init(n)),O.A(6);break}return a&&e.o[t].g.resetCaptions(),_(O,function(e,t){return e.j=!0,e.h=new rt,e.l=[],e.i=[],t=xe(t),e.g.push(t),e.g.flush(),e.j&&e.h.reject(new De(2,3,3018)),e.h}(e.o[t],n),7);case 7:b=O.h,e.g||No(e,"text/vtt",e.B),b.captions&&b.captions.length&&(k=e.h[s.va].timestampOffset,T=function(e){for(var t=[],n=(e=u(e)).next();!n.done;n=e.next())n=n.value,t.push({stream:n.stream,cue:new ie(n.startTime,n.endTime,n.text)});return t}(b.captions),Zt(e.g,T,r?r.startTime:null,r?r.endTime:null,k)),n=b.data;case 6:if(n=function(e,t,n,r){var i=e.O[r];return null==n&&i&&(pt()||ct())&&"mp4"==e.L[r].split(";")[0].split("/")[1]&&(t=function(e){function t(){i=!0}function n(e){a.push(e),Wr(e)}e=xe(e);var r,i=!1,a=[],o=[];if((new zr).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).P("stsd",(function(e){r=e,a.push(e),Yr(e)})).P("encv",t).P("enca",t).P("hev1",(function(e){o.push({box:e,lb:1701733238})})).P("hvc1",(function(e){o.push({box:e,lb:1701733238})})).P("avc1",(function(e){o.push({box:e,lb:1701733238})})).P("avc3",(function(e){o.push({box:e,lb:1701733238})})).P("ac-3",(function(e){o.push({box:e,lb:1701733217})})).P("ec-3",(function(e){o.push({box:e,lb:1701733217})})).P("mp4a",(function(e){o.push({box:e,lb:1701733217})})).parse(e),i)return e;if(0==o.length||!r)throw Rt(e),new De(2,3,3019);o.reverse();for(var s=u(o),l=s.next();!l.done;l=s.next())l=l.value,e=Zi(e,r,l.box,a,l.lb);return e}(t)),t}(e,n,r?r.startTime:null,t),A=e.h[t],w=Jo,!e.B||A.mode==w||!r){O.A(8);break}if(S=e.l.duration,!(t==s.va||!(s.va in e.h))){O.A(9);break}return C=[A.appendWindowStart,A.appendWindowEnd],A.appendWindowStart=0,A.appendWindowEnd=1/0,x=A.timestampOffset,A.timestampOffset=0,_(O,qo(e,t,(function(){return Ko(e,t,n)})),10);case 10:return _(O,qo(e,t,(function(){return zo(e,t)})),11);case 11:return A.timestampOffset=x,A.appendWindowStart=C[0],A.appendWindowEnd=C[1],I=mo(Bo(e,t)),P=(r.startTime||0)-(I||0),e.W.resolve(P),_(O,qo(e,t,(function(){return Go(e,t,0,S)})),12);case 12:if(t!=s.va){O.A(9);break}return _(O,qo(e,t,(function(){e.j.currentTime-=.001,Yo(e,t)})),9);case 9:return A.mode=w,_(O,e.Aa(S),8);case 8:return r&&e.B&&t!=s.X&&(a||o)&&(D=r.startTime,qo(e,t,(function(){return zo(e,t)})),qo(e,t,(function(){return Wo(e,t,D)}))),_(O,qo(e,t,(function(){Ko(e,t,n)})),16);case 16:E(O)}}))}function Ho(e,t){return R((function(n){return t==tt.X?e.g?_(n,e.g.remove(0,1/0),0):n.return():_(n,qo(e,t,(function(){return Go(e,t,0,e.l.duration)})),0)}))}function Ko(e,t,n){if("video"==t&&e.D){var r=e.D;r.g&&r.g.appendBuffer(n,"video",r.i)}e.h[t].appendBuffer(n)}function Go(e,t,n,r){r<=n?Yo(e,t):e.h[t].remove(n,r)}function zo(e,t){var n=e.h[t].appendWindowStart,r=e.h[t].appendWindowEnd;e.h[t].abort(),e.h[t].appendWindowStart=n,e.h[t].appendWindowEnd=r,Yo(e,t)}function Wo(e,t,n){0>n&&(n+=.001),e.h[t].timestampOffset=n,Yo(e,t)}function Yo(e,t){var n=e.i[t][0];n&&(n.p.resolve(),$o(e,t))}function qo(e,t,n){return Lr(e.G),n={start:n,p:new rt},e.i[t].push(n),1==e.i[t].length&&Qo(e,t),n.p}function Xo(e,t){var n,r,i,a,o;return R((function(s){switch(s.g){case 1:for(i in Lr(e.G),n=[],r={},e.h)r.Ub=new rt,a={start:function(e){return function(){return e.Ub.resolve()}}(r),p:r.Ub},e.i[i].push(a),n.push(r.Ub),1==e.i[i].length&&a.start(),r={Ub:r.Ub};return k(s,2),_(s,Promise.all(n),4);case 4:A(s,3);break;case 2:throw w(s);case 3:try{t()}catch(e){throw new De(2,3,3015,e)}finally{for(o in e.h)$o(e,o)}E(s)}}))}function $o(e,t){e.i[t].shift(),Qo(e,t)}function Qo(e,t){var n=e.i[t][0];if(n)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new De(2,3,3017,t)):n.p.reject(new De(2,3,3015,r)),$o(e,t)}}(r=Mo.prototype).destroy=function(){return this.G.destroy()},r.init=function(e,t,n){n=void 0!==n&&n;var r,i,a,o,s,l,c,p,d=this;return R((function(f){if(1==f.g)return r=tt,_(f,d.J,2);for(d.B=n,i={},a=u(e.keys()),o=a.next();!o.done;i={na:i.na},o=a.next())i.na=o.value,s=e.get(i.na),l=Kt(s.mimeType,s.codecs),i.na==r.X?No(d,l,n):(!t&&Z(l)||!Ft(l,i.na)||(d.o[i.na]=new Ut(l),l=Bt(i.na,l)),c=l+d.F.sourceBufferExtraFeatures,p=d.l.addSourceBuffer(c),d.u.C(p,"error",function(e){return function(){d.i[e.na][0].p.reject(new De(2,3,3014,d.j.error?d.j.error.code:0))}}(i)),d.u.C(p,"updateend",function(e){return function(){return Yo(d,e.na)}}(i)),d.h[i.na]=p,d.L[i.na]=l,d.i[i.na]=[],d.O[i.na]=!!s.drmInfos.length);E(f)}))},r.configure=function(e){this.F=e},r.Na=function(){var e={total:ko(this.j.buffered),audio:ko(Bo(this,"audio")),video:ko(Bo(this,"video")),text:[]};if(this.g){var t=this.g.g,n=this.g.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},r.remove=function(e,t,n){var r=this;return R((function(i){return _(i,e==tt.X?r.g.remove(t,n):qo(r,e,(function(){return Go(r,e,t,n)})),0)}))},r.flush=function(e){var t=this;return R((function(n){return e==tt.X?n.return():_(n,qo(t,e,(function(){t.j.currentTime-=.001,Yo(t,e)})),0)}))},r.endOfStream=function(e){var t=this;return R((function(n){return _(n,Xo(t,(function(){Uo(t)||(e?t.l.endOfStream(e):t.l.endOfStream())})),0)}))},r.Aa=function(e){var t=this;return R((function(n){return _(n,Xo(t,(function(){if(en.end-.5)){t=!0;break e}t=!1}return t}function as(e,t,n,r,i){var a=this;this.o=i,this.g=e,this.s=t,this.D=n,this.i=new Mr,this.m=!1,this.B=e.readyState,this.u=0,this.h=r,this.l=!1,this.i.C(e,"waiting",(function(){return os(a)})),this.j=new ot((function(){os(a)})).Ca(.25)}function os(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.m)return}else e.m=!1;if(!e.g.paused||0==e.g.currentTime&&(e.g.autoplay||0!=e.g.currentTime)){var t;if(e.g.readyState!=e.B&&(e.B=e.g.readyState),!(t=!e.h)){var n=(t=e.h).j,r=is(n),i=n.g.currentTime,a=Date.now()/1e3;t.g==i&&t.s==r||(t.m=a,t.g=i,t.s=r,t.h=!1),(r=(i=a-t.m)>=t.u&&r&&!t.h)&&(t.i(t.g,i),t.h=!0,t.g=n.g.currentTime,t.o++,t.l(new vr("stalldetected"))),t=!r}t&&(t=e.g.currentTime,null==(r=function(e,t,n){return!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)?null:0<=(e=ko(e).findIndex((function(e,r,i){return e.start>t&&(0==r||i[r-1].end-t<=n)})))?e:null}(n=e.g.buffered,t,e.D.gapDetectionThreshold))||0==r&&!e.l||((i=n.start(r))>=e.s.Oa()||.001>i-t||(0!=r&&n.end(r-1),e.g.currentTime=i,e.u++,e.o(new vr("gapjumped")))))}}}function ss(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=ls.value().get(t),n.ma(e,t,r))}(r=ts.prototype).getDuration=function(){return this.j},r.Kf=function(){return this.g},r.Xe=function(e){this.i=e},r.Aa=function(e){this.j=e},r.Pf=function(){return this.i},r.Ve=function(e){this.s=e},r.yc=function(e){this.u=e},r.me=function(e){this.o=e},r.We=function(e){this.m=e},r.Df=function(){return this.m},r.Ib=function(e){if(0!=e.length){for(var t=e[0].startTime,n=e[0].endTime,r=(e=u(e)).next();!r.done;r=e.next())r=r.value,t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.g=Math.max(this.g,r.endTime-r.startTime);this.Td(t),this.h=Math.max(this.h,n),null!=this.i&&this.D&&!this.G&&(this.i=(Date.now()+this.s)/1e3-this.h-this.g)}},r.Md=function(){this.G=!0},r.Td=function(e){this.l=null==this.l?e:Math.min(this.l,e)},r.Sd=function(e){this.g=Math.max(this.g,e)},r.offset=function(e){null!=this.l&&(this.l+=e),null!=this.h&&(this.h+=e)},r.U=function(){return 1/0==this.j&&!this.u},r.jb=function(){return 1/0!=this.j&&!this.u},r.Pa=function(){return Math.max(this.B,this.gb()-this.o)},r.Ze=function(e){this.B=e},r.gb=function(){return this.U()||this.jb()?Math.min(Math.max(0,(Date.now()+this.s)/1e3-this.g-this.i)+this.F,this.j):this.h?Math.min(this.h,this.j):this.j},r.kc=function(e){var t=Math.max(this.l,this.B);return 1/0==this.o?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.gb()-this.o+e,this.Oa()))},r.Db=function(){return this.kc(0)},r.Oa=function(){return Math.max(0,this.gb()-(this.U()||this.jb()?this.m:0))},r.df=function(){return!(null==this.i||null!=this.h&&this.D)},r.Ue=function(e){this.F=e},B("shaka.media.PresentationTimeline",ts),ts.prototype.setAvailabilityTimeOffset=ts.prototype.Ue,ts.prototype.usingPresentationStartTime=ts.prototype.df,ts.prototype.getSeekRangeEnd=ts.prototype.Oa,ts.prototype.getSeekRangeStart=ts.prototype.Db,ts.prototype.getSafeSeekRangeStart=ts.prototype.kc,ts.prototype.getSegmentAvailabilityEnd=ts.prototype.gb,ts.prototype.setUserSeekStart=ts.prototype.Ze,ts.prototype.getSegmentAvailabilityStart=ts.prototype.Pa,ts.prototype.isInProgress=ts.prototype.jb,ts.prototype.isLive=ts.prototype.U,ts.prototype.offset=ts.prototype.offset,ts.prototype.notifyMaxSegmentDuration=ts.prototype.Sd,ts.prototype.notifyMinSegmentStartTime=ts.prototype.Td,ts.prototype.lockStartTime=ts.prototype.Md,ts.prototype.notifySegments=ts.prototype.Ib,ts.prototype.getDelay=ts.prototype.Df,ts.prototype.setDelay=ts.prototype.We,ts.prototype.setSegmentAvailabilityDuration=ts.prototype.me,ts.prototype.setStatic=ts.prototype.yc,ts.prototype.setClockOffset=ts.prototype.Ve,ts.prototype.getPresentationStartTime=ts.prototype.Pf,ts.prototype.setDuration=ts.prototype.Aa,ts.prototype.setPresentationStartTime=ts.prototype.Xe,ts.prototype.getMaxSegmentDuration=ts.prototype.Kf,ts.prototype.getDuration=ts.prototype.getDuration,ns.prototype.release=function(){this.l=this.j=null,this.i=function(){}},as.prototype.release=function(){this.i&&(this.i.release(),this.i=null),null!=this.j&&(this.j.stop(),this.j=null),this.h&&(this.h.release(),this.h=null),this.g=this.s=this.o=null},as.prototype.Wd=function(){this.l=!0,os(this)};var ls=new it((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function us(e,t,n){var r=this;this.g=e,this.l=t,this.j=n,this.m=!1,this.h=new Mr,this.i=new hs(e),ss(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){ds(r,r.j)}))}function cs(e){return e.m?e.g.currentTime:e.j}function ps(e,t){0Math.abs(e.g.currentTime-t)?fs(e):(e.h.ma(e.g,"seeking",(function(){fs(e)})),gs(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function fs(e){e.m=!0,e.h.C(e.g,"seeking",(function(){return e.l()}))}function hs(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new ot((function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)}))}function gs(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.Ca(.1)}function ys(e){this.g=e,this.j=!1,this.h=null,this.i=new Mr}function vs(e,t,n,r,i,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.B=t.minBufferTime||0,this.l=n,this.u=i,this.s=null,this.o=function(e,t,n){if(!t.stallEnabled)return null;var r=t.stallSkip;return function(e,t){e.i=t}(t=new ns(new rs(e),t.stallThreshold,n),(function(){r?e.currentTime+=r:(e.pause(),e.play())})),t}(e,n,a),this.j=new as(e,t.presentationTimeline,n,this.o,a),this.h=new us(e,(function(){var e=o.j;e.m=!0,e.l=!1;var t=cs(o.h);return e=bs(o,t),.001e.g.getDuration()?e.g.Db():e.g.Oa():0>t&&(t=e.g.Oa()+t),ms(e,_s(e,t))}(this,r)),this.m=new ot((function(){if(0!=o.i.readyState&&!o.i.paused){var e=cs(o.h),t=o.g.Db(),n=o.g.Oa();3>n-t&&(t=n-3),e=n?n-e.l.durationBackoff:t}function bs(e,t){var n=Math.max(e.B,e.l.rebufferingGoal),r=e.l.safeSeekOffset,i=e.g.Db(),a=e.g.Oa(),o=e.g.getDuration();3>a-i&&(i=a-3);var s=e.g.kc(n),l=e.g.kc(r);return n=e.g.kc(n+r),t>=o?ms(e,t):t>a?a:t=s||_o(e.i.buffered,t)?t:n}function _s(e,t){var n=e.g.Db();return t(e=e.g.Oa())?e:t}function Es(e){this.g=e,this.h=null,this.i=0,this.j=!1}function ks(e,t){for(var n=(e=u(e.g)).next();!n.done;n=e.next())t(n.value)}function Ts(e,t,n){return new Es([new go(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function As(e,t,n){this.i=e,this.g=t,this.h=n}function ws(){Es.call(this,[]),this.l=[]}function Ss(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Tc(),this.h=new ot((function(){t.g.Me(.25*t.i)}))}function Cs(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.Tc()!=t&&e.g.le(t))}catch(e){}e.h.Ca(.25),0!=e.g.Tc()&&e.g.le(0)}function xs(e){var t=this;this.h=e,this.g=new Set,this.i=new ot((function(){Is(t,!1)})).Ca(.25)}function Is(e,t){for(var n=u(e.g),r=n.next();!r.done;r=n.next())r.value.j(e.h.currentTime,t)}function Ps(e){_r.call(this),this.g=new Map,this.h=e}function Ds(e){_r.call(this);var t=this;this.g=new Set,this.i=e,this.h=new ot((function(){for(var e=t.i(),n=u(t.g),r=n.next();!r.done;r=n.next())(r=r.value).endTime=r.startTime&&e(e-=this.i)||e>=this.g.length?null:this.g[e]},r.offset=function(e){if(!this.j)for(var t=u(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},r.pc=function(e){if(!this.j&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter((function(e){return Math.round(1e3*e.startTime)/1e3t&&(0==n.g.length||e.endTime>n.g[0].startTime)})),this.pc(e),this.eb(t)},r.eb=function(e){if(!this.j){var t=this.g.length;this.g=this.g.filter((function(t){return t.endTime>e})),this.i+=t-this.g.length}},r.Wa=function(e,t,n){if(n=void 0!==n&&n,!this.j){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;0!=this.g.length&&(e=this.g[this.g.length-1],this.g[this.g.length-1]=new go(e.startTime,t,e.u,e.Ba,e.ka,e.h,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.i,e.tilesLayout,e.s,e.g,e.status,e.l))}},r.fd=function(e,t){var n=this;this.j||(this.h&&this.h.stop(),this.h=new ot((function(){var e=t();e?n.g.push.apply(n.g,c(e)):(n.h.stop(),n.h=null)})),this.h.Ca(e))},Es.prototype[Symbol.iterator]=function(){return this.Cb(0)},Es.prototype.Cb=function(e){var t=this.find(e);if(null==t)return null;t--;var n=this.get(t+1),r=-1;if(n&&0=a.startTime&&e=e.i.length&&(this.g++,this.h=0,e=this.i.get(this.g)),e&&0=a[0].start&&ir.endTime?Ns:Ms;this.g.set(r,a);for(var o=u(this.l),s=o.next();!s.done;s=o.next())(s=s.value).rb==i&&s.qb==a&&s.ib(r,t)}};var Ls=1,Ms=2,Ns=3;function Us(e,t,n,r,i){return e=Cr(e,r,i),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function Fs(e,t){var n=this;this.g=t,this.m=e,this.i=null,this.u=1,this.o=this.l=null,this.D=!1,this.j=new Map,this.B=!1,this.F=null,this.s=!1,this.h=new Or((function(){return function(e){var t,n,r,i;return R((function(a){if(1==a.g){for(t=[],n=u(e.j.values()),r=n.next();!r.done;r=n.next())Qs(i=r.value),t.push(Zs(i));return _(a,Promise.all(t),2)}e.j.clear(),e.g=null,e.m=null,e.i=null,E(a)}))}(n)}))}function js(e,t){var n=e.j.get("video");if(n){var r=n.stream;r&&(t?(t=r.trickModeVideo)&&!n.ob&&(Hs(e,t,!1,0,!1),n.ob=r):(r=n.ob)&&(n.ob=null,Hs(e,r,!0,0,!1)))}}function Bs(e,t,n,r,i,a){n=void 0!==n&&n,r=void 0===r?0:r,i=void 0!==i&&i,a=void 0!==a&&a,e.l=t,e.B&&(t.video&&Hs(e,t.video,n,r,i,a),t.audio&&Hs(e,t.audio,n,r,i,a))}function Vs(e,t){e.o=t,e.B&&Hs(e,t,!0,0,!1)}function Hs(e,t,n,r,i,a){var o=e.j.get(t.type);o||t.type!=et?o&&(o.ob&&(t.trickModeVideo?(o.ob=t,t=t.trickModeVideo):o.ob=null),o.stream!=t||i)&&(t.type==et&&No(e.g.R,Kt(t.mimeType,t.codecs),e.m.sequenceMode),o.stream.closeSegmentIndex&&o.stream.closeSegmentIndex(),o.stream=t,o.aa=null,o.ve=!!a,n&&(o.ac?o.hd=!0:o.ra?(o.bb=!0,o.Nc=r,o.hd=!0):(Qs(o),Xs(e,o,!0,r).catch((function(t){e.g&&e.g.onError(t)})))),function(e,t){var n,r;return R((function(i){if(1==i.g)return t.ta?(n=t.stream,r=t.ta,n.segmentIndex?i.A(2):_(i,n.createSegmentIndex(),2)):i.return();if(t.ta!=r||t.stream!=n)return i.return();var a=e.g.Sc(),o=jo(e.g.R,t.type),s=t.stream.segmentIndex.find(t.pa?t.pa.endTime:a),l=null==s?null:t.stream.segmentIndex.get(s);s=l&&l.ka?l.ka-l.Ba:null,l&&!s&&(s=(l.endTime-l.getStartTime())*(t.stream.bandwidth||0)/8),s?((l=l.h)&&(s+=(l.ka?l.ka-l.Ba:null)||0),a=8*s/(l=e.g.getBandwidthEstimate())<(o||0)-a-Math.max(e.m.minBufferTime||0,e.i.rebufferingGoal)||t.ta.h.g>s):a=!1,a&&t.ta.abort(),E(i)}))}(e,o).catch((function(t){e.g&&e.g.onError(t)}))):function(e,t){var n,r,i,a,o;R((function(s){switch(s.g){case 1:return n=tt,k(s,2),_(s,Ho(e.g.R,n.X),4);case 4:A(s,3);break;case 2:r=w(s),e.g&&e.g.onError(r);case 3:i=Kt(t.mimeType,t.codecs),No(e.g.R,i,e.m.sequenceMode),a=e.g.R.m,(a.isTextVisible()||e.i.alwaysStreamText)&&(o=Gs(t),e.j.set(n.X,o),$s(e,o,0)),E(s)}}))}(e,t)}function Ks(e,t){t.ac||t.bb||(t.ra?(t.bb=!0,t.Nc=0):null==Fo(e.g.R,t.type)?null==t.Ka&&$s(e,t,0):(Qs(t),Xs(e,t,!1,0).catch((function(t){e.g&&e.g.onError(t)}))))}function Gs(e){return{stream:e,type:e.type,aa:null,pa:null,Zc:null,Kd:null,Jd:null,Id:null,ob:null,endOfStream:!1,ra:!1,Ka:null,bb:!1,Nc:0,hd:!1,ac:!1,vc:!0,Rd:!1,be:!1,nc:!1,ta:null}}function zs(t,n){var r,i,a,o,s;return R((function(l){switch(l.g){case 1:if(Lr(t.h),n.ra||null==n.Ka||n.ac)return l.return();if(n.Ka=null,!n.bb){l.A(2);break}return _(l,Xs(t,n,n.hd,n.Nc),3);case 3:return l.return();case 2:if(n.stream.segmentIndex){l.A(4);break}return r=n.stream,_(l,n.stream.createSegmentIndex(),5);case 5:if(r!=n.stream)return r.closeSegmentIndex&&r.closeSegmentIndex(),n.ra||n.Ka||$s(t,n,0),l.return();case 4:k(l,6),null!=(i=function(t,n){if(Ys(n))return function(e,t){var n=jo(e,"video")||0;$t(e.g,t,n)}(t.g.R,n.stream.originalId||""),null;n.type==et&&function(e){e.g&&$t(e.g,"",0)}(t.g.R);var r=t.g.Sc(),i=n.pa?n.pa.endTime:r,a=function(e,t,n){return t==et?null==(e=e.g).h||e.hs&&l)return n.endOfStream=!0,"video"==n.type&&(t=t.j.get(et))&&Ys(t)&&(t.endOfStream=!0),null;if(n.endOfStream=!1,a>=o)return t.i.updateIntervalSeconds/2;if(!(a=function(e,t,n,r){if(t.aa)return t.aa.current();if(t.pa||r)return n=t.pa?t.pa.endTime:r,t.Rd=!0,t.aa=t.stream.segmentIndex.Cb(n),t.aa&&t.aa.next().value;e=e.i.inaccurateManifestTolerance,r=Math.max(n-e,0);var i=null;return e&&(t.aa=t.stream.segmentIndex.Cb(r),i=t.aa&&t.aa.next().value),i||(t.aa=t.stream.segmentIndex.Cb(n),i=t.aa&&t.aa.next().value),i}(t,n,r,l)))return t.i.updateIntervalSeconds;for(o=1/0,s=u(s=Array.from(t.j.values())),l=s.next();!l.done;l=s.next())Ys(l=l.value)||l.aa&&!l.aa.current()||(o=Math.min(o,l.pa?l.pa.endTime:r));return i>=o+t.m.presentationTimeline.g?t.i.updateIntervalSeconds:(function(t,n,r,i){var a,o,s,l,u,c,p,d,f,h,g,y,v,m;return R((function(b){switch(b.g){case 1:if(a=tt,o=n.stream,s=n.aa,n.ra=!0,k(b,2),2==i.Eb())throw new De(1,1,1011);return _(b,function(e,t,n){var r,i,a,o,s,l,u,c;return R((function(p){return r=[],i=Math.max(0,n.appendWindowStart-.1),a=n.appendWindowEnd+.01,(o=n.timestampOffset)==t.Kd&&i==t.Jd&&a==t.Id||(s=function(){var n;return R((function(r){if(1==r.g)return k(r,2),t.Jd=i,t.Id=a,t.Kd=o,_(r,function(e,t,n,r,i,a){return R((function(o){return t==tt.X?(a||(e.g.s=n),function(e,t,n){e.l=t,e.m=n}(e.g,r,i),o.return()):_(o,Promise.all([qo(e,t,(function(){return zo(e,t)})),a?Promise.resolve():qo(e,t,(function(){return Wo(e,t,n)})),qo(e,t,(function(){e.h[t].appendWindowStart=0,e.h[t].appendWindowEnd=i,e.h[t].appendWindowStart=r,Yo(e,t)}))]),0)}))}(e.g.R,t.type,o,i,a,e.m.sequenceMode),4);if(2!=r.g)return A(r,0);throw n=w(r),t.Jd=null,t.Id=null,t.Kd=null,n}))},r.push(s())),!function(e,t){return e&&t?e.lc()==t.lc()&&e.hc()==t.hc()&&re(e.ya(),t.ya()):e==t}(n.h,t.Zc)&&(t.Zc=n.h)&&(l=qs(e,t,n.h),u=function(){var r,i,a;return R((function(o){switch(o.g){case 1:return k(o,2),_(o,l,4);case 4:return r=o.h,Lr(e.h),(new zr).box("moov",Wr).box("trak",Wr).box("mdia",Wr).P("mdhd",(function(e){e=io(e.reader||0,e.version||0),n.h.timescale=e.timescale})).parse(r),i=t.stream.closedCaptions&&0>=8;return l.return(e.crypto.subtle.decrypt({name:"AES-CBC",iv:a},i.cryptoKey,t))}))}(c,i,s),9);case 9:c=b.h;case 8:return Lr(t.h),n.bb?(n.ra=!1,$s(t,n,0),b.return()):_(b,Ws(t,n,r,o,i,c),6);case 11:if(g=b.h,f){b.A(6);break}return d=!0,Lr(t.h),t.s?b.return():n.bb?(n.ra=!1,$s(t,n,0),b.return()):_(b,Ws(t,n,r,o,i,g),6);case 6:if(Lr(t.h),t.s)return b.return();n.pa=i,s.next(),n.ra=!1,n.be=!1,y=t.g.R.Na(),v=y[n.type],JSON.stringify(v),n.bb||t.g.Wd(i.startTime,i.endTime,n.type),$s(t,n,0),A(b,0);break;case 2:if(m=w(b),Lr(t.h,m),t.s)return b.return();if(n.ra=!1,7001==m.code)n.ra=!1,Qs(n),$s(t,n,0),b.A(0);else if(n.type==a.X&&t.i.ignoreTextStreamFailures)t.j.delete(a.X),b.A(0);else{if(3017!=m.code)return n.nc=!0,m.severity=2,_(b,Js(t,m),0);(function(e,t,n){if(!Array.from(e.j.values()).some((function(e){return e!=t&&e.be}))){var r=Math.round(100*e.u);if(20=(a=n-i-r)?o.return():_(o,e.g.R.remove(t.type,i,i+a),2);Lr(e.h),E(o)}))}(e,t,n),2);case 2:return Lr(e.h),c=t.vc,t.vc=!1,p=t.ve,t.ve=!1,_(d,e.g.xe(t.type,a),3);case 3:return _(d,Vo(e.g.R,t.type,a,i,o,c,p),4);case 4:Lr(e.h),E(d)}}))}function Ys(e){return e&&e.type==et&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function qs(e,t,n,r){var i,a,o,s,l;return R((function(u){return 1==u.g?(i=Pr,a=Us(n.ya(),n.Ba,n.ka,e.i.retryParameters,r),o=t.stream,e.g.modifySegmentRequest(a,{type:o.type,init:n instanceof ho,duration:n.endTime-n.startTime,mimeType:o.mimeType,codecs:o.codecs,bandwidth:o.bandwidth}),s=e.g.kb.request(i,a),t.ta=s,_(u,s.promise,2)):(l=u.h,t.ta=null,u.return(l.data))}))}function Xs(e,t,n,r){var i,a;return R((function(o){return 1==o.g?(t.bb=!1,t.hd=!1,t.Nc=0,t.ac=!0,t.pa=null,t.Zc=null,t.aa=null,r?(i=e.g.Sc(),a=e.g.R.getDuration(),_(o,e.g.R.remove(t.type,i+r,a),3)):_(o,Ho(e.g.R,t.type),4)):3!=o.g?(Lr(e.h),n?_(o,e.g.R.flush(t.type),3):o.A(3)):(Lr(e.h),t.ac=!1,t.endOfStream=!1,t.ra||t.Ka||$s(e,t,0),void E(o))}))}function $s(e,t,n){var r=t.type;(r!=et||e.j.has(r))&&(t.Ka=new at((function(){var n;return R((function(r){return 1==r.g?(k(r,2),_(r,zs(e,t),4)):2!=r.g?A(r,0):(n=w(r),e.g&&e.g.onError(n),void E(r))}))})).N(n))}function Qs(e){null!=e.Ka&&(e.Ka.stop(),e.Ka=null)}function Zs(e){return R((function(t){return e.ta?_(t,e.ta.abort(),0):t.A(0)}))}function Js(e,t){return R((function(n){if(1==n.g)return _(n,cr(e.F),2);Lr(e.h),e.g.onError(t),t.handled||e.i.failureCallback(t),E(n)}))}function el(e,t){var n=Bu(),r=this;this.j=t,this.i=e,this.l=n,this.o=null,this.m=[],this.h=this.g=null,this.u=Promise.resolve().then((function(){return function(e){return R((function(t){if(e.s.g)t=t.A(0);else{if(0==e.m.length||e.g&&!e.g.hb)var n=!1;else{e.g&&(e.g.Ia.mb(),e.g=null);var r=(n=e.m.shift()).create(e.l);r?(n.Ia.Jb(),e.g={node:r.node,payload:r.payload,hb:r.hb,Ia:n.Ia}):n.Ia.dd(),n=!0}n?n=Promise.resolve():e.g?n=function(e){var t,n;return R((function(r){switch(r.g){case 1:return e.i=e.j.Mf(e.i,e.l,e.g.node,e.g.payload),k(r,2),e.h=e.j.yf(e.i,e.l,e.g.payload),_(r,e.h.promise,4);case 4:e.h=null,e.i==e.g.node&&(e.g.Ia.bd(),e.g=null),A(r,0);break;case 2:return 7001==(t=w(r)).code?e.g.Ia.mb():e.g.Ia.onError(t),e.g=null,e.h=null,n=e,_(r,e.j.handleError(e.l,t),5);case 5:n.i=r.h,E(r)}}))}(e):(e.j.eg(e.i),e.o=new rt,n=e.o),t=_(t,n,1)}return t}))}(r)})),this.s=new Or((function(){return function(e){var t,n;return R((function(r){if(1==r.g)return e.h&&e.h.abort(),nl(e),_(r,e.u,2);for(e.g&&e.g.Ia.mb(),t=u(e.m),n=t.next();!n.done;n=t.next())n.value.Ia.mb();e.g=null,e.m=[],e.j=null,E(r)}))}(r)}))}function tl(e,t){var n={Jb:function(){},bd:function(){},mb:function(){},onError:function(){},dd:function(){},uh:function(){}};return e.m.push({create:t,Ia:n}),e.h&&e.h.abort(),nl(e),n}function nl(e){e.o&&(e.o.resolve(),e.o=null)}function rl(e){var t=[],n=700<=e.fontWeight,r="italic"==e.fontStyle,i=e.textDecoration.includes("underline");return n&&t.push("b"),r&&t.push("i"),i&&t.push("u"),n=t.reduce((function(e,t){return e+"<"+t+">"}),""),t=t.reduceRight((function(e,t){return e+""}),""),e.lineBreak?"\n":e.nestedCues.length?e.nestedCues.map(rl).join(""):n+e.payload+t}function il(e,t){for(var n=(e=u(e)).next();!n.done;n=e.next())if((n=n.value).isContainer)il(n.nestedCues,t);else{var r=n.clone();r.nestedCues=[],r.payload=rl(n),t.push(r)}return t}function al(e){this.g=null;for(var t=u(Array.from(e.textTracks)),n=t.next();!n.done;n=t.next())(n=n.value).mode="disabled","Shaka Player TextTrack"==n.label&&(this.g=n);this.g||(this.g=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function ol(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function sl(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var r=u(Array.from(e.cues)),i=r.next();!i.done;i=r.next())(i=i.value)&&t(i)&&e.removeCue(i);e.mode=n}function ll(){}function ul(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function cl(t,n){var r=this;this.j=!1,this.i=[],this.B=t,this.m=n,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.m.appendChild(this.g),this.u=new ot((function(){dl(r)})).Ca(.25),this.h=new Map,this.s=new Mr,this.s.C(document,"fullscreenchange",(function(){dl(r,!0)})),this.l=null,"ResizeObserver"in e&&(this.l=new ResizeObserver((function(){dl(r,!0)})),this.l.observe(this.g)),this.o=new Map}function pl(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}function dl(e,t){if(e.g){var n=e.B.currentTime;if(!e.j||void 0!==t&&t){for(var r=(t=u(e.o.values())).next();!r.done;r=t.next())ul(r.value);ul(e.g),e.h.clear(),e.o.clear()}if(e.j){t=new Map;for(var i=(r=u(e.h.keys())).next();!i.done;i=r.next())i=i.value,t.set(i,e.h.get(i));!function e(t,n,r,i,a){for(var o=!1,s=[],l=[],c=(n=u(n)).next();!c.done;c=n.next()){c=c.value,a.push(c);var p=t.h.get(c),d=c.startTime<=i&&c.endTime>i,f=p?p.ef:null;p&&(s.push(p.Bd),p.tc&&s.push(p.tc),d||(o=!0,t.h.delete(c),p=null)),d&&(l.push(c),p?pl(t,f)||(o=!0):(fl(t,c,a),f=(p=t.h.get(c)).ef,o=!0)),0=n})))?1e3*(e.end-n):NaN}(e,n.type)),n.bandwidth&&(r.br=n.bandwidth/1e3),i&&r.ot!==Cl&&(r.tb=function(e,t){var n=e.h.Xa();if(!n.length)return NaN;e=n[0];for(var r=(n=u(n)).next();!r.done;r=n.next())"variant"===(r=r.value).type&&r.bandwidth>e.bandwidth&&(e=r);switch(t){case Tl:return e.videoBandwidth||NaN;case kl:return e.audioBandwidth||NaN;default:return e.bandwidth}}(e,r.ot)/1e3),ml(e,t,r)}}catch(e){Y("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}}function vl(t){return t.j||(t.j=t.g.sessionId||e.crypto.randomUUID()),{v:1,sf:t.o,sid:t.j,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}function ml(e,t,n){n=void 0===n?{}:n;var r=void 0===r?e.g.useHeaders:r;if(e.g.enabled){Object.assign(n,vl(e)),n.pr=e.h.Rc();var i=n.ot===Tl||n.ot===Al;if(e.l&&i&&(n.bs=!0,n.su=!0,e.l=!1),null==n.su&&(n.su=e.m),r)e=function(e){for(var t=Object.keys(e),n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},o=(t=u(t)).next();!o.done;o=t.next())o=o.value,i[null!=a[o]?a[o]:1][o]=e[o];for(e=0;e=i.g&&ee?this.g.R.Aa(e):this.g.R.Aa(Math.pow(2,32))},el.prototype.destroy=function(){return this.s.destroy()},(r=al.prototype).remove=function(e,t){return!!this.g&&(sl(this.g,(function(n){return n.startTimee})),!0)},r.append=function(e){var t=il(e,[]),n=[];e=this.g.cues?Array.from(this.g.cues):[];for(var r={},i=(t=u(t)).next();!i.done;r={sb:r.sb},i=t.next())r.sb=i.value,e.some(function(e){return function(t){return t.startTime==e.sb.startTime&&t.endTime==e.sb.endTime&&t.text==e.sb.payload}}(r))||(i=ol(r.sb))&&n.push(i);for(r=(e=u(e=n.slice().sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?n.indexOf(t)-n.indexOf(e):n.indexOf(e)-n.indexOf(t)})))).next();!r.done;r=e.next())this.g.addCue(r.value)},r.destroy=function(){return this.g&&(sl(this.g,(function(){return!0})),this.g.mode="disabled"),this.g=null,Promise.resolve()},r.isTextVisible=function(){return"showing"==this.g.mode},r.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},B("shaka.text.SimpleTextDisplayer",al),al.prototype.setTextVisibility=al.prototype.setTextVisibility,al.prototype.isTextVisible=al.prototype.isTextVisible,al.prototype.destroy=al.prototype.destroy,al.prototype.append=al.prototype.append,al.prototype.remove=al.prototype.remove,B("shaka.util.Dom",ll),ll.removeAllChildren=ul,(r=cl.prototype).append=function(e){for(var t=[].concat(c(this.i)),n={},r=(e=u(e)).next();!r.done;n={Cc:n.Cc},r=e.next())n.Cc=r.value,t.some(function(e){return function(t){return ae(t,e.Cc)}}(n))||this.i.push(n.Cc);dl(this)},r.destroy=function(){this.m.removeChild(this.g),this.g=null,this.j=!1,this.i=[],this.u&&this.u.stop(),this.h.clear(),this.s&&(this.s.release(),this.s=null),this.l&&(this.l.disconnect(),this.l=null)},r.remove=function(e,t){if(!this.g)return!1;var n=this.i.length;return this.i=this.i.filter((function(n){return n.startTime=t})),dl(this,n>this.i.length),!0},r.isTextVisible=function(){return this.j},r.setTextVisibility=function(e){this.j=e},B("shaka.text.UITextDisplayer",cl),cl.prototype.setTextVisibility=cl.prototype.setTextVisibility,cl.prototype.isTextVisible=cl.prototype.isTextVisible,cl.prototype.remove=cl.prototype.remove,cl.prototype.destroy=cl.prototype.destroy,cl.prototype.append=cl.prototype.append,B("shaka.text.WebVttGenerator",(function(){}));var El="m",kl="a",Tl="v",Al="av",wl="i",Sl="c",Cl="tt",xl="v",Il="l";function Pl(){}function Dl(e,t,n,r,i){var a,o=i in r,s=!0;for(a in t){var l=i+"."+a,u=o?r[i]:n[a];o||a in n?void 0===t[a]?void 0===u||o?delete e[a]:e[a]=Er(u):u.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=Er(u)),l=Dl(e[a],t[a],u,r,l),s=s&&l):typeof t[a]!=typeof u||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=u.constructor?(z("Invalid config, wrong type for "+l),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&W("Unexpected number of arguments for "+l),e[a]=t[a]):(z("Invalid config, unrecognized key "+l),s=!1)}return s}function Rl(e,t){for(var n={},r=n,i=0,a=0;!(0>(i=e.indexOf(".",i)));)0!=i&&"\\"==e[i-1]||(r[a=e.substring(a,i).replace(/\\\./g,".")]={},r=r[a],a=i+1),i+=1;return r[e.substring(a).replace(/\\\./g,".")]=t,n}function Ol(e,t){return e&&t}function Ll(){}function Ml(e){return new Oe(e=Tt(e)).Ha}function Nl(e,t,n){function r(e){Ie(a).setUint32(o,e.byteLength,!0),o+=4,a.set(xe(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new De(2,6,6015);var i;i="string"==typeof t?wt(t,!0):t,e=wt(e=Tt(e),!0);var a=new Uint8Array(12+e.byteLength+i.byteLength+n.byteLength),o=0;return r(e),r(i),r(n),a}function Ul(){}function Fl(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var t={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(e,t,n){return"com.apple.fps.1_0"==n.keySystem&&"skd"==t&&(t=n.serverCertificate,e=Nl(e,n=Ml(e),t)),e},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:ct()},n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(e){return Ol([e],e)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(e){return Ol([e])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1};(yt("Web0S")||pt()||yt("CrKey"))&&(r.stallSkip=0);var i={trackSelectionCallback:function(e){return R((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return R((function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?_(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))}))},progressCallback:function(e,t){return Ol([e,t])},usePersistentLicense:!0,numberOfParallelDownloads:5},a={drm:t,manifest:n,streaming:r,mediaSource:{sourceBufferExtraFeatures:""},offline:i,abrFactory:function(){return new Gn},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1},autoShowText:3,preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1}};return i.trackSelectionCallback=function(e){return R((function(t){return t.return(function(e,t){var n=e.filter((function(e){return"variant"==e.type})),r=[],i=un(t,n.map((function(e){return e.language})));i&&(r=n.filter((function(e){return an(e.language)==i}))),0==r.length&&(r=n.filter((function(e){return e.primary}))),0==r.length&&(n.map((function(e){return e.language})),r=n);var a=r.filter((function(e){return e.height&&480>=e.height}));for(a.length&&(a.sort((function(e,t){return t.height-e.height})),r=a.filter((function(e){return e.height==a[0].height}))),t=[],r.length&&(n=Math.floor(r.length/2),r.sort((function(e,t){return e.bandwidth-t.bandwidth})),t.push(r[n])),e=u(e),r=e.next();!r.done;r=e.next())(r=r.value).type!=et&&"image"!=r.type||t.push(r);return t}(e,a.preferredAudioLanguage))}))},a}function jl(e,t,n){var r={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Dl(e,t,n||Fl(),r,"")}function Bl(){this.g=null,this.h=[]}function Vl(e,t){if(null==e.g)e.g={timestamp:Date.now()/1e3,state:t,duration:0};else{var n=Date.now()/1e3;e.g.duration=n-e.g.timestamp,e.g.state!=t&&(e.h.push(e.g),e.g={timestamp:n,state:t,duration:0})}}function Hl(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var r=(e=u(e.h)).next();!r.done;r=e.next())n+=(r=r.value).state==t?r.duration:0;return n}function Kl(){this.i=this.h=null,this.g=[]}function Gl(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function zl(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.M=this.O=this.H=this.J=this.L=this.l=this.o=NaN,this.g=new Bl,this.h=new Kl}function Wl(t,n){_r.call(this);var r=this;this.l=Ku,this.Uc=this.g=null,this.ca=!1,this.Xc=new Mr,this.Xb=new Mr,this.s=new Mr,this.Nb=this.i=this.Yc=this.J=this.j=this.ua=this.L=this.cf=this.V=this.Fa=this.M=this.Vc=this.H=this.xb=this.B=this.G=this.m=this.D=null,this.dc=!1,this.Nd=this.u=null,this.Yd=1e9,this.h=uu(this),this.ec={width:1/0,height:1/0},this.o=null,this.ub=new ir(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount),this.vb=this.h.preferredTextLanguage,this.cc=this.h.preferredTextRole,this.$b=this.h.preferForcedSubs,this.Zb=[],this.fc=null,n&&n(this),this.D=function(e){return new wr((function(t,n){e.u&&e.u.segmentDownloaded(t,n)}),(function(t,n,r){t=(new Map).set("headers",t).set("request",n).set("requestType",r),e.dispatchEvent(ql("downloadheadersreceived",t))}),(function(t,n,r,i){t=(new Map).set("request",t).set("error",n).set("httpResponseCode",r).set("aborted",i),e.dispatchEvent(ql("downloadfailed",t))}))}(this),this.D.je(this.h.streaming.forceHTTPS),this.F=null,Xu&&(this.F=Xu()),this.Xc.C(e,"online",(function(){r.ce()})),this.O={name:"detach"},this.W={name:"attach"},this.ea={name:"unload"},this.Zd={name:"manifest-parser"},this.Xd={name:"manifest"},this.wb={name:"media-source"},this.Qd={name:"drm-engine"},this.ba={name:"load"},this.de={name:"src-equals-drm-engine"},this.yb={name:"src-equals"};var i=new Map;i.set(this.W,(function(e,t){return gr(function(e,t,n){return null==t.mediaElement&&(t.mediaElement=n.mediaElement,e.Xb.C(t.mediaElement,"error",(function(){var t=Iu(e);t&&Cu(e,t)}))),e.g=t.mediaElement,Promise.resolve()}(r,e,t))})),i.set(this.O,(function(e){return e.mediaElement&&(r.Xb.nb(),e.mediaElement=null),r.F&&r.F.release(),r.g=null,gr(e=Promise.resolve())})),i.set(this.ea,(function(e){return gr(Xl(r,e))})),i.set(this.wb,(function(e){return gr(e=function(e,t){var n,r,i,a,o;return R((function(s){if(1==s.g)return n=e.h.textDisplayFactory,r=n(),e.Ud=n,(i=function(e,t,n,r){return new Mo(e,t,n,r)}(t.mediaElement,r,(function(t,n,r){$l(e,t,n,r)}),e.L)).configure(e.h.mediaSource),a=e.h.manifest,o=a.segmentRelativeVttTiming,i.H=o,_(s,i.J,2);e.G=i,E(s)}))}(r,e))})),i.set(this.Zd,(function(e,t){return gr(e=function(e,t,n){var r,i,a,o;return R((function(s){if(1==s.g)return t.mimeType=n.mimeType,t.uri=n.uri,r=t.uri,i=e.D,e.Nb=r,a=e,_(s,Yi(r,i,e.h.manifest.retryParameters,t.mimeType),2);a.Yc=s.h,e.J=e.Yc(),o=Er(e.h.manifest),n.mediaElement&&"AUDIO"===n.mediaElement.nodeName&&(o.disableVideo=!0),e.J.configure(o),E(s)}))}(r,e,t))})),i.set(this.Xd,(function(e){return function(e,t){var n=t.uri;t=e.D,e.Fa=new Ds((function(){return e.uc()})),e.Fa.addEventListener("regionadd",(function(t){t=t.region,xu(e,"timelineregionadded",t),e.F&&e.F.onDashTimedMetadata(t)})),e.ua=null,e.h.streaming.observeQualityChanges&&(e.ua=new Ps((function(){return e.Na()})),e.ua.addEventListener("qualitychange",(function(t){var n=t.quality;t=t.position,n=(new Map).set("mediaQuality",{bandwidth:n.bandwidth,audioSamplingRate:n.audioSamplingRate,codecs:n.codecs,contentType:n.contentType,frameRate:n.frameRate,height:n.height,mimeType:n.mimeType,channelsCount:n.channelsCount,pixelAspectRatio:n.pixelAspectRatio,width:n.width}).set("position",t),e.dispatchEvent(ql("mediaqualitychanged",n))})));var r={networkingEngine:t,modifyManifestRequest:function(t,n){var r=e.V;try{r.g.enabled&&(r.o=n.format,ml(r,t,{ot:El,su:!r.i}))}catch(e){Y("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}},modifySegmentRequest:function(t,n){yl(e.V,t,n)},filter:function(t){return cu(e,t)},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,r=u(t.textStreams),i=r.next();!i.done;i=r.next())"application/cea-608"!=(i=i.value).mimeType&&"application/cea-708"!=i.mimeType||n.add(i.originalId);for(r=u(t.variants),i=r.next();!i.done;i=r.next())if((i=i.value.video)&&i.closedCaptions)for(var a=u(i.closedCaptions.keys()),o=a.next();!o.done;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",l=new ws;s={id:e.Yd++,originalId:o,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:l,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:i.closedCaptions.get(o),label:null,type:et,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:i.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},t.textStreams.push(s),n.add(o)}}(e,t)},onTimelineRegionAdded:function(t){var n=e.Fa;e:{for(var r=u(n.g),i=r.next();!i.done;i=r.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){r=i;break e}r=null}null==r&&(n.g.add(t),t=new vr("regionadd",new Map([["region",t]])),n.dispatchEvent(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return Cu(e,t)},isLowLatencyMode:function(){return e.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return e.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){e.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){e.j&&e.j.updateDuration()},newDrmInfo:function(t){var n=e.m?e.m.g:null;n&&e.m.u&&du(e,n.keySystem,t)}},i=Date.now()/1e3;return new pr(function(){var t,a,o,s;return R((function(l){if(1==l.g)return t=e,_(l,e.J.start(n,r),2);if(t.i=l.h,a=ql("manifestparsed"),e.dispatchEvent(a),0==e.i.variants.length)throw new De(2,4,4036);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}(e.i),o=Date.now()/1e3,s=o-i,e.o.F=s,E(l)}))}(),(function(){return e.J.stop()}))}(r,e)})),i.set(this.Qd,(function(e){return gr(e=function(e,t){var n,r;return R((function(i){return 1==i.g?(n=Date.now()/1e3,r=!0,e.m=Jl(e,{kb:e.D,onError:function(t){Cu(e,t)},cd:function(t){Pu(e,t)},onExpirationUpdated:function(t,n){Du(e,t,n)},onEvent:function(t){e.dispatchEvent(t),"drmsessionupdate"==t.type&&r&&(r=!1,e.o.j=Date.now()/1e3-n,e.L&&((t=e.L).g&&t.h.classList.add("shaka-hidden")))}}),e.m.configure(e.h.drm),_(i,Ai(e.m,e.i.variants,e.i.offlineSessionIds),2)):3!=i.g?_(i,e.m.Yb(t.mediaElement),3):_(i,cu(e,e.i),0)}))}(r,e))})),i.set(this.ba,(function(e,t){return gr(function(e,t,n){var r,i,a,o,s,l,c,p,d,f,h,g,y,v,m,b;return R((function(k){switch(k.g){case 1:for(t.startTime=n.startTime,null!=e.fc&&(t.startTime=e.fc,e.fc=null),r=t.mediaElement,i=t.uri,e.Nb=i,e.H=new Ss({Tc:function(){return r.playbackRate},Pc:function(){return r.defaultPlaybackRate},le:function(e){r.playbackRate=e},Me:function(e){r.currentTime+=e}}),a=function(){return gu(e)},o=function(){return hu(e)},e.s.C(r,"playing",a),e.s.C(r,"pause",a),e.s.C(r,"ended",a),e.s.C(r,"ratechange",o),function(e,t){if(t.lcevc.enabled){var n=e.Xa();n&&n[0]&&n[0].videoMimeType==$u.ts&&(ut()||navigator.userAgent.match(/Edge\//))&&(t.streaming.forceTransmux||W("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled.")),Yl(e),null==e.L&&(e.L=new Po(e.g,e.cf,t.lcevc),e.G&&(e.G.D=e.L))}else Yl(e)}(e,e.h),s=e.h.abrFactory,e.u&&e.Nd==s||(e.Nd=s,e.u=s(),"function"!=typeof e.u.setMediaElement&&(Xn("AbrManager","Please use an AbrManager with setMediaElement function."),e.u.setMediaElement=function(){}),e.u.configure(e.h.abr)),e.ub=new ir(e.h.preferredAudioLanguage,e.h.preferredVariantRole,e.h.preferredAudioChannelCount),e.vb=e.h.preferredTextLanguage,e.cc=e.h.preferredTextRole,e.$b=e.h.preferForcedSubs,Ru(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.u.init((function(t,n,r){e.j&&t!=e.j.l&&bu(e,t,!0,void 0!==n&&n,void 0===r?0:r)})),e.u.setMediaElement(r),dn(e.i,e.h.preferredVideoCodecs,e.h.preferredAudioCodecs,e.h.preferredAudioChannelCount,e.h.preferredDecodingAttributes),e.j=function(e){return new Fs(e.i,{Sc:function(){return e.B?e.B.Ic():0},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},modifySegmentRequest:function(t,n){yl(e.V,t,n)},R:e.G,kb:e.D,onError:function(t){return Cu(e,t)},onEvent:function(t){return e.dispatchEvent(t)},gg:function(){e.J&&e.J.update&&e.J.update()},Wd:function(t,n,r){e.B&&e.B.Ne(),tu(e),t=(new Map).set("start",t).set("end",n).set("contentType",r),e.dispatchEvent(ql("segmentappended",t))},fg:function(t,n){(n=n.Od)&&e.ua&&function(e,t,n){var r=function(e,t){var n=e.g.get(t);return n||(n={rc:[],Ae:null,contentType:t},e.g.set(t,n)),n}(e,t.contentType);!function(e,t){if((e=e.h()[t.contentType])&&0=r)}))}else t.rc=[]}(e,r),e={Od:t,position:n},0<=(t=(r=r.rc).findIndex((function(e){return e.position>=n})))?r.splice(t,r[t].position==n?1:0,e):r.push(e)}(e.ua,n,t)},xe:function(t,n){var r=e.m;if(r.h.parseInbandPsshEnabled&&["audio","video"].includes(t)){var i=0,a=u((n=new ti(xe(n))).data);for(t=a.next();!t.done;t=a.next())i+=t.value.length;if(0==i)r=Promise.resolve();else{for(i=new Uint8Array(i),a=0,t=(n=u(n.data)).next();!t.done;t=n.next())t=t.value,i.set(t,a),a+=t.length;Ii(r,"cenc",i),r=r.o}}else r=Promise.resolve();return r},hg:function(t,n,r){$l(e,t,n,r)}})}(e),e.j.configure(e.h.streaming),e.l=Gu,r.textTracks&&e.s.C(r.textTracks,"addtrack",(function(t){if(t.track)switch(t=t.track,t.kind){case"chapters":Zl(e,t)}})),e.dispatchEvent(ql("streaming")),l=null,(c=e.j.l)||(l=vu(e)),p=[],f=u([(d=c||l).video,d.audio]),h=f.next();!h.done;h=f.next())(g=h.value)&&!g.segmentIndex&&p.push(g.createSegmentIndex());if(!(0, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),s.resolve()),e.s.ma(i,"error",(function(){s.reject(Iu(e))})),new pr(s,(function(){return s.reject(new De(2,7,7001)),Promise.resolve()})).Y((function(){e.dc=!0}))}(r,e,t)})),this.Ga=new el(this.O,{Mf:function(e,t,n,i){var a=null;return e==r.O&&(a=n==r.O?r.O:r.W),e==r.W&&(a=n==r.O||t.mediaElement!=i.mediaElement?r.O:n==r.W?r.W:n==r.wb||n==r.ba?r.wb:n==r.yb?r.de:null),e==r.wb&&(a=n==r.ba&&t.mediaElement==i.mediaElement?r.Zd:r.ea),e==r.Zd&&(a=ju(r.ba,r.Xd,r.ea,n,t,i)),e==r.Xd&&(a=ju(r.ba,r.Qd,r.ea,n,t,i)),e==r.Qd&&(a=ju(r.ba,r.ba,r.ea,n,t,i)),e==r.de&&(a=n==r.yb&&t.mediaElement==i.mediaElement?r.yb:r.ea),e!=r.ba&&e!=r.yb||(a=r.ea),e==r.ea&&(a=i.mediaElement&&t.mediaElement==i.mediaElement?r.W:r.O),a},yf:function(e,t,n){return r.dispatchEvent(ql("onstatechange",(new Map).set("state",e.name))),i.get(e)(t,n)},handleError:function(e){return R((function(t){return 1==t.g?_(t,Xl(r,e),2):t.return(e.mediaElement?r.W:r.O)}))},eg:function(e){r.dispatchEvent(ql("onstateidle",(new Map).set("state",e.name)))}}),this.af=new ot((function(){yn(r.i.variants,r.h.restrictions,r.ec)&&vu(r)})),t&&this.Yb(t,!0)}function Yl(e){null!=e.L&&(e.L.release(),e.L=null)}function ql(e,t){return new vr(e,t)}function Xl(e,t){var n,r,i,a,o,s,l,c,p;return R((function(d){switch(d.g){case 1:return e.l!=Hu&&(e.l=Ku),n=e.Zb.map((function(e){return e()})),e.Zb=[],_(d,Promise.all(n),2);case 2:if(e.dispatchEvent(ql("unloading")),t.mimeType=null,t.startTime=null,t.uri=null,e.Fa&&(e.Fa.release(),e.Fa=null),t.mediaElement&&e.s.nb(),e.af.stop(),e.xb&&(e.xb.release(),e.xb=null),e.Vc&&(e.Vc.stop(),e.Vc=null),!e.J){d.A(3);break}return _(d,e.J.stop(),4);case 4:e.J=null,e.Yc=null;case 3:if(!e.u){d.A(5);break}return _(d,e.u.stop(),5);case 5:if(!e.j){d.A(7);break}return _(d,e.j.destroy(),8);case 8:e.j=null;case 7:if(e.H&&(e.H.release(),e.H=null),e.B&&(e.B.release(),e.B=null),!e.G){d.A(9);break}return _(d,e.G.destroy(),10);case 10:e.G=null;case 9:if(e.F&&e.F.onAssetUnload(),!t.mediaElement||!t.mediaElement.src){d.A(11);break}return _(d,new Promise((function(e){return new ot(e).N(.1)})),12);case 12:for(t.mediaElement.removeAttribute("src"),t.mediaElement.load();t.mediaElement.lastChild;)t.mediaElement.removeChild(t.mediaElement.firstChild);case 11:if(!e.m){d.A(13);break}return _(d,e.m.destroy(),14);case 14:e.m=null;case 13:if(e.Nb=null,e.M=null,e.i){for(r=u(e.i.variants),i=r.next();!i.done;i=r.next())for(a=i.value,o=u([a.audio,a.video]),s=o.next();!s.done;s=o.next())(l=s.value)&&l.segmentIndex&&l.segmentIndex.release();for(c=u(e.i.textStreams),s=c.next();!s.done;s=c.next())(p=s.value).segmentIndex&&p.segmentIndex.release()}e.i=null,e.o=new zl,e.Ud=null,fu(e),E(d)}}))}function $l(e,t,n,r){for(var i=(t=u(t)).next();!i.done;i=t.next())if((i=i.value).data&&i.cueTime&&i.frames){var a=i.cueTime+n,o=r;o&&a>o&&(o=a);for(var s=u(i.frames),l=s.next();!l.done;l=s.next())Ql(e,a,o,"org.id3",l.value);e.F&&e.F.onHlsTimedMetadata(i,a)}}function Ql(e,t,n,r,i){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",r).set("payload",i),e.dispatchEvent(ql("metadata",t))}function Zl(e,t){if(t&&"chapters"==t.kind){t.mode="hidden";var n=new ot((function(){t.mode="hidden"})).Mb().N(.5);e.Zb.push((function(){n.stop()}))}}function Jl(e,t){return new Ti(t,e.h.drm.updateExpirationTime)}function eu(e,t){e.M=new ar,e.M.g=sr,or(e.M,t,Math.min(.5,t/2)),fu(e),e.Vc=new ot((function(){tu(e)})).Ca(.25)}function tu(e){switch(e.l){case zu:if(e.g.ended)var t=!0;else{var n=bo(e.g.buffered);t=null!=n&&n>=e.g.duration-1}break;case Gu:e:if(e.g.ended||Uo(e.G))t=!0;else{if(e.i.presentationTimeline.U()){n=e.i.presentationTimeline.gb();var r=bo(e.g.buffered);if(null!=r&&r>=n){t=!0;break e}}t=!1}break;default:t=!1}r=Eo(e.g.buffered,e.g.currentTime);var i=t,a=(n=e.M).h.get(n.g);t=n.g,r=i||r>=a?lr:sr,n.g=r,t!=r&&fu(e)}function nu(e){if(e.J){var t=Er(e.h.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.J.configure(t)}if(e.m&&e.m.configure(e.h.drm),e.j){e.j.configure(e.h.streaming);try{pu(e,e.i)}catch(t){Cu(e,t)}e.u&&yu(e),!(t=e.j.l)||t.allowedByApplication&&t.allowedByKeySystem||mu(e)}if(e.D&&e.D.je(e.h.streaming.forceHTTPS),e.G&&(e.G.configure(e.h.mediaSource),e.G.H=e.h.manifest.segmentRelativeVttTiming,t=e.h.textDisplayFactory,e.Ud!=t)){var n=t(),r=e.G,i=r.m;r.m=n,i&&(n.setTextVisibility(i.isTextVisible()),i.destroy()),r.g&&(r.g.i=n),e.Ud=t,e.j&&((n=(t=e.j).j.get(et))&&Hs(t,n.stream,!0,0,!0))}e.u&&(e.u.configure(e.h.abr),e.h.abr.enabled?e.u.enable():e.u.disable(),Su(e)),e.M&&(t=e.h.streaming.rebufferingGoal,e.i&&(t=Math.max(t,e.i.minBufferTime)),or(e.M,t,Math.min(.5,t/2))),e.i&&Ru(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd)}function ru(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function iu(e){return Array.from(e.g.textTracks).filter((function(e){return"chapters"==e.kind}))}function au(e,t){var n,r;return R((function(i){switch(i.g){case 1:return n=Xi(t),(r=Qu[n])?i.return(r):(k(i,2),_(i,qi(t,e.D,e.h.streaming.retryParameters),4));case 4:r=i.h,A(i,3);break;case 2:w(i);case 3:if(r)return i.return(r);throw new De(1,2,2011,n)}}))}function ou(e,t,n,r,i,a,o){var s,l,u,c;return R((function(p){if(1==p.g)return"text/vtt"!=i||o.length?_(p,su(e,t,e.D,e.h.streaming.retryParameters),3):p.A(2);2!=p.g&&(s=p.h,l=lu(e,s,i,o),u=new Blob([l],{type:"text/vtt"}),t=Zo(u),i="text/vtt"),c=document.createElement("track");var d=e.V,f=t;try{if(d.g.enabled){var h=vl(d);h.ot=Sl,h.su=!0;var g=_l(f,bl(h))}else g=f}catch(e){Y("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),g=f}return c.src=g,c.label=a,c.kind=r,c.srclang=n,e.g.getAttribute("crossorigin")||e.g.setAttribute("crossorigin","anonymous"),e.g.appendChild(c),p.return(c)}))}function su(e,t,n,r){var i,a,o;return R((function(s){if(1==s.g){i=Pr,(a=Cr([t],r)).method="GET";var l=e.V;try{l.g.enabled&&ml(l,a,{ot:Sl,su:!0})}catch(e){Y("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return _(s,n.request(i,a).promise,2)}return o=s.h,s.return(o.data)}))}function lu(e,t,n,r){var i=Jt[n];if(i)return n=i(),e={periodStart:0,segmentStart:0,segmentEnd:e.g.duration,vttOffset:0},t=xe(t),function(e,t){function n(e){for(var n=e,r=u(t),i=r.next();!i.done;i=r.next())(i=i.value).end&&i.start(e=Math.floor(n/3600))?"0":"")+e+":"+(10>(r=Math.floor(n/60%60))?"0":"")+r+":"+(10>(i=Math.floor(n%60))?"0":"")+i+"."+(100>(n=Math.floor(1e3*n%1e3))?10>n?"00":"0":"")+n}var r=il(e,[]);e="WEBVTT\n\n";for(var i=(r=u(r)).next();!i.done;i=r.next())e+=n((i=i.value).startTime)+" --\x3e "+n(i.endTime)+function(e){var t=[];switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case se:t.push("align:middle");break;case"start":t.push("align:start");break;case"end":t.push("align:end")}switch(e.writingMode){case"vertical-lr":t.push("vertical:lr");break;case"vertical-rl":t.push("vertical:rl")}return t.length?" "+t.join(" "):""}(i)+"\n",e+=i.payload+"\n\n";return e}(t=n.parseMedia(t,e),r);throw new De(2,2,2014,n)}function uu(e){var t=Fl();return t.streaming.failureCallback=function(t){if(e.U()){var n=null;1001==t.code||1002==t.code?n=1:1003==t.code&&(n=.1),null!=n&&(t.severity=1,e.ce(n))}},t.textDisplayFactory=function(){return e.Uc?new cl(e.g,e.Uc):new al(e.g)},t}function cu(e,t){return R((function(n){if(1==n.g)return _(n,function(e,t){return R((function(n){if(1==n.g)return _(n,vn(e.j?e.j.l:null,t),2);Lu(t),E(n)}))}(e,t),2);pu(e,t),E(n)}))}function pu(e,t){if(e.l!=Hu){yn(t.variants,e.h.restrictions,e.ec)&&e.j&&ku(e);var n=e.m?e.m.g:null;if(n&&e.m.u)for(var r=u(t.variants),i=r.next();!i.done;i=r.next())i=i.value,du(e,n.keySystem,i.video),du(e,n.keySystem,i.audio);Ou(e,t)}}function du(e,t,n){if(n)for(var r=(n=u(n.drmInfos)).next();!r.done;r=n.next())if((r=r.value).keySystem==t)for(var i=(r=u(r.initData||[])).next();!i.done;i=r.next())i=i.value,Ii(e.m,i.initDataType,i.initData)}function fu(e){var t=e.Fd();if(e.o&&e.M&&e.B){var n=e.H;n.j=t,Cs(n),e.V&&(n=e.V,t||n.i||(n.i=!0),n.i&&t&&(n.l=!0),n.m=t),gu(e)}t=(new Map).set("buffering",t),e.dispatchEvent(ql("buffering",t))}function hu(e){var t=e.g.playbackRate;0!=t&&(e.H&&e.H.set(t),t=ql("ratechange"),e.dispatchEvent(t))}function gu(e){if(e.o&&e.M){var t=e.o.g;e.M.g==sr?Vl(t,"buffering"):e.g.paused?Vl(t,"paused"):e.g.ended?Vl(t,"ended"):Vl(t,"playing")}}function yu(e){try{Ou(e,e.i)}catch(t){return Cu(e,t),!1}var t=e.i.variants.filter((function(e){return Rn(e)}));return t=e.ub.create(t),e.u.setVariants(Array.from(t.values())),!0}function vu(e){return yu(e)?e.u.chooseVariant():null}function mu(e){var t=vu(e);t&&bu(e,t,!0,!0,0)}function bu(e,t,n,r,i){var a=e.j.l;if(t==a)r&&Bs(e.j,t,r,i,!0);else{var o=e.o.h;o.h!=t&&(o.h=t,o.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),Bs(e.j,t,r,i,void 0,n),r=null,a&&(r=wn(a)),t=wn(t),n?Eu(e,r,t):Tu(e,r,t)}}function _u(e,t){var n=Array.from(e.g.audioTracks).find((function(e){return e.enabled}));t.enabled=!0,t.id!==n.id&&(n.enabled=!1),Tu(e,n=Pn(n),t=Pn(t))}function Eu(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),e.L&&Do(e.L,n),Mu(e,n=ql("adaptation",t))}function ku(e){Mu(e,ql("trackschanged"))}function Tu(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),e.L&&Do(e.L,n),Mu(e,n=ql("variantchanged",t))}function Au(e){Mu(e,ql("textchanged"))}function wu(e){Mu(e,ql("texttrackvisibility"))}function Su(e){Mu(e,ql("abrstatuschanged",(new Map).set("newStatus",e.h.abr.enabled)))}function Cu(e,t){if(e.l!=Hu)if(function(e,t){if(1002!=t.code&&1011!=t.code||1!=t.category||!navigator.onLine)return!1;var n=e.h.streaming.maxDisabledTime;if(0==n){if(1011!=t.code)return!1;n=1}t=e.Xa().find((function(e){return e.active}));for(var r=e.i,i=u(r.variants),a=i.next();!a.done;a=i.next())(a=a.value).id===t.id&&(a.disabledUntilTime=Date.now()/1e3+n);return yn(r.variants,e.h.restrictions,e.ec),!!(t=vu(e))&&(r=e.Na().video.reduce((function(e,t){return e+t.end-t.start}),0),bu(e,t,!1,!0,r),e.af.N(n),!0)}(e,t))t.handled=!0;else{var n=ql("error",(new Map).set("detail",t));e.dispatchEvent(n),n.defaultPrevented&&(t.handled=!0)}}function xu(e,t,n){n=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}),e.dispatchEvent(ql(t,n))}function Iu(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var n=e.g.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new De(2,3,3016,t,n,e.g.error.message)}function Pu(e,t){if(e.j){var n=Object.keys(t),r=1==n.length&&"00"==n[0],i=!1;if(n.length)for(var a=(n=u(e.i.variants)).next();!a.done;a=n.next()){var o=[];(a=a.value).audio&&o.push(a.audio),a.video&&o.push(a.video);for(var s=(o=u(o)).next();!s.done;s=o.next()){var l=s.value;if(s=a.allowedByKeySystem,l.keyIds.size){a.allowedByKeySystem=!0;for(var c=(l=u(l.keyIds)).next();!c.done;c=l.next())c=c.value,c=t[r?"00":c],a.allowedByKeySystem=a.allowedByKeySystem&&!!c&&!Yu.includes(c)}s!=a.allowedByKeySystem&&(i=!0)}}i&&!yu(e)||((t=e.j.l)&&!t.allowedByKeySystem&&mu(e),i&&ku(e))}}function Du(e,t,n){e.J&&e.J.onExpirationUpdated&&e.J.onExpirationUpdated(t,n),t=ql("expirationupdated"),e.dispatchEvent(t)}function Ru(e,t,n){0"===(n=n.trim()).substr(0,5)&&""===n.substr(-6)&&(n=n.slice(5,-6),e=!0);try{var r=JSON.parse(n);r.ckc&&(n=r.ckc,e=!0),r.CkcMessage&&(n=r.CkcMessage,e=!0),r.License&&(n=r.License,e=!0)}catch(e){}e&&(t.data=Ce(Pt(n)))}},Ll.conaxFairPlayRequest=function(e,t){2===e&&(t.headers["Content-Type"]="application/octet-stream")},Ll.ezdrmFairPlayRequest=function(e,t){2===e&&(t.headers["Content-Type"]="application/octet-stream")},Ll.verimatrixFairPlayRequest=function(e,t){2===e&&(e=It(e=xe(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=At("spc="+e))},Ll.conaxInitDataTransform=function(t,n,r){if("skd"!==n)return t;n=r.serverCertificate,r=Tt(t).split("skd://").pop().split("?").shift(),r=e.atob(r);var i=new ArrayBuffer(2*r.length);i=new Uint16Array(i);for(var a=0,o=r.length;a=(t=Math.min(this.g.currentTime+t,this.uc().end)))return 1;if(!(e<=this.g.currentTime)&&et(i,e))&&(n=i);n?(t=wn(n),this.Te(t,!0)):mu(this)}else if(this.g&&this.g.audioTracks){i=Array.from(this.g.audioTracks),e=an(e),r=n=null;for(var a=(i=u(i)).next();!a.done;a=i.next()){var o=Pn(a=a.value);an(o.language)==e&&(n=a,t?o.roles.includes(t)&&(r=a):0==o.roles.length&&(r=a))}r?_u(this,r):n&&_u(this,n)}},r.he=function(e,t,n){if(n=void 0!==n&&n,this.i&&this.B)this.vb=e,this.cc=t||"",this.$b=n,(e=Ln(this.i.textStreams,this.vb,this.cc,this.$b)[0]||null)&&e!=this.j.o&&(Gl(this.o.h,e,!1),this.h.streaming.alwaysStreamText||this.Hd())&&(Vs(this.j,e),Au(this));else{var r=an(e);(e=this.Fb().find((function(e){return an(e.language)==r&&(!t||e.roles.includes(t))&&e.forced==n})))&&this.Se(e)}},r.tg=function(e){if(this.i&&this.B){for(var t=null,n=u(this.i.variants),r=n.next();!r.done;r=n.next())if((r=r.value).audio.label==e){t=r;break}null!=t&&(this.ub=new ir(t.language,"",0,e),mu(this))}},r.Hd=function(){var e=this.ca;return this.G?this.G.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?ru(this).some((function(e){return"showing"==e.mode})):e},r.He=function(){return this.g&&this.g.src&&this.g.textTracks?iu(this).map((function(e){return In(e)})):[]},r.Cf=function(e){var t=an(e),n=iu(this).filter((function(e){return an(e.language)==t}));if(!n||!n.length)return[];e=[];for(var r=new Set,i=(n=u(n)).next();!i.done;i=n.next())if((i=i.value)&&i.cues)for(var a=(i=u(i.cues)).next();!a.done;a=i.next()){var o=a.value;(a=o.id)&&""!=a||(a=o.startTime+"-"+o.endTime+"-"+o.text),o={id:a,title:o.text,startTime:o.startTime,endTime:o.endTime},r.has(a)||(e.push(o),r.add(a))}return e},r.yg=function(e){if(e=!!e,this.ca!=e){if(this.ca=e,this.l==Gu)this.G.m.setTextVisibility(e),this.h.streaming.alwaysStreamText||(e?this.j.o||0<(e=Ln(this.i.textStreams,this.vb,this.cc,this.$b)).length&&(Vs(this.j,e[0]),Au(this)):function(e){var t=e.j.get(et);t&&(Qs(t),Zs(t).catch((function(){})),e.j.delete(et)),e.o=null}(this.j));else if(this.g&&this.g.src&&this.g.textTracks)for(var t=ru(this),n=(t=u(t)).next();!n.done;n=t.next())"disabled"!=(n=n.value).mode&&(n.mode=e?"showing":"hidden");wu(this)}},r.Of=function(){if(!this.U())return null;var e=this.Ga.l,t=0;if(this.B)t=this.B.Ic();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.i?new Date(1e3*(this.i.presentationTimeline.i+t)):this.g&&this.g.getStartDate?(e=this.g.getStartDate(),isNaN(e.getTime())?null:new Date(e.getTime()+1e3*t)):null},r.Ie=function(){if(!this.U())return null;if(this.i)return new Date(1e3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?null:e}return null},r.Na=function(){if(this.l==Gu)return this.G.Na();var e={total:[],audio:[],video:[],text:[]};return this.l==zu&&(e.total=ko(this.g.buffered)),e},r.getStats=function(){if(this.l!=Gu&&this.l!=zu)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};gu(this);var e=this.g,t=e.currentTime/e.duration;if(!isNaN(t)){var n=this.o;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.B&&(this.o.M=this.B.te(),this.o.O=this.B.ue()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.o;var r=Number(n.totalVideoFrames);t.L=Number(n.droppedVideoFrames),t.J=r,this.o.H=Number(n.corruptedVideoFrames)}this.m?n=(n=this.m).H?n.H:NaN:n=NaN,this.o.s=n,this.l==Gu&&((n=this.j.l)&&(this.o.B=(this.H?this.H.i:1)*n.bandwidth),n&&n.video&&(t=this.o,r=n.video.height||NaN,t.o=n.video.width||NaN,t.l=r),this.U()&&(n=this.Ie().valueOf()+1e3*this.uc().end,this.o.D=(Date.now()-n)/1e3),this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g),n=this.u.getBandwidthEstimate(),this.o.u=n),this.l==zu&&(n=this.o,t=e.videoHeight||NaN,n.o=e.videoWidth||NaN,n.l=t);var i=this.o;e=i.o,n=i.l,t=i.B,r=i.J;for(var a=i.L,o=i.H,s=i.O,l=i.M,c=i.u,p=i.i,d=i.m,f=i.F,h=i.j,g=Hl(i.g,"playing"),y=Hl(i.g,"paused"),v=Hl(i.g,"buffering"),m=i.s,b=i.D,_=i.G,E=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],r=u(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}(i.g),k=[],T=(i=u(i.h.g)).next();!T.done;T=i.next())T=T.value,k.push({timestamp:T.timestamp,id:T.id,type:T.type,fromAdaptation:T.fromAdaptation,bandwidth:T.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:r,droppedFrames:a,corruptedFrames:o,stallsDetected:s,gapsJumped:l,estimatedBandwidth:c,completionPercent:p,loadLatency:d,manifestTimeSeconds:f,drmTimeSeconds:h,playTime:g,pauseTime:y,bufferingTime:v,licenseTime:m,liveLatency:b,maxSegmentDuration:_,stateHistory:E,switchHistory:k}},r.hf=function(e,t,n,r,i,a,o){o=void 0!==o&&o;var s,l,u,c,p,d,f,h,g,y,v=this;return R((function(m){switch(m.g){case 1:if(v.l!=Gu&&v.l!=zu)throw new De(1,7,7004);if(r){m.A(2);break}return _(m,au(v,e),3);case 3:r=m.h;case 2:if(s=[],v.F)try{s=v.F.getServerSideCuePoints()}catch(e){}if(v.l!=zu){m.A(4);break}return o&&(n="forced"),_(m,ou(v,e,t,n,r,a||"",s),5);case 5:if(l=v.Fb(),u=l.find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return ku(v),m.return(u);throw new De(1,2,2012);case 4:if(c=tt,1/0==(p=v.i.presentationTimeline.getDuration()))throw new De(1,4,4033);if(!s.length){m.A(6);break}return _(m,su(v,e,v.D,v.h.streaming.retryParameters),7);case 7:d=m.h,f=lu(v,d,r,s),h=new Blob([f],{type:"text/vtt"}),e=Zo(h),r="text/vtt";case 6:if(g={id:v.Yd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ts(0,p,[e]),mimeType:r||"",codecs:i||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:c.X,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},y=Kt(g.mimeType,g.codecs),!Xt(y))throw new De(2,2,2014,r);return v.i.textStreams.push(g),ku(v),m.return(Sn(g))}}))},r.jf=function(e,t){var n,r,i,a,o,s,l,c,p,d,f,h,g,y,v,m,b=this;return R((function(E){switch(E.g){case 1:if(b.l!=Gu&&b.l!=zu)throw new De(1,7,7004);if(b.l==zu)throw new De(1,2,2016);if(t){E.A(2);break}return _(E,au(b,e),3);case 3:t=E.h;case 2:if("text/vtt"!=t)throw new De(1,2,2017,e);if(n=tt,1/0==(r=b.i.presentationTimeline.getDuration()))throw new De(1,4,4045);return _(E,su(b,e,b.D,b.h.streaming.retryParameters),4);case 4:if(i=E.h,!(a=Jt[t]))throw new De(2,2,2014,t);for(o=a(),s={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},l=xe(i),c=o.parseMedia(l,s),p=[],d={},f=u(c),h=f.next();!h.done;d={Rb:d.Rb},h=f.next())g=h.value,d.Rb=$e([e],[g.payload])[0],y=new go(g.startTime,g.endTime,function(e){return function(){return[e.Rb]}}(d),0,null,null,0,0,1/0),d.Rb.includes("#xywh")&&(4===(v=d.Rb.split("#xywh=")[1].split(",")).length&&y.Ye({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),p.push(y);return m={id:b.Yd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Es(p),mimeType:t||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:n.Wb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1"},b.i.imageStreams.push(m),ku(b),E.return(Cn(m))}}))},r.gf=function(e,t,n){var r,i,a,o,s=this;return R((function(l){switch(l.g){case 1:if(s.l!=Gu&&s.l!=zu)throw new De(1,7,7004);if(n){l.A(2);break}return _(l,au(s,e),3);case 3:n=l.h;case 2:if(r=[],s.F)try{r=s.F.getServerSideCuePoints()}catch(e){}return _(l,ou(s,e,t,"chapters",n,"",r),4);case 4:if(i=l.h,a=s.He(),!(o=a.find((function(e){return e.language==t})))){l.A(5);break}return _(l,new Promise((function(e,t){s.s.ma(i,"load",e),s.s.ma(i,"error",(function(){t(new De(1,2,2015))}))})),6);case 6:return l.return(o);case 5:throw new De(1,2,2012)}}))},r.ke=function(e,t){this.ec.width=e,this.ec.height=t},r.ce=function(e){if(this.l==Gu){var t=this.j;if(e=void 0===e?.1:e,t.h.g)t=!1;else if(t.s)t=!1;else{for(var n=u(t.j.values()),r=n.next();!r.done;r=n.next())!(r=r.value).nc||r.ra||r.Ka||(r.nc=!1,$s(t,r,e));t=!0}}else t=!1;return t},r.If=function(){return W("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.i},r.Jf=function(){return this.Yc},r.$e=function(e){this.Uc=e},B("shaka.Player",Wl),Wl.prototype.setVideoContainer=Wl.prototype.$e,Wl.prototype.getManifestParserFactory=Wl.prototype.Jf,Wl.prototype.getManifest=Wl.prototype.If,Wl.prototype.retryStreaming=Wl.prototype.ce,Wl.prototype.setMaxHardwareResolution=Wl.prototype.ke,Wl.prototype.addChaptersTrack=Wl.prototype.gf,Wl.prototype.addThumbnailsTrack=Wl.prototype.jf,Wl.prototype.addTextTrackAsync=Wl.prototype.hf,Wl.prototype.getStats=Wl.prototype.getStats,Wl.prototype.getBufferedInfo=Wl.prototype.Na,Wl.prototype.getPresentationStartTimeAsDate=Wl.prototype.Ie,Wl.prototype.getPlayheadTimeAsDate=Wl.prototype.Of,Wl.prototype.setTextTrackVisibility=Wl.prototype.yg,Wl.prototype.getChapters=Wl.prototype.Cf,Wl.prototype.getChaptersTracks=Wl.prototype.He,Wl.prototype.isTextTrackVisible=Wl.prototype.Hd,Wl.prototype.selectVariantsByLabel=Wl.prototype.tg,Wl.prototype.selectTextLanguage=Wl.prototype.he,Wl.prototype.selectAudioLanguage=Wl.prototype.ge,Wl.prototype.getTextLanguages=Wl.prototype.Qf,Wl.prototype.getAudioLanguages=Wl.prototype.zf,Wl.prototype.getTextLanguagesAndRoles=Wl.prototype.Rf,Wl.prototype.getAudioLanguagesAndRoles=Wl.prototype.Af,Wl.prototype.selectVariantTrack=Wl.prototype.Te,Wl.prototype.selectTextTrack=Wl.prototype.Se,Wl.prototype.getThumbnails=Wl.prototype.Tf,Wl.prototype.getImageTracks=Wl.prototype.Ff,Wl.prototype.getTextTracks=Wl.prototype.Fb,Wl.prototype.getVariantTracks=Wl.prototype.Xa,Wl.prototype.cancelTrickPlay=Wl.prototype.pf,Wl.prototype.trickPlay=Wl.prototype.Ag,Wl.prototype.getPlaybackRate=Wl.prototype.Rc,Wl.prototype.isBuffering=Wl.prototype.Fd,Wl.prototype.getKeyStatuses=Wl.prototype.Qc,Wl.prototype.getExpiration=Wl.prototype.ic,Wl.prototype.drmInfo=Wl.prototype.drmInfo,Wl.prototype.keySystem=Wl.prototype.keySystem,Wl.prototype.goToLive=Wl.prototype.Xf,Wl.prototype.seekRange=Wl.prototype.uc,Wl.prototype.isAudioOnly=Wl.prototype.Zf,Wl.prototype.isInProgress=Wl.prototype.jb,Wl.prototype.isLive=Wl.prototype.U,Wl.prototype.getAdManager=Wl.prototype.Ge,Wl.prototype.getAssetUri=Wl.prototype.Dd,Wl.prototype.getNetworkingEngine=Wl.prototype.jc,Wl.prototype.getMediaElement=Wl.prototype.Lf,Wl.prototype.getLoadMode=Wl.prototype.Hf,Wl.prototype.resetConfiguration=Wl.prototype.rg,Wl.prototype.getBufferFullness=Wl.prototype.Bf,Wl.prototype.getConfiguration=Wl.prototype.getConfiguration,Wl.prototype.configure=Wl.prototype.configure,Wl.prototype.load=Wl.prototype.load,Wl.prototype.updateStartTime=Wl.prototype.Fg,Wl.prototype.unload=Wl.prototype.re,Wl.prototype.detach=Wl.prototype.detach,Wl.prototype.attachCanvas=Wl.prototype.lf,Wl.prototype.attach=Wl.prototype.Yb,Wl.probeSupport=function(e){var t,n,r,i,a;return e=void 0===e||e,R((function(o){if(1==o.g)return t={},e?_(o,function(){var e,t,n,r,i,a;return R((function(o){return 1==o.g?(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),n=[{videoCapabilities:t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],persistentState:"required",sessionTypes:["persistent-license"]},{initDataTypes:["cenc"],videoCapabilities:t}],r=new Map,i=function(e){var t,i,a;return R((function(o){switch(o.g){case 1:if(k(o,2),"org.w3.clearkey"===e&>())throw Error("Unsupported keySystem");return _(o,navigator.requestMediaKeySystemAccess(e,n),4);case 4:return t=o.h,a=!!(i=t.getConfiguration().sessionTypes)&&i.includes("persistent-license"),yt("Tizen 3")&&(a=!1),r.set(e,{persistentState:a}),_(o,t.createMediaKeys(),5);case 5:A(o,0);break;case 2:w(o),r.set(e,null),E(o)}}))},a=e.map((function(e){return i(e)})),_(o,Promise.all(a),2)):o.return(Br(r))}))}(),3):o.A(2);2!=o.g&&(t=o.h);var s={};if(st()){for(var l in $i)s[l]=!0;for(var p in Qi)s[p]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var d=(p=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!d.done;d=p.next())s[d=d.value]=st()?!!$i[d]:lt(d);for(var f in l)s[f]=st()?!!Qi[f]:lt(l[f]);for(n=s,s={},l=(f=u(f='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(c(es)))).next();!l.done;l=f.next())s[l=l.value]=st()?!!Xt(l)||(Z(l)||Ft(l)):lt(l),s[p=l.split(";")[0]]=s[p]||s[l];for(a in r={manifest:n,media:s,drm:t},i=qu)r[a]=i[a]();return o.return(r)}))},Wl.isBrowserSupported=function(){if(e.Promise||W("A Promise implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&Array.prototype.forEach)||yt("Trident/"))return!1;var t=gt();return!(t&&13>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!st()||lt("application/x-mpegurl"))},Wl.setAdManagerFactory=function(e){Xu=e},Wl.registerSupportPlugin=function(e,t){qu[e]=t},Wl.prototype.destroy=Wl.prototype.destroy;var Hu=0,Ku=1,Gu=2,zu=3;Wl.LoadMode={DESTROYED:Hu,NOT_LOADED:Ku,MEDIA_SOURCE:Gu,SRC_EQUALS:zu},Wl.version="v4.3.5";var Wu=["4","3"];Zn=new function(e){this.g=e,this.i=$n,this.h=Qn}(new qn(Number(Wu[0]),Number(Wu[1])));var Yu=["output-restricted","internal-error"],qu={},Xu=null,$u={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Qu={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Zu(){this.h=[],this.j=this.i=this.g=0}function Ju(e,t,n){var r=this;this.h=e,this.g=t,this.m=n,this.i=!1,this.l=this.g.getVolume(),this.j=new Mr,this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,(function(){r.i=!0})),this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,(function(){r.i=!1}))}function ec(t,n,r,i){var a=this;this.o=t,this.i=n,this.s=null,this.u=NaN,this.l=i,this.j=null,this.h=new Mr,google.ima.settings.setLocale(r),(t=new google.ima.AdDisplayContainer(this.o,this.i)).initialize(),this.m=new google.ima.AdsLoader(t),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.3.5"),this.g=null,this.h.ma(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){!function(t,n){t.l(new vr("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.u))),t.g=n.getAdsManager(t.i),t.l(new vr("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.g)));var r=t.g.getCuePoints();if(r.length){n=[];for(var i=(r=u(r)).next();!i.done;i=r.next())n.push({start:i.value,end:null});t.l(new vr("ad-cue-points-changed",(new Map).set("cuepoints",n)))}!function(e){function t(t,n){t=(new Map).set("originalEvent",t),e.l(new vr(n,t))}e.h.C(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){tc(e,t)})),e.h.C(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,(function(t){rc(e,t)})),e.h.C(e.g,google.ima.AdEvent.Type.STARTED,(function(t){rc(e,t)})),e.h.C(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,(function(e){t(e,"ad-first-quartile")})),e.h.C(e.g,google.ima.AdEvent.Type.MIDPOINT,(function(e){t(e,"ad-midpoint")})),e.h.C(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,(function(e){t(e,"ad-third-quartile")})),e.h.C(e.g,google.ima.AdEvent.Type.COMPLETE,(function(e){t(e,"ad-complete")})),e.h.C(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,(function(t){ic(e,t)})),e.h.C(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){ic(e,t)})),e.h.C(e.g,google.ima.AdEvent.Type.SKIPPED,(function(e){t(e,"ad-skipped")})),e.h.C(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,(function(e){t(e,"ad-volume-changed")})),e.h.C(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,(function(e){t(e,"ad-muted")})),e.h.C(e.g,google.ima.AdEvent.Type.PAUSED,(function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))})),e.h.C(e.g,google.ima.AdEvent.Type.RESUMED,(function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))})),e.h.C(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,(function(n){e.j&&t(n,"ad-skip-state-changed")})),e.h.C(e.g,google.ima.AdEvent.Type.CLICK,(function(e){t(e,"ad-clicked")})),e.h.C(e.g,google.ima.AdEvent.Type.AD_PROGRESS,(function(e){t(e,"ad-progress")})),e.h.C(e.g,google.ima.AdEvent.Type.AD_BUFFERING,(function(e){t(e,"ad-buffering")})),e.h.C(e.g,google.ima.AdEvent.Type.IMPRESSION,(function(e){t(e,"ad-impression")})),e.h.C(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,(function(e){t(e,"ad-duration-changed")})),e.h.C(e.g,google.ima.AdEvent.Type.USER_CLOSE,(function(e){t(e,"ad-closed")})),e.h.C(e.g,google.ima.AdEvent.Type.LOADED,(function(e){t(e,"ad-loaded")})),e.h.C(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(e){t(e,"all-ads-completed")})),e.h.C(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,(function(e){t(e,"ad-linear-changed")})),e.h.C(e.g,google.ima.AdEvent.Type.AD_METADATA,(function(e){t(e,"ad-metadata")})),e.h.C(e.g,google.ima.AdEvent.Type.LOG,(function(e){t(e,"ad-recoverable-error")})),e.h.C(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,(function(e){t(e,"ad-break-ready")})),e.h.C(e.g,google.ima.AdEvent.Type.INTERACTION,(function(e){t(e,"ad-interaction")}))}(t);try{t.g.init(t.i.offsetWidth,t.i.offsetHeight,nc(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),t.h.C(t.i,"loadeddata",(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,nc(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),"ResizeObserver"in e?(t.s=new ResizeObserver((function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,nc(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),t.s.observe(t.i)):t.h.C(document,"fullscreenchange",(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,nc(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),t.i.addEventListener("play",(function(){t.g.start()}),{once:!0})}catch(e){ic(t,null)}}(a,t)})),this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){tc(a,e)})),this.h.C(this.i,"ended",(function(){a.m.contentComplete()}))}function tc(e,t){t.getError(),ic(e,null),e.l(new vr("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function nc(e){return document.fullscreenEnabled?!!document.fullscreenElement:!!(e=e.i).webkitSupportsFullscreen&&e.webkitDisplayingFullscreen}function rc(e,t){var n=t.getAd();n?(e.j=new Ju(n,e.g,e.i),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new vr("ad-started",t)),e.j.isLinear()&&(e.o.setAttribute("ad-active","true"),e.i.pause(),e.j.setVolume(e.i.muted?0:e.i.volume))):W("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function ic(e,t){e.l(new vr("ad-stopped",(new Map).set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.o.removeAttribute("ad-active"),e.i.ended||e.i.play())}function ac(e,t){this.i=e,this.h=null,this.g=t}function oc(e,t,n,r){var i=this;this.s=e,this.l=t,this.j=null,this.G=NaN,this.i=r,this.F=!1,this.u=this.m=this.o=null,this.B="",this.D=[],this.h=new Mr,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.s,e),this.i(new vr("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,(function(e){!function(e,t){e.i(new vr("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-e.G))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.F||e.h.C(e.l,"seeked",(function(){var t=e.l.currentTime;if(0!=t){e.g.streamTimeForContentTime(t);var n=e.g.previousCuePointForStreamTime(t);n&&!n.played&&(e.o=t,e.l.currentTime=n.start)}}))}(i,e)})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,(function(){i.B.length?i.j.resolve(i.B):i.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),i.j=null})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,(function(){})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,(function(e){e=e.getAd(),i.m=new ac(e,i.l),i.u&&(i.m.h=i.u),i.i(new vr("ad-started",(new Map).set("ad",i.m))),i.s.setAttribute("ad-active","true")})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,(function(){i.s.removeAttribute("ad-active");var e=i.l.currentTime;i.o&&i.o>e&&(i.l.currentTime=i.o,i.o=null)})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,(function(e){i.u=e.getStreamData().adProgressData,i.m&&(i.m.h=i.u)})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,(function(){i.i(new vr("ad-first-quartile"))})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,(function(){i.i(new vr("ad-midpoint"))})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,(function(){i.i(new vr("ad-third-quartile"))})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,(function(){i.i(new vr("ad-complete")),i.i(new vr("ad-stopped")),i.s.removeAttribute("ad-active"),i.m=null})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,(function(){i.i(new vr("ad-skipped")),i.i(new vr("ad-stopped"))})),this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,(function(e){var t=e.getStreamData();e=[];for(var n=(t=u(t.cuepoints)).next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});i.D=e,i.i(new vr("ad-cue-points-changed",(new Map).set("cuepoints",e)))}))}function sc(){_r.call(this),this.g=this.i=null,this.h=new Zu,this.j=navigator.language}function lc(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof vr){var n={};for(r in t)(e=t[r])&&"object"==typeof e?"detail"==r&&(n[r]=e):r in Event||(n[r]=e);return n}if(t instanceof Error){var r=new Set(["name","message","stack"]);for(n in t)r.add(n);for(n=(e=u(Object.getOwnPropertyNames(t))).next();!n.done;n=e.next())r.add(n.value);for(e={},n=(r=u(r)).next();!n.done;n=r.next())e[n=n.value]=t[n];t={__type__:"Error",contents:e}}else if(t instanceof TimeRanges){for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=(t=u(ko(t))).next();!n.done;n=t.next())e=(n=n.value).end,r.start.push(n.start),r.end.push(e);t=r}else t=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return t}}))}function uc(e){return JSON.parse(e,(function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)n=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)n=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){for(n in e=t.contents,t=Error(e.message),e)t[n]=e[n];n=t}else n=t;return n}))}(r=Ju.prototype).getDuration=function(){return this.h.getDuration()},r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()},r.getRemainingTime=function(){return this.g.getRemainingTime()},r.isPaused=function(){return this.i},r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()},r.getTimeUntilSkippable=function(){var e=this.h.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},r.canSkipNow=function(){return this.g.getAdSkippableState()},r.skip=function(){return this.g.skip()},r.pause=function(){return this.g.pause()},r.play=function(){return this.g.resume()},r.getVolume=function(){return this.g.getVolume()},r.setVolume=function(e){return this.g.setVolume(e)},r.isMuted=function(){return 0==this.g.getVolume()},r.isLinear=function(){return this.h.isLinear()},r.resize=function(e,t){var n=!1,r=this.m;document.fullscreenEnabled?n=!!document.fullscreenElement:r.webkitSupportsFullscreen&&(n=r.webkitDisplayingFullscreen),this.g.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},r.setMuted=function(e){e?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)},r.getSequenceLength=function(){var e=this.h.getAdPodInfo();return null==e?1:e.getTotalAds()},r.getPositionInSequence=function(){var e=this.h.getAdPodInfo();return null==e?1:e.getAdPosition()},r.getTitle=function(){return this.h.getTitle()},r.getDescription=function(){return this.h.getDescription()},r.release=function(){this.g=this.h=null},B("shaka.ads.ClientSideAd",Ju),Ju.prototype.release=Ju.prototype.release,Ju.prototype.getDescription=Ju.prototype.getDescription,Ju.prototype.getTitle=Ju.prototype.getTitle,Ju.prototype.getPositionInSequence=Ju.prototype.getPositionInSequence,Ju.prototype.getSequenceLength=Ju.prototype.getSequenceLength,Ju.prototype.setMuted=Ju.prototype.setMuted,Ju.prototype.resize=Ju.prototype.resize,Ju.prototype.isLinear=Ju.prototype.isLinear,Ju.prototype.isMuted=Ju.prototype.isMuted,Ju.prototype.setVolume=Ju.prototype.setVolume,Ju.prototype.getVolume=Ju.prototype.getVolume,Ju.prototype.play=Ju.prototype.play,Ju.prototype.pause=Ju.prototype.pause,Ju.prototype.skip=Ju.prototype.skip,Ju.prototype.canSkipNow=Ju.prototype.canSkipNow,Ju.prototype.getTimeUntilSkippable=Ju.prototype.getTimeUntilSkippable,Ju.prototype.isSkippable=Ju.prototype.isSkippable,Ju.prototype.isPaused=Ju.prototype.isPaused,Ju.prototype.getRemainingTime=Ju.prototype.getRemainingTime,Ju.prototype.getMinSuggestedDuration=Ju.prototype.getMinSuggestedDuration,Ju.prototype.getDuration=Ju.prototype.getDuration,ec.prototype.stop=function(){this.g&&this.g.stop(),this.o&&ul(this.o)},ec.prototype.release=function(){this.stop(),this.s&&this.s.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy()},(r=ac.prototype).getDuration=function(){return this.h?this.h.duration:-1},r.getMinSuggestedDuration=function(){return this.getDuration()},r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1},r.isPaused=function(){return this.g.paused},r.isSkippable=function(){return this.i.isSkippable()},r.getTimeUntilSkippable=function(){var e=this.i.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},r.skip=function(){this.g.currentTime+=this.getRemainingTime()},r.pause=function(){return this.g.pause()},r.play=function(){return this.g.play()},r.getVolume=function(){return this.g.volume},r.setVolume=function(e){this.g.volume=e},r.isMuted=function(){return this.g.muted},r.isLinear=function(){return!0},r.resize=function(){},r.setMuted=function(e){this.g.muted=e},r.getSequenceLength=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getTotalAds()},r.getPositionInSequence=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getAdPosition()},r.getTitle=function(){return this.i.getTitle()},r.getDescription=function(){return this.i.getDescription()},r.release=function(){this.g=this.h=this.i=null},B("shaka.ads.ServerSideAd",ac),ac.prototype.release=ac.prototype.release,ac.prototype.getDescription=ac.prototype.getDescription,ac.prototype.getTitle=ac.prototype.getTitle,ac.prototype.getPositionInSequence=ac.prototype.getPositionInSequence,ac.prototype.getSequenceLength=ac.prototype.getSequenceLength,ac.prototype.setMuted=ac.prototype.setMuted,ac.prototype.resize=ac.prototype.resize,ac.prototype.isLinear=ac.prototype.isLinear,ac.prototype.isMuted=ac.prototype.isMuted,ac.prototype.setVolume=ac.prototype.setVolume,ac.prototype.getVolume=ac.prototype.getVolume,ac.prototype.play=ac.prototype.play,ac.prototype.pause=ac.prototype.pause,ac.prototype.skip=ac.prototype.skip,ac.prototype.canSkipNow=ac.prototype.canSkipNow,ac.prototype.getTimeUntilSkippable=ac.prototype.getTimeUntilSkippable,ac.prototype.isSkippable=ac.prototype.isSkippable,ac.prototype.isPaused=ac.prototype.isPaused,ac.prototype.getRemainingTime=ac.prototype.getRemainingTime,ac.prototype.getMinSuggestedDuration=ac.prototype.getMinSuggestedDuration,ac.prototype.getDuration=ac.prototype.getDuration,oc.prototype.stop=function(){this.B="",this.o=null,this.D=[]},oc.prototype.release=function(){this.stop(),this.h&&this.h.release()},oc.prototype.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},y(sc,_r),(r=sc.prototype).setLocale=function(e){this.j=e},r.initClientSide=function(t,n){var r=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new De(2,10,1e4);this.i&&this.i.release(),this.i=new ec(t,n,this.j,(function(e){if(e&&e.type)switch(e.type){case"ads-loaded":r.h.h.push(e.loadTime);break;case"ad-started":r.h.g++;break;case"ad-complete":r.h.i++;break;case"ad-skipped":r.h.j++}r.dispatchEvent(e)}))},r.release=function(){this.i&&(this.i.release(),this.i=null),this.g&&(this.g.release(),this.g=null),_r.prototype.release.call(this)},r.onAssetUnload=function(){this.i&&this.i.stop(),this.g&&this.g.stop(),this.dispatchEvent(new vr("ad-stopped")),this.h=new Zu},r.requestClientSideAds=function(e){if(!this.i)throw new De(1,10,10001);var t=this.i;t.u=Date.now()/1e3,t.m.requestAds(e)},r.initServerSide=function(t,n){var r=this;if(!e.google||!google.ima||!google.ima.dai)throw new De(2,10,10002);this.g&&this.g.release(),this.g=new oc(t,n,this.j,(function(e){if(e&&e.type)switch(e.type){case"ads-loaded":r.h.h.push(e.loadTime);break;case"ad-started":r.h.g++;break;case"ad-complete":r.h.i++;break;case"ad-skipped":r.h.j++}r.dispatchEvent(e)}))},r.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new De(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&W('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.3.5",(n=this.g).j?e=Promise.reject(new De(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.F=!0),n.j=new rt,n.g.requestStream(e),n.B=t||"",n.G=Date.now()/1e3,e=n.j),e},r.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new De(1,10,10003);(e.mpt||e.mpv)&&W('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.mpt="Shaka Player",e.mpv="v4.3.5",this.g.g.replaceAdTagParameters(e)},r.getServerSideCuePoints=function(){if(!this.g)throw new De(1,10,10003);return this.g.D},r.getStats=function(){var e=this.h;return{loadTimes:e.h,started:e.g,playedCompletely:e.i,skipped:e.j}},r.onDashTimedMetadata=function(e){if(this.g&&"urn:google:dai:2018"==e.schemeIdUri){var t=e.schemeIdUri,n=e.eventElement?e.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(t,n,e.startTime)}},r.onHlsTimedMetadata=function(e,t){this.g&&this.g.g.processMetadata("ID3",e.data,t)},r.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},B("shaka.ads.AdManager",sc),sc.prototype.onCueMetadataChange=sc.prototype.onCueMetadataChange,sc.prototype.onHlsTimedMetadata=sc.prototype.onHlsTimedMetadata,sc.prototype.onDashTimedMetadata=sc.prototype.onDashTimedMetadata,sc.prototype.getStats=sc.prototype.getStats,sc.prototype.getServerSideCuePoints=sc.prototype.getServerSideCuePoints,sc.prototype.replaceServerSideAdTagParameters=sc.prototype.replaceServerSideAdTagParameters,sc.prototype.requestServerSideStream=sc.prototype.requestServerSideStream,sc.prototype.initServerSide=sc.prototype.initServerSide,sc.prototype.requestClientSideAds=sc.prototype.requestClientSideAds,sc.prototype.onAssetUnload=sc.prototype.onAssetUnload,sc.prototype.release=sc.prototype.release,sc.prototype.initClientSide=sc.prototype.initClientSide,sc.prototype.setLocale=sc.prototype.setLocale,sc.ADS_LOADED="ads-loaded",sc.AD_STARTED="ad-started",sc.AD_FIRST_QUARTILE="ad-first-quartile",sc.AD_MIDPOINT="ad-midpoint",sc.AD_THIRD_QUARTILE="ad-third-quartile",sc.AD_COMPLETE="ad-complete",sc.AD_STOPPED="ad-stopped",sc.AD_SKIPPED="ad-skipped",sc.AD_VOLUME_CHANGED="ad-volume-changed",sc.AD_MUTED="ad-muted",sc.AD_PAUSED="ad-paused",sc.AD_RESUMED="ad-resumed",sc.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",sc.CUEPOINTS_CHANGED="ad-cue-points-changed",sc.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",sc.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",sc.AD_CLICKED="ad-clicked",sc.AD_PROGRESS="ad-progress",sc.AD_BUFFERING="ad-buffering",sc.AD_IMPRESSION="ad-impression",sc.AD_DURATION_CHANGED="ad-duration-changed",sc.AD_CLOSED="ad-closed",sc.AD_LOADED="ad-loaded",sc.ALL_ADS_COMPLETED="all-ads-completed",sc.AD_LINEAR_CHANGED="ad-linear-changed",sc.AD_METADATA="ad-metadata",sc.AD_RECOVERABLE_ERROR="ad-recoverable-error",sc.AD_BREAK_READY="ad-break-ready",sc.AD_INTERACTION="ad-interaction",Xu=function(){return new sc};var cc="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),pc="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),dc=["loop","playbackRate"],fc=["pause","play"],hc={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},gc={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},yc={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},vc=[["getConfiguration","configure"]],mc=[["isTextTrackVisible","setTextTrackVisibility"]],bc="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),_c=["attach","attachCanvas","detach","load","unload"];function Ec(e,t,n,r,i,a,o){var s=this;this.G=e,this.M=o,this.j=new ot(t),this.O=n,this.u=!1,this.s=r,this.F=i,this.J=a,this.h=this.m=!1,this.L="",this.o=null,this.B=function(){return Sc(s)},this.D=function(e,t){switch((e=uc(t)).type){case"event":var n=e.targetName,r=mr(e.event);s.s(n,r);break;case"update":for(r in n=e.update)for(var i in e=s.g[r]||{},n[r])e[i]=n[r][i];s.u&&(s.O(),s.u=!1);break;case"asyncComplete":if(r=e.id,i=e.error,e=s.i[r],delete s.i[r],e)if(i){for(n in r=new De(i.severity,i.category,i.code),i)r[n]=i[n];e.reject(r)}else e.resolve()}},this.g={video:{},player:{}},this.H=0,this.i={},this.l=null,Oc.add(this)}function kc(e,t,n){Dc=n,n.addUpdateListener(e.B),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.D),Sc(e),xc(e,{type:"init",initState:t,appData:e.o}),e.l.resolve()}function Tc(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.l.reject(new De(2,8,n,t))}function Ac(e,t){var n=e.J();e.l=new rt,e.u=!0,kc(e,n,t)}function wc(e){var t=Dc;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.D)}function Sc(e){var t=!!Dc&&"connected"==Dc.status;if(e.h&&!t){for(var n in e.F(),e.g)e.g[n]={};Cc(e)}e.h=t,e.L=t?Dc.receiver.friendlyName:"",e.j.Mb()}function Cc(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new De(1,7,7e3))}}function xc(e,t){t=lc(t);var n=Dc;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,(function(){}),q)}catch(r){throw t=new De(2,8,8005,r),n=new vr("error",(new Map).set("detail",t)),e.s("player",n),e.Ab(),t}}(r=Ec.prototype).destroy=function(){return Oc.delete(this),Cc(this),Dc&&wc(this),this.j&&(this.j.stop(),this.j=null),this.F=this.s=null,this.h=this.m=!1,this.D=this.B=this.l=this.i=this.g=this.o=null,Promise.resolve()},r.sa=function(){return this.h},r.ae=function(){return this.L},r.init=function(){if(this.G.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.Mb();var t=new chrome.cast.SessionRequest(this.G,[],null,this.M,null);t=new chrome.cast.ApiConfig(t,(function(e){for(var t=u(Oc),n=t.next();!n.done;n=t.next())Ac(n.value,e)}),(function(e){for(var t=u(Oc),n=t.next();!n.done;n=t.next())n=n.value,Pc="available"==e,n.j.Mb()}),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),Pc&&this.j.N(Ic),(t=Dc)&&t.status!=chrome.cast.SessionStatus.STOPPED?Ac(this,t):Dc=null}else e.__onGCastApiAvailable!==Lc&&(Rc=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=Lc)},r.ie=function(e){this.o=e,this.h&&xc(this,{type:"appData",appData:this.o})},r.cast=function(e){var t=this;return R((function(n){if(!t.m)throw new De(1,8,8e3);if(!Pc)throw new De(1,8,8001);if(t.h)throw new De(1,8,8002);return t.l=new rt,chrome.cast.requestSession((function(n){return kc(t,e,n)}),(function(e){return Tc(t,e)})),_(n,t.l,0)}))},r.Ab=function(){if(this.h){if(Cc(this),Dc){wc(this);try{Dc.stop((function(){}),(function(){}))}catch(e){}Dc=null}Sc(this)}},r.get=function(e,t){var n=this;if("video"==e){if(fc.includes(t))return function(){return n.Qe.apply(n,[e,t].concat(c(O.apply(0,arguments))))}}else if("player"==e){if(yc[t]&&!this.get("player","isLive")())return function(){};if(bc.includes(t))return function(){return n.Qe.apply(n,[e,t].concat(c(O.apply(0,arguments))))};if(_c.includes(t))return function(){return n.og.apply(n,[e,t].concat(c(O.apply(0,arguments))))};if(hc[t]||gc[t])return function(){return n.g[e][t]}}return this.g[e][t]},r.set=function(e,t,n){this.g[e][t]=n,xc(this,{type:"set",targetName:e,property:t,value:n})},r.Qe=function(e,t){xc(this,{type:"call",targetName:e,methodName:t,args:O.apply(2,arguments)})},r.og=function(e,t){var n=O.apply(2,arguments),r=new rt,i=this.H.toString();this.H++,this.i[i]=r;try{xc(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:i})}catch(e){r.reject(e)}return r};var Ic=.02,Pc=!1,Dc=null,Rc=null,Oc=new Set;function Lc(t){if(Rc?e.__onGCastApiAvailable=Rc:delete e.__onGCastApiAvailable,Rc=null,t)for(var n=u(Oc),r=n.next();!r.done;r=n.next())r.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function Mc(e,t,n,r){r=void 0!==r&&r,_r.call(this);var i=this;this.i=e,this.h=t,this.m=this.o=this.j=this.s=this.l=null,this.D=n,this.B=r,this.u=new Map,this.g=new Ec(n,(function(){return Fc(i)}),(function(){return jc(i)}),(function(e,t){return Hc(i,e,t)}),(function(){return Bc(i)}),(function(){return Uc(i)}),r),function(e){e.g.init(),e.m=new Mr;for(var t=u(cc),n=t.next();!n.done;n=t.next())e.m.C(e.i,n.value,(function(t){e.g.sa()||(t=mr(t),e.j.dispatchEvent(t))}));for(var r in br)e.m.C(e.h,br[r],(function(t){e.g.sa()||e.o.dispatchEvent(t)}));for(var i in e.l={},t={},e.i)t.Sb=i,Object.defineProperty(e.l,t.Sb,{configurable:!1,enumerable:!0,get:function(t){return function(){return Vc(e,t.Sb)}}(t),set:function(t){return function(n){var r=t.Sb;e.g.sa()?e.g.set("video",r,n):e.i[r]=n}}(t)}),t={Sb:t.Sb};e.s={},Nc(e,(function(t){Object.defineProperty(e.s,t,{configurable:!1,enumerable:!0,get:function(){return function(e,t){if(e.u.has(t)&&(t=e.u.get(t)),"addEventListener"==t)return function(t,n,r){return e.o.addEventListener(t,n,r)};if("removeEventListener"==t)return function(t,n,r){return e.o.removeEventListener(t,n,r)};if("getMediaElement"==t)return function(){return e.l};if("getSharedConfiguration"==t)return e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return function(){return e.h.jc()};if("getDrmEngine"==t)return function(){return e.h.m};if("getAdManager"==t)return function(){return e.h.Ge()};if("setVideoContainer"==t)return function(t){return e.h.$e(t)};if(e.g.sa()){if("getManifest"==t||"drmInfo"==t)return function(){return W(t+"() does not work while casting!"),null};if("attach"==t||"detach"==t)return function(){return W(t+"() does not work while casting!"),Promise.resolve()}}return e.g.sa()&&0==Object.keys(e.g.g.video).length&&(hc[t]||gc[t])||!e.g.sa()?e.h[t].bind(e.h):e.g.get("player",t)}(e,t)}})})),function(e){var t=new Map;Nc(e,(function(n,r){t.has(r)?(r=t.get(r),n.lengthn.byteLength){n=[];break e}var a=xe(n,e,i);t.push({type:r,value:a}),e+=i}n=t}return n}(e=Pt(e.textContent)).filter((function(e){return e.type===lp}))[0])&&(e=_i(e=kt(e.value,!0),"WRMHEADER"))?function(e){for(var t=(e=u(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())for(var n=(t=u(t.value.childNodes)).next();!n.done;n=t.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent;return""}(e):""}function sp(e){var t=e.getAttribute("schemeIdUri"),n=si(e,"urn:mpeg:cenc:2013","default_KID"),r=oi(e,"urn:mpeg:cenc:2013","pssh").map(ui);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new De(2,4,4009);var i=[];try{i=r.map((function(e){return{initDataType:"cenc",initData:Pt(e),keyId:null}}))}catch(e){throw new De(2,4,4007)}return{node:e,fe:t,keyId:n,init:0(c=c||0))if(p){if(null==(p=pi(p,"t",vi)))break;if(d>=p)break;c=Math.ceil((p-d)/f)-1}else{if(1/0==e)break;if(d/t>=e)break;c=Math.ceil((e*t-d)/f)-1}for(0>>31;d&=2147483647;var h=o.reader.K();if(o.reader.skip(4),1==f)throw new De(2,3,3006);s.push(new go(u/l+n,(u+h)/l+n,(function(){return a}),e,e+d-1,t,n,r,i)),u+=h,e+=d}return o.parser.stop(),s}(t,r,i,a,o,n,e)}));if(e&&l.parse(e),s)return s;throw new De(2,3,3004)}function yp(e){this.h=Ie(e),this.g=new Hr(this.h,0)}function vp(e){var t=mp(e);if(7s()&&!n.length?null:n}))}return Promise.resolve(A)}(l,s,i,o,a)}};var c=null;r=r=null,e.$.id&&e.I.id&&(r=n[r=e.$.id+","+e.I.id])&&(c=r.segmentIndex);var p=function(e,t,n){var r=e.T.start,i=e.T.duration,a=r-t.Sa;i=i?r+i:1/0;for(var o=[],s={},l=0;l=n?o.push(new Set(t[s])):o.push(new Set);l=u(e),c=l.next();case 2:if(c.done){w.A(4);break}return _(w,function(e,t,n,r,i){return R((function(a){return 1==a.g?(zp(t,e),e.matchedStreams?e.segmentIndex?_(a,Fp(e,n),2):a.A(2):a.return(!1)):(Bp(e,n,r,i),a.return(!0))}))}(c.value,t,n,i,o),5);case 5:if(!w.h)throw new De(2,4,4037);c=l.next(),w.A(2);break;case 4:for(p=u(o),d=p.next();!d.done;d=p.next())for(f=d.value,h=u(f),g=h.next();!g.done;g=h.next())y=g.value,(v=jp(y,t,r,i,o))&&e.push(v);for(m=u(o),d=m.next();!d.done;d=m.next())for(b=d.value,E={},k=u(b),g=k.next();!g.done;E={Va:E.Va},g=k.next())if(E.Va=g.value,T=E.Va.type==a.X&&!E.Va.language,A=E.Va.type==a.Wb&&!E.Va.tilesLayout,!T&&!A&&e.some(function(e){return function(t){return t.mimeType==e.Va.mimeType&&zt(t.codecs)==zt(e.Va.codecs)}}(E)))throw new De(2,4,4037);return w.return(e)}}))}function Fp(e,t){var n,r,i,a,o,s,l;return R((function(c){if(1==c.g){for(n=[],r=e.matchedStreams,i=u(r),a=i.next();!a.done;a=i.next())o=a.value,n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex());return _(c,Promise.all(n),2)}if(e.segmentIndex instanceof ws)for(s=0;s=t&&e.segmentIndex.l.push(l.segmentIndex);E(c)}))}function jp(e,t,n,r,i){var a=n(e);return zp(t,a),a.createSegmentIndex&&(a.createSegmentIndex=function(){return R((function(e){return a.segmentIndex?e.A(0):(a.segmentIndex=new ws,_(e,Fp(a,0),0))}))}),a.matchedStreams?(Bp(a,0,r,i),a):null}function Bp(e,t,n,r){for(var i=e.matchedStreams,a=0;a=t){var o=i[a];n(e,o);var s=!0;"audio"==e.type&&0==on(e.language,o.language)&&(s=!1),s&&r[a].delete(o)}}function Vp(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var e=u(t.matchedStreams),n=e.next();!n.done;n=e.next())(n=n.value).segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null)},t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set,t.closedCaptions=null,t.trickModeVideo=null,t}function Hp(e){return(e=Object.assign({},e)).keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function Kp(e,t){var n,r;e.roles=Array.from(new Set(e.roles.concat(t.roles))),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=Array.from(new Set(e.emsgSchemeIdUris.concat(t.emsgSchemeIdUris)))),e.keyIds=(n=e.keyIds,r=t.keyIds,new Set([].concat(c(n),c(r)))),null==e.originalId?e.originalId=t.originalId:e.originalId+=","+(t.originalId||"");var i=Ui(e.drmInfos,t.drmInfos);if(t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new De(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map);for(var a=(i=u(t.closedCaptions)).next();!a.done;a=i.next()){var o=u(a.value);a=o.next().value,o=o.next().value,e.closedCaptions.set(a,o)}}t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=Vp(t.trickModeVideo),e.trickModeVideo.createSegmentIndex=function(){return e.trickModeVideo.segmentIndex=e.segmentIndex.clone(),Promise.resolve()}),Kp(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&Kp(e.trickModeVideo,t)}function Gp(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles)));var n=t.keyIds;if(n=new Set([].concat(c(e.keyIds),c(n))),e.keyIds=n,e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,c(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=u(t.closedCaptions)).next();!n.done;n=t.next()){var r=u(n.value);n=r.next().value,r=r.next().value,e.closedCaptions.set(n,r)}}function zp(e,t){for(var n=[],r=(e=u(e)).next();!r.done;r=e.next()){for(var i=t,a={audio:Wp,video:Wp,text:Yp,image:qp}[i.type],o={audio:Xp,video:$p,text:Qp,image:Zp}[i.type],s=null,l=(r=u(r.value)).next();!l.done;l=r.next())!a(i,l=l.value)||s&&!o(i,s,l)||(s=l);if(!(i=s))return;n.push(i)}t.matchedStreams=n}function Wp(e,t){var n;return!(n=t.mimeType!=e.mimeType||zt(t.codecs)!=zt(e.codecs))&&(n=e.drmInfos)&&(e=e.drmInfos,t=t.drmInfos,n=!(!e.length||!t.length||0r||!(ir.length||!(i.lengthr)return!0;if(ir.length)return!0;if(i.lengthe){if(n<=e||n-et-e)return ad}else{if(n>e)return ad;if(e-ne-t)return ad}return id}function nd(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))e.s)&&(e.s=c),o=ud(e,t,n,{start:c,duration:f,node:l,Gd:null==f||!u}),a.push(o),t.$.id&&f&&(e.L[t.$.id]=f),null==f){o=null;break}o=c+f}}return e.J=a.map((function(e){return e.id})),null!=i?{periods:a,duration:i,De:!1}:{periods:a,duration:o,De:!0}}(e,O,c,t),M=L.duration,N=L.periods,"static"!=T&&L.De||S.Aa(M||1/0),e.u&&!e.B&&e.h.isAutoLowLatencyMode()&&(e.h.enableLowLatencyMode(),e.B=e.h.isLowLatencyMode()),e.B?S.Ue(e.u):e.u&&W("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),S.Sd(b||1),_(j,Mp(e.j,N,O.Ma),2);case 2:if(e.i){e.i.variants=e.j.l,e.i.textStreams=e.j.j.slice(),e.i.imageStreams=e.j.i,e.h.filter(e.i),j.A(3);break}if(e.i={presentationTimeline:S,variants:e.j.l,textStreams:e.j.j.slice(),imageStreams:e.j.i,offlineSessionIds:[],minBufferTime:f||0,sequenceMode:e.g.dash.sequenceMode},!S.df()){j.A(4);break}return U=ai(t,"UTCTiming"),_(j,function(e,t,n){var r,i,a,o,s,l,c,p;return R((function(d){switch(d.g){case 1:r=n.map((function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}})),i=e.g.dash.clockSyncUri,!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),a=u(r),o=a.next();case 2:if(o.done){d.A(4);break}switch(s=o.value,k(d,5),l=s.scheme,c=s.value,l){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return d.A(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return d.A(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return p=Date.parse(c),d.return(isNaN(p)?0:p-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":W("NTP UTCTiming scheme is not supported");break;default:W("Unrecognized scheme in UTCTiming element",l)}d.A(9);break;case 7:return _(d,fd(e,t,c,"HEAD"),10);case 10:return d.return(d.h);case 8:return _(d,fd(e,t,c,"GET"),11);case 11:return d.return(d.h);case 9:A(d,3);break;case 5:w(d);case 3:o=a.next(),d.A(2);break;case 4:return W("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),d.return(0)}}))}(e,c,U),5);case 5:if(F=j.h,!e.h)return j.return();S.Ve(F);case 4:S.Md();case 3:e.h.makeTextStreamsForClosedCaptions(e.i),E(j)}}))}function ud(e,t,n,r){t.$=dd(r.node,null,n),t.T=r,t.$.zb=t.zb,t.$.id||(t.$.id="__shaka_period_"+r.start);var i=ai(r.node,"EventStream");n=t.presentationTimeline.Pa();for(var a=(i=u(i)).next();!a.done;a=i.next())hd(e,r.start,r.duration,a.value,n);if(n=ai(r.node,"AdaptationSet").map((function(n){return function(e,t,n){function r(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.fa=dd(n,t.$,null);var i,a=!1,o=ai(n,"Role"),s=o.map((function(e){return e.getAttribute("value")})).filter(Xe),l=void 0,p=t.fa.contentType==et;p&&(l="subtitle");for(var d=(o=u(o)).next();!d.done;d=o.next()){var f=(d=d.value).getAttribute("schemeIdUri");if(null==f||"urn:mpeg:dash:role:2011"==f)switch(d=d.getAttribute("value"),d){case"main":a=!0;break;case"caption":case"subtitle":l=d}}f=ai(n,"EssentialProperty"),o=null,d=!1;for(var h=(f=u(f)).next();!h.done;h=f.next()){var g=(h=h.value).getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==g?o=h.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==g?i=r(parseInt(h.getAttribute("value"),10)):d=!0}for(f=u(f=ai(n,"SupplementalProperty")),h=f.next();!h.done;h=f.next())"urn:mpeg:mpegB:cicp:TransferCharacteristics"==(h=h.value).getAttribute("schemeIdUri")&&(i=r(parseInt(h.getAttribute("value"),10)));f=ai(n,"Accessibility");var y=new Map;for(f=u(f),h=f.next();!h.done;h=f.next())if(g=h.value,h=g.getAttribute("schemeIdUri"),g=g.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==h)if(h=1,null!=g)for(var v=u(g=g.split(";")),m=v.next();!m.done;m=v.next()){var b=m.value,k=m=void 0;b.includes("=")?(b=b.split("="),m=b[0].startsWith("CC")?b[0]:"CC"+b[0],k=b[1]||"und"):(m="CC"+h,2==g.length?h+=2:h++,k=b),y.set(m,an(k))}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==h)if(h=1,null!=g)for(g=u(g.split(";")),m=g.next();!m.done;m=g.next())m=m.value,b=v=void 0,m.includes("=")?(m=m.split("="),v="svc"+m[0],b=m[1].split(",")[0].split(":").pop()):(v="svc"+h,h++,b=m),y.set(v,an(b));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==h&&null!=g&&(s.push(g),"captions"==g&&(l="caption"));if(d)return null;var T=ap(d=ai(n,"ContentProtection"),e.g.dash.ignoreDrmInfo,e.g.dash.keySystemsByURI),A=an(n.getAttribute("lang")||"und"),w=n.getAttribute("label");if((d=ai(n,"Label"))&&d.length&&((d=d[0]).textContent&&(w=d.textContent)),d=ai(n,"Representation"),0==(n=d.map((function(n){return(n=function(e,t,n,r,i,a,o,s,l,u){if(t.I=dd(u,t.fa,null),e.u=Math.min(e.u,t.I.zb),!function(e){var t=e.wc?1:0;return t+=e.ab?1:0,0==(t+=e.xc?1:0)?e.contentType==et||"application"==e.contentType:(1!=t&&(e.wc&&(e.ab=null),e.xc=null),!0)}(t.I))return null;var c=t.T.start;t.bandwidth=pi(u,"bandwidth",yi)||0;var p=t.I.contentType,d=p==et||"application"==p;p="image"==p;try{var f=function(t,n,r){return function(e,t,n,r){var i,a,o,s,l;return R((function(u){return 1==u.g?(i=Pr,a=Us(t,n,r,e.g.retryParameters),o=e.h.networkingEngine,s=o.request(i,a),Ar(e.o,s),_(u,s.promise,2)):(l=u.h,u.return(l.data))}))}(e,t,n,r)};if(t.I.wc)var h=Ap(t,f);else if(t.I.ab)h=Pp(t,e.l);else if(t.I.xc)h=Rp(t,f,e.l,!!e.i,e.g.dash.initialSegmentLimit,e.L);else{var g=t.I.wa,y=t.T.duration||0;h={Bb:function(){return Promise.resolve(Ts(c,y,g))}}}}catch(e){if((d||p)&&4002==e.code)return null;throw e}f=function(e,t,n,r){var i=ap(e,n,r);if(t.Fe)e=1==t.drmInfos.length&&!t.drmInfos[0].keySystem,n=0==i.drmInfos.length,(0==t.drmInfos.length||e&&!n)&&(t.drmInfos=i.drmInfos),t.Fe=!1;else if(0e.F||e.D.N(Math.max(3,e.F-t,H(e.H)))}function dd(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ad:null,audioSamplingRate:null,zb:0},n=n||t.wa;for(var r=ai(e,"BaseURL"),i=r.map(ui),a=e.getAttribute("contentType")||t.contentType,o=e.getAttribute("mimeType")||t.mimeType,s=e.getAttribute("codecs")||t.codecs,l=pi(e,"frameRate",bi)||t.frameRate,c=e.getAttribute("sar")||t.pixelAspectRatio,p=ai(e,"InbandEventStream"),d=t.emsgSchemeIdUris.slice(),f=(p=u(p)).next();!f.done;f=p.next())f=f.value.getAttribute("schemeIdUri"),d.includes(f)||d.push(f);p=function(e){for(var t=(e=u(e)).next();!t.done;t=e.next()){var n=t.value;if((t=n.getAttribute("schemeIdUri"))&&(n=n.getAttribute("value")))switch(t){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(n,10)))continue;return t;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(t=parseInt(n,16)))continue;for(e=0;t;)1&t&&++e,t>>=1;return e;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(t=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(n=parseInt(n,10))&&0n.length||"data"!=n[0])throw new De(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new De(2,1,1004,t);var r=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),n=r.split(";"),r=n[0];var i=!1;return 1e.B))for(i=(t=u(t)).next();!i.done;i=t.next())(r=(n=i.value).stream.segmentIndex)&&(r.g.splice(0,e.B-n.Cd),(r=r.g[0]||null)&&(r=-r.startTime,n.stream.segmentIndex.offset(r),Hd(e,n,r)))}(e,t):function(e,t){if(1/0==e.H)for(var n=(t=u(t)).next();!n.done;n=t.next()){var r=n.value.stream.segmentIndex.g[0]||null;null!=r&&null!=r.g&&(e.H=Math.min(e.H,r.g))}if(1/0!=(t=e.H))for(n=(r=u(e.h.values())).next();!n.done;n=r.next()){var i=(n=n.value).stream.segmentIndex;if(null!=i){var a=i.g[0]||null;if(null==a.g)z("Missing EXT-X-PROGRAM-DATE-TIME for stream",n.Ac,"Expect AV sync issues!");else for(Hd(e,n,a.g-t-a.startTime),i=(n=u(i)).next();!i.done;i=n.next())i.value.oe(t)}}}(e,t)}function Zd(e,t,n,r,i,a,o,s,l,u,c,p,d,f,h){var g,y,v,m,b,E,k,T,A,w,S,C,x,I,P;return R((function(D){if(1==D.g){if(1!=t.type)throw new De(2,4,4017);return g=kd(t.g,"EXT-X-DEFINE"),y=Gd(e,g),nf(e,t),h?D.A(2):_(D,function(e,t,n,r,i){var a,o,s,l,u,c,p,d,f,h;return R((function(g){return 1==g.g?(a=Pr,o=Math.trunc((r.segments.length-1)/2),s=uf(r.segments[o].i,i),l=new Oe(s),u=l.qa.split(".").pop(),c=bf[t],(p=c[u])||(p=yf[u])||(p=cf(t,n))?g.return(p):((d=Cr([s],e.g.retryParameters)).method="HEAD",_(g,gf(e,d,a),2))):(f=g.h,(h=f.headers["content-type"])?g.return(h.split(";")[0]):g.return(pf(t)))}))}(e,a,i,t,y),3)}if(2!=D.g&&(h=D.h),v=ef(t,h),m=v.drmInfos,b=v.keyIds,E=v.encrypted,k=v.kf,E&&!m.length&&!k)throw new De(2,4,4026);return T=ff(e)?e.F.get(a):new Map,A=e.l,w=lf(e,t,a,T,y),A!=e.l&&nf(e,t),S=w[w.length-1].endTime,C=new Es(w),I=!!(x=Ad(t.g,"EXT-X-SERVER-CONTROL"))&&null!=x.getAttribute("CAN-SKIP-UNTIL"),(P=Jd(e,i,a,o,s,l,u,c,p,d,f)).segmentIndex=C,P.encrypted=E,P.drmInfos=m,P.keyIds=b,P.mimeType=h,D.return({stream:P,type:a,Ac:n,Jc:r,Ya:S,Mc:I,mc:!1,Cd:-1,$c:T,Ld:!1})}))}function Jd(e,t,n,r,i,a,o,s,l,u,c){var p=cf(n,t)||pf(n);return{id:e.Fa++,originalId:a,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:t,kind:n==et?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:r,label:a,type:n,primary:i,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:l?l.split(","):[],forced:u,channelsCount:o,audioSamplingRate:null,spatialAudio:c,closedCaptions:s,hdr:void 0,tilesLayout:void 0}}function ef(e,t){var n=[];if(e.segments)for(var r=(e=u(e.segments)).next();!r.done;r=e.next())r=kd(r.value.g,"EXT-X-KEY"),n.push.apply(n,c(r));r=e=!1;for(var i=[],a=new Set,o=(n=u(n)).next();!o.done;o=n.next()){var s=bd(o=o.value,"METHOD");if("NONE"!=s)if(e=!0,"AES-128"==s)r=!0;else if(s=md(o,"KEYFORMAT")||"identity",o=(s=_f[s])?s(o,t):null){if(o.keyIds)for(var l=(s=u(o.keyIds)).next();!l.done;l=s.next())a.add(l.value);i.push(o)}}return{drmInfos:i,keyIds:a,encrypted:e,kf:r}}function tf(t,n,r){if(!e.crypto||!e.crypto.subtle)throw W("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new De(2,4,4042);var i=0,a=md(n,"IV","");if(a){var o=Dt(a.substr(2));if(16!=o.byteLength)throw new De(2,4,4043)}else i=wd(r.g,"EXT-X-MEDIA-SEQUENCE");var s=Cr([n=Sd(r.h,bd(n,"URI"))],t.g.retryParameters),l={method:"AES-128",iv:o,firstMediaSequenceNumber:i,fetchKey:function(){var n,r,i;return R((function(a){if(1==a.g)return _(a,gf(t,s,6),2);if(3!=a.g){if(!(n=a.h).data||16!=n.data.byteLength)throw new De(2,4,4044);return r={name:"AES-CBC"},i=l,_(a,e.crypto.subtle.importKey("raw",n.data,r,!0,["decrypt"]),3)}i.cryptoKey=a.h,l.fetchKey=void 0,E(a)}))}};return l}function nf(e,t){var n=Ad(t.g,"EXT-X-PLAYLIST-TYPE"),r=Ad(t.g,"EXT-X-ENDLIST");if(r=n&&"VOD"==n.value||r,n=n&&"EVENT"==n.value&&!r,n=!r&&!n,r)hf(e,Ef);else{if(hf(e,n?Tf:kf),!(r=Ad(t.g,"EXT-X-TARGETDURATION")))throw new De(2,4,4024,"EXT-X-TARGETDURATION");r=Number(r.value),n=Ad(t.g,"EXT-X-PART-INF"),e.l&&n?(e.da=Number(bd(n,"PART-TARGET")),e.J=Math.min(e.da,e.J),t=Ad(t.g,"EXT-X-SERVER-CONTROL"),e.V=t?Number(bd(t,"PART-HOLD-BACK")):0):e.J=Math.min(r,e.J),e.ca=Math.max(r,e.ca)}}function rf(e){var t=e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:e.V?e.V:e.ca*e.g.hls.liveSegmentsDelay;e.j.Xe(0),e.j.We(t),e.j.yc(!1)}function af(e,t,n,r){return(n=Ad(n,"EXT-X-MAP"))?(t=[r=uf(Sd(t,bd(n,"URI")),r),md(n,"BYTERANGE","")].join("-"),e.ba.has(t)||(n=function(e,t){var n=0,r=null;(t=md(t,"BYTERANGE"))&&(n=t.split("@"),r=Number(n[0]),n=Number(n[1]),r=n+r-1);return new ho((function(){return[e]}),n,r)}(r,n),e.ba.set(t,n)),e.ba.get(t)):null}function of(e,t,n,r,i,a,o,s,l){var c=r.g,p=uf(r.i,a),d=Ad(c,"EXTINF"),f=a=0,h=null;r.h.length&&!e.l&&W("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var g=null;if(!e.g.hls.ignoreManifestProgramDateTime){var y=Ad(c,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(g=di(y.value))}if(y=yo,Ad(c,"EXT-X-GAP")&&(y=2),!d){if(0==r.h.length)throw new De(2,4,4024,"EXTINF");if(!e.l)return null}var v=[];if(e.l)for(var m={},b=0;b=n&&202!=n)return{uri:i||r,Oe:r,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=Tt(t)}catch(e){}throw new De(401==n||403==n?2:1,1,1001,r,n,i,e,a)}function Sf(){}function Cf(e,t,n,r,i){var a=new Of;jr(t.headers).forEach((function(e,t){a.append(t,e)}));var o=new Df,s={ye:!1,bf:!1};if(e=new pr(e=function(e,t,n,r,i,a,o){var s,l,u,c,p,d,f,h,g,y,v,m;return R((function(b){switch(b.g){case 1:return s=Pf,l=Rf,d=p=0,f=Date.now(),k(b,2),_(b,s(e,n),4);case 4:return u=b.h,a(xf(u.headers)),h=u.clone().body.getReader(),y=(g=u.headers.get("Content-Length"))?parseInt(g,10):0,new l({start:function(e){!function t(){var n,r;return R((function(a){switch(a.g){case 1:return k(a,2),_(a,h.read(),4);case 4:n=a.h,A(a,3);break;case 2:return w(a),a.return();case 3:if(n.done){a.A(5);break}if(p+=n.value.byteLength,!o){a.A(5);break}return _(a,o(n.value),5);case 5:(100<(r=Date.now())-f||n.done)&&(i(r-f,p-d,y-p),d=p,f=r),n.done?e.close():(e.enqueue(n.value),t()),E(a)}}))}()}}),_(b,u.arrayBuffer(),5);case 5:c=b.h,A(b,3);break;case 2:if(v=w(b),r.ye)throw new De(1,1,7001,e,t);if(r.bf)throw new De(1,1,1003,e,t);throw new De(1,1,1002,e,v,t);case 3:return m=xf(u.headers),b.return(wf(m,c,u.status,e,u.url,t))}}))}(e,n,{body:t.body||void 0,headers:a,method:t.method,signal:o.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},s,r,i,t.streamDataCallback),(function(){return s.ye=!0,o.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var l=new ot((function(){s.bf=!0,o.abort()}));l.N(t/1e3),e.finally((function(){l.stop()}))}return e}function xf(e){var t={};return e.forEach((function(e,n){t[n.trim()]=e})),t}function If(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)}yt("Tizen 3")||yt("Tizen 2")||dt()||(Qi.m3u8=function(){return new jd},$i["application/x-mpegurl"]=function(){return new jd},$i["application/vnd.apple.mpegurl"]=function(){return new jd}),B("shaka.net.HttpFetchPlugin",Sf),Sf.isSupported=If,Sf.parse=Cf;var Pf=e.fetch,Df=e.AbortController,Rf=e.ReadableStream,Of=e.Headers;function Lf(){}function Mf(e,t,n,r,i){var a=new Uf,o=Date.now(),s=0;return new pr(new Promise((function(l,u){a.open(t.method,e,!0),a.responseType="arraybuffer",a.timeout=t.retryParameters.timeout,a.withCredentials=t.allowCrossSiteCredentials,a.onabort=function(){u(new De(1,1,7001,e,n))};var c=!1;for(var p in a.onreadystatechange=function(){if(2==a.readyState&&!c){var e=Nf(a);i(e),c=!0}},a.onload=function(){var t=Nf(a),r=a.response;try{var i=wf(t,r,a.status,e,a.responseURL,n);l(i)}catch(e){u(e)}},a.onerror=function(t){u(new De(1,1,1002,e,t,n))},a.ontimeout=function(){u(new De(1,1,1003,e,n))},a.onprogress=function(e){var t=Date.now();(100=a&&(a=t.bandwidth),e.g[n.id]=i,e.g[r.id]=a}}function xh(e,t){e.g[t.id]=t.bandwidth||2048}function Ih(e,t){return null==(e=e.g[t])&&(e=0),e}function Ph(e){var t=this;if(e&&e.constructor!=Wl)throw new De(2,9,9008);this.g=this.h=null,e?(this.h=e.h,this.g=e.jc()):(this.h=Fl(),this.g=new wr),this.i=[],this.j=[];var n=!e;this.l=new Or((function(){var e,r,i,a,o;return R((function(s){switch(s.g){case 1:return _(s,Promise.all(t.j.map((function(e){return Gf(e)}))),2);case 2:for(e=function(){},r=[],i=u(t.i),a=i.next();!a.done;a=i.next())o=a.value,r.push(o.then(e,e));return _(s,Promise.all(r),3);case 3:if(!n){s.A(4);break}return _(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,E(s)}}))}))}function Dh(){if(st())e:{for(var e=u(oh.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function Rh(e){var t,n,r;return R((function(i){switch(i.g){case 1:return _(i,(t=new nh).init(),2);case 2:return _(i,rh(t),3);case 3:return n=i.h,r=new hh("manifest",n.path.za,n.path.ja,e),_(i,t.destroy(),4);case 4:return _(i,(new Ph).remove(r.toString()),0)}}))}function Oh(e,t,n,r,i,a){var o,s,l,c,p,d,f,h,g,y,v;return R((function(m){switch(m.g){case 1:for(o=!1,k(m,2),s=!0,l=u(n.streams),c=l.next();!c.done;c=l.next())for(p=c.value,d=u(p.segments),f=d.next();!f.done;f=d.next())h=f.value,null!=(g=h.pendingSegmentRefId?r[h.pendingSegmentRefId]:null)&&(h.dataKey=g,h.pendingSegmentRefId=void 0),null!=(g=h.pendingInitSegmentRefId?r[h.pendingInitSegmentRefId]:null)&&(h.initSegmentKey=g,h.pendingInitSegmentRefId=void 0),h.pendingSegmentRefId&&(s=!1),h.pendingInitSegmentRefId&&(s=!1);return n.size+=i,s&&(n.isIncomplete=!1),_(m,e.updateManifest(t,n),4);case 4:o=!0,a(),A(m,0);break;case 2:return y=w(m),_(m,Rh(t),5);case 5:if(o){m.A(6);break}return v=Object.values(r),_(m,e.removeSegments(v,(function(){})),6);case 6:throw y}}))}function Lh(e){return e.variants.some((function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t}))}function Mh(e){return e.variants.some((function(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]).some((function(e){return e.initData&&e.initData.length}))}))}function Nh(e,t){for(var n=[],r=u(e.streams),i=r.next();!i.done;i=r.next())i=i.value,t&&"video"==i.type?n.push({contentType:Kt(i.mimeType,i.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=i.type||n.push({contentType:Kt(i.mimeType,i.codecs),robustness:e.drmInfo.audioRobustness});return n}function Uh(e,t,n){return R((function(r){return _(r,function(e,t,n,r){var i,a,o;return R((function(s){return 1==s.g?r.drmInfo?(i=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new De(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(n),a=r.sessionIds.map((function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:Nh(r,!1),videoCapabilities:Nh(r,!0)}})),_(s,kh(t,e,a),2)):s.return():3!=s.g?(o=s.h,_(s,i.remove(o),3)):_(s,i.add(a.filter((function(e){return!o.includes(e.sessionId)}))),0)}))}(e.g,e.h.drm,n,t),0)}))}function Fh(e,t,n){function r(){}var i=function(e){for(var t=new Set,n=(e=u(e.streams)).next();!n.done;n=e.next())for(var r=(n=u(n.value.segments)).next();!r.done;r=n.next())null!=(r=r.value).initSegmentKey&&t.add(r.initSegmentKey),t.add(r.dataKey);return Array.from(t)}(n);return Ah(t,n),Promise.all([e.removeSegments(i,r),e.removeManifests([t.key()],r)])}function jh(e,t,n,r,i,a){var o={id:r.id,originalId:r.originalId,primary:r.primary,type:r.type,mimeType:r.mimeType,codecs:r.codecs,frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,kind:r.kind,language:r.language,label:r.label,width:r.width||null,height:r.height||null,encrypted:r.encrypted,keyIds:r.keyIds,segments:[],variantIds:[],roles:r.roles,forced:r.forced,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,closedCaptions:r.closedCaptions,tilesLayout:r.tilesLayout},s=i.offline.numberOfParallelDownloads,l=0;return function(e,t,n){if(null!=(t=e.segmentIndex.find(t)))for(var r=e.segmentIndex.get(t);r;)n(r),r=e.segmentIndex.get(++t)}(r,n.presentationTimeline.Pa(),(function(n){var i=jf(n),u=void 0;if(!a.has(i)){var c=n.endTime-n.startTime;c=Ih(t,r.id)*c,c=Hf(e.g,c),a.set(i,new Ff(n,c,l,!1))}n.h&&(u=jf(n.h),a.has(u)||(c=.5*Ih(t,r.id),c=Hf(e.g,c),a.set(u,new Ff(n.h,c,l,!0)))),o.segments.push({pendingInitSegmentRefId:u,initSegmentKey:u?0:null,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,pendingSegmentRefId:i,dataKey:0}),l=(l+1)%s})),o}function Bh(e){if(e.l.g)throw new De(2,9,7001)}function Vh(){if(!Dh())throw new De(2,9,9e3)}function Hh(e,t){return R((function(n){return 1==n.g?(e.i.push(t),T(n),_(n,t,4)):2!=n.g?n.return(n.h):(S(n),te(e.i,t),C(n,0))}))}function Kh(e){for(var t=new Set,n=u(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(r=(n=u(e.imageStreams)).next();!r.done;r=n.next())t.add(r.value);for(n=(e=u(e.variants)).next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}y(sh,Qf),sh.prototype.updateManifestExpiration=function(e,t){var n,r,i,a=this;return R((function(o){return n=Xf(a.h,a.g),r=n.store(),i=new rt,r.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,r.put(n),i.resolve()):i.reject(new De(2,9,9012,"Could not find values for "+e))},_(o,Promise.all([n.promise(),i]),0)}))},sh.prototype.bc=function(e){var t,n,r,i,a,o;return R((function(s){if(1==s.g){for(t=[],n=0;nt,!s||!l){c.A(3);break}return _(c,i.updateManifestExpiration(n.key(),t),3);case 3:return S(c),_(c,r.destroy(),10);case 10:C(c,0);break;case 2:w(c),c.A(3)}}))},$i["application/x-offline-manifest"]=function(){return new bh},B("shaka.offline.OfflineScheme",_h),_h.plugin=Eh,Sr("offline",Eh),(r=Ph.prototype).destroy=function(){return this.l.destroy()},r.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=Rl(e,t)),jl(this.h,e)},r.getConfiguration=function(){var e=Fl();return jl(e,this.h,Fl()),e},r.jc=function(){return this.g},r.store=function(e,t,n){var r=this,i=this.getConfiguration(),a=new Kf(this.g);return this.j.push(a),(t=new pr(t=function(e,t,n,r,i,a){var o,s,l,c,p,d,f,h,g,y,v,m,b;return R((function(T){switch(T.g){case 1:return Vh(),s=o=null,l=new nh,d=p=c=null,k(T,2,3),_(T,r(),5);case 5:return o=T.h,_(T,function(e,t,n,r){var i,a,o,s,l;return R((function(u){if(1==u.g)return i=null,a=e.g,o={networkingEngine:a,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},n.configure(r.manifest),Bh(e),_(u,n.start(t,o),2);if(3!=u.g)return s=u.h,Bh(e),l=Kh(s),_(u,Promise.all(Fr(l,(function(e){return e.createSegmentIndex()}))),3);if(Bh(e),i)throw i;return u.return(s)}))}(e,t,o,i),6);case 6:if(f=T.h,Bh(e),!(!f.presentationTimeline.U()&&!f.presentationTimeline.jb()))throw new De(2,9,9005,t);return _(T,function(e,t,n,r){var i;return R((function(a){switch(a.g){case 1:return(i=new Ti({kb:e.g,onError:n,cd:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(r.drm),_(a,function(e,t,n){return e.da=!0,e.B=[],e.L=n,wi(e,t)}(i,t.variants,r.offline.usePersistentLicense),2);case 2:return _(a,Ci(i),3);case 3:return _(a,xi(i),4);case 4:return a.return(i)}}))}(e,f,(function(e){d=d||e}),i),7);case 7:if(s=T.h,Bh(e),d)throw d;return _(T,function(e,t){var n,r,i,a,o,s,l,c,p,d,f,h,g,y,v,m,b,T,S,C,x,I,P,D,O,L,M,N;return R((function(R){switch(R.g){case 1:return n={width:1/0,height:1/0},function(e,t,n){e.variants=e.variants.filter((function(e){return gn(e,t,n)}))}(e,t.restrictions,n),_(R,mn(e,t.offline.usePersistentLicense),2);case 2:for(r=[],i=t.preferredAudioChannelCount,a=t.preferredDecodingAttributes,o=t.preferredVideoCodecs,s=t.preferredAudioCodecs,dn(e,o,s,i,a),l=u(e.variants),c=l.next();!c.done;c=l.next())p=c.value,r.push(wn(p));for(d=u(e.textStreams),f=d.next();!f.done;f=d.next())h=f.value,r.push(Sn(h));for(g=u(e.imageStreams),y=g.next();!y.done;y=g.next())v=y.value,r.push(Cn(v));return _(R,t.offline.trackSelectionCallback(r),3);case 3:for(m=R.h,b=e.presentationTimeline.getDuration(),T=0,S=u(m),C=S.next();!C.done;C=S.next())x=C.value,I=x.bandwidth*b/8,T+=I;return k(R,4),_(R,t.offline.downloadSizeCallback(T),6);case 6:if(!R.h)throw new De(2,9,9014);A(R,5);break;case 4:if((P=w(R))instanceof De)throw P;throw new De(2,9,9015);case 5:for(D=new Set,O=new Set,L=new Set,M=u(m),C=M.next();!C.done;C=M.next())"variant"==(N=C.value).type&&D.add(N.id),"text"==N.type&&O.add(N.id),"image"==N.type&&L.add(N.id);e.variants=e.variants.filter((function(e){return D.has(e.id)})),e.textStreams=e.textStreams.filter((function(e){return O.has(e.id)})),e.imageStreams=e.imageStreams.filter((function(e){return L.has(e.id)})),function(e){e.variants.map((function(e){return e.video}));var t=new Set(e.variants.map((function(e){return e.audio})));e=e.textStreams;for(var n=u(t),r=n.next();!r.done;r=n.next())for(var i=(r=u(t)).next();!i.done;i=r.next());for(t=u(e),n=t.next();!n.done;n=t.next())for(n=u(e),r=n.next();!r.done;r=n.next());}(e),E(R)}}))}(f,i),8);case 8:return _(T,l.init(),9);case 9:return Bh(e),_(T,rh(l),10);case 10:return c=T.h,Bh(e),h=function(e,t,n,r,i,a){var o=function(e,t,n){return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:t=wh(t),appMetadata:n,isIncomplete:!1}}(n,t,r),s=i.offline.progressCallback;!function(e,t,n){e.m=t,e.l=n}(a,(function(e,t){o.size=t,s(o,e)}),(function(t,n){l&&i.offline.usePersistentLicense&&c==n&&Ii(e,"cenc",t)}));var l=Lh(t)&&!Mh(t),c=null;l&&(c=Gh.get(e.g.keySystem));for(var p=new Sh,d=u(t.textStreams),f=d.next();!f.done;f=d.next())p.g[f.value.id]=52;for(d=u(t.imageStreams),f=d.next();!f.done;f=d.next())xh(p,f.value);for(f=u(t.variants),d=f.next();!d.done;d=f.next())Ch(p,d.value);return p=function(e,t,n,r){for(var i=new Map,a=Kh(n),o=new Map,s=(a=u(a)).next();!s.done;s=a.next()){s=s.value;var l=jh(e,t,n,s,r,i);o.set(s.id,l)}for(e=u(n.variants),t=e.next();!t.done;t=e.next())(t=t.value).audio&&o.get(t.audio.id).variantIds.push(t.id),t.video&&o.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(o.values()),pe:Array.from(i.values())}}(a,p,t,i),a=p.streams,p=p.pe,f=e.g,d=i.offline.usePersistentLicense,f&&d&&(f.initData=[]),{ag:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.ic(),streams:a,sessionIds:d?Di(e):[],drmInfo:f,appMetadata:r,isIncomplete:!0,sequenceMode:t.sequenceMode},pe:p}}(s,f,t,n,i,a),g=h.ag,y=h.pe,_(T,c.ja.addManifests([g]),11);case 11:if(v=T.h,Bh(e),p=v[0],Bh(e),d)throw d;return _(T,function(e,t,n,r,i,a,o,s,l){var c,p,d,f,h,g,y,v,m,b;return R((function(T){switch(T.g){case 1:if(c={},p=0,d=function(t,d){var f,h,g,y,v,m,b;return R((function(k){if(1==k.g){for(f={},h=u(t),g=h.next();!g.done;f={cb:f.cb},g=h.next())f.cb=g.value,y=Bf(f.cb,a),v=f.cb.i,m=f.cb.h,b=function(t){return function(n){var r,i,a;return R((function(s){if(1==s.g)return _(s,o.addSegments([{data:n}]),2);r=s.h,Bh(e),i=t.cb.g,a=jf(i),c[a]=r[0],p+=n.byteLength,E(s)}))}}(f),zf(i,f.cb.groupId,y,v,m,b);return _(k,function(e){return R((function(t){return 1==t.g?_(t,Promise.all(e.j.values()),2):t.return(e.g.h)}))}(i),2)}return d?(Bh(e),function(e,t,n,r){if(t.expiration=n.ic(),n=Di(n),t.sessionIds=r.offline.usePersistentLicense?n:[],Lh(e)&&r.offline.usePersistentLicense&&!n.length)throw new De(2,9,9007)}(s,r,l,a),_(k,o.updateManifest(n,r),0)):k.A(0)}))},f=!1,k(T,2),!Lh(s)||!f||Mh(s)){T.A(4);break}return _(T,d(t.filter((function(e){return e.h})),!0),5);case 5:return Bh(e),t=t.filter((function(e){return!e.h})),h=c,g=p,c={},p=0,_(T,Oh(o,n,r,h,g,(function(){return Bh(e)})),6);case 6:Bh(e);case 4:if(f){T.A(7);break}return _(T,d(t,!1),8);case 8:return Bh(e),y=c,v=p,c={},p=0,_(T,Oh(o,n,r,y,v,(function(){return Bh(e)})),9);case 9:Bh(e);case 7:A(T,0);break;case 2:return m=w(T),b=Object.values(c),_(T,o.removeSegments(b,(function(){})),10);case 10:throw m}}))}(e,y,p,g,a,i,c.ja,f,s),12);case 12:return Bh(e),m=new hh("manifest",c.path.za,c.path.ja,p),T.return(Ah(m,g));case 3:return S(T),_(T,l.destroy(),13);case 13:if(!o){T.A(14);break}return _(T,o.stop(),14);case 14:if(!s){T.A(16);break}return _(T,s.destroy(),16);case 16:C(T,0);break;case 2:if(b=w(T),null==p){T.A(18);break}return _(T,Rh(p),18);case 18:throw d||b}}))}(this,e,t||{},(function(){var t;return R((function(a){return 1==a.g?_(a,Yi(e,r.g,i.manifest.retryParameters,n||null),2):(t=a.h,a.return(t()))}))}),i,a),(function(){return Gf(a)}))).finally((function(){te(r.j,a)})),function(e,t){var n=t.promise;return e.i.push(n),t.finally((function(){te(e.i,n)}))}(this,t)},r.remove=function(e){return Hh(this,function(e,t){var n,r,i,a,o,s;return R((function(l){switch(l.g){case 1:if(Vh(),null==(n=gh(t))||"manifest"!=n.g)throw new De(2,9,9004,t);return r=n,i=new nh,T(l),_(l,i.init(),4);case 4:return _(l,ih(i,r.za(),r.ja()),5);case 5:return _(l,(a=l.h).getManifests([r.key()]),6);case 6:return o=l.h,s=o[0],_(l,Promise.all([Uh(e,s,i),Fh(a,r,s)]),2);case 2:return S(l),_(l,i.destroy(),8);case 8:C(l,0)}}))}(this,e))},r.pg=function(){return Hh(this,function(e){var t,n,r,i,a,o,s,l,c,p;return R((function(d){switch(d.g){case 1:return Vh(),t=e.g,n=e.h.drm,r=new nh,i=!1,T(d),_(d,r.init(),4);case 4:a=[],function(e,t){e.g.forEach((function(e){t(e.getEmeSessionCell())}))}(r,(function(e){return a.push(e)})),o=u(a),s=o.next();case 5:if(s.done){d.A(2);break}return _(d,(l=s.value).getAll(),8);case 8:return c=d.h,_(d,kh(n,t,c),9);case 9:return p=d.h,_(d,l.remove(p),10);case 10:p.length!=c.length&&(i=!0),s=o.next(),d.A(5);break;case 2:return S(d),_(d,r.destroy(),11);case 11:C(d,3);break;case 3:return d.return(!i)}}))}(this))},r.list=function(){return Hh(this,R((function(r){switch(r.g){case 1:return Vh(),e=[],t=new nh,T(r),_(r,t.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.g.forEach((function(e,n){e.getCells().forEach((function(e,r){t({za:n,ja:r},e)}))}))}(t,(function(t,r){n=n.then((function(){return R((function(n){if(1==n.g)return _(n,r.getAllManifests(),2);n.h.forEach((function(n,r){n=Ah(new hh("manifest",t.za,t.ja,r),n),e.push(n)})),E(n)}))}))})),_(r,n,2);case 2:return S(r),_(r,t.destroy(),6);case 6:C(r,3);break;case 3:return r.return(e)}})));var e,t,n},B("shaka.offline.Storage",Ph),Ph.deleteAll=function(){var e;return R((function(t){return 1==t.g?(e=new nh,T(t),_(t,function(e){var t,n;return R((function(r){return 1==r.g?(t=Array.from(e.g.values()),(n=0n.length)return a;var o=e;for(e=null;o&&!(e=i?si(o,i,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(i=(t=u(t.split(" "))).next();!i.done;i=t.next())for(i=i.value,o=(e=u(n)).next();!o.done;o=e.next())if(r+(o=o.value).getAttribute("xml:id")==i){a.push(o);break}return a}function Ry(e,t,n,r){return e=Oy(e,t),null==n?n=e.start:null!=e.start&&(n+=e.start),null==r?r=e.end:null!=e.start&&(r+=e.start),{start:n,end:r}}function Oy(e,t){var n=Ly(e.getAttribute("begin"),t),r=Ly(e.getAttribute("end"),t);return e=Ly(e.getAttribute("dur"),t),null==r&&null!=e&&(r=n+e),{start:n,end:r}}function Ly(e,t){var n=null;if(Vy.test(e)){e=Vy.exec(e),n=Number(e[1]);var r=Number(e[2]),i=Number(e[3]),a=Number(e[4]);n=(i+=(a+=(Number(e[5])||0)/t.h)/t.frameRate)+60*r+3600*n}else if(Hy.test(e))n=My(Hy,e);else if(Ky.test(e))n=My(Ky,e);else if(Gy.test(e))e=Gy.exec(e),n=Number(e[1])/t.frameRate;else if(zy.test(e))e=zy.exec(e),n=Number(e[1])/t.g;else if(Wy.test(e))n=My(Wy,e);else if(e)throw new De(2,2,2001,"Could not parse cue time range in TTML");return n}function My(e,t){return null==(e=e.exec(t))||""==e[0]?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function Ny(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}Jt["application/x-subtitle-lrc"]=function(){return new ky},wy.prototype.parseInit=function(){},wy.prototype.setSequenceMode=function(){},wy.prototype.parseMedia=function(e,t){var n=Et(e);if(e=[],""==n)return e;var r=_i(n,"tt");if(!r)throw new De(2,2,2005,"Failed to parse TTML.");if(!(n=r.getElementsByTagName("body")[0]))return[];var i=li(r,Xy,"frameRate"),a=li(r,Xy,"subFrameRate"),o=li(r,Xy,"frameRateMultiplier"),s=li(r,Xy,"tickRate"),l=li(r,Xy,"cellResolution"),c=r.getAttribute("xml:space")||"default",p=li(r,$y,"extent");if("default"!=c&&"preserve"!=c)throw new De(2,2,2005,"Invalid xml:space value: "+c);c="default"==c,i=new Ny(i,a,o,s),l=l&&(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null,a=(a=r.getElementsByTagName("metadata")[0])?function(e){return Array.from(e.childNodes).filter((function(e){return e instanceof Element}))}(a):[],o=Array.from(r.getElementsByTagName("style")),s=[];for(var d=u(r=Array.from(r.getElementsByTagName("region"))),f=d.next();!f.done;f=d.next()){var h=f.value;f=new Ee;var g=h.getAttribute("xml:id");if(g){f.id=g;var y,v,m=null;p&&(m=Uy.exec(p)||By.exec(p)),g=m?Number(m[1]):null,m=m?Number(m[2]):null,(y=xy(h,o,"extent"))&&(null!=(y=(v=Uy.exec(y))||By.exec(y))&&(f.width=Number(y[1]),f.height=Number(y[2]),v||(null!=g&&(f.width=100*f.width/g),null!=m&&(f.height=100*f.height/m)),f.widthUnits=v||null!=g?ke:0,f.heightUnits=v||null!=m?ke:0)),(h=xy(h,o,"origin"))&&(null!=(y=(v=Uy.exec(h))||By.exec(h))&&(f.viewportAnchorX=Number(y[1]),f.viewportAnchorY=Number(y[2]),v||(null!=m&&(f.viewportAnchorY=100*f.viewportAnchorY/m),null!=g&&(f.viewportAnchorX=100*f.viewportAnchorX/g)),f.viewportAnchorUnits=v||null!=g?ke:0))}else f=null;f&&s.push(f)}if(ai(n,"p").length)throw new De(2,2,2001,"

can only be inside

in TTML");for(d=(p=u(ai(n,"div"))).next();!d.done;d=p.next())if(ai(d.value,"span").length)throw new De(2,2,2001," can only be inside

in TTML");return(t=function e(t,n,r,i,a,o,s,l,c,p,d){var f=t.parentNode;if(t.nodeType==Node.COMMENT_NODE)return null;if(t.nodeType==Node.TEXT_NODE){if(!d)return null;var h=document.createElement("span");h.textContent=t.textContent}else h=t;for(var g=null,y=u(Qy),v=y.next();!v.done&&!(g=Dy(h,"backgroundImage",i,"#",v.value)[0]);v=y.next());y=d,("p"==t.nodeName||g)&&(d=!0);if(l="default"==(h.getAttribute("xml:space")||(l?"default":"preserve")),v=Array.from(h.childNodes).every((function(e){return e.nodeType==Node.TEXT_NODE})),t=[],!v)for(var m=u(h.childNodes),b=m.next();!b.done;b=m.next())(b=e(b.value,n,r,i,a,o,s,l,c,h,d))&&t.push(b);i=null!=p,m=/\S/.test(h.textContent);var _=h.hasAttribute("begin")||h.hasAttribute("end")||h.hasAttribute("dur");if(!(_||m||"br"==h.tagName||0!=t.length||i&&!l))return null;for(b=Oy(h,r),m=b.start,b=b.end;f&&f.nodeType==Node.ELEMENT_NODE&&"tt"!=f.tagName;)b=Ry(f,r,m,b),m=b.start,b=b.end,f=f.parentNode;if(null==m&&(m=0),m+=n.periodStart,b=null==b?1/0:b+n.periodStart,m=Math.max(m,n.segmentStart),b=Math.min(b,n.segmentEnd),!_&&0",o);if(s<=o){e=r;break e}if((s=r.substring(o+1,s))&&"c"===s){var l=e.pop();l?l===s?(a+="/"+s+">",o+=s.length+1):l.startsWith("c.")?(o+=s.length+1,a+="/"+l+">"):a+=r[o]:a+=r[o]}else a+=r[o]}else"<"===r[o]?"c"!=r[i=o+1]&&(i=-1):">"===r[o]&&0"===e[i]&&0",'

'),e+="
";e:{for(i=e,a=[],o=-1,r="",e=!1,s=0;s",s))){e=i;break e}if((l=i.substring(s+1,l))&&"v"==l){e=!0;var c=null;if(a.length&&(c=a[a.length-1]),c){if(c===l)r+="/"+l+">";else{if(!c.startsWith("v")){r+=i[s];continue}r+="/"+c+">"}s+=l.length+1}else r+=i[s]}else r+=i[s]}else"<"===i[s]?"v"!=i[o=s+1]&&(o=-1):">"===i[s]&&0","<"+o+">")).replace("",""),e||(r+="");e=r}if(i=_i(""+e+"","span")){if(r=[],1==(i=i.childNodes).length&&((a=i[0]).nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE))return void(t.payload=ov(e));for(i=(e=u(i)).next();!i.done;i=e.next())rv(i.value,t,r,n);t.nestedCues=r}else t.payload=ov(e)}function nv(e,t){return e&&0",""":'"',"'":"'"," ":" ","‎":"‎","‏":"‏"},n=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,(function(e){return t[e]||"'"})):e||""}Jt["application/ttml+xml"]=function(){return new wy},Zy.prototype.parseInit=function(e){var t=!1;if((new zr).box("moov",Wr).box("trak",Wr).box("mdia",Wr).box("minf",Wr).box("stbl",Wr).P("stsd",Yr).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new De(2,2,2007)},Zy.prototype.setSequenceMode=function(){},Zy.prototype.parseMedia=function(e,t){var n=this,r=!1,i=[];if((new zr).box("mdat",Xr((function(e){r=!0,i=i.concat(n.g.parseMedia(e,t))}))).parse(e,!1),!r)throw new De(2,2,2007);return i},B("shaka.text.Mp4TtmlParser",Zy),Zy.prototype.parseMedia=Zy.prototype.parseMedia,Zy.prototype.setSequenceMode=Zy.prototype.setSequenceMode,Zy.prototype.parseInit=Zy.prototype.parseInit,Jt['application/mp4; codecs="stpp"']=function(){return new Zy},Jt['application/mp4; codecs="stpp.ttml"']=function(){return new Zy},Jt['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Zy},Jt['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Zy},Jy.prototype.parseInit=function(){},Jy.prototype.setSequenceMode=function(e){this.g=e},Jy.prototype.parseMedia=function(e,t){var n=(e=(e=Et(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new De(2,2,2e3);if(e=t.vttOffset,n[0].includes("X-TIMESTAMP-MAP")&&this.g){var r=n[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),i=n[0].match(/MPEGTS:(\d+)/m);if(r&&i){if(null==(e=av(new Cd(r[1]))))throw new De(2,2,2e3);for(i=Number(i[1]),r=t.segmentStart-t.periodStart;95443.7176888889<=r;)r-=95443.7176888889,i+=8589934592;e=t.periodStart+i/9e4-e}}for(t=[],r=(i=u(n[0].split("\n"))).next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new Cd(r);var a=new Ee;Pd(r),xd(r);for(var o=Pd(r);o;){var s=a,l=o;(o=/^id=(.*)$/.exec(l))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(l))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(l))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(l)&&(s.scroll="up"),xd(r),o=Pd(r)}t.push(a)}for(ev(i=new Map),r=[],a=(n=u(n.slice(1))).next();!a.done;a=n.next()){if((1!=(a=a.value.split("\n")).length||a[0])&&!/^NOTE($|[ \t])/.test(a[0])&&"STYLE"==a[0]){for(s=[],o=-1,l=1;l>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function vv(e){return 3600*((e=Tv.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Jt["text/vtt"]=function(){return new Jy},Jt['text/vtt; codecs="vtt"']=function(){return new Jy},Jt['text/vtt; codecs="wvtt"']=function(){return new Jy},lv.prototype.parseInit=function(e){var t=this,n=!1;if((new zr).box("moov",Wr).box("trak",Wr).box("mdia",Wr).P("mdhd",(function(e){e=io(e.reader,e.version),t.g=e.timescale})).box("minf",Wr).box("stbl",Wr).P("stsd",Yr).box("wvtt",(function(){n=!0})).parse(e),!this.g)throw new De(2,2,2008);if(!n)throw new De(2,2,2008)},lv.prototype.setSequenceMode=function(){},lv.prototype.parseMedia=function(e,t){if(!this.g)throw new De(2,2,2008);var n,r=0,i=[],a=[],o=!1,s=!1,l=!1,c=null;if((new zr).box("moof",Wr).box("traf",Wr).P("tfdt",(function(e){o=!0,r=ro(e.reader,e.version).we})).P("tfhd",(function(e){c=no(e.reader,e.flags).Ce})).P("trun",(function(e){s=!0,i=ao(e.reader,e.version,e.flags).Re})).box("mdat",Xr((function(e){l=!0,n=e}))).parse(e,!1),!l&&!o&&!s)throw new De(2,2,2008);e=r;for(var p=new Hr(n,0),d=u(i),f=d.next();!f.done;f=d.next()){var h=(f=f.value).ee||c,g=f.ed?r+f.ed:e;e=g+(h||0);var y=0;do{var v=p.K();y+=v;var m=null;"vttc"==Qr(p.K())?80}});else{var e=function(e){for(var t=window.document,n=i(t);n;)n=i(t=n.ownerDocument);return t}(),t=[],n=null,r=null;o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.USE_MUTATION_OBSERVER=!0,o._setupCrossOriginUpdater=function(){return n||(n=function(e,n){r=e&&n?p(e,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},t.forEach((function(e){e._checkForIntersections()}))}),n},o._resetCrossOriginUpdater=function(){n=null,r=null},o.prototype.observe=function(e){if(!this._observationTargets.some((function(t){return t.element==e}))){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},o.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter((function(t){return t.element!=e})),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},o.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter((function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]}))},o.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map((function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}}));return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},o.prototype._monitorIntersections=function(t){var n=t.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(t)){var r=this._checkForIntersections,a=null,o=null;this.POLL_INTERVAL?a=n.setInterval(r,this.POLL_INTERVAL):(s(n,"resize",r,!0),s(t,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(o=new n.MutationObserver(r)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push((function(){var e=t.defaultView;e&&(a&&e.clearInterval(a),l(e,"resize",r,!0)),l(t,"scroll",r,!0),o&&o.disconnect()}));var u=this.root&&(this.root.ownerDocument||this.root)||e;if(t!=u){var c=i(t);c&&this._monitorIntersections(c.ownerDocument)}}},o.prototype._unmonitorIntersections=function(t){var n=this._monitoringDocuments.indexOf(t);if(-1!=n){var r=this.root&&(this.root.ownerDocument||this.root)||e;if(!this._observationTargets.some((function(e){var n=e.element.ownerDocument;if(n==t)return!0;for(;n&&n!=r;){var a=i(n);if((n=a&&a.ownerDocument)==t)return!0}return!1}))){var a=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),a(),t!=r){var o=i(t);o&&this._unmonitorIntersections(o.ownerDocument)}}}},o.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t=0&&y>=0&&{top:l,bottom:c,left:d,right:h,width:g,height:y}||null),!v)break;m=m&&f(m)}return v}},o.prototype._getRootRect=function(){var t;if(this.root&&!h(this.root))t=u(this.root);else{var n=h(this.root)?this.root:e,r=n.documentElement,i=n.body;t={top:0,left:0,right:r.clientWidth||i.clientWidth,width:r.clientWidth||i.clientWidth,bottom:r.clientHeight||i.clientHeight,height:r.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(t)},o.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map((function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100})),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==r)for(var i=0;i0?_.setItem(e.StorageKeys.MUTED,!1):_.setItem(e.StorageKeys.MUTED,!0),_.setItem(e.StorageKeys.VOLUME,t.volume))})),n.listen(t,t.Event.UI.USER_SELECTED_AUDIO_TRACK,(function(t){var n=t.payload.audioTrack;_.setItem(e.StorageKeys.AUDIO_LANG,n.language)})),n.listen(t,t.Event.UI.USER_SELECTED_CAPTION_TRACK,(function(t){var n=t.payload.captionTrack;_.setItem(e.StorageKeys.TEXT_LANG,n.language)}));var r=function(){n.listenOnce(t,t.Event.TEXT_TRACK_CHANGED,(function(t){var n=t.payload.selectedTextTrack;_.setItem(e.StorageKeys.TEXT_LANG,n.language)}))};n.listen(t,t.Event.UI.USER_SHOWED_CAPTIONS,r),n.listen(t,t.Event.UI.USER_HID_CAPTIONS,r),n.listen(t,t.Event.UI.USER_SELECTED_CAPTIONS_STYLE,(function(t){try{var n=JSON.stringify(t.payload.captionsStyle);_.setItem(e.StorageKeys.TEXT_STYLE,n)}catch(t){e._logger.error(t.message)}})),n.listen(t,t.Event.PLAYER_DESTROY,(function(){return n.destroy()}))},e.getPlayerTextStyle=function(){return _.getItem(e.StorageKeys.TEXT_STYLE)},e.hasStorage=function(){var t=_.size,n=0!==t;return n?e._logger.debug("Storage found with size of ",t):e._logger.debug("No storage found"),n},e.getStorageConfig=function(){var t=e._getExistingValues(),n=e._buildStorageConfig(t);return e._logger.debug("Gets storage config",n),n},e._getExistingValues=function(){var t={};return Object.keys(e.StorageKeys).forEach((function(n){var r=e.StorageKeys[n],i=_.getItem(r);null!=i&&(t[r]=i)})),t},e._buildStorageConfig=function(e){var t=l.Utils.Object.mergeDeep({},e);return delete t.textStyle,{playback:t}},e}();E(k,"StorageKeys",{MUTED:"muted",VOLUME:"volume",AUDIO_LANG:"audioLanguage",TEXT_LANG:"textLanguage",TEXT_STYLE:"textStyle"}),E(k,"_logger",Object(l.getLogger)("StorageManager"));var T="kaltura.com",A="custom_data=",w="signature=";function S(e,t){e.config.session&&e.config.session.id?function(e,t){var n=/:((?:[a-z0-9]|-)*)/i.exec(e.config.session.id);n&&n[1]&&C(t,e.config.session.id.replace(n[1],l.Utils.Generator.guid()))}(e,t):function(e){var t=l.Utils.Generator.guid(),n=l.Utils.Generator.guid();C(e,t+":"+n)}(t)}function C(e,t){e.session=e.session||{},e.session.id=t}function x(e,t,n){if(void 0===n&&(n="playSessionId="),t){var r=new RegExp(n+"((?:[a-z0-9]|-)*:(?:[a-z0-9]|-)*)","i").exec(e);r&&r[1]?e=e.replace(r[1],t):e+=D(e)+n+t}return e}function I(){var e;try{e=window.parent.document.URL}catch(t){e=document.referrer}return e}function P(e){if(-1===e.indexOf("referrer=")){var t=btoa(I().substr(0,1e3));e+=D(e)+"referrer="+t}return e}function D(e){return-1===e.indexOf("?")?"?":"&"}function R(e,t){return-1===e.indexOf("clientTag=html5:v")&&(e+=D(e)+"clientTag=html5:v"+(t||"3.14.5-canary.0-b8ba362")),e}function O(e,t){var n;S(e,t);var r=t.sources,i=t.session&&t.session.id,a=null==(n=K())?void 0:n.productVersion;Object.values(l.StreamType).forEach((function(e){r[e]&&r[e].forEach((function(e){"string"==typeof e.url&&e.url.toLowerCase().indexOf("playmanifest/")>-1&&!e.localSource&&(e.url=x(e.url,i),e.url=P(e.url),e.url=R(e.url,a)),e.drmData&&e.drmData.length&&e.drmData.forEach((function(e){"string"==typeof e.licenseUrl&&[T,A,w].every((function(t){return e.licenseUrl.includes(t)}))&&(e.licenseUrl=x(e.licenseUrl,i,"sessionId="),e.licenseUrl=R(e.licenseUrl,a),e.licenseUrl=P(e.licenseUrl),e.licenseUrl=function(e,t){var n=l.Utils.Object.getPropertyPath(t,"provider.uiConfId");return-1===e.indexOf("uiConfId=")&&"number"==typeof n&&(e+=D(e)+"uiConfId="+n),e}(e.licenseUrl,t))}))}))}))}n(319);var L=function(){function e(e){void 0===e&&(e={}),e.observedThresholds=e.observedThresholds||U,e.playerThreshold="number"==typeof e.playerThreshold?e.playerThreshold:F,this._config=e,this._eventManager=new l.EventManager,this._targetsObserved=new l.Utils.MultiMap;var t={threshold:e.observedThresholds.map((function(e){return e/100}))};this._observer=new window.IntersectionObserver(this._intersectionChangedHandler.bind(this),t),this._initTabVisibility()}var t=e.prototype;return t._intersectionChangedHandler=function(e){var t=this;e.forEach((function(e){t._targetsObserved.get(e.target).forEach((function(t){var n=e.intersectionRatio>=t.threshold;t.lastIntersectionRatio=e.intersectionRatio,n!==t.lastVisible&&(t.lastVisible=n,t.listener(n,M.VIEWPORT))}))}))},t._handleTabVisibilityChange=function(){var e=this;this._isTabVisible=!document[this._visibilityTabHiddenAttr],this._targetsObserved.getAll().forEach((function(t){t.lastVisible&&t.listener(e._isTabVisible,M.TAB)}))},t._initTabVisibility=function(){void 0!==document.hidden?(this._visibilityTabHiddenAttr="hidden",this._visibilityTabChangeEventName="visibilitychange"):void 0!==document.msHidden?(this._visibilityTabHiddenAttr="msHidden",this._visibilityTabChangeEventName="msvisibilitychange"):void 0!==document.webkitHidden&&(this._visibilityTabHiddenAttr="webkitHidden",this._visibilityTabChangeEventName="webkitvisibilitychange"),this._visibilityTabHiddenAttr&&this._visibilityTabChangeEventName&&(this._eventManager.listen(document,this._visibilityTabChangeEventName,this._handleTabVisibilityChange.bind(this)),this._isTabVisible=!document[this._visibilityTabHiddenAttr])},t.observe=function(e,t,n){if(this._observer){var r="number"==typeof n?n:this._config.playerThreshold,i=new N(r/100,t);if(this._targetsObserved.has(e)){var a=this._targetsObserved.get(e)[0].lastIntersectionRatio;void 0!==a&&(i.lastIntersectionRatio=a,i.listener(this._isTabVisible&&a>=i.threshold,M.VIEWPORT))}else this._observer.observe(e);this._targetsObserved.push(e,i)}},t.unObserve=function(e,t){this._observer&&(this._targetsObserved.remove(e,t),this._targetsObserved.has(e)||this._observer.unobserve(e))},t.destroy=function(){this._observer&&(this._eventManager.destroy(),this._observer.disconnect(),this._targetsObserved.clear())},e}(),M={VIEWPORT:"viewport",TAB:"tab"},N=function(e,t){this.threshold=e,this.listener=t},U=[0,10,20,30,40,50,60,70,80,90,100],F=50,j=[];function B(e){if(!e)throw new Error(f);!function(e){if(!e)throw new Error(h);var t=document.getElementById(e);if(!t)throw new Error(g+e);if(t.getElementsByClassName("kaltura-player-container").length>0)throw new Error(y+e)}(e.targetId)}function V(e){l.Utils.Object.getPropertyPath(e,"ui.log")||l.Utils.Object.createPropertyPath(e,"ui.log",{}),l.Utils.Object.getPropertyPath(e,"provider.log")||l.Utils.Object.createPropertyPath(e,"provider.log",{}),l.Utils.Object.getPropertyPath(e,"log")||l.Utils.Object.createPropertyPath(e,"log",{}),e.log&&"function"==typeof e.log.handler&&(Object(l.setLogHandler)(e.log.handler),e.ui.log.handler=e.provider.log.handler=e.log.handler);var t=l.LogLevel.ERROR;!e.log||!0!==window.DEBUG_KALTURA_PLAYER&&""!==H("debugKalturaPlayer")?e.log&&e.log.level&&l.LogLevel[e.log.level]&&(t=l.LogLevel[e.log.level]):(t=l.LogLevel.DEBUG,e.log.level=l.LogLevel.DEBUG.name),e.ui.log.level=e.provider.log.level=t.name,Object(l.setLogLevel)(t)}function H(e){var t;window.URLSearchParams?t=new URLSearchParams(window.location.search).get(e):t=function(e){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search),n=location.search.indexOf(e)>-1;return null===t?n?"":null:decodeURIComponent(t[1].replace(/\+/g," "))}(e);return t}function K(){return window.__kalturaplayerdata||{}}function G(e){var t=function(e){var t=document.createElement("div");t.id=l.Utils.Generator.uniqueId(5),t.className="kaltura-player-container",t.setAttribute("tabindex","-1");var n=document.getElementById(e);return n&&t&&n.appendChild(t),t.id}(e.targetId),n={targetId:e.targetId,provider:{partnerId:e.provider.partnerId},ui:{targetId:t},plugins:{},advertising:{adBreaks:[]},viewability:{observedThresholds:U,playerThreshold:F}};if(l.Utils.Object.mergeDeep(n,e),!e.provider.ignoreServerConfig){var r=l.Utils.Object.copyDeep(K());delete r.productVersion,n=l.Utils.Object.mergeDeep({},z(r),n)}return function(e){if(l.Env.isMacOS&&l.Env.isSafari||l.Env.isIOS){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.preferNative.hls")&&l.Utils.Object.mergeDeep(e,{playback:{preferNative:{hls:!0}}})}}(n),function(e){if(l.Env.isMacOS&&l.Env.isSafari||l.Env.isIOS){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"text.useNativeTextTrack")&&l.Utils.Object.mergeDeep(e,{text:{useNativeTextTrack:!0}})}}(n),function(e){var t=l.Utils.Object.getPropertyPath(e,"plugins.kava");t||(t=l.Utils.Object.mergeDeep(e,{plugins:{kava:{}}}))}(n),function(e){if(l.Env.isSmartTV){if(Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!0}),function(e){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.playAdsWithMSE")&&(e=l.Utils.Object.createPropertyPath(e,"playback.playAdsWithMSE",!0));var t=l.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload"),n=l.Utils.Object.getPropertyPath(e,"plugins.bumper.disableMediaPreload");e.plugins&&e.plugins.ima&&"boolean"!=typeof t&&(e=l.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0));e.plugins&&e.plugins.bumper&&"boolean"!=typeof n&&(e=l.Utils.Object.createPropertyPath(e,"plugins.bumper.disableMediaPreload",!0))}(e),function(e){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.liveSyncDurationCount")&&l.Env.isSafari&&(e=l.Utils.Object.createPropertyPath(e,"playback.options.html5.hls.liveSyncDurationCount",2))}(e),e.plugins&&e.plugins.ima){var t=l.Utils.Object.getPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds"),n=l.Utils.Object.getPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected");"boolean"!=typeof t&&(e=l.Utils.Object.createPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds",!0)),"boolean"!=typeof n&&(e=l.Utils.Object.createPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected",!0))}if(e.plugins&&e.plugins.youbora)"number"!=typeof l.Utils.Object.getPropertyPath(e,"plugins.youbora.playheadMonitorInterval")&&(e=l.Utils.Object.createPropertyPath(e,"plugins.youbora.playheadMonitorInterval",2e3));"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"streaming.lowLatencyMode")&&(e=l.Utils.Object.createPropertyPath(e,"streaming.lowLatencyMode",!1))}}(n),function(e){if("Edge"===l.Env.browser.name){l.Utils.Object.getPropertyPath(e,"drm.keySystem")||(e="Windows"===l.Env.os.name?l.Utils.Object.createPropertyPath(e,"drm.keySystem",l.DrmScheme.PLAYREADY):l.Utils.Object.createPropertyPath(e,"drm.keySystem",l.DrmScheme.WIDEVINE))}}(n),function(e){if(l.Env.isIOS&&e.plugins&&e.plugins.ima&&!e.plugins.ima.disable){var t=l.Utils.Object.getPropertyPath(e,"playback.playsinline"),n=l.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload");!1===t&&"boolean"!=typeof n&&l.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0)}}(n),function(e){if(e.plugins&&e.plugins.imadai&&!e.plugins.imadai.disable){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.autoStartLoad")&&l.Utils.Object.mergeDeep(e,{playback:{options:{html5:{hls:{autoStartLoad:!1}}}}})}}(n),function(e){var t=l.Utils.Object.getPropertyPath(e,"plugins.bumper"),n=l.Utils.Object.getPropertyPath(e,"plugins.imadai");if(t){var r={};"boolean"!=typeof t.playOnMainVideoTag&&(l.Env.isSmartTV||l.Env.isIOS&&e.playback&&!1===e.playback.playsinline)&&(r.playOnMainVideoTag=!0),n&&!n.disable&&(Array.isArray(t.position)||(r.position=[0]),"boolean"!=typeof t.disableMediaPreload&&(r.disableMediaPreload=!0)),l.Utils.Object.mergeDeep(e,{plugins:{bumper:r}})}}(n),function(e){var t=l.Utils.Object.getPropertyPath(e,"plugins.vr");if(t&&!t.disable){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.inBrowserFullscreen")&&l.Utils.Object.mergeDeep(e,{playback:{inBrowserFullscreen:!0}})}}(n),function(e){if(l.Env.isIOS){var t=l.Utils.Object.getPropertyPath(e,"playback.playsinline"),n=l.Utils.Object.hasPropertyPath(e,"plugins.airplay"),r=!1!==t;n?Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!1,mutedAutoPlay:r}):"iPhone"!==l.Env.device.model||r||Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!1,mutedAutoPlay:!1})}}(n),n}function z(e){return function(){if(e.player){j.push({level:"warn",msg:"Path config.player will be deprecated soon. Please update your config structure as describe here: https://github.com/kaltura/kaltura-player-js/blob/master/docs/configuration.md"});var t=l.Utils.Object.copyDeep(e.player);delete e.player,l.Utils.Object.mergeDeep(e,t)}}(),[["duration","sources.duration"],["type","sources.type"],["dvr","sources.dvr"],["id","sources.id"],["name","metadata.name"],["metadata.poster","sources.poster"],["metadata","sources.metadata"],["logLevel","log.level"],["ui.components.fullscreen.inBrowserFullscreenForIOS","playback.inBrowserFullscreen"],["playback.enableCEA708Captions","text.enableCEA708Captions"],["playback.useNativeTextTrack","text.useNativeTextTrack"],["playback.options.html5.dash.useShakaTextTrackDisplay","text.useShakaTextTrackDisplay"],["playback.captionsTextTrack1Label","text.captionsTextTrack1Label"],["playback.captionsTextTrack1LanguageCode","text.captionsTextTrack1LanguageCode"],["playback.captionsTextTrack2Label","text.captionsTextTrack2Label"],["playback.captionsTextTrack2LanguageCode","text.captionsTextTrack2LanguageCode"],["plugins.visibility.threshold","viewability.playerThreshold"],["plugins.visibility.floating","plugins.floating"],["playback.startTime","sources.startTime"]].forEach((function(t){return function(t,n){if(l.Utils.Object.hasPropertyPath(e,t))if(j.push({level:"warn",msg:"Path config.player."+t+" will be deprecated soon. Please update your config structure as describe here: https://github.com/kaltura/kaltura-player-js/blob/master/docs/configuration.md"}),l.Utils.Object.hasPropertyPath(e,n))l.Utils.Object.deletePropertyPath(e,t);else{var r=l.Utils.Object.getPropertyPath(e,t),i=l.Utils.Object.createPropertyPath({},n,r);l.Utils.Object.mergeDeep(e,i),l.Utils.Object.deletePropertyPath(e,t)}}(t[0],t[1])})),e}function W(e,t,n){var r=e.config.playback,i=!1;return r.streamPriority.forEach((function(e){e.engine===t&&(i=!0)})),i||r.streamPriority.push({engine:t,format:n}),r}function Y(e){var t=e&&e.progressive;return!(!t||!t[0]||"video/youtube"!==t[0].mimetype)}function q(e){var t=e&&e.image;return!(!t||!t[0])}function X(e,t){var n={},r={};return l.Utils.Object.isObject(e)&&Object.entries(e).forEach((function(e){var i=e[0],a=e[1];n[i]={},r[i]={},Object.entries(a).forEach((function(e){var a=e[0],o=e[1],s=l.Utils.Object.getPropertyPath(t[i],a);n[i][a]=s||o,r[i][a]=s}))})),[n,r]}function $(e,t){for(var n=0;n registration failed, either plugin is not an instance of BasePlugin or plugin handler is not a function"),!1):e._registry.has(t)?(e._logger.debug("Plugin <"+t+"> is already registered, do not register again"),!1):(e._registry.set(t,n),e._logger.debug("Plugin <"+t+"> has been registered successfully"),!0)},e.unRegister=function(t){e._registry.has(t)&&(e._registry.delete(t),e._logger.debug("Unregistered <"+t+"> plugin."))};var t=e.prototype;return t.load=function(t,n,r){if(void 0===r&&(r={}),!e._registry.has(t))throw e._logger.warn("Plugin <"+t+"> loading failed, plugin is not registered"),new l.Error(l.Error.Severity.RECOVERABLE,l.Error.Category.PLAYER,l.Error.Code.RUNTIME_ERROR_NOT_REGISTERED_PLUGIN,t);var i=e._registry.get(t);"boolean"==typeof r.disable&&this._isDisabledPluginMap.set(t,r.disable);var a=!!this._isDisabledPluginMap.get(t),o=!!i&&i.isValid();if(i&&o&&!a){try{this._plugins[t]=i.createPlugin(t,n,r)}catch(e){throw new l.Error(l.Error.Severity.RECOVERABLE,l.Error.Category.PLAYER,l.Error.Code.PLUGIN_LOAD_FAILED,e)}return this._isDisabledPluginMap.set(t,!1),e._logger.debug("Plugin <"+t+"> has been loaded"),!0}return e._logger.debug("Plugin <"+t+"> isn't loaded, isValid()="+o.toString()+", disabled="+a.toString()),!1},t.loadMedia=function(){var e=this;Object.keys(this._plugins).forEach((function(t){return e._plugins[t].loadMedia()}))},t.destroy=function(){var e=this;Object.keys(this._plugins).forEach((function(t){e._plugins[t].destroy(),delete e._plugins[t]}))},t.reset=function(){var e=this;Object.keys(this._plugins).forEach((function(t){return e._plugins[t].reset()}))},t.get=function(e){return this._plugins[e]},t.getAll=function(){return this._plugins},e}();J(ee,"_logger",Object(l.getLogger)("PluginManager")),J(ee,"_registry",new Map);var te=ee.register,ne={youbora:{playerVersion:"{{pVersion}}",playerName:"{{pName}}",entryId:"{{entryId}}",entryName:"{{entryName}}",entryType:"{{entryType}}",sessionId:"{{sessionId}}",uiConfId:"{{uiConfId}}"},googleAnalytics:{entryId:"{{entryId}}",entryName:"{{entryName}}",uiConfId:"{{uiConfId}}",partnerId:"{{partnerId}}"},ottAnalytics:{entryId:"{{entryId}}",ks:"{{ks}}",isAnonymous:"{{isAnonymous}}",partnerId:"{{partnerId}}",serviceUrl:"{{serviceUrl}}"},ima:{playerVersion:"{{pVersion}}",playerName:"{{pName}}"},kava:{playerVersion:"{{pVersion}}",playerName:"{{pName}}",partnerId:"{{partnerId}}",playlistId:"{{playlistId}}",entryId:"{{entryId}}",entryType:"{{entryType}}",sessionId:"{{sessionId}}",ks:"{{ks}}",uiConfId:"{{uiConfId}}",referrer:"{{referrer}}",encodedReferrer:"{{encodedReferrer}}",serviceUrl:"{{analyticsServiceUrl}}"},comscore:{playerVersion:"{{pVersion}}"},vr:{rootElement:"{{domRootElementId}}"},share:{partnerId:"{{partnerId}}",uiConfId:"{{uiConfId}}",entryId:"{{entryId}}",embedBaseUrl:"{{embedBaseUrl}}"}},re=new RegExp("{{.*}}");function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ae(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe=function(e){var t,n;function r(){var t;return ae(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call(this)||this),"_ovpPluginsConfig",{ottAnalytics:{}}),t._config=l.Utils.Object.mergeDeep({},t._basePluginsConfig,t._ovpPluginsConfig),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ie(t,n),r}(function(){function e(){this._basePluginsConfig=l.Utils.Object.copyDeep(ne)}var t=e.prototype;return t.get=function(){return this._config},t.set=function(e){if(e){var t=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var r=n[0],i=n[1];return l.Utils.Object.isObject(i)?t[r]=e(i):"string"==typeof i&&re.test(i)?t[r]=i:t[r]=void 0,t}),{})}(e);this._config=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var r=n[0],i=n[1];return l.Utils.Object.isObject(i)?t[r]=e(i):i&&(t[r]=i),t}),{})}(l.Utils.Object.mergeDeep(this._config,t))}},t.reset=function(){this._config=l.Utils.Object.copyDeep(ne)},e}());var se=function(e,t){void 0===t&&(t={});try{var n,r=e;for(var i in t){var a=void 0!==t[i]&&null!==t[i]?t[i]:"";"string"==typeof a&&a.indexOf('"')>-1&&(a=a.replace(/"/g,'\\"')),n=new RegExp("{{"+i+"}}","g"),r=r.replace(n,a)}return r}catch(e){return""}},le=Object(l.getLogger)("PluginsConfig"),ue=function(e){return("number"==typeof e||"function"==typeof e||"string"==typeof e||"boolean"==typeof e||l.Utils.Object.isClassInstance(e))&&!re.test(e.toString())},ce=function(e){return l.Utils.Object.isObject(e)&&"function"!=typeof e&&!l.Utils.Object.isClassInstance(e)},pe=function(e){return e.map((function(e){if(ce(e)){var t=de(e);return l.Utils.Object.isEmptyObject(t)?null:t}return ue(e)?e:null})).filter((function(e){return null!==e}))},de=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var r=n[0],i=n[1];return ce(i)?t[r]=e(i):Array.isArray(i)?t[r]=pe(i):ue(i)&&(t[r]=i),t}),{})};var fe=function(){function e(){this._pluginConfigStore=new oe}return e.prototype.evaluatePluginsConfig=function(e,t){if(e){this._pluginConfigStore.set(e);var n=function(e){var t,n={pVersion:(null==(t=K())?void 0:t.productVersion)||"3.14.5-canary.0-b8ba362",pName:"@playkit-js/kaltura-player-js"};if(e.targetId&&(n.domRootElementId=e.targetId),e.provider&&e.provider.env){n.serviceUrl=e.provider.env.serviceUrl;var r=l.Utils.Object.getPropertyPath(e,"provider.env.analyticsServiceUrl");r&&(n.analyticsServiceUrl=r+"/api_v3/index.php"),n.serviceUrl&&(n.embedBaseUrl=n.serviceUrl.replace("api_v3",""))}var i,a={referrer:I(),encodedReferrer:(i=I(),encodeURIComponent(i))};return e.provider&&l.Utils.Object.mergeDeep(a,{ks:e.provider.ks,uiConfId:e.provider.uiConfId,partnerId:e.provider.partnerId}),e.session&&l.Utils.Object.mergeDeep(a,{sessionId:e.session.id,ks:e.session.ks,isAnonymous:e.session.isAnonymous,uiConfId:e.session.uiConfId,partnerId:e.session.partnerId}),e.sources&&l.Utils.Object.mergeDeep(a,{entryId:e.sources.id,entryName:e.sources.metadata&&e.sources.metadata.name,entryType:e.sources.type}),e.playlist&&l.Utils.Object.mergeDeep(a,{playlistId:e.playlist.id}),Object.keys(a).forEach((function(e){void 0===a[e]&&delete a[e]})),l.Utils.Object.mergeDeep(n,a),n}(t),r=l.Utils.Object.mergeDeep({},this._pluginConfigStore.get(),e);!function(e,t){var n=de(t),r=de(e);r&&n&&Object.keys(e).forEach((function(t){e&&e[t]&&(e[t]=l.Utils.Object.mergeDeep({},n[t],r[t]))}))}(e,function(e){var t,n;e=(n=e)?n.replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f").replace(/[\u0000-\u0019]+/g,""):"";try{t=JSON.parse(e,(function(e){try{return JSON.parse(this[e])}catch(t){return this[e]}}))}catch(e){le.error("An error occurred while formatting config string.",e),t={}}return t}(se(JSON.stringify(r),n)))}},e}();function he(){return(he=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1?e.config.sources.startTime:e.currentTime}function Ue(e,t){var n=t.getActiveTracks();if(n[e])return n[e].language;try{return t.config.playback[e+"Language"]}catch(e){return null}}function Fe(e,t){for(var n=0;n0){var i=n.plugins.ima.adTagUrl;r={adTagUrl:""},this._eventManager.listen(this,l.EventType.FIRST_PLAYING,(function(){return t.configure({plugins:{ima:{adTagUrl:i}}})}))}}else r={delayInitUntilSourceSelected:!0};l.Utils.Object.mergeDeep(n,{plugins:{ima:r}}),this._localPlayer.destroy(),this._remotePlayer=null,this._localPlayer=Object(l.loadPlayer)(n)}else this._remotePlayer=null;Object.values(l.EventType).forEach((function(e){return t._eventManager.listen(t._localPlayer,e,(function(e){return t.dispatchEvent(e)}))})),this._uiWrapper=new ke(this,this.config),this._uiWrapper.setConfig({isCastAvailable:this.isCastAvailable()},"engine")}function ht(e){var t=e.sources.startTime,n=e.playback.autoplay;this.configure({sources:{startTime:t},playback:{autoplay:n}})}function gt(e){if(e.captions.length){var t=e.captions;this.configure({sources:{captions:t}})}}function yt(e){if(e.audioLanguage){var t=this.getTracks(l.TrackType.AUDIO).find((function(t){return t.language===e.audioLanguage}));this.selectTrack(t)}if(e.textLanguage){var n=this.getTracks(l.TrackType.TEXT).find((function(t){return t.language===e.textLanguage}));this.selectTrack(n)}}function vt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(it,"_logger",Object(l.getLogger)("RemoteControl"));var mt=function(){function e(){vt(this,"_remotePlayers",new Map)}e.register=function(t,n){"function"==typeof n?e._registry.has(t)?e._logger.debug("Remote player of type "+t+" is already registered"):(e._logger.debug("Register remote player of type "+t),e._registry.set(t,n)):e._logger.debug("remote player must be instance of BaseRemotePlayer")};var t=e.prototype;return t.load=function(t,n){var r=this;e._registry.forEach((function(i,a){e._logger.debug("Load remote player of type "+a);var o=new i(t,new it(n),n.config.targetId);r._remotePlayers.set(a,o)}))},t.startCasting=function(t){e._logger.debug("Start casting");var n=this._getRemotePlayer(t);return n?n.startCasting():Promise.reject()},t.isCastAvailable=function(t){var n=this._getRemotePlayer(t);return!!n&&(e._logger.debug("isCastAvailable: "+n.isCastAvailable()),n.isCastAvailable())},t.destroy=function(){var e=this._remotePlayers;Array.from(e.values()).forEach((function(e){return e.destroy()}))},t.setIsCastInitiator=function(e,t){var n=this._getRemotePlayer(e);n&&(n.isCastInitiator=t)},t._getRemotePlayer=function(e){var t=this._remotePlayers;return e&&t.get(e)?t.get(e):t.size>0?Array.from(t.values())[0]:void 0},e}();function bt(e,t){for(var n=0;n0)}},{key:"vpaid",get:function(){return this._vpaid}},{key:"streamId",get:function(){return this._streamId}},{key:"wrapperAdIds",get:function(){return this._wrapperAdIds}},{key:"wrapperCreativeIds",get:function(){return this._wrapperCreativeIds}},{key:"wrapperAdSystems",get:function(){return this._wrapperAdSystems}}])&&kt(t.prototype,n),r&&kt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var St=function(){function e(t){var n=this;wt(this,"_prebid",null),this._loadPromise=l.Utils.Object.defer(),this._loadPromise.catch((function(){return e._logger.warn("Prebid SDK failed to load")})),t?(this._config=t,this._loadPrebidSDKLib(this._config.libUrl).then((function(){n._isPrebidSDKLibLoaded()?(n._prebid=window.pbjs,n._loadPromise.resolve()):n._loadPromise.reject()})).catch((function(){n._loadPromise.reject()}))):this._loadPromise.reject()}var t=e.prototype;return t._isPrebidSDKLibLoaded=function(){return window.pbjs&&window.pbjs.que},t._loadPrebidSDKLib=function(e){return this._isPrebidSDKLibLoaded()?Promise.resolve():l.Utils.Dom.loadScriptAsync(e)},t._load=function(t){var n=this;return new Promise((function(r,i){n._loadPromise.then((function(){var a=setTimeout(i,t.timeout||4e3);n._prebid.que.push((function(){n._prebid.addAdUnits(t.adUnit),t.options&&n._prebid.setConfig(t.options),n._prebid.requestBids({bidsBackHandler:function(o){if(e._logger.debug("returned bids",o),clearTimeout(a),t.params){var s={};t.adUnit&&(s.adUnit=t.adUnit),s.params=t.params;var l=n._prebid.adServers.dfp.buildVideoUrl(s);r([{vastUrl:l}])}else try{var u=o[t.adUnit.code||Object.keys(o)[0]].bids;r(u)}catch(e){i()}}})}))})).catch(i)}))},t.load=function(e){return this._load(e||this._config)},e}();function Ct(e,t){return(Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}wt(St,"_logger",Object(l.getLogger)("PrebidManager"));var It=function(e){var t,n;function r(t){var n;return xt(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n=e.call(this)||this),"id","AdLayoutMiddleware"),n._context=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ct(t,n);var i=r.prototype;return i.load=function(e){var t=this;this._context.prerollReady.then((function(){return t.callNext(e)}))},i.play=function(e){var t=this;this._context.prerollReady.then((function(){return t.callNext(e)}))},r}(l.BaseMiddleware);function Pt(){return(Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t0}))&&e._handleConfiguredMidrolls()}))):this.prerollReady=Promise.resolve()},s._validateOneTimeConfig=function(e){"number"==typeof e.position&&("number"==typeof e.percentage&&(r._logger.warn("Validate ad break - ignore percentage "+e.percentage+" as position "+e.position+" configured"),delete e.percentage),"number"==typeof e.every&&(r._logger.warn("Validate ad break - ignore every "+e.every+" as position "+e.position+" configured"),delete e.every)),"number"==typeof e.percentage&&"number"==typeof e.every&&(r._logger.warn("Validate ad break - ignore every "+e.every+" as percentage "+e.percentage+" configured"),delete e.every)},s._dispatchAdManifestLoaded=function(){var e=this,t=Array.from(new Set(this._configAdBreaks.map((function(e){return e.every&&e.every+"s"||"number"==typeof e.percentage&&e.percentage+"%"||e.position}))));r._logger.debug(l.AdEventType.AD_MANIFEST_LOADED,t),this._player.dispatchEvent(new l.FakeEvent(l.AdEventType.AD_MANIFEST_LOADED,{adBreaksPosition:t})),this._player.hasService("timeline")&&this._player.config.advertising.showAdBreakCuePoint&&t.forEach((function(t){e._player.getService("timeline").addCuePoint(Pt({time:-1!==t?t:1/0},e._player.config.advertising.adBreakCuePointStyle))}))},s._handlePrebidAdConfig=function(){var e=this;this._prebidManager&&this._configAdBreaks.filter((function(e){return!e.played})).map((function(t){var n=Promise.all(t.ads.map((function(t){return e._getPrebidAds(t)})));t.loadedPromise=n,n.then((function(e){return t.ads=e}))}))},s._getPrebidAds=function(e){var t=this;return new Promise((function(n){if(e.prebid&&t._prebidManager){var r=l.Utils.Object.mergeDeep({},e.prebid,t._player.config.advertising.prebid);t._prebidManager.load(r).then((function(t){var r=t.map((function(e){return e&&e.vastUrl}));e.url=r.concat(e.url),n(e)})).catch((function(){n(e)}))}else n(e)}))},s._handleConfiguredPreroll=function(){var e=this._configAdBreaks.filter((function(e){return 0===e.position&&!e.played})),t=this._mergeAdBreaks(e);this.prerollReady=t&&t.loadedPromise?t.loadedPromise:Promise.resolve(),t&&this._playAdBreak(t)},s._handleEveryAndPercentage=function(){var e=this;this._configAdBreaks.forEach((function(t){if(e._player.duration&&t.every)for(var n=2*t.every;n<=e._player.duration;)e._configAdBreaks.push({position:n,ads:t.ads,played:!1,loadedPromise:Promise.resolve()}),n+=t.every;else e._player.duration&&t.percentage&&!t.position&&(t.position=Math.floor(e._player.duration*t.percentage/100))}))},s._attachLiveSeekedHandler=function(){var e=this;this._eventManager.listenOnce(this._player,l.CustomEventType.FIRST_PLAYING,(function(){e._eventManager.listen(e._player,l.Html5EventType.SEEKING,(function(){e._liveSeeking=!0})),e._eventManager.listen(e._player,l.Html5EventType.SEEKED,(function(){e._liveSeeking=!1,e._pushNextAdsForLive(e._configAdBreaks,(function(t){return e._player.currentTime+t.every}))}))}))},s._pushNextAdsForLive=function(e,t){this._liveEventManager.removeAll();var n=[];e.forEach((function(e){if(![-1,0].includes(e.position)){var i=e.every,a=e.ads,o={every:i,position:t(e),ads:a,played:!1,loadedPromise:Promise.resolve()};r._logger.debug("Pushing next ad for live",o),n.push(o)}})),n.length&&(this._configAdBreaks=[].concat(n,this._configAdBreaks.filter((function(e){return-1===e.position}))))},s._handleConfiguredMidrolls=function(){var e=this;this._eventManager.listen(this._player,l.Html5EventType.TIME_UPDATE,(function(){if(!e._player.paused&&!e._liveSeeking){var t=e._configAdBreaks.filter((function(t){return!t.played&&e._player.currentTime&&t.position<=e._player.currentTime&&t.position>e._snapback}));if(t.length){var n=t[t.length-1].position,i=t.filter((function(e){return e.position===n}));if(e._player.isLive())!e._player.isDvr()||e._player.isOnLiveEdge()&&e._player.config.advertising.returnToLive?e._handleReturnToLive(i):e._pushNextAdsForLive(i,(function(t){return(e._player.isOnLiveEdge()?e._player.currentTime:t.position)+t.every}));else e._snapback=n,r._logger.debug("Set snapback value "+e._snapback),e._eventManager.listen(e._player,l.Html5EventType.SEEKED,(function(){var t=e._configAdBreaks.findIndex((function(t){return t.played&&"number"==typeof e._player.currentTime&&e._player.currentTime0&&!e._configAdBreaks[t-1].played&&(e._snapback=0,r._logger.debug("Reset snapback value"))}));var a=e._mergeAdBreaks(i);a&&e._playAdBreak(a)}}}))},s._handleReturnToLive=function(e){var t=this;this._liveEventManager.listenOnce(this._player,l.AdEventType.AD_ERROR,(function(){t._pushNextAdsForLive(e,(function(e){return(t._player.isOnLiveEdge()?t._player.currentTime:e.position)+e.every}))})),this._liveEventManager.listenOnce(this._player,l.AdEventType.AD_BREAK_END,(function(){t._player.seekToLiveEdge()}))},s._playAdBreak=function(e){var t=this._adsPluginControllers.find((function(e){return"function"==typeof e.playAdNow}));t?(e.played=!0,this._adIsLoading=!0,r._logger.debug("Playing ad break positioned in "+e.position),e.loadedPromise.then((function(){return t.playAdNow(e.ads)}))):r._logger.warn("No ads plugin registered")},s._onAdManifestLoaded=function(e){this._adBreaksLayout=Array.from(new Set(this._adBreaksLayout.concat(e.payload.adBreaksPosition))).sort(),this._allAdsCompleted=!1},s._onAdBreakStart=function(e){this._adBreak=e.payload.adBreak},s._onAdLoaded=function(){this._adIsLoading=!1},s._onAdStarted=function(e){this._ad=e.payload.ad,this._adPlayed=!0,this._isAdPlaying=!0},s._onAdBreakEnd=function(){this._adBreak=null,this._ad=null},s._onAdsCompleted=function(){this._adsPluginControllers.every((function(e){return e.done}))&&this._configAdBreaks.every((function(e){return e.played}))&&(this._allAdsCompleted=!0,r._logger.debug(l.AdEventType.ALL_ADS_COMPLETED),this.dispatchEvent(new l.FakeEvent(l.AdEventType.ALL_ADS_COMPLETED)))},s._onAdError=function(e){this._adIsLoading=!1,e.payload.severity===l.Error.Severity.CRITICAL&&(this._isAdPlaying=!1,this._adsPluginControllers.every((function(e){return e.done}))&&this._configAdBreaks.every((function(e){return e.played}))&&(this._allAdsCompleted=!0,this._adPlayed&&(r._logger.debug(l.AdEventType.ALL_ADS_COMPLETED),this.dispatchEvent(new l.FakeEvent(l.AdEventType.ALL_ADS_COMPLETED)))))},s._isBumper=function(e){return"bumper"===e.name},s._onEnded=function(){var e=this;if(!this._adIsLoading){var t=this._adsPluginControllers.find((function(t){return e._isBumper(t)})),n=this._adsPluginControllers.find((function(t){return!e._isBumper(t)&&!t.done})),r=t&&"function"==typeof t.onPlaybackEnded?function(){return t.onPlaybackEnded()}:function(){return Promise.resolve()},i=n&&"function"==typeof n.onPlaybackEnded?function(){return n.onPlaybackEnded()}:function(){return Promise.resolve()};this._adBreaksLayout.includes(-1)||this._adBreaksLayout.includes("100%")||(this._allAdsCompleted=!0),r().finally((function(){i().finally((function(){return e._handleConfiguredPostroll()}))}))}},s._onPlaybackEnded=function(){this._configAdBreaks.forEach((function(e){return e.played=!0}))},s._handleConfiguredPostroll=function(){var e=this._configAdBreaks.filter((function(e){return!e.played&&-1===e.position}));if(e.length){var t=this._mergeAdBreaks(e);t&&this._playAdBreak(t)}this._configAdBreaks.forEach((function(e){return e.played=!0}))},s._reset=function(){this._eventManager.removeAll(),this._liveEventManager.removeAll(),this._init()},s._destroy=function(){this._adsPluginControllers=[],this._eventManager.destroy(),this._liveEventManager.destroy()},s._mergeAdBreaks=function(e){if(e.length)return e.forEach((function(e){return e.played=!0})),{position:e[0].position,ads:e.reduce((function(e,t){return e.concat(t.ads)}),[]),played:!1,loadedPromise:Promise.all(e.map((function(e){return e.loadedPromise})))}},i=r,(a=[{key:"allAdsCompleted",get:function(){return this._allAdsCompleted}}])&&Dt(i.prototype,a),o&&Dt(i,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(l.FakeEventTarget);!function(e,t,n){(t=Ot(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Lt,"_logger",Object(l.getLogger)("AdsController"));var Mt=function(){function e(e){this._pluginManager=e}return e.prototype.getAdsControllers=function(){return Object.values(this._pluginManager.getAll()).filter((function(e){return"function"==typeof e.getAdsController})).map((function(e){return e.getAdsController()}))},e}();function Nt(e,t){return(Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ut(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ft=function(e){var t,n;function r(t){var n;return Ut(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n=e.call(this)||this),"id","PluginReadinessMiddleware"),n._plugins=t,r._logger.debug("plugins readiness",n._plugins),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Nt(t,n);var i=r.prototype;return i.load=function(e){this._checkNextSettle(0,e)},i._checkNextSettle=function(e,t){e=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function Wt(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Yt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Wt(a,r,i,o,s,"next",e)}function s(e){Wt(a,r,i,o,s,"throw",e)}o(void 0)}))}}var qt=[["widevine","com.widevine.alpha"],["playready","com.microsoft.playready"],["fairplay","com.apple.fps"]],Xt=Object(l.getLogger)("MediaCapabilities"),$t=1,Qt=0,Zt=-1;function Jt(){return(Jt=Yt(zt().mark((function e(t){var n,r,i;return zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Xt.debug("Starting to get media capabilities..."),e.next=4,nn(t);case 4:return r=e.sent,e.next=7,en();case 7:return i=e.sent,n=Object.assign({},r,i),Xt.debug("Finished getting media capabilities ",{mediaCapabilities:n}),e.abrupt("return",n);case 13:return e.prev=13,e.t0=e.catch(0),Xt.debug("There was a problem with getting the media capabilities, ",e.t0.message),n={isHEVCSupported:Qt,isPowerEfficient:Qt,isDRMSupported:Qt,supportedDRMs:[]},Xt.debug("Returning media capabilities defaults ",{mediaCapabilities:n}),e.abrupt("return",n);case 19:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function en(){return tn.apply(this,arguments)}function tn(){return(tn=Yt(zt().mark((function e(){var t,n,r,i,a,o,s,l;return zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={isDRMSupported:Zt,supportedDRMs:[]},navigator.requestMediaKeySystemAccess){e.next=3;break}return e.abrupt("return",t);case 3:n=[{initDataTypes:["cenc"],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}],r=new Map(qt),i=Kt(r);case 6:if((a=i()).done){e.next=19;break}return o=a.value,s=o[0],l=o[1],e.prev=8,e.next=11,navigator.requestMediaKeySystemAccess(l,n);case 11:t.supportedDRMs.push(s),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),Xt.debug(l+" not supported ("+e.t0.name+": "+e.t0.message+").");case 17:e.next=6;break;case 19:return t.isDRMSupported=t.supportedDRMs.length>0?$t:Qt,e.abrupt("return",t);case 21:case"end":return e.stop()}}),e,null,[[8,14]])})))).apply(this,arguments)}function nn(e){return rn.apply(this,arguments)}function rn(){return(rn=Yt(zt().mark((function e(t){var n,r,i;return zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={isHEVCSupported:Zt,isPowerEfficient:Zt},navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo){e.next=3;break}return e.abrupt("return",n);case 3:return r={type:"media-source",video:{contentType:'video/mp4; codecs="hvc1.1.6.L150.90"',width:(null==t?void 0:t.width)||1920,height:(null==t?void 0:t.height)||1080,bitrate:(null==t?void 0:t.bitrate)||12e5,framerate:(null==t?void 0:t.framerate)||30}},e.prev=4,e.next=7,navigator.mediaCapabilities.decodingInfo(r);case 7:i=e.sent,n.isHEVCSupported=i.supported?$t:Qt,n.isPowerEfficient=i.powerEfficient?$t:Qt,e.next=17;break;case 12:e.prev=12,e.t0=e.catch(4),Xt.debug("Failed to get the media capabilities from navigator. ("+e.t0.name+": "+e.t0.message+")."),n.isHEVCSupported=Zt,n.isPowerEfficient=Zt;case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[4,12]])})))).apply(this,arguments)}var an=function(e){return Jt.apply(this,arguments)};function on(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */on=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),s=new w(i||[]);return r(o,"_invoke",{value:E(e,n,s)}),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function d(){}function f(){}function h(){}var g={};l(g,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==t&&n.call(v,a)&&(g=v);var m=h.prototype=d.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var i;r(this,"_invoke",{value:function(r,a){function o(){return new t((function(i,o){!function r(i,a,o,s){var l=c(e[i],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(p).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,s)}))}s(l.arg)}(r,a,i,o)}))}return i=i?i.then(o,o):o()}})}function E(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return C()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function sn(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function ln(){return(ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t0)},s.isImage=function(){return q(this.sources)},s.seekToLiveEdge=function(){this._localPlayer.seekToLiveEdge()},s.getStartTimeOfDvrWindow=function(){return this._localPlayer.getStartTimeOfDvrWindow()},s.getTracks=function(e){return this._localPlayer.getTracks(e)},s.getActiveTracks=function(){return this._localPlayer.getActiveTracks()},s.selectTrack=function(e){this._localPlayer.selectTrack(e)},s.hideTextTrack=function(){this._localPlayer.hideTextTrack()},s.showTextTrack=function(){this._localPlayer.showTextTrack()},s.enableAdaptiveBitrate=function(){this._localPlayer.enableAdaptiveBitrate()},s.isAdaptiveBitrateEnabled=function(){return this._localPlayer.isAdaptiveBitrateEnabled()},s.setTextDisplaySettings=function(e){this._localPlayer.setTextDisplaySettings(e)},s.isFullscreen=function(){return this._localPlayer.isFullscreen()},s.notifyEnterFullscreen=function(){this._localPlayer.notifyEnterFullscreen()},s.notifyExitFullscreen=function(){this._localPlayer.notifyExitFullscreen()},s.enterFullscreen=function(e){var t=e||this.config.ui.targetId;this._localPlayer.enterFullscreen(t)},s.exitFullscreen=function(){this._localPlayer.exitFullscreen()},s.enterPictureInPicture=function(){this._localPlayer.enterPictureInPicture()},s.exitPictureInPicture=function(){this._localPlayer.exitPictureInPicture()},s.isInPictureInPicture=function(){return this._localPlayer.isInPictureInPicture()},s.isPictureInPictureSupported=function(){return this._localPlayer.isPictureInPictureSupported()},s.getLogLevel=function(e){return this._localPlayer.getLogLevel(e)},s.startCasting=function(e){var t=this;return this.setIsCastInitiator(e,!0),new Promise((function(n,r){t.remotePlayerManager.startCasting(e).then(n).catch((function(){t.setIsCastInitiator(e,!1),r()}))}))},s.setIsCastInitiator=function(e,t){this._remotePlayerManager.setIsCastInitiator(e,t)},s.isCastAvailable=function(e){return this._remotePlayerManager.isCastAvailable(e)},s.getCastSession=function(){return null},s.stopCasting=function(){},s.isCasting=function(){return!1},s.isVr=function(){return this._localPlayer.isVr()},s.toggleVrStereoMode=function(){var e=this._pluginManager.get("vr");e&&"function"==typeof e.toggleVrStereoMode&&e.toggleVrStereoMode()},s.isInVrStereoMode=function(){var e=this._pluginManager.get("vr");return!(!e||"function"!=typeof e.isInStereoMode)&&e.isInStereoMode()},s.setLogLevel=function(e,t){this._localPlayer.setLogLevel(e,t)},s.getThumbnail=function(e){if(!e){if(isNaN(this.currentTime))return null;e=this.currentTime}if(e=this.isLive()?e+this.getStartTimeOfDvrWindow():e,this._thumbnailManager)return this._thumbnailManager.getThumbnail(e)},s._addBindings=function(){var e=this;this._eventManager.listen(this,l.EventType.CHANGE_SOURCE_STARTED,(function(){return e._onChangeSourceStarted()})),this._eventManager.listen(this,l.EventType.CHANGE_SOURCE_ENDED,(function(){return e._onChangeSourceEnded()})),this._eventManager.listen(this,l.EventType.PLAYER_RESET,(function(){return e._onPlayerReset()})),this._eventManager.listen(this,l.EventType.ENDED,(function(){return e._onEnded()})),this._eventManager.listen(this,l.EventType.FIRST_PLAY,(function(){return e._firstPlay=!1})),this._eventManager.listen(this,l.EventType.SOURCE_SELECTED,(function(t){return e._sourceSelected=t.payload.selectedSource[0]})),this._eventManager.listen(this,l.EventType.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this,l.EventType.PLAYBACK_START,(function(){e._playbackStart=!0})),this._eventManager.listen(this,l.AdEventType.AD_AUTOPLAY_FAILED,(function(t){return e._onAdAutoplayFailed(t)})),this._eventManager.listen(this,l.AdEventType.AD_STARTED,(function(){return e._onAdStarted()})),this.config.playback.playAdsWithMSE&&(this._attachEventManager=new l.EventManager,this._eventManager.listen(this,l.AdEventType.AD_LOADED,(function(t){var n=t.payload.ad;n&&n.linear&&1===n.position&&!n.inStream&&e.src?(e._attachEventManager.listenOnce(e,l.AdEventType.AD_BREAK_START,(function(){return e.detachMediaSource()})),e._attachEventManager.listenOnce(e,l.AdEventType.AD_BREAK_END,(function(){return e.attachMediaSource()})),e._attachEventManager.listenOnce(e,l.AdEventType.AD_ERROR,(function(){return e.attachMediaSource()}))):e._attachEventManager.removeAll()}))),this._eventManager.listen(this,l.EventType.ERROR,(function(t){t.payload.severity===l.Error.Severity.CRITICAL&&(e._reset=!1)}))},s._onChangeSourceEnded=function(){l.Utils.Object.getPropertyPath(this.config,"ui.targetId")?this._viewabilityManager.observe(l.Utils.Dom.getElementById(this.config.ui.targetId),this._handleVisibilityChange.bind(this)):r._logger.warn("Cannot observe visibility change without config.ui.targetId")},s._onPlayerReset=function(){this._playbackStart=!1,l.Utils.Object.getPropertyPath(this.config,"ui.targetId")&&this._viewabilityManager.unObserve(l.Utils.Dom.getElementById(this.config.ui.targetId),this._handleVisibilityChange.bind(this))},s._onChangeSourceStarted=function(){this._configureOrLoadPlugins(this._pluginsConfig),this.reset(),this._pluginManager.loadMedia(),this._reset=!1},s._onEnded=function(){var e=this;setTimeout((function(){e._adsController&&!e._adsController.allAdsCompleted?e._eventManager.listenOnce(e._adsController,l.AdEventType.ALL_ADS_COMPLETED,(function(){e.dispatchEvent(new l.FakeEvent(l.EventType.PLAYBACK_ENDED))})):e.dispatchEvent(new l.FakeEvent(l.EventType.PLAYBACK_ENDED))}))},s._onPlaybackEnded=function(){this.config.playback.loop&&(this.currentTime=0,this.play())},s._onAdStarted=function(){this._firstPlay&&(this._localPlayer.posterManager.hide(),this._localPlayer.hideBlackCover())},s._onAdAutoplayFailed=function(e){this._firstPlay&&this.config.playback.autoplay&&(this._localPlayer.posterManager.show(),this.dispatchEvent(new l.FakeEvent(l.EventType.AUTOPLAY_FAILED,e.payload)))},s._configureOrLoadPlugins=function(e){var t=this;void 0===e&&(e={});var n=[],r=[],i=[];Object.keys(e).forEach((function(a){var o=t._pluginManager.get(a);if(o)o.updateConfig(e[a]),e[a]=o.getConfig();else if(t._sourceSelected)delete e[a];else{try{t._pluginManager.load(a,t,e[a])}catch(e){t.dispatchEvent(new l.FakeEvent(l.Error.Code.ERROR,e))}var s=t._pluginManager.get(a);s&&(i.push(s),e[a]=s.getConfig(),"function"==typeof s.getMiddlewareImpl&&("bumper"===s.name?n.push(s.getMiddlewareImpl()):n.unshift(s.getMiddlewareImpl())),"function"==typeof s.getUIComponents&&r.push.apply(r,s.getUIComponents()||[]),"function"==typeof s.getEngineDecorator&&t._localPlayer.registerEngineDecoratorProvider(new l.EngineDecoratorProvider(s)))}})),r.forEach((function(e){return t._uiWrapper.addComponent(e)})),this._pluginReadinessMiddleware||(this._pluginReadinessMiddleware=new Ft(i),this._localPlayer.playbackMiddleware.use(this._pluginReadinessMiddleware)),this._maybeCreateAdsController(),n.forEach((function(e){return t._localPlayer.playbackMiddleware.use(e)})),l.Utils.Object.mergeDeep(this._pluginsConfig,e)},s._maybeCreateAdsController=function(){var e=this;if(!this._adsController){var t=this._controllerProvider.getAdsControllers();t.length&&(this._adsController=new Lt(this,t),this._localPlayer.playbackMiddleware.use(this._adsController.getMiddleware()),this._eventManager.listen(this._adsController,l.AdEventType.ALL_ADS_COMPLETED,(function(t){e.dispatchEvent(t)})))}},s.attachMediaSource=function(){this._localPlayer.attachMediaSource()},s.detachMediaSource=function(){this._localPlayer.detachMediaSource()},s._resetProviderPluginsConfig=function(){this.configure({plugins:this._appPluginConfig}),this._appPluginConfig={}},s._handleVisibilityChange=function(e){this._isVisible=e,this.dispatchEvent(new l.FakeEvent("visibilitychange",{visible:this._isVisible})),this.config.playback.autoplay===l.AutoPlayType.IN_VIEW&&this._isVisible&&!this._playbackStart&&this._localPlayer.play({programmatic:!0}),!0===this.config.playback.autopause&&this._handleAutoPause(e)},s._handleAutoPause=function(e){var t=!this.paused||this._adsController&&this._adsController.isAdPlaying(),n=!this.isInPictureInPicture()&&this._playbackStart&&t;e?this._autoPaused&&(this.paused&&this.play(),this._autoPaused=!1):n&&(this.pause(),this._autoPaused=!0)},s.getService=function(e){return this._serviceProvider.get(e)},s.hasService=function(e){return this._serviceProvider.has(e)},s.registerService=function(e,t){this._serviceProvider.register(e,t)},s.addTextTrack=function(e,t){return this._localPlayer.addTextTrack(e,t)},s.getNativeTextTracks=function(){return this._localPlayer.getNativeTextTracks()},s.getMediaCapabilities=function(){var e,t=(e=on().mark((function e(t){return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",an(t));case 1:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){sn(a,r,i,o,s,"next",e)}function s(e){sn(a,r,i,o,s,"throw",e)}o(void 0)}))});return function(e){return t.apply(this,arguments)}}(),i=r,(a=[{key:"textDisplaySetting",get:function(){return this._localPlayer.textDisplaySetting}},{key:"textStyle",get:function(){return this._localPlayer.textStyle},set:function(e){this._localPlayer.textStyle=e}},{key:"buffered",get:function(){return this._localPlayer.buffered}},{key:"stats",get:function(){return this._localPlayer.stats}},{key:"currentTime",get:function(){return this._localPlayer.currentTime},set:function(e){this._localPlayer.currentTime=e}},{key:"duration",get:function(){return this._localPlayer.duration}},{key:"liveDuration",get:function(){return this._localPlayer.liveDuration}},{key:"normalizedCurrentTime",get:function(){return this.isLive()?this.currentTime-this.getStartTimeOfDvrWindow():this.currentTime},set:function(e){this.isLive()?this.currentTime=e+this.getStartTimeOfDvrWindow():this.currentTime=e}},{key:"normalizedDuration",get:function(){return this.isLive()?this.liveDuration-this.getStartTimeOfDvrWindow():this.duration}},{key:"volume",get:function(){return this._localPlayer.volume},set:function(e){this._localPlayer.volume=e}},{key:"paused",get:function(){return this._localPlayer.paused}},{key:"seeking",get:function(){return this._localPlayer.seeking}},{key:"playsinline",get:function(){return this._localPlayer.playsinline},set:function(e){this._localPlayer.playsinline=e}},{key:"muted",get:function(){return this._localPlayer.muted},set:function(e){this._localPlayer.muted=e}},{key:"src",get:function(){return this._localPlayer.src}},{key:"videoHeight",get:function(){return this._localPlayer.videoHeight}},{key:"videoWidth",get:function(){return this._localPlayer.videoWidth}},{key:"dimensions",get:function(){return this._localPlayer.dimensions},set:function(e){this._localPlayer.dimensions=e}},{key:"poster",get:function(){return this._localPlayer.poster}},{key:"ended",get:function(){return this._localPlayer.ended}},{key:"playbackRate",get:function(){return this._localPlayer.playbackRate},set:function(e){this._localPlayer.playbackRate=e}},{key:"playbackRates",get:function(){return this._localPlayer.playbackRates}},{key:"defaultPlaybackRate",get:function(){return this._localPlayer.defaultPlaybackRate}},{key:"engineType",get:function(){return this._localPlayer.engineType}},{key:"streamType",get:function(){return this._localPlayer.streamType}},{key:"env",get:function(){return this._localPlayer.env}},{key:"selectedSource",get:function(){return this._sourceSelected}},{key:"sources",get:function(){return ln({},this._localPlayer.sources)}},{key:"config",get:function(){return ln({},this._localPlayer.config,{plugins:this._pluginsConfig,sources:this._localPlayer.sources})}},{key:"hasUserInteracted",get:function(){return this._localPlayer.hasUserInteracted}},{key:"loadingMedia",set:function(e){this._localPlayer.loadingMedia=e}},{key:"ads",get:function(){return this._adsController}},{key:"plugins",get:function(){return this._pluginManager.getAll()}},{key:"provider",get:function(){return this._provider}},{key:"ui",get:function(){return this._uiWrapper}},{key:"playlist",get:function(){return this._playlistManager}},{key:"Event",get:function(){return ln({Cast:Le,Core:l.EventType,Playlist:Te,UI:u.EventType},l.EventType,{VISIBILITY_CHANGE:"visibilitychange"})}},{key:"TextStyle",get:function(){return this._localPlayer.TextStyle}},{key:"ViewabilityType",get:function(){return M}},{key:"State",get:function(){return this._localPlayer.State}},{key:"Track",get:function(){return this._localPlayer.Track}},{key:"LogLevelType",get:function(){return this._localPlayer.LogLevelType}},{key:"LogLevel",get:function(){return this._localPlayer.LogLevel}},{key:"AbrMode",get:function(){return this._localPlayer.AbrMode}},{key:"MediaType",get:function(){return this._localPlayer.MediaType}},{key:"StreamType",get:function(){return this._localPlayer.StreamType}},{key:"EngineType",get:function(){return this._localPlayer.EngineType}},{key:"Error",get:function(){return this._localPlayer.Error}},{key:"crossOrigin",get:function(){return this._localPlayer.crossOrigin},set:function(e){this._localPlayer.crossOrigin=e}},{key:"isVisible",get:function(){return this._isVisible}},{key:"viewabilityManager",get:function(){return this._viewabilityManager}},{key:"cuePointManager",get:function(){return this._cuepointManager}},{key:"remotePlayerManager",get:function(){return this._remotePlayerManager}}])&&un(i.prototype,a),o&&un(i,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(l.FakeEventTarget);dn(hn,"_logger",Object(l.getLogger)("KalturaPlayer"+l.Utils.Generator.uniqueId(5)));var gn={};function yn(){return gn}function vn(e){return gn[e]?gn[e]:null}var mn=["_remotePlayer","_listeners","_uiWrapper"],bn={get:function(e,t){if("destroy"===t){var n=e.config.targetId;delete gn[n]}return t in l.FakeEventTarget.prototype||mn.includes(t)?e[t]:e._remotePlayer&&t in e._remotePlayer?e._remotePlayer[t]:e[t]},set:function(e,t,n){return e._remotePlayer&&!mn.includes(t)?t in e._remotePlayer&&(e._remotePlayer[t]=n):e[t]=n,!0}};function _n(e){!function(e){!1!==l.Utils.Object.getPropertyPath(e,"log.playerVersion")&&(Object(l.setLogLevel)(l.LogLevel.INFO),Object(l.getLogger)().log("%c @playkit-js/kaltura-player-js 3.14.5-canary.0-b8ba362","color: #ff98f9; font-size: large"),Object(l.getLogger)().log("%c For more details see https://github.com/kaltura/kaltura-player-js","color: #ff98f9;"))}(e),B(e=z(e));var t=G(e);!function(e){var t,n=e.provider,r=null==(t=K())?void 0:t.productVersion;if(!n.partnerId||2504201===n.partnerId){var i={url:"https://analytics.kaltura.com/api_v3/index.php?service=analytics&action=trackEvent&apiVersion=3.3.0&format=1&eventType=1&partnerId=2504201&entryId=1_3bwzbc9o&&eventIndex=1&position=0",mimetype:""};i.url=function(e,t){return t&&(e+="&clientVer="+t),e}(i.url,r),i.url=P(i.url),i.url=R(i.url,r),i.url=x(i.url,l.Utils.Generator.guid()+":"+l.Utils.Generator.guid()),navigator.sendBeacon&&navigator.sendBeacon(i.url)}}(t),V(t),function(e){var t=parseFloat(H("kalturaStartTime"));isNaN(t)||l.Utils.Object.createPropertyPath(e,"sources.startTime",t)}(t),j.forEach((function(e){return Object(l.getLogger)("KalturaPlayer:Setup")[e.level](e.msg)})),function(e){!e.disableUserCache&&k.isLocalStorageAvailable()&&k.hasStorage()&&l.Utils.Object.mergeDeep(e,k.getStorageConfig())}(t);var n=function(e){var t=new hn(e),n=new Proxy(t,bn);return gn[e.targetId]=n,n}(t);return function(e){if(!e.config.disableUserCache&&k.isLocalStorageAvailable()){var t=k.getPlayerTextStyle();t&&(e.textStyle=l.Utils.Object.mergeDeep(new l.TextStyle,t))}}(n),function(e){k.isLocalStorageAvailable()&&k.attach(e)}(n),function(e,t){e.cast&&t.remotePlayerManager.load(e.cast,t)}(t,n),function(e){if(l.Env.isIOS||l.Env.isIPadOS){var t=function t(){e.removeEventListener(e.Event.UI.UI_CLICKED,t),Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!0})};e.addEventListener(e.Event.SOURCE_SELECTED,(function n(){e.removeEventListener(e.Event.SOURCE_SELECTED,n),e.addEventListener(e.Event.UI.UI_CLICKED,t)}))}}(n),n}var En=function(){function e(){}return e.toCastTextStyle=function(t){if(window.chrome&&window.chrome.cast){var n=new window.chrome.cast.media.TextTrackStyle;return n.fontFamily=t.fontFamily,n.backgroundColor=e.rgbToHex(t.backgroundColor),n.foregroundColor=e.rgbToHex(t.fontColor),n.fontScale=Number.parseFloat(t.fontSize)/100,n}return{}},e.toPlayerTextStyle=function(t){var n=new l.TextStyle;return n.fontFamily=t.fontFamily,n.fontSize=100*t.fontScale+"%",n.fontColor=e.hexToRGB(t.foregroundColor),n.backgroundColor=e.hexToRGB(t.backgroundColor),n},e.rgbToHex=function(e){var t="#"+("0"+parseInt(e[0],10).toString(16)).slice(-2)+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2);if(e[3]){var n=e[3];n=Math.round(100*n)/100,t+=(Math.round(255*n)+65536).toString(16).substr(-2).toUpperCase()}else t+="FF";return t.toUpperCase()},e.hexToRGB=function(e){for(var t=[],n=(e=e.slice(1)).match(/.{1,2}/g),r=0;r<3;r++){var i=n&&n[r];i&&t.push(parseInt(i,16))}return t},e}();function kn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Tn(e,t)}function Tn(e,t){return(Tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var An={ACTION:"action",EVENT:"event"},wn=function(e){this.type=e},Sn=function(e){function t(t,n){var r;return(r=e.call(this,An.EVENT)||this).event=t,r.payload=n,r}return kn(t,e),t}(wn),Cn=function(e){function t(t,n){var r;return(r=e.call(this,An.ACTION)||this).action=t,r.args=n,r}return kn(t,e),t}(wn),xn={registerRemotePlayer:mt.register,PlayerSnapshot:Me,RemoteControl:it,RemoteSession:Be,BaseRemotePlayer:ze,RemoteConnectedPayload:tt,RemoteDisconnectedPayload:nt,RemoteAvailablePayload:rt,RemotePlayerUI:qe,CastEventType:Le,RemotePlayerType:{CHROMECAST:"chromecast"},TextStyleConverter:En,CustomEventMessage:Sn,CustomActionMessage:Cn,CustomMessageType:An,CustomActionType:{SKIP_AD:"skipAd"},CustomMessage:wn},In={PlaylistEventType:Te},Pn="@playkit-js/kaltura-player-js",Dn="ovp",Rn="3.14.5-canary.0-b8ba362";r.a.installAll(),l.Ad=At,l.AdBreak=Et,l.BasePlugin=Z,l.registerPlugin=te}]); - -var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.kalturaCuepoints=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=31)}([function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1),t),i(n(17),t),i(n(40),t),i(n(41),t),i(n(42),t),i(n(43),t),i(n(44),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCuePoint=void 0;var r=function(){function e(e){this.partnerData="",this.id=e.id,this.intId=e.intId,this.cuePointType=e.cuePointType,this.status=e.status,this.entryId=e.entryId,this.partnerId=e.partnerId,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.triggeredAt=e.triggeredAt,this.startTime=e.startTime;try{this.partnerData=JSON.parse(e.partnerData)}catch(e){}}return e.KalturaCuePointType={AD:"adCuePoint.Ad",ANNOTATION:"annotation.Annotation",CODE:"codeCuePoint.Code",EVENT:"eventCuePoint.Event",QUIZ_QUESTION:"quiz.QUIZ_QUESTION",THUMB:"thumbCuePoint.Thumb",CAPTION:"kalturaCaption"},e.KalturaCuePointStatus={READY:1,DELETED:2,HANDLED:3,PENDING:4},e}();t.KalturaCuePoint=r},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i1?{type:l[i],data:e.substring(1)}:{type:l[i]}:d}i=new Uint8Array(e)[0];var o=s(e,1);return y&&"blob"===n&&(o=new y([o])),{type:l[i],data:o}},t.decodeBase64Packet=function(e,t){var n=l[e.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:e.substr(1)}};var i=r.decode(e.substr(1));return"blob"===t&&y&&(i=new y([i])),{type:n,data:i}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var i=o(e);if(n&&i)return y&&!p?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r);if(!e.length)return r("0:");g(e,(function(e,r){t.encodePacket(e,!!i&&n,!1,(function(e){r(null,function(e){return e.length+":"+e}(e))}))}),(function(e,t){return r(t.join(""))}))},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var i;if("function"==typeof n&&(r=n,n=null),""===e)return r(d,0,1);for(var o,s,a="",u=0,c=e.length;u0;){for(var a=new Uint8Array(i),u=0===a[0],c="",h=1;255!==a[h];h++){if(c.length>310)return r(d,0,1);c+=a[h]}i=s(i,2+c.length),c=parseInt(c);var p=s(i,0,c);if(u)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(e){var f=new Uint8Array(p);p="";for(h=0;h=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(10))},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,i=n.length;r=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(10))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],h=!1,p=-1;function f(){h&&u&&(h=!1,u.length?c=u.concat(c):p=-1,c.length&&l())}function l(){if(!h){var e=a(f);h=!0;for(var t=c.length;t;){for(u=c,c=[];++p1)for(var n=1;n - * @license MIT + * Bundle builder 2.2.4/5c718c1 + * Created at Thu Dec 19 2024 13:52:27 GMT+0000 (Coordinated Universal Time) + * ------------------- + * Kaltura Player lib + * kaltura-ovp-player v3.17.32-canary.0-eb5c085 + * playkit-kaltura-cuepoints v3.0.15-canary.0-e770541 + * playkit-kava v1.8.4-canary.0-2d7a6e8 + * playkit-timeline v3.0.21-canary.0-42fe274 + * playkit-ui-managers v1.6.4-canary.0-69b8931 */ -var r=n(66),i=n(67),o=n(68);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return D(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=n;oa&&(n=a-u),o=n;o>=0;o--){for(var p=!0,f=0;fi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(h=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,p=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=p}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),h=e.slice(t,n),p=0;pi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return P(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function F(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function x(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function B(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return o||B(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function M(e,t,n,r,o){return o||B(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||S(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||S(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||S(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||S(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||S(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||S(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||S(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||S(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||S(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||S(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||S(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||S(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||S(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||S(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||S(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||S(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(65))},function(e,t,n){var r=n(71),i=n(14);e.exports=function(e){var t=e.xdomain,n=e.xscheme,o=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(e){}if(!t)try{return new(i[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},function(e,t){e.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(e,t,n){var r=n(3),i=n(2);function o(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=o,i(o.prototype),o.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},o.prototype.onPacket=function(e){this.emit("packet",e)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},l.prototype.cleanup=function(){c("cleanup");for(var e=this.subs.length,t=0;t=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();c("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(c("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(c("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(c("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},l.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){var r=n(13),i=n(72),o=n(82),s=n(83);t.polling=function(e){var t=!1,n=!1,s=!1!==e.jsonp;if("undefined"!=typeof location){var a="https:"===location.protocol,u=location.port;u||(u=a?443:80),t=e.hostname!==location.hostname||u!==e.port,n=e.secure!==a}if(e.xdomain=t,e.xscheme=n,"open"in new r(e)&&!e.forceJSONP)return new i(e);if(!s)throw new Error("JSONP disabled");return new o(e)},t.websocket=s},function(e,t,n){var r=n(15),i=n(7),o=n(3),s=n(8),a=n(26),u=n(9)("engine.io-client:polling");e.exports=h;var c=null!=new(n(13))({xdomain:!1}).responseType;function h(e){var t=e&&e.forceBase64;c&&!t||(this.supportsBinary=!1),r.call(this,e)}s(h,r),h.prototype.name="polling",h.prototype.doOpen=function(){this.poll()},h.prototype.pause=function(e){var t=this;function n(){u("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(u("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--r||n()}))),this.writable||(u("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){u("pre-pause writing complete"),--r||n()})))}else n()},h.prototype.poll=function(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},h.prototype.onData=function(e){var t=this;u("polling got data %s",e);o.decodePayload(e,this.socket.binaryType,(function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))},h.prototype.doClose=function(){var e=this;function t(){u("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))},h.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};o.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},h.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){(function(t){var r=n(74),i=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var i=0,a=n.length;i0);return t}function c(){var e=u(+new Date);return e!==r?(s=0,r=e):e+"."+u(s++)}for(;a<64;a++)o[i[a]]=a;c.encode=u,c.decode=function(e){var t=0;for(a=0;a0&&(u.snapshot.length!==n._activeCuePoints.length||(null===(r=u.snapshot[0])||void 0===r?void 0:r.id)!==(null===(o=n._activeCuePoints[0])||void 0===o?void 0:o.id)||(null===(s=u.snapshot[u.snapshot.length-1])||void 0===s?void 0:s.id)!==(null===(a=n._activeCuePoints[n._activeCuePoints.length-1])||void 0===a?void 0:a.id))&&n._setActiveCuePoints(u.snapshot),u.delta){var c=u.delta,h=c.show,p=c.hide;(h.length>0||p.length>0)&&(n._activeCuePoints=n._activeCuePoints.filter((function(e){return!p.find((function(t){return e.id===t.id}))})),n._setActiveCuePoints(i(n._activeCuePoints,h)))}}},this._eventManager.listen(this._player,this._player.Event.TIME_UPDATE,this._getActiveCuePoints)}return Object.defineProperty(e.prototype,"allCuePoints",{get:function(){return this._allCuePoints},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeCuePoints",{get:function(){return this._activeCuePoints},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this._engine=null,this._eventManager.unlisten(this._player,this._player.Event.TIME_UPDATE,this._getActiveCuePoints)},e}();t.CuePointManager=a},function(e,t){e.exports=KalturaPlayer},function(e,t,n){"use strict";var r,i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;te||e-o>this.reasonableSeekThreshold),a=r||null!==this.lastHandledTime&&this.lastHandledTime>e||null!=this.nextTimeToHandle&&e>=this.nextTimeToHandle,u=this.findClosestLastIndexByTime(e),c=u<0?0:this.cuepointChanges[u].time;if(!a)return t?{snapshot:this.createCuepointSnapshot(u,n)}:{delta:this.createEmptyDelta()};if(r||t||s){var h=this.createCuepointSnapshot(u,n);return this.updateInternals(c,u),{snapshot:h}}var p=this.createCuepointDelta(u,n);return this.updateInternals(c,u),{delta:p}},e.prototype.getCurrentCuepointSnapshot=function(){return this.lastHandledTimeIndex?this.createCuepointSnapshot(this.lastHandledTimeIndex):[]},e.prototype.createCuepointSnapshot=function(e,t){if(!this.enabled||e<0||!this.cuepointChanges||0===this.cuepointChanges.length)return[];for(var n=[],i=0;i<=e;i++){var o=this.cuepointChanges[i],s=n.indexOf(o.cuePoint);o.type===r.Show?-1===s&&n.push(o.cuePoint):-1!==s&&n.splice(s,1)}return t&&(n=n.filter(t)),n},e.prototype.createCuepointDelta=function(e,t){if(!this.enabled||!this.cuepointChanges||0===this.cuepointChanges.length)return this.createEmptyDelta();var n=this.lastHandledTimeIndex;if(null===n)return this.createEmptyDelta();for(var i=[],o=[],s=n+1;s<=e;s++){var a=this.cuepointChanges[s],u=i.indexOf(a.cuePoint);a.type===r.Show?-1===u&&i.push(a.cuePoint):-1!==u?i.splice(u,1):-1===o.indexOf(a.cuePoint)&&o.push(a.cuePoint)}return t&&(i=i.filter(t),o=o.filter(t)),{show:i,hide:o}},e.prototype.updateInternals=function(e,t){var n=this.cuepointChanges;if(n&&0!==n.length){var r=t>=n.length-1,i=null===t;this.lastHandledTime=e,this.lastHandledTimeIndex=t,this.nextTimeToHandle=i?n[0].time:r?n[n.length-1].time:n[t+1].time,this.isFirstTime=!1}},e.prototype.createEmptyDelta=function(){return{show:[],hide:[]}},e.prototype.binarySearch=function(e,t){if(!e||0===e.length)return null;if(te[e.length-1].time)return e.length-1;for(var n=0,r=e.length-1;n<=r;){var i=Math.floor((r+n+1)/2);if(te[i].time))return i;n=i+1}}return Math.min(n,r)},e.prototype.findClosestLastIndexByTime=function(e){var t=this.cuepointChanges,n=this.binarySearch(t,e);if(null===n)return-1;for(var r=t.length;n=0&&e.cuepointChanges.push({time:t.startTime,type:r.Show,cuePoint:t}),null!==t.endTime&&void 0!==t.endTime&&t.endTime>=0&&e.cuepointChanges.push({time:t.endTime,type:r.Hide,cuePoint:t})})),this.cuepointChanges.sort((function(e,t){return e.time0&&e.objects.map((function(e){var r=new t(e);n.cuePoints.push(r)}))};t.KalturaCuePointListResponse=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaQuizQuestionCuePoint=t.KalturaQuestionType=void 0;var o=n(1);!function(e){e[e.fillInBlank=5]="fillInBlank",e[e.goTo=7]="goTo",e[e.hotSpot=6]="hotSpot",e[e.multipleAnswerQuestion=4]="multipleAnswerQuestion",e[e.multipleChoiceAnswer=1]="multipleChoiceAnswer",e[e.openQuestion=8]="openQuestion",e[e.reflectionPoint=3]="reflectionPoint",e[e.trueFalse=2]="trueFalse"}(t.KalturaQuestionType||(t.KalturaQuestionType={}));var s=function(e){function t(t){var n=e.call(this,t)||this;return n.excludeFromScore=t.excludeFromScore,n.objectType=t.objectType,n.optionalAnswers=t.optionalAnswers,n.hint=t.hint,n.explanation=t.explanation,n.question=t.question,n.questionType=t.questionType,n.userId=t.userId,n}return i(t,e),t}(o.KalturaCuePoint);t.KalturaQuizQuestionCuePoint=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaHotspotCuePoint=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.text=t.text,n.endTime=t.endTime,n.tags=t.tags,n}return i(t,e),t}(n(1).KalturaCuePoint);t.KalturaHotspotCuePoint=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCaption=void 0;var r=n(1),i=function(e,t){this.cuePointType=r.KalturaCuePoint.KalturaCuePointType.CAPTION,this.id=t,this.startTime=e.startTime,this.endTime=e.endTime,this.content=e.content};t.KalturaCaption=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewChangeLoader=void 0;var r=n(0),i=n(17),o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){this._entryId="",this._requests=[],this._response={viewChangeCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new o(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaCodeCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.CODE},responseProfile:{type:1,fields:"id, startTime, endTime, partnerData, cuePointType, tags"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"viewchange"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,i.KalturaCodeCuePoint);n.totalCount&&(this._response.viewChangeCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.ViewChangeLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuizQuestionLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._entryId="",this._requests=[],this._response={quizQuestionCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new i(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaQuestionCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.QUIZ_QUESTION,orderBy:"+startTime"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"quiz-question"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaQuizQuestionCuePoint);n.totalCount&&(this._response.quizQuestionCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.QuizQuestionLoader=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HotspotLoader=void 0;var r=n(0),i=n(4),o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){this._entryId="",this._requests=[],this._response={hotspotCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new o(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.ANNOTATION,tagsLike:i.CuePointTags.HOTSPOT},responseProfile:{type:1,fields:"id, startTime, endTime, cuePointType, partnerData, text, tags"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"hotspot"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaHotspotCuePoint);n.totalCount&&(this._response.hotspotCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.HotspotLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._captionAssetId="",this._requests=[],this._response={captions:[]},this._captionAssetId=e.captionAssetId;var t=new Map,n=new i(t);n.service="caption_captionasset",n.action="serveAsJson",n.params={captionAssetId:this._captionAssetId},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"caption"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n,i=this,o=null===(n=null===(t=e[0])||void 0===t?void 0:t.data)||void 0===n?void 0:n.objects;o&&Array.isArray(o)&&(this._response.captions=o.map((function(e,t){return new r.KalturaCaption(e,i._captionAssetId+"-"+t)})))},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._captionAssetId},e}();t.CaptionLoader=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n>>0,1)}else this._wildcardEventListeners.splice(this._wildcardEventListeners.indexOf(t)>>>0,1)},e.prototype.emit=function(e){(this._eventListeners[e.type]||[]).slice().map((function(t){t(e)})),this._wildcardEventListeners.slice().map((function(t){t(e)}))},e}();t.EventsManager=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=t.getQnaUserId=t.getUserId=t.generateId=void 0;t.generateId=function(){return(new Date).getTime().toString(36)+Math.random().toString(36).slice(2)};function r(){return"undefined"==typeof Storage?i():((e=localStorage.getItem("anonymousUserId"))||(e=i(),localStorage.setItem("anonymousUserId",e)),e);var e}t.getUserId=r;function i(){return"##".concat("Guest").concat("HashSeparator").concat(function(){for(var e=(0,t.generateId)(),n="",r=0;r0},e}();t.PushNotificationLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketWrapper=void 0;var r=n(57),i=n(5),o=function(){function e(e,t){this._logger=t,this._listenKeys={},this._messageKeyToQueueKeyMap={},this._connected=!1,this._logger.info("Connecting to socket"),this._connectAndListenToSocket(e)}return e.prototype.destroy=function(){this._socket&&(this._socket.disconnect(),this._socket=null),this._listenKeys={},this._messageKeyToQueueKeyMap={},this._connected=!1},e.prototype._connectAndListenToSocket=function(t){var n=this;this._logger.info("connect to socket"),this._socket=r(t.url,{forceNew:!0,timeout:e.CONNECTION_TIMEOUT}),this._socket.on("validated",(function(){for(var e in n._connected=!0,n._listenKeys)n._logger.info("Emit listen to url"),n._socket.emit("listen",n._listenKeys[e].queueNameHash,n._listenKeys[e].queueKeyHash)})),this._socket.on("connected",(function(e,t){n._listenKeys[t]?(n._messageKeyToQueueKeyMap[e]=t,n._logger.info("Listening to queue")):n._logger.error("Cannot listen to queue, queueKeyHash not recognized")})),this._socket.on("message",(function(e,t){n._logger.debug("Cannot listen to queue, queueKeyHash not recognized"),n._messageKeyToQueueKeyMap[e]&&n._listenKeys[n._messageKeyToQueueKeyMap[e]]?n._listenKeys[n._messageKeyToQueueKeyMap[e]].onMessage.forEach((function(e){e(t)})):n._logger.error("couldn't find queueKey in map")})),this._socket.on("disconnect",(function(e){if(n._logger.info("push server was disconnected"),!i.isEmptyObject(n._listenKeys)){var r=t.onSocketDisconnect;r&&r(e)}})),this._socket.on("reconnect",(function(e){if(n._logger.info("push server was reconnected"),!i.isEmptyObject(n._listenKeys)){var r=t.onSocketReconnect;r&&r(e)}})),this._socket.on("reconnect_error",(function(e){n._logger.error("reconnection error")})),this._socket.on("errorMsg",(function(e){n._logger.error("error message recieved")}))},e.prototype.prepareForListening=function(e,t,n,r){this._listenKeys[n]?this._listenKeys[n].onMessage.push(r):this._listenKeys[n]={eventName:e,queueNameHash:t,queueKeyHash:n,onMessage:[r]},this._connected&&(this._logger.info("Listening to "+e),this._socket.emit("listen",t,n))},e.CONNECTION_TIMEOUT=6e5,e}();t.SocketWrapper=o},function(e,t,n){var r=n(58),i=n(11),o=n(22),s=n(6)("socket.io-client");e.exports=t=u;var a=t.managers={};function u(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i=r(e),u=i.source,c=i.id,h=i.path,p=a[c]&&h in a[c].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||p?(s("ignoring socket cache for %s",u),n=o(u,t)):(a[c]||(s("new io instance for %s",u),a[c]=o(u,t)),n=a[c]),i.query&&!t.query&&(t.query=i.query),n.socket(i.path,t)}t.protocol=i.protocol,t.connect=u,t.Manager=n(22),t.Socket=n(28)},function(e,t,n){var r=n(19),i=n(6)("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),i("parse %s",e),n=r(e));n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443"));n.path=n.path||"/";var o=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port,n.href=n.protocol+"://"+o+(t&&t.port===n.port?"":":"+n.port),n}},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(r){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(62)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(10))},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(20),i=n(21),o=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.deconstructPacket=function(e){var t=[],n=e.data,o=e;return o.data=function e(t,n){if(!t)return t;if(i(t)){var o={_placeholder:!0,num:n.length};return n.push(t),o}if(r(t)){for(var s=new Array(t.length),a=0;a0?s-4:s;for(n=0;n>16&255,u[h++]=t>>8&255,u[h++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[h++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[h++]=t>>8&255,u[h++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;sa?a:s+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function h(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){ -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,h=-7,p=n?i-1:0,f=n?-1:1,l=e[t+p];for(p+=f,o=l&(1<<-h)-1,l>>=-h,h+=a;h>0;o=256*o+e[t+p],p+=f,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+p],p+=f,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,r),o-=c}return(l?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,h=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:o-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+p>=1?f/u:f*Math.pow(2,1-p))*u>=2&&(s++,u/=2),s+p>=h?(a=0,s=h):s+p>=1?(a=(t*u-1)*Math.pow(2,i),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;e[n+l]=255&a,l+=d,a/=256,i-=8);for(s=s<0;e[n+l]=255&s,l+=d,s/=256,c-=8);e[n+l-d]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=n(70),e.exports.parser=n(3)},function(e,t,n){var r=n(23),i=n(2),o=n(9)("engine.io-client:socket"),s=n(27),a=n(3),u=n(19),c=n(7);function h(e,t){if(!(this instanceof h))return new h(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=u(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=u(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=c.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=!1!==t.withCredentials,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=h,h.priorWebsocketSuccess=!1,i(h.prototype),h.protocol=a.protocol,h.Socket=h,h.Transport=n(15),h.transports=n(23),h.parser=n(3),h.prototype.createTransport=function(e){o('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new r[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},h.prototype.open=function(){var e;if(this.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},h.prototype.setTransport=function(e){o("setting transport %s",e.name);var t=this;this.transport&&(o("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},h.prototype.probe=function(e){o('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,r=this;function i(){if(r.onlyBinaryUpgrades){var i=!this.supportsBinary&&r.transport.supportsBinary;n=n||i}n||(o('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(i){if(!n)if("pong"===i.type&&"probe"===i.data){if(o('probe transport "%s" pong',e),r.upgrading=!0,r.emit("upgrading",t),!t)return;h.priorWebsocketSuccess="websocket"===t.name,o('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(o("changing transport and sending upgrade packet"),f(),r.setTransport(t),t.send([{type:"upgrade"}]),r.emit("upgrade",t),t=null,r.upgrading=!1,r.flush())}))}else{o('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,r.emit("upgradeError",s)}})))}function s(){n||(n=!0,f(),t.close(),t=null)}function a(n){var i=new Error("probe error: "+n);i.transport=t.name,s(),o('probe transport "%s" failed because of error: %s',e,n),r.emit("upgradeError",i)}function u(){a("transport closed")}function c(){a("socket closed")}function p(e){t&&e.name!==t.name&&(o('"%s" works - aborting "%s"',e.name,t.name),s())}function f(){t.removeListener("open",i),t.removeListener("error",a),t.removeListener("close",u),r.removeListener("close",c),r.removeListener("upgrading",p)}h.priorWebsocketSuccess=!1,t.once("open",i),t.once("error",a),t.once("close",u),this.once("close",c),this.once("upgrading",p),t.open()},h.prototype.onOpen=function(){if(o("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){o("starting upgrade probes");for(var e=0,t=this.upgrades.length;er&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(n-t),s=t,a=0;s=55296&&t<=56319&&i=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function u(e,t){return o(e>>t&63|128)}function c(e,t){if(0==(4294967168&e))return o(e);var n="";return 0==(4294965248&e)?n=o(e>>6&31|192):0==(4294901760&e)?(a(e,t)||(e=65533),n=o(e>>12&15|224),n+=u(e,6)):0==(4292870144&e)&&(n=o(e>>18&7|240),n+=u(e,12),n+=u(e,6)),n+=o(63&e|128)}function h(){if(i>=r)throw Error("Invalid byte index");var e=255&n[i];if(i++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function p(e){var t,o;if(i>r)throw Error("Invalid byte index");if(i==r)return!1;if(t=255&n[i],i++,0==(128&t))return t;if(192==(224&t)){if((o=(31&t)<<6|h())>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if((o=(15&t)<<12|h()<<6|h())>=2048)return a(o,e)?o:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(o=(7&t)<<18|h()<<12|h()<<6|h())>=65536&&o<=1114111)return o;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,r=s(e),i=r.length,o=-1,a="";++o65535&&(i+=o((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=o(t);return i}(c)}}},function(e,t){!function(e){"use strict";t.encode=function(t){var n,r=new Uint8Array(t),i=r.length,o="";for(n=0;n>2],o+=e[(3&r[n])<<4|r[n+1]>>4],o+=e[(15&r[n+1])<<2|r[n+2]>>6],o+=e[63&r[n+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(t){var n,r,i,o,s,a=.75*t.length,u=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var h=new ArrayBuffer(a),p=new Uint8Array(h);for(n=0;n>4,p[c++]=(15&i)<<4|o>>2,p[c++]=(3&o)<<6|63&s;return h}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(e,t){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),i=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),o=n&&n.prototype.append&&n.prototype.getBlob;function s(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function a(e,t){t=t||{};var r=new n;return s(e).forEach((function(e){r.append(e)})),t.type?r.getBlob(t.type):r.getBlob()}function u(e,t){return new Blob(s(e),t||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,u.prototype=Blob.prototype),e.exports=r?i?Blob:u:o?a:void 0},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(24),i=n(8),o=n(14);e.exports=h;var s,a=/\n/g,u=/\\n/g;function c(){}function h(e){r.call(this,e),this.query=this.query||{},s||(s=o.___eio=o.___eio||[]),this.index=s.length;var t=this;s.push((function(e){t.onData(e)})),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",(function(){t.script&&(t.script.onerror=c)}),!1)}i(h,r),h.prototype.supportsBinary=!1,h.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},h.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},h.prototype.doWrite=function(e,t){var n=this;if(!this.form){var r,i=document.createElement("form"),o=document.createElement("textarea"),s=this.iframeId="eio_iframe_"+this.index;i.className="socketio",i.style.position="absolute",i.style.top="-1000px",i.style.left="-1000px",i.target=s,i.method="POST",i.setAttribute("accept-charset","utf-8"),o.name="d",i.appendChild(o),document.body.appendChild(i),this.form=i,this.area=o}function c(){h(),t()}function h(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='