shaka-player 3.3.1 → 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.csslintrc +11 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
- package/.github/pull_request_template.md +6 -34
- package/.github/workflows/build-and-test.yaml +130 -0
- package/.github/workflows/custom-actions/prep-for-appspot/action.yaml +56 -0
- package/.github/workflows/custom-actions/set-commit-status/action.yaml +41 -0
- package/.github/workflows/demo-version-index.yaml +29 -0
- package/.github/workflows/nightly-demo.yaml +42 -0
- package/.github/workflows/release-please.yaml +147 -0
- package/.github/workflows/safari-homedir-launcher.sh +18 -0
- package/.github/workflows/selenium-lab-tests.yaml +93 -0
- package/AUTHORS +2 -0
- package/CHANGELOG.md +1707 -1670
- package/CONTRIBUTING.md +2 -2
- package/CONTRIBUTORS +2 -0
- package/README.md +7 -7
- package/app-engine/README.md +9 -0
- package/app-engine/demo-version-index/README.md +14 -0
- package/app-engine/demo-version-index/app.yaml +2 -0
- package/app-engine/demo-version-index/main.py +162 -0
- package/app-engine/demo-version-index/requirements.txt +6 -0
- package/app-engine/demo-version-index/templates/index.html +114 -0
- package/app-engine/shaka-player-demo/README.md +18 -0
- package/app-engine/shaka-player-demo/app.yaml +61 -0
- package/app-engine/shaka-player-demo/main.py +95 -0
- package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
- package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
- package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
- package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
- package/app-engine/shaka-player-demo/posters/sources.txt +46 -0
- package/app-engine/shaka-player-demo/posters/standard.png +0 -0
- package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
- package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
- package/app-engine/shaka-player-demo/posters.py +110 -0
- package/app-engine/shaka-player-demo/requirements.txt +5 -0
- package/app-engine/shaka-player-demo/time.txt +1 -0
- package/build/README.md +1 -1
- package/build/checkversion.py +1 -1
- package/build/conformance.textproto +13 -0
- package/build/docker/Dockerfile +20 -0
- package/build/docker/docker-compose.yml +10 -0
- package/build/gendeps.py +18 -15
- package/build/generateTsDefs.py +2 -0
- package/build/shaka-lab.yaml +163 -0
- package/build/shakaBuildHelpers.py +4 -29
- package/build/test.py +93 -28
- package/build/types/polyfill +1 -0
- package/build/wrapper.template.js +2 -2
- package/demo/TengwarTelcontar.woff2 +0 -0
- package/demo/asset_card.js +1 -2
- package/demo/cast_receiver/index.html +1 -1
- package/demo/cast_receiver/receiver_app.css +14 -14
- package/demo/common/assets.js +2 -0
- package/demo/config.js +0 -1
- package/demo/custom.js +0 -1
- package/demo/customWarning.txt +2 -2
- package/demo/demo.less +29 -18
- package/demo/demo_uncompiled.js +1 -13
- package/demo/index.html +1 -1
- package/demo/main.js +3 -3
- package/dist/controls.css +3 -3
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +191 -194
- package/dist/demo.compiled.debug.map +4 -4
- package/dist/demo.compiled.js +191 -194
- package/dist/demo.compiled.map +4 -4
- package/dist/demo.css +1 -1
- package/dist/demo.css.map +1 -1
- package/dist/deps.js +233 -226
- package/dist/locales.js +32 -32
- package/dist/receiver.compiled.debug.js +43 -45
- package/dist/receiver.compiled.debug.map +4 -4
- package/dist/receiver.compiled.js +43 -45
- package/dist/receiver.compiled.map +4 -4
- package/dist/shaka-player.compiled.d.ts +250 -237
- package/dist/shaka-player.compiled.debug.d.ts +250 -237
- package/dist/shaka-player.compiled.debug.externs.js +31 -15
- package/dist/shaka-player.compiled.debug.js +252 -257
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +31 -15
- package/dist/shaka-player.compiled.js +844 -849
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +296 -292
- package/dist/shaka-player.ui.debug.d.ts +296 -292
- package/dist/shaka-player.ui.debug.externs.js +33 -26
- package/dist/shaka-player.ui.debug.js +345 -351
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +33 -26
- package/dist/shaka-player.ui.js +1002 -1008
- package/dist/shaka-player.ui.map +4 -4
- package/docs/design/REDESIGN.md +33 -33
- package/docs/design/bg-fetch.md +2 -2
- package/docs/design/codec_preferences.md +1 -1
- package/docs/design/dash-audio-channels.md +3 -3
- package/docs/design/dash-manifests.md +1 -1
- package/docs/design/gap-jumping.md +3 -3
- package/docs/design/preload.md +2 -2
- package/docs/tutorials/faq.md +8 -8
- package/docs/tutorials/index.json +1 -0
- package/docs/tutorials/plugins.md +3 -3
- package/docs/tutorials/selenium-grid-config.md +122 -0
- package/docs/tutorials/welcome.md +10 -2
- package/externs/cmcd.js +1 -1
- package/karma.conf.js +156 -45
- package/lib/abr/simple_abr_manager.js +12 -6
- package/lib/ads/ad_manager.js +1 -0
- package/lib/cast/cast_proxy.js +6 -4
- package/lib/cast/cast_receiver.js +3 -0
- package/lib/cea/cea608_data_channel.js +2 -2
- package/lib/cea/cea708_service.js +5 -4
- package/lib/cea/mp4_cea_parser.js +11 -5
- package/lib/cea/sei_processor.js +6 -3
- package/lib/dash/dash_parser.js +40 -30
- package/lib/dash/mpd_utils.js +4 -5
- package/lib/dash/segment_list.js +1 -2
- package/lib/dash/segment_template.js +3 -3
- package/lib/hls/hls_parser.js +11 -9
- package/lib/hls/manifest_text_parser.js +4 -3
- package/lib/media/adaptation_set.js +1 -2
- package/lib/media/content_workarounds.js +2 -2
- package/lib/media/drm_engine.js +3 -2
- package/lib/media/media_source_engine.js +3 -2
- package/lib/media/mp4_segment_index_parser.js +1 -4
- package/lib/media/playhead.js +2 -2
- package/lib/media/presentation_timeline.js +18 -8
- package/lib/media/quality_observer.js +17 -34
- package/lib/media/region_observer.js +39 -33
- package/lib/media/region_timeline.js +17 -19
- package/lib/media/streaming_engine.js +7 -7
- package/lib/media/time_ranges_utils.js +1 -3
- package/lib/media/video_wrapper.js +1 -1
- package/lib/net/networking_engine.js +5 -1
- package/lib/offline/storage.js +12 -13
- package/lib/player.js +65 -25
- package/lib/polyfill/all.js +2 -3
- package/lib/polyfill/encryption_scheme.js +1 -1
- package/lib/polyfill/media_capabilities.js +3 -3
- package/lib/polyfill/mediasource.js +1 -1
- package/lib/polyfill/symbol.js +46 -0
- package/lib/text/cue.js +1 -1
- package/lib/text/simple_text_displayer.js +2 -1
- package/lib/text/ttml_text_parser.js +8 -5
- package/lib/text/ui_text_displayer.js +1 -1
- package/lib/util/buffer_utils.js +1 -3
- package/lib/util/ebml_parser.js +3 -3
- package/lib/util/error.js +1 -1
- package/lib/util/fake_event_target.js +21 -1
- package/lib/util/iterables.js +0 -46
- package/lib/util/mp4_box_parsers.js +1 -4
- package/lib/util/mp4_parser.js +5 -7
- package/lib/util/periods.js +10 -11
- package/lib/util/platform.js +3 -3
- package/lib/util/pssh.js +1 -4
- package/lib/util/stream_utils.js +4 -3
- package/lib/util/string_utils.js +3 -5
- package/lib/util/uint8array_utils.js +3 -5
- package/lib/util/xml_utils.js +15 -7
- package/package.json +62 -40
- package/roadmap.md +17 -17
- package/shaka-player.uncompiled.js +1 -0
- package/test/abr/simple_abr_manager_unit.js +3 -8
- package/test/ads/ad_manager_unit.js +0 -6
- package/test/cast/cast_proxy_unit.js +0 -8
- package/test/cast/cast_receiver_integration.js +1 -18
- package/test/cast/cast_receiver_unit.js +1 -9
- package/test/cast/cast_sender_unit.js +0 -6
- package/test/cast/cast_utils_unit.js +0 -13
- package/test/cea/cea608_memory_unit.js +0 -5
- package/test/cea/cea708_service_unit.js +0 -7
- package/test/cea/cea708_window_unit.js +0 -5
- package/test/cea/cea_decoder_unit.js +0 -6
- package/test/cea/dtvcc_packet_builder_unit.js +0 -3
- package/test/cea/dtvcc_packet_unit.js +0 -5
- package/test/cea/mp4_cea_parser_unit.js +0 -4
- package/test/dash/dash_parser_content_protection_unit.js +1 -10
- package/test/dash/dash_parser_live_unit.js +45 -15
- package/test/dash/dash_parser_manifest_unit.js +4 -17
- package/test/dash/dash_parser_segment_base_unit.js +1 -8
- package/test/dash/dash_parser_segment_list_unit.js +1 -7
- package/test/dash/dash_parser_segment_template_unit.js +0 -9
- package/test/dash/mpd_utils_unit.js +3 -11
- package/test/demo/demo_unit.js +0 -5
- package/test/deprecate/enforcer_unit.js +0 -4
- package/test/deprecate/version_unit.js +0 -2
- package/test/hls/hls_live_unit.js +2 -14
- package/test/hls/hls_parser_unit.js +76 -15
- package/test/hls/manifest_text_parser_unit.js +0 -10
- package/test/media/adaptation_set_criteria_unit.js +3 -7
- package/test/media/adaptation_set_unit.js +0 -2
- package/test/media/buffering_observer_unit.js +1 -4
- package/test/media/closed_caption_parser_unit.js +0 -3
- package/test/media/drm_engine_integration.js +2 -15
- package/test/media/drm_engine_unit.js +4 -24
- package/test/media/manifest_parser_unit.js +0 -4
- package/test/media/media_source_engine_integration.js +0 -7
- package/test/media/media_source_engine_unit.js +1 -14
- package/test/media/mp4_segment_index_parser_unit.js +0 -4
- package/test/media/play_rate_controller_unit.js +0 -4
- package/test/media/playhead_unit.js +8 -16
- package/test/media/presentation_timeline_unit.js +4 -7
- package/test/media/quality_observer_unit.js +4 -5
- package/test/media/region_observer_unit.js +40 -10
- package/test/media/region_timeline_unit.js +40 -25
- package/test/media/segment_index_unit.js +0 -6
- package/test/media/segment_reference_unit.js +0 -3
- package/test/media/stall_detector_unit.js +0 -5
- package/test/media/streaming_engine_integration.js +9 -36
- package/test/media/streaming_engine_unit.js +11 -35
- package/test/media/time_ranges_utils_unit.js +0 -2
- package/test/media/transmuxer_integration.js +0 -6
- package/test/media/webm_segment_index_parser_unit.js +0 -4
- package/test/net/data_uri_plugin_unit.js +0 -7
- package/test/net/http_plugin_unit.js +0 -9
- package/test/net/networking_engine_unit.js +0 -11
- package/test/offline/download_progress_estimator_unit.js +0 -2
- package/test/offline/indexeddb_storage_unit.js +0 -6
- package/test/offline/manifest_convert_unit.js +0 -8
- package/test/offline/offline_integration.js +1 -10
- package/test/offline/offline_manifest_parser_unit.js +0 -6
- package/test/offline/offline_scheme_unit.js +0 -8
- package/test/offline/offline_uri_unit.js +0 -2
- package/test/offline/storage_compatibility_unit.js +1 -14
- package/test/offline/storage_integration.js +1 -27
- package/test/player_external.js +2 -10
- package/test/player_integration.js +22 -28
- package/test/player_load_graph_integration.js +1 -6
- package/test/player_src_equals_external.js +3 -9
- package/test/player_src_equals_integration.js +0 -7
- package/test/player_unit.js +52 -37
- package/test/routing/walker_unit.js +0 -8
- package/test/test/assets/large_file.mpd +1 -1
- package/test/test/boot.js +75 -22
- package/test/test/externs/jasmine.js +2 -2
- package/test/test/externs/karma.js +4 -0
- package/test/test/namespace.js +10 -0
- package/test/test/util/canned_idb.js +0 -8
- package/test/test/util/cea_utils.js +0 -6
- package/test/test/util/dash_parser_util.js +0 -13
- package/test/test/util/fake_ad.js +0 -3
- package/test/test/util/fake_ad_manager.js +0 -9
- package/test/test/util/fake_demo_main.js +0 -5
- package/test/test/util/fake_drm_engine.js +0 -6
- package/test/test/util/fake_media_source_engine.js +0 -7
- package/test/test/util/fake_networking_engine.js +0 -5
- package/test/test/util/fake_text_displayer.js +0 -5
- package/test/test/util/indexeddb_utils.js +1 -10
- package/test/test/util/jasmine_fetch.js +0 -1
- package/test/test/util/loader.js +0 -18
- package/test/test/util/manifest_generator.js +9 -14
- package/test/test/util/manifest_parser_util.js +0 -6
- package/test/test/util/offline_utils.js +0 -5
- package/test/test/util/simple_fakes.js +9 -26
- package/test/test/util/stream_generator.js +0 -14
- package/test/test/util/streaming_engine_util.js +0 -15
- package/test/test/util/test_scheme.js +1 -19
- package/test/test/util/ttml_utils.js +0 -2
- package/test/test/util/ui_utils.js +0 -9
- package/test/test/util/util.js +15 -26
- package/test/test/util/waiter.js +84 -43
- package/test/text/cue_integration.js +0 -4
- package/test/text/lrc_text_parser_unit.js +0 -4
- package/test/text/mp4_ttml_parser_unit.js +0 -6
- package/test/text/mp4_vtt_parser_unit.js +1 -7
- package/test/text/sbv_text_parser_unit.js +0 -4
- package/test/text/simple_text_displayer_unit.js +1 -8
- package/test/text/srt_text_parser_unit.js +0 -4
- package/test/text/ssa_text_parser_unit.js +0 -5
- package/test/text/text_engine_unit.js +2 -7
- package/test/text/text_track_integration.js +0 -2
- package/test/text/ttml_text_parser_unit.js +2 -11
- package/test/text/ui_text_displayer_unit.js +44 -41
- package/test/text/vtt_text_parser_unit.js +0 -9
- package/test/text/web_vtt_generator_unit.js +0 -3
- package/test/ui/ad_ui_unit.js +0 -11
- package/test/ui/localization_unit.js +0 -3
- package/test/ui/text_displayer_layout_unit.js +9 -19
- package/test/ui/ui_customization_unit.js +0 -6
- package/test/ui/ui_integration.js +0 -16
- package/test/ui/ui_unit.js +1 -17
- package/test/util/abortable_operation_unit.js +4 -9
- package/test/util/array_utils_unit.js +0 -2
- package/test/util/buffer_utils_unit.js +0 -2
- package/test/util/cmcd_manager_unit.js +0 -3
- package/test/util/data_view_reader_unit.js +0 -4
- package/test/util/ebml_parser_unit.js +0 -4
- package/test/util/event_manager_unit.js +0 -3
- package/test/util/fake_event_target_unit.js +0 -5
- package/test/util/functional_unit.js +1 -1
- package/test/util/iterables_unit.js +0 -64
- package/test/util/language_utils_unit.js +0 -3
- package/test/util/manifest_parser_utils_unit.js +0 -2
- package/test/util/mp4_box_parsers_unit.js +0 -5
- package/test/util/mp4_parser_unit.js +0 -4
- package/test/util/multi_map_unit.js +0 -3
- package/test/util/object_utils_unit.js +0 -2
- package/test/util/periods_unit.js +14 -7
- package/test/util/pssh_unit.js +0 -5
- package/test/util/state_history_unit.js +0 -2
- package/test/util/stream_utils_unit.js +3 -8
- package/test/util/string_utils_unit.js +0 -6
- package/test/util/text_parser_unit.js +0 -2
- package/test/util/xml_utils_unit.js +0 -4
- package/ui/controls.js +3 -0
- package/ui/less/ad_controls.less +6 -6
- package/ui/less/buttons.less +6 -6
- package/ui/less/containers.less +13 -15
- package/ui/less/overflow_menu.less +4 -4
- package/ui/less/range_elements.less +7 -2
- package/ui/less/tooltip.less +4 -4
- package/ui/locales/sjn-translations.yaml +257 -0
- package/ui/locales/sjn.json +42 -0
- package/ui/localization.js +12 -36
- package/ui/seek_bar.js +2 -1
- package/externs/svgelement.js +0 -18
- package/externs/webcrypto.js +0 -18
|
@@ -9,59 +9,57 @@
|
|
|
9
9
|
Copyright The Closure Library Authors.
|
|
10
10
|
SPDX-License-Identifier: Apache-2.0
|
|
11
11
|
*/
|
|
12
|
-
var q;function
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function
|
|
12
|
+
var q;function ca(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var da="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
13
|
+
function ea(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ha=ea(this);function ia(a,b){if(b)a:{for(var c=ha,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&da(c,d,{configurable:!0,writable:!0,value:f})}}
|
|
14
|
+
ia("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;da(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
|
|
15
|
+
ia("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ha[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&da(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ja(ca(this))}})}return a});function ja(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
|
+
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ca(a)}}function ka(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var la="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ma;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ma=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ma;
|
|
18
|
-
function ra(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.
|
|
19
|
-
function ua(a,b){a.i={
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.
|
|
27
|
-
b.prototype.
|
|
28
|
-
function(){if(this.
|
|
29
|
-
b.prototype.
|
|
30
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.
|
|
31
|
-
while(!k.done)})};return b});function
|
|
32
|
-
|
|
33
|
-
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
list:m,index:-1,
|
|
37
|
-
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.
|
|
38
|
-
h.
|
|
18
|
+
function ra(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Lg=b.prototype}function sa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ta(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}sa.prototype.s=function(a){this.h=a};
|
|
19
|
+
function ua(a,b){a.i={de:b,ke:!0};a.g=a.m||a.j}sa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}sa.prototype.B=function(a){this.g=a};function z(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function va(a){a.m=0;a.j=2}function wa(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.de;a.i=null;return b}function xa(a){a.u=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function ya(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.ke?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new sa;this.h=a}function Aa(a,b){ta(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Da(a)}
|
|
21
|
+
function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,ua(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}
|
|
22
|
+
function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ua(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.ke)throw b.de;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
|
|
23
|
+
function Ea(a){this.next=function(b){ta(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Da(a));return b};this["throw"]=function(b){ta(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.s):(ua(a.g,b),b=Da(a));return b};this["return"]=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}
|
|
24
|
+
function Fa(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function L(a){return Fa(new Ea(new za(a)))}function Ga(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
25
|
+
ia("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ha.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
26
|
+
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.G),reject:g(this.l)}};b.prototype.G=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
|
|
27
|
+
b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.L(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.H();this.u()};b.prototype.H=function(){var g=this;e(function(){if(g.C()){var h=ha.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
|
|
28
|
+
function(){if(this.o)return!1;var g=ha.CustomEvent,h=ha.Event,k=ha.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ha.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
29
|
+
b.prototype.J=function(g){var h=this.j();g.xc(h.resolve,h.reject)};b.prototype.L=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(v){try{l(p(v))}catch(w){m(w)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.xc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.xc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
30
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).xc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(w){p[v]=w;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).xc(n(p.length-1),m),k=h.next();
|
|
31
|
+
while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
32
|
+
ia("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ha(k,g)){var l=new c;da(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
33
|
+
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
|
|
34
|
+
Ha(k,g)&&Ha(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ha(k,g)&&Ha(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
35
|
+
ia("Map",function(a){function b(){var h={};return h.Sa=h.next=h.head=h}function c(h,k){var l=h.g;return ja(function(){if(l){for(;l.head!=h.g;)l=l.Sa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ha(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ia:p}}return{id:l,
|
|
36
|
+
list:m,index:-1,ia:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
|
|
37
|
+
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ia?l.ia.value=k:(l.ia={next:this.g,Sa:this.g.Sa,head:this.g,key:h,value:k},l.list.push(l.ia),this.g.Sa.next=l.ia,this.g.Sa=l.ia,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ia&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ia.Sa.next=h.ia.next,h.ia.next.Sa=h.ia.Sa,
|
|
38
|
+
h.ia.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Sa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ia};e.prototype.get=function(h){return(h=d(this,h).ia)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
|
|
39
39
|
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
|
|
40
|
-
|
|
40
|
+
ia("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
41
41
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
|
|
42
|
-
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ja(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ie:e,v:f}}return{ie:-1,v:void 0}}ia("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).ie}});ia("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
|
|
43
|
+
ia("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});function La(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
|
|
44
|
+
ia("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});ia("Array.prototype.find",function(a){return a?a:function(b,c){return Ja(this,b,c).v}});ia("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=La(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
|
|
45
|
+
function Ma(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ia("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ha(d,e)&&(a[e]=d[e])}return a};
|
|
46
|
+
ia("Object.assign",function(a){return a||Na});ia("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ia("Array.prototype.values",function(a){return a?a:function(){return Ma(this,function(b,c){return c})}});
|
|
47
|
+
ia("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});ia("Array.prototype.entries",function(a){return a?a:function(){return Ma(this,function(b,c){return[b,c]})}});
|
|
48
|
+
ia("String.prototype.repeat",function(a){return a?a:function(b){var c=La(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ia("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ia("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push(b[d]);return c}});ia("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
|
|
49
|
+
ia("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});var Oa=this||self;function M(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
|
|
50
50
|
@license
|
|
51
51
|
Shaka Player
|
|
52
52
|
Copyright 2016 Google LLC
|
|
53
53
|
SPDX-License-Identifier: Apache-2.0
|
|
54
54
|
*/
|
|
55
|
-
function
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
function
|
|
59
|
-
"";
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var Bb="normal",Ib={NORMAL:Bb,ITALIC:"italic",OBLIQUE:"oblique"};rb.fontStyle=Ib;rb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function tb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Jb;this.scroll=Kb}M("shaka.text.CueRegion",tb);var Jb=1;tb.units={PX:0,PERCENTAGE:Jb,LINES:2};var Kb="";tb.scrollMode={NONE:Kb,UP:"up"};function Lb(){}function Mb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Nb(a)==Nb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Ob(a),d=Ob(b),e=r(kb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function Nb(a){return a instanceof ArrayBuffer?a:a.buffer}function Pb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
64
|
-
function Ob(a,b,c){c=void 0===c?Infinity:c;return Qb(a,void 0===b?0:b,c,Uint8Array)}function Rb(a,b,c){c=void 0===c?Infinity:c;return Qb(a,void 0===b?0:b,c,DataView)}function Qb(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Nb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Lb);Lb.toDataView=Rb;Lb.toUint8=Ob;Lb.toArrayBuffer=Pb;Lb.equal=Mb;function Sb(a,b){this.g=a;this.h=b}Sb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Tb(a,b){var c=new Sb(4,0),d=Ub,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Vb(a,b,c,d){Xa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Wb(a,b,c,d){Wa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ub=null;function Xb(a,b){return a.concat(b)}function Yb(){}function Zb(a){return null!=a}function $b(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Tb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Tb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function ac(){}M("shaka.dependencies",ac);ac.has=function(a){return bc.has(a)};ac.add=function(a,b){if(!cc[a])throw Error(a+" is not supported");bc.set(a,function(){return b})};var cc={muxjs:"muxjs"};ac.Allowed=cc;var bc=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
55
|
+
function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Ra(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Ra.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Ra.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Ra.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ga.apply(1,arguments);Ya.has(a)||(Ya.add(a),Va.apply(Ta,ka(b)))}function Za(){}function $a(){}function ab(){}function bb(){}var Ya=new Set;if(window.console&&window.console.log.bind){var db={},eb=(db[1]=console.error.bind(console),db[2]=console.warn.bind(console),db[3]=console.info.bind(console),db[4]=console.log.bind(console),db[5]=console.debug.bind(console),db[6]=console.debug.bind(console),db);Va=eb[2];Ua=eb[1]};function fb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function gb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function hb(a,b,c){c||(c=fb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Yc:d.Yc},e=a.next()){d.Yc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Yc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
56
|
+
function ib(a,b,c){c||(c=fb);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function jb(a,b,c){this.startTime=a;this.direction=kb;this.endTime=b;this.payload=c;this.region=new lb;this.position=null;this.positionAlign=mb;this.size=0;this.textAlign=nb;this.writingMode=ob;this.lineInterpretation=pb;this.line=null;this.lineHeight="";this.lineAlign=qb;this.displayAlign=rb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=sb;this.fontStyle=tb;this.linePadding=this.letterSpacing=this.fontFamily=
|
|
57
|
+
"";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}jb.prototype.clone=function(){var a=new jb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
58
|
+
function ub(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!ib(a.nestedCues,b.nestedCues,ub))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!ib(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",jb);var mb="auto";
|
|
59
|
+
jb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:mb};var nb="center",vb={LEFT:"left",RIGHT:"right",CENTER:nb,START:"start",END:"end"};jb.textAlign=vb;var rb="after",wb={BEFORE:"before",CENTER:"center",AFTER:rb};jb.displayAlign=wb;var kb="ltr";jb.direction={HORIZONTAL_LEFT_TO_RIGHT:kb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var ob="horizontal-tb";jb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:ob,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var pb=0;
|
|
60
|
+
jb.lineInterpretation={LINE_NUMBER:pb,PERCENTAGE:1};var qb="start",xb={CENTER:"center",START:qb,END:"end"};jb.lineAlign=xb;var yb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};jb.defaultTextColor=yb;var zb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};jb.defaultTextBackgroundColor=zb;var sb=400;jb.fontWeight={NORMAL:sb,BOLD:700};
|
|
61
|
+
var tb="normal",Ab={NORMAL:tb,ITALIC:"italic",OBLIQUE:"oblique"};jb.fontStyle=Ab;jb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function lb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Bb;this.scroll=Cb}M("shaka.text.CueRegion",lb);var Bb=1;lb.units={PX:0,PERCENTAGE:Bb,LINES:2};var Cb="";lb.scrollMode={NONE:Cb,UP:"up"};function Db(){}function Eb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Fb(a)==Fb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Gb(a),d=Gb(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Fb(a){return a instanceof ArrayBuffer?a:a.buffer}function Hb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
62
|
+
function Gb(a,b,c){c=void 0===c?Infinity:c;return Ib(a,void 0===b?0:b,c,Uint8Array)}function Jb(a,b,c){c=void 0===c?Infinity:c;return Ib(a,void 0===b?0:b,c,DataView)}function Ib(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Fb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Db);Db.toDataView=Jb;Db.toUint8=Gb;Db.toArrayBuffer=Hb;Db.equal=Eb;function Kb(a,b){this.g=a;this.h=b}Kb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Lb(a,b){var c=new Kb(4,0),d=Mb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Nb(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ob(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Mb=null;function Pb(a,b){return a.concat(b)}function Qb(){}function Rb(a){return null!=a}function Tb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Lb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Lb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Ub(){}M("shaka.dependencies",Ub);Ub.has=function(a){return Vb.has(a)};Ub.add=function(a,b){if(!Wb[a])throw Error(a+" is not supported");Vb.set(a,function(){return b})};var Wb={muxjs:"muxjs"};Ub.Allowed=Wb;var Vb=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c){var d=Ga.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
65
63
|
N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
|
|
66
64
|
TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,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,
|
|
67
65
|
MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,
|
|
@@ -74,838 +72,835 @@ CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
|
|
|
74
72
|
Copyright 2008 The Closure Library Authors
|
|
75
73
|
SPDX-License-Identifier: Apache-2.0
|
|
76
74
|
*/
|
|
77
|
-
var
|
|
75
|
+
var Xb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
|
|
78
76
|
@license
|
|
79
77
|
Copyright 2006 The Closure Library Authors
|
|
80
78
|
SPDX-License-Identifier: Apache-2.0
|
|
81
79
|
*/
|
|
82
|
-
function
|
|
83
|
-
q.toString=function(){var a=[],b=this.
|
|
84
|
-
q.resolve=function(a){var b=this.clone();"data"===b.
|
|
85
|
-
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.
|
|
86
|
-
function
|
|
87
|
-
function
|
|
88
|
-
q.set=function(a,b){
|
|
89
|
-
function
|
|
90
|
-
function
|
|
91
|
-
function
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
function
|
|
95
|
-
function
|
|
96
|
-
|
|
97
|
-
function
|
|
98
|
-
function
|
|
99
|
-
function
|
|
100
|
-
|
|
101
|
-
function
|
|
102
|
-
function gd(a,b
|
|
103
|
-
|
|
104
|
-
function
|
|
105
|
-
|
|
106
|
-
hd.getLocaleForText=function(a){return jd(a.language||"und")};hd.getBase=od;hd.relatedness=nd;hd.areSiblings=function(a,b){var c=od(a),d=od(b);return a!=c&&b!=d&&c==d};hd.normalize=jd;hd.isSiblingOf=ld;hd.isParentOf=kd;hd.areLanguageCompatible=id;hd.areLocaleCompatible=function(a,b){a=jd(a);b=jd(b);return a==b};
|
|
107
|
-
var md=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",
|
|
80
|
+
function Yb(a){var b;a instanceof Yb?(Zb(this,a.Ea),this.pb=a.pb,this.Ga=a.Ga,$b(this,a.Ib),this.va=a.va,ac(this,a.g.clone()),this.eb=a.eb):a&&(b=String(a).match(Xb))?(Zb(this,b[1]||"",!0),this.pb=bc(b[2]||""),this.Ga=bc(b[3]||"",!0),$b(this,b[4]),this.va=bc(b[5]||"",!0),ac(this,b[6]||"",!0),this.eb=bc(b[7]||"")):this.g=new cc(null)}q=Yb.prototype;q.Ea="";q.pb="";q.Ga="";q.Ib=null;q.va="";q.eb="";
|
|
81
|
+
q.toString=function(){var a=[],b=this.Ea;b&&a.push(dc(b,ec,!0),":");if(b=this.Ga){a.push("//");var c=this.pb;c&&a.push(dc(c,ec,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ib;null!=b&&a.push(":",String(b))}if(b=this.va)this.Ga&&"/"!=b.charAt(0)&&a.push("/"),a.push(dc(b,"/"==b.charAt(0)?fc:gc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.eb)&&a.push("#",dc(b,hc));return a.join("")};
|
|
82
|
+
q.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new Yb);var c=!!a.Ea;c?Zb(b,a.Ea):c=!!a.pb;c?b.pb=a.pb:c=!!a.Ga;c?b.Ga=a.Ga:c=null!=a.Ib;var d=a.va;if(c)$b(b,a.Ib);else if(c=!!a.va){if("/"!=d.charAt(0))if(this.Ga&&!this.va)d="/"+d;else{var e=b.va.lastIndexOf("/");-1!=e&&(d=b.va.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
83
|
+
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.va=d:c=""!==a.g.toString();c?ac(b,a.g.clone()):c=!!a.eb;c&&(b.eb=a.eb);return b};q.clone=function(){return new Yb(this)};function Zb(a,b,c){a.Ea=c?bc(b,!0):b;a.Ea&&(a.Ea=a.Ea.replace(/:$/,""))}function $b(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ib=b}else a.Ib=null}function ac(a,b,c){b instanceof cc?a.g=b:(c||(b=dc(b,ic)),a.g=new cc(b))}
|
|
84
|
+
function bc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function dc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,jc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function jc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ec=/[#\/\?@]/g,gc=/[#\?:]/g,fc=/[#\?]/g,ic=/[#\?@]/g,hc=/#/g;function cc(a){this.g=a||null}
|
|
85
|
+
function kc(a){if(!a.na&&(a.na={},a.zc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=cc.prototype;q.na=null;q.zc=null;q.add=function(a,b){kc(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.zc++;return this};
|
|
86
|
+
q.set=function(a,b){kc(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new cc;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.zc=this.zc}return a};function lc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Yb(d)});return a.map(function(d){return new Yb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Pb,[]).map(function(d){return d.toString()})}function mc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
87
|
+
function nc(a,b){if(1==b.length)return b[0];var c=oc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function oc(a,b){for(var c=t(pc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==qc?"":null}var qc="text",rc={Oa:"video",bb:"audio",$:qc,Sb:"image",bg:"application"},pc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function sc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}sc.prototype.resolve=function(){};sc.prototype.reject=function(){};function tc(a){this.h=a;this.g=void 0}tc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function uc(){}function vc(a){if(!a)return"";a=Gb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}function wc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Jb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return xc.value()(d)}
|
|
88
|
+
function yc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Gb(a);if(239==c[0]&&187==c[1]&&191==c[2])return vc(c);if(254==c[0]&&255==c[1])return wc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return wc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return wc(a,!1);if(0==c[1]&&0==c[3])return wc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return vc(a);throw new N(2,2,2003);}function zc(a){var b=new TextEncoder;return Hb(b.encode(a))}
|
|
89
|
+
function Ac(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",uc);uc.resetFromCharCode=function(){xc.g=void 0};uc.toUTF16=Ac;uc.toUTF8=zc;uc.fromBytesAutoDetect=yc;uc.fromUTF16=wc;uc.fromUTF8=vc;
|
|
90
|
+
var xc=new tc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Va:65536};0<b.Va;b={Va:b.Va},b.Va/=2)if(a(b.Va))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Va)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Va));return e}}(b);return null});function Bc(){}function Cc(a){a=Gb(a);a=xc.value()(a);return btoa(a)}function Dc(a,b){b=void 0==b?!0:b;var c=Cc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Ec(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Gc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
91
|
+
function Hc(a){var b=Gb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Ic(){for(var a=Ga.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Gb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Bc);Bc.concat=Ic;Bc.toHex=Hc;Bc.fromHex=Gc;Bc.fromBase64=Ec;Bc.toBase64=Dc;Bc.toStandardBase64=Cc;
|
|
92
|
+
Bc.equal=function(a,b){Lb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Eb(a,b)};function Jc(){var a=this;this.o=Vb.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Ic(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Ic.apply(Bc,ka(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Jc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
|
|
93
|
+
function Kc(a,b){if(!Vb.get("muxjs")()||!Lc(a))return!1;if(b)return MediaSource.isTypeSupported(Mc(b,a));var c=Mc("audio",a),d=Mc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Lc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
94
|
+
function Mc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Nc(a,b){a.l=!0;a.h=new sc;a.m=[];a.j=[];a.i=[];var c=Gb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Oc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Pc(a,b,c){a=Oc(a,b);return Vb.get("muxjs")()&&Lc(a)?Mc(c,a):a}function Qc(a){a=a.split(".");var b=a[0];a.pop();return b}function Rc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Sc(a){this.l=null;this.i=a;this.j=this.u=0;this.m=Infinity;this.h=this.g=null;this.s="";this.o=new Map}function Tc(a){return Uc[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Sc.prototype.destroy=function(){this.i=this.l=null;this.o.clear();return Promise.resolve()};
|
|
95
|
+
function Vc(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g)return u(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(Gb(b)),h["return"]();e={periodStart:a.u,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Gb(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);z(h)})}
|
|
96
|
+
Sc.prototype.remove=function(a,b){var c=this;return L(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function Wc(a,b,c){a.j=b;a.m=c}function Xc(a,b,c){a.s=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
|
|
97
|
+
function Yc(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new jb(c.startTime,c.endTime,c.text)});return b}function Zc(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Zc(a,d.value,c)}
|
|
98
|
+
function $c(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Zc(a,k,e);k.startTime>=a.j&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.s&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
99
|
+
a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",Sc);Sc.prototype.destroy=Sc.prototype.destroy;Sc.findParser=function(a){return Uc[a]};Sc.unregisterParser=function(a){delete Uc[a]};Sc.registerParser=function(a,b){Uc[a]=b};var Uc={};function ad(){}function bd(a,b){a=cd(a);b=cd(b);return a.split("-")[0]==b.split("-")[0]}function dd(a,b){a=cd(a);b=cd(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function ed(a,b){a=cd(a);b=cd(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function cd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=fd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
|
|
100
|
+
function gd(a,b){a=cd(a);b=cd(b);return b==a?4:dd(b,a)?3:ed(b,a)?2:dd(a,b)?1:0}function hd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=fd.get(a)||a}function id(a){return a.language?cd(a.language):a.audio&&a.audio.language?cd(a.audio.language):a.video&&a.video.language?cd(a.video.language):"und"}
|
|
101
|
+
function jd(a,b){for(var c=cd(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(cd(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,dd(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,ed(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,dd(c,f))return f;return null}M("shaka.util.LanguageUtils",ad);ad.findClosestLocale=jd;ad.getLocaleForVariant=id;
|
|
102
|
+
ad.getLocaleForText=function(a){return cd(a.language||"und")};ad.getBase=hd;ad.relatedness=gd;ad.areSiblings=function(a,b){var c=hd(a),d=hd(b);return a!=c&&b!=d&&c==d};ad.normalize=cd;ad.isSiblingOf=ed;ad.isParentOf=dd;ad.areLanguageCompatible=bd;ad.areLocaleCompatible=function(a,b){a=cd(a);b=cd(b);return a==b};
|
|
103
|
+
var fd=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",
|
|
108
104
|
"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",
|
|
109
105
|
"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",
|
|
110
106
|
"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",
|
|
111
107
|
"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",
|
|
112
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function
|
|
113
|
-
O.prototype.tickNow=O.prototype.
|
|
114
|
-
function
|
|
115
|
-
function
|
|
116
|
-
function
|
|
117
|
-
function
|
|
118
|
-
function
|
|
119
|
-
function
|
|
120
|
-
function
|
|
121
|
-
function
|
|
122
|
-
e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return
|
|
123
|
-
function
|
|
108
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function kd(){this.g={}}q=kd.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function md(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function nd(a){this.h=a;this.g=null}nd.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};nd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Mb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new nd(function(){b.h()})).S(a);return this};O.prototype.Ba=function(a){var b=this;this.stop();this.g=(new nd(function(){b.g.S(a);b.h()})).S(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Ba;O.prototype.tickAfter=O.prototype.S;
|
|
109
|
+
O.prototype.tickNow=O.prototype.Mb;function od(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pd(a){return""!=qd().canPlayType(a)}function rd(){return sd("Tizen")}function td(){return sd("CrKey")}function ud(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!rd()}function vd(){if(!ud())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}
|
|
110
|
+
function sd(a){return(navigator.userAgent||"").includes(a)}function qd(){if(wd)return wd;xd||(xd=new O(function(){wd=null}));(wd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(wd=document.createElement("video"));xd.S(1);return wd}var xd=null,wd=null;function yd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=zd(f,b,c);f=Ad(f,d);b=Bd(f);b=Cd(b);var g=Dd(b,e);a.variants=a.variants.filter(function(h){return Ed(h)==g?!0:!1})}function Bd(a){var b=new kd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Ed(c);b.push(d,c)}return b}
|
|
111
|
+
function Cd(a){var b=0,c=new Map,d=a.size();md(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new kd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
|
|
112
|
+
function zd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={jd:d.jd},e=b.next())if(d.jd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.jd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Vc:d.Vc},b=c.next())if(d.Vc=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Vc)}}(d)),b.length){a=b;break}return a}
|
|
113
|
+
function Dd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Fd||d==Gd){if(a=Hd(a,d),1==a.size())return a.keys()[0]}else if(d==Id)break;return Jd(a)}function Hd(a,b){var c=0,d=new kd;md(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
|
|
114
|
+
function Jd(a){var b="",c=Infinity;md(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Ed(a){var b="";a.video&&(b=Qc(a.video.codecs));var c="";a.audio&&(c=Qc(a.audio.codecs));return b+"-"+c}function Kd(a,b,c){a.variants=a.variants.filter(function(d){return Ld(d,b,c)})}
|
|
115
|
+
function Ld(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
|
|
116
|
+
function Md(a,b){return L(function(c){if(1==c.g)return u(c,Nd(b,0<b.offlineSessionIds.length),2);Od(a,b);Pd(b);Qd(b);z(c)})}
|
|
117
|
+
function Nd(a,b){return L(function(c){if(1==c.g)return u(c,Rd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Sd(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=nc("video",g);g=nc("audio",g);g=Pc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Pc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Td(f.codecs),f=Pc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(sd("Xbox One")&&
|
|
118
|
+
e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return $a(Ud(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||$a(Ud(d));return e});z(c)})}
|
|
119
|
+
function Rd(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return L(function(v){if(d=a.some(function(w){return w.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(w,x){var y;return L(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return y=D.h,w.decodingInfos.push(y),wa(D,0);F(D);JSON.stringify(x);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Vd(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,f.push(g(l,r));return u(v,Promise.all(f),
|
|
124
120
|
0)})}
|
|
125
|
-
function
|
|
126
|
-
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=
|
|
127
|
-
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=
|
|
128
|
-
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function
|
|
129
|
-
function
|
|
130
|
-
function
|
|
131
|
-
function
|
|
121
|
+
function Vd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=nc("video",g);f=Sd(f);g=nc("audio",g);g=Pc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Sd(f);f=Pc(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
122
|
+
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Td(d.codecs),f=Pc(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
|
|
123
|
+
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,r=t(h.initData),v=r.next();!v.done;v=r.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
124
|
+
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function Td(a){return rd()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
|
|
125
|
+
function Sd(a){return"vp9"==a?"vp09.00.10.08":a}function Od(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Wd(d,a.audio)||c&&a&&a.video&&!Wd(c,a.video)?!1:!0})}function Pd(a){a.textStreams=a.textStreams.filter(function(b){return Tc(Oc(b.mimeType,b.codecs))})}function Qd(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(sd("Web0S")||rd()||td())&&c.push("image/webp");return c.includes(b.mimeType)})}
|
|
126
|
+
function Wd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
127
|
+
function Xd(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
|
|
132
128
|
frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
|
|
133
129
|
null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
|
|
134
|
-
function
|
|
130
|
+
function Yd(a){return{id:a.id,active:!1,type:qc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
|
|
135
131
|
originalTextId:a.originalId,originalImageId:null}}
|
|
136
|
-
function
|
|
137
|
-
audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function
|
|
138
|
-
function
|
|
139
|
-
function
|
|
140
|
-
function
|
|
141
|
-
function
|
|
142
|
-
function
|
|
143
|
-
|
|
144
|
-
function
|
|
145
|
-
q.chooseVariant=function(){var a=
|
|
146
|
-
q.disable=function(){this.
|
|
147
|
-
q.playbackRateChanged=function(a){this.
|
|
148
|
-
|
|
149
|
-
function
|
|
150
|
-
function
|
|
151
|
-
function
|
|
152
|
-
|
|
153
|
-
function
|
|
154
|
-
function Ie(a){
|
|
155
|
-
function
|
|
156
|
-
Je
|
|
157
|
-
function
|
|
158
|
-
|
|
159
|
-
function
|
|
160
|
-
q.request=function(a,b){var c=this,d=new
|
|
161
|
-
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.
|
|
162
|
-
function
|
|
163
|
-
function
|
|
164
|
-
if(!n)return
|
|
165
|
-
c.uris[e],b));if(
|
|
166
|
-
function
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
q.
|
|
170
|
-
|
|
171
|
-
function
|
|
172
|
-
function
|
|
173
|
-
function
|
|
174
|
-
function
|
|
175
|
-
|
|
176
|
-
q.
|
|
177
|
-
c,2)}
|
|
178
|
-
function
|
|
179
|
-
|
|
180
|
-
function
|
|
181
|
-
function
|
|
182
|
-
function
|
|
183
|
-
f.keySystem;var D=d.get(f.keySystem);var
|
|
184
|
-
D.next())
|
|
185
|
-
|
|
186
|
-
function
|
|
187
|
-
l.
|
|
188
|
-
function
|
|
189
|
-
|
|
190
|
-
function
|
|
132
|
+
function Zd(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,
|
|
133
|
+
audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function $d(a){a.__shaka_id||(a.__shaka_id=ae++);return a.__shaka_id}
|
|
134
|
+
function be(a){var b=ce(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function de(a){var b=ce(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
|
|
135
|
+
function ce(a){return{id:$d(a),active:!1,type:"",bandwidth:0,language:cd(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
|
|
136
|
+
function ee(a){return a.allowedByApplication&&a.allowedByKeySystem}function fe(a){return a.filter(function(b){return ee(b)})}
|
|
137
|
+
function Ad(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ka(e))):d.get(Math.min.apply(Math,ka(c)))}
|
|
138
|
+
function ge(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=jd(cd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return cd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ie(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Pb,[]);return a.length?
|
|
139
|
+
ie(e,a[0]):e}function ie(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Ud(a){var b=[];a.audio&&b.push(je(a.audio));a.video&&b.push(je(a.video));return b.join(", ")}
|
|
140
|
+
function je(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var ae=0,Fd="smooth",Gd="powerEfficient",Id="bandwidth";function ke(){var a=this;this.l=null;this.j=!1;this.h=new Ra;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Ra;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}q=ke.prototype;q.stop=function(){this.l=null;this.j=!1;this.i=[];this.o=1;this.m=null};q.init=function(a){this.l=a};
|
|
141
|
+
q.chooseVariant=function(){var a=le(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(me(this));this.i.length&&!a.length&&(a=le(null,this.i),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.o)?1:Math.abs(this.o),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
|
|
142
|
+
q.enable=function(){this.j=!0};q.disable=function(){this.j=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.j)a:{if(!this.s){var c=this.h;if(!(c.g>=c.i))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(me(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate)};q.setVariants=function(a){this.i=a};
|
|
143
|
+
q.playbackRateChanged=function(a){this.o=a};q.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function me(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function le(a,b){a&&(b=b.filter(function(c){return Ld(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",ke);
|
|
144
|
+
ke.prototype.configure=ke.prototype.configure;ke.prototype.playbackRateChanged=ke.prototype.playbackRateChanged;ke.prototype.setVariants=ke.prototype.setVariants;ke.prototype.getBandwidthEstimate=ke.prototype.getBandwidthEstimate;ke.prototype.segmentDownloaded=ke.prototype.segmentDownloaded;ke.prototype.disable=ke.prototype.disable;ke.prototype.enable=ke.prototype.enable;ke.prototype.chooseVariant=ke.prototype.chooseVariant;ke.prototype.init=ke.prototype.init;ke.prototype.stop=ke.prototype.stop;function ne(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}ne.prototype.add=function(a){return oe(this.h,a)?(this.g.add(a),!0):!1};
|
|
145
|
+
function oe(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&pe(c,d)&&qe(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(pe(c,d)&&qe(c.roles,d.roles)));return c?!1:!0}ne.prototype.values=function(){return this.g.values()};
|
|
146
|
+
function pe(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Qc(f)}),d=b.codecs.split(",").map(function(f){return Qc(f)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function qe(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function re(a){this.g=a;this.h=new se(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}re.prototype.create=function(a){var b=this,c=a.filter(function(d){return oe(b.g,d)});return c.length?new ne(c[0],c):this.h.create(a)};function se(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
147
|
+
se.prototype.create=function(a){var b=[];b=te(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ue(b,this.j);a.length&&(b=a);this.g&&(a=Ad(b,this.g),a.length&&(b=a));this.h&&(a=ve(b,this.h),a.length&&(b=a));a=new ne(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,oe(a.h,c)&&a.add(c);return a};function te(a,b){var c=cd(b),d=jd(c,a.map(function(e){return id(e)}));return d?a.filter(function(e){return d==id(e)}):[]}
|
|
148
|
+
function ue(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function ve(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function we(){this.g=xe;this.h=(new Map).set(xe,2).set(ye,1)}function ze(a,b,c){a.h.set(xe,c).set(ye,b)}var ye=0,xe=1;function Ae(a,b){var c=Be();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
149
|
+
function Ce(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new O(e)).S(c/1E3)}),2)}a.h*=a.m;z(d)})}function Be(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function De(a,b){this.promise=a;this.i=b;this.g=!1}function Ee(a){return new De(Promise.reject(a),function(){return Promise.resolve()})}function Fe(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new De(a,function(){return Promise.resolve()})}function Ge(a){return new De(Promise.resolve(a),function(){return Promise.resolve()})}function He(a){return new De(a,function(){return a["catch"](function(){})})}De.prototype.abort=function(){this.g=!0;return this.i()};
|
|
150
|
+
function Ie(a){return new De(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}De.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
151
|
+
De.prototype.aa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Je(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new sc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new De(f,function(){return d()})};
|
|
152
|
+
function Je(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",De);De.prototype.chain=De.prototype.aa;De.prototype["finally"]=De.prototype["finally"];De.all=Ie;De.prototype.abort=De.prototype.abort;De.notAbortable=He;De.completed=Ge;De.aborted=Fe;De.failed=Ee;function P(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
153
|
+
function Ke(a){var b=new P(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}P.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};P.prototype.stopImmediatePropagation=function(){this.g=!0};P.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",P);function R(){this.fa=new kd;this.Bc=this}R.prototype.addEventListener=function(a,b){this.fa&&this.fa.push(a,b)};R.prototype.removeEventListener=function(a,b){this.fa&&this.fa.remove(a,b)};R.prototype.dispatchEvent=function(a){if(!this.fa)return!0;var b=this.fa.get(a.type)||[],c=this.fa.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Bc;a.currentTarget=this.Bc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
154
|
+
R.prototype.release=function(){this.fa=null};function Le(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Me(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ne(){this.g=[]}function Oe(a,b){a.g.push(b["finally"](function(){gb(a.g,b)}))}Ne.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Pe(a,b,c){R.call(this);this.i=!1;this.m=new Ne;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}ra(Pe,R);q=Pe.prototype;q.Od=function(a){this.o=a};function Qe(a,b,c,d){c=c||Re;var e=Se[a];if(!e||c>=e.priority)Se[a]={priority:c,Ff:b,Gf:void 0===d?!1:d}}q.Hf=function(a){this.g.add(a)};q.Xf=function(a){this.g["delete"](a)};q.Ne=function(){this.g.clear()};q.If=function(a){this.h.add(a)};q.Yf=function(a){this.h["delete"](a)};q.Oe=function(){this.h.clear()};
|
|
155
|
+
function Te(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();R.prototype.release.call(this);return this.m.destroy()};
|
|
156
|
+
q.request=function(a,b){var c=this,d=new Ue;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new Ve(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Le(b.retryParameters):Be();b.uris=Le(b.uris);e=We(this,a,b);var f=e.aa(function(){return Xe(c,a,b,new Ae(b.retryParameters,!1),0,null,d)}),g=f.aa(function(n){return Ye(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
157
|
+
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.aa(function(n){var p=Date.now()-l,r=n.response;r.timeMs+=k;r.timeMs+=p;n.uf||!c.l||r.fromCache||a!=Ze||c.l(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new Ve(m.promise,function(){return m.abort()},d);Oe(this.m,e);return e};
|
|
158
|
+
function We(a,b,c){var d=Ge(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={dd:e.dd},f=a.next())e.dd=f.value,d=d.aa(function(g){return function(){c.body&&(c.body=Hb(c.body));return g.dd(b,c)}}(e));return d.aa(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
|
|
159
|
+
function Xe(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Yb(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Zb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Se[k])?k.Ff:null;if(!m)return Ee(new N(2,1,1E3,h));var n=k.Gf,p=null,r=null,v=!1,w=!1,x;return He(Ce(d)).aa(function(){if(a.i)return Fe();x=Date.now();var y=m(c.uris[e],c,b,function(A,E,G){p&&p.stop();r&&r.S(B/1E3);a.l&&b==Ze&&(a.l(A,E),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);w=!0});
|
|
160
|
+
if(!n)return y;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;y.abort()}),p.S(D/1E3));var B=c.retryParameters.stallTimeout;B&&(r=new O(function(){v=!0;y.abort()}));return y}).aa(function(y){p&&p.stop();r&&r.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-x);var D={response:y,uf:l};!w&&a.j&&a.j(y.headers,c,b);return D},function(y){p&&p.stop();r&&r.stop();if(a.s){var D=null,B=0;y instanceof N&&(D=y,1001==y.code&&(B=y.data[1]));a.s(c,D,B,v)}if(a.i)return Fe();v&&(y=new N(1,1,1003,
|
|
161
|
+
c.uris[e],b));if(y instanceof N){if(7001==y.code)throw y;if(1010==y.code)throw f;if(1==y.severity)return D=(new Map).set("error",y),D=new P("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,Xe(a,b,c,d,e,y,g)}throw y;})}
|
|
162
|
+
function Ye(a,b,c){var d=Ge(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={ed:e.ed},f=a.next())e.ed=f.value,d=d.aa(function(g){return function(){var h=c.response;h.data&&(h.data=Hb(h.data));return g.ed(b,h)}}(e));return d.aa(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Pe);Pe.prototype.request=Pe.prototype.request;Pe.prototype.destroy=Pe.prototype.destroy;Pe.makeRequest=Te;
|
|
163
|
+
Pe.defaultRetryParameters=function(){return Be()};Pe.prototype.clearAllResponseFilters=Pe.prototype.Oe;Pe.prototype.unregisterResponseFilter=Pe.prototype.Yf;Pe.prototype.registerResponseFilter=Pe.prototype.If;Pe.prototype.clearAllRequestFilters=Pe.prototype.Ne;Pe.prototype.unregisterRequestFilter=Pe.prototype.Xf;Pe.prototype.registerRequestFilter=Pe.prototype.Hf;Pe.unregisterScheme=function(a){delete Se[a]};Pe.registerScheme=Qe;Pe.prototype.setForceHTTPS=Pe.prototype.Od;function Ue(){this.g=0}
|
|
164
|
+
Pe.NumBytesRemainingClass=Ue;function Ve(a,b,c){De.call(this,a,b);this.h=c}ra(Ve,De);Pe.PendingRequest=Ve;var Ze=1;Pe.RequestType={MANIFEST:0,SEGMENT:Ze,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Re=3;Pe.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Re};var Se={};function $e(a){this.g=!1;this.h=new sc;this.i=a}$e.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function af(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function bf(){this.g=new kd}q=bf.prototype;q.release=function(){this.nb();this.g=null};q.A=function(a,b,c,d){this.g&&(a=new cf(a,b,c,d),this.g.push(b,a))};q.ta=function(a,b,c,d){function e(g){f.Ca(a,b,e);c(g)}var f=this;this.A(a,b,e,d)};q.Ca=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ca(),this.g.remove(b,e))}};
|
|
165
|
+
q.nb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ka(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Ca();this.g.g={}}};M("shaka.util.EventManager",bf);bf.prototype.removeAll=bf.prototype.nb;bf.prototype.unlisten=bf.prototype.Ca;bf.prototype.listenOnce=bf.prototype.ta;bf.prototype.listen=bf.prototype.A;bf.prototype.release=bf.prototype.release;function cf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=df(a,d);this.target.addEventListener(b,c,this.g)}
|
|
166
|
+
cf.prototype.Ca=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function df(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return ef(a)?b:b.capture||!1}
|
|
167
|
+
function ef(a){var b=ff;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}ff=b}return b||!1}var ff=void 0;function gf(){}function hf(a){a=yc(a);return(new Yb(a)).Ga}function jf(a,b,c){function d(h){Jb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Gb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Ac(b,!0):e=b;a=yc(a);a=Ac(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",gf);gf.initDataTransform=jf;gf.defaultGetContentId=hf;function kf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function lf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function mf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function nf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function of(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function pf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.s=null;this.ga=this.da=!1;this.H=0;this.g=null;this.o=new bf;this.i=new Map;this.C=[];this.u=new sc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ka=new Map;this.ea=new Map;this.V=new O(function(){return qf(c)});this.L=!1;this.J=[];this.N=!1;this.fa=(new O(function(){rf(c)})).Ba(b);this.u["catch"](function(){});this.j=new $e(function(){return sf(c)});this.W=!1}q=pf.prototype;q.destroy=function(){return this.j.destroy()};
|
|
168
|
+
function sf(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.fa.stop(),a.fa=null,a.V.stop(),a.V=null,u(b,tf(a),2);case 2:if(!a.l){b.B(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.W=!1,z(b)}})}q.configure=function(a){this.h=a};function uf(a,b,c){a.ga=!0;a.C=[];a.L=c;return vf(a,b)}
|
|
169
|
+
function wf(a,b,c){a.C=c;a.L=0<c.length;return vf(a,b)}function xf(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return yf(a,g,[])}
|
|
170
|
+
function vf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,w;return L(function(x){if(1==x.g){if(c=zf(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(y){return y.video&&y.video.drmInfos.length||y.audio&&y.audio.drmInfos.length?!0:!1});g||(h=mf(a.h.servers),Af(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Cf(l),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,Df(r,mf(a.h.servers),mf(a.h.advanced||{}));return u(x,
|
|
171
|
+
Rd(b,a.L,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.da=!0,x["return"](Promise.resolve());w=yf(a,void 0,b);return x["return"](g?w:w["catch"](function(){}))})}
|
|
172
|
+
q.Wb=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.s)return b.o.ta(a,"encrypted",function(){b.m(new N(2,6,6010))}),e["return"]();b.l=a;b.o.ta(b.l,"play",function(){for(var f=t(b.J),g=f.next();!g.done;g=f.next())Ef(b,g.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.A(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return tf(b)});c=b.l.setMediaKeys(b.s);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
|
|
173
|
+
c,2)}af(b.j);Ff(b);b.g.initData.length||b.C.length||(d=function(f){return Gf(b,f.initDataType,Gb(f.initData))},b.o.A(b.l,"encrypted",d));z(e)})};
|
|
174
|
+
function Hf(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=Te([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.lb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Gb(d.data);wa(g,4);break;case 3:throw e=F(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
|
|
175
|
+
C(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function If(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,Jf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ka=new sc,d.push(e.Ka);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
|
|
176
|
+
function Ff(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Gf(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Jf(a,d.value);b.length||a.C.length||a.u.resolve();return a.u}function Gf(a,b,c){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Eb(c,e.value.initData)&&!sd("Tizen 2"))return;Kf(a,b,c,a.g.sessionType)}function Lf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
|
|
177
|
+
function Mf(a){a=a.i.keys();a=kf(a,function(b){return b.sessionId});return Array.from(a)}q.ac=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Fc=function(){return nf(this.ea)};
|
|
178
|
+
function yf(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,w;return L(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Nf(a,c,d);x.B(2);break}return u(x,Of(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);af(a.j);C(x,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.G.add(r.contentType.toLowerCase());if(c.length){var y=
|
|
179
|
+
f.keySystem;var D=d.get(f.keySystem);var B=[],A=[],E=[],G=[],H=new Set;Pf(D,B,E,A,G,H);var J=a.L?"persistent-license":"temporary";y={keySystem:y,licenseServerUri:B[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:A[0],initData:G,keyIds:H};D=t(D);for(B=D.next();!B.done;B=
|
|
180
|
+
D.next())B=B.value,B.distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(y.persistentStateRequired=B.persistentStateRequired);D=y}else D=f.keySystem,y=b.get(f.keySystem),B=[],A=[],E=[],G=[],H=new Set,Pf(y.drmInfos,B,E,A,G,H),D={keySystem:D,licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==y.distinctiveIdentifier,persistentStateRequired:"required"==y.persistentState,sessionType:y.sessionTypes[0]||"temporary",audioRobustness:(y.audioCapabilities?
|
|
181
|
+
y.audioCapabilities[0].robustness:"")||"",videoRobustness:(y.videoCapabilities?y.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:A[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,af(a.j),a.s=v,a.da=!0,u(x,Hf(a),7);case 7:af(a.j);wa(x,0);break;case 4:w=F(x);af(a.j,w);a.g=null;a.G.clear();if(w instanceof N)throw w;throw new N(2,6,6002,w.message);}})}
|
|
182
|
+
function Nf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Cf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={bd:d.bd},e=a.next())for(d.bd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
183
|
+
l.bd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
184
|
+
function Of(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,w,x;return L(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){y.B(4);break}k=h.value;if(!b.has(k)){y.B(3);break}l=b.get(k);C(y,6);return u(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
185
|
+
y.h,y["return"](c);case 6:F(y);case 7:af(a.j);case 3:h=g.next();y.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.B(11);break}p=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();y.B(9);break}v=h.value;w=b.get(v);x=w.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=p){y.B(13);break}C(y,15);return u(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y["return"](c);case 15:F(y);case 16:af(a.j);case 13:h=r.next();y.B(12);break;case 11:return y["return"](c)}})}
|
|
186
|
+
function zf(a){a=mf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Gc(f),h=Gc(e);g={kty:"oct",kid:Dc(g,!1),k:Dc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Gb(zc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
191
187
|
serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
192
|
-
function
|
|
193
|
-
if(!f)return a.
|
|
194
|
-
function
|
|
195
|
-
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.
|
|
196
|
-
function
|
|
197
|
-
l.promise,4);case 4:k=
|
|
198
|
-
w.
|
|
199
|
-
function
|
|
200
|
-
|
|
201
|
-
function
|
|
202
|
-
c],f=new Map,g=function(l){var m,n,p;return L(function(
|
|
203
|
-
function
|
|
204
|
-
function
|
|
205
|
-
function
|
|
188
|
+
function Jf(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.A(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(k):Ef(a,k)});a.o.A(c,"keystatuseschange",function(k){return Qf(a,k)});e={initData:null,loaded:!1,Fd:Infinity,Ka:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=h.h;af(a.j);
|
|
189
|
+
if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Rf(a)&&a.u.resolve();return h["return"](c);case 2:g=F(h),af(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
|
|
190
|
+
function Kf(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.A(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(f):Ef(a,f)});a.o.A(e,"keystatuseschange",function(f){return Qf(a,f)});a.i.set(e,{initData:c,loaded:!1,Fd:Infinity,Ka:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Dc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
|
|
191
|
+
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new N(2,6,6006,f.message,f,h))}})}function Sf(a,b,c){"skd"==b&&(b=c.serverCertificate,c=hf(a),a=jf(a,c,b));return a}
|
|
192
|
+
function Ef(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,w;L(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Dc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=Te([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Lf(a.g.keySystem)&&Tf(g),h=Date.now(),C(x,2),l=a.D.lb.request(2,g),u(x,
|
|
193
|
+
l.promise,4);case 4:k=x.h;wa(x,3);break;case 2:return m=F(x),n=new N(2,6,6007,m),a.m(n),d&&d.Ka&&d.Ka.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Dc(k.data);C(x,5);return u(x,c.update(k.data),7);case 7:wa(x,6);break;case 5:return p=F(x),r=new N(2,6,6008,p.message),a.m(r),d&&d.Ka&&d.Ka.reject(r),x["return"]();case 6:v=new P("drmsessionupdate"),a.D.onEvent(v),d&&(d.Ka&&d.Ka.resolve(),w=new O(function(){d.loaded=!0;Rf(a)&&a.u.resolve()}),
|
|
194
|
+
w.S(Uf)),z(x)}})}function Tf(a){var b=wc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Ec(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
195
|
+
function Qf(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Lf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Jb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Hc(h);a.ka.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ka&&(a.i["delete"](c),c.close()["catch"](function(){}));
|
|
196
|
+
Rf(a)&&(a.u.resolve(),a.V.S(Vf))}function qf(a){var b=a.ka,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Mc(nf(c))}
|
|
197
|
+
function Wf(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
|
|
198
|
+
c],f=new Map,g=function(l){var m,n,p;return L(function(r){switch(r.g){case 1:return C(r,2),u(r,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=r.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,sd("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(r,m.createMediaKeys(),5);case 5:wa(r,0);break;case 2:F(r),f.set(l,null),z(r)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](nf(f))})}
|
|
199
|
+
function Xf(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).S(Yf)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);F(c);z(c)})}
|
|
200
|
+
function tf(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return C(g,2),a.ga||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Xf(e),5):u(g,e.remove(),5);if(2!=g.g)return wa(g,0);F(g);z(g)})})),0)})}
|
|
201
|
+
function Zf(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Da:f.Da},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Da=[];f.Da=f.Da.concat(e.initData||[]);f.Da=f.Da.concat(h.initData||[]);f.Da=f.Da.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Da.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ka(e.keyIds),ka(h.keyIds))):
|
|
206
202
|
e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
|
|
207
|
-
initData:f.
|
|
208
|
-
function
|
|
209
|
-
function
|
|
210
|
-
m.
|
|
211
|
-
function
|
|
212
|
-
(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var
|
|
213
|
-
function
|
|
214
|
-
|
|
215
|
-
q.
|
|
216
|
-
q.skip=function(a){if(this.g+a>this.
|
|
217
|
-
|
|
218
|
-
q.
|
|
219
|
-
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.
|
|
220
|
-
function
|
|
221
|
-
|
|
222
|
-
if(d)return a;if(0==g.length||!e)throw
|
|
223
|
-
function
|
|
224
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function
|
|
225
|
-
|
|
226
|
-
function
|
|
227
|
-
function
|
|
228
|
-
var
|
|
229
|
-
[35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),
|
|
230
|
-
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function
|
|
231
|
-
var
|
|
232
|
-
function
|
|
233
|
-
function
|
|
234
|
-
b=null;c=
|
|
235
|
-
b.skip(1),d=
|
|
236
|
-
|
|
237
|
-
var
|
|
238
|
-
function
|
|
239
|
-
function
|
|
240
|
-
d=1===(d&1);if(c.h!==
|
|
241
|
-
(e&246)&&32===(d&224))
|
|
242
|
-
0,h-1),
|
|
243
|
-
function
|
|
244
|
-
v++)p.i[v]=p.i[w];for(w=0;1>w;w++,v++)p.i[v]=
|
|
245
|
-
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&
|
|
246
|
-
function
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
(k.
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
function
|
|
253
|
-
function
|
|
203
|
+
initData:f.Da,keyIds:g});break}}return c}function Cf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function rf(a){a.i.forEach(function(b,c){var d=b.Fd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Fd=e)})}function Rf(a){a=a.i.values();return lf(a,function(b){return b.loaded})}
|
|
204
|
+
function Af(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
|
|
205
|
+
function Pf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={pa:g.pa},h=a.next()){g.pa=h.value;b.includes(g.pa.licenseServerUri)||b.push(g.pa.licenseServerUri);d.includes(g.pa.serverCertificateUri)||d.push(g.pa.serverCertificateUri);g.pa.serverCertificate&&(c.some(function(m){return function(n){return Eb(n,m.pa.serverCertificate)}}(g))||c.push(g.pa.serverCertificate));if(g.pa.initData){h={};for(var k=t(g.pa.initData),l=k.next();!l.done;h={rc:h.rc},l=k.next())h.rc=l.value,e.some(function(m){return function(n){var p=
|
|
206
|
+
m.rc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Eb(n.initData,p.initData)}}(h))||e.push(h.rc)}if(g.pa.keyIds)for(h=t(g.pa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
207
|
+
function Df(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
|
|
208
|
+
(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var Yf=1,Uf=5,Vf=.5,$f=new tc(function(){return Hb(new Uint8Array([0]))});function ag(){}function bg(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=cg[d.toLowerCase()]))return k["return"](e);if(f=dg(a))if(g=eg[f])return k["return"](g);return d?k.B(2):u(k,fg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=cg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
|
|
209
|
+
function fg(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=Te([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function dg(a){a=(new Yb(a)).va.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",ag);ag.unregisterParserByMime=function(a){delete cg[a]};ag.registerParserByMime=function(a,b){cg[a]=b};
|
|
210
|
+
ag.registerParserByExtension=function(a,b){eg[a]=b};var cg={},eg={};function gg(a,b){this.O=Jb(a);this.h=b==hg;this.g=0}q=gg.prototype;q.ma=function(){return this.g<this.O.byteLength};q.Y=function(){return this.g};q.$e=function(){return this.O.byteLength};q.Z=function(){try{var a=this.O.getUint8(this.g);this.g+=1;return a}catch(b){throw ig();}};q.Jb=function(){try{var a=this.O.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw ig();}};q.M=function(){try{var a=this.O.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw ig();}};
|
|
211
|
+
q.pe=function(){try{var a=this.O.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw ig();}};q.Kb=function(){try{if(this.h){var a=this.O.getUint32(this.g,!0);var b=this.O.getUint32(this.g+4,!0)}else b=this.O.getUint32(this.g,!1),a=this.O.getUint32(this.g+4,!1)}catch(c){throw ig();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.$a=function(a){if(this.g+a>this.O.byteLength)throw ig();var b=Gb(this.O,this.g,a);this.g+=a;return b};
|
|
212
|
+
q.skip=function(a){if(this.g+a>this.O.byteLength)throw ig();this.g+=a};q.re=function(a){if(this.g<a)throw ig();this.g-=a};q.seek=function(a){if(0>a||a>this.O.byteLength)throw ig();this.g=a};q.jc=function(){for(var a=this.g;this.ma()&&0!=this.O.getUint8(this.g);)this.g+=1;a=Gb(this.O,a,this.g-a);this.g+=1;return vc(a)};function ig(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",gg);gg.prototype.readTerminatedString=gg.prototype.jc;gg.prototype.seek=gg.prototype.seek;gg.prototype.rewind=gg.prototype.re;
|
|
213
|
+
gg.prototype.skip=gg.prototype.skip;gg.prototype.readBytes=gg.prototype.$a;gg.prototype.readUint64=gg.prototype.Kb;gg.prototype.readInt32=gg.prototype.pe;gg.prototype.readUint32=gg.prototype.M;gg.prototype.readUint16=gg.prototype.Jb;gg.prototype.readUint8=gg.prototype.Z;gg.prototype.getLength=gg.prototype.$e;gg.prototype.getPosition=gg.prototype.Y;gg.prototype.hasMoreData=gg.prototype.ma;var hg=1;gg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:hg};function jg(){this.i=[];this.h=[];this.g=!1}q=jg.prototype;q.box=function(a,b){var c=kg(a);this.i[c]=lg;this.h[c]=b;return this};q.R=function(a,b){var c=kg(a);this.i[c]=mg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new gg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Oc(0,a,b,c)};
|
|
214
|
+
q.Oc=function(a,b,c,d){var e=b.Y();if(d&&e+8>b.O.byteLength)this.g=!0;else{var f=b.M(),g=b.M(),h=!1;switch(f){case 0:f=b.O.byteLength-e;break;case 1:if(d&&b.Y()+8>b.O.byteLength){this.g=!0;return}f=b.Kb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==mg){if(d&&b.Y()+4>b.O.byteLength){this.g=!0;return}m=b.M();l=m>>>24;m&=16777215}g=e+f;c&&g>b.O.byteLength&&(g=b.O.byteLength);d&&g>b.O.byteLength?this.g=!0:(d=g-b.Y(),b=0<d?b.$a(d):new Uint8Array(0),b=new gg(b,0),k({parser:this,partialOkay:c||
|
|
215
|
+
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.Y(),b.O.byteLength-b.Y()))}};function ng(a){for(var b=og(a);a.reader.ma()&&!a.parser.g;)a.parser.Oc(a.start+b,a.reader,a.partialOkay)}function pg(a){for(var b=og(a),c=a.reader.M(),d=0;d<c&&(a.parser.Oc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function qg(a){return function(b){a(b.reader.$a(b.reader.O.byteLength-b.reader.Y()))}}
|
|
216
|
+
function kg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function rg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function og(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",jg);jg.headerSize=og;jg.typeToString=rg;jg.allData=qg;jg.sampleDescription=pg;jg.children=ng;jg.prototype.parseNext=jg.prototype.Oc;jg.prototype.parse=jg.prototype.parse;jg.prototype.stop=jg.prototype.stop;
|
|
217
|
+
jg.prototype.fullBox=jg.prototype.R;jg.prototype.box=jg.prototype.box;var lg=0,mg=1;function sg(a){function b(){d=!0}function c(l){f.push(l);ng(l)}a=Gb(a);var d=!1,e,f=[],g=[];(new jg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).R("stsd",function(l){e=l;f.push(l);pg(l)}).R("encv",b).R("enca",b).R("avc1",function(l){g.push({box:l,hc:1701733238})}).R("avc3",function(l){g.push({box:l,hc:1701733238})}).R("ac-3",function(l){g.push({box:l,hc:1701733217})}).R("ec-3",function(l){g.push({box:l,hc:1701733217})}).R("mp4a",function(l){g.push({box:l,hc:1701733217})}).parse(a);
|
|
218
|
+
if(d)return a;if(0==g.length||!e)throw bb(Hc(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=tg(a,e,k.box,f,k.hc);return a}
|
|
219
|
+
function tg(a,b,c,d,e){var f=ug.value(),g=a.subarray(c.start,c.start+c.size),h=Jb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Jb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);vg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=sd("Xbox One")?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,vg(e,d.start,d.size+k.byteLength);k=Jb(e,b.start);b=og(b);
|
|
220
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function vg(a,b,c){a=Jb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var ug=new tc(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 wg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=xg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,v=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){r=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){v=w;break}if(-1===
|
|
221
|
+
r||-1===v)p=yg(d,e),a.nestedCues.push(p);else{for(;r<=v;r++)if(w=p[r]){var x=w.l,y=w.i,D=w.j,B=w.h;if(x!=h||y!=k||D!=l||B!=m)n.payload&&a.nestedCues.push(n),n=xg(d,e,x,y,D,B),h=x,k=y,l=D,m=B;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=yg(d,e),a.nestedCues.push(n));n=xg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
222
|
+
function xg(a,b,c,d,e,f){a=new jb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function yg(a,b){var c=new jb(a,b,"");c.lineBreak=!0;return c}function zg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Ag(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Bg(this)}function Cg(a,b,c){return wg(new jb(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function Bg(a){Dg(a,0,15);a.g=1}function Eg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Fg:d=Gg.has(c)?Gg.get(c):String.fromCharCode(c);break;case Hg:d=Ig.get(c);break;case Jg:a.i[a.g].pop();d=Kg.get(c);break;case Lg:a.i[a.g].pop(),d=Mg.get(c)}d&&a.i[a.g].push(new zg(d,a.m,a.j,a.o,a.l))}}
|
|
223
|
+
function Ng(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Dg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
224
|
+
var Fg=0,Hg=1,Jg=2,Lg=3,Gg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Ig=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Kg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
|
|
225
|
+
[35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Mg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
226
|
+
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Og(a,b){this.h=Pg;this.o=new Ag(a,b);this.i=new Ag(a,b);this.l=new Ag(a,b);this.g=this.i;this.j=0;this.m=null}function Qg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Rg&&a.h!==Sg&&(e=Cg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Dg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Dg(c,0,15),d.g=15);a.h=Rg;d.h=b;return e}function Tg(a){a.h=Ug;a.g=a.l;a.g.h=0}function Vg(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Sg}
|
|
227
|
+
var Pg=0,Ug=1,Rg=3,Sg=4,Wg="black green blue cyan red yellow magenta black".split(" "),Xg="white green blue cyan red yellow magenta white_italics".split(" ");function Yg(){this.l=!1;this.C=this.G=0;this.D=Zg;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";$g(this)}function $g(a){a.i=[];for(var b=0;15>b;b++)a.i.push(ah())}function ah(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function bh(a,b){ch(a)&&(a.i[a.h][a.g]=new zg(b,a.u,a.o,a.m,a.s),a.g++)}function ch(a){var b=a.g<a.C&&0<=a.g;return a.h<a.G&&0<=a.h&&b}Yg.prototype.isVisible=function(){return this.l};
|
|
228
|
+
function dh(a,b,c){var d=new jb(a.j,b,"");d.textAlign=a.D===eh?"left":a.D===fh?"right":nb;if(c=wg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var eh=0,fh=1,Zg=2;function gh(){this.i=[];this.h=null;this.g=0}function hh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new ih(a.h)),a.h=null,a.g=0))}function ih(a){this.g=0;this.h=a}ih.prototype.ma=function(){return this.g<this.h.length};ih.prototype.Y=function(){return this.g};function jh(a){if(!a.ma())throw new N(2,2,3E3);return a.h[a.g++]}ih.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function kh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
229
|
+
function lh(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=jh(b).value;b=null;c=t(mh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=dh(e,d,a.i)),$g(e);return b}if(137===c)for(b=jh(b).value,b=t(mh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=jh(b).value;b=null;c=t(mh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=dh(e,d,a.i)),e.l=!1;return b}if(139===c){c=jh(b).value;
|
|
230
|
+
b=null;c=t(mh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=dh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=jh(b).value,nh(a,b,d);if(143===c)return d=nh(a,255,d),oh(a),d;if(144===c)b.skip(1),d=jh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=jh(b).value,c=jh(b).value,b.skip(1),a.g&&(b=ph((c&48)>>4,(c&12)>>2,c&3),a.g.s=ph((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=jh(b).value,b=jh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
231
|
+
b.skip(1),d=jh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Yg;f.j=d;a.h[c]=f}d=jh(b).value;jh(b);jh(b);f=jh(b).value;var g=jh(b).value;b=jh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.G=(f&15)+1;b.C=(g&63)+1;a.g=a.h[c]}}}return null}function mh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
|
|
232
|
+
function nh(a,b,c){var d=null;b=t(mh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=dh(f,c,a.i));a.h[e]=null}return d}function oh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ph(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return qh[a<<2|b<<1|c]}
|
|
233
|
+
var rh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),qh="black blue green cyan red magenta yellow white".split(" ");function sh(){this.h=[];this.g=[];this.i=new gh;this.l=0;this.s=new Map([["CC1",new Og(0,0)],["CC2",new Og(0,1)],["CC3",new Og(1,0)],["CC4",new Og(1,1)]]);this.o=this.m=0;this.j=new Map;th(this)}function th(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Bg(b.i),Bg(b.l),Bg(b.o)}
|
|
234
|
+
function uh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=vh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())hh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=wh(a,e.value),c.push.apply(c,ka(e));a.i.i=[];a.h=[];a.g=[];return c}
|
|
235
|
+
function vh(a,b){var c=b.type;if(16===(b.ya&112)){var d=b.ya>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.ya&&255===b.Pa||!b.ya&&!b.Pa||!xh(b.ya)||!xh(b.Pa))return 45<=++a.l&&th(a),null;a.l=0;b.ya&=127;b.Pa&=127;if(!b.ya&&!b.Pa)return null;d=null;if(16===(b.ya&112))a:{var e=b.ya;d=b.Pa;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Xg[f]:7===f&&(h=!0);
|
|
236
|
+
d=1===(d&1);if(c.h!==Sg){f=c.g;if(c.h===Rg&&e!==f.g){var k=1+e-f.h;Ng(f,k,1+f.g-f.h,f.h);Dg(f,0,k-1);Dg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Eg(c.g,Fg,32),g=!1,e=Xg[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Wg[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))Eg(c.g,Hg,d);else if(18===
|
|
237
|
+
(e&246)&&32===(d&224))Eg(c.g,e&1?Lg:Jg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Pa){case 32:Tg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Qg(c,2,d);break;case 38:e=Qg(c,3,d);break;case 39:e=Qg(c,4,d);break;case 40:Eg(c.g,Fg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Bg(c.o);Vg(c);break;case 43:Vg(c);break;case 44:e=c.i;g=null;c.h!==Sg&&(g=Cg(e,c.j,d));Dg(e,0,15);e=g;break;case 45:e=c.g;c.h!==Rg?e=null:(g=Cg(e,c.j,d),h=e.g-e.h+1,Ng(e,h-1,h,e.h),Dg(e,
|
|
238
|
+
0,h-1),Dg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Dg(c.l,0,15);break;case 47:e=null,c.h!==Sg&&(e=Cg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Tg(c),c.j=d}d=e;break a}d=null}else e=b.Pa,Eg(c.g,Fg,b.ya),Eg(c.g,Fg,e);return d}
|
|
239
|
+
function wh(a,b){var c=[];try{for(;b.ma();){var d=jh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=jh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new kh(e));for(var g=a.j.get(e),h=b.Y();b.Y()-h<f;){e=b;var k=jh(e),l=k.value,m=k.pts;if(16===l){var n=jh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!ch(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.C-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=dh(r,p,g.i));if(r.h+1>=r.G){p=r;for(var v=0,w=1;15>w;w++,
|
|
240
|
+
v++)p.i[v]=p.i[w];for(w=0;1>w;w++,v++)p.i[v]=ah()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=dh(r,p,g.i));r.i[r.h]=ah();r.g=0;break;case 12:r.isVisible()&&(e=dh(r,p,g.i)),$g(r),p=r,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=lh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?bh(g.g,"\u266a"):bh(g.g,
|
|
241
|
+
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&bh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(rh.has(e)){var y=rh.get(e);bh(g.g,y)}else bh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?bh(g.g,"_"):bh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function xh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function yh(a,b){var c=null,d=null,e=a.M();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:e,be:c,Qe:d}}function zh(a,b){return{kd:1==b?a.Kb():a.M()}}function Ah(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.M()}}
|
|
242
|
+
function Bh(a,b,c){var d=a.M(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Kd:null,sampleSize:null,Qc:null};c&256&&(g.Kd=a.M());c&512&&(g.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(g.Qc=0==b?a.M():a.pe());e.push(g)}return{Kg:d,se:e}};function Ch(){this.i=new Map;this.h=this.g=0}
|
|
243
|
+
Ch.prototype.init=function(a){var b=this,c=[],d=[];(new jg).box("moov",ng).box("mvex",ng).R("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.M();f=f.M();b.g=e;b.h=f}).box("trak",ng).R("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.M();c.push(e)}).box("mdia",ng).R("mdhd",function(e){e=Ah(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
244
|
+
Ch.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new jg).box("moof",ng).box("traf",ng).R("trun",function(k){f=Bh(k.reader,k.version,k.flags).se}).R("tfhd",function(k){k=yh(k.reader,k.flags);d=k.be||b.g;e=k.Qe||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).R("tfdt",function(k){g=zh(k.reader,k.version).kd}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,r=f,v=0,w=p;for(r.length&&(w=r[0].sampleSize||p);k.ma();){var x=k.M();if(6==
|
|
245
|
+
(k.Z()&31)){var y=0;r.length>v&&(y=r[v].Qc||0);y=(l+y)/m;for(var D=[],B,A=k.$a(x-1),E=B=0;E<A.length;)2==B&&3==A[E]?(B=0,A=[].concat(ka(A)),A.splice(E,1),A=new Uint8Array(A)):0==A[E]?B++:B=0,E++;B=A;for(E=0;E<B.length;){for(A=0;255==B[E];)A+=255,E++;A+=B[E++];for(var G=0;255==B[E];)G+=255,E++;G+=B[E++];4==A&&D.push(B.subarray(E,E+G));E+=G}D=t(D);for(B=D.next();!B.done;B=D.next())c.push({Ef:B.value,pts:y})}else try{k.skip(x-1)}catch(H){break}w-=x+4;0==w&&(l=r.length>v?l+(r[v].Kd||n):l+n,v++,w=r.length>
|
|
246
|
+
v?r[v].sampleSize||p:p)}}).parse(a,!1);return c};function Dh(){this.h=new Ch;this.g=new sh}Dh.prototype.init=function(a){this.h.init(a)};
|
|
247
|
+
function Eh(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Gb(e.Ef);if(0<f.length&&(d=a.g,e=e.pts,f=new gg(f,0),181===f.Z()&&49===f.Jb()&&1195456820===f.M()&&3===f.Z())){var g=f.Z();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Z(),l=(k&4)>>2,m=f.Z(),n=f.Z();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,ya:m,Pa:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return uh(a.g)}
|
|
248
|
+
;function Fh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Gh(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Hh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Ih(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
|
|
249
|
+
function Jh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ih(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ih(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Kh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.H={};this.g=null;this.J=d||function(){};this.i={};this.o=new bf;this.s={};this.u=b;this.D=new sc;this.m=Lh(this,this.D);this.C=new $e(function(){return Mh(e)});this.G=""}function Lh(a,b){var c=new MediaSource;a.o.ta(c,"sourceopen",function(){URL.revokeObjectURL(a.G);b.resolve()});a.G=Nh(c);a.j.src=a.G;return c}q=Kh.prototype;q.destroy=function(){return this.C.destroy()};
|
|
250
|
+
function Mh(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Qb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.s={};a.u=null;a.i=
|
|
254
251
|
{};z(l)})}
|
|
255
|
-
q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)return d=
|
|
256
|
-
c.
|
|
257
|
-
function
|
|
258
|
-
function
|
|
259
|
-
m,e));l.captions&&l.captions.length&&(n=a.
|
|
260
|
-
function
|
|
261
|
-
function
|
|
262
|
-
q.endOfStream=function(a){var b=this;return L(function(c){return u(c,
|
|
263
|
-
function
|
|
264
|
-
function
|
|
265
|
-
function
|
|
266
|
-
q.
|
|
267
|
-
q.
|
|
268
|
-
q.
|
|
269
|
-
q.
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
function
|
|
273
|
-
c||0==c&&!a.
|
|
274
|
-
function
|
|
275
|
-
function
|
|
276
|
-
function
|
|
277
|
-
l-3);h<k&&(h=
|
|
278
|
-
function
|
|
279
|
-
function
|
|
280
|
-
q.find=function(a){for(var b=this.
|
|
281
|
-
q.
|
|
282
|
-
q.
|
|
283
|
-
q.
|
|
284
|
-
function
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
q.get=function(a){for(var b=0,c=
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
function
|
|
295
|
-
function
|
|
296
|
-
function
|
|
297
|
-
function
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
(m=
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
function
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
function
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
m=k.reader.
|
|
314
|
-
|
|
315
|
-
function
|
|
316
|
-
function
|
|
317
|
-
function
|
|
318
|
-
function
|
|
319
|
-
function
|
|
320
|
-
function
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
function
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
function
|
|
329
|
-
h=
|
|
330
|
-
function
|
|
331
|
-
function
|
|
332
|
-
|
|
333
|
-
"
|
|
334
|
-
"
|
|
335
|
-
"
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
function
|
|
342
|
-
function
|
|
343
|
-
function nk(a,b){var c=a.
|
|
344
|
-
function
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
function
|
|
348
|
-
|
|
349
|
-
function
|
|
252
|
+
q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)return d=rc,u(m,c.D,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={ra:e.ra},g=f.next())e.ra=g.value,h=a.get(e.ra),k=Oc(h.mimeType,h.codecs),e.ra==d.$?Oh(c,k):(!b&&MediaSource.isTypeSupported(k)||!Kc(k,e.ra)||(c.s[e.ra]=new Jc,k=Mc(e.ra,k)),l=c.m.addSourceBuffer(k),c.o.A(l,"error",function(n){return function(){c.i[n.ra][0].p.reject(new N(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.o.A(l,"updateend",function(n){return function(){return Ph(c,n.ra)}}(e)),
|
|
253
|
+
c.h[e.ra]=l,c.H[e.ra]=k,c.i[e.ra]=[]);z(m)})};function Oh(a,b){a.g||(a.g=new Sc(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Tb(Uc[b]))}function Qh(a){return a.m?"ended"==a.m.readyState:!0}function Rh(a,b){if(b==qc)var c=a.g.g;else c=Sh(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function Th(a,b){return b==qc?a.g.h:Fh(Sh(a,b))}
|
|
254
|
+
function Uh(a,b,c){if(b==qc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Sh(a,b);return Hh(a,c)}q.Za=function(){var a={total:Ih(this.j.buffered),audio:Ih(Sh(this,"audio")),video:Ih(Sh(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Sh(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
255
|
+
function Vh(a,b,c,d,e,f){var g,h,k,l,m,n,p,r;return L(function(v){if(1==v.g){g=rc;if(b==g.$)return u(v,Vc(a.g,c,d,e),0);if(a.s[b])return u(v,Nc(a.s[b],c),10);if(f)return a.g||Oh(a,"text/vtt"),null==d&&null==e?a.u.init(c):(h=Eh(a.u,c),h.length&&(k=a.h[g.Oa].timestampOffset,$c(a.g,h,d,e,k))),c=Wh(a,c,d,b),u(v,Xh(a,b,function(){a.h[b].appendBuffer(c)}),0);c=Wh(a,c,d,b);return u(v,Xh(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||Oh(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.J(l.metadata,
|
|
256
|
+
m,e));l.captions&&l.captions.length&&(n=a.h[g.Oa].timestampOffset,p=Yc(l.captions),$c(a.g,p,d,e,n));r=l.data;r=Wh(a,r,d,b);return u(v,Xh(a,b,function(){a.h[b].appendBuffer(r)}),0)})}function Yh(a,b){var c=Th(a,"video")||0;Xc(a.g,b,c)}function Zh(a){a.g&&Xc(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return L(function(f){e=rc;return a==e.$?u(f,d.g.remove(b,c),0):u(f,Xh(d,a,function(){c<=b?Ph(d,a):d.h[a].remove(b,c)}),0)})};
|
|
257
|
+
function $h(a,b){var c;return L(function(d){c=rc;return b==c.$?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Xh(a,b,function(){var e=a.m.duration;0>=e?Ph(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return L(function(d){c=rc;return a==c.$?d["return"]():u(d,Xh(b,a,function(){b.j.currentTime-=.001;Ph(b,a)}),0)})};
|
|
258
|
+
function ai(a,b,c,d,e){var f;return L(function(g){f=rc;return b==f.$?(a.g.u=c,Wc(a.g,d,e),g["return"]()):u(g,Promise.all([Xh(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;Ph(a,b)}),Xh(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;Ph(a,b)}),Xh(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Ph(a,b)})]),0)})}
|
|
259
|
+
q.endOfStream=function(a){var b=this;return L(function(c){return u(c,bi(b,function(){Qh(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.Ja=function(a){var b=this;return L(function(c){return u(c,bi(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function Ph(a,b){var c=a.i[b][0];c&&(c.p.resolve(),ei(a,b))}function Xh(a,b,c){af(a.C);c={start:c,p:new sc};a.i[b].push(c);1==a.i[b].length&&fi(a,b);return c.p}
|
|
260
|
+
function bi(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:af(a.C);c=[];d={};for(e in a.h)d.Qb=new sc,f={start:function(l){return function(){return l.Qb.resolve()}}(d),p:d.Qb},a.i[e].push(f),c.push(d.Qb),1==a.i[e].length&&f.start(),d={Qb:d.Qb};C(k,2);return u(k,Promise.all(c),4);case 4:wa(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)ei(a,h)}z(k)}})}function ei(a,b){a.i[b].shift();fi(a,b)}
|
|
261
|
+
function fi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),ei(a,b)}}function Wh(a,b,c,d){var e=a.j.mediaKeys;null==c&&e&&(rd()||sd("Xbox One"))&&"mp4"==a.H[d].split(";")[0].split("/")[1]&&(b=sg(b));return b}var Nh=window.URL.createObjectURL;function gi(a,b,c,d){this.qa=a;this.oa=b;this.ha=c;this.xd=void 0===d?null:d}gi.prototype.dc=function(){return this.oa};gi.prototype.$b=function(){return this.ha};function hi(a,b){return a&&b?a.dc()==b.dc()&&a.$b()==b.$b()&&ib(a.qa(),b.qa()):a==b}M("shaka.media.InitSegmentReference",gi);gi.prototype.getEndByte=gi.prototype.$b;gi.prototype.getStartByte=gi.prototype.dc;
|
|
262
|
+
function ii(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.oa=d;this.ha=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=ii.prototype;q.qa=function(){return this.j()};q.getStartTime=function(){return this.startTime};q.Ye=function(){return this.endTime};q.dc=function(){return this.oa};q.$b=function(){return this.ha};q.qf=function(){return this.tilesLayout};
|
|
263
|
+
q.pf=function(){return this.i};M("shaka.media.SegmentReference",ii);ii.prototype.getTileDuration=ii.prototype.pf;ii.prototype.getTilesLayout=ii.prototype.qf;ii.prototype.getEndByte=ii.prototype.$b;ii.prototype.getStartByte=ii.prototype.dc;ii.prototype.getEndTime=ii.prototype.Ye;ii.prototype.getStartTime=ii.prototype.getStartTime;ii.prototype.getUris=ii.prototype.qa;function T(a,b,c){this.l=a;this.Pc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0}q=T.prototype;q.getDuration=function(){return this.i};q.df=function(){return this.g};q.Ja=function(a){this.i=a};q.jf=function(){return this.l};q.xe=function(a){this.o=a};q.nc=function(a){this.s=a};q.Rd=function(a){this.m=a};q.Tf=function(a){this.Pc=a};q.Xe=function(){return this.Pc};
|
|
264
|
+
q.Gb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Dd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.C&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};q.Dd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.Cd=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};q.T=function(){return Infinity==this.i&&!this.s};
|
|
265
|
+
q.kb=function(){return Infinity!=this.i&&!this.s};q.Ra=function(){return Math.max(this.u,this.fb()-this.m)};q.ye=function(a){this.u=a};q.fb=function(){return this.T()||this.kb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};q.cc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.fb()-this.m+a,this.Qa()))};q.Cb=function(){return this.cc(0)};
|
|
266
|
+
q.Qa=function(){return Math.max(0,this.fb()-(this.T()||this.kb()?this.Pc:0))};q.Be=function(){return null==this.l||null!=this.h&&this.C?!1:!0};q.we=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.we;T.prototype.usingPresentationStartTime=T.prototype.Be;T.prototype.getSeekRangeEnd=T.prototype.Qa;T.prototype.getSeekRangeStart=T.prototype.Cb;T.prototype.getSafeSeekRangeStart=T.prototype.cc;T.prototype.getSegmentAvailabilityEnd=T.prototype.fb;
|
|
267
|
+
T.prototype.setUserSeekStart=T.prototype.ye;T.prototype.getSegmentAvailabilityStart=T.prototype.Ra;T.prototype.isInProgress=T.prototype.kb;T.prototype.isLive=T.prototype.T;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Cd;T.prototype.notifyMinSegmentStartTime=T.prototype.Dd;T.prototype.notifySegments=T.prototype.Gb;T.prototype.getDelay=T.prototype.Xe;T.prototype.setDelay=T.prototype.Tf;T.prototype.setSegmentAvailabilityDuration=T.prototype.Rd;
|
|
268
|
+
T.prototype.setStatic=T.prototype.nc;T.prototype.setClockOffset=T.prototype.xe;T.prototype.getPresentationStartTime=T.prototype.jf;T.prototype.setDuration=T.prototype.Ja;T.prototype.getMaxSegmentDuration=T.prototype.df;T.prototype.getDuration=T.prototype.getDuration;function ji(a,b){this.j=a;this.m=ki(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}ji.prototype.release=function(){this.j=null;this.i=function(){}};function li(a,b){a.i=b}function mi(a){this.g=a}function ki(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Ih(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function ni(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.l=c;this.u=e;this.i=new bf;this.s=!1;this.D=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.A(a,"waiting",function(){return oi(f)});this.m=(new O(function(){oi(f)})).Ba(.25)}ni.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.u=null};ni.prototype.Gd=function(){this.o=!0;oi(this)};
|
|
269
|
+
function oi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.D&&(a.j=!1,a.D=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=ki(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Jh(b,g,a.l.gapDetectionThreshold);if(!(null==
|
|
270
|
+
c||0==c&&!a.o||(d=b.start(c),d>=a.C.Qa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new P("largegap",g),g.cancelable=!0,a.u(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function pi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=qi.value().get(b),c.ta(a,b,d))}var qi=new tc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function ri(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new bf;this.i=new si(a);pi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){ti(d,d.j)})}ri.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function ui(a){return a.m?a.g.currentTime:a.j}function vi(a,b){0<a.g.readyState?wi(a.i,b):pi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){ti(a,a.j)})}
|
|
271
|
+
function ti(a,b){.001>Math.abs(a.g.currentTime-b)?xi(a):(a.h.ta(a.g,"seeking",function(){xi(a)}),wi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function xi(a){a.m=!0;a.h.A(a.g,"seeking",function(){return a.l()})}function si(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}si.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
272
|
+
function wi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ba(.1)};function yi(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.ta(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new bf;pi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}yi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};yi.prototype.o=function(a){this.h=this.j?this.h:a};yi.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};yi.prototype.D=function(){};
|
|
273
|
+
function zi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.G=b.minBufferTime||0;this.l=c;this.C=e;this.u=null;this.j=new ni(a,b.presentationTimeline,c,Ai(a,c),f);this.h=new ri(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=ui(g.h);h=Bi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;vi(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Ci(this,d));this.s=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=ui(g.h),k=g.g.Cb(),l=g.g.Qa();3>l-k&&(k=
|
|
274
|
+
l-3);h<k&&(h=Bi(g,h),g.i.currentTime=h)}})).Ba(.25)}zi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};zi.prototype.o=function(a){vi(this.h,a)};zi.prototype.m=function(){var a=ui(this.h);return 0<this.i.readyState&&!this.i.paused?Di(this,a):a};
|
|
275
|
+
function Ci(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Cb():a.g.Qa():0>b&&(b=a.g.Qa()+b);return Ei(a,Di(a,b))}zi.prototype.D=function(){this.j.Gd()};function Ei(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Bi(a,b){var c=Math.max(a.G,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Cb(),f=a.g.Qa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.cc(c),k=a.g.cc(d);c=a.g.cc(c+d);return b>=g?Ei(a,b):b>f?f:b<e?Gh(a.i.buffered,k)?k:c:b>=h||Gh(a.i.buffered,b)?b:c}
|
|
276
|
+
function Di(a,b){var c=a.g.Cb();if(b<c)return c;c=a.g.Qa();return b>c?c:b}function Ai(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ji(new mi(a),b.stallThreshold);li(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.K=a;this.g=null;this.h=0;this.i=!1}q=U.prototype;q.destroy=function(){Lb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)};q.yf=function(){this.i=!0};
|
|
277
|
+
q.find=function(a){for(var b=this.K.length-1,c=b;0<=c;--c){var d=this.K[c],e=c<b?this.K[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.K.length&&a<this.K[0].startTime?this.h:null};q.get=function(a){if(0==this.K.length)return null;a-=this.h;return 0>a||a>=this.K.length?null:this.K[a]};q.offset=function(a){if(!this.i)for(var b=t(this.K),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
|
|
278
|
+
q.Eb=function(a){!this.i&&a.length&&(this.K=this.K.filter(function(b){return b.startTime<a[0].startTime}),this.K.push.apply(this.K,ka(a)))};q.Fb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.K.length||d.endTime>c.K[0].startTime)});this.Eb(a);this.cb(b)};q.cb=function(a){if(!this.i){var b=this.K.length;this.K=this.K.filter(function(c){return c.endTime>a});this.h+=b-this.K.length}};
|
|
279
|
+
q.Ya=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.K.length;)if(this.K[this.K.length-1].startTime>=b)this.K.pop();else break;for(;this.K.length;)if(this.K[0].endTime<=a)this.K.shift(),c||this.h++;else break;0!=this.K.length&&(a=this.K[this.K.length-1],this.K[this.K.length-1]=new ii(a.startTime,b,a.j,a.oa,a.ha,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
|
|
280
|
+
q.Rc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.K.push.apply(c.K,ka(d)):(c.g.stop(),c.g=null)}),this.g.Ba(a))};U.prototype[Symbol.iterator]=function(){return this.Bb(0)};U.prototype.Bb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Fi(this,b,d)};
|
|
281
|
+
function Gi(a,b,c){return new U([new ii(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",U);U.forSingleSegment=Gi;U.prototype.getIteratorForTime=U.prototype.Bb;U.prototype.updateEvery=U.prototype.Rc;U.prototype.fit=U.prototype.Ya;U.prototype.evict=U.prototype.cb;U.prototype.mergeAndEvict=U.prototype.Fb;U.prototype.merge=U.prototype.Eb;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.yf;
|
|
282
|
+
U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function Fi(a,b,c){this.i=a;this.h=b;this.g=c}Fi.prototype.seek=function(a){Lb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Bb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
|
|
283
|
+
Fi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.qa().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Fi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.qa().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Fi);Fi.prototype.next=Fi.prototype.next;Fi.prototype.current=Fi.prototype.current;
|
|
284
|
+
Fi.prototype.seek=Fi.prototype.seek;function Hi(){U.call(this,[]);this.j=[]}ra(Hi,U);q=Hi.prototype;q.clone=function(){var a=new Hi;a.j=this.j.slice();return a};q.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.K.length}return null};
|
|
285
|
+
q.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.K.length}return null};q.offset=function(){};q.Eb=function(){};q.cb=function(){};q.Fb=function(){};q.Ya=function(){};q.Rc=function(){};M("shaka.media.MetaSegmentIndex",Hi);Hi.prototype.updateEvery=Hi.prototype.Rc;Hi.prototype.fit=Hi.prototype.Ya;Hi.prototype.mergeAndEvict=Hi.prototype.Fb;Hi.prototype.evict=Hi.prototype.cb;Hi.prototype.merge=Hi.prototype.Eb;
|
|
286
|
+
Hi.prototype.offset=Hi.prototype.offset;Hi.prototype.get=Hi.prototype.get;Hi.prototype.find=Hi.prototype.find;Hi.prototype.release=Hi.prototype.release;function Ii(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ic();this.h=new O(function(){b.g.ne(.25*b.i)})}Ii.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ii.prototype.set=function(a){this.i=a;Ji(this)};Ii.prototype.Ec=function(){return this.g.Ec()};function Ji(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ic()!=b&&a.g.Qd(b);return}catch(c){}a.h.Ba(.25);0!=a.g.Ic()&&a.g.Qd(0)};function Ki(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Li(b,!1)})).Ba(.25)}Ki.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Li(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Mi(a){R.call(this);this.g=new Map;this.h=a}ra(Mi,R);Mi.prototype.release=function(){this.g.clear();R.prototype.release.call(this)};function Ni(a,b){var c=a.g.get(b);c||(c={ic:[],$d:null,contentType:b},a.g.set(b,c));return c}function Oi(a,b,c){var d=Ni(a,b.contentType);Pi(a,d);a={xd:b,position:c};d=d.ic;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
287
|
+
Mi.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.ic;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.xd;break a}}d=null}if(e=d)e=c.$d,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
288
|
+
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.$d=d,JSON.stringify(d),c=new P("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Pi(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.ic;b.ic=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.ic=[]};function Qi(a){R.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new P("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ba(2)}ra(Qi,R);Qi.prototype.release=function(){this.g.clear();this.h.stop();R.prototype.release.call(this)};function Ri(a){R.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{sb:null,rb:Si,jb:function(c,d){return Ti(b,"enter",c,d)}},{sb:Ui,rb:Si,jb:function(c,d){return Ti(b,"enter",c,d)}},{sb:Vi,rb:Si,jb:function(c,d){return Ti(b,"enter",c,d)}},{sb:Si,rb:Ui,jb:function(c,d){return Ti(b,"exit",c,d)}},{sb:Si,rb:Vi,jb:function(c,d){return Ti(b,"exit",c,d)}},{sb:Ui,rb:Vi,jb:function(c,d){return Ti(b,"skip",c,d)}},{sb:Vi,rb:Ui,jb:function(c,d){return Ti(b,"skip",c,d)}}];this.h=new bf;this.h.A(this.i,"regionremove",
|
|
289
|
+
function(c){b.g["delete"](c.region)})}ra(Ri,R);Ri.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;R.prototype.release.call(this)};Ri.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Ui:a>d.endTime?Vi:Si;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.sb==e&&h.rb==f&&h.jb(d,b)}};
|
|
290
|
+
function Ti(a,b,c,d){b=new P(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Ui=1,Si=2,Vi=3;function Wi(a,b,c,d,e){a=Te(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Xi(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.u=1;this.o=this.l=null;this.i=new Map;this.C=!1;this.D=null;this.s=!1;this.j=new $e(function(){return Yi(c)})}Xi.prototype.destroy=function(){return this.j.destroy()};function Yi(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Zi(e),b.push($i(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;z(f)})}
|
|
291
|
+
Xi.prototype.configure=function(a){this.h=a;this.D=new Ae({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};Xi.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,aj(a),2);af(a.j);a.C=!0;z(b)})};
|
|
292
|
+
function bj(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=rc,C(k,2),u(k,$h(a.g.P,c.$),4);case 4:wa(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Oc(b.mimeType,b.codecs);Oh(a.g.P,e);f=a.g.P.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=cj(b),a.i.set(c.$,h),dj(a,h,0);z(k)}})}function ej(a){var b=a.i.get(qc);b&&(Zi(b),$i(b)["catch"](function(){}),a.i["delete"](qc));a.o=null}
|
|
293
|
+
function fj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.ob&&(gj(a,e,!1,0,!1),c.ob=d)}else if(d=c.ob)c.ob=null,gj(a,d,!0,0,!1)}}function hj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.C&&(b.video&&gj(a,b.video,c,d,e),b.audio&&gj(a,b.audio,c,d,e))}function ij(a,b){a.o=b;a.C&&gj(a,b,!0,0,!1)}
|
|
294
|
+
function gj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=qc?f&&(f.ob&&(b.trickModeVideo?(f.ob=b,b=b.trickModeVideo):f.ob=null),f.stream!=b||e)&&(b.type==qc&&Oh(a.g.P,Oc(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ca=null,c&&(f.Yb?f.Uc=!0:f.Ia?(f.qb=!0,f.yc=d,f.Uc=!0):(Zi(f),jj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),kj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):bj(a,b)}
|
|
295
|
+
function kj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ua)return e["return"]();c=b.stream;d=b.ua;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.ua!=d||b.stream!=c)return e["return"]();var f=a.g.Hc();var g=Th(a.g.P,b.type),h=b.stream.segmentIndex.find(b.za?b.za.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ha?k.ha-k.oa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ha?k.ha-k.oa:null)||0),k=a.g.getBandwidthEstimate(),
|
|
296
|
+
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.ua.h.g>h?!0:!1):f=!1;f&&b.ua.abort();z(e)})}function lj(a,b){b.Yb||b.qb||(b.Ia?(b.qb=!0,b.yc=0):null==Rh(a.g.P,b.type)?null==b.La&&dj(a,b,0):(Zi(b),jj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
297
|
+
function aj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=rc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.bb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Oa,a.l.video),d.add(a.l.video));a.o&&(c.set(b.$,a.o),d.add(a.o));e=a.g.P;f=a.h.forceTransmuxTS;return u(n,e.init(c,f),2)}af(a.j);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.P.Ja(p):a.g.P.Ja(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||
|
|
298
|
+
(m=cj(l),a.i.set(k,m),dj(a,m,0));z(n)})}function cj(a){return{stream:a,type:a.type,ca:null,za:null,Jc:null,vd:null,ud:null,td:null,ob:null,endOfStream:!1,Ia:!1,La:null,qb:!1,yc:0,Uc:!1,Yb:!1,Id:!1,ec:!1,ua:null}}
|
|
299
|
+
function mj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:af(a.j);if(b.Ia||null==b.La||b.Yb)return h["return"]();b.La=null;if(!b.qb){h.B(2);break}return u(h,jj(a,b,b.Uc,b.yc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.La&&dj(a,b,0),h["return"]();case 4:C(h,6);d=nj(a,b);null!=d&&(dj(a,b,d),b.ec=!1);wa(h,7);break;case 6:return e=
|
|
300
|
+
F(h),u(h,oj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.B(0);break}return u(h,a.g.P.endOfStream(),10);case 10:af(a.j),g=a.g.P.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ja(g),z(h)}})}
|
|
301
|
+
function nj(a,b){if(pj(b))return Yh(a.g.P,b.stream.originalId||""),null;b.type==qc&&Zh(a.g.P);var c=a.g.Hc(),d=b.za?b.za.endTime:c,e=Uh(a.g.P,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(qc))&&pj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Th(a.g.P,b.type);e=qj(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=Infinity;
|
|
302
|
+
var g=Array.from(a.i.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,pj(h)||h.ca&&!h.ca.current()||(f=Math.min(f,h.za?h.za.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;rj(a,b,c,e)["catch"](function(){});return null}
|
|
303
|
+
function qj(a,b,c,d){if(b.ca)return b.ca.current();if(b.za||d)return b.ca=b.stream.segmentIndex.Bb(b.za?b.za.endTime:d),b.ca&&b.ca.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ca=b.stream.segmentIndex.Bb(d),e=b.ca&&b.ca.next().value);e||(b.ca=b.stream.segmentIndex.Bb(c),e=b.ca&&b.ca.next().value);return e}
|
|
304
|
+
function rj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,v,w;return L(function(x){switch(x.g){case 1:return e=rc,f=b.stream,g=b.ca,b.Ia=!0,C(x,2),u(x,sj(a,b,d),4);case 4:af(a.j);if(a.s)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(y){var D,B,A;return L(function(E){af(a.j);if(a.s)return E["return"]();n=tj(n,y);D=!1;B=0;(new jg).box("mdat",function(G){B=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return E.B(0);
|
|
305
|
+
A=n.subarray(0,B);n=n.subarray(B);return u(E,uj(a,b,c,f,d,A),0)})},u(x,vj(a,b,d,p),6);l=vj(a,b,d);return u(x,l,7);case 7:return m=x.h,af(a.j),a.s?x["return"]():b.qb?(b.Ia=!1,dj(a,b,0),x["return"]()):u(x,uj(a,b,c,f,d,m),6);case 6:af(a.j);if(a.s)return x["return"]();b.za=d;g.next();b.Ia=!1;b.Id=!1;r=a.g.P.Za();v=r[b.type];ab(JSON.stringify(v));b.qb||a.g.Gd();dj(a,b,0);wa(x,0);break;case 2:w=F(x);af(a.j,w);if(a.s)return x["return"]();b.Ia=!1;if(7001==w.code)b.Ia=!1,b.La=null,dj(a,b,0),x.B(0);else if(b.type==
|
|
306
|
+
e.$&&a.h.ignoreTextStreamFailures)a.i["delete"](e.$),x.B(0);else if(3017==w.code)wj(a,b,w),x.B(0);else if(1001==w.code&&w.data&&404==w.data[1])b.Ia=!1,b.La=null,dj(a,b,1),x.B(0);else return b.ec=!0,w.severity=2,u(x,oj(a,w),0)}})}function tj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
307
|
+
function wj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Id})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.ec=!0;a.s=!0;a.g.onError(c);return}b.Id=!0}dj(a,b,4)}
|
|
308
|
+
function sj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.vd||e!=b.ud||f!=b.td)h=function(){var n;return L(function(p){if(1==p.g)return C(p,2),b.ud=e,b.td=f,b.vd=g,u(p,ai(a.g.P,b.type,g,e,f),4);if(2!=p.g)return wa(p,0);n=F(p);b.ud=null;b.td=null;b.vd=null;throw n;})},d.push(h());!hi(c.g,b.Jc)&&(b.Jc=c.g)&&(k=vj(a,b,c.g),l=function(){var n,p,r;return L(function(v){switch(v.g){case 1:return C(v,2),u(v,k,4);
|
|
309
|
+
case 4:return n=v.h,af(a.j),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,Vh(a.g.P,b.type,n,null,null,p),5);case 5:wa(v,0);break;case 2:throw r=F(v),b.Jc=null,r;}})},a.g.Cf(c.startTime,c.g),d.push(l()));return u(m,Promise.all(d),0)})}
|
|
310
|
+
function uj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new jg).R("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.jc();var n=k.reader.jc();var p=k.reader.M();var r=k.reader.M();var v=k.reader.M();var w=k.reader.M();var x=e.startTime+r/p}else p=k.reader.M(),x=k.reader.Kb()/p+e.timestampOffset,r=x-e.startTime,v=k.reader.M(),w=k.reader.M(),
|
|
311
|
+
m=k.reader.jc(),n=k.reader.jc();k=k.reader.$a(k.reader.O.byteLength-k.reader.Y());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Df():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:r,eventDuration:v,id:w,messageData:k}),l=new P(xj,l),a.g.onEvent(l))}).parse(f),u(h,yj(a,b,c),2);if(3!=h.g)return af(a.j),u(h,Vh(a.g.P,b.type,f,e.startTime,e.endTime,g),3);af(a.j);z(h)})}
|
|
312
|
+
function yj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Rh(a.g.P,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.P.remove(b.type,e,e+g),2)}af(a.j);z(h)})}function pj(a){return a&&a.type==qc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
313
|
+
function vj(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=Ze,f=Wi(c.qa(),c.oa,c.ha,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof gi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.lb.request(e,f),b.ua=h,u(l,h.promise,2);k=l.h;b.ua=null;return l["return"](k.data)})}
|
|
314
|
+
function jj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.qb=!1,b.Uc=!1,b.yc=0,b.Yb=!0,b.za=null,b.Jc=null,b.ca=null,d?(e=a.g.Hc(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,$h(a.g.P,b.type),4);if(3!=g.g)return af(a.j),c?u(g,a.g.P.flush(b.type),3):g.B(3);af(a.j);b.Yb=!1;b.endOfStream=!1;dj(a,b,0);z(g)})}
|
|
315
|
+
function dj(a,b,c){var d=b.type;if(d!=qc||a.i.has(d))b.La=(new nd(function(){var e;return L(function(f){if(1==f.g)return C(f,2),u(f,mj(a,b),4);if(2!=f.g)return wa(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).S(c)}function Zi(a){null!=a.La&&(a.La.stop(),a.La=null)}function $i(a){return L(function(b){return a.ua?u(b,a.ua.abort(),0):b.B(0)})}function oj(a,b){return L(function(c){if(1==c.g)return u(c,Ce(a.D),2);af(a.j);a.g.onError(b);b.handled||a.h.failureCallback(b);z(c)})};function zj(a,b){var c=Aj(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Bj(d)});this.s=new $e(function(){return Cj(d)})}zj.prototype.destroy=function(){return this.s.destroy()};function Cj(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),Dj(a),u(e,a.u,2);a.g&&a.g.Ha.mb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ha.mb();a.g=null;a.m=[];a.j=null;z(e)})}
|
|
316
|
+
function Ej(a,b){var c={Hb:function(){},Lc:function(){},mb:function(){},onError:function(){},Nc:function(){},Jg:function(){}};a.m.push({create:b,Ha:c});a.h&&a.h.abort();Dj(a);return c}
|
|
317
|
+
function Bj(a){return L(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.ib)var c=!1;else{a.g&&(a.g.Ha.mb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ha.Hb(),a.g={node:d.node,payload:d.payload,ib:d.ib,Ha:c.Ha}):c.Ha.Nc();c=!0}c?c=Promise.resolve():a.g?c=Fj(a):(a.j.Bf(a.i),a.o=new sc,c=a.o);b=u(b,c,1)}return b})}
|
|
318
|
+
function Fj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.ff(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.Se(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ha.Lc(),a.g=null);wa(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ha.mb();else a.g.Ha.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Dj(a){a.o&&(a.o.resolve(),a.o=null)};function Gj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Gj.prototype;q.remove=function(a,b){if(!this.g)return!1;Hj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
319
|
+
q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&Lb("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
|
|
320
|
+
g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=t(c);for(var f=c.next();!f.done;e={ub:e.ub},f=c.next())e.ub=f.value,a.some(function(g){return function(h){return h.startTime==g.ub.startTime&&h.endTime==g.ub.endTime&&h.text==g.ub.payload?!0:!1}}(e))||(f=Ij(e.ub))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
|
|
321
|
+
d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Hj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
322
|
+
function Ij(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
323
|
+
function Hj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Gj);Gj.prototype.setTextVisibility=Gj.prototype.setTextVisibility;Gj.prototype.isTextVisible=Gj.prototype.isTextVisible;Gj.prototype.destroy=Gj.prototype.destroy;Gj.prototype.append=Gj.prototype.append;Gj.prototype.remove=Gj.prototype.remove;function Jj(){}function Kj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Jj);Jj.removeAllChildren=Kj;function Lj(a,b){var c=this;this.j=!1;this.i=[];this.u=a;this.m=b;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.s=(new O(function(){Mj(c)})).Ba(.25);this.h=new Map;this.o=new bf;this.o.A(document,"fullscreenchange",function(){Mj(c,!0)});this.l=null;"ResizeObserver"in
|
|
324
|
+
window&&(this.l=new ResizeObserver(function(){Mj(c,!0)}),this.l.observe(this.g))}q=Lj.prototype;q.append=function(a){var b=[].concat(ka(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={oc:c.oc},d=a.next())c.oc=d.value,b.some(function(e){return function(f){return ub(f,e.oc)}}(c))||this.i.push(c.oc);Mj(this)};
|
|
325
|
+
q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.s&&this.s.stop();this.h.clear();this.o&&(this.o.release(),this.o=null);this.l&&(this.l.disconnect(),this.l=null)};q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Mj(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
|
|
326
|
+
function Nj(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Ce:null;l&&(g.push(l.Zd),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Oj(a,k,e),l=a.h.get(k),n=l.Ce,f=!0));0<k.nestedCues.length&&n&&Nj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,r){return p.startTime!=r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});
|
|
327
|
+
h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.Zd)}}function Mj(a,b){if(a.g){var c=a.u.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(Kj(a.g),a.h.clear());if(a.j){for(var d=new Map,e=t(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Nj(a,a.i,a.g,c,[])}}}
|
|
328
|
+
function Oj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Lb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Pj(a,f,b,c,d);c=f;d&&(c=document.createElement("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.h.set(b,{Zd:f,Ce:c})}
|
|
329
|
+
function Pj(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Qj(c.linePadding,c,a.m);f.paddingRight=Qj(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
|
|
330
|
+
"contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Rj(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?
|
|
331
|
+
"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Qj(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==ob?(f.width="100%",c.lineAlign==qb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==qb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height=
|
|
332
|
+
"100%",c.lineAlign==qb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Bb?"%":"px",d=c.region.viewportAnchorUnits==Bb?"%":"px",f.height=c.region.height+(c.region.heightUnits==Bb?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==ob?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat=
|
|
333
|
+
"left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==ob?f.width=c.size+"%":f.height=c.size+"%")}
|
|
334
|
+
function Qj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Rj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Lj);Lj.prototype.setTextVisibility=Lj.prototype.setTextVisibility;
|
|
335
|
+
Lj.prototype.isTextVisible=Lj.prototype.isTextVisible;Lj.prototype.remove=Lj.prototype.remove;Lj.prototype.destroy=Lj.prototype.destroy;Lj.prototype.append=Lj.prototype.append;function Sj(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,r){return p+"<"+r+">"},
|
|
336
|
+
"");k=k.reduceRight(function(p,r){return p+"</"+r+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Lb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
|
|
337
|
+
break;case "right":k.push("align:right");break;case nb:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function Tj(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Uj(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?Vj:Wj};d.ot=Xj(c);var e=d.ot===Yj||d.ot===Zj||d.ot===ak||d.ot===bk;e&&(d.bl=ck(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==bk&&(d.tb=dk(a,d.ot)/1E3);ek(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
|
|
338
|
+
function fk(a,b,c){try{if(!a.g.enabled)return b;var d=gk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=ak;break a;case "application/x-mpegurl":e=hk;break a}e=void 0}d.ot=e;d.su=!0;var f=ik(d);return jk(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function kk(a,b){try{if(!a.g.enabled)return b;var c=gk(a);c.ot=lk;c.su=!0;var d=ik(c);return jk(b,d)}catch(e){return Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
|
|
339
|
+
function gk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function ek(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,gk(a));c.pr=a.h.Gc();var e=c.ot===Yj||c.ot===ak;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=mk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=ik(c);f&&(b.uris=b.uris.map(function(g){return jk(g,f)}))}}}
|
|
340
|
+
function Xj(a){var b=a.type;if(a.init)return nk;if("video"==b)return a.codecs.includes(",")?ak:Yj;if("audio"==b)return Zj;if("text"==b)return"application/mp4"===a.mimeType?bk:lk}function ck(a,b){var c=a.h.Za()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
|
|
341
|
+
function dk(a,b){var c=a.h.hb();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case Yj:return d.videoBandwidth||NaN;case Zj:return d.audioBandwidth||NaN;default:return d.bandwidth}}
|
|
342
|
+
function ik(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
343
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function mk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={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};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=ik(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
344
|
+
function jk(a,b){if(!b||a.includes("offline:"))return a;var c=new Yb(a);c.g.set("CMCD",b);return c.toString()}var hk="m",Zj="a",Yj="v",ak="av",nk="i",lk="c",bk="tt",Wj="v",Vj="l";M("shaka.util.CmcdManager.StreamingFormat",{fg:"d",mg:"h",wg:"s",sg:"o"});function ok(){}
|
|
345
|
+
function pk(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Le(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Le(l)),k=pk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
|
|
346
|
+
k),g=!1)}return g}function qk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}M("shaka.util.ConfigUtils",ok);ok.convertToConfigObject=qk;ok.mergeConfigObjects=pk;function rk(){}
|
|
347
|
+
function sk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Be(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Sf,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Be(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
|
|
350
348
|
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: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"},
|
|
351
|
-
manifestPreprocessor:function(g){return g}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:
|
|
352
|
-
stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||
|
|
353
|
-
k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new
|
|
349
|
+
manifestPreprocessor:function(g){return g}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:Be(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,
|
|
350
|
+
stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||rd()||td())d.gapDetectionThreshold=.5;if(sd("Web0S")||rd()||td())d.stallSkip=0;var e={trackSelectionCallback:function(g){return L(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return L(function(k){if(1==
|
|
351
|
+
k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ke},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,
|
|
354
352
|
maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,
|
|
355
|
-
maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return L(function(h){return h["return"](
|
|
356
|
-
function
|
|
357
|
-
function
|
|
358
|
-
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=
|
|
359
|
-
function
|
|
360
|
-
this.
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,
|
|
364
|
-
q.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==
|
|
365
|
-
null,z(c)}})};q.
|
|
366
|
-
q.
|
|
367
|
-
q.load=function(a,b,c){var d=this;this
|
|
368
|
-
g.onError=function(l){return k(l)}})};function
|
|
369
|
-
function
|
|
370
|
-
case 3:if(!a.s){n.
|
|
371
|
-
break}return u(n,a.
|
|
372
|
-
function
|
|
373
|
-
function
|
|
374
|
-
function
|
|
375
|
-
width:
|
|
376
|
-
k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),h.
|
|
377
|
-
h,k,l;return L(function(m){if(1==m.g)return g=a,u(m,a.
|
|
378
|
-
function
|
|
379
|
-
function
|
|
380
|
-
a.
|
|
381
|
-
|
|
382
|
-
a.
|
|
383
|
-
a.
|
|
384
|
-
function
|
|
385
|
-
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?
|
|
353
|
+
maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return L(function(h){return h["return"](tk(g,f.preferredAudioLanguage))})};return f}
|
|
354
|
+
function uk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return pk(a,b,c||sk(),d,"")}
|
|
355
|
+
function tk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=jd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return cd(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
|
|
356
|
+
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=qc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",rk);rk.mergeConfigObjects=uk;function vk(){this.g=null;this.h=[]}function wk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function xk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
|
|
357
|
+
function yk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function zk(){this.i=this.h=null;this.g=[]}function Ak(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Bk(){this.o=this.s=this.G=this.C=this.m=this.j=this.D=this.l=this.i=this.H=this.J=this.L=this.u=this.N=NaN;this.g=new vk;this.h=new zk};function V(a,b){R.call(this);var c=this;this.l=Ck;this.wc=this.g=null;this.ka=!1;this.m=new bf;this.md=this.s=this.Tb=this.i=this.Cc=this.J=this.j=this.wa=this.W=this.Dc=this.L=this.Ac=this.H=this.wb=this.D=this.N=this.o=this.G=null;this.wd=1E9;this.h=Dk(this);this.sd={width:Infinity,height:Infinity};this.u=null;this.Ma=new se(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Na=this.h.preferredTextLanguage;this.Vb=this.h.preferredTextRole;this.Nb=this.h.preferForcedSubs;
|
|
358
|
+
this.Ub=[];this.Xb=null;b&&b(this);this.G=Ek(this);this.G.Od(this.h.streaming.forceHTTPS);this.C=null;Fk&&(this.C=Tb(Fk));this.m.A(window,"online",function(){c.Jd()});this.V={name:"detach"};this.da={name:"attach"};this.ga={name:"unload"};this.Bd={name:"manifest-parser"};this.rd={name:"manifest"};this.vb={name:"media-source"};this.nd={name:"drm-engine"};this.ea={name:"load"};this.Ed={name:"src-equals-drm-engine"};this.xb={name:"src-equals"};var d=new Map;d.set(this.da,function(e,f){return He(Gk(c,
|
|
359
|
+
e,f))});d.set(this.V,function(e){e.F&&(c.m.Ca(e.F,"error"),e.F=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return He(e)});d.set(this.ga,function(e){return He(Hk(c,e))});d.set(this.vb,function(e){e=Ik(c,e);return He(e)});d.set(this.Bd,function(e,f){var g=Jk(c,e,f);return He(g)});d.set(this.rd,function(e){return Kk(c,e)});d.set(this.nd,function(e){e=Lk(c,e);return He(e)});d.set(this.ea,function(e,f){return He(Mk(c,e,f))});d.set(this.Ed,function(e,f){var g=Nk(c,e,f);return He(g)});d.set(this.xb,
|
|
360
|
+
function(e,f){return Ok(c,e,f)});this.Fa=new zj(this.V,{ff:function(e,f,g,h){var k=null;e==c.V&&(k=g==c.V?c.V:c.da);e==c.da&&(k=g==c.V||f.F!=h.F?c.V:g==c.da?c.da:g==c.vb||g==c.ea?c.vb:g==c.xb?c.Ed:null);e==c.vb&&(k=g==c.ea&&f.F==h.F?c.Bd:c.ga);e==c.Bd&&(k=Pk(c.ea,c.rd,c.ga,g,f,h));e==c.rd&&(k=Pk(c.ea,c.nd,c.ga,g,f,h));e==c.nd&&(k=Pk(c.ea,c.ea,c.ga,g,f,h));e==c.Ed&&(k=g==c.xb&&f.F==h.F?c.xb:c.ga);if(e==c.ea||e==c.xb)k=c.ga;e==c.ga&&(k=h.F&&f.F==h.F?c.da:c.V);return k},Se:function(e,f,g){c.dispatchEvent(Qk(Rk,
|
|
361
|
+
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,Hk(c,e),2):f["return"](e.F?c.da:c.V)})},Bf:function(e){c.dispatchEvent(Qk(Sk,(new Map).set("state",e.name)))}});a&&this.Wb(a,!0)}ra(V,R);function Qk(a,b){return new P(a,b)}q=V.prototype;
|
|
362
|
+
q.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Tk)return c["return"]();a.l=Tk;b=Ej(a.Fa,function(){return{node:a.V,payload:Aj(),ib:!1}});return u(c,new Promise(function(d){b.Hb=function(){};b.Lc=function(){d()};b.mb=function(){d()};b.onError=function(){d()};b.Nc=function(){d()}}),2);case 2:return u(c,a.Fa.destroy(),3);case 3:a.m&&(a.m.release(),a.m=null);a.md=null;a.s=null;a.h=null;a.u=null;a.wc=null;a.W=null;if(!a.G){c.B(4);break}return u(c,a.G.destroy(),5);case 5:a.G=
|
|
363
|
+
null;case 4:R.prototype.release.call(a),z(c)}})};q.Wb=function(a,b){b=void 0===b?!0:b;if(this.l==Tk)return Promise.reject(Uk());var c=Aj();c.F=a;od()||(b=!1);var d=b?this.vb:this.da,e=Ej(this.Fa,function(){return{node:d,payload:c,ib:!1}});e.Hb=function(){};return Vk(e)};q.detach=function(){var a=this;if(this.l==Tk)return Promise.reject(Uk());var b=Ej(this.Fa,function(){return{node:a.V,payload:Aj(),ib:!1}});b.Hb=function(){};return Vk(b)};
|
|
364
|
+
q.Vd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Tk)return Promise.reject(Uk());od()||(a=!1);var c=Aj(),d=Ej(this.Fa,function(e){var f=e.F&&a?b.vb:e.F?b.da:b.V;c.F=e.F;return{node:f,payload:c,ib:!1}});d.Hb=function(){};return Vk(d)};q.ag=function(a){this.Xb=a};
|
|
365
|
+
q.load=function(a,b,c){var d=this;this.Xb=null;if(this.l==Tk)return Promise.reject(Uk());this.dispatchEvent(Qk(Wk));var e=Aj();e.uri=a;e.Sd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Xk(this,e)?this.xb:this.ea,g=Ej(this.Fa,function(h){if(null==h.F)return null;e.F=h.F;return{node:f,payload:e,ib:!0}});this.u=new Bk;this.W=Yk(this);g.Hb=function(){};return new Promise(function(h,k){g.Nc=function(){return k(new N(2,7,7002))};g.Lc=function(){h();d.dispatchEvent(Qk(Zk))};g.mb=function(){return k(Uk())};
|
|
366
|
+
g.onError=function(l){return k(l)}})};function Xk(a,b){if(!od())return!0;var c=b.mimeType,d=b.uri||"";c||(c=dg(d),c=$k[c]);if(c){if(""==(b.F||qd()).canPlayType(c))return!1;if(!od()||!(c in cg||dg(d)in eg)||a.h.streaming.preferNativeHls)return!0;if(ud())return a.h.streaming.useNativeHlsOnSafari}return!1}function Gk(a,b,c){null==b.F&&(b.F=c.F,a.m.A(b.F,"error",function(){var d=al(a);d&&bl(a,d)}));a.g=b.F;return Promise.resolve()}
|
|
367
|
+
function Hk(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=Tk&&(a.l=Ck),c=a.Ub.map(function(p){return p()}),a.Ub=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Qk(cl));b.mimeType=null;b.startTime=null;b.uri=null;b.F&&(a.m.Ca(b.F,"loadedmetadata"),a.m.Ca(b.F,"playing"),a.m.Ca(b.F,"pause"),a.m.Ca(b.F,"ended"),a.m.Ca(b.F,"ratechange"));a.wb&&(a.wb.release(),a.wb=null);a.Ac&&(a.Ac.stop(),a.Ac=null);if(!a.J){n.B(3);break}return u(n,a.J.stop(),4);case 4:a.J=null,a.Cc=null;
|
|
368
|
+
case 3:if(!a.s){n.B(5);break}return u(n,a.s.stop(),5);case 5:if(!a.j){n.B(7);break}return u(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.H&&(a.H.release(),a.H=null);a.D&&(a.D.release(),a.D=null);if(!a.N){n.B(9);break}return u(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.C)a.C.onAssetUnload();if(!b.F||!b.F.src){n.B(11);break}return u(n,new Promise(function(p){return(new O(p)).S(.1)}),12);case 12:for(b.F.removeAttribute("src"),b.F.load();b.F.lastChild;)b.F.removeChild(b.F.firstChild);case 11:if(!a.o){n.B(13);
|
|
369
|
+
break}return u(n,a.o.destroy(),14);case 14:a.o=null;case 13:a.Tb=null;a.L=null;if(a.i){d=t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.u=new Bk;a.qd=null;dl(a);z(n)}})}
|
|
370
|
+
function Ik(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new Dh,d=a.h.textDisplayFactory,e=Tb(d),a.qd=d,f=el(b.F,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,r=t(m.frames),v=r.next();!v.done;v=r.next())fl(a,n,p,"ID3",v.value);if(a.C)a.C.onHlsTimedMetadata(m,n)}}),u(g,f.D,2);a.N=f;z(g)})}
|
|
371
|
+
function Jk(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.G,a.Tb=d,f=a,u(h,bg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Cc=h.h;a.J=Tb(a.Cc);g=Le(a.h.manifest);c.F&&"AUDIO"===c.F.nodeName&&(g.disableVideo=!0);a.J.configure(g);z(h)})}
|
|
372
|
+
function Kk(a,b){var c=b.uri,d=a.G;a.Dc=new Qi(function(){return a.kc()});a.Dc.addEventListener("regionadd",function(g){g=g.region;gl(a,hl,g);if(a.C)a.C.onDashTimedMetadata(g)});a.wa=null;a.h.streaming.observeQualityChanges&&(a.wa=new Mi(function(){return a.Za()}),a.wa.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
|
|
373
|
+
mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Qk(il,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.o=h.format,ek(k,g,{ot:hk,su:!k.i}))}catch(l){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Uj(a.W,g,h)},filter:function(g){return jl(a,g)},makeTextStreamsForClosedCaptions:function(g){return kl(a,g)},
|
|
374
|
+
onTimelineRegionAdded:function(g){var h=a.Dc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new P("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return bl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
|
|
375
|
+
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new De(function(){var g,h,k,l;return L(function(m){if(1==m.g)return g=a,u(m,a.J.start(c,e),2);g.i=m.h;h=Qk(ll);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);ml(a.i);k=Date.now()/1E3;l=k-f;a.u.D=l;z(m)})}(),function(){return a.J.stop()})}
|
|
376
|
+
function Lk(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.o=nl(a,{lb:a.G,onError:function(f){bl(a,f)},Mc:function(f){ol(a,f)},onExpirationUpdated:function(f,g){pl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==ql&&d&&(d=!1,a.u.j=Date.now()/1E3-c)}}),a.o.configure(a.h.drm),u(e,wf(a.o,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.o.Wb(b.F),3):u(e,jl(a,a.i),0)})}
|
|
377
|
+
function Mk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v;return L(function(w){switch(w.g){case 1:b.startTime=c.startTime;null!=a.Xb&&(b.startTime=a.Xb,a.Xb=null);d=b.F;e=b.uri;a.Tb=e;a.H=new Ii({Ic:function(){return b.F.playbackRate},Ec:function(){return b.F.defaultPlaybackRate},Qd:function(x){b.F.playbackRate=x},ne:function(x){b.F.currentTime+=x}});f=function(){return rl(a)};g=function(){return sl(a)};a.m.A(d,"playing",f);a.m.A(d,"pause",f);a.m.A(d,"ended",f);a.m.A(d,"ratechange",g);h=a.h.abrFactory;a.s&&
|
|
378
|
+
a.md==h||(a.md=h,a.s=Tb(h),"function"!=typeof a.s.playbackRateChanged&&(Lb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.s.playbackRateChanged=function(){}),a.s.configure(a.h.abr));a.Ma=new se(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Na=a.h.preferredTextLanguage;a.Vb=a.h.preferredTextRole;a.Nb=a.h.preferForcedSubs;tl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(x,y,D){a.j&&x!=a.j.l&&ul(a,
|
|
379
|
+
x,!0,void 0===y?!1:y,void 0===D?0:D)});a.D=vl(a,b.startTime);a.wb=wl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);xl(a,k);yd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=yl(a);a.j.configure(a.h.streaming);a.l=zl;a.dispatchEvent(Qk(Al));l=null;if(m=a.hb().find(function(x){return x.active})){w.B(2);break}l=Bl(a)?a.s.chooseVariant():null;ul(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){w.B(3);break}n=
|
|
380
|
+
a.D.m();return u(w,Cl(l,n),4);case 4:p=w.h,a.D.o(p);case 3:Dl(a,null,Xd(l));case 2:return r=a.gb().find(function(x){return x.active}),r||((v=ge(a.i.textStreams,a.Na,a.Vb,a.Nb)[0]||null)&&Ak(a.u.h,v,!0),l&&(v?(l.audio&&El(a,l.audio,v)&&(a.ka=!0),a.ka&&a.N.l.setTextVisibility(!0),Fl(a)):a.ka=!1),v&&(a.h.streaming.alwaysStreamText||a.pd())&&ij(a.j,v)),u(w,a.j.start(),5);case 5:a.h.abr.enabled&&(a.s.enable(),Gl(a)),Od(a.j?a.j.l:null,a.i),Hl(a.i),Il(a),Bl(a),a.i.variants.some(function(x){return x.primary}),
|
|
381
|
+
a.m.ta(d,"loadedmetadata",function(){a.u.l=Date.now()/1E3-c.Sd}),z(w)}})}
|
|
382
|
+
function Nk(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=rc,e=Date.now()/1E3,f=!0,a.o=nl(a,{lb:a.G,onError:function(n){bl(a,n)},Mc:function(n){ol(a,n)},onExpirationUpdated:function(n,p){pl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==ql&&f&&(f=!1,a.u.j=Date.now()/1E3-e)}}),a.o.configure(a.h.drm),g=c.uri||"",h=dg(g),k=$k[h],"application/x-mpegurl"==k&&ud()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
|
|
383
|
+
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Rc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Oa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.o.W=!0,u(m,wf(a.o,[l],[]),2)):u(m,a.o.Wb(b.F),
|
|
386
384
|
0)})}
|
|
387
|
-
function
|
|
388
|
-
function(){a.
|
|
389
|
-
function(){return
|
|
390
|
-
|
|
391
|
-
function
|
|
392
|
-
function
|
|
393
|
-
function
|
|
394
|
-
function
|
|
395
|
-
function
|
|
396
|
-
|
|
397
|
-
function
|
|
398
|
-
function
|
|
399
|
-
function
|
|
400
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
401
|
-
0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=
|
|
402
|
-
function
|
|
403
|
-
|
|
404
|
-
q.
|
|
405
|
-
q.
|
|
406
|
-
q.
|
|
407
|
-
q.
|
|
408
|
-
q.
|
|
409
|
-
q.
|
|
410
|
-
q.
|
|
411
|
-
v=m*n;w=f.l-f.startTime;
|
|
412
|
-
q.
|
|
413
|
-
q.
|
|
414
|
-
|
|
415
|
-
q.
|
|
416
|
-
|
|
417
|
-
q.
|
|
418
|
-
q.
|
|
419
|
-
q.
|
|
420
|
-
function
|
|
421
|
-
q.
|
|
422
|
-
q.
|
|
423
|
-
q.
|
|
424
|
-
q.getStats=function(){if(this.l!=
|
|
425
|
-
b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.
|
|
426
|
-
(this.
|
|
427
|
-
estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:
|
|
428
|
-
q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;
|
|
429
|
-
b&&k.label==(f||"")&&k.kind==c}))return
|
|
430
|
-
closedCaptions:null};if(
|
|
431
|
-
q.
|
|
432
|
-
|
|
433
|
-
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};
|
|
434
|
-
q.
|
|
435
|
-
function
|
|
436
|
-
function
|
|
437
|
-
function
|
|
438
|
-
q.
|
|
439
|
-
q.
|
|
440
|
-
function
|
|
441
|
-
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:
|
|
442
|
-
function
|
|
443
|
-
function
|
|
444
|
-
f.next())g=g.value,
|
|
445
|
-
function
|
|
446
|
-
function
|
|
447
|
-
function
|
|
448
|
-
function
|
|
449
|
-
function
|
|
450
|
-
function
|
|
451
|
-
function
|
|
452
|
-
function
|
|
453
|
-
(e=!0)}}}e&&
|
|
454
|
-
function
|
|
455
|
-
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function
|
|
456
|
-
function
|
|
457
|
-
h.push({language:l,role:n,label:p})}});return h}function
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=
|
|
466
|
-
|
|
467
|
-
!1:
|
|
468
|
-
var
|
|
469
|
-
|
|
470
|
-
var
|
|
471
|
-
ssa:"text/x-ssa",ass:"text/x-ssa"};function
|
|
472
|
-
q.isSkippable=function(){return 0<=this.
|
|
473
|
-
q.isLinear=function(){return this.
|
|
474
|
-
M("shaka.ads.ClientSideAd",
|
|
475
|
-
|
|
476
|
-
function(f){
|
|
477
|
-
function
|
|
478
|
-
a.h.
|
|
479
|
-
function
|
|
480
|
-
function(c){b(c,"ad-third-quartile")});a.h.
|
|
481
|
-
a.h.
|
|
482
|
-
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.
|
|
483
|
-
function(c){b(c,"ad-metadata")});a.h.
|
|
484
|
-
function
|
|
385
|
+
function Ok(a,b,c){function d(){return rl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Tb=b.uri;a.D=new yi(b.F);var e=!1;a.Ub.push(function(){e=!0});null!=b.startTime&&a.D.o(b.startTime);a.H=new Ii({Ic:function(){return b.F.playbackRate},Ec:function(){return b.F.defaultPlaybackRate},Qd:function(h){b.F.playbackRate=h},ne:function(h){b.F.currentTime+=h}});xl(a,a.h.streaming.rebufferingGoal);a.m.A(b.F,"playing",d);a.m.A(b.F,"pause",d);a.m.A(b.F,"ended",d);a.m.A(b.F,"ratechange",function(){return sl(a)});"none"!=
|
|
386
|
+
a.g.preload&&a.m.ta(a.g,"loadedmetadata",function(){a.u.l=Date.now()/1E3-c.Sd});a.g.audioTracks&&(a.m.A(a.g.audioTracks,"addtrack",function(){return Il(a)}),a.m.A(a.g.audioTracks,"removetrack",function(){return Il(a)}),a.m.A(a.g.audioTracks,"change",function(){return Il(a)}));a.g.textTracks&&(a.m.A(a.g.textTracks,"addtrack",function(h){if(!e&&h.track)switch(h=h.track,h.kind){case "metadata":Jl(a,h);break;case "chapters":Kl(a,h);break;default:Il(a)}}),a.m.A(a.g.textTracks,"removetrack",function(){return Il(a)}),
|
|
387
|
+
a.m.A(a.g.textTracks,"change",function(){return Il(a)}));var f=dg(b.uri);b.F.src=fk(a.W,b.uri,$k[f]);(rd()||sd("Web0S"))&&b.F.load();a.l=Ll;a.dispatchEvent(Qk(Al));var g=new sc;pi(a.g,HTMLMediaElement.HAVE_METADATA,a.m,function(){g.resolve()});pi(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var h;return L(function(k){if(1==k.g){if(e)return k["return"]();Ml(a);h=Nl(a);return h.find(function(l){return"disabled"!=l.mode})?k.B(2):u(k,new Promise(function(l){a.m.ta(a.g.textTracks,"change",l);
|
|
388
|
+
(new O(l)).S(1)}),2)}if(e)return k["return"]();Ol(a);z(k)})});a.g.error?g.reject(al(a)):"none"==a.g.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),g.resolve());a.m.ta(a.g,"error",function(){g.reject(al(a))});return new De(g,function(){g.reject(new N(2,7,7001));return Promise.resolve()})}
|
|
389
|
+
function Ml(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Ld(b);var c=a.h.preferredVariantRole;""!=c&&a.Ld(b,c)}}function Ol(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Md(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Md(b,d,c)}}
|
|
390
|
+
function Jl(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.A(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,fl(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Pl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Mb().S(.5);a.Ub.push(function(){c.stop()})}}
|
|
391
|
+
function fl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Qk(Ql,b))}function Kl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){var d=Rl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Mb().S(.5);a.Ub.push(function(){c.stop()})}}function ml(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}
|
|
392
|
+
function nl(a,b){return new pf(b,a.h.drm.updateExpirationTime)}function Ek(a){return new Pe(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Qk(Sl,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Qk(Tl,b))})}
|
|
393
|
+
function vl(a,b){return new zi(a.g,a.i,a.h.streaming,b,function(){a.wb&&Li(a.wb,!0);if(a.j)for(var c=a.j,d=c.g.Hc(),e=c.h.smallGapLimit,f=t(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.ca=null;var k=c.g.P;g==qc?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=Sh(k,g),k=Gh(k,d,e));if(!k&&((null!=Th(c.g.P,g)||h.Ia)&&lj(c,h),h.ua&&(h.ua.abort(),h.ua=null),g===qc))for(g=c.g.P.u.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,th(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())oh(h.value)}a.L&&
|
|
394
|
+
Ul(a)},function(c){return a.dispatchEvent(c)})}function wl(a){var b=new Ri(a.Dc);b.addEventListener("enter",function(d){gl(a,Vl,d.region)});b.addEventListener("exit",function(d){gl(a,Wl,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(gl(a,Vl,e),gl(a,Wl,e))});var c=new Ki(a.g);c.g.add(b);a.wa&&c.g.add(a.wa);return c}function xl(a,b){a.L=new we;a.L.g=ye;ze(a.L,b,Math.min(.5,b/2));dl(a);a.Ac=(new O(function(){Ul(a)})).Ba(.25)}
|
|
395
|
+
function Ul(a){switch(a.l){case Ll:if(a.g.ended)var b=!0;else{var c=Fh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case zl:a:if(a.g.ended||Qh(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.fb();var d=Fh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Hh(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?xe:ye;c.g=d;b!=d&&dl(a)}function el(a,b,c,d){return new Kh(a,b,c,d)}
|
|
396
|
+
function Yk(a){return new Tj({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Za:function(){return a.Za()},getCurrentTime:function(){return a.g?a.g.currentTime:0},hb:function(){return a.hb()},Gc:function(){return a.Gc()},T:function(){return a.T()}},a.h.cmcd)}
|
|
397
|
+
function yl(a){return new Xi(a.i,{Hc:function(){return a.D.m()},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Uj(a.W,b,c)},P:a.N,lb:a.G,onError:function(b){return bl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Df:function(){a.J&&a.J.update&&a.J.update()},Gd:function(){a.D&&a.D.D();Ul(a)},Cf:function(b,c){var d=c.xd;d&&a.wa&&Oi(a.wa,d,b)}})}
|
|
398
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=qk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Lb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
|
|
399
|
+
0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=uk(this.h,a,Dk(this));Xl(this);return c};
|
|
400
|
+
function Xl(a){if(a.J){var b=Le(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.o&&a.o.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Yl(a,a.i)}catch(f){bl(a,f)}a.s&&Bl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Zl(a)}a.G&&a.G.Od(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.qd!=b)){var c=Tb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.qd=b;a.j&&(b=a.j,(c=b.i.get(qc))&&
|
|
401
|
+
gj(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),Gl(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),ze(a.L,b,Math.min(.5,b/2)));a.i&&tl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Dk(this);uk(a,this.h,Dk(this));return a};
|
|
402
|
+
q.Ve=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.kc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Nf=function(){for(var a in this.h)delete this.h[a];uk(this.h,Dk(this),Dk(this));Xl(this)};q.af=function(){return this.l};q.ef=function(){return this.g};q.bc=function(){return this.G};q.ld=function(){return this.Tb};
|
|
403
|
+
q.fe=function(){return this.C?this.C:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.kb=function(){return this.i?this.i.presentationTimeline.kb():!1};q.vf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
404
|
+
q.kc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Cb(),end:a.Qa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.tf=function(){this.T()&&(this.g.currentTime=this.kc().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.o?this.o.g:null};q.ac=function(){return this.o?this.o.ac():Infinity};q.Fc=function(){return this.o?this.o.Fc():{}};
|
|
405
|
+
q.od=function(){return this.L?this.L.g==ye:!1};q.Gc=function(){return this.g?this.H?this.H.i:1:0};q.Wf=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==zl&&(this.s.playbackRateChanged(a),fj(this.j,1<Math.abs(a))))};q.Le=function(){var a=this.H.Ec();this.l==Ll&&this.H.set(a);this.l==zl&&(this.H.set(a),this.s.playbackRateChanged(a),fj(this.j,!1))};
|
|
406
|
+
q.hb=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ee(e)){var f=Xd(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return de(g)}):[]};
|
|
407
|
+
q.gb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Yd(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Nl(this).map(function(f){return be(f)}):[]};q.Ze=function(){return this.i?this.i.imageStreams.map(function(a){return Zd(a)}):[]};
|
|
408
|
+
q.nf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,v,w,x,y,D,B,A;return L(function(E){if(1==E.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?E.B(3):u(E,d.createSegmentIndex(),3):E["return"](null):E.B(2);if(2!=E.g){e=d.segmentIndex.find(b);if(null==e)return E["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return E["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;r=l/n;
|
|
409
|
+
v=m*n;w=f.l-f.startTime;x=f.i||w/v;y=f.startTime;B=D=0;1<v&&(A=Math.floor((b-f.startTime)/x),y=f.startTime+A*x,D=A%m*p,B=Math.floor(A/m)*r);return E["return"]({imageHeight:l,imageWidth:k,height:r,positionX:D,positionY:B,startTime:y,duration:x,uris:f.qa(),width:p})}return E["return"](null)})};
|
|
410
|
+
q.ue=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Ak(this.u.h,b,!1),ij(this.j,b),$l(this),this.Na=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Nl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,$d(c)==a.id?c.mode=this.ka?"showing":"hidden":c.mode="disabled";$l(this)}};
|
|
411
|
+
q.ve=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&ee(d)&&(ul(this,d,!1,b,c),this.Ma=new re(d),Bl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
412
|
+
$d(c)==a.id){am(this,c);break}};q.Ue=function(){return bm(this.hb())};q.mf=function(){return bm(this.gb())};q.Te=function(){return Array.from(cm(this.hb()))};q.lf=function(){return Array.from(cm(this.gb()))};
|
|
413
|
+
q.Ld=function(a,b){if(this.i&&this.D){this.Ma=new se(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Ma.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=Xd(f),this.ve(c,!0)):Zl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=cd(a);f=d=null;e=
|
|
414
|
+
t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=de(g);cd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?am(this,f):d&&am(this,d)}};
|
|
415
|
+
q.Md=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.Na=a,this.Vb=b||"",this.Nb=c,(a=ge(this.i.textStreams,this.Na,this.Vb,this.Nb)[0]||null)&&a!=this.j.o&&(Ak(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.pd()))ij(this.j,a),$l(this)}else{var d=cd(a);(a=this.gb().find(function(e){return cd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.ue(a)}};
|
|
416
|
+
q.Of=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ma=new se(b.language,"",0,a),Zl(this))}};q.pd=function(){var a=this.ka;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Nl(this).some(function(b){return"showing"==b.mode}):a};q.ge=function(){return this.g&&this.g.src&&this.g.textTracks?Rl(this).map(function(a){return be(a)}):[]};
|
|
417
|
+
q.We=function(a){var b=cd(a),c=Rl(this).filter(function(f){return cd(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Nl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
|
|
418
|
+
function Pl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Rl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
419
|
+
q.Uf=function(a){a=!!a;if(this.ka!=a){this.ka=a;if(this.l==zl)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ge(this.i.textStreams,this.Na,this.Vb,this.Nb),0<a.length&&(ij(this.j,a[0]),$l(this))):ej(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Nl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Fl(this)}};
|
|
420
|
+
q.hf=function(){if(!this.T())return null;var a=this.Fa.l,b=0;if(this.D)b=this.D.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
421
|
+
q.he=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.Za=function(){if(this.l==zl)return this.N.Za();var a={total:[],audio:[],video:[],text:[]};this.l==Ll&&(a.total=Ih(this.g.buffered));return a};
|
|
422
|
+
q.getStats=function(){if(this.l!=zl&&this.l!=Ll)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames: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:[]};rl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.u;b=Math.round(100*b);c.i=isNaN(c.i)?
|
|
423
|
+
b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.u,b=Number(a.totalVideoFrames),c.L=Number(a.droppedVideoFrames),c.J=b,this.u.H=Number(a.corruptedVideoFrames));this.o?(a=this.o,a=a.H?a.H:NaN):a=NaN;this.u.m=a;if(this.l==zl){if(a=this.j.l)this.u.s=(this.H?this.H.i:1)*a.bandwidth;a&&a.video&&(c=this.u,b=a.video.height||NaN,c.N=a.video.width||NaN,c.u=b);this.T()&&(a=this.he().valueOf()+1E3*this.kc().end,this.u.C=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
|
|
424
|
+
(this.u.G=this.i.presentationTimeline.g);a=this.s.getBandwidthEstimate();this.u.o=a}var d=this.u;a=d.N;c=d.u;b=d.s;var e=d.J,f=d.L,g=d.H,h=d.o,k=d.i,l=d.l,m=d.D,n=d.j,p=xk(d.g,"playing"),r=xk(d.g,"paused"),v=xk(d.g,"buffering"),w=d.m,x=d.C,y=d.G,D=yk(d.g),B=[];d=t(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,B.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
|
|
425
|
+
estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:r,bufferingTime:v,licenseTime:w,liveLatency:x,maxSegmentDuration:y,stateHistory:D,switchHistory:B}};
|
|
426
|
+
q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Lb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=zl&&this.l!=Ll)throw new N(1,7,7004);if(!d){var h=dg(a);d=dm[h];if(!d)throw new N(1,2,2011,h);}if(this.l==Ll){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=kk(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.gb().find(function(k){return k.language==
|
|
427
|
+
b&&k.label==(f||"")&&k.kind==c}))return Il(this),a;throw new N(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.wd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Gi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:qc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
|
|
428
|
+
closedCaptions:null};if(!Tc(Oc(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.i.textStreams.push(a);Il(this);return Yd(a)};
|
|
429
|
+
q.He=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,v,w,x,y,D;return L(function(B){switch(B.g){case 1:if(h.l!=zl&&h.l!=Ll)throw new N(1,7,7004);if(d){B.B(2);break}return u(B,em(h,a),3);case 3:d=B.h;case 2:k=[];if(h.C)try{k=h.C.getServerSideCuePoints()}catch(A){}if(h.l!=Ll){B.B(4);break}g&&(c="forced");return u(B,fm(h,a,b,c,d,f||"",k),5);case 5:l=h.gb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Il(h),B["return"](m);throw new N(1,2,2012);case 4:n=
|
|
430
|
+
rc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){B.B(6);break}return u(B,gm(h,a,h.G,h.h.streaming.retryParameters),7);case 7:r=B.h,v=hm(h,r,d,k),w=new Blob([v],{type:"text/vtt"}),a=Nh(w),d="text/vtt";case 6:x={id:h.wd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Gi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.$,primary:!1,trickModeVideo:null,
|
|
431
|
+
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};y=Oc(x.mimeType,x.codecs);D=Tc(y);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(x);Il(h);return B["return"](Yd(x))}})};
|
|
432
|
+
q.Ge=function(a,b,c){var d=this,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:if(d.l!=zl&&d.l!=Ll)throw new N(1,7,7004);if(c){n.B(2);break}return u(n,em(d,a),3);case 3:c=n.h;case 2:e=[];if(d.C)try{e=d.C.getServerSideCuePoints()}catch(p){}return u(n,fm(d,a,b,"chapters",c,"",e),4);case 4:f=d.ge();if(g=f.find(function(p){return p.language==b})){h=Rl(d);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,Kl(d,m);return n["return"](g)}throw new N(1,2,2012);}})};
|
|
433
|
+
function em(a,b){var c,d;return L(function(e){switch(e.g){case 1:c=dg(b);if(d=dm[c])return e["return"](d);C(e,2);return u(e,fg(b,a.G,a.h.streaming.retryParameters),4);case 4:d=e.h;wa(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
|
|
434
|
+
function fm(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,gm(a,b,a.G,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=hm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Nh(l),e="text/vtt");m=document.createElement("track");m.src=kk(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);z(n)})}
|
|
435
|
+
function gm(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=Ze;f=Te([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&ek(k,f,{ot:lk,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function hm(a,b,c,d){var e=Uc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Gb(b),b=c.parseMedia(b,a),Sj(b,d);throw new N(2,2,2014,c);}
|
|
436
|
+
q.Pd=function(a,b){this.sd.width=a;this.sd.height=b};q.Jd=function(){if(this.l==zl){var a=this.j;if(a.j.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,c.ec&&(c.ec=!1,dj(a,c,.1));a=!0}}else a=!1;return a};q.bf=function(){Va("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.");return this.i};
|
|
437
|
+
q.cf=function(){return this.Cc};function Dk(a){var b=sk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.Jd())};b.textDisplayFactory=function(){return a.wc?new Lj(a.g,a.wc):new Gj(a.g)};return b}q.ze=function(a){this.wc=a};
|
|
438
|
+
function kl(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Hi;h={id:a.wd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
439
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:qc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function jl(a,b){return L(function(c){if(1==c.g)return u(c,im(a,b),2);Yl(a,b);z(c)})}
|
|
440
|
+
function im(a,b){var c;return L(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Md(c,b),2);Hl(b);z(d)})}
|
|
441
|
+
function Yl(a,b){if(a.l!=Tk){for(var c=a.h.restrictions,d=a.sd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Ld(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Il(a);if((c=a.o?a.o.g:null)&&a.o.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
|
|
442
|
+
f.next())g=g.value,Gf(a.o,g.initDataType,g.initData);jm(a,b)}}
|
|
443
|
+
function Cl(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n;return L(function(p){if(1==p.g)return k?u(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
|
|
444
|
+
function dl(a){var b=a.od();if(a.u&&a.L&&a.D){var c=a.H;c.j=b;Ji(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);rl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Qk(km,b))}function sl(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Qk(lm),a.dispatchEvent(b))}function rl(a){if(a.u&&a.L){var b=a.u.g;a.L.g==ye?wk(b,"buffering"):a.g.paused?wk(b,"paused"):a.g.ended?wk(b,"ended"):wk(b,"playing")}}
|
|
445
|
+
function Bl(a){try{jm(a,a.i)}catch(c){return bl(a,c),!1}var b=a.i.variants.filter(function(c){return ee(c)});b=a.Ma.create(b);a.s.setVariants(Array.from(b.values()));return!0}function Zl(a){var b;(b=Bl(a)?a.s.chooseVariant():null)&&ul(a,b,!0,!0,0)}
|
|
446
|
+
function ul(a,b,c,d,e){var f=a.j.l;if(b==f)d&&hj(a.j,b,d,e,!0);else{var g=a.u.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));hj(a.j,b,d,e);d=null;f&&(d=Xd(f));b=Xd(b);c?Dl(a,d,b):mm(a,d,b)}}function am(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=de(c);var d=de(b);mm(a,c,d)}
|
|
447
|
+
function El(a,b,c){a=cd(a.h.preferredTextLanguage);b=cd(b.language);c=cd(c.language);return bd(c,a)&&!bd(b,c)}function Dl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Qk(nm,b);om(a,b)}function Il(a){var b=Qk(pm);om(a,b)}function mm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Qk(qm,b);om(a,b)}function $l(a){var b=Qk(rm);om(a,b)}function Fl(a){var b=Qk(sm);om(a,b)}function Gl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);om(a,Qk(tm,b))}
|
|
448
|
+
function bl(a,b){if(a.l!=Tk){var c=Qk(um,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function gl(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Qk(b,c))}
|
|
449
|
+
function al(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
|
|
450
|
+
function ol(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!vm.includes(l)}h!=f.allowedByKeySystem&&
|
|
451
|
+
(e=!0)}}}e&&Bl(a);(d=a.j.l)&&!d.allowedByKeySystem&&Zl(a);e&&Il(a)}}function pl(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Qk(wm);a.dispatchEvent(b)}function tl(a,b,c){0<b&&(a.T()||a.ye(b));b=a.getDuration();c<b&&(a.T()||a.Ja(c))}
|
|
452
|
+
function jm(a,b){var c=a.o?a.o.Fc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var r=c[d?"00":p];r?vm.includes(r)&&h.add(r):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
|
|
453
|
+
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Hl(a){if(!a.variants.some(ee))throw new N(2,4,4032);}function om(a,b){L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Tk&&a.dispatchEvent(b);z(c)})}function cm(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(cd(c.language)):b.add("und");return b}
|
|
454
|
+
function bm(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=cd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
|
|
455
|
+
h.push({language:l,role:n,label:p})}});return h}function Uk(){return new N(2,7,7E3)}function Pk(a,b,c,d,e,f){return d==a&&e.F==f.F&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Aj(){return{F:null,mimeType:null,startTime:null,Sd:NaN,uri:null}}function Vk(a){return new Promise(function(b,c){a.mb=function(){return c(Uk())};a.Lc=function(){return b()};a.onError=function(d){return c(d)};a.Nc=function(){return c(Uk())}})}M("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.ze;
|
|
456
|
+
V.prototype.getManifestParserFactory=V.prototype.cf;V.prototype.getManifest=V.prototype.bf;V.prototype.retryStreaming=V.prototype.Jd;V.prototype.setMaxHardwareResolution=V.prototype.Pd;V.prototype.addChaptersTrack=V.prototype.Ge;V.prototype.addTextTrackAsync=V.prototype.He;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.Za;V.prototype.getPresentationStartTimeAsDate=V.prototype.he;
|
|
457
|
+
V.prototype.getPlayheadTimeAsDate=V.prototype.hf;V.prototype.setTextTrackVisibility=V.prototype.Uf;V.prototype.getChapters=V.prototype.We;V.prototype.getChaptersTracks=V.prototype.ge;V.prototype.isTextTrackVisible=V.prototype.pd;V.prototype.selectVariantsByLabel=V.prototype.Of;V.prototype.selectTextLanguage=V.prototype.Md;V.prototype.selectAudioLanguage=V.prototype.Ld;V.prototype.getTextLanguages=V.prototype.lf;V.prototype.getAudioLanguages=V.prototype.Te;V.prototype.getTextLanguagesAndRoles=V.prototype.mf;
|
|
458
|
+
V.prototype.getAudioLanguagesAndRoles=V.prototype.Ue;V.prototype.selectVariantTrack=V.prototype.ve;V.prototype.selectTextTrack=V.prototype.ue;V.prototype.getThumbnails=V.prototype.nf;V.prototype.getImageTracks=V.prototype.Ze;V.prototype.getTextTracks=V.prototype.gb;V.prototype.getVariantTracks=V.prototype.hb;V.prototype.cancelTrickPlay=V.prototype.Le;V.prototype.trickPlay=V.prototype.Wf;V.prototype.getPlaybackRate=V.prototype.Gc;V.prototype.isBuffering=V.prototype.od;V.prototype.getKeyStatuses=V.prototype.Fc;
|
|
459
|
+
V.prototype.getExpiration=V.prototype.ac;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.tf;V.prototype.seekRange=V.prototype.kc;V.prototype.isAudioOnly=V.prototype.vf;V.prototype.isInProgress=V.prototype.kb;V.prototype.isLive=V.prototype.T;V.prototype.getAdManager=V.prototype.fe;V.prototype.getAssetUri=V.prototype.ld;V.prototype.getNetworkingEngine=V.prototype.bc;V.prototype.getMediaElement=V.prototype.ef;
|
|
460
|
+
V.prototype.getLoadMode=V.prototype.af;V.prototype.resetConfiguration=V.prototype.Nf;V.prototype.getBufferFullness=V.prototype.Ve;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.ag;V.prototype.unload=V.prototype.Vd;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.Wb;
|
|
461
|
+
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?u(h,Wf(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(od()){for(var l in cg)k[l]=!0;for(var m in eg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=od()?!!cg[n]:pd(n);for(var p in l)k[p]=
|
|
462
|
+
od()?!!eg[p]:pd(l[p]);c=k;k={};p=t('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(","));
|
|
463
|
+
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=od()?Tc(l)?!0:MediaSource.isTypeSupported(l)||Kc(l):pd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=xm;for(g in f)e[g]=f[g]();return h["return"](e)})};
|
|
464
|
+
V.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Va("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||sd("Trident/"))return!1;var a=vd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
|
|
465
|
+
!1:od()?!0:pd("application/x-mpegurl")};V.setAdManagerFactory=function(a){Fk=a};V.registerSupportPlugin=function(a,b){xm[a]=b};V.prototype.destroy=V.prototype.destroy;
|
|
466
|
+
var tm="abrstatuschanged",nm="adaptation",km="buffering",Tl="downloadfailed",Sl="downloadheadersreceived",ql="drmsessionupdate",xj="emsg",um="error",wm="expirationupdated",Zk="loaded",Wk="loading",ll="manifestparsed",il="mediaqualitychanged",Ql="metadata",Rk="onstatechange",Sk="onstateidle",lm="ratechange",Al="streaming",rm="textchanged",sm="texttrackvisibility",hl="timelineregionadded",Vl="timelineregionenter",Wl="timelineregionexit",pm="trackschanged",cl="unloading",qm="variantchanged",ym={cg:tm,
|
|
467
|
+
dg:nm,eg:km,gg:Tl,hg:Sl,ig:ql,kg:xj,Error:um,lg:wm,ng:"largegap",og:Zk,pg:Wk,qg:ll,rg:il,Metadata:Ql,tg:Rk,ug:Sk,vg:lm,xg:"sessiondata",yg:Al,zg:rm,Ag:sm,Bg:hl,Cg:Vl,Dg:Wl,Eg:pm,Fg:cl,Gg:qm},Tk=0,Ck=1,zl=2,Ll=3;V.LoadMode={DESTROYED:Tk,NOT_LOADED:Ck,MEDIA_SOURCE:zl,SRC_EQUALS:Ll};V.version="v3.3.4";var zm=["3","3"];Mb=new function(a){this.g=a;this.i=Nb;this.h=Ob}(new Kb(Number(zm[0]),Number(zm[1])));
|
|
468
|
+
var vm=["output-restricted","internal-error"],xm={},Fk=null,$k={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"},dm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
469
|
+
ssa:"text/x-ssa",ass:"text/x-ssa"};function Am(){this.h=[];this.j=this.i=this.g=0};function W(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new bf;this.j.A(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.A(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=W.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
470
|
+
q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
|
|
471
|
+
q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};
|
|
472
|
+
M("shaka.ads.ClientSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;
|
|
473
|
+
W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Bm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.m=null;this.h=new bf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.3.4");this.g=null;this.h.ta(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Cm(e,f)});this.h.A(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
474
|
+
function(f){Dm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Bm.prototype.stop=function(){this.g&&this.g.stop();this.o&&Kj(this.o)};Bm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Dm(a,b){b.getError();Em(a,null);a.j(new P("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
475
|
+
function Cm(a,b){a.j(new P("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.j(new P("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new P("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Fm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
476
|
+
a.h.A(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){Em(a,null)}}
|
|
477
|
+
function Fm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new P(d,e))}a.h.A(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Dm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Gm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.STARTED,function(c){Gm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.A(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.A(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
478
|
+
function(c){b(c,"ad-third-quartile")});a.h.A(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.A(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Em(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Em(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.A(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.A(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
479
|
+
a.h.A(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.m.i=!0;b(c,"ad-paused")});a.h.A(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.m.i=!1;b(c,"ad-resumed")});a.h.A(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.A(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.A(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.A(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.A(a.g,
|
|
480
|
+
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.A(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.A(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.A(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.A(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.A(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.A(a.g,google.ima.AdEvent.Type.AD_METADATA,
|
|
481
|
+
function(c){b(c,"ad-metadata")});a.h.A(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.A(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.A(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Gm(a,b){var c=b.getAd();a.m=new W(c,a.g);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new P("ad-started",c));a.m.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
|
|
482
|
+
function Em(a,b){a.j(new P("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function X(a,b){this.i=a;this.h=null;this.g=b}q=X.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
485
483
|
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
486
|
-
q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
e.
|
|
490
|
-
var f=e.
|
|
491
|
-
this.h.
|
|
492
|
-
f;e.
|
|
493
|
-
function
|
|
494
|
-
q.release=function(){this.
|
|
495
|
-
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new
|
|
496
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&
|
|
497
|
-
(c.
|
|
498
|
-
q.getStats=function(){var a=this.
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=
|
|
504
|
-
function
|
|
505
|
-
function
|
|
506
|
-
var
|
|
507
|
-
getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
q.init=function(){if(this.
|
|
511
|
-
a)
|
|
512
|
-
q.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!
|
|
513
|
-
q.get=function(a,b){var c=this;if("video"==a){if(
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
function
|
|
517
|
-
function
|
|
518
|
-
q.destroy=function(a){a&&this.g.
|
|
519
|
-
q.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=
|
|
520
|
-
q.
|
|
521
|
-
function
|
|
522
|
-
function(f){Object.defineProperty(a.
|
|
523
|
-
function
|
|
524
|
-
function
|
|
525
|
-
function
|
|
526
|
-
function
|
|
527
|
-
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.
|
|
528
|
-
function
|
|
529
|
-
function
|
|
530
|
-
if("setVideoContainer"==b)return function(c){return a.
|
|
531
|
-
M("shaka.cast.CastProxy",
|
|
532
|
-
q.
|
|
533
|
-
q.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.
|
|
534
|
-
function
|
|
535
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
536
|
-
!1;
|
|
537
|
-
function
|
|
538
|
-
function
|
|
539
|
-
a.
|
|
540
|
-
function
|
|
541
|
-
function
|
|
542
|
-
function
|
|
543
|
-
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.
|
|
544
|
-
function
|
|
545
|
-
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||
|
|
546
|
-
function
|
|
547
|
-
M("shaka.cast.CastReceiver",
|
|
548
|
-
function
|
|
549
|
-
function
|
|
550
|
-
function
|
|
551
|
-
function
|
|
552
|
-
function
|
|
553
|
-
|
|
554
|
-
function
|
|
555
|
-
function
|
|
556
|
-
function
|
|
557
|
-
function
|
|
558
|
-
function
|
|
559
|
-
var
|
|
484
|
+
q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;X.prototype.getPositionInSequence=X.prototype.getPositionInSequence;X.prototype.getSequenceLength=X.prototype.getSequenceLength;X.prototype.setMuted=X.prototype.setMuted;X.prototype.resize=X.prototype.resize;
|
|
485
|
+
X.prototype.isLinear=X.prototype.isLinear;X.prototype.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;X.prototype.getVolume=X.prototype.getVolume;X.prototype.play=X.prototype.play;X.prototype.pause=X.prototype.pause;X.prototype.skip=X.prototype.skip;X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;
|
|
486
|
+
X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;X.prototype.getDuration=X.prototype.getDuration;function Hm(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.G=!1;this.u=this.m=this.o=null;this.C="";this.D=[];this.h=new bf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new P("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Im(e,f)});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
|
|
487
|
+
e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.l);e.u&&(e.m.h=e.u);e.i(new P("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
488
|
+
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.h=e.u)});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new P("ad-first-quartile"))});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new P("ad-midpoint"))});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new P("ad-third-quartile"))});
|
|
489
|
+
this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new P("ad-complete"));e.i(new P("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new P("ad-skipped"));e.i(new P("ad-stopped"))});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
|
|
490
|
+
f;e.i(new P("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Hm.prototype.stop=function(){this.C="";this.o=null;this.D=[]};Hm.prototype.release=function(){this.stop();this.h&&this.h.release()};Hm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
491
|
+
function Im(a,b){a.i(new P("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.G||a.h.A(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function Y(){R.call(this);this.g=this.i=null;this.h=new Am;this.j=navigator.language}ra(Y,R);q=Y.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new Bm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
492
|
+
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);R.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new P("ad-stopped"));this.h=new Am};q.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
|
|
493
|
+
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Hm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
494
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.4";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
495
|
+
(c.G=!0),c.j=new sc,c.g.requestStream(a),c.C=d||"",c.H=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('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.');a.mpt="Shaka Player";a.mpv="v3.3.4";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
|
|
496
|
+
q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",Y);
|
|
497
|
+
Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;
|
|
498
|
+
Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
|
|
499
|
+
Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";
|
|
500
|
+
Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Fk=function(){return new Y};function Jm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof P){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
|
|
501
|
+
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Ih(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
|
|
502
|
+
function Km(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Lm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
|
|
503
|
+
function Lm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
504
|
+
var Mm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Nm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Om=["loop","playbackRate"],Pm=["pause","play"],Qm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
|
|
505
|
+
getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Rm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Sm=[["getConfiguration","configure"]],Tm=[["isTextTrackVisible","setTextTrackVisibility"]],Um="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
506
|
+
Vm=["attach","detach","load","unload"];function Wm(a,b,c,d,e,f){var g=this;this.H=a;this.j=new O(b);this.V=c;this.u=!1;this.s=d;this.G=e;this.L=f;this.h=this.m=!1;this.N="";this.o=null;this.C=function(){return Xm(g)};this.D=function(h,k){var l=Km(k);switch(l.type){case "event":var m=l.targetName;l=Ke(l.event);g.s(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.u&&(g.V(),g.u=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new N(l.severity,l.category,l.code);
|
|
507
|
+
for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;Ym.add(this)}q=Wm.prototype;q.destroy=function(){Ym["delete"](this);Zm(this);$m&&an(this);this.j&&(this.j.stop(),this.j=null);this.G=this.s=null;this.h=this.m=!1;this.D=this.C=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.sa=function(){return this.h};q.Hd=function(){return this.N};
|
|
508
|
+
q.init=function(){if(this.H.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Mb();var a=new chrome.cast.SessionRequest(this.H);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Ym),d=c.next();!d.done;d=c.next())bn(d.value,b)},function(b){for(var c=t(Ym),d=c.next();!d.done;d=c.next())d=d.value,cn="available"==b,d.j.Mb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});cn&&this.j.S(dn);(a=$m)&&a.status!=chrome.cast.SessionStatus.STOPPED?bn(this,
|
|
509
|
+
a):$m=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=en),window.__onGCastApiAvailable!=en&&Va("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.Nd=function(a){this.o=a;this.h&&fn(this,{type:"appData",appData:this.o})};
|
|
510
|
+
q.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!cn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new sc;chrome.cast.requestSession(function(d){return gn(b,a,d)},function(d){return hn(b,d)});return u(c,b.l,0)})};function jn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return gn(a,b,c)},function(c){return hn(a,c)})}}q.zb=function(){if(this.h){Zm(this);if($m){an(this);try{$m.stop(function(){},function(){})}catch(a){}$m=null}Xm(this)}};
|
|
511
|
+
q.get=function(a,b){var c=this;if("video"==a){if(Pm.includes(b))return function(){return c.qe.apply(c,[a,b].concat(ka(Ga.apply(0,arguments))))}}else if("player"==a){if(Rm[b]&&!this.get("player","isLive")())return function(){};if(Um.includes(b))return function(){return c.qe.apply(c,[a,b].concat(ka(Ga.apply(0,arguments))))};if(Vm.includes(b))return function(){return c.Kf.apply(c,[a,b].concat(ka(Ga.apply(0,arguments))))};if(Qm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
512
|
+
q.set=function(a,b,c){this.g[a][b]=c;fn(this,{type:"set",targetName:a,property:b,value:c})};function gn(a,b,c){$m=c;c.addUpdateListener(a.C);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Xm(a);fn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function hn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
|
|
513
|
+
q.qe=function(a,b){fn(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};q.Kf=function(a,b){var c=Ga.apply(2,arguments),d=new sc,e=this.J.toString();this.J++;this.i[e]=d;try{fn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function bn(a,b){var c=a.L();a.l=new sc;a.u=!0;gn(a,c,b)}function an(a){var b=$m;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
|
|
514
|
+
function Xm(a){var b=$m?"connected"==$m.status:!1;if(a.h&&!b){a.G();for(var c in a.g)a.g[c]={};Zm(a)}a.h=b;a.N=b?$m.receiver.friendlyName:"";a.j.Mb()}function Zm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function fn(a,b){var c=Jm(b),d=$m;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Za)}catch(e){throw c=new N(2,8,8005,e),d=new P("error",(new Map).set("detail",c)),a.s("player",d),a.zb(),c;}}var dn=.02,cn=!1,$m=null,Ym=new Set;
|
|
515
|
+
function en(a){if(a){a=t(Ym);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function kn(a,b,c){R.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.u=new Map;this.g=new Wm(c,function(){return ln(d)},function(){return mn(d)},function(e,f){return nn(d,e,f)},function(){return on(d)},function(){return pn(d)});qn(this)}ra(kn,R);q=kn.prototype;
|
|
516
|
+
q.destroy=function(a){a&&this.g.zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;R.prototype.release.call(this);return Promise.all(a)};q.rf=function(){return this.l};q.gf=function(){return this.s};q.Je=function(){return this.g.m&&cn};q.sa=function(){return this.g.sa()};q.Hd=function(){return this.g.Hd()};
|
|
517
|
+
q.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=pn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Vd(),0):c["return"]()})};q.Nd=function(a){this.g.Nd(a)};q.Vf=function(){jn(this.g)};q.zb=function(){this.g.zb()};
|
|
518
|
+
q.Me=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.zb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new Wm(a,function(){return ln(b)},function(){return mn(b)},function(d,e){return nn(b,d,e)},function(){return on(b)},function(){return pn(b)});b.g.init();z(c)})};
|
|
519
|
+
function qn(a){a.g.init();a.m=new bf;for(var b=t(Mm),c=b.next();!c.done;c=b.next())a.m.A(a.i,c.value,function(f){a.g.sa()||(f=Ke(f),a.j.dispatchEvent(f))});for(var d in ym)a.m.A(a.h,ym[d],function(f){a.g.sa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Ob=e,Object.defineProperty(a.l,b.Ob,{configurable:!1,enumerable:!0,get:function(f){return function(){return rn(a,f.Ob)}}(b),set:function(f){return function(g){var h=f.Ob;a.g.sa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Ob:b.Ob};a.s={};sn(a,
|
|
520
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return tn(a,f)}})});un(a);a.j=new R;a.j.Bc=a.l;a.o=new R;a.o.Bc=a.s}function un(a){var b=new Map;sn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
|
|
521
|
+
function sn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
|
|
522
|
+
function pn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ld(),startTime:null};a.i.pause();for(var c=t(Om),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(Sm);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Tm);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function ln(a){var b=new P("caststatuschanged");a.dispatchEvent(b)}
|
|
523
|
+
function mn(a){var b=new P(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
524
|
+
function on(a){for(var b=t(Sm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(Om);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(Om),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(Tm);for(k=
|
|
525
|
+
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new P(um,h);a.h.dispatchEvent(h)})}
|
|
526
|
+
function rn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.sa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.sa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
|
|
527
|
+
function tn(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.bc()};if("getDrmEngine"==b)return function(){return a.h.o};if("getAdManager"==b)return function(){return a.h.fe()};
|
|
528
|
+
if("setVideoContainer"==b)return function(c){return a.h.ze(c)};if(a.g.sa()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.sa()&&0==Object.keys(a.g.g.video).length&&Qm[b]||!a.g.sa()?a.h[b].bind(a.h):a.g.get("player",b)}function nn(a,b,c){a.g.sa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
|
|
529
|
+
M("shaka.cast.CastProxy",kn);kn.prototype.changeReceiverId=kn.prototype.Me;kn.prototype.forceDisconnect=kn.prototype.zb;kn.prototype.suggestDisconnect=kn.prototype.Vf;kn.prototype.setAppData=kn.prototype.Nd;kn.prototype.cast=kn.prototype.cast;kn.prototype.receiverName=kn.prototype.Hd;kn.prototype.isCasting=kn.prototype.sa;kn.prototype.canCast=kn.prototype.Je;kn.prototype.getPlayer=kn.prototype.gf;kn.prototype.getVideo=kn.prototype.rf;kn.prototype.destroy=kn.prototype.destroy;function vn(a,b,c,d){R.call(this);var e=this;this.g=a;this.h=b;this.j=new bf;this.J={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.G=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.H=new O(function(){wn(e)});Fn(this)}ra(vn,R);q=vn.prototype;q.isConnected=function(){return this.G};q.wf=function(){return this.o};q.Rf=function(a){this.i=a};q.Pe=function(){this.i=null};
|
|
530
|
+
q.Sf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Qf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Pf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
531
|
+
q.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.H&&(a.H.stop(),a.H=null),a.g=null,a.J=null,a.D=null,a.G=!1,a.o=!0,a.l=null,a.s=null,R.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
|
|
532
|
+
function Fn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Gn(a)};b.onSenderDisconnected=function(){return Gn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Hn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Hn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return In(a,
|
|
533
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Jn(a,e)};b.start();b=t(Mm);for(var c=b.next();!c.done;c=b.next())a.j.A(a.g,c.value,function(e){return Kn(a,"video",e)});for(var d in ym)a.j.A(a.h,ym[d],function(e){return Kn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Pd(3840,2160):a.h.Pd(1920,1080);a.j.A(a.g,"loadeddata",function(){a.C=!0});a.j.A(a.h,"loading",function(){a.o=
|
|
534
|
+
!1;Ln(a)});a.j.A(a.g,"playing",function(){a.o=!1;Ln(a)});a.j.A(a.g,"pause",function(){Ln(a)});a.j.A(a.h,"unloading",function(){a.o=!0;Ln(a)});a.j.A(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,Ln(a))})).S(Mn)})}function Gn(a){a.m=0;a.u=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Ln(a)}
|
|
535
|
+
function Ln(a){var b;L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new P("caststatuschanged");a.dispatchEvent(b);Nn(a)||On(a);z(c)})}
|
|
536
|
+
function Pn(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;L(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:wa(v,3);break;case 5:return g=F(v),h=um,k=(new Map).set("detail",g),l=new P(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)r=b.playerAfterLoad[p],
|
|
537
|
+
a.h[p](r);a.g.autoplay=f;b.manifest&&(a.g.play(),On(a));z(v)}})}function Kn(a,b,c){a.h&&(wn(a),Hn(a,{type:"event",targetName:b,event:c},a.l))}
|
|
538
|
+
function wn(a){a.H.S(Qn);for(var b={video:{},player:{}},c=t(Nm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in Rm)0==a.m%Rm[e]&&(b.player[e]=a.h[e]());for(var f in Qm)0==a.m%Qm[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.C&&(a.m+=1);Hn(a,{type:"update",update:b},a.l);Nn(a)}function Nn(a){return a.u&&(a.g.duration||a.h.T())?(Rn(a),a.u=!1,!0):!1}
|
|
539
|
+
function Rn(a,b){var c={contentId:a.h.ld(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);On(a,void 0===b?0:b,c)}
|
|
540
|
+
function Jn(a,b){var c=Km(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.u=!0;Pn(a,c.initState,c.appData);wn(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
|
|
541
|
+
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.C=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return Sn(a,h,g,null)},function(k){return Sn(a,h,g,k)})}}
|
|
542
|
+
function In(a,b){var c=Km(b.data);switch(c.type){case "PLAY":a.g.play();On(a);break;case "PAUSE":a.g.pause();On(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),On(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),On(a));break;case "STOP":a.h.Vd().then(function(){a.h&&On(a)});break;case "GET_STATUS":Rn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
|
|
543
|
+
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||On(a);break;case "LOAD":a.m=0;a.C=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.L(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&Rn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Hn(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:Hn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
544
|
+
function Sn(a,b,c,d){a.h&&Hn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Hn(a,b,c,d){a.G&&(a=Jm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function On(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Tn:a.h.od()?Un:a.g.paused?Vn:Wn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Hn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
545
|
+
M("shaka.cast.CastReceiver",vn);vn.prototype.destroy=vn.prototype.destroy;vn.prototype.setContentArtist=vn.prototype.Pf;vn.prototype.setContentImage=vn.prototype.Qf;vn.prototype.setContentTitle=vn.prototype.Sf;vn.prototype.clearContentMetadata=vn.prototype.Pe;vn.prototype.setContentMetadata=vn.prototype.Rf;vn.prototype.isIdle=vn.prototype.wf;vn.prototype.isConnected=vn.prototype.isConnected;var Qn=.5,Mn=5,Tn="IDLE",Wn="PLAYING",Un="BUFFERING",Vn="PAUSED";function Xn(a){var b=this;this.g=[];this.h=[];this.data=[];(new jg).box("moov",ng).R("pssh",function(c){if(!(1<c.version)){var d=Gb(c.reader.O,-12,c.size);b.data.push(d);b.g.push(Hc(c.reader.$a(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=Hc(c.reader.$a(16));b.h.push(f)}}}}).parse(a)}
|
|
546
|
+
function Yn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Jb(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Zn(a){if(!a)return a;var b=new Xn(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={qc:c.qc},d=b.next())c.qc=d.value,a.some(function(e){return function(f){return Eb(f,e.qc)}}(c))||a.push(c.qc);return Ic.apply(Bc,ka(a))};function $n(a,b){var c=ao(a,b);return 1!=c.length?null:c[0]}function bo(a,b,c){a=co(a,b,c);return 1!=a.length?null:a[0]}function ao(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function eo(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
547
|
+
function co(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function fo(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function go(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function ho(a){return Array.from(a.childNodes).every(io)?a.textContent.trim():null}
|
|
548
|
+
function io(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function jo(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function ko(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
|
|
549
|
+
function lo(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
550
|
+
function mo(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function no(a){a=Number(a);return 0===a%1?a:null}function oo(a){a=Number(a);return 0===a%1&&0<a?a:null}function po(a){a=Number(a);return 0===a%1&&0<=a?a:null}function qo(a){a=Number(a);return isNaN(a)?null:a}function ro(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
551
|
+
function so(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function to(a,b){try{var c=vc(a);return so(c,b)}catch(d){return null}};function uo(a,b,c){var d=vo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.te?(e=h.init||e,!1):!0}),f.length&&(a=wo(e,f,c),0==a.length&&(a=[mc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(mc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
|
|
552
|
+
t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ae:g,Hg:e,drmInfos:a,ee:!0}}function xo(a,b,c,d){var e=uo(a,c,d);if(b.ee){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.ee=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.ae||b.ae}
|
|
553
|
+
function yo(a){var b=0,c=Jb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Gb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
554
|
+
function zo(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Ao(a){a=bo(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Ec(a.textContent);a=yo(a).filter(function(b){return b.type===Bo})[0];if(!a)return"";a=wc(a.value,!0);return(a=so(a,"WRMHEADER"))?zo(a):""}
|
|
555
|
+
function wo(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.te];if(f){var g;if(g=bo(e.node,"urn:microsoft:playready","pro")){g=Ec(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Yn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=mc(f,e.init||a||g);if(f=Co.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
|
|
556
|
+
function vo(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Do(c.value))&&b.push(c);return b}
|
|
557
|
+
function Do(a){var b=a.getAttribute("schemeIdUri"),c=fo(a,"urn:mpeg:cenc:2013","default_KID"),d=co(a,"urn:mpeg:cenc:2013","pssh").map(ho);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Ec(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,te:b,keyId:c,init:0<e.length?e:null}}
|
|
558
|
+
var Bo=1,Co=(new Map).set("com.widevine.alpha",function(a){return(a=bo(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Ao).set("com.microsoft.playready.recommendation",Ao).set("com.microsoft.playready.software",Ao).set("com.microsoft.playready.hardware",Ao);function Eo(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
|
|
560
559
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
561
|
-
function
|
|
562
|
-
|
|
563
|
-
function
|
|
564
|
-
function
|
|
565
|
-
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=
|
|
566
|
-
function
|
|
567
|
-
function
|
|
568
|
-
|
|
569
|
-
function
|
|
570
|
-
a
|
|
571
|
-
function
|
|
572
|
-
function
|
|
573
|
-
function
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
function
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
function
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
function
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
function
|
|
586
|
-
function
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
function
|
|
592
|
-
function
|
|
593
|
-
function
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
A.
|
|
598
|
-
function
|
|
599
|
-
|
|
600
|
-
function
|
|
601
|
-
function
|
|
602
|
-
function
|
|
603
|
-
function
|
|
604
|
-
|
|
605
|
-
function
|
|
606
|
-
(a
|
|
607
|
-
function
|
|
608
|
-
function
|
|
609
|
-
|
|
610
|
-
function
|
|
611
|
-
d=
|
|
612
|
-
function
|
|
613
|
-
function
|
|
614
|
-
a
|
|
615
|
-
function
|
|
616
|
-
function
|
|
617
|
-
|
|
618
|
-
function
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
function
|
|
626
|
-
|
|
627
|
-
function
|
|
628
|
-
c
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
l
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
"
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
function
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
function
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
function
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
function
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
function
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
1
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
a
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
function
|
|
669
|
-
function
|
|
670
|
-
r(m),
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
function
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
function
|
|
677
|
-
|
|
678
|
-
function
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
function
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
function
|
|
690
|
-
function
|
|
691
|
-
|
|
692
|
-
function
|
|
693
|
-
function
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
function
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
function
|
|
702
|
-
function
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
function
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
function
|
|
713
|
-
function
|
|
714
|
-
c))
|
|
715
|
-
function
|
|
716
|
-
function
|
|
717
|
-
function bs(a
|
|
718
|
-
function
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
function
|
|
722
|
-
function ks(a,b,c
|
|
723
|
-
function
|
|
724
|
-
|
|
725
|
-
function qs(a){var
|
|
726
|
-
function ss(a,b,c){
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
function
|
|
731
|
-
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}xs.prototype.ge=function(a){return{data:a.data}};function Bs(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
|
|
732
|
-
function zs(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
733
|
-
f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Cs(){is.apply(this,arguments)}ra(Cs,is);
|
|
734
|
-
Cs.prototype.cc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Ds(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Hp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
|
|
560
|
+
function Fo(a,b){var c=Go(a,b,"timescale"),d=1;c&&(d=oo(c)||1);var e=Go(a,b,"duration");c=oo(e||"");"image"==a.I.contentType&&(c=qo(e||""));c&&(c/=d);var f=Go(a,b,"startNumber");e=Number(Go(a,b,"presentationTimeOffset"))||0;var g=po(f||"");if(null==f||null==g)g=1;var h=Ho(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.U.duration||Infinity;h=ao(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],r=h[n+1],v=jo(p,"t",po),w=jo(p,"d",po);p=jo(p,"r",no);null!=v&&(v-=e);if(!w)break;v=null!=v?v:m;p=
|
|
561
|
+
p||0;if(0>p)if(r){r=jo(r,"t",po);if(null==r)break;else if(v>=r)break;p=Math.ceil((r-v)/w)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/w)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(r=0;r<=p;++r)m=v+w,l.push({start:v/f,end:m/f,Zf:v}),v=m}f=l}return{timescale:d,ja:c,Lb:g,Ta:e/d||0,Wd:e,timeline:f}}function Go(a,b,c){return[b(a.I),b(a.la),b(a.ba)].filter(Rb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
562
|
+
function Ho(a,b,c){return[b(a.I),b(a.la),b(a.ba)].filter(Rb).map(function(d){return $n(d,c)}).reduce(function(d,e){return d||e})}
|
|
563
|
+
function Io(a,b,c,d,e,f){for(var g=fo(a,"http://www.w3.org/1999/xlink","href"),h=fo(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Ee(new N(2,4,4028));if("onLoad"!=h)return Ee(new N(2,4,4027));var m=lc([d],[g]);return e.request(0,Te(m,b)).aa(function(n){n=to(n.data,a.tagName);if(!n)return Ee(new N(2,4,4001,g));
|
|
564
|
+
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Jo(a,b,c,m[0],e,f+1)})}
|
|
565
|
+
function Jo(a,b,c,d,e,f){f=void 0===f?0:f;if(fo(a,"http://www.w3.org/1999/xlink","href")){var g=Io(a,b,c,d,e,f);c&&(g=g.aa(void 0,function(){return Jo(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==fo(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Jo(k,b,c,d,e,f)));return Ie(g).aa(function(){return a})};function Ko(a,b,c,d,e,f,g){var h,k=(new jg).R("sidx",function(l){h=Lo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
|
|
566
|
+
function Lo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Kb(),m=g.reader.Kb();g.reader.skip(2);var n=g.reader.Jb();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.M(),r=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.M();g.reader.skip(4);if(1==r)throw new N(2,3,3006);h.push(new ii(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Mo(a){this.h=Jb(a);this.g=new gg(this.h,0)}Mo.prototype.ma=function(){return this.g.ma()};
|
|
567
|
+
function No(a){var b=Oo(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Oo(a);a:{d=t(Po);for(var e=d.next();!e.done;e=d.next())if(Eb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Y();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Y()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Y();d=Jb(a.h,a.g.Y(),b);a.g.skip(b);return new Qo(c,d)}
|
|
568
|
+
function Oo(a){var b=a.g.Y(),c=a.g.Z();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Gb(a.h,b,c)}var Po=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Qo(a,b){this.id=a;this.g=b}
|
|
569
|
+
function Ro(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function So(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Mo(a.g);for(var n=null,p=null;a.ma();){var r=No(a);if(187==r.id){var v=To(r);v&&(r=c*v.$f,v=b+v.Jf,null!=n&&m.push(new ii(n+g,r+g,l,p,v-1,f,g,h,k)),n=r,p=v)}}null!=n&&m.push(new ii(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
570
|
+
function To(a){var b=new Mo(a.g);a=No(b);if(179!=a.id)throw new N(2,3,3013);a=Ro(a);b=No(b);if(183!=b.id)throw new N(2,3,3012);b=new Mo(b.g);for(var c=0;b.ma();){var d=No(b);if(241==d.id){c=Ro(d);break}}return{$f:a,Jf:c}};function Uo(a,b){var c=Ho(a,b,"Initialization");if(!c)return null;var d=a.I.xa,e=c.getAttribute("sourceURL");e&&(d=lc(a.I.xa,[e]));e=0;var f=null;if(c=jo(c,"range",mo))e=c.start,f=c.end;return new gi(function(){return d},e,f,Vo(a))}
|
|
571
|
+
function Wo(a,b){var c=Number(Go(a,Xo,"presentationTimeOffset"))||0,d=Go(a,Xo,"timescale"),e=1;d&&(e=oo(d)||1);var f=c/e||0,g=Uo(a,Xo);Yo(a,g);var h=Me(a);return{Ab:function(){var k=Ho(h,Xo,"RepresentationIndex"),l=h.I.xa;k&&(k=k.getAttribute("sourceURL"))&&(l=lc(h.I.xa,[k]));k=Zo(h);return $o(h,b,g,l,k.start,k.end,f)}}}
|
|
572
|
+
function $o(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,w,x,y,D,B,A,E;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Xa||!a.U.le,l=a.U.start,m=a.U.duration,n=a.I.mimeType.split("/")[1],p=b,r=null,v=[p(d,e,f),"webm"==n?p(c.qa(),c.oa,c.ha):null],p=null,u(G,Promise.all(v),2);w=G.h;x=w[0];y=w[1]||null;D=null;B=l-g;A=l;E=m?l+m:Infinity;if("mp4"==n)var H=Ko(x,e,d,c,B,A,E);else{H=new Mo(y);if(440786851!=No(H).id)throw new N(2,3,3008);var J=No(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
|
|
573
|
+
J=new Mo(J.g);for(var I=null;J.ma();){var K=No(J);if(357149030==K.id){I=K;break}}if(!I)throw new N(2,3,3010);I=new Mo(I.g);K=1E6;for(J=null;I.ma();){var Q=No(I);if(2807729==Q.id)K=Ro(Q);else if(17545==Q.id)if(4==Q.g.byteLength)J=Q.g.getFloat32(0);else if(8==Q.g.byteLength)J=Q.g.getFloat64(0);else throw new N(2,3,3003);}if(null==J)throw new N(2,3,3011);I=K/1E9;J*=I;K=No(new Mo(x));if(475249515!=K.id)throw new N(2,3,3007);H=So(K,H,I,J,d,c,B,A,E)}D=H;h.Gb(D);r=new U(D);k&&r.Ya(A,E,!0);return G["return"](r)})}
|
|
574
|
+
function Xo(a){return a.lc}function Zo(a){var b=Ho(a,Xo,"RepresentationIndex");a=Go(a,Xo,"indexRange");a=mo(a||"");b&&(a=jo(b,"range",mo,a));return a}function Yo(a,b){ap(a,b);if(!Zo(a))throw new N(2,4,4002);}function ap(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=qc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
|
|
575
|
+
function Vo(a){var b=a.I;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Kc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function bp(a,b){var c=Uo(a,cp),d=dp(a);if(!d.ja&&!d.timeline&&1<d.Db.length)throw new N(2,4,4002);if(!d.ja&&!a.U.duration&&!d.timeline&&1==d.Db.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.ba.id&&a.I.id&&(f=b[a.ba.id+","+a.I.id])&&(e=f.segmentIndex);var g=ep(a.U.start,a.U.duration,a.I.xa,d,c);c=!e;e?e.Fb(g,a.presentationTimeline.Ra()):e=new U(g);a.presentationTimeline.Gb(g);a.Xa&&a.U.le||e.Ya(a.U.start,a.U.duration?a.U.start+a.U.duration:
|
|
576
|
+
Infinity,c);f&&(f.segmentIndex=e);return{Ab:function(){e&&0!=e.K.length||e.Eb(g);return Promise.resolve(e)}}}function cp(a){return a.ab}function dp(a){var b=fp(a);a=Fo(a,cp);var c=a.Lb;0==c&&(c=1);var d=0;a.ja?d=a.ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ja:a.ja,startTime:d,Lb:c,Ta:a.Ta,timeline:a.timeline,Db:b}}
|
|
577
|
+
function ep(a,b,c,d,e){var f=d.Db.length;d.timeline&&d.timeline.length!=d.Db.length&&(f=Math.min(d.timeline.length,d.Db.length));for(var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={$c:m.$c},n++){var p=d.Db[n];m.$c=lc(c,[p.Af]);var r=void 0;r=null!=d.ja?l+d.ja:d.timeline?d.timeline[n].end:l+b;k.push(new ii(a+l,a+r,function(v){return function(){return v.$c}}(m),p.start,p.end,e,g,a,h));l=r}return k}
|
|
578
|
+
function fp(a){return[a.I.ab,a.la.ab,a.ba.ab].filter(Rb).map(function(b){return ao(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.je&&(a.je=!0);var c=b.getAttribute("media");b=jo(b,"mediaRange",mo,{start:0,end:null});return{Af:c,start:b.start,end:b.end}})};function gp(a,b,c,d,e,f){var g=hp(a),h=ip(a);jp(h);var k=Me(a);if(h.fc)return ap(a,g),{Ab:function(){var r=Eo(h.fc,k.I.id,null,k.bandwidth||null,null);r=lc(k.I.xa,[r]);return $o(k,b,g,r,0,null,h.Ta)}};if(h.ja)return d||(a.presentationTimeline.Cd(h.ja),a.presentationTimeline.Dd(a.U.start)),{Ab:function(){return kp(k,h,e,g,f)}};var l=null;d=d=null;a.ba.id&&a.I.id&&(d=a.ba.id+","+a.I.id,d=c[d])&&(l=d.segmentIndex);var m=lp(k,h,g);c=a.U.start;var n=a.U.duration?a.U.start+a.U.duration:Infinity,p=Infinity!=
|
|
579
|
+
n;l?(p&&(new U(m)).Ya(c,n,!0),l.Fb(m,a.presentationTimeline.Ra())):l=new U(m);a.presentationTimeline.Gb(m);p&&l.Ya(c,n);d&&a.Xa&&(d.segmentIndex=l);return{Ab:function(){l&&0!=l.K.length||l.Eb(m);return Promise.resolve(l)}}}function mp(a){return a.mc}function ip(a){var b=Fo(a,mp),c=Go(a,mp,"media");a=Go(a,mp,"index");return{ja:b.ja,timescale:b.timescale,Lb:b.Lb,Ta:b.Ta,Wd:b.Wd,timeline:b.timeline,zd:c,fc:a}}
|
|
580
|
+
function jp(a){var b=a.fc?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.fc&&(a.timeline=null),a.ja=null);if(!a.fc&&!a.zd)throw new N(2,4,4002);}
|
|
581
|
+
function kp(a,b,c,d,e){function f(I){var K=(I-r)*p,Q=K+b.Ta,S=K+l;K=S+p;var fa=Math.min(K,h());S=new ii(S,fa,function(){var aa=Eo(w,y,I,x,Q*v);return lc(D,[aa])},0,null,d,B,l,h());S.l=K;return S}function g(){var I=[Math.max(k.Ra(),l),Math.min(k.fb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+r})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.U.start,m=a.ba.id,n=a.U.duration,p=b.ja,r=b.Lb,v=b.timescale,
|
|
582
|
+
w=b.zd,x=a.bandwidth||null,y=a.I.id,D=a.I.xa,B=l-b.Ta,A=g();a=a.Xa?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var E=a;E<=A;++E){var G=f(E);c.push(G)}var H=new U(c);c=k.fb()<h();E=k.T();if(c||E){var J=Math.max(a,A+1);H.Rc(p,function(){var I=k.Ra();H.cb(I);var K=t(g());K.next();K=K.next().value;for(var Q=[];J<=K;){var S=f(J);Q.push(S);J++}return I>h()&&!Q.length?null:Q})}return Promise.resolve(H)}
|
|
583
|
+
function lp(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Zc:h.Zc,cd:h.cd,fd:h.fd,Wc:h.Wc,hd:h.hd,Xc:h.Xc},k++){var l=b.timeline[k],m=l.start,n=l.Zf;l=l.end;h.fd=k+b.Lb;h.hd=n+b.Wd;h.cd=a.I.id;h.Wc=a.bandwidth||null;h.Zc=b.zd;h.Xc=a.I.xa;g.push(new ii(d+m,d+l,function(p){return function(){var r=Eo(p.Zc,p.cd,p.fd,p.Wc||null,p.hd);return lc(p.Xc,[r]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
584
|
+
function hp(a){var b=Go(a,mp,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.xa;return new gi(function(){var f=Eo(b,c,null,d,null);return lc(e,[f])},0,null,Vo(a))};function np(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}np.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
|
|
585
|
+
function op(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,w,x,y,D,B,A,E,G,H,J,I,K,Q,S,fa,aa,ba,Ia;return L(function(Ka){switch(Ka.g){case 1:d=rc;pp(b);qp(b);rp(b);sp(b);if(!c&&1==b.length){e=b[0];a.g=e.vc;a.h=e.Tc;a.j=e.textStreams;a.i=e.imageStreams;Ka.B(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ka["return"]();k=b.map(function(Ca){return Ca.vc});l=b.map(function(Ca){return Ca.Tc});m=b.map(function(Ca){return Ca.textStreams});n=b.map(function(Ca){return Ca.imageStreams});
|
|
586
|
+
p=t(m);for(r=p.next();!r.done;r=p.next())v=r.value,v.push(tp(d.$));w=t(n);for(x=w.next();!x.done;x=w.next())y=x.value,y.push(tp(d.Sb));return u(Ka,up(a.g,k,f,vp,wp),3);case 3:return u(Ka,up(a.h,l,f,vp,wp),4);case 4:return u(Ka,up(a.j,m,f,vp,wp),5);case 5:return u(Ka,up(a.i,n,f,vp,wp),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(I=t(a.g),K=I.next();!K.done;K=I.next())for(Q=K.value,S=t(a.h),fa=S.next();!fa.done;fa=S.next())aa=fa.value,ba=Zf(Q.drmInfos,aa.drmInfos),Q.drmInfos.length&&aa.drmInfos.length&&
|
|
587
|
+
!ba.length||(Ia=D++,B.push({id:Ia,language:Q.language,primary:Q.primary,audio:Q,video:aa,bandwidth:(Q.bandwidth||0)+(aa.bandwidth||0),drmInfos:ba,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),E=t(A),G=E.next();!G.done;G=E.next())H=G.value,J=D++,B.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.bb?H:null,video:H.type==d.Oa?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
588
|
+
a.l=B;z(Ka)}})}function pp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.vc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&hb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.vc=c}}
|
|
589
|
+
function rp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&hb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
590
|
+
function qp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Tc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&hb(e.roles,h.roles)&&of(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Tc=c}}
|
|
591
|
+
function sp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
|
|
592
|
+
function xp(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,w,x,y,D,B,A,E,G,H,J,I,K,Q;return L(function(S){switch(S.g){case 1:b=rc;if(1==a.length)return S["return"](a[0]);c=a.map(function(fa){return fa.filter(function(aa){return aa.type==b.bb})});d=a.map(function(fa){return fa.filter(function(aa){return aa.type==b.Oa})});e=a.map(function(fa){return fa.filter(function(aa){return aa.type==b.$})});f=a.map(function(fa){return fa.filter(function(aa){return aa.type==b.Sb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=
|
|
593
|
+
h.value,k.push(yp(b.$));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(yp(b.Sb));return u(S,up([],c,0,zp,Ap),2);case 2:return p=S.h,u(S,up([],d,0,zp,Ap),3);case 3:return r=S.h,u(S,up([],e,0,zp,Ap),4);case 4:return v=S.h,u(S,up([],f,0,zp,Ap),5);case 5:w=S.h;x=0;if(r.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(H=G.value,J=t(r),I=J.next();!I.done;I=J.next())K=I.value,Q=x++,K.variantIds.push(Q),H.variantIds.push(Q);else for(y=r.concat(p),D=t(y),B=D.next();!B.done;B=D.next())A=
|
|
594
|
+
B.value,A.variantIds=[x++];return S["return"](r.concat(p).concat(v).concat(w))}})}
|
|
595
|
+
function up(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,w,x,y,D,B,A,E,G,H,J,I;return L(function(K){switch(K.g){case 1:f=rc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){K.B(4);break}m=l.value;return u(K,Bp(m,b,c,e,g),5);case 5:n=K.h;if(!n)throw new N(2,4,4037);l=k.next();K.B(2);break;case 4:p=t(g);for(r=p.next();!r.done;r=p.next())for(v=r.value,w=t(v),x=w.next();!x.done;x=w.next())y=x.value,(D=Cp(y,b,d,e,g))&&a.push(D);B=t(g);for(r=B.next();!r.done;r=
|
|
596
|
+
B.next())for(A=r.value,E={},G=t(A),x=G.next();!x.done;E={Wa:E.Wa},x=G.next())if(E.Wa=x.value,H=E.Wa.type==f.$&&!E.Wa.language,J=E.Wa.type==f.Sb&&!E.Wa.tilesLayout,!H&&!J&&(I=a.some(function(Q){return function(S){return S.mimeType==Q.Wa.mimeType&&Qc(S.codecs)==Qc(Q.Wa.codecs)}}(E))))throw new N(2,4,4037);return K["return"](a)}})}
|
|
597
|
+
function Bp(a,b,c,d,e){return L(function(f){if(1==f.g)return Dp(b,a),a.matchedStreams?a.segmentIndex?u(f,Ep(a,c),2):f.B(2):f["return"](!1);Fp(a,c,d,e);return f["return"](!0)})}
|
|
598
|
+
function Ep(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Hi)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);z(l)})}
|
|
599
|
+
function Cp(a,b,c,d,e){var f=c(a);Dp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return L(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new Hi;return u(g,Ep(f,0),0)})});if(!f.matchedStreams)return null;Fp(f,0,d,e);return f}function Fp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==gd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
|
|
600
|
+
function vp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
601
|
+
function zp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
602
|
+
function wp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ka(f),ka(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Zf(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
603
|
+
(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=vp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),wp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&wp(a.trickModeVideo,b)}
|
|
604
|
+
function Ap(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ka(a.keyIds),ka(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ka(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
|
|
605
|
+
function Dp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Gp,video:Gp,text:Hp,image:Ip}[f.type],h={audio:Jp,video:Kp,text:Lp,image:Mp}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function Gp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Qc(b.codecs)!=Qc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Zf(c,d).length:1)}return c?!1:!0}
|
|
606
|
+
function Hp(a,b){return a.language?b.language?0==gd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Ip(a){return a.tilesLayout?!0:!1}
|
|
607
|
+
function Jp(a,b,c){if(a.id==c.id)return!0;var d=gd(a.language,b.language),e=gd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
|
|
608
|
+
d=Np(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Op)return!0;if(d==Pp)return!1;d=Np(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Op?!0:d==Pp?!1:a.bandwidth&&Qp(a.bandwidth,b.bandwidth,c.bandwidth)==Op?!0:!1}
|
|
609
|
+
function Kp(a,b,c){if(a.id==c.id)return!0;var d=Np(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Op)return!0;if(d==Pp)return!1;if(a.frameRate){d=Np(a.frameRate,b.frameRate,c.frameRate);if(d==Op)return!0;if(d==Pp)return!1}return a.bandwidth&&Qp(a.bandwidth,b.bandwidth,c.bandwidth)==Op?!0:!1}
|
|
610
|
+
function Lp(a,b,c){if(a.id==c.id)return!0;var d=gd(a.language,b.language),e=gd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
|
|
611
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Mp(a,b,c){return a.id==c.id?!0:Np(a.width*a.height,b.width*b.height,c.width*c.height)==Op?!0:!1}function yp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
612
|
+
function tp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
613
|
+
function Np(a,b,c){if(b==a&&a!=c)return Pp;if(c==a&&a!=b)return Op;if(b>a){if(c<=a||c-a<b-a)return Op;if(c-a>b-a)return Pp}else{if(c>a)return Pp;if(a-c<a-b)return Op;if(a-c>a-b)return Pp}return Rp}function Qp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Op:b<a?Pp:Rp}var Op=1,Rp=0,Pp=-1;function Sp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.H=1;this.l={};this.N={};this.j=new np;this.G=0;this.J=new Pa(5);this.D=new O(function(){Tp(a)});this.o=new Ne;this.s=null;this.L=[];this.u=Infinity;this.C=!1}q=Sp.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Up(c),2);d=e.h;c.h&&Vp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
|
|
614
|
+
q.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};q.update=function(){var a=this,b;return L(function(c){if(1==c.g)return C(c,2),u(c,Up(a),4);if(2!=c.g)return wa(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};q.onExpirationUpdated=function(){};
|
|
615
|
+
function Up(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=Te(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Oe(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Wp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
|
|
616
|
+
function Wp(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=to(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Xp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Jo(d,a.g.retryParameters,f,c,a.h.networkingEngine);Oe(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](Xp(a,h,c))})}
|
|
617
|
+
function Xp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,w,x,y,D,B,A,E,G,H,J,I,K,Q,S,fa,aa,ba,Ia,Ka,Ca;return L(function(Sa){switch(Sa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=ao(b,"Location").map(ho).filter(Rb);0<f.length&&(g=lc(e,f),e=a.m=g);h=ao(b,"BaseURL");k=h.map(ho);l=lc(e,k);m=0;h&&h.length&&(m=jo(h[0],"availabilityTimeOffset",qo)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=jo(b,"minBufferTime",lo)||0);a.G=jo(b,"minimumUpdatePeriod",lo,-1);r=jo(b,"availabilityStartTime",ko);v=jo(b,
|
|
618
|
+
"timeShiftBufferDepth",lo);w=a.g.dash.ignoreSuggestedPresentationDelay;x=null;w||(x=jo(b,"suggestedPresentationDelay",lo));y=a.g.dash.ignoreMaxSegmentDuration;D=null;y||(D=jo(b,"maxSegmentDuration",lo));B=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,E=t(Object.values(a.l)),G=E.next();!G.done;G=E.next())H=G.value,H.segmentIndex&&H.segmentIndex.cb(A.Ra());else J=a.g.defaultPresentationDelay||1.5*p,I=null!=x?x:J,A=new T(r,I,a.g.dash.autoCorrectDrift);A.nc("static"==B);(K=A.T())&&
|
|
619
|
+
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Rd(v);Q=b.getAttribute("profiles")||"";S={Xa:"static"!=B,presentationTimeline:A,ba:null,U:null,la:null,I:null,bandwidth:0,je:!1,yb:m,profiles:Q.split(",")};fa=Yp(a,S,l,b);aa=fa.duration;ba=fa.periods;"static"!=B&&fa.ce||A.Ja(aa||Infinity);a.u&&!a.C&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?A.we(a.u):a.u&&Va("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.");
|
|
620
|
+
A.Cd(D||1);return u(Sa,op(a.j,ba,S.Xa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Sa.B(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!A.Be()){Sa.B(3);break}Ka=ao(b,"UTCTiming");return u(Sa,Zp(a,l,Ka),5);case 5:Ca=Sa.h;if(!a.h)return Sa["return"]();A.xe(Ca);case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Sa)}})}
|
|
621
|
+
function Yp(a,b,c,d){var e=jo(d,"mediaPresentationDuration",lo),f=[],g=0;d=ao(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=jo(k,"start",lo,g),n=k.id,p=jo(k,"duration",lo),r=null;if(l){var v=jo(l,"start",lo);null!=v&&(r=v-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=$p(a,b,c,{start:m,duration:r,node:k,le:null==r||!l});f.push(g);b.ba.id&&r&&(a.N[b.ba.id]=r);if(null==r){g=
|
|
622
|
+
null;break}g=m+r}}a.L=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,ce:!1}:{periods:f,duration:g,ce:!0}}
|
|
623
|
+
function $p(a,b,c,d){b.ba=aq(d.node,null,c);b.U=d;b.ba.yb=b.yb;b.ba.id||(b.ba.id="__shaka_period_"+d.start);var e=ao(d.node,"EventStream");c=b.presentationTimeline.Ra();e=t(e);for(var f=e.next();!f.done;f=e.next())bq(a,d.start,d.duration,f.value,c);c=ao(d.node,"AdaptationSet").map(function(m){return cq(a,b,m)}).filter(Rb);if(b.Xa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Mf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
|
|
624
|
+
}d=c.filter(function(m){return!m.Ud});c=c.filter(function(m){return m.Ud});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ud.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={uc:h.uc},l=k.next())h.uc=l.value,h.uc.trickModeVideo=e.streams.find(function(m){return function(n){return Qc(m.uc.codecs)==Qc(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:dq(d,"audio");g=a.g.disableVideo?[]:dq(d,"video");f=a.g.disableText?
|
|
625
|
+
[]:dq(d,qc);c=a.g.disableThumbnails?[]:dq(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ka(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ka(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ka(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ka(h.value.streams));return{id:b.ba.id,vc:d,Tc:e,textStreams:g,imageStreams:f}}
|
|
626
|
+
function dq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
627
|
+
function cq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.la=aq(c,b.ba,null);var e=!1,f=ao(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Rb),h=void 0,k=b.la.contentType==qc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
628
|
+
l}}var n;m=ao(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=ao(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
|
|
629
|
+
10)));m=ao(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var w=t(r),x=w.next();!x.done;x=w.next()){var y=x.value,D=x=void 0;y.includes("=")?(y=y.split("="),x=y[0].startsWith("CC")?y[0]:"CC"+y[0],D=y[1]||"und"):(x="CC"+p,2==r.length?p+=2:p++,D=y);v.set(x,cd(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
|
|
630
|
+
1,null!=r)for(r=t(r.split(";")),x=r.next();!x.done;x=r.next())x=x.value,y=w=void 0,x.includes("=")?(x=x.split("="),w="svc"+x[0],y=x[1].split(",")[0].split(":").pop()):(w="svc"+p,p++,y=x),v.set(w,cd(y));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=r&&(g.push(r),"captions"==r&&(h="caption"));if(l)return null;l=ao(c,"ContentProtection");var B=uo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=cd(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=ao(c,"Label"))&&l.length&&
|
|
631
|
+
(l=l[0],l.textContent&&(E=l.textContent));l=ao(c,"Representation");c=l.map(function(G){if(G=eq(a,b,B,h,A,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.la.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.la.contentType||"application"==b.la.contentType)for(b.la.contentType=fq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.la.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
632
|
+
m.value,p=t(B.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(ka(r.keyIds),ka(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Rb);return{id:b.la.id||"__fake__"+a.H++,contentType:b.la.contentType,language:A,Ig:e,streams:c,drmInfos:B.drmInfos,Ud:f,Mf:k}}
|
|
633
|
+
function eq(a,b,c,d,e,f,g,h,k,l){b.I=aq(l,b.la,null);a.u=Math.min(a.u,b.I.yb);if(!gq(b.I))return null;var m=b.U.start;b.bandwidth=jo(l,"bandwidth",oo)||0;var n=b.I.contentType,p=n==qc||"application"==n;n="image"==n;try{var r=function(H,J,I){return hq(a,H,J,I)};if(b.I.lc)var v=Wo(b,r);else if(b.I.ab)v=bp(b,a.l);else if(b.I.mc)v=gp(b,r,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var w=b.I.xa,x=b.U.duration||0;v={Ab:function(){return Promise.resolve(Gi(m,x,w))}}}}catch(H){if((p||n)&&4002==H.code)return null;
|
|
634
|
+
throw H;}r=ao(l,"ContentProtection");r=xo(r,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);r=new Set(r?[r]:[]);var y=!1;ao(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(b.I.mimeType="audio/eac3-joc",y=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=ao(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile",
|
|
635
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&(B=l.getAttribute("value")),!B))return null;var A;l=b.I.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var E=b.I.id?b.ba.id+","+b.I.id:"",G={id:a.H++,originalId:b.I.id,createSegmentIndex:function(){var H,J,I;return L(function(K){if(1==K.g){J=(H=E&&b.Xa&&a.l[E])?a.l[E]:G;if(J.segmentIndex)return K.B(0);
|
|
636
|
+
I=J;return u(K,v.Ab(),3)}I.segmentIndex=K.h;z(K)})},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.la.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,
|
|
637
|
+
forced:D,channelsCount:b.I.Kc,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:A,tilesLayout:B,matchedStreams:[]};E&&b.Xa&&!a.l[E]&&(a.l[E]=G);return G}function Tp(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Up(a),4);case 4:b=d.h;wa(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Vp(a,b);z(d)}})}function Vp(a,b){0>a.G||a.D.S(Math.max(3,a.G-b,Qa(a.J)))}
|
|
638
|
+
function aq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Kc:null,audioSamplingRate:null,yb:0};c=c||b.xa;var d=ao(a,"BaseURL"),e=d.map(ho),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=jo(a,"frameRate",ro)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=ao(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
|
|
639
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=ao(a,"AudioChannelConfiguration");m=iq(m)||b.Kc;p=jo(a,"audioSamplingRate",po)||b.audioSamplingRate;f||(f=fq(g,h));var r=$n(a,"SegmentBase"),v=$n(a,"SegmentTemplate"),w=r?jo(r,"availabilityTimeOffset",qo)||0:0,x=v?jo(v,"availabilityTimeOffset",qo)||0:0;d=d&&d.length?jo(d[0],"availabilityTimeOffset",qo)||0:0;d=b.yb+d+w+x;return{xa:lc(c,e),lc:r||b.lc,ab:$n(a,"SegmentList")||b.ab,mc:v||b.mc,width:jo(a,"width",po)||b.width,height:jo(a,
|
|
640
|
+
"height",po)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Kc:m,audioSamplingRate:p,yb:d}}
|
|
641
|
+
function iq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
642
|
+
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function gq(a){var b=a.lc?1:0;b+=a.ab?1:0;b+=a.mc?1:0;if(0==b)return a.contentType==qc||"application"==a.contentType?!0:!1;1!=b&&(a.lc&&(a.ab=null),a.mc=null);return!0}
|
|
643
|
+
function jq(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=lc(b,[c]),f=Te(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Oe(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=vc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
|
|
644
|
+
function Zp(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;C(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
|
|
645
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return u(n,jq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,jq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
|
|
646
|
+
case 9:wa(n,3);break;case 5:F(n);case 3:g=f.next();n.B(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
|
|
647
|
+
function bq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=jo(d,"timescale",po)||1;d=t(ao(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=jo(k,"presentationTime",po)||0,m=jo(k,"duration",po)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
|
|
648
|
+
function hq(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=Ze,f=Wi(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Oe(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function fq(a,b){return Tc(Oc(a,b))?qc:a.split("/")[0]}M("shaka.dash.DashParser",Sp);eg.mpd=function(){return new Sp};cg["application/dash+xml"]=function(){return new Sp};cg["video/vnd.mpeg.dash.mpd"]=function(){return new Sp};function kq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function lq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}lq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
|
|
649
|
+
lq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function mq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function nq(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function oq(a,b){this.name=a;this.value=b};function pq(a,b){return a.filter(function(c){return c.name==b})}function qq(a,b){return a.filter(function(c){return mq(c,"TYPE")==b})}function rq(a,b){var c=pq(a,b);return c.length?c[0]:null}function sq(a,b,c){c=void 0===c?0:c;return(a=rq(a,b))?Number(a.value):c};function tq(a){this.h=a;this.g=0}function uq(a){vq(a,/[ \t]+/gm)}function vq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function wq(a){return a.g==a.h.length?null:(a=vq(a,/[^ \t\n]*/gm))?a[0]:null};function xq(){this.g=0}
|
|
650
|
+
function yq(a,b,c){b=vc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=zq(a,g),--a.g,Aq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=zq(a,h);if(Bq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
|
|
651
|
+
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=zq(a,m),Aq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=lc([d],[m.trim()])[0],h&&g.push(h),e.push(new nq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new nq("",g,k)));return new kq(c,b,f,e)}f.push(h);
|
|
652
|
+
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new oq("URI",k)),e=!0)}}return new kq(c,b,f)}function zq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new tq(f);var h;(h=vq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=vq(f,k);)d.push(new oq(h[1],h[2]||h[3])),uq(f)}return new lq(c,e,d,g)}
|
|
653
|
+
var Aq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Bq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Cq(){}function Dq(a){try{var b=Eq(a);return Ge({uri:a,oe:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ee(c)}}function Eq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Ec(a):e=zc(a);return{data:e,contentType:c}}
|
|
654
|
+
M("shaka.net.DataUriPlugin",Cq);Cq.parse=Dq;Qe("data",Dq);function Fq(){var a=this;this.g=this.i=null;this.Fa=1;this.o=new Map;this.u=new Map;this.wa=new Set;this.h=new Map;this.j=null;this.N="";this.ea=new xq;this.ka=0;this.C=new O(function(){Gq(a)});this.m=Hq;this.D=null;this.ga=0;this.H=Infinity;this.da=this.Na=0;this.G=new Ne;this.W=[];this.L=new Map;this.Ma=!1;this.s=new Map;this.V=null;this.fa=new Map;this.J=new Map;this.l=!1}q=Fq.prototype;q.configure=function(a){this.g=a};
|
|
655
|
+
q.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),u(f,Iq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,u(f,Jq(c,d.data),3);e=c.ka;0<e&&c.C.S(e);return f["return"](c.D)})};q.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.i=null;this.wa.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
656
|
+
q.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==Hq)return e["return"]();b=[];a.V=null;c=Array.from(a.h.values());return c.length?u(e,Kq(a,c[0]),2):e.B(2)}for(d=1;d<c.length;d++)b.push(Kq(a,c[d]));return u(e,Promise.all(b),0)})};
|
|
657
|
+
function Kq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v;return L(function(w){if(1==w.g)return c=Lq,d=b.Fe,e=new Yb(d),a.l&&b.Ke&&ac(e,new cc("_HLS_skip=YES")),u(w,Iq(a,e.toString()),2);if(3!=w.g){f=w.h;g=yq(a.ea,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=pq(g.g,"EXT-X-DEFINE");k=Mq(a,h);l=b.stream;return u(w,Nq(a,b.Sc,g,l.type,l.mimeType,b.yd,k,b.Re,l.codecs,l.bandwidth),3)}m=w.h;l.segmentIndex.Fb(m,a.j.Ra());m.length&&(n=sq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.yd.get(n),l.segmentIndex.cb(p));r=m[m.length-
|
|
658
|
+
1];if(v=rq(g.g,"EXT-X-ENDLIST"))Oq(a,c.Ee),a.j.Ja(r.endTime);z(w)})}q.onExpirationUpdated=function(){};
|
|
659
|
+
function Jq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,w,x,y,D,B,A,E,G,H,J,I,K,Q,S,fa,aa,ba,Ia,Ka,Ca,Sa,Sb,ld;return L(function(Xa){switch(Xa.g){case 1:c=yq(a.ea,b,a.N);if(0!=c.type)throw new N(2,4,4022);d=pq(c.g,"EXT-X-DEFINE");Pq(a,d);e=pq(c.g,"EXT-X-MEDIA");f=pq(c.g,"EXT-X-STREAM-INF");g=pq(c.g,"EXT-X-IMAGE-STREAM-INF");Qq(a,f);h=pq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),r=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),w=(new Map).set("id",n),p&&w.set("uri",
|
|
660
|
+
lc([a.N],[p])[0]),r&&w.set("language",r),v&&w.set("value",v),x=new P("sessiondata",w),a.i)a.i.onEvent(x);return u(Xa,Rq(a,e),2);case 2:return Sq(a,e),u(Xa,Tq(a,f),3);case 3:return y=Xa.h,u(Xa,Uq(a,e),4);case 4:return D=Xa.h,u(Xa,Vq(a,g),5);case 5:B=Xa.h;if(!a.i)throw new N(2,7,7001);if(a.Ma&&0==y.length)throw new N(2,4,4034);E=A=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,A=Math.min(A,J.me),"text"!=J.stream.type&&(E=Math.min(E,J.zf-J.me));a.m!=Hq?(a.j=new T(0,a.g.defaultPresentationDelay?
|
|
661
|
+
a.g.defaultPresentationDelay:a.da?a.da:3*a.ga),a.j.nc(!1)):(a.j=new T(null,0),a.j.nc(!0));Wq(a);if(a.m!=Hq)a.ka=a.H,I=Lq,a.m==I.De&&(K=a.j.Pc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.j.Rd(K));else for(a.j.Ja(E),a.j.offset(-A),Q=t(a.h.values()),H=Q.next();!H.done;H=Q.next())S=H.value,S.stream.segmentIndex.offset(-A),S.stream.segmentIndex.Ya(0,E);a.W=[];fa=[];aa=t(y);for(ba=aa.next();!ba.done;ba=aa.next())for(Ia=ba.value,Ka=t([Ia.video,Ia.audio]),Ca=Ka.next();!Ca.done;Ca=
|
|
662
|
+
Ka.next())(Sa=Ca.value)&&fa.push(Sa);return u(Xa,Promise.all(fa.map(function(Fc){return L(function(he){return u(he,Fc.createSegmentIndex(),0)})})),6);case 6:Sb=t(fa);for(Ca=Sb.next();!Ca.done;Ca=Sb.next())ld=Ca.value,a.W.push(ld.segmentIndex.K);Wq(a);a.D={presentationTimeline:a.j,variants:y,textStreams:D,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.D);z(Xa)}})}
|
|
663
|
+
function Pq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}function Mq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}
|
|
664
|
+
function Qq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=Xq(a,e);if(g){var h=oc(qc,e);a.s.set(g,h);gb(e,h)}f&&(g=nc("audio",e),a.s.set(f,g));d&&(f=nc("video",e),a.s.set(d,f))}}
|
|
665
|
+
function Uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return L(function(v){if(1==v.g)return c=qq(b,"SUBTITLES"),d=c.map(function(w){var x,y,D;return L(function(B){if(1==B.g){if(x=a.g.disableText)return B["return"](null);C(B,2);return u(B,Yq(a,w),4)}if(2!=B.g)return y=B.h,B["return"](y.stream);D=F(B);if(a.g.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=mq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
|
|
666
|
+
t(m),p=n.next();!p.done;p=n.next())r=p.value,r.stream.codecs=l;return v["return"](e.filter(function(w){return w}))})}
|
|
667
|
+
function Vq(a,b){var c,d;return L(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return L(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);C(l,2);return u(l,Zq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
|
|
668
|
+
function Rq(a,b){var c;return L(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?u(d,Yq(a,b[0]),2):d.B(2);c=b.slice(1).map(function(e){return Yq(a,e)});return u(d,Promise.all(c),0)})}
|
|
669
|
+
function Tq(a,b){var c,d,e;return L(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,v;return L(function(w){if(1==w.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(mq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,r=Z(g,"VIDEO-RANGE"),u(w,$q(a,g,k),2);if(v=w.h){for(var x=w["return"],y=v.audio,D=v.video,B=t(D),A=B.next();!A.done;A=B.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
|
|
670
|
+
void 0,A.frameRate=Number(h)||void 0,A.hdr=r||void 0;B=a.g.disableAudio;if(!y.length||B)y=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];y=t(y);for(A=y.next();!A.done;A=y.next()){A=A.value;for(var E=t(D),G=E.next();!G.done;G=E.next()){var H=G.value;G=A?A.stream:null;var J=H?H.stream:null,I=A?A.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Sc:"")+" - "+(A?A.Sc:"");G&&J&&I.length&&K.length&&!(0<Zf(I,K).length)||a.wa.has(H)||(G={id:a.Fa++,language:G?G.language:"und",primary:!!G&&G.primary||
|
|
671
|
+
!!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(G),a.wa.add(H))}}w=x.call(w,B)}else w=w["return"]([]);return w})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Pb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
672
|
+
function $q(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,w,x;return L(function(y){if(1==y.g)return d=rc,e=Xq(a,b),f=Z(b,"AUDIO"),g=Z(b,"VIDEO"),k=(h=f||g)&&a.u.has(h)?a.u.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=mq(b,"URI"),r=l.audio.find(function(D){return D&&D.Sc==p}),v=oc(d.Oa,e),(w=oc(d.bb,e))&&!v?m=d.bb:!k.length&&w&&v?(m=d.Oa,e=[[v,w].join()]):l.audio.length&&r?(m=d.bb,n=!0):m=l.video.length?d.bb:d.Oa,n?y.B(2):u(y,ar(a,b,e,m,c),3);2!=y.g&&(x=y.h);if(x)l[x.stream.type]=[x];else if(null===x)return y["return"](null);
|
|
673
|
+
br(l);return y["return"](l)})}function Xq(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Qc(f);c.has(g)||(e.push(f),c.add(g))}return e}function cr(a){a=Z(a,"LANGUAGE")||"und";return cd(a)}
|
|
674
|
+
function br(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Sq(a,b){var c=qq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=cr(e);var f=mq(e,"GROUP-ID");e=mq(e,"INSTREAM-ID");a.L.get(f)||a.L.set(f,new Map);a.L.get(f).set(e,d)}}
|
|
675
|
+
function Yq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,w;return L(function(x){if(1==x.g){c=mq(b,"GROUP-ID");d="";var y=mq(b,"TYPE").toLowerCase();"subtitles"==y&&(y=qc);e=y;e!=qc&&c&&a.s.has(c)&&(d=a.s.get(c));f=dr(mq(b,"URI"),a.o);if(a.h.has(f))return x["return"](a.h.get(f));g=cr(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?y=(y=Z(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;m=y;"audio"==e?y=(y=Z(b,"CHANNELS"))?y.includes("/JOC"):!1:y=!1;n=y;p=Z(b,"CHARACTERISTICS");r=Z(b,"FORCED");
|
|
676
|
+
v="YES"==r;return u(x,er(a,f,d,e,g,l,h,m,null,p,v,n),2)}w=x.h;a.u.has(c)?a.u.get(c).push(w):a.u.set(c,[w]);if(null==w)return x["return"](null);if(a.h.has(f))return x["return"](a.h.get(f));a.h.set(f,w);return x["return"](w)})}
|
|
677
|
+
function Zq(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(p){if(1==p.g){c=dr(mq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=cr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,er(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
|
|
678
|
+
Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
|
|
679
|
+
function ar(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g){f=dr(mq(b,"URI"),a.o);if(a.h.has(f))return l["return"](a.h.get(f));var m=Z(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.L.get(m):null;h=nc(d,c);return u(l,er(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
|
|
680
|
+
function er(a,b,c,d,e,f,g,h,k,l,m,n,p){var r,v,w,x,y,D,B,A,E,G,H,J,I,K,Q,S,fa,aa,ba,Ia,Ka,Ca,Sa,Sb,ld,Xa,Fc,he,xn,yn,zn,An,ci,di,Bf,Bn,Cn,Dn,En;return L(function(cb){switch(cb.g){case 1:return r=lc([a.N],[b])[0],u(cb,Iq(a,r),2);case 2:v=cb.h;r=v.uri;w=yq(a.ea,v.data,r);if(1!=w.type)throw new N(2,4,4017);x=[];if(w.segments)for(y=t(w.segments),D=y.next();!D.done;D=y.next())B=D.value,A=pq(B.g,"EXT-X-KEY"),x.push.apply(x,ka(A));E=!1;G=[];H=new Set;J=t(x);for(I=J.next();!I.done;I=J.next())if(K=I.value,
|
|
681
|
+
Q=mq(K,"METHOD"),"NONE"!=Q){E=!0;if("AES-128"==Q)return a.Ma=!0,cb["return"](null);S=mq(K,"KEYFORMAT");if(aa=(fa=fr[S])?fa(K):null){if(aa.keyIds)for(ba=t(aa.keyIds),Ia=ba.next();!Ia.done;Ia=ba.next())Ka=Ia.value,H.add(Ka);G.push(aa)}}if(E&&!G.length)throw new N(2,4,4026);Ca=pq(w.g,"EXT-X-DEFINE");Sa=Mq(a,Ca);gr(a,w);return u(cb,hr(a,d,c,w,Sa),3);case 3:return Sb=cb.h,ir.includes(Sb)&&(c=""),ld=new Map,Xa=new Map,C(cb,4),u(cb,Nq(a,b,w,d,Sb,ld,Sa,Xa,c,p),6);case 6:Fc=cb.h;wa(cb,5);break;case 4:he=F(cb);
|
|
682
|
+
if(4035==he.code)return Va("Skipping unsupported HLS stream",Sb,b),cb["return"](null);throw he;case 5:xn=Fc[0].startTime;yn=Fc[Fc.length-1].endTime;zn=new U(Fc);An=d==qc?"subtitle":void 0;ci=[];if(l)for(di=t(l.split(",")),Bf=di.next();!Bf.done;Bf=di.next())Bn=Bf.value,ci.push(Bn);Dn=(Cn=rq(w.g,"EXT-X-SERVER-CONTROL"))?null!=Cn.getAttribute("CAN-SKIP-UNTIL"):!1;En={id:a.Fa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:zn,mimeType:Sb,codecs:c,kind:An,encrypted:E,
|
|
683
|
+
drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:ci,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return cb["return"]({stream:En,Sc:b,Fe:r,me:xn,zf:yn,yd:ld,Re:Xa,Ke:Dn})}})}
|
|
684
|
+
function gr(a,b){var c=rq(b.g,"EXT-X-PLAYLIST-TYPE"),d=rq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Oq(a,Hq);else{c?Oq(a,jr):Oq(a,kr);d=rq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=rq(b.g,"EXT-X-PART-INF");a.l&&c?(a.Na=Number(mq(c,"PART-TARGET")),a.H=Math.min(a.Na,a.H),c=rq(b.g,"EXT-X-SERVER-CONTROL"),a.da=c?Number(mq(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.ga=Math.max(d,a.ga)}}
|
|
685
|
+
function lr(a,b,c,d){c=rq(c,"EXT-X-MAP");if(!c)return null;var e=mq(c,"URI");d=dr(lc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.fa.has(b)||(c=mr(d,c),a.fa.set(b,c));return a.fa.get(b)}function mr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new gi(function(){return[a]},c,d)}
|
|
686
|
+
function nr(a,b,c,d,e,f,g,h,k){var l=d.g,m=dr(d.h,g),n=rq(l,"EXTINF"),p=g=0,r=null,v=[];if(a.l&&d.i.length){a={};for(var w=0;w<d.i.length;a={ad:a.ad},w++){var x=d.i[w],y=0==w?c:v[v.length-1],D=0==w?e:y.endTime,B=Number(Z(x,"DURATION"));B=D+B;var A=0,E=null;"EXT-X-PRELOAD-HINT"==x.name?A=(y=Z(x,"BYTERANGE-START"))?Number(y):0:(A=Z(x,"BYTERANGE"),y=t(or(y,A)),A=y.next().value,E=y.next().value);if(x=Z(x,"URI"))a.ad=lc([h],[x])[0],v.push(new ii(D,B,function(G){return function(){return[G.ad]}}(a),A,E,
|
|
687
|
+
b,f,0,Infinity))}}else if(!n)throw new N(2,4,4024,"EXTINF");n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(d=rq(l,"EXT-X-BYTERANGE"))?(r=t(or(c,d.value)),p=r.next().value,r=r.next().value):v.length&&(p=v[0].oa,r=v[v.length-1].ha);c="";d=null;"image"==k&&(c="1x1",k=rq(l,"EXT-X-TILES"))&&(c=mq(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(d=Number(k)));return new ii(e,g,function(){return m.length?[m]:[]},p,r,b,f,0,Infinity,v,c,d)}
|
|
688
|
+
function or(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ha+1,d=c+d-1);return[c,d]}function Wq(a){if(a.j){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.j.Gb(c.value);a.W=[]}}
|
|
689
|
+
function Nq(a,b,c,d,e,f,g,h,k,l){var m,n,p,r,v,w,x,y,D,B,A,E,G,H,J,I,K,Q,S,fa,aa;return L(function(ba){switch(ba.g){case 1:m=c.segments;p=sq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(r=rq(c.g,"EXT-X-SKIP"))?Number(Z(r,"SKIPPED-SEGMENTS")):0;w=p+v;if(a.m!=Hq&&f.has(w)){x=f.get(w);ba.B(2);break}if(null!=a.V){ba.B(3);break}n=lr(a,c.h,m[0].g,g);y=a;return u(ba,pr(a,b,n,e,w,!1,m[0],g,d,k,l),4);case 4:y.V=ba.h;case 3:x=a.V;case 2:D=m[0].h;D.split("/").pop();B=sq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(B)||
|
|
690
|
+
h.set(B,w),v))for(A=h;A.has(B+1)&&A.get(B+1)<w;)B++;E=a.J.get(B)||0;G=[];H=0;case 5:if(!(H<m.length)){ba.B(7);break}J=m[H];I=G[G.length-1];K=0==H?x:I.endTime;w=p+v+H;f.set(w,K);n=lr(a,c.h,J.g,g);Q=rq(J.g,"EXT-X-DISCONTINUITY");if(!Q){ba.B(8);break}B++;h.set(B,w);return u(ba,qr(a,B,b,n,e,w,J,g,K,d,k,l),9);case 9:E=ba.h;case 8:!a.l&&(S=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());fa=rq(J.g,"EXTINF");a.l||fa?(aa=nr(a,n,I,J,K,E,g,c.h,d),G.push(aa)):a.l||Va("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.");
|
|
691
|
+
H++;ba.B(5);break;case 7:return ba["return"](G)}})}function qr(a,b,c,d,e,f,g,h,k,l,m,n){var p,r;return L(function(v){if(1==v.g)return p=0,a.J.has(b)?(p=a.J.get(b),v.B(2)):u(v,pr(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(r=v.h,p=k-r,a.J.set(b,p));return v["return"](p)})}
|
|
692
|
+
function rr(a,b,c,d,e,f){var g,h,k,l,m,n;return L(function(p){switch(p.g){case 1:g=Ze;h=Wi(b.qa(),b.oa,b.ha,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof gi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](sr(a,h,g));k=Wi(b.qa(),b.oa,b.oa+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof gi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});C(p,2);return u(p,
|
|
693
|
+
sr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=F(p);if(7001==m.code)throw m;Va("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return u(p,sr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
|
|
694
|
+
function pr(a,b,c,d,e,f,g,h,k,l,m){var n,p,r,v,w,x,y,D;return L(function(B){switch(B.g){case 1:n=nr(a,c,null,g,0,0,h,"",k);if(a.D&&!f&&(p=a.h.get(b),r=p.yd.get(e),void 0!=r))return B["return"](r);d=d.toLowerCase();if(ir.includes(d))throw Va("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Va("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){B.B(2);break}v=[rr(a,n,k,d,l,m)];c&&v.push(rr(a,c,k,d,l,m));return u(B,
|
|
695
|
+
Promise.all(v),3);case 3:return w=B.h,x=w[0],y=w[1]||w[0],B["return"](tr(b,x.uri,x.data,y.data));case 2:if("video/mp2t"!=d){B.B(4);break}return u(B,rr(a,n,k,d,l,m),5);case 5:return D=B.h,B["return"](ur(b,D.uri,D.data));case 4:throw new N(2,4,4030,b);}})}
|
|
696
|
+
function tr(a,b,c,d){var e=0;(new jg).box("moov",ng).box("trak",ng).box("mdia",ng).R("mdhd",function(h){e=Ah(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new N(2,4,4030,a,b);var f=0,g=!1;(new jg).box("moof",ng).box("traf",ng).R("tfdt",function(h){f=zh(h.reader,h.version).kd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
|
|
697
|
+
function ur(a,b,c){function d(){f.seek(g+188);h=f.Z();71!=h&&(f.seek(g+192),h=f.Z());71!=h&&(f.seek(g+204),h=f.Z());71!=h&&e();f.re(1)}function e(){throw new N(2,4,4030,a,b);}var f=new gg(c,0),g=0,h=0;for(c=Math.min(f.O.byteLength-188,940);;){g=f.Y();h=f.Z();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Jb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.Z()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.Z(),f.skip(k)),1!=f.M()>>8)d();else{f.skip(3);c=f.Z()>>6;0!=c&&1!=c||e();0==f.Z()&&e();c=f.Z();k=f.Jb();var l=
|
|
698
|
+
f.Jb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function dr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
|
|
699
|
+
function hr(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,w;return L(function(x){if(1==x.g){f=rc;g=Ze;h=dr(d.segments[0].h,e);k=new Yb(h);l=k.va.split(".").pop();m=vr[b];if(n=m[l])return x["return"](n);if(b==f.$)return c&&"vtt"!=c&&"wvtt"!=c?x["return"]("application/mp4"):x["return"]("text/vtt");if(b==f.Sb&&(!c||"jpeg"==c))return x["return"]("image/jpeg");p=Te([h],a.g.retryParameters);p.method="HEAD";return u(x,sr(a,p,g),2)}r=x.h;v=r.headers["content-type"];return v?x["return"](v.split(";")[0]):(w=m.mp4,x["return"](w))})}
|
|
700
|
+
function Iq(a,b){var c=Te([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return sr(a,c,0)}function Gq(a){var b,c;L(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ka,a.C.S(b),wa(d,0);c=F(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.C.S(.1);z(d)})}function Oq(a,b){a.m=b;a.j&&a.j.nc(a.m==Hq);a.m!=Hq||a.C.stop()}
|
|
701
|
+
function sr(a,b,c){if(!a.G)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);Oe(a.G,b);return b.promise}M("shaka.hls.HlsParser",Fq);
|
|
702
|
+
var ir=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],vr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
703
|
+
vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},fr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=mq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=mq(a,"URI");b=Eq(b);b=Gb(b.data);b=mc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
|
|
704
|
+
mq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=mq(a,"URI");a=Eq(a);a=Gb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Yn(a,b);return mc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Hq="VOD",kr="EVENT",jr="LIVE",Lq={Ee:Hq,jg:kr,De:jr};eg.m3u8=function(){return new Fq};cg["application/x-mpegurl"]=function(){return new Fq};cg["application/vnd.apple.mpegurl"]=function(){return new Fq};function wr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,oe:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=yc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function xr(){}function yr(a,b,c,d,e){var f=new zr;mf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Ar,h={Xd:!1,Ae:!1};a=Br(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new De(a,function(){h.Xd=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Ae=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
|
|
705
|
+
function Br(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,w,x,y,D,B;return L(function(A){switch(A.g){case 1:return h=Cr,k=Dr,p=n=0,r=Date.now(),C(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(Er(l.headers)),v=l.clone().body.getReader(),x=(w=l.headers.get("Content-Length"))?parseInt(w,10):0,y=function(E){function G(){var H,J;return L(function(I){switch(I.g){case 1:return C(I,2),u(I,v.read(),4);case 4:H=I.h;wa(I,3);break;case 2:return F(I),I["return"]();case 3:if(H.done){I.B(5);break}n+=H.value.byteLength;if(!g){I.B(5);
|
|
706
|
+
break}return u(I,g(H.value),5);case 5:J=Date.now();if(100<J-r||H.done)e(J-r,n-p,x-n),p=n,r=J;H.done?E.close():(E.enqueue(H.value),G());z(I)}})}G()},new k({start:y}),u(A,l.arrayBuffer(),5);case 5:m=A.h;wa(A,3);break;case 2:D=F(A);if(d.Xd)throw new N(1,1,7001,a,b);if(d.Ae)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return B=Er(l.headers),A["return"](wr(B,m,l.status,a,l.url,b))}})}function Er(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
707
|
+
function Fr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",xr);xr.isSupported=Fr;xr.parse=yr;var Cr=window.fetch,Ar=window.AbortController,Dr=window.ReadableStream,zr=window.Headers;Fr()&&(Qe("http",yr,2,!0),Qe("https",yr,2,!0),Qe("blob",yr,2,!0));function Gr(){}
|
|
708
|
+
function Hr(a,b,c,d,e){var f=new Ir,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new N(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=Jr(f);e(r);n=!0}};f.onload=function(){var r=Jr(f),v=f.response;try{var w=wr(r,v,f.status,a,f.responseURL,c);l(w)}catch(x){m(x)}};f.onerror=function(r){m(new N(1,1,1002,a,r,
|
|
709
|
+
c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(r){var v=Date.now();if(100<v-g||r.lengthComputable&&r.loaded==r.total)d(v-g,r.loaded-h,r.total-r.loaded),h=r.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new De(k,function(){f.abort();return Promise.resolve()})}
|
|
710
|
+
function Jr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}M("shaka.net.HttpXHRPlugin",Gr);Gr.parse=Hr;var Ir=window.XMLHttpRequest;Qe("http",Hr,1,!0);Qe("https",Hr,1,!0);Qe("blob",Hr,1,!0);function Kr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Lr(a){return a.qa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.oa+":"+a.ha}function Mr(a,b){return Wi(a.g.qa(),a.g.oa,a.g.ha,b.streaming.retryParameters)};function Nr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Or(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Nr.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g["delete"](a);this.j+=c;this.h+=b}};function Pr(a){var b=this;this.o=a;this.h=new Map;this.i=new $e(function(){return Qr(b)["catch"](function(){})});this.j=[];this.m=function(){};this.l=function(){};this.g=new Nr}Pr.prototype.destroy=function(){return this.i.destroy()};function Rr(a,b,c){a.m=b;a.l=c}function Qr(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
|
|
711
|
+
function Sr(a,b,c,d,e,f){af(a.i);var g=(a.h.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return L(function(v){if(1==v.g)return u(v,Tr(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Gb(h),l=new Xn(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return v["return"](f(h))})});a.h.set(b,g)}
|
|
712
|
+
function Ur(a,b,c){af(a.i);var d=(a.h.get(b)||Promise.resolve()).then(function(){return L(function(e){return u(e,c(),0)})});a.h.set(b,d)}function Vr(a){return L(function(b){return 1==b.g?u(b,Promise.all(a.h.values()),2):b["return"](a.g.h)})}function Tr(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=Ze,d=a.o.request(c,b),e=function(){return d.abort()},a.j.push(e),u(g,d.promise,2);f=g.h;gb(a.j,e);return g["return"](f.data)})};function Wr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new sc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Wr.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return wa(b,0);F(b);z(b)})};
|
|
713
|
+
function Xr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}Wr.prototype.store=function(){return this.h};Wr.prototype.promise=function(){return this.g};function Yr(a){this.h=a;this.g=[]}Yr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Zr(a,b){return $r(a,b,"readwrite")}function $r(a,b,c){c=a.h.transaction([b],c);var d=new Wr(c,b);a.g.push(d);d.promise().then(function(){gb(a.g,d)},function(){gb(a.g,d)});return d};function as(a,b,c){this.h=new Yr(a);this.i=b;this.g=c}q=as.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return bs(this.i)};q.removeSegments=function(a,b){return cs(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,ds(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Yd(e)}))})};q.addManifests=function(){return bs(this.g)};
|
|
714
|
+
q.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function es(a,b,c){a=Zr(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Zr(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return cs(this,this.g,a,b)};
|
|
715
|
+
q.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,ds(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Zb(e)})))})};q.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=$r(a.h,a.g,"readonly"),c=new Map,u(d,Xr(b,function(e,f){var g;return L(function(h){if(1==h.g)return u(h,a.Zb(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.Yd=function(a){return a};q.Zb=function(a){return Promise.resolve(a)};
|
|
716
|
+
function bs(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Zr(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={tc:g.tc},k=h.next())l=k.value,g.tc=e.add(l),g.tc.onsuccess=function(n){return function(){f.push(n.tc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
|
|
717
|
+
function cs(a,b,c,d){a=Zr(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={sc:e.sc},f=c.next())e.sc=f.value,b["delete"](e.sc).onsuccess=function(g){return function(){return d(g.sc)}}(e);return a.promise()}
|
|
718
|
+
function ds(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=$r(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Rb:h.Rb,Pb:h.Pb},l=k.next())h.Pb=l.value,h.Rb=e.get(h.Pb),h.Rb.onsuccess=function(n){return function(){void 0==n.Rb.result&&g.push(n.Pb);f[n.Pb]=n.Rb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function fs(a){this.g=new Yr(a)}fs.prototype.destroy=function(){return this.g.destroy()};fs.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=$r(a.g,"session-ids","readonly"),c=[],u(d,Xr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};fs.prototype.add=function(a){var b=Zr(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
719
|
+
fs.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Zr(b.g,"session-ids"),u(d,Xr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function gs(){this.g=new Map}gs.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};gs.prototype.init=function(){var a=this;hs.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
720
|
+
function is(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Aa:d,X:f},X:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function js(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Aa:d,X:f},e)})})}
|
|
721
|
+
function ks(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function ls(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ms(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
722
|
+
function ns(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=hs,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function os(a,b){hs.set(a,b)}M("shaka.offline.StorageMuxer",gs);gs.unregister=function(a){hs["delete"](a)};gs.register=os;gs.prototype.destroy=gs.prototype.destroy;var hs=new Map;function ps(){as.apply(this,arguments)}ra(ps,as);ps.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=Zr(c.h,c.g);e=d.store();f=new sc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
|
|
723
|
+
ps.prototype.Zb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=qs(a.periods[c],e),b.push(f);return u(h,xp(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
|
|
724
|
+
function qs(a,b){rs(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return ss(e,a.startTime,b)})}
|
|
725
|
+
function ss(a,b,c){var d=a.initSegmentUri?ts(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=ts(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
726
|
+
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}ps.prototype.Yd=function(a){return{data:a.data}};function ts(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
|
|
727
|
+
function rs(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
728
|
+
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function us(){as.apply(this,arguments)}ra(us,as);
|
|
729
|
+
us.prototype.Zb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(vs(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,xp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
|
|
735
730
|
a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
|
|
736
|
-
function
|
|
737
|
-
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function
|
|
738
|
-
q.init=function(){var a=this,b=new
|
|
739
|
-
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new
|
|
740
|
-
q.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.
|
|
731
|
+
function vs(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
732
|
+
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function ws(){as.apply(this,arguments)}ra(ws,as);q=ws.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return es(this,a,b)};q.Zb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function xs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=xs.prototype;
|
|
733
|
+
q.init=function(){var a=this,b=new sc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new ps(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new us(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new us(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
|
|
734
|
+
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new ws(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new fs(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
|
|
735
|
+
q.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
|
|
741
736
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
|
|
742
|
-
q.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.
|
|
743
|
-
function
|
|
744
|
-
function
|
|
745
|
-
function
|
|
737
|
+
q.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,ys(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
|
|
738
|
+
function ys(){var a=new sc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}os("idb",function(){return td()||!window.indexedDB?null:new xs});function zs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}zs.prototype.Aa=function(){return this.i};zs.prototype.X=function(){return this.h};zs.prototype.key=function(){return this.l};zs.prototype.toString=function(){return this.j};
|
|
739
|
+
function As(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new zs(b,c,d,Number(a[4])):null};function Bs(a,b){this.h=a;this.g=b}
|
|
740
|
+
function Cs(a,b){var c=new T(null,0);c.Ja(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ds(a,d,e,c);e=b.streams.filter(function(l){return l.type==qc}).map(function(l){return Es(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Es(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
746
741
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f}}
|
|
747
|
-
function
|
|
748
|
-
e.value,g=
|
|
749
|
-
function
|
|
750
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function
|
|
751
|
-
function
|
|
752
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=
|
|
753
|
-
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
754
|
-
|
|
755
|
-
function
|
|
756
|
-
function
|
|
757
|
-
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return
|
|
758
|
-
function
|
|
759
|
-
function
|
|
760
|
-
|
|
761
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
762
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
763
|
-
return g.promise.then(h)};return
|
|
764
|
-
function
|
|
765
|
-
p,b,c,e,f),w=v.
|
|
766
|
-
function
|
|
767
|
-
v),2);d=I.h||d;z(I)})}}(w));return u(G,
|
|
768
|
-
function
|
|
769
|
-
function
|
|
770
|
-
|
|
771
|
-
case 4:return
|
|
772
|
-
function
|
|
773
|
-
r(a.imageStreams);for(w=v.next();!w.done;w=v.next())
|
|
774
|
-
|
|
775
|
-
function
|
|
776
|
-
p&&n&&(p.initData=[]);return{
|
|
777
|
-
function
|
|
778
|
-
function
|
|
779
|
-
function
|
|
780
|
-
function
|
|
781
|
-
function
|
|
782
|
-
q.list=function(){return
|
|
783
|
-
function
|
|
784
|
-
g),2);if(3!=l.g)return h=l.h,
|
|
785
|
-
function
|
|
786
|
-
function
|
|
787
|
-
tilesLayout:d.tilesLayout};
|
|
788
|
-
pendingSegmentRefId:h,dataKey:0})});return f}function
|
|
789
|
-
function
|
|
790
|
-
function
|
|
791
|
-
function
|
|
792
|
-
function
|
|
793
|
-
|
|
794
|
-
var
|
|
795
|
-
|
|
796
|
-
function
|
|
797
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
798
|
-
function
|
|
799
|
-
function
|
|
800
|
-
l=
|
|
801
|
-
n.length&&(w.audioCapabilities=n);p.length&&(w.videoCapabilities=p);
|
|
802
|
-
function
|
|
803
|
-
function
|
|
804
|
-
function
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
function
|
|
809
|
-
function
|
|
810
|
-
k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=
|
|
811
|
-
|
|
812
|
-
function
|
|
813
|
-
q.generateRequest=function(a,b){var c=this;this.g=new
|
|
814
|
-
Error("EME PatchedMediaKeysApple key error");e.errorCode=c.
|
|
815
|
-
q.update=function(a){this.
|
|
816
|
-
function
|
|
817
|
-
function
|
|
818
|
-
function
|
|
819
|
-
!0));if(e.videoCapabilities)for(h=
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
function
|
|
823
|
-
q.generateRequest=function(a,b){var c=this;this.g=new
|
|
824
|
-
function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.
|
|
825
|
-
q.update=function(a){this.
|
|
826
|
-
function
|
|
827
|
-
function
|
|
828
|
-
function
|
|
829
|
-
function
|
|
830
|
-
m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=
|
|
831
|
-
d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
832
|
-
function
|
|
833
|
-
d.g&&d.g.resolve(),d.g=null}),a.
|
|
834
|
-
function
|
|
835
|
-
q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?
|
|
836
|
-
function
|
|
837
|
-
function
|
|
838
|
-
function
|
|
839
|
-
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
840
|
-
q.has=function(a){var b
|
|
841
|
-
function
|
|
842
|
-
function
|
|
843
|
-
function
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
m=
|
|
847
|
-
p.next()){var v=
|
|
848
|
-
Number(
|
|
849
|
-
function
|
|
850
|
-
a=[];if(!w)for(var
|
|
851
|
-
c=b.next();!c.done;c=b.next())c=c.value,
|
|
852
|
-
(g=
|
|
853
|
-
function
|
|
854
|
-
f))a.backgroundColor=g;if(g=
|
|
855
|
-
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=
|
|
856
|
-
|
|
857
|
-
function
|
|
858
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&
|
|
859
|
-
function
|
|
860
|
-
function
|
|
861
|
-
function
|
|
862
|
-
function
|
|
863
|
-
function
|
|
864
|
-
var
|
|
865
|
-
{left:"line-left",center:"center",right:"line-right"},
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
[];e=
|
|
869
|
-
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");
|
|
870
|
-
/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(
|
|
871
|
-
!0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new
|
|
872
|
-
""):h=new
|
|
873
|
-
function
|
|
874
|
-
function
|
|
875
|
-
function
|
|
876
|
-
"italic";break;case "u":e.textDecoration.push("underline")}}if(
|
|
877
|
-
function
|
|
878
|
-
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
879
|
-
function
|
|
880
|
-
|
|
881
|
-
c+
|
|
882
|
-
function
|
|
883
|
-
function
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
[];b=null;e={};c=
|
|
887
|
-
function
|
|
888
|
-
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=
|
|
889
|
-
function
|
|
890
|
-
|
|
742
|
+
function Ds(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
|
|
743
|
+
e.value,g=Es(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Es(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
744
|
+
function Es(a,b,c){var d=b.segments.map(function(e){return Fs(a,e)});c.Gb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
|
|
745
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Fs(a,b){var c=new zs("segment",a.h,a.g,b.dataKey);return new ii(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Gs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
746
|
+
function Gs(a,b){var c=new zs("segment",a.h,a.g,b);return new gi(function(){return[c.toString()]},0,null)};function Hs(){this.g=null}q=Hs.prototype;q.configure=function(){};
|
|
747
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=As(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new gs;va(m);return u(m,e.init(),4);case 4:return u(m,ks(e,d.Aa(),d.X()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Bs(d.Aa(),d.X()),l=Cs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return xa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
748
|
+
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new gs,C(m,2,3),u(m,e.init(),5);case 5:return u(m,ks(e,d.Aa(),d.X()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:F(m),m.B(3)}})};
|
|
749
|
+
cg["application/x-offline-manifest"]=function(){return new Hs};function Is(){}function Js(a){var b=As(a);b&&"manifest"==b.g?(a={uri:a,oe:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ge(a)):a=b&&"segment"==b.g?Ks(b.key(),b):Ee(new N(2,1,9004,a));return a}
|
|
750
|
+
function Ks(a,b){var c=new gs;return Ge(void 0).aa(function(){return c.init()}).aa(function(){return ks(c,b.Aa(),b.X())}).aa(function(d){return d.getSegments([b.key()])}).aa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Is);Is.plugin=Js;Qe("offline",Js);function Ls(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,v=t(m),w=v.next();!w.done;w=v.next())if(w=w.value,Ms(w.info,p)){w.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Ns(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l["return"](d)}})}
|
|
751
|
+
function Ns(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new pf({lb:b,onError:function(){},Mc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,xf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,Hf(d),8);case 8:wa(f,7);break;case 6:return F(f),u(f,d.destroy(),
|
|
752
|
+
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return C(h,2),u(h,If(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
753
|
+
function Ms(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&hb(a.audioCapabilities,b.audioCapabilities,c)&&hb(a.videoCapabilities,b.videoCapabilities,c)};function Os(a,b,c){var d=b.presentationTimeline.getDuration();b=Ps(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Qs(a,b){var c=Cs(new Bs(a.Aa(),a.X()),b),d=b.appMetadata||{};c=Ps(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
754
|
+
function Ps(a){var b=[],c=fe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Xd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Yd(c.value));return b};function Rs(){this.g={}}function Ss(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Ts(a,b){a.g[b.id]=b.bandwidth||2048}function Us(a,b){var c=a.g[b];null==c&&(c=0);return c};function Vs(){this.h=[];this.g=this.i=0}function Ws(){var a=Xs,b;return L(function(c){return 1==c.g?(b=++a.i,a.g?u(c,new Promise(function(d){a.h.push(function(){a.g=b;d()})}),2):(a.g=b,c.B(2))):c["return"](b)})}Vs.prototype.release=function(a){a==this.g&&(this.g=0,0<this.h.length&&this.h.shift()())};function Ys(a){var b=this;if(a&&a.constructor!=V)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.bc()):(this.h=sk(),this.g=new Pe);this.i=[];this.j=[];var c=!a;this.l=new $e(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Qr(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return u(k,b.g.destroy(),4);
|
|
755
|
+
case 4:b.h=null,b.g=null,z(k)}})})}function Zs(){if(od())a:{var a=t(hs.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=Ys.prototype;q.destroy=function(){return this.l.destroy()};
|
|
756
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=qk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Lb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return uk(this.h,a)};q.getConfiguration=function(){var a=sk();uk(a,this.h,sk());return a};q.bc=function(){return this.g};
|
|
757
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Pr(this.g);this.j.push(f);b=$s(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,bg(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Tb(h))})},e,f);var g=new De(b,function(){return Qr(f)});g["finally"](function(){gb(d.j,f)});g.then=function(h){Lb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
|
|
758
|
+
return g.promise.then(h)};return at(this,g)};q.kf=function(){Lb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
|
|
759
|
+
function $s(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,w,x,y,D,B;return L(function(A){switch(A.g){case 1:return bt(),h=g=null,k=new gs,n=m=l=null,C(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,ct(a,b,g,e),6);case 6:p=A.h;dt(a);r=!p.presentationTimeline.T()&&!p.presentationTimeline.kb();if(!r)throw new N(2,9,9005,b);return u(A,et(a,p,function(E){n=n||E},e),7);case 7:h=A.h;dt(a);if(n)throw n;return u(A,ft(p,e),8);case 8:return u(A,k.init(),9);case 9:return dt(a),u(A,is(k),10);case 10:return l=A.h,dt(a),v=gt(h,
|
|
760
|
+
p,b,c,e,f),w=v.xf,x=v.Td,u(A,l.X.addManifests([w]),11);case 11:y=A.h;dt(a);m=y[0];dt(a);if(n)throw n;return u(A,ht(a,x,m,w,f,e,l.X,p,h),12);case 12:return dt(a),D=new zs("manifest",l.path.Aa,l.path.X,m),A["return"](Qs(D,w));case 3:return xa(A),u(A,k.destroy(),13);case 13:if(!g){A.B(14);break}return u(A,g.stop(),14);case 14:if(!h){A.B(16);break}return u(A,h.destroy(),16);case 16:ya(A,0);break;case 2:B=F(A);if(null==m){A.B(18);break}return u(A,it(m),18);case 18:throw n||B;}})}
|
|
761
|
+
function ht(a,b,c,d,e,f,g,h,k){var l,m;return L(function(n){switch(n.g){case 1:l=function(p,r){var v,w,x,y,D,B,A,E;return L(function(G){if(1==G.g){v=function(){dt(a)};w={};x=t(p);for(y=x.next();!y.done;w={pc:w.pc,Ua:w.Ua},y=x.next())w.Ua=y.value,w.pc=void 0,D=Mr(w.Ua,f),B=w.Ua.i,A=w.Ua.h,E=function(H){return function(J){H.pc=J;return Promise.resolve()}}(w),Sr(e,w.Ua.groupId,D,B,A,E),Ur(e,w.Ua.groupId,function(H){return function(){var J;return L(function(I){if(1==I.g)return J=H.Ua.g,u(I,jt(c,J,{data:H.pc},
|
|
762
|
+
v),2);d=I.h||d;z(I)})}}(w));return u(G,Vr(e),2)}if(!r)return G.B(0);dt(a);kt(h,d,k,f);return u(G,g.updateManifest(c,d),0)})};m=!1;if(!lt(h)||!m||mt(h)){n.B(2);break}return u(n,l(b.filter(function(p){return p.h}),!0),3);case 3:dt(a),b=b.filter(function(p){return!p.h});case 2:if(m){n.B(0);break}return u(n,l(b,!1),5);case 5:dt(a),z(n)}})}
|
|
763
|
+
function it(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new gs,u(f,b.init(),2);case 2:return u(f,is(b),3);case 3:return c=f.h,d=new zs("manifest",c.path.Aa,c.path.X,a),u(f,b.destroy(),4);case 4:return e=new Ys,u(f,e.remove(d.toString()),0)}})}
|
|
764
|
+
function jt(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,v,w,x,y,D,B,A;return L(function(E){switch(E.g){case 1:return e=new gs,f=Lr(b),g=!1,m=0,C(E,2,3),u(E,e.init(),5);case 5:return u(E,is(e),6);case 6:return k=E.h,u(E,k.X.addSegments([c]),7);case 7:return n=E.h,h=n[0],d(),u(E,Ws(),8);case 8:return m=E.h,d(),u(E,k.X.getManifests([a]),9);case 9:p=E.h;d();l=p[0];r=!0;v=t(l.streams);for(w=v.next();!w.done;w=v.next())for(x=w.value,y=t(x.segments),D=y.next();!D.done;D=y.next())B=D.value,B.pendingSegmentRefId==f&&
|
|
765
|
+
(B.dataKey=h,B.pendingSegmentRefId=void 0),B.pendingInitSegmentRefId==f&&(B.initSegmentKey=h,B.pendingInitSegmentRefId=void 0),B.pendingSegmentRefId&&(r=!1),B.pendingInitSegmentRefId&&(r=!1);l.size+=c.data.byteLength;r&&(l.isIncomplete=!1);return u(E,k.X.updateManifest(a,l),10);case 10:g=!0,d();case 3:return xa(E),u(E,e.destroy(),11);case 11:Xs.release(m);ya(E,4);break;case 2:return A=F(E),u(E,it(a),12);case 12:if(!k||g||!h){E.B(13);break}return u(E,k.X.removeSegments([h],function(){}),13);case 13:throw A;
|
|
766
|
+
case 4:return E["return"](l)}})}
|
|
767
|
+
function ft(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,w,x,y,D,B,A,E,G,H,J,I,K,Q,S,fa,aa;return L(function(ba){switch(ba.g){case 1:return c={width:Infinity,height:Infinity},Kd(a,b.restrictions,c),u(ba,Nd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;yd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Xd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=
|
|
768
|
+
p.value,d.push(Yd(r));v=t(a.imageStreams);for(w=v.next();!w.done;w=v.next())x=w.value,d.push(Zd(x));return u(ba,b.offline.trackSelectionCallback(d),3);case 3:y=ba.h;D=a.presentationTimeline.getDuration();B=0;A=t(y);for(E=A.next();!E.done;E=A.next())G=E.value,H=G.bandwidth*D/8,B+=H;C(ba,4);return u(ba,b.offline.downloadSizeCallback(B),6);case 6:J=ba.h;if(!J)throw new N(2,9,9014);wa(ba,5);break;case 4:I=F(ba);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:K=new Set;Q=new Set;S=new Set;fa=t(y);
|
|
769
|
+
for(E=fa.next();!E.done;E=fa.next())aa=E.value,"variant"==aa.type&&K.add(aa.id),"text"==aa.type&&Q.add(aa.id),"image"==aa.type&&S.add(aa.id);a.variants=a.variants.filter(function(Ia){return K.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return Q.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return S.has(Ia.id)});nt(a);z(ba)}})}
|
|
770
|
+
function gt(a,b,c,d,e,f){var g=Os(c,b,d),h=e.offline.progressCallback;Rr(f,function(r,v){g.size=v;h(g,r)},function(r,v){k&&e.offline.usePersistentLicense&&l==v&&Gf(a,"cenc",r)});var k=lt(b)&&!mt(b),l=null;k&&(l=ot.get(a.g.keySystem));for(var m=new Rs,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Ts(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Ss(m,n.value);m=pt(f,m,b);f=m.streams;m=m.Td;p=a.g;n=e.offline.usePersistentLicense;
|
|
771
|
+
p&&n&&(p.initData=[]);return{xf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ac(),streams:f,sessionIds:n?Mf(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Td:m}}function lt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
772
|
+
function mt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function kt(a,b,c,d){b.expiration=c.ac();c=Mf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(lt(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}q.remove=function(a){return qt(this,rt(this,a))};
|
|
773
|
+
function rt(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:bt();c=As(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new gs;va(k);return u(k,e.init(),4);case 4:return u(k,ks(e,d.Aa(),d.X()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([st(a,h,e),tt(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
774
|
+
function ut(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Oc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Oc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function st(a,b,c){return L(function(d){return u(d,vt(a.g,a.h.drm,c,b),0)})}
|
|
775
|
+
function tt(a,b,c){function d(){}var e=wt(c);Qs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Lf=function(){return qt(this,xt(this))};
|
|
776
|
+
function xt(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return bt(),b=a.g,c=a.h.drm,d=new gs,e=!1,va(n),u(n,d.init(),4);case 4:f=[],ls(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,Ls(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return xa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
|
|
777
|
+
q.list=function(){return qt(this,yt())};function yt(){var a,b,c;return L(function(d){switch(d.g){case 1:return bt(),a=[],b=new gs,va(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),js(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Qs(new zs("manifest",e.Aa,e.X,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
|
|
778
|
+
function ct(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),dt(a),u(l,c.start(b,
|
|
779
|
+
g),2);if(3!=l.g)return h=l.h,dt(a),k=zt(h),u(l,Promise.all(kf(k,function(m){return m.createSegmentIndex()})),3);dt(a);if(e)throw e;return l["return"](h)})}function et(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new pf({lb:a.g,onError:c,Mc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,uf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Hf(e),3);case 3:return u(f,Ff(e),4);case 4:return f["return"](e)}})}
|
|
780
|
+
function pt(a,b,c){var d=new Map,e=zt(c),f=new Map;e=t(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=At(a,b,c,g,d);f.set(g.id,h)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Td:Array.from(d.values())}}
|
|
781
|
+
function At(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
|
|
782
|
+
tilesLayout:d.tilesLayout};Bt(d,c.presentationTimeline.Ra(),function(g){var h=Lr(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=Us(b,d.id)*l;l=Or(a.g,l);e.set(h,new Kr(g,l,d.id,!1))}g.g&&(k=Lr(g.g),e.has(k)||(l=.5*Us(b,d.id),l=Or(a.g,l),e.set(k,new Kr(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
|
|
783
|
+
pendingSegmentRefId:h,dataKey:0})});return f}function Bt(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function dt(a){if(a.l.g)throw new N(2,9,7001);}function bt(){if(!Zs())throw new N(2,9,9E3);}function qt(a,b){return L(function(c){if(1==c.g)return a.i.push(b),va(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);xa(c);gb(a.i,b);return ya(c,0)})}function at(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){gb(a.i,c)})}
|
|
784
|
+
function wt(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
785
|
+
function vt(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=ms(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:ut(d,!1),videoCapabilities:ut(d,!0)}});return u(h,Ls(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
786
|
+
function zt(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
787
|
+
function nt(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",Ys);Ys.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new gs,va(b),u(b,ns(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};Ys.prototype.list=Ys.prototype.list;
|
|
788
|
+
Ys.prototype.removeEmeSessions=Ys.prototype.Lf;Ys.prototype.remove=Ys.prototype.remove;Ys.prototype.getStoreInProgress=Ys.prototype.kf;Ys.prototype.store=Ys.prototype.store;Ys.prototype.getNetworkingEngine=Ys.prototype.bc;Ys.prototype.getConfiguration=Ys.prototype.getConfiguration;Ys.prototype.configure=Ys.prototype.configure;Ys.prototype.destroy=Ys.prototype.destroy;Ys.support=Zs;
|
|
789
|
+
var Xs=new Vs,ot=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
|
|
790
|
+
xm.offline=Zs;function Ct(){}function Dt(a,b){for(var c={priority:b||0,Ie:a},d=0;d<Et.length;d++)if(Et[d].priority<c.priority){Et.splice(d,0,c);return}Et.push(c)}M("shaka.polyfill",Ct);Ct.register=Dt;Ct.installAll=function(){for(var a=t(Et),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Ie()}catch(c){Va("Error installing polyfill!",c)}}};var Et=[];function Ft(){}function Gt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Ht(b.value)}function Ht(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Ct.Aria=Ft;Ft.install=Gt;Dt(Gt);function It(){}function Jt(){Kt()}Ct.EncryptionScheme=It;It.install=Jt;Dt(Jt,-2);function Lt(){}
|
|
791
|
+
function Mt(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
792
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Nt);document.addEventListener("webkitfullscreenerror",Nt);document.addEventListener("mozfullscreenchange",Nt);document.addEventListener("mozfullscreenerror",Nt);document.addEventListener("MSFullscreenChange",Nt);document.addEventListener("MSFullscreenError",Nt)}}
|
|
793
|
+
function Nt(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Ct.Fullscreen=Lt;Lt.install=Mt;Dt(Mt);function Ot(){}function Pt(){}Ct.MathRound=Ot;Ot.install=Pt;Dt(Pt);function Qt(){}function Rt(){if(td()||ud()||sd("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),St=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Tt}
|
|
794
|
+
function Tt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,w,x;return L(function(y){switch(y.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return y["return"](b);if("media-source"==a.type){if(!od()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return y["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=pd(g),!h)||a.audio&&(k=a.audio.contentType,
|
|
795
|
+
l=pd(k),!l))return y["return"](b)}else return y["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,y["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(r={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(r));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));w={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
|
|
796
|
+
n.length&&(w.audioCapabilities=n);p.length&&(w.videoCapabilities=p);C(y,3);return u(y,navigator.requestMediaKeySystemAccess(m.keySystem,[w]),5);case 5:x=y.h;wa(y,4);break;case 3:F(y);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return y["return"](b)}})}Ct.MediaCapabilities=Qt;Qt.install=Rt;var St=null;Qt.originalMcap=St;Dt(Rt,-1);function Ut(){}function Vt(){var a=vd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Wt():a?(Xt(),12>=a?(Yt(),Zt()):Yt()):(sd("Tizen 2")||sd("Tizen 3")||sd("Tizen 4"))&&$t());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&au()}
|
|
797
|
+
function Yt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function Zt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Xt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
|
|
798
|
+
function $t(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Qc(b)&&a(b)}}function Wt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
|
|
799
|
+
function au(){var a=MediaSource.isTypeSupported;sd("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Ct.MediaSource=Ut;Ut.install=Vt;Dt(Vt);function bu(){}function cu(){screen.orientation||void 0!=window.orientation&&du()}function du(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new eu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new P("change");b.dispatchEvent(c)})}Ct.Orientation=bu;
|
|
800
|
+
bu.install=cu;function eu(){R.call(this);this.type="";this.angle=0}ra(eu,R);
|
|
801
|
+
eu.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
802
|
+
eu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Dt(cu);function fu(){}function gu(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=hu,window.MediaKeys=iu,window.MediaKeySystemAccess=ju,navigator.requestMediaKeySystemAccess=ku)}function ku(a,b){try{var c=new ju(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
803
|
+
function hu(a){var b=this.mediaKeys;b&&b!=a&&lu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?lu(a,this):Promise.resolve()}function mu(a){a=Gb(a.initData);if(Jb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=wc(a.subarray(4),!0);a=zc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Hb(a);this.dispatchEvent(b)}Ct.PatchedMediaKeysApple=fu;fu.install=gu;
|
|
804
|
+
function ju(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
805
|
+
k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
806
|
+
ju.prototype.createMediaKeys=function(){var a=new iu(this.keySystem);return Promise.resolve(a)};ju.prototype.getConfiguration=function(){return this.g};function iu(a){this.h=new WebKitMediaKeys(a);this.g=new bf}iu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new nu(this.h,a)};iu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
807
|
+
function lu(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.A(b,"webkitneedkey",mu);try{return pi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function nu(a){R.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new bf;this.sessionId="";this.expiration=NaN;this.closed=new sc;this.keyStatuses=new ou}ra(nu,R);q=nu.prototype;
|
|
808
|
+
q.generateRequest=function(a,b){var c=this;this.g=new sc;try{var d=this.l.createSession("video/mp4",Gb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.A(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Hb(e.message));e=new P("message",e);c.dispatchEvent(e)});this.j.A(d,"webkitkeyadded",function(){c.h&&(pu(c,"usable"),c.h.resolve(),c.h=null)});this.j.A(d,"webkitkeyerror",function(){var e=
|
|
809
|
+
Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:pu(c,"output-not-allowed");break;default:pu(c,"internal-error")}});pu(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
810
|
+
q.update=function(a){this.h=new sc;try{this.i.update(Gb(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function pu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}
|
|
811
|
+
function ou(){this.size=0;this.g=void 0}q=ou.prototype;q.forEach=function(a){this.g&&a(this.g,$f.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=$f.value();return this.g&&Eb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Dt(gu);function qu(){}function ru(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=su,window.MediaKeySystemAccess=tu,navigator.requestMediaKeySystemAccess=uu,HTMLMediaElement.prototype.setMediaKeys=vu)}function uu(a,b){try{var c=new tu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
812
|
+
function wu(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Hb(Zn(a.initData));this.dispatchEvent(b)}}Ct.PatchedMediaKeysMs=qu;qu.install=ru;
|
|
813
|
+
function tu(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
|
|
814
|
+
!0));if(e.videoCapabilities)for(h=t(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
815
|
+
tu.prototype.createMediaKeys=function(){var a=new su(this.keySystem);return Promise.resolve(a)};tu.prototype.getConfiguration=function(){return this.g};function vu(a){var b=this.mediaKeys;b&&b!=a&&xu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?xu(a,this):Promise.resolve()}function su(a){this.h=new MSMediaKeys(a);this.g=new bf}
|
|
816
|
+
su.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new yu(this.h,a)};su.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function xu(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.A(b,"msneedkey",wu);try{return pi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
|
|
817
|
+
function yu(a){R.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new bf;this.sessionId="";this.expiration=NaN;this.closed=new sc;this.keyStatuses=new zu}ra(yu,R);q=yu.prototype;
|
|
818
|
+
q.generateRequest=function(a,b){var c=this;this.g=new sc;try{this.i=this.l.createSession("video/mp4",Gb(b),null),this.j.A(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Hb(d.message));d=new P("message",d);c.dispatchEvent(d)}),this.j.A(this.i,"mskeyadded",function(){c.g?(Au(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Au(c,"usable"),c.h.resolve(),c.h=null)}),this.j.A(this.i,"mskeyerror",
|
|
819
|
+
function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Au(c,"output-not-allowed");break;default:Au(c,"internal-error")}}),Au(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
820
|
+
q.update=function(a){this.h=new sc;try{this.i.update(Gb(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Au(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}
|
|
821
|
+
function zu(){this.size=0;this.g=void 0}q=zu.prototype;q.forEach=function(a){this.g&&a(this.g,$f.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=$f.value();return this.g&&Eb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Dt(ru);function Bu(){}function Cu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Du,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Eu,window.MediaKeys=Fu,window.MediaKeySystemAccess=Gu)}function Du(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
822
|
+
function Eu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ct.PatchedMediaKeysNop=Bu;Bu.install=Cu;function Fu(){throw new TypeError("Illegal constructor.");}Fu.prototype.createSession=function(){};Fu.prototype.setServerCertificate=function(){};function Gu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Gu.prototype.getConfiguration=function(){};Gu.prototype.createMediaKeys=function(){};Dt(Cu,-10);function Hu(){}function Iu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Ju="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ku;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Lu;window.MediaKeys=Mu;window.MediaKeySystemAccess=Nu}}
|
|
823
|
+
function Ou(a){var b=Ju;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Ku(a,b){try{var c=new Nu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Lu(a){var b=this.mediaKeys;b&&b!=a&&Pu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Pu(a,this);return Promise.resolve()}Ct.PatchedMediaKeysWebkit=Hu;Hu.install=Iu;
|
|
824
|
+
function Nu(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
|
|
825
|
+
m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
|
|
826
|
+
d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Nu.prototype.createMediaKeys=function(){var a=new Mu(this.g);return Promise.resolve(a)};Nu.prototype.getConfiguration=function(){return this.h};function Mu(a){this.l=a;this.h=null;this.g=new bf;this.i=[];this.j=new Map}
|
|
827
|
+
function Pu(a,b){a.h=b;a.g.nb();var c=Ju;b&&(a.g.A(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Hb(d.initData);a.h.dispatchEvent(e)}),a.g.A(b,c+"keymessage",function(d){var e=Qu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new P("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.A(b,c+"keyadded",function(d){if(d=Qu(a,d.sessionId))Ru(d,"usable"),
|
|
828
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.A(b,c+"keyerror",function(d){var e=Qu(a,d.sessionId);e&&e.handleError(d)}))}Mu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Su(b,this.l,a);this.i.push(a);return a};Mu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
829
|
+
function Qu(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function Su(a,b,c){R.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new sc;this.keyStatuses=new Tu}ra(Su,R);q=Su.prototype;
|
|
830
|
+
q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Ru(this,"output-restricted"):1==b?Ru(this,"expired"):Ru(this,"internal-error"))};
|
|
831
|
+
function Uu(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Gb(zc("LOAD_SESSION|"+c));else{var e=zc("PERSISTENT|");d=Ic(e,b)}else d=Gb(b)}catch(g){return Promise.reject(g)}a.h=new sc;var f=Ou("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
|
|
832
|
+
function Vu(a,b,c){if(a.g)a.g.then(function(){return Vu(a,b,c)})["catch"](function(){return Vu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=vc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Ec(e.keys[0].k);e=Ec(e.keys[0].kid)}else d=Gb(c),e=null;var f=Ou("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
833
|
+
function Ru(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return Uu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Uu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new sc;Vu(this,b,a);return b};
|
|
834
|
+
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Ou("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Tu(){this.size=0;this.g=void 0}q=Tu.prototype;q.forEach=function(a){this.g&&a(this.g,$f.value())};q.get=function(a){if(this.has(a))return this.g};
|
|
835
|
+
q.has=function(a){var b=$f.value();return this.g&&Eb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Ju="";Dt(Iu);function Wu(){}function Xu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Yu,Object.defineProperty(a,"disablePictureInPicture",{get:Zu,set:$u,enumerable:!0,configurable:!0}),document.exitPictureInPicture=av,document.addEventListener("webkitpresentationmodechanged",bv,!0))}}
|
|
836
|
+
function bv(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
837
|
+
function Yu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function av(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
838
|
+
function Zu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function $u(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ct.PiPWebkit=Wu;Wu.install=Xu;Dt(Xu);function cv(){}function dv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=ev))}function ev(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Ct.RandomUUID=cv;cv.install=dv;Dt(dv);function fv(){}function gv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=hv)}function hv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ct.StorageEstimate=fv;fv.install=gv;Dt(gv);function iv(){}function jv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:kv})}function kv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Ct.Symbol=iv;iv.install=jv;Dt(jv);function lv(){}function mv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Ct.VideoPlayPromise=lv;lv.install=mv;Dt(mv);function nv(){}function ov(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=pv)}}function pv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ct.VideoPlaybackQuality=nv;nv.install=ov;Dt(ov);function qv(){}function rv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=sv;else if(6==b)a=tv;else{try{var c=!!sv(1,2,"")}catch(d){c=!1}c&&(a=sv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function sv(a,b,c){return new window.TextTrackCue(a,b,c)}function tv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ct.VTTCue=qv;qv.install=rv;Dt(rv);function uv(){}uv.prototype.parseInit=function(){};uv.prototype.parseMedia=function(a,b){var c=null,d=[],e=vc(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=vv.exec(f))){var g=wv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new jb(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",uv);uv.prototype.parseMedia=uv.prototype.parseMedia;
|
|
839
|
+
uv.prototype.parseInit=uv.prototype.parseInit;var vv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,wv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Uc["application/x-subtitle-lrc"]=function(){return new uv};function xv(){}xv.prototype.parseInit=function(){};
|
|
840
|
+
xv.prototype.parseMedia=function(a,b){var c=vc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=go(g,yv,"frameRate"),k=go(g,yv,"subFrameRate"),l=go(g,yv,"frameRateMultiplier"),
|
|
841
|
+
m=go(g,yv,"tickRate"),n=go(g,yv,"cellResolution");c=g.getAttribute("xml:space")||"default";e=go(g,zv,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Av(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?eo(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=t(g),r=p.next();!r.done;r=
|
|
842
|
+
p.next()){var v=r.value;r=new lb;var w=v.getAttribute("xml:id");if(w){r.id=w;var x=null;e&&(x=Bv.exec(e)||Cv.exec(e));w=x?Number(x[1]):null;x=x?Number(x[2]):null;var y,D;if(y=Dv(v,l,"extent"))y=(D=Bv.exec(y))||Cv.exec(y),null!=y&&(r.width=Number(y[1]),r.height=Number(y[2]),D||(null!=w&&(r.width=100*r.width/w),null!=x&&(r.height=100*r.height/x)),r.widthUnits=D||null!=w?Bb:0,r.heightUnits=D||null!=x?Bb:0);if(v=Dv(v,l,"origin"))y=(D=Bv.exec(v))||Cv.exec(v),null!=y&&(r.viewportAnchorX=Number(y[1]),r.viewportAnchorY=
|
|
843
|
+
Number(y[2]),D||(null!=x&&(r.viewportAnchorY=100*r.viewportAnchorY/x),null!=w&&(r.viewportAnchorX=100*r.viewportAnchorX/w)),r.viewportAnchorUnits=D||null!=w?Bb:0)}else r=null;r&&m.push(r)}if(ao(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(ao(f,"div"));for(p=e.next();!p.done;p=e.next())if(ao(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Ev(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
|
|
844
|
+
function Ev(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var r=null,v=t(Fv),w=v.next();!w.done&&!(r=Gv(p,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=m;if("p"==a.nodeName||r)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));w=Array.from(p.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
|
|
845
|
+
a=[];if(!w)for(var x=t(p.childNodes),y=x.next();!y.done;y=x.next())(y=Ev(y.value,b,c,d,e,f,g,h,k,p,m))&&a.push(y);d=null!=l;x=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||x||"br"==p.tagName||0!=a.length||d&&!h))return null;y=Hv(p,c);x=y.start;for(y=y.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)y=Iv(n,c,x,y),x=y.start,y=y.end,n=n.parentNode;null==x&&(x=0);x+=b;y=null==y?Infinity:y+b;if(!D&&0<a.length)for(x=Infinity,y=0,b=t(a),
|
|
846
|
+
c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),y=Math.max(y,c.endTime);if("br"==p.tagName)return e=new jb(x,y,""),e.lineBreak=!0,e;b="";w&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new jb(x,y,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Gv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==B})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
|
|
847
|
+
(g=Gv(l,"region",f,"")[0]);Jv(b,p,g,r,e,v,0==a.length);return b}
|
|
848
|
+
function Jv(a,b,c,d,e,f,g){f=f||g;"rtl"==Kv(b,c,e,"direction",f)&&(a.direction="rtl");g=Kv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=kb);(g=Kv(b,c,e,"textAlign",!0))?(a.positionAlign=Lv[g],a.lineAlign=Mv[g],a.textAlign=vb[g.toUpperCase()]):a.textAlign=nb;if(g=Kv(b,c,e,"displayAlign",!0))a.displayAlign=wb[g.toUpperCase()];if(g=Kv(b,c,e,"color",f))a.color=g;if(g=Kv(b,c,e,"backgroundColor",
|
|
849
|
+
f))a.backgroundColor=g;if(g=Kv(b,c,e,"border",f))a.border=g;if(g=Kv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Kv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Kv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Kv(b,c,e,"lineHeight",f))&&g.match(Nv)&&(a.lineHeight=g);(g=Kv(b,c,e,"fontSize",f))&&(g.match(Nv)||g.match(Ov))&&(a.fontSize=g);if(g=Kv(b,c,e,"fontStyle",f))a.fontStyle=Ab[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
|
|
850
|
+
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=Kv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(Nv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Nv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Kv(b,c,e,"letterSpacing",f))&&d.match(Nv)&&(a.letterSpacing=d);(d=Kv(b,c,e,"linePadding",f))&&d.match(Nv)&&(a.linePadding=d);if(f=Kv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Dv(c,e,"textDecoration"))&&Pv(a,c);(b=
|
|
851
|
+
Qv(b,e,"textDecoration"))&&Pv(a,b)}
|
|
852
|
+
function Pv(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&gb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&gb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
853
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&gb(a.textDecoration,"overline")}}function Kv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Qv(a,c,d))?a:e?Dv(b,c,d):null}function Dv(a,b,c){if(!a)return null;var d=go(a,zv,c);return d?d:Rv(a,b,c)}function Qv(a,b,c){var d=go(a,zv,c);return d?d:Rv(a,b,c)}
|
|
854
|
+
function Rv(a,b,c){a=Gv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=fo(a[e],"urn:ebu:tt:style",c);f||(f=go(a[e],zv,c));f||(f=Qv(a[e],b,c));f&&(d=f)}return d}
|
|
855
|
+
function Gv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?fo(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Iv(a,b,c,d){a=Hv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
|
|
856
|
+
function Hv(a,b){var c=Sv(a.getAttribute("begin"),b),d=Sv(a.getAttribute("end"),b),e=Sv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
|
|
857
|
+
function Sv(a,b){var c=null;if(Tv.test(a)){c=Tv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(Uv.test(a))c=Vv(Uv,a);else if(Wv.test(a))c=Vv(Wv,a);else if(Xv.test(a))c=Xv.exec(a),c=Number(c[1])/b.frameRate;else if(Yv.test(a))c=Yv.exec(a),c=Number(c[1])/b.g;else if(Zv.test(a))c=Vv(Zv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
858
|
+
function Vv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",xv);xv.prototype.parseMedia=xv.prototype.parseMedia;xv.prototype.parseInit=xv.prototype.parseInit;function Av(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
859
|
+
var Bv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Ov=/^(\d{1,2}(?:\.\d+)?|100)%$/,Nv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Cv=/^(\d+)px (\d+)px$/,Tv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Uv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Wv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Xv=/^(\d*(?:\.\d*)?)f$/,Yv=/^(\d*(?:\.\d*)?)t$/,Zv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Mv={left:qb,center:"center",right:"end",start:qb,
|
|
860
|
+
end:"end"},Lv={left:"line-left",center:"center",right:"line-right"},yv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],zv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Fv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Uc["application/ttml+xml"]=function(){return new xv};function $v(){this.g=new xv}$v.prototype.parseInit=function(a){var b=!1;(new jg).box("moov",ng).box("trak",ng).box("mdia",ng).box("minf",ng).box("stbl",ng).R("stsd",pg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};$v.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new jg).box("mdat",qg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};M("shaka.text.Mp4TtmlParser",$v);$v.prototype.parseMedia=$v.prototype.parseMedia;
|
|
861
|
+
$v.prototype.parseInit=$v.prototype.parseInit;Uc['application/mp4; codecs="stpp"']=function(){return new $v};Uc['application/mp4; codecs="stpp.ttml"']=function(){return new $v};Uc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new $v};Uc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new $v};function aw(){}aw.prototype.parseInit=function(){};
|
|
862
|
+
aw.prototype.parseMedia=function(a,b){var c=vc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=bw(new tq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
|
|
863
|
+
[];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new tq(g);var h=new lb;wq(g);uq(g);for(var k=wq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
|
|
864
|
+
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");uq(g);k=wq(g)}f.push(h)}e=new Map;cw(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new jb(0,0,"");for(var n=!1,p=0;p<k.length;p++){var r=
|
|
865
|
+
/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(r){var v=r[2].trim().replace(";","");switch(r[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=tb;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
|
|
866
|
+
!0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new tq(h[0]);m=bw(k);r=vq(k,/[ \t]+--\x3e[ \t]+/g);n=bw(k);if(null==m||null==r||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
|
|
867
|
+
""):h=new jb(m,n,"");dw(p,h,e);uq(k);for(m=wq(k);m;)ew(h,m,f),uq(k),m=wq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function cw(a){for(var b=t(Object.entries(yb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new jb(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(zb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new jb(0,0,""),e.backgroundColor=d,a.set(c,e)}
|
|
868
|
+
function dw(a,b,c){0===c.size&&cw(c);a=fw(a);var d=so("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())gw(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
|
|
869
|
+
function fw(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function hw(a,b){return a&&0<a.length?a:b}
|
|
870
|
+
function gw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=hw(h.backgroundColor,e.backgroundColor),e.color=hw(h.color,e.color),e.fontFamily=hw(h.fontFamily,e.fontFamily),e.fontSize=hw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
|
|
871
|
+
"italic";break;case "u":e.textDecoration.push("underline")}}if(io(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())gw(a.value,e,c,d)}
|
|
872
|
+
function ew(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=nb:a.textAlign=vb[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
|
|
873
|
+
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=iw(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=xb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=pb,a.line=Number(c[1]),c[2]&&(a.lineAlign=xb[c[2].toUpperCase()])}function iw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
|
|
874
|
+
function bw(a){a=vq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",aw);aw.prototype.parseMedia=aw.prototype.parseMedia;aw.prototype.parseInit=aw.prototype.parseInit;Uc["text/vtt"]=function(){return new aw};Uc['text/vtt; codecs="vtt"']=function(){return new aw};Uc['text/vtt; codecs="wvtt"']=function(){return new aw};function jw(){this.g=null}jw.prototype.parseInit=function(a){var b=this,c=!1;(new jg).box("moov",ng).box("trak",ng).box("mdia",ng).R("mdhd",function(d){d=Ah(d.reader,d.version);b.g=d.timescale}).box("minf",ng).box("stbl",ng).R("stsd",pg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
|
|
875
|
+
jw.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new jg).box("moof",ng).box("traf",ng).R("tfdt",function(A){g=!0;c=zh(A.reader,A.version).kd}).R("tfhd",function(A){l=yh(A.reader,A.flags).be}).R("trun",function(A){h=!0;d=Bh(A.reader,A.version,A.flags).se}).box("mdat",qg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new gg(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var v=r.Kd||l,w=r.Qc?
|
|
876
|
+
c+r.Qc:m;m=w+(v||0);var x=0;do{var y=n.M();x+=y;var D=n.M(),B=null;"vttc"==rg(D)?8<y&&(B=n.$a(y-8)):n.skip(y-8);v&&B&&(y=kw(B,b.periodStart+w/this.g,b.periodStart+m/this.g),f.push(y))}while(r.sampleSize&&x<r.sampleSize)}return f.filter(Rb)};function kw(a,b,c){var d,e,f;(new jg).box("payl",qg(function(g){d=vc(g)})).box("iden",qg(function(g){e=vc(g)})).box("sttg",qg(function(g){f=vc(g)})).parse(a);return d?lw(d,e,f,b,c):null}
|
|
877
|
+
function lw(a,b,c,d,e){d=new jb(d,e,"");dw(a,d,new Map);b&&(d.id=b);if(c)for(a=new tq(c),b=wq(a);b;)ew(d,b,[]),uq(a),b=wq(a);return d}M("shaka.text.Mp4VttParser",jw);jw.prototype.parseMedia=jw.prototype.parseMedia;jw.prototype.parseInit=jw.prototype.parseInit;Uc['application/mp4; codecs="wvtt"']=function(){return new jw};function mw(){}mw.prototype.parseInit=function(){};mw.prototype.parseMedia=function(a){var b=vc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new tq(c[0]),e=nw(d),f=vq(d,/,/g);d=nw(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new jb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
878
|
+
function nw(a){a=vq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",mw);mw.prototype.parseMedia=mw.prototype.parseMedia;mw.prototype.parseInit=mw.prototype.parseInit;Uc["text/x-subviewer"]=function(){return new mw};function ow(){this.g=new aw}ow.prototype.parseInit=function(){};ow.prototype.parseMedia=function(a,b){var c=vc(a);c=pw(c);c=Gb(zc(c));return this.g.parseMedia(c,b)};function pw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",ow);ow.srt2webvtt=pw;ow.prototype.parseMedia=ow.prototype.parseMedia;
|
|
879
|
+
ow.prototype.parseInit=ow.prototype.parseInit;Uc["text/srt"]=function(){return new ow};function qw(){}qw.prototype.parseInit=function(){};
|
|
880
|
+
qw.prototype.parseMedia=function(a){var b="",c="";a=vc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=rw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=sw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(tw);else if("Style"==e){e=f.split(tw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
881
|
+
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={gd:e.gd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=sw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(tw);else if("Dialogue"==f){g=g.split(tw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=uw(f.Start);var k=uw(f.End);g=new jb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.gd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.gd}}(e)))&&vw(g,f);d.push(g)}return d};
|
|
882
|
+
function vw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=ww(c))a.color=c;if(c=b.BackColour)if(c=ww(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=rb;a.textAlign="start";break;case 2:a.displayAlign=rb;a.textAlign=nb;break;case 3:a.displayAlign=rb;a.textAlign="end";
|
|
883
|
+
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=nb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=nb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
|
|
884
|
+
function ww(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function uw(a){a=xw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",qw);qw.prototype.parseMedia=qw.prototype.parseMedia;qw.prototype.parseInit=qw.prototype.parseInit;var rw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,sw=/^\s*([^:]+):\s*(.*)/,tw=/\s*,\s*/,xw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
|
|
885
|
+
Uc["text/x-ssa"]=function(){return new qw};/*
|
|
891
886
|
@license
|
|
892
887
|
EME Encryption Scheme Polyfill
|
|
893
888
|
Copyright 2019 Google LLC
|
|
894
889
|
SPDX-License-Identifier: Apache-2.0
|
|
895
890
|
*/
|
|
896
|
-
function
|
|
897
|
-
function
|
|
891
|
+
function yw(){}var zw;function Aw(){zw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(zw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Bw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
892
|
+
function Bw(a,b){var c=this,d;return L(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,zw.call(c,a,b),2);d=e.h;if(Cw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=zw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Dw;return e["return"](Dw.call(c,
|
|
898
893
|
a,b))})}
|
|
899
|
-
function
|
|
900
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(
|
|
901
|
-
function
|
|
902
|
-
function
|
|
903
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
904
|
-
function
|
|
905
|
-
new
|
|
906
|
-
v);l=p;m=k;return u(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}M("McEncryptionSchemePolyfill",
|
|
907
|
-
|
|
908
|
-
function
|
|
909
|
-
function
|
|
894
|
+
function Dw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return L(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Ew(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Fw(h.videoCapabilities,d),l=Fw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
895
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(r,zw.call(c,a,e),2)}p=r.h;return r["return"](new Gw(p,d))})}function Fw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",yw);yw.install=Aw;function Hw(){}var Iw;
|
|
896
|
+
function Jw(){Iw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Iw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Kw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
897
|
+
function Kw(a){var b=this,c,d;return L(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,Iw.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Cw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Iw,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
898
|
+
navigator.mediaCapabilities.decodingInfo=Lw;return e["return"](Lw.call(b,a))})}
|
|
899
|
+
function Lw(a){var b=this,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Ew(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,Iw.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
900
|
+
new Gw(k.keySystemAccess,c);n.B(3);break}if(!a.keySystemConfiguration){n.B(3);break}var p=a.keySystemConfiguration,r=[],v=[];p.audio&&r.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};r.length&&(p.audioCapabilities=r);v.length&&(p.videoCapabilities=
|
|
901
|
+
v);l=p;m=k;return u(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}M("McEncryptionSchemePolyfill",Hw);Hw.install=Jw;function Gw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
902
|
+
Gw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Gw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
903
|
+
function Ew(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Cw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function Mw(){}
|
|
904
|
+
function Kt(){Aw();Jw()}M("EncryptionSchemePolyfills",Mw);Mw.install=Kt;"undefined"!==typeof module&&module.exports&&(module.exports=Mw);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
910
905
|
|
|
911
906
|
//# sourceMappingURL=shaka-player.compiled.map
|