Version Description
2017/12/05 =
Compatiblity - improving old Samsung phone detection for warning messages
Database - PHP 5.2 compatibility fixes
Database - schema changes for better compatibility (maximum row size error)
MPEG-DASH - upgrading Dash.js to 2.8.0
Download this release
Release Info
Developer | FolioVision |
Plugin | FV Flowplayer Video Player |
Version | 7.3.3.727 |
Comparing to | |
See all releases |
Code changes from version 7.2.8.727 to 7.3.3.727
- controller/backend.php +13 -8
- controller/editor.php +20 -5
- controller/frontend.php +17 -1
- controller/settings.php +22 -0
- controller/shortcodes.php +14 -6
- css/admin.css +8 -1
- css/flowplayer.css +32 -24
- css/list-view.css +23 -0
- css/shortcode-editor.css +12 -2
- flowplayer.php +15 -2
- flowplayer/flowplayer.dashjs.min.js +18 -18
- flowplayer/fv-flowplayer.min.js +63 -68
- flowplayer/hls.min.js +0 -0
controller/backend.php
CHANGED
@@ -126,11 +126,7 @@ function fv_wp_flowplayer_check_template() {
|
|
126 |
$output = array( 'errors' => $errors, 'ok' => $ok/*, 'html' => $response['body'] */);
|
127 |
echo '<FVFLOWPLAYER>'.json_encode($output).'</FVFLOWPLAYER>';
|
128 |
}
|
129 |
-
}
|
130 |
-
|
131 |
-
if( stripos( $response['body'], '/html5.js') === FALSE && stripos( $response['body'], '/html5shiv.js') === FALSE ) {
|
132 |
-
$errors[] = 'html5.js not found in your template! Videos might not play in old browsers, like Internet Explorer 6-8. Please follow our instructions <a href="https://foliovision.com/player/installation#html5js">here</a>.';
|
133 |
-
}
|
134 |
|
135 |
$ok[] = __('We also recommend you to open any of your videos on your site and see if you get a red warning message about JavaScript not working.', 'fv-wordpress-flowplayer');
|
136 |
|
@@ -701,6 +697,15 @@ function fv_player_admin_notice_expired_license() {
|
|
701 |
}
|
702 |
|
703 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
704 |
add_action( 'admin_notices', 'fv_player_rollback' );
|
705 |
|
706 |
function fv_player_rollback() {
|
@@ -725,13 +730,13 @@ function fv_player_rollback() {
|
|
725 |
if( stripos($plugin,'fv-wordpress-flowplayer') === 0 && stripos($plugin,'/flowplayer.php') !== false ) {
|
726 |
$plugin_slug = $plugin;
|
727 |
}
|
728 |
-
}
|
729 |
|
730 |
$plugin_transient = get_site_transient( 'update_plugins' );
|
731 |
$plugin_folder = plugin_basename( dirname( $plugin_slug ) );
|
732 |
$plugin_file = basename( $plugin_slug );
|
733 |
-
$version
|
734 |
-
$url = 'https://downloads.wordpress.org/plugin/fv-wordpress-flowplayer.
|
735 |
$temp_array = array(
|
736 |
'slug' => $plugin_folder,
|
737 |
'new_version' => $version,
|
126 |
$output = array( 'errors' => $errors, 'ok' => $ok/*, 'html' => $response['body'] */);
|
127 |
echo '<FVFLOWPLAYER>'.json_encode($output).'</FVFLOWPLAYER>';
|
128 |
}
|
129 |
+
}
|
|
|
|
|
|
|
|
|
130 |
|
131 |
$ok[] = __('We also recommend you to open any of your videos on your site and see if you get a red warning message about JavaScript not working.', 'fv-wordpress-flowplayer');
|
132 |
|
697 |
}
|
698 |
|
699 |
|
700 |
+
/*
|
701 |
+
* DB based player data saving
|
702 |
+
*/
|
703 |
+
global $FV_Player_Db;
|
704 |
+
|
705 |
+
// these have to be here, as using them in constructor doesn't work
|
706 |
+
add_filter('heartbeat_received', array($FV_Player_Db, 'check_db_edit_lock'), 10, 2);
|
707 |
+
|
708 |
+
|
709 |
add_action( 'admin_notices', 'fv_player_rollback' );
|
710 |
|
711 |
function fv_player_rollback() {
|
730 |
if( stripos($plugin,'fv-wordpress-flowplayer') === 0 && stripos($plugin,'/flowplayer.php') !== false ) {
|
731 |
$plugin_slug = $plugin;
|
732 |
}
|
733 |
+
}
|
734 |
|
735 |
$plugin_transient = get_site_transient( 'update_plugins' );
|
736 |
$plugin_folder = plugin_basename( dirname( $plugin_slug ) );
|
737 |
$plugin_file = basename( $plugin_slug );
|
738 |
+
$version = isset($_GET['version']) ? $_GET['version'] : '6.6.6';
|
739 |
+
$url = 'https://downloads.wordpress.org/plugin/fv-wordpress-flowplayer.'.$version.'.zip';
|
740 |
$temp_array = array(
|
741 |
'slug' => $plugin_folder,
|
742 |
'new_version' => $version,
|
controller/editor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
add_action( 'admin_enqueue_scripts', 'fv_player_shortcode_editor_scripts' );
|
4 |
|
5 |
function fv_player_shortcode_editor_scripts( $page ) {
|
6 |
-
if( $page !== 'post.php' && $page !== 'post-new.php' && ( empty($_GET['page']) || $_GET['page'] != 'fvplayer' ) ) {
|
7 |
return;
|
8 |
}
|
9 |
|
@@ -21,6 +21,12 @@ function fv_player_shortcode_editor_scripts_enqueue() {
|
|
21 |
wp_register_script('fvwpflowplayer-shortcode-editor', flowplayer::get_plugin_url().'/js/shortcode-editor.js',array('jquery','jquery-ui-sortable'), $fv_wp_flowplayer_ver );
|
22 |
wp_register_script('fvwpflowplayer-shortcode-editor-old', flowplayer::get_plugin_url().'/js/shortcode-editor.old.js',array('jquery'), $fv_wp_flowplayer_ver );
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
global $fv_fp;
|
25 |
if( isset($fv_fp->conf["interface"]['shortcode_editor_old']) && $fv_fp->conf["interface"]['shortcode_editor_old'] == 'true' ) {
|
26 |
wp_enqueue_script('fvwpflowplayer-shortcode-editor-old');
|
@@ -169,12 +175,21 @@ function fv_wp_flowplayer_featured_image($post_id) {
|
|
169 |
return;
|
170 |
}
|
171 |
|
172 |
-
$
|
173 |
-
|
174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
}
|
176 |
|
177 |
-
|
|
|
|
|
178 |
if($thumbnail_id){
|
179 |
set_post_thumbnail($post_id, $thumbnail_id);
|
180 |
}
|
3 |
add_action( 'admin_enqueue_scripts', 'fv_player_shortcode_editor_scripts' );
|
4 |
|
5 |
function fv_player_shortcode_editor_scripts( $page ) {
|
6 |
+
if( $page !== 'post.php' && $page !== 'post-new.php' && ( empty($_GET['page']) || ($_GET['page'] != 'fvplayer' && $_GET['page'] != 'fv_player') ) ) {
|
7 |
return;
|
8 |
}
|
9 |
|
21 |
wp_register_script('fvwpflowplayer-shortcode-editor', flowplayer::get_plugin_url().'/js/shortcode-editor.js',array('jquery','jquery-ui-sortable'), $fv_wp_flowplayer_ver );
|
22 |
wp_register_script('fvwpflowplayer-shortcode-editor-old', flowplayer::get_plugin_url().'/js/shortcode-editor.old.js',array('jquery'), $fv_wp_flowplayer_ver );
|
23 |
|
24 |
+
wp_localize_script( 'fvwpflowplayer-shortcode-editor', 'fv_player_editor_conf', array(
|
25 |
+
'db_import_nonce' => wp_create_nonce( "fv-player-db-import-".get_current_user_id() ),
|
26 |
+
'db_load_nonce' => wp_create_nonce( "fv-player-db-load-".get_current_user_id() ),
|
27 |
+
'preview_nonce' => wp_create_nonce( "fv-player-preview-".get_current_user_id() )
|
28 |
+
) );
|
29 |
+
|
30 |
global $fv_fp;
|
31 |
if( isset($fv_fp->conf["interface"]['shortcode_editor_old']) && $fv_fp->conf["interface"]['shortcode_editor_old'] == 'true' ) {
|
32 |
wp_enqueue_script('fvwpflowplayer-shortcode-editor-old');
|
175 |
return;
|
176 |
}
|
177 |
|
178 |
+
$url = false;
|
179 |
+
|
180 |
+
if( preg_match('/(?:splash=\\\?")([^"]*.(?:jpg|gif|png))/', $post->post_content, $splash) ) {
|
181 |
+
$url = $splash[1];
|
182 |
+
} else if( preg_match('/\[fvplayer.*?id="(\d+)/', $post->post_content, $id) ) {
|
183 |
+
global $FV_Player_Db;
|
184 |
+
$atts = $FV_Player_Db->getPlayerAttsFromDb( array( 'id' => $id[1] ) );
|
185 |
+
if( !empty($atts['splash']) ) {
|
186 |
+
$url = $atts['splash'];
|
187 |
+
}
|
188 |
}
|
189 |
|
190 |
+
if( !$url ) return;
|
191 |
+
|
192 |
+
$thumbnail_id = fv_wp_flowplayer_save_to_media_library($url, $post_id);
|
193 |
if($thumbnail_id){
|
194 |
set_post_thumbnail($post_id, $thumbnail_id);
|
195 |
}
|
controller/frontend.php
CHANGED
@@ -386,7 +386,23 @@ function flowplayer_prepare_scripts() {
|
|
386 |
|
387 |
if( $fv_fp->_get_option('googleanalytics') ) {
|
388 |
$aConf['analytics'] = $fv_fp->_get_option('googleanalytics');
|
389 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
|
391 |
wp_localize_script( 'flowplayer', 'fv_flowplayer_conf', $aConf );
|
392 |
if( current_user_can('manage_options') ) {
|
386 |
|
387 |
if( $fv_fp->_get_option('googleanalytics') ) {
|
388 |
$aConf['analytics'] = $fv_fp->_get_option('googleanalytics');
|
389 |
+
}
|
390 |
+
|
391 |
+
$aConf['hlsjs'] = array(
|
392 |
+
'startLevel' => -1,
|
393 |
+
'fragLoadingMaxRetry' => 3,
|
394 |
+
'levelLoadingMaxRetry' => 3,
|
395 |
+
'capLevelToPlayerSize' => true
|
396 |
+
);
|
397 |
+
|
398 |
+
// The above HLS.js config doesn't work well on Chrome and Firefox, so we detect that in JS and use this config for it instead. Todo: make this a per-video thing
|
399 |
+
if( class_exists('FV_Player_Pro_DaCast') ) {
|
400 |
+
$aConf['dacast_hlsjs'] = array(
|
401 |
+
'autoLevelEnabled' => false // disable ABR. If you set startLevel or capLevelToPlayerSize it will be enabled again. So this way everybody on desktop gets top quality and they have to switch to lower each time.
|
402 |
+
);
|
403 |
+
}
|
404 |
+
|
405 |
+
$aConf = apply_filters( 'fv_flowplayer_conf', $aConf );
|
406 |
|
407 |
wp_localize_script( 'flowplayer', 'fv_flowplayer_conf', $aConf );
|
408 |
if( current_user_can('manage_options') ) {
|
controller/settings.php
CHANGED
@@ -153,6 +153,18 @@ function fv_player_admin_pointer_boxes() {
|
|
153 |
);
|
154 |
}
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
if( $fv_fp->_get_option('nag_fv_player_7') ) {
|
157 |
$fv_fp->pointer_boxes['fv_flowplayer_fv_player_7'] = array(
|
158 |
'id' => '#wp-admin-bar-new-content',
|
@@ -234,6 +246,16 @@ function fv_wp_flowplayer_pointers_ajax() {
|
|
234 |
die();
|
235 |
}
|
236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_fv_player_7' && isset($_POST['value']) ) {
|
238 |
check_ajax_referer('fv_flowplayer_fv_player_7');
|
239 |
$conf = get_option( 'fvwpflowplayer' );
|
153 |
);
|
154 |
}
|
155 |
|
156 |
+
if( !$fv_fp->_get_option('notice_db') ) {
|
157 |
+
$fv_fp->pointer_boxes['fv_flowplayer_db'] = array(
|
158 |
+
'id' => '#wp-admin-bar-new-content',
|
159 |
+
'pointerClass' => 'fv_flowplayer_db',
|
160 |
+
'heading' => __('FV Player database storage is here!', 'fv-wordpress-flowplayer'),
|
161 |
+
'content' => __("<p>Any new or updated FV Player instances will be stored in database. This simplifies the shortcodes and increases FV Player reliability. You can read the full announcement <a href='https://foliovision.com/2018/11/video-database/' target='_blank'>here</a></p><p>Please <a href='https://foliovision.com/support/fv-wordpress-flowplayer/bug-reports#new-post' target='_blank'>let us know</a> in case you notice any issues. Advanced users can keep using the old shortcodes, but from now on the FV Player editor works with database only.</p>", 'fv-wordpress-flowplayer'),
|
162 |
+
'position' => array( 'edge' => 'top', 'align' => 'center' ),
|
163 |
+
'button1' => __('Acknowledge', 'fv-wordpress-flowplayer'),
|
164 |
+
'button2' => '<style>.fv_flowplayer_db .button-secondary { display: none }</style>'
|
165 |
+
);
|
166 |
+
}
|
167 |
+
|
168 |
if( $fv_fp->_get_option('nag_fv_player_7') ) {
|
169 |
$fv_fp->pointer_boxes['fv_flowplayer_fv_player_7'] = array(
|
170 |
'id' => '#wp-admin-bar-new-content',
|
246 |
die();
|
247 |
}
|
248 |
|
249 |
+
if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_db' && isset($_POST['value']) ) {
|
250 |
+
check_ajax_referer('fv_flowplayer_db');
|
251 |
+
$conf = get_option( 'fvwpflowplayer' );
|
252 |
+
if( $conf ) {
|
253 |
+
$conf['notice_db'] = 'true';
|
254 |
+
update_option( 'fvwpflowplayer', $conf );
|
255 |
+
}
|
256 |
+
die();
|
257 |
+
}
|
258 |
+
|
259 |
if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_fv_player_7' && isset($_POST['value']) ) {
|
260 |
check_ajax_referer('fv_flowplayer_fv_player_7');
|
261 |
$conf = get_option( 'fvwpflowplayer' );
|
controller/shortcodes.php
CHANGED
@@ -28,8 +28,8 @@ add_shortcode('fv_time','fv_player_time');
|
|
28 |
|
29 |
function flowplayer_content_handle( $atts, $content = null, $tag = false ) {
|
30 |
global $fv_fp;
|
31 |
-
if( !$fv_fp ) return false;
|
32 |
-
|
33 |
if( $fv_fp->_get_option('parse_commas') && strcmp($tag,'flowplayer') == 0 ) {
|
34 |
|
35 |
if( !isset( $atts['src'] ) ) {
|
@@ -157,8 +157,15 @@ function flowplayer_content_handle( $atts, $content = null, $tag = false ) {
|
|
157 |
if( $arguments['post'] == 'this' ) {
|
158 |
$arguments['post'] = get_the_ID();
|
159 |
}
|
160 |
-
|
161 |
-
if( intval($arguments['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
$objVideoQuery = new WP_Query( array( 'post_type' => 'attachment', 'post_status' => 'inherit', 'post_parent' => intval($post), 'post_mime_type' => 'video' ) );
|
163 |
if( $objVideoQuery->have_posts() ) {
|
164 |
$sHTML = '';
|
@@ -174,7 +181,7 @@ function flowplayer_content_handle( $atts, $content = null, $tag = false ) {
|
|
174 |
}
|
175 |
if( strlen($aArgs['caption']) ) {
|
176 |
$aArgs['caption'] = apply_filters( 'fv_player_caption', $aArgs['caption'], false );
|
177 |
-
}
|
178 |
|
179 |
$new_player = $fv_fp->build_min_player( $aArgs['src'],$aArgs );
|
180 |
$sHTML .= $new_player['html'];
|
@@ -185,11 +192,12 @@ function flowplayer_content_handle( $atts, $content = null, $tag = false ) {
|
|
185 |
|
186 |
} else if( $arguments['src'] != '' || ( ( ( strlen($fv_fp->conf['rtmp']) && $fv_fp->conf['rtmp'] != 'false' ) || strlen($arguments['rtmp'])) && strlen($arguments['rtmp_path']) ) ) {
|
187 |
// build new player
|
188 |
-
$new_player = $fv_fp->build_min_player($arguments['src'],$arguments);
|
189 |
if (!empty($new_player['script'])) {
|
190 |
$GLOBALS['fv_fp_scripts'] = $new_player['script'];
|
191 |
}
|
192 |
return $new_player['html'];
|
|
|
193 |
}
|
194 |
return false;
|
195 |
}
|
28 |
|
29 |
function flowplayer_content_handle( $atts, $content = null, $tag = false ) {
|
30 |
global $fv_fp;
|
31 |
+
if( !$fv_fp ) return false;
|
32 |
+
|
33 |
if( $fv_fp->_get_option('parse_commas') && strcmp($tag,'flowplayer') == 0 ) {
|
34 |
|
35 |
if( !isset( $atts['src'] ) ) {
|
157 |
if( $arguments['post'] == 'this' ) {
|
158 |
$arguments['post'] = get_the_ID();
|
159 |
}
|
160 |
+
|
161 |
+
if( !empty($arguments['id']) && intval($arguments['id']) > 0 ) {
|
162 |
+
$new_player = $fv_fp->build_min_player(false, $arguments);
|
163 |
+
if (!empty($new_player['script'])) {
|
164 |
+
$GLOBALS['fv_fp_scripts'] = $new_player['script'];
|
165 |
+
}
|
166 |
+
return $new_player['html'];
|
167 |
+
|
168 |
+
} else if( intval($arguments['post']) > 0 ) {
|
169 |
$objVideoQuery = new WP_Query( array( 'post_type' => 'attachment', 'post_status' => 'inherit', 'post_parent' => intval($post), 'post_mime_type' => 'video' ) );
|
170 |
if( $objVideoQuery->have_posts() ) {
|
171 |
$sHTML = '';
|
181 |
}
|
182 |
if( strlen($aArgs['caption']) ) {
|
183 |
$aArgs['caption'] = apply_filters( 'fv_player_caption', $aArgs['caption'], false );
|
184 |
+
}
|
185 |
|
186 |
$new_player = $fv_fp->build_min_player( $aArgs['src'],$aArgs );
|
187 |
$sHTML .= $new_player['html'];
|
192 |
|
193 |
} else if( $arguments['src'] != '' || ( ( ( strlen($fv_fp->conf['rtmp']) && $fv_fp->conf['rtmp'] != 'false' ) || strlen($arguments['rtmp'])) && strlen($arguments['rtmp_path']) ) ) {
|
194 |
// build new player
|
195 |
+
$new_player = $fv_fp->build_min_player($arguments['src'],$arguments);
|
196 |
if (!empty($new_player['script'])) {
|
197 |
$GLOBALS['fv_fp_scripts'] = $new_player['script'];
|
198 |
}
|
199 |
return $new_player['html'];
|
200 |
+
|
201 |
}
|
202 |
return false;
|
203 |
}
|
css/admin.css
CHANGED
@@ -136,4 +136,11 @@ table.fv-player-popup-formats td:first-child { width: 72px }
|
|
136 |
#wpfp_options .minicolors-theme-default.minicolors {display:block}
|
137 |
#wpfp_options .minicolors-input {padding-left:5px; height:auto}
|
138 |
#wpfp_options .minicolors-input-swatch {display:none}
|
139 |
-
#wpfp_options input[data-opacity] { background-image: url(checkered.png) }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
#wpfp_options .minicolors-theme-default.minicolors {display:block}
|
137 |
#wpfp_options .minicolors-input {padding-left:5px; height:auto}
|
138 |
#wpfp_options .minicolors-input-swatch {display:none}
|
139 |
+
#wpfp_options input[data-opacity] { background-image: url(checkered.png) }
|
140 |
+
|
141 |
+
.fv-player-editor-wrapper { float: left }
|
142 |
+
|
143 |
+
/* otherwise "Drag boxes here" appears when you hide a meta box initially and then you show it with JS */
|
144 |
+
.metabox-holder #postbox-container-tab_video_intelligence .empty-container::after { content: none }
|
145 |
+
|
146 |
+
#fv-player-system-info-textarea { font-family: monospace; width: 100%; }
|
css/flowplayer.css
CHANGED
@@ -1028,9 +1028,10 @@
|
|
1028 |
.flowplayer.bottom-fs .fp-header .fp-fullscreen {display:none}
|
1029 |
.flowplayer.bottom-fs .fp-controls .fp-fullscreen {display:block}
|
1030 |
|
1031 |
-
/* Mailchimp integration
|
1032 |
.flowplayer .fv_player_popup p{margin:0 12px 6px;line-height:1.35}
|
1033 |
-
.flowplayer .wpfp_custom_popup{width:100%;top:0;bottom:0;margin-bottom:2.4em;-webkit-transition:all .2s;-moz-transition:all .2s;transition:all .2s}
|
|
|
1034 |
.flowplayer .fv_player_popup {background-color:#222;position:relative;top:0;width:100%;height:100%;padding:2em 0 1%}
|
1035 |
.flowplayer .fv_player_popup h1,.flowplayer .fv_player_popup h2,.flowplayer .fv_player_popup h3,.flowplayer .fv_player_popup h4,.flowplayer .fv_player_popup h5,.flowplayer .fv_player_popup h6{margin:0 0 6px !important}
|
1036 |
.mailchimp-form input{width:31.33333333%;max-width:31.33333333%;margin:0 1%}
|
@@ -1058,7 +1059,7 @@
|
|
1058 |
.flowplayer.is-fullscreen .fp-player{background-color:#000}
|
1059 |
|
1060 |
|
1061 |
-
/* error icon
|
1062 |
.is-error.flowplayer .fp-player:before {
|
1063 |
background: url("img/no-play-white.svg") no-repeat center center;
|
1064 |
background-size: 14%;
|
@@ -1077,8 +1078,9 @@
|
|
1077 |
.flowplayer .fp-logo {max-width:25%;-webkit-tap-highlight-color: rgba(0,0,0,0);}
|
1078 |
.flowplayer .fp-logo img {box-shadow:none}
|
1079 |
.flowplayer.fixed-controls .fp-logo {bottom: 15px}
|
|
|
1080 |
|
1081 |
-
/* Share bar
|
1082 |
.flowplayer .fp-embed-code{display:none;}
|
1083 |
.flowplayer .fvp-share-bar{font-size:12px}
|
1084 |
.is-rtl.flowplayer .fvp-share-bar{left:auto;}
|
@@ -1162,9 +1164,9 @@
|
|
1162 |
background-color: #3B5998;
|
1163 |
}
|
1164 |
.fvp-share-bar .fvp-sharing .sharing-email svg {
|
1165 |
-
margin: -
|
1166 |
-
width:
|
1167 |
-
height:
|
1168 |
}
|
1169 |
.fvp-share-bar .fvp-sharing .sharing-twitter {
|
1170 |
background-color: #0084b4;
|
@@ -1196,7 +1198,7 @@
|
|
1196 |
|
1197 |
|
1198 |
|
1199 |
-
/* Prev/next playlist
|
1200 |
.flowplayer .fp-prev, .flowplayer .fp-next {
|
1201 |
position: absolute;
|
1202 |
top: 44%;
|
@@ -1319,7 +1321,7 @@
|
|
1319 |
#content .flowplayer a, .flowplayer a, .flowplayer a:hover { -wekbit-box-shadow: none !important; -moz-box-shadow: none !important; box-shadow: none !important; border-bottom: 0 !important; text-decoration: none !important; }
|
1320 |
|
1321 |
|
1322 |
-
/* Popups
|
1323 |
.flowplayer .wpfp_custom_ad { display: none; overflow: hidden; }
|
1324 |
.flowplayer .wpfp_custom_ad img { height: auto; }
|
1325 |
.flowplayer.is-playing .wpfp_custom_ad, .flowplayer.is-ready .wpfp_custom_ad { display: block; }
|
@@ -1340,7 +1342,7 @@
|
|
1340 |
.flowplayer.no-controlbar.is-muted .fp-controls .fp-volumebtn {visibility:visible;display:block}
|
1341 |
.flowplayer.no-controlbar.is-muted .fp-controls .fp-volumebar {display:none}
|
1342 |
|
1343 |
-
/* Caption
|
1344 |
p.fp-caption { text-align: center;max-width: 100%; }
|
1345 |
|
1346 |
/* Buttons, todo: check! or better not use! */
|
@@ -1467,7 +1469,7 @@ article .entry-content .fvfp_admin_error p { line-height: 18px }
|
|
1467 |
.flowplayer:hover .fvfp_admin_error { display: block }
|
1468 |
|
1469 |
|
1470 |
-
/* Duration
|
1471 |
.fvfp_duration { position: absolute; bottom: 0; right: 1%; z-index: 2; text-align: center; color: #fff; display:none }
|
1472 |
.is-ready .fvfp_duration, .is-loading .fvfp_duration { display: none }
|
1473 |
.fp-playlist-external .dur { font-style:normal;position:absolute;top:6px;right:6px;color:#fff;line-height:1;text-shadow:0 0 3px #333;opacity:0;-webkit-transition:all 0.3s ease-in-out 0.1s;-moz-transition:all 0.3s ease-in-out 0.1s;transition:all 0.3s ease-in-out 0.1s }
|
@@ -1478,7 +1480,7 @@ article .entry-content .fvfp_admin_error p { line-height: 18px }
|
|
1478 |
|
1479 |
|
1480 |
/*
|
1481 |
-
* FV Flowplayer Tabs
|
1482 |
*/
|
1483 |
.fv_flowplayer_tabs { margin: 0 auto; }
|
1484 |
.fv_flowplayer_tabs ul.ui-tabs,.fv_flowplayer_tabs ul.ui-tabs-nav{margin:0 !important;font-size:13px;font-family:Arial, Helvetica, sans-serif;font-weight:bold;line-height:24px !important}
|
@@ -1520,7 +1522,7 @@ article .entry-content .fvfp_admin_error p { line-height: 18px }
|
|
1520 |
.fv-player-reload { font-size: 5em; display: block }
|
1521 |
|
1522 |
|
1523 |
-
/* Disable selection
|
1524 |
.flowplayer {
|
1525 |
-webkit-touch-callout: none;
|
1526 |
-webkit-user-select: none;
|
@@ -1550,10 +1552,10 @@ article .entry-content .fvfp_admin_error p { line-height: 18px }
|
|
1550 |
.flowplayer.chrome55fix-subtitles video::-webkit-media-controls-panel { width: calc(100% + 96px); }
|
1551 |
|
1552 |
|
1553 |
-
/* Audio player
|
1554 |
.is-audio .fp-player {background-size: contain; background-position: top center; background-repeat: no-repeat}
|
1555 |
|
1556 |
-
/* Audio player playlist
|
1557 |
.flowplayer.is-audio,.site-content .flowplayer.is-audio,.flowplayer.fixed-controls.is-audio {margin-top:2.8em}
|
1558 |
.flowplayer.is-audio .fv-player-buttons li {margin:0}
|
1559 |
.site-content .flowplayer.is-audio .fp-controls,.site-content .flowplayer.is-audio .fv-ab-loop,.site-content .fv-player-buttons a:active,.site-content .fv-player-buttons a { background-color:#888 !important }
|
@@ -1737,7 +1739,8 @@ body.fv_flowplayer_tabs_hide .fv_flowplayer_tabs_content > div.fv_flowplayer_tab
|
|
1737 |
.flowplayer .fv-fp-playlist-menu .screen-reader-text { clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute !important; width: 1px; }
|
1738 |
.flowplayer .fp-controls #no-picture-icon, .flowplayer .fp-controls .fvp-icon.fvp-playlist { vertical-align: top; }
|
1739 |
.flowplayer .fvp-icon { vertical-align: middle; }
|
1740 |
-
.flowplayer svg.fvp-icon, .flowplayer .fvp-icon .svg-color { fill: #
|
|
|
1741 |
.flowplayer .fp-menu.fv-fp-playlist-menu { width: 4em; }
|
1742 |
.flowplayer .fp-menu.fv-fp-playlist-menu .fp-selected::before { content: '' }
|
1743 |
|
@@ -1764,10 +1767,15 @@ body.fv_flowplayer_tabs_hide .fv_flowplayer_tabs_content > div.fv_flowplayer_tab
|
|
1764 |
}
|
1765 |
.fv-fp-playlist.mode-repeat-playlist .fvp-icon.fvp-replay-list,
|
1766 |
.fv-fp-playlist.mode-shuffle-playlist .fvp-icon.fvp-shuffle,
|
1767 |
-
.fv-fp-playlist.mode-repeat-track .fvp-icon.fvp-replay-track
|
1768 |
-
.fv-fp-playlist.mode-normal #fvp-playlist-play {
|
1769 |
display: block;
|
1770 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1771 |
.fv-fp-playlist.mode-normal .fvp-icon.fvp-playlist-play {
|
1772 |
margin-top: 4px;
|
1773 |
}
|
@@ -1781,6 +1789,11 @@ body.fv_flowplayer_tabs_hide .fv_flowplayer_tabs_content > div.fv_flowplayer_tab
|
|
1781 |
.flowplayer .fp-controls .fv-fp-prevbtn,
|
1782 |
.flowplayer .fp-controls .fv-fp-nextbtn {
|
1783 |
margin: 0 .4em;
|
|
|
|
|
|
|
|
|
|
|
1784 |
}
|
1785 |
.flowplayer.is-audio .fp-controls .fp-playbtn {
|
1786 |
margin: 0 .2em 0 .4em;
|
@@ -1810,11 +1823,6 @@ body.fv_flowplayer_tabs_hide .fv_flowplayer_tabs_content > div.fv_flowplayer_tab
|
|
1810 |
border-right: 1px solid #fff;
|
1811 |
}
|
1812 |
|
1813 |
-
|
1814 |
-
.fv-fp-nextbtn {
|
1815 |
-
margin: 0 .4em;
|
1816 |
-
}
|
1817 |
-
|
1818 |
.flowplayer.is-tiny .fv-fp-prevbtn, .flowplayer.is-tiny .fv-fp-nextbtn {
|
1819 |
display: none;
|
1820 |
-
}
|
1028 |
.flowplayer.bottom-fs .fp-header .fp-fullscreen {display:none}
|
1029 |
.flowplayer.bottom-fs .fp-controls .fp-fullscreen {display:block}
|
1030 |
|
1031 |
+
/* Mailchimp integration */
|
1032 |
.flowplayer .fv_player_popup p{margin:0 12px 6px;line-height:1.35}
|
1033 |
+
.flowplayer .wpfp_custom_popup{width:100%;top:0;bottom:0;margin-bottom:2.4em;-webkit-transition:all .2s;-moz-transition:all .2s;transition:all .2s;overflow:hidden}
|
1034 |
+
.flowplayer.fp-full .wpfp_custom_popup{margin-bottom:2.8em}
|
1035 |
.flowplayer .fv_player_popup {background-color:#222;position:relative;top:0;width:100%;height:100%;padding:2em 0 1%}
|
1036 |
.flowplayer .fv_player_popup h1,.flowplayer .fv_player_popup h2,.flowplayer .fv_player_popup h3,.flowplayer .fv_player_popup h4,.flowplayer .fv_player_popup h5,.flowplayer .fv_player_popup h6{margin:0 0 6px !important}
|
1037 |
.mailchimp-form input{width:31.33333333%;max-width:31.33333333%;margin:0 1%}
|
1059 |
.flowplayer.is-fullscreen .fp-player{background-color:#000}
|
1060 |
|
1061 |
|
1062 |
+
/* error icon */
|
1063 |
.is-error.flowplayer .fp-player:before {
|
1064 |
background: url("img/no-play-white.svg") no-repeat center center;
|
1065 |
background-size: 14%;
|
1078 |
.flowplayer .fp-logo {max-width:25%;-webkit-tap-highlight-color: rgba(0,0,0,0);}
|
1079 |
.flowplayer .fp-logo img {box-shadow:none}
|
1080 |
.flowplayer.fixed-controls .fp-logo {bottom: 15px}
|
1081 |
+
.flowplayer.is-popup-showing .fp-logo {display: none}
|
1082 |
|
1083 |
+
/* Share bar */
|
1084 |
.flowplayer .fp-embed-code{display:none;}
|
1085 |
.flowplayer .fvp-share-bar{font-size:12px}
|
1086 |
.is-rtl.flowplayer .fvp-share-bar{left:auto;}
|
1164 |
background-color: #3B5998;
|
1165 |
}
|
1166 |
.fvp-share-bar .fvp-sharing .sharing-email svg {
|
1167 |
+
margin: -6px 0 0 -6px;
|
1168 |
+
width: 12px;
|
1169 |
+
height: 12px;
|
1170 |
}
|
1171 |
.fvp-share-bar .fvp-sharing .sharing-twitter {
|
1172 |
background-color: #0084b4;
|
1198 |
|
1199 |
|
1200 |
|
1201 |
+
/* Prev/next playlist */
|
1202 |
.flowplayer .fp-prev, .flowplayer .fp-next {
|
1203 |
position: absolute;
|
1204 |
top: 44%;
|
1321 |
#content .flowplayer a, .flowplayer a, .flowplayer a:hover { -wekbit-box-shadow: none !important; -moz-box-shadow: none !important; box-shadow: none !important; border-bottom: 0 !important; text-decoration: none !important; }
|
1322 |
|
1323 |
|
1324 |
+
/* Popups */
|
1325 |
.flowplayer .wpfp_custom_ad { display: none; overflow: hidden; }
|
1326 |
.flowplayer .wpfp_custom_ad img { height: auto; }
|
1327 |
.flowplayer.is-playing .wpfp_custom_ad, .flowplayer.is-ready .wpfp_custom_ad { display: block; }
|
1342 |
.flowplayer.no-controlbar.is-muted .fp-controls .fp-volumebtn {visibility:visible;display:block}
|
1343 |
.flowplayer.no-controlbar.is-muted .fp-controls .fp-volumebar {display:none}
|
1344 |
|
1345 |
+
/* Caption */
|
1346 |
p.fp-caption { text-align: center;max-width: 100%; }
|
1347 |
|
1348 |
/* Buttons, todo: check! or better not use! */
|
1469 |
.flowplayer:hover .fvfp_admin_error { display: block }
|
1470 |
|
1471 |
|
1472 |
+
/* Duration */
|
1473 |
.fvfp_duration { position: absolute; bottom: 0; right: 1%; z-index: 2; text-align: center; color: #fff; display:none }
|
1474 |
.is-ready .fvfp_duration, .is-loading .fvfp_duration { display: none }
|
1475 |
.fp-playlist-external .dur { font-style:normal;position:absolute;top:6px;right:6px;color:#fff;line-height:1;text-shadow:0 0 3px #333;opacity:0;-webkit-transition:all 0.3s ease-in-out 0.1s;-moz-transition:all 0.3s ease-in-out 0.1s;transition:all 0.3s ease-in-out 0.1s }
|
1480 |
|
1481 |
|
1482 |
/*
|
1483 |
+
* FV Flowplayer Tabs
|
1484 |
*/
|
1485 |
.fv_flowplayer_tabs { margin: 0 auto; }
|
1486 |
.fv_flowplayer_tabs ul.ui-tabs,.fv_flowplayer_tabs ul.ui-tabs-nav{margin:0 !important;font-size:13px;font-family:Arial, Helvetica, sans-serif;font-weight:bold;line-height:24px !important}
|
1522 |
.fv-player-reload { font-size: 5em; display: block }
|
1523 |
|
1524 |
|
1525 |
+
/* Disable selection */
|
1526 |
.flowplayer {
|
1527 |
-webkit-touch-callout: none;
|
1528 |
-webkit-user-select: none;
|
1552 |
.flowplayer.chrome55fix-subtitles video::-webkit-media-controls-panel { width: calc(100% + 96px); }
|
1553 |
|
1554 |
|
1555 |
+
/* Audio player */
|
1556 |
.is-audio .fp-player {background-size: contain; background-position: top center; background-repeat: no-repeat}
|
1557 |
|
1558 |
+
/* Audio player playlist */
|
1559 |
.flowplayer.is-audio,.site-content .flowplayer.is-audio,.flowplayer.fixed-controls.is-audio {margin-top:2.8em}
|
1560 |
.flowplayer.is-audio .fv-player-buttons li {margin:0}
|
1561 |
.site-content .flowplayer.is-audio .fp-controls,.site-content .flowplayer.is-audio .fv-ab-loop,.site-content .fv-player-buttons a:active,.site-content .fv-player-buttons a { background-color:#888 !important }
|
1739 |
.flowplayer .fv-fp-playlist-menu .screen-reader-text { clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute !important; width: 1px; }
|
1740 |
.flowplayer .fp-controls #no-picture-icon, .flowplayer .fp-controls .fvp-icon.fvp-playlist { vertical-align: top; }
|
1741 |
.flowplayer .fvp-icon { vertical-align: middle; }
|
1742 |
+
.flowplayer svg.fvp-icon, .flowplayer .fvp-icon .svg-color { fill: #fff; }
|
1743 |
+
.flowplayer.skin-custom svg.fvp-icon, .flowplayer .fvp-icon .svg-color { fill: #eee; }
|
1744 |
.flowplayer .fp-menu.fv-fp-playlist-menu { width: 4em; }
|
1745 |
.flowplayer .fp-menu.fv-fp-playlist-menu .fp-selected::before { content: '' }
|
1746 |
|
1767 |
}
|
1768 |
.fv-fp-playlist.mode-repeat-playlist .fvp-icon.fvp-replay-list,
|
1769 |
.fv-fp-playlist.mode-shuffle-playlist .fvp-icon.fvp-shuffle,
|
1770 |
+
.fv-fp-playlist.mode-repeat-track .fvp-icon.fvp-replay-track {
|
|
|
1771 |
display: block;
|
1772 |
}
|
1773 |
+
.fv-fp-playlist.mode-normal #fvp-playlist-play {
|
1774 |
+
display: inline-block;
|
1775 |
+
}
|
1776 |
+
.fv-fp-playlist.mode-normal #fvp-playlist-play {
|
1777 |
+
display: inline-block;
|
1778 |
+
}
|
1779 |
.fv-fp-playlist.mode-normal .fvp-icon.fvp-playlist-play {
|
1780 |
margin-top: 4px;
|
1781 |
}
|
1789 |
.flowplayer .fp-controls .fv-fp-prevbtn,
|
1790 |
.flowplayer .fp-controls .fv-fp-nextbtn {
|
1791 |
margin: 0 .4em;
|
1792 |
+
display: flex;
|
1793 |
+
vertical-align: middle;
|
1794 |
+
}
|
1795 |
+
.flowplayer .fp-controls .fv-fp-nextbtn {
|
1796 |
+
margin: 0 .4em 0 .2em;
|
1797 |
}
|
1798 |
.flowplayer.is-audio .fp-controls .fp-playbtn {
|
1799 |
margin: 0 .2em 0 .4em;
|
1823 |
border-right: 1px solid #fff;
|
1824 |
}
|
1825 |
|
|
|
|
|
|
|
|
|
|
|
1826 |
.flowplayer.is-tiny .fv-fp-prevbtn, .flowplayer.is-tiny .fv-fp-nextbtn {
|
1827 |
display: none;
|
1828 |
+
}
|
css/list-view.css
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#id { width: 6em }
|
2 |
+
#player_name { width: 20em }
|
3 |
+
#date_created { width: 8em }
|
4 |
+
#embeds { width: 20% }
|
5 |
+
#shortcode-copy { width: 3em }
|
6 |
+
|
7 |
+
.fv_player_splash_list_preview { height: 72px; margin: 0 5px 2px 0; display: inline; float: left; position: relative; cursor: pointer}
|
8 |
+
.fv_player_splash_list_preview img { height: 72px; width: auto }
|
9 |
+
.fv_player_splash_list_preview span {display: none; color: #fff; position: absolute; top: 0; left: 0; margin-top: 20%; right: 0; text-align: center; text-shadow: 0 0 5px black; }
|
10 |
+
.fv_player_splash_list_preview:hover span {display: block; }
|
11 |
+
.fv_player_splash_list_preview.fv_player_list_preview_no_splash { width: 128px; background-color: #000; display: inline-block }
|
12 |
+
.fv_player_splash_list_preview.fv_player_list_preview_no_splash:before { content: "\0025B6"; display: block; font-size: 3em; margin-top: 20%; text-align: center }
|
13 |
+
.fv_player_splash_list_preview.fv_player_list_preview_no_splash span {display: block}
|
14 |
+
|
15 |
+
.fv-player-remove, .fv-player-remove:hover, .fv-player-remove-confirm, .fv-player-remove-confirm:hover {color: #ff0000}
|
16 |
+
|
17 |
+
td.column-shortcode { padding-right: 0 }
|
18 |
+
.column-shortcode { width: 10em }
|
19 |
+
.column-shortcode input { width: 100% }
|
20 |
+
|
21 |
+
.shortcode-copy a.button {
|
22 |
+
padding: 0 5px 1px;
|
23 |
+
}
|
css/shortcode-editor.css
CHANGED
@@ -39,6 +39,7 @@
|
|
39 |
|
40 |
.fv-player-shortcode-editor-left{ width:40%; }
|
41 |
.fv-player-shortcode-editor-right{ width:60%; }
|
|
|
42 |
.fv-player-tab{position:relative;}
|
43 |
.fv-player-tabs #fv-player-list-thumb-toggle{ position:absolute;right:10px;text-align:right;top:9px; }
|
44 |
#fv-player-list-thumb-toggle a{ text-decoration:none;margin-left:6px;color:#b4b9be; }
|
@@ -76,6 +77,9 @@
|
|
76 |
#fv-player-list-thumb-toggle > a{ box-shadow:none; }
|
77 |
#fv-player-shortcode-editor td > input[type="checkbox"]{margin-top:-4px}
|
78 |
|
|
|
|
|
|
|
79 |
/*Preview iframe*/
|
80 |
#fv-player-shortcode-editor-preview{ width: 460px;position:relative; }
|
81 |
#fv-player-shortcode-editor-preview div.fv-player-shortcode-editor-helper {display:none;}
|
@@ -85,7 +89,9 @@
|
|
85 |
#fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-target,
|
86 |
#fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-target{display:none}
|
87 |
#fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-iframe-refresh{display:none!important}
|
88 |
-
#fv-player-shortcode-editor-preview-spinner{background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center
|
|
|
|
|
89 |
.fvp_item_video-thumbnail img{max-width: 95px;max-height: 95px;}
|
90 |
#fv-player-shortcode-editor-preview-new-tab, #fv-player-shortcode-editor-preview-no{background-image: url(../images/icon-256x256.png);width: 256px;height: 290px;background-repeat: no-repeat;line-height:512px;overflow:hidden;margin:0 auto;text-align: center;}
|
91 |
#fv-player-shortcode-editor-preview-new-tab a {margin-top:256px;}
|
@@ -146,6 +152,10 @@ a #add-format, a #add-rtmp {
|
|
146 |
padding: 4px 2px;
|
147 |
}
|
148 |
|
|
|
|
|
|
|
149 |
#fv-player-shortcode-editor-editor ::placeholder {
|
150 |
opacity:.5;
|
151 |
-
}
|
|
39 |
|
40 |
.fv-player-shortcode-editor-left{ width:40%; }
|
41 |
.fv-player-shortcode-editor-right{ width:60%; }
|
42 |
+
#fv-player-shortcode-editor #fv_wp_flowplayer_field_player_name { width: 88% }
|
43 |
.fv-player-tab{position:relative;}
|
44 |
.fv-player-tabs #fv-player-list-thumb-toggle{ position:absolute;right:10px;text-align:right;top:9px; }
|
45 |
#fv-player-list-thumb-toggle a{ text-decoration:none;margin-left:6px;color:#b4b9be; }
|
77 |
#fv-player-list-thumb-toggle > a{ box-shadow:none; }
|
78 |
#fv-player-shortcode-editor td > input[type="checkbox"]{margin-top:-4px}
|
79 |
|
80 |
+
#fv-player-shortcode-editor-loading-spinner {background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center; position:absolute; z-index: 2; height: 100%; width: 100%;}
|
81 |
+
#fv-player-shortcode-editor-loading-spinner.loaded {background: white}
|
82 |
+
|
83 |
/*Preview iframe*/
|
84 |
#fv-player-shortcode-editor-preview{ width: 460px;position:relative; }
|
85 |
#fv-player-shortcode-editor-preview div.fv-player-shortcode-editor-helper {display:none;}
|
89 |
#fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-target,
|
90 |
#fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-target{display:none}
|
91 |
#fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-iframe-refresh{display:none!important}
|
92 |
+
#fv-player-shortcode-editor-preview-spinner, .fv-player-shortcode-editor-small-spinner {background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center}
|
93 |
+
#fv-player-shortcode-editor-preview-spinner{position:absolute; z-index: 2; height: 200px; width: 100%;}
|
94 |
+
.fv-player-shortcode-editor-small-spinner {z-index: 2; background-size: 20px; height: 20px; width: 20px; display: inline-block}
|
95 |
.fvp_item_video-thumbnail img{max-width: 95px;max-height: 95px;}
|
96 |
#fv-player-shortcode-editor-preview-new-tab, #fv-player-shortcode-editor-preview-no{background-image: url(../images/icon-256x256.png);width: 256px;height: 290px;background-repeat: no-repeat;line-height:512px;overflow:hidden;margin:0 auto;text-align: center;}
|
97 |
#fv-player-shortcode-editor-preview-new-tab a {margin-top:256px;}
|
152 |
padding: 4px 2px;
|
153 |
}
|
154 |
|
155 |
+
#fv_player_copy_to_clipboard, #fv_player_import_data {width: 80%}
|
156 |
+
#fv_player_copied_to_clipboard_message, #fv_player_imported_message {margin: 22px auto 0 auto; visibility: hidden; width: 20%; text-align: center}
|
157 |
+
|
158 |
#fv-player-shortcode-editor-editor ::placeholder {
|
159 |
opacity:.5;
|
160 |
+
}
|
161 |
+
|
flowplayer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: FV Player
|
4 |
Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
|
5 |
Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
|
6 |
-
Version: 7.
|
7 |
Author URI: http://foliovision.com/
|
8 |
License: GPL-3.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
@@ -26,7 +26,8 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
|
26 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
27 |
*/
|
28 |
|
29 |
-
$fv_wp_flowplayer_ver
|
|
|
30 |
$fv_wp_flowplayer_core_ver = '7.2.7.1';
|
31 |
|
32 |
include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
|
@@ -60,6 +61,17 @@ include_once(dirname( __FILE__ ) . '/models/email-subscription.php');
|
|
60 |
include_once(dirname( __FILE__ ) . '/models/video-intelligence.php');
|
61 |
include_once(dirname( __FILE__ ) . '/models/player-position-save.php');
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
include_once(dirname( __FILE__ ) . '/models/xml-video-sitemap.php');
|
64 |
|
65 |
global $fv_fp;
|
@@ -73,6 +85,7 @@ if( is_admin() ) {
|
|
73 |
include_once(dirname( __FILE__ ) . '/models/media-browser.php');
|
74 |
include_once(dirname( __FILE__ ) . '/models/media-browser-s3.php');
|
75 |
}
|
|
|
76 |
register_deactivation_hook( __FILE__, 'flowplayer_deactivate' );
|
77 |
|
78 |
}
|
3 |
Plugin Name: FV Player
|
4 |
Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
|
5 |
Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
|
6 |
+
Version: 7.3.3.727
|
7 |
Author URI: http://foliovision.com/
|
8 |
License: GPL-3.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
26 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
27 |
*/
|
28 |
|
29 |
+
global $fv_wp_flowplayer_ver;
|
30 |
+
$fv_wp_flowplayer_ver = '7.3.3.727';
|
31 |
$fv_wp_flowplayer_core_ver = '7.2.7.1';
|
32 |
|
33 |
include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
|
61 |
include_once(dirname( __FILE__ ) . '/models/video-intelligence.php');
|
62 |
include_once(dirname( __FILE__ ) . '/models/player-position-save.php');
|
63 |
|
64 |
+
include_once(dirname( __FILE__ ) . '/models/db-player.php');
|
65 |
+
include_once(dirname( __FILE__ ) . '/models/db-video.php');
|
66 |
+
include_once(dirname( __FILE__ ) . '/models/db-video-meta.php');
|
67 |
+
include_once(dirname( __FILE__ ) . '/models/db-player-meta.php');
|
68 |
+
include_once(dirname( __FILE__ ) . '/models/db.php');
|
69 |
+
|
70 |
+
global $FV_Player_Db;
|
71 |
+
$FV_Player_Db = new FV_Player_Db();
|
72 |
+
|
73 |
+
include_once(dirname( __FILE__ ) . '/models/list-table.php');
|
74 |
+
|
75 |
include_once(dirname( __FILE__ ) . '/models/xml-video-sitemap.php');
|
76 |
|
77 |
global $fv_fp;
|
85 |
include_once(dirname( __FILE__ ) . '/models/media-browser.php');
|
86 |
include_once(dirname( __FILE__ ) . '/models/media-browser-s3.php');
|
87 |
}
|
88 |
+
include_once(dirname( __FILE__ ) . '/models/system-info.php');
|
89 |
register_deactivation_hook( __FILE__, 'flowplayer_deactivate' );
|
90 |
|
91 |
}
|
flowplayer/flowplayer.dashjs.min.js
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
-
/*! v2.
|
2 |
-
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(b,c,d){"use strict";var e={};e.encode=function(a){for(var b=[],c=0;c<a.length;++c){var d=a.charCodeAt(c);d<128?b.push(d):d<2048?(b.push(192|d>>6),b.push(128|63&d)):d<65536?(b.push(224|d>>12),b.push(128|63&d>>6),b.push(128|63&d)):(b.push(240|d>>18),b.push(128|63&d>>12),b.push(128|63&d>>6),b.push(128|63&d))}return b},e.decode=function(a){for(var b=[],c=0;c<a.length;){var d=a[c++];d<128||(d<224?(d=(31&d)<<6,d|=63&a[c++]):d<240?(d=(15&d)<<12,d|=(63&a[c++])<<6,d|=63&a[c++]):(d=(7&d)<<18,d|=(63&a[c++])<<12,d|=(63&a[c++])<<6,d|=63&a[c++])),b.push(String.fromCharCode(d))}return b.join("")};var f={};!function(b){var c=function(a){for(var c=0,d=[],e=0|a.length/3;0<e--;){var f=(a[c]<<16)+(a[c+1]<<8)+a[c+2];c+=3,d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push(b.charAt(63&f>>6)),d.push(b.charAt(63&f))}if(2==a.length-c){var f=(a[c]<<16)+(a[c+1]<<8);d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push(b.charAt(63&f>>6)),d.push("=")}else if(1==a.length-c){var f=a[c]<<16;d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push("==")}return d.join("")},d=function(){for(var a=[],c=0;c<b.length;++c)a[b.charCodeAt(c)]=c;return a["=".charCodeAt(0)]=0,a}(),g=function(a){for(var b=0,c=[],e=0|a.length/4;0<e--;){var f=(d[a.charCodeAt(b)]<<18)+(d[a.charCodeAt(b+1)]<<12)+(d[a.charCodeAt(b+2)]<<6)+d[a.charCodeAt(b+3)];c.push(255&f>>16),c.push(255&f>>8),c.push(255&f),b+=4}return c&&("="==a.charAt(b-2)?(c.pop(),c.pop()):"="==a.charAt(b-1)&&c.pop()),c},h={};h.encode=function(a){for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b},h.decode=function(b){for(var c=0;c<s.length;++c)a[c]=String.fromCharCode(a[c]);return a.join("")},f.decodeArray=function(a){var b=g(a);return new Uint8Array(b)},f.encodeASCII=function(a){var b=h.encode(a);return c(b)},f.decodeASCII=function(a){var b=g(a);return h.decode(b)},f.encode=function(a){var b=e.encode(a);return c(b)},f.decode=function(a){var b=g(a);return e.decode(b)}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),void 0!==d&&(d.decode=f.decode,d.decodeArray=f.decodeArray,d.encode=f.encode,d.encodeASCII=f.encodeASCII)},{}],2:[function(a,b,c){"use strict";!function(a){var b={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},c=function(a){var c=a;return b.hasOwnProperty(a)&&(c=b[a]),String.fromCharCode(c)},d=15,e=32,f={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},g={17:2,18:4,21:6,22:8,23:10,19:13,20:15},h={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},i={25:2,26:4,29:6,30:8,31:10,27:13,28:15},j=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],k={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(a){this.time=a},log:function(a,b){var c=this.verboseFilter[a];this.verboseLevel>=c&&console.log(this.time+" ["+a+"] "+b)}},l=function(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c].toString(16));return b},m=function(a,b,c,d,e){this.foreground=a||"white",this.underline=b||!1,this.italics=c||!1,this.background=d||"black",this.flash=e||!1};m.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(a){for(var b=["foreground","underline","italics","background","flash"],c=0;c<b.length;c++){var d=b[c];a.hasOwnProperty(d)&&(this[d]=a[d])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(a){return this.foreground===a.foreground&&this.underline===a.underline&&this.italics===a.italics&&this.background===a.background&&this.flash===a.flash},copy:function(a){this.foreground=a.foreground,this.underline=a.underline,this.italics=a.italics,this.background=a.background,this.flash=a.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var n=function(a,b,c,d,e,f){this.uchar=a||" ",this.penState=new m(b,c,d,e,f)};n.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(a,b){this.uchar=a,this.penState.copy(b)},setPenState:function(a){this.penState.copy(a)},equals:function(a){return this.uchar===a.uchar&&this.penState.equals(a.penState)},copy:function(a){this.uchar=a.uchar,this.penState.copy(a.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var o=function(){this.chars=[];for(var a=0;a<e;a++)this.chars.push(new n);this.pos=0,this.currPenState=new m};o.prototype={equals:function(a){for(var b=!0,c=0;c<e;c++)if(!this.chars[c].equals(a.chars[c])){b=!1;break}return b},copy:function(a){for(var b=0;b<e;b++)this.chars[b].copy(a.chars[b])},isEmpty:function(){for(var a=!0,b=0;b<e;b++)if(!this.chars[b].isEmpty()){a=!1;break}return a},setCursor:function(a){this.pos!==a&&(this.pos=a),this.pos<0?(k.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>e&&(k.log("ERROR","Too large cursor position "+this.pos),this.pos=e)},moveCursor:function(a){var b=this.pos+a;if(a>1)for(var c=this.pos+1;c<b+1;c++)this.chars[c].setPenState(this.currPenState);this.setCursor(b)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(a){a>=144&&this.backSpace();var b=c(a);if(this.pos>=e)return void k.log("ERROR","Cannot insert "+a.toString(16)+" ("+b+") at position "+this.pos+". Skipping it!");this.chars[this.pos].setChar(b,this.currPenState),this.moveCursor(1)},clearFromPos:function(a){var b;for(b=a;b<e;b++)this.chars[b].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var a=[],b=!0,c=0;c<e;c++){var d=this.chars[c].uchar;" "!==d&&(b=!1),a.push(d)}return b?"":a.join("")},setPenStyles:function(a){this.currPenState.setStyles(a),this.chars[this.pos].setPenState(this.currPenState)}};var p=function(){this.rows=[];for(var a=0;a<d;a++)this.rows.push(new o);this.currRow=d-1,this.nrRollUpRows=null,this.reset()};p.prototype={reset:function(){for(var a=0;a<d;a++)this.rows[a].clear();this.currRow=d-1},equals:function(a){for(var b=!0,c=0;c<d;c++)if(!this.rows[c].equals(a.rows[c])){b=!1;break}return b},copy:function(a){for(var b=0;b<d;b++)this.rows[b].copy(a.rows[b])},isEmpty:function(){for(var a=!0,b=0;b<d;b++)if(!this.rows[b].isEmpty()){a=!1;break}return a},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(a){this.rows[this.currRow].insertChar(a)},setPen:function(a){this.rows[this.currRow].setPenStyles(a)},moveCursor:function(a){this.rows[this.currRow].moveCursor(a)},setCursor:function(a){k.log("INFO","setCursor: "+a),this.rows[this.currRow].setCursor(a)},setPAC:function(a){k.log("INFO","pacData = "+JSON.stringify(a));var b=a.row-1;this.nrRollUpRows&&b<this.nrRollUpRows-1&&(b=this.nrRollUpRows-1),this.currRow=b;var c=this.rows[this.currRow];if(null!==a.indent){var d=a.indent,e=Math.max(d-1,0);c.setCursor(a.indent),a.color=c.chars[e].penState.foreground}var f={foreground:a.color,underline:a.underline,italics:a.italics,background:"black",flash:!1};this.setPen(f)},setBkgData:function(a){k.log("INFO","bkgData = "+JSON.stringify(a)),this.backSpace(),this.setPen(a),this.insertChar(32)},setRollUpRows:function(a){this.nrRollUpRows=a},rollUp:function(){if(null===this.nrRollUpRows)return void k.log("DEBUG","roll_up but nrRollUpRows not set yet");k.log("TEXT",this.getDisplayText());var a=this.currRow+1-this.nrRollUpRows,b=this.rows.splice(a,1)[0];b.clear(),this.rows.splice(this.currRow,0,b),k.log("INFO","Rolling up")},getDisplayText:function(a){a=a||!1;for(var b=[],c="",e=-1,f=0;f<d;f++){var g=this.rows[f].getTextString();g&&(e=f+1,a?b.push("Row "+e+': "'+g+'"'):b.push(g.trim()))}return b.length>0&&(c=a?"["+b.join(" | ")+"]":b.join("\n")),c},getTextAndFormat:function(){return this.rows}};var q=function(a,b){this.chNr=a,this.outputFilter=b,this.mode=null,this.verbose=0,this.displayedMemory=new p,this.nonDisplayedMemory=new p,this.lastOutputScreen=new p,this.currRollUpRow=this.displayedMemory.rows[d-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};q.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[d-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(a){this.outputFilter=a},setPAC:function(a){this.writeScreen.setPAC(a)},setBkgData:function(a){this.writeScreen.setBkgData(a)},setMode:function(a){a!==this.mode&&(this.mode=a,k.log("INFO","MODE="+a),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=a)},insertChars:function(a){for(var b=0;b<a.length;b++)this.writeScreen.insertChar(a[b]);var c=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";k.log("INFO",c+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(k.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){k.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){k.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){k.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(a){k.log("INFO","RU("+a+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(a)},cc_FON:function(){k.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){k.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){k.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){k.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){k.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){k.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){k.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(k.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var a=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=a,this.writeScreen=this.nonDisplayedMemory,k.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(a){k.log("INFO","TO("+a+") - Tab Offset"),this.writeScreen.moveCursor(a)},cc_MIDROW:function(a){var b={flash:!1};if(b.underline=a%2==1,b.italics=a>=46,b.italics)b.foreground="white";else{var c=Math.floor(a/2)-16,d=["white","green","blue","cyan","red","yellow","magenta"];b.foreground=d[c]}k.log("INFO","MIDROW: "+JSON.stringify(b)),this.writeScreen.setPen(b)},outputDataUpdate:function(){var a=k.time;null!==a&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(a,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,a,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:a):this.cueStartTime=a,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(a){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,a,this.displayedMemory),this.cueStartTime=a))}};var r=function(a,b,c){this.field=a||1,this.outputs=[b,c],this.channels=[new q(1,b),new q(2,c)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};r.prototype={getHandler:function(a){return this.channels[a].getHandler()},setHandler:function(a,b){this.channels[a].setHandler(b)},addData:function(a,b){var c,d,e,f=!1;this.lastTime=a,k.setTime(a);for(var g=0;g<b.length;g+=2)if(d=127&b[g],e=127&b[g+1],d>=16&&d<=31&&d===this.lastCmdA&&e===this.lastCmdB)this.lastCmdA=null,this.lastCmdB=null,k.log("DEBUG","Repeated command ("+l([d,e])+") is dropped");else if(0!==d||0!==e){if(k.log("DATA","["+l([b[g],b[g+1]])+"] -> ("+l([d,e])+")"),c=this.parseCmd(d,e),c||(c=this.parseMidrow(d,e)),c||(c=this.parsePAC(d,e)),c||(c=this.parseBackgroundAttributes(d,e)),!c&&(f=this.parseChars(d,e)))if(this.currChNr&&this.currChNr>=0){var h=this.channels[this.currChNr-1];h.insertChars(f)}else k.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:f?this.dataCounters.char+=2:(this.dataCounters.other+=2,k.log("WARNING","Couldn't parse cleaned data "+l([d,e])+" orig: "+l([b[g],b[g+1]])))}else this.dataCounters.padding+=2},parseCmd:function(a,b){var c=null,d=(20===a||21===a||28===a||29===a)&&32<=b&&b<=47,e=(23===a||31===a)&&33<=b&&b<=35;if(!d&&!e)return!1;c=20===a||21===a||23===a?1:2;var f=this.channels[c-1];return 20===a||21===a||28===a||29===a?32===b?f.cc_RCL():33===b?f.cc_BS():34===b?f.cc_AOF():35===b?f.cc_AON():36===b?f.cc_DER():37===b?f.cc_RU(2):38===b?f.cc_RU(3):39===b?f.cc_RU(4):40===b?f.cc_FON():41===b?f.cc_RDC():42===b?f.cc_TR():43===b?f.cc_RTD():44===b?f.cc_EDM():45===b?f.cc_CR():46===b?f.cc_ENM():47===b&&f.cc_EOC():f.cc_TO(b-32),this.lastCmdA=a,this.lastCmdB=b,this.currChNr=c,!0},parseMidrow:function(a,b){var c=null;if((17===a||25===a)&&32<=b&&b<=47){if((c=17===a?1:2)!==this.currChNr)return k.log("ERROR","Mismatch channel in midrow parsing"),!1;var d=this.channels[c-1];return d.insertChars([32]),d.cc_MIDROW(b),k.log("DEBUG","MIDROW ("+l([a,b])+")"),this.lastCmdA=a,this.lastCmdB=b,!0}return!1},parsePAC:function(a,b){var c=null,d=null,e=(17<=a&&a<=23||25<=a&&a<=31)&&64<=b&&b<=127,j=(16===a||24===a)&&64<=b&&b<=95;if(!e&&!j)return!1;c=a<=23?1:2,d=64<=b&&b<=95?1===c?f[a]:h[a]:1===c?g[a]:i[a];var k=this.interpretPAC(d,b);return this.channels[c-1].setPAC(k),this.lastCmdA=a,this.lastCmdB=b,this.currChNr=c,!0},interpretPAC:function(a,b){var c=b,d={color:null,italics:!1,indent:null,underline:!1,row:a};return c=b>95?b-96:b-64,d.underline=1==(1&c),c<=13?d.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:c<=15?(d.italics=!0,d.color="white"):d.indent=4*Math.floor((c-16)/2),d},parseChars:function(a,b){var d=null,e=null,f=null;if(a>=25?(d=2,f=a-8):(d=1,f=a),17<=f&&f<=19){var g=b;g=17===f?b+80:18===f?b+112:b+144,k.log("INFO","Special char '"+c(g)+"' in channel "+d),e=[g],this.lastCmdA=a,this.lastCmdB=b}else 32<=a&&a<=127&&(e=0===b?[a]:[a,b],this.lastCmdA=null,this.lastCmdB=null);if(e){var h=l(e);k.log("DEBUG","Char codes = "+h.join(","))}return e},parseBackgroundAttributes:function(a,b){var c,d,e,f,g=(16===a||24===a)&&32<=b&&b<=47,h=(23===a||31===a)&&45<=b&&b<=47;return!(!g&&!h)&&(c={},16===a||24===a?(d=Math.floor((b-32)/2),c.background=j[d],b%2==1&&(c.background=c.background+"_semi")):45===b?c.background="transparent":(c.foreground="black",47===b&&(c.underline=!0)),e=a<24?1:2,f=this.channels[e-1],f.setBkgData(c),this.lastCmdA=a,this.lastCmdB=b,!0)},reset:function(){for(var a=0;a<this.channels.length;a++)this.channels[a]&&this.channels[a].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(a){for(var b=0;b<this.channels.length;b++)this.channels[b]&&this.channels[b].cueSplitAtTime(a)}};var s=function(a,b,c){for(var d=0,e=b,f=[],g=function(a,b,c,d){if(4!==a||b<8)return null;var e=c.getUint8(d),f=c.getUint16(d+1),g=c.getUint32(d+3),h=c.getUint8(d+7);return 181==e&&49==f&&1195456820==g&&3==h};e<b+c;){if(d=a.getUint32(e),6===(31&a.getUint8(e+4)))for(var h=e+5,i=-1;h<e+4+d-1;){i=0;for(var j=255;255===j;)j=a.getUint8(h),i+=j,h++;var k=0;for(j=255;255===j;)j=a.getUint8(h),k+=j,h++;g(i,k,a,h)&&f.push([h,k]),h+=k}e+=d+4}return f},t=function(a,b){var c=b[0],d=[[],[]];c+=8;var e=31&a.getUint8(c);c+=2;for(var f=0;f<e;f++){var g=a.getUint8(c),h=4&g,i=3&g;c++;var j=a.getUint8(c);c++;var k=a.getUint8(c);c++,h&&(127&j)+(127&k)!=0&&(0===i?(d[0].push(j),d[0].push(k)):1===i&&(d[1].push(j),d[1].push(k)))}return d};a.logger=k,a.PenState=m,a.CaptionScreen=p,a.Cea608Parser=r,a.findCea608Nalus=s,a.extractCea608DataFromRange=t}(void 0===c?(void 0).cea608parser={}:c)},{}],3:[function(a,b,c){"use strict";function d(a){function b(){void 0===a.escapeMode&&(a.escapeMode=!0),void 0===a.attributePrefix&&(a.attributePrefix="_"),a.arrayAccessForm=a.arrayAccessForm||"none",a.emptyNodeForm=a.emptyNodeForm||"text",void 0===a.enableToStringFunc&&(a.enableToStringFunc=!0),a.arrayAccessFormPaths=a.arrayAccessFormPaths||[],void 0===a.skipEmptyTextNodesForObj&&(a.skipEmptyTextNodesForObj=!0),void 0===a.stripWhitespaces&&(a.stripWhitespaces=!0),a.datetimeAccessFormPaths=a.datetimeAccessFormPaths||[],void 0===a.useDoubleQuotes&&(a.useDoubleQuotes=!1),a.xmlElementsFilter=a.xmlElementsFilter||[],a.jsonPropertiesFilter=a.jsonPropertiesFilter||[],void 0===a.keepCData&&(a.keepCData=!1),void 0===a.ignoreRoot&&(a.ignoreRoot=!1)}function c(){}function d(a){var b=a.localName;return null==b&&(b=a.baseName),null!=b&&""!=b||(b=a.nodeName),b}function e(a){return a.prefix}function f(a){return"string"==typeof a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):a}function g(a,b,c,d){for(var e=0;e<a.length;e++){var f=a[e];if("string"==typeof f){if(f==d)break}else if(f instanceof RegExp){if(f.test(d))break}else if("function"==typeof f&&f(b,c,d))break}return e!=a.length}function h(b,c,d){switch(a.arrayAccessForm){case"property":b[c]instanceof Array?b[c+"_asArray"]=b[c]:b[c+"_asArray"]=[b[c]]}!(b[c]instanceof Array)&&a.arrayAccessFormPaths.length>0&&g(a.arrayAccessFormPaths,b,c,d)&&(b[c]=[b[c]])}function i(a){var b=a.split(/[-T:+Z]/g),c=new Date(b[0],b[1]-1,b[2]),d=b[5].split(".");if(c.setHours(b[3],b[4],d[0]),d.length>1&&c.setMilliseconds(d[1]),b[6]&&b[7]){var e=60*b[6]+Number(b[7]);e=0+("-"==(/\d\d-\d\d:\d\d$/.test(a)?"-":"+")?-1*e:e),c.setMinutes(c.getMinutes()-e-c.getTimezoneOffset())}else-1!==a.indexOf("Z",a.length-1)&&(c=new Date(Date.UTC(c.getFullYear(),c.getMonth(),c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds())));return c}function j(b,c,d){if(a.datetimeAccessFormPaths.length>0){var e=d.split(".#")[0];return g(a.datetimeAccessFormPaths,b,c,e)?i(b):b}return b}function k(b,c,d,e){return!(c==z.ELEMENT_NODE&&a.xmlElementsFilter.length>0)||g(a.xmlElementsFilter,b,d,e)}function l(b,c){if(b.nodeType==z.DOCUMENT_NODE){for(var f=new Object,g=b.childNodes,i=0;i<g.length;i++){var m=g[i];if(m.nodeType==z.ELEMENT_NODE)if(a.ignoreRoot)f=l(m);else{f={};var n=d(m);f[n]=l(m)}}return f}if(b.nodeType==z.ELEMENT_NODE){var f=new Object;f.__cnt=0;for(var o=[],g=b.childNodes,i=0;i<g.length;i++){var m=g[i],n=d(m);if(m.nodeType!=z.COMMENT_NODE){var p=c+"."+n;if(k(f,m.nodeType,n,p))if(f.__cnt++,null==f[n]){var q=l(m,p);if("#text"!=n||/[^\s]/.test(q)){var r={};r[n]=q,o.push(r)}f[n]=q,h(f,n,p)}else{null!=f[n]&&(f[n]instanceof Array||(f[n]=[f[n]],h(f,n,p)));var q=l(m,p);if("#text"!=n||/[^\s]/.test(q)){var r={};r[n]=q,o.push(r)}f[n][f[n].length]=q}}}f.__children=o;for(var s=d(b),t=0;t<b.attributes.length;t++){var u=b.attributes[t];f.__cnt++;for(var v=u.value,w=0,x=a.matchers.length;w<x;w++){var y=a.matchers[w];y.test(u,s)&&(v=y.converter(u.value))}f[a.attributePrefix+u.name]=v}var A=e(b);return null!=A&&""!=A&&(f.__cnt++,f.__prefix=A),null!=f["#text"]&&(f.__text=f["#text"],f.__text instanceof Array&&(f.__text=f.__text.join("\n")),a.stripWhitespaces&&(f.__text=f.__text.trim()),delete f["#text"],"property"==a.arrayAccessForm&&delete f["#text_asArray"],f.__text=j(f.__text,n,c+"."+n)),null!=f["#cdata-section"]&&(f.__cdata=f["#cdata-section"],delete f["#cdata-section"],"property"==a.arrayAccessForm&&delete f["#cdata-section_asArray"]),0==f.__cnt&&"text"==a.emptyNodeForm?f="":1==f.__cnt&&null!=f.__text?f=f.__text:1!=f.__cnt||null==f.__cdata||a.keepCData?f.__cnt>1&&null!=f.__text&&a.skipEmptyTextNodesForObj&&(a.stripWhitespaces&&""==f.__text||""==f.__text.trim())&&delete f.__text:f=f.__cdata,delete f.__cnt,!a.enableToStringFunc||null==f.__text&&null==f.__cdata||(f.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),f}if(b.nodeType==z.TEXT_NODE||b.nodeType==z.CDATA_SECTION_NODE)return b.nodeValue}function m(b,c,d,e){var g="<"+(null!=b&&null!=b.__prefix?b.__prefix+":":"")+c;if(null!=d)for(var h=0;h<d.length;h++){var i=d[h],j=b[i];a.escapeMode&&(j=f(j)),g+=" "+i.substr(a.attributePrefix.length)+"=",a.useDoubleQuotes?g+='"'+j+'"':g+="'"+j+"'"}return g+=e?"/>":">"}function n(a,b){return"</"+(null!=a.__prefix?a.__prefix+":":"")+b+">"}function o(a,b){return-1!==a.indexOf(b,a.length-b.length)}function p(b,c){return!!("property"==a.arrayAccessForm&&o(c.toString(),"_asArray")||0==c.toString().indexOf(a.attributePrefix)||0==c.toString().indexOf("__")||b[c]instanceof Function)}function q(a){var b=0;if(a instanceof Object)for(var c in a)p(a,c)||b++;return b}function r(b,c,d){return 0==a.jsonPropertiesFilter.length||""==d||g(a.jsonPropertiesFilter,b,c,d)}function s(b){var c=[];if(b instanceof Object)for(var d in b)-1==d.toString().indexOf("__")&&0==d.toString().indexOf(a.attributePrefix)&&c.push(d);return c}function t(b){var c="";return null!=b.__cdata&&(c+="<![CDATA["+b.__cdata+"]]>"),null!=b.__text&&(a.escapeMode?c+=f(b.__text):c+=b.__text),c}function u(b){var c="";return b instanceof Object?c+=t(b):null!=b&&(a.escapeMode?c+=f(b):c+=b),c}function v(a,b){return""===a?b:a+"."+b}function w(a,b,c,d){var e="";if(0==a.length)e+=m(a,b,c,!0);else for(var f=0;f<a.length;f++)e+=m(a[f],b,s(a[f]),!1),e+=x(a[f],v(d,b)),e+=n(a[f],b);return e}function x(a,b){var c="";if(q(a)>0)for(var d in a)if(!p(a,d)&&(""==b||r(a,d,v(b,d)))){var e=a[d],f=s(e);if(null==e||void 0==e)c+=m(e,d,f,!0);else if(e instanceof Object)if(e instanceof Array)c+=w(e,d,f,b);else if(e instanceof Date)c+=m(e,d,f,!1),c+=e.toISOString(),c+=n(e,d);else{var g=q(e);g>0||null!=e.__text||null!=e.__cdata?(c+=m(e,d,f,!1),c+=x(e,v(b,d)),c+=n(e,d)):c+=m(e,d,f,!0)}else c+=m(e,d,f,!1),c+=u(e),c+=n(e,d)}return c+=u(a)}var y="1.2.0";a=a||{},b(),c();var z={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(a){window.ActiveXObject||window;if(void 0===a)return null;var b;if(window.DOMParser){var c=new window.DOMParser;try{b=c.parseFromString(a,"text/xml"),b.getElementsByTagNameNS("*","parsererror").length>0&&(b=null)}catch(d){b=null}}else 0==a.indexOf("<?")&&(a=a.substr(a.indexOf("?>")+2)),b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a);return b},this.asArray=function(a){return void 0===a||null==a?[]:a instanceof Array?a:[a]},this.toXmlDateTime=function(a){return a instanceof Date?a.toISOString():"number"==typeof a?new Date(a).toISOString():null},this.asDateTime=function(a){return"string"==typeof a?i(a):a},this.xml2json=function(a){return l(a)},this.xml_str2json=function(a){var b=this.parseXmlString(a);return null!=b?this.xml2json(b):null},this.json2xml_str=function(a){return x(a,"")},this.json2xml=function(a){var b=this.json2xml_str(a);return this.parseXmlString(b)},this.getVersion=function(){return y}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=d,b.exports=c.default},{}],4:[function(a,b,c){(function(b){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0});var e=a(90),f=d(e),g=a(46),h=d(g),i=a(47),j="undefined"!=typeof window&&window||b,k=j.dashjs;k||(k=j.dashjs={}),k.MediaPlayer=f.default,k.FactoryMaker=h.default,k.Version=(0,i.getVersionString)(),c.default=k,c.MediaPlayer=f.default,c.FactoryMaker=h.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{46:46,47:47,90:90}],5:[function(a,b,c){!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===f||b===k?62:b===g||b===l?63:b<h?-1:b<h+10?b-h+26+26:b<j+26?b-j:b<i+26?b-i+26:void 0}function c(a){function c(a){j[l++]=a}var d,f,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new e(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,f=0;d<g;d+=4,f+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function d(a){function b(a){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var d,e,f,g=a.length%3,h="";for(d=0,f=a.length-g;d<f;d+=3)e=(a[d]<<16)+(a[d+1]<<8)+a[d+2],h+=c(e);switch(g){case 1:e=a[a.length-1],h+=b(e>>2),h+=b(e<<4&63),h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=b(e>>10),h+=b(e>>4&63),h+=b(e<<2&63),h+="="}return h}var e="undefined"!=typeof Uint8Array?Uint8Array:Array,f="+".charCodeAt(0),g="/".charCodeAt(0),h="0".charCodeAt(0),i="a".charCodeAt(0),j="A".charCodeAt(0),k="-".charCodeAt(0),l="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=d}(void 0===c?this.base64js={}:c)},{}],6:[function(a,b,c){},{}],7:[function(a,b,c){function d(a){if(a&&!i(a))throw new Error("Unknown encoding: "+a)}function e(a){return a.toString(this.encoding)}function f(a){this.charReceived=a.length%2,this.charLength=this.charReceived?2:0}function g(a){this.charReceived=a.length%3,this.charLength=this.charReceived?3:0}var h=a(8).Buffer,i=h.isEncoding||function(a){switch(a&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},j=c.StringDecoder=function(a){switch(this.encoding=(a||"utf8").toLowerCase().replace(/[-_]/,""),d(a),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=f;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=g;break;default:return void(this.write=e)}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};j.prototype.write=function(a){for(var b="";this.charLength;){var c=a.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived<this.charLength)return"";a=a.slice(c,a.length),b=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var d=b.charCodeAt(b.length-1);if(!(d>=55296&&d<=56319)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&d<=56319){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(b<=2&&c>>4==14){this.charLength=3;break}if(b<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{8:8}],8:[function(a,b,c){(function(b){/*!
|
|
|
3 |
* The buffer module from node.js, for the browser.
|
4 |
*
|
5 |
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
6 |
* @license MIT
|
7 |
*/
|
8 |
-
"use strict";function d(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(c){return!1}}function e(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(a){return this instanceof f?(f.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof a?g(this,a):"string"==typeof a?h(this,a,arguments.length>1?arguments[1]:"utf8"):i(this,a)):arguments.length>1?new f(a,arguments[1]):new f(a)}function g(a,b){if(a=p(a,b<0?0:0|q(b)),!f.TYPED_ARRAY_SUPPORT)for(var c=0;c<b;c++)a[c]=0;return a}function h(a,b,c){return"string"==typeof c&&""!==c||(c="utf8"),a=p(a,0|s(b,c)),a.write(b,c),a}function i(a,b){if(f.isBuffer(b))return j(a,b);if(Y(b))return k(a,b);if(null==b)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(b.buffer instanceof ArrayBuffer)return l(a,b);if(b instanceof ArrayBuffer)return m(a,b)}return b.length?n(a,b):o(a,b)}function j(a,b){var c=0|q(b.length);return a=p(a,c),b.copy(a,0,0,c),a}function k(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function m(a,b){return f.TYPED_ARRAY_SUPPORT?(b.byteLength,a=f._augment(new Uint8Array(b))):a=l(a,new Uint8Array(b)),a}function n(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function o(a,b){var c,d=0;"Buffer"===b.type&&Y(b.data)&&(c=b.data,d=0|q(c.length)),a=p(a,d);for(var e=0;e<d;e+=1)a[e]=255&c[e];return a}function p(a,b){return f.TYPED_ARRAY_SUPPORT?(a=f._augment(new Uint8Array(b)),a.__proto__=f.prototype):(a.length=b,a._isBuffer=!0),0!==b&&b<=f.poolSize>>>1&&(a.parent=Z),a}function q(a){if(a>=e())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+e().toString(16)+" bytes");return 0|a}function r(a,b){if(!(this instanceof r))return new r(a,b);var c=new f(a,b);return delete c.parent,c}function s(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return R(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return U(a).length;default:if(d)return R(a).length;b=(""+b).toLowerCase(),d=!0}}function t(a,b,c){var d=!1;if(b|=0,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),b<0&&(b=0),c>this.length&&(c=this.length),c<=b)return"";for(;;)switch(a){case"hex":return F(this,b,c);case"utf8":case"utf-8":return B(this,b,c);case"ascii":return D(this,b,c);case"binary":return E(this,b,c);case"base64":return A(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function u(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d))>e&&(d=e):d=e;var f=b.length;if(f%2!=0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;g<d;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function v(a,b,c,d){return V(R(b,a.length-c),a,c,d)}function w(a,b,c,d){return V(S(b),a,c,d)}function x(a,b,c,d){return w(a,b,c,d)}function y(a,b,c,d){return V(U(b),a,c,d)}function z(a,b,c,d){return V(T(b,a.length-c),a,c,d)}function A(a,b,c){return 0===b&&c===a.length?W.fromByteArray(a):W.fromByteArray(a.slice(b,c))}function B(a,b,c){c=Math.min(a.length,c);for(var d=[],e=b;e<c;){var f=a[e],g=null,h=f>239?4:f>223?3:f>191?2:1;if(e+h<=c){var i,j,k,l;switch(h){case 1:f<128&&(g=f);break;case 2:i=a[e+1],128==(192&i)&&(l=(31&f)<<6|63&i)>127&&(g=l);break;case 3:i=a[e+1],j=a[e+2],128==(192&i)&&128==(192&j)&&(l=(15&f)<<12|(63&i)<<6|63&j)>2047&&(l<55296||l>57343)&&(g=l);break;case 4:i=a[e+1],j=a[e+2],k=a[e+3],128==(192&i)&&128==(192&j)&&128==(192&k)&&(l=(15&f)<<18|(63&i)<<12|(63&j)<<6|63&k)>65535&&l<1114112&&(g=l)}}null===g?(g=65533,h=1):g>65535&&(g-=65536,d.push(g>>>10&1023|55296),g=56320|1023&g),d.push(g),e+=h}return C(d)}function C(a){var b=a.length;if(b<=$)return String.fromCharCode.apply(String,a);for(var c="",d=0;d<b;)c+=String.fromCharCode.apply(String,a.slice(d,d+=$));return c}function D(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;e<c;e++)d+=String.fromCharCode(127&a[e]);return d}function E(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;e<c;e++)d+=String.fromCharCode(a[e]);return d}function F(a,b,c){var d=a.length;(!b||b<0)&&(b=0),(!c||c<0||c>d)&&(c=d);for(var e="",f=b;f<c;f++)e+=Q(a[f]);return e}function G(a,b,c){for(var d=a.slice(b,c),e="",f=0;f<d.length;f+=2)e+=String.fromCharCode(d[f]+256*d[f+1]);return e}function H(a,b,c){if(a%1!=0||a<0)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function I(a,b,c,d,e,g){if(!f.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>e||b<g)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range")}function J(a,b,c,d){b<0&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);e<f;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function K(a,b,c,d){b<0&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);e<f;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function L(a,b,c,d,e,f){if(b>e||b<f)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(c<0)throw new RangeError("index out of range")}function M(a,b,c,d,e){return e||L(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(a,b,c,d,23,4),c+4}function N(a,b,c,d,e){return e||L(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(a,b,c,d,52,8),c+8}function O(a){if(a=P(a).replace(aa,""),a.length<2)return"";for(;a.length%4!=0;)a+="=";return a}function P(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Q(a){return a<16?"0"+a.toString(16):a.toString(16)}function R(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;g<d;g++){if((c=a.charCodeAt(g))>55295&&c<57344){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(c<56320){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=65536+(e-55296<<10|c-56320)}else e&&(b-=3)>-1&&f.push(239,191,189);if(e=null,c<128){if((b-=1)<0)break;f.push(c)}else if(c<2048){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(c<65536){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(c<1114112))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function S(a){for(var b=[],c=0;c<a.length;c++)b.push(255&a.charCodeAt(c));return b}function T(a,b){for(var c,d,e,f=[],g=0;g<a.length&&!((b-=2)<0);g++)c=a.charCodeAt(g),d=c>>8,e=c%256,f.push(e),f.push(d);return f}function U(a){return W.toByteArray(O(a))}function V(a,b,c,d){for(var e=0;e<d&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}var W=a(5),X=a(13),Y=a(23);c.Buffer=f,c.SlowBuffer=r,c.INSPECT_MAX_BYTES=50,f.poolSize=8192;var Z={};f.TYPED_ARRAY_SUPPORT=void 0!==b.TYPED_ARRAY_SUPPORT?b.TYPED_ARRAY_SUPPORT:d(),f.TYPED_ARRAY_SUPPORT?(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array):(f.prototype.length=void 0,f.prototype.parent=void 0),f.isBuffer=function(a){return!(null==a||!a._isBuffer)},f.compare=function(a,b){if(!f.isBuffer(a)||!f.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,e=0,g=Math.min(c,d);e<g&&a[e]===b[e];)++e;return e!==g&&(c=a[e],d=b[e]),c<d?-1:d<c?1:0},f.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(a,b){if(!Y(a))throw new TypeError("list argument must be an Array of Buffers.");if(0===a.length)return new f(0);var c;if(void 0===b)for(b=0,c=0;c<a.length;c++)b+=a[c].length;var d=new f(b),e=0;for(c=0;c<a.length;c++){var g=a[c];g.copy(d,e),e+=g.length}return d},f.byteLength=s,f.prototype.toString=function(){var a=0|this.length;return 0===a?"":0===arguments.length?B(this,0,a):t.apply(this,arguments)},f.prototype.equals=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a||0===f.compare(this,a)},f.prototype.inspect=function(){var a="",b=c.INSPECT_MAX_BYTES;return this.length>0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),"<Buffer "+a+">"},f.prototype.compare=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?0:f.compare(this,a)},f.prototype.indexOf=function(a,b){function c(a,b,c){for(var d=-1,e=0;c+e<a.length;e++)if(a[c+e]===b[-1===d?0:e-d]){if(-1===d&&(d=e),e-d+1===b.length)return c+d}else d=-1;return-1}if(b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b>>=0,0===this.length)return-1;if(b>=this.length)return-1;if(b<0&&(b=Math.max(this.length+b,0)),"string"==typeof a)return 0===a.length?-1:String.prototype.indexOf.call(this,a,b);if(f.isBuffer(a))return c(this,a,b);if("number"==typeof a)return f.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,a,b):c(this,[a],b);throw new TypeError("val must be string, number or Buffer")},f.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},f.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},f.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b|=0,isFinite(c)?(c|=0,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(c<0||b<0)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return u(this,a,b,c);case"utf8":case"utf-8":return v(this,a,b,c);case"ascii":return w(this,a,b,c);case"binary":return x(this,a,b,c);case"base64":return y(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;f.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,a<0?(a+=c)<0&&(a=0):a>c&&(a=c),b<0?(b+=c)<0&&(b=0):b>c&&(b=c),b<a&&(b=a);var d;if(f.TYPED_ARRAY_SUPPORT)d=f._augment(this.subarray(a,b));else{var e=b-a;d=new f(e,void 0);for(var g=0;g<e;g++)d[g]=this[g+a]}return d.length&&(d.parent=this.parent||this),d},f.prototype.readUIntLE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f<b&&(e*=256);)d+=this[a+f]*e;return d},f.prototype.readUIntBE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=this[a+--b],e=1;b>0&&(e*=256);)d+=this[a+--b]*e;return d},f.prototype.readUInt8=function(a,b){return b||H(a,1,this.length),this[a]},f.prototype.readUInt16LE=function(a,b){return b||H(a,2,this.length),this[a]|this[a+1]<<8},f.prototype.readUInt16BE=function(a,b){return b||H(a,2,this.length),this[a]<<8|this[a+1]},f.prototype.readUInt32LE=function(a,b){return b||H(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},f.prototype.readUInt32BE=function(a,b){return b||H(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},f.prototype.readIntLE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f<b&&(e*=256);)d+=this[a+f]*e;return e*=128,d>=e&&(d-=Math.pow(2,8*b)),d},f.prototype.readIntBE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},f.prototype.readInt8=function(a,b){return b||H(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},f.prototype.readInt16LE=function(a,b){b||H(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},f.prototype.readInt16BE=function(a,b){b||H(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},f.prototype.readInt32LE=function(a,b){return b||H(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},f.prototype.readInt32BE=function(a,b){return b||H(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},f.prototype.readFloatLE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!0,23,4)},f.prototype.readFloatBE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!1,23,4)},f.prototype.readDoubleLE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!0,52,8)},f.prototype.readDoubleBE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!1,52,8)},f.prototype.writeUIntLE=function(a,b,c,d){a=+a,b|=0,c|=0,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f<c&&(e*=256);)this[b+f]=a/e&255;return b+c},f.prototype.writeUIntBE=function(a,b,c,d){a=+a,b|=0,c|=0,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=c-1,f=1;for(this[b+e]=255&a;--e>=0&&(f*=256);)this[b+e]=a/f&255;return b+c},f.prototype.writeUInt8=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,1,255,0),f.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=255&a,b+1},f.prototype.writeUInt16LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):J(this,a,b,!0),b+2},f.prototype.writeUInt16BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):J(this,a,b,!1),b+2},f.prototype.writeUInt32LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=255&a):K(this,a,b,!0),b+4},f.prototype.writeUInt32BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):K(this,a,b,!1),b+4},f.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b|=0,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=0,g=1,h=a<0?1:0;for(this[b]=255&a;++f<c&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},f.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b|=0,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=a<0?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},f.prototype.writeInt8=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,1,127,-128),f.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),a<0&&(a=255+a+1),this[b]=255&a,b+1},f.prototype.writeInt16LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):J(this,a,b,!0),b+2},f.prototype.writeInt16BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):J(this,a,b,!1),b+2},f.prototype.writeInt32LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):K(this,a,b,!0),b+4},f.prototype.writeInt32BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):K(this,a,b,!1),b+4},f.prototype.writeFloatLE=function(a,b,c){return M(this,a,b,!0,c)},f.prototype.writeFloatBE=function(a,b,c){return M(this,a,b,!1,c)},f.prototype.writeDoubleLE=function(a,b,c){return N(this,a,b,!0,c)},f.prototype.writeDoubleBE=function(a,b,c){return N(this,a,b,!1,c)},f.prototype.copy=function(a,b,c,d){if(c||(c=0),d||0===d||(d=this.length),b>=a.length&&(b=a.length),b||(b=0),d>0&&d<c&&(d=c),d===c)return 0;if(0===a.length||0===this.length)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("sourceStart out of bounds");if(d<0)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-b<d-c&&(d=a.length-b+c);var e,g=d-c;if(this===a&&c<b&&b<d)for(e=g-1;e>=0;e--)a[e+b]=this[e+c];else if(g<1e3||!f.TYPED_ARRAY_SUPPORT)for(e=0;e<g;e++)a[e+b]=this[e+c];else a._set(this.subarray(c,c+g),b);return g},f.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),c<b)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(b<0||b>=this.length)throw new RangeError("start out of bounds");if(c<0||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;d<c;d++)this[d]=a;else{var e=R(a.toString()),f=e.length;for(d=b;d<c;d++)this[d]=e[d%f]}return this}},f.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(f.TYPED_ARRAY_SUPPORT)return new f(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;b<c;b+=1)a[b]=this[b];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var _=f.prototype;f._augment=function(a){return a.constructor=f,a._isBuffer=!0,a._set=a.set,a.get=_.get,a.set=_.set,a.write=_.write,a.toString=_.toString,a.toLocaleString=_.toString,a.toJSON=_.toJSON,a.equals=_.equals,a.compare=_.compare,a.indexOf=_.indexOf,a.copy=_.copy,a.slice=_.slice,a.readUIntLE=_.readUIntLE,a.readUIntBE=_.readUIntBE,a.readUInt8=_.readUInt8,a.readUInt16LE=_.readUInt16LE,a.readUInt16BE=_.readUInt16BE,a.readUInt32LE=_.readUInt32LE,a.readUInt32BE=_.readUInt32BE,a.readIntLE=_.readIntLE,a.readIntBE=_.readIntBE,a.readInt8=_.readInt8,a.readInt16LE=_.readInt16LE,a.readInt16BE=_.readInt16BE,a.readInt32LE=_.readInt32LE,a.readInt32BE=_.readInt32BE,a.readFloatLE=_.readFloatLE,a.readFloatBE=_.readFloatBE,a.readDoubleLE=_.readDoubleLE,a.readDoubleBE=_.readDoubleBE,a.writeUInt8=_.writeUInt8,a.writeUIntLE=_.writeUIntLE,a.writeUIntBE=_.writeUIntBE,a.writeUInt16LE=_.writeUInt16LE,a.writeUInt16BE=_.writeUInt16BE,a.writeUInt32LE=_.writeUInt32LE,a.writeUInt32BE=_.writeUInt32BE,a.writeIntLE=_.writeIntLE,a.writeIntBE=_.writeIntBE,a.writeInt8=_.writeInt8,a.writeInt16LE=_.writeInt16LE,a.writeInt16BE=_.writeInt16BE,a.writeInt32LE=_.writeInt32LE,a.writeInt32BE=_.writeInt32BE,a.writeFloatLE=_.writeFloatLE,a.writeFloatBE=_.writeFloatBE,a.writeDoubleLE=_.writeDoubleLE,a.writeDoubleBE=_.writeDoubleBE,a.fill=_.fill,a.inspect=_.inspect,a.toArrayBuffer=_.toArrayBuffer,a};var aa=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{13:13,23:23,5:5}],9:[function(a,b,c){/*! codem-isoboxer v0.3.5 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
|
9 |
-
var d={};d.parseBuffer=function(a){return new e(a).parse()},d.addBoxProcessor=function(a,b){"string"==typeof a&&"function"==typeof b&&(f.prototype._boxProcessors[a]=b)},d.createFile=function(){return new e},d.createBox=function(a,b,c){var d=f.create(a);return b&&b.append(d,c),d},d.createFullBox=function(a,b,c){var e=d.createBox(a,b,c);return e.version=0,e.flags=0,e},d.Utils={},d.Utils.dataViewToString=function(a,b){var c=b||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(c).decode(a);var d=[],e=0;if("utf-8"===c)for(;e<a.byteLength;){var f=a.getUint8(e++);f<128||(f<224?(f=(31&f)<<6,f|=63&a.getUint8(e++)):f<240?(f=(15&f)<<12,f|=(63&a.getUint8(e++))<<6,f|=63&a.getUint8(e++)):(f=(7&f)<<18,f|=(63&a.getUint8(e++))<<12,f|=(63&a.getUint8(e++))<<6,f|=63&a.getUint8(e++))),d.push(String.fromCharCode(f))}else for(;e<a.byteLength;)d.push(String.fromCharCode(a.getUint8(e++)));return d.join("")},d.Utils.utf8ToByteArray=function(a){var b,c;if("undefined"!=typeof TextEncoder)b=(new TextEncoder).encode(a);else for(b=[],c=0;c<a.length;++c){var d=a.charCodeAt(c);d<128?b.push(d):d<2048?(b.push(192|d>>6),b.push(128|63&d)):d<65536?(b.push(224|d>>12),b.push(128|63&d>>6),b.push(128|63&d)):(b.push(240|d>>18),b.push(128|63&d>>12),b.push(128|63&d>>6),b.push(128|63&d))}return b},d.Utils.appendBox=function(a,b,c){if(b._offset=a._cursor.offset,b._root=a._root?a._root:a,b._raw=a._raw,b._parent=a,-1!==c){if(void 0===c||null===c)return void a.boxes.push(b);var d,e=-1;if("number"==typeof c)e=c;else{if("string"==typeof c)d=c;else{if("object"!=typeof c||!c.type)return void a.boxes.push(b);d=c.type}for(var f=0;f<a.boxes.length;f++)if(d===a.boxes[f].type){e=f+1;break}}a.boxes.splice(e,0,b)}},void 0!==c&&(c.parseBuffer=d.parseBuffer,c.addBoxProcessor=d.addBoxProcessor,c.createFile=d.createFile,c.createBox=d.createBox,c.createFullBox=d.createFullBox,c.Utils=d.Utils),d.Cursor=function(a){this.offset=void 0===a?0:a};var e=function(a){this._cursor=new d.Cursor,this.boxes=[],a&&(this._raw=new DataView(a))};e.prototype.fetch=function(a){var b=this.fetchAll(a,!0);return b.length?b[0]:null},e.prototype.fetchAll=function(a,b){var c=[];return e._sweep.call(this,a,c,b),c},e.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var a=f.parse(this);if(void 0===a.type)break;this.boxes.push(a)}return this},e._sweep=function(a,b,c){this.type&&this.type==a&&b.push(this);for(var d in this.boxes){if(b.length&&c)return;e._sweep.call(this.boxes[d],a,b,c)}},e.prototype.write=function(){var a,b=0;for(a=0;a<this.boxes.length;a++)b+=this.boxes[a].getLength(!1);var c=new Uint8Array(b);for(this._rawo=new DataView(c.buffer),this.bytes=c,this._cursor.offset=0,a=0;a<this.boxes.length;a++)this.boxes[a].write();return c.buffer},e.prototype.append=function(a,b){d.Utils.appendBox(this,a,b)};var f=function(){this._cursor=new d.Cursor};f.parse=function(a){var b=new f;return b._offset=a._cursor.offset,b._root=a._root?a._root:a,b._raw=a._raw,b._parent=a,b._parseBox(),a._cursor.offset=b._raw.byteOffset+b._raw.byteLength,b},f.create=function(a){var b=new f;return b.type=a,b.boxes=[],b},f.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],f.prototype._boxProcessors={},f.prototype._procField=function(a,b,c){this._parsing?this[a]=this._readField(b,c):this._writeField(b,c,this[a])},f.prototype._procFieldArray=function(a,b,c,d){var e;if(this._parsing)for(this[a]=[],e=0;e<b;e++)this[a][e]=this._readField(c,d);else for(e=0;e<this[a].length;e++)this._writeField(c,d,this[a][e])},f.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},f.prototype._procEntries=function(a,b,c){var d;if(this._parsing)for(this[a]=[],d=0;d<b;d++)this[a].push({}),c.call(this,this[a][d]);else for(d=0;d<b;d++)c.call(this,this[a][d])},f.prototype._procSubEntries=function(a,b,c,d){var e;if(this._parsing)for(a[b]=[],e=0;e<c;e++)a[b].push({}),d.call(this,a[b][e]);else for(e=0;e<c;e++)d.call(this,a[b][e])},f.prototype._procEntryField=function(a,b,c,d){this._parsing?a[b]=this._readField(c,d):this._writeField(c,d,a[b])},f.prototype._procSubBoxes=function(a,b){var c;if(this._parsing)for(this[a]=[],c=0;c<b;c++)this[a].push(f.parse(this));else for(c=0;c<b;c++)this._rawo?this[a][c].write():this.size+=this[a][c].getLength()},f.prototype._readField=function(a,b){switch(a){case"uint":return this._readUint(b);case"int":return this._readInt(b);case"template":return this._readTemplate(b);case"string":return-1===b?this._readTerminatedString():this._readString(b);case"data":return this._readData(b);case"utf8":return this._readUTF8String();default:return-1}},f.prototype._readInt=function(a){var b=null,c=this._cursor.offset-this._raw.byteOffset;switch(a){case 8:b=this._raw.getInt8(c);break;case 16:b=this._raw.getInt16(c);break;case 32:b=this._raw.getInt32(c);break;case 64:var d=this._raw.getInt32(c),e=this._raw.getInt32(c+4);b=d*Math.pow(2,32)+e}return this._cursor.offset+=a>>3,b},f.prototype._readUint=function(a){var b,c,d=null,e=this._cursor.offset-this._raw.byteOffset;switch(a){case 8:d=this._raw.getUint8(e);break;case 16:d=this._raw.getUint16(e);break;case 24:b=this._raw.getUint16(e),c=this._raw.getUint8(e+2),d=(b<<8)+c;break;case 32:d=this._raw.getUint32(e);break;case 64:b=this._raw.getUint32(e),c=this._raw.getUint32(e+4),d=b*Math.pow(2,32)+c}return this._cursor.offset+=a>>3,d},f.prototype._readString=function(a){for(var b="",c=0;c<a;c++){var d=this._readUint(8);b+=String.fromCharCode(d)}return b},f.prototype._readTemplate=function(a){return this._readUint(a/2)+this._readUint(a/2)/Math.pow(2,a/2)},f.prototype._readTerminatedString=function(){for(var a="";this._cursor.offset-this._offset<this._raw.byteLength;){var b=this._readUint(8);if(0===b)break;a+=String.fromCharCode(b)}return a},f.prototype._readData=function(a){var b=a>0?a:this._raw.byteLength-(this._cursor.offset-this._offset);if(b>0){var c=new Uint8Array(this._raw.buffer,this._cursor.offset,b);return this._cursor.offset+=b,c}return null},f.prototype._readUTF8String=function(){var a=this._raw.byteLength-(this._cursor.offset-this._offset),b=null;return a>0&&(b=new DataView(this._raw.buffer,this._cursor.offset,a),this._cursor.offset+=a),b?d.Utils.dataViewToString(b):b},f.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)return void(this._root._incomplete=!0);switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset+8);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())},f.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},f.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(f.parse(this))},f.prototype.append=function(a,b){d.Utils.appendBox(this,a,b)},f.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var a=0;a<this.boxes.length;a++)this.size+=this.boxes[a].getLength();return this._data&&this._writeData(this._data),this.size},f.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var a=0;a<this.boxes.length;a++)this.boxes[a].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},f.prototype._writeInt=function(a,b){if(this._rawo){var c=this._cursor.offset-this._rawo.byteOffset;switch(a){case 8:this._rawo.setInt8(c,b);break;case 16:this._rawo.setInt16(c,b);break;case 32:this._rawo.setInt32(c,b);break;case 64:var d=Math.floor(b/Math.pow(2,32)),e=b-d*Math.pow(2,32);this._rawo.setUint32(c,d),this._rawo.setUint32(c+4,e)}this._cursor.offset+=a>>3}else this.size+=a>>3},f.prototype._writeUint=function(a,b){if(this._rawo){var c,d,e=this._cursor.offset-this._rawo.byteOffset;switch(a){case 8:this._rawo.setUint8(e,b);break;case 16:this._rawo.setUint16(e,b);break;case 24:c=(16776960&b)>>8,d=255&b,this._rawo.setUint16(e,c),this._rawo.setUint8(e+2,d);break;case 32:this._rawo.setUint32(e,b);break;case 64:c=Math.floor(b/Math.pow(2,32)),d=b-c*Math.pow(2,32),this._rawo.setUint32(e,c),this._rawo.setUint32(e+4,d)}this._cursor.offset+=a>>3}else this.size+=a>>3},f.prototype._writeString=function(a,b){for(var c=0;c<a;c++)this._writeUint(8,b.charCodeAt(c))},f.prototype._writeTerminatedString=function(a){if(0!==a.length){for(var b=0;b<a.length;b++)this._writeUint(8,a.charCodeAt(b));this._writeUint(8,0)}},f.prototype._writeTemplate=function(a,b){var c=Math.floor(b),d=(b-c)*Math.pow(2,a/2);this._writeUint(a/2,c),this._writeUint(a/2,d)},f.prototype._writeData=function(a){var b;if(a)if(this._rawo){if(a instanceof Array){for(var c=this._cursor.offset-this._rawo.byteOffset,b=0;b<a.length;b++)this._rawo.setInt8(c+b,a[b]);this._cursor.offset+=a.length}a instanceof Uint8Array&&(this._root.bytes.set(a,this._cursor.offset),this._cursor.offset+=a.length)}else this.size+=a.length},f.prototype._writeUTF8String=function(a){var b=d.Utils.utf8ToByteArray(a);if(this._rawo)for(var c=new DataView(this._rawo.buffer,this._cursor.offset,b.length),e=0;e<b.length;e++)c.setUint8(e,b[e]);else this.size+=b.length},f.prototype._writeField=function(a,b,c){switch(a){case"uint":this._writeUint(b,c);break;case"int":this._writeInt(b,c);break;case"template":this._writeTemplate(b,c);break;case"string":-1==b?this._writeTerminatedString(c):this._writeString(b,c);break;case"data":this._writeData(c);break;case"utf8":this._writeUTF8String(c)}},f.prototype._boxProcessors.avc1=f.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},f.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},f.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(a){this._procEntryField(a,"segment_duration","uint",1===this.version?64:32),this._procEntryField(a,"media_time","int",1===this.version?64:32),this._procEntryField(a,"media_rate_integer","int",16),this._procEntryField(a,"media_rate_fraction","int",16)})},f.prototype._boxProcessors.emsg=function(){this._procFullBox(),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("message_data","data",-1)},f.prototype._boxProcessors.free=f.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},f.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},f.prototype._boxProcessors.ftyp=f.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var a=-1;this._parsing&&(a=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",a,"string",4)},f.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},f.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},f.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},f.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},f.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},f.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},f.prototype._boxProcessors.mp4a=f.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},f.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},f.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},f.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},f.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},f.prototype._boxProcessors.sdtp=function(){this._procFullBox();var a=-1;this._parsing&&(a=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",a,"uint",8)},f.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(a){this._parsing||(a.reference=(1&a.reference_type)<<31,a.reference|=2147483647&a.referenced_size,a.sap=(1&a.starts_with_SAP)<<31,a.sap|=(3&a.SAP_type)<<28,a.sap|=268435455&a.SAP_delta_time),this._procEntryField(a,"reference","uint",32),this._procEntryField(a,"subsegment_duration","uint",32),this._procEntryField(a,"sap","uint",32),this._parsing&&(a.reference_type=a.reference>>31&1,a.referenced_size=2147483647&a.reference,a.starts_with_SAP=a.sap>>31&1,a.SAP_type=a.sap>>28&7,a.SAP_delta_time=268435455&a.sap)})},f.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},f.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(a){this._procEntryField(a,"ranges_count","uint",32),this._procSubEntries(a,"ranges",a.ranges_count,function(a){this._procEntryField(a,"level","uint",8),this._procEntryField(a,"range_size","uint",24)})})},f.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},f.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(a){this._procEntryField(a,"sample_delta","uint",32),this._procEntryField(a,"subsample_count","uint",16),this._procSubEntries(a,"subsamples",a.subsample_count,function(a){this._procEntryField(a,"subsample_size","uint",1===this.version?32:16),this._procEntryField(a,"subsample_priority","uint",8),this._procEntryField(a,"discardable","uint",8),this._procEntryField(a,"codec_specific_parameters","uint",32)})})},f.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},f.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},f.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},f.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(a){this._procEntryField(a,"time","uint",1===this.version?64:32),this._procEntryField(a,"moof_offset","uint",1===this.version?64:32),this._procEntryField(a,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(a,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(a,"sample_number","uint",8*(this.length_size_of_sample_num+1))})},f.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},f.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},f.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(a){256&this.flags&&this._procEntryField(a,"sample_duration","uint",32),512&this.flags&&this._procEntryField(a,"sample_size","uint",32),1024&this.flags&&this._procEntryField(a,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(a,"sample_composition_time_offset",1===this.version?"int":"uint",32)})},f.prototype._boxProcessors["url "]=f.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},f.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},f.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},f.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},f.prototype._boxProcessors.vtte=function(){}},{}],10:[function(a,b,c){(function(a){function b(a){return Array.isArray?Array.isArray(a):"[object Array]"===q(a)}function d(a){return"boolean"==typeof a}function e(a){return null===a}function f(a){return null==a}function g(a){return"number"==typeof a}function h(a){return"string"==typeof a}function i(a){return"symbol"==typeof a}function j(a){return void 0===a}function k(a){return"[object RegExp]"===q(a)}function l(a){return"object"==typeof a&&null!==a}function m(a){return"[object Date]"===q(a)}function n(a){return"[object Error]"===q(a)||a instanceof Error}function o(a){return"function"==typeof a}function p(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||void 0===a}function q(a){return Object.prototype.toString.call(a)}c.isArray=b,c.isBoolean=d,c.isNull=e,c.isNullOrUndefined=f,c.isNumber=g,c.isString=h,c.isSymbol=i,c.isUndefined=j,c.isRegExp=k,c.isObject=l,c.isDate=m,c.isError=n,c.isFunction=o,c.isPrimitive=p,c.isBuffer=a.isBuffer}).call(this,{isBuffer:a(22)})},{22:22}],11:[function(a,b,c){function d(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function e(a){return"function"==typeof a}function f(a){return"number"==typeof a}function g(a){return"object"==typeof a&&null!==a}function h(a){return void 0===a}b.exports=d,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._maxListeners=void 0,d.defaultMaxListeners=10,d.prototype.setMaxListeners=function(a){if(!f(a)||a<0||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},d.prototype.emit=function(a){var b,c,d,f,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||g(this._events.error)&&!this._events.error.length)){if((b=arguments[1])instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],h(c))return!1;if(e(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(d=arguments.length,f=new Array(d-1),i=1;i<d;i++)f[i-1]=arguments[i];c.apply(this,f)}else if(g(c)){for(d=arguments.length,f=new Array(d-1),i=1;i<d;i++)f[i-1]=arguments[i];for(j=c.slice(),d=j.length,i=0;i<d;i++)j[i].apply(this,f)}return!0},d.prototype.addListener=function(a,b){var c;if(!e(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,e(b.listener)?b.listener:b),this._events[a]?g(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,g(this._events[a])&&!this._events[a].warned){var c;c=h(this._maxListeners)?d.defaultMaxListeners:this._maxListeners,c&&c>0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())}return this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){function c(){this.removeListener(a,c),d||(d=!0,b.apply(this,arguments))}if(!e(b))throw TypeError("listener must be a function");var d=!1;return c.listener=b,this.on(a,c),this},d.prototype.removeListener=function(a,b){var c,d,f,h;if(!e(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,d=-1,c===b||e(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(g(c)){for(h=f;h-- >0;)if(c[h]===b||c[h].listener&&c[h].listener===b){d=h;break}if(d<0)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(d,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},d.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],e(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},d.prototype.listeners=function(a){return this._events&&this._events[a]?e(this._events[a])?[this._events[a]]:this._events[a].slice():[]},d.listenerCount=function(a,b){return a._events&&a._events[b]?e(a._events[b])?1:a._events[b].length:0}},{}],12:[function(a,b,c){"use strict";var d=Array.isArray,e=Object.keys,f=Object.prototype.hasOwnProperty;b.exports=function a(b,c){if(b===c)return!0;var g,h,i,j=d(b),k=d(c);if(j&&k){if((h=b.length)!=c.length)return!1;for(g=0;g<h;g++)if(!a(b[g],c[g]))return!1;return!0}if(j!=k)return!1;var l=b instanceof Date,m=c instanceof Date;if(l!=m)return!1;if(l&&m)return b.getTime()==c.getTime();var n=b instanceof RegExp,o=c instanceof RegExp;if(n!=o)return!1;if(n&&o)return b.toString()==c.toString();if(b instanceof Object&&c instanceof Object){var p=e(b);if((h=p.length)!==e(c).length)return!1;for(g=0;g<h;g++)if(!f.call(c,p[g]))return!1;for(g=0;g<h;g++)if(i=p[g],!a(b[i],c[i]))return!1;return!0}return!1}},{}],13:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<<h)-1,j=i>>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<<j)-1,l=k>>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=b<0||0===b&&1/b<0?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<<e|h,j+=e;j>0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],14:[function(a,b,c){!function(a,b,c,d,e){function f(a){this.node=a}function g(){this.events=[],this.head=null,this.body=null}function h(){this.styling=null,this.layout=null}function i(){this.styles={}}function j(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function k(){this.regions={}}function l(a){this.kind=a,this.begin=null,this.end=null,this.styleAttrs=null,this.regionID=null,this.sets=null,this.timeContainer=null}function m(){l.call(this,"body")}function n(){l.call(this,"div")}function o(){l.call(this,"p")}function p(){l.call(this,"span"),this.space=null}function q(){l.call(this,"span"),this.space=null,this.text=null}function r(){l.call(this,"br")}function s(){this.id=null,this.begin=null,this.end=null,this.styleAttrs=null,this.sets=null}function t(){this.begin=null,this.end=null,this.qname=null,this.value=null}function u(a){return a&&"xml:id"in a.attributes?a.attributes["xml:id"].value||null:null}function v(a){return a&&"region"in a.attributes?a.attributes.region.value:""}function w(a,b){var c=a&&"timeContainer"in a.attributes?a.attributes.timeContainer.value:null;return c&&"par"!==c?"seq"===c?"seq":(K(b,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}function x(a){return a&&"style"in a.attributes?a.attributes.style.value.split(" "):[]}function y(a,b){var c={};if(null!==a)for(var e in a.attributes){var f=a.attributes[e].uri+" "+a.attributes[e].local,g=d.byQName[f];if(void 0!==g){var h=g.parse(a.attributes[e].value);null!==h?(c[f]=h,g===d.byName.zIndex&&J(b,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):K(b,"Cannot parse styling attribute "+f+" --\x3e "+a.attributes[e].value)}}return c}function z(a,b,c){for(var d in a.attributes)if(a.attributes[d].uri===b&&a.attributes[d].local===c)return a.attributes[d].value;return null}function A(a,b){var d=z(a,c.ns_ittp,"aspectRatio"),e=null;if(null!==d){var f=/(\d+) (\d+)/,g=f.exec(d);if(null!==g){var h=parseInt(g[1]),i=parseInt(g[2]);0!==h&&0!==i?e=h/i:K(b,"Illegal aspectRatio values (ignoring)")}else K(b,"Malformed aspectRatio attribute (ignoring)")}return e}function B(a,b){var d=z(a,c.ns_ttp,"cellResolution"),e=15,f=32;if(null!==d){var g=/(\d+) (\d+)/,h=g.exec(d);null!==h?(f=parseInt(h[1]),e=parseInt(h[2])):J(b,"Malformed cellResolution value (using initial value instead)")}return{w:f,h:e}}function C(a,b){var d,e=z(a,c.ns_ttp,"frameRate"),f=30;if(null!==e){d=/(\d+)/.exec(e),null!==d?f=parseInt(d[1]):J(b,"Malformed frame rate attribute (using initial value instead)")}var g=z(a,c.ns_ttp,"frameRateMultiplier"),h=1;if(null!==g){d=/(\d+) (\d+)/.exec(g),null!==d?h=parseInt(d[1])/parseInt(d[2]):J(b,"Malformed frame rate multiplier attribute (using initial value instead)")}var i=h*f,j=1,k=z(a,c.ns_ttp,"tickRate");if(null===k)null!==e&&(j=i);else{d=/(\d+)/.exec(k),null!==d?j=parseInt(d[1]):J(b,"Malformed tick rate attribute (using initial value instead)")}return{effectiveFrameRate:i,tickRate:j}}function D(a,b){var d=z(a,c.ns_tts,"extent");if(null===d)return null;var f=d.split(" ");if(2!==f.length)return J(b,"Malformed extent (ignoring)"),null;var g=e.parseLength(f[0]),h=e.parseLength(f[1]);return h&&g?{h:h,w:g}:(J(b,"Malformed extent values (ignoring)"),null)}function E(a,b,c){
|
10 |
-
var d,e=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/,f=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/,g=/^(\d+(?:\.\d+)?)f$/,h=/^(\d+(?:\.\d+)?)t$/,i=/^(\d+(?:\.\d+)?)ms$/,j=/^(\d+(?:\.\d+)?)s$/,k=/^(\d+(?:\.\d+)?)h$/,l=/^(\d+(?:\.\d+)?)m$/,m=null;return null!==(d=g.exec(c))?null!==b&&(m=parseFloat(d[1])/b):null!==(d=h.exec(c))?null!==a&&(m=parseFloat(d[1])/a):null!==(d=i.exec(c))?m=parseFloat(d[1])/1e3:null!==(d=j.exec(c))?m=parseFloat(d[1]):null!==(d=k.exec(c))?m=3600*parseFloat(d[1]):null!==(d=l.exec(c))?m=60*parseFloat(d[1]):null!==(d=e.exec(c))?m=3600*parseInt(d[1])+60*parseInt(d[2])+parseFloat(d[3]):null!==(d=f.exec(c))&&null!==b&&(m=3600*parseInt(d[1])+60*parseInt(d[2])+parseInt(d[3])+(null===d[4]?0:parseInt(d[4])/b)),m}function F(a,b,c,d){var e=b&&"seq"===b.timeContainer,f=0;c&&"begin"in c.attributes&&null===(f=E(a.tickRate,a.effectiveFrameRate,c.attributes.begin.value))&&(J(d,"Malformed begin value "+c.attributes.begin.value+" (using 0)"),f=0);var g=e?0:null;c&&"dur"in c.attributes&&null===(g=E(a.tickRate,a.effectiveFrameRate,c.attributes.dur.value))&&J(d,"Malformed dur value "+c.attributes.dur.value+" (ignoring)");var h=null;c&&"end"in c.attributes&&null===(h=E(a.tickRate,a.effectiveFrameRate,c.attributes.end.value))&&J(d,"Malformed end value (ignoring)");var i=0;if(b&&(i=e&&"contents"in b&&b.contents.length>0?b.contents[b.contents.length-1].end:b.begin||0),f+=i,null!==g)h=f+g;else{var j=b&&"end"in b?b.end:Number.POSITIVE_INFINITY;h=null!==h?h+i:j}return{begin:f,end:h}}function G(a,b,c){for(;b.styleRefs.length>0;){var d=b.styleRefs.pop();d in a.styles?(G(a,a.styles[d],c),I(a.styles[d].styleAttrs,b.styleAttrs)):K(c,"Non-existant style id referenced")}}function H(a,b,c,d){for(var e=b.length-1;e>=0;e--){var f=b[e];f in a.styles?I(a.styles[f].styleAttrs,c):K(d,"Non-existant style id referenced")}}function I(a,b){for(var c in a)c in b||(b[c]=a[c])}function J(a,b){if(a&&a.warn&&a.warn(b))throw b}function K(a,b){if(a&&a.error&&a.error(b))throw b}function L(a,b){throw a&&a.fatal&&a.fatal(b),b}function M(a,b){for(var c,d=0,e=a.length-1;d<=e;){c=Math.floor((d+e)/2);var f=a[c];if(f<b)d=c+1;else{if(!(f>b))return{found:!0,index:c};e=c-1}}return{found:!1,index:d}}a.fromXML=function(a,d,e){var l=b.parser(!0,{xmlns:!0}),u=[],v=[],w=[],x=0,y=null;l.onclosetag=function(a){if(u[0]instanceof i)for(var b in u[0].styles)G(u[0],u[0].styles[b],d);else if(u[0]instanceof o||u[0]instanceof p){if(u[0].contents.length>1){var g,h=[u[0].contents[0]];for(g=1;g<u[0].contents.length;g++)u[0].contents[g]instanceof q&&h[h.length-1]instanceof q?h[h.length-1].text+=u[0].contents[g].text:h.push(u[0].contents[g]);u[0].contents=h}u[0]instanceof p&&1===u[0].contents.length&&u[0].contents[0]instanceof q&&null===u[0].text&&(u[0].text=u[0].contents[0].text,delete u[0].contents)}else u[0]instanceof f&&(u[0].node.uri===c.ns_tt&&"metadata"===u[0].node.local?x--:x>0&&e&&"onCloseTag"in e&&e.onCloseTag());w.shift(),v.shift(),u.shift()},l.ontext=function(a){if(void 0===u[0]);else if(u[0]instanceof p||u[0]instanceof o){var b=new q;b.initFromText(y,u[0],a,w[0],d),u[0].contents.push(b)}else u[0]instanceof f&&x>0&&e&&"onText"in e&&e.onText(a)},l.onopentag=function(a){var b=a.attributes["xml:space"];b?w.unshift(b.value):0===w.length?w.unshift("default"):w.unshift(w[0]);var l=a.attributes["xml:lang"];if(l?v.unshift(l.value):0===v.length?v.unshift(""):v.unshift(v[0]),a.uri===c.ns_tt)if("tt"===a.local)null!==y&&L("Two <tt> elements at ("+this.line+","+this.column+")"),y=new g,y.initFromNode(a,d),u.unshift(y);else if("head"===a.local)u[0]instanceof g||L("Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),null!==y.head&&L("Second <head> element at ("+this.line+","+this.column+")"),y.head=new h,u.unshift(y.head);else if("styling"===a.local)u[0]instanceof h||L("Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),null!==y.head.styling&&L("Second <styling> element at ("+this.line+","+this.column+")"),y.head.styling=new i,u.unshift(y.head.styling);else if("style"===a.local){var q;u[0]instanceof i?(q=new j,q.initFromNode(a,d),q.id?y.head.styling.styles[q.id]=q:K("<style> element missing @id attribute"),u.unshift(q)):u[0]instanceof s?(q=new j,q.initFromNode(a,d),I(q.styleAttrs,u[0].styleAttrs),u.unshift(q)):L(d,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("layout"===a.local)u[0]instanceof h||L(d,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),null!==y.head.layout&&L(d,"Second <layout> element at "+this.line+","+this.column+")"),y.head.layout=new k,u.unshift(y.head.layout);else if("region"===a.local){u[0]instanceof k||L(d,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var z=new s;z.initFromNode(y,a,d),!z.id||z.id in y.head.layout.regions?K(d,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):(y.head.layout.regions[z.id]=z,y._registerEvent(z)),u.unshift(z)}else if("body"===a.local){u[0]instanceof g||L(d,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==y.body&&L(d,"Second <body> element at "+this.line+","+this.column+")");var A=new m;A.initFromNode(y,a,d),y._registerEvent(A),y.body=A,u.unshift(A)}else if("div"===a.local){u[0]instanceof n||u[0]instanceof m||L(d,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var B=new n;B.initFromNode(y,u[0],a,d),y._registerEvent(B),u[0].contents.push(B),u.unshift(B)}else if("p"===a.local){u[0]instanceof n||L(d,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var C=new o;C.initFromNode(y,u[0],a,d),y._registerEvent(C),u[0].contents.push(C),u.unshift(C)}else if("span"===a.local){u[0]instanceof p||u[0]instanceof o||L(d,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var D=new p;D.initFromNode(y,u[0],a,w[0],d),y._registerEvent(D),u[0].contents.push(D),u.unshift(D)}else if("br"===a.local){u[0]instanceof p||u[0]instanceof o||L(d,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var E=new r;E.initFromNode(y,u[0],a,d),y._registerEvent(E),u[0].contents.push(E),u.unshift(E)}else if("set"===a.local){u[0]instanceof p||u[0]instanceof o||u[0]instanceof n||u[0]instanceof m||u[0]instanceof s||u[0]instanceof r||L(d,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var F=new t;F.initFromNode(y,u[0],a,d),y._registerEvent(F),u[0].sets.push(F),u.unshift(F)}else u.unshift(new f(a));else u.unshift(new f(a));if(u[0]instanceof f)if(a.uri===c.ns_tt&&"metadata"===a.local)x++;else if(x>0&&e&&"onOpenTag"in e){var G=[];for(var H in a.attributes)G[a.attributes[H].uri+" "+a.attributes[H].local]={uri:a.attributes[H].uri,local:a.attributes[H].local,value:a.attributes[H].value};e.onOpenTag(a.uri,a.local,G)}},l.write(a).close(),null!==y.head?delete y.head.styling:y.head=new h,null===y.head.layout&&(y.head.layout=new k);var z=!1;for(var A in y.head.layout.regions){z=!0;break}if(!z){var B=s.createDefaultRegion();y.head.layout.regions[B.id]=B}return y},g.prototype.initFromNode=function(a,b){this.cellResolution=B(a,b);var d=C(a,b);this.effectiveFrameRate=d.effectiveFrameRate,this.tickRate=d.tickRate,this.aspectRatio=A(a,b);var e=z(a,c.ns_ttp,"timeBase");null!==e&&"media"!==e&&L(b,"Unsupported time base");var f=D(a,b);null===f?this.pxDimensions={h:480,w:640}:("px"===f.h.unit&&"px"===f.w.unit||L(b,"Extent on TT must be in px or absent"),this.pxDimensions={h:f.h.value,w:f.w.value})},g.prototype._registerEvent=function(a){if(!(a.end<=a.begin)){var b=M(this.events,a.begin);if(b.found||this.events.splice(b.index,0,a.begin),a.end!==Number.POSITIVE_INFINITY){var c=M(this.events,a.end);c.found||this.events.splice(c.index,0,a.end)}}},g.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},g.prototype.getMediaTimeEvents=function(){return this.events},j.prototype.initFromNode=function(a,b){this.id=u(a),this.styleAttrs=y(a,b),this.styleRefs=x(a)},l.prototype.initFromNode=function(a,b,c,d){var e=F(a,b,c,d);this.begin=e.begin,this.end=e.end,this.styleAttrs=y(c,d),null!==a.head&&null!==a.head.styling&&H(a.head.styling,x(c),this.styleAttrs,d),this.regionID=v(c),this.sets=[],this.timeContainer=w(c,d)},m.prototype.initFromNode=function(a,b,c){l.prototype.initFromNode.call(this,a,null,b,c),this.contents=[]},n.prototype.initFromNode=function(a,b,c,d){l.prototype.initFromNode.call(this,a,b,c,d),this.contents=[]},o.prototype.initFromNode=function(a,b,c,d){l.prototype.initFromNode.call(this,a,b,c,d),this.contents=[]},p.prototype.initFromNode=function(a,b,c,d,e){l.prototype.initFromNode.call(this,a,b,c,e),this.space=d,this.contents=[]},q.prototype.initFromText=function(a,b,c,d,e){l.prototype.initFromNode.call(this,a,b,null,e),this.text=c,this.space=d},r.prototype.initFromNode=function(a,b,c,d){l.prototype.initFromNode.call(this,a,b,c,d)},s.createDefaultRegion=function(){var a=new s;return a.id="",a.begin=0,a.end=Number.POSITIVE_INFINITY,a.styleAttrs={},a.sets=[],a},s.prototype.initFromNode=function(a,b,c){this.id=u(b);var d=F(a,null,b,c);this.begin=d.begin,this.end=d.end,this.styleAttrs=y(b,c),this.sets=[],null!==a.head&&null!==a.head.styling&&H(a.head.styling,x(b),this.styleAttrs,c)},t.prototype.initFromNode=function(a,b,c,d){var e=F(a,b,c,d);this.begin=e.begin,this.end=e.end;var f=y(c,d);for(var g in f){if(this.qname){K(d,"More than one style specified on set");break}this.qname=g,this.value=f[g]}}}(void 0===c?this.imscDoc={}:c,"undefined"==typeof sax?a(40):sax,"undefined"==typeof imscNames?a(18):imscNames,"undefined"==typeof imscStyles?a(19):imscStyles,"undefined"==typeof imscUtils?a(20):imscUtils)},{18:18,19:19,20:20,40:40}],15:[function(a,b,c){!function(a,b,c){function d(a,b,h){var j;if("region"===h.kind?(j=document.createElement("div"),j.style.position="absolute"):"body"===h.kind?j=document.createElement("div"):"div"===h.kind?j=document.createElement("div"):"p"===h.kind?j=document.createElement("p"):"span"===h.kind?j=document.createElement("span"):"br"===h.kind&&(j=document.createElement("br")),!j)return void n(a.errorHandler,"Error processing ISD element kind: "+h.kind);j.style.margin="0";for(var k in o){var l=o[k],m=h.styleAttrs[l.qname];void 0!==m&&null!==l.map&&l.map(a,j,h,m)}var p=j,q=h.styleAttrs[c.byName.multiRowAlign.qname];if(q&&"auto"!==q){var r=document.createElement("span");r.style.display="inline-block",r.style.textAlign=q,j.appendChild(r),p=r,a.mra=q}var s=h.styleAttrs[c.byName.linePadding.qname];if(s&&s>0&&(a.lp=s),"span"===h.kind&&h.text)if(a.lp||a.mra)for(var t=0;t<h.text.length;t++){var u=document.createElement("span");u.textContent=h.text.charAt(t),j.appendChild(u)}else j.textContent=h.text;b.appendChild(j);for(var v in h.contents)d(a,p,h.contents[v]);if((a.lp||a.mra)&&"p"===h.kind){var w=[];f(p,w,"red"),i(w,a.lp*a.h),a.lp&&delete a.lp,a.mra&&delete a.mra}if("region"===h.kind){var x=[];g(p,x);var y=h.styleAttrs[c.byName.writingMode.qname];if(("lrtb"===y||"lr"===y||"rltb"===y||"rl"===y)&&a.enableRollUp&&h.contents.length>0&&"after"===h.styleAttrs[c.byName.displayAlign.qname]){var z=""===h.id?"_":h.id,A=new e(z,x);if(a.currentISDState[A.id]=A,a.previousISDState&&A.id in a.previousISDState&&a.previousISDState[A.id].plist.length>0&&A.plist.length>1&&A.plist[A.plist.length-2].text===a.previousISDState[A.id].plist[a.previousISDState[A.id].plist.length-1].text){var B=j.firstElementChild;B.style.bottom="-"+A.plist[A.plist.length-1].height+"px",B.style.transition="transform 0.4s",B.style.position="relative",B.style.transform="translateY(-"+A.plist[A.plist.length-1].height+"px)"}}}}function e(a,b){this.id=a,this.plist=b}function f(a,b,c){if(0===a.childElementCount)b.push({element:a,bgcolor:c});else for(var d=a.style.backgroundColor||c,e=a.firstChild;e;)e.nodeType===Node.ELEMENT_NODE&&f(e,b,d),e=e.nextSibling}function g(a,b){if(0===a.childElementCount&&"span"===a.localName){var c=a.getBoundingClientRect();0!==b.length&&h(c.top,c.height,b[b.length-1].top,b[b.length-1].height)?(c.top<b[b.length-1].top&&(b[b.length-1].top=c.top),c.height>b[b.length-1].height&&(b[b.length-1].height=c.height),b[b.length-1].text+=a.textContent):b.push({top:c.top,height:c.height,text:a.textContent})}else for(var d=a.firstChild;d;)d.nodeType===Node.ELEMENT_NODE&&g(d,b),d=d.nextSibling}function h(a,b,c,d){return a+b<c+d&&a>c||c+d<=a+b&&c>=a}function i(a,b){for(var c=null,d=!0,e=!1,f=0;f<=a.length;f++)if(f===a.length||"br"!==a[f].element.localName){if(null===c||f===a.length||!h(a[f].element.getBoundingClientRect().top,a[f].element.getBoundingClientRect().height,a[c].element.getBoundingClientRect().top,a[c].element.getBoundingClientRect().height)){if(b&&!d){for(;--f>=0;)if(0!==a[f].element.getBoundingClientRect().width){if(k(a[f].element,a[f].color,b),0!==a[f].element.getBoundingClientRect().width&&h(a[f].element.getBoundingClientRect().top,a[f].element.getBoundingClientRect().height,a[c].element.getBoundingClientRect().top,a[c].element.getBoundingClientRect().height))break;l(a[f].element)}d=!0;continue}if(f!==a.length&&null!==c&&!e){var g=document.createElement("br");a[f].element.parentElement.insertBefore(g,a[f].element),a.splice(f,0,{element:g}),e=!0;continue}if(f!==a.length&&b)for(;f<a.length;f++)if(0!==a[f].element.getBoundingClientRect().width){j(a[f].element,a[f].color,b);break}d=!1,e=!1,c=f}}else e=!0}function j(a,b,c){a.style.paddingLeft=c+"px",a.style.backgroundColor=b}function k(a,b,c){a.style.paddingRight=c+"px",a.style.backgroundColor=b}function l(a){a.style.paddingRight=null}function m(a,b){this.qname=a,this.map=b}function n(a,b){if(a&&a.error&&a.error(b))throw b}a.render=function(a,b,c,e,f,g,h,i,j){var k=e||b.clientHeight,l=f||b.clientWidth;if(null!==a.aspectRatio){var m=k*a.aspectRatio;m>l?k=Math.round(l/a.aspectRatio):l=m}var n=document.createElement("div");n.style.position="relative",n.style.width=l+"px",n.style.height=k+"px",n.style.margin="auto",n.style.top=0,n.style.bottom=0,n.style.left=0,n.style.right=0,n.style.zIndex=0;var o={h:k,w:l,regionH:null,regionW:null,imgResolver:c,displayForcedOnlyMode:g||!1,isd:a,errorHandler:h,previousISDState:i,enableRollUp:j||!1,currentISDState:{}};b.appendChild(n);for(var p in a.contents)d(o,n,a.contents[p]);return o.currentISDState};var o=[new m("http://www.w3.org/ns/ttml#styling backgroundColor",function(a,b,c,d){b.style.backgroundColor="rgba("+d[0].toString()+","+d[1].toString()+","+d[2].toString()+","+(d[3]/255).toString()+")"}),new m("http://www.w3.org/ns/ttml#styling color",function(a,b,c,d){b.style.color="rgba("+d[0].toString()+","+d[1].toString()+","+d[2].toString()+","+(d[3]/255).toString()+")"}),new m("http://www.w3.org/ns/ttml#styling direction",function(a,b,c,d){b.style.direction=d}),new m("http://www.w3.org/ns/ttml#styling display",function(a,b,c,d){}),new m("http://www.w3.org/ns/ttml#styling displayAlign",function(a,b,c,d){b.style.display="flex",b.style.flexDirection="column","before"===d?b.style.justifyContent="flex-start":"center"===d?b.style.justifyContent="center":"after"===d&&(b.style.justifyContent="flex-end")}),new m("http://www.w3.org/ns/ttml#styling extent",function(a,b,c,d){a.regionH=d.h*a.h,a.regionW=d.w*a.w;var e=0,f=0,g=c.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];g&&(e=(g[0]+g[2])*a.h,f=(g[1]+g[3])*a.w),b.style.height=a.regionH-e+"px",b.style.width=a.regionW-f+"px"}),new m("http://www.w3.org/ns/ttml#styling fontFamily",function(a,b,c,d){var e=[];for(var f in d)"monospaceSerif"===d[f]?(e.push("Courier New"),e.push('"Liberation Mono"'),e.push("Courier"),e.push("monospace")):"proportionalSansSerif"===d[f]?(e.push("Arial"),e.push("Helvetica"),e.push('"Liberation Sans"'),e.push("sans-serif")):"monospace"===d[f]?e.push("monospace"):"sansSerif"===d[f]?e.push("sans-serif"):"serif"===d[f]?e.push("serif"):"monospaceSansSerif"===d[f]?(e.push("Consolas"),e.push("monospace")):"proportionalSerif"===d[f]?e.push("serif"):e.push(d[f]);b.style.fontFamily=e.join(",")}),new m("http://www.w3.org/ns/ttml#styling fontSize",function(a,b,c,d){b.style.fontSize=d*a.h+"px"}),new m("http://www.w3.org/ns/ttml#styling fontStyle",function(a,b,c,d){b.style.fontStyle=d}),new m("http://www.w3.org/ns/ttml#styling fontWeight",function(a,b,c,d){b.style.fontWeight=d}),new m("http://www.w3.org/ns/ttml#styling lineHeight",function(a,b,c,d){b.style.lineHeight="normal"===d?"normal":d*a.h+"px"}),new m("http://www.w3.org/ns/ttml#styling opacity",function(a,b,c,d){b.style.opacity=d}),new m("http://www.w3.org/ns/ttml#styling origin",function(a,b,c,d){b.style.top=d.h*a.h+"px",b.style.left=d.w*a.w+"px"}),new m("http://www.w3.org/ns/ttml#styling overflow",function(a,b,c,d){b.style.overflow=d}),new m("http://www.w3.org/ns/ttml#styling padding",function(a,b,c,d){var e=[];e[0]=d[0]*a.h+"px",e[1]=d[3]*a.w+"px",e[2]=d[2]*a.h+"px",e[3]=d[1]*a.w+"px",b.style.padding=e.join(" ")}),new m("http://www.w3.org/ns/ttml#styling showBackground",null),new m("http://www.w3.org/ns/ttml#styling textAlign",function(a,b,d,e){var f,g=d.styleAttrs[c.byName.direction.qname];f="start"===e?"rtl"===g?"right":"left":"end"===e?"rtl"===g?"left":"right":e,b.style.textAlign=f}),new m("http://www.w3.org/ns/ttml#styling textDecoration",function(a,b,c,d){b.style.textDecoration=d.join(" ").replace("lineThrough","line-through")}),new m("http://www.w3.org/ns/ttml#styling textOutline",function(a,b,c,d){b.style.textShadow="none"===d?"":"rgba("+d.color[0].toString()+","+d.color[1].toString()+","+d.color[2].toString()+","+(d.color[3]/255).toString()+") 0px 0px "+d.thickness*a.h+"px"}),new m("http://www.w3.org/ns/ttml#styling unicodeBidi",function(a,b,c,d){var e;e="bidiOverride"===d?"bidi-override":d,b.style.unicodeBidi=e}),new m("http://www.w3.org/ns/ttml#styling visibility",function(a,b,c,d){b.style.visibility=d}),new m("http://www.w3.org/ns/ttml#styling wrapOption",function(a,b,c,d){"wrap"===d?"preserve"===c.space?b.style.whiteSpace="pre-wrap":b.style.whiteSpace="normal":"preserve"===c.space?b.style.whiteSpace="pre":b.style.whiteSpace="noWrap"}),new m("http://www.w3.org/ns/ttml#styling writingMode",function(a,b,c,d){"lrtb"===d||"lr"===d?b.style.writingMode="horizontal-tb":"rltb"===d||"rl"===d?b.style.writingMode="horizontal-tb":"tblr"===d?b.style.writingMode="vertical-lr":"tbrl"!==d&&"tb"!==d||(b.style.writingMode="vertical-rl")}),new m("http://www.w3.org/ns/ttml#styling zIndex",function(a,b,c,d){b.style.zIndex=d}),new m("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt backgroundImage",function(a,b,c,d){if(null!==a.imgResolver&&null!==d){var e=document.createElement("img"),f=a.imgResolver(d,e);f&&(e.src=f),e.height=a.regionH,e.width=a.regionW,b.appendChild(e)}}),new m("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",function(a,b,c,d){a.displayForcedOnlyMode&&!1===d&&(b.style.visibility="hidden")})],p={};for(var q in o)p[o[q].qname]=o[q]}(void 0===c?this.imscHTML={}:c,"undefined"==typeof imscNames?a(18):imscNames,"undefined"==typeof imscStyles?a(19):imscStyles)},{18:18,19:19}],16:[function(a,b,c){!function(a,b,c){function d(a,b,g,j,k,l,m,n){if(b<m.begin||b>=m.end)return null;var o="regionID"in m&&""!==m.regionID?m.regionID:l;if(null!==k&&o!==g.id&&(!("contents"in m)||"contents"in m&&0===m.contents.length||""!==o))return null;var p=new h(m);for(var q in m.sets)b<m.sets[q].begin||b>=m.sets[q].end||(p.styleAttrs[m.sets[q].qname]=m.sets[q].value);var r={};for(var s in p.styleAttrs)if(r[s]=!0,s===c.byName.writingMode.qname&&!(c.byName.direction.qname in p.styleAttrs)){var t=p.styleAttrs[s];"lrtb"===t||"lr"===t?p.styleAttrs[c.byName.direction.qname]="ltr":"rltb"!==t&&"rl"!==t||(p.styleAttrs[c.byName.direction.qname]="rtl")}if(null!==k)for(var u in c.all){var v=c.all[u];if(v.qname===c.byName.textDecoration.qname){var w=k.styleAttrs[v.qname],x=p.styleAttrs[v.qname],y=[];void 0===x?y=w:-1===x.indexOf("none")?((-1===x.indexOf("noUnderline")&&-1!==w.indexOf("underline")||-1!==x.indexOf("underline"))&&y.push("underline"),(-1===x.indexOf("noLineThrough")&&-1!==w.indexOf("lineThrough")||-1!==x.indexOf("lineThrough"))&&y.push("lineThrough"),(-1===x.indexOf("noOverline")&&-1!==w.indexOf("overline")||-1!==x.indexOf("overline"))&&y.push("overline")):y.push("none"),p.styleAttrs[v.qname]=y}else v.inherit&&v.qname in k.styleAttrs&&!(v.qname in p.styleAttrs)&&(p.styleAttrs[v.qname]=k.styleAttrs[v.qname])}for(var z in c.all){var A=c.all[z];A.qname in p.styleAttrs||("region"===p.kind||!1===A.inherit&&null!==A.initial)&&(p.styleAttrs[A.qname]=A.parse(A.initial),r[A.qname]=!0)}for(var B in c.all){var C=c.all[B];if(C.qname in r&&null!==C.compute){var D=C.compute(a,k,p,p.styleAttrs[C.qname]);null!==D?p.styleAttrs[C.qname]=D:i(n,"Style '"+C.qname+"' on element '"+p.kind+"' cannot be computed")}}if("none"===p.styleAttrs[c.byName.display.qname])return null;var E;null===k?E=null===j?[]:[j]:"contents"in m&&(E=m.contents);for(var F in E){var G=d(a,b,g,j,p,o,E[F]);null!==G&&p.contents.push(G.element)}for(var H in p.styleAttrs){-1===c.byQName[H].applies.indexOf(p.kind)&&delete p.styleAttrs[H]}if("span"===p.kind&&p.text&&"default"===p.space){var I=p.text.replace(/\s+/g," ");p.text=I}if("p"===p.kind){var J=[];e(p,J);for(var K=0,L="after_br",M=0;;)if("after_br"===L)K>=J.length||"br"===J[K].kind?(L="before_br",M=K,K--):("preserve"!==J[K].space&&(J[K].text=J[K].text.replace(/^\s+/g,"")),J[K].text.length>0?(L="looking_br",K++):J.splice(K,1));else if("before_br"===L)if(K<0||"br"===J[K].kind){if(L="after_br",(K=M+1)>=J.length)break}else if("preserve"!==J[K].space&&(J[K].text=J[K].text.replace(/\s+$/g,"")),J[K].text.length>0){if(L="after_br",(K=M+1)>=J.length)break}else J.splice(K,1),K--;else K>=J.length||"br"===J[K].kind?(L="before_br",M=K,K--):K++;f(p)}return"div"===p.kind&&c.byName.backgroundImage.qname in p.styleAttrs||"br"===p.kind||"contents"in p&&p.contents.length>0||"span"===p.kind&&null!==p.text||"region"===p.kind&&"always"===p.styleAttrs[c.byName.showBackground.qname]?{region_id:o,element:p}:null}function e(a,b){if("contents"in a)for(var c in a.contents)e(a.contents[c],b);else b.push(a)}function f(a){if("br"===a.kind)return!1;if("text"in a)return 0===a.text.length;if("contents"in a){for(var b=a.contents.length;b--;)f(a.contents[b])&&a.contents.splice(b,1);return 0===a.contents.length}}function g(a){this.contents=[],this.aspectRatio=a.aspectRatio}function h(a){this.kind=a.kind||"region",a.id&&(this.id=a.id),this.styleAttrs={};for(var b in a.styleAttrs)this.styleAttrs[b]=a.styleAttrs[b];"text"in a?this.text=a.text:"br"!==a.kind&&(this.contents=[]),"space"in a&&(this.space=a.space)}function i(a,b){if(a&&a.error&&a.error(b))throw b}a.generateISD=function(a,b,c){var e=new g(a);for(var f in a.head.layout.regions){var h=d(a,b,a.head.layout.regions[f],a.body,null,"",a.head.layout.regions[f],c);null!==h&&e.contents.push(h.element)}return e}}(void 0===c?this.imscISD={}:c,"undefined"==typeof imscNames?a(18):imscNames,"undefined"==typeof imscStyles?a(19):imscStyles)},{18:18,19:19}],17:[function(a,b,c){c.generateISD=a(16).generateISD,c.fromXML=a(14).fromXML,c.renderHTML=a(15).render},{14:14,15:15,16:16}],18:[function(a,b,c){!function(a){a.ns_tt="http://www.w3.org/ns/ttml",a.ns_tts="http://www.w3.org/ns/ttml#styling",a.ns_ttp="http://www.w3.org/ns/ttml#parameter",a.ns_xml="http://www.w3.org/XML/1998/namespace",a.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",a.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",a.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",a.ns_ebutts="urn:ebu:tt:style"}(void 0===c?this.imscNames={}:c)},{}],19:[function(a,b,c){!function(a,b,c){function d(a,b,c,d,e,f,g,h){this.name=b,this.ns=a,this.qname=a+" "+b,this.inherit=e,this.animatable=f,this.initial=c,this.applies=d,this.parse=g,this.compute=h}a.all=[new d(b.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,c.parseColor,null),new d(b.ns_tts,"color","white",["span"],!0,!0,c.parseColor,null),new d(b.ns_tts,"direction","ltr",["p","span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,function(a){return a},null),new d(b.ns_tts,"displayAlign","before",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"extent","auto",["tt","region"],!1,!0,function(a){if("auto"===a)return a;var b=a.split(" ");if(2!==b.length)return null;var d=c.parseLength(b[0]),e=c.parseLength(b[1]);return e&&d?{h:e,w:d}:null},function(a,b,c,d){var e,f;if("auto"===d)e=1;else if("%"===d.h.unit)e=d.h.value/100;else{if("px"!==d.h.unit)return null;e=d.h.value/a.pxDimensions.h}if("auto"===d)f=1;else if("%"===d.w.unit)f=d.w.value/100;else{if("px"!==d.w.unit)return null;f=d.w.value/a.pxDimensions.w}return{h:e,w:f}}),new d(b.ns_tts,"fontFamily","default",["span"],!0,!0,function(a){var b=a.split(","),c=[];for(var d in b)"'"!==b[d].charAt(0)&&'"'!==b[d].charAt(0)&&"default"===b[d]?c.push("monospaceSerif"):c.push(b[d]);return c},null),new d(b.ns_tts,"fontSize","1c",["span"],!0,!0,c.parseLength,function(b,c,d,e){var f;if("%"===e.unit)f=null!==c?c.styleAttrs[a.byName.fontSize.qname]*e.value/100:e.value/100/b.cellResolution.h;else if("em"===e.unit)f=null!==c?c.styleAttrs[a.byName.fontSize.qname]*e.value:e.value/b.cellResolution.h;else if("c"===e.unit)f=e.value/b.cellResolution.h;else{if("px"!==e.unit)return null;f=e.value/b.pxDimensions.h}return f}),new d(b.ns_tts,"fontStyle","normal",["span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"fontWeight","normal",["span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"lineHeight","normal",["p"],!0,!0,function(a){return"normal"===a?a:c.parseLength(a)},function(b,c,d,e){var f;if("normal"===e)f=e;else if("%"===e.unit)f=d.styleAttrs[a.byName.fontSize.qname]*e.value/100;else if("em"===e.unit)f=d.styleAttrs[a.byName.fontSize.qname]*e.value;else if("c"===e.unit)f=e.value/b.cellResolution.h;else{if("px"!==e.unit)return null;f=e.value/b.pxDimensions.h}return f}),new d(b.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new d(b.ns_tts,"origin","auto",["region"],!1,!0,function(a){if("auto"===a)return a;var b=a.split(" ");if(2!==b.length)return null;var d=c.parseLength(b[0]),e=c.parseLength(b[1]);return e&&d?{h:e,w:d}:null},function(a,b,c,d){var e,f;if("auto"===d)e=0;else if("%"===d.h.unit)e=d.h.value/100;else{if("px"!==d.h.unit)return null;e=d.h.value/a.pxDimensions.h}if("auto"===d)f=0;else if("%"===d.w.unit)f=d.w.value/100;else{if("px"!==d.w.unit)return null;f=d.w.value/a.pxDimensions.w}return{h:e,w:f}}),new d(b.ns_tts,"overflow","hidden",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"padding","0px",["region"],!1,!0,function(a){var b=a.split(" ");if(b.length>4)return null;var d=[];for(var e in b){var f=c.parseLength(b[e]);if(!f)return null;d.push(f)}return d},function(b,c,d,e){var f;if(1===e.length)f=[e[0],e[0],e[0],e[0]];else if(2===e.length)f=[e[0],e[1],e[0],e[1]];else if(3===e.length)f=[e[0],e[1],e[2],e[1]];else{if(4!==e.length)return null;f=[e[0],e[1],e[2],e[3]]}var g=d.styleAttrs[a.byName.writingMode.qname];if("lrtb"===g||"lr"===g)f=[f[0],f[3],f[2],f[1]];else if("rltb"===g||"rl"===g)f=[f[0],f[1],f[2],f[3]];else if("tblr"===g)f=[f[3],f[0],f[1],f[2]];else{if("tbrl"!==g&&"tb"!==g)return null;f=[f[3],f[2],f[1],f[0]]}var h=[];for(var i in f)if(0===f[i].value)h[i]=0;else if("%"===f[i].unit)h[i]="0"===i||"2"===i?d.styleAttrs[a.byName.extent.qname].h*f[i].value/100:d.styleAttrs[a.byName.extent.qname].w*f[i].value/100;else if("em"===f[i].unit)h[i]=d.styleAttrs[a.byName.fontSize.qname]*f[i].value;else if("c"===f[i].unit)h[i]=f[i].value/b.cellResolution.h;else{if("px"!==f[i].unit)return null;h[i]=f[i].value/b.pxDimensions.h}return h}),new d(b.ns_tts,"showBackground","always",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"textAlign","start",["p"],!0,!0,function(a){return a},function(a,b,c,d){return"left"===d?"start":"right"===d?"end":d}),new d(b.ns_tts,"textDecoration","none",["span"],!0,!0,function(a){return a.split(" ")},null),new d(b.ns_tts,"textOutline","none",["span"],!0,!0,function(a){if("none"===a)return a;var b={},d=a.split(" ");if(0===d.length||d.length>2)return null;var e=c.parseColor(d[0]);if(b.color=e,null!==e&&d.shift(),1!==d.length)return null;var f=c.parseLength(d[0]);return f?(b.thickness=f,b):null},function(b,c,d,e){if("none"===e)return e;var f={};if(null===e.color?f.color=d.styleAttrs[a.byName.color.qname]:f.color=e.color,"%"===e.thickness.unit)f.thickness=d.styleAttrs[a.byName.fontSize.qname]*e.thickness.value/100;else if("em"===e.thickness.unit)f.thickness=d.styleAttrs[a.byName.fontSize.qname]*e.thickness.value;else if("c"===e.thickness.unit)f.thickness=e.thickness.value/b.cellResolution.h;else{if("px"!==e.thickness.unit)return null;f.thickness=e.thickness.value/b.pxDimensions.h}return f}),new d(b.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,function(a){return a},null),new d(b.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"wrapOption","wrap",["span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"writingMode","lrtb",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"zIndex","auto",["region"],!1,!0,function(a){var b;return"auto"===a?b=a:(b=parseInt(a),isNaN(b)&&(b=null)),b},null),new d(b.ns_ebutts,"linePadding","0c",["p"],!0,!1,c.parseLength,function(a,b,c,d){return"c"===d.unit?d.value/a.cellResolution.h:null}),new d(b.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,function(a){return a},null),new d(b.ns_smpte,"backgroundImage",null,["div"],!1,!1,function(a){return a},null),new d(b.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,function(a){return"true"===a},null)],a.byQName={};for(var e in a.all)a.byQName[a.all[e].qname]=a.all[e];a.byName={};for(var f in a.all)a.byName[a.all[f].name]=a.all[f]}(void 0===c?this.imscStyles={}:c,"undefined"==typeof imscNames?a(18):imscNames,"undefined"==typeof imscUtils?a(20):imscUtils)},{18:18,20:20}],20:[function(a,b,c){!function(a){var b=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,c=/rgb\((\d+),(\d+),(\d+)\)/,d=/rgba\((\d+),(\d+),(\d+),(\d+)\)/,e={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};a.parseColor=function(a){var f,g=null;return a in e?g=e[a]:null!==(f=b.exec(a))?g=[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16),void 0!==f[4]?parseInt(f[4],16):255]:null!==(f=c.exec(a))?g=[parseInt(f[1]),parseInt(f[2]),parseInt(f[3]),255]:null!==(f=d.exec(a))&&(g=[parseInt(f[1]),parseInt(f[2]),parseInt(f[3]),parseInt(f[4])]),g};var f=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%)$/;a.parseLength=function(a){var b,c=null;return null!==(b=f.exec(a))&&(c={value:parseFloat(b[1]),unit:b[2]}),c}}(void 0===c?this.imscUtils={}:c)},{}],21:[function(a,b,c){"function"==typeof Object.create?b.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:b.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],22:[function(a,b,c){function d(a){return!!a.constructor&&"function"==typeof a.constructor.isBuffer&&a.constructor.isBuffer(a)}function e(a){return"function"==typeof a.readFloatLE&&"function"==typeof a.slice&&d(a.slice(0,0))}/*!
|
11 |
* Determine if an object is a Buffer
|
12 |
*
|
13 |
* @author Feross Aboukhadijeh <https://feross.org>
|
14 |
* @license MIT
|
15 |
*/
|
16 |
-
b.exports=function(a){return null!=a&&(d(a)||e(a)||!!a._isBuffer)}},{}],23:[function(a,b,c){var d={}.toString;b.exports=Array.isArray||function(a){return"[object Array]"==d.call(a)}},{}],24:[function(a,b,c){(function(a){"use strict";function c(b,c,d,e){if("function"!=typeof b)throw new TypeError('"callback" argument must be a function');var f,g,h=arguments.length;switch(h){case 0:case 1:return a.nextTick(b);case 2:return a.nextTick(function(){b.call(null,c)});case 3:return a.nextTick(function(){b.call(null,c,d)});case 4:return a.nextTick(function(){b.call(null,c,d,e)});default:for(f=new Array(h-1),g=0;g<f.length;)f[g++]=arguments[g];return a.nextTick(function(){b.apply(null,f)})}}!a.version||0===a.version.indexOf("v0.")||0===a.version.indexOf("v1.")&&0!==a.version.indexOf("v1.8.")?b.exports={nextTick:c}:b.exports=a}).call(this,a(25))},{25:25}],25:[function(a,b,c){function d(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function f(a){if(l===setTimeout)return setTimeout(a,0);if((l===d||!l)&&setTimeout)return l=setTimeout,setTimeout(a,0);try{return l(a,0)}catch(b){try{return l.call(null,a,0)}catch(b){return l.call(this,a,0)}}}function g(a){if(m===clearTimeout)return clearTimeout(a);if((m===e||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(a);try{return m(a)}catch(b){try{return m.call(null,a)}catch(b){return m.call(this,a)}}}function h(){q&&o&&(q=!1,o.length?p=o.concat(p):r=-1,p.length&&i())}function i(){if(!q){var a=f(h);q=!0;for(var b=p.length;b;){for(o=p,p=[];++r<b;)o&&o[r].run();r=-1,b=p.length}o=null,q=!1,g(a)}}function j(a,b){this.fun=a,this.array=b}function k(){}var l,m,n=b.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:d}catch(a){l=d}try{m="function"==typeof clearTimeout?clearTimeout:e}catch(a){m=e}}();var o,p=[],q=!1,r=-1;n.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];p.push(new j(a,b)),1!==p.length||q||f(i)},j.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=k,n.addListener=k,n.once=k,n.off=k,n.removeListener=k,n.removeAllListeners=k,n.emit=k,n.prependListener=k,n.prependOnceListener=k,n.listeners=function(a){return[]},n.binding=function(a){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(a){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],26:[function(a,b,c){b.exports=a(27)},{27:27}],27:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);j.call(this,a),k.call(this,a),a&&!1===a.readable&&(this.readable=!1),a&&!1===a.writable&&(this.writable=!1),this.allowHalfOpen=!0,a&&!1===a.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",e)}function e(){this.allowHalfOpen||this._writableState.ended||g.nextTick(f,this)}function f(a){a.end()}var g=a(24),h=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b};b.exports=d;var i=a(10);i.inherits=a(21);var j=a(29),k=a(31);i.inherits(d,j);for(var l=h(k.prototype),m=0;m<l.length;m++){var n=l[m];d.prototype[n]||(d.prototype[n]=k.prototype[n])}Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(a){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=a,this._writableState.destroyed=a)}}),d.prototype._destroy=function(a,b){this.push(null),this.end(),g.nextTick(b,a)}},{10:10,21:21,24:24,29:29,31:31}],28:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);e.call(this,a)}b.exports=d;var e=a(30),f=a(10);f.inherits=a(21),f.inherits(d,e),d.prototype._transform=function(a,b,c){c(null,a)}},{10:10,21:21,30:30}],29:[function(a,b,c){(function(c,d){"use strict";function e(a){return L.from(a)}function f(a){return L.isBuffer(a)||a instanceof M}function g(a,b,c){if("function"==typeof a.prependListener)return a.prependListener(b,c);a._events&&a._events[b]?I(a._events[b])?a._events[b].unshift(c):a._events[b]=[c,a._events[b]]:a.on(b,c)}function h(b,c){H=H||a(27),b=b||{};var d=c instanceof H;this.objectMode=!!b.objectMode,d&&(this.objectMode=this.objectMode||!!b.readableObjectMode);var e=b.highWaterMark,f=b.readableHighWaterMark,g=this.objectMode?16:16384;this.highWaterMark=e||0===e?e:d&&(f||0===f)?f:g,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new R,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=b.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(Q||(Q=a(42).StringDecoder),this.decoder=new Q(b.encoding),this.encoding=b.encoding)}function i(b){if(H=H||a(27),!(this instanceof i))return new i(b);this._readableState=new h(b,this),this.readable=!0,b&&("function"==typeof b.read&&(this._read=b.read),"function"==typeof b.destroy&&(this._destroy=b.destroy)),K.call(this)}function j(a,b,c,d,f){var g=a._readableState;if(null===b)g.reading=!1,p(a,g);else{var h;f||(h=l(g,b)),h?a.emit("error",h):g.objectMode||b&&b.length>0?("string"==typeof b||g.objectMode||Object.getPrototypeOf(b)===L.prototype||(b=e(b)),d?g.endEmitted?a.emit("error",new Error("stream.unshift() after end event")):k(a,g,b,!0):g.ended?a.emit("error",new Error("stream.push() after EOF")):(g.reading=!1,g.decoder&&!c?(b=g.decoder.write(b),g.objectMode||0!==b.length?k(a,g,b,!1):s(a,g)):k(a,g,b,!1))):d||(g.reading=!1)}return m(g)}function k(a,b,c,d){b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,d?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&q(a)),s(a,b)}function l(a,b){var c;return f(b)||"string"==typeof b||void 0===b||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function m(a){return!a.ended&&(a.needReadable||a.length<a.highWaterMark||0===a.length)}function n(a){return a>=U?a=U:(a--,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a++),a}function o(a,b){return a<=0||0===b.length&&b.ended?0:b.objectMode?1:a!==a?b.flowing&&b.length?b.buffer.head.data.length:b.length:(a>b.highWaterMark&&(b.highWaterMark=n(a)),a<=b.length?a:b.ended?b.length:(b.needReadable=!0,0))}function p(a,b){if(!b.ended){if(b.decoder){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,q(a)}}function q(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(P("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?G.nextTick(r,a):r(a))}function r(a){P("emit readable"),a.emit("readable"),y(a)}function s(a,b){b.readingMore||(b.readingMore=!0,G.nextTick(t,a,b))}function t(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length<b.highWaterMark&&(P("maybeReadMore read 0"),a.read(0),c!==b.length);)c=b.length;b.readingMore=!1}function u(a){return function(){var b=a._readableState;P("pipeOnDrain",b.awaitDrain),b.awaitDrain&&b.awaitDrain--,0===b.awaitDrain&&J(a,"data")&&(b.flowing=!0,y(a))}}function v(a){P("readable nexttick read 0"),a.read(0)}function w(a,b){b.resumeScheduled||(b.resumeScheduled=!0,G.nextTick(x,a,b))}function x(a,b){b.reading||(P("resume read 0"),a.read(0)),b.resumeScheduled=!1,b.awaitDrain=0,a.emit("resume"),y(a),b.flowing&&!b.reading&&a.read(0)}function y(a){var b=a._readableState;for(P("flow",b.flowing);b.flowing&&null!==a.read(););}function z(a,b){if(0===b.length)return null;var c;return b.objectMode?c=b.buffer.shift():!a||a>=b.length?(c=b.decoder?b.buffer.join(""):1===b.buffer.length?b.buffer.head.data:b.buffer.concat(b.length),b.buffer.clear()):c=A(a,b.buffer,b.decoder),c}function A(a,b,c){var d;return a<b.head.data.length?(d=b.head.data.slice(0,a),b.head.data=b.head.data.slice(a)):d=a===b.head.data.length?b.shift():c?B(a,b):C(a,b),d}function B(a,b){var c=b.head,d=1,e=c.data;for(a-=e.length;c=c.next;){var f=c.data,g=a>f.length?f.length:a;if(g===f.length?e+=f:e+=f.slice(0,a),0===(a-=g)){g===f.length?(++d,c.next?b.head=c.next:b.head=b.tail=null):(b.head=c,c.data=f.slice(g));break}++d}return b.length-=d,e}function C(a,b){var c=L.allocUnsafe(a),d=b.head,e=1;for(d.data.copy(c),a-=d.data.length;d=d.next;){var f=d.data,g=a>f.length?f.length:a;if(f.copy(c,c.length-a,0,g),0===(a-=g)){g===f.length?(++e,d.next?b.head=d.next:b.head=b.tail=null):(b.head=d,d.data=f.slice(g));break}++e}return b.length-=e,c}function D(a){var b=a._readableState;if(b.length>0)throw new Error('"endReadable()" called on non-empty stream');b.endEmitted||(b.ended=!0,G.nextTick(E,b,a))}function E(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}function F(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}var G=a(24);b.exports=i;var H,I=a(23);i.ReadableState=h;var J=(a(11).EventEmitter,function(a,b){return a.listeners(b).length}),K=a(34),L=a(39).Buffer,M=d.Uint8Array||function(){},N=a(10);N.inherits=a(21);var O=a(6),P=void 0;P=O&&O.debuglog?O.debuglog("stream"):function(){};var Q,R=a(32),S=a(33);N.inherits(i,K);var T=["error","close","destroy","pause","resume"];Object.defineProperty(i.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(a){this._readableState&&(this._readableState.destroyed=a)}}),i.prototype.destroy=S.destroy,i.prototype._undestroy=S.undestroy,i.prototype._destroy=function(a,b){this.push(null),b(a)},i.prototype.push=function(a,b){var c,d=this._readableState;return d.objectMode?c=!0:"string"==typeof a&&(b=b||d.defaultEncoding,b!==d.encoding&&(a=L.from(a,b),b=""),c=!0),j(this,a,b,!1,c)},i.prototype.unshift=function(a){return j(this,a,null,!0,!1)},i.prototype.isPaused=function(){return!1===this._readableState.flowing},i.prototype.setEncoding=function(b){return Q||(Q=a(42).StringDecoder),this._readableState.decoder=new Q(b),this._readableState.encoding=b,this};var U=8388608;i.prototype.read=function(a){P("read",a),a=parseInt(a,10);var b=this._readableState,c=a;if(0!==a&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return P("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?D(this):q(this),null;if(0===(a=o(a,b))&&b.ended)return 0===b.length&&D(this),null;var d=b.needReadable;P("need readable",d),(0===b.length||b.length-a<b.highWaterMark)&&(d=!0,P("length less than watermark",d)),b.ended||b.reading?(d=!1,P("reading or ended",d)):d&&(P("do read"),b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1,b.reading||(a=o(c,b)));var e;return e=a>0?z(a,b):null,null===e?(b.needReadable=!0,a=0):b.length-=a,0===b.length&&(b.ended||(b.needReadable=!0),c!==a&&b.ended&&D(this)),null!==e&&this.emit("data",e),e},i.prototype._read=function(a){this.emit("error",new Error("_read() is not implemented"))},i.prototype.pipe=function(a,b){function d(a,b){P("onunpipe"),a===m&&b&&!1===b.hasUnpiped&&(b.hasUnpiped=!0,f())}function e(){P("onend"),a.end()}function f(){P("cleanup"),a.removeListener("close",j),a.removeListener("finish",k),a.removeListener("drain",q),a.removeListener("error",i),a.removeListener("unpipe",d),m.removeListener("end",e),m.removeListener("end",l),m.removeListener("data",h),r=!0,!n.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function h(b){P("ondata"),s=!1,!1!==a.write(b)||s||((1===n.pipesCount&&n.pipes===a||n.pipesCount>1&&-1!==F(n.pipes,a))&&!r&&(P("false write response, pause",m._readableState.awaitDrain),m._readableState.awaitDrain++,s=!0),m.pause())}function i(b){P("onerror",b),l(),a.removeListener("error",i),0===J(a,"error")&&a.emit("error",b)}function j(){a.removeListener("finish",k),l()}function k(){P("onfinish"),a.removeListener("close",j),l()}function l(){P("unpipe"),m.unpipe(a)}var m=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=a;break;case 1:n.pipes=[n.pipes,a];break;default:n.pipes.push(a)}n.pipesCount+=1,P("pipe count=%d opts=%j",n.pipesCount,b);var o=(!b||!1!==b.end)&&a!==c.stdout&&a!==c.stderr,p=o?e:l;n.endEmitted?G.nextTick(p):m.once("end",p),a.on("unpipe",d);var q=u(m);a.on("drain",q);var r=!1,s=!1;return m.on("data",h),g(a,"error",i),a.once("close",j),a.once("finish",k),a.emit("pipe",m),n.flowing||(P("pipe resume"),m.resume()),a},i.prototype.unpipe=function(a){var b=this._readableState,c={hasUnpiped:!1};if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this,c),this);if(!a){var d=b.pipes,e=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var f=0;f<e;f++)d[f].emit("unpipe",this,c);return this}var g=F(b.pipes,a);return-1===g?this:(b.pipes.splice(g,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this,c),this)},i.prototype.on=function(a,b){var c=K.prototype.on.call(this,a,b);if("data"===a)!1!==this._readableState.flowing&&this.resume();else if("readable"===a){var d=this._readableState;d.endEmitted||d.readableListening||(d.readableListening=d.needReadable=!0,d.emittedReadable=!1,d.reading?d.length&&q(this):G.nextTick(v,this))}return c},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var a=this._readableState;return a.flowing||(P("resume"),a.flowing=!0,w(this,a)),this},i.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(a){var b=this,c=this._readableState,d=!1;a.on("end",function(){if(P("wrapped end"),c.decoder&&!c.ended){var a=c.decoder.end();a&&a.length&&b.push(a)}b.push(null)}),a.on("data",function(e){if(P("wrapped data"),c.decoder&&(e=c.decoder.write(e)),(!c.objectMode||null!==e&&void 0!==e)&&(c.objectMode||e&&e.length)){b.push(e)||(d=!0,a.pause())}});for(var e in a)void 0===this[e]&&"function"==typeof a[e]&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));for(var f=0;f<T.length;f++)a.on(T[f],this.emit.bind(this,T[f]));return this._read=function(b){P("wrapped _read",b),d&&(d=!1,a.resume())},this},i._fromList=z}).call(this,a(25),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,21:21,23:23,24:24,25:25,27:27,32:32,33:33,34:34,39:39,42:42,6:6}],30:[function(a,b,c){"use strict";function d(a,b){var c=this._transformState;c.transforming=!1;var d=c.writecb;if(!d)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,null!=b&&this.push(b),d(a);var e=this._readableState;e.reading=!1,(e.needReadable||e.length<e.highWaterMark)&&this._read(e.highWaterMark)}function e(a){if(!(this instanceof e))return new e(a);h.call(this,a),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&("function"==typeof a.transform&&(this._transform=a.transform),"function"==typeof a.flush&&(this._flush=a.flush)),this.on("prefinish",f)}function f(){var a=this;"function"==typeof this._flush?this._flush(function(b,c){g(a,b,c)}):g(this,null,null)}function g(a,b,c){if(b)return a.emit("error",b);if(null!=c&&a.push(c),a._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(a._transformState.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}b.exports=e;var h=a(27),i=a(10);i.inherits=a(21),i.inherits(e,h),e.prototype.push=function(a,b){return this._transformState.needTransform=!1,h.prototype.push.call(this,a,b)},e.prototype._transform=function(a,b,c){throw new Error("_transform() is not implemented")},e.prototype._write=function(a,b,c){var d=this._transformState;if(d.writecb=c,d.writechunk=a,d.writeencoding=b,!d.transforming){var e=this._readableState;(d.needTransform||e.needReadable||e.length<e.highWaterMark)&&this._read(e.highWaterMark)}},e.prototype._read=function(a){var b=this._transformState;null!==b.writechunk&&b.writecb&&!b.transforming?(b.transforming=!0,this._transform(b.writechunk,b.writeencoding,b.afterTransform)):b.needTransform=!0},e.prototype._destroy=function(a,b){var c=this;h.prototype._destroy.call(this,a,function(a){b(a),c.emit("close")})}},{10:10,21:21,27:27}],31:[function(a,b,c){(function(c,d){"use strict";function e(a){var b=this;this.next=null,this.entry=null,this.finish=function(){A(b,a)}}function f(a){return H.from(a)}function g(a){return H.isBuffer(a)||a instanceof I}function h(){}function i(b,c){C=C||a(27),b=b||{};var d=c instanceof C;this.objectMode=!!b.objectMode,d&&(this.objectMode=this.objectMode||!!b.writableObjectMode);var f=b.highWaterMark,g=b.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=f||0===f?f:d&&(g||0===g)?g:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===b.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=b.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){r(c,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function j(b){if(C=C||a(27),!(K.call(j,this)||this instanceof C))return new j(b);this._writableState=new i(b,this),this.writable=!0,b&&("function"==typeof b.write&&(this._write=b.write),"function"==typeof b.writev&&(this._writev=b.writev),"function"==typeof b.destroy&&(this._destroy=b.destroy),"function"==typeof b.final&&(this._final=b.final)),G.call(this)}function k(a,b){var c=new Error("write after end");a.emit("error",c),B.nextTick(b,c)}function l(a,b,c,d){var e=!0,f=!1;return null===c?f=new TypeError("May not write null values to stream"):"string"==typeof c||void 0===c||b.objectMode||(f=new TypeError("Invalid non-string/buffer chunk")),f&&(a.emit("error",f),B.nextTick(d,f),e=!1),e}function m(a,b,c){return a.objectMode||!1===a.decodeStrings||"string"!=typeof b||(b=H.from(b,c)),b}function n(a,b,c,d,e,f){if(!c){var g=m(b,d,e);d!==g&&(c=!0,e="buffer",d=g)}var h=b.objectMode?1:d.length;b.length+=h;var i=b.length<b.highWaterMark;if(i||(b.needDrain=!0),b.writing||b.corked){var j=b.lastBufferedRequest;b.lastBufferedRequest={chunk:d,encoding:e,isBuf:c,callback:f,next:null},j?j.next=b.lastBufferedRequest:b.bufferedRequest=b.lastBufferedRequest,b.bufferedRequestCount+=1}else o(a,b,!1,h,d,e,f);return i}function o(a,b,c,d,e,f,g){b.writelen=d,b.writecb=g,b.writing=!0,b.sync=!0,c?a._writev(e,b.onwrite):a._write(e,f,b.onwrite),b.sync=!1}function p(a,b,c,d,e){--b.pendingcb,c?(B.nextTick(e,d),B.nextTick(y,a,b),a._writableState.errorEmitted=!0,a.emit("error",d)):(e(d),a._writableState.errorEmitted=!0,a.emit("error",d),y(a,b))}function q(a){a.writing=!1,a.writecb=null,a.length-=a.writelen,a.writelen=0}function r(a,b){var c=a._writableState,d=c.sync,e=c.writecb;if(q(c),b)p(a,c,d,b,e);else{var f=v(c);f||c.corked||c.bufferProcessing||!c.bufferedRequest||u(a,c),d?D(s,a,c,f,e):s(a,c,f,e)}}function s(a,b,c,d){c||t(a,b),b.pendingcb--,d(),y(a,b)}function t(a,b){0===b.length&&b.needDrain&&(b.needDrain=!1,a.emit("drain"))}function u(a,b){b.bufferProcessing=!0;var c=b.bufferedRequest;if(a._writev&&c&&c.next){var d=b.bufferedRequestCount,f=new Array(d),g=b.corkedRequestsFree;g.entry=c;for(var h=0,i=!0;c;)f[h]=c,c.isBuf||(i=!1),c=c.next,h+=1;f.allBuffers=i,o(a,b,!0,b.length,f,"",g.finish),b.pendingcb++,b.lastBufferedRequest=null,g.next?(b.corkedRequestsFree=g.next,g.next=null):b.corkedRequestsFree=new e(b),b.bufferedRequestCount=0}else{for(;c;){var j=c.chunk,k=c.encoding,l=c.callback;if(o(a,b,!1,b.objectMode?1:j.length,j,k,l),c=c.next,b.bufferedRequestCount--,b.writing)break}null===c&&(b.lastBufferedRequest=null)}b.bufferedRequest=c,b.bufferProcessing=!1}function v(a){return a.ending&&0===a.length&&null===a.bufferedRequest&&!a.finished&&!a.writing}function w(a,b){a._final(function(c){b.pendingcb--,c&&a.emit("error",c),b.prefinished=!0,a.emit("prefinish"),y(a,b)})}function x(a,b){b.prefinished||b.finalCalled||("function"==typeof a._final?(b.pendingcb++,b.finalCalled=!0,B.nextTick(w,a,b)):(b.prefinished=!0,a.emit("prefinish")))}function y(a,b){var c=v(b);return c&&(x(a,b),0===b.pendingcb&&(b.finished=!0,a.emit("finish"))),c}function z(a,b,c){b.ending=!0,y(a,b),c&&(b.finished?B.nextTick(c):a.once("finish",c)),b.ended=!0,a.writable=!1}function A(a,b,c){var d=a.entry;for(a.entry=null;d;){var e=d.callback;b.pendingcb--,e(c),d=d.next}b.corkedRequestsFree?b.corkedRequestsFree.next=a:b.corkedRequestsFree=a}var B=a(24);b.exports=j;var C,D=!c.browser&&["v0.10","v0.9."].indexOf(c.version.slice(0,5))>-1?setImmediate:B.nextTick;j.WritableState=i;var E=a(10);E.inherits=a(21);var F={deprecate:a(43)},G=a(34),H=a(39).Buffer,I=d.Uint8Array||function(){},J=a(33);E.inherits(j,G),i.prototype.getBuffer=function(){for(var a=this.bufferedRequest,b=[];a;)b.push(a),a=a.next;return b},function(){try{Object.defineProperty(i.prototype,"buffer",{get:F.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(a){}}();var K;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(K=Function.prototype[Symbol.hasInstance],Object.defineProperty(j,Symbol.hasInstance,{value:function(a){return!!K.call(this,a)||this===j&&(a&&a._writableState instanceof i)}})):K=function(a){return a instanceof this},j.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},j.prototype.write=function(a,b,c){var d=this._writableState,e=!1,i=!d.objectMode&&g(a);return i&&!H.isBuffer(a)&&(a=f(a)),"function"==typeof b&&(c=b,b=null),i?b="buffer":b||(b=d.defaultEncoding),"function"!=typeof c&&(c=h),d.ended?k(this,c):(i||l(this,d,a,c))&&(d.pendingcb++,e=n(this,d,i,a,b,c)),e},j.prototype.cork=function(){this._writableState.corked++},j.prototype.uncork=function(){var a=this._writableState;a.corked&&(a.corked--,a.writing||a.corked||a.finished||a.bufferProcessing||!a.bufferedRequest||u(this,a))},j.prototype.setDefaultEncoding=function(a){if("string"==typeof a&&(a=a.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((a+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+a);return this._writableState.defaultEncoding=a,this},j.prototype._write=function(a,b,c){c(new Error("_write() is not implemented"))},j.prototype._writev=null,j.prototype.end=function(a,b,c){var d=this._writableState;"function"==typeof a?(c=a,a=null,b=null):"function"==typeof b&&(c=b,b=null),null!==a&&void 0!==a&&this.write(a,b),d.corked&&(d.corked=1,this.uncork()),d.ending||d.finished||z(this,d,c)},Object.defineProperty(j.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(a){this._writableState&&(this._writableState.destroyed=a)}}),j.prototype.destroy=J.destroy,j.prototype._undestroy=J.undestroy,j.prototype._destroy=function(a,b){this.end(),b(a)}}).call(this,a(25),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,21:21,24:24,25:25,27:27,33:33,34:34,39:39,43:43}],32:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c){a.copy(b,c)}var f=a(39).Buffer,g=a(6);b.exports=function(){function a(){d(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(a){var b={data:a,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},a.prototype.unshift=function(a){var b={data:a,next:this.head};0===this.length&&(this.tail=b),this.head=b,++this.length},a.prototype.shift=function(){if(0!==this.length){var a=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,a}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(a){if(0===this.length)return"";for(var b=this.head,c=""+b.data;b=b.next;)c+=a+b.data;return c},a.prototype.concat=function(a){if(0===this.length)return f.alloc(0);if(1===this.length)return this.head.data;for(var b=f.allocUnsafe(a>>>0),c=this.head,d=0;c;)e(c.data,b,d),d+=c.data.length,c=c.next;return b},a}(),g&&g.inspect&&g.inspect.custom&&(b.exports.prototype[g.inspect.custom]=function(){var a=g.inspect({length:this.length});return this.constructor.name+" "+a})},{39:39,6:6}],33:[function(a,b,c){"use strict";function d(a,b){var c=this,d=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return d||e?(b?b(a):!a||this._writableState&&this._writableState.errorEmitted||g.nextTick(f,this,a),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(a){!b&&a?(g.nextTick(f,c,a),c._writableState&&(c._writableState.errorEmitted=!0)):b&&b(a)}),this)}function e(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function f(a,b){a.emit("error",b)}var g=a(24);b.exports={destroy:d,undestroy:e}},{24:24}],34:[function(a,b,c){b.exports=a(11).EventEmitter},{11:11}],35:[function(a,b,c){b.exports=a(36).PassThrough},{36:36}],36:[function(a,b,c){c=b.exports=a(29),c.Stream=c,c.Readable=c,c.Writable=a(31),c.Duplex=a(27),c.Transform=a(30),c.PassThrough=a(28)},{27:27,28:28,29:29,30:30,31:31}],37:[function(a,b,c){b.exports=a(36).Transform},{36:36}],38:[function(a,b,c){b.exports=a(31)},{31:31}],39:[function(a,b,c){function d(a,b){for(var c in a)b[c]=a[c]}function e(a,b,c){return g(a,b,c)}var f=a(8),g=f.Buffer;g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?b.exports=f:(d(f,c),c.Buffer=e),d(g,e),e.from=function(a,b,c){if("number"==typeof a)throw new TypeError("Argument must not be a number");return g(a,b,c)},e.alloc=function(a,b,c){if("number"!=typeof a)throw new TypeError("Argument must be a number");var d=g(a);return void 0!==b?"string"==typeof c?d.fill(b,c):d.fill(b):d.fill(0),d},e.allocUnsafe=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return g(a)},e.allocUnsafeSlow=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return f.SlowBuffer(a)}},{8:8}],40:[function(a,b,c){(function(b){!function(c){function d(a,b){if(!(this instanceof d))return new d(a,b);var e=this;f(e),e.q=e.c="",e.bufferCheckPosition=c.MAX_BUFFER_LENGTH,e.opt=b||{},e.opt.lowercase=e.opt.lowercase||e.opt.lowercasetags,e.looseCase=e.opt.lowercase?"toLowerCase":"toUpperCase",e.tags=[],e.closed=e.closedRoot=e.sawRoot=!1,e.tag=e.error=null,e.strict=!!a,e.noscript=!(!a&&!e.opt.noscript),e.state=U.BEGIN,e.strictEntities=e.opt.strictEntities,e.ENTITIES=e.strictEntities?Object.create(c.XML_ENTITIES):Object.create(c.ENTITIES),e.attribList=[],e.opt.xmlns&&(e.ns=Object.create(P)),e.trackPosition=!1!==e.opt.position,e.trackPosition&&(e.position=e.line=e.column=0),n(e,"onready")}function e(a){for(var b=Math.max(c.MAX_BUFFER_LENGTH,10),d=0,e=0,f=D.length;e<f;e++){var g=a[D[e]].length;if(g>b)switch(D[e]){case"textNode":p(a);break;case"cdata":o(a,"oncdata",a.cdata),a.cdata="";break;case"script":o(a,"onscript",a.script),a.script="";break;default:r(a,"Max buffer length exceeded: "+D[e])}d=Math.max(d,g)}var h=c.MAX_BUFFER_LENGTH-d;a.bufferCheckPosition=h+a.position}function f(a){for(var b=0,c=D.length;b<c;b++)a[D[b]]=""}function g(a){p(a),""!==a.cdata&&(o(a,"oncdata",a.cdata),a.cdata=""),""!==a.script&&(o(a,"onscript",a.script),a.script="")}function h(a,b){return new i(a,b)}function i(a,b){if(!(this instanceof i))return new i(a,b);E.apply(this),this._parser=new d(a,b),this.writable=!0,this.readable=!0;var c=this;this._parser.onend=function(){c.emit("end")},this._parser.onerror=function(a){c.emit("error",a),c._parser.error=null},this._decoder=null,F.forEach(function(a){Object.defineProperty(c,"on"+a,{get:function(){return c._parser["on"+a]},set:function(b){if(!b)return c.removeAllListeners(a),c._parser["on"+a]=b,b;c.on(a,b)},enumerable:!0,configurable:!1})})}function j(a){return a.split("").reduce(function(a,b){return a[b]=!0,a},{})}function k(a){return"[object RegExp]"===Object.prototype.toString.call(a)}function l(a,b){return k(a)?!!b.match(a):a[b]}function m(a,b){return!l(a,b)}function n(a,b,c){a[b]&&a[b](c)}function o(a,b,c){a.textNode&&p(a),n(a,b,c)}function p(a){a.textNode=q(a.opt,a.textNode),a.textNode&&n(a,"ontext",a.textNode),a.textNode=""}function q(a,b){return a.trim&&(b=b.trim()),a.normalize&&(b=b.replace(/\s+/g," ")),b}function r(a,b){return p(a),a.trackPosition&&(b+="\nLine: "+a.line+"\nColumn: "+a.column+"\nChar: "+a.c),b=new Error(b),a.error=b,n(a,"onerror",b),a}function s(a){return a.sawRoot&&!a.closedRoot&&t(a,"Unclosed root tag"),a.state!==U.BEGIN&&a.state!==U.BEGIN_WHITESPACE&&a.state!==U.TEXT&&r(a,"Unexpected end"),p(a),a.c="",a.closed=!0,n(a,"onend"),d.call(a,a.strict,a.opt),a}function t(a,b){if("object"!=typeof a||!(a instanceof d))throw new Error("bad call to strictFail");a.strict&&r(a,b)}function u(a){a.strict||(a.tagName=a.tagName[a.looseCase]());var b=a.tags[a.tags.length-1]||a,c=a.tag={name:a.tagName,attributes:{}};a.opt.xmlns&&(c.ns=b.ns),a.attribList.length=0,o(a,"onopentagstart",c)}function v(a,b){var c=a.indexOf(":"),d=c<0?["",a]:a.split(":"),e=d[0],f=d[1];return b&&"xmlns"===a&&(e="xmlns",f=""),{prefix:e,local:f}}function w(a){if(a.strict||(a.attribName=a.attribName[a.looseCase]()),-1!==a.attribList.indexOf(a.attribName)||a.tag.attributes.hasOwnProperty(a.attribName))return void(a.attribName=a.attribValue="");if(a.opt.xmlns){var b=v(a.attribName,!0),c=b.prefix,d=b.local;if("xmlns"===c)if("xml"===d&&a.attribValue!==N)t(a,"xml: prefix must be bound to "+N+"\nActual: "+a.attribValue);else if("xmlns"===d&&a.attribValue!==O)t(a,"xmlns: prefix must be bound to "+O+"\nActual: "+a.attribValue);else{var e=a.tag,f=a.tags[a.tags.length-1]||a;e.ns===f.ns&&(e.ns=Object.create(f.ns)),e.ns[d]=a.attribValue}a.attribList.push([a.attribName,a.attribValue])}else a.tag.attributes[a.attribName]=a.attribValue,o(a,"onattribute",{name:a.attribName,value:a.attribValue});a.attribName=a.attribValue=""}function x(a,b){if(a.opt.xmlns){var c=a.tag,d=v(a.tagName);c.prefix=d.prefix,c.local=d.local,c.uri=c.ns[d.prefix]||"",c.prefix&&!c.uri&&(t(a,"Unbound namespace prefix: "+JSON.stringify(a.tagName)),c.uri=d.prefix);var e=a.tags[a.tags.length-1]||a;c.ns&&e.ns!==c.ns&&Object.keys(c.ns).forEach(function(b){o(a,"onopennamespace",{prefix:b,uri:c.ns[b]})});for(var f=0,g=a.attribList.length;f<g;f++){var h=a.attribList[f],i=h[0],j=h[1],k=v(i,!0),l=k.prefix,m=k.local,n=""===l?"":c.ns[l]||"",p={name:i,value:j,prefix:l,local:m,uri:n};l&&"xmlns"!==l&&!n&&(t(a,"Unbound namespace prefix: "+JSON.stringify(l)),p.uri=l),a.tag.attributes[i]=p,o(a,"onattribute",p)}a.attribList.length=0}a.tag.isSelfClosing=!!b,a.sawRoot=!0,a.tags.push(a.tag),o(a,"onopentag",a.tag),b||(a.noscript||"script"!==a.tagName.toLowerCase()?a.state=U.TEXT:a.state=U.SCRIPT,a.tag=null,a.tagName=""),a.attribName=a.attribValue="",a.attribList.length=0}function y(a){if(!a.tagName)return t(a,"Weird empty close tag."),a.textNode+="</>",void(a.state=U.TEXT);if(a.script){if("script"!==a.tagName)return a.script+="</"+a.tagName+">",a.tagName="",void(a.state=U.SCRIPT)
|
17 |
-
;o(a,"onscript",a.script),a.script=""}var b=a.tags.length,c=a.tagName;a.strict||(c=c[a.looseCase]());for(var d=c;b--;){if(a.tags[b].name===d)break;t(a,"Unexpected close tag")}if(b<0)return t(a,"Unmatched closing tag: "+a.tagName),a.textNode+="</"+a.tagName+">",void(a.state=U.TEXT);a.tagName=c;for(var e=a.tags.length;e-- >b;){var f=a.tag=a.tags.pop();a.tagName=a.tag.name,o(a,"onclosetag",a.tagName);var g={};for(var h in f.ns)g[h]=f.ns[h];var i=a.tags[a.tags.length-1]||a;a.opt.xmlns&&f.ns!==i.ns&&Object.keys(f.ns).forEach(function(b){var c=f.ns[b];o(a,"onclosenamespace",{prefix:b,uri:c})})}0===b&&(a.closedRoot=!0),a.tagName=a.attribValue=a.attribName="",a.attribList.length=0,a.state=U.TEXT}function z(a){var b,c=a.entity,d=c.toLowerCase(),e="";return a.ENTITIES[c]?a.ENTITIES[c]:a.ENTITIES[d]?a.ENTITIES[d]:(c=d,"#"===c.charAt(0)&&("x"===c.charAt(1)?(c=c.slice(2),b=parseInt(c,16),e=b.toString(16)):(c=c.slice(1),b=parseInt(c,10),e=b.toString(10))),c=c.replace(/^0+/,""),e.toLowerCase()!==c?(t(a,"Invalid character entity"),"&"+a.entity+";"):String.fromCodePoint(b))}function A(a,b){"<"===b?(a.state=U.OPEN_WAKA,a.startTagPosition=a.position):m(G,b)&&(t(a,"Non-whitespace before first tag."),a.textNode=b,a.state=U.TEXT)}function B(a,b){var c="";return b<a.length&&(c=a.charAt(b)),c}function C(a){var b=this;if(this.error)throw this.error;if(b.closed)return r(b,"Cannot write after close. Assign an onready handler.");if(null===a)return s(b);"object"==typeof a&&(a=a.toString());for(var c=0,d="";;){if(d=B(a,c++),b.c=d,!d)break;switch(b.trackPosition&&(b.position++,"\n"===d?(b.line++,b.column=0):b.column++),b.state){case U.BEGIN:if(b.state=U.BEGIN_WHITESPACE,"\ufeff"===d)continue;A(b,d);continue;case U.BEGIN_WHITESPACE:A(b,d);continue;case U.TEXT:if(b.sawRoot&&!b.closedRoot){for(var f=c-1;d&&"<"!==d&&"&"!==d;)(d=B(a,c++))&&b.trackPosition&&(b.position++,"\n"===d?(b.line++,b.column=0):b.column++);b.textNode+=a.substring(f,c-1)}"<"!==d||b.sawRoot&&b.closedRoot&&!b.strict?(!m(G,d)||b.sawRoot&&!b.closedRoot||t(b,"Text data outside of root node."),"&"===d?b.state=U.TEXT_ENTITY:b.textNode+=d):(b.state=U.OPEN_WAKA,b.startTagPosition=b.position);continue;case U.SCRIPT:"<"===d?b.state=U.SCRIPT_ENDING:b.script+=d;continue;case U.SCRIPT_ENDING:"/"===d?b.state=U.CLOSE_TAG:(b.script+="<"+d,b.state=U.SCRIPT);continue;case U.OPEN_WAKA:if("!"===d)b.state=U.SGML_DECL,b.sgmlDecl="";else if(l(G,d));else if(l(Q,d))b.state=U.OPEN_TAG,b.tagName=d;else if("/"===d)b.state=U.CLOSE_TAG,b.tagName="";else if("?"===d)b.state=U.PROC_INST,b.procInstName=b.procInstBody="";else{if(t(b,"Unencoded <"),b.startTagPosition+1<b.position){var g=b.position-b.startTagPosition;d=new Array(g).join(" ")+d}b.textNode+="<"+d,b.state=U.TEXT}continue;case U.SGML_DECL:(b.sgmlDecl+d).toUpperCase()===L?(o(b,"onopencdata"),b.state=U.CDATA,b.sgmlDecl="",b.cdata=""):b.sgmlDecl+d==="--"?(b.state=U.COMMENT,b.comment="",b.sgmlDecl=""):(b.sgmlDecl+d).toUpperCase()===M?(b.state=U.DOCTYPE,(b.doctype||b.sawRoot)&&t(b,"Inappropriately located doctype declaration"),b.doctype="",b.sgmlDecl=""):">"===d?(o(b,"onsgmldeclaration",b.sgmlDecl),b.sgmlDecl="",b.state=U.TEXT):l(J,d)?(b.state=U.SGML_DECL_QUOTED,b.sgmlDecl+=d):b.sgmlDecl+=d;continue;case U.SGML_DECL_QUOTED:d===b.q&&(b.state=U.SGML_DECL,b.q=""),b.sgmlDecl+=d;continue;case U.DOCTYPE:">"===d?(b.state=U.TEXT,o(b,"ondoctype",b.doctype),b.doctype=!0):(b.doctype+=d,"["===d?b.state=U.DOCTYPE_DTD:l(J,d)&&(b.state=U.DOCTYPE_QUOTED,b.q=d));continue;case U.DOCTYPE_QUOTED:b.doctype+=d,d===b.q&&(b.q="",b.state=U.DOCTYPE);continue;case U.DOCTYPE_DTD:b.doctype+=d,"]"===d?b.state=U.DOCTYPE:l(J,d)&&(b.state=U.DOCTYPE_DTD_QUOTED,b.q=d);continue;case U.DOCTYPE_DTD_QUOTED:b.doctype+=d,d===b.q&&(b.state=U.DOCTYPE_DTD,b.q="");continue;case U.COMMENT:"-"===d?b.state=U.COMMENT_ENDING:b.comment+=d;continue;case U.COMMENT_ENDING:"-"===d?(b.state=U.COMMENT_ENDED,b.comment=q(b.opt,b.comment),b.comment&&o(b,"oncomment",b.comment),b.comment=""):(b.comment+="-"+d,b.state=U.COMMENT);continue;case U.COMMENT_ENDED:">"!==d?(t(b,"Malformed comment"),b.comment+="--"+d,b.state=U.COMMENT):b.state=U.TEXT;continue;case U.CDATA:"]"===d?b.state=U.CDATA_ENDING:b.cdata+=d;continue;case U.CDATA_ENDING:"]"===d?b.state=U.CDATA_ENDING_2:(b.cdata+="]"+d,b.state=U.CDATA);continue;case U.CDATA_ENDING_2:">"===d?(b.cdata&&o(b,"oncdata",b.cdata),o(b,"onclosecdata"),b.cdata="",b.state=U.TEXT):"]"===d?b.cdata+="]":(b.cdata+="]]"+d,b.state=U.CDATA);continue;case U.PROC_INST:"?"===d?b.state=U.PROC_INST_ENDING:l(G,d)?b.state=U.PROC_INST_BODY:b.procInstName+=d;continue;case U.PROC_INST_BODY:if(!b.procInstBody&&l(G,d))continue;"?"===d?b.state=U.PROC_INST_ENDING:b.procInstBody+=d;continue;case U.PROC_INST_ENDING:">"===d?(o(b,"onprocessinginstruction",{name:b.procInstName,body:b.procInstBody}),b.procInstName=b.procInstBody="",b.state=U.TEXT):(b.procInstBody+="?"+d,b.state=U.PROC_INST_BODY);continue;case U.OPEN_TAG:l(R,d)?b.tagName+=d:(u(b),">"===d?x(b):"/"===d?b.state=U.OPEN_TAG_SLASH:(m(G,d)&&t(b,"Invalid character in tag name"),b.state=U.ATTRIB));continue;case U.OPEN_TAG_SLASH:">"===d?(x(b,!0),y(b)):(t(b,"Forward-slash in opening tag not followed by >"),b.state=U.ATTRIB);continue;case U.ATTRIB:if(l(G,d))continue;">"===d?x(b):"/"===d?b.state=U.OPEN_TAG_SLASH:l(Q,d)?(b.attribName=d,b.attribValue="",b.state=U.ATTRIB_NAME):t(b,"Invalid attribute name");continue;case U.ATTRIB_NAME:"="===d?b.state=U.ATTRIB_VALUE:">"===d?(t(b,"Attribute without value"),b.attribValue=b.attribName,w(b),x(b)):l(G,d)?b.state=U.ATTRIB_NAME_SAW_WHITE:l(R,d)?b.attribName+=d:t(b,"Invalid attribute name");continue;case U.ATTRIB_NAME_SAW_WHITE:if("="===d)b.state=U.ATTRIB_VALUE;else{if(l(G,d))continue;t(b,"Attribute without value"),b.tag.attributes[b.attribName]="",b.attribValue="",o(b,"onattribute",{name:b.attribName,value:""}),b.attribName="",">"===d?x(b):l(Q,d)?(b.attribName=d,b.state=U.ATTRIB_NAME):(t(b,"Invalid attribute name"),b.state=U.ATTRIB)}continue;case U.ATTRIB_VALUE:if(l(G,d))continue;l(J,d)?(b.q=d,b.state=U.ATTRIB_VALUE_QUOTED):(t(b,"Unquoted attribute value"),b.state=U.ATTRIB_VALUE_UNQUOTED,b.attribValue=d);continue;case U.ATTRIB_VALUE_QUOTED:if(d!==b.q){"&"===d?b.state=U.ATTRIB_VALUE_ENTITY_Q:b.attribValue+=d;continue}w(b),b.q="",b.state=U.ATTRIB_VALUE_CLOSED;continue;case U.ATTRIB_VALUE_CLOSED:l(G,d)?b.state=U.ATTRIB:">"===d?x(b):"/"===d?b.state=U.OPEN_TAG_SLASH:l(Q,d)?(t(b,"No whitespace between attributes"),b.attribName=d,b.attribValue="",b.state=U.ATTRIB_NAME):t(b,"Invalid attribute name");continue;case U.ATTRIB_VALUE_UNQUOTED:if(m(K,d)){"&"===d?b.state=U.ATTRIB_VALUE_ENTITY_U:b.attribValue+=d;continue}w(b),">"===d?x(b):b.state=U.ATTRIB;continue;case U.CLOSE_TAG:if(b.tagName)">"===d?y(b):l(R,d)?b.tagName+=d:b.script?(b.script+="</"+b.tagName,b.tagName="",b.state=U.SCRIPT):(m(G,d)&&t(b,"Invalid tagname in closing tag"),b.state=U.CLOSE_TAG_SAW_WHITE);else{if(l(G,d))continue;m(Q,d)?b.script?(b.script+="</"+d,b.state=U.SCRIPT):t(b,"Invalid tagname in closing tag."):b.tagName=d}continue;case U.CLOSE_TAG_SAW_WHITE:if(l(G,d))continue;">"===d?y(b):t(b,"Invalid characters in closing tag");continue;case U.TEXT_ENTITY:case U.ATTRIB_VALUE_ENTITY_Q:case U.ATTRIB_VALUE_ENTITY_U:var h,i;switch(b.state){case U.TEXT_ENTITY:h=U.TEXT,i="textNode";break;case U.ATTRIB_VALUE_ENTITY_Q:h=U.ATTRIB_VALUE_QUOTED,i="attribValue";break;case U.ATTRIB_VALUE_ENTITY_U:h=U.ATTRIB_VALUE_UNQUOTED,i="attribValue"}";"===d?(b[i]+=z(b),b.entity="",b.state=h):l(b.entity.length?T:S,d)?b.entity+=d:(t(b,"Invalid character in entity name"),b[i]+="&"+b.entity+d,b.entity="",b.state=h);continue;default:throw new Error(b,"Unknown state: "+b.state)}}return b.position>=b.bufferCheckPosition&&e(b),b}c.parser=function(a,b){return new d(a,b)},c.SAXParser=d,c.SAXStream=i,c.createStream=h,c.MAX_BUFFER_LENGTH=65536;var D=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];c.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(a){function b(){}return b.prototype=a,new b}),Object.keys||(Object.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}),d.prototype={end:function(){s(this)},write:C,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){g(this)}};var E;try{E=a(41).Stream}catch(W){E=function(){}}var F=c.EVENTS.filter(function(a){return"error"!==a&&"end"!==a});i.prototype=Object.create(E.prototype,{constructor:{value:i}}),i.prototype.write=function(c){if("function"==typeof b&&"function"==typeof b.isBuffer&&b.isBuffer(c)){if(!this._decoder){var d=a(7).StringDecoder;this._decoder=new d("utf8")}c=this._decoder.write(c)}return this._parser.write(c.toString()),this.emit("data",c),!0},i.prototype.end=function(a){return a&&a.length&&this.write(a),this._parser.end(),!0},i.prototype.on=function(a,b){var c=this;return c._parser["on"+a]||-1===F.indexOf(a)||(c._parser["on"+a]=function(){var b=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);b.splice(0,0,a),c.emit.apply(c,b)}),E.prototype.on.call(c,a,b)};var G="\r\n\t ",H="0124356789",I="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",J="'\"",K=G+">",L="[CDATA[",M="DOCTYPE",N="http://www.w3.org/XML/1998/namespace",O="http://www.w3.org/2000/xmlns/",P={xml:N,xmlns:O};G=j(G),H=j(H),I=j(I);var Q=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,R=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,S=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,T=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;J=j(J),K=j(K);var U=0;c.STATE={BEGIN:U++,BEGIN_WHITESPACE:U++,TEXT:U++,TEXT_ENTITY:U++,OPEN_WAKA:U++,SGML_DECL:U++,SGML_DECL_QUOTED:U++,DOCTYPE:U++,DOCTYPE_QUOTED:U++,DOCTYPE_DTD:U++,DOCTYPE_DTD_QUOTED:U++,COMMENT_STARTING:U++,COMMENT:U++,COMMENT_ENDING:U++,COMMENT_ENDED:U++,CDATA:U++,CDATA_ENDING:U++,CDATA_ENDING_2:U++,PROC_INST:U++,PROC_INST_BODY:U++,PROC_INST_ENDING:U++,OPEN_TAG:U++,OPEN_TAG_SLASH:U++,ATTRIB:U++,ATTRIB_NAME:U++,ATTRIB_NAME_SAW_WHITE:U++,ATTRIB_VALUE:U++,ATTRIB_VALUE_QUOTED:U++,ATTRIB_VALUE_CLOSED:U++,ATTRIB_VALUE_UNQUOTED:U++,ATTRIB_VALUE_ENTITY_Q:U++,ATTRIB_VALUE_ENTITY_U:U++,CLOSE_TAG:U++,CLOSE_TAG_SAW_WHITE:U++,SCRIPT:U++,SCRIPT_ENDING:U++},c.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},c.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(c.ENTITIES).forEach(function(a){var b=c.ENTITIES[a],d="number"==typeof b?String.fromCharCode(b):b;c.ENTITIES[a]=d});for(var V in c.STATE)c.STATE[c.STATE[V]]=V;U=c.STATE,/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
|
18 |
-
String.fromCodePoint||function(){var a=String.fromCharCode,b=Math.floor,c=function(){var c,d,e=16384,f=[],g=-1,h=arguments.length;if(!h)return"";for(var i="";++g<h;){var j=Number(arguments[g]);if(!isFinite(j)||j<0||j>1114111||b(j)!==j)throw RangeError("Invalid code point: "+j);j<=65535?f.push(j):(j-=65536,c=55296+(j>>10),d=j%1024+56320,f.push(c,d)),(g+1===h||f.length>e)&&(i+=a.apply(null,f),f.length=0)}return i};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:c,configurable:!0,writable:!0}):String.fromCodePoint=c}()}(void 0===c?this.sax={}:c)}).call(this,a(8).Buffer)},{41:41,7:7,8:8}],41:[function(a,b,c){function d(){e.call(this)}b.exports=d;var e=a(11).EventEmitter;a(21)(d,e),d.Readable=a(36),d.Writable=a(38),d.Duplex=a(26),d.Transform=a(37),d.PassThrough=a(35),d.Stream=d,d.prototype.pipe=function(a,b){function c(b){a.writable&&!1===a.write(b)&&j.pause&&j.pause()}function d(){j.readable&&j.resume&&j.resume()}function f(){k||(k=!0,a.end())}function g(){k||(k=!0,"function"==typeof a.destroy&&a.destroy())}function h(a){if(i(),0===e.listenerCount(this,"error"))throw a}function i(){j.removeListener("data",c),a.removeListener("drain",d),j.removeListener("end",f),j.removeListener("close",g),j.removeListener("error",h),a.removeListener("error",h),j.removeListener("end",i),j.removeListener("close",i),a.removeListener("close",i)}var j=this;j.on("data",c),a.on("drain",d),a._isStdio||b&&!1===b.end||(j.on("end",f),j.on("close",g));var k=!1;return j.on("error",h),a.on("error",h),j.on("end",i),j.on("close",i),a.on("close",i),a.emit("pipe",j),a}},{11:11,21:21,26:26,35:35,36:36,37:37,38:38}],42:[function(a,b,c){"use strict";function d(a){if(!a)return"utf8";for(var b;;)switch(a){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return a;default:if(b)return;a=(""+a).toLowerCase(),b=!0}}function e(a){var b=d(a);if("string"!=typeof b&&(s.isEncoding===t||!t(a)))throw new Error("Unknown encoding: "+a);return b||a}function f(a){this.encoding=e(a);var b;switch(this.encoding){case"utf16le":this.text=m,this.end=n,b=4;break;case"utf8":this.fillLast=j,b=4;break;case"base64":this.text=o,this.end=p,b=3;break;default:return this.write=q,void(this.end=r)}this.lastNeed=0,this.lastTotal=0,this.lastChar=s.allocUnsafe(b)}function g(a){return a<=127?0:a>>5==6?2:a>>4==14?3:a>>3==30?4:-1}function h(a,b,c){var d=b.length-1;if(d<c)return 0;var e=g(b[d]);return e>=0?(e>0&&(a.lastNeed=e-1),e):--d<c?0:(e=g(b[d]))>=0?(e>0&&(a.lastNeed=e-2),e):--d<c?0:(e=g(b[d]),e>=0?(e>0&&(2===e?e=0:a.lastNeed=e-3),e):0)}function i(a,b,c){if(128!=(192&b[0]))return a.lastNeed=0,"�".repeat(c);if(a.lastNeed>1&&b.length>1){if(128!=(192&b[1]))return a.lastNeed=1,"�".repeat(c+1);if(a.lastNeed>2&&b.length>2&&128!=(192&b[2]))return a.lastNeed=2,"�".repeat(c+2)}}function j(a){var b=this.lastTotal-this.lastNeed,c=i(this,a,b);return void 0!==c?c:this.lastNeed<=a.length?(a.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(a.copy(this.lastChar,b,0,a.length),void(this.lastNeed-=a.length))}function k(a,b){var c=h(this,a,b);if(!this.lastNeed)return a.toString("utf8",b);this.lastTotal=c;var d=a.length-(c-this.lastNeed);return a.copy(this.lastChar,0,d),a.toString("utf8",b,d)}function l(a){var b=a&&a.length?this.write(a):"";return this.lastNeed?b+"�".repeat(this.lastTotal-this.lastNeed):b}function m(a,b){if((a.length-b)%2==0){var c=a.toString("utf16le",b);if(c){var d=c.charCodeAt(c.length-1);if(d>=55296&&d<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],c.slice(0,-1)}return c}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",b,a.length-1)}function n(a){var b=a&&a.length?this.write(a):"";if(this.lastNeed){var c=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,c)}return b}function o(a,b){var c=(a.length-b)%3;return 0===c?a.toString("base64",b):(this.lastNeed=3-c,this.lastTotal=3,1===c?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",b,a.length-c))}function p(a){var b=a&&a.length?this.write(a):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function q(a){return a.toString(this.encoding)}function r(a){return a&&a.length?this.write(a):""}var s=a(39).Buffer,t=s.isEncoding||function(a){switch((a=""+a)&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};c.StringDecoder=f,f.prototype.write=function(a){if(0===a.length)return"";var b,c;if(this.lastNeed){if(void 0===(b=this.fillLast(a)))return"";c=this.lastNeed,this.lastNeed=0}else c=0;return c<a.length?b?b+this.text(a,c):this.text(a,c):b||""},f.prototype.end=l,f.prototype.text=k,f.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length),this.lastNeed-=a.length}},{39:39}],43:[function(a,b,c){(function(a){function c(a,b){function c(){if(!e){if(d("throwDeprecation"))throw new Error(b);d("traceDeprecation")?console.trace(b):console.warn(b),e=!0}return a.apply(this,arguments)}if(d("noDeprecation"))return a;var e=!1;return c}function d(b){try{if(!a.localStorage)return!1}catch(d){return!1}var c=a.localStorage[b];return null!=c&&"true"===String(c).toLowerCase()}b.exports=c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],44:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){l=!0,m=!0,n=!1,o=(new Date).getTime()}function b(a){m=a}function c(a){n=a}function d(a){l=a}function e(){return l}function f(){var a="",b=null;m&&(b=(new Date).getTime(),a+="["+(b-o)+"]"),n&&this&&this.getClassName&&(a+="["+this.getClassName()+"]",this.getType&&(a+="["+this.getType()+"]")),a.length>0&&(a+=" "),Array.apply(null,arguments).forEach(function(b){a+=b+" "}),l&&console.log(a),j.trigger(i.default.LOG,{message:a})}var h=this.context,j=(0,g.default)(h).getInstance(),k=void 0,l=void 0,m=void 0,n=void 0,o=void 0;return k={log:f,setLogTimestampVisible:b,setCalleeNameVisible:c,setLogToBrowserConsole:d,getLogToBrowserConsole:e},a(),k}Object.defineProperty(c,"__esModule",{value:!0});var f=a(45),g=d(f),h=a(49),i=d(h),j=a(46),k=d(j);e.__dashjs_factory_name="Debug",c.default=k.default.getSingletonFactory(e),b.exports=c.default},{45:45,46:46,49:49}],45:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b,c){var e=arguments.length<=3||void 0===arguments[3]?h:arguments[3];if(!a)throw new Error("event type cannot be null or undefined");if(!b||"function"!=typeof b)throw new Error("listener must be a function: "+b);if(!(d(a,b,c)>=0)){f[a]=f[a]||[];var g={callback:b,scope:c,priority:e};f[a].some(function(b,c){if(b&&e>b.priority)return f[a].splice(c,0,g),!0})||f[a].push(g)}}function b(a,b,c){if(a&&b&&f[a]){var e=d(a,b,c);e<0||(f[a][e]=null)}}function c(a,b){if(a&&f[a]){if(b=b||{},b.hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");b.type=a,f[a]=f[a].filter(function(a){return a}),f[a].forEach(function(a){return a&&a.callback.call(a.scope,b)})}}function d(a,b,c){var d=-1;return f[a]?(f[a].some(function(a,e){if(a&&a.callback===b&&(!c||c===a.scope))return d=e,!0}),d):d}function e(){f={}}var f={};return{on:a,off:b,trigger:c,reset:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=0,i=5e3;e.__dashjs_factory_name="EventBus";var j=g.default.getSingletonFactory(e);j.EVENT_PRIORITY_LOW=h,j.EVENT_PRIORITY_HIGH=i,g.default.updateSingletonFactory(e.__dashjs_factory_name,j),c.default=j,b.exports=c.default},{46:46}],46:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=function(){function a(a,b,c,d){!d[a]&&b&&(d[a]={instance:b,override:c})}function b(a,b){for(var c in n){var d=n[c];if(d.context===a&&d.name===b)return d.instance}return null}function c(a,b,c){for(var d in n){var e=n[d];if(e.context===a&&e.name===b)return void(n[d].instance=c)}n.push({name:b,context:a,instance:c})}function d(a,b){return b[a]}function e(a,b,c){a in c&&(c[a]=b)}function f(a,b){e(a,b,p)}function g(a){return d(a,p)}function h(a){var b=d(a.__dashjs_factory_name,p);return b||(b=function(b){return void 0===b&&(b={}),{create:function(){return l(a,b,arguments)}}},p[a.__dashjs_factory_name]=b),b}function i(a,b){e(a,b,o)}function j(a){return d(a,o)}function k(a){var c=d(a.__dashjs_factory_name,o);return c||(c=function(c){var d=void 0;return void 0===c&&(c={}),{getInstance:function(){return d||(d=b(c,a.__dashjs_factory_name)),d||(d=l(a,c,arguments),n.push({name:a.__dashjs_factory_name,context:c,instance:d})),d}}},o[a.__dashjs_factory_name]=c),c}function l(a,b,c){var d=void 0,e=a.__dashjs_factory_name,f=b[e];if(f){var g=f.instance;if(!f.override)return g.apply({context:b,factory:m},c);d=a.apply({context:b},c),g=g.apply({context:b,factory:m,parent:d},c);for(var h in g)d.hasOwnProperty(h)&&(d[h]=g[h])}else d=a.apply({context:b},c);return d.getClassName=function(){return e},d}var m=void 0,n=[],o={},p={};return m={extend:a,getSingletonInstance:b,setSingletonInstance:c,getSingletonFactory:k,getSingletonFactoryByName:j,updateSingletonFactory:i,getClassFactory:h,getClassFactoryByName:g,updateClassFactory:f}}();c.default=d,b.exports=c.default},{}],47:[function(a,b,c){"use strict";function d(){return e}Object.defineProperty(c,"__esModule",{value:!0}),c.getVersionString=d;var e="2.7.0"},{}],48:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(50),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.BUFFERING_COMPLETED="bufferingCompleted",this.BUFFER_CLEARED="bufferCleared",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.BYTES_APPENDED="bytesAppended",this.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",this.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",this.CURRENT_TRACK_CHANGED="currentTrackChanged",this.DATA_UPDATE_COMPLETED="dataUpdateCompleted",this.DATA_UPDATE_STARTED="dataUpdateStarted",this.INITIALIZATION_LOADED="initializationLoaded",this.INIT_FRAGMENT_LOADED="initFragmentLoaded",this.INIT_REQUESTED="initRequested",this.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",this.LIVE_EDGE_SEARCH_COMPLETED="liveEdgeSearchCompleted",this.LOADING_COMPLETED="loadingCompleted",this.LOADING_PROGRESS="loadingProgress",this.LOADING_DATA_PROGRESS="loadingDataProgress",this.LOADING_ABANDONED="loadingAborted",this.MANIFEST_UPDATED="manifestUpdated",this.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",this.QUOTA_EXCEEDED="quotaExceeded",this.REPRESENTATION_UPDATED="representationUpdated",this.SEGMENTS_LOADED="segmentsLoaded",this.SERVICE_LOCATION_BLACKLIST_ADD="serviceLocationBlacklistAdd",this.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",this.SOURCEBUFFER_REMOVE_COMPLETED="sourceBufferRemoveCompleted",this.STREAMS_COMPOSED="streamsComposed",this.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",this.STREAM_COMPLETED="streamCompleted",this.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",this.TIMED_TEXT_REQUESTED="timedTextRequested",this.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",this.URL_RESOLUTION_FAILED="urlResolutionFailed",this.VIDEO_CHUNK_RECEIVED="videoChunkReceived",this.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",this.XLINK_ELEMENT_LOADED="xlinkElementLoaded",this.XLINK_READY="xlinkReady"}return f(b,a),b}(i.default);c.default=j,b.exports=c.default},{50:50}],49:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(48),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).apply(this,arguments)}return f(b,a),b}(i.default),k=new j;c.default=k,b.exports=c.default},{48:48}],50:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a)}return e(a,[{key:"extend",value:function(a,b){if(a){var c=!!b&&b.override,d=!!b&&b.publicOnly;for(var e in a)!a.hasOwnProperty(e)||this[e]&&!c||d&&-1===a[e].indexOf("public_")||(this[e]=a[e])}}}]),a}();c.default=f,b.exports=c.default},{}],51:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){L()}function b(a){a&&a.dashManifestModel&&(N=a.dashManifestModel)}function c(a,b){return b&&a?b.getRepresentationForQuality(a.quality):null}function d(a){return a&&a.streamInfo&&void 0!==a.streamInfo.id&&P[a.streamInfo.id]?P[a.streamInfo.id][a.index]:null}function e(a,b){for(var c=b.length,d=0;d<c;d++){var e=b[d];if(a.id===e.id)return e}return null}function f(a){var b=new i.default,c=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index],d=N.getRepresentationFor(a.index,c);return b.id=a.id,b.quality=a.index,b.bandwidth=N.getBandwidth(d),b.DVRWindow=a.segmentAvailabilityRange,b.fragmentDuration=a.segmentDuration||(a.segments&&a.segments.length>0?a.segments[0].duration:NaN),b.MSETimeOffset=a.MSETimeOffset,b.useCalculatedLiveEdgeTime=a.useCalculatedLiveEdgeTime,b.mediaInfo=h(a.adaptation),b}function h(a){var b=new k.default,c=a.period.mpd.manifest.Period_asArray[a.period.index].AdaptationSet_asArray[a.index],d=void 0;return b.id=a.id,b.index=a.index,b.type=a.type,b.streamInfo=n(a.period),b.representationCount=N.getRepresentationCount(c),b.lang=N.getLanguageForAdaptation(c),d=N.getViewpointForAdaptation(c),b.viewpoint=d?d.value:void 0,b.accessibility=N.getAccessibilityForAdaptation(c).map(function(a){var c=a.value,d=c;return a.schemeIdUri&&a.schemeIdUri.search("cea-608")>=0&&void 0!==u.default&&(d=c?"cea-608:"+c:"cea-608",b.embeddedCaptions=!0),d}),b.audioChannelConfiguration=N.getAudioChannelConfigurationForAdaptation(c).map(function(a){return a.value}),b.roles=N.getRolesForAdaptation(c).map(function(a){return a.value}),b.codec=N.getCodec(c),b.mimeType=N.getMimeType(c),b.contentProtection=N.getContentProtectionData(c),b.bitrateList=N.getBitrateListForAdaptation(c),b.contentProtection&&b.contentProtection.forEach(function(a){a.KID=N.getKID(a)}),b.isText=N.getIsTextTrack(b.mimeType),b}function j(a,b,c){a.id=b,a.index=100+parseInt(b.substring(2,3)),a.type=g.default.EMBEDDED_TEXT,a.codec="cea-608-in-SEI",a.isText=!0,a.isEmbedded=!0,a.lang=c,a.roles=["caption"]}function l(a){a.type=g.default.IMAGE}function n(a){var b=new m.default;return b.id=a.id,b.index=a.index,b.start=a.start,b.duration=a.duration,b.manifestInfo=p(a.mpd),b.isLast=1===a.mpd.manifest.Period_asArray.length||Math.abs(b.start+b.duration-b.manifestInfo.duration)<1,b}function p(a){var b=new o.default;return b.DVRWindowSize=a.timeShiftBufferDepth,b.loadedTime=a.manifest.loadedTime,b.availableFrom=a.availabilityStartTime,b.minBufferTime=a.manifest.minBufferTime,b.maxFragmentDuration=a.maxSegmentDuration,b.duration=N.getDuration(a.manifest),b.isDynamic=N.getIsDynamic(a.manifest),b}function r(a,b){if(0===O.length)return null;var c=O[0].mpd.manifest,d=N.getAdaptationForType(c,a.index,b,a);if(!d)return null;var f=e(a,O),g=f.id,i=N.getIndexForAdaptation(d,c,a.index);return P[g]=P[g]||N.getAdaptationsForPeriod(f),h(P[g][i])}function s(a,b,c){var d=O,f=c,i=[],k=void 0,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0;if(f){t();var r=N.getMpd(f);d=N.getRegularPeriods(r)}else{if(!(O.length>0))return i;f=O[0].mpd.manifest}var s=e(a,d),u=s.id,v=N.getAdaptationsForType(f,a.index,b!==g.default.EMBEDDED_TEXT?b:g.default.VIDEO);if(!v)return i;for(P[u]=P[u]||N.getAdaptationsForPeriod(s),o=0,q=v.length;o<q;o++)if(k=v[o],n=N.getIndexForAdaptation(k,f,a.index),m=h(P[u][n]),b===g.default.EMBEDDED_TEXT){var w=m.accessibility.length;for(p=0;p<w;p++)if(m){var x=m.accessibility[p];if(0===x.indexOf("cea-608:")){var y=x.substring(8),z=y.split(";");if("CC"===z[0].substring(0,2))for(p=0;p<z.length;p++)m||(m=h.call(this,P[u][n])),j(m,z[p].substring(0,3),z[p].substring(4)),i.push(m),m=null;else for(p=0;p<z.length;p++)m||(m=h.call(this,P[u][n])),j(m,"CC"+(p+1),z[p]),i.push(m),m=null}else 0===x.indexOf("cea-608")&&(j(m,g.default.CC1,"eng"),i.push(m),m=null)}}else b===g.default.IMAGE?(l(m),i.push(m),m=null):m&&i.push(m);return i}function t(){if(!N||!N.hasOwnProperty("getMpd")||!N.hasOwnProperty("getRegularPeriods"))throw new Error("setConfig function has to be called previously")}function v(a){if(!a)return null;t();var b=N.getMpd(a);O=N.getRegularPeriods(b),P={}}function w(a,b){var c=[],d=O;if(a){t();var e=N.getMpd(a);d=N.getRegularPeriods(e)}b||(b=d.length);for(var f=0;f<b;f++)c.push(n(d[f]));return c}function x(a){if(!(a&&a.hasOwnProperty("getRepresentationController")&&a.hasOwnProperty("getIndexHandler")&&a.hasOwnProperty("getMediaInfo")&&a.hasOwnProperty("getType")&&a.hasOwnProperty("getStreamInfo")))throw new Error("streamProcessor parameter is missing or malformed!")}function y(a){if(!a||!a.hasOwnProperty("getRepresentationForQuality")||!a.hasOwnProperty("getCurrentRepresentation"))throw new Error("representationController parameter is missing or malformed!")}function z(a){if(null===a||isNaN(a)||a%1!=0)throw new Error("quality argument is not an integer")}function A(a,b){var c=void 0,d=void 0,e=void 0;return x(a),z(b),c=a.getRepresentationController(),e=a.getIndexHandler(),d=c?c.getRepresentationForQuality(b):null,e?e.getInitRequest(d):null}function B(a,b){var d=void 0,e=void 0,f=void 0;return x(a),d=a.getRepresentationController(),e=c(b,d),f=a.getIndexHandler(),f?f.getNextSegmentRequest(e):null}function C(a,b,d,e){var f=void 0,g=void 0,h=void 0;return x(a),f=a.getRepresentationController(),g=c(b,f),h=a.getIndexHandler(),h?h.getSegmentRequestForTime(g,d,e):null}function D(a,b,d){var e=void 0,f=void 0,g=void 0;return x(a),e=a.getRepresentationController(),f=c(b,e),g=a.getIndexHandler(),g?g.generateSegmentRequestForTime(f,d):null}function E(a){x(a);var b=a.getIndexHandler();return b?b.getCurrentTime():NaN}function F(a,b){x(a);var c=a.getIndexHandler();c&&c.setCurrentTime(b)}function G(a){x(a);var b=e(a.getStreamInfo(),O),c=a.getMediaInfo(),f=d(c),g=a.getType(),h=void 0,i=void 0;h=c?c.id:null,O.length>0&&(i=h?N.getAdaptationForId(h,O[0].mpd.manifest,b.index):N.getAdaptationForIndex(c.index,O[0].mpd.manifest,b.index),a.getRepresentationController().updateData(i,f,g))}function H(a,b){y(a),z(b);var c=a.getRepresentationForQuality(b);return c?f(c):null}function I(a){y(a);var b=a.getCurrentRepresentation();return b?f(b):null}function J(a,b,c){if(!a||!b)return null;var d=new q.default,e=a.scheme_id_uri,f=a.value,g=a.timescale,h=a.presentation_time_delta,i=a.event_duration,j=a.id,k=a.message_data,l=c*g+h;return b[e]?(d.eventStream=b[e],d.eventStream.value=f,d.eventStream.timescale=g,d.duration=i,d.id=j,d.presentationTime=l,d.messageData=k,d.presentationTimeDelta=h,d):null}function K(a,b){var f=[];if(0===O.length)return f;var g=O[0].mpd.manifest;return a instanceof m.default?f=N.getEventsForPeriod(e(a,O)):a instanceof k.default?f=N.getEventStreamForAdaptationSet(g,d(a)):a instanceof i.default&&(f=N.getEventStreamForRepresentation(g,c(a,b.getRepresentationController()))),f}function L(){O=[],P={}}var M=void 0,N=void 0,O=void 0,P=void 0;return M={convertDataToRepresentationInfo:f,getDataForMedia:d,getStreamsInfo:w,getMediaInfoForType:r,getAllMediaInfoForType:s,getCurrentRepresentationInfo:I,getRepresentationInfoForQuality:H,updateData:G,getInitRequest:A,getNextFragmentRequest:B,getFragmentRequestForTime:C,generateFragmentRequestForTime:D,getIndexHandlerTime:E,setIndexHandlerTime:F,getEventsFor:K,getEvent:J,setConfig:b,updatePeriods:v,reset:L},a(),M}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(171),i=d(h),j=a(169),k=d(j),l=a(172),m=d(l),n=a(168),o=d(n),p=a(80),q=d(p),r=a(46),s=d(r),t=a(2),u=d(t);e.__dashjs_factory_name="DashAdapter",c.default=s.default.getSingletonFactory(e),b.exports=c.default},{168:168,169:169,171:171,172:172,2:2,46:46,80:80,97:97}],52:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){Z=(0,v.default)(O).getInstance().log.bind(Y),l(),R=c(a.mimeType)?(0,G.default)(O).getInstance():(0,E.default)(O).getInstance(),R.setConfig({baseURLController:X,metricsModel:U,mediaPlayerModel:V,errHandler:W}),P.on(p.default.INITIALIZATION_LOADED,M,Y),P.on(p.default.SEGMENTS_LOADED,N,Y)}function c(a){return"webm"===a.split("/")[1].toLowerCase()}function d(b){ca=b;var c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;R.initialize(),da=(0,C.default)(O).create(a,c)}function e(){return ca}function f(a){aa=a}function h(){return aa}function j(){return ba}function l(){$=-1,aa=0,ba=NaN,_=null,ca=null,da=null}function o(){l(),P.off(p.default.INITIALIZATION_LOADED,M,Y),P.off(p.default.SEGMENTS_LOADED,N,Y)}function q(a,b,c){var d=X.resolve(c.path),e=void 0,f=void 0;return d&&b!==d.url&&Q.isRelative(b)?(e=d.url,f=d.serviceLocation,b&&(e=Q.resolve(b,e))):e=b,!Q.isRelative(e)&&(a.url=e,a.serviceLocation=f,!0)}function s(a,b){var c=new k.default,d=a.adaptation.period,e=d.start,f=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(c.mediaType=b,c.type=n.HTTPRequest.INIT_SEGMENT_TYPE,c.range=a.range,c.availabilityStartTime=S.calcAvailabilityStartTimeFromPresentationTime(e,d.mpd,f),c.availabilityEndTime=S.calcAvailabilityEndTimeFromPresentationTime(e+d.duration,d.mpd,f),c.quality=a.index,c.mediaInfo=ca?ca.getMediaInfo():null,c.representationId=a.id,q(c,a.initialization,a))return c}function t(a){var b=ca?ca.getType():null;return a?s(a,b):null}function u(a){var b=!1,c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(c||$!==a.availableSegmentsNumber){var d=(0,A.getSegmentByIndex)($,a);if(d){var e=parseFloat((d.presentationStartTime-a.adaptation.period.start).toFixed(5)),f=a.adaptation.period.duration;Z(a.segmentInfoType+": "+e+" / "+f),b=(a.segmentInfoType!==i.default.SEGMENT_TIMELINE||!c)&&e>=f}else Z("isMediaFinished - no segment found")}else b=!0;return b}function w(a){da.getSegments(a,_,$,y)}function y(a,b){var c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(a.segments=b,b&&b.length>0&&(ba=isNaN(ba)?b[0].presentationStartTime:Math.min(b[0].presentationStartTime,ba),c&&isNaN(S.getExpectedLiveEdge()))){var d=b[b.length-1],e=d.presentationStartTime,f=U.getMetricsFor(g.default.STREAM);S.setExpectedLiveEdge(e),U.updateManifestUpdateInfo(T.getCurrentManifestUpdate(f),{presentationStartTime:e})}}function B(a){if(!a)throw new Error("no representation");a.segments=null,w(a)}function D(a,b){var c=z.default.hasInitialization(a),d=z.default.hasSegments(a),e=ca?ca.getType():null,f=ca?ca.getStreamInfo().manifestInfo.isDynamic:null,g=void 0;if(a.segmentDuration||a.segments||B(a),a.segmentAvailabilityRange=S.calcSegmentAvailabilityRange(a,f),a.segmentAvailabilityRange.end<a.segmentAvailabilityRange.start&&!a.useCalculatedLiveEdgeTime)return g=new m.default(H,"no segments are available yet",{availabilityDelay:a.segmentAvailabilityRange.start-a.segmentAvailabilityRange.end}),void P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:a,error:g});b||($=-1),a.segmentDuration&&B(a),c||R.loadInitialization(a),d||R.loadSegments(a,e,a.indexRange),c&&d&&P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:a})}function F(a,b,c){var d=b.segments,e=d?d.length:null,f=-1,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0;if(d&&e>0)for(c=void 0===c||null===c?V.getSegmentOverlapToleranceTime():c,k=0;k<e;k++)if(h=d[k],i=h.presentationStartTime,j=h.duration,g=void 0===c||null===c?j/2:c,a+g>=i&&a-g<i+j){f=h.availabilityIdx;break}return f}function I(a){if(null===a||void 0===a)return null;var b=new k.default,c=a.representation,d=c.adaptation.period.mpd.manifest.Period_asArray[c.adaptation.period.index].AdaptationSet_asArray[c.adaptation.index].Representation_asArray[c.index].bandwidth,e=a.media,f=ca?ca.getType():null;return e=(0,A.replaceTokenForTemplate)(e,"Number",a.replacementNumber),e=(0,A.replaceTokenForTemplate)(e,"Time",a.replacementTime),e=(0,A.replaceTokenForTemplate)(e,"Bandwidth",d),e=(0,A.replaceIDForTemplate)(e,c.id),e=(0,A.unescapeDollarsInTemplate)(e),b.mediaType=f,b.type=n.HTTPRequest.MEDIA_SEGMENT_TYPE,b.range=a.mediaRange,b.startTime=a.presentationStartTime,b.duration=a.duration,b.timescale=c.timescale,b.availabilityStartTime=a.availabilityStartTime,b.availabilityEndTime=a.availabilityEndTime,b.wallStartTime=a.wallStartTime,b.quality=c.index,b.index=a.availabilityIdx,b.mediaInfo=ca.getMediaInfo(),b.adaptationIndex=c.adaptation.index,b.representationId=c.id,q(b,e,c)?b:void 0}function J(a,b,c){var d=void 0,e=void 0,f=void 0,g=ca?ca.getType():null,h=ca?ca.getStreamInfo().manifestInfo.isDynamic:null,j=$,l=!!c&&c.keepIdx,m=c?c.timeThreshold:null,n=!(!c||!c.ignoreIsFinished);return a?(_!==b&&(_=b,Z("Getting the request for "+g+" time : "+b)),w(a),$=F(b,a,m),$<0&&(w(a),$=F(b,a,m)),$>0&&Z("Index for "+g+" time "+b+" is "+$),f=!n&&u(a),f?(d=new k.default,d.action=k.default.ACTION_COMPLETE,d.index=$,d.mediaType=g,d.mediaInfo=ca.getMediaInfo(),Z("Signal complete in getSegmentRequestForTime -",g)):(e=(0,A.getSegmentByIndex)($,a),d=I(e)),l&&j>=0&&($=a.segmentInfoType===i.default.SEGMENT_TIMELINE&&h?$:j),d):null}function K(a,b){var c=(a.segmentAvailabilityRange.end-a.segmentAvailabilityRange.start)/2;return a.segments=null,a.segmentAvailabilityRange={start:b-c,end:b+c},J(a,b,{keepIdx:!1,ignoreIsFinished:!0})}function L(a){var b=void 0,c=void 0,d=void 0,e=ca?ca.getType():null,f=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;return a&&-1!==$?(_=null,$++,Z("Getting the next request at index: "+$+", type: "+e),!(0,A.getSegmentByIndex)($,a)&&f?(Z("No segment found at index: "+$+". Wait for next loop"),w(a),$--,null):(d=u(a),d?(b=new k.default,b.action=k.default.ACTION_COMPLETE,b.index=$,b.mediaType=e,b.mediaInfo=ca.getMediaInfo(),Z("Signal complete -",e)):(w(a),c=(0,A.getSegmentByIndex)($,a),b=I(c),!c&&f&&$--),b)):null}function M(a){var b=a.representation;b.segments&&P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:b})}function N(a){var b=ca?ca.getType():null,c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(!a.error&&b===a.mediaType){var d=a.segments,e=a.representation,f=[],g=0,h=void 0,i=void 0,j=void 0,k=void 0;for(h=0,i=d.length;h<i;h++)j=d[h],k=(0,A.getTimeBasedSegment)(S,c,e,j.startTime,j.duration,j.timescale,j.media,j.mediaRange,g),f.push(k),k=null,g++;e.segmentAvailabilityRange={start:f[0].presentationStartTime,end:f[i-1].presentationStartTime},e.availableSegmentsNumber=i,y(e,f),z.default.hasInitialization(e)&&P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:e})}}a=a||{};var O=this.context,P=(0,r.default)(O).getInstance(),Q=(0,x.default)(O).getInstance(),R=void 0,S=a.timelineConverter,T=a.dashMetrics,U=a.metricsModel,V=a.mediaPlayerModel,W=a.errHandler,X=a.baseURLController,Y=void 0,Z=void 0,$=void 0,_=void 0,aa=void 0,ba=void 0,ca=void 0,da=void 0;return Y={initialize:d,getStreamProcessor:e,getInitRequest:t,getSegmentRequestForTime:J,getNextSegmentRequest:L,generateSegmentRequestForTime:K,updateRepresentation:D,updateSegmentList:B,setCurrentTime:f,getCurrentTime:h,getEarliestTime:j,reset:o},b(),Y}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(56),i=d(h),j=a(164),k=d(j),l=a(162),m=d(l),n=a(182),o=a(49),p=d(o),q=a(45),r=d(q),s=a(46),t=d(s),u=a(44),v=d(u),w=a(157),x=d(w),y=a(84),z=d(y),A=a(74),B=a(73),C=d(B),D=a(54),E=d(D),F=a(55),G=d(F),H=1;e.__dashjs_factory_name="DashHandler";var I=t.default.getClassFactory(e);I.SEGMENTS_UNAVAILABLE_ERROR_CODE=H,t.default.updateClassFactory(e.__dashjs_factory_name,I),c.default=I,b.exports=c.default},{157:157,162:162,164:164,182:182,44:44,45:45,46:46,49:49,54:54,55:55,56:56,73:73,74:74,84:84,97:97}],53:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b){var c=void 0;return c=w(A.getValue().Period_asArray[b],a),null===c?null:c.bandwidth}function c(a,b){return v(A.getValue().Period_asArray[b],a)}function d(a,b){var c=A.getValue();return c?y(c.Period_asArray[b],a):-1}function e(a){return n(a,j.default.TRACK_SWITCH)}function g(a){return n(a,j.default.BUFFER_LEVEL)}function h(a){var b=g(a);return b?l.default.round10(b.level/1e3,-3):0}function i(a){return a?a.RequestsQueue:null}function k(a){if(!a)return null;var b=a.HttpList,c=null,d=void 0,e=void 0;if(!b||b.length<=0)return null;for(d=b.length,e=d-1;e>=0;){if(b[e].responsecode){c=b[e];break}e--}return c}function m(a){return a&&a.HttpList?a.HttpList:[]}function n(a,b){if(!a)return null;var c=a[b];if(!c)return null;var d=c.length;return d<=0?null:c[d-1]}function o(a){return n(a,j.default.DROPPED_FRAMES)}function p(a){return n(a,j.default.SCHEDULING_INFO)}function q(a){return n(a,j.default.MANIFEST_UPDATE)}function r(a){return n(a,j.default.DVR_INFO)}function s(a,b){var c={},d=void 0,e=void 0,g=void 0;for(d=m(a),g=d.length-1;g>=0;g--)if(e=d[g],e.type===f.HTTPRequest.MPD_TYPE){c=u(e._responseHeaders);break}return void 0===c[b]?null:c[b]}function t(a,b){var c={},d=k(a);return d&&(c=u(d._responseHeaders)),void 0===c[b]?null:c[b]}function u(a){var b={};if(!a)return b;for(var c=a.trim().split("\r\n"),d=0,e=c.length;d<e;d++){var f=c[d],g=f.indexOf(": ");g>0&&(b[f.substring(0,g)]=f.substring(g+2))}return b}function v(a,b){var c=w(a,b,!0);return null!==c?c:-1}function w(a,b,c){var d=void 0,e=void 0,f=void 0,g=void 0,h=void 0,i=void 0;if(a)for(e=a.AdaptationSet_asArray,h=0;h<e.length;h+=1)for(d=e[h],g=d.Representation_asArray,i=0;i<g.length;i+=1)if(f=g[i],b===f.id)return c?i:f;return null}function x(a,b){return z.getIsTypeOf(a,b)}function y(a,b){var c=void 0,d=void 0,e=void 0,f=void 0;if(!a||!b)return-1;for(d=a.AdaptationSet_asArray,f=0;f<d.length;f+=1)if(c=d[f],e=c.Representation_asArray,x(c,b))return e.length;return-1}a=a||{}
|
19 |
-
;var z=a.dashManifestModel,A=a.manifestModel;return{getBandwidthForRepresentation:b,getIndexForRepresentation:c,getMaxIndexForBufferType:d,getCurrentRepresentationSwitch:e,getLatestBufferLevelVO:g,getCurrentBufferLevel:h,getCurrentHttpRequest:k,getHttpRequests:m,getCurrentDroppedFrames:o,getCurrentSchedulingInfo:p,getCurrentDVRInfo:r,getCurrentManifestUpdate:q,getLatestFragmentRequestHeaderValueByID:t,getLatestMPDRequestHeaderValueByID:s,getRequestsQueue:i}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(182),g=a(46),h=d(g),i=a(98),j=d(i),k=a(72),l=d(k);e.__dashjs_factory_name="DashMetrics",c.default=h.default.getSingletonFactory(e),b.exports=c.default},{182:182,46:46,72:72,98:98}],54:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){w=(0,q.default)(p).getInstance(),y=(0,g.default)(p).getInstance(),C=(0,z.default)(p).create({errHandler:t,metricsModel:A,mediaPlayerModel:B,requestModifier:y})}function b(a){a.baseURLController&&(D=a.baseURLController),a.metricsModel&&(A=a.metricsModel),a.mediaPlayerModel&&(B=a.mediaPlayerModel),a.errHandler&&(t=a.errHandler)}function c(){if(!D||!D.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function d(a,b){c();var e=null,f=null,g=D.resolve(a.path),h=b||{init:!0,url:g?g.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500};r("Start searching for initialization.");var i=l(h),k=function(b){h.bytesLoaded=h.range.end,f=w.parse(b),e=j(f),e?(a.range=e,s.trigger(m.default.INITIALIZATION_LOADED,{representation:a})):(h.range.end=h.bytesLoaded+h.bytesToLoad,d(a,h))},n=function(){s.trigger(m.default.INITIALIZATION_LOADED,{representation:a})};C.load({request:i,success:k,error:n}),r("Perform init search: "+h.url)}function e(a,b,d,f,g){if(c(),d&&(void 0===d.start||void 0===d.end)){var i=d?d.toString().split("-"):null;d=i?{start:parseFloat(i[0]),end:parseFloat(i[1])}:null}g=g||n;var j=null,k=null,m=!!d,o=D.resolve(a.path),p={init:!1,url:o?o.url:void 0,range:m?d:{start:0,end:1500},searching:!m,bytesLoaded:f?f.bytesLoaded:0,bytesToLoad:1500},q=l(p),s=function(c){var d=p.bytesToLoad,f=c.byteLength;if(p.bytesLoaded=p.range.end-p.range.start,j=w.parse(c),(k=j.getBox("sidx"))&&k.isComplete){var i=k.references,l=void 0,m=void 0;null!==i&&void 0!==i&&i.length>0&&(l=1===i[0].reference_type),l?function(){r("Initiate multiple SIDX load."),p.range.end=p.range.start+k.size;var c=void 0,d=void 0,f=void 0,h=void 0,j=void 0,l=[],m=0,n=(k.offset||p.range.start)+k.size,o=function(c){c?(l=l.concat(c),++m>=d&&g(l,a,b)):g(null,a,b)};for(c=0,d=i.length;c<d;c++)f=n,h=n+i[c].referenced_size-1,n+=i[c].referenced_size,j={start:f,end:h},e(a,null,j,p,o)}():(r("Parsing segments from SIDX."),m=h(k,p),g(m,a,b))}else{if(k)p.range.start=k.offset||p.range.start,p.range.end=p.range.start+(k.size||d);else{if(f<p.bytesLoaded)return void g(null,a,b);var n=j.getLastBox();n&&n.size?(p.range.start=n.offset+n.size,p.range.end=p.range.start+d):p.range.end+=d}e(a,b,p.range,p,g)}},t=function(){g(null,a,b)};C.load({request:q,success:s,error:t}),r("Perform SIDX load: "+p.url)}function f(){C.abort(),C=null,t=null,w=null,y=null}function h(a,b){for(var c=a.references,d=c.length,e=a.timescale,f=a.earliest_presentation_time,g=b.range.start+a.offset+a.first_offset+a.size,h=[],j=void 0,k=void 0,l=void 0,m=void 0,n=0;n<d;n++)l=c[n].subsegment_duration,m=c[n].referenced_size,j=new i.default,j.duration=l,j.startTime=f,j.timescale=e,k=g+m-1,j.mediaRange=g+"-"+k,h.push(j),f+=l,g+=m;return h}function j(a){var b=a.getBox("ftyp"),c=a.getBox("moov"),d=null,e=void 0,f=void 0;return r("Searching for initialization."),c&&c.isComplete&&(e=b?b.offset:c.offset,f=c.offset+c.size-1,d=e+"-"+f,r("Found the initialization. Range: "+d)),d}function l(a){if(a.url){var b=new x.default;return b.type=a.init?v.HTTPRequest.INIT_SEGMENT_TYPE:v.HTTPRequest.MEDIA_SEGMENT_TYPE,b.url=a.url,b.range=a.range.start+"-"+a.range.end,b}}function n(a,b,c){a?s.trigger(m.default.SEGMENTS_LOADED,{segments:a,representation:b,mediaType:c}):s.trigger(m.default.SEGMENTS_LOADED,{segments:null,representation:b,mediaType:c,error:new k.default(null,"error loading segments",null)})}var p=this.context,r=(0,u.default)(p).getInstance().log,s=(0,o.default)(p).getInstance(),t=void 0,w=void 0,y=void 0,A=void 0,B=void 0,C=void 0,D=void 0;return{setConfig:b,initialize:a,loadInitialization:d,loadSegments:e,reset:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(155),g=d(f),h=a(85),i=d(h),j=a(162),k=d(j),l=a(49),m=d(l),n=a(45),o=d(n),p=a(145),q=d(p),r=a(46),s=d(r),t=a(44),u=d(t),v=a(182),w=a(164),x=d(w),y=a(120),z=d(y);e.__dashjs_factory_name="SegmentBaseLoader",c.default=s.default.getSingletonFactory(e),b.exports=c.default},{120:120,145:145,155:155,162:162,164:164,182:182,44:44,45:45,46:46,49:49,85:85}],55:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){z={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}}}function b(){B=(0,q.default)(r).getInstance(),E=(0,x.default)(r).create({errHandler:A,metricsModel:C,mediaPlayerModel:D,requestModifier:B})}function c(a){if(!(a.baseURLController&&a.metricsModel&&a.mediaPlayerModel&&a.errHandler))throw new Error("Missing config parameter(s)");F=a.baseURLController,C=a.metricsModel,D=a.mediaPlayerModel,A=a.errHandler}function d(a){var b=[],c=void 0,d=void 0,e=(0,k.default)(r).create({data:a});for(e.consumeTagAndSize(z.Segment.Cues);e.moreData()&&e.consumeTagAndSize(z.Segment.Cues.CuePoint,!0);){for(c={},c.CueTime=e.parseTag(z.Segment.Cues.CuePoint.CueTime),c.CueTracks=[];e.moreData()&&e.consumeTag(z.Segment.Cues.CuePoint.CueTrackPositions,!0);){var f=e.getMatroskaCodedNum(),g=e.getPos();if(d={},d.Track=e.parseTag(z.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===d.Track)throw new Error("Cue track cannot be 0");d.ClusterPosition=e.parseTag(z.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),c.CueTracks.push(d),e.setPos(g+f)}if(0===c.CueTracks.length)throw new Error("Mandatory cuetrack not found");b.push(c)}if(0===b.length)throw new Error("mandatory cuepoint not found");return b}function e(a,b,c,e){var f=void 0,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0,l=void 0,m=void 0;for(g=d(a),h=[],j=0,k=g.length;j<k;j+=1)i=new s.default,f=0,f=j<g.length-1?g[j+1].CueTime-g[j].CueTime:e-g[j].CueTime,i.duration=f,i.startTime=g[j].CueTime,i.timescale=1e3,l=g[j].CueTracks[0].ClusterPosition+b,m=j<g.length-1?g[j+1].CueTracks[0].ClusterPosition+b-1:c-1,i.mediaRange=l+"-"+m,h.push(i);return u("Parsed cues: "+h.length+" cues."),h}function f(a,b,c,d){var f=(0,k.default)(r).create({data:a}),g=void 0,h=void 0,i=c.split("-"),j=null,l={url:b,range:{start:parseFloat(i[0]),end:parseFloat(i[1])},request:j},m=void 0,o=void 0;for(u("Parse EBML header: "+l.url),f.skipOverElement(z.EBML),f.consumeTag(z.Segment),m=f.getMatroskaCodedNum(),m+=f.getPos(),o=f.getPos();f.moreData()&&!f.consumeTagAndSize(z.Segment.Info,!0);)if(!(f.skipOverElement(z.Segment.SeekHead,!0)||f.skipOverElement(z.Segment.Tracks,!0)||f.skipOverElement(z.Segment.Cues,!0)||f.skipOverElement(z.Void,!0)))throw new Error("no valid top level element found");for(;void 0===g;){var p=f.getMatroskaCodedNum(!0),q=f.getMatroskaCodedNum();switch(p){case z.Segment.Info.Duration.tag:g=f[z.Segment.Info.Duration.parse](q);break;default:f.setPos(f.getPos()+q)}}j=n(l);var s=function(a){h=e(a,o,m,g),d(h)},t=function(){u("Download Error: Cues "+l.url),d(null)};E.load({request:j,success:s,error:t}),u("Perform cues load: "+l.url+" bytes="+l.range.start+"-"+l.range.end)}function h(){if(!F||!F.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function j(a,b){h();var c=null,d=F.resolve(a.path),e=d?d.url:void 0,f=a.range.split("-"),i=b||{range:{start:parseFloat(f[0]),end:parseFloat(f[1])},request:c,url:e,init:!0};u("Start loading initialization."),c=n(i);var j=function(){w.trigger(g.default.INITIALIZATION_LOADED,{representation:a})},k=function(){w.trigger(g.default.INITIALIZATION_LOADED,{representation:a})};E.load({request:c,success:j,error:k}),u("Perform init load: "+i.url)}function l(a,b,c,d){h();var e=null,g=F.resolve(a.path),i=g?g.url:void 0,j=8192,k={bytesLoaded:0,bytesToLoad:j,range:{start:0,end:j},request:e,url:i,init:!1};d=d||m,e=n(k),u("Parsing ebml header");var l=function(e){f(e,i,c,function(c){d(c,a,b)})},o=function(){d(null,a,b)};E.load({request:e,success:l,error:o})}function m(a,b,c){a?w.trigger(g.default.SEGMENTS_LOADED,{segments:a,representation:b,mediaType:c}):w.trigger(g.default.SEGMENTS_LOADED,{segments:null,representation:b,mediaType:c,error:new Error(null,"error loading segments",null)})}function n(a){var b=new v.default;return b.type=a.init?t.HTTPRequest.INIT_SEGMENT_TYPE:t.HTTPRequest.MEDIA_SEGMENT_TYPE,b.url=a.url,b.range=a.range.start+"-"+a.range.end,b}function p(){A=null,B=null,u=null}var r=this.context,u=(0,o.default)(r).getInstance().log,w=(0,i.default)(r).getInstance(),y=void 0,z=void 0,A=void 0,B=void 0,C=void 0,D=void 0,E=void 0,F=void 0;return y={setConfig:c,initialize:b,loadInitialization:j,loadSegments:l,reset:p},a(),y}Object.defineProperty(c,"__esModule",{value:!0});var f=a(49),g=d(f),h=a(45),i=d(h),j=a(149),k=d(j),l=a(46),m=d(l),n=a(44),o=d(n),p=a(155),q=d(p),r=a(85),s=d(r),t=a(182),u=a(164),v=d(u),w=a(120),x=d(w);e.__dashjs_factory_name="WebmSegmentBaseLoader",c.default=m.default.getSingletonFactory(e),b.exports=c.default},{120:120,149:149,155:155,164:164,182:182,44:44,45:45,46:46,49:49,85:85}],56:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this.init()}return e(a,[{key:"init",value:function(){this.BASE_URL="BaseURL",this.SEGMENT_BASE="SegmentBase",this.SEGMENT_TEMPLATE="SegmentTemplate",this.SEGMENT_LIST="SegmentList",this.SEGMENT_URL="SegmentURL",this.SEGMENT_TIMELINE="SegmentTimeline",this.SEGMENT_PROFILES="segmentProfiles",this.ADAPTATION_SET="AdaptationSet",this.REPRESENTATION="Representation",this.REPRESENTATION_INDEX="RepresentationIndex",this.SUB_REPRESENTATION="SubRepresentation",this.INITIALIZATION="Initialization",this.INITIALIZATION_MINUS="initialization",this.MPD="MPD",this.PERIOD="Period",this.ASSET_IDENTIFIER="AssetIdentifier",this.EVENT_STREAM="EventStream",this.ID="id",this.PROFILES="profiles",this.SERVICE_LOCATION="serviceLocation",this.RANGE="range",this.INDEX="index",this.MEDIA="media",this.BYTE_RANGE="byteRange",this.INDEX_RANGE="indexRange",this.MEDIA_RANGE="mediaRange",this.VALUE="value",this.CONTENT_TYPE="contentType",this.MIME_TYPE="mimeType",this.BITSTREAM_SWITCHING="BitstreamSwitching",this.BITSTREAM_SWITCHING_MINUS="bitstreamSwitching",this.CODECS="codecs",this.DEPENDENCY_ID="dependencyId",this.MEDIA_STREAM_STRUCTURE_ID="mediaStreamStructureId",this.METRICS="Metrics",this.METRICS_MINUS="metrics",this.REPORTING="Reporting",this.WIDTH="width",this.HEIGHT="height",this.SAR="sar",this.FRAMERATE="frameRate",this.AUDIO_SAMPLING_RATE="audioSamplingRate",this.MAXIMUM_SAP_PERIOD="maximumSAPPeriod",this.START_WITH_SAP="startWithSAP",this.MAX_PLAYOUT_RATE="maxPlayoutRate",this.CODING_DEPENDENCY="codingDependency",this.SCAN_TYPE="scanType",this.FRAME_PACKING="FramePacking",this.AUDIO_CHANNEL_CONFIGURATION="AudioChannelConfiguration",this.CONTENT_PROTECTION="ContentProtection",this.ESSENTIAL_PROPERTY="EssentialProperty",this.SUPPLEMENTAL_PROPERTY="SupplementalProperty",this.INBAND_EVENT_STREAM="InbandEventStream",this.ACCESSIBILITY="Accessibility",this.ROLE="Role",this.RATING="Rating",this.CONTENT_COMPONENT="ContentComponent",this.SUBSET="Subset",this.LANG="lang",this.VIEWPOINT="Viewpoint",this.ROLE_ASARRAY="Role_asArray",this.ACCESSIBILITY_ASARRAY="Accessibility_asArray",this.AUDIOCHANNELCONFIGURATION_ASARRAY="AudioChannelConfiguration_asArray",this.CONTENTPROTECTION_ASARRAY="ContentProtection_asArray",this.MAIN="main",this.DYNAMIC="dynamic",this.MEDIA_PRESENTATION_DURATION="mediaPresentationDuration",this.MINIMUM_UPDATE_PERIOD="minimumUpdatePeriod",this.CODEC_PRIVATE_DATA="codecPrivateData",this.BANDWITH="bandwidth",this.SOURCE_URL="sourceURL",this.TIMESCALE="timescale",this.DURATION="duration",this.START_NUMBER="startNumber",this.PRESENTATION_TIME_OFFSET="presentationTimeOffset",this.AVAILABILITY_START_TIME="availabilityStartTime",this.AVAILABILITY_END_TIME="availabilityEndTime",this.TIMESHIFT_BUFFER_DEPTH="timeShiftBufferDepth",this.MAX_SEGMENT_DURATION="maxSegmentDuration",this.PRESENTATION_TIME="presentationTime",this.MIN_BUFFER_TIME="minBufferTime",this.MAX_SUBSEGMENT_DURATION="maxSubsegmentDuration",this.START="start",this.AVAILABILITY_TIME_OFFSET="availabilityTimeOffset",this.AVAILABILITY_TIME_COMPLETE="availabilityTimeComplete",this.CENC_DEFAULT_KID="cenc:default_KID",this.DVB_PRIORITY="dvb:priority",this.DVB_WEIGHT="dvb:weight"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],57:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){l(),H.on(o.default.QUALITY_CHANGE_REQUESTED,D,I),H.on(o.default.REPRESENTATION_UPDATED,A,I),H.on(o.default.WALLCLOCK_TIME_UPDATED,B,I),H.on(o.default.BUFFER_LEVEL_UPDATED,C,I),H.on(o.default.MANIFEST_VALIDITY_CHANGED,E,I)}function b(a){a.abrController&&(O=a.abrController),a.domStorage&&(S=a.domStorage),a.metricsModel&&(R=a.metricsModel),a.dashMetrics&&(V=a.dashMetrics),a.dashManifestModel&&(U=a.dashManifestModel),a.playbackController&&(Q=a.playbackController),a.timelineConverter&&(T=a.timelineConverter),a.manifestModel&&(X=a.manifestModel),a.streamProcessor&&(W=a.streamProcessor)}function c(){P=W.getIndexHandler()}function d(){return W}function e(){return J}function f(){return K}function h(){return L}function j(){return N}function l(){J=null,K=-1,L=!0,M=[],O=null,Q=null,R=null,S=null,T=null,U=null,V=null}function n(){H.off(o.default.QUALITY_CHANGE_REQUESTED,D,I),H.off(o.default.REPRESENTATION_UPDATED,A,I),H.off(o.default.WALLCLOCK_TIME_UPDATED,B,I),H.off(o.default.BUFFER_LEVEL_UPDATED,C,I),H.off(o.default.MANIFEST_VALIDITY_CHANGED,E,I),l()}function p(a,b,c){var d=W.getStreamInfo(),e=O.getTopQualityIndexFor(c,d.id),f=O.getMinAllowedIndexFor(c),h=void 0,i=void 0,j=null;if(L=!0,H.trigger(o.default.DATA_UPDATE_STARTED,{sender:this}),M=w(b),null!==J&&J.id==a.id||c===g.default.FRAGMENTED_TEXT?h=O.getQualityFor(c,d):(i=O.getThroughputHistory().getAverageThroughput(c),j=i||O.getInitialBitrateFor(c,d),h=O.getQualityForBitrate(W.getMediaInfo(),j)),void 0!==f&&h<f&&(h=f),h>e&&(h=e),N=t(h),J=a,c!==g.default.VIDEO&&c!==g.default.AUDIO&&c!==g.default.FRAGMENTED_TEXT)return L=!1,void H.trigger(o.default.DATA_UPDATE_COMPLETED,{sender:this,data:J,currentRepresentation:N});for(var k=0;k<M.length;k++)P.updateRepresentation(M[k],!0)}function q(){var a=new Date,b=j(),c=1e3*Q.getTime();R.addRepresentationSwitch(b.adaptation.type,a,c,b.id)}function r(){var a=W.getStreamInfo(),b=a?a.manifestInfo:null,c=b?b.isDynamic:null,d=T.calcSegmentAvailabilityRange(N,c);R.addDVRInfo(W.getType(),Q.getTime(),b,d)}function t(a){return M[a]}function u(a){return M.indexOf(a)}function v(){for(var a=0,b=M.length;a<b;a++){var c=M[a].segmentInfoType;if(null===M[a].segmentAvailabilityRange||!s.default.hasInitialization(M[a])||(c===i.default.SEGMENT_BASE||c===i.default.BASE_URL)&&!M[a].segments)return!1}return!0}function w(a){return K=U.getIndexForAdaptation(J,a.period.mpd.manifest,a.period.index),U.getRepresentationsForAdaptation(a)}function x(a){for(var b=void 0,c=0,d=M.length;c<d;c++)b=M[c],b.segmentAvailabilityRange=T.calcSegmentAvailabilityRange(b,a)}function y(){M.forEach(function(a){a.segmentAvailabilityRange=null})}function z(a){var b=a,c=function(){if(!h()){L=!0,H.trigger(o.default.DATA_UPDATE_STARTED,{sender:I}),y();for(var a=0;a<M.length;a++)P.updateRepresentation(M[a],!0)}};L=!1,H.trigger(o.default.AST_IN_FUTURE,{delay:b}),setTimeout(c,b)}function A(a){if(a.sender.getStreamProcessor()===W&&h()){var b=a.representation,c=R.getMetricsFor(g.default.STREAM),d=R.getMetricsFor(j().adaptation.type),e=V.getCurrentManifestUpdate(c),f=!1,l=0,m=void 0,n=void 0,p=void 0;if(b.adaptation.period.mpd.manifest.type===i.default.DYNAMIC&&!b.adaptation.period.mpd.manifest.ignorePostponeTimePeriod){var s=b.segmentAvailabilityRange.end-b.segmentAvailabilityRange.start;l=1e3*(Q.computeLiveDelay(N.segmentDuration,W.getStreamInfo().manifestInfo.DVRWindowSize)-s)}if(l>0)return r(),z(l),n=new k.default(F,"Segments update failed",null),void H.trigger(o.default.DATA_UPDATE_COMPLETED,{sender:this,data:J,currentRepresentation:N,error:n});if(e){for(var t=0;t<e.representationInfo.length;t++)if(m=e.representationInfo[t],m.index===b.index&&m.mediaType===W.getType()){f=!0;break}f||R.addManifestUpdateRepresentationInfo(e,b.id,b.index,b.adaptation.period.index,W.getType(),b.presentationTimeOffset,b.startNumber,b.segmentInfoType)}v()&&(L=!1,O.setPlaybackQuality(W.getType(),W.getStreamInfo(),u(N)),R.updateManifestUpdateInfo(e,{latency:N.segmentAvailabilityRange.end-Q.getTime()}),p=V.getCurrentRepresentationSwitch(d),p||q(),H.trigger(o.default.DATA_UPDATE_COMPLETED,{sender:this,data:J,currentRepresentation:N}))}}function B(a){a.isDynamic&&x(a.isDynamic)}function C(a){if(a.sender.getStreamProcessor()===W){X.getValue().doNotUpdateDVRWindowOnBufferUpdated||r()}}function D(a){if(a.mediaType===W.getType()&&W.getStreamInfo().id===a.streamInfo.id&&a.oldQuality!==a.newQuality){N=t(a.newQuality);var b=O.getThroughputHistory().getAverageThroughput(a.mediaType);isNaN(b)||S.setSavedBitrateSettings(a.mediaType,b),q()}}function E(a){if(a.newDuration){var b=j();if(b&&b.adaptation.period){b.adaptation.period.duration=a.newDuration}}}var F=1,G=this.context,H=(0,m.default)(G).getInstance(),I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0,Q=void 0,R=void 0,S=void 0,T=void 0,U=void 0,V=void 0,W=void 0,X=void 0;return I={initialize:c,setConfig:b,getData:e,getDataIndex:f,isUpdating:h,updateData:p,getStreamProcessor:d,getCurrentRepresentation:j,getRepresentationForQuality:t,reset:n},a(),I}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(56),i=d(h),j=a(162),k=d(j),l=a(45),m=d(l),n=a(49),o=d(n),p=a(46),q=d(p),r=a(84),s=d(r);e.__dashjs_factory_name="RepresentationController",c.default=q.default.getClassFactory(e),b.exports=c.default},{162:162,45:45,46:46,49:49,56:56,84:84,97:97}],58:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b){var c=void 0,d=void 0,e=void 0,f=void 0,h=void 0,j=void 0,k=!1,l=!1;if(!a)throw new Error("adaptation is not defined");if(!b)throw new Error("type is not defined");if(a.hasOwnProperty("ContentComponent_asArray")&&(f=a.ContentComponent_asArray),h=b!==g.default.TEXT?new RegExp(b):new RegExp("(vtt|ttml)"),a.Representation_asArray&&a.Representation_asArray.length&&a.Representation_asArray.length>0&&a.Representation_asArray[0].hasOwnProperty(i.default.CODECS)&&(j=a.Representation_asArray[0].codecs,0===j.search(g.default.STPP)||0===j.search(g.default.WVTT)))return b===g.default.FRAGMENTED_TEXT;if(f){if(f.length>1)return b===g.default.MUXED;f[0]&&f[0].contentType===b&&(k=!0,l=!0)}if(a.hasOwnProperty(i.default.MIME_TYPE)&&(k=h.test(a.mimeType),l=!0),!l)for(c=0,d=a.Representation_asArray&&a.Representation_asArray.length?a.Representation_asArray.length:0;!l&&c<d;)e=a.Representation_asArray[c],e.hasOwnProperty(i.default.MIME_TYPE)&&(k=h.test(e.mimeType),l=!0),c++;return k}function c(a){return b(a,g.default.AUDIO)}function d(a){return b(a,g.default.VIDEO)}function e(a){return b(a,g.default.FRAGMENTED_TEXT)}function f(a){return b(a,g.default.TEXT)}function h(a){return b(a,g.default.MUXED)}function j(a){return b(a,g.default.IMAGE)}function l(a){return"text/vtt"===a||"application/ttml+xml"===a}function n(a){var b="";return a&&a.hasOwnProperty(i.default.LANG)&&(b=a.lang.replace(/[^A-Za-z0-9-]/g,"")),b}function p(a){return a&&a.hasOwnProperty(i.default.VIEWPOINT)?a.Viewpoint:null}function r(a){return a&&a.hasOwnProperty(i.default.ROLE_ASARRAY)?a.Role_asArray:[]}function t(a){return a&&a.hasOwnProperty(i.default.ACCESSIBILITY_ASARRAY)?a.Accessibility_asArray:[]}function v(a){return a&&a.hasOwnProperty(i.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?a.AudioChannelConfiguration_asArray:[]}function x(a){return r(a).filter(function(a){return a.value===i.default.MAIN})[0]}function z(){return function(a,b){return a.bandwidth-b.bandwidth}}function B(a){return a&&void 0!==a.Representation_asArray&&null!==a.Representation_asArray&&a.Representation_asArray.sort(z()),a}function D(a,b,c){var d=b&&b.Period_asArray&&qa(c)&&b.Period_asArray[c]?b.Period_asArray[c].AdaptationSet_asArray:[],e=void 0,f=void 0;for(e=0,f=d.length;e<f;e++)if(d[e].hasOwnProperty(i.default.ID)&&d[e].id===a)return d[e];return null}function E(a,b,c){var d=b&&b.Period_asArray&&qa(c)&&b.Period_asArray[c]?b.Period_asArray[c].AdaptationSet_asArray:null;return d&&qa(a)?d[a]:null}function F(a,b,c){var d=b&&b.Period_asArray&&qa(c)&&b.Period_asArray[c]?b.Period_asArray[c].AdaptationSet_asArray:[],e=d.length;if(a)for(var f=0;f<e;f++){var g=(0,A.default)(ka).getInstance();if(g.areEqual(d[f],a))return f}return-1}function G(a,c,d){var e=a&&a.Period_asArray&&qa(c)&&a.Period_asArray[c]?a.Period_asArray[c].AdaptationSet_asArray:[],f=void 0,g=void 0,h=[];for(f=0,g=e.length;f<g;f++)b(e[f],d)&&h.push(B(e[f]));return h}function H(a,b,c,d){var e=G(a,b,c);if(!e||0===e.length)return null;if(e.length>1&&d){var f=ma.getCurrentTrackFor(c,d),g=oa.getAllMediaInfoForType(d,c);if(f)for(var h=0,i=e.length;h<i;h++)if(ma.isTracksEqual(f,g[h]))return e[h];for(var h=0,i=e.length;h<i;h++)if(x(e[h]))return e[h]}return e[0]}function I(a,b,c){if(a&&a.Representation_asArray&&a.Representation_asArray.length>0){var d=qa(b)&&b>=0&&b<a.Representation_asArray.length?a.Representation_asArray[b]:a.Representation_asArray[0],e=d.mimeType+';codecs="'+d.codecs+'"';return c&&void 0!==d.width&&(e+=';width="'+d.width+'";height="'+d.height+'"'),e}return null}function J(a){return a&&a.Representation_asArray&&a.Representation_asArray.length>0?a.Representation_asArray[0].mimeType:null}function K(a){return a&&a.hasOwnProperty(i.default.CENC_DEFAULT_KID)?a[i.default.CENC_DEFAULT_KID]:null}function L(a){return a&&a.hasOwnProperty(i.default.CONTENTPROTECTION_ASARRAY)&&0!==a.ContentProtection_asArray.length?a.ContentProtection_asArray:null}function M(a){var b=!1;return a&&a.hasOwnProperty("type")&&(b=a.type===i.default.DYNAMIC),b}function N(a,b){var c=!1;return a&&a.profiles&&a.profiles.length>0&&(c=-1!==a.profiles.indexOf(b)),c}function O(a){return N(a,pa)}function P(a){return a&&a.hasOwnProperty(i.default.MEDIA_PRESENTATION_DURATION)?a.mediaPresentationDuration:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE}function Q(a){return a&&a.bandwidth?a.bandwidth:NaN}function R(a){var b=arguments.length<=1||void 0===arguments[1]?0:arguments[1],c=NaN;return a&&a.hasOwnProperty(i.default.MINIMUM_UPDATE_PERIOD)&&(c=a.minimumUpdatePeriod),isNaN(c)?c:Math.max(c-b,1)}function S(a){return a&&a.Representation_asArray&&a.Representation_asArray.length?a.Representation_asArray.length:0}function T(a){return a&&a.Representation_asArray&&a.Representation_asArray.length?B(a).Representation_asArray.map(function(a){return{bandwidth:a.bandwidth,width:a.width||0,height:a.height||0,scanType:a.scanType||null}}):null}function U(a){return a&&a.EssentialProperty_asArray&&a.EssentialProperty_asArray.length?a.EssentialProperty_asArray.map(function(a){return{schemeIdUri:a.schemeIdUri,value:a.value}}):null}function V(a,b){return b&&b.Representation_asArray&&b.Representation_asArray.length>0&&qa(a)?b.Representation_asArray[a]:null}function W(a){if(a&&a.period&&qa(a.period.index)){var b=a.period.mpd.manifest.Period_asArray[a.period.index];if(b&&b.AdaptationSet_asArray&&qa(a.index))return B(b.AdaptationSet_asArray[a.index])}}function X(a){var b=a.S_asArray[a.S_asArray.length-1];return!b.hasOwnProperty("r")||b.r>=0}function Y(a){var b=W(a).Representation_asArray[0],c=void 0;return b.hasOwnProperty(i.default.SEGMENT_LIST)?(c=b.SegmentList,!c.hasOwnProperty(i.default.SEGMENT_TIMELINE)||X(c.SegmentTimeline)):!(!b.hasOwnProperty(i.default.SEGMENT_TEMPLATE)||(c=b.SegmentTemplate,!c.hasOwnProperty(i.default.SEGMENT_TIMELINE)))&&X(c.SegmentTimeline)}function Z(a){var b=[],c=W(a),d=void 0,e=void 0;if(a&&a.period&&qa(a.period.index)){var f=ia(a.period.mpd.manifest);f&&(e=f[0])}if(c&&c.Representation_asArray)for(var g=0,h=c.Representation_asArray.length;g<h;++g){var j=c.Representation_asArray[g],m=new k.default;if(m.index=g,m.adaptation=a,j.hasOwnProperty(i.default.ID)&&(m.id=j.id),j.hasOwnProperty(i.default.CODECS)&&(m.codecs=j.codecs),j.hasOwnProperty(i.default.CODEC_PRIVATE_DATA)&&(m.codecPrivateData=j.codecPrivateData),j.hasOwnProperty(i.default.BANDWITH)&&(m.bandwidth=j.bandwidth),j.hasOwnProperty(i.default.WIDTH)&&(m.width=j.width),j.hasOwnProperty(i.default.HEIGHT)&&(m.height=j.height),j.hasOwnProperty(i.default.SCAN_TYPE)&&(m.scanType=j.scanType),j.hasOwnProperty(i.default.MAX_PLAYOUT_RATE)&&(m.maxPlayoutRate=j.maxPlayoutRate),j.hasOwnProperty(i.default.SEGMENT_BASE)?(d=j.SegmentBase,m.segmentInfoType=i.default.SEGMENT_BASE):j.hasOwnProperty(i.default.SEGMENT_LIST)?(d=j.SegmentList,d.hasOwnProperty(i.default.SEGMENT_TIMELINE)?(m.segmentInfoType=i.default.SEGMENT_TIMELINE,m.useCalculatedLiveEdgeTime=X(d.SegmentTimeline)):(m.segmentInfoType=i.default.SEGMENT_LIST,m.useCalculatedLiveEdgeTime=!0)):j.hasOwnProperty(i.default.SEGMENT_TEMPLATE)?(d=j.SegmentTemplate,d.hasOwnProperty(i.default.SEGMENT_TIMELINE)?(m.segmentInfoType=i.default.SEGMENT_TIMELINE,m.useCalculatedLiveEdgeTime=X(d.SegmentTimeline)):m.segmentInfoType=i.default.SEGMENT_TEMPLATE,d.hasOwnProperty(i.default.INITIALIZATION_MINUS)&&(m.initialization=d.initialization.split("$Bandwidth$").join(j.bandwidth).split("$RepresentationID$").join(j.id))):m.segmentInfoType=i.default.BASE_URL,m.essentialProperties=U(j),d){if(d.hasOwnProperty(i.default.INITIALIZATION)){var n=d.Initialization;n.hasOwnProperty(i.default.SOURCE_URL)?m.initialization=n.sourceURL:n.hasOwnProperty(i.default.RANGE)&&(m.range=n.range)}else j.hasOwnProperty(i.default.MIME_TYPE)&&l(j.mimeType)&&(m.range=0);d.hasOwnProperty(i.default.TIMESCALE)&&(m.timescale=d.timescale),d.hasOwnProperty(i.default.DURATION)&&(m.segmentDuration=d.duration/m.timescale),d.hasOwnProperty(i.default.MEDIA)&&(m.media=d.media),d.hasOwnProperty(i.default.START_NUMBER)&&(m.startNumber=d.startNumber),d.hasOwnProperty(i.default.INDEX_RANGE)&&(m.indexRange=d.indexRange),d.hasOwnProperty(i.default.PRESENTATION_TIME_OFFSET)&&(m.presentationTimeOffset=d.presentationTimeOffset/m.timescale),d.hasOwnProperty(i.default.AVAILABILITY_TIME_OFFSET)?m.availabilityTimeOffset=d.availabilityTimeOffset:e&&void 0!==e.availabilityTimeOffset&&(m.availabilityTimeOffset=e.availabilityTimeOffset),d.hasOwnProperty(i.default.AVAILABILITY_TIME_COMPLETE)?m.availabilityTimeComplete="false"!==d.availabilityTimeComplete:e&&void 0!==e.availabilityTimeComplete&&(m.availabilityTimeComplete=e.availabilityTimeComplete)}m.MSETimeOffset=na.calcMSETimeOffset(m),m.path=[a.period.index,a.index,g],b.push(m)}return b}function $(a){var b=a&&qa(a.index)?a.mpd.manifest.Period_asArray[a.index]:null,f=[],k=void 0,l=void 0,n=void 0;if(b&&b.AdaptationSet_asArray)for(n=0;n<b.AdaptationSet_asArray.length;n++)l=b.AdaptationSet_asArray[n],k=new m.default,l.hasOwnProperty(i.default.ID)&&(k.id=l.id),k.index=n,k.period=a,h(l)?k.type=g.default.MUXED:c(l)?k.type=g.default.AUDIO:d(l)?k.type=g.default.VIDEO:e(l)?k.type=g.default.FRAGMENTED_TEXT:j(l)?k.type=g.default.IMAGE:k.type=g.default.TEXT,f.push(k);return f}function _(a){var b=!!a&&M(a.manifest),c=[],d=null,e=null,f=null,g=null,h=void 0,j=void 0;for(j=0,h=a&&a.manifest&&a.manifest.Period_asArray?a.manifest.Period_asArray.length:0;j<h;j++)e=a.manifest.Period_asArray[j],e.hasOwnProperty(i.default.START)?(g=new o.default,g.start=e.start):null!==d&&e.hasOwnProperty(i.default.DURATION)&&null!==f?(g=new o.default,g.start=parseFloat((f.start+f.duration).toFixed(5)),g.duration=e.duration):0!==j||b||(g=new o.default,g.start=0),null!==f&&isNaN(f.duration)&&(f.duration=parseFloat((g.start-f.start).toFixed(5))),null!==g&&(g.id=aa(e,j)),null!==g&&e.hasOwnProperty(i.default.DURATION)&&(g.duration=e.duration),null!==g&&(g.index=j,g.mpd=a,c.push(g),d=e,f=g),e=null,g=null;return 0===c.length?c:(null!==f&&isNaN(f.duration)&&(f.duration=parseFloat((ca(f)-f.start).toFixed(5))),c)}function aa(a,b){if(!a)throw new Error("Period cannot be null or undefined");var c=o.default.DEFAULT_ID+"_"+b;return a.hasOwnProperty(i.default.ID)&&a.id.length>0&&"__proto__"!==a.id&&(c=a.id),c}function ba(a){var b=new q.default;return a&&(b.manifest=a,a.hasOwnProperty(i.default.AVAILABILITY_START_TIME)?b.availabilityStartTime=new Date(a.availabilityStartTime.getTime()):b.availabilityStartTime=new Date(a.loadedTime.getTime()),a.hasOwnProperty(i.default.AVAILABILITY_END_TIME)&&(b.availabilityEndTime=new Date(a.availabilityEndTime.getTime())),a.hasOwnProperty(i.default.MINIMUM_UPDATE_PERIOD)&&(b.minimumUpdatePeriod=a.minimumUpdatePeriod),a.hasOwnProperty(i.default.MEDIA_PRESENTATION_DURATION)&&(b.mediaPresentationDuration=a.mediaPresentationDuration),a.hasOwnProperty(g.default.SUGGESTED_PRESENTATION_DELAY)&&(b.suggestedPresentationDelay=a.suggestedPresentationDelay),a.hasOwnProperty(i.default.TIMESHIFT_BUFFER_DEPTH)&&(b.timeShiftBufferDepth=a.timeShiftBufferDepth),a.hasOwnProperty(i.default.MAX_SEGMENT_DURATION)&&(b.maxSegmentDuration=a.maxSegmentDuration)),b}function ca(a){var b=M(a.mpd.manifest),c=void 0;if(a.mpd.manifest.mediaPresentationDuration)c=a.mpd.manifest.mediaPresentationDuration;else if(a.duration)c=a.duration;else{if(!b)throw new Error("Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.");c=Number.POSITIVE_INFINITY}return c}function da(a){var b=a&&a.mpd&&a.mpd.manifest?a.mpd.manifest:null,c=b?b.Period_asArray:null,d=c&&a&&qa(a.index)?c[a.index].EventStream_asArray:null,e=[],f=void 0,h=void 0;if(d)for(f=0;f<d.length;f++){var j=new y.default;if(j.period=a,j.timescale=1,!d[f].hasOwnProperty(g.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(j.schemeIdUri=d[f].schemeIdUri,d[f].hasOwnProperty(i.default.TIMESCALE)&&(j.timescale=d[f].timescale),d[f].hasOwnProperty(i.default.VALUE)&&(j.value=d[f].value),h=0;h<d[f].Event_asArray.length;h++){var k=new u.default;k.presentationTime=0,k.eventStream=j,d[f].Event_asArray[h].hasOwnProperty(i.default.PRESENTATION_TIME)&&(k.presentationTime=d[f].Event_asArray[h].presentationTime),d[f].Event_asArray[h].hasOwnProperty(i.default.DURATION)&&(k.duration=d[f].Event_asArray[h].duration),d[f].Event_asArray[h].hasOwnProperty(i.default.ID)&&(k.id=d[f].Event_asArray[h].id),e.push(k)}}return e}function ea(a,b){var c=[],d=void 0;if(!a)return c;for(d=0;d<a.length;d++){var e=new y.default;if(e.timescale=1,e.representation=b,!a[d].hasOwnProperty(g.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");e.schemeIdUri=a[d].schemeIdUri,a[d].hasOwnProperty(i.default.TIMESCALE)&&(e.timescale=a[d].timescale),
|
20 |
-
a[d].hasOwnProperty(i.default.VALUE)&&(e.value=a[d].value),c.push(e)}return c}function fa(a,b){var c=void 0,d=void 0,e=void 0;return a&&a.Period_asArray&&b&&b.period&&qa(b.period.index)&&(d=a.Period_asArray[b.period.index])&&d.AdaptationSet_asArray&&qa(b.index)&&(e=d.AdaptationSet_asArray[b.index])&&(c=e.InbandEventStream_asArray),ea(c,null)}function ga(a,b){var c=void 0,d=void 0,e=void 0,f=void 0;return a&&a.Period_asArray&&b&&b.adaptation&&b.adaptation.period&&qa(b.adaptation.period.index)&&(d=a.Period_asArray[b.adaptation.period.index])&&d.AdaptationSet_asArray&&qa(b.adaptation.index)&&(e=d.AdaptationSet_asArray[b.adaptation.index])&&e.Representation_asArray&&qa(b.index)&&(f=e.Representation_asArray[b.index])&&(c=f.InbandEventStream_asArray),ea(c,b)}function ha(a){var b=M(a),c=!!a&&a.hasOwnProperty(i.default.AVAILABILITY_START_TIME),d=a?a.UTCTiming_asArray:null,e=[];return(b||c)&&d&&d.forEach(function(a){var b=new s.default;a.hasOwnProperty(g.default.SCHEME_ID_URI)&&(b.schemeIdUri=a.schemeIdUri,a.hasOwnProperty(i.default.VALUE)&&(b.value=a.value.toString(),e.push(b)))}),e}function ia(a){var b=[],c=a.BaseURL_asArray||[a.baseUri],d=!1;return c.some(function(c){if(c){var e=new w.default,f=c.__text||c;return la.isRelative(f)&&(d=!0,a.baseUri&&(f=la.resolve(f,a.baseUri))),e.url=f,c.hasOwnProperty(i.default.SERVICE_LOCATION)&&c.serviceLocation.length?e.serviceLocation=c.serviceLocation:e.serviceLocation=f,c.hasOwnProperty(i.default.DVB_PRIORITY)&&(e.dvb_priority=c[i.default.DVB_PRIORITY]),c.hasOwnProperty(i.default.DVB_WEIGHT)&&(e.dvb_weight=c[i.default.DVB_WEIGHT]),c.hasOwnProperty(i.default.AVAILABILITY_TIME_OFFSET)&&(e.availabilityTimeOffset=c[i.default.AVAILABILITY_TIME_OFFSET]),c.hasOwnProperty(i.default.AVAILABILITY_TIME_COMPLETE)&&(e.availabilityTimeComplete="false"!==c[i.default.AVAILABILITY_TIME_COMPLETE]),b.push(e),d}}),b}function ja(a){if(a&&a.hasOwnProperty(g.default.LOCATION))return a.Location=a.Location_asArray[0],a.Location}a=a||{};var ka=this.context,la=(0,C.default)(ka).getInstance(),ma=a.mediaController,na=a.timelineConverter,oa=a.adapter,pa="urn:dvb:dash:profile:dvb-dash:2014",qa=Number.isInteger||function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a};return{getIsTypeOf:b,getIsAudio:c,getIsVideo:d,getIsText:f,getIsMuxed:h,getIsTextTrack:l,getIsFragmentedText:e,getIsImage:j,getIsMain:x,getLanguageForAdaptation:n,getViewpointForAdaptation:p,getRolesForAdaptation:r,getAccessibilityForAdaptation:t,getAudioChannelConfigurationForAdaptation:v,getAdaptationForIndex:E,getIndexForAdaptation:F,getAdaptationForId:D,getAdaptationsForType:G,getAdaptationForType:H,getCodec:I,getMimeType:J,getKID:K,getContentProtectionData:L,getIsDynamic:M,getIsDVB:O,getDuration:P,getBandwidth:Q,getManifestUpdatePeriod:R,getRepresentationCount:S,getBitrateListForAdaptation:T,getRepresentationFor:V,getRepresentationsForAdaptation:Z,getAdaptationsForPeriod:$,getRegularPeriods:_,getMpd:ba,getEventsForPeriod:da,getEventStreamForAdaptationSet:fa,getEventStreamForRepresentation:ga,getUTCTimingSources:ha,getBaseURLsFromElement:ia,getRepresentationSortFunction:z,getLocation:ja,getUseCalculatedLiveEdgeTimeForAdaptation:Y}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(56),i=d(h),j=a(84),k=d(j),l=a(78),m=d(l),n=a(83),o=d(n),p=a(82),q=d(p),r=a(86),s=d(r),t=a(80),u=d(t),v=a(79),w=d(v),x=a(81),y=d(x),z=a(154),A=d(z),B=a(157),C=d(B),D=a(46),E=d(D);e.__dashjs_factory_name="DashManifestModel",c.default=E.default.getSingletonFactory(e),b.exports=c.default},{154:154,157:157,46:46,56:56,78:78,79:79,80:80,81:81,82:82,83:83,84:84,86:86,97:97}],59:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){h=[new q.default,new s.default,new u.default,new o.default],j=new m.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:h}),l=(0,k.default)(e).create({adaptationset:new w.default,period:new y.default})}function b(){return h}function c(){return l}function d(a){var b=void 0,c=window.performance.now();if(!(b=j.xml_str2json(a)))throw new Error("parsing the manifest failed");var d=window.performance.now();l.run(b);var e=window.performance.now();return f("Parsing complete: ( xml2json: "+(d-c).toPrecision(3)+"ms, objectiron: "+(e-d).toPrecision(3)+"ms, total: "+((e-c)/1e3).toPrecision(3)+"s)"),b}var e=this.context,f=(0,i.default)(e).getInstance().log,g=void 0,h=void 0,j=void 0,l=void 0;return g={parse:d,getMatchers:b,getIron:c},a(),g}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(44),i=d(h),j=a(69),k=d(j),l=a(3),m=d(l),n=a(68),o=d(n),p=a(66),q=d(p),r=a(65),s=d(r),t=a(67),u=d(t),v=a(62),w=d(v),x=a(63),y=d(x);e.__dashjs_factory_name="DashParser",c.default=g.default.getClassFactory(e),b.exports=c.default},{3:3,44:44,46:46,62:62,63:63,65:65,66:66,67:67,68:68,69:69}],60:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b){d(this,a);var c=function(a){return a&&a.length&&a.charAt(0)===a.charAt(0).toUpperCase()};this._name=b,this._merge=c(b)}return e(a,[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}]),a}();c.default=f,b.exports=c.default},{}],61:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=a(60),h=d(g),i=function(){function a(b,c,d){var f=this;e(this,a),this._name=b||"",this._properties=[],this._children=d||[],Array.isArray(c)&&c.forEach(function(a){f._properties.push(new h.default(a))})}return f(a,[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),a}();c.default=i,b.exports=c.default},{60:60}],62:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(61),i=d(h),j=a(56),k=d(j),l=function(a){function b(){e(this,b);var a=[k.default.PROFILES,k.default.WIDTH,k.default.HEIGHT,k.default.SAR,k.default.FRAMERATE,k.default.AUDIO_SAMPLING_RATE,k.default.MIME_TYPE,k.default.SEGMENT_PROFILES,k.default.CODECS,k.default.MAXIMUM_SAP_PERIOD,k.default.START_WITH_SAP,k.default.MAX_PLAYOUT_RATE,k.default.CODING_DEPENDENCY,k.default.SCAN_TYPE,k.default.FRAME_PACKING,k.default.AUDIO_CHANNEL_CONFIGURATION,k.default.CONTENT_PROTECTION,k.default.ESSENTIAL_PROPERTY,k.default.SUPPLEMENTAL_PROPERTY,k.default.INBAND_EVENT_STREAM];g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,k.default.ADAPTATION_SET,a,[new i.default(k.default.REPRESENTATION,a,[new i.default(k.default.SUB_REPRESENTATION,a)])])}return f(b,a),b}(i.default);c.default=l,b.exports=c.default},{56:56,61:61}],63:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(61),i=d(h),j=a(56),k=d(j),l=function(a){function b(){e(this,b);var a=[k.default.SEGMENT_BASE,k.default.SEGMENT_TEMPLATE,k.default.SEGMENT_LIST];g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,k.default.PERIOD,a,[new i.default(k.default.ADAPTATION_SET,a,[new i.default(k.default.REPRESENTATION,a)])])}return f(b,a),b}(i.default);c.default=l,b.exports=c.default},{56:56,61:61}],64:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b,c){d(this,a),this._test=b,this._converter=c}return e(a,[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}]),a}();c.default=f,b.exports=c.default},{}],65:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(64),i=d(h),j=60,k=60,l=1e3,m=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/,n=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a){return m.test(a.value)},function(a){var b=m.exec(a),c=void 0;if(c=Date.UTC(parseInt(b[1],10),parseInt(b[2],10)-1,parseInt(b[3],10),parseInt(b[4],10),parseInt(b[5],10),b[6]&&parseInt(b[6],10)||0,b[7]&&parseFloat(b[7])*l||0),b[9]&&b[10]){var d=parseInt(b[9],10)*k+parseInt(b[10],10);c+=("+"===b[8]?-1:1)*d*j*l}return new Date(c)})}return f(b,a),b}(i.default);c.default=n,b.exports=c.default},{64:64}],66:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(64),i=d(h),j=a(97),k=d(j),l=a(56),m=d(l),n=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,o=31536e3,p=2592e3,q=86400,r=3600,s=60,t=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a){for(var b=[m.default.MIN_BUFFER_TIME,m.default.MEDIA_PRESENTATION_DURATION,m.default.MINIMUM_UPDATE_PERIOD,m.default.TIMESHIFT_BUFFER_DEPTH,m.default.MAX_SEGMENT_DURATION,m.default.MAX_SUBSEGMENT_DURATION,k.default.SUGGESTED_PRESENTATION_DELAY,m.default.START,k.default.START_TIME,m.default.DURATION],c=b.length,d=0;d<c;d++)if(a.nodeName===b[d])return n.test(a.value);return!1},function(a){var b=n.exec(a),c=parseFloat(b[2]||0)*o+parseFloat(b[4]||0)*p+parseFloat(b[6]||0)*q+parseFloat(b[8]||0)*r+parseFloat(b[10]||0)*s+parseFloat(b[12]||0);return void 0!==b[1]&&(c=-c),c})}return f(b,a),b}(i.default);c.default=t,b.exports=c.default},{56:56,64:64,97:97}],67:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(64),i=d(h),j=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,k=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a){return j.test(a.value)},function(a){return parseFloat(a)})}return f(b,a),b}(i.default);c.default=k,b.exports=c.default},{64:64}],68:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},i=a(64),j=d(i),k=a(56),l=d(k),m=function(a){function b(){f(this,b),h(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a,b){var c,d=(c={},e(c,l.default.MPD,[l.default.ID,l.default.PROFILES]),e(c,l.default.PERIOD,[l.default.ID]),e(c,l.default.BASE_URL,[l.default.SERVICE_LOCATION,l.default.BYTE_RANGE]),e(c,l.default.SEGMENT_BASE,[l.default.INDEX_RANGE]),e(c,l.default.INITIALIZATION,[l.default.RANGE]),e(c,l.default.REPRESENTATION_INDEX,[l.default.RANGE]),e(c,l.default.SEGMENT_LIST,[l.default.INDEX_RANGE]),e(c,l.default.BITSTREAM_SWITCHING,[l.default.RANGE]),e(c,l.default.SEGMENT_URL,[l.default.MEDIA_RANGE,l.default.INDEX_RANGE]),e(c,l.default.SEGMENT_TEMPLATE,[l.default.INDEX_RANGE,l.default.MEDIA,l.default.INDEX,l.default.INITIALIZATION_MINUS,l.default.BITSTREAM_SWITCHING_MINUS]),e(c,l.default.ASSET_IDENTIFIER,[l.default.VALUE,l.default.ID]),e(c,l.default.EVENT_STREAM,[l.default.VALUE]),e(c,l.default.ADAPTATION_SET,[l.default.PROFILES,l.default.MIME_TYPE,l.default.SEGMENT_PROFILES,l.default.CODECS,l.default.CONTENT_TYPE]),e(c,l.default.FRAME_PACKING,[l.default.VALUE,l.default.ID]),e(c,l.default.AUDIO_CHANNEL_CONFIGURATION,[l.default.VALUE,l.default.ID]),e(c,l.default.CONTENT_PROTECTION,[l.default.VALUE,l.default.ID]),e(c,l.default.ESSENTIAL_PROPERTY,[l.default.VALUE,l.default.ID]),e(c,l.default.SUPPLEMENTAL_PROPERTY,[l.default.VALUE,l.default.ID]),e(c,l.default.INBAND_EVENT_STREAM,[l.default.VALUE,l.default.ID]),e(c,l.default.ACCESSIBILITY,[l.default.VALUE,l.default.ID]),e(c,l.default.ROLE,[l.default.VALUE,l.default.ID]),e(c,l.default.RATING,[l.default.VALUE,l.default.ID]),e(c,l.default.VIEWPOINT,[l.default.VALUE,l.default.ID]),e(c,l.default.CONTENT_COMPONENT,[l.default.CONTENT_TYPE]),e(c,l.default.REPRESENTATION,[l.default.ID,l.default.DEPENDENCY_ID,l.default.MEDIA_STREAM_STRUCTURE_ID]),e(c,l.default.SUBSET,[l.default.ID]),e(c,l.default.METRICS,[l.default.METRICS_MINUS]),e(c,l.default.REPORTING,[l.default.VALUE,l.default.ID]),c);if(d.hasOwnProperty(b)){var f=d[b];return void 0!==f&&f.indexOf(a.name)>=0}return!1},function(a){return String(a)})}return g(b,a),b}(j.default);c.default=m,b.exports=c.default},{56:56,64:64}],69:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b){for(var c in a)b.hasOwnProperty(c)||(b[c]=a[c])}function c(a,c,d){for(var e=0,f=a.length;e<f;++e){var g=a[e];if(c[g.name])if(d[g.name]){if(g.merge){var h=c[g.name],i=d[g.name];"object"==typeof h&&"object"==typeof i?b(h,i):d[g.name]=h+i}}else d[g.name]=c[g.name]}}function d(a,b){for(var e=0,f=a.children.length;e<f;++e){var g=a.children[e],h=b[g.name+"_asArray"];if(h)for(var i=0,j=h.length;i<j;++i){var k=h[i];c(a.properties,b,k),d(g,k)}}}function e(b){if(null===b||"object"!=typeof b)return b;if("period"in a)for(var c=a.period,e=b.Period_asArray,f=0,g=e.length;f<g;++f){var h=e[f];if(d(c,h),"adaptationset"in a){var i=h.AdaptationSet_asArray;if(i)for(var j=a.adaptationset,k=0,l=i.length;k<l;++k)d(j,i[k])}}return b}return{run:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="ObjectIron";var h=g.default.getClassFactory(e);c.default=h,b.exports=c.default},{46:46}],70:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){a&&a.boxParser&&(d=a.boxParser)}function b(a){if(!d)throw new Error("boxParser is undefined");if(!a||0===a.byteLength)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var b=d.parse(a),c=b.getBoxes("moof"),e=b.getBoxes("mfhd"),f=void 0,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0,l=void 0,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0,r=void 0,s=void 0,t=void 0,u=void 0,v=void 0;u=b.getBoxes("moof").length,t=e[e.length-1].sequence_number,h=0,k=[];var w=-1,x=-1;for(p=0;p<c.length;p++){var y=c[p],z=y.getChildBoxes("traf");for(n=0;n<z.length;n++){var A=z[n],B=A.getChildBox("tfhd"),C=A.getChildBox("tfdt");j=C.baseMediaDecodeTime;var D=A.getChildBoxes("trun"),E=A.getChildBoxes("subs");for(o=0;o<D.length;o++){var F=D[o];for(h=F.sample_count,s=(B.base_data_offset||0)+(F.data_offset||0),m=0;m<h;m++){l=F.samples[m],f=void 0!==l.sample_duration?l.sample_duration:B.default_sample_duration,i=void 0!==l.sample_size?l.sample_size:B.default_sample_size,g=void 0!==l.sample_composition_time_offset?l.sample_composition_time_offset:0;var G={dts:j,cts:j+g,duration:f,offset:y.offset+s,size:i,subSizes:[i]};if(E)for(q=0;q<E.length;q++){var H=E[q];if(w<H.entry_count&&m>x&&(w++,x+=H.entries[w].sample_delta),m==x){G.subSizes=[];var I=H.entries[w];for(r=0;r<I.subsample_count;r++)G.subSizes.push(I.subsamples[r].subsample_size)}}k.push(G),s+=i,j+=f}}v=j-C.baseMediaDecodeTime}}return{sampleList:k,lastSequenceNumber:t,totalDuration:v,numSequences:u}}function c(a){if(!d)throw new Error("boxParser is undefined");var b=d.parse(a),c=b?b.getBox("mdhd"):void 0;return c?c.timescale:NaN}var d=void 0;return{getSamplesInfo:b,getMediaTimescaleFromMoov:c,setConfig:a}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="FragmentedTextBoxParser",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{46:46}],71:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(a,c,e,f){var g=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentList,i=g.SegmentURL_asArray.length,j=[],k=void 0,l=void 0,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0;for(q=a.startNumber,n=(0,h.decideSegmentListRangeForTemplate)(d,b,a,c,e,f),o=Math.max(n.start,0),p=Math.min(n.end,g.SegmentURL_asArray.length-1),k=o;k<=p;k++)m=g.SegmentURL_asArray[k],l=(0,h.getIndexBasedSegment)(d,b,a,k),l.replacementTime=(q+k-1)*a.segmentDuration,l.media=m.media?m.media:"",l.mediaRange=m.mediaRange,l.index=m.index,l.indexRange=m.indexRange,j.push(l),l=null;return a.availableSegmentsNumber=i,j}a=a||{};var d=a.timelineConverter;return{getSegments:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(74);e.__dashjs_factory_name="ListSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{46:46,74:74}],72:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c){return void 0===c||0==+c?Math[a](b):(b=+b,c=+c,null===b||isNaN(b)||"number"!=typeof c||c%1!=0?NaN:(b=b.toString().split("e"),b=Math[a](+(b[0]+"e"+(b[1]?+b[1]-c:-c))),b=b.toString().split("e"),+(b[0]+"e"+(b[1]?+b[1]+c:c))))}Object.defineProperty(c,"__esModule",{value:!0});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(){function a(){d(this,a)}return f(a,null,[{key:"round10",value:function(a,b){return e("round",a,b)}}]),a}();c.default=g,b.exports=c.default},{}],73:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(){i=(0,k.default)(f).create(a,b),j=(0,m.default)(f).create(a,b),l=(0,o.default)(f).create(a,b)}function d(a,b,c,d,f){var h=void 0,k=a.segmentInfoType;k!==g.default.SEGMENT_BASE&&k!==g.default.BASE_URL&&e(a,c)?(k===g.default.SEGMENT_TIMELINE?h=i.getSegments(a,b,c,f):k===g.default.SEGMENT_TEMPLATE?h=j.getSegments(a,b,c,f):k===g.default.SEGMENT_LIST&&(h=l.getSegments(a,b,c,f)),d&&d(a,h)):h=a.segments}function e(a,b){var c=a.segments,d=!1,e=void 0,f=void 0;return c&&0!==c.length?(f=c[0].availabilityIdx,e=c[c.length-1].availabilityIdx,d=b<f||b>e):d=!0,d}var f=this.context,h=void 0,i=void 0,j=void 0,l=void 0;return h={getSegments:d},c(),h}Object.defineProperty(c,"__esModule",{value:!0});var f=a(56),g=d(f),h=a(46),i=d(h),j=a(77),k=d(j),l=a(75),m=d(l),n=a(71),o=d(n);e.__dashjs_factory_name="SegmentsGetter";var p=i.default.getClassFactory(e);c.default=p,b.exports=c.default},{46:46,56:56,71:71,75:75,77:77}],74:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){for(;a.length<b;)a="0"+a;return a}function f(a,b){return a.representation.startNumber+b}function g(a){return a?a.split("$$").join("$"):a}function h(a,b){if(!b||!a||-1===a.indexOf("$RepresentationID$"))return a;var c=b.toString();return a.split("$RepresentationID$").join(c)}function i(a,b,c){var d="%0",f=void 0,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0,l=b.length,m=d.length;if(!a)return a;for(;;){if((f=a.indexOf("$"+b))<0)return a;if((g=a.indexOf("$",f+l))<0)return a;if((h=a.indexOf(d,f+l))>f&&h<g)switch(i=a.charAt(g-1),j=parseInt(a.substring(h+m,g-1),10),i){case"d":case"i":case"u":k=e(c.toString(),j);break;case"x":k=e(c.toString(16),j);break;case"X":k=e(c.toString(16),j).toUpperCase();break;case"o":k=e(c.toString(8),j);break;default:return a}else k=c;a=a.substring(0,f)+k+a.substring(g+1)}}function j(a,b,c,d){var e=void 0,g=void 0,h=void 0,i=void 0;return g=c.segmentDuration,isNaN(g)&&(g=c.adaptation.period.duration),h=parseFloat((c.adaptation.period.start+d*g).toFixed(5)),i=parseFloat((h+g).toFixed(5)),e=new o.default,e.representation=c,e.duration=g,e.presentationStartTime=h,e.mediaStartTime=a.calcMediaTimeFromPresentationTime(e.presentationStartTime,c),e.availabilityStartTime=a.calcAvailabilityStartTimeFromPresentationTime(e.presentationStartTime,c.adaptation.period.mpd,b),e.availabilityEndTime=a.calcAvailabilityEndTimeFromPresentationTime(i,c.adaptation.period.mpd,b),e.wallStartTime=a.calcWallTimeForSegment(e,b),e.replacementNumber=f(e,d),e.availabilityIdx=d,e}function k(a,b,c,d,e,g,h,j,k,l){var m=d/g,n=Math.min(e/g,c.adaptation.period.mpd.maxSegmentDuration),p=void 0,q=void 0,r=void 0;return p=a.calcPresentationTimeFromMediaTime(m,c),q=p+n,r=new o.default,r.representation=c,r.duration=n,r.mediaStartTime=m,r.presentationStartTime=p,r.availabilityStartTime=c.adaptation.period.mpd.manifest.loadedTime,r.availabilityEndTime=a.calcAvailabilityEndTimeFromPresentationTime(q,c.adaptation.period.mpd,b),r.wallStartTime=a.calcWallTimeForSegment(r,b),r.replacementTime=l||d,r.replacementNumber=f(r,k),h=i(h,"Number",r.replacementNumber),h=i(h,"Time",r.replacementTime),r.media=h,r.mediaRange=j,r.availabilityIdx=k,r}function l(a,b){if(!b||!b.segments)return null;var c=b.segments.length,d=void 0,e=void 0;if(a<c&&(d=b.segments[a])&&d.availabilityIdx===a)return d;for(e=0;e<c;e++)if((d=b.segments[e])&&d.availabilityIdx===a)return d;return null}function m(a,b,c,d,e,f){var g=c.segmentDuration,h=c.adaptation.period.mpd.manifest.minBufferTime,i=c.segmentAvailabilityRange,j={start:a.calcPeriodRelativeTimeFromMpdRelativeTime(c,i.start),end:a.calcPeriodRelativeTimeFromMpdRelativeTime(c,i.end)},k=c.segments,m=2*g,n=f||Math.max(2*h,10*g),o=NaN,p=null,q=void 0,r=void 0;return j.start=Math.max(j.start,0),b&&!a.isTimeSyncCompleted()?(q=Math.floor(j.start/g),r=Math.floor(j.end/g),{start:q,end:r}):(k&&k.length>0?(p=l(e,c),o=p?a.calcPeriodRelativeTimeFromMpdRelativeTime(c,p.presentationStartTime):e>0?e*g:a.calcPeriodRelativeTimeFromMpdRelativeTime(c,d)):o=e>0?e*g:b?j.end:j.start,q=Math.floor(Math.max(o-m,j.start)/g),r=Math.floor(Math.min(q+n/g,j.end/g)),{start:q,end:r})}Object.defineProperty(c,"__esModule",{value:!0}),c.unescapeDollarsInTemplate=g,c.replaceIDForTemplate=h,c.replaceTokenForTemplate=i,c.getIndexBasedSegment=j,c.getTimeBasedSegment=k,c.getSegmentByIndex=l,c.decideSegmentListRangeForTemplate=m;var n=a(85),o=d(n)},{85:85}],75:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(a,c,e,f){var g=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentTemplate,i=a.segmentDuration,j=a.segmentAvailabilityRange,k=[],l=null,m=null,n=void 0,o=void 0,p=void 0,q=void 0,r=void 0;for(r=a.startNumber,n=isNaN(i)&&!b?{start:r,end:r}:(0,h.decideSegmentListRangeForTemplate)(d,b,a,c,e,f),p=n.start,q=n.end,o=p;o<=q;o++)m=(0,h.getIndexBasedSegment)(d,b,a,o),m.replacementTime=(r+o-1)*a.segmentDuration,l=g.media,l=(0,h.replaceTokenForTemplate)(l,"Number",m.replacementNumber),l=(0,h.replaceTokenForTemplate)(l,"Time",m.replacementTime),m.media=l,k.push(m),m=null;return isNaN(i)?a.availableSegmentsNumber=1:a.availableSegmentsNumber=Math.ceil((j.end-j.start)/i),k}var d=a.timelineConverter;return{getSegments:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(74);e.__dashjs_factory_name="TemplateSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{46:46,74:74}],76:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){u(),x.on(i.default.TIME_SYNCHRONIZATION_COMPLETED,s,this)}function b(){return z}function c(a){z=a}function d(){return y}function e(a){y=a}function f(){return A}function h(a){A=a}function j(a,b,c,d){return d?c&&b.timeShiftBufferDepth!=Number.POSITIVE_INFINITY?new Date(b.availabilityStartTime.getTime()+1e3*(a+b.timeShiftBufferDepth)):b.availabilityEndTime:c?new Date(b.availabilityStartTime.getTime()+1e3*(a-y)):b.availabilityStartTime}function k(a,b,c){return j.call(this,a,b,c)}function l(a,b,c){return j.call(this,a,b,c,!0)}function m(a,b){return(a.getTime()-b.mpd.availabilityStartTime.getTime()+1e3*y)/1e3}function n(a,b){return a+(b.adaptation.period.start-b.presentationTimeOffset)}function o(a,b){return a-b.adaptation.period.start+b.presentationTimeOffset}function p(a,b){var c=void 0,d=void 0,e=void 0;return b&&(c=a.representation.adaptation.period.mpd.suggestedPresentationDelay,d=a.presentationStartTime+c,e=new Date(a.availabilityStartTime.getTime()+1e3*d)),e}function q(a,b){var c=a.adaptation.period,d={start:c.start,end:c.start+c.duration};if(!b)return d;if(!z&&a.segmentAvailabilityRange)return a.segmentAvailabilityRange;var e=a.segmentDuration||(a.segments&&a.segments.length?a.segments[a.segments.length-1].duration:0),f=m(new Date,c),g=c.start+c.duration;d.start=Math.max(f-c.mpd.timeShiftBufferDepth,c.start);var h=void 0!==a.availabilityTimeOffset&&a.availabilityTimeOffset<e?e-a.availabilityTimeOffset:e;return d.end=f>=g&&f-h<g?g:f-h,d}function r(a,b){return b-a.adaptation.period.start}function s(a){z||void 0!==a.offset&&(e(a.offset/1e3),z=!0)}function t(a){var b=a.presentationTimeOffset;return a.adaptation.period.start-b}function u(){y=0,z=!1,A=NaN}function v(){x.off(i.default.TIME_SYNCHRONIZATION_COMPLETED,s,this),u()}var w=this.context,x=(0,g.default)(w).getInstance(),y=void 0,z=void 0,A=void 0;return{initialize:a,isTimeSyncCompleted:b,setTimeSyncCompleted:c,getClientTimeOffset:d,setClientTimeOffset:e,getExpectedLiveEdge:f,setExpectedLiveEdge:h,calcAvailabilityStartTimeFromPresentationTime:k,calcAvailabilityEndTimeFromPresentationTime:l,calcPresentationTimeFromWallTime:m,calcPresentationTimeFromMediaTime:n,calcPeriodRelativeTimeFromMpdRelativeTime:r,calcMediaTimeFromPresentationTime:o,calcSegmentAvailabilityRange:q,calcWallTimeForSegment:p,calcMSETimeOffset:t,reset:v}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(45),g=d(f),h=a(49),i=d(h),j=a(46),k=d(j);e.__dashjs_factory_name="TimelineConverter",c.default=k.default.getSingletonFactory(e),b.exports=c.default},{45:45,46:46,49:49}],77:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(){if(!(e&&e.hasOwnProperty("calcMediaTimeFromPresentationTime")&&e.hasOwnProperty("calcSegmentAvailabilityRange")&&e.hasOwnProperty("calcMediaTimeFromPresentationTime")))throw new Error("Missing config parameter(s)")}function d(a,d,f,g){if(c(),!a)throw new Error("no representation");void 0===d&&(d=null);var i=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentTemplate||a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentList,j=i.SegmentTimeline,k=i.SegmentURL_asArray,l=a.availableSegmentsNumber>0,m=void 0;m=g||(f>-1||null!==d?10:1/0);var n=0,o=0,p=-1,q=[],r=null,s=void 0,t=void 0,u=void 0,v=void 0,w=void 0,x=void 0,y=void 0,z=void 0,A=void 0,B=void 0,C=void 0,D=function(c,d){var f=i.media,g=c.mediaRange;return k&&(f=k[d].media||"",
|
21 |
-
g=k[d].mediaRange),(0,h.getTimeBasedSegment)(e,b,a,n,c.d,C,f,g,p,c.tManifest)};for(C=a.timescale,s=j.S_asArray,B=f,null!==d&&(r=e.calcMediaTimeFromPresentationTime(d,a)),u=0,v=s.length;u<v;u++){if(t=s[u],x=0,t.hasOwnProperty("r")&&(x=t.r),t.hasOwnProperty("t")&&(n=t.t,o=n/C),x<0){if((z=s[u+1])&&z.hasOwnProperty("t"))y=z.t/C;else{var E=a.segmentAvailabilityRange?a.segmentAvailabilityRange.end:e.calcSegmentAvailabilityRange(a,b).end;y=e.calcMediaTimeFromPresentationTime(E,a),a.segmentDuration=t.d/C}x=Math.ceil((y-o)/(t.d/C))-1}if(A){if(l)break;p+=x+1}else for(w=0;w<=x;w++)if(p++,q.length>m){if(A=!0,l)break}else null!==r?o>=r-t.d/C*1.5&&q.push(D(t,p)):p>=B&&q.push(D(t,p)),n+=t.d,o=n/C}return l||(a.availableSegmentsNumber=p+1),q}a=a||{};var e=a.timelineConverter;return{getSegments:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(74);e.__dashjs_factory_name="TimelineSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{46:46,74:74}],78:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.period=null,this.index=-1,this.type=null};c.default=e,b.exports=c.default},{}],79:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=1,f=1,g=function a(b,c,g,h){d(this,a),this.url=b||"",this.serviceLocation=c||b||"",this.dvb_priority=g||e,this.dvb_weight=h||f,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0};g.DEFAULT_DVB_PRIORITY=e,g.DEFAULT_DVB_WEIGHT=f,c.default=g,b.exports=c.default},{}],80:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN};c.default=e,b.exports=c.default},{}],81:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri=""};c.default=e,b.exports=c.default},{}],82:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.minimumUpdatePeriod=NaN,this.mediaPresentationDuration=NaN};c.default=e,b.exports=c.default},{}],83:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null};e.DEFAULT_ID="defaultId",c.default=e,b.exports=c.default},{}],84:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=a(56),h=d(g),i=function(){function a(){e(this,a),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.codecs=null,this.codecPrivateData=null,this.segmentDuration=NaN,this.timescale=1,this.startNumber=1,this.indexRange=null,this.range=null,this.presentationTimeOffset=0,this.MSETimeOffset=NaN,this.segmentAvailabilityRange=null,this.availableSegmentsNumber=0,this.bandwidth=NaN,this.width=NaN,this.height=NaN,this.scanType=null,this.maxPlayoutRate=NaN,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0}return f(a,null,[{key:"hasInitialization",value:function(a){return null!==a.initialization||null!==a.range}},{key:"hasSegments",value:function(a){return a.segmentInfoType!==h.default.BASE_URL&&a.segmentInfoType!==h.default.SEGMENT_BASE&&!a.indexRange}}]),a}();c.default=i,b.exports=c.default},{56:56}],85:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=NaN,this.replacementTime=null,this.replacementNumber=NaN,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.availabilityStartTime=NaN,this.availabilityEndTime=NaN,this.availabilityIdx=NaN,this.wallStartTime=NaN,this.representation=null};c.default=e,b.exports=c.default},{}],86:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.schemeIdUri="",this.value=""};c.default=e,b.exports=c.default},{}],87:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){n=(0,g.default)(h).create({errHandler:a.errHandler,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier,useFetch:a.mediaPlayerModel.getLowLatencyEnabled()})}function c(a){var b=function(b){j.trigger(o.default.CHECK_FOR_EXISTENCE_COMPLETED,{request:a,exists:b})};if(a){var c=new i.default(a.url);n.load({request:c,success:function(){b(!0)},error:function(){b(!1)}})}else b(!1)}function d(a){var b=function(b,c){j.trigger(o.default.LOADING_COMPLETED,{request:a,response:b||null,error:c||null,sender:l})};a?n.load({request:a,progress:function(b){j.trigger(o.default.LOADING_PROGRESS,{request:a}),b&&j.trigger(o.default.LOADING_DATA_PROGRESS,{request:a,response:b||null,error:null,sender:l})},success:function(a){b(a)},error:function(a,c,d){b(void 0,new k.default(r,d,c))},abort:function(a){a&&j.trigger(o.default.LOADING_ABANDONED,{request:a,mediaType:a.mediaType,sender:l})}}):b(void 0,new k.default(s,t))}function e(){n&&n.abort()}function f(){n&&(n.abort(),n=null)}a=a||{};var h=this.context,j=(0,m.default)(h).getInstance(),l=void 0,n=void 0;return l={checkForExistence:c,load:d,abort:e,reset:f},b(),l}Object.defineProperty(c,"__esModule",{value:!0});var f=a(120),g=d(f),h=a(165),i=d(h),j=a(162),k=d(j),l=a(45),m=d(l),n=a(49),o=d(n),p=a(46),q=d(p),r=1,s=2,t="request is null";e.__dashjs_factory_name="FragmentLoader";var u=q.default.getClassFactory(e);u.FRAGMENT_LOADER_ERROR_LOADING_FAILURE=r,u.FRAGMENT_LOADER_ERROR_NULL_REQUEST=s,q.default.updateClassFactory(e.__dashjs_factory_name,u),c.default=u,b.exports=c.default},{120:120,162:162,165:165,45:45,46:46,49:49}],88:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){j.on(v.default.XLINK_READY,c,s),u=(0,k.default)(h).create({errHandler:A,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier}),w=(0,i.default)(h).create({errHandler:A,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier}),x=null}function c(a){j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:a.manifest})}function d(a){var b=null;return a.indexOf("SmoothStreamingMedia")>-1?(y&&(b=y.createMssParser(),y.registerEvents()),b):a.indexOf("MPD")>-1?(0,z.default)(h).create():b}function e(a){var b=new o.default(a,r.HTTPRequest.MPD_TYPE);u.load({request:b,success:function(b,c,e){if(w){var f=void 0,h=void 0,i=void 0;if(e&&e!==a?(h=l.parseBaseUrl(e),f=e):(l.isRelative(a)&&(a=l.resolve(a,window.location.href)),h=l.parseBaseUrl(a)),null===x&&(x=d(b)),null===x)return void j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(C,"Failed detecting manifest type or manifest type unsupported : "+a)});w.setMatchers(x.getMatchers()),w.setIron(x.getIron());try{i=x.parse(b)}catch(k){return void j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(C,"Failed parsing manifest : "+a)})}i?(i.url=f||a,i.originalUrl||(i.originalUrl=i.url),i.hasOwnProperty(g.default.LOCATION)&&(h=l.parseBaseUrl(i.Location_asArray[0]),p("BaseURI set by Location to: "+h)),i.baseUri=h,i.loadedTime=new Date,w.resolveManifestOnLoad(i)):j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(C,E)})}},error:function(b,c,d){j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(D,"Failed loading manifest: "+a+", "+d)})}})}function f(){j.off(v.default.XLINK_READY,c,s),w&&(w.reset(),w=null),u&&(u.abort(),u=null),y&&y.reset()}a=a||{};var h=this.context,j=(0,t.default)(h).getInstance(),l=(0,m.default)(h).getInstance(),n=(0,B.default)(h).getInstance(),p=n.log,s=void 0,u=void 0,w=void 0,x=void 0,y=a.mssHandler,A=a.errHandler;return s={load:e,reset:f},b(),s}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(111),i=d(h),j=a(120),k=d(j),l=a(157),m=d(l),n=a(173),o=d(n),p=a(162),q=d(p),r=a(182),s=a(45),t=d(s),u=a(49),v=d(u),w=a(46),x=d(w),y=a(59),z=d(y),A=a(44),B=d(A),C=1,D=2,E="parsing failed";e.__dashjs_factory_name="ManifestLoader";var F=x.default.getClassFactory(e);F.MANIFEST_LOADER_ERROR_PARSING_FAILURE=C,F.MANIFEST_LOADER_ERROR_LOADING_FAILURE=D,x.default.updateClassFactory(e.__dashjs_factory_name,F),c.default=F,b.exports=c.default},{111:111,120:120,157:157,162:162,173:173,182:182,44:44,45:45,46:46,49:49,59:59,97:97}],89:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){a&&(a.manifestModel&&(z=a.manifestModel),a.dashManifestModel&&(A=a.dashManifestModel),a.mediaPlayerModel&&(B=a.mediaPlayerModel),a.manifestLoader&&(y=a.manifestLoader),a.errHandler&&(C=a.errHandler))}function b(){d(),t.on(i.default.STREAMS_COMPOSED,q,this),t.on(i.default.PLAYBACK_STARTED,o,this),t.on(i.default.PLAYBACK_PAUSED,p,this),t.on(i.default.INTERNAL_MANIFEST_LOADED,n,this)}function c(a){k(a)}function d(){u=NaN,x=!1,w=!0,f()}function e(){t.off(i.default.PLAYBACK_STARTED,o,this),t.off(i.default.PLAYBACK_PAUSED,p,this),t.off(i.default.STREAMS_COMPOSED,q,this),t.off(i.default.INTERNAL_MANIFEST_LOADED,n,this),d()}function f(){null!==v&&(clearInterval(v),v=null)}function h(a){f(),isNaN(a)&&!isNaN(u)&&(a=1e3*u),isNaN(a)||(s("Refresh manifest in "+a+" milliseconds."),v=setTimeout(l,a))}function j(){x=!0;var a=z.getValue(),b=a.url,c=A.getLocation(a);c&&(b=c),y.load(b)}function k(a){z.setValue(a);var b=new Date,c=(b.getTime()-a.loadedTime.getTime())/1e3;u=A.getManifestUpdatePeriod(a,c),1e3*u>2147483647&&(u=2147483.647),t.trigger(i.default.MANIFEST_UPDATED,{manifest:a}),s("Manifest has been refreshed at "+b+"["+b.getTime()/1e3+"] "),w||h()}function l(){if(!w||B.getScheduleWhilePaused())return x?void h(B.getManifestUpdateRetryInterval()):void j()}function n(a){a.error?C.manifestError(a.error.message,a.error.code):k(a.manifest)}function o(){w=!1,h()}function p(){w=!0,f()}function q(){x=!1}var r=this.context,s=(0,m.default)(r).getInstance().log,t=(0,g.default)(r).getInstance(),u=void 0,v=void 0,w=void 0,x=void 0,y=void 0,z=void 0,A=void 0,B=void 0,C=void 0;return{initialize:b,setManifest:c,refreshManifest:j,setConfig:a,reset:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(45),g=d(f),h=a(49),i=d(h),j=a(46),k=d(j),l=a(44),m=d(l);e.__dashjs_factory_name="ManifestUpdater",c.default=k.default.getClassFactory(e),b.exports=c.default},{44:44,45:45,46:46,49:49}],90:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){Oc=!1,Qc=!1,Pc=!1,Rc=!0,Vc=null,Nc=null,Yc=null,W.default.extend(Y.default),$c=(0,I.default)(Hc).getInstance(),gd=(0,O.default)(Hc).getInstance()}function b(a){a&&(a.capabilities&&(ad=a.capabilities),a.streamController&&(bd=a.streamController),a.playbackController&&(cd=a.playbackController),a.mediaPlayerModel&&($c=a.mediaPlayerModel),a.abrController&&(Sc=a.abrController),a.mediaController&&(Uc=a.mediaController))}function c(a,b,c){if(ad||(ad=(0,w.default)(Hc).getInstance()),_c=(0,u.default)(Hc).getInstance(),!ad.supportsMediaSource())return void _c.capabilityError("mediasource");Oc||(Oc=!0,Tc=(0,ha.default)(Hc).getInstance(),Sc||(Sc=(0,M.default)(Hc).getInstance()),cd||(cd=(0,m.default)(Hc).getInstance()),Uc||(Uc=(0,q.default)(Hc).getInstance()),Yc=(0,ba.default)(Hc).getInstance(),ed=(0,da.default)(Hc).getInstance({mediaController:Uc,timelineConverter:Tc,adapter:Yc}),fd=(0,G.default)(Hc).getInstance(),dd=(0,fa.default)(Hc).getInstance({manifestModel:fd,dashManifestModel:ed}),Zc=(0,K.default)(Hc).getInstance(),hd=(0,C.default)(Hc).getInstance(),id=(0,Q.default)(Hc).getInstance({mediaPlayerModel:$c}),Yc.setConfig({dashManifestModel:ed}),Zc.setConfig({adapter:Yc}),bb(),Da(void 0===c||c),a&&Ub(a),b&&nc(b),Kc("[dash.js "+j()+"] MediaPlayer has been initialized"))}function d(){nc(null),Ub(null),Nc=null,Vc&&(Vc.reset(),Vc=null),Wc&&(Wc.reset(),Wc=null)}function e(){return!!Mc&&!!gd.getElement()}function f(a,b,c){Ic.on(a,b,c)}function h(a,b,c){Ic.off(a,b,c)}function j(){return(0,_.getVersionString)()}function l(){return Jc}function n(){if(gd.getElement()||Pc)return!1;if(!Mc)throw Ec;Ac()}function p(){if(!Qc)throw Cc;(!Rc||t()&&Qc)&&cd.play()}function r(){if(!Qc)throw Cc;cd.pause()}function t(){if(!Qc)throw Cc;return cd.isPaused()}function v(a){if(!Qc)throw Cc;if("number"!=typeof a||isNaN(a))throw Gc;var b=cd.getIsDynamic()?R(a):a;cd.seek(b)}function x(){if(!Qc)throw Cc;return cd.isSeeking()}function z(){if(!Qc)throw Cc;return cd.getIsDynamic()}function B(a){if(!gd.getElement())throw Dc;Rb().playbackRate=a}function D(){if(!gd.getElement())throw Dc;return Rb().playbackRate}function F(a){if(!gd.getElement())throw Dc;Rb().muted=a}function H(){if(!gd.getElement())throw Dc;return Rb().muted}function J(a){if(!gd.getElement())throw Dc;Rb().volume=a}function L(){if(!gd.getElement())throw Dc;return Rb().volume}function N(a){var b=[g.default.VIDEO,g.default.AUDIO,g.default.FRAGMENTED_TEXT];if(a){if(-1!==b.indexOf(a)){var c=Fb().getCurrentBufferLevel(Gb(a));return c||NaN}return Kc("Warning - getBufferLength requested for invalid type"),NaN}var c=b.map(function(a){return Zb(a).length>0?Fb().getCurrentBufferLevel(Gb(a)):Number.MAX_VALUE}).reduce(function(a,b){return Math.min(a,b)});return c===Number.MAX_VALUE?NaN:c}function P(){var a=xc();return a?a.manifestInfo.DVRWindowSize:0}function R(a){var b=xc(),c=cd.getLiveDelay();if(!b)return 0;var d=b.range.start+a;return d>b.range.end-c&&(d=b.range.end-c),d}function T(a){if(!Qc)throw Cc;var b=Rb().currentTime;if(void 0!==a)b=bd.getTimeRelativeToStreamId(b,a);else if(cd.getIsDynamic()){var c=xc();b=null===c?0:V()-(c.range.end-c.time)}return b}function V(){if(!Qc)throw Cc;var a=Rb().duration;if(cd.getIsDynamic()){var b=xc(),c=void 0;if(!b)return 0;c=b.range.end-b.range.start,a=c<b.manifestInfo.DVRWindowSize?c:b.manifestInfo.DVRWindowSize}return a}function X(){if(!Qc)throw Cc;return T()<0?NaN:yc(T())}function Z(){if(!Qc)throw Cc;return yc(V())}function aa(a,b){Sc.setMaxAllowedBitrateFor(a,b)}function ca(a,b){Sc.setMinAllowedBitrateFor(a,b)}function ea(a){return Sc.getMaxAllowedBitrateFor(a)}function ga(a){if(!Pc)throw Bc;return Sc.getTopBitrateInfoFor(a)}function ja(a){return Sc.getMinAllowedBitrateFor(a)}function la(a,b){Sc.setMaxAllowedRepresentationRatioFor(a,b)}function na(a){return Sc.getMaxAllowedRepresentationRatioFor(a)}function oa(a){if(!Pc)throw Bc;if(a===g.default.IMAGE){var b=zc();if(!b)return-1;var c=b.getThumbnailController();return c?c.getCurrentTrackIndex():-1}return Sc.getQualityFor(a,bd.getActiveStreamInfo())}function pa(a,b){if(!Pc)throw Bc;if(a===g.default.IMAGE){var c=zc();if(!c)return;var d=c.getThumbnailController();d&&d.setTrackByIndex(b)}Sc.setPlaybackQuality(a,bd.getActiveStreamInfo(),b)}function qa(){Sc.setElementSize(),Sc.setWindowResizeEventCalled(!0)}function ra(){return Sc.getLimitBitrateByPortal()}function sa(a){Sc.setLimitBitrateByPortal(a)}function ta(){return Sc.getUsePixelRatioInLimitBitrateByPortal()}function ua(a){Sc.setUsePixelRatioInLimitBitrateByPortal(a)}function va(a,b){Sc.setInitialBitrateFor(a,b)}function wa(a){if(!Pc)throw Bc;return Sc.getInitialBitrateFor(a)}function xa(a,b){Sc.setInitialRepresentationRatioFor(a,b)}function ya(a){return Sc.getInitialRepresentationRatioFor(a)}function za(a){return Sc.getAutoSwitchBitrateFor(a)}function Aa(a,b){Sc.setAutoSwitchBitrateFor(a,b)}function Ba(){return Sc.getUseDeadTimeLatency()}function Ca(a){Sc.setUseDeadTimeLatency(a)}function Da(a){Rc=a}function Ea(){return Rc}function Fa(a){$c.setLiveDelayFragmentCount(a)}function Ga(a){$c.setLiveDelay(a)}function Ha(){return $c.getLiveDelay()}function Ia(){if(!Oc)throw Fc;return Qc?cd.getCurrentLiveLatency():NaN}function Ja(a){$c.setUseSuggestedPresentationDelay(a)}function Ka(a,b){$c.setLastBitrateCachingInfo(a,b)}function La(a,b){$c.setLastMediaSettingsCachingInfo(a,b)}function Ma(a){$c.setScheduleWhilePaused(a)}function Na(){return $c.getScheduleWhilePaused()}function Oa(a){$c.setFastSwitchEnabled(a)}function Pa(){return $c.getFastSwitchEnabled()}function Qa(a){a===g.default.ABR_STRATEGY_DYNAMIC||a===g.default.ABR_STRATEGY_BOLA||a===g.default.ABR_STRATEGY_THROUGHPUT?$c.setABRStrategy(a):Kc("Warning: Ignoring setABRStrategy("+a+") - unknown value.")}function Ra(){return $c.getABRStrategy()}function Sa(a){$c.setUseDefaultABRRules(a)}function Ta(a,b,c){$c.addABRCustomRule(a,b,c)}function Ua(a){$c.removeABRCustomRule(a)}function Va(){$c.removeAllABRCustomRule()}function Wa(a){a===g.default.MOVING_AVERAGE_SLIDING_WINDOW||a===g.default.MOVING_AVERAGE_EWMA?$c.setMovingAverageMethod(a):Kc("Warning: Ignoring setMovingAverageMethod("+a+") - unknown value.")}function Xa(){return $c.getMovingAverageMethod()}function Ya(){return $c.getLowLatencyEnabled()}function Za(a){return $c.setLowLatencyEnabled(a)}function $a(a,b){_a(a,b);var c=new k.default;c.schemeIdUri=a,c.value=b,$c.getUTCTimingSources().push(c)}function _a(a,b){var c=$c.getUTCTimingSources();c.forEach(function(d,e){d.schemeIdUri===a&&d.value===b&&c.splice(e,1)})}function ab(){$c.setUTCTimingSources([])}function bb(){$a(I.default.DEFAULT_UTC_TIMING_SOURCE.scheme,I.default.DEFAULT_UTC_TIMING_SOURCE.value)}function cb(a){$c.setUseManifestDateHeaderTimeSource(a)}function db(a){$c.setBufferToKeep(a)}function eb(a){$c.setBufferAheadToKeep(a)}function fb(a){$c.setBufferPruningInterval(a)}function gb(a){$c.setStableBufferTime(a)}function hb(){return $c.getStableBufferTime()}function ib(a){$c.setBufferTimeAtTopQuality(a)}function jb(){return $c.getBufferTimeAtTopQuality()}function kb(a){$c.setBufferTimeAtTopQualityLongForm(a)}function lb(){return $c.getBufferTimeAtTopQualityLongForm()}function mb(a){$c.setLongFormContentDurationThreshold(a)}function nb(a){$c.setSegmentOverlapToleranceTime(a)}function ob(a,b){$c.setCacheLoadThresholdForType(a,b)}function pb(a){$c.setBandwidthSafetyFactor(a)}function qb(){return $c.getBandwidthSafetyFactor()}function rb(a){var b=Sc.getThroughputHistory();return b?b.getAverageThroughput(a):0}function sb(a){$c.setAbandonLoadTimeout(a)}function tb(a){$c.setFragmentRetryAttempts(a)}function ub(a){$c.setFragmentRetryInterval(a)}function vb(a){$c.setManifestRetryAttempts(a)}function wb(a){$c.setManifestRetryInterval(a)}function xb(a,b){$c.setXHRWithCredentialsForType(a,b)}function yb(a){return $c.getXHRWithCredentialsForType(a)}function zb(a){$c.setJumpGaps(a)}function Ab(){return $c.getJumpGaps()}function Bb(a){$c.setSmallGapLimit(a)}function Cb(){return $c.getSmallGapLimit()}function Db(a){$c.setManifestUpdateRetryInterval(a)}function Eb(){return $c.getManifestUpdateRetryInterval()}function Fb(){return dd}function Gb(a){return Zc.getReadOnlyMetricsFor(a)}function Hb(a){void 0===hd&&(hd=(0,C.default)(Hc).getInstance()),hd.setTextDefaultLanguage(a)}function Ib(){return void 0===hd&&(hd=(0,C.default)(Hc).getInstance()),hd.getTextDefaultLanguage()}function Jb(a){void 0===hd&&(hd=(0,C.default)(Hc).getInstance()),hd.setTextDefaultEnabled(a)}function Kb(){return void 0===hd&&(hd=(0,C.default)(Hc).getInstance()),hd.getTextDefaultEnabled()}function Lb(a){void 0===hd&&(hd=(0,C.default)(Hc).getInstance()),hd.enableText(a)}function Mb(a){void 0===hd&&(hd=(0,C.default)(Hc).getInstance()),hd.enableForcedTextStreaming(a)}function Nb(){return void 0===hd&&(hd=(0,C.default)(Hc).getInstance()),hd.isTextEnabled()}function Ob(a){if(!Qc)throw Cc;void 0===hd&&(hd=(0,C.default)(Hc).getInstance()),hd.setTextTrack(a)}function Pb(){var a=NaN;return hd&&(a=hd.getCurrentTrackIdx()),a}function Qb(a){var b=(0,y.default)(Hc).getInstance();b.setConfig({videoModel:gd}),b.initialize(),b.displayCConTop(a)}function Rb(){if(!gd.getElement())throw Dc;return gd.getElement()}function Sb(){return gd?gd.getVideoContainer():null}function Tb(a){if(!gd.getElement())throw Dc;gd.setVideoContainer(a)}function Ub(a){if(!Oc)throw Fc;gd.setElement(a),a&&(uc(),vc(),wc(),bd&&bd.switchToVideoElement()),Qc&&rc(),Ac()}function Vb(){return gd?gd.getTTMLRenderingDiv():null}function Wb(a){if(!gd.getElement())throw Dc;gd.setTTMLRenderingDiv(a)}function Xb(a){if(!Pc)throw Bc;var b=zc();return b?b.getBitrateListFor(a):[]}function Yb(a){if(!Pc)throw Bc;return Yc.getStreamsInfo(a)}function Zb(a){if(!Pc)throw Bc;var b=bd.getActiveStreamInfo();return b?Uc.getTracksFor(a,b):[]}function $b(a,b,c){if(!Pc)throw Bc;return c=c||Yc.getStreamsInfo(b,1)[0],c?Yc.getAllMediaInfoForType(c,a,b):[]}function _b(a){if(!Pc)throw Bc;var b=bd.getActiveStreamInfo();return b?Uc.getCurrentTrackFor(a,b):null}function ac(a,b){if(!Oc)throw Fc;Uc.setInitialSettings(a,b)}function bc(a){if(!Oc)throw Fc;return Uc.getInitialSettings(a)}function cc(a){if(!Pc)throw Bc;Uc.setTrack(a)}function dc(a){if(!Oc)throw Fc;return Uc.getSwitchMode(a)}function ec(a,b){if(!Oc)throw Fc;Uc.setSwitchMode(a,b)}function fc(a){if(!Oc)throw Fc;Uc.setSelectionModeForInitialTrack(a)}function gc(){if(!Oc)throw Fc;return Uc.getSelectionModeForInitialTrack()}function hc(){return uc()}function ic(a){Vc=a}function jc(a){Nc=a,bd&&bd.setProtectionData(Nc)}function kc(a){if(a<0)return null;var b=cd.getIsDynamic()?R(a):a,c=bd.getStreamForTime(b);if(null===c)return null;var d=c.getThumbnailController(),e=c.getStreamInfo();if(!d||!e)return null;var f=bd.getTimeRelativeToStreamId(b,c.getId());return d.get(f)}function lc(a,b){var c=tc(),d=this,e=function a(e){e.error?b(null,e.error):b(e.manifest),Ic.off(W.default.INTERNAL_MANIFEST_LOADED,a,d),c.reset()};Ic.on(W.default.INTERNAL_MANIFEST_LOADED,e,d),(0,E.default)(Hc).getInstance().initialize(a),c.load(a)}function mc(){if(!Mc)throw Ec;return Mc}function nc(a){if(!Oc)throw Fc;"string"==typeof a&&(0,E.default)(Hc).getInstance().initialize(a),Mc=a,(Pc||Qc)&&rc(),e()&&Ac()}function oc(a,b,c){var d=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],e=new Date(1e3*a),f=e.toLocaleDateString(b),g=e.toLocaleTimeString(b,{hour12:c});return d?g+" "+f:g}function pc(a){a=Math.max(a,0);var b=Math.floor(a/3600),c=Math.floor(a%3600/60),d=Math.floor(a%3600%60);return(0===b?"":b<10?"0"+b.toString()+":":b.toString()+":")+(c<10?"0"+c.toString():c.toString())+":"+(d<10?"0"+d.toString():d.toString())}function qc(a,b,c){$.default.extend(a,b,c,Hc)}function rc(){Qc=!1,Pc=!1,Yc.reset(),bd.reset(),cd.reset(),Sc.reset(),Uc.reset(),hd.reset(),Vc&&(Vc.reset(),Vc=null,uc())}function sc(){var a=tc();bd||(bd=(0,o.default)(Hc).getInstance()),Uc.setConfig({errHandler:_c,domStorage:id}),bd.setConfig({capabilities:ad,manifestLoader:a,manifestModel:fd,dashManifestModel:ed,mediaPlayerModel:$c,protectionController:Vc,adapter:Yc,metricsModel:Zc,dashMetrics:dd,errHandler:_c,timelineConverter:Tc,videoModel:gd,playbackController:cd,domStorage:id,abrController:Sc,mediaController:Uc,textController:hd}),cd.setConfig({streamController:bd,metricsModel:Zc,dashMetrics:dd,manifestModel:fd,mediaPlayerModel:$c,dashManifestModel:ed,adapter:Yc,videoModel:gd}),Sc.setConfig({streamController:bd,domStorage:id,mediaPlayerModel:$c,metricsModel:Zc,dashMetrics:dd,dashManifestModel:ed,manifestModel:fd,videoModel:gd,adapter:Yc}),Sc.createAbrRulesCollection(),hd.setConfig({errHandler:_c,manifestModel:fd,dashManifestModel:ed,mediaController:Uc,streamController:bd,videoModel:gd}),bd.initialize(Rc,Nc)}function tc(){return(0,s.default)(Hc).create({errHandler:_c,metricsModel:Zc,mediaPlayerModel:$c,requestModifier:(0,A.default)(Hc).getInstance(),mssHandler:Xc})}function uc(){if(Vc)return Vc;var a=dashjs.Protection;if("function"==typeof a){var b=a(Hc).create();return W.default.extend(a.events),Y.default.extend(a.events,{publicOnly:!0}),ad||(ad=(0,w.default)(Hc).getInstance()),Vc=b.createProtectionSystem({log:Kc,errHandler:_c,videoModel:gd,capabilities:ad,eventBus:Ic,events:W.default,BASE64:ka.default,constants:g.default})}return null}function vc(){if(!Wc){var a=dashjs.MetricsReporting;if("function"==typeof a){var b=a(Hc).create();Wc=b.createMetricsReporting({log:Kc,eventBus:Ic,mediaElement:Rb(),dashManifestModel:ed,metricsModel:Zc,events:W.default,constants:g.default,metricsConstants:i.default})}}}function wc(){if(!Xc){var a=dashjs.MssHandler;"function"==typeof a&&(Xc=a(Hc).create({eventBus:Ic,mediaPlayerModel:$c,metricsModel:Zc,playbackController:cd,protectionController:Vc,errHandler:_c,events:W.default,constants:g.default,log:Kc,initSegmentType:ia.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:ka.default,ISOBoxer:ma.default}))}}function xc(){var a=Zc.getReadOnlyMetricsFor(g.default.VIDEO)||Zc.getReadOnlyMetricsFor(g.default.AUDIO);return dd.getCurrentDVRInfo(a)}function yc(a){var b=xc(),c=void 0;return b?(c=b.manifestInfo.availableFrom.getTime()/1e3,a+(c+b.range.start)):0}function zc(){if(!Pc)throw Bc;var a=bd.getActiveStreamInfo();return a?bd.getStreamById(a.id):null}function Ac(){!Pc&&Mc&&(Pc=!0,Kc("Streaming Initialized"),sc(),"string"==typeof Mc?bd.load(Mc):bd.loadWithManifest(Mc)),!Qc&&e()&&(Qc=!0,Kc("Playback Initialized"))}var Bc="You must first call initialize() and set a source before calling this method",Cc="You must first call initialize() and set a valid source and view before calling this method",Dc="You must first call attachView() to set the video element before calling this method",Ec="You must first call attachSource() with a valid source before calling this method",Fc="MediaPlayer not initialized!",Gc="MediaPlayer Invalid Arguments!",Hc=this.context,Ic=(0,U.default)(Hc).getInstance(),Jc=(0,S.default)(Hc).getInstance(),Kc=Jc.log,Lc=void 0,Mc=void 0,Nc=void 0,Oc=void 0,Pc=void 0,Qc=void 0,Rc=void 0,Sc=void 0,Tc=void 0,Uc=void 0,Vc=void 0,Wc=void 0,Xc=void 0,Yc=void 0,Zc=void 0,$c=void 0,_c=void 0,ad=void 0,bd=void 0,cd=void 0,dd=void 0,ed=void 0,fd=void 0,gd=void 0,hd=void 0,id=void 0;return Lc={initialize:c,setConfig:b,on:f,off:h,extend:qc,attachView:Ub,attachSource:nc,isReady:e,preload:n,play:p,isPaused:t,pause:r,isSeeking:x,isDynamic:z,seek:v,setPlaybackRate:B,getPlaybackRate:D,setMute:F,isMuted:H,setVolume:J,getVolume:L,time:T,duration:V,timeAsUTC:X,durationAsUTC:Z,getActiveStream:zc,getDVRWindowSize:P,getDVRSeekOffset:R,convertToTimeCode:pc,formatUTC:oc,getVersion:j,getDebug:l,getBufferLength:N,getVideoContainer:Sb,getTTMLRenderingDiv:Vb,getVideoElement:Rb,getSource:mc,setLiveDelayFragmentCount:Fa,setLiveDelay:Ga,getLiveDelay:Ha,getCurrentLiveLatency:Ia,useSuggestedPresentationDelay:Ja,enableLastBitrateCaching:Ka,enableLastMediaSettingsCaching:La,setMaxAllowedBitrateFor:aa,getMaxAllowedBitrateFor:ea,getTopBitrateInfoFor:ga,setMinAllowedBitrateFor:ca,getMinAllowedBitrateFor:ja,setMaxAllowedRepresentationRatioFor:la,getMaxAllowedRepresentationRatioFor:na,setAutoPlay:Da,getAutoPlay:Ea,setScheduleWhilePaused:Ma,getScheduleWhilePaused:Na,getDashMetrics:Fb,getMetricsFor:Gb,getQualityFor:oa,setQualityFor:pa,updatePortalSize:qa,getLimitBitrateByPortal:ra,setLimitBitrateByPortal:sa,getUsePixelRatioInLimitBitrateByPortal:ta,setUsePixelRatioInLimitBitrateByPortal:ua,setTextDefaultLanguage:Hb,getTextDefaultLanguage:Ib,setTextDefaultEnabled:Jb,getTextDefaultEnabled:Kb,enableText:Lb,enableForcedTextStreaming:Mb,isTextEnabled:Nb,setTextTrack:Ob,getBitrateInfoListFor:Xb,setInitialBitrateFor:va,getInitialBitrateFor:wa,setInitialRepresentationRatioFor:xa,getInitialRepresentationRatioFor:ya,getStreamsFromManifest:Yb,getTracksFor:Zb,getTracksForTypeFromManifest:$b,getCurrentTrackFor:_b,setInitialMediaSettingsFor:ac,getInitialMediaSettingsFor:bc,setCurrentTrack:cc,getTrackSwitchModeFor:dc,setTrackSwitchModeFor:ec,setSelectionModeForInitialTrack:fc,getSelectionModeForInitialTrack:gc,setFastSwitchEnabled:Oa,getFastSwitchEnabled:Pa,setMovingAverageMethod:Wa,getMovingAverageMethod:Xa,getAutoSwitchQualityFor:za,setAutoSwitchQualityFor:Aa,setABRStrategy:Qa,getABRStrategy:Ra,useDefaultABRRules:Sa,addABRCustomRule:Ta,removeABRCustomRule:Ua,removeAllABRCustomRule:Va,setBandwidthSafetyFactor:pb,getBandwidthSafetyFactor:qb,getAverageThroughput:rb,setAbandonLoadTimeout:sb,retrieveManifest:lc,addUTCTimingSource:$a,removeUTCTimingSource:_a,clearDefaultUTCTimingSources:ab,restoreDefaultUTCTimingSources:bb,setBufferToKeep:db,setBufferAheadToKeep:eb,setBufferPruningInterval:fb,setStableBufferTime:gb,getStableBufferTime:hb,setBufferTimeAtTopQuality:ib,getBufferTimeAtTopQuality:jb,setBufferTimeAtTopQualityLongForm:kb,getBufferTimeAtTopQualityLongForm:lb,setFragmentLoaderRetryAttempts:tb,setFragmentLoaderRetryInterval:ub,setManifestLoaderRetryAttempts:vb,setManifestLoaderRetryInterval:wb,setXHRWithCredentialsForType:xb,getXHRWithCredentialsForType:yb,setJumpGaps:zb,getJumpGaps:Ab,setSmallGapLimit:Bb,getSmallGapLimit:Cb,getLowLatencyEnabled:Ya,setLowLatencyEnabled:Za,setManifestUpdateRetryInterval:Db,getManifestUpdateRetryInterval:Eb,setLongFormContentDurationThreshold:mb,setSegmentOverlapToleranceTime:nb,setCacheLoadThresholdForType:ob,getProtectionController:hc,attachProtectionController:ic,setProtectionData:jc,enableManifestDateHeaderTimeSource:cb,displayCaptionsOnTop:Qb,attachVideoContainer:Tb,attachTTMLRenderingDiv:Wb,getCurrentTextTrackIndex:Pb,getUseDeadTimeLatencyForAbr:Ba,setUseDeadTimeLatencyForAbr:Ca,getThumbnail:kc,reset:d},a(),Lc}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(98),i=d(h),j=a(86),k=d(j),l=a(107),m=d(l),n=a(109),o=d(n),p=a(105),q=d(p),r=a(88),s=d(r),t=a(150),u=d(t),v=a(146),w=d(v),x=a(141),y=d(x),z=a(155),A=d(z),B=a(139),C=d(B),D=a(117),E=d(D),F=a(114),G=d(F),H=a(115),I=d(H),J=a(116),K=d(J),L=a(99),M=d(L),N=a(118),O=d(N),P=a(148),Q=d(P),R=a(44),S=d(R),T=a(45),U=d(T),V=a(49),W=d(V),X=a(91),Y=d(X),Z=a(46),$=d(Z),_=a(47),aa=a(51),ba=d(aa),ca=a(58),da=d(ca),ea=a(53),fa=d(ea),ga=a(76),ha=d(ga),ia=a(182),ja=a(1),ka=d(ja),la=a(9),ma=d(la);e.__dashjs_factory_name="MediaPlayer";var na=$.default.getClassFactory(e);na.events=Y.default,$.default.updateClassFactory(e.__dashjs_factory_name,na),c.default=na,b.exports=c.default},{1:1,105:105,107:107,109:109,114:114,115:115,116:116,117:117,118:118,139:139,141:141,146:146,148:148,150:150,155:155,182:182,44:44,45:45,46:46,47:47,49:49,51:51,53:53,58:58,76:76,86:86,88:88,9:9,91:91,97:97,98:98,99:99}],91:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),
|
22 |
-
b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(50),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.AST_IN_FUTURE="astInFuture",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_LOADED="bufferLoaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.ERROR="error",this.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",this.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",this.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",this.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",this.LOG="log",this.MANIFEST_LOADED="manifestLoaded",this.METRICS_CHANGED="metricsChanged",this.METRIC_CHANGED="metricChanged",this.METRIC_ADDED="metricAdded",this.METRIC_UPDATED="metricUpdated",this.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",this.PERIOD_SWITCH_STARTED="periodSwitchStarted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.TRACK_CHANGE_RENDERED="trackChangeRendered",this.SOURCE_INITIALIZED="sourceInitialized",this.STREAM_INITIALIZED="streamInitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TEXT_TRACKS_ADDED="allTextTracksAdded",this.TEXT_TRACK_ADDED="textTrackAdded",this.TTML_PARSED="ttmlParsed",this.TTML_TO_PARSE="ttmlToParse",this.CAN_PLAY="canPlay",this.PLAYBACK_ENDED="playbackEnded",this.PLAYBACK_ERROR="playbackError",this.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",this.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",this.PLAYBACK_PAUSED="playbackPaused",this.PLAYBACK_PLAYING="playbackPlaying",this.PLAYBACK_PROGRESS="playbackProgress",this.PLAYBACK_RATE_CHANGED="playbackRateChanged",this.PLAYBACK_SEEKED="playbackSeeked",this.PLAYBACK_SEEKING="playbackSeeking",this.PLAYBACK_SEEK_ASKED="playbackSeekAsked",this.PLAYBACK_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",this.PLAYBACK_WAITING="playbackWaiting",this.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged"}return f(b,a),b}(i.default),k=new j;c.default=k,b.exports=c.default},{50:50}],92:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){l=[],m=null,n=null}function c(a){"InitializationSegment"!==a.segmentType?(l.push(a),l.sort(function(a,b){return a.start-b.start}),m=null):m=a,k("PreBufferSink appended chunk s: "+a.start+"; e: "+a.end),n&&n({chunk:a})}function d(a,b){l=l.filter(function(c){return!((isNaN(b)||c.start<b)&&(isNaN(a)||c.end>a))})}function e(){}function f(){for(var a=[],b=0;b<l.length;b++){var c=l[b];0===a.length||c.start>a[a.length-1].end?a.push({start:c.start,end:c.end}):a[a.length-1].end=c.end}var d={start:function(b){return a[b].start},end:function(b){return a[b].end}};return Object.defineProperty(d,"length",{get:function(){return a.length}}),d}function h(a,b){var c=i(a,b);return m&&(c.push(m),m=null),d(a,b),c}function i(a,b){return l.filter(function(c){return(isNaN(b)||c.start<b)&&(isNaN(a)||c.end>a)})}var j=this.context,k=(0,g.default)(j).getInstance().log,l=[],m=void 0,n=a;return{getAllBufferRanges:f,append:c,remove:d,abort:e,discharge:h,reset:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(44),g=d(f),h=a(46),i=d(h);e.__dashjs_factory_name="PreBufferSink";var j=i.default.getClassFactory(e);c.default=j,b.exports=c.default},{44:44,46:46}],93:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){function d(){x=!1;var c=b.codec;try{if(c.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))throw new Error("not really supported");w=a.addSourceBuffer(c)}catch(e){if(!b.isText&&-1===c.indexOf('codecs="stpp')&&-1===c.indexOf('codecs="wvtt'))throw e;var d=(0,q.default)(t).getInstance();w=d.getTextSourceBuffer()}}function e(){if(w){try{a.removeSourceBuffer(w)}catch(b){u("Failed to remove source buffer from media source.")}x=!1,w=null}y=[],z=null}function f(){return w}function h(){return w?w.buffered:[]}function j(a){y.push(a),x||s(w,n.bind(this))}function l(b,c,d){var e=this;s(w,function(){try{b>=0&&c>b&&(d||"ended"!==a.readyState)&&w.remove(b,c),s(w,function(){v.trigger(m.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:b,to:c,unintended:!1})})}catch(f){v.trigger(m.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:b,to:c,unintended:!1,error:new i.default(f.code,f.message,null)})}})}function n(){var a=this,b=this;y.length>0&&function(){x=!0;var c=y[0];y.splice(0,1);var d=[],e=function(){var a=h();o(b,d,a,c),y.length>0?n.call(this):(x=!1,z&&z({chunk:c}))};try{0===c.bytes.length?e.call(a):(d=h(),w.appendBuffer?w.appendBuffer(c.bytes):w.append(c.bytes,c),s(w,e.bind(a)))}catch(f){u('SourceBuffer append failed "'+f+'"'),y.length>0?n():x=!1,z&&z({chunk:c,error:new i.default(f.code,f.message,null)})}}()}function o(a,b,c,d){b&&b.length>0&&b.length<c.length&&p(b,d)&&v.trigger(m.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:a,from:c.end(c.length-2),to:c.start(c.length-1),unintended:!0})}function p(a,b){for(var c=0;c<a.length;c++){var d=Math.round(a.start(c)),e=Math.round(a.end(c));if(e===b.start||d===b.end||b.start>=d&&b.end<=e)return!0}return!1}function r(){try{"open"===a.readyState?w.abort():w.setTextTrack&&"ended"===a.readyState&&w.abort()}catch(b){u('SourceBuffer append abort failed: "'+b+'"')}y=[]}function s(a,b){var c=void 0,d=50,e=function(){a.updating||(clearInterval(c),b())},f=function c(){a.updating||(a.removeEventListener("updateend",c,!1),b())};if(!a.updating)return void b();if("function"==typeof a.addEventListener)try{a.addEventListener("updateend",f,!1)}catch(g){c=setInterval(e,d)}else c=setInterval(e,d)}var t=this.context,u=(0,g.default)(t).getInstance().log,v=(0,k.default)(t).getInstance(),w=void 0,x=void 0,y=[],z=c,A={getAllBufferRanges:h,getBuffer:f,append:j,remove:l,abort:r,reset:e};return d(),A}Object.defineProperty(c,"__esModule",{value:!0});var f=a(44),g=d(f),h=a(162),i=d(h),j=a(45),k=d(j),l=a(49),m=d(l),n=a(46),o=d(n),p=a(139),q=d(p);e.__dashjs_factory_name="SourceBufferSink";var r=o.default.getClassFactory(e);c.default=r,b.exports=c.default},{139:139,162:162,44:44,45:45,46:46,49:49}],94:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){h(),pa=(0,m.default)(S).create({mediaPlayerModel:X,metricsModel:ba,errHandler:_}),U.on(s.default.BUFFERING_COMPLETED,M,ha),U.on(s.default.DATA_UPDATE_COMPLETED,N,ha)}function c(a,b){la=a,(oa=b)&&(U.on(s.default.KEY_ERROR,B,ha),U.on(s.default.SERVER_CERTIFICATE_UPDATED,B,ha),U.on(s.default.LICENSE_REQUEST_COMPLETE,B,ha),U.on(s.default.KEY_SYSTEM_SELECTED,B,ha),U.on(s.default.KEY_SESSION_CREATED,B,ha),U.on(s.default.KEY_STATUSES_CHANGED,B,ha))}function d(a){ja||(U.on(s.default.CURRENT_TRACK_CHANGED,E,ha),H(a),ja=!0)}function e(){for(var a=ia?ia.length:0,b=0;b<a;b++){ia[b].getFragmentModel().removeExecutedRequestsBeforeTime(n()+l()),ia[b].reset()}ia=[],ja=!1,ka=!1,U.off(s.default.CURRENT_TRACK_CHANGED,E,ha)}function f(a){for(var b=0;b<ia.length;)D(ia[b].getMediaInfo())?(ia[b].setMediaSource(a),b++):(ia[b].reset(),ia.splice(b,1));for(var b=0;b<ia.length;b++)ia[b].dischargePreBuffer();if(0===ia.length){var c="No streams to play.";_.manifestError(c,"nostreams",V.getValue()),T(c)}}function h(){e(),la=null,ma={},na=!1}function j(){da&&da.pause(),pa&&(pa.reset(),pa=null),h(),T=null,U.off(s.default.DATA_UPDATE_COMPLETED,N,ha),U.off(s.default.BUFFERING_COMPLETED,M,ha),U.off(s.default.KEY_ERROR,B,ha),U.off(s.default.SERVER_CERTIFICATE_UPDATED,B,ha),U.off(s.default.LICENSE_REQUEST_COMPLETE,B,ha),U.off(s.default.KEY_SYSTEM_SELECTED,B,ha),U.off(s.default.KEY_SESSION_CREATED,B,ha),U.off(s.default.KEY_STATUSES_CHANGED,B,ha)}function l(){return la?la.duration:NaN}function n(){return la?la.start:NaN}function p(){return la?la.id:NaN}function r(){return la}function t(){return ra}function v(){return pa}function w(){return qa}function x(){if(!(ca&&ca.hasOwnProperty("getBitrateList")&&Z&&Z.hasOwnProperty("getAllMediaInfoForType")&&Z.hasOwnProperty("getEventsFor")))throw new Error("Missing config parameter(s)")}function y(a){if(x(),a===g.default.IMAGE)return qa?qa.getBitrateList():[];var b=K(a);return ca.getBitrateList(b)}function z(){ra&&ra.start()}function A(){ra&&ra.stop()}function B(a){a.error&&(_.mediaKeySessionError(a.error),T(a.error),j())}function C(a){return a.type===g.default.TEXT?a.mimeType:a.type}function D(a){var b=a.type,c=void 0,d=void 0;if(b===g.default.MUXED&&a)return d="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",T(d),_.manifestError(d,"multiplexedrep",V.getValue()),!1;if(b===g.default.TEXT||b===g.default.FRAGMENTED_TEXT||b===g.default.EMBEDDED_TEXT||b===g.default.IMAGE)return!0;if(c=a.codec,T(b+" codec: "+c),a.contentProtection&&!$.supportsEncryptedMedia())_.capabilityError("encryptedmedia");else if(!$.supportsCodec(c))return d=b+"Codec ("+c+") is not supported.",T(d),!1;return!0}function E(a){if(a.newMediaInfo.streamInfo.id===la.id){var b=O(a.oldMediaInfo);if(b){var c=da.getTime();T("Stream - Process track changed at current time "+c);var d=a.newMediaInfo,e=V.getValue();T("Stream - Update stream controller"),e.refreshManifestOnSwitchTrack?(T("Stream - Refreshing manifest for switch track"),sa=a,Y.refreshManifest()):(b.updateMediaInfo(d),d.type!==g.default.FRAGMENTED_TEXT&&(ca.updateTopQualityIndex(d),b.switchTrackAsked(),b.getFragmentModel().abortRequests()))}}}function F(b,c,d,e){var f=(0,i.default)(S).create({type:C(b),mimeType:b.mimeType,timelineConverter:aa,adapter:Z,manifestModel:V,dashManifestModel:W,mediaPlayerModel:X,metricsModel:ba,dashMetrics:a.dashMetrics,baseURLController:a.baseURLController,stream:ha,abrController:ca,domStorage:a.domStorage,playbackController:da,mediaController:ea,streamController:a.streamController,textController:fa,errHandler:_});if(f.initialize(d),ca.updateTopQualityIndex(b),e?(f.setBuffer(e.buffer),f.getIndexHandler().setCurrentTime(e.currentTime),ia[e.replaceIdx]=f):ia.push(f),!e||!e.ignoreMediaInfo)if(b.type===g.default.TEXT||b.type===g.default.FRAGMENTED_TEXT){for(var h=void 0,j=0;j<c.length;j++)c[j].index===b.index&&(h=j),f.updateMediaInfo(c[j]);b.type===g.default.FRAGMENTED_TEXT&&f.updateMediaInfo(c[h])}else f.updateMediaInfo(b)}function G(b,c){var d=Z.getAllMediaInfoForType(la,b),e=null,f=void 0;if(!d||0===d.length)return void T("No "+b+" data.");for(var h=0,i=d.length;h<i;h++)if(e=d[h],b===g.default.EMBEDDED_TEXT)fa.addEmbeddedTrack(e);else{if(!D(e))continue;ea.addTrack(e)}if(b!==g.default.EMBEDDED_TEXT&&0!==ea.getTracksFor(b,la).length){if(b===g.default.IMAGE)return void(qa=(0,o.default)(S).create({dashManifestModel:W,adapter:Z,baseURLController:a.baseURLController,stream:ha}));ea.checkInitialMediaSettingsForType(b,la),f=ea.getCurrentTrackFor(b,la),F(f,d,c)}}function H(a){x();var b=void 0,c=ga.getElement();if(ra||(ra=(0,k.default)(S).create(),ra.setConfig({manifestModel:V,manifestUpdater:Y,playbackController:da}),b=Z.getEventsFor(la),ra.addInlineEvents(b)),na=!0,I(g.default.VIDEO),I(g.default.AUDIO),(null===c||c&&"VIDEO"===c.nodeName)&&G(g.default.VIDEO,a),G(g.default.AUDIO,a),G(g.default.TEXT,a),G(g.default.FRAGMENTED_TEXT,a),G(g.default.EMBEDDED_TEXT,a),G(g.default.MUXED,a),G(g.default.IMAGE,a),L(),ka=!0,na=!1,0===ia.length){var d="No streams to play.";_.manifestError(d,"nostreams",V.getValue()),T(d)}else J()}function I(a){var b=W.getAdaptationForType(V.getValue(),la.index,a,la);if(!b||!Array.isArray(b.Representation_asArray))return null;b.Representation_asArray=b.Representation_asArray.filter(function(a,c){if(0===c)return!0;var d=W.getCodec(b,c,!0);return!!$.supportsCodec(d)||(T("[Stream] codec not supported: "+d),!1)})}function J(){for(var a=ia.length,b=!!ma.audio||!!ma.video,c=b?new Error(R,"Data update failed",null):null,d=0;d<a;d++)if(ia[d].isUpdating()||na)return;if(ka){if(oa)for(var d=0;d<a&&ia[d];d++)ia[d].getType()!==g.default.AUDIO&&ia[d].getType()!==g.default.VIDEO&&ia[d].getType()!==g.default.FRAGMENTED_TEXT||oa.initializeForMedia(ia[d].getMediaInfo());U.trigger(s.default.STREAM_INITIALIZED,{streamInfo:la,error:c})}}function K(a){for(var b=ia.length,c=null,d=0;d<b;d++)if(c=ia[d],c.getType()===a)return c.getMediaInfo();return null}function L(){for(var a=0,b=ia.length;a<b;a++)ia[a].createBuffer()}function M(a){if(a.streamInfo===la){var b=P(),c=b.length;if(0===c)return void T("[Stream] onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined");for(var d=0;d<c;d++)if(!b[d].isBufferingCompleted()&&(b[d].getType()===g.default.AUDIO||b[d].getType()===g.default.VIDEO))return void T("[Stream] onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because streamProcessor "+b[d].getType()+" is not buffering completed");T("[Stream] onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),U.trigger(s.default.STREAM_BUFFERING_COMPLETED,{streamInfo:la})}}function N(a){var b=a.sender.getStreamProcessor();b.getStreamInfo()===la&&(ma[b.getType()]=a.error,J())}function O(a){return!!a&&P().filter(function(b){return b.getType()===a.type})[0]}function P(){for(var a=ia.length,b=[],c=void 0,d=void 0,e=0;e<a;e++)d=ia[e],(c=d.getType())!==g.default.AUDIO&&c!==g.default.VIDEO&&c!==g.default.FRAGMENTED_TEXT||b.push(d);return b}function Q(a){if(T("Manifest updated... updating data system wide."),ja=!1,na=!0,la=a,ra){var b=Z.getEventsFor(la);ra.addInlineEvents(b)}I(g.default.VIDEO),I(g.default.AUDIO);for(var c=0,d=ia.length;c<d;c++){var e=ia[c],f=Z.getMediaInfoForType(la,e.getType());ca.updateTopQualityIndex(f),e.updateMediaInfo(f)}if(sa){var f=sa.newMediaInfo;if("fragmentedText"!==f.type){var h=O(sa.oldMediaInfo);if(!h)return;h.switchTrackAsked(),sa=void 0}}na=!1,J()}var R=1;a=a||{};var S=this.context,T=(0,u.default)(S).getInstance().log,U=(0,q.default)(S).getInstance(),V=a.manifestModel,W=a.dashManifestModel,X=a.mediaPlayerModel,Y=a.manifestUpdater,Z=a.adapter,$=a.capabilities,_=a.errHandler,aa=a.timelineConverter,ba=a.metricsModel,ca=a.abrController,da=a.playbackController,ea=a.mediaController,fa=a.textController,ga=a.videoModel,ha=void 0,ia=void 0,ja=void 0,ka=void 0,la=void 0,ma=void 0,na=void 0,oa=void 0,pa=void 0,qa=void 0,ra=void 0,sa=void 0;return ha={initialize:c,activate:d,deactivate:e,getDuration:l,getStartTime:n,getId:p,getStreamInfo:r,getFragmentController:v,getThumbnailController:w,getEventController:t,getBitrateListFor:y,startEventController:z,stopEventController:A,updateData:Q,reset:j,getProcessors:P,setMediaSource:f},b(),ha}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(95),i=d(h),j=a(103),k=d(j),l=a(104),m=d(l),n=a(142),o=d(n),p=a(45),q=d(p),r=a(49),s=d(r),t=a(44),u=d(t),v=a(46),w=d(v);e.__dashjs_factory_name="Stream",c.default=w.default.getClassFactory(e),b.exports=c.default},{103:103,104:104,142:142,44:44,45:45,46:46,49:49,95:95,97:97}],95:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){aa&&aa.getIsDynamic()&&(na=(0,i.default)(R).create({timelineConverter:W,streamProcessor:ia})),j()}function c(b){S=(0,u.default)(R).create({mimeType:V,timelineConverter:W,dashMetrics:ga,metricsModel:fa,mediaPlayerModel:Z,baseURLController:a.baseURLController,errHandler:U}),S.initialize(ia),_.registerStreamType(T,ia),pa=$.getFragmentController().getModel(T),pa.setStreamProcessor(ia),la=Q(T),ma=(0,o.default)(R).create({type:T,metricsModel:fa,adapter:X,dashMetrics:ga,dashManifestModel:ha,timelineConverter:W,mediaPlayerModel:Z,abrController:_,playbackController:aa,streamController:ba,textController:da,streamProcessor:ia,mediaController:ca}),oa=(0,q.default)(R).create(),oa.setConfig({abrController:_,domStorage:ea,metricsModel:fa,dashMetrics:ga,dashManifestModel:ha,manifestModel:Y,playbackController:aa,timelineConverter:W,streamProcessor:ia}),la.initialize(b),ma.initialize(),oa.initialize()}function d(a){qa.push(a)}function e(a){var b=qa.indexOf(a);-1!==b&&qa.splice(b,1)}function f(){return qa}function h(){qa=[]}function j(){ka=[],ja=null,h()}function l(a){S.reset(),la&&(la.reset(a),la=null),ma&&(ma.reset(),ma=null),oa&&(oa.reset(),oa=null),_&&_.unRegisterStreamType(T),qa.forEach(function(a){a.reset()}),j(),T=null,$=null,na&&(na.reset(),na=null)}function n(){return!!oa&&oa.isUpdating()}function p(){return T}function r(){return oa}function s(){return S}function t(){return $?$.getFragmentController():null}function v(){return la.getBuffer()}function w(a){la.setBuffer(a)}function x(){return la}function y(){return pa}function z(){return na}function A(){return $?$.getStreamInfo():null}function B(){return $?$.getEventController():null}function C(a){a===ja||a&&ja&&a.type!==ja.type||(ja=a),-1===ka.indexOf(a)&&ka.push(a),X.updateData(this)}function D(){return ka}function E(){return ja}function F(){return la.getMediaSource()}function G(a){la.setMediaSource(a,E())}function H(){la.dischargePreBuffer()}function I(){return ma}function J(){return X.getCurrentRepresentationInfo(oa)}function K(a){return X.getRepresentationInfoForQuality(oa,a)}function L(){return!!la&&la.getIsBufferingCompleted()}function M(){return la.getBufferLevel()}function N(a,b){la&&la.switchInitData(A().id,a,b)}function O(){return la.getBuffer()||la.createBuffer(ja)}function P(){ma.switchTrackAsked()}function Q(a){return a===g.default.VIDEO||a===g.default.AUDIO?(0,k.default)(R).create({type:a,metricsModel:fa,mediaPlayerModel:Z,manifestModel:Y,errHandler:U,streamController:ba,mediaController:ca,adapter:X,textController:da,abrController:_,playbackController:aa,streamProcessor:ia}):(0,m.default)(R).create({type:a,metricsModel:fa,mediaPlayerModel:Z,manifestModel:Y,errHandler:U,streamController:ba,mediaController:ca,adapter:X,textController:da,abrController:_,playbackController:aa,streamProcessor:ia})}a=a||{};var R=this.context,S=void 0,T=a.type,U=a.errHandler,V=a.mimeType,W=a.timelineConverter,X=a.adapter,Y=a.manifestModel,Z=a.mediaPlayerModel,$=a.stream,_=a.abrController,aa=a.playbackController,ba=a.streamController,ca=a.mediaController,da=a.textController,ea=a.domStorage,fa=a.metricsModel,ga=a.dashMetrics,ha=a.dashManifestModel,ia=void 0,ja=void 0,ka=void 0,la=void 0,ma=void 0,na=void 0,oa=void 0,pa=void 0,qa=void 0;return ia={initialize:c,isUpdating:n,getType:p,getBufferController:x,getFragmentModel:y,getScheduleController:I,getLiveEdgeFinder:z,getEventController:B,getFragmentController:t,getRepresentationController:r,getIndexHandler:s,getCurrentRepresentationInfo:J,getRepresentationInfoForQuality:K,getBufferLevel:M,switchInitData:N,isBufferingCompleted:L,createBuffer:O,getStreamInfo:A,updateMediaInfo:C,switchTrackAsked:P,getMediaInfoArr:D,getMediaInfo:E,getMediaSource:F,setMediaSource:G,dischargePreBuffer:H,getBuffer:v,setBuffer:w,registerExternalController:d,unregisterExternalController:e,getExternalControllers:f,unregisterAllExternalController:h,reset:l},b(),ia}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(153),i=d(h),j=a(102),k=d(j),l=a(138),m=d(l),n=a(108),o=d(n),p=a(57),q=d(p),r=a(46),s=d(r),t=a(52),u=d(t);e.__dashjs_factory_name="StreamProcessor",c.default=s.default.getClassFactory(e),b.exports=c.default},{102:102,108:108,138:138,153:153,46:46,52:52,57:57,97:97}],96:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b,c){var e=function(d,e){b.resolved=!0,b.resolvedContent=d||null,f.trigger(p.default.XLINK_ELEMENT_LOADED,{element:b,resolveObject:c,error:d||e?null:new g.default(s,"Failed loading Xlink element: "+a)})};if(a===d)e(null,!0);else{var i=new l.default(a,j.HTTPRequest.XLINK_TYPE);h.load({request:i,success:function(a){e(a)},error:function(){e(null)}})}}function c(){h&&(h.abort(),h=null)}a=a||{};var d="urn:mpeg:dash:resolve-to-zero:2013",e=this.context,f=(0,n.default)(e).getInstance(),h=(0,i.default)(e).create({errHandler:a.errHandler,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier});return{load:b,reset:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(162),g=d(f),h=a(120),i=d(h),j=a(182),k=a(173),l=d(k),m=a(45),n=d(m),o=a(49),p=d(o),q=a(46),r=d(q),s=1;e.__dashjs_factory_name="XlinkLoader";var t=r.default.getClassFactory(e);t.XLINK_LOADER_ERROR_LOADING_FAILURE=s,r.default.updateClassFactory(e.__dashjs_factory_name,t),c.default=t,b.exports=c.default},{120:120,162:162,173:173,182:182,45:45,46:46,49:49}],97:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this.init()}return e(a,[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.FRAGMENTED_TEXT="fragmentedText",this.EMBEDDED_TEXT="embeddedText",this.MUXED="muxed",this.IMAGE="image",this.LOCATION="Location",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.CC1="CC1",this.CC3="CC3",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.UTF8="utf-8",this.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],98:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this.init()}return e(a,[{key:"init",value:function(){this.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],99:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){va=sa.log.bind(ua),e()}function b(a,b){Sa[a]=(0,A.default)(ra).create(),Da[a]=b,Ea[a]=Ea[a]||{},Ea[a].state=J,Va[a]=!1,ta.on(s.default.LOADING_PROGRESS,qa,this),a==i.default.VIDEO&&(ta.on(s.default.QUALITY_CHANGE_RENDERED,j,this),Ta=(0,C.default)(ra).create(),oa()),ta.on(s.default.METRIC_ADDED,l,this),Ua=(0,E.default)(ra).create({mediaPlayerModel:Pa})}function c(a){delete Da[a]}function d(){wa=(0,g.default)(ra).create({metricsModel:Wa,dashMetrics:Xa,mediaPlayerModel:Pa,adapter:Na}),wa.initialize()}function e(){ya={video:!0,audio:!0},za={},Aa={},Ba={},Ca={},Ea={},Da={},Sa={},Va={},Ga=!1,Ya=!0,Ha=!1,void 0===Ia&&(Ia=!1),Ra=void 0,Ta=void 0,Ua=void 0,clearTimeout(Fa),Fa=null}function f(){e(),ta.off(s.default.LOADING_PROGRESS,qa,this),ta.off(s.default.QUALITY_CHANGE_RENDERED,j,this),ta.off(s.default.METRIC_ADDED,l,this),wa&&wa.reset()}function h(a){a&&(a.streamController&&(xa=a.streamController),a.domStorage&&(Qa=a.domStorage),a.mediaPlayerModel&&(Pa=a.mediaPlayerModel),a.metricsModel&&(Wa=a.metricsModel),a.dashMetrics&&(Xa=a.dashMetrics),a.dashManifestModel&&(Ma=a.dashManifestModel),a.adapter&&(Na=a.adapter),a.manifestModel&&(La=a.manifestModel),a.videoModel&&(Oa=a.videoModel))}function j(a){a.mediaType===i.default.VIDEO&&(Ra=a.oldQuality,Ta.push(Ra,Oa.getPlaybackQuality()))}function l(a){a.metric!==k.default.HTTP_REQUEST||!a.value||a.value.type!==F.HTTPRequest.MEDIA_SEGMENT_TYPE||a.mediaType!==i.default.AUDIO&&a.mediaType!==i.default.VIDEO||Ua.push(a.mediaType,a.value,Ya),a.metric!==k.default.BUFFER_LEVEL||a.mediaType!==i.default.AUDIO&&a.mediaType!==i.default.VIDEO||da(a.mediaType,.001*a.value.level)}function n(a,b){var c=void 0;return za[b]=za[b]||{},za[b].hasOwnProperty(a)||(za[b][a]=0),c=la(za[b][a],a),c=ma(c,a,za[b][a]),c=pa(c,a)}function p(a){if(a&&Da&&Da[a]){var b=Da[a].getStreamInfo();if(b.id){var c=n(a,b.id),d=ca(Da[a].getMediaInfo());return d[c]?d[c]:null}}return null}function r(a){var b=Qa.getSavedBitrateSettings(a);if(!Ba.hasOwnProperty(a))if(Ca.hasOwnProperty(a)){var c=La.getValue(),d=Ma.getAdaptationForType(c,0,a).Representation;if(Array.isArray(d)){var e=Math.max(Math.round(d.length*Ca[a])-1,0);Ba[a]=d[e].bandwidth}else Ba[a]=0}else isNaN(b)?Ba[a]=a===i.default.VIDEO?K:L:Ba[a]=b;return Ba[a]}function t(a,b){Ba[a]=b}function u(a){return Ca.hasOwnProperty(a)?Ca[a]:null}function v(a,b){Ca[a]=b}function x(a){return Ba.hasOwnProperty("max")&&Ba.max.hasOwnProperty(a)?Ba.max[a]:NaN}function z(a){return Ba.hasOwnProperty("min")&&Ba.min.hasOwnProperty(a)?Ba.min[a]:NaN}function B(a,b){Ba.max=Ba.max||{},Ba.max[a]=b}function D(a,b){Ba.min=Ba.min||{},Ba.min[a]=b}function G(a){var b=x(a);return b?ba(Da[a].getMediaInfo(),b):void 0}function N(a){var b=z(a);if(b){var c=ca(Da[a].getMediaInfo()),d=ba(Da[a].getMediaInfo(),b);return c[d]&&d<c.length-1&&c[d].bitrate<1e3*b&&d++,d}}function O(a){return Ca.hasOwnProperty("max")&&Ca.max.hasOwnProperty(a)?Ca.max[a]:1}function P(a,b){Ca.max=Ca.max||{},Ca.max[a]=b}function Q(a){return ya[a]}function R(a,b){ya[a]=b}function S(){return Ga}function T(a){Ga=a}function U(){return Ha}function V(a){Ha=a}function W(){return Ya}function X(a){Ya=a}function Y(a){if(a&&Da&&Da[a]){var b=Da[a].getStreamInfo(),c=b?b.id:null,d=ia(a),e=(0,w.default)(ra).create({abrController:ua,streamProcessor:Da[a],currentValue:d,switchHistory:Sa[a],droppedFramesHistory:Ta,useBufferOccupancyABR:ea(a)});if(Ta){var f=Oa.getPlaybackQuality();f&&Ta.push(Ra,f)}if(Q(a)){var g=N(a),h=n(a,c),i=wa.getMaxQuality(e),j=i.quality;if(void 0!==g&&j<g&&(j=g),j>h&&(j=h),Sa[a].push({oldValue:d,newValue:j}),j>y.default.NO_CHANGE&&j!=d)(Ea[a].state===J||j>d)&&$(a,d,j,h,i.reason);else if(sa.getLogToBrowserConsole()){var k=Xa.getCurrentBufferLevel(Wa.getReadOnlyMetricsFor(a));va("AbrController ("+a+") stay on "+d+"/"+h+" (buffer: "+k+")")}}}}function Z(a,b,c,d){var e=b.id,f=ia(a);if(null===c||isNaN(c)||c%1!=0)throw new Error("argument is not an integer");var g=n(a,e);c!==f&&c>=0&&c<=g&&$(a,f,c,g,d)}function $(a,b,c,d,e){if(a&&Da[a]){var f=Da[a].getStreamInfo(),g=f?f.id:null;if(sa.getLogToBrowserConsole()){var h=Xa.getCurrentBufferLevel(Wa.getReadOnlyMetricsFor(a));va("AbrController ("+a+") switch from "+b+" to "+c+"/"+d+" (buffer: "+h+") "+(e?JSON.stringify(e):"."))}ja(a,g,c),ta.trigger(s.default.QUALITY_CHANGE_REQUESTED,{mediaType:a,streamInfo:f,oldQuality:b,newQuality:c,reason:e})}}function _(a,b){Ea[a].state=b}function aa(a){return Ea[a]?Ea[a].state:null}function ba(a,b,c){if(Ya&&c&&Da[a.type].getCurrentRepresentationInfo()&&Da[a.type].getCurrentRepresentationInfo().fragmentDuration){c/=1e3;var d=Da[a.type].getCurrentRepresentationInfo().fragmentDuration;if(c>d)return 0;b*=1-c/d}var e=ca(a);if(!e||0===e.length)return M;for(var f=e.length-1;f>=0;f--){if(1e3*b>=e[f].bitrate)return f}return 0}function ca(a){if(!a||!a.bitrateList)return null;for(var b=a.bitrateList,c=a.type,d=[],e=void 0,f=0,g=b.length;f<g;f++)e=new m.default,e.mediaType=c,e.qualityIndex=f,e.bitrate=b[f].bandwidth,e.width=b[f].width,e.height=b[f].height,e.scanType=b[f].scanType,d.push(e);return d}function da(a,b){var c=Pa.getABRStrategy();if(c===i.default.ABR_STRATEGY_BOLA)return void(Va[a]=!0);if(c===i.default.ABR_STRATEGY_THROUGHPUT)return void(Va[a]=!1);var d=Pa.getStableBufferTime(),e=d,f=.5*d,g=Va[a],h=b>(g?f:e);Va[a]=h,h!==g&&va(h?"AbrController ("+a+") switching from throughput to buffer occupancy ABR rule (buffer: "+b.toFixed(3)+").":"AbrController ("+a+") switching from buffer occupancy to throughput ABR rule (buffer: "+b.toFixed(3)+").")}function ea(a){return Va[a]}function fa(){return Ua}function ga(a){var b=a.type,c=a.streamInfo.id,d=a.representationCount-1;return ka(b,c,d),d}function ha(a){var b=a.id,c=ia(i.default.AUDIO),d=ia(i.default.VIDEO);return c===n(i.default.AUDIO,b)&&d===n(i.default.VIDEO,b)}function ia(a){if(a&&Da[a]){var b=Da[a].getStreamInfo(),c=b?b.id:null;if(c)return Aa[c]=Aa[c]||{},Aa[c].hasOwnProperty(a)||(Aa[c][a]=M),Aa[c][a]}return M}function ja(a,b,c){Aa[b]=Aa[b]||{},Aa[b][a]=c}function ka(a,b,c){za[b]=za[b]||{},za[b][a]=c}function la(a,b){var c=a;if(!Da[b])return c;var d=N(b);void 0!==d&&(c=Math.max(a,d));var e=G(b);return void 0!==e&&(c=Math.min(c,e)),c}function ma(a,b,c){var d=O(b);return isNaN(d)||d>=1||d<0?a:Math.min(a,Math.round(c*d))}function na(a){Ia=a}function oa(){if(Oa){var a=Ha&&window.hasOwnProperty("devicePixelRatio"),b=a?window.devicePixelRatio:1;Ja=Oa.getClientWidth()*b,Ka=Oa.getClientHeight()*b}}function pa(a,b){if(b!==i.default.VIDEO||!Ga||!Da[b])return a;Ia||oa();var c=La.getValue(),d=Ma.getAdaptationForType(c,0,b).Representation,e=a;if(Ja>0&&Ka>0){for(;e>0&&d[e]&&Ja<d[e].width&&Ja-d[e-1].width<d[e].width-Ja;)e-=1;d.length-2>=e&&d[e].width===d[e+1].width&&(e=Math.min(a,e+1))}return e}function qa(a){var b=a.request.mediaType;if(Q(b)){var c=Da[b];if(!c)return;var d=(0,w.default)(ra).create({abrController:ua,streamProcessor:c,currentRequest:a.request,useBufferOccupancyABR:ea(b)}),e=wa.shouldAbandonFragment(d);if(e.quality>y.default.NO_CHANGE){var f=c.getFragmentModel();f.getRequests({state:o.default.FRAGMENT_MODEL_LOADING,index:a.request.index})[0]&&(f.abortRequests(),_(b,I),Sa[b].reset(),Sa[b].push({oldValue:ia(b,xa.getActiveStreamInfo()),newValue:e.quality,confidence:1,reason:e.reason}),Z(b,xa.getActiveStreamInfo(),e.quality,e.reason),clearTimeout(Fa),Fa=setTimeout(function(){_(b,J),Fa=null},Pa.getAbandonLoadTimeout()))}}}var ra=this.context,sa=(0,H.default)(ra).getInstance(),ta=(0,q.default)(ra).getInstance(),ua=void 0,va=void 0,wa=void 0,xa=void 0,ya=void 0,za=void 0,Aa=void 0,Ba=void 0,Ca=void 0,Da=void 0,Ea=void 0,Fa=void 0,Ga=void 0,Ha=void 0,Ia=void 0,Ja=void 0,Ka=void 0,La=void 0,Ma=void 0,Na=void 0,Oa=void 0,Pa=void 0,Qa=void 0,Ra=void 0,Sa=void 0,Ta=void 0,Ua=void 0,Va=void 0,Wa=void 0,Xa=void 0,Ya=void 0;return ua={isPlayingAtTopQuality:ha,updateTopQualityIndex:ga,getThroughputHistory:fa,getBitrateList:ca,getQualityForBitrate:ba,getMaxAllowedBitrateFor:x,getTopBitrateInfoFor:p,getMinAllowedBitrateFor:z,setMaxAllowedBitrateFor:B,setMinAllowedBitrateFor:D,getMaxAllowedIndexFor:G,getMinAllowedIndexFor:N,getMaxAllowedRepresentationRatioFor:O,setMaxAllowedRepresentationRatioFor:P,getInitialBitrateFor:r,setInitialBitrateFor:t,getInitialRepresentationRatioFor:u,setInitialRepresentationRatioFor:v,setAutoSwitchBitrateFor:R,getAutoSwitchBitrateFor:Q,getUseDeadTimeLatency:W,setUseDeadTimeLatency:X,setLimitBitrateByPortal:T,getLimitBitrateByPortal:S,getUsePixelRatioInLimitBitrateByPortal:U,setUsePixelRatioInLimitBitrateByPortal:V,getQualityFor:ia,getAbandonmentStateFor:aa,setPlaybackQuality:Z,checkPlaybackQuality:Y,getTopQualityIndexFor:n,setElementSize:oa,setWindowResizeEventCalled:na,createAbrRulesCollection:d,registerStreamType:b,unRegisterStreamType:c,setConfig:h,reset:f},a(),ua}Object.defineProperty(c,"__esModule",{value:!0})
|
23 |
-
;var f=a(127),g=d(f),h=a(97),i=d(h),j=a(98),k=d(j),l=a(161),m=d(l),n=a(113),o=d(n),p=a(45),q=d(p),r=a(49),s=d(r),t=a(46),u=d(t),v=a(123),w=d(v),x=a(124),y=d(x),z=a(125),A=d(z),B=a(122),C=d(B),D=a(126),E=d(D),F=a(182),G=a(44),H=d(G),I="abandonload",J="allowload",K=1e3,L=100,M=0;e.__dashjs_factory_name="AbrController";var N=u.default.getSingletonFactory(e);N.ABANDON_LOAD=I,N.QUALITY_DEFAULT=M,u.default.updateSingletonFactory(e.__dashjs_factory_name,N),c.default=N,b.exports=c.default},{113:113,122:122,123:123,124:124,125:125,126:126,127:127,161:161,182:182,44:44,45:45,46:46,49:49,97:97,98:98}],100:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){r.invalidateSelectedIndexes(a.entry)}function b(){r=(0,g.default)(n).create(),t=(0,i.default)(n).create(),o.on(s.default.SERVICE_LOCATION_BLACKLIST_CHANGED,a,j)}function c(a){a.baseURLTreeModel&&(r=a.baseURLTreeModel),a.baseURLSelector&&(t=a.baseURLSelector),a.dashManifestModel&&(l=a.dashManifestModel)}function d(a){r.update(a),t.chooseSelectorFromManifest(a)}function e(a){var b=r.getForPath(a),c=b.reduce(function(a,b){var c=t.select(b);return c?(p.isRelative(c.url)?a.url=p.resolve(c.url,a.url):(a.url=c.url,a.serviceLocation=c.serviceLocation),a.availabilityTimeOffset=c.availabilityTimeOffset,a.availabilityTimeComplete=c.availabilityTimeComplete,a):new m.default},new m.default);if(!p.isRelative(c.url))return c}function f(){r.reset(),t.reset()}function h(a){r.setConfig({dashManifestModel:l}),t.setConfig({dashManifestModel:l}),d(a)}var j=void 0,l=void 0,n=this.context,o=(0,q.default)(n).getInstance(),p=(0,k.default)(n).getInstance(),r=void 0,t=void 0;return j={reset:f,initialize:h,resolve:e,setConfig:c},b(),j}Object.defineProperty(c,"__esModule",{value:!0});var f=a(112),g=d(f),h=a(144),i=d(h),j=a(157),k=d(j),l=a(79),m=d(l),n=a(46),o=d(n),p=a(45),q=d(p),r=a(49),s=d(r);e.__dashjs_factory_name="BaseURLController",c.default=o.default.getSingletonFactory(e),b.exports=c.default},{112:112,144:144,157:157,45:45,46:46,49:49,79:79}],101:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){return!!(g.length&&a&&a.length)&&-1!==g.indexOf(a)}function c(a){-1===g.indexOf(a)&&(g.push(a),h.trigger(j,{entry:a}))}function d(a){c(a.entry)}function e(){k&&h.on(k,d,this)}function f(){g=[]}a=a||{};var g=[],h=(0,i.default)(this.context).getInstance(),j=a.updateEventName,k=a.addBlacklistEventName;return e(),{add:c,contains:b,reset:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(45),i=d(h);e.__dashjs_factory_name="BlackListController",c.default=g.default.getClassFactory(e),b.exports=c.default},{45:45,46:46}],102:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){Da=(0,A.default)(pa).getInstance().log.bind(Ca),Sa=(0,C.default)(pa).getInstance(),Wa=[],na()}function c(){return K}function d(a){ha(a),Ea=ya.getQualityFor(Aa,Ba.getStreamInfo()),qa.on(u.default.DATA_UPDATE_COMPLETED,Z,this),qa.on(u.default.INIT_FRAGMENT_LOADED,j,this),qa.on(u.default.MEDIA_FRAGMENT_LOADED,n,this),qa.on(u.default.QUALITY_CHANGE_REQUESTED,t,this),qa.on(u.default.STREAM_COMPLETED,$,this),qa.on(u.default.PLAYBACK_PROGRESS,B,this),qa.on(u.default.PLAYBACK_TIME_UPDATED,B,this),qa.on(u.default.PLAYBACK_RATE_CHANGED,ba,this),qa.on(u.default.PLAYBACK_SEEKING,v,this),qa.on(u.default.WALLCLOCK_TIME_UPDATED,aa,this),qa.on(u.default.CURRENT_TRACK_CHANGED,_,this,s.default.EVENT_PRIORITY_HIGH),qa.on(u.default.SOURCEBUFFER_REMOVE_COMPLETED,X,this)}function e(a){if(!Sa||!a||!Ba)return null;if(Ia)try{La=(0,k.default)(pa).create(Ia,a,r.bind(this)),"function"==typeof La.getBuffer().initialize&&La.getBuffer().initialize(Aa,Ba)}catch(b){Da("Caught error on create SourceBuffer: "+b),ta.mediaSourceError("Error creating "+Aa+" source buffer.")}else La=(0,m.default)(pa).create(r.bind(this));Y(Ba.getRepresentationInfoForQuality(Ea).MSETimeOffset)}function f(){if(La&&Ma&&"function"==typeof Ma.discharge){var a=Ma.getAllBufferRanges();if(a.length>0){for(var b="Beginning "+Aa+"PreBuffer discharge, adding buffer for:",c=0;c<a.length;c++)b+=" start: "+a.start(c)+", end: "+a.end(c)+";";Da(b)}else Da("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");for(var d=Ma.discharge(),e=null,f=0;f<d.length;f++){var g=d[f],h=Sa.extract(g.streamId,g.representationId);h&&(e!==h&&(La.append(h),e=h),La.append(g))}Ma.reset(),Ma=null}}function h(){return!(!Ba||!ua)&&Ba.getStreamInfo().id===ua.getActiveStreamInfo().id}function j(a){a.fragmentModel===Ba.getFragmentModel()&&(Da("Init fragment finished loading saving to",Aa+"'s init cache"),Sa.save(a.chunk),Da("Append Init fragment",Aa," with representationId:",a.chunk.representationId," and quality:",a.chunk.quality),p(a.chunk))}function l(a,b,c){var d=Sa.extract(a,b);Xa=!0===c&&c,d?(Da("Append Init fragment",Aa," with representationId:",d.representationId," and quality:",d.quality),p(d)):qa.trigger(u.default.INIT_REQUESTED,{sender:Ca})}function n(a){if(a.fragmentModel===Ba.getFragmentModel()){var b=a.chunk,c=b.bytes,d=b.quality,e=Ba.getRepresentationInfoForQuality(d),f=wa.getEventsFor(e.mediaInfo,Ba),g=wa.getEventsFor(e,Ba);if(f&&f.length>0||g&&g.length>0){var h=Ba.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,quality:d,index:b.index})[0],j=S(c,h,f,g);Ba.getEventController().addInbandEvents(j)}if(Xa){Ya=b;var k=La&&La.getAllBufferRanges();k&&k.length>0&&za.getTimeToStreamEnd()>G&&(Da("Clearing buffer because track changed - "+(k.end(k.length-1)+H)),V([{start:0,end:k.end(k.length-1)+H,force:!0}]))}else p(b)}}function p(a,b){!Qa||b?(Qa=!0,Oa=a,La.append(a),a.mediaInfo.type===g.default.VIDEO&&qa.trigger(u.default.VIDEO_CHUNK_RECEIVED,{chunk:a})):Wa.push(a)}function r(a){if(a.error){if(a.error.code===J&&(Ha=.8*la(),Da("Quota exceeded for type: "+Aa+", Critical Buffer: "+Ha),Ha>0)){var b=Math.max(.2*Ha,1),c=Ha-b;sa.setBufferToKeep(parseFloat(b).toFixed(5)),sa.setBufferAheadToKeep(parseFloat(c).toFixed(5))}return void(a.error.code!==J&&ma()||(Da("Clearing playback buffer to overcome quota exceed situation for type: "+Aa),qa.trigger(u.default.QUOTA_EXCEEDED,{sender:Ca,criticalBufferLevel:Ha}),x()))}(Oa=a.chunk)&&!isNaN(Oa.index)&&(Ja=Math.max(Oa.index,Ja),P());var d=La.getAllBufferRanges();if(Oa.segmentType===D.HTTPRequest.MEDIA_SEGMENT_TYPE)B();else if(Xa){var e=za.getTime();Da("[BufferController][",Aa,"] appendToBuffer seek target should be "+e),Ba.getScheduleController().setSeekTarget(e),wa.setIndexHandlerTime(Ba,e)}var f={sender:Ca,quality:Oa.quality,startTime:Oa.start,index:Oa.index,bufferedRanges:d};if(Oa&&!Oa.endFragment?qa.trigger(u.default.BYTES_APPENDED,f):Oa&&qa.trigger(u.default.BYTES_APPENDED_END_FRAGMENT,f),0===Wa.length)Qa=!1;else{p(Wa.shift(),!0)}}function t(a){Ea!==a.newQuality&&Aa===a.mediaType&&Ba.getStreamInfo().id===a.streamInfo.id&&(Y(Ba.getRepresentationInfoForQuality(a.newQuality).MSETimeOffset),Ea=a.newQuality)}function v(){Fa&&(Ua=!0,Fa=!1,Ka=Number.POSITIVE_INFINITY),Wa=[],Qa=!1,Aa!==g.default.FRAGMENTED_TEXT?x():B(),Ta=void 0}function x(){var a=y();a&&0!==a.length||B(),V(a)}function y(){var a=[],b=La.getAllBufferRanges();if(!b||0===b.length)return a;var c=za.getTime(),d=b.end(b.length-1)+H,e=Ba.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:c,threshold:I})[0];if(e){var f={start:0,end:e.startTime-G},g=Ba.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:e.startTime-e.duration/2,threshold:I})[0];g&&g.startTime!=e.startTime&&(f.end=g.startTime),f.start<f.end&&f.end>b.start(0)&&a.push(f);var h={start:e.startTime+e.duration+G,end:d},j=Ba.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:e.startTime+e.duration+G,threshold:I})[0];j&&j.startTime!==e.startTime&&(h.start=j.startTime+j.duration+G),h.start<h.end&&h.start<d&&a.push(h)}else Da("getAllRangesWithSafetyFactor for",Aa,"- No request found in current time position, removing full buffer 0 -",d),a.push({start:0,end:d});return a}function z(){var a=za.getTime();if(Ta){var b=La.getAllBufferRanges();b&&b.length&&(a=Math.max(b.start(0),Ta))}return a}function B(){Xa||(N(),O())}function L(a,b){var c=La.getAllBufferRanges(),d=0,e=0,f=null,g=null,h=0,i=void 0,j=void 0,k=b||.15;if(null!==c&&void 0!==c){for(j=0,i=c.length;j<i;j++)if(d=c.start(j),e=c.end(j),null===f)h=Math.abs(d-a),a>=d&&a<e?(f=d,g=e):h<=k&&(f=d,g=e);else{if(!((h=d-g)<=k))break;g=e}if(null!==f)return{start:f,end:g}}return null}function M(a,b){var c=void 0;return c=L(a,b),null===c?0:c.end-a}function N(){za&&(Ga=M(z()||0),qa.trigger(u.default.BUFFER_LEVEL_UPDATED,{sender:Ca,bufferLevel:Ga}),Q())}function O(){h()&&(ra.addBufferState(Aa,Na,Ba.getScheduleController().getBufferTarget()),ra.addBufferLevel(Aa,new Date,1e3*Ga))}function P(){Ja>=Ka-1&&!Fa&&void 0===La.discharge&&(Fa=!0,Da("[BufferController]["+Aa+"] checkIfBufferingCompleted trigger BUFFERING_COMPLETED"),qa.trigger(u.default.BUFFERING_COMPLETED,{sender:Ca,streamInfo:Ba.getStreamInfo()}))}function Q(){"audio"!==Aa&&"video"!==Aa||(Ua&&!Fa&&za&&za.getTimeToStreamEnd()-Ga<G&&(Ua=!1,Fa=!0,Da("[BufferController]["+Aa+"] checkIfSufficientBuffer trigger BUFFERING_COMPLETED"),qa.trigger(u.default.BUFFERING_COMPLETED,{sender:Ca,streamInfo:Ba.getStreamInfo()})),Ga<G&&!Fa?R(F):(Fa||Ga>=sa.getStableBufferTime())&&R(E))}function R(a){Na===a||Aa===g.default.FRAGMENTED_TEXT&&!xa.isTextEnabled()||(Na=a,O(),qa.trigger(u.default.BUFFER_LEVEL_STATE_CHANGED,{sender:Ca,state:a,mediaType:Aa,streamInfo:Ba.getStreamInfo()}),qa.trigger(a===E?u.default.BUFFER_LOADED:u.default.BUFFER_EMPTY,{mediaType:Aa}),Da(a===E?"Got enough buffer to start for "+Aa:"Waiting for more buffer before starting playback for "+Aa))}function S(a,b,c,d){for(var e=Math.max(!b||isNaN(b.startTime)?0:b.startTime,0),f=[],g=[],h=c.concat(d),i=0,j=h.length;i<j;i++)f[h[i].schemeIdUri]=h[i];for(var k=(0,w.default)(pa).getInstance().parse(a),l=k.getBoxes("emsg"),i=0,j=l.length;i<j;i++){var m=wa.getEvent(l[i],f,e);m&&g.push(m)}return g}function T(){La&&Aa!==g.default.FRAGMENTED_TEXT&&(Fa||V(U()))}function U(){var a=[],b=La.getAllBufferRanges();if(!b||0===b.length)return a;var c=za.getTime(),d={start:Math.max(0,c-sa.getBufferToKeep()),end:c+sa.getBufferAheadToKeep()},e=Ba.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:c,threshold:I})[0];if(e)d.start=Math.min(e.startTime,d.start),d.end=Math.max(e.startTime+e.duration,d.end);else if(0===c&&za.getIsDynamic())return[];if(b.start(0)<=d.start){for(var f={start:0,end:d.start},g=0;g<b.length&&b.end(g)<=d.start;g++)f.end=b.end(g);f.start<f.end&&a.push(f)}if(b.end(b.length-1)>=d.end){var h={start:d.end,end:b.end(b.length-1)+I};h.start<h.end&&a.push(h)}return a}function V(a){a&&La&&0!==a.length&&(Va.push.apply(Va,a),Ra||W())}function W(){if(0===Va.length||!La)return Da("Nothing to prune, halt pruning"),Va=[],void(Ra=!1);var a=La.getBuffer();if(!a||!a.buffered||0===a.buffered.length)return Da("SourceBuffer is empty (or does not exist), halt pruning"),Va=[],void(Ra=!1);var b=Va.shift();Da("Removing",Aa,"buffer from:",b.start,"to",b.end),Ra=!0;var c=za.getTime();c<b.end&&(Fa=!1,Ja=0,Xa||(Ba.getScheduleController().setSeekTarget(c),wa.setIndexHandlerTime(Ba,c))),La.remove(b.start,b.end,b.force)}function X(a){La===a.buffer&&(Da("[BufferController][",Aa,"] onRemoved buffer from:",a.from,"to",a.to),0===Va.length&&(Ra=!1),a.unintended&&(Da("[BufferController][",Aa,"] detected unintended removal from:",a.from,"to",a.to,"setting index handler time to",a.from),wa.setIndexHandlerTime(Ba,a.from)),Ra?W():(Xa?(Xa=!1,Ya&&p(Ya)):(Da("onRemoved : call updateBufferLevel"),N()),qa.trigger(u.default.BUFFER_CLEARED,{sender:Ca,from:a.from,to:a.to,unintended:a.unintended,hasEnoughSpaceToAppend:ma()})))}function Y(a){var b=La&&La.getBuffer?La.getBuffer():null;b&&b.timestampOffset!==a&&!isNaN(a)&&(b.timestampOffset=a)}function Z(a){a.sender.getStreamProcessor()!==Ba||a.error||Y(a.currentRepresentation.MSETimeOffset)}function $(a){a.fragmentModel===Ba.getFragmentModel()&&(Ka=a.request.index,P())}function _(a){var b=La&&La.getAllBufferRanges();b&&a.newMediaInfo.type===Aa&&a.newMediaInfo.streamInfo.id===Ba.getStreamInfo().id&&(Da("[BufferController]["+Aa+"] track change asked"),va.getSwitchMode(Aa)===q.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&b&&b.length>0&&za.getTimeToStreamEnd()>G&&(Fa=!1,Ka=Number.POSITIVE_INFINITY))}function aa(){++Pa*(sa.getWallclockTimeUpdateInterval()/1e3)>=sa.getBufferPruningInterval()&&(Pa=0,T())}function ba(){Q()}function ca(){return Aa}function da(){return Ba}function ea(a){Ta=a}function fa(){return La}function ga(){return Ga}function ha(a,b){Ia=a,La&&b&&"function"==typeof La.discharge&&(Ma=La,e(b))}function ia(){return Ia}function ja(){return Fa}function ka(){return Ra}function la(){var a=La.getAllBufferRanges(),b=0,c=void 0,d=void 0;if(!a)return b;for(d=0,c=a.length;d<c;d++)b+=a.end(d)-a.start(d);return b}function ma(){return la()<Ha}function na(a){Ha=Number.POSITIVE_INFINITY,Na=F,Ea=o.default.QUALITY_DEFAULT,Ka=Number.POSITIVE_INFINITY,Ja=0,Oa=null,Fa=!1,Qa=!1,Ra=!1,Ua=!1,Ga=0,Pa=0,Va=[],La&&(a||La.abort(),La.reset(),La=null),Xa=!1}function oa(a){qa.off(u.default.DATA_UPDATE_COMPLETED,Z,this),qa.off(u.default.QUALITY_CHANGE_REQUESTED,t,this),qa.off(u.default.INIT_FRAGMENT_LOADED,j,this),qa.off(u.default.MEDIA_FRAGMENT_LOADED,n,this),qa.off(u.default.STREAM_COMPLETED,$,this),qa.off(u.default.CURRENT_TRACK_CHANGED,_,this),qa.off(u.default.PLAYBACK_PROGRESS,B,this),qa.off(u.default.PLAYBACK_TIME_UPDATED,B,this),qa.off(u.default.PLAYBACK_RATE_CHANGED,ba,this),qa.off(u.default.PLAYBACK_SEEKING,v,this),qa.off(u.default.WALLCLOCK_TIME_UPDATED,aa,this),qa.off(u.default.SOURCEBUFFER_REMOVE_COMPLETED,X,this),na(a)}a=a||{};var pa=this.context,qa=(0,s.default)(pa).getInstance(),ra=a.metricsModel,sa=a.mediaPlayerModel,ta=a.errHandler,ua=a.streamController,va=a.mediaController,wa=a.adapter,xa=a.textController,ya=a.abrController,za=a.playbackController,Aa=a.type,Ba=a.streamProcessor,Ca=void 0,Da=void 0,Ea=void 0,Fa=void 0,Ga=void 0,Ha=void 0,Ia=void 0,Ja=void 0,Ka=void 0,La=void 0,Ma=void 0,Na=void 0,Oa=void 0,Pa=void 0,Qa=void 0,Ra=void 0,Sa=void 0,Ta=void 0,Ua=void 0,Va=void 0,Wa=void 0,Xa=void 0,Ya=void 0;return Ca={getBufferControllerType:c,initialize:d,createBuffer:e,dischargePreBuffer:f,getType:ca,getStreamProcessor:da,setSeekStartTime:ea,getBuffer:fa,getBufferLevel:ga,getRangeAt:L,setMediaSource:ha,getMediaSource:ia,getIsBufferingCompleted:ja,switchInitData:l,getIsPruningInProgress:ka,reset:oa},b(),Ca}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(113),i=d(h),j=a(93),k=d(j),l=a(92),m=d(l),n=a(99),o=d(n),p=a(105),q=d(p),r=a(45),s=d(r),t=a(49),u=d(t),v=a(145),w=d(v),x=a(46),y=d(x),z=a(44),A=d(z),B=a(151),C=d(B),D=a(182),E="bufferLoaded",F="bufferStalled",G=.5,H=.5,I=.01,J=22,K="BufferController";e.__dashjs_factory_name=K;var L=y.default.getClassFactory(e);L.BUFFER_LOADED=E,L.BUFFER_EMPTY=F,y.default.updateClassFactory(e.__dashjs_factory_name,L),c.default=L,b.exports=c.default},{105:105,113:113,145:145,151:151,182:182,44:44,45:45,46:46,49:49,92:92,93:93,97:97,99:99}],103:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){b()}function b(){G=!1,x={},y={},z={},A=null,B=100,C=B/1e3}function c(){if(!D||!E||!F)throw new Error("setConfig function has to be called previously")}function d(){null!==A&&G&&(clearInterval(A),A=null,G=!1)}function e(){c(),u("Start Event Controller"),G||isNaN(B)||(G=!0,A=setInterval(l,B))}function f(a){if(c(),x={},a)for(var b=0;b<a.length;b++){var d=a[b];x[d.id]=d,u("Add inline event with id "+d.id)}u("Added "+a.length+" inline events")}function g(a){c();for(var b=0;b<a.length;b++){var d=a[b];d.id in y?u("Repeated event with id "+d.id):(d.eventStream.schemeIdUri===r&&void 0===y[d.id]&&h(d),y[d.id]=d,u("Add inband event with id "+d.id))}}function h(a){if(a.eventStream.value==s){var b=a.eventStream.timescale||1,c=a.presentationTime/b,d=void 0;d=4294967295==a.presentationTime?NaN:(a.presentationTime+a.duration)/b,u("Manifest validity changed: Valid until: "+c+"; remaining duration: "+d),v.trigger(m.default.MANIFEST_VALIDITY_CHANGED,{id:a.id,validUntil:c,newDuration:d,newManifestValidAfter:NaN})}}function j(){if(z)for(var a=F.getTime(),b=Object.keys(z),c=0;c<b.length;c++){var d=b[c],e=z[d];null!==e&&(e.duration+e.presentationTime)/e.eventStream.timescale<a&&(u("Remove Event "+d+" at time "+a),e=null,delete z[d])}}function l(){o(y),o(x),j()}function n(){c(),E.refreshManifest()}function o(a){var b,c=F.getTime();if(a)for(var d=Object.keys(a),e=0;e<d.length;e++){var f=d[e],g=a[f];void 0!==g&&(0===(b=g.presentationTime/g.eventStream.timescale)||b<=c&&b+C>c)&&(u("Start Event "+f+" at "+c),g.duration>0&&(z[f]=g),g.eventStream.schemeIdUri==r&&g.eventStream.value==s?0===g.duration&&0===g.presentationTimeDelta||n():v.trigger(g.eventStream.schemeIdUri,{event:g}),delete a[f])}}function p(a){a&&(a.manifestModel&&(D=a.manifestModel),a.manifestUpdater&&(E=a.manifestUpdater),a.playbackController&&(F=a.playbackController))}function q(){d(),b()}var r="urn:mpeg:dash:event:2012",s=1,t=this.context,u=(0,i.default)(t).getInstance().log,v=(0,k.default)(t).getInstance(),w=void 0,x=void 0,y=void 0,z=void 0,A=void 0,B=void 0,C=void 0,D=void 0,E=void 0,F=void 0,G=void 0;return w={addInlineEvents:f,addInbandEvents:g,stop:d,start:e,setConfig:p,reset:q},a(),w}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(44),i=d(h),j=a(45),k=d(j),l=a(49),m=d(l);e.__dashjs_factory_name="EventController",c.default=g.default.getClassFactory(e),b.exports=c.default},{44:44,45:45,46:46,49:49}],104:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){e(),q.on(t.default.FRAGMENT_LOADING_COMPLETED,k,w),q.on(t.default.FRAGMENT_LOADING_PROGRESS,k,w)}function c(a){var b=y[a];return b||(b=(0,l.default)(m).create({metricsModel:v,fragmentLoader:(0,n.default)(m).create({metricsModel:v,mediaPlayerModel:u,errHandler:s,requestModifier:(0,p.default)(m).getInstance()})}),y[a]=b),b}function d(a){return a&&a.type&&a.type===h.HTTPRequest.INIT_SEGMENT_TYPE}function e(){for(var a in y)y[a].reset();y={}}function f(){q.off(t.default.FRAGMENT_LOADING_COMPLETED,k,this),q.off(t.default.FRAGMENT_LOADING_PROGRESS,k,this),e()}function i(a,b,c,d){var e=new j.default;return e.streamId=c,e.mediaInfo=b.mediaInfo,e.segmentType=b.type,e.start=b.startTime,e.duration=b.duration,e.end=e.start+e.duration,e.bytes=a,e.index=b.index,e.quality=b.quality,e.representationId=b.representationId,e.endFragment=d,e}function k(a){if(y[a.request.mediaType]===a.sender){var b=a.request,c=a.response,e=d(b),f=b.mediaInfo.streamInfo;if(a.error&&(a.request.mediaType!==g.default.AUDIO&&a.request.mediaType!==g.default.VIDEO&&a.request.mediaType!==g.default.FRAGMENTED_TEXT||q.trigger(t.default.SERVICE_LOCATION_BLACKLIST_ADD,{entry:a.request.serviceLocation})),!c||!f)return void o("No "+b.mediaType+" bytes to push or stream is inactive.");var h=i(c,b,f.id,a.type!==t.default.FRAGMENT_LOADING_PROGRESS);q.trigger(e?t.default.INIT_FRAGMENT_LOADED:t.default.MEDIA_FRAGMENT_LOADED,{chunk:h,fragmentModel:a.sender})}}a=a||{};var m=this.context,o=(0,x.default)(m).getInstance().log,q=(0,r.default)(m).getInstance(),s=a.errHandler,u=a.mediaPlayerModel,v=a.metricsModel,w=void 0,y=void 0;return w={getModel:c,isInitializationRequest:d,reset:f},b(),w}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(182),i=a(163),j=d(i),k=a(113),l=d(k),m=a(87),n=d(m),o=a(155),p=d(o),q=a(45),r=d(q),s=a(49),t=d(s),u=a(46),v=d(u),w=a(44),x=d(w);e.__dashjs_factory_name="FragmentController",c.default=v.default.getClassFactory(e),b.exports=c.default},{113:113,155:155,163:163,182:182,44:44,45:45,46:46,49:49,87:87,97:97}],105:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){z()}function b(a,b){var c=l(a),e=d(a,b),f=[];if(a===g.default.FRAGMENTED_TEXT)return void h(e[0]);c||(c=P.getSavedMediaSettings(a),j(a,c)),e&&0!==e.length&&(c&&e.forEach(function(a){B(c,a)&&f.push(a)}),h(0===f.length?E(e):f.length>1?E(f):f[0]))}function c(a){if(a){var b=a.type;if(w(b)){var c=a.streamInfo.id;K[c]||(K[c]=F());for(var d=K[c][b].list,f=0,g=d.length;f<g;++f)if(x(d[f],a))return;d.push(a);var i=l(b);i&&B(i,a)&&!e(b,a.streamInfo)&&h(a)}}}function d(a,b){if(!a||!b)return[];var c=b.id;return K[c]&&K[c][a]?K[c][a].list:[]}function e(a,b){return!a||!b||b&&!K[b.id]?null:K[b.id][a].current}function f(a){var b=a.type,c=a.streamInfo.id;return K[c]&&K[c][b]&&x(K[c][b].current,a)}function h(a){if(a){var b=a.type,c=a.streamInfo,d=c.id,f=e(b,c);if(K[d]&&K[d][b]&&(!f||!x(a,f))){K[d][b].current=a,f&&I.trigger(i.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:f,newMediaInfo:a,switchMode:N[b]});var g=A(a);g&&K[d][b].storeLastSettings&&(g.roles&&(g.role=g.roles[0],delete g.roles),g.accessibility&&(g.accessibility=g.accessibility[0]),g.audioChannelConfiguration&&(g.audioChannelConfiguration=g.audioChannelConfiguration[0]),P.setSavedMediaSettings(b,g))}}}function j(a,b){a&&b&&(L[a]=b)}function l(a){return a?L[a]:null}function m(a,b){if(-1===Q.indexOf(b))return void H("track switch mode is not supported: "+b);N[a]=b}function n(a){return N[a]}function u(a){if(-1===R.indexOf(a))return void H("track selection mode is not supported: "+a);M=a}function v(){return M||t}function w(a){return a===g.default.AUDIO||a===g.default.VIDEO||a===g.default.TEXT||a===g.default.FRAGMENTED_TEXT||a===g.default.IMAGE}function x(a,b){var c=a.id===b.id,d=a.viewpoint===b.viewpoint,e=a.lang===b.lang,f=a.roles.toString()===b.roles.toString(),g=a.accessibility.toString()===b.accessibility.toString(),h=a.audioChannelConfiguration.toString()===b.audioChannelConfiguration.toString();return c&&d&&e&&f&&g&&h}function y(a){a&&(a.errHandler&&(O=a.errHandler),a.domStorage&&(P=a.domStorage))}function z(){K={},D(),C()}function A(a){var b={lang:a.lang,viewpoint:a.viewpoint,roles:a.roles,accessibility:a.accessibility,audioChannelConfiguration:a.audioChannelConfiguration};return b.lang||b.viewpoint||b.role&&b.role.length>0||b.accessibility&&b.accessibility.length>0||b.audioChannelConfiguration&&b.audioChannelConfiguration.length>0?b:null}function B(a,b){var c=!a.lang||a.lang===b.lang,d=!a.viewpoint||a.viewpoint===b.viewpoint,e=!a.role||!!b.roles.filter(function(b){return b===a.role})[0],f=!a.accessibility||!!b.accessibility.filter(function(b){return b===a.accessibility})[0],g=!a.audioChannelConfiguration||!!b.audioChannelConfiguration.filter(function(b){return b===a.audioChannelConfiguration})[0];return c&&d&&e&&f&&g}function C(){N={audio:q,video:p}}function D(){L={audio:null,video:null}}function E(a){var b=v(),c=[],d=function(a){var b=0,c=[],d=void 0;return a.forEach(function(a){d=Math.max.apply(Math,a.bitrateList.map(function(a){return a.bandwidth})),d>b?(b=d,c=[a]):d===b&&c.push(a)}),c},e=function(a){var b=0,c=[],d=void 0;return a.forEach(function(a){d=a.representationCount,d>b?(b=d,c=[a]):d===b&&c.push(a)}),c};switch(b){case r:c=d(a),c.length>1&&(c=e(c));break;case s:c=e(a),c.length>1&&(c=d(a));break;default:H("track selection mode is not supported: "+b)}return c[0]}function F(){return{audio:{list:[],storeLastSettings:!0,current:null},video:{list:[],storeLastSettings:!0,current:null},text:{list:[],storeLastSettings:!0,current:null},fragmentedText:{list:[],storeLastSettings:!0,current:null},image:{list:[],storeLastSettings:!0,current:null}}}var G=this.context,H=(0,o.default)(G).getInstance().log,I=(0,k.default)(G).getInstance(),J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0,Q=[q,p],R=[r,s];return J={checkInitialMediaSettingsForType:b,addTrack:c,getTracksFor:d,getCurrentTrackFor:e,isCurrentTrack:f,setTrack:h,setInitialSettings:j,getInitialSettings:l,setSwitchMode:m,getSwitchMode:n,setSelectionModeForInitialTrack:u,getSelectionModeForInitialTrack:v,isMultiTrackSupportedByType:w,isTracksEqual:x,setConfig:y,reset:z},a(),J}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(49),i=d(h),j=a(45),k=d(j),l=a(46),m=d(l),n=a(44),o=d(n),p="neverReplace",q="alwaysReplace",r="highestBitrate",s="widestRange",t=r;e.__dashjs_factory_name="MediaController";var u=m.default.getSingletonFactory(e);u.TRACK_SWITCH_MODE_NEVER_REPLACE=p,u.TRACK_SWITCH_MODE_ALWAYS_REPLACE=q,u.TRACK_SELECTION_MODE_HIGHEST_BITRATE=r,u.TRACK_SELECTION_MODE_WIDEST_RANGE=s,u.DEFAULT_INIT_TRACK_SELECTION_MODE=t,m.default.updateSingletonFactory(e.__dashjs_factory_name,u),c.default=u,b.exports=c.default},{44:44,45:45,46:46,49:49,97:97}],106:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){var a="WebKitMediaSource"in window;return"MediaSource"in window?new MediaSource:a?new WebKitMediaSource:null}function b(a,b){var c=window.URL.createObjectURL(a);return b.setSource(c),c}function c(a){a.setSource(null)}function d(a,b){return a.duration!=b&&(a.duration=b),a.duration}function e(a,b,c){a&&"function"==typeof a.setLiveSeekableRange&&"function"==typeof a.clearLiveSeekableRange&&"open"===a.readyState&&b>=0&&b<c&&(a.clearLiveSeekableRange(),a.setLiveSeekableRange(b,c))}function f(a){var b=a.sourceBuffers,c=b.length;if("open"===a.readyState){for(var d=0;d<c;d++){if(b[d].updating)return;if(0===b[d].buffered.length)return}a.endOfStream()}}return{createMediaSource:a,attachMediaSource:b,detachMediaSource:c,setDuration:d,setSeekable:e,signalEndOfStream:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="MediaSourceController",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{46:46}],107:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){B()}function b(a){ta=a,aa(),ua=ta.manifestInfo.isDynamic,oa=ta.start,ea.on(o.default.DATA_UPDATE_COMPLETED,J,this),ea.on(o.default.BYTES_APPENDED_END_FRAGMENT,$,this),ea.on(o.default.BUFFER_LEVEL_STATE_CHANGED,_,this),ea.on(o.default.PERIOD_SWITCH_STARTED,c,this),wa&&(wa=!1,e())}function c(a){!ua&&a.fromStreamInfo&&void 0!==qa[a.fromStreamInfo.id]&&(delete sa[a.fromStreamInfo.id],delete qa[a.fromStreamInfo.id])}function d(){var a=E(!0),b=ua?a-ta.start:0;return parseFloat((a+(ta.duration-b)-n()).toFixed(5))}function e(){ta&&ma&&ma.getElement()?ma.play():wa=!0}function f(){return ta&&ma?ma.isPaused():null}function h(){ta&&ma&&ma.pause()}function j(){return ta&&ma?ma.isSeeking():null}function l(a){ta&&ma&&(ea.trigger(o.default.PLAYBACK_SEEK_ASKED),da("Requesting seek to time: "+a),ma.setCurrentTime(a))}function n(){return ta&&ma?ma.getTime():null}function p(){return ta&&ma?ma.getPlaybackRate():null}function q(){return ta&&ma?ma.getPlayedRanges():null}function r(){return ta&&ma?ma.getEnded():null}function u(){return ua}function v(){return ga}function w(a){oa=a}function x(){return oa}function y(a,b){var c=ka.getMpd(ja.getValue()),d=void 0,e=void 0;if(d=va.getUseSuggestedPresentationDelay()&&c.hasOwnProperty(g.default.SUGGESTED_PRESENTATION_DELAY)?c.suggestedPresentationDelay:va.getLowLatencyEnabled()?0:va.getLiveDelay()?va.getLiveDelay():isNaN(a)?2*ta.manifestInfo.minBufferTime:a*va.getLiveDelayFragmentCount(),c.availabilityStartTime&&(ya=c.availabilityStartTime.getTime()),b>0){var f=Math.max(b-10,b/2);e=Math.min(d,f)}else e=d;return ra=e,e}function z(){return ra}function A(){if(!ua||isNaN(ya))return NaN;var a=n();return isNaN(a)||0===a?0:(Math.round((new Date).getTime()-(1e3*a+ya))/1e3).toFixed(3)}function B(){na=0,oa=NaN,pa=null,wa=!1,qa={},ra=0,ya=0,sa={},ma&&(ea.off(o.default.DATA_UPDATE_COMPLETED,J,this),ea.off(o.default.BUFFER_LEVEL_STATE_CHANGED,_,this),ea.off(o.default.BYTES_APPENDED_END_FRAGMENT,$,this),ea.off(o.default.PERIOD_SWITCH_STARTED,c,this),H(),ba()),ma=null,ta=null,ua=null}function C(a){a&&(a.streamController&&(ga=a.streamController),a.metricsModel&&(ha=a.metricsModel),a.dashMetrics&&(ia=a.dashMetrics),a.manifestModel&&(ja=a.manifestModel),a.dashManifestModel&&(ka=a.dashManifestModel),a.mediaPlayerModel&&(va=a.mediaPlayerModel),a.adapter&&(la=a.adapter),a.videoModel&&(ma=a.videoModel))}function D(){var a=(0,k.default)(ca).getInstance().getURIFragmentData(),b=void 0;if(a){b={};var c=parseInt(a.r,10);c>=0&&ta&&c<ta.manifestInfo.DVRWindowSize&&null===a.t&&(a.t=Math.floor(Date.now()/1e3)-ta.manifestInfo.DVRWindowSize+c),b.fragS=parseInt(a.s,10),b.fragT=parseInt(a.t,10)}return b}function E(a,b){var c=void 0,d=NaN,e=D();if(d=e?a?ta.start:isNaN(e.fragS)?e.fragT:e.fragS:0,ua)isNaN(d)||((c=d-ta.manifestInfo.availableFrom.getTime()/1e3)>oa||c<(isNaN(b)?NaN:b-ta.manifestInfo.DVRWindowSize))&&(c=null),c=c||oa;else if(!isNaN(d)&&d<Math.max(ta.manifestInfo.duration,ta.duration)&&d>=0)c=d;else{var f=qa[ta.id];c=void 0!==f?Math.max(void 0!==f.audio?f.audio:0,void 0!==f.video?f.video:0,ta.start):ta.start}return c}function F(a){var b=ha.getReadOnlyMetricsFor(g.default.VIDEO)||ha.getReadOnlyMetricsFor(g.default.AUDIO),c=ia.getCurrentDVRInfo(b),d=c?c.range:null,e=void 0;if(!d)return NaN;if(a>d.end)e=Math.max(d.end-2*ta.manifestInfo.minBufferTime,d.start);else{if(!(a+.25<d.start))return a;e=d.start}return e}function G(){if(null===pa){var a=function(){Y()};pa=setInterval(a,va.getWallclockTimeUpdateInterval())}}function H(){clearInterval(pa),pa=null}function I(){if(!f()&&ua&&0!==ma.getReadyState()){var a=n(),b=F(a);!isNaN(b)&&b!==a&&l(b)}}function J(a){if(!a.error){var b=la.convertDataToRepresentationInfo(a.currentRepresentation),c=b.mediaInfo.streamInfo;ta.id===c.id&&(ta=c,I())}}function K(){ea.trigger(o.default.CAN_PLAY)}function L(){da("Native video element event: play"),I(),G(),ea.trigger(o.default.PLAYBACK_STARTED,{startTime:n()})}function M(){da("Native video element event: waiting"),ea.trigger(o.default.PLAYBACK_WAITING,{playingTime:n()})}function N(){da("Native video element event: playing"),ea.trigger(o.default.PLAYBACK_PLAYING,{playingTime:n()})}function O(){da("Native video element event: pause"),ea.trigger(o.default.PLAYBACK_PAUSED,{ended:r()})}function P(){var a=n();da("Seeking to: "+a),G(),ea.trigger(o.default.PLAYBACK_SEEKING,{seekTime:a})}function Q(){da("Native video element event: seeked"),ea.trigger(o.default.PLAYBACK_SEEKED)}function R(){var a=n();na=a,ea.trigger(o.default.PLAYBACK_TIME_UPDATED,{timeToEnd:d(),time:a})}function S(){var a=Date.now();(!xa||a>xa+t)&&(xa=a,R())}function T(){ea.trigger(o.default.PLAYBACK_PROGRESS)}function U(){var a=p();da("Native video element event: ratechange: ",a),ea.trigger(o.default.PLAYBACK_RATE_CHANGED,{playbackRate:a})}function V(){da("Native video element event: loadedmetadata"),ea.trigger(o.default.PLAYBACK_METADATA_LOADED),G()}function W(){da("Native video element event: ended"),h(),H(),ea.trigger(o.default.PLAYBACK_ENDED)}function X(a){var b=a.target||a.srcElement;ea.trigger(o.default.PLAYBACK_ERROR,{error:b.error})}function Y(){ea.trigger(o.default.WALLCLOCK_TIME_UPDATED,{isDynamic:ua,time:new Date}),u()&&f()&&S()}function Z(a,b){if(b&&b.length>0)for(var c=0,d=b.length;c<d;c++)if(a>=b.start(c)&&a<b.end(c))return!0;return!1}function $(a){var b=void 0,c=void 0,d=a.bufferedRanges;if(d&&d.length&&(!qa[ta.id]||!0!==qa[ta.id].started)){var e=a.sender.getType();void 0===sa[ta.id]&&(sa[ta.id]=[]),sa[ta.id][e]=d,void 0===qa[ta.id]&&(qa[ta.id]=[],qa[ta.id].started=!1),void 0===qa[ta.id][e]&&(qa[ta.id][e]=Math.max(d.start(0),ta.start));var f=ga.isVideoTrackPresent(),g=ga.isAudioTrackPresent();c=E(!1),g&&f?isNaN(qa[ta.id].audio)||isNaN(qa[ta.id].video)||(qa[ta.id].audio<qa[ta.id].video?(b=qa[ta.id].video>c?qa[ta.id].video:c,d=sa[ta.id].audio):(b=qa[ta.id].audio>c?qa[ta.id].audio:c,d=sa[ta.id].video),Z(b,d)&&(j()||l(b),qa[ta.id].started=!0)):qa[ta.id][e]&&(b=qa[ta.id][e]>c?qa[ta.id][e]:c,j()||l(b),qa[ta.id].started=!0)}}function _(a){a.streamInfo.id===ta.id&&ma.setStallState(a.mediaType,a.state===i.default.BUFFER_EMPTY)}function aa(){ma.addEventListener("canplay",K),ma.addEventListener("play",L),ma.addEventListener("waiting",M),
|
24 |
-
ma.addEventListener("playing",N),ma.addEventListener("pause",O),ma.addEventListener("error",X),ma.addEventListener("seeking",P),ma.addEventListener("seeked",Q),ma.addEventListener("timeupdate",R),ma.addEventListener("progress",T),ma.addEventListener("ratechange",U),ma.addEventListener("loadedmetadata",V),ma.addEventListener("ended",W)}function ba(){ma.removeEventListener("canplay",K),ma.removeEventListener("play",L),ma.removeEventListener("waiting",M),ma.removeEventListener("playing",N),ma.removeEventListener("pause",O),ma.removeEventListener("error",X),ma.removeEventListener("seeking",P),ma.removeEventListener("seeked",Q),ma.removeEventListener("timeupdate",R),ma.removeEventListener("progress",T),ma.removeEventListener("ratechange",U),ma.removeEventListener("loadedmetadata",V),ma.removeEventListener("ended",W)}var ca=this.context,da=(0,s.default)(ca).getInstance().log,ea=(0,m.default)(ca).getInstance(),fa=void 0,ga=void 0,ha=void 0,ia=void 0,ja=void 0,ka=void 0,la=void 0,ma=void 0,na=void 0,oa=void 0,pa=void 0,qa=void 0,ra=void 0,sa=void 0,ta=void 0,ua=void 0,va=void 0,wa=void 0,xa=void 0,ya=void 0;return fa={initialize:b,setConfig:C,getStartTimeFromUriParameters:D,getStreamStartTime:E,getTimeToStreamEnd:d,getTime:n,getPlaybackRate:p,getPlayedRanges:q,getEnded:r,getIsDynamic:u,getStreamController:v,setLiveStartTime:w,getLiveStartTime:x,computeLiveDelay:y,getLiveDelay:z,getCurrentLiveLatency:A,play:e,isPaused:f,pause:h,isSeeking:j,seek:l,reset:B},a(),fa}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(102),i=d(h),j=a(117),k=d(j),l=a(45),m=d(l),n=a(49),o=d(n),p=a(46),q=d(p),r=a(44),s=d(r),t=500;e.__dashjs_factory_name="PlaybackController",c.default=q.default.getSingletonFactory(e),b.exports=c.default},{102:102,117:117,44:44,45:45,46:46,49:49,97:97}],108:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){ta=(0,z.default)(da).getInstance().log.bind(sa),ba()}function c(){ua=qa.getFragmentModel(),Ha=ka.getScheduleWhilePaused(),Fa=(0,n.default)(da).create({abrController:la,dashMetrics:ha,metricsModel:fa,mediaPlayerModel:ka,textController:oa}),Ga=(0,p.default)(da).create({adapter:ga,textController:oa}),ia.getIsTextTrack(pa)&&ea.on(v.default.TIMED_TEXT_REQUESTED,P,this),ea.on(v.default.QUALITY_CHANGE_REQUESTED,y,this),ea.on(v.default.DATA_UPDATE_STARTED,K,this),ea.on(v.default.DATA_UPDATE_COMPLETED,C,this),ea.on(v.default.FRAGMENT_LOADING_COMPLETED,G,this),ea.on(v.default.STREAM_COMPLETED,F,this),ea.on(v.default.STREAM_INITIALIZED,D,this),ea.on(v.default.BUFFER_LEVEL_STATE_CHANGED,M,this),ea.on(v.default.BUFFER_CLEARED,L,this),ea.on(v.default.BYTES_APPENDED_END_FRAGMENT,I,this),ea.on(v.default.INIT_REQUESTED,q,this),ea.on(v.default.QUOTA_EXCEEDED,N,this),ea.on(v.default.PLAYBACK_SEEKING,R,this),ea.on(v.default.PLAYBACK_STARTED,Q,this),ea.on(v.default.PLAYBACK_RATE_CHANGED,S,this),ea.on(v.default.PLAYBACK_TIME_UPDATED,H,this),ea.on(v.default.URL_RESOLUTION_FAILED,O,this),ea.on(v.default.FRAGMENT_LOADING_ABANDONED,J,this)}function d(){return!1===xa}function e(){if(!va||qa.isBufferingCompleted())return void ta("[ScheduleController][",pa,"] start denied");ta("[ScheduleController][",pa,"] start"),aa(),xa=!1,wa&&(wa=!1),o(0)}function f(){xa||(ta("[ScheduleController][",pa,"] stop"),xa=!0,clearTimeout(Da))}function i(a,b){Ja[b]=Ja[b]||{};var c=la.getTopQualityIndexFor(a,b);return Ja[b][a]!=c&&(ta("Top quality "+a+" index has changed from "+Ja[b][a]+" to "+c),Ja[b][a]=c,!0)}function k(){if(xa||Ba||!qa.getBufferController()||ma.isPaused()&&!Ha)return void ta("[ScheduleController][",pa,"] - schedule stop!");m();var a=La.length>0,b=qa.getStreamInfo();if(Na||isNaN(Ka)||Ma||a||i(va.mediaInfo.type,b.id)||Fa.execute(qa,pa,na.isVideoTrackPresent())){var c=function(){var a=qa.getFragmentController();if(va.quality!==Ka)ta("ScheduleController - "+pa+" - quality has changed, get init request for representationid = "+va.id),Ka=va.quality,qa.switchInitData(va.id);else if(Ma)ta("ScheduleController - "+pa+" - switch track has been asked, get init request for "+pa+" with representationid = "+va.id),Na=ra.getSwitchMode(pa)===B.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,qa.switchInitData(va.id,Na),Ka=va.quality,Ma=!1;else{var c=La.shift();if(a.isInitializationRequest(c))qa.switchInitData(c.representationId);else{var d=void 0;qa.getBufferController().getIsPruningInProgress()||!(d=Ga.execute(qa,c))&&b.manifestInfo&&b.manifestInfo.isDynamic&&ta("getNextFragment - "+pa+" - Playing at the bleeding live edge and frag is not available yet"),d?(ta("ScheduleController - "+pa+" - getNextFragment - request is "+d.url),ua.executeRequest(d)):(s(!1),o(500))}}};s(!0),a||Ma||la.checkPlaybackQuality(pa),c()}else o(500)}function m(){var a=1.5*va.fragmentDuration,b=ua.getRequests({state:r.default.FRAGMENT_MODEL_EXECUTED,time:ma.getTime()+a,threshold:0})[0];if(b&&-1===La.indexOf(b)&&!ia.getIsTextTrack(pa)){var c=ka.getFastSwitchEnabled(),d=qa.getBufferLevel(),e=la.getAbandonmentStateFor(pa),f=!ra.isCurrentTrack(b.mediaInfo)&&ra.getSwitchMode(b.mediaInfo.type)===B.default.TRACK_SWITCH_MODE_NEVER_REPLACE,g=b.quality<va.quality;c&&(f||g)&&d>=a&&e!==j.default.ABANDON_LOAD?(x(b),ta("Reloading outdated fragment at index: ",b.index)):b.quality>va.quality&&U(ma.getTime()+qa.getBufferLevel())}}function o(a){clearTimeout(Da),Da=setTimeout(k,a)}function q(a){a.sender&&a.sender.getStreamProcessor()===qa&&u(va.quality)}function s(a){Ba!==a?Ba=a:ta("[ScheduleController][",pa,"] isFragmentProcessingInProgress is already equal to",a)}function u(a){var b=ga.getInitRequest(qa,a);b&&(s(!0),ua.executeRequest(b))}function w(){Ma=!0}function x(a){La.push(a)}function y(a){if(pa===a.mediaType&&qa.getStreamInfo().id===a.streamInfo.id){if(null===(va=qa.getRepresentationInfoForQuality(a.newQuality))||void 0===va)throw new Error("Unexpected error! - currentRepresentationInfo is null or undefined");_(new Date,h.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON),aa()}}function A(a){if(ma&&ua){var b=ua.getRequests({state:r.default.FRAGMENT_MODEL_EXECUTED,time:ma.getTime(),threshold:0})[0];b&&ma.getTime()>=b.startTime&&((!Ia.mediaInfo||b.mediaInfo.type===Ia.mediaInfo.type&&b.mediaInfo.id!==Ia.mediaInfo.id)&&a&&ea.trigger(v.default.TRACK_CHANGE_RENDERED,{mediaType:pa,oldMediaInfo:Ia.mediaInfo,newMediaInfo:b.mediaInfo}),b.quality===Ia.quality&&b.adaptationIndex===Ia.adaptationIndex||!a||ea.trigger(v.default.QUALITY_CHANGE_RENDERED,{mediaType:pa,oldQuality:Ia.quality,newQuality:b.quality}),Ia={mediaInfo:b.mediaInfo,quality:b.quality,adaptationIndex:b.adaptationIndex})}}function C(a){a.error||a.sender.getStreamProcessor()!==qa||(va=ga.convertDataToRepresentationInfo(a.currentRepresentation))}function D(a){a.error||qa.getStreamInfo().id!==a.streamInfo.id||(va=qa.getCurrentRepresentationInfo(),wa&&(ma.getIsDynamic()?(ja.setTimeSyncCompleted(!0),E()):(Ea=ma.getStreamStartTime(!1),qa.getBufferController().setSeekStartTime(Ea))),xa&&e())}function E(){var a=qa.getLiveEdgeFinder();if(a){var b=a.getLiveEdge(),c=va.mediaInfo.streamInfo.manifestInfo.DVRWindowSize/2,d=b-ma.computeLiveDelay(va.fragmentDuration,c),e=ga.getFragmentRequestForTime(qa,va,d,{ignoreIsFinished:!0});if(ka.getLowLatencyEnabled()){var f=e.duration<ka.getLiveDelay()?e.startTime:e.startTime+e.duration-ka.getLiveDelay();ma.setLiveStartTime(f)}else ma.setLiveStartTime(e.startTime);Ea=ma.getStreamStartTime(!1,b),Ea>va.mediaInfo.streamInfo.start+va.mediaInfo.streamInfo.duration&&ma.seek(Ea);var h=ha.getCurrentManifestUpdate(fa.getMetricsFor(g.default.STREAM));fa.updateManifestUpdateInfo(h,{currentTime:Ea,presentationStartTime:b,latency:b-Ea,clientTimeOffset:ja.getClientTimeOffset()})}}function F(a){a.fragmentModel===ua&&(f(),s(!1),ta("[ScheduleController] Stream is complete"))}function G(a){a.sender===ua&&(ta("[ScheduleController][",pa,"] - onFragmentLoadingCompleted"),ia.getIsTextTrack(pa)&&s(!1),a.error&&a.request.serviceLocation&&!xa&&(x(a.request),s(!1),o(0)),Na&&(Oa=a.request))}function H(){A(!0)}function I(a){a.sender.getStreamProcessor()===qa&&(Na&&!isNaN(a.startTime)&&(Na=!1,ua.addExecutedRequest(Oa)),s(!1),o(0))}function J(a){a.streamProcessor===qa&&(ta("[ScheduleController][onFragmentLoadingAbandoned] for "+pa+", request: "+a.request.url+" has been aborted"),ma.isSeeking()||Ma||(ta("[ScheduleController][onFragmentLoadingAbandoned] for "+pa+", request: "+a.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),x(a.request)),s(!1),o(0))}function K(a){a.sender.getStreamProcessor()===qa&&f()}function L(a){a.sender.getStreamProcessor()===qa&&(a.unintended?qa.getFragmentModel().removeExecutedRequestsAfterTime(a.from,qa.getStreamInfo().duration):qa.getFragmentModel().syncExecutedRequestsWithBufferedRange(qa.getBufferController().getBuffer().getAllBufferRanges(),qa.getStreamInfo().duration),a.hasEnoughSpaceToAppend&&xa&&e())}function M(a){a.sender.getStreamProcessor()!==qa||a.state!==l.default.BUFFER_EMPTY||ma.isSeeking()||(ta("[ScheduleController][",pa,"] - Buffer is empty! Stalling!"),_(new Date,h.PlayListTrace.REBUFFERING_REASON))}function N(a){a.sender.getStreamProcessor()===qa&&(f(),s(!1))}function O(){ua.abortRequests(),f()}function P(a){a.sender.getStreamProcessor()===qa&&u(a.index)}function Q(){!xa&&Ha||e()}function R(a){Ea=a.seekTime,V(0),xa&&e();var b=ha.getCurrentManifestUpdate(fa.getMetricsFor(g.default.STREAM)),c=va.DVRWindow&&ma?va.DVRWindow.end-ma.getTime():NaN;fa.updateManifestUpdateInfo(b,{latency:c}),Ba?(ta("[ScheduleController][onPlaybackSeeking] for "+pa+", call fragmentModel.abortRequests in order to seek quicker"),ua.abortRequests()):o(0)}function S(a){za&&(za.playbackspeed=a.playbackRate.toString())}function T(){return Ea}function U(a){Ea=a}function V(a){Ca=a}function W(){return Ca}function X(){return Fa.getBufferTarget(qa,pa,na.isVideoTrackPresent())}function Y(){return pa}function Z(a){ya=a}function $(a,b){_(a,b),ya=null}function _(a,b){if(ya&&!1===Aa){var c=za.start,d=a.getTime()-c.getTime();za.duration=d,za.stopreason=b,ya.trace.push(za),Aa=!0}}function aa(){ya&&!0===Aa&&va&&(Aa=!1,za=new h.PlayListTrace,za.representationid=va.id,za.start=new Date,za.mstart=1e3*ma.getTime(),za.playbackspeed=ma.getPlaybackRate().toString())}function ba(){Ba=!1,Ca=0,Ea=NaN,ya=null,za=null,Aa=!0,wa=!0,Ka=NaN,Ia={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},Ja={},La=[],xa=!0,Ma=!1,Na=!1,Oa=null}function ca(){ea.off(v.default.DATA_UPDATE_STARTED,K,this),ea.off(v.default.DATA_UPDATE_COMPLETED,C,this),ea.off(v.default.BUFFER_LEVEL_STATE_CHANGED,M,this),ea.off(v.default.QUALITY_CHANGE_REQUESTED,y,this),ea.off(v.default.FRAGMENT_LOADING_COMPLETED,G,this),ea.off(v.default.STREAM_COMPLETED,F,this),ea.off(v.default.STREAM_INITIALIZED,D,this),ea.off(v.default.QUOTA_EXCEEDED,N,this),ea.off(v.default.BYTES_APPENDED_END_FRAGMENT,I,this),ea.off(v.default.BUFFER_CLEARED,L,this),ea.off(v.default.INIT_REQUESTED,q,this),ea.off(v.default.PLAYBACK_RATE_CHANGED,S,this),ea.off(v.default.PLAYBACK_SEEKING,R,this),ea.off(v.default.PLAYBACK_STARTED,Q,this),ea.off(v.default.PLAYBACK_TIME_UPDATED,H,this),ea.off(v.default.URL_RESOLUTION_FAILED,O,this),ea.off(v.default.FRAGMENT_LOADING_ABANDONED,J,this),ia.getIsTextTrack(pa)&&ea.off(v.default.TIMED_TEXT_REQUESTED,P,this),f(),A(!1),ba()}a=a||{};var da=this.context,ea=(0,t.default)(da).getInstance(),fa=a.metricsModel,ga=a.adapter,ha=a.dashMetrics,ia=a.dashManifestModel,ja=a.timelineConverter,ka=a.mediaPlayerModel,la=a.abrController,ma=a.playbackController,na=a.streamController,oa=a.textController,pa=a.type,qa=a.streamProcessor,ra=a.mediaController,sa=void 0,ta=void 0,ua=void 0,va=void 0,wa=void 0,xa=void 0,ya=void 0,za=void 0,Aa=void 0,Ba=void 0,Ca=void 0,Da=void 0,Ea=void 0,Fa=void 0,Ga=void 0,Ha=void 0,Ia=void 0,Ja=void 0,Ka=void 0,La=void 0,Ma=void 0,Na=void 0,Oa=void 0;return sa={initialize:c,getType:Y,getSeekTarget:T,setSeekTarget:U,setTimeToLoadDelay:V,getTimeToLoadDelay:W,replaceRequest:x,switchTrackAsked:w,isStarted:d,start:e,stop:f,reset:ca,setPlayList:Z,getBufferTarget:X,finalisePlayList:$},b(),sa}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(184),i=a(99),j=d(i),k=a(102),l=d(k),m=a(134),n=d(m),o=a(135),p=d(o),q=a(113),r=d(q),s=a(45),t=d(s),u=a(49),v=d(u),w=a(46),x=d(w),y=a(44),z=d(y),A=a(105),B=d(A);e.__dashjs_factory_name="ScheduleController",c.default=x.default.getClassFactory(e),b.exports=c.default},{102:102,105:105,113:113,134:134,135:135,184:184,44:44,45:45,46:46,49:49,97:97,99:99}],109:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){ta=(0,F.default)(ga).getInstance(),ua=(0,H.default)(ga).getInstance(),sa=(0,J.default)(ga).getInstance(),za=(0,z.default)(ga).getInstance(),Aa=(0,B.default)(ga).getInstance(),ca()}function b(a,b){X(),Ha=a,Ga=b,Ca.initialize(),la=(0,m.default)(ga).create(),la.setConfig({manifestModel:na,dashManifestModel:oa,mediaPlayerModel:Oa,manifestLoader:ma,errHandler:Ba}),la.initialize(),ua.setConfig({dashManifestModel:oa}),ia.on(q.default.TIME_SYNCHRONIZATION_COMPLETED,N,this),ia.on(q.default.PLAYBACK_SEEKING,f,this),ia.on(q.default.PLAYBACK_TIME_UPDATED,c,this),ia.on(q.default.PLAYBACK_ENDED,w,this),ia.on(q.default.PLAYBACK_ERROR,U,this),ia.on(q.default.PLAYBACK_STARTED,h,this),ia.on(q.default.PLAYBACK_PAUSED,j,this),ia.on(q.default.MANIFEST_UPDATED,O,this),ia.on(q.default.STREAM_BUFFERING_COMPLETED,p,this),ia.on(q.default.MANIFEST_VALIDITY_CHANGED,_,this),ia.on(q.default.WALLCLOCK_TIME_UPDATED,d,this),ia.on(D.default.METRIC_ADDED,ea,this)}function c(){if(Q()){var a=Ma.getPlaybackQuality();a&&qa.addDroppedFrames(g.default.VIDEO,a)}}function d(){if(!(!Oa.getJumpGaps()||!Ea||0===Ea.getProcessors().length||Na.isSeeking()||Pa||Ia||Ja||Ka)&&++Wa>=fa){var a=Na.getTime();Xa===a?e(a):Xa=a,Wa=0}}function e(a){for(var b=Ea.getProcessors(),c=Oa.getSmallGapLimit(),d=void 0,e=0;e<b.length;e++){var f=b[e].getBuffer(),g=f.getAllBufferRanges(),h=void 0;if(g&&!(g.length<=1)){for(var i=0;i<g.length;i++)if(a<g.start(i)){h=g.start(i);break}if(h>0){var j=h-a;j>0&&j<=c&&(void 0===d||h>d)&&(d=h)}}}var k=Na.getTimeToStreamEnd();void 0===d&&!isNaN(k)&&k<c&&(d=a+k),d>0&&(!isNaN(k)&&d>=a+k?(ha("Jumping media gap (discontinuity) at time ",a,". Jumping to end of the stream"),ia.trigger(q.default.PLAYBACK_ENDED)):(ha("Jumping media gap (discontinuity) at time ",a,". Jumping to time position",d),Na.seek(d)))}function f(a){var b=r(a.seekTime);Va&&(l(),Ua=!1),b&&b!==Ea?(S(v.PlayListTrace.END_OF_PERIOD_STOP_REASON),A(Ea,b,a.seekTime)):S(v.PlayListTrace.USER_REQUEST_STOP_REASON),T(v.PlayList.SEEK_START_REASON)}function h(){ha("[StreamController][onPlaybackStarted]"),Qa?(Qa=!1,T(v.PlayList.INITIAL_PLAYOUT_START_REASON)):Pa&&(Pa=!1,T(v.PlayList.RESUME_FROM_PAUSE_START_REASON),n())}function j(a){ha("[StreamController][onPlaybackPaused]"),a.ended||(Pa=!0,S(v.PlayListTrace.USER_REQUEST_STOP_REASON),n())}function l(){ha("[StreamController][toggleEndPeriodTimer] stop end period timer."),clearTimeout(Va),Va=void 0}function n(){if(Ua)if(Va)l();else{var a=Na.getTimeToStreamEnd(),b=a>0?1e3*a:0;ha("[StreamController][toggleEndPeriodTimer] start-up of timer to notify PLAYBACK_ENDED event. It will be triggered in "+b+" milliseconds"),Va=setTimeout(function(){ia.trigger(q.default.PLAYBACK_ENDED)},b)}}function p(){var a=V().isLast;La&&a?(ha("[StreamController][onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),sa.signalEndOfStream(La)):La&&void 0===Va&&(ha("[StreamController][onStreamBufferingCompleted] end of period detected"),Ua=!0,!1===Pa&&n())}function r(a){var b=0,c=null,d=Da.length;d>0&&(b+=Da[0].getStartTime());for(var e=0;e<d;e++)if(c=Da[e],b=parseFloat((b+c.getDuration()).toFixed(5)),a<b)return c;return null}function t(a,b){for(var c=null,d=0,e=0,f=null,g=Da.length,h=0;h<g;h++){if(c=Da[h],e=c.getStartTime(),f=c.getDuration(),Number.isFinite(e)&&(d=e),c.getId()===b)return a-d;Number.isFinite(f)&&(d+=f)}return null}function u(){return Ea?Ea.getProcessors():[]}function w(){var a=y();a?(Ta=void 0,Sa=void 0,A(Ea,a,NaN)):ha("StreamController no next stream found"),S(a?v.PlayListTrace.END_OF_PERIOD_STOP_REASON:v.PlayListTrace.END_OF_CONTENT_STOP_REASON),Va=void 0,Ua=!1}function y(){if(Ea){var a=function(){var a=Ea.getStreamInfo().start,b=Ea.getStreamInfo().duration;return{v:Da.filter(function(c){return c.getStreamInfo().start===parseFloat((a+b).toFixed(5))})[0]}}();if("object"==typeof a)return a.v}}function A(a,b,c){!Ia&&b&&a!==b&&(Ia=!0,ia.trigger(q.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:a?a.getStreamInfo():null,toStreamInfo:b.getStreamInfo()}),a&&(a.stopEventController(),a.deactivate()),Ea=b,Na.initialize(Ea.getStreamInfo()),Ma.getElement()?G(c,a,!1):C(c))}function C(a){I(a)}function E(a){Na.initialize(Ea.getStreamInfo()),G(a,null,!0)}function G(a,b,c){function d(){La&&(ha("MediaSource is open!"),window.URL.revokeObjectURL(e),La.removeEventListener("sourceopen",d),La.removeEventListener("webkitsourceopen",d),K(),b||ia.trigger(q.default.SOURCE_INITIALIZED),c?Ea.setMediaSource(La):I(a))}var e=void 0;La?sa.detachMediaSource(Ma):La=sa.createMediaSource(),La.addEventListener("sourceopen",d,!1),La.addEventListener("webkitsourceopen",d,!1),e=sa.attachMediaSource(La,Ma),ha("MediaSource attached to element. Waiting on open...")}function I(a){Ea.activate(La),Ta=R(g.default.AUDIO),Sa=R(g.default.VIDEO),Qa||(isNaN(a)?function(){var a=Na.getStreamStartTime(!0);Ea.getProcessors().forEach(function(b){pa.setIndexHandlerTime(b,a)})}():Na.seek(a)),Ea.startEventController(),!Ha&&Qa||Na.play(),Ia=!1,ia.trigger(q.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Ea.getStreamInfo()})}function K(){var a=Ea.getStreamInfo().manifestInfo.duration,b=sa.setDuration(La,a);ha("Duration successfully set to: "+b)}function L(a){for(var b=0,c=Da.length;b<c;b++)if(Da[b].getId()===a.id)return Da[b];return null}function M(){try{var a=pa.getStreamsInfo();if(0===a.length)throw new Error("There are no streams");var b=ra.getCurrentManifestUpdate(qa.getMetricsFor(g.default.STREAM));qa.updateManifestUpdateInfo(b,{currentTime:Na.getTime(),buffered:Ma.getBufferRange(),presentationStartTime:a[0].start,clientTimeOffset:Ca.getClientTimeOffset()});for(var c=0,d=a.length;c<d;c++){var e=a[c],f=L(e);f?f.updateData(e):(f=(0,k.default)(ga).create({manifestModel:na,dashManifestModel:oa,mediaPlayerModel:Oa,metricsModel:qa,dashMetrics:ra,manifestUpdater:la,adapter:pa,timelineConverter:Ca,capabilities:ka,errHandler:Ba,baseURLController:ua,domStorage:va,abrController:wa,playbackController:Na,mediaController:xa,textController:ya,videoModel:Ma,streamController:ja}),Da.push(f),f.initialize(e,Fa)),qa.addManifestUpdateStreamInfo(b,e.id,e.index,e.start,e.duration)}if(!Ea){var h=Na.getStartTimeFromUriParameters(),i=null;if(h){i=r(isNaN(h.fragS)?h.fragT:h.fragS)}A(null,null!==i?i:Da[0],NaN)}ia.trigger(q.default.STREAMS_COMPOSED)}catch(j){Ba.manifestError(j.message,"nostreamscomposed",na.getValue()),Ka=!0,da()}}function N(){var a=na.getValue();Fa&&(ia.trigger(q.default.PROTECTION_CREATED,{controller:Fa,manifest:a}),Fa.setMediaElement(Ma.getElement()),Ga&&Fa.setProtectionData(Ga)),M()}function O(a){a.error?(Ka=!0,da()):function(){var b=a.manifest;pa.updatePeriods(b);var c=pa.getStreamsInfo(void 0,1)[0],d=pa.getMediaInfoForType(c,g.default.VIDEO)||pa.getMediaInfoForType(c,g.default.AUDIO),e=void 0;d&&(e=oa.getUseCalculatedLiveEdgeTimeForAdaptation(pa.getDataForMedia(d)))&&(ha("SegmentTimeline detected using calculated Live Edge Time"),Oa.setUseManifestDateHeaderTimeSource(!1));var f=oa.getUTCTimingSources(a.manifest),h=!oa.getIsDynamic(b)||e?f:f.concat(Oa.getUTCTimingSources()),i=Aa.isHTTPS(a.manifest.url);h.forEach(function(a){a.value.replace(/.*?:\/\//g,"")===s.default.DEFAULT_UTC_TIMING_SOURCE.value.replace(/.*?:\/\//g,"")&&(a.value=a.value.replace(i?new RegExp(/^(http:)?\/\//i):new RegExp(/^(https:)?\/\//i),i?"https://":"http://"),ha("Matching default timing source protocol to manifest protocol: ",a.value))}),ua.initialize(b),ta.setConfig({metricsModel:qa,dashMetrics:ra,baseURLController:ua}),ta.initialize(h,Oa.getUseManifestDateHeaderTimeSource())}()}function P(){return Ta}function Q(){return Sa}function R(a){var b=!1;return Ea&&Ea.getProcessors().forEach(function(c){c.getMediaInfo().type===a&&(b=!0)}),b}function S(a,b){b=b||new Date,Ra&&(Ea&&Ea.getProcessors().forEach(function(c){var d=c.getScheduleController();d&&d.finalisePlayList(b,a)}),qa.addPlayList(Ra),Ra=null)}function T(a){Ra=new v.PlayList,Ra.start=new Date,Ra.mstart=1e3*Na.getTime(),Ra.starttype=a,Ea&&Ea.getProcessors().forEach(function(a){var b=a.getScheduleController();b&&b.setPlayList(Ra)})}function U(a){if(a.error){var b="";switch(a.error.code){case 1:b="MEDIA_ERR_ABORTED";break;case 2:b="MEDIA_ERR_NETWORK";break;case 3:b="MEDIA_ERR_DECODE";break;case 4:b="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:b="MEDIA_ERR_ENCRYPTED";break;default:b="UNKNOWN"}Ja=!0,a.error.message&&(b+=" ("+a.error.message+")"),a.error.msExtendedCode&&(b+=" (0x"+(a.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),ha("Video Element Error: "+b),a.error&&ha(a.error),Ba.mediaSourceError(b),da()}}function V(){return Ea?Ea.getStreamInfo():null}function W(a){return Da.filter(function(b){return b.getId()===a})[0]}function X(){if(!(ma&&ma.hasOwnProperty("load")&&Ca&&Ca.hasOwnProperty("initialize")&&Ca.hasOwnProperty("reset")&&Ca.hasOwnProperty("getClientTimeOffset")))throw new Error("setConfig function has to be called previously")}function Y(){if(!la||!la.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}function Z(a){X(),ma.load(a)}function $(a){Y(),la.setManifest(a)}function _(a){isNaN(a.newDuration)||K(a.newDuration)}function aa(a){a&&(a.capabilities&&(ka=a.capabilities),a.manifestLoader&&(ma=a.manifestLoader),a.manifestModel&&(na=a.manifestModel),a.dashManifestModel&&(oa=a.dashManifestModel),a.mediaPlayerModel&&(Oa=a.mediaPlayerModel),a.protectionController&&(Fa=a.protectionController),a.adapter&&(pa=a.adapter),a.metricsModel&&(qa=a.metricsModel),a.dashMetrics&&(ra=a.dashMetrics),a.errHandler&&(Ba=a.errHandler),a.timelineConverter&&(Ca=a.timelineConverter),a.videoModel&&(Ma=a.videoModel),a.playbackController&&(Na=a.playbackController),a.domStorage&&(va=a.domStorage),a.abrController&&(wa=a.abrController),a.mediaController&&(xa=a.mediaController),a.textController&&(ya=a.textController))}function ba(a){Ga=a}function ca(){Da=[],Fa=null,Ia=!1,Ea=null,Ja=!1,Ka=!1,Sa=void 0,Ta=void 0,Qa=!0,Pa=!1,Ha=!0,Ra=null,Va=void 0,Ua=!1,Wa=0}function da(){X(),ta.reset(),S(Ja||Ka?v.PlayListTrace.FAILURE_STOP_REASON:v.PlayListTrace.USER_REQUEST_STOP_REASON);for(var a=0,b=Da?Da.length:0;a<b;a++){Da[a].reset(Ja)}ia.off(q.default.PLAYBACK_TIME_UPDATED,c,this),ia.off(q.default.PLAYBACK_SEEKING,f,this),ia.off(q.default.PLAYBACK_ERROR,U,this),ia.off(q.default.PLAYBACK_STARTED,h,this),ia.off(q.default.PLAYBACK_PAUSED,j,this),ia.off(q.default.PLAYBACK_ENDED,w,this),ia.off(q.default.MANIFEST_UPDATED,O,this),ia.off(q.default.STREAM_BUFFERING_COMPLETED,p,this),ia.off(D.default.METRIC_ADDED,ea,this),ia.off(q.default.MANIFEST_VALIDITY_CHANGED,_,this),ua.reset(),la.reset(),qa.clearAllCurrentMetrics(),na.setValue(null),ma.reset(),Ca.reset(),za.reset(),La&&(sa.detachMediaSource(Ma),La=null),Ma=null,Fa&&(Fa.setMediaElement(null),Fa=null,Ga=null,na.getValue()&&ia.trigger(q.default.PROTECTION_DESTROYED,{data:na.getValue().url})),ia.trigger(q.default.STREAM_TEARDOWN_COMPLETE),ca()}function ea(a){a.metric===i.default.DVR_INFO&&a.mediaType===g.default.AUDIO&&sa.setSeekable(La,a.value.range.start,a.value.range.end)}var fa=40,ga=this.context,ha=(0,x.default)(ga).getInstance().log,ia=(0,o.default)(ga).getInstance(),ja=void 0,ka=void 0,la=void 0,ma=void 0,na=void 0,oa=void 0,pa=void 0,qa=void 0,ra=void 0,sa=void 0,ta=void 0,ua=void 0,va=void 0,wa=void 0,xa=void 0,ya=void 0,za=void 0,Aa=void 0,Ba=void 0,Ca=void 0,Da=void 0,Ea=void 0,Fa=void 0,Ga=void 0,Ha=void 0,Ia=void 0,Ja=void 0,Ka=void 0,La=void 0,Ma=void 0,Na=void 0,Oa=void 0,Pa=void 0,Qa=void 0,Ra=void 0,Sa=void 0,Ta=void 0,Ua=void 0,Va=void 0,Wa=void 0,Xa=void 0;return ja={initialize:b,getActiveStreamInfo:V,isVideoTrackPresent:Q,isAudioTrackPresent:P,switchToVideoElement:E,getStreamById:W,getStreamForTime:r,getTimeRelativeToStreamId:t,load:Z,loadWithManifest:$,getActiveStreamProcessors:u,setConfig:aa,setProtectionData:ba,reset:da},a(),ja}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(98),i=d(h),j=a(94),k=d(j),l=a(89),m=d(l),n=a(45),o=d(n),p=a(49),q=d(p),r=a(115),s=d(r),t=a(46),u=d(t),v=a(184),w=a(44),x=d(w),y=a(151),z=d(y),A=a(157),B=d(A),C=a(91),D=d(C),E=a(110),F=d(E),G=a(100),H=d(G),I=a(106),J=d(I);e.__dashjs_factory_name="StreamController",c.default=u.default.getSingletonFactory(e),b.exports=c.default},{100:100,106:106,110:110,115:115,151:151,157:157,184:184,44:44,45:45,46:46,49:49,89:89,91:91,94:94,97:97,98:98}],110:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b){K=b,H=0,I=!1,J=!1,L={"urn:mpeg:dash:utc:http-head:2014":y,"urn:mpeg:dash:utc:http-xsdate:2014":x.bind(null,o),"urn:mpeg:dash:utc:http-iso:2014":x.bind(null,p),"urn:mpeg:dash:utc:direct:2014":w,"urn:mpeg:dash:utc:http-head:2012":y,"urn:mpeg:dash:utc:http-xsdate:2012":x.bind(null,o),"urn:mpeg:dash:utc:http-iso:2012":x.bind(null,p),"urn:mpeg:dash:utc:direct:2012":w,"urn:mpeg:dash:utc:http-ntp:2014":s,"urn:mpeg:dash:utc:ntp:2014":s,"urn:mpeg:dash:utc:sntp:2014":s},e()||(B(a),f(!0))}function b(a){a&&(a.metricsModel&&(M=a.metricsModel),a.dashMetrics&&(N=a.dashMetrics),a.baseURLController&&(O=a.baseURLController))}function c(){return k()}function d(a){I=a}function e(){return I}function f(a){J=a}function h(a){H=a}function k(){return H}function m(a){var b=1e3,c=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/,d=void 0,e=void 0,f=c.exec(a);return d=Date.UTC(parseInt(f[1],10),parseInt(f[2],10)-1,parseInt(f[3],10),parseInt(f[4],10),parseInt(f[5],10),f[6]&&(parseInt(f[6],10)||0),f[7]&&parseFloat(f[7])*b||0),f[9]&&f[10]&&(e=60*parseInt(f[9],10)+parseInt(f[10],10),d+=("+"===f[8]?-1:1)*e*60*b),new Date(d).getTime()}function o(a){var b=Date.parse(a);return isNaN(b)&&(b=m(a)),b}function p(a){return Date.parse(a)}function q(a){return Date.parse(a)}function s(a,b,c){c()}function w(a,b,c){var d=o(a);if(!isNaN(d))return void b(d);c()}function x(a,b,c,d,e){var f=void 0,g=void 0,h=!1,i=new XMLHttpRequest,k=e?j.HTTPRequest.HEAD:j.HTTPRequest.GET,l=b.match(/\S+/g);if(b=l.shift(),f=function(){h||(h=!0,l.length?x(a,l.join(" "),c,d,e):d())},g=function(){var b=void 0,d=void 0;200===i.status&&(b=e?i.getResponseHeader("Date"):i.response,d=a(b),isNaN(d)||(c(d),h=!0))},G.isRelative(b)){var m=O.resolve();m&&(b=G.resolve(b,m.url))}i.open(k,b),i.timeout=v||0,i.onload=g,i.onloadend=f,i.send()}function y(a,b,c){x(q,a,b,c,!0)}function z(){var a=M.getReadOnlyMetricsFor(g.default.STREAM),b=N.getLatestMPDRequestHeaderValueByID(a,"Date"),c=null!==b?new Date(b).getTime():Number.NaN;isNaN(c)?A(!0):(h(c-(new Date).getTime()),A(!1,c/1e3,H))}function A(a,b,c){d(!1),F.trigger(n.default.TIME_SYNCHRONIZATION_COMPLETED,{time:b,offset:c,error:a?new i.default(u):null})}function B(a,b){var c=b||0,e=a[c],f=function(a,b){var c=!a||!b;c&&K?z():A(c,a,b)};d(!0),e?L.hasOwnProperty(e.schemeIdUri)?L[e.schemeIdUri](e.value,function(a){var b=(new Date).getTime(),c=a-b;h(c),E("Local time: "+new Date(b)),E("Server time: "+new Date(a)),E("Difference (ms): "+c),f(a,c)},function(){B(a,c+1)}):B(a,c+1):(h(0),f())}function C(){f(!1),d(!1)}var D=this.context,E=(0,r.default)(D).getInstance().log,F=(0,l.default)(D).getInstance(),G=(0,t.default)(D).getInstance(),H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0;return{initialize:a,getOffsetToDeviceTimeMs:c,setConfig:b,reset:C}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(162),i=d(h),j=a(182),k=a(45),l=d(k),m=a(49),n=d(m),o=a(46),p=d(o),q=a(44),r=d(q),s=a(157),t=d(s),u=1,v=5e3;e.__dashjs_factory_name="TimeSyncController";var w=p.default.getSingletonFactory(e);w.TIME_SYNC_FAILED_ERROR_CODE=u,w.HTTP_TIMEOUT_MS=v,p.default.updateSingletonFactory(e.__dashjs_factory_name,w),c.default=w,b.exports=c.default},{157:157,162:162,182:182,44:44,45:45,46:46,49:49,97:97}],111:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){A.on(k.default.XLINK_ELEMENT_LOADED,j,C),H=(0,g.default)(z).create({errHandler:a.errHandler,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier})}function c(a){a&&(D=a)}function d(a){a&&(E=a)}function e(a){var b=void 0;G=new o.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:D}),F=a,b=m(F.Period_asArray,F,t,r),h(b,t,r)}function f(){A.off(k.default.XLINK_ELEMENT_LOADED,j,C),H&&(H.reset(),H=null)}function h(a,b,c){var d={},e=void 0,f=void 0;d.elements=a,d.type=b,d.resolveType=c,0===d.elements.length&&l(d);for(var g=0;g<d.elements.length;g++)e=d.elements[g],f=B.isHTTPURL(e.url)?e.url:e.originalContent.BaseURL+e.url,H.load(f,e,d)}function j(a){var b=void 0,c=void 0,d="";if(b=a.element,c=a.resolveObject,b.resolvedContent){var e=0;0===b.resolvedContent.indexOf("<?xml")&&(e=b.resolvedContent.indexOf("?>")+2),d=b.resolvedContent.substr(0,e)+"<response>"+b.resolvedContent.substr(e)+"</response>",b.resolvedContent=G.xml_str2json(d)}x(c)&&l(c)}function l(a){var b=[],c=void 0,d=void 0;if(n(a),a.resolveType===s&&A.trigger(k.default.XLINK_READY,{manifest:F}),a.resolveType===r)switch(a.type){case t:for(c=0;c<F[t+"_asArray"].length;c++)d=F[t+"_asArray"][c],d.hasOwnProperty(u+"_asArray")&&(b=b.concat(m(d[u+"_asArray"],d,u,r))),d.hasOwnProperty(v+"_asArray")&&(b=b.concat(m(d[v+"_asArray"],d,v,r)));h(b,u,r);break;case u:A.trigger(k.default.XLINK_READY,{manifest:F})}}function m(a,b,c,d){var e=[],f=void 0,g=void 0,h=void 0;for(g=a.length-1;g>=0;g--)f=a[g],f.hasOwnProperty("xlink:href")&&f["xlink:href"]===w&&a.splice(g,1);for(g=0;g<a.length;g++)f=a[g],f.hasOwnProperty("xlink:href")&&f.hasOwnProperty("xlink:actuate")&&f["xlink:actuate"]===d&&(h=p(f["xlink:href"],b,c,g,d,f),e.push(h));return e}function n(a){var b=[],c=void 0,d=void 0,e=void 0,f=void 0,g=void 0,h=void 0;for(f=a.elements.length-1;f>=0;f--){if(c=a.elements[f],d=c.type+"_asArray",!c.resolvedContent||y())delete c.originalContent["xlink:actuate"],delete c.originalContent["xlink:href"],b.push(c.originalContent);else if(c.resolvedContent)for(g=0;g<c.resolvedContent[d].length;g++)e=c.resolvedContent[d][g],b.push(e);for(c.parentElement[d].splice(c.index,1),h=0;h<b.length;h++)c.parentElement[d].splice(c.index+h,0,b[h]);b=[]}a.elements.length>0&&E.run(F)}function p(a,b,c,d,e,f){return{url:a,parentElement:b,type:c,index:d,resolveType:e,originalContent:f,resolvedContent:null,resolved:!1}}function x(a){var b=void 0,c=void 0;for(b=0;b<a.elements.length;b++)if(c=a.elements[b],!1===c.resolved)return!1;return!0}function y(){return!1}a=a||{};var z=this.context,A=(0,i.default)(z).getInstance(),B=(0,q.default)(z).getInstance(),C=void 0,D=void 0,E=void 0,F=void 0,G=void 0,H=void 0;return C={resolveManifestOnLoad:e,setMatchers:c,setIron:d,reset:f},b(),C}Object.defineProperty(c,"__esModule",{value:!0});var f=a(96),g=d(f),h=a(45),i=d(h),j=a(49),k=d(j),l=a(46),m=d(l),n=a(3),o=d(n),p=a(157),q=d(p),r="onLoad",s="onActuate",t="Period",u="AdaptationSet",v="EventStream",w="urn:mpeg:dash:resolve-to-zero:2013";e.__dashjs_factory_name="XlinkController",c.default=m.default.getClassFactory(e),b.exports=c.default},{157:157,3:3,45:45,46:46,49:49,96:96}],112:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(){function a(){i()}function b(a){a.dashManifestModel&&(o=a.dashManifestModel)}function c(a,b,c){var d=o.getBaseURLsFromElement(c)
|
25 |
-
;a[b]?q.areEqual(d,a[b].data.baseUrls)||(a[b].data.baseUrls=d,a[b].data.selectedIdx=k):a[b]=new l(d)}function d(a){var b=o.getBaseURLsFromElement(a);q.areEqual(b,n.data.baseUrls)||(n.data.baseUrls=b,n.data.selectedIdx=k),a.Period_asArray&&a.Period_asArray.forEach(function(a,b){c(n.children,b,a),a.AdaptationSet_asArray&&a.AdaptationSet_asArray.forEach(function(a,d){c(n.children[b].children,d,a),a.Representation_asArray&&a.Representation_asArray.sort(o.getRepresentationSortFunction()).forEach(function(a,e){c(n.children[b].children[d].children,e,a)})})})}function e(a,b){var c=b||n;a(c.data),c.children&&c.children.forEach(function(b){return e(a,b)})}function f(a){e(function(b){isNaN(b.selectedIdx)||a===b.baseUrls[b.selectedIdx].serviceLocation&&(b.selectedIdx=k)})}function g(a){d(a)}function i(){n=new l}function j(a){var b=n,c=[b.data];return a&&a.forEach(function(a){(b=b.children[a])&&c.push(b.data)}),c.filter(function(a){return a.baseUrls.length})}var m=void 0,n=void 0,o=void 0,p=this.context,q=(0,h.default)(p).getInstance();return m={reset:i,update:g,getForPath:j,invalidateSelectedIndexes:f,setConfig:b},a(),m}Object.defineProperty(c,"__esModule",{value:!0});var g=a(154),h=d(g),i=a(46),j=d(i),k=NaN,l=function a(b,c){e(this,a),this.data={baseUrls:b||null,selectedIdx:c||k},this.children=[]};f.__dashjs_factory_name="BaseURLTreeModel",c.default=j.default.getClassFactory(f),b.exports=c.default},{154:154,46:46}],113:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){D(),I.on(i.default.LOADING_COMPLETED,A,L),I.on(i.default.LOADING_DATA_PROGRESS,B,L),I.on(i.default.LOADING_ABANDONED,C,L)}function c(a){M=a}function d(){return M}function e(a){var b=function(a,b){return a.action===m.default.ACTION_COMPLETE&&a.action===b.action},c=function(a,b){return!isNaN(a.index)&&a.startTime===b.startTime&&a.adaptationIndex===b.adaptationIndex&&a.type===b.type},d=function(a,b){return isNaN(a.index)&&isNaN(b.index)&&a.quality===b.quality},e=function(e){var f=!1;return e.some(function(e){if(c(a,e)||d(a,e)||b(a,e))return f=!0}),f};return!!a&&e(N)}function f(a){var b=!1,c=0,d=void 0;if(!(b=e(a)))for(c=0;c<O.length;c++)d=O[c],a.url===d.url&&a.startTime===d.startTime&&(b=!0);return b}function h(a){var b=a?a.state instanceof Array?a.state:[a.state]:[],c=[];return b.forEach(function(b){var d=y(b);c=c.concat(x(d,a))}),c}function j(a){return isNaN(a.duration)?.25:a.duration/8}function k(a){N=N.filter(function(b){var c=j(b);return isNaN(b.startTime)||void 0!==a&&b.startTime>=a-c})}function l(a){N=N.filter(function(b){return isNaN(b.startTime)||void 0!==a&&b.startTime<=a})}function n(a,b){b<=a+.5||(N=N.filter(function(c){var d=j(c);return isNaN(c.startTime)||c.startTime>=b-d||isNaN(c.duration)||c.startTime+c.duration<=a+d}))}function r(a,b){if(!a||0===a.length)return void k();for(var c=0,d=0,e=a.length;d<e;d++)n(c,a.start(d)),c=a.end(d);b>0&&n(c,b)}function t(){K.abort(),O=[]}function u(a){switch(a.action){case m.default.ACTION_COMPLETE:N.push(a),z(a,q),H("[FragmentModel] executeRequest trigger STREAM_COMPLETED"),I.trigger(i.default.STREAM_COMPLETED,{request:a,fragmentModel:this});break;case m.default.ACTION_DOWNLOAD:z(a,p),O.push(a),v(a);break;default:H("Unknown request action.")}}function v(a){I.trigger(i.default.FRAGMENT_LOADING_STARTED,{sender:L,request:a}),K.load(a)}function w(a,b,c){for(var d=a.length-1,e=d;e>=0;e--){var f=a[e],g=f.startTime,h=g+f.duration;if(c=isNaN(c)?j(f):c,!isNaN(g)&&!isNaN(h)&&b+c>=g&&b-c<h||isNaN(g)&&isNaN(b))return f}return null}function x(a,b){return b.hasOwnProperty("time")?[w(a,b.time,b.threshold)]:a.filter(function(a){for(var c in b)if("state"!==c&&b.hasOwnProperty(c)&&a[c]!=b[c])return!1;return!0})}function y(a){var b=void 0;switch(a){case p:b=O;break;case q:b=N;break;default:b=[]}return b}function z(a,b){J.addSchedulingInfo(a.mediaType,new Date,a.type,a.startTime,a.availabilityStartTime,a.duration,a.quality,a.range,b),J.addRequestsQueue(a.mediaType,O,N)}function A(a){a.sender===K&&(O.splice(O.indexOf(a.request),1),a.response&&!a.error&&N.push(a.request),z(a.request,a.error?s:q),I.trigger(i.default.FRAGMENT_LOADING_COMPLETED,{request:a.request,response:a.response,error:a.error,sender:this}))}function B(a){a.sender===K&&I.trigger(i.default.FRAGMENT_LOADING_PROGRESS,{request:a.request,response:a.response,error:a.error,sender:this})}function C(a){a.sender===K&&I.trigger(i.default.FRAGMENT_LOADING_ABANDONED,{streamProcessor:this.getStreamProcessor(),request:a.request,mediaType:a.mediaType})}function D(){N=[],O=[]}function E(){I.off(i.default.LOADING_COMPLETED,A,this),I.off(i.default.LOADING_DATA_PROGRESS,B,this),I.off(i.default.LOADING_ABANDONED,C,this),K&&K.reset(),D()}function F(a){N.push(a)}a=a||{};var G=this.context,H=(0,o.default)(G).getInstance().log,I=(0,g.default)(G).getInstance(),J=a.metricsModel,K=a.fragmentLoader,L=void 0,M=void 0,N=void 0,O=void 0;return L={setStreamProcessor:c,getStreamProcessor:d,getRequests:h,isFragmentLoaded:e,isFragmentLoadedOrPending:f,removeExecutedRequestsBeforeTime:k,removeExecutedRequestsAfterTime:l,syncExecutedRequestsWithBufferedRange:r,abortRequests:t,executeRequest:u,reset:E,addExecutedRequest:F},b(),L}Object.defineProperty(c,"__esModule",{value:!0});var f=a(45),g=d(f),h=a(49),i=d(h),j=a(46),k=d(j),l=a(164),m=d(l),n=a(44),o=d(n),p="loading",q="executed",r="canceled",s="failed";e.__dashjs_factory_name="FragmentModel";var t=k.default.getClassFactory(e);t.FRAGMENT_MODEL_LOADING=p,t.FRAGMENT_MODEL_EXECUTED=q,t.FRAGMENT_MODEL_CANCELED=r,t.FRAGMENT_MODEL_FAILED=s,k.default.updateClassFactory(e.__dashjs_factory_name,t),c.default=t,b.exports=c.default},{164:164,44:44,45:45,46:46,49:49}],114:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){return e}function b(a){e=a,a&&d.trigger(i.default.MANIFEST_LOADED,{data:a})}var c=this.context,d=(0,g.default)(c).getInstance(),e=void 0;return{getValue:a,setValue:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(45),g=d(f),h=a(49),i=d(h),j=a(46),k=d(j);e.__dashjs_factory_name="ManifestModel",c.default=k.default.getSingletonFactory(e),b.exports=c.default},{45:45,46:46,49:49}],115:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(){function a(){var a,b;cb=[],bb=!1,ab=!0,fb=!0,vb=k.default.ABR_STRATEGY_DYNAMIC,wb=!0,yb=!1,jb={enabled:!0,ttl:n},kb={enabled:!0,ttl:o},db=m,eb=void 0,gb=r,hb=s,ib=t,lb=NaN,mb=w,nb=x,ob=y,pb=z,qb=p,rb=q,ub=L,Cb=!1,Db=A,Fb=B,xb={default:M},zb=[],Ab=k.default.MOVING_AVERAGE_SLIDING_WINDOW,Eb=!1,a={},e(a,i.HTTPRequest.MPD_TYPE,G),e(a,i.HTTPRequest.XLINK_EXPANSION_TYPE,I),e(a,i.HTTPRequest.MEDIA_SEGMENT_TYPE,E),e(a,i.HTTPRequest.INIT_SEGMENT_TYPE,E),e(a,i.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,E),e(a,i.HTTPRequest.INDEX_SEGMENT_TYPE,E),e(a,i.HTTPRequest.OTHER_TYPE,E),sb=a,b={},e(b,i.HTTPRequest.MPD_TYPE,H),e(b,i.HTTPRequest.XLINK_EXPANSION_TYPE,J),e(b,i.HTTPRequest.MEDIA_SEGMENT_TYPE,F),e(b,i.HTTPRequest.INIT_SEGMENT_TYPE,F),e(b,i.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,F),e(b,i.HTTPRequest.INDEX_SEGMENT_TYPE,F),e(b,i.HTTPRequest.OTHER_TYPE,F),tb=b,Bb={},Bb[k.default.VIDEO]=C,Bb[k.default.AUDIO]=D}function b(a){vb=a}function c(){return vb}function d(a){wb=a}function f(){return wb}function g(a){var b=void 0;for(b=0;b<zb.length;b++)if(zb[b].rulename===a)return b;return-1}function h(){return zb}function j(a,b,c){var d=g(b);-1===d?zb.push({type:a,rulename:b,rule:c}):(zb[d].type=a,zb[d].rule=c)}function l(a){var b=g(a);-1!==b&&zb.splice(b,1)}function N(){zb=[]}function O(a){qb=a}function P(){return qb}function Q(a){rb=a}function R(){return rb}function S(a){lb=a}function T(){return isNaN(lb)?yb?v:u:lb}function U(a){mb=a}function V(){return mb}function W(a){nb=a}function X(){return nb}function Y(a){ob=a}function Z(){return ob}function $(a){pb=a}function _(){return pb}function aa(a,b){Bb[a]=b}function ba(a){return Bb[a]}function ca(a){gb=a}function da(){return gb}function ea(a){hb=a}function fa(){return hb}function ga(a,b){jb.enabled=a,void 0===b||isNaN(b)||"number"!=typeof b||(jb.ttl=b)}function ha(){return jb}function ia(a,b){kb.enabled=a,void 0===b||isNaN(b)||"number"!=typeof b||(kb.ttl=b)}function ja(){return kb}function ka(a){ib=a}function la(){return ib}function ma(a){sb[i.HTTPRequest.MEDIA_SEGMENT_TYPE]=a}function na(a){sb[i.HTTPRequest.MPD_TYPE]=a}function oa(a,b){sb[a]=b}function pa(){return sb[i.HTTPRequest.MEDIA_SEGMENT_TYPE]}function qa(){return sb[i.HTTPRequest.MPD_TYPE]}function ra(a){return sb[a]}function sa(a){tb[i.HTTPRequest.MEDIA_SEGMENT_TYPE]=a}function ta(a){tb[i.HTTPRequest.MPD_TYPE]=a}function ua(a,b){tb[a]=b}function va(){return tb[i.HTTPRequest.MEDIA_SEGMENT_TYPE]}function wa(){return tb[i.HTTPRequest.MPD_TYPE]}function xa(a){return tb[a]}function ya(a){ub=a}function za(){return ub}function Aa(a){fb=a}function Ba(){return fb}function Ca(a){db=a}function Da(a){eb=a}function Ea(){return db}function Fa(){return Eb?eb||K:eb}function Ga(a){ab=a}function Ha(){return ab}function Ia(a){bb=a}function Ja(){return bb}function Ka(a){cb=a}function La(){return cb}function Ma(a,b){a?xb[a]=!!b:Object.keys(xb).forEach(function(a){Ma(a,b)})}function Na(a){var b=xb[a];return void 0===b?xb.default:b}function Oa(){return yb}function Pa(a){yb=a}function Qa(a){Ab=a}function Ra(){return Ab}function Sa(a){Cb=a}function Ta(){return Cb}function Ua(a){Db=a}function Va(){return Db}function Wa(){return Eb}function Xa(a){Eb=a}function Ya(a){Fb=a}function Za(){return Fb}function $a(){}var _a=void 0,ab=void 0,bb=void 0,cb=void 0,db=void 0,eb=void 0,fb=void 0,gb=void 0,hb=void 0,ib=void 0,jb=void 0,kb=void 0,lb=void 0,mb=void 0,nb=void 0,ob=void 0,pb=void 0,qb=void 0,rb=void 0,sb=void 0,tb=void 0,ub=void 0,vb=void 0,wb=void 0,xb=void 0,yb=void 0,zb=void 0,Ab=void 0,Bb=void 0,Cb=void 0,Db=void 0,Eb=void 0,Fb=void 0;return _a={setABRStrategy:b,getABRStrategy:c,setUseDefaultABRRules:d,getUseDefaultABRRules:f,getABRCustomRules:h,addABRCustomRule:j,removeABRCustomRule:l,removeAllABRCustomRule:N,setBandwidthSafetyFactor:O,getBandwidthSafetyFactor:P,setAbandonLoadTimeout:Q,getAbandonLoadTimeout:R,setLastBitrateCachingInfo:ga,getLastBitrateCachingInfo:ha,setLastMediaSettingsCachingInfo:ia,getLastMediaSettingsCachingInfo:ja,setStableBufferTime:S,getStableBufferTime:T,setBufferTimeAtTopQuality:U,getBufferTimeAtTopQuality:V,setBufferTimeAtTopQualityLongForm:W,getBufferTimeAtTopQualityLongForm:X,setLongFormContentDurationThreshold:Y,getLongFormContentDurationThreshold:Z,setSegmentOverlapToleranceTime:$,getSegmentOverlapToleranceTime:_,getCacheLoadThresholdForType:ba,setCacheLoadThresholdForType:aa,setBufferToKeep:ca,getBufferToKeep:da,setBufferAheadToKeep:ea,getBufferAheadToKeep:fa,setBufferPruningInterval:ka,getBufferPruningInterval:la,setFragmentRetryAttempts:ma,getFragmentRetryAttempts:pa,setManifestRetryAttempts:na,getManifestRetryAttempts:qa,setRetryAttemptsForType:oa,getRetryAttemptsForType:ra,setFragmentRetryInterval:sa,getFragmentRetryInterval:va,setManifestRetryInterval:ta,getManifestRetryInterval:wa,setRetryIntervalForType:ua,getRetryIntervalForType:xa,setWallclockTimeUpdateInterval:ya,getWallclockTimeUpdateInterval:za,setScheduleWhilePaused:Aa,getScheduleWhilePaused:Ba,getUseSuggestedPresentationDelay:Ja,setUseSuggestedPresentationDelay:Ia,setLiveDelayFragmentCount:Ca,getLiveDelayFragmentCount:Ea,getLiveDelay:Fa,setLiveDelay:Da,setUseManifestDateHeaderTimeSource:Ga,getUseManifestDateHeaderTimeSource:Ha,setUTCTimingSources:Ka,getUTCTimingSources:La,setXHRWithCredentialsForType:Ma,getXHRWithCredentialsForType:Na,setFastSwitchEnabled:Pa,getFastSwitchEnabled:Oa,setMovingAverageMethod:Qa,getMovingAverageMethod:Ra,setJumpGaps:Sa,getJumpGaps:Ta,setSmallGapLimit:Ua,getSmallGapLimit:Va,getLowLatencyEnabled:Wa,setLowLatencyEnabled:Xa,setManifestUpdateRetryInterval:Ya,getManifestUpdateRetryInterval:Za,reset:$a},a(),_a}Object.defineProperty(c,"__esModule",{value:!0});var g=a(46),h=d(g),i=a(182),j=a(97),k=d(j),l={scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"http://time.akamai.com/?iso"},m=4,n=36e4,o=36e4,p=.9,q=1e4,r=20,s=80,t=10,u=12,v=20,w=30,x=60,y=600,z=.2,A=.8,B=100,C=50,D=5,E=3,F=1e3,G=3,H=500,I=1,J=500,K=3,L=50,M=!1;f.__dashjs_factory_name="MediaPlayerModel";var N=h.default.getSingletonFactory(f);N.DEFAULT_UTC_TIMING_SOURCE=l,h.default.updateSingletonFactory(f.__dashjs_factory_name,N),c.default=N,b.exports=c.default},{182:182,46:46,97:97}],116:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){W={}}function b(a){a&&a.adapter&&(V=a.adapter)}function c(){T.trigger(G.default.METRICS_CHANGED)}function d(a){T.trigger(G.default.METRIC_CHANGED,{mediaType:a}),c()}function e(a,b,c){T.trigger(G.default.METRIC_UPDATED,{mediaType:a,metric:b,value:c}),d(a)}function f(a,b,c){T.trigger(G.default.METRIC_ADDED,{mediaType:a,metric:b,value:c}),d(a)}function h(a){delete W[a],d(a)}function j(){W={},c()}function l(a){return W.hasOwnProperty(a)?W[a]:null}function o(a){var b=void 0;return W.hasOwnProperty(a)?b=W[a]:(b=new k.default,W[a]=b),b}function q(a,b,c){var d=o(a);d[b].push(c),d[b].length>R&&d[b].shift()}function s(a,b,c,d,e,f){var g=new m.default;return g.tcpid=b,g.dest=c,g.topen=d,g.tclose=e,g.tconnect=f,B(a,i.default.TCP_CONNECTION,g),g}function u(a,b,c,d){var e=new n.HTTPRequestTrace;return e.s=b,e.d=c,e.b=d,a.trace.push(e),a.interval||(a.interval=0),a.interval+=c,e}function w(a,b,c,d,e,f,g,h,j,k,l,m,o,p){var q=new n.HTTPRequest;return e&&e!==d&&(w(a,null,c,d,null,null,g,h,null,null,null,m,null,null),q.actualurl=e),q.tcpid=b,q.type=c,q.url=d,q.range=g,q.trequest=h,q.tresponse=j,q.responsecode=l,q._tfinish=k,q._stream=a,q._mediaduration=m,q._responseHeaders=o,q._serviceLocation=f,p?p.forEach(function(a){u(q,a.s,a.d,a.b)}):(delete q.interval,delete q.trace),B(a,i.default.HTTP_REQUEST,q),q}function z(a,b,c,d,e){var f=new p.default;return f.t=b,f.mt=c,f.to=d,e?f.lto=e:delete f.lto,B(a,i.default.TRACK_SWITCH,f),f}function B(a,b,c){q(a,b,c),f(a,b,c)}function D(a,b,c){var d=new r.default;return d.t=b,d.level=c,B(a,i.default.BUFFER_LEVEL,d),d}function F(a,b,c){var d=new t.default;return d.target=c,d.state=b,B(a,i.default.BUFFER_STATE,d),d}function H(a,b,c,d){var e=new v.default;return e.time=b,e.range=d,e.manifestInfo=c,B(a,i.default.DVR_INFO,e),e}function I(a,b){var c=new x.default,d=o(a).DroppedFrames;return c.time=b.creationTime,c.droppedFrames=b.droppedVideoFrames,d.length>0&&d[d.length-1]==c?d[d.length-1]:(B(a,i.default.DROPPED_FRAMES,c),c)}function J(a,b,c,d,e,f,g,h,j){var k=new A.default;return k.mediaType=a,k.t=b,k.type=c,k.startTime=d,k.availabilityStartTime=e,k.duration=f,k.quality=g,k.range=h,k.state=j,B(a,i.default.SCHEDULING_INFO,k),k}function K(a,b,c){var d=new E.default;d.loadingRequests=b,d.executedRequests=c,o(a).RequestsQueue=d,f(a,i.default.REQUESTS_QUEUE,d)}function L(a,b,c,d,e,h,j,k,l,m){var n=new y.ManifestUpdate;return n.mediaType=a,n.type=b,n.requestTime=c,n.fetchTime=d,n.availabilityStartTime=e,n.presentationStartTime=h,n.clientTimeOffset=j,n.currentTime=k,n.buffered=l,n.latency=m,q(g.default.STREAM,i.default.MANIFEST_UPDATE,n),f(a,i.default.MANIFEST_UPDATE,n),n}function M(a,b){if(a){for(var c in b)a[c]=b[c];e(a.mediaType,i.default.MANIFEST_UPDATE,a)}}function N(a,b,c,d,f){if(a){var g=new y.ManifestUpdateStreamInfo;return g.id=b,g.index=c,g.start=d,g.duration=f,a.streamInfo.push(g),e(a.mediaType,i.default.MANIFEST_UPDATE_STREAM_INFO,a),g}return null}function O(a,b,c,d,f,g,h,j){if(a){var k=new y.ManifestUpdateRepresentationInfo;return k.id=b,k.index=c,k.streamIndex=d,k.mediaType=f,k.startNumber=h,k.fragmentInfoType=j,k.presentationTimeOffset=g,a.representationInfo.push(k),e(a.mediaType,i.default.MANIFEST_UPDATE_TRACK_INFO,a),k}return null}function P(a){var b=g.default.STREAM;return a.trace&&Array.isArray(a.trace)?a.trace.forEach(function(a){a.hasOwnProperty("subreplevel")&&!a.subreplevel&&delete a.subreplevel}):delete a.trace,B(b,i.default.PLAY_LIST,a),a}function Q(a){return B(g.default.STREAM,i.default.DVB_ERRORS,a),a}var R=1e3,S=this.context,T=(0,C.default)(S).getInstance(),U=void 0,V=void 0,W=void 0;return U={clearCurrentMetricsForType:h,clearAllCurrentMetrics:j,getReadOnlyMetricsFor:l,getMetricsFor:o,addTcpConnection:s,addHttpRequest:w,addRepresentationSwitch:z,addBufferLevel:D,addBufferState:F,addDVRInfo:H,addDroppedFrames:I,addSchedulingInfo:J,addRequestsQueue:K,addManifestUpdate:L,updateManifestUpdateInfo:M,addManifestUpdateStreamInfo:N,addManifestUpdateRepresentationInfo:O,addPlayList:P,addDVBErrors:Q,setConfig:b},a(),U}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(98),i=d(h),j=a(170),k=d(j),l=a(188),m=d(l),n=a(182),o=a(185),p=d(o),q=a(178),r=d(q),s=a(179),t=d(s),u=a(180),v=d(u),w=a(181),x=d(w),y=a(183),z=a(187),A=d(z),B=a(45),C=d(B),D=a(186),E=d(D),F=a(49),G=d(F),H=a(46),I=d(H);e.__dashjs_factory_name="MetricsModel",c.default=I.default.getSingletonFactory(e),b.exports=c.default},{170:170,178:178,179:179,180:180,181:181,182:182,183:183,185:185,186:186,187:187,188:188,45:45,46:46,49:49,97:97,98:98}],117:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){if(c=new g.default,!a)return null;var b=a.indexOf("#");if(-1!==b)for(var d=a.substr(b+1).split("&"),e=0,f=d.length;e<f;++e){var h=d[e],i=h.indexOf("=");if(-1!==i){var j=h.substring(0,i);c.hasOwnProperty(j)&&(c[j]=h.substr(i+1))}}}function b(){return c}var c=void 0;return{initialize:a,getURIFragmentData:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(177),g=d(f),h=a(46),i=d(h);e.__dashjs_factory_name="URIFragmentModel",c.default=i.default.getSingletonFactory(e),b.exports=c.default},{177:177,46:46}],118:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){_.on(k.default.PLAYBACK_PLAYING,v,this)}function b(){_.off(k.default.PLAYBACK_PLAYING,v,this)}function c(){U&&(U.playbackRate=X||1,U.removeEventListener("canplay",c))}function d(a){U&&(U.readyState<=2&&a>0?U.addEventListener("canplay",c):U.playbackRate=a)}function e(a){if(U){if(U.currentTime==a)return;try{U.currentTime=a}catch(b){0===U.readyState&&b.code===b.INVALID_STATE_ERR&&setTimeout(function(){U.currentTime=a},400)}}}function f(){return U}function g(a){if(null!==a&&void 0!==a&&(!a||!a.nodeName||"VIDEO"!==a.nodeName&&"AUDIO"!==a.nodeName))throw Y;(U=a)&&(U.preload="auto")}function h(a){U&&(a?U.src=a:(U.removeAttribute("src"),U.load()))}function j(){return U?U.src:null}function l(){return W}function n(a){W=a}function o(){return V}function p(a){V=a,V.style.position="absolute",V.style.display="flex",V.style.overflow="hidden",V.style.pointerEvents="none",V.style.top=0,V.style.left=0}function q(a,b){u(a,b)}function r(){return aa.length>0}function s(a){var b=void 0;null===a||U.seeking||-1!==aa.indexOf(a)||(aa.push(a),U&&1===aa.length&&(b=document.createEvent("Event"),b.initEvent("waiting",!0,!1),X=U.playbackRate,d(0),U.dispatchEvent(b)))}function t(a){var b=aa.indexOf(a),c=void 0;null!==a&&(-1!==b&&aa.splice(b,1),U&&!1===r()&&0===U.playbackRate&&(d(X||1),U.paused||(c=document.createEvent("Event"),c.initEvent("playing",!0,!1),U.dispatchEvent(c))))}function u(a,b){b?s(a):t(a)}function v(){if(U&&r()&&0===U.playbackRate){var a=document.createEvent("Event");a.initEvent("waiting",!0,!1),U.dispatchEvent(a)}}function w(){if(!U)return null;var a="webkitDroppedFrameCount"in U&&"webkitDecodedFrameCount"in U,b="getVideoPlaybackQuality"in U,c=null;return b?c=U.getVideoPlaybackQuality():a&&(c={droppedVideoFrames:U.webkitDroppedFrameCount,totalVideoFrames:U.webkitDroppedFrameCount+U.webkitDecodedFrameCount,creationTime:new Date}),c}function x(){if(U){U.autoplay=!0;var a=U.play();a&&"undefined"!=typeof Promise&&a instanceof Promise&&a.catch(function(a){"NotAllowedError"===a.name&&_.trigger(k.default.PLAYBACK_NOT_ALLOWED),$("Caught pending play exception - continuing ("+a+")")})}}function y(){return U?U.paused:null}function z(){U&&(U.pause(),U.autoplay=!1)}function A(){return U?U.seeking:null}function B(){return U?U.currentTime:null}function C(){return U?U.playbackRate:null}function D(){return U?U.played:null}function E(){return U?U.ended:null}function F(a,b){U&&U.addEventListener(a,b)}function G(a,b){U&&U.removeEventListener(a,b)}function H(){return U?U.readyState:NaN}function I(){return U?U.buffered:null}function J(){return U?U.clientWidth:NaN}function K(){return U?U.clientHeight:NaN}function L(){return U?U.videoWidth:NaN}function M(){return U?U.videoHeight:NaN}function N(){return U&&U.parentNode?U.getBoundingClientRect().top-U.parentNode.getBoundingClientRect().top:NaN}function O(){return U&&U.parentNode?U.getBoundingClientRect().left-U.parentNode.getBoundingClientRect().left:NaN}function P(){return U?U.textTracks:[]}function Q(a,b,c,d,e){if(U)for(var f=0;f<U.textTracks.length;f++)if(U.textTracks[f].kind===a&&(!b||U.textTracks[f].label==b)&&U.textTracks[f].language===c&&U.textTracks[f].isTTML===d&&U.textTracks[f].isEmbedded===e)return U.textTracks[f];return null}function R(a,b,c){return U?U.addTextTrack(a,b,c):null}function S(a){U&&(U.appendChild(a),void 0!==a.isTTML&&(U.textTracks[U.textTracks.length-1].isTTML=a.isTTML,U.textTracks[U.textTracks.length-1].isEmbedded=a.isEmbedded))}function T(a){U&&U.removeChild(a)}var U=void 0,V=void 0,W=void 0,X=void 0,Y="element is not video or audio DOM type!",Z=this.context,$=(0,m.default)(Z).getInstance().log,_=(0,i.default)(Z).getInstance(),aa=[];return{initialize:a,setCurrentTime:e,play:x,isPaused:y,pause:z,isSeeking:A,getTime:B,getPlaybackRate:C,getPlayedRanges:D,getEnded:E,setStallState:q,getElement:f,setElement:g,setSource:h,getSource:j,getVideoContainer:l,setVideoContainer:n,getTTMLRenderingDiv:o,setTTMLRenderingDiv:p,getPlaybackQuality:w,addEventListener:F,removeEventListener:G,getReadyState:H,getBufferRange:I,getClientWidth:J,getClientHeight:K,getTextTracks:P,getTextTrack:Q,addTextTrack:R,appendChild:S,removeChild:T,getVideoWidth:L,getVideoHeight:M,getVideoRelativeOffsetTop:N,getVideoRelativeOffsetLeft:O,reset:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(45),i=d(h),j=a(49),k=d(j),l=a(44),m=d(l);e.__dashjs_factory_name="VideoModel",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{44:44,45:45,46:46,49:49}],119:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){var b=new Date,e=a.request,g=new Headers;e.range&&g.append("Range","bytes="+e.range),e.requestStartDate||(e.requestStartDate=b),f&&f.modifyRequestHeader({setRequestHeader:function(a,b){g.append(a,b)}});var h=void 0;"function"==typeof window.AbortController&&(h=new AbortController,a.abortController=h);var j={method:a.method,headers:g,credentials:a.withCredentials?"include":void 0,signal:h?h.signal:void 0};fetch(a.url,j).then(function(b){a.response||(a.response={}),a.response.status=b.status,a.response.statusText=b.statusText,a.response.responseURL=b.url,b.ok||a.onerror();var e="",f=!0,g=!1,h=void 0;try{for(var j,k=b.headers.keys()[Symbol.iterator]();!(f=(j=k.next()).done);f=!0){var l=j.value;e+=l+": "+b.headers.get(l)+"\n"}}catch(r){g=!0,h=r}finally{try{!f&&k.return&&k.return()}finally{if(g)throw h}}if(a.response.responseHeaders=e,!b.body)return b.arrayBuffer().then(function(b){a.response.response=b;var c={loaded:b.byteLength,total:b.byteLength};a.progress(c),a.onload(),a.onend()});var m=parseInt(b.headers.get("Content-Length"),10),n=0,o=!1,p=new Uint8Array,q=0;a.reader=b.body.getReader(),c(a,function b(e){var f=e.value;if(e.done)return p&&(a.progress({loaded:n,total:isNaN(m)?n:m,lengthComputable:!0}),a.response.response=p.buffer),a.onload(),void a.onend();if(f&&f.length>0){p=d(p,f),n+=f.length;var g=(0,i.default)().getInstance().findLastTopIsoBoxCompleted(["moov","mdat"],p,q);if(g.found){var h=g.lastCompletedOffset+g.size,j=void 0;h===p.length?(j=p,p=new Uint8Array):(j=new Uint8Array(p.subarray(0,h)),p=p.subarray(h)),a.progress({data:j.buffer,lengthComputable:!1,noTrace:!0}),q=0}else q=g.lastCompletedOffset,o||(a.progress({lengthComputable:!1,noTrace:!0}),o=!0)}c(a,b)})}).catch(function(b){a.onerror&&a.onerror(b)})}function c(a,b){a.reader.read().then(b).catch(function(){})}function d(a,b){if(0===a.length)return b;var c=new Uint8Array(a.length+b.length);return c.set(a),c.set(b,a.length),c}function e(a){if(a.abortController)a.abortController.abort();else if(a.reader)try{a.reader.cancel()}catch(b){}}a=a||{};var f=a.requestModifier;return{load:b,abort:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(145),i=d(h);e.__dashjs_factory_name="FetchLoader";var j=g.default.getClassFactory(e);c.default=j,b.exports=c.default},{145:145,46:46}],120:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){function b(){var a;r=[],s=[],t=[],a={},e(a,k.HTTPRequest.MPD_TYPE,o.default.DOWNLOAD_ERROR_ID_MANIFEST),e(a,k.HTTPRequest.XLINK_EXPANSION_TYPE,o.default.DOWNLOAD_ERROR_ID_XLINK),e(a,k.HTTPRequest.INIT_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_INITIALIZATION),e(a,k.HTTPRequest.MEDIA_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,k.HTTPRequest.INDEX_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,k.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,k.HTTPRequest.OTHER_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT),u=a}function c(a,b){var d=a.request,e=[],f=!0,o=!0,q=new Date,v=q,w=0,x=void 0;if(!n||!l||!i)throw new Error("config object is not correct or missing");var y=function(a){o=!1,d.requestStartDate=q,d.requestEndDate=new Date,d.firstByteDate=d.firstByteDate||q,d.checkExistenceOnly||l.addHttpRequest(d.mediaType,null,d.type,d.url,x.response?x.response.responseURL:null,d.serviceLocation||null,d.range||null,d.requestStartDate,d.firstByteDate,d.requestEndDate,x.response?x.response.status:null,d.duration,x.response&&x.response.getAllResponseHeaders?x.response.getAllResponseHeaders():x.response.responseHeaders,a?e:null)},z=function(){-1!==r.indexOf(x)&&(r.splice(r.indexOf(x),1),o&&(y(!1),b>0?(b--,t.push(setTimeout(function(){c(a,b)},m.getRetryIntervalForType(d.type)))):(i.downloadError(u[d.type],d.url,d),a.error&&a.error(d,"error",x.response.statusText),a.complete&&a.complete(d,x.response.statusText))))},A=function(b){var c=new Date;f&&(f=!1,(!b.lengthComputable||b.lengthComputable&&b.total!==b.loaded)&&(d.firstByteDate=c)),b.lengthComputable&&(d.bytesLoaded=b.loaded,d.bytesTotal=b.total),b.noTrace||(e.push({s:v,d:c.getTime()-v.getTime(),b:[b.loaded?b.loaded-w:0]}),v=c,w=b.loaded),a.progress&&b.data&&a.progress(b.data)},B=function(){x.response.status>=200&&x.response.status<=299&&(y(!0),a.success&&a.success(x.response.response,x.response.statusText,x.response.responseURL),a.complete&&a.complete(d,x.response.statusText))},C=function(){a.abort&&a.abort(d)},D=void 0;D=p&&window.fetch&&"arraybuffer"===d.responseType?(0,j.default)(g).create({requestModifier:n}):(0,h.default)(g).create({requestModifier:n});var E=n.modifyRequestURL(d.url),F=d.checkExistenceOnly?k.HTTPRequest.HEAD:k.HTTPRequest.GET,G=m.getXHRWithCredentialsForType(d.type);x={url:E,method:F,withCredentials:G,request:d,onload:B,onend:z,onerror:z,progress:A,onabort:C,loader:D};var H=(new Date).getTime();isNaN(d.delayLoadingTime)||H>=d.delayLoadingTime?(r.push(x),D.load(x)):function(){var a={httpRequest:x};s.push(a),a.delayTimeout=setTimeout(function(){if(-1!==s.indexOf(a)){s.splice(s.indexOf(a),1);try{q=new Date,v=q,r.push(a.httpRequest),D.load(a.httpRequest)}catch(b){a.httpRequest.onerror()}}},d.delayLoadingTime-H)}()}function d(a){a.request&&c(a,m.getRetryAttemptsForType(a.request.type))}function f(){t.forEach(function(a){return clearTimeout(a)}),t=[],s.forEach(function(a){return clearTimeout(a.delayTimeout)}),s=[],r.forEach(function(a){a.onloadend=a.onerror=a.onprogress=void 0,a.loader.abort(a),a.onabort()}),r=[]}a=a||{};var g=this.context,i=a.errHandler,l=a.metricsModel,m=a.mediaPlayerModel,n=a.requestModifier,p=a.useFetch||!1,q=void 0,r=void 0,s=void 0,t=void 0,u=void 0;return q={load:d,abort:f},b(),q}Object.defineProperty(c,"__esModule",{value:!0});var g=a(121),h=d(g),i=a(119),j=d(i),k=a(182),l=a(46),m=d(l),n=a(150),o=d(n);f.__dashjs_factory_name="HTTPLoader";var p=m.default.getClassFactory(f);c.default=p,b.exports=c.default},{119:119,121:121,150:150,182:182,46:46}],121:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){var b=new Date,c=a.request,e=new XMLHttpRequest;e.open(a.method,a.url,!0),c.responseType&&(e.responseType=c.responseType),c.range&&e.setRequestHeader("Range","bytes="+c.range),c.requestStartDate||(c.requestStartDate=b),d&&(e=d.modifyRequestHeader(e)),e.withCredentials=a.withCredentials,e.onload=a.onload,e.onloadend=a.onend,e.onerror=a.onerror,e.onprogress=a.progress,e.onabort=a.onabort,e.send(),a.response=e}function c(a){a.response.abort()}a=a||{};var d=a.requestModifier;return{load:b,abort:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="XHRLoader";var h=g.default.getClassFactory(e);c.default=h,b.exports=c.default},{46:46}],122:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b){var c=b&&b.droppedVideoFrames?b.droppedVideoFrames:0,g=b&&b.totalVideoFrames?b.totalVideoFrames:0,h=c-e;e=c;var i=g-f;f=g,isNaN(a)||(d[a]?(d[a].droppedVideoFrames+=h,d[a].totalVideoFrames+=i):d[a]={droppedVideoFrames:h,totalVideoFrames:i})}function b(){return d}function c(a){d=[],e=a.droppedVideoFrames,f=a.totalVideoFrames}var d=[],e=0,f=0;return{push:a,getFrameHistory:b,reset:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="DroppedFramesHistory";var h=g.default.getClassFactory(e);c.default=h,b.exports=c.default},{46:46}],123:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){return n.mediaInfo.type}function c(){return n.mediaInfo.streamInfo}function d(){return n.mediaInfo}function e(){return n}function f(){return m}function g(){return l}function h(){return o}function i(){return p}function j(){return q}function k(){return r}a=a||{};var l=a.abrController,m=a.streamProcessor,n=a.streamProcessor.getCurrentRepresentationInfo(),o=a.switchHistory,p=a.droppedFramesHistory,q=a.currentRequest,r=a.useBufferOccupancyABR;return{getMediaType:b,getMediaInfo:d,getDroppedFramesHistory:i,getCurrentRequest:j,getSwitchHistory:h,getStreamInfo:c,getStreamProcessor:f,getAbrController:g,getRepresentationInfo:e,useBufferOccupancyABR:k}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="RulesContext",c.default=g.default.getClassFactory(e),b.exports=c.default},{46:46}],124:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){function d(a){var b=i.DEFAULT;return a!==i.DEFAULT&&a!==i.STRONG&&a!==i.WEAK||(b=a),b}var e=void 0,f=void 0,g=void 0;return e=void 0===a?h:a,f=d(c),g=void 0===b?null:b,{quality:e,reason:g,priority:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=-1,i={DEFAULT:.5,STRONG:1,WEAK:0};e.__dashjs_factory_name="SwitchRequest";var j=g.default.getClassFactory(e);j.NO_CHANGE=h,j.PRIORITY=i,g.default.updateClassFactory(e.__dashjs_factory_name,j),c.default=j,b.exports=c.default},{46:46}],125:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){a.newValue===i.default.NO_CHANGE&&(a.newValue=a.oldValue),d[a.oldValue]||(d[a.oldValue]={noDrops:0,drops:0,dropSize:0});var b=a.newValue-a.oldValue,c=b<0?1:0,f=c?-b:0,g=c?0:1;if(d[a.oldValue].drops+=c,d[a.oldValue].dropSize+=f,d[a.oldValue].noDrops+=g,e.push({idx:a.oldValue,noDrop:g,drop:c,dropSize:f}),e.length>j){
|
26 |
-
var h=e.shift();d[h.idx].drops-=h.drop,d[h.idx].dropSize-=h.dropSize,d[h.idx].noDrops-=h.noDrop}}function b(){return d}function c(){d=[],e=[]}var d=[],e=[];return{push:a,getSwitchRequests:b,reset:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(124),i=d(h),j=8;e.__dashjs_factory_name="SwitchRequestHistory";var k=g.default.getClassFactory(e);c.default=k,b.exports=c.default},{124:124,46:46}],126:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){F={throughputHalfLife:{fast:x,slow:w},latencyHalfLife:{fast:z,slow:y}},p()}function c(a,b,c){return a===g.default.VIDEO?c<A.getCacheLoadThresholdForType(g.default.VIDEO):a===g.default.AUDIO?c<A.getCacheLoadThresholdForType(g.default.AUDIO):void 0}function d(a,b,d){if(b.trace&&b.trace.length){var f=b.tresponse.getTime()-b.trequest.getTime()||1,g=b._tfinish.getTime()-b.tresponse.getTime()||1,h=b.trace.reduce(function(a,b){return a+b.b[0]},0),i=d?g:f+g,j=Math.round(8*h/i);if(n(a),c(a,f,g)){if(B[a].length>0&&!B[a].hasCachedEntries)return;B[a].hasCachedEntries=!0}else B[a]&&B[a].hasCachedEntries&&o(a);B[a].push(j),B[a].length>q&&B[a].shift(),C[a].push(f),C[a].length>q&&C[a].shift(),e(D[a],j,.001*g,F.throughputHalfLife),e(E[a],f,1,F.latencyHalfLife)}}function e(a,b,c,d){var e=Math.pow(.5,c/d.fast);a.fastEstimate=(1-e)*b+e*a.fastEstimate;var f=Math.pow(.5,c/d.slow);a.slowEstimate=(1-f)*b+f*a.slowEstimate,a.totalWeight+=c}function f(a,b,c){var d=void 0,e=void 0;if(a?(d=B[b],e=c?r:s):(d=C[b],e=t),d){if(e>=d.length)e=d.length;else if(a)for(var f=1;f<e;++f){var g=d[f]/d[f-1];if((g>=v||g<=1/u)&&(e+=1)===d.length)break}}else e=0;return e}function h(a,b,c){return A.getMovingAverageMethod()!==g.default.MOVING_AVERAGE_SLIDING_WINDOW?j(a,b):i(a,b,c)}function i(a,b,c){var d=f(a,b,c),e=a?B:C,g=e[b];return 0!==d&&g&&0!==g.length?(g=g.slice(-d),g.reduce(function(a,b){return a+b})/g.length):NaN}function j(a,b){var c=a?F.throughputHalfLife:F.latencyHalfLife,d=a?D[b]:E[b];if(!d||d.totalWeight<=0)return NaN;var e=d.fastEstimate/(1-Math.pow(.5,d.totalWeight/c.fast)),f=d.slowEstimate/(1-Math.pow(.5,d.totalWeight/c.slow));return a?Math.min(e,f):Math.max(e,f)}function k(a,b){return h(!0,a,b)}function l(a,b){var c=k(a,b);return isNaN(c)||(c*=A.getBandwidthSafetyFactor()),c}function m(a){return h(!1,a)}function n(a){B[a]=B[a]||[],C[a]=C[a]||[],D[a]=D[a]||{fastEstimate:0,slowEstimate:0,totalWeight:0},E[a]=E[a]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function o(a){delete B[a],delete C[a],delete D[a],delete E[a],n(a)}function p(){B={},C={},D={},E={}}a=a||{};var q=20,r=3,s=4,t=4,u=1.3,v=1.3,w=8,x=3,y=2,z=1,A=a.mediaPlayerModel,B=void 0,C=void 0,D=void 0,E=void 0,F=void 0,G={push:d,getAverageThroughput:k,getSafeAverageThroughput:l,getAverageLatency:m,reset:p};return b(),G}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(46),i=d(h);e.__dashjs_factory_name="ThroughputHistory",c.default=i.default.getClassFactory(e),b.exports=c.default},{46:46,97:97}],127:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){r=[],s=[],l.getUseDefaultABRRules()&&(r.push((0,q.default)(j).create({metricsModel:n,dashMetrics:p,mediaPlayerModel:l})),r.push((0,g.default)(j).create({metricsModel:n,dashMetrics:p})),r.push((0,i.default)(j).create({metricsModel:n,dashMetrics:p})),r.push((0,o.default)(j).create()),r.push((0,m.default)(j).create()),s.push((0,k.default)(j).create({metricsModel:n,dashMetrics:p,mediaPlayerModel:l}))),l.getABRCustomRules().forEach(function(a){a.type===v&&r.push(a.rule(j).create()),a.type===w&&s.push(a.rule(j).create())})}function c(a){return a.filter(function(a){return a.quality>u.default.NO_CHANGE})}function d(a){var b={},c=void 0,d=void 0,e=void 0,f=void 0,g=void 0;if(0!==a.length){for(b[u.default.PRIORITY.STRONG]=u.default.NO_CHANGE,b[u.default.PRIORITY.WEAK]=u.default.NO_CHANGE,b[u.default.PRIORITY.DEFAULT]=u.default.NO_CHANGE,c=0,d=a.length;c<d;c+=1)e=a[c],e.quality!==u.default.NO_CHANGE&&(b[e.priority]=b[e.priority]>u.default.NO_CHANGE?Math.min(b[e.priority],e.quality):e.quality);return b[u.default.PRIORITY.WEAK]!==u.default.NO_CHANGE&&(f=b[u.default.PRIORITY.WEAK]),b[u.default.PRIORITY.DEFAULT]!==u.default.NO_CHANGE&&(f=b[u.default.PRIORITY.DEFAULT]),b[u.default.PRIORITY.STRONG]!==u.default.NO_CHANGE&&(f=b[u.default.PRIORITY.STRONG]),f!==u.default.NO_CHANGE&&(g=f),(0,u.default)(j).create(g)}}function e(a){return d(c(r.map(function(b){return b.getMaxIndex(a)})))||(0,u.default)(j).create()}function f(a){return d(c(s.map(function(b){return b.shouldAbandon(a)})))||(0,u.default)(j).create()}function h(){[r,s].forEach(function(a){a&&a.length&&a.forEach(function(a){return a.reset&&a.reset()})}),r=[],s=[]}a=a||{};var j=this.context,l=a.mediaPlayerModel,n=a.metricsModel,p=a.dashMetrics,r=void 0,s=void 0;return{initialize:b,reset:h,getMaxQuality:e,shouldAbandonFragment:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(133),g=d(f),h=a(131),i=d(h),j=a(128),k=d(j),l=a(130),m=d(l),n=a(132),o=d(n),p=a(129),q=d(p),r=a(46),s=d(r),t=a(124),u=d(t),v="qualitySwitchRules",w="abandonFragmentRules";e.__dashjs_factory_name="ABRRulesCollection";var x=s.default.getClassFactory(e);x.QUALITY_SWITCH_RULES=v,x.ABANDON_FRAGMENT_RULES=w,s.default.updateSingletonFactory(e.__dashjs_factory_name,x),c.default=x,b.exports=c.default},{124:124,128:128,129:129,130:130,131:131,132:132,133:133,46:46}],128:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){h()}function c(a,b){r[a]=r[a]||{},r[a][b]=r[a][b]||{}}function d(a,b){t[a]=t[a]||[],t[a].push(b)}function f(a){var b=(0,g.default)(m).create(g.default.NO_CHANGE,{name:e.__dashjs_factory_name});if(!(a&&a.hasOwnProperty("getMediaInfo")&&a.hasOwnProperty("getMediaType")&&a.hasOwnProperty("getCurrentRequest")&&a.hasOwnProperty("getRepresentationInfo")&&a.hasOwnProperty("getAbrController")))return b;var f=a.getMediaInfo(),h=a.getMediaType(),k=a.getCurrentRequest();if(!isNaN(k.index)){c(h,k.index);var u=o.getStableBufferTime();if(q.getCurrentBufferLevel(p.getReadOnlyMetricsFor(h))>u)return b;var v=r[h][k.index];if(null===v||null===k.firstByteDate||s.hasOwnProperty(v.id))return b;if(void 0===v.firstByteTime&&(t[h]=[],v.firstByteTime=k.firstByteDate.getTime(),v.segmentDuration=k.duration,v.bytesTotal=k.bytesTotal,v.id=k.index),v.bytesLoaded=k.bytesLoaded,v.elapsedTime=(new Date).getTime()-v.firstByteTime,v.bytesLoaded>0&&v.elapsedTime>0&&d(h,Math.round(8*v.bytesLoaded/v.elapsedTime)),t[h].length>=l&&v.elapsedTime>j&&v.bytesLoaded<v.bytesTotal){var w=t[h].reduce(function(a,b){return a+b},0);if(v.measuredBandwidthInKbps=Math.round(w/t[h].length),v.estimatedTimeOfDownload=+(8*v.bytesTotal/v.measuredBandwidthInKbps/1e3).toFixed(2),v.estimatedTimeOfDownload<v.segmentDuration*i||0===a.getRepresentationInfo().quality)return b;if(!s.hasOwnProperty(v.id)){var x=a.getAbrController(),y=v.bytesTotal-v.bytesLoaded,z=x.getBitrateList(f),A=x.getQualityForBitrate(f,v.measuredBandwidthInKbps*o.getBandwidthSafetyFactor());y>v.bytesTotal*z[A].bitrate/z[x.getQualityFor(h,f.streamInfo)].bitrate&&(b.quality=A,b.reason.throughput=v.measuredBandwidthInKbps,b.reason.fragmentID=v.id,s[v.id]=v,n("AbandonRequestsRule ( ",h,"frag id",v.id,") is asking to abandon and switch to quality to ",A," measured bandwidth was",v.measuredBandwidthInKbps),delete r[h][v.id])}}else v.bytesLoaded===v.bytesTotal&&delete r[h][v.id]}return b}function h(){r={},s={},t=[]}a=a||{};var i=1.8,j=500,l=5,m=this.context,n=(0,k.default)(m).getInstance().log,o=a.mediaPlayerModel,p=a.metricsModel,q=a.dashMetrics,r=void 0,s=void 0,t=void 0,u={shouldAbandon:f,reset:h};return b(),u}Object.defineProperty(c,"__esModule",{value:!0});var f=a(124),g=d(f),h=a(46),i=d(h),j=a(44),k=d(j);e.__dashjs_factory_name="AbandonRequestsRule",c.default=i.default.getClassFactory(e),b.exports=c.default},{124:124,44:44,46:46}],129:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){H(),O.on(p.default.BUFFER_EMPTY,y,P),O.on(p.default.PLAYBACK_SEEKING,z,P),O.on(p.default.PERIOD_SWITCH_STARTED,A,P),O.on(p.default.MEDIA_FRAGMENT_LOADED,B,P),O.on(p.default.METRIC_ADDED,C,P),O.on(p.default.QUALITY_CHANGE_REQUESTED,E,P),O.on(p.default.FRAGMENT_LOADING_ABANDONED,F,P)}function c(a){return a.map(function(a){return Math.log(a)})}function d(a,b,c){var d=c.reduce(function(a,b,d){return b>c[a]?d:a},0);if(0===d)return null;var e=Math.max(a,v+w*b.length),f=(c[d]-1)/(e/v-1);return{gp:f,Vp:v/f}}function e(a){var b={},e=a.getMediaInfo(),g=e.bitrateList.map(function(a){return a.bandwidth}),h=c(g);h=h.map(function(a){return a-h[0]+1});var i=N.getStableBufferTime(),j=d(i,g,h);return j?(b.state=t,b.bitrates=g,b.utilities=h,b.stableBufferTime=i,b.Vp=j.Vp,b.gp=j.gp,b.lastQuality=0,f(b)):b.state=s,b}function f(a){a.placeholderBuffer=0,a.mostAdvancedSegmentStart=NaN,a.lastSegmentWasReplacement=!1,a.lastSegmentStart=NaN,a.lastSegmentDurationS=NaN,a.lastSegmentRequestTimeMs=NaN,a.lastSegmentFinishTimeMs=NaN}function h(a,b){var c=N.getStableBufferTime();if(a.stableBufferTime!==c){var e=d(c,a.bitrates,a.utilities);if(e.Vp!==a.Vp||e.gp!==a.gp){var f=L.getCurrentBufferLevel(M.getReadOnlyMetricsFor(b)),g=f+a.placeholderBuffer;g-=v,g*=e.Vp/a.Vp,g+=v,a.stableBufferTime=c,a.Vp=e.Vp,a.gp=e.gp,a.placeholderBuffer=Math.max(0,g-f)}}}function j(a){var b=a.getMediaType(),c=Q[b];return c?c.state!==s&&h(c,b):(c=e(a),Q[b]=c),c}function k(a,b){for(var c=a.bitrates.length,d=NaN,e=NaN,f=0;f<c;++f){var g=(a.Vp*(a.utilities[f]+a.gp)-b)/a.bitrates[f];(isNaN(e)||g>=e)&&(e=g,d=f)}return d}function m(a,b){return a.Vp*(a.utilities[b]+a.gp)}function o(a,b){for(var c=a.bitrates[b],d=a.utilities[b],e=0,f=b-1;f>=0;--f)if(a.utilities[f]<a.utilities[b]){var g=a.bitrates[f],h=a.utilities[f],i=a.Vp*(a.gp+(c*h-g*d)/(c-g));e=Math.max(e,i)}return e}function q(a,b){var c=Date.now();if(isNaN(a.lastSegmentFinishTimeMs)){if(!isNaN(a.lastCallTimeMs)){var d=.001*(c-a.lastCallTimeMs);a.placeholderBuffer+=Math.max(0,d)}}else{var d=.001*(c-a.lastSegmentFinishTimeMs);a.placeholderBuffer+=Math.max(0,d)}a.lastCallTimeMs=c,a.lastSegmentStart=NaN,a.lastSegmentRequestTimeMs=NaN,a.lastSegmentFinishTimeMs=NaN,h(a,b)}function y(){for(var a in Q)Q.hasOwnProperty(a)&&Q[a].state===u&&(Q[a].placeholderBuffer=0)}function z(){for(var a in Q)if(Q.hasOwnProperty(a)){var b=Q[a];b.state!==s&&(b.state=t,f(b))}}function A(){}function B(a){if(a&&a.chunk&&a.chunk.mediaInfo){var b=Q[a.chunk.mediaInfo.type];if(b&&b.state!==s){var c=a.chunk.start;isNaN(b.mostAdvancedSegmentStart)||c>b.mostAdvancedSegmentStart?(b.mostAdvancedSegmentStart=c,b.lastSegmentWasReplacement=!1):b.lastSegmentWasReplacement=!0,b.lastSegmentStart=c,b.lastSegmentDurationS=a.chunk.duration,b.lastQuality=a.chunk.quality,D(b,a.chunk.mediaInfo.type)}}}function C(a){if(a&&a.metric===g.default.HTTP_REQUEST&&a.value&&a.value.type===l.HTTPRequest.MEDIA_SEGMENT_TYPE&&a.value.trace&&a.value.trace.length){var b=Q[a.mediaType];b&&b.state!==s&&(b.lastSegmentRequestTimeMs=a.value.trequest.getTime(),b.lastSegmentFinishTimeMs=a.value._tfinish.getTime(),D(b,a.mediaType))}}function D(a,b){if(!isNaN(a.lastSegmentStart)&&!isNaN(a.lastSegmentRequestTimeMs)&&!isNaN(a.placeholderBuffer)){if(a.placeholderBuffer*=x,!isNaN(a.lastSegmentFinishTimeMs)){var c=L.getCurrentBufferLevel(M.getReadOnlyMetricsFor(b)),d=c+.001*(a.lastSegmentFinishTimeMs-a.lastSegmentRequestTimeMs),e=m(a,a.lastQuality),f=Math.max(0,e-d);a.placeholderBuffer=Math.min(f,a.placeholderBuffer)}a.lastSegmentWasReplacement&&!isNaN(a.lastSegmentDurationS)&&(a.placeholderBuffer+=a.lastSegmentDurationS),a.lastSegmentStart=NaN,a.lastSegmentRequestTimeMs=NaN}}function E(a){if(a){var b=Q[a.mediaType];b&&b.state!==s&&(b.abrQuality=a.newQuality)}}function F(a){if(a){var b=Q[a.mediaType];if(b&&b.state!==s){var c=L.getCurrentBufferLevel(M.getReadOnlyMetricsFor(a.mediaType)),d=void 0;d=b.abrQuality>0?o(b,b.abrQuality):v;var e=Math.max(0,d-c);b.placeholderBuffer=Math.min(b.placeholderBuffer,e)}}}function G(a){var b=a.getMediaInfo(),c=a.getMediaType(),d=M.getReadOnlyMetricsFor(c),e=a.getStreamProcessor(),g=a.getStreamInfo(),h=a.getAbrController(),l=h.getThroughputHistory(),n=g?g.id:null,p=g&&g.manifestInfo&&g.manifestInfo.isDynamic,r=a.useBufferOccupancyABR(),v=(0,i.default)(J).create();if(v.reason=v.reason||{},!r)return v;e.getScheduleController().setTimeToLoadDelay(0);var w=j(a);if(w.state===s)return v;var x=L.getCurrentBufferLevel(d),y=l.getAverageThroughput(c,p),z=l.getSafeAverageThroughput(c,p),A=l.getAverageLatency(c),B=void 0;if(v.reason.state=w.state,v.reason.throughput=y,v.reason.latency=A,isNaN(y))return v;switch(w.state){case t:B=h.getQualityForBitrate(b,z,A),v.quality=B,v.reason.throughput=z,w.placeholderBuffer=Math.max(0,o(w,B)-x),w.lastQuality=B,!isNaN(w.lastSegmentDurationS)&&x>=w.lastSegmentDurationS&&(w.state=u);break;case u:q(w,c),B=k(w,x+w.placeholderBuffer);var C=h.getQualityForBitrate(b,z,A);B>w.lastQuality&&B>C&&(B=Math.max(C,w.lastQuality));var D=Math.max(0,x+w.placeholderBuffer-m(w,B));D<=w.placeholderBuffer?(w.placeholderBuffer-=D,D=0):(D-=w.placeholderBuffer,w.placeholderBuffer=0,B<h.getTopQualityIndexFor(c,n)?e.getScheduleController().setTimeToLoadDelay(1e3*D):D=0),v.quality=B,v.reason.throughput=y,v.reason.latency=A,v.reason.bufferLevel=x,v.reason.placeholderBuffer=w.placeholderBuffer,v.reason.delay=D,w.lastQuality=B;break;default:K("BOLA ABR rule invoked in bad state."),v.quality=h.getQualityForBitrate(b,z,A),v.reason.state=w.state,v.reason.throughput=z,v.reason.latency=A,w.state=t,f(w)}return v}function H(){Q={}}function I(){H(),O.off(p.default.BUFFER_EMPTY,y,P),O.off(p.default.PLAYBACK_SEEKING,z,P),O.off(p.default.PERIOD_SWITCH_STARTED,A,P),O.off(p.default.MEDIA_FRAGMENT_LOADED,B,P),O.off(p.default.METRIC_ADDED,C,P),O.off(p.default.QUALITY_CHANGE_REQUESTED,E,P),O.off(p.default.FRAGMENT_LOADING_ABANDONED,F,P)}a=a||{};var J=this.context,K=(0,r.default)(J).getInstance().log,L=a.dashMetrics,M=a.metricsModel,N=a.mediaPlayerModel,O=(0,n.default)(J).getInstance(),P=void 0,Q=void 0;return P={getMaxIndex:G,reset:I},b(),P}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(124),i=d(h),j=a(46),k=d(j),l=a(182),m=a(45),n=d(m),o=a(49),p=d(o),q=a(44),r=d(q),s=0,t=1,u=2,v=10,w=2,x=.99;e.__dashjs_factory_name="BolaRule",c.default=k.default.getClassFactory(e),b.exports=c.default},{124:124,182:182,44:44,45:45,46:46,49:49,98:98}],130:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var f=a.getDroppedFramesHistory();if(f){for(var g=f.getFrameHistory(),h=0,j=0,k=i.default.NO_CHANGE,l=1;l<g.length;l++)if(g[l]&&(h=g[l].droppedVideoFrames,(j=g[l].totalVideoFrames)>e&&h/j>d)){k=l-1,c("DroppedFramesRule, index: "+k+" Dropped Frames: "+h+" Total Frames: "+j);break}return(0,i.default)(b).create(k,{droppedFrames:h})}return(0,i.default)(b).create()}var b=this.context,c=(0,k.default)(b).getInstance().log,d=.15,e=375;return{getMaxIndex:a}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(124),i=d(h),j=a(44),k=d(j);e.__dashjs_factory_name="DroppedFramesRule",c.default=g.default.getClassFactory(e),b.exports=c.default},{124:124,44:44,46:46}],131:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){f(),p.on(k.default.PLAYBACK_SEEKING,h,t)}function c(){if(!(r&&r.hasOwnProperty("getReadOnlyMetricsFor")&&s&&s.hasOwnProperty("getCurrentBufferLevel")))throw new Error("Missing config parameter(s)")}function d(a){var b=(0,q.default)(m).create();if(!a||!a.hasOwnProperty("getMediaType"))return b;c();var d=a.getMediaType(),f=r.getReadOnlyMetricsFor(d),h=f.BufferState.length>0?f.BufferState[f.BufferState.length-1]:null,i=a.getRepresentationInfo(),j=i.fragmentDuration;if(!h||!e(d,h)||!j)return b;if(h.state===g.default.BUFFER_EMPTY)n("Switch to index 0; buffer is empty."),b.quality=0,b.reason="InsufficientBufferRule: Buffer is empty";else{var k=a.getMediaInfo(),o=a.getAbrController(),p=o.getThroughputHistory(),t=s.getCurrentBufferLevel(f),u=p.getAverageThroughput(d),v=p.getAverageLatency(d),w=u*(t/j)*l;b.quality=o.getQualityForBitrate(k,w,v),b.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return b}function e(a,b){u[a]=u[a]||{};var c=!1;return u[a].firstBufferLoadedEvent?c=!0:b&&b.state===g.default.BUFFER_LOADED&&(u[a].firstBufferLoadedEvent=!0,c=!0),c}function f(){u={}}function h(){f()}function j(){f(),p.off(k.default.PLAYBACK_SEEKING,h,t)}a=a||{};var l=.5,m=this.context,n=(0,o.default)(m).getInstance().log,p=(0,i.default)(m).getInstance(),r=a.metricsModel,s=a.dashMetrics,t=void 0,u=void 0;return t={getMaxIndex:d,reset:j},b(),t}Object.defineProperty(c,"__esModule",{value:!0});var f=a(102),g=d(f),h=a(45),i=d(h),j=a(49),k=d(j),l=a(46),m=d(l),n=a(44),o=d(n),p=a(124),q=d(p);e.__dashjs_factory_name="InsufficientBufferRule",c.default=m.default.getClassFactory(e),b.exports=c.default},{102:102,124:124,44:44,45:45,46:46,49:49}],132:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){for(var f=a?a.getSwitchHistory():null,g=f?f.getSwitchRequests():[],h=0,i=0,j=0,l=(0,k.default)(b).create(),m=0;m<g.length;m++)if(void 0!==g[m]&&(h+=g[m].drops,i+=g[m].noDrops,j+=g[m].dropSize,h+i>=e&&h/i>d)){l.quality=m>0&&g[m].drops>0?m-1:m,l.reason={index:l.quality,drops:h,noDrops:i,dropSize:j},c("Switch history rule index: "+l.quality+" samples: "+(h+i)+" drops: "+h);break}return l}var b=this.context,c=(0,i.default)(b).getInstance().log,d=.075,e=6;return{getMaxIndex:a}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(44),i=d(h),j=a(124),k=d(j);e.__dashjs_factory_name="SwitchHistoryRule",c.default=g.default.getClassFactory(e),b.exports=c.default},{124:124,44:44,46:46}],133:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){if(!h||!h.hasOwnProperty("getReadOnlyMetricsFor"))throw new Error("Missing config parameter(s)")}function c(a){var c=(0,o.default)(e).create();if(!(a&&a.hasOwnProperty("getMediaInfo")&&a.hasOwnProperty("getMediaType")&&a.hasOwnProperty("useBufferOccupancyABR")&&a.hasOwnProperty("getAbrController")&&a.hasOwnProperty("getStreamProcessor")))return c;b();var d=a.getMediaInfo(),j=a.getMediaType(),k=h.getReadOnlyMetricsFor(j),l=a.getStreamProcessor(),m=a.getAbrController(),n=a.getStreamInfo(),p=n&&n.manifestInfo?n.manifestInfo.isDynamic:null,q=m.getThroughputHistory(),r=q.getSafeAverageThroughput(j,p),s=q.getAverageLatency(j),t=k.BufferState.length>0?k.BufferState[k.BufferState.length-1]:null,u=a.useBufferOccupancyABR();return!k||isNaN(r)||!t||u?c:(m.getAbandonmentStateFor(j)!==i.default.ABANDON_LOAD&&(t.state===g.default.BUFFER_LOADED||p)&&(c.quality=m.getQualityForBitrate(d,r,s),l.getScheduleController().setTimeToLoadDelay(0),f("ThroughputRule requesting switch to index: ",c.quality,"type: ",j,"Average throughput",Math.round(r),"kbps"),c.reason={throughput:r,latency:s}),c)}function d(){}a=a||{};var e=this.context,f=(0,m.default)(e).getInstance().log,h=a.metricsModel;return{getMaxIndex:c,reset:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(102),g=d(f),h=a(99),i=d(h),j=a(46),k=d(j),l=a(44),m=d(l),n=a(124),o=d(n);e.__dashjs_factory_name="ThroughputRule",c.default=k.default.getClassFactory(e),b.exports=c.default},{102:102,124:124,44:44,46:46,99:99}],134:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){}function c(a,b,c){return e.getCurrentBufferLevel(f.getReadOnlyMetricsFor(b))<d(a,b,c)}function d(a,b,c){var d=NaN,k=a.getCurrentRepresentationInfo();if(b===g.default.FRAGMENTED_TEXT)d=i.isTextEnabled()?k.fragmentDuration:0;else if(b===g.default.AUDIO&&c){var l=e.getCurrentBufferLevel(f.getReadOnlyMetricsFor(g.default.VIDEO));d=isNaN(k.fragmentDuration)?l:Math.max(l,k.fragmentDuration)}else{var m=k.mediaInfo.streamInfo;if(j.isPlayingAtTopQuality(m)){var n=m.manifestInfo.duration>=h.getLongFormContentDurationThreshold();d=n?h.getBufferTimeAtTopQualityLongForm():h.getBufferTimeAtTopQuality()}else d=h.getStableBufferTime()}return d}a=a||{};var e=a.dashMetrics,f=a.metricsModel,h=a.mediaPlayerModel,i=a.textController,j=a.abrController,k={execute:c,getBufferTarget:d};return b(),k}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(46),i=d(h);e.__dashjs_factory_name="BufferLevelRule",c.default=i.default.getClassFactory(e),b.exports=c.default},{46:46,97:97}],135:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b){var c=a.getCurrentRepresentationInfo(),h=c.mediaInfo,i=h.type,j=a.getScheduleController(),k=j.getSeekTarget(),l=!isNaN(k),n=a.getBufferController(),o=l?k:e.getIndexHandlerTime(a);if(isNaN(o)||i===g.default.FRAGMENTED_TEXT&&!f.isTextEnabled())return null;if(l&&j.setSeekTarget(NaN),n){var p=n.getRangeAt(o);null===p||l||(d("Prior to making a request for time, NextFragmentRequestRule is aligning index handler's currentTime with bufferedRange.end for",i,".",o,"was changed to",p.end),o=p.end)}var q=void 0;if(b)o=b.startTime+b.duration/2,q=e.getFragmentRequestForTime(a,c,o,{timeThreshold:0,ignoreIsFinished:!0});else{for(q=e.getFragmentRequestForTime(a,c,o,{keepIdx:!l});q&&q.action!==m.default.ACTION_COMPLETE&&a.getFragmentModel().isFragmentLoaded(q);)q=e.getNextFragmentRequest(a,c);q&&(isNaN(q.startTime+q.duration)||e.setIndexHandlerTime(a,q.startTime+q.duration),q.delayLoadingTime=(new Date).getTime()+j.getTimeToLoadDelay(),j.setTimeToLoadDelay(0))}return q}a=a||{};var c=this.context,d=(0,i.default)(c).getInstance().log,e=a.adapter,f=a.textController;return{execute:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(44),i=d(h),j=a(46),k=d(j),l=a(164),m=d(l);e.__dashjs_factory_name="NextFragmentRequestRule",c.default=k.default.getClassFactory(e),b.exports=c.default},{164:164,44:44,46:46,97:97}],136:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){for(var b="",c=0;c<a.length;++c){b+=a[c].uchar}return b.length-b.replace(/^\s+/,"").length}function b(a){return"left: "+3.125*a.x+"%; top: "+6.66*a.y1+"%; width: "+(100-3.125*a.x)+"%; height: "+6.66*Math.max(a.y2-1-a.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function c(a){return"red"===a?"rgb(255, 0, 0)":"green"===a?"rgb(0, 255, 0)":"blue"===a?"rgb(0, 0, 255)":"cyan"===a?"rgb(0, 255, 255)":"magenta"===a?"rgb(255, 0, 255)":"yellow"===a?"rgb(255, 255, 0)":"white"===a?"rgb(255, 255, 255)":"black"===a?"rgb(0, 0, 0)":a}function d(a,b){var d=a.videoHeight/15;return b?"font-size: "+d+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(b.foreground?c(b.foreground):"rgb(255, 255, 255)")+"; font-style: "+(b.italics?"italic":"normal")+"; text-decoration: "+(b.underline?"underline":"none")+"; white-space: pre; background-color: "+(b.background?c(b.background):"transparent")+";":"font-size: "+d+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function e(a){return a.replace(/^\s+/g,"")}function f(a){return a.replace(/\s+$/g,"")}function g(c,g,i,j){var k=null,l=null,m=!1,n=-1,o={start:g,end:i,spans:[]},p="style_cea608_white_black",q={},r={},s=[],t=void 0,u=void 0;for(t=0;t<15;++t){var v=j.rows[t],w="",x=null;if(!1===v.isEmpty()){var y=a(v.chars);null===k&&(k={x:y,y1:t,y2:t+1,p:[]}),y!==n&&m&&(k.p.push(o),o={start:g,end:i,spans:[]},k.y2=t,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,!1===q.hasOwnProperty(k.name)?(s.push(k),q[k.name]=k):(l=q[k.name],l.p.contat(k.p)),k={x:y,y1:t,y2:t+1,p:[]});for(var z=0;z<v.chars.length;++z){var A=v.chars[z],B=A.penState;if(null===x||!B.equals(x)){w.trim().length>0&&(o.spans.push({name:p,line:w,row:t}),w="");var C="style_cea608_"+B.foreground+"_"+B.background;B.underline&&(C+="_underline"),B.italics&&(C+="_italics"),r.hasOwnProperty(C)||(r[C]=JSON.parse(JSON.stringify(B))),x=B,p=C}w+=A.uchar}w.trim().length>0&&o.spans.push({name:p,line:w,row:t}),m=!0,n=y}else m=!1,n=-1,k&&(k.p.push(o),o={start:g,end:i,spans:[]},k.y2=t,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,!1===q.hasOwnProperty(k.name)?(s.push(k),q[k.name]=k):(l=q[k.name],l.p.contat(k.p)),k=null)}k&&(k.p.push(o),k.y2=t+1,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,!1===q.hasOwnProperty(k.name)?(s.push(k),q[k.name]=k):(l=q[k.name],l.p.contat(k.p)),k=null);var D=[];for(t=0;t<s.length;++t){var E=s[t],F="sub_cea608_"+h++,G=document.createElement("div");G.id=F;var H=b(E);G.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+H;var I=document.createElement("div");I.className="paragraph bodyStyle",I.style.cssText=d(c);var J=document.createElement("div");J.className="cueUniWrapper",J.style.cssText="unicode-bidi: normal; direction: ltr;";for(var K=0;K<E.p.length;++K){var L=E.p[K],M=0;for(u=0;u<L.spans.length;++u){var N=L.spans[u];if(N.line.length>0){if(0!==u&&M!=N.row){var O=document.createElement("br");O.className="lineBreak",J.appendChild(O)}var P=!1;M===N.row&&(P=!0),M=N.row;var Q=r[N.name],R=document.createElement("span");R.className="spanPadding "+N.name+" customSpanColor",R.style.cssText=d(c,Q),0!==u&&P?u===L.spans.length-1?R.textContent=f(N.line):R.textContent=N.line:L.spans.length>1&&u<L.spans.length-1&&N.row===L.spans[u+1].row?R.textContent=e(N.line):R.textContent=N.line.trim(),J.appendChild(R)}}}I.appendChild(J),G.appendChild(I);var S={bodyStyle:["%",90]};for(u in r)r.hasOwnProperty(u)&&(S[u]=["%",90]);D.push({type:"html",start:g,end:i,cueHTMLElement:G,cueID:F,cellResolution:[32,15],isFromCEA608:!0,regions:s,regionID:E.name,videoHeight:c.videoHeight,videoWidth:c.videoWidth,fontSize:S,lineHeight:{},linePadding:{}})}return D}var h=0;return{createHTMLCaptionsFromScreen:g}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="EmbeddedTextHtmlRender",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{46:46}],137:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){J=!1,K=null,M=null,I=!1,C.on(k.default.DATA_UPDATE_COMPLETED,x,H),C.on(k.default.INIT_FRAGMENT_LOADED,y,H)}function c(){return t}function d(a){j(a),M=G.getRepresentationController(),N=(0,o.default)(B).getInstance()}function e(a){try{if(L=(0,q.default)(B).create(K,a),!J){var b=L.getBuffer();b.hasOwnProperty(g.default.INITIALIZE)&&b.initialize(F,G),J=!0}}catch(c){if(a.isText||-1!==a.codec.indexOf('codecs="stpp')||-1!==a.codec.indexOf('codecs="wvtt'))try{L=D.getTextSourceBuffer()}catch(c){E.mediaSourceError("Error creating "+F+" source buffer.")}else E.mediaSourceError("Error creating "+F+" source buffer.")}}function f(){return F}function h(){return L}function j(a){K=a}function l(){return K}function m(){return G}function n(){return!1}function p(){}function r(){}function u(){return 0}function v(){return I}function w(a){C.off(k.default.DATA_UPDATE_COMPLETED,x,H),C.off(k.default.INIT_FRAGMENT_LOADED,y,H),!a&&L&&(L.abort(),L.reset(),L=null)}function x(a){a.sender.getStreamProcessor()===G&&C.trigger(k.default.TIMED_TEXT_REQUESTED,{index:0,sender:a.sender})}function y(a){a.fragmentModel===G.getFragmentModel()&&a.chunk.bytes&&(N.save(a.chunk),L.append(a.chunk))}function z(a,b){var c=N.extract(a,b);c?L.append(c):C.trigger(k.default.INIT_REQUESTED,{sender:H})}function A(){return null}a=a||{};var B=this.context,C=(0,i.default)(B).getInstance(),D=(0,s.default)(B).getInstance(),E=a.errHandler,F=a.type,G=a.streamProcessor,H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0;return H={getBufferControllerType:c,initialize:d,createBuffer:e,getType:f,getStreamProcessor:m,setSeekStartTime:r,getBuffer:h,getBufferLevel:u,setMediaSource:j,getMediaSource:l,getIsBufferingCompleted:v,getIsPruningInProgress:n,dischargePreBuffer:p,switchInitData:z,getRangeAt:A,reset:w},b(),H}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(45),i=d(h),j=a(49),k=d(j),l=a(46),m=d(l),n=a(151),o=d(n),p=a(93),q=d(p),r=a(139),s=d(r),t="NotFragmentedTextBufferController";e.__dashjs_factory_name=t,c.default=m.default.getClassFactory(e),b.exports=c.default},{139:139,151:151,45:45,46:46,49:49,93:93,97:97}],138:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){x=a.type===g.default.FRAGMENTED_TEXT?(0,k.default)(w).create({type:a.type,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,manifestModel:a.manifestModel,errHandler:a.errHandler,streamController:a.streamController,mediaController:a.mediaController,adapter:a.adapter,textController:a.textController,abrController:a.abrController,playbackController:a.playbackController,streamProcessor:a.streamProcessor}):(0,m.default)(w).create({type:a.type,errHandler:a.errHandler,streamProcessor:a.streamProcessor})}function c(){return x.getBufferControllerType()}function d(a,b){return x.initialize(a,b)}function e(a){return x.createBuffer(a)}function f(){return x.getType()}function h(){return x.getBuffer()}function i(a){x.setBuffer(a)}function j(){return x.getMediaSource()}function l(a){x.setMediaSource(a)}function n(){x.getStreamProcessor()}function o(a){x.setSeekStartTime(a)}function p(){return x.getBufferLevel()}function q(a){x.reset(a)}function r(){return x.getIsBufferingCompleted()}function s(a,b){x.switchInitData(a,b)}function t(){return x.getIsPruningInProgress()}function u(){return x.dischargePreBuffer()}function v(a){return x.getRangeAt(a)}a=a||{};var w=this.context,x=void 0,y=void 0;return y={getBufferControllerType:c,initialize:d,createBuffer:e,getType:f,getStreamProcessor:n,setSeekStartTime:o,getBuffer:h,setBuffer:i,getBufferLevel:p,setMediaSource:l,getMediaSource:j,getIsBufferingCompleted:r,getIsPruningInProgress:t,dischargePreBuffer:u,switchInitData:s,getRangeAt:v,reset:q},b(),y}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(46),i=d(h),j=a(102),k=d(j),l=a(137),m=d(l);e.__dashjs_factory_name="TextBufferController",c.default=i.default.getClassFactory(e),b.exports=c.default},{102:102,137:137,46:46,97:97}],139:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){L="",M=-1,N=!0,P=!1,H=(0,m.default)(y).getInstance(),I=(0,o.default)(y).getInstance(),J=(0,q.default)(y).getInstance(),A=(0,k.default)(y).getInstance(),K=(0,s.default)(y).getInstance(),H.initialize(),K.on(u.default.TEXT_TRACKS_QUEUE_INITIALIZED,i,z),w()}function b(a){a&&(a.errHandler&&(B=a.errHandler),a.dashManifestModel&&(C=a.dashManifestModel),a.manifestModel&&(D=a.manifestModel),a.mediaController&&(E=a.mediaController),a.videoModel&&(F=a.videoModel),a.streamController&&(G=a.streamController),a.textTracks&&(H=a.textTracks),a.vttParser&&(I=a.vttParser),a.ttmlParser&&(J=a.ttmlParser),A.setConfig({errHandler:B,dashManifestModel:C,manifestModel:D,mediaController:E,videoModel:F,streamController:G,textTracks:H,vttParser:I,ttmlParser:J}))}function c(){return A}function d(){return O}function e(a){A.addEmbeddedTrack(a)}function f(a){"string"==typeof a&&(L=a)}function h(){return L}function i(a){var b=this,c=a.tracks,d=a.index;c.some(function(a,c){if(a.lang===L)return b.setTextTrack(c),d=c,!0}),N||this.setTextTrack(-1),M=d,K.trigger(u.default.TEXT_TRACKS_ADDED,{enabled:p(),index:d,tracks:c})}function j(a){"boolean"==typeof a&&(N=a)}function l(){return N}function n(a){"boolean"==typeof a&&p()!==a&&(a&&this.setTextTrack(M),a||(M=this.getCurrentTrackIdx(),this.setTextTrack(-1)))}function p(){var a=!0;return O&&!P&&(a=!1),a}function r(a){"boolean"==typeof a&&(P=a)}function t(a){var b=A.getConfig(),c=b.fragmentModel,d=b.fragmentedTracks,e=H.getCurrentTrackIdx();if(e!==a){H.setModeForTrackIdx(e,g.default.TEXT_HIDDEN),H.setCurrentTrackIdx(a),
|
27 |
-
H.setModeForTrackIdx(a,g.default.TEXT_SHOWING);var f=H.getCurrentTrackInfo();if(f&&f.isFragmented&&!f.isEmbedded)for(var h=0;h<d.length;h++){var i=d[h];if(f.lang===i.lang&&f.index===i.index&&(!f.label||f.label===i.id)){var j=E.getCurrentTrackFor(g.default.FRAGMENTED_TEXT,G.getActiveStreamInfo());i!==j&&(c.abortRequests(),c.removeExecutedRequestsBeforeTime(),A.remove(),H.deleteCuesFromTrackIdx(e),E.setTrack(i),A.setCurrentFragmentedTrackIdx(h))}}}O=-1===a}function v(){return H.getCurrentTrackIdx()}function w(){O=!1}function x(){w(),A.resetEmbedded()}var y=this.context,z=void 0,A=void 0,B=void 0,C=void 0,D=void 0,E=void 0,F=void 0,G=void 0,H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0;return z={setConfig:b,getTextSourceBuffer:c,getAllTracksAreDisabled:d,addEmbeddedTrack:e,getTextDefaultLanguage:h,setTextDefaultLanguage:f,setTextDefaultEnabled:j,getTextDefaultEnabled:l,enableText:n,isTextEnabled:p,setTextTrack:t,getCurrentTrackIdx:v,enableForcedTextStreaming:r,reset:x},a(),z}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(46),i=d(h),j=a(140),k=d(j),l=a(141),m=d(l),n=a(158),o=d(n),p=a(156),q=d(p),r=a(45),s=d(r),t=a(49),u=d(t);e.__dashjs_factory_name="TextController",c.default=i.default.getSingletonFactory(e),b.exports=c.default},{140:140,141:141,156:156,158:158,45:45,46:46,49:49,97:97}],140:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b){if(K=null,R=null,S=!1,T=NaN,U=[],X=null,C||d(),O=b.getMediaInfoArr(),P.setConfig({videoModel:V}),P.initialize(),Q=!H.getIsTextTrack(a),E=(0,n.default)(w).getInstance(),N=(0,l.default)(w).getInstance(),N.setConfig({boxParser:E}),Q){R=b.getFragmentModel(),this.buffered=(0,p.default)(w).create(),U=J.getTracksFor(g.default.FRAGMENTED_TEXT,W.getActiveStreamInfo());for(var c=J.getCurrentTrackFor(g.default.FRAGMENTED_TEXT,W.getActiveStreamInfo()),e=0;e<U.length;e++)if(U[e]===c){Y=e;break}}}function b(){P.deleteAllTextTracks(),K=null,N=null,O=null,P=null,Q=!1,R=null,S=!1,T=NaN,U=[],V=null,W=null,C=!1,Z=null}function c(a){var b=a.chunk;b.mediaInfo.embeddedCaptions&&o(b.bytes,b)}function d(){Z=[],O=[],P=(0,v.default)(w).getInstance(),P.setConfig({videoModel:V}),P.initialize(),E=(0,n.default)(w).getInstance(),N=(0,l.default)(w).getInstance(),N.setConfig({boxParser:E}),Q=!1,Y=null,$=!1,_=0,ca=[],ba=[],aa=null,C=!0,da=(0,x.default)(w).getInstance();var a=W.getActiveStreamProcessors();for(var b in a)if("video"===a[b].getType()){ea=a[b].getCurrentRepresentationInfo().MSETimeOffset;break}A.on(F.default.VIDEO_CHUNK_RECEIVED,c,this)}function e(){A.off(F.default.VIDEO_CHUNK_RECEIVED,c,this),P&&P.deleteAllTextTracks(),C=!1,Z=[],ca=[null,null],ba=[],aa=null}function f(a){if(C||d(),a.id===g.default.CC1||a.id===g.default.CC3){for(var b=0;b<Z.length;b++)if(Z[b].id===a.id)return;Z.push(a)}else y("Warning: Embedded track "+a.id+" not supported!")}function i(a){a&&(a.errHandler&&(G=a.errHandler),a.dashManifestModel&&(H=a.dashManifestModel),a.manifestModel&&(I=a.manifestModel),a.mediaController&&(J=a.mediaController),a.videoModel&&(V=a.videoModel),a.streamController&&(W=a.streamController),a.textTracks&&(P=a.textTracks),a.vttParser&&(L=a.vttParser),a.ttmlParser&&(M=a.ttmlParser))}function k(){return{errHandler:G,dashManifestModel:H,mediaController:J,videoModel:V,fragmentModel:R,streamController:W,textTracks:P,isFragmented:Q,embeddedTracks:Z,fragmentedTracks:U}}function m(a){Y=a}function o(a,b){function c(a,b){var c=new j.default,d={subtitle:"subtitles",caption:"captions"},e=function(){var a=b.roles.length>0?d[b.roles[0]]:d.caption;return a=a===d.caption||a===d.subtitle?a:d.caption},f=function(){var a=!1;return b.codec&&b.codec.search(g.default.STPP)>=0&&(a=!0),b.mimeType&&b.mimeType.search(g.default.TTML)>=0&&(a=!0),a};c.captionData=a,c.lang=b.lang,c.label=b.id,c.index=b.index,c.isTTML=f(),c.defaultTrack=r(b),c.isFragmented=Q,c.isEmbedded=!!b.isEmbedded,c.kind=e(),c.roles=b.roles;var h=(O?O.length:0)+Z.length;P.addTextTrack(c,h)}var d=void 0,e=void 0,f=void 0,i=void 0,k=void 0,l=void 0,m=void 0,n=b.mediaInfo,o=n.type,p=n.mimeType,t=n.codec||p;if(!t)return void y("No text type defined");if(o===g.default.FRAGMENTED_TEXT)if(S)if(l=N.getSamplesInfo(a),e=l.sampleList,!X&&e.length>0&&(X=e[0].cts-b.start*T),t.search(g.default.STPP)>=0)for(K=null!==K?K:s(t),f=0;f<e.length;f++){var u=e[f],v=u.cts,w=v-X;this.buffered.add(w/T,(w+u.duration)/T);var x=new DataView(a,u.offset,u.subSizes[0]);m=z.default.Utils.dataViewToString(x,g.default.UTF8);var A=[],C=u.offset+u.subSizes[0];for(i=1;i<u.subSizes.length;i++){var D=new Uint8Array(a,C,u.subSizes[i]),E=String.fromCharCode.apply(null,D);A.push(E),C+=u.subSizes[i]}try{var F=I.getValue(),H=F.ttmlTimeIsRelative?v/T:0;d=K.parse(m,H,v/T,(v+u.duration)/T,A),P.addCaptions(Y,X/T,d)}catch(oa){R.removeExecutedRequestsBeforeTime(),this.remove(),y("TTML parser error: "+oa.message)}}else{var J=[];for(f=0;f<e.length;f++){var u=e[f];u.cts-=X,this.buffered.add(u.cts/T,(u.cts+u.duration)/T);var L=a.slice(u.offset,u.offset+u.size),M=z.default.parseBuffer(L);for(i=0;i<M.boxes.length;i++){var U=M.boxes[i];if(y("VTT box1: "+U.type),"vtte"!==U.type&&"vttc"===U.type)for(y("VTT vttc boxes.length = "+U.boxes.length),k=0;k<U.boxes.length;k++){var W=U.boxes[k];if(y("VTT box2: "+W.type),"payl"===W.type){var $=W.cue_text;y("VTT cue_text = "+$);var ea=u.cts/T,fa=(u.cts+u.duration)/T;J.push({start:ea,end:fa,data:$,styles:{}}),y("VTT "+ea+"-"+fa+" : "+$)}}}}J.length>0&&P.addCaptions(Y,0,J)}else{for(S=!0,f=0;f<O.length;f++)c(null,O[f]);T=N.getMediaTimescaleFromMoov(a)}else if(o===g.default.TEXT){var x=new DataView(a,0,a.byteLength);m=z.default.Utils.dataViewToString(x,g.default.UTF8);try{d=s(t).parse(m,0),c(d,n)}catch(oa){G.timedTextError(oa,"parse",m)}}else if(o===g.default.VIDEO)if(b.segmentType===h.HTTPRequest.INIT_SEGMENT_TYPE){if(0===_)for(_=N.getMediaTimescaleFromMoov(a),f=0;f<Z.length;f++)c(null,Z[f])}else{if(0===_)return void y("CEA-608: No timescale for embeddedTextTrack yet");var ga=function(a,b){function c(a,c,d){var e=null;if(V.getTTMLRenderingDiv())e=da.createHTMLCaptionsFromScreen(V.getElement(),a,c,d);else{e=[{start:a,end:c,data:d.getDisplayText(),styles:{}}]}e&&P.addCaptions(b,0,e)}return c};l=N.getSamplesInfo(a);var ha=l.lastSequenceNumber;if(!ca[0]&&!ca[1]){var ia=void 0,ja=void 0;for(f=0;f<Z.length;f++){if(Z[f].id===g.default.CC1?(0,ja=P.getTrackIdxForId(g.default.CC1)):Z[f].id===g.default.CC3&&(1,ja=P.getTrackIdxForId(g.default.CC3)),-1===ja)return void y("CEA-608: data before track is ready.");ia=ga(this,ja),ca[f]=new B.default.Cea608Parser(f,{newCue:ia},null)}}if(_&&-1==ba.indexOf(ha)){if(null!==aa&&ha!==aa+l.numSequences)for(f=0;f<ca.length;f++)ca[f]&&ca[f].reset();for(var ka=q(a,l.sampleList),la=0;la<ca.length;la++){var ma=ka.fields[la],na=ca[la];if(na)for(f=0;f<ma.length;f++)na.addData(ma[f][0]/_,ma[f][1])}aa=ha,ba.push(ha)}}}function q(a,b){if(0===b.length)return null;for(var c={splits:[],fields:[[],[]]},d=new DataView(a),e=0;e<b.length;e++)for(var f=b[e],g=B.default.findCea608Nalus(d,f.offset,f.size),h=null,i=0,j=0;j<g.length;j++)for(var k=B.default.extractCea608DataFromRange(d,g[j]),l=0;l<2;l++)k[l].length>0&&(f.cts!==h?i=0:i+=1,c.fields[l].push([f.cts+ea*_,k[l],i]),h=f.cts);return c.fields.forEach(function(a){a.sort(function(a,b){return a[0]===b[0]?a[2]-b[2]:a[0]-b[0]})}),c}function r(a){var b=!1;return Z.length>1&&a.isEmbedded?b=a.id&&a.id===g.default.CC1:1===Z.length?a.id&&"CC"===a.id.substring(0,2)&&(b=!0):0===Z.length&&(b=a.index===O[0].index),b}function s(a){var b=void 0;return a.search(g.default.VTT)>=0?b=L:(a.search(g.default.TTML)>=0||a.search(g.default.STPP)>=0)&&(b=M),b}function u(a,b){void 0===a&&a===b&&(a=this.buffered.start(0),b=this.buffered.end(this.buffered.length-1)),this.buffered.remove(a,b)}var w=this.context,y=(0,t.default)(w).getInstance().log,A=(0,D.default)(w).getInstance(),C=!1,E=void 0,G=void 0,H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0,Q=void 0,R=void 0,S=void 0,T=void 0,U=void 0,V=void 0,W=void 0,X=void 0,Y=void 0,Z=void 0,$=void 0,_=void 0,aa=void 0,ba=void 0,ca=void 0,da=void 0,ea=void 0;return{initialize:a,append:o,abort:b,addEmbeddedTrack:f,resetEmbedded:e,setConfig:i,getConfig:k,setCurrentFragmentedTrackIdx:m,remove:u}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(182),i=a(174),j=d(i),k=a(70),l=d(k),m=a(145),n=d(m),o=a(147),p=d(o),q=a(46),r=d(q),s=a(44),t=d(s),u=a(141),v=d(u),w=a(136),x=d(w),y=a(9),z=d(y),A=a(2),B=d(A),C=a(45),D=d(C),E=a(49),F=d(E);e.__dashjs_factory_name="TextSourceBuffer",c.default=r.default.getSingletonFactory(e),b.exports=c.default},{136:136,141:141,145:145,147:147,174:174,182:182,2:2,44:44,45:45,46:46,49:49,70:70,9:9,97:97}],141:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(G=window.VTTCue||window.TextTrackCue,I=[],J=[],K=-1,L=0,M=0,N=0,O=0,P=null,Q=null,T=!1,V=2147483647,U=null,R=!!navigator.userAgent.match(/Chrome/)&&!navigator.userAgent.match(/Edge/),void 0!==document.fullscreenElement?S="fullscreenElement":void 0!==document.webkitIsFullScreen?S="webkitIsFullScreen":document.msFullscreenElement?S="msFullscreenElement":document.mozFullScreen&&(S="mozFullScreen"))}function b(a){var b=I[a].kind,c=void 0!==I[a].label?I[a].label:I[a].lang,d=I[a].lang,e=I[a].isTTML,f=I[a].isEmbedded,g=H.addTextTrack(b,c,d);return g.isEmbedded=f,g.isTTML=e,g}function c(a){T=a,P&&!document[S]&&(P.style.zIndex=a?V:null)}function d(a,c){if(I.length===c)return void F("Trying to add too many tracks.");if(I.push(a),I.length===c){I.sort(function(a,b){return a.index-b.index}),P=H.getTTMLRenderingDiv();for(var d=-1,e=0;e<I.length;e++){var f=b.call(this,e);J.push(f),I[e].defaultTrack&&(f.default=!0,d=e);var h=m(e);h&&(h.mode=g.default.TEXT_SHOWING,P&&(I[e].isTTML||I[e].isEmbedded)?h.renderingType="html":h.renderingType="default"),this.addCaptions(e,0,I[e].captionData),E.trigger(k.default.TEXT_TRACK_ADDED)}if(r.call(this,d),d>=0)for(var i=0;i<I.length;i++){var j=m(i);j&&(j.mode=i===d?g.default.TEXT_SHOWING:g.default.TEXT_HIDDEN)}E.trigger(k.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:K,tracks:I})}}function e(a,b,c,d,e,f){var g=a/b,h=c/d,i=0,j=0;g>h?(j=b,i=j/d*c):(i=a,j=i/c*d);var k=0,l=0,m=0,n=0;return i/j>e?(n=j,m=j*e):(m=i,n=i/e),k=(a-m)/2,l=(b-n)/2,f?{x:k+.1*m,y:l+.1*n,w:.8*m,h:.8*n}:{x:k,y:l,w:m,h:n}}function f(a,b){var c=H.getClientWidth(),d=H.getClientHeight(),f=H.getVideoWidth(),g=H.getVideoHeight(),h=H.getVideoRelativeOffsetTop(),i=H.getVideoRelativeOffsetLeft(),j=f/g,k=!1;a.isFromCEA608&&(j=3.5/3,k=!0);var l=e.call(this,c,d,f,g,j,k),m=l.w,n=l.h,o=l.x,p=l.y;if(m!=N||n!=O||o!=L||p!=M||b){L=o+i,M=p+h,N=m,O=n,P.style.left=L+"px",P.style.top=M+"px",P.style.width=N+"px",P.style.height=O+"px";for(var q=0;a.activeCues&&q<a.activeCues.length;++q){var r=a.activeCues[q];r.scaleCue(r)}S&&document[S]||T?P.style.zIndex=V:P.style.zIndex=null}}function h(a){var b=N,c=O,d=void 0,e=void 0,f=void 0,g=void 0,h=void 0;if(a.cellResolution){var i=[b/a.cellResolution[0],c/a.cellResolution[1]];if(a.linePadding)for(d in a.linePadding)if(a.linePadding.hasOwnProperty(d)){var k=a.linePadding[d];e=(k*i[0]).toString();for(var l=document.getElementsByClassName("spanPadding"),m=0;m<l.length;m++)l[m].style.cssText=l[m].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+e),l[m].style.cssText=l[m].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+e)}if(a.fontSize){for(d in a.fontSize)if(a.fontSize.hasOwnProperty(d)){"%"===a.fontSize[d][0]?f=a.fontSize[d][1]/100:"c"===a.fontSize[d][0]&&(f=a.fontSize[d][1]),e=(f*i[1]).toString(),h="defaultFontSize"!==d?document.getElementsByClassName(d):document.getElementsByClassName("paragraph");for(var n=0;n<h.length;n++)h[n].style.cssText=h[n].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+e)}if(a.lineHeight)for(d in a.lineHeight)if(a.lineHeight.hasOwnProperty(d)){"%"===a.lineHeight[d][0]?g=a.lineHeight[d][1]/100:"c"===a.fontSize[d][0]&&(g=a.lineHeight[d][1]),e=(g*i[1]).toString(),h=document.getElementsByClassName(d);for(var o=0;o<h.length;o++)h[o].style.cssText=h[o].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+e)}}}if(a.isd){var p=document.getElementById(a.cueID);p&&P.removeChild(p),j(a)}}function j(a){var b=document.createElement("div");P.appendChild(b),U=(0,p.renderHTML)(a.isd,b,function(b){var c=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,d=/^#(.*)$/;if(c.test(b)){var e=c.exec(b),f=parseInt(e[4],10)-1,g=btoa(a.images[f]),h="data:image/png;base64,"+g;return h}if(d.test(b)){var e=d.exec(b),f=e[1],h="data:image/png;base64,"+a.embeddedImages[f];return h}return null},P.clientHeight,P.clientWidth,!1,function(a){F("[TextTracks][renderCaption]",a)},U,!0),b.id=a.cueID}function l(a,b,c){var d=m(a),e=this;if(d&&c&&0!==c.length)for(var f=0;f<c.length;f++){var i=void 0,k=c[f];d.cellResolution=k.cellResolution,d.isFromCEA608=k.isFromCEA608,"html"===k.type?(i=new G(k.start-b,k.end-b,""),i.cueHTMLElement=k.cueHTMLElement,i.isd=k.isd,i.images=k.images,i.embeddedImages=k.embeddedImages,i.cueID=k.cueID,i.scaleCue=h.bind(e),i.cellResolution=k.cellResolution,i.lineHeight=k.lineHeight,i.linePadding=k.linePadding,i.fontSize=k.fontSize,P.style.left=L+"px",P.style.top=M+"px",P.style.width=N+"px",P.style.height=O+"px",i.onenter=function(){d.mode===g.default.TEXT_SHOWING&&(this.isd?(j(this),F("Cue enter id:"+this.cueID)):(P.appendChild(this.cueHTMLElement),h.call(e,this)))},i.onexit=function(){for(var a=P.childNodes,b=0;b<a.length;++b)a[b].id===this.cueID&&(F("Cue exit id:"+a[b].id),P.removeChild(a[b]))}):(i=new G(k.start-b,k.end-b,k.data),k.styles&&(void 0!==k.styles.align&&"align"in i&&(i.align=k.styles.align),void 0!==k.styles.line&&"line"in i&&(i.line=k.styles.line),void 0!==k.styles.position&&"position"in i&&(i.position=k.styles.position),void 0!==k.styles.size&&"size"in i&&(i.size=k.styles.size)));try{d.addCue(i)}catch(l){throw t(d),d.addCue(i),l}}}function m(a){return a>=0&&I[a]?H.getTextTrack(I[a].kind,I[a].label,I[a].lang,I[a].isTTML,I[a].isEmbedded):null}function n(){return K}function q(a){for(var b=-1,c=0;c<I.length;c++)if(I[c].label===a){b=c;break}return b}function r(a){if(a!==K){K=a;var b=m(K);s.call(this,b),Q&&(clearInterval(Q),Q=null),b&&"html"===b.renderingType&&(f.call(this,b,!0),Q=setInterval(f.bind(this,b),500))}}function s(a){z.call(this),a&&"html"===a.renderingType?x.call(this):y.call(this)}function t(a){if(a.cues)for(var b=a.cues,c=b.length-1,d=c;d>=0;d--)a.removeCue(b[d])}function u(a){var b=m(a);b&&t(b)}function v(){for(var a=J?J.length:0,b=0;b<a;b++){var c=m(b);c&&(t.call(this,c),c.mode="disabled")}J=[],I=[],Q&&(clearInterval(Q),Q=null),K=-1,z.call(this)}function w(a){H.removeChild(J[a]),J.splice(a,1)}function x(){if(R){var a=document.getElementById("native-cue-style");if(!a){a=document.createElement("style"),a.id="native-cue-style",document.head.appendChild(a);var b=a.sheet,c=H.getElement();c&&(c.id?b.insertRule("#"+c.id+"::cue {background: transparent}",0):0!==c.classList.length?b.insertRule("."+c.className+"::cue {background: transparent}",0):b.insertRule("video::cue {background: transparent}",0))}}}function y(){if(R){var a=document.getElementById("native-cue-style");a&&document.head.removeChild(a)}}function z(){if(P)for(;P.firstChild;)P.removeChild(P.firstChild)}function A(a){a&&a.videoModel&&(H=a.videoModel)}function B(a,b){var c=m(a);c&&c.mode!==b&&(c.mode=b)}function C(){return I[K]}var D=this.context,E=(0,i.default)(D).getInstance(),F=(0,o.default)(D).getInstance().log,G=void 0,H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0,Q=void 0,R=void 0,S=void 0,T=void 0,U=void 0,V=void 0;return{initialize:a,displayCConTop:c,addTextTrack:d,addCaptions:l,getCurrentTrackIdx:n,setCurrentTrackIdx:r,getTrackIdxForId:q,getCurrentTrackInfo:C,setModeForTrackIdx:B,deleteCuesFromTrackIdx:u,deleteAllTextTracks:v,deleteTextTrack:w,setConfig:A}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(45),i=d(h),j=a(49),k=d(j),l=a(46),m=d(l),n=a(44),o=d(n),p=a(17);e.__dashjs_factory_name="TextTracks",c.default=m.default.getSingletonFactory(e),b.exports=c.default},{17:17,44:44,45:45,46:46,49:49,97:97}],142:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){h(),n=(0,m.default)(j).create({dashManifestModel:a.dashManifestModel,adapter:a.adapter,baseURLController:a.baseURLController,stream:a.stream})}function c(a){var b=n.getCurrentTrack();if(!b||b.segmentDuration<=0)return null;var c=Math.floor(a/b.segmentDuration),e=a%b.segmentDuration,f=Math.floor(e*b.tilesHor*b.tilesVert/b.segmentDuration),g=new k.default;return g.url=d(b,c),g.width=Math.floor(b.widthPerTile),g.height=Math.floor(b.heightPerTile),g.x=Math.floor(f%b.tilesHor)*b.widthPerTile,g.y=Math.floor(f/b.tilesHor)*b.heightPerTile,g}function d(a,b){var c=b+a.startNumber,d=(0,p.replaceTokenForTemplate)(a.templateUrl,"Number",c);return d=(0,p.replaceTokenForTemplate)(d,"Time",(c-1)*a.segmentDuration),d=(0,p.replaceTokenForTemplate)(d,"Bandwidth",a.bandwidth),(0,p.unescapeDollarsInTemplate)(d)}function e(a){n.setTrackByIndex(a)}function f(){return n.getCurrentTrackIndex()}function g(){var a=n.getTracks();if(!a||0===a.length)return[];var b=0;return a.map(function(a){var c=new o.default;return c.mediaType=i.default.IMAGE,c.qualityIndex=b++,c.bitrate=a.bitrate,c.width=a.width,c.height=a.height,c})}function h(){n&&n.reset()}var j=this.context,l=void 0,n=void 0;return l={get:c,setTrackByIndex:e,getCurrentTrackIndex:f,getBitrateList:g,reset:h},b(),l}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(97),i=d(h),j=a(175),k=d(j),l=a(143),m=d(l),n=a(161),o=d(n),p=a(74);e.__dashjs_factory_name="ThumbnailController",c.default=g.default.getClassFactory(e),b.exports=c.default},{143:143,161:161,175:175,46:46,74:74,97:97}],143:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){l(),c()}function c(){if(u&&r&&s){var a=u?u.getStreamInfo():null;if(a){var b=s.getMediaInfoForType(a,g.default.IMAGE);if(b){var c=s.getDataForMedia(b);if(c){var e=r.getRepresentationsForAdaptation(c);e&&e.length>0&&e.forEach(function(a){a.segmentInfoType===i.default.SEGMENT_TEMPLATE&&a.segmentDuration>0&&a.media&&d(a)}),x.length>0&&(x.sort(function(a,b){return a.bitrate-b.bitrate}),y=x.length-1)}}}}}function d(a){var b=new m.default;b.id=a.id,b.bitrate=a.bandwidth,b.width=a.width,b.height=a.height,b.tilesHor=1,b.tilesVert=1,b.startNumber=a.startNumber,b.segmentDuration=a.segmentDuration,b.timescale=a.timescale,b.templateUrl=e(a),a.essentialProperties&&a.essentialProperties.forEach(function(a){if(a.schemeIdUri===q&&a.value){var c=a.value.split("x");2!==c.length||isNaN(c[0])||isNaN(c[1])||(b.tilesHor=parseInt(c[0],10),b.tilesVert=parseInt(c[1],10))}}),b.tilesHor>0&&b.tilesVert>0&&(b.widthPerTile=b.width/b.tilesHor,b.heightPerTile=b.height/b.tilesVert,x.push(b))}function e(a){var b=v.isRelative(a.media)?v.resolve(a.media,t.resolve(a.path).url):a.media;return b?(0,p.replaceIDForTemplate)(b,a.id):""}function f(){return x}function h(){return y}function j(){return y<0?null:x[y]}function k(a){x&&0!==x.length&&(a>=x.length&&(a=x.length-1),y=a)}function l(){x=[],y=-1}var n=this.context,r=a.dashManifestModel,s=a.adapter,t=a.baseURLController,u=a.stream,v=(0,o.default)(n).getInstance(),w=void 0,x=void 0,y=void 0;return w={initialize:b,getTracks:f,reset:l,setTrackByIndex:k,getCurrentTrack:j,getCurrentTrackIndex:h},b(),w}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(56),i=d(h),j=a(46),k=d(j),l=a(176),m=d(l),n=a(157),o=d(n),p=a(74),q="http://dashif.org/thumbnail_tile";e.__dashjs_factory_name="ThumbnailTracks",c.default=k.default.getClassFactory(e),b.exports=c.default},{157:157,176:176,46:46,56:56,74:74,97:97}],144:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){p=(0,k.default)(h).create({updateEventName:i.default.SERVICE_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:i.default.SERVICE_LOCATION_BLACKLIST_ADD}),q=(0,o.default)(h).create({blacklistController:p}),t=(0,m.default)(h).create({blacklistController:p}),u=q}function b(a){a.selector&&(u=a.selector),a.dashManifestModel&&(l=a.dashManifestModel)}function c(){if(!l||!l.hasOwnProperty("getIsDVB"))throw new Error("Missing config parameter(s)")}function d(a){c(),u=l.getIsDVB(a)?t:q}function e(a){var b=a.baseUrls,c=a.selectedIdx;if(!isNaN(c))return b[c];var d=u.select(b);return d?(a.selectedIdx=b.indexOf(d),d):(j.trigger(i.default.URL_RESOLUTION_FAILED,{error:new Error(r,s)}),void(u===q&&f()))}function f(){p.reset()}var h=this.context,j=(0,g.default)(h).getInstance(),l=void 0,n=void 0,p=void 0,q=void 0,t=void 0,u=void 0;return n={chooseSelectorFromManifest:d,select:e,reset:f,setConfig:b},a(),n}Object.defineProperty(c,"__esModule",{value:!0});var f=a(45),g=d(f),h=a(49),i=d(h),j=a(101),k=d(j),l=a(160),m=d(l),n=a(159),o=d(n),p=a(46),q=d(p),r=1,s="Failed to resolve a valid URL";e.__dashjs_factory_name="BaseURLSelector";var t=q.default.getClassFactory(e);t.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=r,t.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE=s,q.default.updateClassFactory(e.__dashjs_factory_name,t),c.default=t,b.exports=c.default},{101:101,159:159,160:160,45:45,46:46,49:49}],145:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){if(!a)return null;void 0===a.fileStart&&(a.fileStart=0);var b=k.default.parseBuffer(a),c=(0,g.default)(e).create();return c.setData(b),c}function b(a,b,e){if(void 0===e&&(e=0),!b||e+8>=b.byteLength)return new m.default(0,!1);for(var f=b instanceof ArrayBuffer?new Uint8Array(b):b,g=void 0,h=0;e<f.byteLength;){var i=c(f,e),j=d(f,e+4);if(0===i)break;e+i<=f.byteLength&&(a.indexOf(j)>=0?g=new m.default(e,!0,i):h=e+i),e+=i}return g||new m.default(h,!1)}function c(a,b){return a[b+3]>>>0|a[b+2]<<8>>>0|a[b+1]<<16>>>0|a[b]<<24>>>0}function d(a,b){return String.fromCharCode(a[b++])+String.fromCharCode(a[b++])+String.fromCharCode(a[b++])+String.fromCharCode(a[b])}var e=this.context;return{parse:a,findLastTopIsoBoxCompleted:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(152),g=d(f),h=a(46),i=d(h),j=a(9),k=d(j),l=a(167),m=d(l);e.__dashjs_factory_name="BoxParser",c.default=i.default.getSingletonFactory(e),b.exports=c.default},{152:152,167:167,46:46,9:9}],146:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){g=!1}function b(){var a="WebKitMediaSource"in window,b="MediaSource"in window;return a||b}function c(){return g}function d(a){g=a}function e(a){return!!("MediaSource"in window&&MediaSource.isTypeSupported(a))||!!("WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(a))}var f=void 0,g=void 0;return f={supportsMediaSource:b,supportsEncryptedMedia:c,supportsCodec:e,setEncryptedMediaSupported:d},a(),f}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="Capabilities",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{46:46}],147:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b){var c=0;for(c=0;c<this.customTimeRangeArray.length&&a>this.customTimeRangeArray[c].start;c++);for(this.customTimeRangeArray.splice(c,0,{start:a,end:b}),c=0;c<this.customTimeRangeArray.length-1;c++)this.mergeRanges(c,c+1)&&c--;this.length=this.customTimeRangeArray.length}function b(){this.customTimeRangeArray=[],this.length=0}function c(a,b){for(var c=0;c<this.customTimeRangeArray.length;c++)if(a<=this.customTimeRangeArray[c].start&&b>=this.customTimeRangeArray[c].end)this.customTimeRangeArray.splice(c,1),c--;else{if(a>this.customTimeRangeArray[c].start&&b<this.customTimeRangeArray[c].end){this.customTimeRangeArray.splice(c+1,0,{start:b,end:this.customTimeRangeArray[c].end}),this.customTimeRangeArray[c].end=a;break}a>this.customTimeRangeArray[c].start&&a<this.customTimeRangeArray[c].end?this.customTimeRangeArray[c].end=a:b>this.customTimeRangeArray[c].start&&b<this.customTimeRangeArray[c].end&&(this.customTimeRangeArray[c].start=b)}this.length=this.customTimeRangeArray.length}function d(a,b){var c=this.customTimeRangeArray[a],d=this.customTimeRangeArray[b];return c.start<=d.start&&d.start<=c.end&&c.end<=d.end?(c.end=d.end,this.customTimeRangeArray.splice(b,1),!0):d.start<=c.start&&c.start<=d.end&&d.end<=c.end?(c.start=d.start,this.customTimeRangeArray.splice(b,1),!0):d.start<=c.start&&c.start<=d.end&&c.end<=d.end?(this.customTimeRangeArray.splice(a,1),!0):c.start<=d.start&&d.start<=c.end&&d.end<=c.end&&(this.customTimeRangeArray.splice(b,1),!0)}function e(a){if(null===a||isNaN(a)||a%1!=0)throw new Error("index argument is not an integer")}function f(a){return e(a),a>=this.customTimeRangeArray.length||a<0?NaN:this.customTimeRangeArray[a].start}function g(a){return e(a),a>=this.customTimeRangeArray.length||a<0?NaN:this.customTimeRangeArray[a].end}return{customTimeRangeArray:[],length:0,add:a,clear:b,remove:c,mergeRanges:d,start:f,end:g}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="CustomTimeRanges",c.default=g.default.getClassFactory(e),b.exports=c.default},{46:46}],148:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){if(void 0!==x)return x;x=!1;var b="1",c="1",d=void 0;try{"undefined"!=typeof window&&(d=window[a])}catch(e){return u("Warning: DOMStorage access denied: "+e.message),x}if(!d||a!==m&&a!==n)return x;try{d.setItem(b,c),d.removeItem(b),x=!0}catch(e){u("Warning: DOMStorage is supported, but cannot be used: "+e.message)}return x}function c(){b(m)&&j.forEach(function(a){var b=localStorage.getItem(a.oldKey);if(b){localStorage.removeItem(a.oldKey);try{localStorage.setItem(a.newKey,b)}catch(c){u(c.message)}}})}function d(){c()}function e(){var a=6e5;return Math.round((new Date).getTime()/a)*a}function f(a,c){return b(a)&&v["get"+c+"CachingInfo"]().enabled}function g(){if(!v||!v.hasOwnProperty("getLastMediaSettingsCachingInfo"))throw new Error("Missing config parameter(s)")}function h(a){if(g(),!f(m,p))return null;var b=null,c=l.replace(/\?/,a);try{var d=JSON.parse(localStorage.getItem(c))||{},e=(new Date).getTime()-parseInt(d.timestamp,10)>=v.getLastMediaSettingsCachingInfo().ttl||!1;b=d.settings,e&&(localStorage.removeItem(c),b=null)}catch(h){return null}return b}function q(a){var b=NaN;if(g(),f(m,o)){var c=k.replace(/\?/,a);try{var d=JSON.parse(localStorage.getItem(c))||{},e=(new Date).getTime()-parseInt(d.timestamp,10)>=v.getLastMediaSettingsCachingInfo().ttl||!1,h=parseFloat(d.bitrate);isNaN(h)||e?e&&localStorage.removeItem(c):(b=h,u("Last saved bitrate for "+a+" was "+h))}catch(i){return null}}return b}function r(a,b){if(f(m,p)){var c=l.replace(/\?/,a);try{localStorage.setItem(c,JSON.stringify({settings:b,timestamp:e()}))}catch(d){u(d.message)}}}function s(a,b){if(f(m,o)&&b){var c=k.replace(/\?/,a);try{localStorage.setItem(c,JSON.stringify({bitrate:b.toFixed(3),timestamp:e()}))}catch(d){u(d.message)}}}a=a||{};var t=this.context,u=(0,i.default)(t).getInstance().log,v=a.mediaPlayerModel,w=void 0,x=void 0;return w={getSavedBitrateSettings:q,setSavedBitrateSettings:s,getSavedMediaSettings:h,setSavedMediaSettings:r},d(),w}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(44),i=d(h),j=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],k="dashjs_?_bitrate",l="dashjs_?_settings",m="localStorage",n="sessionStorage",o="LastBitrate",p="LastMediaSettings";e.__dashjs_factory_name="DOMStorage";var q=g.default.getSingletonFactory(e);c.default=q,b.exports=c.default},{44:44,46:46}],149:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){return n}function c(a){n=a}function d(a,b){var c=!0,d=0,e=void 0,f=void 0;if(void 0===b&&(b=!1),a.tag>16777215?(m.getUint32(n)!==a.tag&&(c=!1),d=4):a.tag>65535?(e=m.getUint16(n),f=m.getUint8(n+2),256*e+f!==a.tag&&(c=!1),d=3):a.tag>255?(m.getUint16(n)!==a.tag&&(c=!1),d=2):(m.getUint8(n)!==a.tag&&(c=!1),d=1),!c&&a.required&&!b)throw new Error("required tag not found");return c&&(n+=d),c}function e(a,b){var c=d(a,b);return c&&h(),c}function f(a){var b=void 0;return d(a),b=h(),l[a.parse](b)}function g(a,b){var c=d(a,b),e=void 0;return c&&(e=h(),n+=e),c}function h(a){var b=1,c=128,d=8,e=-1,f=0,g=m.getUint8(n),h=0;for(h=0;h<d;h+=1){if((g&c)===c){f=void 0===a?g&~c:g,e=h;break}c>>=1}for(h=0;h<e;h+=1,b+=1)f=f<<8|255&m.getUint8(n+b);return n+=b,f}function i(a){var b=void 0;switch(a){case 4:b=m.getFloat32(n),n+=4;break;case 8:b=m.getFloat64(n),n+=8}return b}function j(a){for(var b=0,c=0;c<a;c+=1)b<<=8,b|=255&m.getUint8(n+c);return n+=a,b}function k(){return n<m.byteLength}a=a||{};var l=void 0,m=new DataView(a.data),n=0;return l={getPos:b,setPos:c,consumeTag:d,consumeTagAndSize:e,parseTag:f,skipOverElement:g,getMatroskaCodedNum:h,getMatroskaFloat:i,getMatroskaUint:j,moreData:k}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="EBMLParser",c.default=g.default.getClassFactory(e),b.exports=c.default},{46:46}],150:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){l.trigger(i.default.ERROR,{error:"capability",event:a})}function b(a,b,c){l.trigger(i.default.ERROR,{error:"download",event:{id:a,url:b,request:c}})}function c(a,b,c,d){l.trigger(i.default.ERROR,{error:"manifestError",event:{message:a,id:b,manifest:c,event:d}})}function d(a,b,c){l.trigger(i.default.ERROR,{error:"cc",event:{message:a,id:b,cc:c}})}function e(a){l.trigger(i.default.ERROR,{error:"mediasource",event:a})}function f(a){l.trigger(i.default.ERROR,{error:"key_session",event:a})}function h(a){l.trigger(i.default.ERROR,{error:"key_message",event:a})}function j(a){l.trigger(i.default.ERROR,{error:"mssError",event:a})}var k=this.context,l=(0,g.default)(k).getInstance();return{capabilityError:a,downloadError:b,manifestError:c,timedTextError:d,mediaSourceError:e,mediaKeySessionError:f,mediaKeyMessageError:h,mssError:j}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(45),g=d(f),h=a(49),i=d(h),j=a(46),k=d(j),l="mediasource",m="mediakeys",n="manifest",o="SIDX",p="content",q="initialization",r="xlink",s="codec",t="parse",u="nostreams",v="parse";e.__dashjs_factory_name="ErrorHandler";var w=k.default.getSingletonFactory(e);w.CAPABILITY_ERROR_MEDIASOURCE=l,w.CAPABILITY_ERROR_MEDIAKEYS=m,w.DOWNLOAD_ERROR_ID_MANIFEST=n,w.DOWNLOAD_ERROR_ID_SIDX=o,w.DOWNLOAD_ERROR_ID_CONTENT=p,w.DOWNLOAD_ERROR_ID_INITIALIZATION=q,w.DOWNLOAD_ERROR_ID_XLINK=r,w.MANIFEST_ERROR_ID_CODEC=s,w.MANIFEST_ERROR_ID_PARSE=t,w.MANIFEST_ERROR_ID_NOSTREAMS=u,w.TIMED_TEXT_ERROR_ID_PARSE=v,k.default.updateSingletonFactory(e.__dashjs_factory_name,w),c.default=w,b.exports=c.default},{45:45,46:46,49:49}],151:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var b=a.streamId,c=a.representationId;d[b]=d[b]||{},d[b][c]=a}function b(a,b){return d&&d[a]&&d[a][b]?d[a][b]:null}function c(){d={}}var d={};return{save:a,extract:b,reset:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="InitCache",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{46:46}],152:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){return a&&f&&f.boxes&&0!==f.boxes.length&&"function"==typeof f.fetch?e(f.fetch(a)):null}function b(a){var b=[];if(!a||!f||"function"!=typeof f.fetchAll)return b;for(var c=f.fetchAll(a),d=void 0,g=0,h=c.length;g<h;g++)(d=e(c[g]))&&b.push(d);return b}
|
28 |
-
function c(a){f=a}function d(){if(!f||!f.boxes||!f.boxes.length)return null;var a=f.boxes[f.boxes.length-1].type,c=b(a);return c.length>0?c[c.length-1]:null}function e(a){if(!a)return null;var b=new g.default(a);return a.hasOwnProperty("_incomplete")&&(b.isComplete=!a._incomplete),b}var f=void 0;return{getBox:a,getBoxes:b,setData:c,getLastBox:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(166),g=d(f),h=a(46),i=d(h);e.__dashjs_factory_name="IsoFile",c.default=i.default.getClassFactory(e),b.exports=c.default},{166:166,46:46}],153:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){if(!(e&&e.hasOwnProperty("getExpectedLiveEdge")&&f&&f.hasOwnProperty("getCurrentRepresentationInfo")))throw new Error("Missing config parameter(s)")}function c(){b();var a=f.getCurrentRepresentationInfo(),c=a.DVRWindow.end;return a.useCalculatedLiveEdgeTime&&(c=e.getExpectedLiveEdge(),e.setClientTimeOffset(c-a.DVRWindow.end)),c}function d(){e=null,f=null}a=a||{};var e=a.timelineConverter,f=a.streamProcessor;return{getLiveEdge:c,reset:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="LiveEdgeFinder",c.default=g.default.getClassFactory(e),b.exports=c.default},{46:46}],154:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b){return(0,i.default)(a,b)}return{areEqual:a}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(12),i=d(h);e.__dashjs_factory_name="ObjectUtils",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{12:12,46:46}],155:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){return a}function b(a){return a}return{modifyRequestURL:a,modifyRequestHeader:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="RequestModifier",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{46:46}],156:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){var a="cue_TTML_"+h;return h++,a}function b(b,c,d,g,h){var i=void 0,j="",k=[],l=void 0,o=void 0,p={},q={},r="",s="",t={onOpenTag:function(a,b,c){if("image"===b&&"http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"===a){if(!c[" imagetype"]||"PNG"!==c[" imagetype"].value)return void e("Warning: smpte-tt imagetype != PNG. Discarded");r=c["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){r&&(q[r]=s.trim()),s="",r=""},onText:function(a){r&&(s+=a)}};if(!b)throw j="no ttml data to parse",new Error(j);p.data=b,f.trigger(m.default.TTML_TO_PARSE,p);var u=(0,n.fromXML)(p.data,function(a){j=a},t);f.trigger(m.default.TTML_PARSED,{ttmlString:p.data,ttmlDoc:u});var v=u.getMediaTimeEvents();for(i=0;i<v.length;i++){var w=(0,n.generateISD)(u,v[i],function(a){j=a});w.contents.some(function(a){return a.contents.length})&&(l=v[i]+c<d?d:v[i]+c,o=v[i+1]+c>g?g:v[i+1]+c,l<o&&k.push({start:l,end:o,type:"html",cueID:a(),isd:w,images:h,embeddedImages:q}))}if(""!==j)throw e(j),new Error(j);return k}function c(){}var d=this.context,e=(0,i.default)(d).getInstance().log,f=(0,k.default)(d).getInstance(),g=void 0,h=0;return g={parse:b},c(),g}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(44),i=d(h),j=a(45),k=d(j),l=a(49),m=d(l),n=a(17);e.__dashjs_factory_name="TTMLParser",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{17:17,44:44,45:45,46:46,49:49}],157:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){try{new window.URL("x","http://y");k=p}catch(a){}finally{k=k||q}}function b(a){var b=a.indexOf("/"),c=a.lastIndexOf("/");return-1!==b?c===b+1?a:(-1!==a.indexOf("?")&&(a=a.substring(0,a.indexOf("?"))),a.substring(0,c+1)):""}function c(a){var b=a.match(o);return b?b[1]:""}function d(a){var b=a.match(l);return b?b[0]:""}function e(a){return!l.test(a)}function f(a){return e(a)&&"/"===a.charAt(0)}function g(a){return 0===a.indexOf("//")}function h(a){return m.test(a)}function i(a){return n.test(a)}function j(a,b){return k(a,b)}var k=void 0,l=/^[a-z][a-z0-9+\-.]*:/i,m=/^https?:\/\//i,n=/^https:\/\//i,o=/^([a-z][a-z0-9+\-.]*:\/\/[^\/]+)\/?/i,p=function(a,b){try{return new window.URL(a,b).toString()}catch(c){return a}},q=function(a,h){var i=b;if(!h)return a;if(!e(a))return a;f(a)&&(i=c),g(a)&&(i=d);var j=i(h);return[j,a].join("/"!==j.charAt(j.length-1)&&"/"!==a.charAt(0)?"/":"")};return a(),{parseBaseUrl:b,parseOrigin:c,parseScheme:d,isRelative:e,isPathAbsolute:f,isSchemeRelative:g,isHTTPURL:h,isHTTPS:i,resolve:j}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="URLUtils",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{46:46}],158:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){l=/(?:\r\n|\r|\n)/gm,m=/-->/,n=/(^[\s]+|[\s]+$)/g,o=/\s\b/g}function b(a){var b=[],e=void 0,g=void 0;if(!a)return b;a=a.split(l),e=a.length,g=-1;for(var i=0;i<e;i++){var k=a[i];if(k.length>0&&k!==j&&k.match(m)){var o=d(k),p=o.cuePoints,q=o.styles,r=f(a,i+1),s=c(p[0].replace(n,"")),t=c(p[1].replace(n,""));!isNaN(s)&&!isNaN(t)&&s>=g&&t>s?""!==r?(g=s,b.push({start:s,end:t,data:r,styles:q})):h("Skipping cue due to empty/malformed cue text"):h("Skipping cue due to incorrect cue timing")}}return b}function c(a){var b=a.split(":"),c=b.length-1;return a=60*parseInt(b[c-1],10)+parseFloat(b[c]),2===c&&(a+=3600*parseInt(b[0],10)),a}function d(a){var b=a.split(m),c=b[1].split(o);return c.shift(),b[1]=c[0],c.shift(),{cuePoints:b,styles:e(c)}}function e(a){var b={};return a.forEach(function(a){if(a.split(/:/).length>1){var c=a.split(/:/)[1];c&&-1!=c.search(/%/)&&(c=parseInt(c.replace(/%/,""),10)),(a.match(/align/)||a.match(/A/))&&(b.align=c),(a.match(/line/)||a.match(/L/))&&(b.line=c),(a.match(/position/)||a.match(/P/))&&(b.position=c),(a.match(/size/)||a.match(/S/))&&(b.size=c)}}),b}function f(a,b){for(var c=b,d="",e="",f=void 0;""!==a[c]&&c<a.length;)c++;if((f=c-b)>1)for(var g=0;g<f;g++){if(e=a[b+g],e.match(m)){d="";break}d+=e,g!==f-1&&(d+="\n")}else e=a[b],e.match(m)||(d=e);return d}var g=this.context,h=(0,i.default)(g).getInstance().log,k=void 0,l=void 0,m=void 0,n=void 0,o=void 0;return k={parse:b},a(),k}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(44),i=d(h),j="WEBVTT";e.__dashjs_factory_name="VTTParser",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{44:44,46:46}],159:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){var b=0,d=void 0;return a&&a.some(function(a,d){return b=d,!c.contains(a.serviceLocation)})&&(d=a[b]),d}a=a||{};var c=a.blacklistController;return{select:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="BasicSelector",c.default=g.default.getClassFactory(e),b.exports=c.default},{46:46}],160:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){var b=[],c=function(a){return!b.length||!a.dvb_priority||-1===b.indexOf(a.dvb_priority)},d=function(a){return!e.contains(a.serviceLocation)||(a.dvb_priority&&b.push(a.dvb_priority),!1)};return a.filter(d).filter(c)}function c(a){var b=function(a,b){var c=a.dvb_priority-b.dvb_priority;return isNaN(c)?0:c},c=function(a,b,c){return!b||c[0].dvb_priority&&a.dvb_priority&&c[0].dvb_priority===a.dvb_priority},d=0,e=[],f=0,g=void 0,h=void 0;if(h=a.sort(b).filter(c),h.length)return h.length>1&&(h.forEach(function(a){d+=a.dvb_weight,e.push(d)}),g=Math.floor(Math.random()*(d-1)),e.every(function(a,b){return f=b,!(g<a)})),h[f]}function d(a){return a&&c(b(a))}a=a||{};var e=a.blacklistController;return{select:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f);e.__dashjs_factory_name="DVBSelector",c.default=g.default.getClassFactory(e),b.exports=c.default},{46:46}],161:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN};c.default=e,b.exports=c.default},{}],162:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(b,c,e){d(this,a),this.code=b||null,this.message=c||null,this.data=e||null};c.default=e,b.exports=c.default},{}],163:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null};c.default=e,b.exports=c.default},{}],164:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.action=a.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer",this.representationId=null};e.ACTION_DOWNLOAD="download",e.ACTION_COMPLETE="complete",c.default=e,b.exports=c.default},{}],165:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(164),i=d(h),j=function(a){function b(a){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.url=a||null,this.checkForExistenceOnly=!0}return f(b,a),b}(i.default);c.default=j,b.exports=c.default},{164:164}],166:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b){if(d(this,a),this.offset=b._offset,this.type=b.type,this.size=b.size,this.boxes=[],b.boxes)for(var c=0;c<b.boxes.length;c++)this.boxes.push(new a(b.boxes[c]));switch(this.isComplete=!0,b.type){case"sidx":if(this.timescale=b.timescale,this.earliest_presentation_time=b.earliest_presentation_time,this.first_offset=b.first_offset,this.references=b.references,b.references){this.references=[];for(var c=0;c<b.references.length;c++){var e={reference_type:b.references[c].reference_type,referenced_size:b.references[c].referenced_size,subsegment_duration:b.references[c].subsegment_duration};this.references.push(e)}}break;case"emsg":this.id=b.id,this.value=b.value,this.timescale=b.timescale,this.scheme_id_uri=b.scheme_id_uri,this.presentation_time_delta=b.presentation_time_delta,this.event_duration=b.event_duration,this.message_data=b.message_data;break;case"mdhd":this.timescale=b.timescale;break;case"mfhd":this.sequence_number=b.sequence_number;break;case"subs":this.entry_count=b.entry_count,this.entries=b.entries;break;case"tfhd":this.base_data_offset=b.base_data_offset,this.sample_description_index=b.sample_description_index,this.default_sample_duration=b.default_sample_duration,this.default_sample_size=b.default_sample_size,this.default_sample_flags=b.default_sample_flags,this.flags=b.flags;break;case"tfdt":this.version=b.version,this.baseMediaDecodeTime=b.baseMediaDecodeTime,this.flags=b.flags;break;case"trun":if(this.sample_count=b.sample_count,this.first_sample_flags=b.first_sample_flags,this.data_offset=b.data_offset,this.flags=b.flags,this.samples=b.samples,b.samples){this.samples=[];for(var c=0,f=b.samples.length;c<f;c++){var g={sample_size:b.samples[c].sample_size,sample_duration:b.samples[c].sample_duration,sample_composition_time_offset:b.samples[c].sample_composition_time_offset};this.samples.push(g)}}}}return e(a,[{key:"getChildBox",value:function(a){for(var b=0;b<this.boxes.length;b++)if(this.boxes[b].type===a)return this.boxes[b]}},{key:"getChildBoxes",value:function(a){for(var b=[],c=0;c<this.boxes.length;c++)this.boxes[c].type===a&&b.push(this.boxes[c]);return b}}]),a}();c.default=f,b.exports=c.default},{}],167:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(b,c,e){d(this,a),this.lastCompletedOffset=b,this.found=c,this.size=e};c.default=e,b.exports=c.default},{}],168:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.DVRWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null};c.default=e,b.exports=c.default},{}],169:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.id=null,this.index=null,this.type=null,this.streamInfo=null,this.representationCount=0,this.lang=null,this.viewpoint=null,this.accessibility=null,this.audioChannelConfiguration=null,this.roles=null,this.codec=null,this.mimeType=null,this.contentProtection=null,this.isText=!1,this.KID=null,this.bitrateList=null};c.default=e,b.exports=c.default},{}],170:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]};c.default=e,b.exports=c.default},{}],171:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.id=null,this.quality=null,this.DVRWindow=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null};c.default=e,b.exports=c.default},{}],172:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0};c.default=e,b.exports=c.default},{}],173:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(97),i=d(h),j=a(164),k=d(j),l=function(a){function b(a,c){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.url=a||null,this.type=c||null,this.mediaType=i.default.STREAM,this.responseType=""}return f(b,a),b}(k.default);c.default=l,b.exports=c.default},{164:164,97:97}],174:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.captionData=null,this.label=null,this.lang=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1};c.default=e,b.exports=c.default},{}],175:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null};c.default=e,b.exports=c.default},{}],176:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.bitrate=0,this.width=0,this.height=0,this.tilesHor=0,this.tilesVert=0,this.widthPerTile=0,this.heightPerTile=0,this.startNumber=0,this.segmentDuration=0,this.timescale=0,this.templateUrl="",this.id=""};c.default=e,b.exports=c.default},{}],177:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null};c.default=e,b.exports=c.default},{}],178:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.t=null,this.level=null};c.default=e,b.exports=c.default},{}],179:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var f=a(102),g=d(f),h=function a(){e(this,a),this.target=null,this.state=g.default.BUFFER_EMPTY};c.default=h,b.exports=c.default},{102:102}],180:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.time=null,this.range=null,this.manifestInfo=null};c.default=e,b.exports=c.default},{}],181:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.time=null,this.droppedFrames=null};c.default=e,b.exports=c.default},{}],182:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this._stream=null,this._tfinish=null,this._mediaduration=null,this._responseHeaders=null,this._serviceLocation=null},f=function a(){d(this,a),this.s=null,this.d=null,this.b=[]};e.GET="GET",e.HEAD="HEAD",e.MPD_TYPE="MPD",e.XLINK_EXPANSION_TYPE="XLinkExpansion",e.INIT_SEGMENT_TYPE="InitializationSegment",e.INDEX_SEGMENT_TYPE="IndexSegment",e.MEDIA_SEGMENT_TYPE="MediaSegment",e.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",e.OTHER_TYPE="other",c.HTTPRequest=e,c.HTTPRequestTrace=f},{}],183:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]},f=function a(){d(this,a),this.id=null,this.index=null,this.start=null,this.duration=null},g=function a(){d(this,a),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null};c.ManifestUpdate=e,c.ManifestUpdateStreamInfo=f,c.ManifestUpdateRepresentationInfo=g},{}],184:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]};e.INITIAL_PLAYOUT_START_REASON="initial_playout",e.SEEK_START_REASON="seek",e.RESUME_FROM_PAUSE_START_REASON="resume",e.METRICS_COLLECTION_START_REASON="metrics_collection_start";var f=function a(){d(this,a),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null};f.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",f.REBUFFERING_REASON="rebuffering",f.USER_REQUEST_STOP_REASON="user_request",f.END_OF_PERIOD_STOP_REASON="end_of_period",f.END_OF_CONTENT_STOP_REASON="end_of_content",f.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",f.FAILURE_STOP_REASON="failure",c.PlayList=e,c.PlayListTrace=f},{}],185:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.t=null,this.mt=null,this.to=null,this.lto=null};c.default=e,b.exports=c.default},{}],186:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.loadingRequests=[],this.executedRequests=[]};c.default=e,b.exports=c.default},{}],187:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.quality=null,this.range=null,this.state=null};c.default=e,b.exports=c.default},{}],188:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.tcpid=null,this.dest=null,this.topen=null,this.tclose=null,this.tconnect=null};c.default=e,b.exports=c.default},{}]},{},[4]);
|
|
|
29 |
|
30 |
|
31 |
/*jslint browser: true, for: true */
|
1 |
+
/*! v2.8.0-e6da1f00, 2018-07-03T21:11:29Z */
|
2 |
+
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(b,c,d){"use strict";var e={};e.encode=function(a){for(var b=[],c=0;c<a.length;++c){var d=a.charCodeAt(c);d<128?b.push(d):d<2048?(b.push(192|d>>6),b.push(128|63&d)):d<65536?(b.push(224|d>>12),b.push(128|63&d>>6),b.push(128|63&d)):(b.push(240|d>>18),b.push(128|63&d>>12),b.push(128|63&d>>6),b.push(128|63&d))}return b},e.decode=function(a){for(var b=[],c=0;c<a.length;){var d=a[c++];d<128||(d<224?(d=(31&d)<<6,d|=63&a[c++]):d<240?(d=(15&d)<<12,d|=(63&a[c++])<<6,d|=63&a[c++]):(d=(7&d)<<18,d|=(63&a[c++])<<12,d|=(63&a[c++])<<6,d|=63&a[c++])),b.push(String.fromCharCode(d))}return b.join("")};var f={};!function(b){var c=function(a){for(var c=0,d=[],e=0|a.length/3;0<e--;){var f=(a[c]<<16)+(a[c+1]<<8)+a[c+2];c+=3,d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push(b.charAt(63&f>>6)),d.push(b.charAt(63&f))}if(2==a.length-c){var f=(a[c]<<16)+(a[c+1]<<8);d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push(b.charAt(63&f>>6)),d.push("=")}else if(1==a.length-c){var f=a[c]<<16;d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push("==")}return d.join("")},d=function(){for(var a=[],c=0;c<b.length;++c)a[b.charCodeAt(c)]=c;return a["=".charCodeAt(0)]=0,a}(),g=function(a){for(var b=0,c=[],e=0|a.length/4;0<e--;){var f=(d[a.charCodeAt(b)]<<18)+(d[a.charCodeAt(b+1)]<<12)+(d[a.charCodeAt(b+2)]<<6)+d[a.charCodeAt(b+3)];c.push(255&f>>16),c.push(255&f>>8),c.push(255&f),b+=4}return c&&("="==a.charAt(b-2)?(c.pop(),c.pop()):"="==a.charAt(b-1)&&c.pop()),c},h={};h.encode=function(a){for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b},h.decode=function(b){for(var c=0;c<s.length;++c)a[c]=String.fromCharCode(a[c]);return a.join("")},f.decodeArray=function(a){var b=g(a);return new Uint8Array(b)},f.encodeASCII=function(a){var b=h.encode(a);return c(b)},f.decodeASCII=function(a){var b=g(a);return h.decode(b)},f.encode=function(a){var b=e.encode(a);return c(b)},f.decode=function(a){var b=g(a);return e.decode(b)}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),void 0!==d&&(d.decode=f.decode,d.decodeArray=f.decodeArray,d.encode=f.encode,d.encodeASCII=f.encodeASCII)},{}],2:[function(a,b,c){"use strict";!function(a){var b={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},c=function(a){var c=a;return b.hasOwnProperty(a)&&(c=b[a]),String.fromCharCode(c)},d=15,e=32,f={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},g={17:2,18:4,21:6,22:8,23:10,19:13,20:15},h={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},i={25:2,26:4,29:6,30:8,31:10,27:13,28:15},j=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],k={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(a){this.time=a},log:function(a,b){var c=this.verboseFilter[a];this.verboseLevel>=c&&console.log(this.time+" ["+a+"] "+b)}},l=function(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c].toString(16));return b},m=function(a,b,c,d,e){this.foreground=a||"white",this.underline=b||!1,this.italics=c||!1,this.background=d||"black",this.flash=e||!1};m.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(a){for(var b=["foreground","underline","italics","background","flash"],c=0;c<b.length;c++){var d=b[c];a.hasOwnProperty(d)&&(this[d]=a[d])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(a){return this.foreground===a.foreground&&this.underline===a.underline&&this.italics===a.italics&&this.background===a.background&&this.flash===a.flash},copy:function(a){this.foreground=a.foreground,this.underline=a.underline,this.italics=a.italics,this.background=a.background,this.flash=a.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var n=function(a,b,c,d,e,f){this.uchar=a||" ",this.penState=new m(b,c,d,e,f)};n.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(a,b){this.uchar=a,this.penState.copy(b)},setPenState:function(a){this.penState.copy(a)},equals:function(a){return this.uchar===a.uchar&&this.penState.equals(a.penState)},copy:function(a){this.uchar=a.uchar,this.penState.copy(a.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var o=function(){this.chars=[];for(var a=0;a<e;a++)this.chars.push(new n);this.pos=0,this.currPenState=new m};o.prototype={equals:function(a){for(var b=!0,c=0;c<e;c++)if(!this.chars[c].equals(a.chars[c])){b=!1;break}return b},copy:function(a){for(var b=0;b<e;b++)this.chars[b].copy(a.chars[b])},isEmpty:function(){for(var a=!0,b=0;b<e;b++)if(!this.chars[b].isEmpty()){a=!1;break}return a},setCursor:function(a){this.pos!==a&&(this.pos=a),this.pos<0?(k.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>e&&(k.log("ERROR","Too large cursor position "+this.pos),this.pos=e)},moveCursor:function(a){var b=this.pos+a;if(a>1)for(var c=this.pos+1;c<b+1;c++)this.chars[c].setPenState(this.currPenState);this.setCursor(b)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(a){a>=144&&this.backSpace();var b=c(a);if(this.pos>=e)return void k.log("ERROR","Cannot insert "+a.toString(16)+" ("+b+") at position "+this.pos+". Skipping it!");this.chars[this.pos].setChar(b,this.currPenState),this.moveCursor(1)},clearFromPos:function(a){var b;for(b=a;b<e;b++)this.chars[b].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var a=[],b=!0,c=0;c<e;c++){var d=this.chars[c].uchar;" "!==d&&(b=!1),a.push(d)}return b?"":a.join("")},setPenStyles:function(a){this.currPenState.setStyles(a),this.chars[this.pos].setPenState(this.currPenState)}};var p=function(){this.rows=[];for(var a=0;a<d;a++)this.rows.push(new o);this.currRow=d-1,this.nrRollUpRows=null,this.reset()};p.prototype={reset:function(){for(var a=0;a<d;a++)this.rows[a].clear();this.currRow=d-1},equals:function(a){for(var b=!0,c=0;c<d;c++)if(!this.rows[c].equals(a.rows[c])){b=!1;break}return b},copy:function(a){for(var b=0;b<d;b++)this.rows[b].copy(a.rows[b])},isEmpty:function(){for(var a=!0,b=0;b<d;b++)if(!this.rows[b].isEmpty()){a=!1;break}return a},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(a){this.rows[this.currRow].insertChar(a)},setPen:function(a){this.rows[this.currRow].setPenStyles(a)},moveCursor:function(a){this.rows[this.currRow].moveCursor(a)},setCursor:function(a){k.log("INFO","setCursor: "+a),this.rows[this.currRow].setCursor(a)},setPAC:function(a){k.log("INFO","pacData = "+JSON.stringify(a));var b=a.row-1;this.nrRollUpRows&&b<this.nrRollUpRows-1&&(b=this.nrRollUpRows-1),this.currRow=b;var c=this.rows[this.currRow];if(null!==a.indent){var d=a.indent,e=Math.max(d-1,0);c.setCursor(a.indent),a.color=c.chars[e].penState.foreground}var f={foreground:a.color,underline:a.underline,italics:a.italics,background:"black",flash:!1};this.setPen(f)},setBkgData:function(a){k.log("INFO","bkgData = "+JSON.stringify(a)),this.backSpace(),this.setPen(a),this.insertChar(32)},setRollUpRows:function(a){this.nrRollUpRows=a},rollUp:function(){if(null===this.nrRollUpRows)return void k.log("DEBUG","roll_up but nrRollUpRows not set yet");k.log("TEXT",this.getDisplayText());var a=this.currRow+1-this.nrRollUpRows,b=this.rows.splice(a,1)[0];b.clear(),this.rows.splice(this.currRow,0,b),k.log("INFO","Rolling up")},getDisplayText:function(a){a=a||!1;for(var b=[],c="",e=-1,f=0;f<d;f++){var g=this.rows[f].getTextString();g&&(e=f+1,a?b.push("Row "+e+': "'+g+'"'):b.push(g.trim()))}return b.length>0&&(c=a?"["+b.join(" | ")+"]":b.join("\n")),c},getTextAndFormat:function(){return this.rows}};var q=function(a,b){this.chNr=a,this.outputFilter=b,this.mode=null,this.verbose=0,this.displayedMemory=new p,this.nonDisplayedMemory=new p,this.lastOutputScreen=new p,this.currRollUpRow=this.displayedMemory.rows[d-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};q.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[d-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(a){this.outputFilter=a},setPAC:function(a){this.writeScreen.setPAC(a)},setBkgData:function(a){this.writeScreen.setBkgData(a)},setMode:function(a){a!==this.mode&&(this.mode=a,k.log("INFO","MODE="+a),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=a)},insertChars:function(a){for(var b=0;b<a.length;b++)this.writeScreen.insertChar(a[b]);var c=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";k.log("INFO",c+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(k.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){k.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){k.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){k.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(a){k.log("INFO","RU("+a+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(a)},cc_FON:function(){k.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){k.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){k.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){k.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){k.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){k.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){k.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(k.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var a=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=a,this.writeScreen=this.nonDisplayedMemory,k.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(a){k.log("INFO","TO("+a+") - Tab Offset"),this.writeScreen.moveCursor(a)},cc_MIDROW:function(a){var b={flash:!1};if(b.underline=a%2==1,b.italics=a>=46,b.italics)b.foreground="white";else{var c=Math.floor(a/2)-16,d=["white","green","blue","cyan","red","yellow","magenta"];b.foreground=d[c]}k.log("INFO","MIDROW: "+JSON.stringify(b)),this.writeScreen.setPen(b)},outputDataUpdate:function(){var a=k.time;null!==a&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(a,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,a,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:a):this.cueStartTime=a,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(a){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,a,this.displayedMemory),this.cueStartTime=a))}};var r=function(a,b,c){this.field=a||1,this.outputs=[b,c],this.channels=[new q(1,b),new q(2,c)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};r.prototype={getHandler:function(a){return this.channels[a].getHandler()},setHandler:function(a,b){this.channels[a].setHandler(b)},addData:function(a,b){var c,d,e,f=!1;this.lastTime=a,k.setTime(a);for(var g=0;g<b.length;g+=2)if(d=127&b[g],e=127&b[g+1],d>=16&&d<=31&&d===this.lastCmdA&&e===this.lastCmdB)this.lastCmdA=null,this.lastCmdB=null,k.log("DEBUG","Repeated command ("+l([d,e])+") is dropped");else if(0!==d||0!==e){if(k.log("DATA","["+l([b[g],b[g+1]])+"] -> ("+l([d,e])+")"),c=this.parseCmd(d,e),c||(c=this.parseMidrow(d,e)),c||(c=this.parsePAC(d,e)),c||(c=this.parseBackgroundAttributes(d,e)),!c&&(f=this.parseChars(d,e)))if(this.currChNr&&this.currChNr>=0){var h=this.channels[this.currChNr-1];h.insertChars(f)}else k.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:f?this.dataCounters.char+=2:(this.dataCounters.other+=2,k.log("WARNING","Couldn't parse cleaned data "+l([d,e])+" orig: "+l([b[g],b[g+1]])))}else this.dataCounters.padding+=2},parseCmd:function(a,b){var c=null,d=(20===a||21===a||28===a||29===a)&&32<=b&&b<=47,e=(23===a||31===a)&&33<=b&&b<=35;if(!d&&!e)return!1;c=20===a||21===a||23===a?1:2;var f=this.channels[c-1];return 20===a||21===a||28===a||29===a?32===b?f.cc_RCL():33===b?f.cc_BS():34===b?f.cc_AOF():35===b?f.cc_AON():36===b?f.cc_DER():37===b?f.cc_RU(2):38===b?f.cc_RU(3):39===b?f.cc_RU(4):40===b?f.cc_FON():41===b?f.cc_RDC():42===b?f.cc_TR():43===b?f.cc_RTD():44===b?f.cc_EDM():45===b?f.cc_CR():46===b?f.cc_ENM():47===b&&f.cc_EOC():f.cc_TO(b-32),this.lastCmdA=a,this.lastCmdB=b,this.currChNr=c,!0},parseMidrow:function(a,b){var c=null;if((17===a||25===a)&&32<=b&&b<=47){if((c=17===a?1:2)!==this.currChNr)return k.log("ERROR","Mismatch channel in midrow parsing"),!1;var d=this.channels[c-1];return d.insertChars([32]),d.cc_MIDROW(b),k.log("DEBUG","MIDROW ("+l([a,b])+")"),this.lastCmdA=a,this.lastCmdB=b,!0}return!1},parsePAC:function(a,b){var c=null,d=null,e=(17<=a&&a<=23||25<=a&&a<=31)&&64<=b&&b<=127,j=(16===a||24===a)&&64<=b&&b<=95;if(!e&&!j)return!1;c=a<=23?1:2,d=64<=b&&b<=95?1===c?f[a]:h[a]:1===c?g[a]:i[a];var k=this.interpretPAC(d,b);return this.channels[c-1].setPAC(k),this.lastCmdA=a,this.lastCmdB=b,this.currChNr=c,!0},interpretPAC:function(a,b){var c=b,d={color:null,italics:!1,indent:null,underline:!1,row:a};return c=b>95?b-96:b-64,d.underline=1==(1&c),c<=13?d.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:c<=15?(d.italics=!0,d.color="white"):d.indent=4*Math.floor((c-16)/2),d},parseChars:function(a,b){var d=null,e=null,f=null;if(a>=25?(d=2,f=a-8):(d=1,f=a),17<=f&&f<=19){var g=b;g=17===f?b+80:18===f?b+112:b+144,k.log("INFO","Special char '"+c(g)+"' in channel "+d),e=[g],this.lastCmdA=a,this.lastCmdB=b}else 32<=a&&a<=127&&(e=0===b?[a]:[a,b],this.lastCmdA=null,this.lastCmdB=null);if(e){var h=l(e);k.log("DEBUG","Char codes = "+h.join(","))}return e},parseBackgroundAttributes:function(a,b){var c,d,e,f,g=(16===a||24===a)&&32<=b&&b<=47,h=(23===a||31===a)&&45<=b&&b<=47;return!(!g&&!h)&&(c={},16===a||24===a?(d=Math.floor((b-32)/2),c.background=j[d],b%2==1&&(c.background=c.background+"_semi")):45===b?c.background="transparent":(c.foreground="black",47===b&&(c.underline=!0)),e=a<24?1:2,f=this.channels[e-1],f.setBkgData(c),this.lastCmdA=a,this.lastCmdB=b,!0)},reset:function(){for(var a=0;a<this.channels.length;a++)this.channels[a]&&this.channels[a].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(a){for(var b=0;b<this.channels.length;b++)this.channels[b]&&this.channels[b].cueSplitAtTime(a)}};var s=function(a,b,c){for(var d=0,e=b,f=[],g=function(a,b,c,d){if(4!==a||b<8)return null;var e=c.getUint8(d),f=c.getUint16(d+1),g=c.getUint32(d+3),h=c.getUint8(d+7);return 181==e&&49==f&&1195456820==g&&3==h};e<b+c;){if(d=a.getUint32(e),6===(31&a.getUint8(e+4)))for(var h=e+5,i=-1;h<e+4+d-1;){i=0;for(var j=255;255===j;)j=a.getUint8(h),i+=j,h++;var k=0;for(j=255;255===j;)j=a.getUint8(h),k+=j,h++;g(i,k,a,h)&&f.push([h,k]),h+=k}e+=d+4}return f},t=function(a,b){var c=b[0],d=[[],[]];c+=8;var e=31&a.getUint8(c);c+=2;for(var f=0;f<e;f++){var g=a.getUint8(c),h=4&g,i=3&g;c++;var j=a.getUint8(c);c++;var k=a.getUint8(c);c++,h&&(127&j)+(127&k)!=0&&(0===i?(d[0].push(j),d[0].push(k)):1===i&&(d[1].push(j),d[1].push(k)))}return d};a.logger=k,a.PenState=m,a.CaptionScreen=p,a.Cea608Parser=r,a.findCea608Nalus=s,a.extractCea608DataFromRange=t}(void 0===c?(void 0).cea608parser={}:c)},{}],3:[function(a,b,c){"use strict";function d(a){function b(){void 0===a.escapeMode&&(a.escapeMode=!0),void 0===a.attributePrefix&&(a.attributePrefix="_"),a.arrayAccessForm=a.arrayAccessForm||"none",a.emptyNodeForm=a.emptyNodeForm||"text",void 0===a.enableToStringFunc&&(a.enableToStringFunc=!0),a.arrayAccessFormPaths=a.arrayAccessFormPaths||[],void 0===a.skipEmptyTextNodesForObj&&(a.skipEmptyTextNodesForObj=!0),void 0===a.stripWhitespaces&&(a.stripWhitespaces=!0),a.datetimeAccessFormPaths=a.datetimeAccessFormPaths||[],void 0===a.useDoubleQuotes&&(a.useDoubleQuotes=!1),a.xmlElementsFilter=a.xmlElementsFilter||[],a.jsonPropertiesFilter=a.jsonPropertiesFilter||[],void 0===a.keepCData&&(a.keepCData=!1),void 0===a.ignoreRoot&&(a.ignoreRoot=!1)}function c(){}function d(a){var b=a.localName;return null==b&&(b=a.baseName),null!=b&&""!=b||(b=a.nodeName),b}function e(a){return a.prefix}function f(a){return"string"==typeof a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):a}function g(a,b,c,d){for(var e=0;e<a.length;e++){var f=a[e];if("string"==typeof f){if(f==d)break}else if(f instanceof RegExp){if(f.test(d))break}else if("function"==typeof f&&f(b,c,d))break}return e!=a.length}function h(b,c,d){switch(a.arrayAccessForm){case"property":b[c]instanceof Array?b[c+"_asArray"]=b[c]:b[c+"_asArray"]=[b[c]]}!(b[c]instanceof Array)&&a.arrayAccessFormPaths.length>0&&g(a.arrayAccessFormPaths,b,c,d)&&(b[c]=[b[c]])}function i(a){var b=a.split(/[-T:+Z]/g),c=new Date(b[0],b[1]-1,b[2]),d=b[5].split(".");if(c.setHours(b[3],b[4],d[0]),d.length>1&&c.setMilliseconds(d[1]),b[6]&&b[7]){var e=60*b[6]+Number(b[7]);e=0+("-"==(/\d\d-\d\d:\d\d$/.test(a)?"-":"+")?-1*e:e),c.setMinutes(c.getMinutes()-e-c.getTimezoneOffset())}else-1!==a.indexOf("Z",a.length-1)&&(c=new Date(Date.UTC(c.getFullYear(),c.getMonth(),c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds())));return c}function j(b,c,d){if(a.datetimeAccessFormPaths.length>0){var e=d.split(".#")[0];return g(a.datetimeAccessFormPaths,b,c,e)?i(b):b}return b}function k(b,c,d,e){return!(c==z.ELEMENT_NODE&&a.xmlElementsFilter.length>0)||g(a.xmlElementsFilter,b,d,e)}function l(b,c){if(b.nodeType==z.DOCUMENT_NODE){for(var f=new Object,g=b.childNodes,i=0;i<g.length;i++){var m=g[i];if(m.nodeType==z.ELEMENT_NODE)if(a.ignoreRoot)f=l(m);else{f={};var n=d(m);f[n]=l(m)}}return f}if(b.nodeType==z.ELEMENT_NODE){var f=new Object;f.__cnt=0;for(var o=[],g=b.childNodes,i=0;i<g.length;i++){var m=g[i],n=d(m);if(m.nodeType!=z.COMMENT_NODE){var p=c+"."+n;if(k(f,m.nodeType,n,p))if(f.__cnt++,null==f[n]){var q=l(m,p);if("#text"!=n||/[^\s]/.test(q)){var r={};r[n]=q,o.push(r)}f[n]=q,h(f,n,p)}else{null!=f[n]&&(f[n]instanceof Array||(f[n]=[f[n]],h(f,n,p)));var q=l(m,p);if("#text"!=n||/[^\s]/.test(q)){var r={};r[n]=q,o.push(r)}f[n][f[n].length]=q}}}f.__children=o;for(var s=d(b),t=0;t<b.attributes.length;t++){var u=b.attributes[t];f.__cnt++;for(var v=u.value,w=0,x=a.matchers.length;w<x;w++){var y=a.matchers[w];y.test(u,s)&&(v=y.converter(u.value))}f[a.attributePrefix+u.name]=v}var A=e(b);return null!=A&&""!=A&&(f.__cnt++,f.__prefix=A),null!=f["#text"]&&(f.__text=f["#text"],f.__text instanceof Array&&(f.__text=f.__text.join("\n")),a.stripWhitespaces&&(f.__text=f.__text.trim()),delete f["#text"],"property"==a.arrayAccessForm&&delete f["#text_asArray"],f.__text=j(f.__text,n,c+"."+n)),null!=f["#cdata-section"]&&(f.__cdata=f["#cdata-section"],delete f["#cdata-section"],"property"==a.arrayAccessForm&&delete f["#cdata-section_asArray"]),0==f.__cnt&&"text"==a.emptyNodeForm?f="":1==f.__cnt&&null!=f.__text?f=f.__text:1!=f.__cnt||null==f.__cdata||a.keepCData?f.__cnt>1&&null!=f.__text&&a.skipEmptyTextNodesForObj&&(a.stripWhitespaces&&""==f.__text||""==f.__text.trim())&&delete f.__text:f=f.__cdata,delete f.__cnt,!a.enableToStringFunc||null==f.__text&&null==f.__cdata||(f.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),f}if(b.nodeType==z.TEXT_NODE||b.nodeType==z.CDATA_SECTION_NODE)return b.nodeValue}function m(b,c,d,e){var g="<"+(null!=b&&null!=b.__prefix?b.__prefix+":":"")+c;if(null!=d)for(var h=0;h<d.length;h++){var i=d[h],j=b[i];a.escapeMode&&(j=f(j)),g+=" "+i.substr(a.attributePrefix.length)+"=",a.useDoubleQuotes?g+='"'+j+'"':g+="'"+j+"'"}return g+=e?"/>":">"}function n(a,b){return"</"+(null!=a.__prefix?a.__prefix+":":"")+b+">"}function o(a,b){return-1!==a.indexOf(b,a.length-b.length)}function p(b,c){return!!("property"==a.arrayAccessForm&&o(c.toString(),"_asArray")||0==c.toString().indexOf(a.attributePrefix)||0==c.toString().indexOf("__")||b[c]instanceof Function)}function q(a){var b=0;if(a instanceof Object)for(var c in a)p(a,c)||b++;return b}function r(b,c,d){return 0==a.jsonPropertiesFilter.length||""==d||g(a.jsonPropertiesFilter,b,c,d)}function s(b){var c=[];if(b instanceof Object)for(var d in b)-1==d.toString().indexOf("__")&&0==d.toString().indexOf(a.attributePrefix)&&c.push(d);return c}function t(b){var c="";return null!=b.__cdata&&(c+="<![CDATA["+b.__cdata+"]]>"),null!=b.__text&&(a.escapeMode?c+=f(b.__text):c+=b.__text),c}function u(b){var c="";return b instanceof Object?c+=t(b):null!=b&&(a.escapeMode?c+=f(b):c+=b),c}function v(a,b){return""===a?b:a+"."+b}function w(a,b,c,d){var e="";if(0==a.length)e+=m(a,b,c,!0);else for(var f=0;f<a.length;f++)e+=m(a[f],b,s(a[f]),!1),e+=x(a[f],v(d,b)),e+=n(a[f],b);return e}function x(a,b){var c="";if(q(a)>0)for(var d in a)if(!p(a,d)&&(""==b||r(a,d,v(b,d)))){var e=a[d],f=s(e);if(null==e||void 0==e)c+=m(e,d,f,!0);else if(e instanceof Object)if(e instanceof Array)c+=w(e,d,f,b);else if(e instanceof Date)c+=m(e,d,f,!1),c+=e.toISOString(),c+=n(e,d);else{var g=q(e);g>0||null!=e.__text||null!=e.__cdata?(c+=m(e,d,f,!1),c+=x(e,v(b,d)),c+=n(e,d)):c+=m(e,d,f,!0)}else c+=m(e,d,f,!1),c+=u(e),c+=n(e,d)}return c+=u(a)}var y="1.2.0";a=a||{},b(),c();var z={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(a){window.ActiveXObject||window;if(void 0===a)return null;var b;if(window.DOMParser){var c=new window.DOMParser;try{b=c.parseFromString(a,"text/xml"),b.getElementsByTagNameNS("*","parsererror").length>0&&(b=null)}catch(d){b=null}}else 0==a.indexOf("<?")&&(a=a.substr(a.indexOf("?>")+2)),b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a);return b},this.asArray=function(a){return void 0===a||null==a?[]:a instanceof Array?a:[a]},this.toXmlDateTime=function(a){return a instanceof Date?a.toISOString():"number"==typeof a?new Date(a).toISOString():null},this.asDateTime=function(a){return"string"==typeof a?i(a):a},this.xml2json=function(a){return l(a)},this.xml_str2json=function(a){var b=this.parseXmlString(a);return null!=b?this.xml2json(b):null},this.json2xml_str=function(a){return x(a,"")},this.json2xml=function(a){var b=this.json2xml_str(a);return this.parseXmlString(b)},this.getVersion=function(){return y}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=d,b.exports=c.default},{}],4:[function(a,b,c){(function(b){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0});var e=a(91),f=d(e),g=a(47),h=d(g),i=a(45),j=d(i),k=a(48),l="undefined"!=typeof window&&window||b,m=l.dashjs;m||(m=l.dashjs={}),m.MediaPlayer=f.default,m.FactoryMaker=h.default,m.Debug=j.default,m.Version=(0,k.getVersionString)(),c.default=m,c.MediaPlayer=f.default,c.FactoryMaker=h.default,c.Debug=j.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{45:45,47:47,48:48,91:91}],5:[function(a,b,c){/*! codem-isoboxer v0.3.5 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
|
3 |
+
var d={};d.parseBuffer=function(a){return new e(a).parse()},d.addBoxProcessor=function(a,b){"string"==typeof a&&"function"==typeof b&&(f.prototype._boxProcessors[a]=b)},d.createFile=function(){return new e},d.createBox=function(a,b,c){var d=f.create(a);return b&&b.append(d,c),d},d.createFullBox=function(a,b,c){var e=d.createBox(a,b,c);return e.version=0,e.flags=0,e},d.Utils={},d.Utils.dataViewToString=function(a,b){var c=b||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(c).decode(a);var d=[],e=0;if("utf-8"===c)for(;e<a.byteLength;){var f=a.getUint8(e++);f<128||(f<224?(f=(31&f)<<6,f|=63&a.getUint8(e++)):f<240?(f=(15&f)<<12,f|=(63&a.getUint8(e++))<<6,f|=63&a.getUint8(e++)):(f=(7&f)<<18,f|=(63&a.getUint8(e++))<<12,f|=(63&a.getUint8(e++))<<6,f|=63&a.getUint8(e++))),d.push(String.fromCharCode(f))}else for(;e<a.byteLength;)d.push(String.fromCharCode(a.getUint8(e++)));return d.join("")},d.Utils.utf8ToByteArray=function(a){var b,c;if("undefined"!=typeof TextEncoder)b=(new TextEncoder).encode(a);else for(b=[],c=0;c<a.length;++c){var d=a.charCodeAt(c);d<128?b.push(d):d<2048?(b.push(192|d>>6),b.push(128|63&d)):d<65536?(b.push(224|d>>12),b.push(128|63&d>>6),b.push(128|63&d)):(b.push(240|d>>18),b.push(128|63&d>>12),b.push(128|63&d>>6),b.push(128|63&d))}return b},d.Utils.appendBox=function(a,b,c){if(b._offset=a._cursor.offset,b._root=a._root?a._root:a,b._raw=a._raw,b._parent=a,-1!==c){if(void 0===c||null===c)return void a.boxes.push(b);var d,e=-1;if("number"==typeof c)e=c;else{if("string"==typeof c)d=c;else{if("object"!=typeof c||!c.type)return void a.boxes.push(b);d=c.type}for(var f=0;f<a.boxes.length;f++)if(d===a.boxes[f].type){e=f+1;break}}a.boxes.splice(e,0,b)}},void 0!==c&&(c.parseBuffer=d.parseBuffer,c.addBoxProcessor=d.addBoxProcessor,c.createFile=d.createFile,c.createBox=d.createBox,c.createFullBox=d.createFullBox,c.Utils=d.Utils),d.Cursor=function(a){this.offset=void 0===a?0:a};var e=function(a){this._cursor=new d.Cursor,this.boxes=[],a&&(this._raw=new DataView(a))};e.prototype.fetch=function(a){var b=this.fetchAll(a,!0);return b.length?b[0]:null},e.prototype.fetchAll=function(a,b){var c=[];return e._sweep.call(this,a,c,b),c},e.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var a=f.parse(this);if(void 0===a.type)break;this.boxes.push(a)}return this},e._sweep=function(a,b,c){this.type&&this.type==a&&b.push(this);for(var d in this.boxes){if(b.length&&c)return;e._sweep.call(this.boxes[d],a,b,c)}},e.prototype.write=function(){var a,b=0;for(a=0;a<this.boxes.length;a++)b+=this.boxes[a].getLength(!1);var c=new Uint8Array(b);for(this._rawo=new DataView(c.buffer),this.bytes=c,this._cursor.offset=0,a=0;a<this.boxes.length;a++)this.boxes[a].write();return c.buffer},e.prototype.append=function(a,b){d.Utils.appendBox(this,a,b)};var f=function(){this._cursor=new d.Cursor};f.parse=function(a){var b=new f;return b._offset=a._cursor.offset,b._root=a._root?a._root:a,b._raw=a._raw,b._parent=a,b._parseBox(),a._cursor.offset=b._raw.byteOffset+b._raw.byteLength,b},f.create=function(a){var b=new f;return b.type=a,b.boxes=[],b},f.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],f.prototype._boxProcessors={},f.prototype._procField=function(a,b,c){this._parsing?this[a]=this._readField(b,c):this._writeField(b,c,this[a])},f.prototype._procFieldArray=function(a,b,c,d){var e;if(this._parsing)for(this[a]=[],e=0;e<b;e++)this[a][e]=this._readField(c,d);else for(e=0;e<this[a].length;e++)this._writeField(c,d,this[a][e])},f.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},f.prototype._procEntries=function(a,b,c){var d;if(this._parsing)for(this[a]=[],d=0;d<b;d++)this[a].push({}),c.call(this,this[a][d]);else for(d=0;d<b;d++)c.call(this,this[a][d])},f.prototype._procSubEntries=function(a,b,c,d){var e;if(this._parsing)for(a[b]=[],e=0;e<c;e++)a[b].push({}),d.call(this,a[b][e]);else for(e=0;e<c;e++)d.call(this,a[b][e])},f.prototype._procEntryField=function(a,b,c,d){this._parsing?a[b]=this._readField(c,d):this._writeField(c,d,a[b])},f.prototype._procSubBoxes=function(a,b){var c;if(this._parsing)for(this[a]=[],c=0;c<b;c++)this[a].push(f.parse(this));else for(c=0;c<b;c++)this._rawo?this[a][c].write():this.size+=this[a][c].getLength()},f.prototype._readField=function(a,b){switch(a){case"uint":return this._readUint(b);case"int":return this._readInt(b);case"template":return this._readTemplate(b);case"string":return-1===b?this._readTerminatedString():this._readString(b);case"data":return this._readData(b);case"utf8":return this._readUTF8String();default:return-1}},f.prototype._readInt=function(a){var b=null,c=this._cursor.offset-this._raw.byteOffset;switch(a){case 8:b=this._raw.getInt8(c);break;case 16:b=this._raw.getInt16(c);break;case 32:b=this._raw.getInt32(c);break;case 64:var d=this._raw.getInt32(c),e=this._raw.getInt32(c+4);b=d*Math.pow(2,32)+e}return this._cursor.offset+=a>>3,b},f.prototype._readUint=function(a){var b,c,d=null,e=this._cursor.offset-this._raw.byteOffset;switch(a){case 8:d=this._raw.getUint8(e);break;case 16:d=this._raw.getUint16(e);break;case 24:b=this._raw.getUint16(e),c=this._raw.getUint8(e+2),d=(b<<8)+c;break;case 32:d=this._raw.getUint32(e);break;case 64:b=this._raw.getUint32(e),c=this._raw.getUint32(e+4),d=b*Math.pow(2,32)+c}return this._cursor.offset+=a>>3,d},f.prototype._readString=function(a){for(var b="",c=0;c<a;c++){var d=this._readUint(8);b+=String.fromCharCode(d)}return b},f.prototype._readTemplate=function(a){return this._readUint(a/2)+this._readUint(a/2)/Math.pow(2,a/2)},f.prototype._readTerminatedString=function(){for(var a="";this._cursor.offset-this._offset<this._raw.byteLength;){var b=this._readUint(8);if(0===b)break;a+=String.fromCharCode(b)}return a},f.prototype._readData=function(a){var b=a>0?a:this._raw.byteLength-(this._cursor.offset-this._offset);if(b>0){var c=new Uint8Array(this._raw.buffer,this._cursor.offset,b);return this._cursor.offset+=b,c}return null},f.prototype._readUTF8String=function(){var a=this._raw.byteLength-(this._cursor.offset-this._offset),b=null;return a>0&&(b=new DataView(this._raw.buffer,this._cursor.offset,a),this._cursor.offset+=a),b?d.Utils.dataViewToString(b):b},f.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)return void(this._root._incomplete=!0);switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset+8);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())},f.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},f.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(f.parse(this))},f.prototype.append=function(a,b){d.Utils.appendBox(this,a,b)},f.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var a=0;a<this.boxes.length;a++)this.size+=this.boxes[a].getLength();return this._data&&this._writeData(this._data),this.size},f.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var a=0;a<this.boxes.length;a++)this.boxes[a].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},f.prototype._writeInt=function(a,b){if(this._rawo){var c=this._cursor.offset-this._rawo.byteOffset;switch(a){case 8:this._rawo.setInt8(c,b);break;case 16:this._rawo.setInt16(c,b);break;case 32:this._rawo.setInt32(c,b);break;case 64:var d=Math.floor(b/Math.pow(2,32)),e=b-d*Math.pow(2,32);this._rawo.setUint32(c,d),this._rawo.setUint32(c+4,e)}this._cursor.offset+=a>>3}else this.size+=a>>3},f.prototype._writeUint=function(a,b){if(this._rawo){var c,d,e=this._cursor.offset-this._rawo.byteOffset;switch(a){case 8:this._rawo.setUint8(e,b);break;case 16:this._rawo.setUint16(e,b);break;case 24:c=(16776960&b)>>8,d=255&b,this._rawo.setUint16(e,c),this._rawo.setUint8(e+2,d);break;case 32:this._rawo.setUint32(e,b);break;case 64:c=Math.floor(b/Math.pow(2,32)),d=b-c*Math.pow(2,32),this._rawo.setUint32(e,c),this._rawo.setUint32(e+4,d)}this._cursor.offset+=a>>3}else this.size+=a>>3},f.prototype._writeString=function(a,b){for(var c=0;c<a;c++)this._writeUint(8,b.charCodeAt(c))},f.prototype._writeTerminatedString=function(a){if(0!==a.length){for(var b=0;b<a.length;b++)this._writeUint(8,a.charCodeAt(b));this._writeUint(8,0)}},f.prototype._writeTemplate=function(a,b){var c=Math.floor(b),d=(b-c)*Math.pow(2,a/2);this._writeUint(a/2,c),this._writeUint(a/2,d)},f.prototype._writeData=function(a){var b;if(a)if(this._rawo){if(a instanceof Array){for(var c=this._cursor.offset-this._rawo.byteOffset,b=0;b<a.length;b++)this._rawo.setInt8(c+b,a[b]);this._cursor.offset+=a.length}a instanceof Uint8Array&&(this._root.bytes.set(a,this._cursor.offset),this._cursor.offset+=a.length)}else this.size+=a.length},f.prototype._writeUTF8String=function(a){var b=d.Utils.utf8ToByteArray(a);if(this._rawo)for(var c=new DataView(this._rawo.buffer,this._cursor.offset,b.length),e=0;e<b.length;e++)c.setUint8(e,b[e]);else this.size+=b.length},f.prototype._writeField=function(a,b,c){switch(a){case"uint":this._writeUint(b,c);break;case"int":this._writeInt(b,c);break;case"template":this._writeTemplate(b,c);break;case"string":-1==b?this._writeTerminatedString(c):this._writeString(b,c);break;case"data":this._writeData(c);break;case"utf8":this._writeUTF8String(c)}},f.prototype._boxProcessors.avc1=f.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},f.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},f.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(a){this._procEntryField(a,"segment_duration","uint",1===this.version?64:32),this._procEntryField(a,"media_time","int",1===this.version?64:32),this._procEntryField(a,"media_rate_integer","int",16),this._procEntryField(a,"media_rate_fraction","int",16)})},f.prototype._boxProcessors.emsg=function(){this._procFullBox(),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("message_data","data",-1)},f.prototype._boxProcessors.free=f.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},f.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},f.prototype._boxProcessors.ftyp=f.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var a=-1;this._parsing&&(a=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",a,"string",4)},f.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},f.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},f.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},f.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},f.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},f.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},f.prototype._boxProcessors.mp4a=f.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},f.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},f.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},f.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},f.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},f.prototype._boxProcessors.sdtp=function(){this._procFullBox();var a=-1;this._parsing&&(a=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",a,"uint",8)},f.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(a){this._parsing||(a.reference=(1&a.reference_type)<<31,a.reference|=2147483647&a.referenced_size,a.sap=(1&a.starts_with_SAP)<<31,a.sap|=(3&a.SAP_type)<<28,a.sap|=268435455&a.SAP_delta_time),this._procEntryField(a,"reference","uint",32),this._procEntryField(a,"subsegment_duration","uint",32),this._procEntryField(a,"sap","uint",32),this._parsing&&(a.reference_type=a.reference>>31&1,a.referenced_size=2147483647&a.reference,a.starts_with_SAP=a.sap>>31&1,a.SAP_type=a.sap>>28&7,a.SAP_delta_time=268435455&a.sap)})},f.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},f.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(a){this._procEntryField(a,"ranges_count","uint",32),this._procSubEntries(a,"ranges",a.ranges_count,function(a){this._procEntryField(a,"level","uint",8),this._procEntryField(a,"range_size","uint",24)})})},f.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},f.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(a){this._procEntryField(a,"sample_delta","uint",32),this._procEntryField(a,"subsample_count","uint",16),this._procSubEntries(a,"subsamples",a.subsample_count,function(a){this._procEntryField(a,"subsample_size","uint",1===this.version?32:16),this._procEntryField(a,"subsample_priority","uint",8),this._procEntryField(a,"discardable","uint",8),this._procEntryField(a,"codec_specific_parameters","uint",32)})})},f.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},f.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},f.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},f.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(a){this._procEntryField(a,"time","uint",1===this.version?64:32),this._procEntryField(a,"moof_offset","uint",1===this.version?64:32),this._procEntryField(a,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(a,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(a,"sample_number","uint",8*(this.length_size_of_sample_num+1))})},f.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},f.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},f.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(a){256&this.flags&&this._procEntryField(a,"sample_duration","uint",32),512&this.flags&&this._procEntryField(a,"sample_size","uint",32),1024&this.flags&&this._procEntryField(a,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(a,"sample_composition_time_offset",1===this.version?"int":"uint",32)})},f.prototype._boxProcessors["url "]=f.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},f.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},f.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},f.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},f.prototype._boxProcessors.vtte=function(){}},{}],6:[function(a,b,c){"use strict";var d=Array.isArray,e=Object.keys,f=Object.prototype.hasOwnProperty;b.exports=function a(b,c){if(b===c)return!0;var g,h,i,j=d(b),k=d(c);if(j&&k){if((h=b.length)!=c.length)return!1;for(g=0;g<h;g++)if(!a(b[g],c[g]))return!1;return!0}if(j!=k)return!1;var l=b instanceof Date,m=c instanceof Date;if(l!=m)return!1;if(l&&m)return b.getTime()==c.getTime();var n=b instanceof RegExp,o=c instanceof RegExp;if(n!=o)return!1;if(n&&o)return b.toString()==c.toString();if(b instanceof Object&&c instanceof Object){var p=e(b);if((h=p.length)!==e(c).length)return!1;for(g=0;g<h;g++)if(!f.call(c,p[g]))return!1;for(g=0;g<h;g++)if(i=p[g],!a(b[i],c[i]))return!1;return!0}return!1}},{}],7:[function(a,b,c){!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===f||b===k?62:b===g||b===l?63:b<h?-1:b<h+10?b-h+26+26:b<j+26?b-j:b<i+26?b-i+26:void 0}function c(a){function c(a){j[l++]=a}var d,f,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new e(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,f=0;d<g;d+=4,f+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function d(a){function b(a){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var d,e,f,g=a.length%3,h="";for(d=0,f=a.length-g;d<f;d+=3)e=(a[d]<<16)+(a[d+1]<<8)+a[d+2],h+=c(e);switch(g){case 1:e=a[a.length-1],h+=b(e>>2),h+=b(e<<4&63),h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=b(e>>10),h+=b(e>>4&63),h+=b(e<<2&63),h+="="}return h}var e="undefined"!=typeof Uint8Array?Uint8Array:Array,f="+".charCodeAt(0),g="/".charCodeAt(0),h="0".charCodeAt(0),i="a".charCodeAt(0),j="A".charCodeAt(0),k="-".charCodeAt(0),l="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=d}(void 0===c?this.base64js={}:c)},{}],8:[function(a,b,c){},{}],9:[function(a,b,c){(function(b){/*!
|
4 |
* The buffer module from node.js, for the browser.
|
5 |
*
|
6 |
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
7 |
* @license MIT
|
8 |
*/
|
9 |
+
"use strict";function d(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(c){return!1}}function e(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(a){return this instanceof f?(f.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof a?g(this,a):"string"==typeof a?h(this,a,arguments.length>1?arguments[1]:"utf8"):i(this,a)):arguments.length>1?new f(a,arguments[1]):new f(a)}function g(a,b){if(a=p(a,b<0?0:0|q(b)),!f.TYPED_ARRAY_SUPPORT)for(var c=0;c<b;c++)a[c]=0;return a}function h(a,b,c){return"string"==typeof c&&""!==c||(c="utf8"),a=p(a,0|s(b,c)),a.write(b,c),a}function i(a,b){if(f.isBuffer(b))return j(a,b);if(Y(b))return k(a,b);if(null==b)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(b.buffer instanceof ArrayBuffer)return l(a,b);if(b instanceof ArrayBuffer)return m(a,b)}return b.length?n(a,b):o(a,b)}function j(a,b){var c=0|q(b.length);return a=p(a,c),b.copy(a,0,0,c),a}function k(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function m(a,b){return f.TYPED_ARRAY_SUPPORT?(b.byteLength,a=f._augment(new Uint8Array(b))):a=l(a,new Uint8Array(b)),a}function n(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function o(a,b){var c,d=0;"Buffer"===b.type&&Y(b.data)&&(c=b.data,d=0|q(c.length)),a=p(a,d);for(var e=0;e<d;e+=1)a[e]=255&c[e];return a}function p(a,b){return f.TYPED_ARRAY_SUPPORT?(a=f._augment(new Uint8Array(b)),a.__proto__=f.prototype):(a.length=b,a._isBuffer=!0),0!==b&&b<=f.poolSize>>>1&&(a.parent=Z),a}function q(a){if(a>=e())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+e().toString(16)+" bytes");return 0|a}function r(a,b){if(!(this instanceof r))return new r(a,b);var c=new f(a,b);return delete c.parent,c}function s(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return R(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return U(a).length;default:if(d)return R(a).length;b=(""+b).toLowerCase(),d=!0}}function t(a,b,c){var d=!1;if(b|=0,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),b<0&&(b=0),c>this.length&&(c=this.length),c<=b)return"";for(;;)switch(a){case"hex":return F(this,b,c);case"utf8":case"utf-8":return B(this,b,c);case"ascii":return D(this,b,c);case"binary":return E(this,b,c);case"base64":return A(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function u(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d))>e&&(d=e):d=e;var f=b.length;if(f%2!=0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;g<d;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function v(a,b,c,d){return V(R(b,a.length-c),a,c,d)}function w(a,b,c,d){return V(S(b),a,c,d)}function x(a,b,c,d){return w(a,b,c,d)}function y(a,b,c,d){return V(U(b),a,c,d)}function z(a,b,c,d){return V(T(b,a.length-c),a,c,d)}function A(a,b,c){return 0===b&&c===a.length?W.fromByteArray(a):W.fromByteArray(a.slice(b,c))}function B(a,b,c){c=Math.min(a.length,c);for(var d=[],e=b;e<c;){var f=a[e],g=null,h=f>239?4:f>223?3:f>191?2:1;if(e+h<=c){var i,j,k,l;switch(h){case 1:f<128&&(g=f);break;case 2:i=a[e+1],128==(192&i)&&(l=(31&f)<<6|63&i)>127&&(g=l);break;case 3:i=a[e+1],j=a[e+2],128==(192&i)&&128==(192&j)&&(l=(15&f)<<12|(63&i)<<6|63&j)>2047&&(l<55296||l>57343)&&(g=l);break;case 4:i=a[e+1],j=a[e+2],k=a[e+3],128==(192&i)&&128==(192&j)&&128==(192&k)&&(l=(15&f)<<18|(63&i)<<12|(63&j)<<6|63&k)>65535&&l<1114112&&(g=l)}}null===g?(g=65533,h=1):g>65535&&(g-=65536,d.push(g>>>10&1023|55296),g=56320|1023&g),d.push(g),e+=h}return C(d)}function C(a){var b=a.length;if(b<=$)return String.fromCharCode.apply(String,a);for(var c="",d=0;d<b;)c+=String.fromCharCode.apply(String,a.slice(d,d+=$));return c}function D(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;e<c;e++)d+=String.fromCharCode(127&a[e]);return d}function E(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;e<c;e++)d+=String.fromCharCode(a[e]);return d}function F(a,b,c){var d=a.length;(!b||b<0)&&(b=0),(!c||c<0||c>d)&&(c=d);for(var e="",f=b;f<c;f++)e+=Q(a[f]);return e}function G(a,b,c){for(var d=a.slice(b,c),e="",f=0;f<d.length;f+=2)e+=String.fromCharCode(d[f]+256*d[f+1]);return e}function H(a,b,c){if(a%1!=0||a<0)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function I(a,b,c,d,e,g){if(!f.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>e||b<g)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range")}function J(a,b,c,d){b<0&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);e<f;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function K(a,b,c,d){b<0&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);e<f;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function L(a,b,c,d,e,f){if(b>e||b<f)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(c<0)throw new RangeError("index out of range")}function M(a,b,c,d,e){return e||L(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(a,b,c,d,23,4),c+4}function N(a,b,c,d,e){return e||L(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(a,b,c,d,52,8),c+8}function O(a){if(a=P(a).replace(aa,""),a.length<2)return"";for(;a.length%4!=0;)a+="=";return a}function P(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Q(a){return a<16?"0"+a.toString(16):a.toString(16)}function R(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;g<d;g++){if((c=a.charCodeAt(g))>55295&&c<57344){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(c<56320){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=65536+(e-55296<<10|c-56320)}else e&&(b-=3)>-1&&f.push(239,191,189);if(e=null,c<128){if((b-=1)<0)break;f.push(c)}else if(c<2048){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(c<65536){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(c<1114112))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function S(a){for(var b=[],c=0;c<a.length;c++)b.push(255&a.charCodeAt(c));return b}function T(a,b){for(var c,d,e,f=[],g=0;g<a.length&&!((b-=2)<0);g++)c=a.charCodeAt(g),d=c>>8,e=c%256,f.push(e),f.push(d);return f}function U(a){return W.toByteArray(O(a))}function V(a,b,c,d){for(var e=0;e<d&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}var W=a(7),X=a(13),Y=a(10);c.Buffer=f,c.SlowBuffer=r,c.INSPECT_MAX_BYTES=50,f.poolSize=8192;var Z={};f.TYPED_ARRAY_SUPPORT=void 0!==b.TYPED_ARRAY_SUPPORT?b.TYPED_ARRAY_SUPPORT:d(),f.TYPED_ARRAY_SUPPORT?(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array):(f.prototype.length=void 0,f.prototype.parent=void 0),f.isBuffer=function(a){return!(null==a||!a._isBuffer)},f.compare=function(a,b){if(!f.isBuffer(a)||!f.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,e=0,g=Math.min(c,d);e<g&&a[e]===b[e];)++e;return e!==g&&(c=a[e],d=b[e]),c<d?-1:d<c?1:0},f.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(a,b){if(!Y(a))throw new TypeError("list argument must be an Array of Buffers.");if(0===a.length)return new f(0);var c;if(void 0===b)for(b=0,c=0;c<a.length;c++)b+=a[c].length;var d=new f(b),e=0;for(c=0;c<a.length;c++){var g=a[c];g.copy(d,e),e+=g.length}return d},f.byteLength=s,f.prototype.toString=function(){var a=0|this.length;return 0===a?"":0===arguments.length?B(this,0,a):t.apply(this,arguments)},f.prototype.equals=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a||0===f.compare(this,a)},f.prototype.inspect=function(){var a="",b=c.INSPECT_MAX_BYTES;return this.length>0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),"<Buffer "+a+">"},f.prototype.compare=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?0:f.compare(this,a)},f.prototype.indexOf=function(a,b){function c(a,b,c){for(var d=-1,e=0;c+e<a.length;e++)if(a[c+e]===b[-1===d?0:e-d]){if(-1===d&&(d=e),e-d+1===b.length)return c+d}else d=-1;return-1}if(b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b>>=0,0===this.length)return-1;if(b>=this.length)return-1;if(b<0&&(b=Math.max(this.length+b,0)),"string"==typeof a)return 0===a.length?-1:String.prototype.indexOf.call(this,a,b);if(f.isBuffer(a))return c(this,a,b);if("number"==typeof a)return f.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,a,b):c(this,[a],b);throw new TypeError("val must be string, number or Buffer")},f.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},f.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},f.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b|=0,isFinite(c)?(c|=0,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(c<0||b<0)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return u(this,a,b,c);case"utf8":case"utf-8":return v(this,a,b,c);case"ascii":return w(this,a,b,c);case"binary":return x(this,a,b,c);case"base64":return y(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;f.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,a<0?(a+=c)<0&&(a=0):a>c&&(a=c),b<0?(b+=c)<0&&(b=0):b>c&&(b=c),b<a&&(b=a);var d;if(f.TYPED_ARRAY_SUPPORT)d=f._augment(this.subarray(a,b));else{var e=b-a;d=new f(e,void 0);for(var g=0;g<e;g++)d[g]=this[g+a]}return d.length&&(d.parent=this.parent||this),d},f.prototype.readUIntLE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f<b&&(e*=256);)d+=this[a+f]*e;return d},f.prototype.readUIntBE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=this[a+--b],e=1;b>0&&(e*=256);)d+=this[a+--b]*e;return d},f.prototype.readUInt8=function(a,b){return b||H(a,1,this.length),this[a]},f.prototype.readUInt16LE=function(a,b){return b||H(a,2,this.length),this[a]|this[a+1]<<8},f.prototype.readUInt16BE=function(a,b){return b||H(a,2,this.length),this[a]<<8|this[a+1]},f.prototype.readUInt32LE=function(a,b){return b||H(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},f.prototype.readUInt32BE=function(a,b){return b||H(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},f.prototype.readIntLE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f<b&&(e*=256);)d+=this[a+f]*e;return e*=128,d>=e&&(d-=Math.pow(2,8*b)),d},f.prototype.readIntBE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},f.prototype.readInt8=function(a,b){return b||H(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},f.prototype.readInt16LE=function(a,b){b||H(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},f.prototype.readInt16BE=function(a,b){b||H(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},f.prototype.readInt32LE=function(a,b){return b||H(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},f.prototype.readInt32BE=function(a,b){return b||H(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},f.prototype.readFloatLE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!0,23,4)},f.prototype.readFloatBE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!1,23,4)},f.prototype.readDoubleLE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!0,52,8)},f.prototype.readDoubleBE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!1,52,8)},f.prototype.writeUIntLE=function(a,b,c,d){a=+a,b|=0,c|=0,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f<c&&(e*=256);)this[b+f]=a/e&255;return b+c},f.prototype.writeUIntBE=function(a,b,c,d){a=+a,b|=0,c|=0,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=c-1,f=1;for(this[b+e]=255&a;--e>=0&&(f*=256);)this[b+e]=a/f&255;return b+c},f.prototype.writeUInt8=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,1,255,0),f.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=255&a,b+1},f.prototype.writeUInt16LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):J(this,a,b,!0),b+2},f.prototype.writeUInt16BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):J(this,a,b,!1),b+2},f.prototype.writeUInt32LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=255&a):K(this,a,b,!0),b+4},f.prototype.writeUInt32BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):K(this,a,b,!1),b+4},f.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b|=0,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=0,g=1,h=a<0?1:0;for(this[b]=255&a;++f<c&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},f.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b|=0,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=a<0?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},f.prototype.writeInt8=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,1,127,-128),f.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),a<0&&(a=255+a+1),this[b]=255&a,b+1},f.prototype.writeInt16LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):J(this,a,b,!0),b+2},f.prototype.writeInt16BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):J(this,a,b,!1),b+2},f.prototype.writeInt32LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):K(this,a,b,!0),b+4},f.prototype.writeInt32BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):K(this,a,b,!1),b+4},f.prototype.writeFloatLE=function(a,b,c){return M(this,a,b,!0,c)},f.prototype.writeFloatBE=function(a,b,c){return M(this,a,b,!1,c)},f.prototype.writeDoubleLE=function(a,b,c){return N(this,a,b,!0,c)},f.prototype.writeDoubleBE=function(a,b,c){return N(this,a,b,!1,c)},f.prototype.copy=function(a,b,c,d){if(c||(c=0),d||0===d||(d=this.length),b>=a.length&&(b=a.length),b||(b=0),d>0&&d<c&&(d=c),d===c)return 0;if(0===a.length||0===this.length)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("sourceStart out of bounds");if(d<0)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-b<d-c&&(d=a.length-b+c);var e,g=d-c;if(this===a&&c<b&&b<d)for(e=g-1;e>=0;e--)a[e+b]=this[e+c];else if(g<1e3||!f.TYPED_ARRAY_SUPPORT)for(e=0;e<g;e++)a[e+b]=this[e+c];else a._set(this.subarray(c,c+g),b);return g},f.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),c<b)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(b<0||b>=this.length)throw new RangeError("start out of bounds");if(c<0||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;d<c;d++)this[d]=a;else{var e=R(a.toString()),f=e.length;for(d=b;d<c;d++)this[d]=e[d%f]}return this}},f.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(f.TYPED_ARRAY_SUPPORT)return new f(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;b<c;b+=1)a[b]=this[b];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var _=f.prototype;f._augment=function(a){return a.constructor=f,a._isBuffer=!0,a._set=a.set,a.get=_.get,a.set=_.set,a.write=_.write,a.toString=_.toString,a.toLocaleString=_.toString,a.toJSON=_.toJSON,a.equals=_.equals,a.compare=_.compare,a.indexOf=_.indexOf,a.copy=_.copy,a.slice=_.slice,a.readUIntLE=_.readUIntLE,a.readUIntBE=_.readUIntBE,a.readUInt8=_.readUInt8,a.readUInt16LE=_.readUInt16LE,a.readUInt16BE=_.readUInt16BE,a.readUInt32LE=_.readUInt32LE,a.readUInt32BE=_.readUInt32BE,a.readIntLE=_.readIntLE,a.readIntBE=_.readIntBE,a.readInt8=_.readInt8,a.readInt16LE=_.readInt16LE,a.readInt16BE=_.readInt16BE,a.readInt32LE=_.readInt32LE,a.readInt32BE=_.readInt32BE,a.readFloatLE=_.readFloatLE,a.readFloatBE=_.readFloatBE,a.readDoubleLE=_.readDoubleLE,a.readDoubleBE=_.readDoubleBE,a.writeUInt8=_.writeUInt8,a.writeUIntLE=_.writeUIntLE,a.writeUIntBE=_.writeUIntBE,a.writeUInt16LE=_.writeUInt16LE,a.writeUInt16BE=_.writeUInt16BE,a.writeUInt32LE=_.writeUInt32LE,a.writeUInt32BE=_.writeUInt32BE,a.writeIntLE=_.writeIntLE,a.writeIntBE=_.writeIntBE,a.writeInt8=_.writeInt8,a.writeInt16LE=_.writeInt16LE,a.writeInt16BE=_.writeInt16BE,a.writeInt32LE=_.writeInt32LE,a.writeInt32BE=_.writeInt32BE,a.writeFloatLE=_.writeFloatLE,a.writeFloatBE=_.writeFloatBE,a.writeDoubleLE=_.writeDoubleLE,a.writeDoubleBE=_.writeDoubleBE,a.fill=_.fill,a.inspect=_.inspect,a.toArrayBuffer=_.toArrayBuffer,a};var aa=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,13:13,7:7}],10:[function(a,b,c){var d={}.toString;b.exports=Array.isArray||function(a){return"[object Array]"==d.call(a)}},{}],11:[function(a,b,c){(function(a){function b(a){return Array.isArray?Array.isArray(a):"[object Array]"===q(a)}function d(a){return"boolean"==typeof a}function e(a){return null===a}function f(a){return null==a}function g(a){return"number"==typeof a}function h(a){return"string"==typeof a}function i(a){return"symbol"==typeof a}function j(a){return void 0===a}function k(a){return"[object RegExp]"===q(a)}function l(a){return"object"==typeof a&&null!==a}function m(a){return"[object Date]"===q(a)}function n(a){return"[object Error]"===q(a)||a instanceof Error}function o(a){return"function"==typeof a}function p(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||void 0===a}function q(a){return Object.prototype.toString.call(a)}c.isArray=b,c.isBoolean=d,c.isNull=e,c.isNullOrUndefined=f,c.isNumber=g,c.isString=h,c.isSymbol=i,c.isUndefined=j,c.isRegExp=k,c.isObject=l,c.isDate=m,c.isError=n,c.isFunction=o,c.isPrimitive=p,c.isBuffer=a.isBuffer}).call(this,{isBuffer:a(15)})},{15:15}],12:[function(a,b,c){function d(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function e(a){return"function"==typeof a}function f(a){return"number"==typeof a}function g(a){return"object"==typeof a&&null!==a}function h(a){return void 0===a}b.exports=d,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._maxListeners=void 0,d.defaultMaxListeners=10,d.prototype.setMaxListeners=function(a){if(!f(a)||a<0||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},d.prototype.emit=function(a){var b,c,d,f,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||g(this._events.error)&&!this._events.error.length)){if((b=arguments[1])instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],h(c))return!1;if(e(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(d=arguments.length,f=new Array(d-1),i=1;i<d;i++)f[i-1]=arguments[i];c.apply(this,f)}else if(g(c)){for(d=arguments.length,f=new Array(d-1),i=1;i<d;i++)f[i-1]=arguments[i];for(j=c.slice(),d=j.length,i=0;i<d;i++)j[i].apply(this,f)}return!0},d.prototype.addListener=function(a,b){var c;if(!e(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,e(b.listener)?b.listener:b),this._events[a]?g(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,g(this._events[a])&&!this._events[a].warned){var c;c=h(this._maxListeners)?d.defaultMaxListeners:this._maxListeners,c&&c>0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())}return this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){function c(){this.removeListener(a,c),d||(d=!0,b.apply(this,arguments))}if(!e(b))throw TypeError("listener must be a function");var d=!1;return c.listener=b,this.on(a,c),this},d.prototype.removeListener=function(a,b){var c,d,f,h;if(!e(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,d=-1,c===b||e(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(g(c)){for(h=f;h-- >0;)if(c[h]===b||c[h].listener&&c[h].listener===b){d=h;break}if(d<0)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(d,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},d.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],e(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},d.prototype.listeners=function(a){return this._events&&this._events[a]?e(this._events[a])?[this._events[a]]:this._events[a].slice():[]},d.listenerCount=function(a,b){return a._events&&a._events[b]?e(a._events[b])?1:a._events[b].length:0}},{}],13:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<<h)-1,j=i>>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<<j)-1,l=k>>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=b<0||0===b&&1/b<0?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<<e|h,j+=e;j>0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],14:[function(a,b,c){"function"==typeof Object.create?b.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:b.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],15:[function(a,b,c){function d(a){return!!a.constructor&&"function"==typeof a.constructor.isBuffer&&a.constructor.isBuffer(a)}function e(a){return"function"==typeof a.readFloatLE&&"function"==typeof a.slice&&d(a.slice(0,0))}/*!
|
|
|
|
|
10 |
* Determine if an object is a Buffer
|
11 |
*
|
12 |
* @author Feross Aboukhadijeh <https://feross.org>
|
13 |
* @license MIT
|
14 |
*/
|
15 |
+
b.exports=function(a){return null!=a&&(d(a)||e(a)||!!a._isBuffer)}},{}],16:[function(a,b,c){(function(a){"use strict";function c(b,c,d,e){if("function"!=typeof b)throw new TypeError('"callback" argument must be a function');var f,g,h=arguments.length;switch(h){case 0:case 1:return a.nextTick(b);case 2:return a.nextTick(function(){b.call(null,c)});case 3:return a.nextTick(function(){b.call(null,c,d)});case 4:return a.nextTick(function(){b.call(null,c,d,e)});default:for(f=new Array(h-1),g=0;g<f.length;)f[g++]=arguments[g];return a.nextTick(function(){b.apply(null,f)})}}!a.version||0===a.version.indexOf("v0.")||0===a.version.indexOf("v1.")&&0!==a.version.indexOf("v1.8.")?b.exports={nextTick:c}:b.exports=a}).call(this,a(17))},{17:17}],17:[function(a,b,c){function d(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function f(a){if(l===setTimeout)return setTimeout(a,0);if((l===d||!l)&&setTimeout)return l=setTimeout,setTimeout(a,0);try{return l(a,0)}catch(b){try{return l.call(null,a,0)}catch(b){return l.call(this,a,0)}}}function g(a){if(m===clearTimeout)return clearTimeout(a);if((m===e||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(a);try{return m(a)}catch(b){try{return m.call(null,a)}catch(b){return m.call(this,a)}}}function h(){q&&o&&(q=!1,o.length?p=o.concat(p):r=-1,p.length&&i())}function i(){if(!q){var a=f(h);q=!0;for(var b=p.length;b;){for(o=p,p=[];++r<b;)o&&o[r].run();r=-1,b=p.length}o=null,q=!1,g(a)}}function j(a,b){this.fun=a,this.array=b}function k(){}var l,m,n=b.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:d}catch(a){l=d}try{m="function"==typeof clearTimeout?clearTimeout:e}catch(a){m=e}}();var o,p=[],q=!1,r=-1;n.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];p.push(new j(a,b)),1!==p.length||q||f(i)},j.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=k,n.addListener=k,n.once=k,n.off=k,n.removeListener=k,n.removeAllListeners=k,n.emit=k,n.prependListener=k,n.prependOnceListener=k,n.listeners=function(a){return[]},n.binding=function(a){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(a){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],18:[function(a,b,c){b.exports=a(19)},{19:19}],19:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);j.call(this,a),k.call(this,a),a&&!1===a.readable&&(this.readable=!1),a&&!1===a.writable&&(this.writable=!1),this.allowHalfOpen=!0,a&&!1===a.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",e)}function e(){this.allowHalfOpen||this._writableState.ended||g.nextTick(f,this)}function f(a){a.end()}var g=a(16),h=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b};b.exports=d;var i=a(11);i.inherits=a(14);var j=a(21),k=a(23);i.inherits(d,j);for(var l=h(k.prototype),m=0;m<l.length;m++){var n=l[m];d.prototype[n]||(d.prototype[n]=k.prototype[n])}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(a){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=a,this._writableState.destroyed=a)}}),d.prototype._destroy=function(a,b){this.push(null),this.end(),g.nextTick(b,a)}},{11:11,14:14,16:16,21:21,23:23}],20:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);e.call(this,a)}b.exports=d;var e=a(22),f=a(11);f.inherits=a(14),f.inherits(d,e),d.prototype._transform=function(a,b,c){c(null,a)}},{11:11,14:14,22:22}],21:[function(a,b,c){(function(c,d){"use strict";function e(a){return L.from(a)}function f(a){return L.isBuffer(a)||a instanceof M}function g(a,b,c){if("function"==typeof a.prependListener)return a.prependListener(b,c);a._events&&a._events[b]?I(a._events[b])?a._events[b].unshift(c):a._events[b]=[c,a._events[b]]:a.on(b,c)}function h(b,c){H=H||a(19),b=b||{};var d=c instanceof H;this.objectMode=!!b.objectMode,d&&(this.objectMode=this.objectMode||!!b.readableObjectMode);var e=b.highWaterMark,f=b.readableHighWaterMark,g=this.objectMode?16:16384;this.highWaterMark=e||0===e?e:d&&(f||0===f)?f:g,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new R,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=b.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(Q||(Q=a(28).StringDecoder),this.decoder=new Q(b.encoding),this.encoding=b.encoding)}function i(b){if(H=H||a(19),!(this instanceof i))return new i(b);this._readableState=new h(b,this),this.readable=!0,b&&("function"==typeof b.read&&(this._read=b.read),"function"==typeof b.destroy&&(this._destroy=b.destroy)),K.call(this)}function j(a,b,c,d,f){var g=a._readableState;if(null===b)g.reading=!1,p(a,g);else{var h;f||(h=l(g,b)),h?a.emit("error",h):g.objectMode||b&&b.length>0?("string"==typeof b||g.objectMode||Object.getPrototypeOf(b)===L.prototype||(b=e(b)),d?g.endEmitted?a.emit("error",new Error("stream.unshift() after end event")):k(a,g,b,!0):g.ended?a.emit("error",new Error("stream.push() after EOF")):(g.reading=!1,g.decoder&&!c?(b=g.decoder.write(b),g.objectMode||0!==b.length?k(a,g,b,!1):s(a,g)):k(a,g,b,!1))):d||(g.reading=!1)}return m(g)}function k(a,b,c,d){b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,d?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&q(a)),s(a,b)}function l(a,b){var c;return f(b)||"string"==typeof b||void 0===b||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function m(a){return!a.ended&&(a.needReadable||a.length<a.highWaterMark||0===a.length)}function n(a){return a>=U?a=U:(a--,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a++),a}function o(a,b){return a<=0||0===b.length&&b.ended?0:b.objectMode?1:a!==a?b.flowing&&b.length?b.buffer.head.data.length:b.length:(a>b.highWaterMark&&(b.highWaterMark=n(a)),a<=b.length?a:b.ended?b.length:(b.needReadable=!0,0))}function p(a,b){if(!b.ended){if(b.decoder){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,q(a)}}function q(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(P("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?G.nextTick(r,a):r(a))}function r(a){P("emit readable"),a.emit("readable"),y(a)}function s(a,b){b.readingMore||(b.readingMore=!0,G.nextTick(t,a,b))}function t(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length<b.highWaterMark&&(P("maybeReadMore read 0"),a.read(0),c!==b.length);)c=b.length;b.readingMore=!1}function u(a){return function(){var b=a._readableState;P("pipeOnDrain",b.awaitDrain),b.awaitDrain&&b.awaitDrain--,0===b.awaitDrain&&J(a,"data")&&(b.flowing=!0,y(a))}}function v(a){P("readable nexttick read 0"),a.read(0)}function w(a,b){b.resumeScheduled||(b.resumeScheduled=!0,G.nextTick(x,a,b))}function x(a,b){b.reading||(P("resume read 0"),a.read(0)),b.resumeScheduled=!1,b.awaitDrain=0,a.emit("resume"),y(a),b.flowing&&!b.reading&&a.read(0)}function y(a){var b=a._readableState;for(P("flow",b.flowing);b.flowing&&null!==a.read(););}function z(a,b){if(0===b.length)return null;var c;return b.objectMode?c=b.buffer.shift():!a||a>=b.length?(c=b.decoder?b.buffer.join(""):1===b.buffer.length?b.buffer.head.data:b.buffer.concat(b.length),b.buffer.clear()):c=A(a,b.buffer,b.decoder),c}function A(a,b,c){var d;return a<b.head.data.length?(d=b.head.data.slice(0,a),b.head.data=b.head.data.slice(a)):d=a===b.head.data.length?b.shift():c?B(a,b):C(a,b),d}function B(a,b){var c=b.head,d=1,e=c.data;for(a-=e.length;c=c.next;){var f=c.data,g=a>f.length?f.length:a;if(g===f.length?e+=f:e+=f.slice(0,a),0===(a-=g)){g===f.length?(++d,c.next?b.head=c.next:b.head=b.tail=null):(b.head=c,c.data=f.slice(g));break}++d}return b.length-=d,e}function C(a,b){var c=L.allocUnsafe(a),d=b.head,e=1;for(d.data.copy(c),a-=d.data.length;d=d.next;){var f=d.data,g=a>f.length?f.length:a;if(f.copy(c,c.length-a,0,g),0===(a-=g)){g===f.length?(++e,d.next?b.head=d.next:b.head=b.tail=null):(b.head=d,d.data=f.slice(g));break}++e}return b.length-=e,c}function D(a){var b=a._readableState;if(b.length>0)throw new Error('"endReadable()" called on non-empty stream');b.endEmitted||(b.ended=!0,G.nextTick(E,b,a))}function E(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}function F(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}var G=a(16);b.exports=i;var H,I=a(27);i.ReadableState=h;var J=(a(12).EventEmitter,function(a,b){return a.listeners(b).length}),K=a(26),L=a(33).Buffer,M=d.Uint8Array||function(){},N=a(11);N.inherits=a(14);var O=a(8),P=void 0;P=O&&O.debuglog?O.debuglog("stream"):function(){};var Q,R=a(24),S=a(25);N.inherits(i,K);var T=["error","close","destroy","pause","resume"];Object.defineProperty(i.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(a){this._readableState&&(this._readableState.destroyed=a)}}),i.prototype.destroy=S.destroy,i.prototype._undestroy=S.undestroy,i.prototype._destroy=function(a,b){this.push(null),b(a)},i.prototype.push=function(a,b){var c,d=this._readableState;return d.objectMode?c=!0:"string"==typeof a&&(b=b||d.defaultEncoding,b!==d.encoding&&(a=L.from(a,b),b=""),c=!0),j(this,a,b,!1,c)},i.prototype.unshift=function(a){return j(this,a,null,!0,!1)},i.prototype.isPaused=function(){return!1===this._readableState.flowing},i.prototype.setEncoding=function(b){return Q||(Q=a(28).StringDecoder),this._readableState.decoder=new Q(b),this._readableState.encoding=b,this};var U=8388608;i.prototype.read=function(a){P("read",a),a=parseInt(a,10);var b=this._readableState,c=a;if(0!==a&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return P("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?D(this):q(this),null;if(0===(a=o(a,b))&&b.ended)return 0===b.length&&D(this),null;var d=b.needReadable;P("need readable",d),(0===b.length||b.length-a<b.highWaterMark)&&(d=!0,P("length less than watermark",d)),b.ended||b.reading?(d=!1,P("reading or ended",d)):d&&(P("do read"),b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1,b.reading||(a=o(c,b)));var e;return e=a>0?z(a,b):null,null===e?(b.needReadable=!0,a=0):b.length-=a,0===b.length&&(b.ended||(b.needReadable=!0),c!==a&&b.ended&&D(this)),null!==e&&this.emit("data",e),e},i.prototype._read=function(a){this.emit("error",new Error("_read() is not implemented"))},i.prototype.pipe=function(a,b){function d(a,b){P("onunpipe"),a===m&&b&&!1===b.hasUnpiped&&(b.hasUnpiped=!0,f())}function e(){P("onend"),a.end()}function f(){P("cleanup"),a.removeListener("close",j),a.removeListener("finish",k),a.removeListener("drain",q),a.removeListener("error",i),a.removeListener("unpipe",d),m.removeListener("end",e),m.removeListener("end",l),m.removeListener("data",h),r=!0,!n.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function h(b){P("ondata"),s=!1,!1!==a.write(b)||s||((1===n.pipesCount&&n.pipes===a||n.pipesCount>1&&-1!==F(n.pipes,a))&&!r&&(P("false write response, pause",m._readableState.awaitDrain),m._readableState.awaitDrain++,s=!0),m.pause())}function i(b){P("onerror",b),l(),a.removeListener("error",i),0===J(a,"error")&&a.emit("error",b)}function j(){a.removeListener("finish",k),l()}function k(){P("onfinish"),a.removeListener("close",j),l()}function l(){P("unpipe"),m.unpipe(a)}var m=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=a;break;case 1:n.pipes=[n.pipes,a];break;default:n.pipes.push(a)}n.pipesCount+=1,P("pipe count=%d opts=%j",n.pipesCount,b);var o=(!b||!1!==b.end)&&a!==c.stdout&&a!==c.stderr,p=o?e:l;n.endEmitted?G.nextTick(p):m.once("end",p),a.on("unpipe",d);var q=u(m);a.on("drain",q);var r=!1,s=!1;return m.on("data",h),g(a,"error",i),a.once("close",j),a.once("finish",k),a.emit("pipe",m),n.flowing||(P("pipe resume"),m.resume()),a},i.prototype.unpipe=function(a){var b=this._readableState,c={hasUnpiped:!1};if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this,c),this);if(!a){var d=b.pipes,e=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var f=0;f<e;f++)d[f].emit("unpipe",this,c);return this}var g=F(b.pipes,a);return-1===g?this:(b.pipes.splice(g,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this,c),this)},i.prototype.on=function(a,b){var c=K.prototype.on.call(this,a,b);if("data"===a)!1!==this._readableState.flowing&&this.resume();else if("readable"===a){var d=this._readableState;d.endEmitted||d.readableListening||(d.readableListening=d.needReadable=!0,d.emittedReadable=!1,d.reading?d.length&&q(this):G.nextTick(v,this))}return c},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var a=this._readableState;return a.flowing||(P("resume"),a.flowing=!0,w(this,a)),this},i.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(a){var b=this,c=this._readableState,d=!1;a.on("end",function(){if(P("wrapped end"),c.decoder&&!c.ended){var a=c.decoder.end();a&&a.length&&b.push(a)}b.push(null)}),a.on("data",function(e){if(P("wrapped data"),c.decoder&&(e=c.decoder.write(e)),(!c.objectMode||null!==e&&void 0!==e)&&(c.objectMode||e&&e.length)){b.push(e)||(d=!0,a.pause())}});for(var e in a)void 0===this[e]&&"function"==typeof a[e]&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));for(var f=0;f<T.length;f++)a.on(T[f],this.emit.bind(this,T[f]));return this._read=function(b){P("wrapped _read",b),d&&(d=!1,a.resume())},this},Object.defineProperty(i.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),i._fromList=z}).call(this,a(17),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11,12:12,14:14,16:16,17:17,19:19,24:24,25:25,26:26,27:27,28:28,33:33,8:8}],22:[function(a,b,c){"use strict";function d(a,b){var c=this._transformState;c.transforming=!1;var d=c.writecb;if(!d)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,null!=b&&this.push(b),d(a);var e=this._readableState;e.reading=!1,(e.needReadable||e.length<e.highWaterMark)&&this._read(e.highWaterMark)}function e(a){if(!(this instanceof e))return new e(a);h.call(this,a),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&("function"==typeof a.transform&&(this._transform=a.transform),"function"==typeof a.flush&&(this._flush=a.flush)),this.on("prefinish",f)}function f(){var a=this;"function"==typeof this._flush?this._flush(function(b,c){g(a,b,c)}):g(this,null,null)}function g(a,b,c){if(b)return a.emit("error",b);if(null!=c&&a.push(c),a._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(a._transformState.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}b.exports=e;var h=a(19),i=a(11);i.inherits=a(14),i.inherits(e,h),e.prototype.push=function(a,b){return this._transformState.needTransform=!1,h.prototype.push.call(this,a,b)},e.prototype._transform=function(a,b,c){throw new Error("_transform() is not implemented")},e.prototype._write=function(a,b,c){var d=this._transformState;if(d.writecb=c,d.writechunk=a,d.writeencoding=b,!d.transforming){var e=this._readableState;(d.needTransform||e.needReadable||e.length<e.highWaterMark)&&this._read(e.highWaterMark)}},e.prototype._read=function(a){var b=this._transformState;null!==b.writechunk&&b.writecb&&!b.transforming?(b.transforming=!0,this._transform(b.writechunk,b.writeencoding,b.afterTransform)):b.needTransform=!0},e.prototype._destroy=function(a,b){var c=this;h.prototype._destroy.call(this,a,function(a){b(a),c.emit("close")})}},{11:11,14:14,19:19}],23:[function(a,b,c){(function(c,d){"use strict";function e(a){var b=this;this.next=null,this.entry=null,this.finish=function(){A(b,a)}}function f(a){return H.from(a)}function g(a){return H.isBuffer(a)||a instanceof I}function h(){}function i(b,c){C=C||a(19),b=b||{};var d=c instanceof C;this.objectMode=!!b.objectMode,d&&(this.objectMode=this.objectMode||!!b.writableObjectMode);var f=b.highWaterMark,g=b.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=f||0===f?f:d&&(g||0===g)?g:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===b.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=b.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){r(c,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function j(b){if(C=C||a(19),!(K.call(j,this)||this instanceof C))return new j(b);this._writableState=new i(b,this),this.writable=!0,b&&("function"==typeof b.write&&(this._write=b.write),"function"==typeof b.writev&&(this._writev=b.writev),"function"==typeof b.destroy&&(this._destroy=b.destroy),"function"==typeof b.final&&(this._final=b.final)),G.call(this)}function k(a,b){var c=new Error("write after end");a.emit("error",c),B.nextTick(b,c)}function l(a,b,c,d){var e=!0,f=!1;return null===c?f=new TypeError("May not write null values to stream"):"string"==typeof c||void 0===c||b.objectMode||(f=new TypeError("Invalid non-string/buffer chunk")),f&&(a.emit("error",f),B.nextTick(d,f),e=!1),e}function m(a,b,c){return a.objectMode||!1===a.decodeStrings||"string"!=typeof b||(b=H.from(b,c)),b}function n(a,b,c,d,e,f){if(!c){var g=m(b,d,e);d!==g&&(c=!0,e="buffer",d=g)}var h=b.objectMode?1:d.length;b.length+=h;var i=b.length<b.highWaterMark;if(i||(b.needDrain=!0),b.writing||b.corked){var j=b.lastBufferedRequest;b.lastBufferedRequest={chunk:d,encoding:e,isBuf:c,callback:f,next:null},j?j.next=b.lastBufferedRequest:b.bufferedRequest=b.lastBufferedRequest,b.bufferedRequestCount+=1}else o(a,b,!1,h,d,e,f);return i}function o(a,b,c,d,e,f,g){b.writelen=d,b.writecb=g,b.writing=!0,b.sync=!0,c?a._writev(e,b.onwrite):a._write(e,f,b.onwrite),b.sync=!1}function p(a,b,c,d,e){--b.pendingcb,c?(B.nextTick(e,d),B.nextTick(y,a,b),a._writableState.errorEmitted=!0,a.emit("error",d)):(e(d),a._writableState.errorEmitted=!0,a.emit("error",d),y(a,b))}function q(a){a.writing=!1,a.writecb=null,a.length-=a.writelen,a.writelen=0}function r(a,b){var c=a._writableState,d=c.sync,e=c.writecb;if(q(c),b)p(a,c,d,b,e);else{var f=v(c);f||c.corked||c.bufferProcessing||!c.bufferedRequest||u(a,c),d?D(s,a,c,f,e):s(a,c,f,e)}}function s(a,b,c,d){c||t(a,b),b.pendingcb--,d(),y(a,b)}function t(a,b){0===b.length&&b.needDrain&&(b.needDrain=!1,a.emit("drain"))}function u(a,b){b.bufferProcessing=!0;var c=b.bufferedRequest;if(a._writev&&c&&c.next){var d=b.bufferedRequestCount,f=new Array(d),g=b.corkedRequestsFree;g.entry=c;for(var h=0,i=!0;c;)f[h]=c,c.isBuf||(i=!1),c=c.next,h+=1;f.allBuffers=i,o(a,b,!0,b.length,f,"",g.finish),b.pendingcb++,b.lastBufferedRequest=null,g.next?(b.corkedRequestsFree=g.next,g.next=null):b.corkedRequestsFree=new e(b),b.bufferedRequestCount=0}else{for(;c;){var j=c.chunk,k=c.encoding,l=c.callback;if(o(a,b,!1,b.objectMode?1:j.length,j,k,l),c=c.next,b.bufferedRequestCount--,b.writing)break}null===c&&(b.lastBufferedRequest=null)}b.bufferedRequest=c,b.bufferProcessing=!1}function v(a){return a.ending&&0===a.length&&null===a.bufferedRequest&&!a.finished&&!a.writing}function w(a,b){a._final(function(c){b.pendingcb--,c&&a.emit("error",c),b.prefinished=!0,a.emit("prefinish"),y(a,b)})}function x(a,b){b.prefinished||b.finalCalled||("function"==typeof a._final?(b.pendingcb++,b.finalCalled=!0,B.nextTick(w,a,b)):(b.prefinished=!0,a.emit("prefinish")))}function y(a,b){var c=v(b);return c&&(x(a,b),0===b.pendingcb&&(b.finished=!0,a.emit("finish"))),c}function z(a,b,c){b.ending=!0,y(a,b),c&&(b.finished?B.nextTick(c):a.once("finish",c)),b.ended=!0,a.writable=!1}function A(a,b,c){var d=a.entry;for(a.entry=null;d;){var e=d.callback;b.pendingcb--,e(c),d=d.next}b.corkedRequestsFree?b.corkedRequestsFree.next=a:b.corkedRequestsFree=a}var B=a(16);b.exports=j;var C,D=!c.browser&&["v0.10","v0.9."].indexOf(c.version.slice(0,5))>-1?setImmediate:B.nextTick;j.WritableState=i;var E=a(11);E.inherits=a(14);var F={deprecate:a(36)},G=a(26),H=a(33).Buffer,I=d.Uint8Array||function(){},J=a(25);E.inherits(j,G),i.prototype.getBuffer=function(){for(var a=this.bufferedRequest,b=[];a;)b.push(a),a=a.next;return b},function(){try{Object.defineProperty(i.prototype,"buffer",{get:F.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(a){}}();var K;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(K=Function.prototype[Symbol.hasInstance],Object.defineProperty(j,Symbol.hasInstance,{value:function(a){return!!K.call(this,a)||this===j&&(a&&a._writableState instanceof i)}})):K=function(a){return a instanceof this},j.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},j.prototype.write=function(a,b,c){var d=this._writableState,e=!1,i=!d.objectMode&&g(a);return i&&!H.isBuffer(a)&&(a=f(a)),"function"==typeof b&&(c=b,b=null),i?b="buffer":b||(b=d.defaultEncoding),"function"!=typeof c&&(c=h),d.ended?k(this,c):(i||l(this,d,a,c))&&(d.pendingcb++,e=n(this,d,i,a,b,c)),e},j.prototype.cork=function(){this._writableState.corked++},j.prototype.uncork=function(){var a=this._writableState;a.corked&&(a.corked--,a.writing||a.corked||a.finished||a.bufferProcessing||!a.bufferedRequest||u(this,a))},j.prototype.setDefaultEncoding=function(a){if("string"==typeof a&&(a=a.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((a+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+a);return this._writableState.defaultEncoding=a,this},Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),j.prototype._write=function(a,b,c){c(new Error("_write() is not implemented"))},j.prototype._writev=null,j.prototype.end=function(a,b,c){var d=this._writableState;"function"==typeof a?(c=a,a=null,b=null):"function"==typeof b&&(c=b,b=null),null!==a&&void 0!==a&&this.write(a,b),d.corked&&(d.corked=1,this.uncork()),d.ending||d.finished||z(this,d,c)},Object.defineProperty(j.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(a){this._writableState&&(this._writableState.destroyed=a)}}),j.prototype.destroy=J.destroy,j.prototype._undestroy=J.undestroy,j.prototype._destroy=function(a,b){this.end(),b(a)}}).call(this,a(17),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11,14:14,16:16,17:17,19:19,25:25,26:26,33:33,36:36}],24:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c){a.copy(b,c)}var f=a(33).Buffer,g=a(8);b.exports=function(){function a(){d(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(a){var b={data:a,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},a.prototype.unshift=function(a){var b={data:a,next:this.head};0===this.length&&(this.tail=b),this.head=b,++this.length},a.prototype.shift=function(){if(0!==this.length){var a=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,a}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(a){if(0===this.length)return"";for(var b=this.head,c=""+b.data;b=b.next;)c+=a+b.data;return c},a.prototype.concat=function(a){if(0===this.length)return f.alloc(0);if(1===this.length)return this.head.data;for(var b=f.allocUnsafe(a>>>0),c=this.head,d=0;c;)e(c.data,b,d),d+=c.data.length,c=c.next;return b},a}(),g&&g.inspect&&g.inspect.custom&&(b.exports.prototype[g.inspect.custom]=function(){var a=g.inspect({length:this.length});return this.constructor.name+" "+a})},{33:33,8:8}],25:[function(a,b,c){"use strict";function d(a,b){var c=this,d=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return d||e?(b?b(a):!a||this._writableState&&this._writableState.errorEmitted||g.nextTick(f,this,a),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(a){!b&&a?(g.nextTick(f,c,a),c._writableState&&(c._writableState.errorEmitted=!0)):b&&b(a)}),this)}function e(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function f(a,b){a.emit("error",b)}var g=a(16);b.exports={destroy:d,undestroy:e}},{16:16}],26:[function(a,b,c){b.exports=a(12).EventEmitter},{12:12}],27:[function(a,b,c){arguments[4][10][0].apply(c,arguments)},{10:10}],28:[function(a,b,c){"use strict";function d(a){if(!a)return"utf8";for(var b;;)switch(a){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return a;default:if(b)return;a=(""+a).toLowerCase(),b=!0}}function e(a){var b=d(a);if("string"!=typeof b&&(s.isEncoding===t||!t(a)))throw new Error("Unknown encoding: "+a);return b||a}function f(a){this.encoding=e(a);var b;switch(this.encoding){case"utf16le":this.text=m,this.end=n,b=4;break;case"utf8":this.fillLast=j,b=4;break;case"base64":this.text=o,this.end=p,b=3;break;default:return this.write=q,void(this.end=r)}this.lastNeed=0,this.lastTotal=0,this.lastChar=s.allocUnsafe(b)}function g(a){return a<=127?0:a>>5==6?2:a>>4==14?3:a>>3==30?4:a>>6==2?-1:-2}function h(a,b,c){var d=b.length-1;if(d<c)return 0;var e=g(b[d]);return e>=0?(e>0&&(a.lastNeed=e-1),e):--d<c||-2===e?0:(e=g(b[d]))>=0?(e>0&&(a.lastNeed=e-2),e):--d<c||-2===e?0:(e=g(b[d]),e>=0?(e>0&&(2===e?e=0:a.lastNeed=e-3),e):0)}function i(a,b,c){if(128!=(192&b[0]))return a.lastNeed=0,"�";if(a.lastNeed>1&&b.length>1){if(128!=(192&b[1]))return a.lastNeed=1,"�";if(a.lastNeed>2&&b.length>2&&128!=(192&b[2]))return a.lastNeed=2,"�"}}function j(a){var b=this.lastTotal-this.lastNeed,c=i(this,a,b);return void 0!==c?c:this.lastNeed<=a.length?(a.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(a.copy(this.lastChar,b,0,a.length),void(this.lastNeed-=a.length))}function k(a,b){var c=h(this,a,b);if(!this.lastNeed)return a.toString("utf8",b);this.lastTotal=c;var d=a.length-(c-this.lastNeed);return a.copy(this.lastChar,0,d),a.toString("utf8",b,d)}function l(a){var b=a&&a.length?this.write(a):"";return this.lastNeed?b+"�":b}function m(a,b){if((a.length-b)%2==0){var c=a.toString("utf16le",b);if(c){var d=c.charCodeAt(c.length-1);if(d>=55296&&d<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],c.slice(0,-1)}return c}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",b,a.length-1)}function n(a){var b=a&&a.length?this.write(a):"";if(this.lastNeed){var c=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,c)}return b}function o(a,b){var c=(a.length-b)%3;return 0===c?a.toString("base64",b):(this.lastNeed=3-c,this.lastTotal=3,1===c?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",b,a.length-c))}function p(a){var b=a&&a.length?this.write(a):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function q(a){return a.toString(this.encoding)}function r(a){return a&&a.length?this.write(a):""}var s=a(33).Buffer,t=s.isEncoding||function(a){switch((a=""+a)&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};c.StringDecoder=f,f.prototype.write=function(a){if(0===a.length)return"";var b,c;if(this.lastNeed){if(void 0===(b=this.fillLast(a)))return"";c=this.lastNeed,this.lastNeed=0}else c=0;return c<a.length?b?b+this.text(a,c):this.text(a,c):b||""},f.prototype.end=l,f.prototype.text=k,f.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length),this.lastNeed-=a.length}},{33:33}],29:[function(a,b,c){b.exports=a(30).PassThrough},{30:30}],30:[function(a,b,c){c=b.exports=a(21),c.Stream=c,c.Readable=c,c.Writable=a(23),c.Duplex=a(19),c.Transform=a(22),c.PassThrough=a(20)},{19:19,20:20,21:21,22:22,23:23}],31:[function(a,b,c){b.exports=a(30).Transform},{30:30}],32:[function(a,b,c){b.exports=a(23)},{23:23}],33:[function(a,b,c){function d(a,b){for(var c in a)b[c]=a[c]}function e(a,b,c){return g(a,b,c)}var f=a(9),g=f.Buffer;g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?b.exports=f:(d(f,c),c.Buffer=e),d(g,e),e.from=function(a,b,c){if("number"==typeof a)throw new TypeError("Argument must not be a number");return g(a,b,c)},e.alloc=function(a,b,c){if("number"!=typeof a)throw new TypeError("Argument must be a number");var d=g(a);return void 0!==b?"string"==typeof c?d.fill(b,c):d.fill(b):d.fill(0),d},e.allocUnsafe=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return g(a)},e.allocUnsafeSlow=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return f.SlowBuffer(a)}},{9:9}],34:[function(a,b,c){function d(){e.call(this)}b.exports=d;var e=a(12).EventEmitter;a(14)(d,e),d.Readable=a(30),d.Writable=a(32),d.Duplex=a(18),d.Transform=a(31),d.PassThrough=a(29),d.Stream=d,d.prototype.pipe=function(a,b){function c(b){a.writable&&!1===a.write(b)&&j.pause&&j.pause()}function d(){j.readable&&j.resume&&j.resume()}function f(){k||(k=!0,a.end())}function g(){k||(k=!0,"function"==typeof a.destroy&&a.destroy())}function h(a){if(i(),0===e.listenerCount(this,"error"))throw a}function i(){j.removeListener("data",c),a.removeListener("drain",d),j.removeListener("end",f),j.removeListener("close",g),j.removeListener("error",h),a.removeListener("error",h),j.removeListener("end",i),j.removeListener("close",i),a.removeListener("close",i)}var j=this;j.on("data",c),a.on("drain",d),a._isStdio||b&&!1===b.end||(j.on("end",f),j.on("close",g));var k=!1;return j.on("error",h),a.on("error",h),j.on("end",i),j.on("close",i),a.on("close",i),a.emit("pipe",j),a}},{12:12,14:14,18:18,29:29,30:30,31:31,32:32}],35:[function(a,b,c){function d(a){
|
16 |
+
if(a&&!i(a))throw new Error("Unknown encoding: "+a)}function e(a){return a.toString(this.encoding)}function f(a){this.charReceived=a.length%2,this.charLength=this.charReceived?2:0}function g(a){this.charReceived=a.length%3,this.charLength=this.charReceived?3:0}var h=a(9).Buffer,i=h.isEncoding||function(a){switch(a&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},j=c.StringDecoder=function(a){switch(this.encoding=(a||"utf8").toLowerCase().replace(/[-_]/,""),d(a),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=f;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=g;break;default:return void(this.write=e)}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};j.prototype.write=function(a){for(var b="";this.charLength;){var c=a.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived<this.charLength)return"";a=a.slice(c,a.length),b=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var d=b.charCodeAt(b.length-1);if(!(d>=55296&&d<=56319)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&d<=56319){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(b<=2&&c>>4==14){this.charLength=3;break}if(b<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{9:9}],36:[function(a,b,c){(function(a){function c(a,b){function c(){if(!e){if(d("throwDeprecation"))throw new Error(b);d("traceDeprecation")?console.trace(b):console.warn(b),e=!0}return a.apply(this,arguments)}if(d("noDeprecation"))return a;var e=!1;return c}function d(b){try{if(!a.localStorage)return!1}catch(d){return!1}var c=a.localStorage[b];return null!=c&&"true"===String(c).toLowerCase()}b.exports=c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(a,b,c){!function(a,b,c,d,e){function f(a){this.node=a}function g(){this.events=[],this.head=null,this.body=null}function h(){this.styling=null,this.layout=null}function i(){this.styles={}}function j(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function k(){this.regions={}}function l(a){this.kind=a,this.begin=null,this.end=null,this.styleAttrs=null,this.regionID=null,this.sets=null,this.timeContainer=null}function m(){l.call(this,"body")}function n(){l.call(this,"div")}function o(){l.call(this,"p")}function p(){l.call(this,"span"),this.space=null}function q(){l.call(this,"span"),this.space=null,this.text=null}function r(){l.call(this,"br")}function s(){this.id=null,this.begin=null,this.end=null,this.styleAttrs=null,this.sets=null}function t(){this.begin=null,this.end=null,this.qname=null,this.value=null}function u(a){return a&&"xml:id"in a.attributes?a.attributes["xml:id"].value||null:null}function v(a){return a&&"region"in a.attributes?a.attributes.region.value:""}function w(a,b){var c=a&&"timeContainer"in a.attributes?a.attributes.timeContainer.value:null;return c&&"par"!==c?"seq"===c?"seq":(K(b,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}function x(a){return a&&"style"in a.attributes?a.attributes.style.value.split(" "):[]}function y(a,b){var c={};if(null!==a)for(var e in a.attributes){var f=a.attributes[e].uri+" "+a.attributes[e].local,g=d.byQName[f];if(void 0!==g){var h=g.parse(a.attributes[e].value);null!==h?(c[f]=h,g===d.byName.zIndex&&J(b,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):K(b,"Cannot parse styling attribute "+f+" --\x3e "+a.attributes[e].value)}}return c}function z(a,b,c){for(var d in a.attributes)if(a.attributes[d].uri===b&&a.attributes[d].local===c)return a.attributes[d].value;return null}function A(a,b){var d=z(a,c.ns_ittp,"aspectRatio"),e=null;if(null!==d){var f=/(\d+) (\d+)/,g=f.exec(d);if(null!==g){var h=parseInt(g[1]),i=parseInt(g[2]);0!==h&&0!==i?e=h/i:K(b,"Illegal aspectRatio values (ignoring)")}else K(b,"Malformed aspectRatio attribute (ignoring)")}return e}function B(a,b){var d=z(a,c.ns_ttp,"cellResolution"),e=15,f=32;if(null!==d){var g=/(\d+) (\d+)/,h=g.exec(d);null!==h?(f=parseInt(h[1]),e=parseInt(h[2])):J(b,"Malformed cellResolution value (using initial value instead)")}return{w:f,h:e}}function C(a,b){var d,e=z(a,c.ns_ttp,"frameRate"),f=30;if(null!==e){d=/(\d+)/.exec(e),null!==d?f=parseInt(d[1]):J(b,"Malformed frame rate attribute (using initial value instead)")}var g=z(a,c.ns_ttp,"frameRateMultiplier"),h=1;if(null!==g){d=/(\d+) (\d+)/.exec(g),null!==d?h=parseInt(d[1])/parseInt(d[2]):J(b,"Malformed frame rate multiplier attribute (using initial value instead)")}var i=h*f,j=1,k=z(a,c.ns_ttp,"tickRate");if(null===k)null!==e&&(j=i);else{d=/(\d+)/.exec(k),null!==d?j=parseInt(d[1]):J(b,"Malformed tick rate attribute (using initial value instead)")}return{effectiveFrameRate:i,tickRate:j}}function D(a,b){var d=z(a,c.ns_tts,"extent");if(null===d)return null;var f=d.split(" ");if(2!==f.length)return J(b,"Malformed extent (ignoring)"),null;var g=e.parseLength(f[0]),h=e.parseLength(f[1]);return h&&g?{h:h,w:g}:(J(b,"Malformed extent values (ignoring)"),null)}function E(a,b,c){var d,e=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/,f=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/,g=/^(\d+(?:\.\d+)?)f$/,h=/^(\d+(?:\.\d+)?)t$/,i=/^(\d+(?:\.\d+)?)ms$/,j=/^(\d+(?:\.\d+)?)s$/,k=/^(\d+(?:\.\d+)?)h$/,l=/^(\d+(?:\.\d+)?)m$/,m=null;return null!==(d=g.exec(c))?null!==b&&(m=parseFloat(d[1])/b):null!==(d=h.exec(c))?null!==a&&(m=parseFloat(d[1])/a):null!==(d=i.exec(c))?m=parseFloat(d[1])/1e3:null!==(d=j.exec(c))?m=parseFloat(d[1]):null!==(d=k.exec(c))?m=3600*parseFloat(d[1]):null!==(d=l.exec(c))?m=60*parseFloat(d[1]):null!==(d=e.exec(c))?m=3600*parseInt(d[1])+60*parseInt(d[2])+parseFloat(d[3]):null!==(d=f.exec(c))&&null!==b&&(m=3600*parseInt(d[1])+60*parseInt(d[2])+parseInt(d[3])+(null===d[4]?0:parseInt(d[4])/b)),m}function F(a,b,c,d){var e=b&&"seq"===b.timeContainer,f=0;c&&"begin"in c.attributes&&null===(f=E(a.tickRate,a.effectiveFrameRate,c.attributes.begin.value))&&(J(d,"Malformed begin value "+c.attributes.begin.value+" (using 0)"),f=0);var g=e?0:null;c&&"dur"in c.attributes&&null===(g=E(a.tickRate,a.effectiveFrameRate,c.attributes.dur.value))&&J(d,"Malformed dur value "+c.attributes.dur.value+" (ignoring)");var h=null;c&&"end"in c.attributes&&null===(h=E(a.tickRate,a.effectiveFrameRate,c.attributes.end.value))&&J(d,"Malformed end value (ignoring)");var i=0;if(b&&(i=e&&"contents"in b&&b.contents.length>0?b.contents[b.contents.length-1].end:b.begin||0),f+=i,null!==g)h=f+g;else{var j=b&&"end"in b?b.end:Number.POSITIVE_INFINITY;h=null!==h?h+i:j}return{begin:f,end:h}}function G(a,b,c){for(;b.styleRefs.length>0;){var d=b.styleRefs.pop();d in a.styles?(G(a,a.styles[d],c),I(a.styles[d].styleAttrs,b.styleAttrs)):K(c,"Non-existant style id referenced")}}function H(a,b,c,d){for(var e=b.length-1;e>=0;e--){var f=b[e];f in a.styles?I(a.styles[f].styleAttrs,c):K(d,"Non-existant style id referenced")}}function I(a,b){for(var c in a)c in b||(b[c]=a[c])}function J(a,b){if(a&&a.warn&&a.warn(b))throw b}function K(a,b){if(a&&a.error&&a.error(b))throw b}function L(a,b){throw a&&a.fatal&&a.fatal(b),b}function M(a,b){for(var c,d=0,e=a.length-1;d<=e;){c=Math.floor((d+e)/2);var f=a[c];if(f<b)d=c+1;else{if(!(f>b))return{found:!0,index:c};e=c-1}}return{found:!1,index:d}}a.fromXML=function(a,d,e){var l=b.parser(!0,{xmlns:!0}),u=[],v=[],w=[],x=0,y=null;l.onclosetag=function(a){if(u[0]instanceof i)for(var b in u[0].styles)G(u[0],u[0].styles[b],d);else if(u[0]instanceof o||u[0]instanceof p){if(u[0].contents.length>1){var g,h=[u[0].contents[0]];for(g=1;g<u[0].contents.length;g++)u[0].contents[g]instanceof q&&h[h.length-1]instanceof q?h[h.length-1].text+=u[0].contents[g].text:h.push(u[0].contents[g]);u[0].contents=h}u[0]instanceof p&&1===u[0].contents.length&&u[0].contents[0]instanceof q&&null===u[0].text&&(u[0].text=u[0].contents[0].text,delete u[0].contents)}else u[0]instanceof f&&(u[0].node.uri===c.ns_tt&&"metadata"===u[0].node.local?x--:x>0&&e&&"onCloseTag"in e&&e.onCloseTag());w.shift(),v.shift(),u.shift()},l.ontext=function(a){if(void 0===u[0]);else if(u[0]instanceof p||u[0]instanceof o){var b=new q;b.initFromText(y,u[0],a,w[0],d),u[0].contents.push(b)}else u[0]instanceof f&&x>0&&e&&"onText"in e&&e.onText(a)},l.onopentag=function(a){var b=a.attributes["xml:space"];b?w.unshift(b.value):0===w.length?w.unshift("default"):w.unshift(w[0]);var l=a.attributes["xml:lang"];if(l?v.unshift(l.value):0===v.length?v.unshift(""):v.unshift(v[0]),a.uri===c.ns_tt)if("tt"===a.local)null!==y&&L("Two <tt> elements at ("+this.line+","+this.column+")"),y=new g,y.initFromNode(a,d),u.unshift(y);else if("head"===a.local)u[0]instanceof g||L("Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),null!==y.head&&L("Second <head> element at ("+this.line+","+this.column+")"),y.head=new h,u.unshift(y.head);else if("styling"===a.local)u[0]instanceof h||L("Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),null!==y.head.styling&&L("Second <styling> element at ("+this.line+","+this.column+")"),y.head.styling=new i,u.unshift(y.head.styling);else if("style"===a.local){var q;u[0]instanceof i?(q=new j,q.initFromNode(a,d),q.id?y.head.styling.styles[q.id]=q:K("<style> element missing @id attribute"),u.unshift(q)):u[0]instanceof s?(q=new j,q.initFromNode(a,d),I(q.styleAttrs,u[0].styleAttrs),u.unshift(q)):L(d,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("layout"===a.local)u[0]instanceof h||L(d,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),null!==y.head.layout&&L(d,"Second <layout> element at "+this.line+","+this.column+")"),y.head.layout=new k,u.unshift(y.head.layout);else if("region"===a.local){u[0]instanceof k||L(d,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var z=new s;z.initFromNode(y,a,d),!z.id||z.id in y.head.layout.regions?K(d,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):(y.head.layout.regions[z.id]=z,y._registerEvent(z)),u.unshift(z)}else if("body"===a.local){u[0]instanceof g||L(d,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==y.body&&L(d,"Second <body> element at "+this.line+","+this.column+")");var A=new m;A.initFromNode(y,a,d),y._registerEvent(A),y.body=A,u.unshift(A)}else if("div"===a.local){u[0]instanceof n||u[0]instanceof m||L(d,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var B=new n;B.initFromNode(y,u[0],a,d),y._registerEvent(B),u[0].contents.push(B),u.unshift(B)}else if("p"===a.local){u[0]instanceof n||L(d,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var C=new o;C.initFromNode(y,u[0],a,d),y._registerEvent(C),u[0].contents.push(C),u.unshift(C)}else if("span"===a.local){u[0]instanceof p||u[0]instanceof o||L(d,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var D=new p;D.initFromNode(y,u[0],a,w[0],d),y._registerEvent(D),u[0].contents.push(D),u.unshift(D)}else if("br"===a.local){u[0]instanceof p||u[0]instanceof o||L(d,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var E=new r;E.initFromNode(y,u[0],a,d),y._registerEvent(E),u[0].contents.push(E),u.unshift(E)}else if("set"===a.local){u[0]instanceof p||u[0]instanceof o||u[0]instanceof n||u[0]instanceof m||u[0]instanceof s||u[0]instanceof r||L(d,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var F=new t;F.initFromNode(y,u[0],a,d),y._registerEvent(F),u[0].sets.push(F),u.unshift(F)}else u.unshift(new f(a));else u.unshift(new f(a));if(u[0]instanceof f)if(a.uri===c.ns_tt&&"metadata"===a.local)x++;else if(x>0&&e&&"onOpenTag"in e){var G=[];for(var H in a.attributes)G[a.attributes[H].uri+" "+a.attributes[H].local]={uri:a.attributes[H].uri,local:a.attributes[H].local,value:a.attributes[H].value};e.onOpenTag(a.uri,a.local,G)}},l.write(a).close(),null!==y.head?delete y.head.styling:y.head=new h,null===y.head.layout&&(y.head.layout=new k);var z=!1;for(var A in y.head.layout.regions){z=!0;break}if(!z){var B=s.createDefaultRegion();y.head.layout.regions[B.id]=B}return y},g.prototype.initFromNode=function(a,b){this.cellResolution=B(a,b);var d=C(a,b);this.effectiveFrameRate=d.effectiveFrameRate,this.tickRate=d.tickRate,this.aspectRatio=A(a,b);var e=z(a,c.ns_ttp,"timeBase");null!==e&&"media"!==e&&L(b,"Unsupported time base");var f=D(a,b);null===f?this.pxDimensions={h:480,w:640}:("px"===f.h.unit&&"px"===f.w.unit||L(b,"Extent on TT must be in px or absent"),this.pxDimensions={h:f.h.value,w:f.w.value})},g.prototype._registerEvent=function(a){if(!(a.end<=a.begin)){var b=M(this.events,a.begin);if(b.found||this.events.splice(b.index,0,a.begin),a.end!==Number.POSITIVE_INFINITY){var c=M(this.events,a.end);c.found||this.events.splice(c.index,0,a.end)}}},g.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},g.prototype.getMediaTimeEvents=function(){return this.events},j.prototype.initFromNode=function(a,b){this.id=u(a),this.styleAttrs=y(a,b),this.styleRefs=x(a)},l.prototype.initFromNode=function(a,b,c,d){var e=F(a,b,c,d);this.begin=e.begin,this.end=e.end,this.styleAttrs=y(c,d),null!==a.head&&null!==a.head.styling&&H(a.head.styling,x(c),this.styleAttrs,d),this.regionID=v(c),this.sets=[],this.timeContainer=w(c,d)},m.prototype.initFromNode=function(a,b,c){l.prototype.initFromNode.call(this,a,null,b,c),this.contents=[]},n.prototype.initFromNode=function(a,b,c,d){l.prototype.initFromNode.call(this,a,b,c,d),this.contents=[]},o.prototype.initFromNode=function(a,b,c,d){l.prototype.initFromNode.call(this,a,b,c,d),this.contents=[]},p.prototype.initFromNode=function(a,b,c,d,e){l.prototype.initFromNode.call(this,a,b,c,e),this.space=d,this.contents=[]},q.prototype.initFromText=function(a,b,c,d,e){l.prototype.initFromNode.call(this,a,b,null,e),this.text=c,this.space=d},r.prototype.initFromNode=function(a,b,c,d){l.prototype.initFromNode.call(this,a,b,c,d)},s.createDefaultRegion=function(){var a=new s;return a.id="",a.begin=0,a.end=Number.POSITIVE_INFINITY,a.styleAttrs={},a.sets=[],a},s.prototype.initFromNode=function(a,b,c){this.id=u(b);var d=F(a,null,b,c);this.begin=d.begin,this.end=d.end,this.styleAttrs=y(b,c),this.sets=[],null!==a.head&&null!==a.head.styling&&H(a.head.styling,x(b),this.styleAttrs,c)},t.prototype.initFromNode=function(a,b,c,d){var e=F(a,b,c,d);this.begin=e.begin,this.end=e.end;var f=y(c,d);for(var g in f){if(this.qname){K(d,"More than one style specified on set");break}this.qname=g,this.value=f[g]}}}(void 0===c?this.imscDoc={}:c,"undefined"==typeof sax?a(44):sax,"undefined"==typeof imscNames?a(41):imscNames,"undefined"==typeof imscStyles?a(42):imscStyles,"undefined"==typeof imscUtils?a(43):imscUtils)},{41:41,42:42,43:43,44:44}],38:[function(a,b,c){!function(a,b,c){function d(a,b,h){var j;if("region"===h.kind?(j=document.createElement("div"),j.style.position="absolute"):"body"===h.kind?j=document.createElement("div"):"div"===h.kind?j=document.createElement("div"):"p"===h.kind?j=document.createElement("p"):"span"===h.kind?j=document.createElement("span"):"br"===h.kind&&(j=document.createElement("br")),!j)return void n(a.errorHandler,"Error processing ISD element kind: "+h.kind);j.style.margin="0";for(var k in o){var l=o[k],m=h.styleAttrs[l.qname];void 0!==m&&null!==l.map&&l.map(a,j,h,m)}var p=j,q=h.styleAttrs[c.byName.multiRowAlign.qname];if(q&&"auto"!==q){var r=document.createElement("span");r.style.display="inline-block",r.style.textAlign=q,j.appendChild(r),p=r,a.mra=q}var s=h.styleAttrs[c.byName.linePadding.qname];if(s&&s>0&&(a.lp=s),"span"===h.kind&&h.text)if(a.lp||a.mra)for(var t=0;t<h.text.length;t++){var u=document.createElement("span");u.textContent=h.text.charAt(t),j.appendChild(u)}else j.textContent=h.text;b.appendChild(j);for(var v in h.contents)d(a,p,h.contents[v]);if((a.lp||a.mra)&&"p"===h.kind){var w=[];f(p,w,"red"),i(w,a.lp*a.h),a.lp&&delete a.lp,a.mra&&delete a.mra}if("region"===h.kind){var x=[];g(p,x);var y=h.styleAttrs[c.byName.writingMode.qname];if(("lrtb"===y||"lr"===y||"rltb"===y||"rl"===y)&&a.enableRollUp&&h.contents.length>0&&"after"===h.styleAttrs[c.byName.displayAlign.qname]){var z=""===h.id?"_":h.id,A=new e(z,x);if(a.currentISDState[A.id]=A,a.previousISDState&&A.id in a.previousISDState&&a.previousISDState[A.id].plist.length>0&&A.plist.length>1&&A.plist[A.plist.length-2].text===a.previousISDState[A.id].plist[a.previousISDState[A.id].plist.length-1].text){var B=j.firstElementChild;B.style.bottom="-"+A.plist[A.plist.length-1].height+"px",B.style.transition="transform 0.4s",B.style.position="relative",B.style.transform="translateY(-"+A.plist[A.plist.length-1].height+"px)"}}}}function e(a,b){this.id=a,this.plist=b}function f(a,b,c){if(0===a.childElementCount)b.push({element:a,bgcolor:c});else for(var d=a.style.backgroundColor||c,e=a.firstChild;e;)e.nodeType===Node.ELEMENT_NODE&&f(e,b,d),e=e.nextSibling}function g(a,b){if(0===a.childElementCount&&"span"===a.localName){var c=a.getBoundingClientRect();0!==b.length&&h(c.top,c.height,b[b.length-1].top,b[b.length-1].height)?(c.top<b[b.length-1].top&&(b[b.length-1].top=c.top),c.height>b[b.length-1].height&&(b[b.length-1].height=c.height),b[b.length-1].text+=a.textContent):b.push({top:c.top,height:c.height,text:a.textContent})}else for(var d=a.firstChild;d;)d.nodeType===Node.ELEMENT_NODE&&g(d,b),d=d.nextSibling}function h(a,b,c,d){return a+b<c+d&&a>c||c+d<=a+b&&c>=a}function i(a,b){for(var c=null,d=!0,e=!1,f=0;f<=a.length;f++)if(f===a.length||"br"!==a[f].element.localName){if(null===c||f===a.length||!h(a[f].element.getBoundingClientRect().top,a[f].element.getBoundingClientRect().height,a[c].element.getBoundingClientRect().top,a[c].element.getBoundingClientRect().height)){if(b&&!d){for(;--f>=0;)if(0!==a[f].element.getBoundingClientRect().width){if(k(a[f].element,a[f].color,b),0!==a[f].element.getBoundingClientRect().width&&h(a[f].element.getBoundingClientRect().top,a[f].element.getBoundingClientRect().height,a[c].element.getBoundingClientRect().top,a[c].element.getBoundingClientRect().height))break;l(a[f].element)}d=!0;continue}if(f!==a.length&&null!==c&&!e){var g=document.createElement("br");a[f].element.parentElement.insertBefore(g,a[f].element),a.splice(f,0,{element:g}),e=!0;continue}if(f!==a.length&&b)for(;f<a.length;f++)if(0!==a[f].element.getBoundingClientRect().width){j(a[f].element,a[f].color,b);break}d=!1,e=!1,c=f}}else e=!0}function j(a,b,c){a.style.paddingLeft=c+"px",a.style.backgroundColor=b}function k(a,b,c){a.style.paddingRight=c+"px",a.style.backgroundColor=b}function l(a){a.style.paddingRight=null}function m(a,b){this.qname=a,this.map=b}function n(a,b){if(a&&a.error&&a.error(b))throw b}a.render=function(a,b,c,e,f,g,h,i,j){var k=e||b.clientHeight,l=f||b.clientWidth;if(null!==a.aspectRatio){var m=k*a.aspectRatio;m>l?k=Math.round(l/a.aspectRatio):l=m}var n=document.createElement("div");n.style.position="relative",n.style.width=l+"px",n.style.height=k+"px",n.style.margin="auto",n.style.top=0,n.style.bottom=0,n.style.left=0,n.style.right=0,n.style.zIndex=0;var o={h:k,w:l,regionH:null,regionW:null,imgResolver:c,displayForcedOnlyMode:g||!1,isd:a,errorHandler:h,previousISDState:i,enableRollUp:j||!1,currentISDState:{}};b.appendChild(n);for(var p in a.contents)d(o,n,a.contents[p]);return o.currentISDState};var o=[new m("http://www.w3.org/ns/ttml#styling backgroundColor",function(a,b,c,d){b.style.backgroundColor="rgba("+d[0].toString()+","+d[1].toString()+","+d[2].toString()+","+(d[3]/255).toString()+")"}),new m("http://www.w3.org/ns/ttml#styling color",function(a,b,c,d){b.style.color="rgba("+d[0].toString()+","+d[1].toString()+","+d[2].toString()+","+(d[3]/255).toString()+")"}),new m("http://www.w3.org/ns/ttml#styling direction",function(a,b,c,d){b.style.direction=d}),new m("http://www.w3.org/ns/ttml#styling display",function(a,b,c,d){}),new m("http://www.w3.org/ns/ttml#styling displayAlign",function(a,b,c,d){b.style.display="flex",b.style.flexDirection="column","before"===d?b.style.justifyContent="flex-start":"center"===d?b.style.justifyContent="center":"after"===d&&(b.style.justifyContent="flex-end")}),new m("http://www.w3.org/ns/ttml#styling extent",function(a,b,c,d){a.regionH=d.h*a.h,a.regionW=d.w*a.w;var e=0,f=0,g=c.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];g&&(e=(g[0]+g[2])*a.h,f=(g[1]+g[3])*a.w),b.style.height=a.regionH-e+"px",b.style.width=a.regionW-f+"px"}),new m("http://www.w3.org/ns/ttml#styling fontFamily",function(a,b,c,d){var e=[];for(var f in d)"monospaceSerif"===d[f]?(e.push("Courier New"),e.push('"Liberation Mono"'),e.push("Courier"),e.push("monospace")):"proportionalSansSerif"===d[f]?(e.push("Arial"),e.push("Helvetica"),e.push('"Liberation Sans"'),e.push("sans-serif")):"monospace"===d[f]?e.push("monospace"):"sansSerif"===d[f]?e.push("sans-serif"):"serif"===d[f]?e.push("serif"):"monospaceSansSerif"===d[f]?(e.push("Consolas"),e.push("monospace")):"proportionalSerif"===d[f]?e.push("serif"):e.push(d[f]);b.style.fontFamily=e.join(",")}),new m("http://www.w3.org/ns/ttml#styling fontSize",function(a,b,c,d){b.style.fontSize=d*a.h+"px"}),new m("http://www.w3.org/ns/ttml#styling fontStyle",function(a,b,c,d){b.style.fontStyle=d}),new m("http://www.w3.org/ns/ttml#styling fontWeight",function(a,b,c,d){b.style.fontWeight=d}),new m("http://www.w3.org/ns/ttml#styling lineHeight",function(a,b,c,d){b.style.lineHeight="normal"===d?"normal":d*a.h+"px"}),new m("http://www.w3.org/ns/ttml#styling opacity",function(a,b,c,d){b.style.opacity=d}),new m("http://www.w3.org/ns/ttml#styling origin",function(a,b,c,d){b.style.top=d.h*a.h+"px",b.style.left=d.w*a.w+"px"}),new m("http://www.w3.org/ns/ttml#styling overflow",function(a,b,c,d){b.style.overflow=d}),new m("http://www.w3.org/ns/ttml#styling padding",function(a,b,c,d){var e=[];e[0]=d[0]*a.h+"px",e[1]=d[3]*a.w+"px",e[2]=d[2]*a.h+"px",e[3]=d[1]*a.w+"px",b.style.padding=e.join(" ")}),new m("http://www.w3.org/ns/ttml#styling showBackground",null),new m("http://www.w3.org/ns/ttml#styling textAlign",function(a,b,d,e){var f,g=d.styleAttrs[c.byName.direction.qname];f="start"===e?"rtl"===g?"right":"left":"end"===e?"rtl"===g?"left":"right":e,b.style.textAlign=f}),new m("http://www.w3.org/ns/ttml#styling textDecoration",function(a,b,c,d){b.style.textDecoration=d.join(" ").replace("lineThrough","line-through")}),new m("http://www.w3.org/ns/ttml#styling textOutline",function(a,b,c,d){b.style.textShadow="none"===d?"":"rgba("+d.color[0].toString()+","+d.color[1].toString()+","+d.color[2].toString()+","+(d.color[3]/255).toString()+") 0px 0px "+d.thickness*a.h+"px"}),new m("http://www.w3.org/ns/ttml#styling unicodeBidi",function(a,b,c,d){var e;e="bidiOverride"===d?"bidi-override":d,b.style.unicodeBidi=e}),new m("http://www.w3.org/ns/ttml#styling visibility",function(a,b,c,d){b.style.visibility=d}),new m("http://www.w3.org/ns/ttml#styling wrapOption",function(a,b,c,d){"wrap"===d?"preserve"===c.space?b.style.whiteSpace="pre-wrap":b.style.whiteSpace="normal":"preserve"===c.space?b.style.whiteSpace="pre":b.style.whiteSpace="noWrap"}),new m("http://www.w3.org/ns/ttml#styling writingMode",function(a,b,c,d){"lrtb"===d||"lr"===d?b.style.writingMode="horizontal-tb":"rltb"===d||"rl"===d?b.style.writingMode="horizontal-tb":"tblr"===d?b.style.writingMode="vertical-lr":"tbrl"!==d&&"tb"!==d||(b.style.writingMode="vertical-rl")}),new m("http://www.w3.org/ns/ttml#styling zIndex",function(a,b,c,d){b.style.zIndex=d}),new m("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt backgroundImage",function(a,b,c,d){if(null!==a.imgResolver&&null!==d){var e=document.createElement("img"),f=a.imgResolver(d,e);f&&(e.src=f),e.height=a.regionH,e.width=a.regionW,b.appendChild(e)}}),new m("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",function(a,b,c,d){a.displayForcedOnlyMode&&!1===d&&(b.style.visibility="hidden")})],p={};for(var q in o)p[o[q].qname]=o[q]}(void 0===c?this.imscHTML={}:c,"undefined"==typeof imscNames?a(41):imscNames,"undefined"==typeof imscStyles?a(42):imscStyles)},{41:41,42:42}],39:[function(a,b,c){!function(a,b,c){function d(a,b,g,j,k,l,m,n){if(b<m.begin||b>=m.end)return null;var o="regionID"in m&&""!==m.regionID?m.regionID:l;if(null!==k&&o!==g.id&&(!("contents"in m)||"contents"in m&&0===m.contents.length||""!==o))return null;var p=new h(m);for(var q in m.sets)b<m.sets[q].begin||b>=m.sets[q].end||(p.styleAttrs[m.sets[q].qname]=m.sets[q].value);var r={};for(var s in p.styleAttrs)if(r[s]=!0,s===c.byName.writingMode.qname&&!(c.byName.direction.qname in p.styleAttrs)){var t=p.styleAttrs[s];"lrtb"===t||"lr"===t?p.styleAttrs[c.byName.direction.qname]="ltr":"rltb"!==t&&"rl"!==t||(p.styleAttrs[c.byName.direction.qname]="rtl")}if(null!==k)for(var u in c.all){var v=c.all[u];if(v.qname===c.byName.textDecoration.qname){var w=k.styleAttrs[v.qname],x=p.styleAttrs[v.qname],y=[];void 0===x?y=w:-1===x.indexOf("none")?((-1===x.indexOf("noUnderline")&&-1!==w.indexOf("underline")||-1!==x.indexOf("underline"))&&y.push("underline"),(-1===x.indexOf("noLineThrough")&&-1!==w.indexOf("lineThrough")||-1!==x.indexOf("lineThrough"))&&y.push("lineThrough"),(-1===x.indexOf("noOverline")&&-1!==w.indexOf("overline")||-1!==x.indexOf("overline"))&&y.push("overline")):y.push("none"),p.styleAttrs[v.qname]=y}else v.inherit&&v.qname in k.styleAttrs&&!(v.qname in p.styleAttrs)&&(p.styleAttrs[v.qname]=k.styleAttrs[v.qname])}for(var z in c.all){var A=c.all[z];A.qname in p.styleAttrs||("region"===p.kind||!1===A.inherit&&null!==A.initial)&&(p.styleAttrs[A.qname]=A.parse(A.initial),r[A.qname]=!0)}for(var B in c.all){var C=c.all[B];if(C.qname in r&&null!==C.compute){var D=C.compute(a,k,p,p.styleAttrs[C.qname]);null!==D?p.styleAttrs[C.qname]=D:i(n,"Style '"+C.qname+"' on element '"+p.kind+"' cannot be computed")}}if("none"===p.styleAttrs[c.byName.display.qname])return null;var E;null===k?E=null===j?[]:[j]:"contents"in m&&(E=m.contents);for(var F in E){var G=d(a,b,g,j,p,o,E[F]);null!==G&&p.contents.push(G.element)}for(var H in p.styleAttrs){-1===c.byQName[H].applies.indexOf(p.kind)&&delete p.styleAttrs[H]}if("span"===p.kind&&p.text&&"default"===p.space){var I=p.text.replace(/\s+/g," ");p.text=I}if("p"===p.kind){var J=[];e(p,J);for(var K=0,L="after_br",M=0;;)if("after_br"===L)K>=J.length||"br"===J[K].kind?(L="before_br",M=K,K--):("preserve"!==J[K].space&&(J[K].text=J[K].text.replace(/^\s+/g,"")),J[K].text.length>0?(L="looking_br",K++):J.splice(K,1));else if("before_br"===L)if(K<0||"br"===J[K].kind){if(L="after_br",(K=M+1)>=J.length)break}else if("preserve"!==J[K].space&&(J[K].text=J[K].text.replace(/\s+$/g,"")),J[K].text.length>0){if(L="after_br",(K=M+1)>=J.length)break}else J.splice(K,1),K--;else K>=J.length||"br"===J[K].kind?(L="before_br",M=K,K--):K++;f(p)}return"div"===p.kind&&c.byName.backgroundImage.qname in p.styleAttrs||"br"===p.kind||"contents"in p&&p.contents.length>0||"span"===p.kind&&null!==p.text||"region"===p.kind&&"always"===p.styleAttrs[c.byName.showBackground.qname]?{region_id:o,element:p}:null}function e(a,b){if("contents"in a)for(var c in a.contents)e(a.contents[c],b);else b.push(a)}function f(a){if("br"===a.kind)return!1;if("text"in a)return 0===a.text.length;if("contents"in a){for(var b=a.contents.length;b--;)f(a.contents[b])&&a.contents.splice(b,1);return 0===a.contents.length}}function g(a){this.contents=[],this.aspectRatio=a.aspectRatio}function h(a){this.kind=a.kind||"region",a.id&&(this.id=a.id),this.styleAttrs={};for(var b in a.styleAttrs)this.styleAttrs[b]=a.styleAttrs[b];"text"in a?this.text=a.text:"br"!==a.kind&&(this.contents=[]),"space"in a&&(this.space=a.space)}function i(a,b){if(a&&a.error&&a.error(b))throw b}a.generateISD=function(a,b,c){var e=new g(a);for(var f in a.head.layout.regions){var h=d(a,b,a.head.layout.regions[f],a.body,null,"",a.head.layout.regions[f],c);null!==h&&e.contents.push(h.element)}return e}}(void 0===c?this.imscISD={}:c,"undefined"==typeof imscNames?a(41):imscNames,"undefined"==typeof imscStyles?a(42):imscStyles)},{41:41,42:42}],40:[function(a,b,c){c.generateISD=a(39).generateISD,c.fromXML=a(37).fromXML,c.renderHTML=a(38).render},{37:37,38:38,39:39}],41:[function(a,b,c){!function(a){a.ns_tt="http://www.w3.org/ns/ttml",a.ns_tts="http://www.w3.org/ns/ttml#styling",a.ns_ttp="http://www.w3.org/ns/ttml#parameter",a.ns_xml="http://www.w3.org/XML/1998/namespace",a.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",a.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",a.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",a.ns_ebutts="urn:ebu:tt:style"}(void 0===c?this.imscNames={}:c)},{}],42:[function(a,b,c){!function(a,b,c){function d(a,b,c,d,e,f,g,h){this.name=b,this.ns=a,this.qname=a+" "+b,this.inherit=e,this.animatable=f,this.initial=c,this.applies=d,this.parse=g,this.compute=h}a.all=[new d(b.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,c.parseColor,null),new d(b.ns_tts,"color","white",["span"],!0,!0,c.parseColor,null),new d(b.ns_tts,"direction","ltr",["p","span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,function(a){return a},null),new d(b.ns_tts,"displayAlign","before",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"extent","auto",["tt","region"],!1,!0,function(a){if("auto"===a)return a;var b=a.split(" ");if(2!==b.length)return null;var d=c.parseLength(b[0]),e=c.parseLength(b[1]);return e&&d?{h:e,w:d}:null},function(a,b,c,d){var e,f;if("auto"===d)e=1;else if("%"===d.h.unit)e=d.h.value/100;else{if("px"!==d.h.unit)return null;e=d.h.value/a.pxDimensions.h}if("auto"===d)f=1;else if("%"===d.w.unit)f=d.w.value/100;else{if("px"!==d.w.unit)return null;f=d.w.value/a.pxDimensions.w}return{h:e,w:f}}),new d(b.ns_tts,"fontFamily","default",["span"],!0,!0,function(a){var b=a.split(","),c=[];for(var d in b)"'"!==b[d].charAt(0)&&'"'!==b[d].charAt(0)&&"default"===b[d]?c.push("monospaceSerif"):c.push(b[d]);return c},null),new d(b.ns_tts,"fontSize","1c",["span"],!0,!0,c.parseLength,function(b,c,d,e){var f;if("%"===e.unit)f=null!==c?c.styleAttrs[a.byName.fontSize.qname]*e.value/100:e.value/100/b.cellResolution.h;else if("em"===e.unit)f=null!==c?c.styleAttrs[a.byName.fontSize.qname]*e.value:e.value/b.cellResolution.h;else if("c"===e.unit)f=e.value/b.cellResolution.h;else{if("px"!==e.unit)return null;f=e.value/b.pxDimensions.h}return f}),new d(b.ns_tts,"fontStyle","normal",["span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"fontWeight","normal",["span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"lineHeight","normal",["p"],!0,!0,function(a){return"normal"===a?a:c.parseLength(a)},function(b,c,d,e){var f;if("normal"===e)f=e;else if("%"===e.unit)f=d.styleAttrs[a.byName.fontSize.qname]*e.value/100;else if("em"===e.unit)f=d.styleAttrs[a.byName.fontSize.qname]*e.value;else if("c"===e.unit)f=e.value/b.cellResolution.h;else{if("px"!==e.unit)return null;f=e.value/b.pxDimensions.h}return f
|
17 |
+
}),new d(b.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new d(b.ns_tts,"origin","auto",["region"],!1,!0,function(a){if("auto"===a)return a;var b=a.split(" ");if(2!==b.length)return null;var d=c.parseLength(b[0]),e=c.parseLength(b[1]);return e&&d?{h:e,w:d}:null},function(a,b,c,d){var e,f;if("auto"===d)e=0;else if("%"===d.h.unit)e=d.h.value/100;else{if("px"!==d.h.unit)return null;e=d.h.value/a.pxDimensions.h}if("auto"===d)f=0;else if("%"===d.w.unit)f=d.w.value/100;else{if("px"!==d.w.unit)return null;f=d.w.value/a.pxDimensions.w}return{h:e,w:f}}),new d(b.ns_tts,"overflow","hidden",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"padding","0px",["region"],!1,!0,function(a){var b=a.split(" ");if(b.length>4)return null;var d=[];for(var e in b){var f=c.parseLength(b[e]);if(!f)return null;d.push(f)}return d},function(b,c,d,e){var f;if(1===e.length)f=[e[0],e[0],e[0],e[0]];else if(2===e.length)f=[e[0],e[1],e[0],e[1]];else if(3===e.length)f=[e[0],e[1],e[2],e[1]];else{if(4!==e.length)return null;f=[e[0],e[1],e[2],e[3]]}var g=d.styleAttrs[a.byName.writingMode.qname];if("lrtb"===g||"lr"===g)f=[f[0],f[3],f[2],f[1]];else if("rltb"===g||"rl"===g)f=[f[0],f[1],f[2],f[3]];else if("tblr"===g)f=[f[3],f[0],f[1],f[2]];else{if("tbrl"!==g&&"tb"!==g)return null;f=[f[3],f[2],f[1],f[0]]}var h=[];for(var i in f)if(0===f[i].value)h[i]=0;else if("%"===f[i].unit)h[i]="0"===i||"2"===i?d.styleAttrs[a.byName.extent.qname].h*f[i].value/100:d.styleAttrs[a.byName.extent.qname].w*f[i].value/100;else if("em"===f[i].unit)h[i]=d.styleAttrs[a.byName.fontSize.qname]*f[i].value;else if("c"===f[i].unit)h[i]=f[i].value/b.cellResolution.h;else{if("px"!==f[i].unit)return null;h[i]=f[i].value/b.pxDimensions.h}return h}),new d(b.ns_tts,"showBackground","always",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"textAlign","start",["p"],!0,!0,function(a){return a},function(a,b,c,d){return"left"===d?"start":"right"===d?"end":d}),new d(b.ns_tts,"textDecoration","none",["span"],!0,!0,function(a){return a.split(" ")},null),new d(b.ns_tts,"textOutline","none",["span"],!0,!0,function(a){if("none"===a)return a;var b={},d=a.split(" ");if(0===d.length||d.length>2)return null;var e=c.parseColor(d[0]);if(b.color=e,null!==e&&d.shift(),1!==d.length)return null;var f=c.parseLength(d[0]);return f?(b.thickness=f,b):null},function(b,c,d,e){if("none"===e)return e;var f={};if(null===e.color?f.color=d.styleAttrs[a.byName.color.qname]:f.color=e.color,"%"===e.thickness.unit)f.thickness=d.styleAttrs[a.byName.fontSize.qname]*e.thickness.value/100;else if("em"===e.thickness.unit)f.thickness=d.styleAttrs[a.byName.fontSize.qname]*e.thickness.value;else if("c"===e.thickness.unit)f.thickness=e.thickness.value/b.cellResolution.h;else{if("px"!==e.thickness.unit)return null;f.thickness=e.thickness.value/b.pxDimensions.h}return f}),new d(b.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,function(a){return a},null),new d(b.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"wrapOption","wrap",["span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"writingMode","lrtb",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"zIndex","auto",["region"],!1,!0,function(a){var b;return"auto"===a?b=a:(b=parseInt(a),isNaN(b)&&(b=null)),b},null),new d(b.ns_ebutts,"linePadding","0c",["p"],!0,!1,c.parseLength,function(a,b,c,d){return"c"===d.unit?d.value/a.cellResolution.h:null}),new d(b.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,function(a){return a},null),new d(b.ns_smpte,"backgroundImage",null,["div"],!1,!1,function(a){return a},null),new d(b.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,function(a){return"true"===a},null)],a.byQName={};for(var e in a.all)a.byQName[a.all[e].qname]=a.all[e];a.byName={};for(var f in a.all)a.byName[a.all[f].name]=a.all[f]}(void 0===c?this.imscStyles={}:c,"undefined"==typeof imscNames?a(41):imscNames,"undefined"==typeof imscUtils?a(43):imscUtils)},{41:41,43:43}],43:[function(a,b,c){!function(a){var b=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,c=/rgb\((\d+),(\d+),(\d+)\)/,d=/rgba\((\d+),(\d+),(\d+),(\d+)\)/,e={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};a.parseColor=function(a){var f,g=null;return a in e?g=e[a]:null!==(f=b.exec(a))?g=[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16),void 0!==f[4]?parseInt(f[4],16):255]:null!==(f=c.exec(a))?g=[parseInt(f[1]),parseInt(f[2]),parseInt(f[3]),255]:null!==(f=d.exec(a))&&(g=[parseInt(f[1]),parseInt(f[2]),parseInt(f[3]),parseInt(f[4])]),g};var f=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%)$/;a.parseLength=function(a){var b,c=null;return null!==(b=f.exec(a))&&(c={value:parseFloat(b[1]),unit:b[2]}),c}}(void 0===c?this.imscUtils={}:c)},{}],44:[function(a,b,c){(function(b){!function(c){function d(a,b){if(!(this instanceof d))return new d(a,b);var e=this;f(e),e.q=e.c="",e.bufferCheckPosition=c.MAX_BUFFER_LENGTH,e.opt=b||{},e.opt.lowercase=e.opt.lowercase||e.opt.lowercasetags,e.looseCase=e.opt.lowercase?"toLowerCase":"toUpperCase",e.tags=[],e.closed=e.closedRoot=e.sawRoot=!1,e.tag=e.error=null,e.strict=!!a,e.noscript=!(!a&&!e.opt.noscript),e.state=U.BEGIN,e.strictEntities=e.opt.strictEntities,e.ENTITIES=e.strictEntities?Object.create(c.XML_ENTITIES):Object.create(c.ENTITIES),e.attribList=[],e.opt.xmlns&&(e.ns=Object.create(P)),e.trackPosition=!1!==e.opt.position,e.trackPosition&&(e.position=e.line=e.column=0),n(e,"onready")}function e(a){for(var b=Math.max(c.MAX_BUFFER_LENGTH,10),d=0,e=0,f=D.length;e<f;e++){var g=a[D[e]].length;if(g>b)switch(D[e]){case"textNode":p(a);break;case"cdata":o(a,"oncdata",a.cdata),a.cdata="";break;case"script":o(a,"onscript",a.script),a.script="";break;default:r(a,"Max buffer length exceeded: "+D[e])}d=Math.max(d,g)}var h=c.MAX_BUFFER_LENGTH-d;a.bufferCheckPosition=h+a.position}function f(a){for(var b=0,c=D.length;b<c;b++)a[D[b]]=""}function g(a){p(a),""!==a.cdata&&(o(a,"oncdata",a.cdata),a.cdata=""),""!==a.script&&(o(a,"onscript",a.script),a.script="")}function h(a,b){return new i(a,b)}function i(a,b){if(!(this instanceof i))return new i(a,b);E.apply(this),this._parser=new d(a,b),this.writable=!0,this.readable=!0;var c=this;this._parser.onend=function(){c.emit("end")},this._parser.onerror=function(a){c.emit("error",a),c._parser.error=null},this._decoder=null,F.forEach(function(a){Object.defineProperty(c,"on"+a,{get:function(){return c._parser["on"+a]},set:function(b){if(!b)return c.removeAllListeners(a),c._parser["on"+a]=b,b;c.on(a,b)},enumerable:!0,configurable:!1})})}function j(a){return a.split("").reduce(function(a,b){return a[b]=!0,a},{})}function k(a){return"[object RegExp]"===Object.prototype.toString.call(a)}function l(a,b){return k(a)?!!b.match(a):a[b]}function m(a,b){return!l(a,b)}function n(a,b,c){a[b]&&a[b](c)}function o(a,b,c){a.textNode&&p(a),n(a,b,c)}function p(a){a.textNode=q(a.opt,a.textNode),a.textNode&&n(a,"ontext",a.textNode),a.textNode=""}function q(a,b){return a.trim&&(b=b.trim()),a.normalize&&(b=b.replace(/\s+/g," ")),b}function r(a,b){return p(a),a.trackPosition&&(b+="\nLine: "+a.line+"\nColumn: "+a.column+"\nChar: "+a.c),b=new Error(b),a.error=b,n(a,"onerror",b),a}function s(a){return a.sawRoot&&!a.closedRoot&&t(a,"Unclosed root tag"),a.state!==U.BEGIN&&a.state!==U.BEGIN_WHITESPACE&&a.state!==U.TEXT&&r(a,"Unexpected end"),p(a),a.c="",a.closed=!0,n(a,"onend"),d.call(a,a.strict,a.opt),a}function t(a,b){if("object"!=typeof a||!(a instanceof d))throw new Error("bad call to strictFail");a.strict&&r(a,b)}function u(a){a.strict||(a.tagName=a.tagName[a.looseCase]());var b=a.tags[a.tags.length-1]||a,c=a.tag={name:a.tagName,attributes:{}};a.opt.xmlns&&(c.ns=b.ns),a.attribList.length=0,o(a,"onopentagstart",c)}function v(a,b){var c=a.indexOf(":"),d=c<0?["",a]:a.split(":"),e=d[0],f=d[1];return b&&"xmlns"===a&&(e="xmlns",f=""),{prefix:e,local:f}}function w(a){if(a.strict||(a.attribName=a.attribName[a.looseCase]()),-1!==a.attribList.indexOf(a.attribName)||a.tag.attributes.hasOwnProperty(a.attribName))return void(a.attribName=a.attribValue="");if(a.opt.xmlns){var b=v(a.attribName,!0),c=b.prefix,d=b.local;if("xmlns"===c)if("xml"===d&&a.attribValue!==N)t(a,"xml: prefix must be bound to "+N+"\nActual: "+a.attribValue);else if("xmlns"===d&&a.attribValue!==O)t(a,"xmlns: prefix must be bound to "+O+"\nActual: "+a.attribValue);else{var e=a.tag,f=a.tags[a.tags.length-1]||a;e.ns===f.ns&&(e.ns=Object.create(f.ns)),e.ns[d]=a.attribValue}a.attribList.push([a.attribName,a.attribValue])}else a.tag.attributes[a.attribName]=a.attribValue,o(a,"onattribute",{name:a.attribName,value:a.attribValue});a.attribName=a.attribValue=""}function x(a,b){if(a.opt.xmlns){var c=a.tag,d=v(a.tagName);c.prefix=d.prefix,c.local=d.local,c.uri=c.ns[d.prefix]||"",c.prefix&&!c.uri&&(t(a,"Unbound namespace prefix: "+JSON.stringify(a.tagName)),c.uri=d.prefix);var e=a.tags[a.tags.length-1]||a;c.ns&&e.ns!==c.ns&&Object.keys(c.ns).forEach(function(b){o(a,"onopennamespace",{prefix:b,uri:c.ns[b]})});for(var f=0,g=a.attribList.length;f<g;f++){var h=a.attribList[f],i=h[0],j=h[1],k=v(i,!0),l=k.prefix,m=k.local,n=""===l?"":c.ns[l]||"",p={name:i,value:j,prefix:l,local:m,uri:n};l&&"xmlns"!==l&&!n&&(t(a,"Unbound namespace prefix: "+JSON.stringify(l)),p.uri=l),a.tag.attributes[i]=p,o(a,"onattribute",p)}a.attribList.length=0}a.tag.isSelfClosing=!!b,a.sawRoot=!0,a.tags.push(a.tag),o(a,"onopentag",a.tag),b||(a.noscript||"script"!==a.tagName.toLowerCase()?a.state=U.TEXT:a.state=U.SCRIPT,a.tag=null,a.tagName=""),a.attribName=a.attribValue="",a.attribList.length=0}function y(a){if(!a.tagName)return t(a,"Weird empty close tag."),a.textNode+="</>",void(a.state=U.TEXT);if(a.script){if("script"!==a.tagName)return a.script+="</"+a.tagName+">",a.tagName="",void(a.state=U.SCRIPT);o(a,"onscript",a.script),a.script=""}var b=a.tags.length,c=a.tagName;a.strict||(c=c[a.looseCase]());for(var d=c;b--;){if(a.tags[b].name===d)break;t(a,"Unexpected close tag")}if(b<0)return t(a,"Unmatched closing tag: "+a.tagName),a.textNode+="</"+a.tagName+">",void(a.state=U.TEXT);a.tagName=c;for(var e=a.tags.length;e-- >b;){var f=a.tag=a.tags.pop();a.tagName=a.tag.name,o(a,"onclosetag",a.tagName);var g={};for(var h in f.ns)g[h]=f.ns[h];var i=a.tags[a.tags.length-1]||a;a.opt.xmlns&&f.ns!==i.ns&&Object.keys(f.ns).forEach(function(b){var c=f.ns[b];o(a,"onclosenamespace",{prefix:b,uri:c})})}0===b&&(a.closedRoot=!0),a.tagName=a.attribValue=a.attribName="",a.attribList.length=0,a.state=U.TEXT}function z(a){var b,c=a.entity,d=c.toLowerCase(),e="";return a.ENTITIES[c]?a.ENTITIES[c]:a.ENTITIES[d]?a.ENTITIES[d]:(c=d,"#"===c.charAt(0)&&("x"===c.charAt(1)?(c=c.slice(2),b=parseInt(c,16),e=b.toString(16)):(c=c.slice(1),b=parseInt(c,10),e=b.toString(10))),c=c.replace(/^0+/,""),e.toLowerCase()!==c?(t(a,"Invalid character entity"),"&"+a.entity+";"):String.fromCodePoint(b))}function A(a,b){"<"===b?(a.state=U.OPEN_WAKA,a.startTagPosition=a.position):m(G,b)&&(t(a,"Non-whitespace before first tag."),a.textNode=b,a.state=U.TEXT)}function B(a,b){var c="";return b<a.length&&(c=a.charAt(b)),c}function C(a){var b=this;if(this.error)throw this.error;if(b.closed)return r(b,"Cannot write after close. Assign an onready handler.");if(null===a)return s(b);"object"==typeof a&&(a=a.toString());for(var c=0,d="";;){if(d=B(a,c++),b.c=d,!d)break;switch(b.trackPosition&&(b.position++,"\n"===d?(b.line++,b.column=0):b.column++),b.state){case U.BEGIN:if(b.state=U.BEGIN_WHITESPACE,"\ufeff"===d)continue;A(b,d);continue;case U.BEGIN_WHITESPACE:A(b,d);continue;case U.TEXT:if(b.sawRoot&&!b.closedRoot){for(var f=c-1;d&&"<"!==d&&"&"!==d;)(d=B(a,c++))&&b.trackPosition&&(b.position++,"\n"===d?(b.line++,b.column=0):b.column++);b.textNode+=a.substring(f,c-1)}"<"!==d||b.sawRoot&&b.closedRoot&&!b.strict?(!m(G,d)||b.sawRoot&&!b.closedRoot||t(b,"Text data outside of root node."),"&"===d?b.state=U.TEXT_ENTITY:b.textNode+=d):(b.state=U.OPEN_WAKA,b.startTagPosition=b.position);continue;case U.SCRIPT:"<"===d?b.state=U.SCRIPT_ENDING:b.script+=d;continue;case U.SCRIPT_ENDING:"/"===d?b.state=U.CLOSE_TAG:(b.script+="<"+d,b.state=U.SCRIPT);continue;case U.OPEN_WAKA:if("!"===d)b.state=U.SGML_DECL,b.sgmlDecl="";else if(l(G,d));else if(l(Q,d))b.state=U.OPEN_TAG,b.tagName=d;else if("/"===d)b.state=U.CLOSE_TAG,b.tagName="";else if("?"===d)b.state=U.PROC_INST,b.procInstName=b.procInstBody="";else{if(t(b,"Unencoded <"),b.startTagPosition+1<b.position){var g=b.position-b.startTagPosition;d=new Array(g).join(" ")+d}b.textNode+="<"+d,b.state=U.TEXT}continue;case U.SGML_DECL:(b.sgmlDecl+d).toUpperCase()===L?(o(b,"onopencdata"),b.state=U.CDATA,b.sgmlDecl="",b.cdata=""):b.sgmlDecl+d==="--"?(b.state=U.COMMENT,b.comment="",b.sgmlDecl=""):(b.sgmlDecl+d).toUpperCase()===M?(b.state=U.DOCTYPE,(b.doctype||b.sawRoot)&&t(b,"Inappropriately located doctype declaration"),b.doctype="",b.sgmlDecl=""):">"===d?(o(b,"onsgmldeclaration",b.sgmlDecl),b.sgmlDecl="",b.state=U.TEXT):l(J,d)?(b.state=U.SGML_DECL_QUOTED,b.sgmlDecl+=d):b.sgmlDecl+=d;continue;case U.SGML_DECL_QUOTED:d===b.q&&(b.state=U.SGML_DECL,b.q=""),b.sgmlDecl+=d;continue;case U.DOCTYPE:">"===d?(b.state=U.TEXT,o(b,"ondoctype",b.doctype),b.doctype=!0):(b.doctype+=d,"["===d?b.state=U.DOCTYPE_DTD:l(J,d)&&(b.state=U.DOCTYPE_QUOTED,b.q=d));continue;case U.DOCTYPE_QUOTED:b.doctype+=d,d===b.q&&(b.q="",b.state=U.DOCTYPE);continue;case U.DOCTYPE_DTD:b.doctype+=d,"]"===d?b.state=U.DOCTYPE:l(J,d)&&(b.state=U.DOCTYPE_DTD_QUOTED,b.q=d);continue;case U.DOCTYPE_DTD_QUOTED:b.doctype+=d,d===b.q&&(b.state=U.DOCTYPE_DTD,b.q="");continue;case U.COMMENT:"-"===d?b.state=U.COMMENT_ENDING:b.comment+=d;continue;case U.COMMENT_ENDING:"-"===d?(b.state=U.COMMENT_ENDED,b.comment=q(b.opt,b.comment),b.comment&&o(b,"oncomment",b.comment),b.comment=""):(b.comment+="-"+d,b.state=U.COMMENT);continue;case U.COMMENT_ENDED:">"!==d?(t(b,"Malformed comment"),b.comment+="--"+d,b.state=U.COMMENT):b.state=U.TEXT;continue;case U.CDATA:"]"===d?b.state=U.CDATA_ENDING:b.cdata+=d;continue;case U.CDATA_ENDING:"]"===d?b.state=U.CDATA_ENDING_2:(b.cdata+="]"+d,b.state=U.CDATA);continue;case U.CDATA_ENDING_2:">"===d?(b.cdata&&o(b,"oncdata",b.cdata),o(b,"onclosecdata"),b.cdata="",b.state=U.TEXT):"]"===d?b.cdata+="]":(b.cdata+="]]"+d,b.state=U.CDATA);continue;case U.PROC_INST:"?"===d?b.state=U.PROC_INST_ENDING:l(G,d)?b.state=U.PROC_INST_BODY:b.procInstName+=d;continue;case U.PROC_INST_BODY:if(!b.procInstBody&&l(G,d))continue;"?"===d?b.state=U.PROC_INST_ENDING:b.procInstBody+=d;continue;case U.PROC_INST_ENDING:">"===d?(o(b,"onprocessinginstruction",{name:b.procInstName,body:b.procInstBody}),b.procInstName=b.procInstBody="",b.state=U.TEXT):(b.procInstBody+="?"+d,b.state=U.PROC_INST_BODY);continue;case U.OPEN_TAG:l(R,d)?b.tagName+=d:(u(b),">"===d?x(b):"/"===d?b.state=U.OPEN_TAG_SLASH:(m(G,d)&&t(b,"Invalid character in tag name"),b.state=U.ATTRIB));continue;case U.OPEN_TAG_SLASH:">"===d?(x(b,!0),y(b)):(t(b,"Forward-slash in opening tag not followed by >"),b.state=U.ATTRIB);continue;case U.ATTRIB:if(l(G,d))continue;">"===d?x(b):"/"===d?b.state=U.OPEN_TAG_SLASH:l(Q,d)?(b.attribName=d,b.attribValue="",b.state=U.ATTRIB_NAME):t(b,"Invalid attribute name");continue;case U.ATTRIB_NAME:"="===d?b.state=U.ATTRIB_VALUE:">"===d?(t(b,"Attribute without value"),b.attribValue=b.attribName,w(b),x(b)):l(G,d)?b.state=U.ATTRIB_NAME_SAW_WHITE:l(R,d)?b.attribName+=d:t(b,"Invalid attribute name");continue;case U.ATTRIB_NAME_SAW_WHITE:if("="===d)b.state=U.ATTRIB_VALUE;else{if(l(G,d))continue;t(b,"Attribute without value"),b.tag.attributes[b.attribName]="",b.attribValue="",o(b,"onattribute",{name:b.attribName,value:""}),b.attribName="",">"===d?x(b):l(Q,d)?(b.attribName=d,b.state=U.ATTRIB_NAME):(t(b,"Invalid attribute name"),b.state=U.ATTRIB)}continue;case U.ATTRIB_VALUE:if(l(G,d))continue;l(J,d)?(b.q=d,b.state=U.ATTRIB_VALUE_QUOTED):(t(b,"Unquoted attribute value"),b.state=U.ATTRIB_VALUE_UNQUOTED,b.attribValue=d);continue;case U.ATTRIB_VALUE_QUOTED:if(d!==b.q){"&"===d?b.state=U.ATTRIB_VALUE_ENTITY_Q:b.attribValue+=d;continue}w(b),b.q="",b.state=U.ATTRIB_VALUE_CLOSED;continue;case U.ATTRIB_VALUE_CLOSED:l(G,d)?b.state=U.ATTRIB:">"===d?x(b):"/"===d?b.state=U.OPEN_TAG_SLASH:l(Q,d)?(t(b,"No whitespace between attributes"),b.attribName=d,b.attribValue="",b.state=U.ATTRIB_NAME):t(b,"Invalid attribute name");continue;case U.ATTRIB_VALUE_UNQUOTED:if(m(K,d)){"&"===d?b.state=U.ATTRIB_VALUE_ENTITY_U:b.attribValue+=d;continue}w(b),">"===d?x(b):b.state=U.ATTRIB;continue;case U.CLOSE_TAG:if(b.tagName)">"===d?y(b):l(R,d)?b.tagName+=d:b.script?(b.script+="</"+b.tagName,b.tagName="",b.state=U.SCRIPT):(m(G,d)&&t(b,"Invalid tagname in closing tag"),b.state=U.CLOSE_TAG_SAW_WHITE);else{if(l(G,d))continue;m(Q,d)?b.script?(b.script+="</"+d,b.state=U.SCRIPT):t(b,"Invalid tagname in closing tag."):b.tagName=d}continue;case U.CLOSE_TAG_SAW_WHITE:if(l(G,d))continue;">"===d?y(b):t(b,"Invalid characters in closing tag");continue;case U.TEXT_ENTITY:case U.ATTRIB_VALUE_ENTITY_Q:case U.ATTRIB_VALUE_ENTITY_U:var h,i;switch(b.state){case U.TEXT_ENTITY:h=U.TEXT,i="textNode";break;case U.ATTRIB_VALUE_ENTITY_Q:h=U.ATTRIB_VALUE_QUOTED,i="attribValue";break;case U.ATTRIB_VALUE_ENTITY_U:h=U.ATTRIB_VALUE_UNQUOTED,i="attribValue"}";"===d?(b[i]+=z(b),b.entity="",b.state=h):l(b.entity.length?T:S,d)?b.entity+=d:(t(b,"Invalid character in entity name"),b[i]+="&"+b.entity+d,b.entity="",b.state=h);continue;default:throw new Error(b,"Unknown state: "+b.state)}}return b.position>=b.bufferCheckPosition&&e(b),b}c.parser=function(a,b){return new d(a,b)},c.SAXParser=d,c.SAXStream=i,c.createStream=h,c.MAX_BUFFER_LENGTH=65536;var D=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];c.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(a){function b(){}return b.prototype=a,new b}),Object.keys||(Object.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}),d.prototype={end:function(){s(this)},write:C,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){g(this)}};var E;try{E=a(34).Stream}catch(W){E=function(){}}var F=c.EVENTS.filter(function(a){return"error"!==a&&"end"!==a});i.prototype=Object.create(E.prototype,{constructor:{value:i}}),i.prototype.write=function(c){if("function"==typeof b&&"function"==typeof b.isBuffer&&b.isBuffer(c)){if(!this._decoder){var d=a(35).StringDecoder;this._decoder=new d("utf8")}c=this._decoder.write(c)}return this._parser.write(c.toString()),this.emit("data",c),!0},i.prototype.end=function(a){return a&&a.length&&this.write(a),this._parser.end(),!0},i.prototype.on=function(a,b){var c=this;return c._parser["on"+a]||-1===F.indexOf(a)||(c._parser["on"+a]=function(){var b=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);b.splice(0,0,a),c.emit.apply(c,b)}),E.prototype.on.call(c,a,b)};var G="\r\n\t ",H="0124356789",I="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",J="'\"",K=G+">",L="[CDATA[",M="DOCTYPE",N="http://www.w3.org/XML/1998/namespace",O="http://www.w3.org/2000/xmlns/",P={xml:N,xmlns:O};G=j(G),H=j(H),I=j(I);var Q=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,R=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,S=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,T=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;J=j(J),K=j(K);var U=0;c.STATE={BEGIN:U++,BEGIN_WHITESPACE:U++,TEXT:U++,TEXT_ENTITY:U++,OPEN_WAKA:U++,SGML_DECL:U++,SGML_DECL_QUOTED:U++,DOCTYPE:U++,DOCTYPE_QUOTED:U++,DOCTYPE_DTD:U++,DOCTYPE_DTD_QUOTED:U++,COMMENT_STARTING:U++,COMMENT:U++,COMMENT_ENDING:U++,COMMENT_ENDED:U++,CDATA:U++,CDATA_ENDING:U++,CDATA_ENDING_2:U++,PROC_INST:U++,PROC_INST_BODY:U++,PROC_INST_ENDING:U++,OPEN_TAG:U++,OPEN_TAG_SLASH:U++,ATTRIB:U++,ATTRIB_NAME:U++,ATTRIB_NAME_SAW_WHITE:U++,ATTRIB_VALUE:U++,ATTRIB_VALUE_QUOTED:U++,ATTRIB_VALUE_CLOSED:U++,ATTRIB_VALUE_UNQUOTED:U++,ATTRIB_VALUE_ENTITY_Q:U++,ATTRIB_VALUE_ENTITY_U:U++,CLOSE_TAG:U++,CLOSE_TAG_SAW_WHITE:U++,SCRIPT:U++,SCRIPT_ENDING:U++},c.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},c.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(c.ENTITIES).forEach(function(a){var b=c.ENTITIES[a],d="number"==typeof b?String.fromCharCode(b):b;c.ENTITIES[a]=d});for(var V in c.STATE)c.STATE[c.STATE[V]]=V;U=c.STATE,/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
|
18 |
+
String.fromCodePoint||function(){var a=String.fromCharCode,b=Math.floor,c=function(){var c,d,e=16384,f=[],g=-1,h=arguments.length;if(!h)return"";for(var i="";++g<h;){var j=Number(arguments[g]);if(!isFinite(j)||j<0||j>1114111||b(j)!==j)throw RangeError("Invalid code point: "+j);j<=65535?f.push(j):(j-=65536,c=55296+(j>>10),d=j%1024+56320,f.push(c,d)),(g+1===h||f.length>e)&&(i+=a.apply(null,f),f.length=0)}return i};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:c,configurable:!0,writable:!0}):String.fromCodePoint=c}()}(void 0===c?this.sax={}:c)}).call(this,a(9).Buffer)},{34:34,35:35,9:9}],45:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){B=!0,C=!0,E=o,D=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(z[m]=b(window.console.error),z[n]=b(window.console.error),z[o]=b(window.console.warn),z[p]=b(window.console.info),z[q]=b(window.console.debug))}function b(a){return a&&a.bind?a.bind(window.console):window.console.log.bind(window.console)}function c(a){return{fatal:r.bind(a),error:s.bind(a),warn:t.bind(a),info:u.bind(a),debug:v.bind(a)}}function d(a){E=a}function e(){return E}function f(a){B=a}function h(a){C=a}function j(a){E=a?q:l}function k(){return E!==l}function r(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];w.apply(void 0,[m,this].concat(b))}function s(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];w.apply(void 0,[n,this].concat(b))}function t(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];w.apply(void 0,[o,this].concat(b))}function u(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];w.apply(void 0,[p,this].concat(b))}function v(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];w.apply(void 0,[q,this].concat(b))}function w(a,b){if(!(E<a)){var c="",d=null;B&&(d=(new Date).getTime(),c+="["+(d-D)+"]"),C&&b&&b.getClassName&&(c+="["+b.getClassName()+"]",b.getType&&(c+="["+b.getType()+"]")),c.length>0&&(c+=" ");for(var e=arguments.length,f=Array(e>2?e-2:0),g=2;g<e;g++)f[g-2]=arguments[g];Array.apply(null,f).forEach(function(a){c+=a+" "}),z[a]&&z[a](c),y.trigger(i.default.LOG,{message:c})}}var x=this.context,y=(0,g.default)(x).getInstance(),z=[],A=void 0,B=void 0,C=void 0,D=void 0,E=void 0;return A={getLogger:c,setLogTimestampVisible:f,setCalleeNameVisible:h,setLogToBrowserConsole:j,getLogToBrowserConsole:k,setLogLevel:d,getLogLevel:e},a(),A}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(50),i=d(h),j=a(47),k=d(j),l=0,m=1,n=2,o=3,p=4,q=5;e.__dashjs_factory_name="Debug";var r=k.default.getSingletonFactory(e);r.LOG_LEVEL_NONE=l,r.LOG_LEVEL_FATAL=m,r.LOG_LEVEL_ERROR=n,r.LOG_LEVEL_WARNING=o,r.LOG_LEVEL_INFO=p,r.LOG_LEVEL_DEBUG=q,k.default.updateSingletonFactory(e.__dashjs_factory_name,r),c.default=r,b.exports=c.default},{46:46,47:47,50:50}],46:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b,c){var e=arguments.length<=3||void 0===arguments[3]?h:arguments[3];if(!a)throw new Error("event type cannot be null or undefined");if(!b||"function"!=typeof b)throw new Error("listener must be a function: "+b);if(!(d(a,b,c)>=0)){f[a]=f[a]||[];var g={callback:b,scope:c,priority:e};f[a].some(function(b,c){if(b&&e>b.priority)return f[a].splice(c,0,g),!0})||f[a].push(g)}}function b(a,b,c){if(a&&b&&f[a]){var e=d(a,b,c);e<0||(f[a][e]=null)}}function c(a,b){if(a&&f[a]){if(b=b||{},b.hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");b.type=a,f[a]=f[a].filter(function(a){return a}),f[a].forEach(function(a){return a&&a.callback.call(a.scope,b)})}}function d(a,b,c){var d=-1;return f[a]?(f[a].some(function(a,e){if(a&&a.callback===b&&(!c||c===a.scope))return d=e,!0}),d):d}function e(){f={}}var f={};return{on:a,off:b,trigger:c,reset:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=0,i=5e3;e.__dashjs_factory_name="EventBus";var j=g.default.getSingletonFactory(e);j.EVENT_PRIORITY_LOW=h,j.EVENT_PRIORITY_HIGH=i,g.default.updateSingletonFactory(e.__dashjs_factory_name,j),c.default=j,b.exports=c.default},{47:47}],47:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=function(){function a(a,b,c,d){!d[a]&&b&&(d[a]={instance:b,override:c})}function b(a,b){for(var c in n){var d=n[c];if(d.context===a&&d.name===b)return d.instance}return null}function c(a,b,c){for(var d in n){var e=n[d];if(e.context===a&&e.name===b)return void(n[d].instance=c)}n.push({name:b,context:a,instance:c})}function d(a,b){return b[a]}function e(a,b,c){a in c&&(c[a]=b)}function f(a,b){e(a,b,p)}function g(a){return d(a,p)}function h(a){var b=d(a.__dashjs_factory_name,p);return b||(b=function(b){return void 0===b&&(b={}),{create:function(){return l(a,b,arguments)}}},p[a.__dashjs_factory_name]=b),b}function i(a,b){e(a,b,o)}function j(a){return d(a,o)}function k(a){var c=d(a.__dashjs_factory_name,o);return c||(c=function(c){var d=void 0;return void 0===c&&(c={}),{getInstance:function(){return d||(d=b(c,a.__dashjs_factory_name)),d||(d=l(a,c,arguments),n.push({name:a.__dashjs_factory_name,context:c,instance:d})),d}}},o[a.__dashjs_factory_name]=c),c}function l(a,b,c){var d=void 0,e=a.__dashjs_factory_name,f=b[e];if(f){var g=f.instance;if(!f.override)return g.apply({context:b,factory:m},c);d=a.apply({context:b},c),g=g.apply({context:b,factory:m,parent:d},c);for(var h in g)d.hasOwnProperty(h)&&(d[h]=g[h])}else d=a.apply({context:b},c);return d.getClassName=function(){return e},d}var m=void 0,n=[],o={},p={};return m={extend:a,getSingletonInstance:b,setSingletonInstance:c,getSingletonFactory:k,getSingletonFactoryByName:j,updateSingletonFactory:i,getClassFactory:h,getClassFactoryByName:g,updateClassFactory:f}}();c.default=d,b.exports=c.default},{}],48:[function(a,b,c){"use strict";function d(){return e}Object.defineProperty(c,"__esModule",{value:!0}),c.getVersionString=d;var e="2.8.0"},{}],49:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(51),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.BUFFERING_COMPLETED="bufferingCompleted",this.BUFFER_CLEARED="bufferCleared",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.BYTES_APPENDED="bytesAppended",this.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",this.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",this.CURRENT_TRACK_CHANGED="currentTrackChanged",this.DATA_UPDATE_COMPLETED="dataUpdateCompleted",this.DATA_UPDATE_STARTED="dataUpdateStarted",this.INITIALIZATION_LOADED="initializationLoaded",this.INIT_FRAGMENT_LOADED="initFragmentLoaded",this.INIT_REQUESTED="initRequested",this.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",this.LIVE_EDGE_SEARCH_COMPLETED="liveEdgeSearchCompleted",this.LOADING_COMPLETED="loadingCompleted",this.LOADING_PROGRESS="loadingProgress",this.LOADING_DATA_PROGRESS="loadingDataProgress",this.LOADING_ABANDONED="loadingAborted",this.MANIFEST_UPDATED="manifestUpdated",this.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",this.QUOTA_EXCEEDED="quotaExceeded",this.REPRESENTATION_UPDATED="representationUpdated",this.SEGMENTS_LOADED="segmentsLoaded",this.SERVICE_LOCATION_BLACKLIST_ADD="serviceLocationBlacklistAdd",this.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",this.SOURCEBUFFER_REMOVE_COMPLETED="sourceBufferRemoveCompleted",this.STREAMS_COMPOSED="streamsComposed",this.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",this.STREAM_COMPLETED="streamCompleted",this.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",this.TIMED_TEXT_REQUESTED="timedTextRequested",this.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",this.URL_RESOLUTION_FAILED="urlResolutionFailed",this.VIDEO_CHUNK_RECEIVED="videoChunkReceived",this.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",this.XLINK_ELEMENT_LOADED="xlinkElementLoaded",this.XLINK_READY="xlinkReady"}return f(b,a),b}(i.default);c.default=j,b.exports=c.default},{51:51}],50:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(49),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).apply(this,arguments)}return f(b,a),b}(i.default),k=new j;c.default=k,b.exports=c.default},{49:49}],51:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a)}return e(a,[{key:"extend",value:function(a,b){if(a){var c=!!b&&b.override,d=!!b&&b.publicOnly;for(var e in a)!a.hasOwnProperty(e)||this[e]&&!c||d&&-1===a[e].indexOf("public_")||(this[e]=a[e])}}}]),a}();c.default=f,b.exports=c.default},{}],52:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){L()}function b(a){a&&a.dashManifestModel&&(N=a.dashManifestModel)}function c(a,b){return b&&a?b.getRepresentationForQuality(a.quality):null}function d(a){return a&&a.streamInfo&&void 0!==a.streamInfo.id&&P[a.streamInfo.id]?P[a.streamInfo.id][a.index]:null}function e(a,b){for(var c=b.length,d=0;d<c;d++){var e=b[d];if(a.id===e.id)return e}return null}function f(a){var b=new i.default,c=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index],d=N.getRepresentationFor(a.index,c);return b.id=a.id,b.quality=a.index,b.bandwidth=N.getBandwidth(d),b.DVRWindow=a.segmentAvailabilityRange,b.fragmentDuration=a.segmentDuration||(a.segments&&a.segments.length>0?a.segments[0].duration:NaN),b.MSETimeOffset=a.MSETimeOffset,b.useCalculatedLiveEdgeTime=a.useCalculatedLiveEdgeTime,b.mediaInfo=h(a.adaptation),b}function h(a){var b=new k.default,c=a.period.mpd.manifest.Period_asArray[a.period.index].AdaptationSet_asArray[a.index],d=void 0;return b.id=a.id,b.index=a.index,b.type=a.type,b.streamInfo=n(a.period),b.representationCount=N.getRepresentationCount(c),b.lang=N.getLanguageForAdaptation(c),d=N.getViewpointForAdaptation(c),b.viewpoint=d?d.value:void 0,b.accessibility=N.getAccessibilityForAdaptation(c).map(function(a){var c=a.value,d=c;return a.schemeIdUri&&a.schemeIdUri.search("cea-608")>=0&&void 0!==u.default&&(d=c?"cea-608:"+c:"cea-608",b.embeddedCaptions=!0),d}),b.audioChannelConfiguration=N.getAudioChannelConfigurationForAdaptation(c).map(function(a){return a.value}),b.roles=N.getRolesForAdaptation(c).map(function(a){return a.value}),b.codec=N.getCodec(c),b.mimeType=N.getMimeType(c),b.contentProtection=N.getContentProtectionData(c),b.bitrateList=N.getBitrateListForAdaptation(c),b.contentProtection&&b.contentProtection.forEach(function(a){a.KID=N.getKID(a)}),b.isText=N.getIsTextTrack(b.mimeType),b}function j(a,b,c){a.id=b,a.index=100+parseInt(b.substring(2,3)),a.type=g.default.EMBEDDED_TEXT,a.codec="cea-608-in-SEI",a.isText=!0,a.isEmbedded=!0,a.lang=c,a.roles=["caption"]}function l(a){a.type=g.default.IMAGE}function n(a){var b=new m.default;return b.id=a.id,b.index=a.index,b.start=a.start,b.duration=a.duration,b.manifestInfo=p(a.mpd),b.isLast=1===a.mpd.manifest.Period_asArray.length||Math.abs(b.start+b.duration-b.manifestInfo.duration)<1,b}function p(a){var b=new o.default;return b.DVRWindowSize=a.timeShiftBufferDepth,b.loadedTime=a.manifest.loadedTime,b.availableFrom=a.availabilityStartTime,b.minBufferTime=a.manifest.minBufferTime,b.maxFragmentDuration=a.maxSegmentDuration,b.duration=N.getDuration(a.manifest),b.isDynamic=N.getIsDynamic(a.manifest),b}function r(a,b){if(0===O.length)return null;var c=O[0].mpd.manifest,d=N.getAdaptationForType(c,a.index,b,a);if(!d)return null;var f=e(a,O),g=f.id,i=N.getIndexForAdaptation(d,c,a.index);return P[g]=P[g]||N.getAdaptationsForPeriod(f),h(P[g][i])}function s(a,b,c){var d=O,f=c,i=[],k=void 0,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0;if(f){t();var r=N.getMpd(f);d=N.getRegularPeriods(r)}else{if(!(O.length>0))return i;f=O[0].mpd.manifest}var s=e(a,d),u=s.id,v=N.getAdaptationsForType(f,a.index,b!==g.default.EMBEDDED_TEXT?b:g.default.VIDEO);if(!v)return i;for(P[u]=P[u]||N.getAdaptationsForPeriod(s),o=0,q=v.length;o<q;o++)if(k=v[o],n=N.getIndexForAdaptation(k,f,a.index),m=h(P[u][n]),b===g.default.EMBEDDED_TEXT){var w=m.accessibility.length;for(p=0;p<w;p++)if(m){var x=m.accessibility[p];if(0===x.indexOf("cea-608:")){var y=x.substring(8),z=y.split(";");if("CC"===z[0].substring(0,2))for(p=0;p<z.length;p++)m||(m=h.call(this,P[u][n])),j(m,z[p].substring(0,3),z[p].substring(4)),i.push(m),m=null;else for(p=0;p<z.length;p++)m||(m=h.call(this,P[u][n])),j(m,"CC"+(p+1),z[p]),i.push(m),m=null}else 0===x.indexOf("cea-608")&&(j(m,g.default.CC1,"eng"),i.push(m),m=null)}}else b===g.default.IMAGE?(l(m),i.push(m),m=null):m&&i.push(m);return i}function t(){if(!N||!N.hasOwnProperty("getMpd")||!N.hasOwnProperty("getRegularPeriods"))throw new Error("setConfig function has to be called previously")}function v(a){if(!a)return null;t();var b=N.getMpd(a);O=N.getRegularPeriods(b),P={}}function w(a,b){var c=[],d=O;if(a){t();var e=N.getMpd(a);d=N.getRegularPeriods(e)}b||(b=d.length);for(var f=0;f<b;f++)c.push(n(d[f]));return c}function x(a){if(!(a&&a.hasOwnProperty("getRepresentationController")&&a.hasOwnProperty("getIndexHandler")&&a.hasOwnProperty("getMediaInfo")&&a.hasOwnProperty("getType")&&a.hasOwnProperty("getStreamInfo")))throw new Error("streamProcessor parameter is missing or malformed!")}function y(a){if(!a||!a.hasOwnProperty("getRepresentationForQuality")||!a.hasOwnProperty("getCurrentRepresentation"))throw new Error("representationController parameter is missing or malformed!")}function z(a){if(null===a||isNaN(a)||a%1!=0)throw new Error("quality argument is not an integer")}function A(a,b){var c=void 0,d=void 0,e=void 0;return x(a),z(b),c=a.getRepresentationController(),e=a.getIndexHandler(),d=c?c.getRepresentationForQuality(b):null,e?e.getInitRequest(d):null}function B(a,b){var d=void 0,e=void 0,f=void 0;return x(a),d=a.getRepresentationController(),e=c(b,d),f=a.getIndexHandler(),f?f.getNextSegmentRequest(e):null}function C(a,b,d,e){var f=void 0,g=void 0,h=void 0;return x(a),f=a.getRepresentationController(),g=c(b,f),h=a.getIndexHandler(),h?h.getSegmentRequestForTime(g,d,e):null}function D(a,b,d){var e=void 0,f=void 0,g=void 0;return x(a),e=a.getRepresentationController(),f=c(b,e),g=a.getIndexHandler(),g?g.generateSegmentRequestForTime(f,d):null}function E(a){x(a);var b=a.getIndexHandler();return b?b.getCurrentTime():NaN}function F(a,b){x(a);var c=a.getIndexHandler();c&&c.setCurrentTime(b)}function G(a){x(a);var b=e(a.getStreamInfo(),O),c=a.getMediaInfo(),f=d(c),g=a.getType(),h=void 0,i=void 0;h=c?c.id:null,O.length>0&&(i=h?N.getAdaptationForId(h,O[0].mpd.manifest,b.index):N.getAdaptationForIndex(c.index,O[0].mpd.manifest,b.index),a.getRepresentationController().updateData(i,f,g))}function H(a,b){y(a),z(b);var c=a.getRepresentationForQuality(b);return c?f(c):null}function I(a){y(a);var b=a.getCurrentRepresentation();return b?f(b):null}function J(a,b,c){if(!a||!b)return null;var d=new q.default,e=a.scheme_id_uri,f=a.value,g=a.timescale,h=a.presentation_time_delta,i=a.event_duration,j=a.id,k=a.message_data,l=c*g+h;return b[e]?(d.eventStream=b[e],d.eventStream.value=f,d.eventStream.timescale=g,d.duration=i,d.id=j,d.presentationTime=l,d.messageData=k,d.presentationTimeDelta=h,d):null}function K(a,b){var f=[];if(0===O.length)return f;var g=O[0].mpd.manifest;return a instanceof m.default?f=N.getEventsForPeriod(e(a,O)):a instanceof k.default?f=N.getEventStreamForAdaptationSet(g,d(a)):a instanceof i.default&&(f=N.getEventStreamForRepresentation(g,c(a,b.getRepresentationController()))),f}function L(){O=[],P={}}var M=void 0,N=void 0,O=void 0,P=void 0;return M={convertDataToRepresentationInfo:f,getDataForMedia:d,getStreamsInfo:w,getMediaInfoForType:r,getAllMediaInfoForType:s,getCurrentRepresentationInfo:I,getRepresentationInfoForQuality:H,updateData:G,getInitRequest:A,getNextFragmentRequest:B,getFragmentRequestForTime:C,generateFragmentRequestForTime:D,getIndexHandlerTime:E,setIndexHandlerTime:F,getEventsFor:K,getEvent:J,setConfig:b,updatePeriods:v,reset:L},a(),M}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(172),i=d(h),j=a(170),k=d(j),l=a(173),m=d(l),n=a(169),o=d(n),p=a(81),q=d(p),r=a(47),s=d(r),t=a(2),u=d(t);e.__dashjs_factory_name="DashAdapter",c.default=s.default.getSingletonFactory(e),b.exports=c.default},{169:169,170:170,172:172,173:173,2:2,47:47,81:81,98:98}],53:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){Z=(0,v.default)(O).getInstance().getLogger(Y),l(),R=c(a.mimeType)?(0,G.default)(O).getInstance():(0,E.default)(O).getInstance(),R.setConfig({baseURLController:X,metricsModel:U,mediaPlayerModel:V,errHandler:W}),P.on(p.default.INITIALIZATION_LOADED,M,Y),P.on(p.default.SEGMENTS_LOADED,N,Y)}function c(a){return"webm"===a.split("/")[1].toLowerCase()}function d(b){ca=b;var c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;R.initialize(),da=(0,C.default)(O).create(a,c)}function e(){return ca}function f(a){aa=a}function h(){return aa}function j(){return ba}function l(){$=-1,aa=0,ba=NaN,_=null,ca=null,da=null}function o(){l(),P.off(p.default.INITIALIZATION_LOADED,M,Y),P.off(p.default.SEGMENTS_LOADED,N,Y)}function q(a,b,c){var d=X.resolve(c.path),e=void 0,f=void 0;return d&&b!==d.url&&Q.isRelative(b)?(e=d.url,f=d.serviceLocation,b&&(e=Q.resolve(b,e))):e=b,!Q.isRelative(e)&&(a.url=e,a.serviceLocation=f,!0)}function s(a,b){var c=new k.default,d=a.adaptation.period,e=d.start,f=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(c.mediaType=b,c.type=n.HTTPRequest.INIT_SEGMENT_TYPE,c.range=a.range,c.availabilityStartTime=S.calcAvailabilityStartTimeFromPresentationTime(e,d.mpd,f),c.availabilityEndTime=S.calcAvailabilityEndTimeFromPresentationTime(e+d.duration,d.mpd,f),c.quality=a.index,c.mediaInfo=ca?ca.getMediaInfo():null,c.representationId=a.id,q(c,a.initialization,a))return c}function t(a){var b=ca?ca.getType():null;return a?s(a,b):null}function u(a){var b=!1,c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(c||$!==a.availableSegmentsNumber){var d=(0,A.getSegmentByIndex)($,a);if(d){var e=parseFloat((d.presentationStartTime-a.adaptation.period.start).toFixed(5)),f=a.adaptation.period.duration;Z.debug(a.segmentInfoType+": "+e+" / "+f),b=(a.segmentInfoType!==i.default.SEGMENT_TIMELINE||!c)&&e>=f}else Z.debug("isMediaFinished - no segment found")}else b=!0;return b}function w(a){da.getSegments(a,_,$,y)}function y(a,b){var c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(a.segments=b,b&&b.length>0&&(ba=isNaN(ba)?b[0].presentationStartTime:Math.min(b[0].presentationStartTime,ba),c&&isNaN(S.getExpectedLiveEdge()))){var d=b[b.length-1],e=d.presentationStartTime,f=U.getMetricsFor(g.default.STREAM);S.setExpectedLiveEdge(e),U.updateManifestUpdateInfo(T.getCurrentManifestUpdate(f),{presentationStartTime:e})}}function B(a){if(!a)throw new Error("no representation");a.segments=null,w(a)}function D(a,b){var c=z.default.hasInitialization(a),d=z.default.hasSegments(a),e=ca?ca.getType():null,f=ca?ca.getStreamInfo().manifestInfo.isDynamic:null,g=void 0;if(a.segmentDuration||a.segments||B(a),a.segmentAvailabilityRange=S.calcSegmentAvailabilityRange(a,f),a.segmentAvailabilityRange.end<a.segmentAvailabilityRange.start&&!a.useCalculatedLiveEdgeTime)return g=new m.default(H,"no segments are available yet",{availabilityDelay:a.segmentAvailabilityRange.start-a.segmentAvailabilityRange.end}),void P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:a,error:g});b||($=-1),a.segmentDuration&&B(a),c||R.loadInitialization(a),d||R.loadSegments(a,e,a.indexRange),c&&d&&P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:a})}function F(a,b,c){var d=b.segments,e=d?d.length:null,f=-1,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0;if(d&&e>0)for(c=void 0===c||null===c?V.getSegmentOverlapToleranceTime():c,k=0;k<e;k++)if(h=d[k],i=h.presentationStartTime,j=h.duration,g=void 0===c||null===c?j/2:c,a+g>=i&&a-g<i+j){f=h.availabilityIdx;break}return f}function I(a){if(null===a||void 0===a)return null;var b=new k.default,c=a.representation,d=c.adaptation.period.mpd.manifest.Period_asArray[c.adaptation.period.index].AdaptationSet_asArray[c.adaptation.index].Representation_asArray[c.index].bandwidth,e=a.media,f=ca?ca.getType():null;return e=(0,A.replaceTokenForTemplate)(e,"Number",a.replacementNumber),e=(0,A.replaceTokenForTemplate)(e,"Time",a.replacementTime),e=(0,A.replaceTokenForTemplate)(e,"Bandwidth",d),e=(0,A.replaceIDForTemplate)(e,c.id),e=(0,A.unescapeDollarsInTemplate)(e),b.mediaType=f,b.type=n.HTTPRequest.MEDIA_SEGMENT_TYPE,b.range=a.mediaRange,b.startTime=a.presentationStartTime,b.duration=a.duration,b.timescale=c.timescale,b.availabilityStartTime=a.availabilityStartTime,b.availabilityEndTime=a.availabilityEndTime,b.wallStartTime=a.wallStartTime,b.quality=c.index,b.index=a.availabilityIdx,b.mediaInfo=ca.getMediaInfo(),b.adaptationIndex=c.adaptation.index,b.representationId=c.id,q(b,e,c)?b:void 0}function J(a,b,c){var d=void 0,e=void 0,f=void 0,g=ca?ca.getType():null,h=ca?ca.getStreamInfo().manifestInfo.isDynamic:null,j=$,l=!!c&&c.keepIdx,m=c?c.timeThreshold:null,n=!(!c||!c.ignoreIsFinished);return a?(_!==b&&(_=b,Z.debug("Getting the request for "+g+" time : "+b)),w(a),$=F(b,a,m),$<0&&(w(a),$=F(b,a,m)),$>0&&Z.debug("Index for "+g+" time "+b+" is "+$),f=!n&&u(a),f?(d=new k.default,d.action=k.default.ACTION_COMPLETE,d.index=$,d.mediaType=g,d.mediaInfo=ca.getMediaInfo(),Z.debug("Signal complete in getSegmentRequestForTime -",g)):(e=(0,A.getSegmentByIndex)($,a),d=I(e)),l&&j>=0&&($=a.segmentInfoType===i.default.SEGMENT_TIMELINE&&h?$:j),d):null}function K(a,b){var c=(a.segmentAvailabilityRange.end-a.segmentAvailabilityRange.start)/2;return a.segments=null,a.segmentAvailabilityRange={start:b-c,end:b+c},J(a,b,{keepIdx:!1,ignoreIsFinished:!0})}function L(a){var b=void 0,c=void 0,d=void 0,e=ca?ca.getType():null,f=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;return a&&-1!==$?(_=null,$++,Z.debug("Getting the next request at index: "+$+", type: "+e),!(0,A.getSegmentByIndex)($,a)&&f?(Z.debug("No segment found at index: "+$+". Wait for next loop"),w(a),$--,null):(d=u(a),d?(b=new k.default,b.action=k.default.ACTION_COMPLETE,b.index=$,b.mediaType=e,b.mediaInfo=ca.getMediaInfo(),Z.debug("Signal complete -",e)):(w(a),c=(0,A.getSegmentByIndex)($,a),b=I(c),!c&&f&&$--),b)):null}function M(a){var b=a.representation;b.segments&&P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:b})}function N(a){var b=ca?ca.getType():null,c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(!a.error&&b===a.mediaType){var d=a.segments,e=a.representation,f=[],g=0,h=void 0,i=void 0,j=void 0,k=void 0;for(h=0,i=d.length;h<i;h++)j=d[h],k=(0,A.getTimeBasedSegment)(S,c,e,j.startTime,j.duration,j.timescale,j.media,j.mediaRange,g),f.push(k),k=null,g++;e.segmentAvailabilityRange={start:f[0].presentationStartTime,end:f[i-1].presentationStartTime},e.availableSegmentsNumber=i,y(e,f),z.default.hasInitialization(e)&&P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:e})}}a=a||{};var O=this.context,P=(0,r.default)(O).getInstance(),Q=(0,x.default)(O).getInstance(),R=void 0,S=a.timelineConverter,T=a.dashMetrics,U=a.metricsModel,V=a.mediaPlayerModel,W=a.errHandler,X=a.baseURLController,Y=void 0,Z=void 0,$=void 0,_=void 0,aa=void 0,ba=void 0,ca=void 0,da=void 0;return Y={initialize:d,getStreamProcessor:e,getInitRequest:t,getSegmentRequestForTime:J,getNextSegmentRequest:L,generateSegmentRequestForTime:K,updateRepresentation:D,updateSegmentList:B,setCurrentTime:f,getCurrentTime:h,getEarliestTime:j,reset:o},b(),Y}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(57),i=d(h),j=a(165),k=d(j),l=a(163),m=d(l),n=a(183),o=a(50),p=d(o),q=a(46),r=d(q),s=a(47),t=d(s),u=a(45),v=d(u),w=a(158),x=d(w),y=a(85),z=d(y),A=a(75),B=a(74),C=d(B),D=a(55),E=d(D),F=a(56),G=d(F),H=1;e.__dashjs_factory_name="DashHandler";var I=t.default.getClassFactory(e);I.SEGMENTS_UNAVAILABLE_ERROR_CODE=H,t.default.updateClassFactory(e.__dashjs_factory_name,I),c.default=I,b.exports=c.default},{158:158,163:163,165:165,183:183,45:45,46:46,47:47,50:50,55:55,56:56,57:57,74:74,75:75,85:85,98:98}],54:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b){var c=void 0;return c=w(A.getValue().Period_asArray[b],a),null===c?null:c.bandwidth}function c(a,b){return v(A.getValue().Period_asArray[b],a)}function d(a,b){var c=A.getValue();return c?y(c.Period_asArray[b],a):-1}function e(a){return n(a,j.default.TRACK_SWITCH)}function g(a){return n(a,j.default.BUFFER_LEVEL)}function h(a){var b=g(a);return b?l.default.round10(b.level/1e3,-3):0}function i(a){return a?a.RequestsQueue:null}function k(a){if(!a)return null;var b=a.HttpList,c=null,d=void 0,e=void 0;if(!b||b.length<=0)return null;for(d=b.length,e=d-1;e>=0;){if(b[e].responsecode){c=b[e];break}e--}return c}function m(a){return a&&a.HttpList?a.HttpList:[]}function n(a,b){if(!a)return null;var c=a[b];if(!c)return null;var d=c.length;return d<=0?null:c[d-1]}function o(a){return n(a,j.default.DROPPED_FRAMES)}function p(a){return n(a,j.default.SCHEDULING_INFO)}function q(a){return n(a,j.default.MANIFEST_UPDATE)}function r(a){return n(a,j.default.DVR_INFO)}function s(a,b){var c={},d=void 0,e=void 0,g=void 0;for(d=m(a),g=d.length-1;g>=0;g--)if(e=d[g],e.type===f.HTTPRequest.MPD_TYPE){c=u(e._responseHeaders);break}return void 0===c[b]?null:c[b]}function t(a,b){var c={},d=k(a);return d&&(c=u(d._responseHeaders)),void 0===c[b]?null:c[b]}function u(a){var b={};if(!a)return b;for(var c=a.trim().split("\r\n"),d=0,e=c.length;d<e;d++){var f=c[d],g=f.indexOf(": ");g>0&&(b[f.substring(0,g)]=f.substring(g+2))}return b}function v(a,b){var c=w(a,b,!0);return null!==c?c:-1}function w(a,b,c){var d=void 0,e=void 0,f=void 0,g=void 0,h=void 0,i=void 0;if(a)for(e=a.AdaptationSet_asArray,h=0;h<e.length;h+=1)for(d=e[h],g=d.Representation_asArray,i=0;i<g.length;i+=1)if(f=g[i],b===f.id)return c?i:f;return null}function x(a,b){return z.getIsTypeOf(a,b)}function y(a,b){var c=void 0,d=void 0,e=void 0,f=void 0;if(!a||!b)return-1;for(d=a.AdaptationSet_asArray,f=0;f<d.length;f+=1)if(c=d[f],e=c.Representation_asArray,x(c,b))return e.length;return-1}a=a||{};var z=a.dashManifestModel,A=a.manifestModel;return{getBandwidthForRepresentation:b,getIndexForRepresentation:c,getMaxIndexForBufferType:d,getCurrentRepresentationSwitch:e,getLatestBufferLevelVO:g,getCurrentBufferLevel:h,getCurrentHttpRequest:k,getHttpRequests:m,getCurrentDroppedFrames:o,getCurrentSchedulingInfo:p,getCurrentDVRInfo:r,getCurrentManifestUpdate:q,getLatestFragmentRequestHeaderValueByID:t,getLatestMPDRequestHeaderValueByID:s,getRequestsQueue:i}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(183),g=a(47),h=d(g),i=a(99),j=d(i),k=a(73),l=d(k);e.__dashjs_factory_name="DashMetrics",c.default=h.default.getSingletonFactory(e),b.exports=c.default},{183:183,47:47,73:73,99:99}],55:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){w=(0,u.default)(r).getInstance().getLogger(t)}function b(){A=(0,q.default)(r).getInstance(),B=(0,g.default)(r).getInstance(),E=(0,z.default)(r).create({errHandler:y,metricsModel:C,mediaPlayerModel:D,requestModifier:B})}function c(a){a.baseURLController&&(F=a.baseURLController),a.metricsModel&&(C=a.metricsModel),a.mediaPlayerModel&&(D=a.mediaPlayerModel),a.errHandler&&(y=a.errHandler)}function d(){if(!F||!F.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function e(a,b){d();var c=null,f=null,g=F.resolve(a.path),h=b||{init:!0,url:g?g.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500};w.debug("Start searching for initialization.");var i=n(h),j=function(b){h.bytesLoaded=h.range.end,f=A.parse(b),c=l(f),c?(a.range=c,s.trigger(m.default.INITIALIZATION_LOADED,{representation:a})):(h.range.end=h.bytesLoaded+h.bytesToLoad,e(a,h))},k=function(){s.trigger(m.default.INITIALIZATION_LOADED,{representation:a})};E.load({request:i,success:j,error:k}),w.debug("Perform init search: "+h.url)}function f(a,b,c,e,g){if(d(),c&&(void 0===c.start||void 0===c.end)){var h=c?c.toString().split("-"):null;c=h?{start:parseFloat(h[0]),end:parseFloat(h[1])}:null}g=g||p;var i=null,k=null,l=!!c,m=F.resolve(a.path),o={init:!1,url:m?m.url:void 0,range:l?c:{start:0,end:1500},searching:!l,bytesLoaded:e?e.bytesLoaded:0,bytesToLoad:1500},q=n(o),r=function(c){var d=o.bytesToLoad,e=c.byteLength;if(o.bytesLoaded=o.range.end-o.range.start,i=A.parse(c),(k=i.getBox("sidx"))&&k.isComplete){var h=k.references,l=void 0,m=void 0;null!==h&&void 0!==h&&h.length>0&&(l=1===h[0].reference_type),l?function(){w.debug("Initiate multiple SIDX load."),o.range.end=o.range.start+k.size;var c=void 0,d=void 0,e=void 0,i=void 0,j=void 0,l=[],m=0,n=(k.offset||o.range.start)+k.size,p=function(c){c?(l=l.concat(c),++m>=d&&g(l,a,b)):g(null,a,b)};for(c=0,d=h.length;c<d;c++)e=n,i=n+h[c].referenced_size-1,n+=h[c].referenced_size,j={start:e,end:i},f(a,null,j,o,p)}():(w.debug("Parsing segments from SIDX."),m=j(k,o),g(m,a,b))}else{if(k)o.range.start=k.offset||o.range.start,o.range.end=o.range.start+(k.size||d);else{if(e<o.bytesLoaded)return void g(null,a,b);var n=i.getLastBox();n&&n.size?(o.range.start=n.offset+n.size,o.range.end=o.range.start+d):o.range.end+=d}f(a,b,o.range,o,g)}},s=function(){g(null,a,b)};E.load({request:q,success:r,error:s}),w.debug("Perform SIDX load: "+o.url)}function h(){E.abort(),E=null,y=null,A=null,B=null}function j(a,b){for(var c=a.references,d=c.length,e=a.timescale,f=a.earliest_presentation_time,g=b.range.start+a.offset+a.first_offset+a.size,h=[],j=void 0,k=void 0,l=void 0,m=void 0,n=0;n<d;n++)l=c[n].subsegment_duration,m=c[n].referenced_size,j=new i.default,j.duration=l,j.startTime=f,j.timescale=e,k=g+m-1,j.mediaRange=g+"-"+k,h.push(j),f+=l,g+=m;return h}function l(a){var b=a.getBox("ftyp"),c=a.getBox("moov"),d=null,e=void 0,f=void 0;return w.debug("Searching for initialization."),c&&c.isComplete&&(e=b?b.offset:c.offset,
|
19 |
+
f=c.offset+c.size-1,d=e+"-"+f,w.debug("Found the initialization. Range: "+d)),d}function n(a){if(a.url){var b=new x.default;return b.type=a.init?v.HTTPRequest.INIT_SEGMENT_TYPE:v.HTTPRequest.MEDIA_SEGMENT_TYPE,b.url=a.url,b.range=a.range.start+"-"+a.range.end,b}}function p(a,b,c){a?s.trigger(m.default.SEGMENTS_LOADED,{segments:a,representation:b,mediaType:c}):s.trigger(m.default.SEGMENTS_LOADED,{segments:null,representation:b,mediaType:c,error:new k.default(null,"error loading segments",null)})}var r=this.context,s=(0,o.default)(r).getInstance(),t=void 0,w=void 0,y=void 0,A=void 0,B=void 0,C=void 0,D=void 0,E=void 0,F=void 0;return t={setConfig:c,initialize:b,loadInitialization:e,loadSegments:f,reset:h},a(),t}Object.defineProperty(c,"__esModule",{value:!0});var f=a(156),g=d(f),h=a(86),i=d(h),j=a(163),k=d(j),l=a(50),m=d(l),n=a(46),o=d(n),p=a(146),q=d(p),r=a(47),s=d(r),t=a(45),u=d(t),v=a(183),w=a(165),x=d(w),y=a(121),z=d(y);e.__dashjs_factory_name="SegmentBaseLoader",c.default=s.default.getSingletonFactory(e),b.exports=c.default},{121:121,146:146,156:156,163:163,165:165,183:183,45:45,46:46,47:47,50:50,86:86}],56:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){y=(0,o.default)(r).getInstance().getLogger(w),z={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}}}function b(){B=(0,q.default)(r).getInstance(),E=(0,x.default)(r).create({errHandler:A,metricsModel:C,mediaPlayerModel:D,requestModifier:B})}function c(a){if(!(a.baseURLController&&a.metricsModel&&a.mediaPlayerModel&&a.errHandler))throw new Error("Missing config parameter(s)");F=a.baseURLController,C=a.metricsModel,D=a.mediaPlayerModel,A=a.errHandler}function d(a){var b=[],c=void 0,d=void 0,e=(0,k.default)(r).create({data:a});for(e.consumeTagAndSize(z.Segment.Cues);e.moreData()&&e.consumeTagAndSize(z.Segment.Cues.CuePoint,!0);){for(c={},c.CueTime=e.parseTag(z.Segment.Cues.CuePoint.CueTime),c.CueTracks=[];e.moreData()&&e.consumeTag(z.Segment.Cues.CuePoint.CueTrackPositions,!0);){var f=e.getMatroskaCodedNum(),g=e.getPos();if(d={},d.Track=e.parseTag(z.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===d.Track)throw new Error("Cue track cannot be 0");d.ClusterPosition=e.parseTag(z.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),c.CueTracks.push(d),e.setPos(g+f)}if(0===c.CueTracks.length)throw new Error("Mandatory cuetrack not found");b.push(c)}if(0===b.length)throw new Error("mandatory cuepoint not found");return b}function e(a,b,c,e){var f=void 0,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0,l=void 0,m=void 0;for(g=d(a),h=[],j=0,k=g.length;j<k;j+=1)i=new s.default,f=0,f=j<g.length-1?g[j+1].CueTime-g[j].CueTime:e-g[j].CueTime,i.duration=f,i.startTime=g[j].CueTime,i.timescale=1e3,l=g[j].CueTracks[0].ClusterPosition+b,m=j<g.length-1?g[j+1].CueTracks[0].ClusterPosition+b-1:c-1,i.mediaRange=l+"-"+m,h.push(i);return y.debug("Parsed cues: "+h.length+" cues."),h}function f(a,b,c,d){var f=(0,k.default)(r).create({data:a}),g=void 0,h=void 0,i=c.split("-"),j=null,l={url:b,range:{start:parseFloat(i[0]),end:parseFloat(i[1])},request:j},m=void 0,o=void 0;for(y.debug("Parse EBML header: "+l.url),f.skipOverElement(z.EBML),f.consumeTag(z.Segment),m=f.getMatroskaCodedNum(),m+=f.getPos(),o=f.getPos();f.moreData()&&!f.consumeTagAndSize(z.Segment.Info,!0);)if(!(f.skipOverElement(z.Segment.SeekHead,!0)||f.skipOverElement(z.Segment.Tracks,!0)||f.skipOverElement(z.Segment.Cues,!0)||f.skipOverElement(z.Void,!0)))throw new Error("no valid top level element found");for(;void 0===g;){var p=f.getMatroskaCodedNum(!0),q=f.getMatroskaCodedNum();switch(p){case z.Segment.Info.Duration.tag:g=f[z.Segment.Info.Duration.parse](q);break;default:f.setPos(f.getPos()+q)}}j=n(l);var s=function(a){h=e(a,o,m,g),d(h)},t=function(){y.error("Download Error: Cues "+l.url),d(null)};E.load({request:j,success:s,error:t}),y.debug("Perform cues load: "+l.url+" bytes="+l.range.start+"-"+l.range.end)}function h(){if(!F||!F.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function j(a,b){h();var c=null,d=F.resolve(a.path),e=d?d.url:void 0,f=a.range.split("-"),i=b||{range:{start:parseFloat(f[0]),end:parseFloat(f[1])},request:c,url:e,init:!0};y.info("Start loading initialization."),c=n(i);var j=function(){u.trigger(g.default.INITIALIZATION_LOADED,{representation:a})},k=function(){u.trigger(g.default.INITIALIZATION_LOADED,{representation:a})};E.load({request:c,success:j,error:k}),y.debug("Perform init load: "+i.url)}function l(a,b,c,d){h();var e=null,g=F.resolve(a.path),i=g?g.url:void 0,j=8192,k={bytesLoaded:0,bytesToLoad:j,range:{start:0,end:j},request:e,url:i,init:!1};d=d||m,e=n(k),y.debug("Parsing ebml header");var l=function(e){f(e,i,c,function(c){d(c,a,b)})},o=function(){d(null,a,b)};E.load({request:e,success:l,error:o})}function m(a,b,c){a?u.trigger(g.default.SEGMENTS_LOADED,{segments:a,representation:b,mediaType:c}):u.trigger(g.default.SEGMENTS_LOADED,{segments:null,representation:b,mediaType:c,error:new Error(null,"error loading segments",null)})}function n(a){var b=new v.default;return b.type=a.init?t.HTTPRequest.INIT_SEGMENT_TYPE:t.HTTPRequest.MEDIA_SEGMENT_TYPE,b.url=a.url,b.range=a.range.start+"-"+a.range.end,b}function p(){A=null,B=null}var r=this.context,u=(0,i.default)(r).getInstance(),w=void 0,y=void 0,z=void 0,A=void 0,B=void 0,C=void 0,D=void 0,E=void 0,F=void 0;return w={setConfig:c,initialize:b,loadInitialization:j,loadSegments:l,reset:p},a(),w}Object.defineProperty(c,"__esModule",{value:!0});var f=a(50),g=d(f),h=a(46),i=d(h),j=a(150),k=d(j),l=a(47),m=d(l),n=a(45),o=d(n),p=a(156),q=d(p),r=a(86),s=d(r),t=a(183),u=a(165),v=d(u),w=a(121),x=d(w);e.__dashjs_factory_name="WebmSegmentBaseLoader",c.default=m.default.getSingletonFactory(e),b.exports=c.default},{121:121,150:150,156:156,165:165,183:183,45:45,46:46,47:47,50:50,86:86}],57:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this.init()}return e(a,[{key:"init",value:function(){this.BASE_URL="BaseURL",this.SEGMENT_BASE="SegmentBase",this.SEGMENT_TEMPLATE="SegmentTemplate",this.SEGMENT_LIST="SegmentList",this.SEGMENT_URL="SegmentURL",this.SEGMENT_TIMELINE="SegmentTimeline",this.SEGMENT_PROFILES="segmentProfiles",this.ADAPTATION_SET="AdaptationSet",this.REPRESENTATION="Representation",this.REPRESENTATION_INDEX="RepresentationIndex",this.SUB_REPRESENTATION="SubRepresentation",this.INITIALIZATION="Initialization",this.INITIALIZATION_MINUS="initialization",this.MPD="MPD",this.PERIOD="Period",this.ASSET_IDENTIFIER="AssetIdentifier",this.EVENT_STREAM="EventStream",this.ID="id",this.PROFILES="profiles",this.SERVICE_LOCATION="serviceLocation",this.RANGE="range",this.INDEX="index",this.MEDIA="media",this.BYTE_RANGE="byteRange",this.INDEX_RANGE="indexRange",this.MEDIA_RANGE="mediaRange",this.VALUE="value",this.CONTENT_TYPE="contentType",this.MIME_TYPE="mimeType",this.BITSTREAM_SWITCHING="BitstreamSwitching",this.BITSTREAM_SWITCHING_MINUS="bitstreamSwitching",this.CODECS="codecs",this.DEPENDENCY_ID="dependencyId",this.MEDIA_STREAM_STRUCTURE_ID="mediaStreamStructureId",this.METRICS="Metrics",this.METRICS_MINUS="metrics",this.REPORTING="Reporting",this.WIDTH="width",this.HEIGHT="height",this.SAR="sar",this.FRAMERATE="frameRate",this.AUDIO_SAMPLING_RATE="audioSamplingRate",this.MAXIMUM_SAP_PERIOD="maximumSAPPeriod",this.START_WITH_SAP="startWithSAP",this.MAX_PLAYOUT_RATE="maxPlayoutRate",this.CODING_DEPENDENCY="codingDependency",this.SCAN_TYPE="scanType",this.FRAME_PACKING="FramePacking",this.AUDIO_CHANNEL_CONFIGURATION="AudioChannelConfiguration",this.CONTENT_PROTECTION="ContentProtection",this.ESSENTIAL_PROPERTY="EssentialProperty",this.SUPPLEMENTAL_PROPERTY="SupplementalProperty",this.INBAND_EVENT_STREAM="InbandEventStream",this.ACCESSIBILITY="Accessibility",this.ROLE="Role",this.RATING="Rating",this.CONTENT_COMPONENT="ContentComponent",this.SUBSET="Subset",this.LANG="lang",this.VIEWPOINT="Viewpoint",this.ROLE_ASARRAY="Role_asArray",this.ACCESSIBILITY_ASARRAY="Accessibility_asArray",this.AUDIOCHANNELCONFIGURATION_ASARRAY="AudioChannelConfiguration_asArray",this.CONTENTPROTECTION_ASARRAY="ContentProtection_asArray",this.MAIN="main",this.DYNAMIC="dynamic",this.MEDIA_PRESENTATION_DURATION="mediaPresentationDuration",this.MINIMUM_UPDATE_PERIOD="minimumUpdatePeriod",this.CODEC_PRIVATE_DATA="codecPrivateData",this.BANDWITH="bandwidth",this.SOURCE_URL="sourceURL",this.TIMESCALE="timescale",this.DURATION="duration",this.START_NUMBER="startNumber",this.PRESENTATION_TIME_OFFSET="presentationTimeOffset",this.AVAILABILITY_START_TIME="availabilityStartTime",this.AVAILABILITY_END_TIME="availabilityEndTime",this.TIMESHIFT_BUFFER_DEPTH="timeShiftBufferDepth",this.MAX_SEGMENT_DURATION="maxSegmentDuration",this.PRESENTATION_TIME="presentationTime",this.MIN_BUFFER_TIME="minBufferTime",this.MAX_SUBSEGMENT_DURATION="maxSubsegmentDuration",this.START="start",this.AVAILABILITY_TIME_OFFSET="availabilityTimeOffset",this.AVAILABILITY_TIME_COMPLETE="availabilityTimeComplete",this.CENC_DEFAULT_KID="cenc:default_KID",this.DVB_PRIORITY="dvb:priority",this.DVB_WEIGHT="dvb:weight"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],58:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){l(),H.on(o.default.QUALITY_CHANGE_REQUESTED,D,I),H.on(o.default.REPRESENTATION_UPDATED,A,I),H.on(o.default.WALLCLOCK_TIME_UPDATED,B,I),H.on(o.default.BUFFER_LEVEL_UPDATED,C,I),H.on(o.default.MANIFEST_VALIDITY_CHANGED,E,I)}function b(a){a.abrController&&(O=a.abrController),a.domStorage&&(S=a.domStorage),a.metricsModel&&(R=a.metricsModel),a.dashMetrics&&(V=a.dashMetrics),a.dashManifestModel&&(U=a.dashManifestModel),a.playbackController&&(Q=a.playbackController),a.timelineConverter&&(T=a.timelineConverter),a.manifestModel&&(X=a.manifestModel),a.streamProcessor&&(W=a.streamProcessor)}function c(){P=W.getIndexHandler()}function d(){return W}function e(){return J}function f(){return K}function h(){return L}function j(){return N}function l(){J=null,K=-1,L=!0,M=[],O=null,Q=null,R=null,S=null,T=null,U=null,V=null}function n(){H.off(o.default.QUALITY_CHANGE_REQUESTED,D,I),H.off(o.default.REPRESENTATION_UPDATED,A,I),H.off(o.default.WALLCLOCK_TIME_UPDATED,B,I),H.off(o.default.BUFFER_LEVEL_UPDATED,C,I),H.off(o.default.MANIFEST_VALIDITY_CHANGED,E,I),l()}function p(a,b,c){var d=W.getStreamInfo(),e=O.getTopQualityIndexFor(c,d.id),f=O.getMinAllowedIndexFor(c),h=void 0,i=void 0,j=null;if(L=!0,H.trigger(o.default.DATA_UPDATE_STARTED,{sender:this}),M=w(b),null!==J&&J.id==a.id||c===g.default.FRAGMENTED_TEXT?h=O.getQualityFor(c,d):(i=O.getThroughputHistory().getAverageThroughput(c),j=i||O.getInitialBitrateFor(c,d),h=O.getQualityForBitrate(W.getMediaInfo(),j)),void 0!==f&&h<f&&(h=f),h>e&&(h=e),N=t(h),J=a,c!==g.default.VIDEO&&c!==g.default.AUDIO&&c!==g.default.FRAGMENTED_TEXT)return L=!1,void H.trigger(o.default.DATA_UPDATE_COMPLETED,{sender:this,data:J,currentRepresentation:N});for(var k=0;k<M.length;k++)P.updateRepresentation(M[k],!0)}function q(){var a=new Date,b=j(),c=1e3*Q.getTime();R.addRepresentationSwitch(b.adaptation.type,a,c,b.id)}function r(){var a=W.getStreamInfo(),b=a?a.manifestInfo:null,c=b?b.isDynamic:null,d=T.calcSegmentAvailabilityRange(N,c);R.addDVRInfo(W.getType(),Q.getTime(),b,d)}function t(a){return M[a]}function u(a){return M.indexOf(a)}function v(){for(var a=0,b=M.length;a<b;a++){var c=M[a].segmentInfoType;if(null===M[a].segmentAvailabilityRange||!s.default.hasInitialization(M[a])||(c===i.default.SEGMENT_BASE||c===i.default.BASE_URL)&&!M[a].segments)return!1}return!0}function w(a){return K=U.getIndexForAdaptation(J,a.period.mpd.manifest,a.period.index),U.getRepresentationsForAdaptation(a)}function x(a){for(var b=void 0,c=0,d=M.length;c<d;c++)b=M[c],b.segmentAvailabilityRange=T.calcSegmentAvailabilityRange(b,a)}function y(){M.forEach(function(a){a.segmentAvailabilityRange=null})}function z(a){var b=a,c=function(){if(!h()){L=!0,H.trigger(o.default.DATA_UPDATE_STARTED,{sender:I}),y();for(var a=0;a<M.length;a++)P.updateRepresentation(M[a],!0)}};L=!1,H.trigger(o.default.AST_IN_FUTURE,{delay:b}),setTimeout(c,b)}function A(a){if(a.sender.getStreamProcessor()===W&&h()){var b=a.representation,c=R.getMetricsFor(g.default.STREAM),d=R.getMetricsFor(j().adaptation.type),e=V.getCurrentManifestUpdate(c),f=!1,l=0,m=void 0,n=void 0,p=void 0;if(b.adaptation.period.mpd.manifest.type===i.default.DYNAMIC&&!b.adaptation.period.mpd.manifest.ignorePostponeTimePeriod){var s=b.segmentAvailabilityRange.end-b.segmentAvailabilityRange.start;l=1e3*(Q.computeLiveDelay(N.segmentDuration,W.getStreamInfo().manifestInfo.DVRWindowSize)-s)}if(l>0)return r(),z(l),n=new k.default(F,"Segments update failed",null),void H.trigger(o.default.DATA_UPDATE_COMPLETED,{sender:this,data:J,currentRepresentation:N,error:n});if(e){for(var t=0;t<e.representationInfo.length;t++)if(m=e.representationInfo[t],m.index===b.index&&m.mediaType===W.getType()){f=!0;break}f||R.addManifestUpdateRepresentationInfo(e,b.id,b.index,b.adaptation.period.index,W.getType(),b.presentationTimeOffset,b.startNumber,b.segmentInfoType)}v()&&(L=!1,O.setPlaybackQuality(W.getType(),W.getStreamInfo(),u(N)),R.updateManifestUpdateInfo(e,{latency:N.segmentAvailabilityRange.end-Q.getTime()}),p=V.getCurrentRepresentationSwitch(d),p||q(),H.trigger(o.default.DATA_UPDATE_COMPLETED,{sender:this,data:J,currentRepresentation:N}))}}function B(a){a.isDynamic&&x(a.isDynamic)}function C(a){if(a.sender.getStreamProcessor()===W){X.getValue().doNotUpdateDVRWindowOnBufferUpdated||r()}}function D(a){if(a.mediaType===W.getType()&&W.getStreamInfo().id===a.streamInfo.id&&a.oldQuality!==a.newQuality){N=t(a.newQuality);var b=O.getThroughputHistory().getAverageThroughput(a.mediaType);isNaN(b)||S.setSavedBitrateSettings(a.mediaType,b),q()}}function E(a){if(a.newDuration){var b=j();if(b&&b.adaptation.period){b.adaptation.period.duration=a.newDuration}}}var F=1,G=this.context,H=(0,m.default)(G).getInstance(),I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0,Q=void 0,R=void 0,S=void 0,T=void 0,U=void 0,V=void 0,W=void 0,X=void 0;return I={initialize:c,setConfig:b,getData:e,getDataIndex:f,isUpdating:h,updateData:p,getStreamProcessor:d,getCurrentRepresentation:j,getRepresentationForQuality:t,reset:n},a(),I}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(57),i=d(h),j=a(163),k=d(j),l=a(46),m=d(l),n=a(50),o=d(n),p=a(47),q=d(p),r=a(85),s=d(r);e.__dashjs_factory_name="RepresentationController",c.default=q.default.getClassFactory(e),b.exports=c.default},{163:163,46:46,47:47,50:50,57:57,85:85,98:98}],59:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){na=(0,G.default)(oa).getInstance().getLogger(ma)}function c(a,b){var c=void 0,d=void 0,e=void 0,f=void 0,h=void 0,j=void 0,k=!1,l=!1;if(!a)throw new Error("adaptation is not defined");if(!b)throw new Error("type is not defined");if(a.hasOwnProperty("ContentComponent_asArray")&&(f=a.ContentComponent_asArray),h=b!==g.default.TEXT?new RegExp(b):new RegExp("(vtt|ttml)"),a.Representation_asArray&&a.Representation_asArray.length&&a.Representation_asArray.length>0&&a.Representation_asArray[0].hasOwnProperty(i.default.CODECS)&&(j=a.Representation_asArray[0].codecs,0===j.search(g.default.STPP)||0===j.search(g.default.WVTT)))return b===g.default.FRAGMENTED_TEXT;if(f){if(f.length>1)return b===g.default.MUXED;f[0]&&f[0].contentType===b&&(k=!0,l=!0)}if(a.hasOwnProperty(i.default.MIME_TYPE)&&(k=h.test(a.mimeType),l=!0),!l)for(c=0,d=a.Representation_asArray&&a.Representation_asArray.length?a.Representation_asArray.length:0;!l&&c<d;)e=a.Representation_asArray[c],e.hasOwnProperty(i.default.MIME_TYPE)&&(k=h.test(e.mimeType),l=!0),c++;return k}function d(a){return c(a,g.default.AUDIO)}function e(a){return c(a,g.default.VIDEO)}function f(a){return c(a,g.default.FRAGMENTED_TEXT)}function h(a){return c(a,g.default.TEXT)}function j(a){return c(a,g.default.MUXED)}function l(a){return c(a,g.default.IMAGE)}function n(a){return"text/vtt"===a||"application/ttml+xml"===a}function p(a){var b="";return a&&a.hasOwnProperty(i.default.LANG)&&(b=a.lang.replace(/[^A-Za-z0-9-]/g,"")),b}function r(a){return a&&a.hasOwnProperty(i.default.VIEWPOINT)?a.Viewpoint:null}function t(a){return a&&a.hasOwnProperty(i.default.ROLE_ASARRAY)?a.Role_asArray:[]}function v(a){return a&&a.hasOwnProperty(i.default.ACCESSIBILITY_ASARRAY)?a.Accessibility_asArray:[]}function x(a){return a&&a.hasOwnProperty(i.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?a.AudioChannelConfiguration_asArray:[]}function z(a){return t(a).filter(function(a){return a.value===i.default.MAIN})[0]}function B(){return function(a,b){return a.bandwidth-b.bandwidth}}function D(a){return a&&void 0!==a.Representation_asArray&&null!==a.Representation_asArray&&a.Representation_asArray.sort(B()),a}function E(a,b,c){var d=b&&b.Period_asArray&&ua(c)&&b.Period_asArray[c]?b.Period_asArray[c].AdaptationSet_asArray:[],e=void 0,f=void 0;for(e=0,f=d.length;e<f;e++)if(d[e].hasOwnProperty(i.default.ID)&&d[e].id===a)return d[e];return null}function F(a,b,c){var d=b&&b.Period_asArray&&ua(c)&&b.Period_asArray[c]?b.Period_asArray[c].AdaptationSet_asArray:null;return d&&ua(a)?d[a]:null}function H(a,b,c){var d=b&&b.Period_asArray&&ua(c)&&b.Period_asArray[c]?b.Period_asArray[c].AdaptationSet_asArray:[],e=d.length;if(a)for(var f=0;f<e;f++){var g=(0,A.default)(oa).getInstance();if(g.areEqual(d[f],a))return f}return-1}function I(a,b,d){var e=a&&a.Period_asArray&&ua(b)&&a.Period_asArray[b]?a.Period_asArray[b].AdaptationSet_asArray:[],f=void 0,g=void 0,h=[];for(f=0,g=e.length;f<g;f++)c(e[f],d)&&h.push(D(e[f]));return h}function J(a,b,c,d){var e=I(a,b,c);if(!e||0===e.length)return null;if(e.length>1&&d){var f=qa.getCurrentTrackFor(c,d),g=sa.getAllMediaInfoForType(d,c);if(f)for(var h=0,i=e.length;h<i;h++)if(qa.isTracksEqual(f,g[h]))return e[h];for(var h=0,i=e.length;h<i;h++)if(z(e[h]))return e[h]}return e[0]}function K(a,b,c){if(a&&a.Representation_asArray&&a.Representation_asArray.length>0){var d=ua(b)&&b>=0&&b<a.Representation_asArray.length?a.Representation_asArray[b]:a.Representation_asArray[0],e=d.mimeType+';codecs="'+d.codecs+'"';return c&&void 0!==d.width&&(e+=';width="'+d.width+'";height="'+d.height+'"'),e}return null}function L(a){return a&&a.Representation_asArray&&a.Representation_asArray.length>0?a.Representation_asArray[0].mimeType:null}function M(a){return a&&a.hasOwnProperty(i.default.CENC_DEFAULT_KID)?a[i.default.CENC_DEFAULT_KID]:null}function N(a){return a&&a.hasOwnProperty(i.default.CONTENTPROTECTION_ASARRAY)&&0!==a.ContentProtection_asArray.length?a.ContentProtection_asArray:null}function O(a){var b=!1;return a&&a.hasOwnProperty("type")&&(b=a.type===i.default.DYNAMIC),b}function P(a,b){var c=!1;return a&&a.profiles&&a.profiles.length>0&&(c=-1!==a.profiles.indexOf(b)),c}function Q(a){return P(a,ta)}function R(a){return a&&a.hasOwnProperty(i.default.MEDIA_PRESENTATION_DURATION)?a.mediaPresentationDuration:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE}function S(a){return a&&a.bandwidth?a.bandwidth:NaN}function T(a){var b=arguments.length<=1||void 0===arguments[1]?0:arguments[1],c=NaN;return a&&a.hasOwnProperty(i.default.MINIMUM_UPDATE_PERIOD)&&(c=a.minimumUpdatePeriod),isNaN(c)?c:Math.max(c-b,1)}function U(a){return a&&a.Representation_asArray&&a.Representation_asArray.length?a.Representation_asArray.length:0}function V(a){return a&&a.Representation_asArray&&a.Representation_asArray.length?D(a).Representation_asArray.map(function(a){return{bandwidth:a.bandwidth,width:a.width||0,height:a.height||0,scanType:a.scanType||null}}):null}function W(a){return a&&a.EssentialProperty_asArray&&a.EssentialProperty_asArray.length?a.EssentialProperty_asArray.map(function(a){return{schemeIdUri:a.schemeIdUri,value:a.value}}):null}function X(a,b){return b&&b.Representation_asArray&&b.Representation_asArray.length>0&&ua(a)?b.Representation_asArray[a]:null}function Y(a){if(a&&a.period&&ua(a.period.index)){var b=a.period.mpd.manifest.Period_asArray[a.period.index];if(b&&b.AdaptationSet_asArray&&ua(a.index))return D(b.AdaptationSet_asArray[a.index])}}function Z(a){var b=a.S_asArray[a.S_asArray.length-1];return!b.hasOwnProperty("r")||b.r>=0}function $(a){var b=Y(a).Representation_asArray[0],c=void 0;return b.hasOwnProperty(i.default.SEGMENT_LIST)?(c=b.SegmentList,!c.hasOwnProperty(i.default.SEGMENT_TIMELINE)||Z(c.SegmentTimeline)):!(!b.hasOwnProperty(i.default.SEGMENT_TEMPLATE)||(c=b.SegmentTemplate,!c.hasOwnProperty(i.default.SEGMENT_TIMELINE)))&&Z(c.SegmentTimeline)}function _(a){var b=[],c=Y(a),d=void 0,e=void 0;if(a&&a.period&&ua(a.period.index)){var f=ka(a.period.mpd.manifest);f&&(e=f[0])}if(c&&c.Representation_asArray)for(var g=0,h=c.Representation_asArray.length;g<h;++g){var j=c.Representation_asArray[g],l=new k.default;if(l.index=g,l.adaptation=a,j.hasOwnProperty(i.default.ID)&&(l.id=j.id),j.hasOwnProperty(i.default.CODECS)&&(l.codecs=j.codecs),j.hasOwnProperty(i.default.CODEC_PRIVATE_DATA)&&(l.codecPrivateData=j.codecPrivateData),j.hasOwnProperty(i.default.BANDWITH)&&(l.bandwidth=j.bandwidth),j.hasOwnProperty(i.default.WIDTH)&&(l.width=j.width),j.hasOwnProperty(i.default.HEIGHT)&&(l.height=j.height),j.hasOwnProperty(i.default.SCAN_TYPE)&&(l.scanType=j.scanType),j.hasOwnProperty(i.default.MAX_PLAYOUT_RATE)&&(l.maxPlayoutRate=j.maxPlayoutRate),j.hasOwnProperty(i.default.SEGMENT_BASE)?(d=j.SegmentBase,l.segmentInfoType=i.default.SEGMENT_BASE):j.hasOwnProperty(i.default.SEGMENT_LIST)?(d=j.SegmentList,d.hasOwnProperty(i.default.SEGMENT_TIMELINE)?(l.segmentInfoType=i.default.SEGMENT_TIMELINE,l.useCalculatedLiveEdgeTime=Z(d.SegmentTimeline)):(l.segmentInfoType=i.default.SEGMENT_LIST,l.useCalculatedLiveEdgeTime=!0)):j.hasOwnProperty(i.default.SEGMENT_TEMPLATE)?(d=j.SegmentTemplate,d.hasOwnProperty(i.default.SEGMENT_TIMELINE)?(l.segmentInfoType=i.default.SEGMENT_TIMELINE,l.useCalculatedLiveEdgeTime=Z(d.SegmentTimeline)):l.segmentInfoType=i.default.SEGMENT_TEMPLATE,d.hasOwnProperty(i.default.INITIALIZATION_MINUS)&&(l.initialization=d.initialization.split("$Bandwidth$").join(j.bandwidth).split("$RepresentationID$").join(j.id))):l.segmentInfoType=i.default.BASE_URL,l.essentialProperties=W(j),d){if(d.hasOwnProperty(i.default.INITIALIZATION)){var m=d.Initialization;m.hasOwnProperty(i.default.SOURCE_URL)?l.initialization=m.sourceURL:m.hasOwnProperty(i.default.RANGE)&&(l.range=m.range)}else j.hasOwnProperty(i.default.MIME_TYPE)&&n(j.mimeType)&&(l.range=0);d.hasOwnProperty(i.default.TIMESCALE)&&(l.timescale=d.timescale),d.hasOwnProperty(i.default.DURATION)&&(l.segmentDuration=d.duration/l.timescale),d.hasOwnProperty(i.default.MEDIA)&&(l.media=d.media),d.hasOwnProperty(i.default.START_NUMBER)&&(l.startNumber=d.startNumber),d.hasOwnProperty(i.default.INDEX_RANGE)&&(l.indexRange=d.indexRange),d.hasOwnProperty(i.default.PRESENTATION_TIME_OFFSET)&&(l.presentationTimeOffset=d.presentationTimeOffset/l.timescale),d.hasOwnProperty(i.default.AVAILABILITY_TIME_OFFSET)?l.availabilityTimeOffset=d.availabilityTimeOffset:e&&void 0!==e.availabilityTimeOffset&&(l.availabilityTimeOffset=e.availabilityTimeOffset),d.hasOwnProperty(i.default.AVAILABILITY_TIME_COMPLETE)?l.availabilityTimeComplete="false"!==d.availabilityTimeComplete:e&&void 0!==e.availabilityTimeComplete&&(l.availabilityTimeComplete=e.availabilityTimeComplete)}l.MSETimeOffset=ra.calcMSETimeOffset(l),l.path=[a.period.index,a.index,g],b.push(l)}return b}function aa(a){var b=a&&ua(a.index)?a.mpd.manifest.Period_asArray[a.index]:null,c=[],h=void 0,k=void 0,n=void 0;if(b&&b.AdaptationSet_asArray)for(n=0;n<b.AdaptationSet_asArray.length;n++)k=b.AdaptationSet_asArray[n],h=new m.default,k.hasOwnProperty(i.default.ID)&&(h.id=k.id),h.index=n,h.period=a,j(k)?h.type=g.default.MUXED:d(k)?h.type=g.default.AUDIO:e(k)?h.type=g.default.VIDEO:f(k)?h.type=g.default.FRAGMENTED_TEXT:l(k)?h.type=g.default.IMAGE:h.type=g.default.TEXT,c.push(h);return c}function ba(a){var b=!!a&&O(a.manifest),c=[],d=null,e=null,f=null,g=null,h=void 0,j=void 0;for(j=0,h=a&&a.manifest&&a.manifest.Period_asArray?a.manifest.Period_asArray.length:0;j<h;j++)e=a.manifest.Period_asArray[j],e.hasOwnProperty(i.default.START)?(g=new o.default,g.start=e.start):null!==d&&d.hasOwnProperty(i.default.DURATION)&&null!==f?(g=new o.default,g.start=parseFloat((f.start+f.duration).toFixed(5))):0!==j||b||(g=new o.default,g.start=0),null!==f&&isNaN(f.duration)&&(null!==g?f.duration=parseFloat((g.start-f.start).toFixed(5)):na.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),null!==g&&(g.id=ca(e,j),g.index=j,g.mpd=a,e.hasOwnProperty(i.default.DURATION)&&(g.duration=e.duration),c.push(g),d=e,f=g),e=null,g=null;return 0===c.length?c:(null!==f&&isNaN(f.duration)&&(f.duration=parseFloat((ea(f)-f.start).toFixed(5))),c)}function ca(a,b){if(!a)throw new Error("Period cannot be null or undefined");var c=o.default.DEFAULT_ID+"_"+b;return a.hasOwnProperty(i.default.ID)&&a.id.length>0&&"__proto__"!==a.id&&(c=a.id),c}function da(a){var b=new q.default;return a&&(b.manifest=a,a.hasOwnProperty(i.default.AVAILABILITY_START_TIME)?b.availabilityStartTime=new Date(a.availabilityStartTime.getTime()):b.availabilityStartTime=new Date(a.loadedTime.getTime()),a.hasOwnProperty(i.default.AVAILABILITY_END_TIME)&&(b.availabilityEndTime=new Date(a.availabilityEndTime.getTime())),a.hasOwnProperty(i.default.MINIMUM_UPDATE_PERIOD)&&(b.minimumUpdatePeriod=a.minimumUpdatePeriod),a.hasOwnProperty(i.default.MEDIA_PRESENTATION_DURATION)&&(b.mediaPresentationDuration=a.mediaPresentationDuration),a.hasOwnProperty(g.default.SUGGESTED_PRESENTATION_DELAY)&&(b.suggestedPresentationDelay=a.suggestedPresentationDelay),a.hasOwnProperty(i.default.TIMESHIFT_BUFFER_DEPTH)&&(b.timeShiftBufferDepth=a.timeShiftBufferDepth),a.hasOwnProperty(i.default.MAX_SEGMENT_DURATION)&&(b.maxSegmentDuration=a.maxSegmentDuration)),b}function ea(a){var b=O(a.mpd.manifest),c=void 0;if(a.mpd.manifest.mediaPresentationDuration)c=a.mpd.manifest.mediaPresentationDuration;else if(a.duration)c=a.duration;else{if(!b)throw new Error("Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.");c=Number.POSITIVE_INFINITY}return c}function fa(a){var b=a&&a.mpd&&a.mpd.manifest?a.mpd.manifest:null,c=b?b.Period_asArray:null,d=c&&a&&ua(a.index)?c[a.index].EventStream_asArray:null,e=[],f=void 0,h=void 0;if(d)for(f=0;f<d.length;f++){var j=new y.default;if(j.period=a,j.timescale=1,!d[f].hasOwnProperty(g.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(j.schemeIdUri=d[f].schemeIdUri,d[f].hasOwnProperty(i.default.TIMESCALE)&&(j.timescale=d[f].timescale),d[f].hasOwnProperty(i.default.VALUE)&&(j.value=d[f].value),h=0;h<d[f].Event_asArray.length;h++){var k=new u.default;k.presentationTime=0,k.eventStream=j,d[f].Event_asArray[h].hasOwnProperty(i.default.PRESENTATION_TIME)&&(k.presentationTime=d[f].Event_asArray[h].presentationTime),d[f].Event_asArray[h].hasOwnProperty(i.default.DURATION)&&(k.duration=d[f].Event_asArray[h].duration),d[f].Event_asArray[h].hasOwnProperty(i.default.ID)&&(k.id=d[f].Event_asArray[h].id),e.push(k)}}return e}function ga(a,b){var c=[],d=void 0;if(!a)return c;for(d=0;d<a.length;d++){var e=new y.default;if(e.timescale=1,e.representation=b,!a[d].hasOwnProperty(g.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");e.schemeIdUri=a[d].schemeIdUri,a[d].hasOwnProperty(i.default.TIMESCALE)&&(e.timescale=a[d].timescale),a[d].hasOwnProperty(i.default.VALUE)&&(e.value=a[d].value),c.push(e)}return c}function ha(a,b){var c=void 0,d=void 0,e=void 0;return a&&a.Period_asArray&&b&&b.period&&ua(b.period.index)&&(d=a.Period_asArray[b.period.index])&&d.AdaptationSet_asArray&&ua(b.index)&&(e=d.AdaptationSet_asArray[b.index])&&(c=e.InbandEventStream_asArray),ga(c,null)}function ia(a,b){var c=void 0,d=void 0,e=void 0,f=void 0;return a&&a.Period_asArray&&b&&b.adaptation&&b.adaptation.period&&ua(b.adaptation.period.index)&&(d=a.Period_asArray[b.adaptation.period.index])&&d.AdaptationSet_asArray&&ua(b.adaptation.index)&&(e=d.AdaptationSet_asArray[b.adaptation.index])&&e.Representation_asArray&&ua(b.index)&&(f=e.Representation_asArray[b.index])&&(c=f.InbandEventStream_asArray),ga(c,b)}function ja(a){var b=O(a),c=!!a&&a.hasOwnProperty(i.default.AVAILABILITY_START_TIME),d=a?a.UTCTiming_asArray:null,e=[];return(b||c)&&d&&d.forEach(function(a){var b=new s.default;a.hasOwnProperty(g.default.SCHEME_ID_URI)&&(b.schemeIdUri=a.schemeIdUri,a.hasOwnProperty(i.default.VALUE)&&(b.value=a.value.toString(),e.push(b)))}),e}function ka(a){var b=[],c=a.BaseURL_asArray||[a.baseUri],d=!1;return c.some(function(c){if(c){var e=new w.default,f=c.__text||c;return pa.isRelative(f)&&(d=!0,a.baseUri&&(f=pa.resolve(f,a.baseUri))),e.url=f,c.hasOwnProperty(i.default.SERVICE_LOCATION)&&c.serviceLocation.length?e.serviceLocation=c.serviceLocation:e.serviceLocation=f,c.hasOwnProperty(i.default.DVB_PRIORITY)&&(e.dvb_priority=c[i.default.DVB_PRIORITY]),c.hasOwnProperty(i.default.DVB_WEIGHT)&&(e.dvb_weight=c[i.default.DVB_WEIGHT]),c.hasOwnProperty(i.default.AVAILABILITY_TIME_OFFSET)&&(e.availabilityTimeOffset=c[i.default.AVAILABILITY_TIME_OFFSET]),c.hasOwnProperty(i.default.AVAILABILITY_TIME_COMPLETE)&&(e.availabilityTimeComplete="false"!==c[i.default.AVAILABILITY_TIME_COMPLETE]),b.push(e),d}}),b}function la(a){if(a&&a.hasOwnProperty(g.default.LOCATION))return a.Location=a.Location_asArray[0],a.Location}a=a||{};var ma=void 0,na=void 0,oa=this.context,pa=(0,C.default)(oa).getInstance(),qa=a.mediaController,ra=a.timelineConverter,sa=a.adapter,ta="urn:dvb:dash:profile:dvb-dash:2014",ua=Number.isInteger||function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a};return ma={getIsTypeOf:c,getIsAudio:d,getIsVideo:e,getIsText:h,getIsMuxed:j,getIsTextTrack:n,getIsFragmentedText:f,getIsImage:l,getIsMain:z,getLanguageForAdaptation:p,getViewpointForAdaptation:r,getRolesForAdaptation:t,getAccessibilityForAdaptation:v,getAudioChannelConfigurationForAdaptation:x,getAdaptationForIndex:F,getIndexForAdaptation:H,getAdaptationForId:E,getAdaptationsForType:I,getAdaptationForType:J,getCodec:K,getMimeType:L,getKID:M,getContentProtectionData:N,getIsDynamic:O,getIsDVB:Q,getDuration:R,getBandwidth:S,getManifestUpdatePeriod:T,getRepresentationCount:U,getBitrateListForAdaptation:V,getRepresentationFor:X,getRepresentationsForAdaptation:_,getAdaptationsForPeriod:aa,getRegularPeriods:ba,getMpd:da,getEventsForPeriod:fa,getEventStreamForAdaptationSet:ha,getEventStreamForRepresentation:ia,getUTCTimingSources:ja,getBaseURLsFromElement:ka,getRepresentationSortFunction:B,getLocation:la,getUseCalculatedLiveEdgeTimeForAdaptation:$},b(),ma}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(57),i=d(h),j=a(85),k=d(j),l=a(79),m=d(l),n=a(84),o=d(n),p=a(83),q=d(p),r=a(87),s=d(r),t=a(81),u=d(t),v=a(80),w=d(v),x=a(82),y=d(x),z=a(155),A=d(z),B=a(158),C=d(B),D=a(47),E=d(D),F=a(45),G=d(F)
|
20 |
+
;e.__dashjs_factory_name="DashManifestModel",c.default=E.default.getSingletonFactory(e),b.exports=c.default},{155:155,158:158,45:45,47:47,57:57,79:79,80:80,81:81,82:82,83:83,84:84,85:85,87:87,98:98}],60:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){g=(0,i.default)(e).getInstance().getLogger(f),h=[new q.default,new s.default,new u.default,new o.default],j=new m.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:h}),l=(0,k.default)(e).create({adaptationset:new w.default,period:new y.default})}function b(){return h}function c(){return l}function d(a){var b=void 0,c=window.performance.now();if(!(b=j.xml_str2json(a)))throw new Error("parsing the manifest failed");var d=window.performance.now();l.run(b);var e=window.performance.now();return g.info("Parsing complete: ( xml2json: "+(d-c).toPrecision(3)+"ms, objectiron: "+(e-d).toPrecision(3)+"ms, total: "+((e-c)/1e3).toPrecision(3)+"s)"),b}var e=this.context,f=void 0,g=void 0,h=void 0,j=void 0,l=void 0;return f={parse:d,getMatchers:b,getIron:c},a(),f}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(45),i=d(h),j=a(70),k=d(j),l=a(3),m=d(l),n=a(69),o=d(n),p=a(67),q=d(p),r=a(66),s=d(r),t=a(68),u=d(t),v=a(63),w=d(v),x=a(64),y=d(x);e.__dashjs_factory_name="DashParser",c.default=g.default.getClassFactory(e),b.exports=c.default},{3:3,45:45,47:47,63:63,64:64,66:66,67:67,68:68,69:69,70:70}],61:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b){d(this,a);var c=function(a){return a&&a.length&&a.charAt(0)===a.charAt(0).toUpperCase()};this._name=b,this._merge=c(b)}return e(a,[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}]),a}();c.default=f,b.exports=c.default},{}],62:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=a(61),h=d(g),i=function(){function a(b,c,d){var f=this;e(this,a),this._name=b||"",this._properties=[],this._children=d||[],Array.isArray(c)&&c.forEach(function(a){f._properties.push(new h.default(a))})}return f(a,[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),a}();c.default=i,b.exports=c.default},{61:61}],63:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(62),i=d(h),j=a(57),k=d(j),l=function(a){function b(){e(this,b);var a=[k.default.PROFILES,k.default.WIDTH,k.default.HEIGHT,k.default.SAR,k.default.FRAMERATE,k.default.AUDIO_SAMPLING_RATE,k.default.MIME_TYPE,k.default.SEGMENT_PROFILES,k.default.CODECS,k.default.MAXIMUM_SAP_PERIOD,k.default.START_WITH_SAP,k.default.MAX_PLAYOUT_RATE,k.default.CODING_DEPENDENCY,k.default.SCAN_TYPE,k.default.FRAME_PACKING,k.default.AUDIO_CHANNEL_CONFIGURATION,k.default.CONTENT_PROTECTION,k.default.ESSENTIAL_PROPERTY,k.default.SUPPLEMENTAL_PROPERTY,k.default.INBAND_EVENT_STREAM];g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,k.default.ADAPTATION_SET,a,[new i.default(k.default.REPRESENTATION,a,[new i.default(k.default.SUB_REPRESENTATION,a)])])}return f(b,a),b}(i.default);c.default=l,b.exports=c.default},{57:57,62:62}],64:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(62),i=d(h),j=a(57),k=d(j),l=function(a){function b(){e(this,b);var a=[k.default.SEGMENT_BASE,k.default.SEGMENT_TEMPLATE,k.default.SEGMENT_LIST];g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,k.default.PERIOD,a,[new i.default(k.default.ADAPTATION_SET,a,[new i.default(k.default.REPRESENTATION,a)])])}return f(b,a),b}(i.default);c.default=l,b.exports=c.default},{57:57,62:62}],65:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b,c){d(this,a),this._test=b,this._converter=c}return e(a,[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}]),a}();c.default=f,b.exports=c.default},{}],66:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(65),i=d(h),j=60,k=60,l=1e3,m=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/,n=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a){return m.test(a.value)},function(a){var b=m.exec(a),c=void 0;if(c=Date.UTC(parseInt(b[1],10),parseInt(b[2],10)-1,parseInt(b[3],10),parseInt(b[4],10),parseInt(b[5],10),b[6]&&parseInt(b[6],10)||0,b[7]&&parseFloat(b[7])*l||0),b[9]&&b[10]){var d=parseInt(b[9],10)*k+parseInt(b[10],10);c+=("+"===b[8]?-1:1)*d*j*l}return new Date(c)})}return f(b,a),b}(i.default);c.default=n,b.exports=c.default},{65:65}],67:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(65),i=d(h),j=a(98),k=d(j),l=a(57),m=d(l),n=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,o=31536e3,p=2592e3,q=86400,r=3600,s=60,t=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a){for(var b=[m.default.MIN_BUFFER_TIME,m.default.MEDIA_PRESENTATION_DURATION,m.default.MINIMUM_UPDATE_PERIOD,m.default.TIMESHIFT_BUFFER_DEPTH,m.default.MAX_SEGMENT_DURATION,m.default.MAX_SUBSEGMENT_DURATION,k.default.SUGGESTED_PRESENTATION_DELAY,m.default.START,k.default.START_TIME,m.default.DURATION],c=b.length,d=0;d<c;d++)if(a.nodeName===b[d])return n.test(a.value);return!1},function(a){var b=n.exec(a),c=parseFloat(b[2]||0)*o+parseFloat(b[4]||0)*p+parseFloat(b[6]||0)*q+parseFloat(b[8]||0)*r+parseFloat(b[10]||0)*s+parseFloat(b[12]||0);return void 0!==b[1]&&(c=-c),c})}return f(b,a),b}(i.default);c.default=t,b.exports=c.default},{57:57,65:65,98:98}],68:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(65),i=d(h),j=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,k=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a){return j.test(a.value)},function(a){return parseFloat(a)})}return f(b,a),b}(i.default);c.default=k,b.exports=c.default},{65:65}],69:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},i=a(65),j=d(i),k=a(57),l=d(k),m=function(a){function b(){f(this,b),h(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a,b){var c,d=(c={},e(c,l.default.MPD,[l.default.ID,l.default.PROFILES]),e(c,l.default.PERIOD,[l.default.ID]),e(c,l.default.BASE_URL,[l.default.SERVICE_LOCATION,l.default.BYTE_RANGE]),e(c,l.default.SEGMENT_BASE,[l.default.INDEX_RANGE]),e(c,l.default.INITIALIZATION,[l.default.RANGE]),e(c,l.default.REPRESENTATION_INDEX,[l.default.RANGE]),e(c,l.default.SEGMENT_LIST,[l.default.INDEX_RANGE]),e(c,l.default.BITSTREAM_SWITCHING,[l.default.RANGE]),e(c,l.default.SEGMENT_URL,[l.default.MEDIA_RANGE,l.default.INDEX_RANGE]),e(c,l.default.SEGMENT_TEMPLATE,[l.default.INDEX_RANGE,l.default.MEDIA,l.default.INDEX,l.default.INITIALIZATION_MINUS,l.default.BITSTREAM_SWITCHING_MINUS]),e(c,l.default.ASSET_IDENTIFIER,[l.default.VALUE,l.default.ID]),e(c,l.default.EVENT_STREAM,[l.default.VALUE]),e(c,l.default.ADAPTATION_SET,[l.default.PROFILES,l.default.MIME_TYPE,l.default.SEGMENT_PROFILES,l.default.CODECS,l.default.CONTENT_TYPE]),e(c,l.default.FRAME_PACKING,[l.default.VALUE,l.default.ID]),e(c,l.default.AUDIO_CHANNEL_CONFIGURATION,[l.default.VALUE,l.default.ID]),e(c,l.default.CONTENT_PROTECTION,[l.default.VALUE,l.default.ID]),e(c,l.default.ESSENTIAL_PROPERTY,[l.default.VALUE,l.default.ID]),e(c,l.default.SUPPLEMENTAL_PROPERTY,[l.default.VALUE,l.default.ID]),e(c,l.default.INBAND_EVENT_STREAM,[l.default.VALUE,l.default.ID]),e(c,l.default.ACCESSIBILITY,[l.default.VALUE,l.default.ID]),e(c,l.default.ROLE,[l.default.VALUE,l.default.ID]),e(c,l.default.RATING,[l.default.VALUE,l.default.ID]),e(c,l.default.VIEWPOINT,[l.default.VALUE,l.default.ID]),e(c,l.default.CONTENT_COMPONENT,[l.default.CONTENT_TYPE]),e(c,l.default.REPRESENTATION,[l.default.ID,l.default.DEPENDENCY_ID,l.default.MEDIA_STREAM_STRUCTURE_ID]),e(c,l.default.SUBSET,[l.default.ID]),e(c,l.default.METRICS,[l.default.METRICS_MINUS]),e(c,l.default.REPORTING,[l.default.VALUE,l.default.ID]),c);if(d.hasOwnProperty(b)){var f=d[b];return void 0!==f&&f.indexOf(a.name)>=0}return!1},function(a){return String(a)})}return g(b,a),b}(j.default);c.default=m,b.exports=c.default},{57:57,65:65}],70:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b){for(var c in a)b.hasOwnProperty(c)||(b[c]=a[c])}function c(a,c,d){for(var e=0,f=a.length;e<f;++e){var g=a[e];if(c[g.name])if(d[g.name]){if(g.merge){var h=c[g.name],i=d[g.name];"object"==typeof h&&"object"==typeof i?b(h,i):d[g.name]=h+i}}else d[g.name]=c[g.name]}}function d(a,b){for(var e=0,f=a.children.length;e<f;++e){var g=a.children[e],h=b[g.name+"_asArray"];if(h)for(var i=0,j=h.length;i<j;++i){var k=h[i];c(a.properties,b,k),d(g,k)}}}function e(b){if(null===b||"object"!=typeof b)return b;if("period"in a)for(var c=a.period,e=b.Period_asArray,f=0,g=e.length;f<g;++f){var h=e[f];if(d(c,h),"adaptationset"in a){var i=h.AdaptationSet_asArray;if(i)for(var j=a.adaptationset,k=0,l=i.length;k<l;++k)d(j,i[k])}}return b}return{run:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="ObjectIron";var h=g.default.getClassFactory(e);c.default=h,b.exports=c.default},{47:47}],71:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){a&&a.boxParser&&(d=a.boxParser)}function b(a){if(!d)throw new Error("boxParser is undefined");if(!a||0===a.byteLength)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var b=d.parse(a),c=b.getBoxes("moof"),e=b.getBoxes("mfhd"),f=void 0,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0,l=void 0,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0,r=void 0,s=void 0,t=void 0,u=void 0,v=void 0;u=b.getBoxes("moof").length,t=e[e.length-1].sequence_number,h=0,k=[];var w=-1,x=-1;for(p=0;p<c.length;p++){var y=c[p],z=y.getChildBoxes("traf");for(n=0;n<z.length;n++){var A=z[n],B=A.getChildBox("tfhd"),C=A.getChildBox("tfdt");j=C.baseMediaDecodeTime;var D=A.getChildBoxes("trun"),E=A.getChildBoxes("subs");for(o=0;o<D.length;o++){var F=D[o];for(h=F.sample_count,s=(B.base_data_offset||0)+(F.data_offset||0),m=0;m<h;m++){l=F.samples[m],f=void 0!==l.sample_duration?l.sample_duration:B.default_sample_duration,i=void 0!==l.sample_size?l.sample_size:B.default_sample_size,g=void 0!==l.sample_composition_time_offset?l.sample_composition_time_offset:0;var G={dts:j,cts:j+g,duration:f,offset:y.offset+s,size:i,subSizes:[i]};if(E)for(q=0;q<E.length;q++){var H=E[q];if(w<H.entry_count&&m>x&&(w++,x+=H.entries[w].sample_delta),m==x){G.subSizes=[];var I=H.entries[w];for(r=0;r<I.subsample_count;r++)G.subSizes.push(I.subsamples[r].subsample_size)}}k.push(G),s+=i,j+=f}}v=j-C.baseMediaDecodeTime}}return{sampleList:k,lastSequenceNumber:t,totalDuration:v,numSequences:u}}function c(a){if(!d)throw new Error("boxParser is undefined");var b=d.parse(a),c=b?b.getBox("mdhd"):void 0;return c?c.timescale:NaN}var d=void 0;return{getSamplesInfo:b,getMediaTimescaleFromMoov:c,setConfig:a}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="FragmentedTextBoxParser",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{47:47}],72:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(a,c,e,f){var g=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentList,i=g.SegmentURL_asArray.length,j=[],k=void 0,l=void 0,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0;for(q=a.startNumber,n=(0,h.decideSegmentListRangeForTemplate)(d,b,a,c,e,f),o=Math.max(n.start,0),p=Math.min(n.end,g.SegmentURL_asArray.length-1),k=o;k<=p;k++)m=g.SegmentURL_asArray[k],l=(0,h.getIndexBasedSegment)(d,b,a,k),l.replacementTime=(q+k-1)*a.segmentDuration,l.media=m.media?m.media:"",l.mediaRange=m.mediaRange,l.index=m.index,l.indexRange=m.indexRange,j.push(l),l=null;return a.availableSegmentsNumber=i,j}a=a||{};var d=a.timelineConverter;return{getSegments:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(75);e.__dashjs_factory_name="ListSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{47:47,75:75}],73:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c){return void 0===c||0==+c?Math[a](b):(b=+b,c=+c,null===b||isNaN(b)||"number"!=typeof c||c%1!=0?NaN:(b=b.toString().split("e"),b=Math[a](+(b[0]+"e"+(b[1]?+b[1]-c:-c))),b=b.toString().split("e"),+(b[0]+"e"+(b[1]?+b[1]+c:c))))}Object.defineProperty(c,"__esModule",{value:!0});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(){function a(){d(this,a)}return f(a,null,[{key:"round10",value:function(a,b){return e("round",a,b)}}]),a}();c.default=g,b.exports=c.default},{}],74:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(){i=(0,k.default)(f).create(a,b),j=(0,m.default)(f).create(a,b),l=(0,o.default)(f).create(a,b)}function d(a,b,c,d,f){var h=void 0,k=a.segmentInfoType;k!==g.default.SEGMENT_BASE&&k!==g.default.BASE_URL&&e(a,c)?(k===g.default.SEGMENT_TIMELINE?h=i.getSegments(a,b,c,f):k===g.default.SEGMENT_TEMPLATE?h=j.getSegments(a,b,c,f):k===g.default.SEGMENT_LIST&&(h=l.getSegments(a,b,c,f)),d&&d(a,h)):h=a.segments}function e(a,b){var c=a.segments,d=!1,e=void 0,f=void 0;return c&&0!==c.length?(f=c[0].availabilityIdx,e=c[c.length-1].availabilityIdx,d=b<f||b>e):d=!0,d}var f=this.context,h=void 0,i=void 0,j=void 0,l=void 0;return h={getSegments:d},c(),h}Object.defineProperty(c,"__esModule",{value:!0});var f=a(57),g=d(f),h=a(47),i=d(h),j=a(78),k=d(j),l=a(76),m=d(l),n=a(72),o=d(n);e.__dashjs_factory_name="SegmentsGetter";var p=i.default.getClassFactory(e);c.default=p,b.exports=c.default},{47:47,57:57,72:72,76:76,78:78}],75:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){for(;a.length<b;)a="0"+a;return a}function f(a,b){return a.representation.startNumber+b}function g(a){return a?a.split("$$").join("$"):a}function h(a,b){if(!b||!a||-1===a.indexOf("$RepresentationID$"))return a;var c=b.toString();return a.split("$RepresentationID$").join(c)}function i(a,b,c){var d="%0",f=void 0,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0,l=b.length,m=d.length;if(!a)return a;for(;;){if((f=a.indexOf("$"+b))<0)return a;if((g=a.indexOf("$",f+l))<0)return a;if((h=a.indexOf(d,f+l))>f&&h<g)switch(i=a.charAt(g-1),j=parseInt(a.substring(h+m,g-1),10),i){case"d":case"i":case"u":k=e(c.toString(),j);break;case"x":k=e(c.toString(16),j);break;case"X":k=e(c.toString(16),j).toUpperCase();break;case"o":k=e(c.toString(8),j);break;default:return a}else k=c;a=a.substring(0,f)+k+a.substring(g+1)}}function j(a,b,c,d){var e=void 0,g=void 0,h=void 0,i=void 0;return g=c.segmentDuration,isNaN(g)&&(g=c.adaptation.period.duration),h=parseFloat((c.adaptation.period.start+d*g).toFixed(5)),i=parseFloat((h+g).toFixed(5)),e=new o.default,e.representation=c,e.duration=g,e.presentationStartTime=h,e.mediaStartTime=a.calcMediaTimeFromPresentationTime(e.presentationStartTime,c),e.availabilityStartTime=a.calcAvailabilityStartTimeFromPresentationTime(e.presentationStartTime,c.adaptation.period.mpd,b),e.availabilityEndTime=a.calcAvailabilityEndTimeFromPresentationTime(i,c.adaptation.period.mpd,b),e.wallStartTime=a.calcWallTimeForSegment(e,b),e.replacementNumber=f(e,d),e.availabilityIdx=d,e}function k(a,b,c,d,e,g,h,j,k,l){var m=d/g,n=Math.min(e/g,c.adaptation.period.mpd.maxSegmentDuration),p=void 0,q=void 0,r=void 0;return p=a.calcPresentationTimeFromMediaTime(m,c),q=p+n,r=new o.default,r.representation=c,r.duration=n,r.mediaStartTime=m,r.presentationStartTime=p,r.availabilityStartTime=c.adaptation.period.mpd.manifest.loadedTime,r.availabilityEndTime=a.calcAvailabilityEndTimeFromPresentationTime(q,c.adaptation.period.mpd,b),r.wallStartTime=a.calcWallTimeForSegment(r,b),r.replacementTime=l||d,r.replacementNumber=f(r,k),h=i(h,"Number",r.replacementNumber),h=i(h,"Time",r.replacementTime),r.media=h,r.mediaRange=j,r.availabilityIdx=k,r}function l(a,b){if(!b||!b.segments)return null;var c=b.segments.length,d=void 0,e=void 0;if(a<c&&(d=b.segments[a])&&d.availabilityIdx===a)return d;for(e=0;e<c;e++)if((d=b.segments[e])&&d.availabilityIdx===a)return d;return null}function m(a,b,c,d,e,f){var g=c.segmentDuration,h=c.adaptation.period.mpd.manifest.minBufferTime,i=c.segmentAvailabilityRange,j={start:a.calcPeriodRelativeTimeFromMpdRelativeTime(c,i.start),end:a.calcPeriodRelativeTimeFromMpdRelativeTime(c,i.end)},k=c.segments,m=2*g,n=f||Math.max(2*h,10*g),o=NaN,p=null,q=void 0,r=void 0;return j.start=Math.max(j.start,0),b&&!a.isTimeSyncCompleted()?(q=Math.floor(j.start/g),r=Math.floor(j.end/g),{start:q,end:r}):(k&&k.length>0?(p=l(e,c),o=p?a.calcPeriodRelativeTimeFromMpdRelativeTime(c,p.presentationStartTime):e>0?e*g:a.calcPeriodRelativeTimeFromMpdRelativeTime(c,d)):o=e>0?e*g:b?j.end:j.start,q=Math.floor(Math.max(o-m,j.start)/g),r=Math.floor(Math.min(q+n/g,j.end/g)),{start:q,end:r})}Object.defineProperty(c,"__esModule",{value:!0}),c.unescapeDollarsInTemplate=g,c.replaceIDForTemplate=h,c.replaceTokenForTemplate=i,c.getIndexBasedSegment=j,c.getTimeBasedSegment=k,c.getSegmentByIndex=l,c.decideSegmentListRangeForTemplate=m;var n=a(86),o=d(n)},{86:86}],76:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(a,c,e,f){var g=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentTemplate,i=a.segmentDuration,j=a.segmentAvailabilityRange,k=[],l=null,m=null,n=void 0,o=void 0,p=void 0,q=void 0,r=void 0;for(r=a.startNumber,n=isNaN(i)&&!b?{start:r,end:r}:(0,h.decideSegmentListRangeForTemplate)(d,b,a,c,e,f),p=n.start,q=n.end,o=p;o<=q;o++)m=(0,h.getIndexBasedSegment)(d,b,a,o),m.replacementTime=(r+o-1)*a.segmentDuration,l=g.media,l=(0,h.replaceTokenForTemplate)(l,"Number",m.replacementNumber),l=(0,h.replaceTokenForTemplate)(l,"Time",m.replacementTime),m.media=l,k.push(m),m=null;return isNaN(i)?a.availableSegmentsNumber=1:a.availableSegmentsNumber=Math.ceil((j.end-j.start)/i),k}var d=a.timelineConverter;return{getSegments:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(75);e.__dashjs_factory_name="TemplateSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{47:47,75:75}],77:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){u(),x.on(i.default.TIME_SYNCHRONIZATION_COMPLETED,s,this)}function b(){return z}function c(a){z=a}function d(){return y}function e(a){y=a}function f(){return A}function h(a){A=a}function j(a,b,c,d){return d?c&&b.timeShiftBufferDepth!=Number.POSITIVE_INFINITY?new Date(b.availabilityStartTime.getTime()+1e3*(a+b.timeShiftBufferDepth)):b.availabilityEndTime:c?new Date(b.availabilityStartTime.getTime()+1e3*(a-y)):b.availabilityStartTime}function k(a,b,c){return j.call(this,a,b,c)}function l(a,b,c){return j.call(this,a,b,c,!0)}function m(a,b){return(a.getTime()-b.mpd.availabilityStartTime.getTime()+1e3*y)/1e3}function n(a,b){return a+(b.adaptation.period.start-b.presentationTimeOffset)}function o(a,b){return a-b.adaptation.period.start+b.presentationTimeOffset}function p(a,b){var c=void 0,d=void 0,e=void 0;return b&&(c=a.representation.adaptation.period.mpd.suggestedPresentationDelay,d=a.presentationStartTime+c,e=new Date(a.availabilityStartTime.getTime()+1e3*d)),e}function q(a,b){var c=a.adaptation.period,d={start:c.start,end:c.start+c.duration};if(!b)return d;if(!z&&a.segmentAvailabilityRange)return a.segmentAvailabilityRange;var e=a.segmentDuration||(a.segments&&a.segments.length?a.segments[a.segments.length-1].duration:0),f=m(new Date,c),g=c.start+c.duration;d.start=Math.max(f-c.mpd.timeShiftBufferDepth,c.start);var h=void 0!==a.availabilityTimeOffset&&a.availabilityTimeOffset<e?e-a.availabilityTimeOffset:e;return d.end=f>=g&&f-h<g?g:f-h,d}function r(a,b){return b-a.adaptation.period.start}function s(a){z||void 0!==a.offset&&(e(a.offset/1e3),z=!0)}function t(a){var b=a.presentationTimeOffset;return a.adaptation.period.start-b}function u(){y=0,z=!1,A=NaN}function v(){x.off(i.default.TIME_SYNCHRONIZATION_COMPLETED,s,this),u()}var w=this.context,x=(0,g.default)(w).getInstance(),y=void 0,z=void 0,A=void 0;return{initialize:a,isTimeSyncCompleted:b,setTimeSyncCompleted:c,getClientTimeOffset:d,setClientTimeOffset:e,getExpectedLiveEdge:f,setExpectedLiveEdge:h,calcAvailabilityStartTimeFromPresentationTime:k,calcAvailabilityEndTimeFromPresentationTime:l,calcPresentationTimeFromWallTime:m,calcPresentationTimeFromMediaTime:n,calcPeriodRelativeTimeFromMpdRelativeTime:r,calcMediaTimeFromPresentationTime:o,calcSegmentAvailabilityRange:q,calcWallTimeForSegment:p,calcMSETimeOffset:t,reset:v}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(50),i=d(h),j=a(47),k=d(j);e.__dashjs_factory_name="TimelineConverter",c.default=k.default.getSingletonFactory(e),b.exports=c.default},{46:46,47:47,50:50}],78:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(){if(!(e&&e.hasOwnProperty("calcMediaTimeFromPresentationTime")&&e.hasOwnProperty("calcSegmentAvailabilityRange")&&e.hasOwnProperty("calcMediaTimeFromPresentationTime")))throw new Error("Missing config parameter(s)")}function d(a,d,f,g){if(c(),!a)throw new Error("no representation");void 0===d&&(d=null);var i=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentTemplate||a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentList,j=i.SegmentTimeline,k=i.SegmentURL_asArray,l=a.availableSegmentsNumber>0,m=void 0;m=g||(f>-1||null!==d?10:1/0);var n=0,o=0,p=-1,q=[],r=null,s=void 0,t=void 0,u=void 0,v=void 0,w=void 0,x=void 0,y=void 0,z=void 0,A=void 0,B=void 0,C=void 0,D=function(c,d){var f=i.media,g=c.mediaRange;return k&&(f=k[d].media||"",g=k[d].mediaRange),(0,h.getTimeBasedSegment)(e,b,a,n,c.d,C,f,g,p,c.tManifest)};for(C=a.timescale,s=j.S_asArray,B=f,null!==d&&(r=e.calcMediaTimeFromPresentationTime(d,a)),u=0,v=s.length;u<v;u++){if(t=s[u],x=0,t.hasOwnProperty("r")&&(x=t.r),t.hasOwnProperty("t")&&(n=t.t,o=n/C),x<0){if((z=s[u+1])&&z.hasOwnProperty("t"))y=z.t/C;else{var E=a.segmentAvailabilityRange?a.segmentAvailabilityRange.end:e.calcSegmentAvailabilityRange(a,b).end;y=e.calcMediaTimeFromPresentationTime(E,a),a.segmentDuration=t.d/C}x=Math.ceil((y-o)/(t.d/C))-1}if(A){if(l)break;p+=x+1}else for(w=0;w<=x;w++)if(p++,q.length>m){if(A=!0,l)break}else null!==r?o>=r-t.d/C*1.5&&q.push(D(t,p)):p>=B&&q.push(D(t,p)),n+=t.d,o=n/C}return l||(a.availableSegmentsNumber=p+1),q}a=a||{};var e=a.timelineConverter;return{getSegments:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(75);e.__dashjs_factory_name="TimelineSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{47:47,75:75}],79:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.period=null,this.index=-1,this.type=null};c.default=e,b.exports=c.default},{}],80:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=1,f=1,g=function a(b,c,g,h){d(this,a),this.url=b||"",this.serviceLocation=c||b||"",this.dvb_priority=g||e,this.dvb_weight=h||f,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0};g.DEFAULT_DVB_PRIORITY=e,g.DEFAULT_DVB_WEIGHT=f,c.default=g,b.exports=c.default},{}],81:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN};c.default=e,b.exports=c.default},{}],82:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri=""};c.default=e,b.exports=c.default},{}],83:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.minimumUpdatePeriod=NaN,this.mediaPresentationDuration=NaN};c.default=e,b.exports=c.default},{}],84:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null};e.DEFAULT_ID="defaultId",c.default=e,b.exports=c.default},{}],85:[function(a,b,c){
|
21 |
+
"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=a(57),h=d(g),i=function(){function a(){e(this,a),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.codecs=null,this.codecPrivateData=null,this.segmentDuration=NaN,this.timescale=1,this.startNumber=1,this.indexRange=null,this.range=null,this.presentationTimeOffset=0,this.MSETimeOffset=NaN,this.segmentAvailabilityRange=null,this.availableSegmentsNumber=0,this.bandwidth=NaN,this.width=NaN,this.height=NaN,this.scanType=null,this.maxPlayoutRate=NaN,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0}return f(a,null,[{key:"hasInitialization",value:function(a){return null!==a.initialization||null!==a.range}},{key:"hasSegments",value:function(a){return a.segmentInfoType!==h.default.BASE_URL&&a.segmentInfoType!==h.default.SEGMENT_BASE&&!a.indexRange}}]),a}();c.default=i,b.exports=c.default},{57:57}],86:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=NaN,this.replacementTime=null,this.replacementNumber=NaN,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.availabilityStartTime=NaN,this.availabilityEndTime=NaN,this.availabilityIdx=NaN,this.wallStartTime=NaN,this.representation=null};c.default=e,b.exports=c.default},{}],87:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.schemeIdUri="",this.value=""};c.default=e,b.exports=c.default},{}],88:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){n=(0,g.default)(h).create({errHandler:a.errHandler,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier,useFetch:a.mediaPlayerModel.getLowLatencyEnabled()})}function c(a){var b=function(b){j.trigger(o.default.CHECK_FOR_EXISTENCE_COMPLETED,{request:a,exists:b})};if(a){var c=new i.default(a.url);n.load({request:c,success:function(){b(!0)},error:function(){b(!1)}})}else b(!1)}function d(a){var b=function(b,c){j.trigger(o.default.LOADING_COMPLETED,{request:a,response:b||null,error:c||null,sender:l})};a?n.load({request:a,progress:function(b){j.trigger(o.default.LOADING_PROGRESS,{request:a}),b.data&&j.trigger(o.default.LOADING_DATA_PROGRESS,{request:a,response:b.data||null,error:null,sender:l})},success:function(a){b(a)},error:function(a,c,d){b(void 0,new k.default(r,d,c))},abort:function(a){a&&j.trigger(o.default.LOADING_ABANDONED,{request:a,mediaType:a.mediaType,sender:l})}}):b(void 0,new k.default(s,t))}function e(){n&&n.abort()}function f(){n&&(n.abort(),n=null)}a=a||{};var h=this.context,j=(0,m.default)(h).getInstance(),l=void 0,n=void 0;return l={checkForExistence:c,load:d,abort:e,reset:f},b(),l}Object.defineProperty(c,"__esModule",{value:!0});var f=a(121),g=d(f),h=a(166),i=d(h),j=a(163),k=d(j),l=a(46),m=d(l),n=a(50),o=d(n),p=a(47),q=d(p),r=1,s=2,t="request is null";e.__dashjs_factory_name="FragmentLoader";var u=q.default.getClassFactory(e);u.FRAGMENT_LOADER_ERROR_LOADING_FAILURE=r,u.FRAGMENT_LOADER_ERROR_NULL_REQUEST=s,q.default.updateClassFactory(e.__dashjs_factory_name,u),c.default=u,b.exports=c.default},{121:121,163:163,166:166,46:46,47:47,50:50}],89:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){p=(0,B.default)(h).getInstance().getLogger(n),j.on(v.default.XLINK_READY,c,n),s=(0,k.default)(h).create({errHandler:y,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier}),u=(0,i.default)(h).create({errHandler:y,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier}),w=null}function c(a){j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:a.manifest})}function d(a){var b=null;return a.indexOf("SmoothStreamingMedia")>-1?(x&&(b=x.createMssParser(),x.registerEvents()),b):a.indexOf("MPD")>-1?(0,z.default)(h).create():b}function e(a){var b=new o.default(a,r.HTTPRequest.MPD_TYPE);s.load({request:b,success:function(b,c,e){if(u){var f=void 0,h=void 0,i=void 0;if(e&&e!==a?(h=l.parseBaseUrl(e),f=e):(l.isRelative(a)&&(a=l.resolve(a,window.location.href)),h=l.parseBaseUrl(a)),null===w&&(w=d(b)),null===w)return void j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(C,"Failed detecting manifest type or manifest type unsupported : "+a)});u.setMatchers(w.getMatchers()),u.setIron(w.getIron());try{i=w.parse(b)}catch(k){return void j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(C,"Failed parsing manifest : "+a)})}i?(i.url=f||a,i.originalUrl||(i.originalUrl=i.url),i.hasOwnProperty(g.default.LOCATION)&&(h=l.parseBaseUrl(i.Location_asArray[0]),p.debug("BaseURI set by Location to: "+h)),i.baseUri=h,i.loadedTime=new Date,u.resolveManifestOnLoad(i)):j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(C,E)})}},error:function(b,c,d){j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(D,"Failed loading manifest: "+a+", "+d)})}})}function f(){j.off(v.default.XLINK_READY,c,n),u&&(u.reset(),u=null),s&&(s.abort(),s=null),x&&x.reset()}a=a||{};var h=this.context,j=(0,t.default)(h).getInstance(),l=(0,m.default)(h).getInstance(),n=void 0,p=void 0,s=void 0,u=void 0,w=void 0,x=a.mssHandler,y=a.errHandler;return n={load:e,reset:f},b(),n}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(112),i=d(h),j=a(121),k=d(j),l=a(158),m=d(l),n=a(174),o=d(n),p=a(163),q=d(p),r=a(183),s=a(46),t=d(s),u=a(50),v=d(u),w=a(47),x=d(w),y=a(60),z=d(y),A=a(45),B=d(A),C=1,D=2,E="parsing failed";e.__dashjs_factory_name="ManifestLoader";var F=x.default.getClassFactory(e);F.MANIFEST_LOADER_ERROR_PARSING_FAILURE=C,F.MANIFEST_LOADER_ERROR_LOADING_FAILURE=D,x.default.updateClassFactory(e.__dashjs_factory_name,F),c.default=F,b.exports=c.default},{112:112,121:121,158:158,163:163,174:174,183:183,45:45,46:46,47:47,50:50,60:60,98:98}],90:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){v=(0,m.default)(s).getInstance().getLogger(u)}function b(a){a&&(a.manifestModel&&(B=a.manifestModel),a.dashManifestModel&&(C=a.dashManifestModel),a.mediaPlayerModel&&(D=a.mediaPlayerModel),a.manifestLoader&&(A=a.manifestLoader),a.errHandler&&(E=a.errHandler))}function c(){e(),t.on(i.default.STREAMS_COMPOSED,r,this),t.on(i.default.PLAYBACK_STARTED,p,this),t.on(i.default.PLAYBACK_PAUSED,q,this),t.on(i.default.INTERNAL_MANIFEST_LOADED,o,this)}function d(a){l(a)}function e(){w=NaN,z=!1,y=!0,h()}function f(){t.off(i.default.PLAYBACK_STARTED,p,this),t.off(i.default.PLAYBACK_PAUSED,q,this),t.off(i.default.STREAMS_COMPOSED,r,this),t.off(i.default.INTERNAL_MANIFEST_LOADED,o,this),e()}function h(){null!==x&&(clearInterval(x),x=null)}function j(a){h(),isNaN(a)&&!isNaN(w)&&(a=1e3*w),isNaN(a)||(v.debug("Refresh manifest in "+a+" milliseconds."),x=setTimeout(n,a))}function k(){z=!0;var a=B.getValue(),b=a.url,c=C.getLocation(a);c&&(b=c),A.load(b)}function l(a){B.setValue(a);var b=new Date,c=(b.getTime()-a.loadedTime.getTime())/1e3;w=C.getManifestUpdatePeriod(a,c),1e3*w>2147483647&&(w=2147483.647),t.trigger(i.default.MANIFEST_UPDATED,{manifest:a}),v.info("Manifest has been refreshed at "+b+"["+b.getTime()/1e3+"] "),y||j()}function n(){if(!y||D.getScheduleWhilePaused())return z?void j(D.getManifestUpdateRetryInterval()):void k()}function o(a){a.error?E.manifestError(a.error.message,a.error.code):l(a.manifest)}function p(){y=!1,j()}function q(){y=!0,h()}function r(){z=!1}var s=this.context,t=(0,g.default)(s).getInstance(),u=void 0,v=void 0,w=void 0,x=void 0,y=void 0,z=void 0,A=void 0,B=void 0,C=void 0,D=void 0,E=void 0;return u={initialize:c,setManifest:d,refreshManifest:k,setConfig:b,reset:f},a(),u}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(50),i=d(h),j=a(47),k=d(j),l=a(45),m=d(l);e.__dashjs_factory_name="ManifestUpdater",c.default=k.default.getClassFactory(e),b.exports=c.default},{45:45,46:46,47:47,50:50}],91:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){Oc=Mc.getLogger(Nc),Rc=!1,Tc=!1,Sc=!1,Uc=!0,Yc=null,Qc=null,_c=null,W.default.extend(Y.default),bd=(0,I.default)(Kc).getInstance(),jd=(0,O.default)(Kc).getInstance()}function b(a){a&&(a.capabilities&&(dd=a.capabilities),a.streamController&&(ed=a.streamController),a.playbackController&&(fd=a.playbackController),a.mediaPlayerModel&&(bd=a.mediaPlayerModel),a.abrController&&(Vc=a.abrController),a.mediaController&&(Xc=a.mediaController))}function c(a,b,c){if(dd||(dd=(0,w.default)(Kc).getInstance()),cd=(0,u.default)(Kc).getInstance(),!dd.supportsMediaSource())return void cd.capabilityError("mediasource");Rc||(Rc=!0,Wc=(0,ha.default)(Kc).getInstance(),Vc||(Vc=(0,M.default)(Kc).getInstance()),fd||(fd=(0,m.default)(Kc).getInstance()),Xc||(Xc=(0,q.default)(Kc).getInstance()),_c=(0,ba.default)(Kc).getInstance(),hd=(0,da.default)(Kc).getInstance({mediaController:Xc,timelineConverter:Wc,adapter:_c}),id=(0,G.default)(Kc).getInstance(),gd=(0,fa.default)(Kc).getInstance({manifestModel:id,dashManifestModel:hd}),ad=(0,K.default)(Kc).getInstance(),kd=(0,C.default)(Kc).getInstance(),ld=(0,Q.default)(Kc).getInstance({mediaPlayerModel:bd}),_c.setConfig({dashManifestModel:hd}),ad.setConfig({adapter:_c}),db(),Fa(void 0===c||c),a&&Wb(a),b&&pc(b),Oc.info("[dash.js "+j()+"] MediaPlayer has been initialized"))}function d(){pc(null),Wb(null),Qc=null,Yc&&(Yc.reset(),Yc=null),Zc&&(Zc.reset(),Zc=null)}function e(){return!!Pc&&!!jd.getElement()}function f(a,b,c){Lc.on(a,b,c)}function h(a,b,c){Lc.off(a,b,c)}function j(){return(0,_.getVersionString)()}function l(){return Mc}function n(){if(jd.getElement()||Sc)return!1;if(!Pc)throw Gc;Cc()}function p(){if(!Tc)throw Ec;(!Uc||t()&&Tc)&&fd.play()}function r(){if(!Tc)throw Ec;fd.pause()}function t(){if(!Tc)throw Ec;return fd.isPaused()}function v(a){if(!Tc)throw Ec;if("number"!=typeof a||isNaN(a))throw Ic;var b=fd.getIsDynamic()?V(a):a;fd.seek(b)}function x(){if(!Tc)throw Ec;return fd.isSeeking()}function z(){if(!Tc)throw Ec;return fd.getIsDynamic()}function B(a){if(!jd.getElement())throw Fc;Tb().playbackRate=a}function D(){if(!jd.getElement())throw Fc;return Tb().playbackRate}function F(a){if(isNaN(a)||a<0||a>.2)throw Jc;fd.setCatchUpPlaybackRate(a)}function H(){return fd.getCatchUpPlaybackRate()}function J(a){if(!jd.getElement())throw Fc;Tb().muted=a}function L(){if(!jd.getElement())throw Fc;return Tb().muted}function N(a){if(!jd.getElement())throw Fc;Tb().volume=a}function P(){if(!jd.getElement())throw Fc;return Tb().volume}function R(a){var b=[g.default.VIDEO,g.default.AUDIO,g.default.FRAGMENTED_TEXT];if(a){if(-1!==b.indexOf(a)){var c=Hb().getCurrentBufferLevel(Ib(a));return c||NaN}return Oc.warn("getBufferLength requested for invalid type"),NaN}var c=b.map(function(a){return _b(a).length>0?Hb().getCurrentBufferLevel(Ib(a)):Number.MAX_VALUE}).reduce(function(a,b){return Math.min(a,b)});return c===Number.MAX_VALUE?NaN:c}function T(){var a=zc();return a?a.manifestInfo.DVRWindowSize:0}function V(a){var b=zc(),c=fd.getLiveDelay();if(!b)return 0;var d=b.range.start+a;return d>b.range.end-c&&(d=b.range.end-c),d}function X(a){if(!Tc)throw Ec;var b=Tb().currentTime;if(void 0!==a)b=ed.getTimeRelativeToStreamId(b,a);else if(fd.getIsDynamic()){var c=zc();b=null===c?0:Z()-(c.range.end-c.time)}return b}function Z(){if(!Tc)throw Ec;var a=Tb().duration;if(fd.getIsDynamic()){var b=zc(),c=void 0;if(!b)return 0;c=b.range.end-b.range.start,a=c<b.manifestInfo.DVRWindowSize?c:b.manifestInfo.DVRWindowSize}return a}function aa(){if(!Tc)throw Ec;return X()<0?NaN:Ac(X())}function ca(){if(!Tc)throw Ec;return Ac(Z())}function ea(a,b){Vc.setMaxAllowedBitrateFor(a,b)}function ga(a,b){Vc.setMinAllowedBitrateFor(a,b)}function ja(a){return Vc.getMaxAllowedBitrateFor(a)}function la(a){if(!Sc)throw Dc;return Vc.getTopBitrateInfoFor(a)}function na(a){return Vc.getMinAllowedBitrateFor(a)}function oa(a,b){Vc.setMaxAllowedRepresentationRatioFor(a,b)}function pa(a){return Vc.getMaxAllowedRepresentationRatioFor(a)}function qa(a){if(!Sc)throw Dc;if(a===g.default.IMAGE){var b=Bc();if(!b)return-1;var c=b.getThumbnailController();return c?c.getCurrentTrackIndex():-1}return Vc.getQualityFor(a,ed.getActiveStreamInfo())}function ra(a,b){if(!Sc)throw Dc;if(a===g.default.IMAGE){var c=Bc();if(!c)return;var d=c.getThumbnailController();d&&d.setTrackByIndex(b)}Vc.setPlaybackQuality(a,ed.getActiveStreamInfo(),b)}function sa(){Vc.setElementSize(),Vc.setWindowResizeEventCalled(!0)}function ta(){return Vc.getLimitBitrateByPortal()}function ua(a){Vc.setLimitBitrateByPortal(a)}function va(){return Vc.getUsePixelRatioInLimitBitrateByPortal()}function wa(a){Vc.setUsePixelRatioInLimitBitrateByPortal(a)}function xa(a,b){Vc.setInitialBitrateFor(a,b)}function ya(a){if(!Sc)throw Dc;return Vc.getInitialBitrateFor(a)}function za(a,b){Vc.setInitialRepresentationRatioFor(a,b)}function Aa(a){return Vc.getInitialRepresentationRatioFor(a)}function Ba(a){return Vc.getAutoSwitchBitrateFor(a)}function Ca(a,b){Vc.setAutoSwitchBitrateFor(a,b)}function Da(){return Vc.getUseDeadTimeLatency()}function Ea(a){Vc.setUseDeadTimeLatency(a)}function Fa(a){Uc=a}function Ga(){return Uc}function Ha(a){bd.setLiveDelayFragmentCount(a)}function Ia(a){bd.setLiveDelay(a)}function Ja(){return bd.getLiveDelay()}function Ka(){if(!Rc)throw Hc;return Tc?fd.getCurrentLiveLatency():NaN}function La(a){bd.setUseSuggestedPresentationDelay(a)}function Ma(a,b){bd.setLastBitrateCachingInfo(a,b)}function Na(a,b){bd.setLastMediaSettingsCachingInfo(a,b)}function Oa(a){bd.setScheduleWhilePaused(a)}function Pa(){return bd.getScheduleWhilePaused()}function Qa(a){bd.setFastSwitchEnabled(a)}function Ra(){return bd.getFastSwitchEnabled()}function Sa(a){a===g.default.ABR_STRATEGY_DYNAMIC||a===g.default.ABR_STRATEGY_BOLA||a===g.default.ABR_STRATEGY_THROUGHPUT?bd.setABRStrategy(a):Oc.warn("Ignoring setABRStrategy("+a+") - unknown value.")}function Ta(){return bd.getABRStrategy()}function Ua(a){bd.setUseDefaultABRRules(a)}function Va(a,b,c){bd.addABRCustomRule(a,b,c)}function Wa(a){bd.removeABRCustomRule(a)}function Xa(){bd.removeAllABRCustomRule()}function Ya(a){a===g.default.MOVING_AVERAGE_SLIDING_WINDOW||a===g.default.MOVING_AVERAGE_EWMA?bd.setMovingAverageMethod(a):Oc.warn("Warning: Ignoring setMovingAverageMethod("+a+") - unknown value.")}function Za(){return bd.getMovingAverageMethod()}function $a(){return bd.getLowLatencyEnabled()}function _a(a){return bd.setLowLatencyEnabled(a)}function ab(a,b){bb(a,b);var c=new k.default;c.schemeIdUri=a,c.value=b,bd.getUTCTimingSources().push(c)}function bb(a,b){var c=bd.getUTCTimingSources();c.forEach(function(d,e){d.schemeIdUri===a&&d.value===b&&c.splice(e,1)})}function cb(){bd.setUTCTimingSources([])}function db(){ab(I.default.DEFAULT_UTC_TIMING_SOURCE.scheme,I.default.DEFAULT_UTC_TIMING_SOURCE.value)}function eb(a){bd.setUseManifestDateHeaderTimeSource(a)}function fb(a){bd.setBufferToKeep(a)}function gb(a){bd.setBufferAheadToKeep(a)}function hb(a){bd.setBufferPruningInterval(a)}function ib(a){bd.setStableBufferTime(a)}function jb(){return bd.getStableBufferTime()}function kb(a){bd.setBufferTimeAtTopQuality(a)}function lb(){return bd.getBufferTimeAtTopQuality()}function mb(a){bd.setBufferTimeAtTopQualityLongForm(a)}function nb(){return bd.getBufferTimeAtTopQualityLongForm()}function ob(a){bd.setLongFormContentDurationThreshold(a)}function pb(a){bd.setSegmentOverlapToleranceTime(a)}function qb(a,b){bd.setCacheLoadThresholdForType(a,b)}function rb(a){bd.setBandwidthSafetyFactor(a)}function sb(){return bd.getBandwidthSafetyFactor()}function tb(a){var b=Vc.getThroughputHistory();return b?b.getAverageThroughput(a):0}function ub(a){bd.setAbandonLoadTimeout(a)}function vb(a){bd.setFragmentRetryAttempts(a)}function wb(a){bd.setFragmentRetryInterval(a)}function xb(a){bd.setManifestRetryAttempts(a)}function yb(a){bd.setManifestRetryInterval(a)}function zb(a,b){bd.setXHRWithCredentialsForType(a,b)}function Ab(a){return bd.getXHRWithCredentialsForType(a)}function Bb(a){bd.setJumpGaps(a)}function Cb(){return bd.getJumpGaps()}function Db(a){bd.setSmallGapLimit(a)}function Eb(){return bd.getSmallGapLimit()}function Fb(a){bd.setManifestUpdateRetryInterval(a)}function Gb(){return bd.getManifestUpdateRetryInterval()}function Hb(){return gd}function Ib(a){return ad.getReadOnlyMetricsFor(a)}function Jb(a){void 0===kd&&(kd=(0,C.default)(Kc).getInstance()),kd.setTextDefaultLanguage(a)}function Kb(){return void 0===kd&&(kd=(0,C.default)(Kc).getInstance()),kd.getTextDefaultLanguage()}function Lb(a){void 0===kd&&(kd=(0,C.default)(Kc).getInstance()),kd.setTextDefaultEnabled(a)}function Mb(){return void 0===kd&&(kd=(0,C.default)(Kc).getInstance()),kd.getTextDefaultEnabled()}function Nb(a){void 0===kd&&(kd=(0,C.default)(Kc).getInstance()),kd.enableText(a)}function Ob(a){void 0===kd&&(kd=(0,C.default)(Kc).getInstance()),kd.enableForcedTextStreaming(a)}function Pb(){return void 0===kd&&(kd=(0,C.default)(Kc).getInstance()),kd.isTextEnabled()}function Qb(a){if(!Tc)throw Ec;void 0===kd&&(kd=(0,C.default)(Kc).getInstance()),kd.setTextTrack(a)}function Rb(){var a=NaN;return kd&&(a=kd.getCurrentTrackIdx()),a}function Sb(a){var b=(0,y.default)(Kc).getInstance();b.setConfig({videoModel:jd}),b.initialize(),b.displayCConTop(a)}function Tb(){if(!jd.getElement())throw Fc;return jd.getElement()}function Ub(){return jd?jd.getVideoContainer():null}function Vb(a){if(!jd.getElement())throw Fc;jd.setVideoContainer(a)}function Wb(a){if(!Rc)throw Hc;jd.setElement(a),a&&(wc(),xc(),yc(),ed&&ed.switchToVideoElement()),Tc&&tc(),Cc()}function Xb(){return jd?jd.getTTMLRenderingDiv():null}function Yb(a){if(!jd.getElement())throw Fc;jd.setTTMLRenderingDiv(a)}function Zb(a){if(!Sc)throw Dc;var b=Bc();return b?b.getBitrateListFor(a):[]}function $b(a){if(!Sc)throw Dc;return _c.getStreamsInfo(a)}function _b(a){if(!Sc)throw Dc;var b=ed.getActiveStreamInfo();return b?Xc.getTracksFor(a,b):[]}function ac(a,b,c){if(!Sc)throw Dc;return c=c||_c.getStreamsInfo(b,1)[0],c?_c.getAllMediaInfoForType(c,a,b):[]}function bc(a){if(!Sc)throw Dc;var b=ed.getActiveStreamInfo();return b?Xc.getCurrentTrackFor(a,b):null}function cc(a,b){if(!Rc)throw Hc;Xc.setInitialSettings(a,b)}function dc(a){if(!Rc)throw Hc;return Xc.getInitialSettings(a)}function ec(a){if(!Sc)throw Dc;Xc.setTrack(a)}function fc(a){if(!Rc)throw Hc;return Xc.getSwitchMode(a)}function gc(a,b){if(!Rc)throw Hc;Xc.setSwitchMode(a,b)}function hc(a){if(!Rc)throw Hc;Xc.setSelectionModeForInitialTrack(a)}function ic(){if(!Rc)throw Hc;return Xc.getSelectionModeForInitialTrack()}function jc(){return wc()}function kc(a){Yc=a}function lc(a){Qc=a,ed&&ed.setProtectionData(Qc)}function mc(a){if(a<0)return null;var b=fd.getIsDynamic()?V(a):a,c=ed.getStreamForTime(b);if(null===c)return null;var d=c.getThumbnailController(),e=c.getStreamInfo();if(!d||!e)return null;var f=ed.getTimeRelativeToStreamId(b,c.getId());return d.get(f)}function nc(a,b){var c=vc(),d=this,e=function a(e){e.error?b(null,e.error):b(e.manifest),Lc.off(W.default.INTERNAL_MANIFEST_LOADED,a,d),c.reset()};Lc.on(W.default.INTERNAL_MANIFEST_LOADED,e,d),(0,E.default)(Kc).getInstance().initialize(a),c.load(a)}function oc(){if(!Pc)throw Gc;return Pc}function pc(a){if(!Rc)throw Hc;"string"==typeof a&&(0,E.default)(Kc).getInstance().initialize(a),Pc=a,(Sc||Tc)&&tc(),e()&&Cc()}function qc(a,b,c){var d=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],e=new Date(1e3*a),f=e.toLocaleDateString(b),g=e.toLocaleTimeString(b,{hour12:c});return d?g+" "+f:g}function rc(a){a=Math.max(a,0);var b=Math.floor(a/3600),c=Math.floor(a%3600/60),d=Math.floor(a%3600%60);return(0===b?"":b<10?"0"+b.toString()+":":b.toString()+":")+(c<10?"0"+c.toString():c.toString())+":"+(d<10?"0"+d.toString():d.toString())}function sc(a,b,c){$.default.extend(a,b,c,Kc)}function tc(){Tc=!1,Sc=!1,_c.reset(),ed.reset(),fd.reset(),Vc.reset(),Xc.reset(),kd.reset(),Yc&&(Yc.reset(),Yc=null,wc())}function uc(){var a=vc();ed||(ed=(0,o.default)(Kc).getInstance()),Xc.setConfig({errHandler:cd,domStorage:ld}),ed.setConfig({capabilities:dd,manifestLoader:a,manifestModel:id,dashManifestModel:hd,mediaPlayerModel:bd,protectionController:Yc,adapter:_c,metricsModel:ad,dashMetrics:gd,errHandler:cd,timelineConverter:Wc,videoModel:jd,playbackController:fd,domStorage:ld,abrController:Vc,mediaController:Xc,textController:kd}),fd.setConfig({streamController:ed,metricsModel:ad,dashMetrics:gd,manifestModel:id,mediaPlayerModel:bd,dashManifestModel:hd,adapter:_c,videoModel:jd}),Vc.setConfig({streamController:ed,domStorage:ld,mediaPlayerModel:bd,metricsModel:ad,dashMetrics:gd,dashManifestModel:hd,manifestModel:id,videoModel:jd,adapter:_c}),Vc.createAbrRulesCollection(),kd.setConfig({errHandler:cd,manifestModel:id,dashManifestModel:hd,mediaController:Xc,streamController:ed,videoModel:jd}),ed.initialize(Uc,Qc)}function vc(){return(0,s.default)(Kc).create({errHandler:cd,metricsModel:ad,mediaPlayerModel:bd,requestModifier:(0,A.default)(Kc).getInstance(),mssHandler:$c})}function wc(){if(Yc)return Yc;var a=dashjs.Protection;if("function"==typeof a){var b=a(Kc).create();return W.default.extend(a.events),Y.default.extend(a.events,{publicOnly:!0}),dd||(dd=(0,w.default)(Kc).getInstance()),Yc=b.createProtectionSystem({debug:Mc,errHandler:cd,videoModel:jd,capabilities:dd,eventBus:Lc,events:W.default,BASE64:ka.default,constants:g.default})}return null}function xc(){if(!Zc){var a=dashjs.MetricsReporting;if("function"==typeof a){var b=a(Kc).create();Zc=b.createMetricsReporting({debug:Mc,eventBus:Lc,mediaElement:Tb(),dashManifestModel:hd,metricsModel:ad,events:W.default,constants:g.default,metricsConstants:i.default})}}}function yc(){if(!$c){var a=dashjs.MssHandler;"function"==typeof a&&($c=a(Kc).create({eventBus:Lc,mediaPlayerModel:bd,metricsModel:ad,playbackController:fd,protectionController:Yc,errHandler:cd,events:W.default,constants:g.default,debug:Mc,initSegmentType:ia.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:ka.default,ISOBoxer:ma.default}))}}function zc(){var a=ad.getReadOnlyMetricsFor(g.default.VIDEO)||ad.getReadOnlyMetricsFor(g.default.AUDIO);return gd.getCurrentDVRInfo(a)}function Ac(a){var b=zc(),c=void 0;return b?(c=b.manifestInfo.availableFrom.getTime()/1e3,a+(c+b.range.start)):0}function Bc(){if(!Sc)throw Dc;var a=ed.getActiveStreamInfo();return a?ed.getStreamById(a.id):null}function Cc(){!Sc&&Pc&&(Sc=!0,Oc.info("Streaming Initialized"),uc(),"string"==typeof Pc?ed.load(Pc):ed.loadWithManifest(Pc)),!Tc&&e()&&(Tc=!0,Oc.info("Playback Initialized"))}var Dc="You must first call initialize() and set a source before calling this method",Ec="You must first call initialize() and set a valid source and view before calling this method",Fc="You must first call attachView() to set the video element before calling this method",Gc="You must first call attachSource() with a valid source before calling this method",Hc="MediaPlayer not initialized!",Ic="MediaPlayer Invalid Arguments!",Jc="Playback catchup rate invalid argument! Use a number from 1 to 1.2",Kc=this.context,Lc=(0,U.default)(Kc).getInstance(),Mc=(0,S.default)(Kc).getInstance(),Nc=void 0,Oc=void 0,Pc=void 0,Qc=void 0,Rc=void 0,Sc=void 0,Tc=void 0,Uc=void 0,Vc=void 0,Wc=void 0,Xc=void 0,Yc=void 0,Zc=void 0,$c=void 0,_c=void 0,ad=void 0,bd=void 0,cd=void 0,dd=void 0,ed=void 0,fd=void 0,gd=void 0,hd=void 0,id=void 0,jd=void 0,kd=void 0,ld=void 0;return Nc={initialize:c,setConfig:b,on:f,off:h,extend:sc,attachView:Wb,attachSource:pc,isReady:e,preload:n,play:p,isPaused:t,pause:r,isSeeking:x,isDynamic:z,seek:v,setPlaybackRate:B,getPlaybackRate:D,setCatchUpPlaybackRate:F,getCatchUpPlaybackRate:H,setMute:J,isMuted:L,setVolume:N,getVolume:P,time:X,duration:Z,timeAsUTC:aa,durationAsUTC:ca,getActiveStream:Bc,getDVRWindowSize:T,getDVRSeekOffset:V,convertToTimeCode:rc,formatUTC:qc,getVersion:j,getDebug:l,getBufferLength:R,getVideoContainer:Ub,getTTMLRenderingDiv:Xb,getVideoElement:Tb,getSource:oc,setLiveDelayFragmentCount:Ha,setLiveDelay:Ia,getLiveDelay:Ja,getCurrentLiveLatency:Ka,useSuggestedPresentationDelay:La,enableLastBitrateCaching:Ma,enableLastMediaSettingsCaching:Na,setMaxAllowedBitrateFor:ea,getMaxAllowedBitrateFor:ja,getTopBitrateInfoFor:la,setMinAllowedBitrateFor:ga,getMinAllowedBitrateFor:na,setMaxAllowedRepresentationRatioFor:oa,getMaxAllowedRepresentationRatioFor:pa,setAutoPlay:Fa,getAutoPlay:Ga,setScheduleWhilePaused:Oa,getScheduleWhilePaused:Pa,getDashMetrics:Hb,getMetricsFor:Ib,getQualityFor:qa,setQualityFor:ra,updatePortalSize:sa,getLimitBitrateByPortal:ta,setLimitBitrateByPortal:ua,getUsePixelRatioInLimitBitrateByPortal:va,setUsePixelRatioInLimitBitrateByPortal:wa,setTextDefaultLanguage:Jb,getTextDefaultLanguage:Kb,setTextDefaultEnabled:Lb,getTextDefaultEnabled:Mb,enableText:Nb,enableForcedTextStreaming:Ob,isTextEnabled:Pb,setTextTrack:Qb,getBitrateInfoListFor:Zb,setInitialBitrateFor:xa,getInitialBitrateFor:ya,setInitialRepresentationRatioFor:za,getInitialRepresentationRatioFor:Aa,getStreamsFromManifest:$b,getTracksFor:_b,getTracksForTypeFromManifest:ac,getCurrentTrackFor:bc,setInitialMediaSettingsFor:cc,getInitialMediaSettingsFor:dc,setCurrentTrack:ec,getTrackSwitchModeFor:fc,setTrackSwitchModeFor:gc,setSelectionModeForInitialTrack:hc,getSelectionModeForInitialTrack:ic,setFastSwitchEnabled:Qa,getFastSwitchEnabled:Ra,setMovingAverageMethod:Ya,getMovingAverageMethod:Za,getAutoSwitchQualityFor:Ba,setAutoSwitchQualityFor:Ca,setABRStrategy:Sa,getABRStrategy:Ta,useDefaultABRRules:Ua,addABRCustomRule:Va,removeABRCustomRule:Wa,removeAllABRCustomRule:Xa,setBandwidthSafetyFactor:rb,getBandwidthSafetyFactor:sb,getAverageThroughput:tb,setAbandonLoadTimeout:ub,retrieveManifest:nc,addUTCTimingSource:ab,removeUTCTimingSource:bb,clearDefaultUTCTimingSources:cb,restoreDefaultUTCTimingSources:db,setBufferToKeep:fb,setBufferAheadToKeep:gb,setBufferPruningInterval:hb,setStableBufferTime:ib,getStableBufferTime:jb,setBufferTimeAtTopQuality:kb,getBufferTimeAtTopQuality:lb,setBufferTimeAtTopQualityLongForm:mb,getBufferTimeAtTopQualityLongForm:nb,setFragmentLoaderRetryAttempts:vb,setFragmentLoaderRetryInterval:wb,setManifestLoaderRetryAttempts:xb,setManifestLoaderRetryInterval:yb,setXHRWithCredentialsForType:zb,getXHRWithCredentialsForType:Ab,setJumpGaps:Bb,getJumpGaps:Cb,setSmallGapLimit:Db,getSmallGapLimit:Eb,getLowLatencyEnabled:$a,setLowLatencyEnabled:_a,setManifestUpdateRetryInterval:Fb,getManifestUpdateRetryInterval:Gb,setLongFormContentDurationThreshold:ob,setSegmentOverlapToleranceTime:pb,setCacheLoadThresholdForType:qb,getProtectionController:jc,attachProtectionController:kc,setProtectionData:lc,enableManifestDateHeaderTimeSource:eb,displayCaptionsOnTop:Sb,attachVideoContainer:Vb,attachTTMLRenderingDiv:Yb,getCurrentTextTrackIndex:Rb,getUseDeadTimeLatencyForAbr:Da,setUseDeadTimeLatencyForAbr:Ea,getThumbnail:mc,reset:d},a(),Nc}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(99),i=d(h),j=a(87),k=d(j),l=a(108),m=d(l),n=a(110),o=d(n),p=a(106),q=d(p),r=a(89),s=d(r),t=a(151),u=d(t),v=a(147),w=d(v),x=a(142),y=d(x),z=a(156),A=d(z),B=a(140),C=d(B),D=a(118),E=d(D),F=a(115),G=d(F),H=a(116),I=d(H),J=a(117),K=d(J),L=a(100),M=d(L),N=a(119),O=d(N),P=a(149),Q=d(P),R=a(45),S=d(R),T=a(46),U=d(T),V=a(50),W=d(V),X=a(92),Y=d(X),Z=a(47),$=d(Z),_=a(48),aa=a(52),ba=d(aa),ca=a(59),da=d(ca),ea=a(54),fa=d(ea),ga=a(77),ha=d(ga),ia=a(183),ja=a(1),ka=d(ja),la=a(5),ma=d(la);e.__dashjs_factory_name="MediaPlayer";var na=$.default.getClassFactory(e);na.events=Y.default,$.default.updateClassFactory(e.__dashjs_factory_name,na),c.default=na,b.exports=c.default},{1:1,100:100,106:106,108:108,110:110,115:115,116:116,117:117,118:118,119:119,140:140,142:142,147:147,149:149,151:151,156:156,183:183,45:45,46:46,47:47,48:48,5:5,50:50,52:52,54:54,59:59,77:77,87:87,89:89,92:92,98:98,99:99}],92:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(51),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.AST_IN_FUTURE="astInFuture",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_LOADED="bufferLoaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.ERROR="error",this.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",this.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",this.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",this.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",this.LOG="log",this.MANIFEST_LOADED="manifestLoaded",this.METRICS_CHANGED="metricsChanged",this.METRIC_CHANGED="metricChanged",this.METRIC_ADDED="metricAdded",this.METRIC_UPDATED="metricUpdated",this.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",this.PERIOD_SWITCH_STARTED="periodSwitchStarted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.TRACK_CHANGE_RENDERED="trackChangeRendered",this.SOURCE_INITIALIZED="sourceInitialized",this.STREAM_INITIALIZED="streamInitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TEXT_TRACKS_ADDED="allTextTracksAdded",this.TEXT_TRACK_ADDED="textTrackAdded",this.TTML_PARSED="ttmlParsed",this.TTML_TO_PARSE="ttmlToParse",this.CAN_PLAY="canPlay",this.PLAYBACK_CATCHUP_START="playbackCatchupStart",this.PLAYBACK_CATCHUP_END="playbackCatchupEnd",this.PLAYBACK_ENDED="playbackEnded",this.PLAYBACK_ERROR="playbackError",this.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",this.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",this.PLAYBACK_PAUSED="playbackPaused",this.PLAYBACK_PLAYING="playbackPlaying",this.PLAYBACK_PROGRESS="playbackProgress",this.PLAYBACK_RATE_CHANGED="playbackRateChanged",this.PLAYBACK_SEEKED="playbackSeeked",this.PLAYBACK_SEEKING="playbackSeeking",this.PLAYBACK_SEEK_ASKED="playbackSeekAsked",this.PLAYBACK_STALLED="playbackStalled",this.PLAYBACK_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",this.PLAYBACK_WAITING="playbackWaiting",this.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged"}return f(b,a),b}(i.default),k=new j;c.default=k,b.exports=c.default},{51:51}],93:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){n=(0,g.default)(l).getInstance().getLogger(m)}function c(){o=[],p=null,q=null}function d(a){"InitializationSegment"!==a.segmentType?(o.push(a),o.sort(function(a,b){return a.start-b.start}),p=null):p=a,n.debug("PreBufferSink appended chunk s: "+a.start+"; e: "+a.end),q&&q({chunk:a})}function e(a,b){o=o.filter(function(c){
|
22 |
+
return!((isNaN(b)||c.start<b)&&(isNaN(a)||c.end>a))})}function f(){}function h(){for(var a=[],b=0;b<o.length;b++){var c=o[b];0===a.length||c.start>a[a.length-1].end?a.push({start:c.start,end:c.end}):a[a.length-1].end=c.end}var d={start:function(b){return a[b].start},end:function(b){return a[b].end}};return Object.defineProperty(d,"length",{get:function(){return a.length}}),d}function i(){}function j(a,b){var c=k(a,b);return p&&(c.push(p),p=null),e(a,b),c}function k(a,b){return o.filter(function(c){return(isNaN(b)||c.start<b)&&(isNaN(a)||c.end>a)})}var l=this.context,m=void 0,n=void 0,o=[],p=void 0,q=a;return m={getAllBufferRanges:h,append:d,remove:e,abort:f,discharge:j,reset:c,updateTimestampOffset:i},b(),m}Object.defineProperty(c,"__esModule",{value:!0});var f=a(45),g=d(f),h=a(47),i=d(h);e.__dashjs_factory_name="PreBufferSink";var j=i.default.getClassFactory(e);c.default=j,b.exports=c.default},{45:45,47:47}],94:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c,d){function e(){C=(0,g.default)(z).getInstance().getLogger(B),E=!1;var c=b.codec;try{if(c.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))throw new Error("not really supported");D=d||a.addSourceBuffer(c);var e=50;if("function"==typeof D.addEventListener)try{D.addEventListener("updateend",w,!1),D.addEventListener("error",x,!1),D.addEventListener("abort",x,!1)}catch(h){I=setInterval(v,e)}else I=setInterval(v,e)}catch(i){if(!b.isText&&-1===c.indexOf('codecs="stpp')&&-1===c.indexOf('codecs="wvtt'))throw i;var f=(0,q.default)(z).getInstance();D=f.getTextSourceBuffer()}}function f(b){if(D){if("function"==typeof D.removeEventListener&&(D.removeEventListener("updateend",w,!1),D.removeEventListener("error",x,!1),D.removeEventListener("abort",x,!1)),clearInterval(I),!b){try{D.getClassName&&"TextSourceBuffer"===D.getClassName()||a.removeSourceBuffer(D)}catch(c){C.error("Failed to remove source buffer from media source.")}D=null}E=!1}G=[],H=null}function h(){return D}function j(){try{return D.buffered}catch(a){return C.error("getAllBufferRanges exception: "+a.message),null}}function l(a){G.push(a),E||y(D,p.bind(this))}function n(a){D.timestampOffset===a||isNaN(a)||y(D,function(){D.timestampOffset=a})}function o(b,c,d){var e=this;y(D,function(){try{b>=0&&c>b&&(d||"ended"!==a.readyState)&&D.remove(b,c),y(D,function(){A.trigger(m.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:b,to:c,unintended:!1})})}catch(f){A.trigger(m.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:b,to:c,unintended:!1,error:new i.default(f.code,f.message,null)})}})}function p(){var a=this,b=this;G.length>0&&function(){E=!0;var c=G[0];G.splice(0,1);var d=[],e=function(){var a=j();r(b,d,a,c),G.length>0?p.call(this):(E=!1,H&&H({chunk:c}))};try{0===c.bytes.length?e.call(a):(d=j(),D.appendBuffer?D.appendBuffer(c.bytes):D.append(c.bytes,c),y(D,e.bind(a)))}catch(f){C.fatal('SourceBuffer append failed "'+f+'"'),G.length>0?p():E=!1,H&&H({chunk:c,error:new i.default(f.code,f.message,null)})}}()}function r(a,b,c,d){b&&b.length>0&&b.length<c.length&&s(b,d)&&A.trigger(m.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:a,from:c.end(c.length-2),to:c.start(c.length-1),unintended:!0})}function s(a,b){for(var c=0;c<a.length;c++){var d=Math.round(a.start(c)),e=Math.round(a.end(c));if(e===b.start||d===b.end||b.start>=d&&b.end<=e)return!0}return!1}function t(){try{"open"===a.readyState?D.abort():D.setTextTrack&&"ended"===a.readyState&&D.abort()}catch(b){C.error('SourceBuffer append abort failed: "'+b+'"')}G=[]}function u(){if(F.length>0){var a=F.shift();D.updating?y(D,a):(a(),u())}}function v(){D.updating||u()}function w(){D.updating||u()}function x(){C.error("SourceBufferSink error",b.type)}function y(a,b){F.push(b),a.updating||u()}var z=this.context,A=(0,k.default)(z).getInstance(),B=void 0,C=void 0,D=void 0,E=void 0,F=[],G=[],H=c,I=void 0;return B={getAllBufferRanges:j,getBuffer:h,append:l,remove:o,abort:t,reset:f,updateTimestampOffset:n},e(),B}Object.defineProperty(c,"__esModule",{value:!0});var f=a(45),g=d(f),h=a(163),i=d(h),j=a(46),k=d(j),l=a(50),m=d(l),n=a(47),o=d(n),p=a(140),q=d(p);e.__dashjs_factory_name="SourceBufferSink";var r=o.default.getClassFactory(e);c.default=r,b.exports=c.default},{140:140,163:163,45:45,46:46,47:47,50:50}],95:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){oa=(0,u.default)(Z).getInstance().getLogger(na),j(),wa=(0,m.default)(Z).create({mediaPlayerModel:ba,metricsModel:ha,errHandler:fa}),$.on(s.default.BUFFERING_COMPLETED,N,na),$.on(s.default.DATA_UPDATE_COMPLETED,O,na)}function c(a,b){sa=a,(va=b)&&($.on(s.default.KEY_ERROR,C,na),$.on(s.default.SERVER_CERTIFICATE_UPDATED,C,na),$.on(s.default.LICENSE_REQUEST_COMPLETE,C,na),$.on(s.default.KEY_SYSTEM_SELECTED,C,na),$.on(s.default.KEY_SESSION_CREATED,C,na),$.on(s.default.KEY_STATUSES_CHANGED,C,na))}function d(a,b){if(!qa){var c=void 0;return W()?(I(),c=b,$.on(s.default.CURRENT_TRACK_CHANGED,E,na)):(c=H(a,b),$.on(s.default.CURRENT_TRACK_CHANGED,E,na)),qa=!0,c}return b}function e(a){for(var b=pa?pa.length:0,c=!1,d=0;d<b;d++){pa[d].getFragmentModel().removeExecutedRequestsBeforeTime(p()+n()),pa[d].reset(c,a)}pa=[],qa=!1,ra=!1,V(!1),$.off(s.default.CURRENT_TRACK_CHANGED,E,na)}function f(){return qa}function h(a){for(var b=0;b<pa.length;)D(pa[b].getMediaInfo())?(pa[b].setMediaSource(a),b++):(pa[b].reset(),pa.splice(b,1));for(var b=0;b<pa.length;b++)pa[b].dischargePreBuffer();if(0===pa.length){var c="No streams to play.";fa.manifestError(c,"nostreams",_.getValue()),oa.fatal(c)}}function j(){e(),sa=null,ta={},ua=!1}function l(){ja&&ja.pause(),wa&&(wa.reset(),wa=null),j(),$.off(s.default.DATA_UPDATE_COMPLETED,O,na),$.off(s.default.BUFFERING_COMPLETED,N,na),$.off(s.default.KEY_ERROR,C,na),$.off(s.default.SERVER_CERTIFICATE_UPDATED,C,na),$.off(s.default.LICENSE_REQUEST_COMPLETE,C,na),$.off(s.default.KEY_SYSTEM_SELECTED,C,na),$.off(s.default.KEY_SESSION_CREATED,C,na),$.off(s.default.KEY_STATUSES_CHANGED,C,na),V(!1)}function n(){return sa?sa.duration:NaN}function p(){return sa?sa.start:NaN}function r(){return sa?sa.id:NaN}function t(){return sa}function v(){return ya}function w(){return wa}function x(){return xa}function y(){if(!(ia&&ia.hasOwnProperty("getBitrateList")&&da&&da.hasOwnProperty("getAllMediaInfoForType")&&da.hasOwnProperty("getEventsFor")))throw new Error("Missing config parameter(s)")}function z(a){if(y(),a===g.default.IMAGE)return xa?xa.getBitrateList():[];var b=L(a);return ia.getBitrateList(b)}function A(){ya&&ya.start()}function B(){ya&&ya.stop()}function C(a){a.error&&(fa.mediaKeySessionError(a.error),oa.fatal(a.error),l())}function D(a){var b=a.type,c=void 0,d=void 0;if(b===g.default.MUXED&&a)return d="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",oa.fatal(d),fa.manifestError(d,"multiplexedrep",_.getValue()),!1;if(b===g.default.TEXT||b===g.default.FRAGMENTED_TEXT||b===g.default.EMBEDDED_TEXT||b===g.default.IMAGE)return!0;if(c=a.codec,oa.debug(b+" codec: "+c),a.contentProtection&&!ea.supportsEncryptedMedia())fa.capabilityError("encryptedmedia");else if(!ea.supportsCodec(c))return d=b+"Codec ("+c+") is not supported.",oa.error(d),!1;return!0}function E(a){if(a.newMediaInfo.streamInfo.id===sa.id){var b=P(a.oldMediaInfo);if(b){var c=ja.getTime();oa.info("Stream - Process track changed at current time "+c);var d=a.newMediaInfo,e=_.getValue();oa.debug("Stream - Update stream controller"),e.refreshManifestOnSwitchTrack?(oa.debug("Stream - Refreshing manifest for switch track"),Aa=a,ca.refreshManifest()):(b.selectMediaInfo(d),d.type!==g.default.FRAGMENTED_TEXT&&(ia.updateTopQualityIndex(d),b.switchTrackAsked(),b.getFragmentModel().abortRequests()))}}}function F(b,c,d,e){var f=(0,i.default)(Z).create({type:b.type,mimeType:b.mimeType,timelineConverter:ga,adapter:da,manifestModel:_,dashManifestModel:aa,mediaPlayerModel:ba,metricsModel:ha,dashMetrics:a.dashMetrics,baseURLController:a.baseURLController,stream:na,abrController:ia,domStorage:a.domStorage,playbackController:ja,mediaController:ka,streamController:a.streamController,textController:la,errHandler:fa});if(f.initialize(d),ia.updateTopQualityIndex(b),e?(f.setBuffer(e.buffer),f.getIndexHandler().setCurrentTime(e.currentTime),pa[e.replaceIdx]=f):pa.push(f),!e||!e.ignoreMediaInfo)if(b.type===g.default.TEXT||b.type===g.default.FRAGMENTED_TEXT){for(var h=void 0,j=0;j<c.length;j++)c[j].index===b.index&&(h=j),f.addMediaInfo(c[j]);f.selectMediaInfo(c[h])}else f.addMediaInfo(b,!0)}function G(b,c){var d=da.getAllMediaInfoForType(sa,b),e=null,f=void 0;if(!d||0===d.length)return void oa.info("No "+b+" data.");for(var h=0,i=d.length;h<i;h++)if(e=d[h],b===g.default.EMBEDDED_TEXT)la.addEmbeddedTrack(e);else{if(!D(e))continue;ka.addTrack(e)}if(b!==g.default.EMBEDDED_TEXT&&0!==ka.getTracksFor(b,sa).length){if(b===g.default.IMAGE)return void(xa=(0,o.default)(Z).create({dashManifestModel:aa,adapter:da,baseURLController:a.baseURLController,stream:na}));ka.checkInitialMediaSettingsForType(b,sa),f=ka.getCurrentTrackFor(b,sa),F(f,d,c)}}function H(a,b){y();var c=void 0,d=ma.getElement();ya||(ya=(0,k.default)(Z).create(),ya.setConfig({manifestModel:_,manifestUpdater:ca,playbackController:ja}),c=da.getEventsFor(sa),ya.addInlineEvents(c)),ua=!0,J(g.default.VIDEO),J(g.default.AUDIO),(null===d||d&&/^VIDEO$/i.test(d.nodeName))&&G(g.default.VIDEO,a),G(g.default.AUDIO,a),G(g.default.TEXT,a),G(g.default.FRAGMENTED_TEXT,a),G(g.default.EMBEDDED_TEXT,a),G(g.default.MUXED,a),G(g.default.IMAGE,a);var e=M(b);if(ra=!0,ua=!1,0===pa.length){var f="No streams to play.";fa.manifestError(f,"nostreams",_.getValue()),oa.fatal(f)}else K();return e}function I(){if(ua=!0,y(),J(g.default.VIDEO),J(g.default.AUDIO),ra=!0,ua=!1,0===pa.length){var a="No streams to play.";fa.manifestError(a,"nostreams",_.getValue()),oa.debug(a)}else K()}function J(a){var b=aa.getAdaptationForType(_.getValue(),sa.index,a,sa);if(!b||!Array.isArray(b.Representation_asArray))return null;b.Representation_asArray=b.Representation_asArray.filter(function(a,c){if(0===c)return!0;var d=aa.getCodec(b,c,!0);return!!ea.supportsCodec(d)||(oa.error("[Stream] codec not supported: "+d),!1)})}function K(){for(var a=pa.length,b=!!ta.audio||!!ta.video,c=b?new Error(Y,"Data update failed",null):null,d=0;d<a;d++)if(pa[d].isUpdating()||ua)return;if(ra){if(va)for(var d=0;d<a&&pa[d];d++)pa[d].getType()!==g.default.AUDIO&&pa[d].getType()!==g.default.VIDEO&&pa[d].getType()!==g.default.FRAGMENTED_TEXT||va.initializeForMedia(pa[d].getMediaInfo());$.trigger(s.default.STREAM_INITIALIZED,{streamInfo:sa,error:c})}}function L(a){for(var b=pa.length,c=null,d=0;d<b;d++)if(c=pa[d],c.getType()===a)return c.getMediaInfo();return null}function M(a){for(var b={},c=0,d=pa.length;c<d;c++)b[pa[c].getType()]=pa[c].createBuffer(a).getBuffer();return b}function N(a){if(a.streamInfo===sa){var b=Q(),c=b.length;if(0===c)return void oa.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined");for(var d=0;d<c;d++)if(!b[d].isBufferingCompleted()&&(b[d].getType()===g.default.AUDIO||b[d].getType()===g.default.VIDEO))return void oa.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because streamProcessor "+b[d].getType()+" is not buffering completed");oa.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),$.trigger(s.default.STREAM_BUFFERING_COMPLETED,{streamInfo:sa})}}function O(a){var b=a.sender.getStreamProcessor();b.getStreamInfo()===sa&&(ta[b.getType()]=a.error,K())}function P(a){return!!a&&Q().filter(function(b){return b.getType()===a.type})[0]}function Q(){for(var a=pa.length,b=[],c=void 0,d=void 0,e=0;e<a;e++)d=pa[e],(c=d.getType())!==g.default.AUDIO&&c!==g.default.VIDEO&&c!==g.default.FRAGMENTED_TEXT&&c!==g.default.TEXT||b.push(d);return b}function R(a){if(oa.info("Manifest updated... updating data system wide."),qa=!1,ua=!0,sa=a,ya){var b=da.getEventsFor(sa);ya.addInlineEvents(b)}J(g.default.VIDEO),J(g.default.AUDIO);for(var c=0,d=pa.length;c<d;c++){var e=pa[c],f=da.getMediaInfoForType(sa,e.getType());ia.updateTopQualityIndex(f),e.addMediaInfo(f,!0)}if(Aa){var f=Aa.newMediaInfo;if("fragmentedText"!==f.type){var h=P(Aa.oldMediaInfo);if(!h)return;h.switchTrackAsked(),Aa=void 0}}ua=!1,K()}function S(a){return T(a,g.default.VIDEO)&&T(a,g.default.AUDIO)}function T(a,b){var c=a.getStreamInfo(),d=t();if(!c||!d)return!1;var e=aa.getAdaptationForType(_.getValue(),c.index,b,c),f=aa.getAdaptationForType(_.getValue(),d.index,b,d);if(!e||!f)return!e&&!f;var g=e&&f&&e.mimeType===f.mimeType,h=f.Representation_asArray.map(function(a){return a.codecs}),i=e.Representation_asArray.map(function(a){return a.codecs}),j=i.some(function(a){return h.indexOf(a)>-1}),k=i.some(function(a){return h.some(function(b){return U(b,a)})});return j||k&&g}function U(a,b){var c=a.split(".")[0],d=Ba.find(function(a){return a.codec===c}),e=0===b.indexOf(c);return d?e||d.compatibleCodecs.some(function(a){return 0===b.indexOf(a)}):e}function V(a){za=a}function W(){return za}function X(a,b){var c=void 0;ya||(ya=(0,k.default)(Z).create(),ya.setConfig({manifestModel:_,manifestUpdater:ca,playbackController:ja}),c=da.getEventsFor(sa),ya.addInlineEvents(c)),G(g.default.VIDEO,a),G(g.default.AUDIO,a),G(g.default.TEXT,a),G(g.default.FRAGMENTED_TEXT,a),G(g.default.EMBEDDED_TEXT,a),G(g.default.MUXED,a),G(g.default.IMAGE,a),M(b),$.on(s.default.CURRENT_TRACK_CHANGED,E,na);for(var d=0;d<pa.length&&pa[d];d++)pa[d].getScheduleController().start();V(!0)}var Y=1;a=a||{};var Z=this.context,$=(0,q.default)(Z).getInstance(),_=a.manifestModel,aa=a.dashManifestModel,ba=a.mediaPlayerModel,ca=a.manifestUpdater,da=a.adapter,ea=a.capabilities,fa=a.errHandler,ga=a.timelineConverter,ha=a.metricsModel,ia=a.abrController,ja=a.playbackController,ka=a.mediaController,la=a.textController,ma=a.videoModel,na=void 0,oa=void 0,pa=void 0,qa=void 0,ra=void 0,sa=void 0,ta=void 0,ua=void 0,va=void 0,wa=void 0,xa=void 0,ya=void 0,za=void 0,Aa=void 0,Ba=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];return na={initialize:c,activate:d,deactivate:e,isActive:f,getDuration:n,getStartTime:p,getId:r,getStreamInfo:t,preload:X,getFragmentController:w,getThumbnailController:x,getEventController:v,getBitrateListFor:z,startEventController:A,stopEventController:B,updateData:R,reset:l,getProcessors:Q,setMediaSource:h,isCompatibleWithStream:S,getPreloaded:W},b(),na}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(96),i=d(h),j=a(104),k=d(j),l=a(105),m=d(l),n=a(143),o=d(n),p=a(46),q=d(p),r=a(50),s=d(r),t=a(45),u=d(t),v=a(47),w=d(v);e.__dashjs_factory_name="Stream",c.default=w.default.getClassFactory(e),b.exports=c.default},{104:104,105:105,143:143,45:45,46:46,47:47,50:50,96:96,98:98}],96:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){da&&da.getIsDynamic()&&(qa=(0,i.default)(U).create({timelineConverter:Z,streamProcessor:la})),j()}function c(b){V=(0,u.default)(U).create({mimeType:Y,timelineConverter:Z,dashMetrics:ja,metricsModel:ia,mediaPlayerModel:aa,baseURLController:a.baseURLController,errHandler:X}),V.initialize(la),ca.registerStreamType(W,la),sa=ba.getFragmentController().getModel(W),sa.setStreamProcessor(la),oa=S(W),pa=(0,o.default)(U).create({type:W,mimeType:Y,metricsModel:ia,adapter:$,dashMetrics:ja,dashManifestModel:ka,timelineConverter:Z,mediaPlayerModel:aa,abrController:ca,playbackController:da,streamController:ea,textController:ga,streamProcessor:la,mediaController:fa}),ra=(0,q.default)(U).create(),ra.setConfig({abrController:ca,domStorage:ha,metricsModel:ia,dashMetrics:ja,dashManifestModel:ka,manifestModel:_,playbackController:da,timelineConverter:Z,streamProcessor:la}),oa.initialize(b),pa.initialize(),ra.initialize()}function d(a){ta.push(a)}function e(a){var b=ta.indexOf(a);-1!==b&&ta.splice(b,1)}function f(){return ta}function h(){ta=[]}function j(){na=[],ma=null,h()}function l(a,b){V.reset(),oa&&(oa.reset(a,b),oa=null),pa&&(pa.reset(),pa=null),ra&&(ra.reset(),ra=null),ca&&ca.unRegisterStreamType(W),ta.forEach(function(a){a.reset()}),j(),W=null,ba=null,qa&&(qa.reset(),qa=null)}function n(){return!!ra&&ra.isUpdating()}function p(){return W}function r(){return ra}function s(){return V}function t(){return ba?ba.getFragmentController():null}function v(){return oa.getBuffer()}function w(a){oa.setBuffer(a)}function x(){return oa}function y(){return sa}function z(){return qa}function A(){return ba?ba.getStreamInfo():null}function B(){return ba?ba.getEventController():null}function C(a){a===ma||a&&ma&&a.type!==ma.type||(ma=a),$.updateData(this)}function D(a,b){-1===na.indexOf(a)&&na.push(a),b&&this.selectMediaInfo(a)}function E(){return na}function F(){return ma}function G(){return oa.getMediaSource()}function H(a){oa.setMediaSource(a,F())}function I(){oa.dischargePreBuffer()}function J(){return pa}function K(){return $.getCurrentRepresentationInfo(ra)}function L(a){return $.getRepresentationInfoForQuality(ra,a)}function M(){return!!oa&&oa.getIsBufferingCompleted()}function N(a){return!!oa&&null!==oa.getRangeAt(a,0)}function O(){return oa.getBufferLevel()}function P(a,b){oa&&oa.switchInitData(A().id,a,b)}function Q(a){return oa.getBuffer()||oa.createBuffer(ma,a)}function R(){pa.switchTrackAsked()}function S(a){return a===g.default.VIDEO||a===g.default.AUDIO?(0,k.default)(U).create({type:a,metricsModel:ia,mediaPlayerModel:aa,manifestModel:_,errHandler:X,streamController:ea,mediaController:fa,adapter:$,textController:ga,abrController:ca,playbackController:da,streamProcessor:la}):(0,m.default)(U).create({type:a,mimeType:Y,metricsModel:ia,mediaPlayerModel:aa,manifestModel:_,errHandler:X,streamController:ea,mediaController:fa,adapter:$,textController:ga,abrController:ca,playbackController:da,streamProcessor:la})}function T(){return da}a=a||{};var U=this.context,V=void 0,W=a.type,X=a.errHandler,Y=a.mimeType,Z=a.timelineConverter,$=a.adapter,_=a.manifestModel,aa=a.mediaPlayerModel,ba=a.stream,ca=a.abrController,da=a.playbackController,ea=a.streamController,fa=a.mediaController,ga=a.textController,ha=a.domStorage,ia=a.metricsModel,ja=a.dashMetrics,ka=a.dashManifestModel,la=void 0,ma=void 0,na=void 0,oa=void 0,pa=void 0,qa=void 0,ra=void 0,sa=void 0,ta=void 0;return la={initialize:c,isUpdating:n,getType:p,getBufferController:x,getFragmentModel:y,getScheduleController:J,getLiveEdgeFinder:z,getEventController:B,getFragmentController:t,getRepresentationController:r,getIndexHandler:s,getPlaybackController:T,getCurrentRepresentationInfo:K,getRepresentationInfoForQuality:L,getBufferLevel:O,switchInitData:P,isBufferingCompleted:M,timeIsBuffered:N,createBuffer:Q,getStreamInfo:A,selectMediaInfo:C,addMediaInfo:D,switchTrackAsked:R,getMediaInfoArr:E,getMediaInfo:F,getMediaSource:G,setMediaSource:H,dischargePreBuffer:I,getBuffer:v,setBuffer:w,registerExternalController:d,unregisterExternalController:e,getExternalControllers:f,unregisterAllExternalController:h,reset:l},b(),la}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(154),i=d(h),j=a(103),k=d(j),l=a(139),m=d(l),n=a(109),o=d(n),p=a(58),q=d(p),r=a(47),s=d(r),t=a(53),u=d(t);e.__dashjs_factory_name="StreamProcessor",c.default=s.default.getClassFactory(e),b.exports=c.default},{103:103,109:109,139:139,154:154,47:47,53:53,58:58,98:98}],97:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b,c){var e=function(d,e){b.resolved=!0,b.resolvedContent=d||null,f.trigger(p.default.XLINK_ELEMENT_LOADED,{element:b,resolveObject:c,error:d||e?null:new g.default(s,"Failed loading Xlink element: "+a)})};if(a===d)e(null,!0);else{var i=new l.default(a,j.HTTPRequest.XLINK_TYPE);h.load({request:i,success:function(a){e(a)},error:function(){e(null)}})}}function c(){h&&(h.abort(),h=null)}a=a||{};var d="urn:mpeg:dash:resolve-to-zero:2013",e=this.context,f=(0,n.default)(e).getInstance(),h=(0,i.default)(e).create({errHandler:a.errHandler,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier});return{load:b,reset:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(163),g=d(f),h=a(121),i=d(h),j=a(183),k=a(174),l=d(k),m=a(46),n=d(m),o=a(50),p=d(o),q=a(47),r=d(q),s=1;e.__dashjs_factory_name="XlinkLoader";var t=r.default.getClassFactory(e);t.XLINK_LOADER_ERROR_LOADING_FAILURE=s,r.default.updateClassFactory(e.__dashjs_factory_name,t),c.default=t,b.exports=c.default},{121:121,163:163,174:174,183:183,46:46,47:47,50:50}],98:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this.init()}return e(a,[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.FRAGMENTED_TEXT="fragmentedText",this.EMBEDDED_TEXT="embeddedText",this.MUXED="muxed",this.IMAGE="image",this.LOCATION="Location",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.CC1="CC1",this.CC3="CC3",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.UTF8="utf-8",this.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],99:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this.init()}return e(a,[{key:"init",value:function(){this.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],100:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){va=sa.getLogger(ua),e()}function b(a,b){Sa[a]=(0,A.default)(ra).create(),Da[a]=b,Ea[a]=Ea[a]||{},Ea[a].state=J,Va[a]=!1,ta.on(s.default.LOADING_PROGRESS,qa,this),a==i.default.VIDEO&&(ta.on(s.default.QUALITY_CHANGE_RENDERED,j,this),Ta=(0,C.default)(ra).create(),oa()),ta.on(s.default.METRIC_ADDED,l,this),ta.on(s.default.PERIOD_SWITCH_COMPLETED,d,this),Ua=(0,E.default)(ra).create({mediaPlayerModel:Pa})}function c(a){delete Da[a]}function d(){wa=(0,g.default)(ra).create({metricsModel:Wa,dashMetrics:Xa,mediaPlayerModel:Pa,adapter:Na}),wa.initialize()}function e(){ya={video:!0,audio:!0},za={},Aa={},Ba={},Ca={},Ea={},Da={},Sa={},Va={},Ga=!1,Ya=!0,Ha=!1,void 0===Ia&&(Ia=!1),Ra=void 0,Ta=void 0,Ua=void 0,clearTimeout(Fa),Fa=null}function f(){e(),ta.off(s.default.LOADING_PROGRESS,qa,this),ta.off(s.default.QUALITY_CHANGE_RENDERED,j,this),ta.off(s.default.METRIC_ADDED,l,this),ta.off(s.default.PERIOD_SWITCH_COMPLETED,d,this),wa&&wa.reset()}function h(a){a&&(a.streamController&&(xa=a.streamController),a.domStorage&&(Qa=a.domStorage),a.mediaPlayerModel&&(Pa=a.mediaPlayerModel),a.metricsModel&&(Wa=a.metricsModel),a.dashMetrics&&(Xa=a.dashMetrics),a.dashManifestModel&&(Ma=a.dashManifestModel),a.adapter&&(Na=a.adapter),a.manifestModel&&(La=a.manifestModel),a.videoModel&&(Oa=a.videoModel))}function j(a){a.mediaType===i.default.VIDEO&&(Ra=a.oldQuality,Ta.push(Ra,Oa.getPlaybackQuality()))}function l(a){a.metric!==k.default.HTTP_REQUEST||!a.value||a.value.type!==F.HTTPRequest.MEDIA_SEGMENT_TYPE||a.mediaType!==i.default.AUDIO&&a.mediaType!==i.default.VIDEO||Ua.push(a.mediaType,a.value,Ya),a.metric!==k.default.BUFFER_LEVEL||a.mediaType!==i.default.AUDIO&&a.mediaType!==i.default.VIDEO||da(a.mediaType,.001*a.value.level)}function n(a,b){var c=void 0;return za[b]=za[b]||{},za[b].hasOwnProperty(a)||(za[b][a]=0),c=la(za[b][a],a),c=ma(c,a,za[b][a]),c=pa(c,a)}function p(a){if(a&&Da&&Da[a]){var b=Da[a].getStreamInfo();if(b.id){var c=n(a,b.id),d=ca(Da[a].getMediaInfo());return d[c]?d[c]:null}}return null}function r(a){var b=Qa.getSavedBitrateSettings(a);if(!Ba.hasOwnProperty(a))if(Ca.hasOwnProperty(a)){var c=La.getValue(),d=Ma.getAdaptationForType(c,0,a).Representation;if(Array.isArray(d)){var e=Math.max(Math.round(d.length*Ca[a])-1,0);Ba[a]=d[e].bandwidth}else Ba[a]=0}else isNaN(b)?Ba[a]=a===i.default.VIDEO?K:L:Ba[a]=b;return Ba[a]}function t(a,b){Ba[a]=b}function u(a){return Ca.hasOwnProperty(a)?Ca[a]:null}function v(a,b){Ca[a]=b}function x(a){return Ba.hasOwnProperty("max")&&Ba.max.hasOwnProperty(a)?Ba.max[a]:NaN}function z(a){return Ba.hasOwnProperty("min")&&Ba.min.hasOwnProperty(a)?Ba.min[a]:NaN}function B(a,b){Ba.max=Ba.max||{},Ba.max[a]=b}function D(a,b){Ba.min=Ba.min||{},Ba.min[a]=b}function G(a){var b=x(a);return b?ba(Da[a].getMediaInfo(),b):void 0}function N(a){var b=z(a);if(b){var c=ca(Da[a].getMediaInfo()),d=ba(Da[a].getMediaInfo(),b);return c[d]&&d<c.length-1&&c[d].bitrate<1e3*b&&d++,d}}function O(a){return Ca.hasOwnProperty("max")&&Ca.max.hasOwnProperty(a)?Ca.max[a]:1}function P(a,b){Ca.max=Ca.max||{},Ca.max[a]=b}function Q(a){return ya[a]}function R(a,b){ya[a]=b}function S(){return Ga}function T(a){Ga=a}function U(){return Ha}function V(a){Ha=a}function W(){return Ya}function X(a){Ya=a}function Y(a){if(a&&Da&&Da[a]){var b=Da[a].getStreamInfo(),c=b?b.id:null,d=ia(a),e=(0,w.default)(ra).create({abrController:ua,streamProcessor:Da[a],currentValue:d,switchHistory:Sa[a],droppedFramesHistory:Ta,useBufferOccupancyABR:ea(a)});if(Ta){var f=Oa.getPlaybackQuality();f&&Ta.push(Ra,f)}if(Q(a)){var g=N(a),h=n(a,c),i=wa.getMaxQuality(e),j=i.quality;if(void 0!==g&&j<g&&(j=g),j>h&&(j=h),Sa[a].push({oldValue:d,newValue:j}),j>y.default.NO_CHANGE&&j!=d)(Ea[a].state===J||j>d)&&$(a,d,j,h,i.reason);else if(sa.getLogToBrowserConsole()){var k=Xa.getCurrentBufferLevel(Wa.getReadOnlyMetricsFor(a));va.debug("AbrController ("+a+") stay on "+d+"/"+h+" (buffer: "+k+")")}}}}function Z(a,b,c,d){var e=b.id,f=ia(a);if(null===c||isNaN(c)||c%1!=0)throw new Error("argument is not an integer");var g=n(a,e);c!==f&&c>=0&&c<=g&&$(a,f,c,g,d)}function $(a,b,c,d,e){if(a&&Da[a]){var f=Da[a].getStreamInfo(),g=f?f.id:null;if(sa.getLogToBrowserConsole()){var h=Xa.getCurrentBufferLevel(Wa.getReadOnlyMetricsFor(a));va.info("AbrController ("+a+") switch from "+b+" to "+c+"/"+d+" (buffer: "+h+") "+(e?JSON.stringify(e):"."))}ja(a,g,c),ta.trigger(s.default.QUALITY_CHANGE_REQUESTED,{mediaType:a,streamInfo:f,oldQuality:b,newQuality:c,reason:e})}}function _(a,b){Ea[a].state=b}function aa(a){return Ea[a]?Ea[a].state:null}function ba(a,b,c){if(Ya&&c&&Da[a.type].getCurrentRepresentationInfo()&&Da[a.type].getCurrentRepresentationInfo().fragmentDuration){c/=1e3;var d=Da[a.type].getCurrentRepresentationInfo().fragmentDuration;if(c>d)return 0;b*=1-c/d}var e=ca(a);if(!e||0===e.length)return M;for(var f=e.length-1;f>=0;f--){if(1e3*b>=e[f].bitrate)return f}return 0}function ca(a){if(!a||!a.bitrateList)return null;for(var b=a.bitrateList,c=a.type,d=[],e=void 0,f=0,g=b.length;f<g;f++)e=new m.default,e.mediaType=c,e.qualityIndex=f,e.bitrate=b[f].bandwidth,e.width=b[f].width,e.height=b[f].height,e.scanType=b[f].scanType,d.push(e);return d}function da(a,b){var c=Pa.getABRStrategy();if(c===i.default.ABR_STRATEGY_BOLA)return void(Va[a]=!0);if(c===i.default.ABR_STRATEGY_THROUGHPUT)return void(Va[a]=!1);var d=Pa.getStableBufferTime(),e=d,f=.5*d,g=Va[a],h=b>(g?f:e);Va[a]=h,h!==g&&(h?va.info("AbrController ("+a+") switching from throughput to buffer occupancy ABR rule (buffer: "+b.toFixed(3)+")."):va.info("AbrController ("+a+") switching from buffer occupancy to throughput ABR rule (buffer: "+b.toFixed(3)+")."))}function ea(a){return Va[a]}function fa(){return Ua}function ga(a){var b=a.type,c=a.streamInfo.id,d=a.representationCount-1;return ka(b,c,d),d}function ha(a){var b=a.id,c=ia(i.default.AUDIO),d=ia(i.default.VIDEO);return c===n(i.default.AUDIO,b)&&d===n(i.default.VIDEO,b)}function ia(a){if(a&&Da[a]){var b=Da[a].getStreamInfo(),c=b?b.id:null;if(c)return Aa[c]=Aa[c]||{},Aa[c].hasOwnProperty(a)||(Aa[c][a]=M),Aa[c][a]}return M}function ja(a,b,c){Aa[b]=Aa[b]||{},Aa[b][a]=c}function ka(a,b,c){za[b]=za[b]||{},za[b][a]=c}function la(a,b){var c=a;if(!Da[b])return c;var d=N(b);void 0!==d&&(c=Math.max(a,d));var e=G(b);return void 0!==e&&(c=Math.min(c,e)),c}function ma(a,b,c){var d=O(b);return isNaN(d)||d>=1||d<0?a:Math.min(a,Math.round(c*d))}function na(a){Ia=a}function oa(){if(Oa){var a=Ha&&window.hasOwnProperty("devicePixelRatio"),b=a?window.devicePixelRatio:1;Ja=Oa.getClientWidth()*b,Ka=Oa.getClientHeight()*b}}function pa(a,b){if(b!==i.default.VIDEO||!Ga||!Da[b])return a;Ia||oa();var c=La.getValue(),d=Ma.getAdaptationForType(c,0,b).Representation,e=a;if(Ja>0&&Ka>0){for(;e>0&&d[e]&&Ja<d[e].width&&Ja-d[e-1].width<d[e].width-Ja;)e-=1;d.length-2>=e&&d[e].width===d[e+1].width&&(e=Math.min(a,e+1))}return e}function qa(a){var b=a.request.mediaType;if(Q(b)){var c=Da[b];if(!c)return;var d=(0,w.default)(ra).create({abrController:ua,streamProcessor:c,currentRequest:a.request,useBufferOccupancyABR:ea(b)}),e=wa.shouldAbandonFragment(d);if(e.quality>y.default.NO_CHANGE){var f=c.getFragmentModel();f.getRequests({state:o.default.FRAGMENT_MODEL_LOADING,index:a.request.index})[0]&&(f.abortRequests(),_(b,I),Sa[b].reset(),Sa[b].push({oldValue:ia(b,xa.getActiveStreamInfo()),newValue:e.quality,confidence:1,reason:e.reason}),Z(b,xa.getActiveStreamInfo(),e.quality,e.reason),clearTimeout(Fa),Fa=setTimeout(function(){_(b,J),Fa=null},Pa.getAbandonLoadTimeout()))}}}var ra=this.context,sa=(0,H.default)(ra).getInstance(),ta=(0,q.default)(ra).getInstance(),ua=void 0,va=void 0,wa=void 0,xa=void 0,ya=void 0,za=void 0,Aa=void 0,Ba=void 0,Ca=void 0,Da=void 0,Ea=void 0,Fa=void 0,Ga=void 0,Ha=void 0,Ia=void 0,Ja=void 0,Ka=void 0,La=void 0,Ma=void 0,Na=void 0,Oa=void 0,Pa=void 0,Qa=void 0,Ra=void 0,Sa=void 0,Ta=void 0,Ua=void 0,Va=void 0,Wa=void 0,Xa=void 0,Ya=void 0;return ua={isPlayingAtTopQuality:ha,updateTopQualityIndex:ga,getThroughputHistory:fa,getBitrateList:ca,getQualityForBitrate:ba,getMaxAllowedBitrateFor:x,getTopBitrateInfoFor:p,getMinAllowedBitrateFor:z,setMaxAllowedBitrateFor:B,setMinAllowedBitrateFor:D,getMaxAllowedIndexFor:G,getMinAllowedIndexFor:N,getMaxAllowedRepresentationRatioFor:O,setMaxAllowedRepresentationRatioFor:P,getInitialBitrateFor:r,setInitialBitrateFor:t,getInitialRepresentationRatioFor:u,setInitialRepresentationRatioFor:v,setAutoSwitchBitrateFor:R,getAutoSwitchBitrateFor:Q,getUseDeadTimeLatency:W,setUseDeadTimeLatency:X,setLimitBitrateByPortal:T,getLimitBitrateByPortal:S,getUsePixelRatioInLimitBitrateByPortal:U,setUsePixelRatioInLimitBitrateByPortal:V,getQualityFor:ia,getAbandonmentStateFor:aa,setPlaybackQuality:Z,checkPlaybackQuality:Y,getTopQualityIndexFor:n,setElementSize:oa,setWindowResizeEventCalled:na,createAbrRulesCollection:d,registerStreamType:b,unRegisterStreamType:c,setConfig:h,reset:f},a(),ua}Object.defineProperty(c,"__esModule",{value:!0})
|
23 |
+
;var f=a(128),g=d(f),h=a(98),i=d(h),j=a(99),k=d(j),l=a(162),m=d(l),n=a(114),o=d(n),p=a(46),q=d(p),r=a(50),s=d(r),t=a(47),u=d(t),v=a(124),w=d(v),x=a(125),y=d(x),z=a(126),A=d(z),B=a(123),C=d(B),D=a(127),E=d(D),F=a(183),G=a(45),H=d(G),I="abandonload",J="allowload",K=1e3,L=100,M=0;e.__dashjs_factory_name="AbrController";var N=u.default.getSingletonFactory(e);N.ABANDON_LOAD=I,N.QUALITY_DEFAULT=M,u.default.updateSingletonFactory(e.__dashjs_factory_name,N),c.default=N,b.exports=c.default},{114:114,123:123,124:124,125:125,126:126,127:127,128:128,162:162,183:183,45:45,46:46,47:47,50:50,98:98,99:99}],101:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){r.invalidateSelectedIndexes(a.entry)}function b(){r=(0,g.default)(n).create(),t=(0,i.default)(n).create(),o.on(s.default.SERVICE_LOCATION_BLACKLIST_CHANGED,a,j)}function c(a){a.baseURLTreeModel&&(r=a.baseURLTreeModel),a.baseURLSelector&&(t=a.baseURLSelector),a.dashManifestModel&&(l=a.dashManifestModel)}function d(a){r.update(a),t.chooseSelectorFromManifest(a)}function e(a){var b=r.getForPath(a),c=b.reduce(function(a,b){var c=t.select(b);return c?(p.isRelative(c.url)?a.url=p.resolve(c.url,a.url):(a.url=c.url,a.serviceLocation=c.serviceLocation),a.availabilityTimeOffset=c.availabilityTimeOffset,a.availabilityTimeComplete=c.availabilityTimeComplete,a):new m.default},new m.default);if(!p.isRelative(c.url))return c}function f(){r.reset(),t.reset()}function h(a){r.setConfig({dashManifestModel:l}),t.setConfig({dashManifestModel:l}),d(a)}var j=void 0,l=void 0,n=this.context,o=(0,q.default)(n).getInstance(),p=(0,k.default)(n).getInstance(),r=void 0,t=void 0;return j={reset:f,initialize:h,resolve:e,setConfig:c},b(),j}Object.defineProperty(c,"__esModule",{value:!0});var f=a(113),g=d(f),h=a(145),i=d(h),j=a(158),k=d(j),l=a(80),m=d(l),n=a(47),o=d(n),p=a(46),q=d(p),r=a(50),s=d(r);e.__dashjs_factory_name="BaseURLController",c.default=o.default.getSingletonFactory(e),b.exports=c.default},{113:113,145:145,158:158,46:46,47:47,50:50,80:80}],102:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){return!!(g.length&&a&&a.length)&&-1!==g.indexOf(a)}function c(a){-1===g.indexOf(a)&&(g.push(a),h.trigger(j,{entry:a}))}function d(a){c(a.entry)}function e(){k&&h.on(k,d,this)}function f(){g=[]}a=a||{};var g=[],h=(0,i.default)(this.context).getInstance(),j=a.updateEventName,k=a.addBlacklistEventName;return e(),{add:c,contains:b,reset:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(46),i=d(h);e.__dashjs_factory_name="BlackListController",c.default=g.default.getClassFactory(e),b.exports=c.default},{46:46,47:47}],103:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){Ia=(0,A.default)(ua).getInstance().getLogger(Ha),Wa=(0,C.default)(ua).getInstance(),sa()}function c(){return K}function d(a){ma(a),Ja=Da.getQualityFor(Fa,Ga.getStreamInfo()),va.on(u.default.DATA_UPDATE_COMPLETED,ba,this),va.on(u.default.INIT_FRAGMENT_LOADED,j,this),va.on(u.default.MEDIA_FRAGMENT_LOADED,n,this),va.on(u.default.QUALITY_CHANGE_REQUESTED,v,this),va.on(u.default.STREAM_COMPLETED,ca,this),va.on(u.default.PLAYBACK_PLAYING,O,this),va.on(u.default.PLAYBACK_PROGRESS,M,this),va.on(u.default.PLAYBACK_TIME_UPDATED,M,this),va.on(u.default.PLAYBACK_RATE_CHANGED,fa,this),va.on(u.default.PLAYBACK_SEEKING,x,this),va.on(u.default.PLAYBACK_SEEKED,y,this),va.on(u.default.PLAYBACK_STALLED,N,this),va.on(u.default.WALLCLOCK_TIME_UPDATED,ea,this),va.on(u.default.CURRENT_TRACK_CHANGED,da,this,s.default.EVENT_PRIORITY_HIGH),va.on(u.default.SOURCEBUFFER_REMOVE_COMPLETED,_,this)}function e(a,b){if(!Wa||!a||!Ga)return null;if(Na)try{Qa=b&&b[Fa]?(0,k.default)(ua).create(Na,a,t.bind(this),b[Fa]):(0,k.default)(ua).create(Na,a,t.bind(this)),"function"==typeof Qa.getBuffer().initialize&&Qa.getBuffer().initialize(Fa,Ga)}catch(c){Ia.fatal("Caught error on create SourceBuffer: "+c),ya.mediaSourceError("Error creating "+Fa+" source buffer.")}else Qa=(0,m.default)(ua).create(t.bind(this));return aa(Ga.getRepresentationInfoForQuality(Ja).MSETimeOffset),Qa}function f(){if(Qa&&Ra&&"function"==typeof Ra.discharge){var a=Ra.getAllBufferRanges();if(a.length>0){for(var b="Beginning "+Fa+"PreBuffer discharge, adding buffer for:",c=0;c<a.length;c++)b+=" start: "+a.start(c)+", end: "+a.end(c)+";";Ia.debug(b)}else Ia.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");for(var d=Ra.discharge(),e=null,f=0;f<d.length;f++){var g=d[f],h=Wa.extract(g.streamId,g.representationId);h&&(e!==h&&(Qa.append(h),e=h),Qa.append(g))}Ra.reset(),Ra=null}}function h(){return Ga&&za&&Ga.getStreamInfo()}function j(a){a.fragmentModel===Ga.getFragmentModel()&&(Ia.info("Init fragment finished loading saving to",Fa+"'s init cache"),Wa.save(a.chunk),Ia.debug("Append Init fragment",Fa," with representationId:",a.chunk.representationId," and quality:",a.chunk.quality),p(a.chunk))}function l(a,b,c){var d=Wa.extract(a,b);$a=!0===c&&c,d?(Ia.info("Append Init fragment",Fa," with representationId:",d.representationId," and quality:",d.quality),p(d)):va.trigger(u.default.INIT_REQUESTED,{sender:Ha})}function n(a){if(a.fragmentModel===Ga.getFragmentModel()){var b=a.chunk,c=b.bytes,d=b.quality,e=Ga.getRepresentationInfoForQuality(d),f=Ba.getEventsFor(e.mediaInfo,Ga),g=Ba.getEventsFor(e,Ga);if(f&&f.length>0||g&&g.length>0){var h=Ga.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,quality:d,index:b.index})[0],j=W(c,h,f,g);Ga.getEventController().addInbandEvents(j)}if($a){_a=b;var k=Qa&&Qa.getAllBufferRanges();k&&k.length>0&&Ea.getTimeToStreamEnd()>G&&(Ia.debug("Clearing buffer because track changed - "+(k.end(k.length-1)+H)),Z([{start:0,end:k.end(k.length-1)+H,force:!0}]))}else p(b)}}function p(a){Qa.append(a),a.mediaInfo.type===g.default.VIDEO&&va.trigger(u.default.VIDEO_CHUNK_RECEIVED,{chunk:a})}function r(a){if(a&&a.length>0)for(var b=0,c=a.length;b<c;b++)Ia.debug("Buffered Range for type:",Fa,":",a.start(b)," - ",a.end(b)," currentTime = ",Ea.getTime())}function t(a){if(a.error){if(a.error.code===J&&(Ma=.8*qa(),Ia.warn("Quota exceeded for type: "+Fa+", Critical Buffer: "+Ma),Ma>0)){var b=Math.max(.2*Ma,1),c=Ma-b;xa.setBufferToKeep(parseFloat(b).toFixed(5)),xa.setBufferAheadToKeep(parseFloat(c).toFixed(5))}return void(a.error.code!==J&&ra()||(Ia.warn("Clearing playback buffer to overcome quota exceed situation for type: "+Fa),va.trigger(u.default.QUOTA_EXCEEDED,{sender:Ha,criticalBufferLevel:Ma}),z()))}(Ta=a.chunk)&&!isNaN(Ta.index)&&(Oa=Math.max(Ta.index,Oa),T());var d=Qa.getAllBufferRanges();if(Ta.segmentType===D.HTTPRequest.MEDIA_SEGMENT_TYPE)r(d),M();else if($a){var e=Ea.getTime();Ia.debug("AppendToBuffer seek target should be "+e),Ga.getScheduleController().setSeekTarget(e),Ba.setIndexHandlerTime(Ga,e)}var f={sender:Ha,quality:Ta.quality,startTime:Ta.start,index:Ta.index,bufferedRanges:d};Ta&&!Ta.endFragment?va.trigger(u.default.BYTES_APPENDED,f):Ta&&va.trigger(u.default.BYTES_APPENDED_END_FRAGMENT,f)}function v(a){Ja!==a.newQuality&&Fa===a.mediaType&&Ga.getStreamInfo().id===a.streamInfo.id&&(aa(Ga.getRepresentationInfoForQuality(a.newQuality).MSETimeOffset),Ja=a.newQuality)}function x(){Ka&&(Ya=!0,Ka=!1,Pa=Number.POSITIVE_INFINITY),Fa!==g.default.FRAGMENTED_TEXT?z():M()}function y(){Xa=void 0}function z(){var a=B();a&&0!==a.length||M(),Z(a)}function B(){var a=[],b=Qa.getAllBufferRanges();if(!b||0===b.length)return a;var c=Ea.getTime(),d=b.end(b.length-1)+H,e=Ga.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:c,threshold:I})[0];if(e){var f={start:0,end:e.startTime-G},g=Ga.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:e.startTime-e.duration/2,threshold:I})[0];g&&g.startTime!=e.startTime&&(f.end=g.startTime),f.start<f.end&&f.end>b.start(0)&&a.push(f);var h={start:e.startTime+e.duration+G,end:d},j=Ga.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:e.startTime+e.duration+G,threshold:I})[0];j&&j.startTime!==e.startTime&&(h.start=j.startTime+j.duration+G),h.start<h.end&&h.start<d&&a.push(h)}else Ia.debug("getAllRangesWithSafetyFactor for",Fa,"- No request found in current time position, removing full buffer 0 -",d),a.push({start:0,end:d});return a}function L(){var a=Ea.getTime();if(Xa){var b=Qa.getAllBufferRanges();b&&b.length&&(a=Math.max(b.start(0),Xa))}return a}function M(){$a||(R(),S())}function N(){U()}function O(){U()}function P(a,b){var c=Qa.getAllBufferRanges(),d=0,e=0,f=null,g=null,h=0,i=void 0,j=void 0,k=b||.15;if(null!==c&&void 0!==c){for(j=0,i=c.length;j<i;j++)if(d=c.start(j),e=c.end(j),null===f)h=Math.abs(d-a),a>=d&&a<e?(f=d,g=e):h<=k&&(f=d,g=e);else{if(!((h=d-g)<=k))break;g=e}if(null!==f)return{start:f,end:g}}return null}function Q(a,b){var c=void 0;return c=P(a,b),null===c?0:c.end-a}function R(){Ea&&(La=Q(L()||0),va.trigger(u.default.BUFFER_LEVEL_UPDATED,{sender:Ha,bufferLevel:La}),U())}function S(){h()&&(wa.addBufferState(Fa,Sa,Ga.getScheduleController().getBufferTarget()),wa.addBufferLevel(Fa,new Date,1e3*La))}function T(){Oa>=Pa-1&&!Ka&&void 0===Qa.discharge&&(Ka=!0,Ia.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED"),va.trigger(u.default.BUFFERING_COMPLETED,{sender:Ha,streamInfo:Ga.getStreamInfo()}))}function U(){"audio"!==Fa&&"video"!==Fa||(Ya&&!Ka&&Ea&&Ea.getTimeToStreamEnd()-La<G&&(Ya=!1,Ka=!0,Ia.debug("checkIfSufficientBuffer trigger BUFFERING_COMPLETED"),va.trigger(u.default.BUFFERING_COMPLETED,{sender:Ha,streamInfo:Ga.getStreamInfo()})),(!xa.getLowLatencyEnabled()&&La<G||0===La)&&!Ka?V(F):(Ka||La>=xa.getStableBufferTime())&&V(E))}function V(a){Sa===a||a===F&&0===Ea.getTime()||Fa===g.default.FRAGMENTED_TEXT&&!Ca.isTextEnabled()||(Sa=a,S(),va.trigger(u.default.BUFFER_LEVEL_STATE_CHANGED,{sender:Ha,state:a,mediaType:Fa,streamInfo:Ga.getStreamInfo()}),va.trigger(a===E?u.default.BUFFER_LOADED:u.default.BUFFER_EMPTY,{mediaType:Fa}),Ia.debug(a===E?"Got enough buffer to start for "+Fa:"Waiting for more buffer before starting playback for "+Fa))}function W(a,b,c,d){for(var e=Math.max(!b||isNaN(b.startTime)?0:b.startTime,0),f=[],g=[],h=c.concat(d),i=0,j=h.length;i<j;i++)f[h[i].schemeIdUri]=h[i];for(var k=(0,w.default)(ua).getInstance().parse(a),l=k.getBoxes("emsg"),i=0,j=l.length;i<j;i++){var m=Ba.getEvent(l[i],f,e);m&&g.push(m)}return g}function X(){Qa&&Fa!==g.default.FRAGMENTED_TEXT&&(Ka||Z(Y()))}function Y(){var a=[],b=Qa.getAllBufferRanges();if(!b||0===b.length)return a;var c=Ea.getTime(),d={start:Math.max(0,c-xa.getBufferToKeep()),end:c+xa.getBufferAheadToKeep()},e=Ga.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:c,threshold:I})[0];if(e)d.start=Math.min(e.startTime,d.start),d.end=Math.max(e.startTime+e.duration,d.end);else if(0===c&&Ea.getIsDynamic())return[];if(b.start(0)<=d.start){for(var f={start:0,end:d.start},g=0;g<b.length&&b.end(g)<=d.start;g++)f.end=b.end(g);f.start<f.end&&a.push(f)}if(b.end(b.length-1)>=d.end){var h={start:d.end,end:b.end(b.length-1)+I};h.start<h.end&&a.push(h)}return a}function Z(a){a&&Qa&&0!==a.length&&(Za.push.apply(Za,a),Va||$())}function $(){if(0===Za.length||!Qa)return Ia.debug("Nothing to prune, halt pruning"),Za=[],void(Va=!1);var a=Qa.getBuffer();if(!a||!a.buffered||0===a.buffered.length)return Ia.debug("SourceBuffer is empty (or does not exist), halt pruning"),Za=[],void(Va=!1);var b=Za.shift();Ia.debug("Removing",Fa,"buffer from:",b.start,"to",b.end),Va=!0;var c=Ea.getTime();c<b.end&&(Ka=!1,Oa=0,$a||(Ga.getScheduleController().setSeekTarget(c),Ba.setIndexHandlerTime(Ga,c))),Qa.remove(b.start,b.end,b.force)}function _(a){if(Qa===a.buffer){Ia.debug("onRemoved buffer from:",a.from,"to",a.to);r(Qa.getAllBufferRanges()),0===Za.length&&(Va=!1),a.unintended&&(Ia.warn("Detected unintended removal from:",a.from,"to",a.to,"setting index handler time to",a.from),Ba.setIndexHandlerTime(Ga,a.from)),Va?$():($a?($a=!1,_a&&p(_a)):(Ia.debug("onRemoved : call updateBufferLevel"),R()),va.trigger(u.default.BUFFER_CLEARED,{sender:Ha,from:a.from,to:a.to,unintended:a.unintended,hasEnoughSpaceToAppend:ra()}))}}function aa(a){Qa&&Qa.updateTimestampOffset&&Qa.updateTimestampOffset(a)}function ba(a){a.sender.getStreamProcessor()!==Ga||a.error||aa(a.currentRepresentation.MSETimeOffset)}function ca(a){a.fragmentModel===Ga.getFragmentModel()&&(Pa=a.request.index,T())}function da(a){var b=Qa&&Qa.getAllBufferRanges();b&&a.newMediaInfo.type===Fa&&a.newMediaInfo.streamInfo.id===Ga.getStreamInfo().id&&(Ia.info("Track change asked"),Aa.getSwitchMode(Fa)===q.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&b&&b.length>0&&Ea.getTimeToStreamEnd()>G&&(Ka=!1,Pa=Number.POSITIVE_INFINITY))}function ea(){++Ua*(xa.getWallclockTimeUpdateInterval()/1e3)>=xa.getBufferPruningInterval()&&(Ua=0,X())}function fa(){U()}function ga(){return Fa}function ha(){return Ga}function ia(a){Xa=a}function ja(){return Qa}function ka(a){Qa=a}function la(){return La}function ma(a,b){Na=a,Qa&&b&&"function"==typeof Qa.discharge&&(Ra=Qa,e(b))}function na(){return Na}function oa(){return Ka}function pa(){return Va}function qa(){var a=Qa.getAllBufferRanges(),b=0,c=void 0,d=void 0;if(!a)return b;for(d=0,c=a.length;d<c;d++)b+=a.end(d)-a.start(d);return b}function ra(){return qa()<Ma}function sa(a,b){Ma=Number.POSITIVE_INFINITY,Sa=void 0,Ja=o.default.QUALITY_DEFAULT,Pa=Number.POSITIVE_INFINITY,Oa=0,Ta=null,Ka=!1,Va=!1,Ya=!1,La=0,Ua=0,Za=[],Qa&&(a||Qa.abort(),Qa.reset(b),Qa=null),$a=!1}function ta(a,b){va.off(u.default.DATA_UPDATE_COMPLETED,ba,this),va.off(u.default.QUALITY_CHANGE_REQUESTED,v,this),va.off(u.default.INIT_FRAGMENT_LOADED,j,this),va.off(u.default.MEDIA_FRAGMENT_LOADED,n,this),va.off(u.default.STREAM_COMPLETED,ca,this),va.off(u.default.CURRENT_TRACK_CHANGED,da,this),va.off(u.default.PLAYBACK_PLAYING,O,this),va.off(u.default.PLAYBACK_PROGRESS,M,this),va.off(u.default.PLAYBACK_TIME_UPDATED,M,this),va.off(u.default.PLAYBACK_RATE_CHANGED,fa,this),va.off(u.default.PLAYBACK_SEEKING,x,this),va.off(u.default.PLAYBACK_SEEKED,y,this),va.off(u.default.PLAYBACK_STALLED,N,this),va.off(u.default.WALLCLOCK_TIME_UPDATED,ea,this),va.off(u.default.SOURCEBUFFER_REMOVE_COMPLETED,_,this),sa(a,b)}a=a||{};var ua=this.context,va=(0,s.default)(ua).getInstance(),wa=a.metricsModel,xa=a.mediaPlayerModel,ya=a.errHandler,za=a.streamController,Aa=a.mediaController,Ba=a.adapter,Ca=a.textController,Da=a.abrController,Ea=a.playbackController,Fa=a.type,Ga=a.streamProcessor,Ha=void 0,Ia=void 0,Ja=void 0,Ka=void 0,La=void 0,Ma=void 0,Na=void 0,Oa=void 0,Pa=void 0,Qa=void 0,Ra=void 0,Sa=void 0,Ta=void 0,Ua=void 0,Va=void 0,Wa=void 0,Xa=void 0,Ya=void 0,Za=void 0,$a=void 0,_a=void 0;return Ha={getBufferControllerType:c,initialize:d,createBuffer:e,dischargePreBuffer:f,getType:ga,getStreamProcessor:ha,setSeekStartTime:ia,getBuffer:ja,setBuffer:ka,getBufferLevel:la,getRangeAt:P,setMediaSource:ma,getMediaSource:na,getIsBufferingCompleted:oa,switchInitData:l,getIsPruningInProgress:pa,reset:ta},b(),Ha}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(114),i=d(h),j=a(94),k=d(j),l=a(93),m=d(l),n=a(100),o=d(n),p=a(106),q=d(p),r=a(46),s=d(r),t=a(50),u=d(t),v=a(146),w=d(v),x=a(47),y=d(x),z=a(45),A=d(z),B=a(152),C=d(B),D=a(183),E="bufferLoaded",F="bufferStalled",G=.5,H=.5,I=.01,J=22,K="BufferController";e.__dashjs_factory_name=K;var L=y.default.getClassFactory(e);L.BUFFER_LOADED=E,L.BUFFER_EMPTY=F,y.default.updateClassFactory(e.__dashjs_factory_name,L),c.default=L,b.exports=c.default},{100:100,106:106,114:114,146:146,152:152,183:183,45:45,46:46,47:47,50:50,93:93,94:94,98:98}],104:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){w=(0,i.default)(t).getInstance().getLogger(v),b()}function b(){G=!1,x={},y={},z={},A=null,B=100,C=B/1e3}function c(){if(!D||!E||!F)throw new Error("setConfig function has to be called previously")}function d(){null!==A&&G&&(clearInterval(A),A=null,G=!1)}function e(){c(),w.debug("Start Event Controller"),G||isNaN(B)||(G=!0,A=setInterval(l,B))}function f(a){if(c(),x={},a)for(var b=0;b<a.length;b++){var d=a[b];x[d.id]=d,w.debug("Add inline event with id "+d.id)}w.debug("Added "+a.length+" inline events")}function g(a){c();for(var b=0;b<a.length;b++){var d=a[b];d.id in y?w.debug("Repeated event with id "+d.id):(d.eventStream.schemeIdUri===r&&void 0===y[d.id]&&h(d),y[d.id]=d,w.debug("Add inband event with id "+d.id))}}function h(a){if(a.eventStream.value==s){var b=a.eventStream.timescale||1,c=a.presentationTime/b,d=void 0;d=4294967295==a.presentationTime?NaN:(a.presentationTime+a.duration)/b,w.info("Manifest validity changed: Valid until: "+c+"; remaining duration: "+d),u.trigger(m.default.MANIFEST_VALIDITY_CHANGED,{id:a.id,validUntil:c,newDuration:d,newManifestValidAfter:NaN})}}function j(){if(z)for(var a=F.getTime(),b=Object.keys(z),c=0;c<b.length;c++){var d=b[c],e=z[d];null!==e&&(e.duration+e.presentationTime)/e.eventStream.timescale<a&&(w.debug("Remove Event "+d+" at time "+a),e=null,delete z[d])}}function l(){o(y),o(x),j()}function n(){c(),E.refreshManifest()}function o(a){var b,c=F.getTime();if(a)for(var d=Object.keys(a),e=0;e<d.length;e++){var f=d[e],g=a[f];void 0!==g&&(0===(b=g.presentationTime/g.eventStream.timescale)||b<=c&&b+C>c)&&(w.debug("Start Event "+f+" at "+c),g.duration>0&&(z[f]=g),g.eventStream.schemeIdUri==r&&g.eventStream.value==s?0===g.duration&&0===g.presentationTimeDelta||n():u.trigger(g.eventStream.schemeIdUri,{event:g}),delete a[f])}}function p(a){a&&(a.manifestModel&&(D=a.manifestModel),a.manifestUpdater&&(E=a.manifestUpdater),a.playbackController&&(F=a.playbackController))}function q(){d(),b()}var r="urn:mpeg:dash:event:2012",s=1,t=this.context,u=(0,k.default)(t).getInstance(),v=void 0,w=void 0,x=void 0,y=void 0,z=void 0,A=void 0,B=void 0,C=void 0,D=void 0,E=void 0,F=void 0,G=void 0;return v={addInlineEvents:f,addInbandEvents:g,stop:d,start:e,setConfig:p,reset:q},a(),v}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(45),i=d(h),j=a(46),k=d(j),l=a(50),m=d(l);e.__dashjs_factory_name="EventController",c.default=g.default.getClassFactory(e),b.exports=c.default},{45:45,46:46,47:47,50:50}],105:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){w=(0,x.default)(m).getInstance().getLogger(v),e(),o.on(t.default.FRAGMENT_LOADING_COMPLETED,k,v),o.on(t.default.FRAGMENT_LOADING_PROGRESS,k,v)}function c(a){var b=y[a];return b||(b=(0,l.default)(m).create({metricsModel:u,fragmentLoader:(0,n.default)(m).create({metricsModel:u,mediaPlayerModel:s,errHandler:q,requestModifier:(0,p.default)(m).getInstance()})}),y[a]=b),b}function d(a){return a&&a.type&&a.type===h.HTTPRequest.INIT_SEGMENT_TYPE}function e(){for(var a in y)y[a].reset();y={}}function f(){o.off(t.default.FRAGMENT_LOADING_COMPLETED,k,this),o.off(t.default.FRAGMENT_LOADING_PROGRESS,k,this),e()}function i(a,b,c,d){var e=new j.default;return e.streamId=c,e.mediaInfo=b.mediaInfo,e.segmentType=b.type,e.start=b.startTime,e.duration=b.duration,e.end=e.start+e.duration,e.bytes=a,e.index=b.index,e.quality=b.quality,e.representationId=b.representationId,e.endFragment=d,e}function k(a){if(y[a.request.mediaType]===a.sender){var b=a.request,c=a.response,e=d(b),f=b.mediaInfo.streamInfo;if(a.error&&(a.request.mediaType!==g.default.AUDIO&&a.request.mediaType!==g.default.VIDEO&&a.request.mediaType!==g.default.FRAGMENTED_TEXT||o.trigger(t.default.SERVICE_LOCATION_BLACKLIST_ADD,{entry:a.request.serviceLocation})),!c||!f)return void w.warn("No "+b.mediaType+" bytes to push or stream is inactive.");var h=i(c,b,f.id,a.type!==t.default.FRAGMENT_LOADING_PROGRESS);o.trigger(e?t.default.INIT_FRAGMENT_LOADED:t.default.MEDIA_FRAGMENT_LOADED,{chunk:h,fragmentModel:a.sender})}}a=a||{};var m=this.context,o=(0,r.default)(m).getInstance(),q=a.errHandler,s=a.mediaPlayerModel,u=a.metricsModel,v=void 0,w=void 0,y=void 0;return v={getModel:c,isInitializationRequest:d,reset:f},b(),v}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(183),i=a(164),j=d(i),k=a(114),l=d(k),m=a(88),n=d(m),o=a(156),p=d(o),q=a(46),r=d(q),s=a(50),t=d(s),u=a(47),v=d(u),w=a(45),x=d(w);e.__dashjs_factory_name="FragmentController",c.default=v.default.getClassFactory(e),b.exports=c.default},{114:114,156:156,164:164,183:183,45:45,46:46,47:47,50:50,88:88,98:98}],106:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){J=(0,o.default)(G).getInstance().getLogger(I),z()}function b(a,b){var c=l(a),e=d(a,b),f=[];if(a===g.default.FRAGMENTED_TEXT)return void h(e[0]);c||(c=P.getSavedMediaSettings(a),j(a,c)),e&&0!==e.length&&(c&&e.forEach(function(a){B(c,a)&&f.push(a)}),h(0===f.length?E(e):f.length>1?E(f):f[0]))}function c(a){if(a){var b=a.type;if(w(b)){var c=a.streamInfo.id;K[c]||(K[c]=F());for(var d=K[c][b].list,f=0,g=d.length;f<g;++f)if(x(d[f],a))return;d.push(a);var i=l(b);i&&B(i,a)&&!e(b,a.streamInfo)&&h(a)}}}function d(a,b){if(!a||!b)return[];var c=b.id;return K[c]&&K[c][a]?K[c][a].list:[]}function e(a,b){return!a||!b||b&&!K[b.id]?null:K[b.id][a].current}function f(a){var b=a.type,c=a.streamInfo.id;return K[c]&&K[c][b]&&x(K[c][b].current,a)}function h(a){if(a){var b=a.type,c=a.streamInfo,d=c.id,f=e(b,c);if(K[d]&&K[d][b]&&(!f||!x(a,f))){K[d][b].current=a,f&&H.trigger(i.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:f,newMediaInfo:a,switchMode:N[b]});var g=A(a);g&&K[d][b].storeLastSettings&&(g.roles&&(g.role=g.roles[0],delete g.roles),g.accessibility&&(g.accessibility=g.accessibility[0]),g.audioChannelConfiguration&&(g.audioChannelConfiguration=g.audioChannelConfiguration[0]),P.setSavedMediaSettings(b,g))}}}function j(a,b){a&&b&&(L[a]=b)}function l(a){return a?L[a]:null}function m(a,b){if(-1===Q.indexOf(b))return void J.warn("Track switch mode is not supported: "+b);N[a]=b}function n(a){return N[a]}function u(a){if(-1===R.indexOf(a))return void J.warn("Track selection mode is not supported: "+a);M=a}function v(){return M||t}function w(a){return a===g.default.AUDIO||a===g.default.VIDEO||a===g.default.TEXT||a===g.default.FRAGMENTED_TEXT||a===g.default.IMAGE}function x(a,b){var c=a.id===b.id,d=a.viewpoint===b.viewpoint,e=a.lang===b.lang,f=a.roles.toString()===b.roles.toString(),g=a.accessibility.toString()===b.accessibility.toString(),h=a.audioChannelConfiguration.toString()===b.audioChannelConfiguration.toString();return c&&d&&e&&f&&g&&h}function y(a){a&&(a.errHandler&&(O=a.errHandler),a.domStorage&&(P=a.domStorage))}function z(){K={},D(),C()}function A(a){var b={lang:a.lang,viewpoint:a.viewpoint,roles:a.roles,accessibility:a.accessibility,audioChannelConfiguration:a.audioChannelConfiguration};return b.lang||b.viewpoint||b.role&&b.role.length>0||b.accessibility&&b.accessibility.length>0||b.audioChannelConfiguration&&b.audioChannelConfiguration.length>0?b:null}function B(a,b){var c=!a.lang||a.lang===b.lang,d=!a.viewpoint||a.viewpoint===b.viewpoint,e=!a.role||!!b.roles.filter(function(b){return b===a.role})[0],f=!a.accessibility||!!b.accessibility.filter(function(b){return b===a.accessibility})[0],g=!a.audioChannelConfiguration||!!b.audioChannelConfiguration.filter(function(b){return b===a.audioChannelConfiguration})[0];return c&&d&&e&&f&&g}function C(){N={audio:q,video:p}}function D(){L={audio:null,video:null}}function E(a){var b=v(),c=[],d=function(a){var b=0,c=[],d=void 0;return a.forEach(function(a){d=Math.max.apply(Math,a.bitrateList.map(function(a){return a.bandwidth})),d>b?(b=d,c=[a]):d===b&&c.push(a)}),c},e=function(a){var b=0,c=[],d=void 0;return a.forEach(function(a){d=a.representationCount,d>b?(b=d,c=[a]):d===b&&c.push(a)}),c};switch(b){case r:c=d(a),c.length>1&&(c=e(c));break;case s:c=e(a),c.length>1&&(c=d(a));break;default:J.warn("Track selection mode is not supported: "+b)}return c[0]}function F(){return{audio:{list:[],storeLastSettings:!0,current:null},video:{list:[],storeLastSettings:!0,current:null},text:{list:[],storeLastSettings:!0,current:null},fragmentedText:{list:[],storeLastSettings:!0,current:null},image:{list:[],storeLastSettings:!0,current:null}}}var G=this.context,H=(0,k.default)(G).getInstance(),I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0,Q=[q,p],R=[r,s];return I={checkInitialMediaSettingsForType:b,addTrack:c,getTracksFor:d,getCurrentTrackFor:e,isCurrentTrack:f,setTrack:h,setInitialSettings:j,getInitialSettings:l,setSwitchMode:m,getSwitchMode:n,setSelectionModeForInitialTrack:u,getSelectionModeForInitialTrack:v,isMultiTrackSupportedByType:w,isTracksEqual:x,setConfig:y,reset:z},a(),I}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(50),i=d(h),j=a(46),k=d(j),l=a(47),m=d(l),n=a(45),o=d(n),p="neverReplace",q="alwaysReplace",r="highestBitrate",s="widestRange",t=r;e.__dashjs_factory_name="MediaController";var u=m.default.getSingletonFactory(e);u.TRACK_SWITCH_MODE_NEVER_REPLACE=p,u.TRACK_SWITCH_MODE_ALWAYS_REPLACE=q,u.TRACK_SELECTION_MODE_HIGHEST_BITRATE=r,u.TRACK_SELECTION_MODE_WIDEST_RANGE=s,u.DEFAULT_INIT_TRACK_SELECTION_MODE=t,m.default.updateSingletonFactory(e.__dashjs_factory_name,u),c.default=u,b.exports=c.default},{45:45,46:46,47:47,50:50,98:98}],107:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){var a="WebKitMediaSource"in window;return"MediaSource"in window?new MediaSource:a?new WebKitMediaSource:null}function b(a,b){var c=window.URL.createObjectURL(a);return b.setSource(c),c}function c(a){a.setSource(null)}function d(a,b){return a.duration!=b&&(a.duration=b),a.duration}function e(a,b,c){a&&"function"==typeof a.setLiveSeekableRange&&"function"==typeof a.clearLiveSeekableRange&&"open"===a.readyState&&b>=0&&b<c&&(a.clearLiveSeekableRange(),a.setLiveSeekableRange(b,c))}function f(a){var b=a.sourceBuffers,c=b.length;if("open"===a.readyState){for(var d=0;d<c;d++){if(b[d].updating)return;if(0===b[d].buffered.length)return}a.endOfStream()}}return{createMediaSource:a,attachMediaSource:b,detachMediaSource:c,setDuration:d,setSeekable:e,signalEndOfStream:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="MediaSourceController",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{47:47}],108:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){sa=(0,s.default)(pa).getInstance().getLogger(ra),I()}function b(a,b){Ga=a,na(),Ha=Ga.manifestInfo.isDynamic,Ba=Ga.start,Na=b,qa.on(o.default.DATA_UPDATE_COMPLETED,Q,this),qa.on(o.default.BYTES_APPENDED_END_FRAGMENT,ka,this),qa.on(o.default.BUFFER_LEVEL_STATE_CHANGED,la,this),qa.on(o.default.PERIOD_SWITCH_STARTED,c,this),qa.on(o.default.PLAYBACK_PROGRESS,ga,this),qa.on(o.default.PLAYBACK_TIME_UPDATED,ga,this),qa.on(o.default.PLAYBACK_ENDED,ca,this),Ja&&(Ja=!1,f())}function c(a){!Ha&&a.fromStreamInfo&&void 0!==Da[a.fromStreamInfo.id]&&(delete Fa[a.fromStreamInfo.id],delete Da[a.fromStreamInfo.id])}function d(){return parseFloat((e()-p()).toFixed(5))}function e(){var a=L(!0),b=Ha?a-Ga.start:0;return a+(Ga.duration-b)}function f(){Ga&&za&&za.getElement()?za.play():Ja=!0}function h(){return Ga&&za?za.isPaused():null}function j(){Ga&&za&&za.pause()}function l(){return Ga&&za?za.isSeeking():null}function n(a,b,c){Ga&&za&&(!0===c?a!==za.getTime()&&(za.removeEventListener("seeking",W),sa.info("Requesting seek to time: "+a),za.setCurrentTime(a,b)):(qa.trigger(o.default.PLAYBACK_SEEK_ASKED),sa.info("Requesting seek to time: "+a),za.setCurrentTime(a,b)))}function p(){return Ga&&za?za.getTime():null}function q(){return Ga&&za?za.getPlaybackRate():null}function r(){return Ga&&za?za.getPlayedRanges():null}function w(){return Ga&&za?za.getEnded():null}function x(){return Ha}function y(){return ta}function z(a){Ba=a}function A(){return Ba}function B(a){Oa=a,0===a&&q()>1&&H()}function C(){return Oa}function D(a,b){var c=xa.getMpd(wa.getValue()),d=void 0,e=void 0;if(d=Ia.getUseSuggestedPresentationDelay()&&c.hasOwnProperty(g.default.SUGGESTED_PRESENTATION_DELAY)?c.suggestedPresentationDelay:Ia.getLowLatencyEnabled()?0:Ia.getLiveDelay()?Ia.getLiveDelay():isNaN(a)?2*Ga.manifestInfo.minBufferTime:a*Ia.getLiveDelayFragmentCount(),c.availabilityStartTime&&(Ma=c.availabilityStartTime.getTime()),b>0){var f=Math.max(b-10,b/2);e=Math.min(d,f)}else e=d;return Ea=e,e}function E(){return Ea}function F(){if(!Ha||isNaN(Ma))return NaN;var a=p();return isNaN(a)||0===a?0:(Math.round((new Date).getTime()-(1e3*a+Ma))/1e3).toFixed(3)}function G(){if(za){var a=1+C(),b=q();a!==b&&(sa.info("Starting live catchup mechanism. Setting playback rate to",a),La=b,za.getElement().playbackRate=a,qa.trigger(o.default.PLAYBACK_CATCHUP_START,{sender:ra}))}}function H(){if(za){var a=La||1;a!==q()&&(sa.info("Stopping live catchup mechanism. Setting playback rate to",a),za.getElement().playbackRate=a,qa.trigger(o.default.PLAYBACK_CATCHUP_END,{sender:ra}))}}function I(){Aa=0,Ba=NaN,Ja=!1,Da={},Ea=0,Ma=0,Oa=u,Fa={},za&&(qa.off(o.default.DATA_UPDATE_COMPLETED,Q,this),qa.off(o.default.BUFFER_LEVEL_STATE_CHANGED,la,this),qa.off(o.default.BYTES_APPENDED_END_FRAGMENT,ka,this),qa.off(o.default.PERIOD_SWITCH_STARTED,c,this),qa.off(o.default.PLAYBACK_PROGRESS,ga,this),qa.off(o.default.PLAYBACK_TIME_UPDATED,ga,this),qa.off(o.default.PLAYBACK_ENDED,ca,this),O(),oa()),Ca=null,za=null,Ga=null,Ha=null}function J(a){a&&(a.streamController&&(ta=a.streamController),a.metricsModel&&(ua=a.metricsModel),a.dashMetrics&&(va=a.dashMetrics),a.manifestModel&&(wa=a.manifestModel),a.dashManifestModel&&(xa=a.dashManifestModel),a.mediaPlayerModel&&(Ia=a.mediaPlayerModel),a.adapter&&(ya=a.adapter),a.videoModel&&(za=a.videoModel))}function K(){var a=(0,k.default)(pa).getInstance().getURIFragmentData(),b=void 0;if(a){b={};var c=parseInt(a.r,10);c>=0&&Ga&&c<Ga.manifestInfo.DVRWindowSize&&null===a.t&&(a.t=Math.floor(Date.now()/1e3)-Ga.manifestInfo.DVRWindowSize+c),b.fragS=parseFloat(a.s),b.fragT=parseFloat(a.t)}return b}function L(a,b){var c=void 0,d=NaN,e=K();if(d=e?a?Ga.start:isNaN(e.fragS)?e.fragT:e.fragS:0,Ha)isNaN(d)||((c=d-Ga.manifestInfo.availableFrom.getTime()/1e3)>Ba||c<(isNaN(b)?NaN:b-Ga.manifestInfo.DVRWindowSize))&&(c=null),c=c||Ba;else if(!isNaN(d)&&d<Math.max(Ga.manifestInfo.duration,Ga.duration)&&d>=0)c=d;else{var f=Da[Ga.id];c=void 0!==f?Math.max(void 0!==f.audio?f.audio:0,void 0!==f.video?f.video:0,Ga.start):Ga.start}return c}function M(a){var b=ua.getReadOnlyMetricsFor(g.default.VIDEO)||ua.getReadOnlyMetricsFor(g.default.AUDIO),c=va.getCurrentDVRInfo(b),d=c?c.range:null,e=void 0;if(!d)return NaN;if(a>d.end)e=Math.max(d.end-2*Ga.manifestInfo.minBufferTime,d.start);else{if(!(a+.25<d.start))return a;e=d.start}return e}function N(){if(null===Ca){var a=function(){ea()};Ca=setInterval(a,Ia.getWallclockTimeUpdateInterval())}}function O(){clearInterval(Ca),Ca=null}function P(){if(!h()&&Ha&&0!==za.getReadyState()){var a=p(),b=M(a);!isNaN(b)&&b!==a&&n(b)}}function Q(a){if(!a.error){var b=ya.convertDataToRepresentationInfo(a.currentRepresentation),c=b.mediaInfo.streamInfo;Ga.id===c.id&&(Ga=c,P())}}function R(){qa.trigger(o.default.CAN_PLAY)}function S(){sa.info("Native video element event: play"),P(),N(),qa.trigger(o.default.PLAYBACK_STARTED,{startTime:p()})}function T(){sa.info("Native video element event: waiting"),qa.trigger(o.default.PLAYBACK_WAITING,{playingTime:p()})}function U(){sa.info("Native video element event: playing"),qa.trigger(o.default.PLAYBACK_PLAYING,{playingTime:p()})}function V(){sa.info("Native video element event: pause"),qa.trigger(o.default.PLAYBACK_PAUSED,{ended:w()})}function W(){var a=p();sa.info("Seeking to: "+a),N(),qa.trigger(o.default.PLAYBACK_SEEKING,{seekTime:a})}function X(){sa.info("Native video element event: seeked"),qa.trigger(o.default.PLAYBACK_SEEKED),za.addEventListener("seeking",W)}function Y(){var a=p();Aa=a,qa.trigger(o.default.PLAYBACK_TIME_UPDATED,{timeToEnd:d(),time:a})}function Z(){var a=Date.now();(!Ka||a>Ka+t)&&(Ka=a,Y())}function $(){qa.trigger(o.default.PLAYBACK_PROGRESS)}
|
24 |
+
function _(){var a=q();sa.info("Native video element event: ratechange: ",a),qa.trigger(o.default.PLAYBACK_RATE_CHANGED,{playbackRate:a})}function aa(){sa.info("Native video element event: loadedmetadata"),qa.trigger(o.default.PLAYBACK_METADATA_LOADED),N()}function ba(){sa.info("Native video element event: ended"),j(),O(),qa.trigger(o.default.PLAYBACK_ENDED,{isLast:ta.getActiveStreamInfo().isLast})}function ca(a){Ca&&a.isLast&&(sa.info("[PlaybackController] onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended"),za.setCurrentTime(e()),j(),O())}function da(a){var b=a.target||a.srcElement;qa.trigger(o.default.PLAYBACK_ERROR,{error:b.error})}function ea(){qa.trigger(o.default.WALLCLOCK_TIME_UPDATED,{isDynamic:Ha,time:new Date}),x()&&h()&&Z()}function fa(a,b){if(b&&b.length>0)for(var c=0,d=b.length;c<d;c++)if(a>=b.start(c)&&a<b.end(c))return!0;return!1}function ga(){Ha&&Ia.getLowLatencyEnabled()&&C()>0&&(!ja()&&ha()?G():ia()&&H())}function ha(){return F()>Ia.getLiveDelay()*(1+v)}function ia(){return F()<=Ia.getLiveDelay()}function ja(){return C()+1===q()}function ka(a){var b=void 0,c=void 0,d=a.bufferedRanges;if(d&&d.length&&(!Da[Ga.id]||!0!==Da[Ga.id].started)){var e=a.sender.getType();void 0===Fa[Ga.id]&&(Fa[Ga.id]=[]),Fa[Ga.id][e]=d,void 0===Da[Ga.id]&&(Da[Ga.id]=[],Da[Ga.id].started=!1),void 0===Da[Ga.id][e]&&(Da[Ga.id][e]=Math.max(d.start(0),Ga.start));var f=ta.isVideoTrackPresent(),g=ta.isAudioTrackPresent();c=L(!1),g&&f?isNaN(Da[Ga.id].audio)||isNaN(Da[Ga.id].video)||(Da[Ga.id].audio<Da[Ga.id].video?(b=Da[Ga.id].video>c?Da[Ga.id].video:c,d=Fa[Ga.id].audio):(b=Da[Ga.id].audio>c?Da[Ga.id].audio:c,d=Fa[Ga.id].video),fa(b,d)&&(l()||Na||n(b,!0,!0),Da[Ga.id].started=!0)):Da[Ga.id][e]&&(b=Da[Ga.id][e]>c?Da[Ga.id][e]:c,l()||Na||n(b,!1,!0),Da[Ga.id].started=!0)}}function la(a){a.streamInfo.id===Ga.id&&za.setStallState(a.mediaType,a.state===i.default.BUFFER_EMPTY)}function ma(a){sa.info("Native video element event: stalled",a),qa.trigger(o.default.PLAYBACK_STALLED,{e:a})}function na(){za.addEventListener("canplay",R),za.addEventListener("play",S),za.addEventListener("waiting",T),za.addEventListener("playing",U),za.addEventListener("pause",V),za.addEventListener("error",da),za.addEventListener("seeking",W),za.addEventListener("seeked",X),za.addEventListener("timeupdate",Y),za.addEventListener("progress",$),za.addEventListener("ratechange",_),za.addEventListener("loadedmetadata",aa),za.addEventListener("stalled",ma),za.addEventListener("ended",ba)}function oa(){za.removeEventListener("canplay",R),za.removeEventListener("play",S),za.removeEventListener("waiting",T),za.removeEventListener("playing",U),za.removeEventListener("pause",V),za.removeEventListener("error",da),za.removeEventListener("seeking",W),za.removeEventListener("seeked",X),za.removeEventListener("timeupdate",Y),za.removeEventListener("progress",$),za.removeEventListener("ratechange",_),za.removeEventListener("loadedmetadata",aa),za.removeEventListener("stalled",ma),za.removeEventListener("ended",ba)}var pa=this.context,qa=(0,m.default)(pa).getInstance(),ra=void 0,sa=void 0,ta=void 0,ua=void 0,va=void 0,wa=void 0,xa=void 0,ya=void 0,za=void 0,Aa=void 0,Ba=void 0,Ca=void 0,Da=void 0,Ea=void 0,Fa=void 0,Ga=void 0,Ha=void 0,Ia=void 0,Ja=void 0,Ka=void 0,La=void 0,Ma=void 0,Na=void 0,Oa=u;return ra={initialize:b,setConfig:J,getStartTimeFromUriParameters:K,getStreamStartTime:L,getTimeToStreamEnd:d,getTime:p,getPlaybackRate:q,getPlayedRanges:r,getEnded:w,getIsDynamic:x,getStreamController:y,setCatchUpPlaybackRate:B,setLiveStartTime:z,getLiveStartTime:A,computeLiveDelay:D,getLiveDelay:E,getCurrentLiveLatency:F,play:f,isPaused:h,pause:j,isSeeking:l,seek:n,reset:I},a(),ra}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(103),i=d(h),j=a(118),k=d(j),l=a(46),m=d(l),n=a(50),o=d(n),p=a(47),q=d(p),r=a(45),s=d(r),t=500,u=.05,v=.35;e.__dashjs_factory_name="PlaybackController",c.default=q.default.getSingletonFactory(e),b.exports=c.default},{103:103,118:118,45:45,46:46,47:47,50:50,98:98}],109:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){ta=(0,z.default)(da).getInstance().getLogger(sa),ba()}function c(){ua=qa.getFragmentModel(),Ha=ka.getScheduleWhilePaused(),Fa=(0,n.default)(da).create({abrController:la,dashMetrics:ha,metricsModel:fa,mediaPlayerModel:ka,textController:oa}),Ga=(0,p.default)(da).create({adapter:ga,textController:oa}),ia.getIsTextTrack(a.mimeType)&&ea.on(v.default.TIMED_TEXT_REQUESTED,P,this),ea.on(v.default.QUALITY_CHANGE_REQUESTED,y,this),ea.on(v.default.DATA_UPDATE_STARTED,K,this),ea.on(v.default.DATA_UPDATE_COMPLETED,C,this),ea.on(v.default.FRAGMENT_LOADING_COMPLETED,G,this),ea.on(v.default.STREAM_COMPLETED,F,this),ea.on(v.default.STREAM_INITIALIZED,D,this),ea.on(v.default.BUFFER_LEVEL_STATE_CHANGED,M,this),ea.on(v.default.BUFFER_CLEARED,L,this),ea.on(v.default.BYTES_APPENDED_END_FRAGMENT,I,this),ea.on(v.default.INIT_REQUESTED,q,this),ea.on(v.default.QUOTA_EXCEEDED,N,this),ea.on(v.default.PLAYBACK_SEEKING,R,this),ea.on(v.default.PLAYBACK_STARTED,Q,this),ea.on(v.default.PLAYBACK_RATE_CHANGED,S,this),ea.on(v.default.PLAYBACK_TIME_UPDATED,H,this),ea.on(v.default.URL_RESOLUTION_FAILED,O,this),ea.on(v.default.FRAGMENT_LOADING_ABANDONED,J,this)}function d(){return!1===xa}function e(){if(!va||qa.isBufferingCompleted())return void ta.warn("Start denied to Schedule Controller");ta.debug("Schedule Controller starts"),aa(),xa=!1,wa&&(wa=!1),o(0)}function f(){xa||(ta.debug("Schedule Controller stops"),xa=!0,clearTimeout(Da))}function i(a,b){Ja[b]=Ja[b]||{};var c=la.getTopQualityIndexFor(a,b);return Ja[b][a]!=c&&(ta.info("Top quality "+a+" index has changed from "+Ja[b][a]+" to "+c),Ja[b][a]=c,!0)}function k(){if(xa||Ba||!qa.getBufferController()||ma.isPaused()&&!Ha)return void ta.debug("Schedule stop!");m();var a=La.length>0,b=qa.getStreamInfo();if(Na||isNaN(Ka)||Ma||a||i(va.mediaInfo.type,b.id)||Fa.execute(qa,pa,na.isVideoTrackPresent())){var c=function(){var a=qa.getFragmentController();if(va.quality!==Ka)ta.debug("Quality has changed, get init request for representationid = "+va.id),Ka=va.quality,qa.switchInitData(va.id);else if(Ma)ta.debug("Switch track has been asked, get init request for "+pa+" with representationid = "+va.id),Na=ra.getSwitchMode(pa)===B.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,qa.switchInitData(va.id,Na),Ka=va.quality,Ma=!1;else{var c=La.shift();if(a.isInitializationRequest(c))qa.switchInitData(c.representationId);else{var d=void 0;qa.getBufferController().getIsPruningInProgress()||!(d=Ga.execute(qa,c))&&b.manifestInfo&&b.manifestInfo.isDynamic&&ta.info("Playing at the bleeding live edge and frag is not available yet"),d?(ta.debug("getNextFragment - request is "+d.url),ua.executeRequest(d)):(s(!1),o(ka.getLowLatencyEnabled()?100:500))}}};s(!0),a||Ma||la.checkPlaybackQuality(pa),c()}else o(500)}function m(){var a=1.5*va.fragmentDuration,b=ua.getRequests({state:r.default.FRAGMENT_MODEL_EXECUTED,time:ma.getTime()+a,threshold:0})[0];if(b&&-1===La.indexOf(b)&&!ia.getIsTextTrack(pa)){var c=ka.getFastSwitchEnabled(),d=qa.getBufferLevel(),e=la.getAbandonmentStateFor(pa),f=!ra.isCurrentTrack(b.mediaInfo)&&ra.getSwitchMode(b.mediaInfo.type)===B.default.TRACK_SWITCH_MODE_NEVER_REPLACE,g=b.quality<va.quality;c&&(f||g)&&d>=a&&e!==j.default.ABANDON_LOAD?(x(b),ta.debug("Reloading outdated fragment at index: ",b.index)):b.quality>va.quality&&U(ma.getTime()+qa.getBufferLevel())}}function o(a){clearTimeout(Da),Da=setTimeout(k,a)}function q(a){a.sender&&a.sender.getStreamProcessor()===qa&&u(va.quality)}function s(a){Ba!==a?Ba=a:ta.debug("isFragmentProcessingInProgress is already equal to",a)}function u(a){var b=ga.getInitRequest(qa,a);b&&(s(!0),ua.executeRequest(b))}function w(){Ma=!0}function x(a){La.push(a)}function y(a){if(pa===a.mediaType&&qa.getStreamInfo().id===a.streamInfo.id){if(null===(va=qa.getRepresentationInfoForQuality(a.newQuality))||void 0===va)throw new Error("Unexpected error! - currentRepresentationInfo is null or undefined");_(new Date,h.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON),aa()}}function A(a){if(ma&&ua){var b=ua.getRequests({state:r.default.FRAGMENT_MODEL_EXECUTED,time:ma.getTime(),threshold:0})[0];b&&ma.getTime()>=b.startTime&&((!Ia.mediaInfo||b.mediaInfo.type===Ia.mediaInfo.type&&b.mediaInfo.id!==Ia.mediaInfo.id)&&a&&ea.trigger(v.default.TRACK_CHANGE_RENDERED,{mediaType:pa,oldMediaInfo:Ia.mediaInfo,newMediaInfo:b.mediaInfo}),b.quality===Ia.quality&&b.adaptationIndex===Ia.adaptationIndex||!a||ea.trigger(v.default.QUALITY_CHANGE_RENDERED,{mediaType:pa,oldQuality:Ia.quality,newQuality:b.quality}),Ia={mediaInfo:b.mediaInfo,quality:b.quality,adaptationIndex:b.adaptationIndex})}}function C(a){a.error||a.sender.getStreamProcessor()!==qa||(va=ga.convertDataToRepresentationInfo(a.currentRepresentation))}function D(a){a.error||qa.getStreamInfo().id!==a.streamInfo.id||(va=qa.getCurrentRepresentationInfo(),wa&&(ma.getIsDynamic()?(ja.setTimeSyncCompleted(!0),E()):(Ea=ma.getStreamStartTime(!1),qa.getBufferController().setSeekStartTime(Ea))),xa&&e())}function E(){var a=qa.getLiveEdgeFinder();if(a){var b=a.getLiveEdge(),c=va.mediaInfo.streamInfo.manifestInfo.DVRWindowSize/2,d=b-ma.computeLiveDelay(va.fragmentDuration,c),e=ga.getFragmentRequestForTime(qa,va,d,{ignoreIsFinished:!0});if(e)if(ka.getLowLatencyEnabled()){var f=e.duration<ka.getLiveDelay()?e.startTime:e.startTime+e.duration-ka.getLiveDelay();ma.setLiveStartTime(f)}else ma.setLiveStartTime(e.startTime);else ta.debug("setLiveEdgeSeekTarget : getFragmentRequestForTime returned undefined request object");Ea=ma.getStreamStartTime(!1,b),qa.getBufferController().setSeekStartTime(Ea),Ea>va.mediaInfo.streamInfo.start+va.mediaInfo.streamInfo.duration&&ma.seek(Ea);var h=ha.getCurrentManifestUpdate(fa.getMetricsFor(g.default.STREAM));fa.updateManifestUpdateInfo(h,{currentTime:Ea,presentationStartTime:b,latency:b-Ea,clientTimeOffset:ja.getClientTimeOffset()})}}function F(a){a.fragmentModel===ua&&(f(),s(!1),ta.info("Stream is complete"))}function G(a){a.sender===ua&&(ta.info("OnFragmentLoadingCompleted - Url:",a.request?a.request.url:"undefined"),ia.getIsTextTrack(pa)&&s(!1),a.error&&a.request.serviceLocation&&!xa&&(x(a.request),s(!1),o(0)),Na&&(Oa=a.request))}function H(){A(!0)}function I(a){a.sender.getStreamProcessor()===qa&&(Na&&!isNaN(a.startTime)&&(Na=!1,ua.addExecutedRequest(Oa)),s(!1),o(0))}function J(a){a.streamProcessor===qa&&(ta.info("onFragmentLoadingAbandoned for "+pa+", request: "+a.request.url+" has been aborted"),ma.isSeeking()||Ma||(ta.info("onFragmentLoadingAbandoned for "+pa+", request: "+a.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),x(a.request)),s(!1),o(0))}function K(a){a.sender.getStreamProcessor()===qa&&f()}function L(a){a.sender.getStreamProcessor()===qa&&(a.unintended?qa.getFragmentModel().removeExecutedRequestsAfterTime(a.from,qa.getStreamInfo().duration):qa.getFragmentModel().syncExecutedRequestsWithBufferedRange(qa.getBufferController().getBuffer().getAllBufferRanges(),qa.getStreamInfo().duration),a.hasEnoughSpaceToAppend&&xa&&e())}function M(a){a.sender.getStreamProcessor()!==qa||a.state!==l.default.BUFFER_EMPTY||ma.isSeeking()||(ta.info("Buffer is empty! Stalling!"),_(new Date,h.PlayListTrace.REBUFFERING_REASON))}function N(a){a.sender.getStreamProcessor()===qa&&(f(),s(!1))}function O(){ua.abortRequests(),f()}function P(a){a.sender.getStreamProcessor()===qa&&u(a.index)}function Q(){!xa&&Ha||e()}function R(a){Ea=a.seekTime,V(0),xa&&e();var b=ha.getCurrentManifestUpdate(fa.getMetricsFor(g.default.STREAM)),c=va.DVRWindow&&ma?va.DVRWindow.end-ma.getTime():NaN;fa.updateManifestUpdateInfo(b,{latency:c}),Ba?(ta.debug("onPlaybackSeeking for "+pa+", call fragmentModel.abortRequests in order to seek quicker"),ua.abortRequests()):o(0)}function S(a){za&&(za.playbackspeed=a.playbackRate.toString())}function T(){return Ea}function U(a){Ea=a}function V(a){Ca=a}function W(){return Ca}function X(){return Fa.getBufferTarget(qa,pa,na.isVideoTrackPresent())}function Y(){return pa}function Z(a){ya=a}function $(a,b){_(a,b),ya=null}function _(a,b){if(ya&&!1===Aa){var c=za.start,d=a.getTime()-c.getTime();za.duration=d,za.stopreason=b,ya.trace.push(za),Aa=!0}}function aa(){ya&&!0===Aa&&va&&(Aa=!1,za=new h.PlayListTrace,za.representationid=va.id,za.start=new Date,za.mstart=1e3*ma.getTime(),za.playbackspeed=ma.getPlaybackRate().toString())}function ba(){Ba=!1,Ca=0,Ea=NaN,ya=null,za=null,Aa=!0,wa=!0,Ka=NaN,Ia={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},Ja={},La=[],xa=!0,Ma=!1,Na=!1,Oa=null}function ca(){ea.off(v.default.DATA_UPDATE_STARTED,K,this),ea.off(v.default.DATA_UPDATE_COMPLETED,C,this),ea.off(v.default.BUFFER_LEVEL_STATE_CHANGED,M,this),ea.off(v.default.QUALITY_CHANGE_REQUESTED,y,this),ea.off(v.default.FRAGMENT_LOADING_COMPLETED,G,this),ea.off(v.default.STREAM_COMPLETED,F,this),ea.off(v.default.STREAM_INITIALIZED,D,this),ea.off(v.default.QUOTA_EXCEEDED,N,this),ea.off(v.default.BYTES_APPENDED_END_FRAGMENT,I,this),ea.off(v.default.BUFFER_CLEARED,L,this),ea.off(v.default.INIT_REQUESTED,q,this),ea.off(v.default.PLAYBACK_RATE_CHANGED,S,this),ea.off(v.default.PLAYBACK_SEEKING,R,this),ea.off(v.default.PLAYBACK_STARTED,Q,this),ea.off(v.default.PLAYBACK_TIME_UPDATED,H,this),ea.off(v.default.URL_RESOLUTION_FAILED,O,this),ea.off(v.default.FRAGMENT_LOADING_ABANDONED,J,this),ia.getIsTextTrack(pa)&&ea.off(v.default.TIMED_TEXT_REQUESTED,P,this),f(),A(!1),ba()}a=a||{};var da=this.context,ea=(0,t.default)(da).getInstance(),fa=a.metricsModel,ga=a.adapter,ha=a.dashMetrics,ia=a.dashManifestModel,ja=a.timelineConverter,ka=a.mediaPlayerModel,la=a.abrController,ma=a.playbackController,na=a.streamController,oa=a.textController,pa=a.type,qa=a.streamProcessor,ra=a.mediaController,sa=void 0,ta=void 0,ua=void 0,va=void 0,wa=void 0,xa=void 0,ya=void 0,za=void 0,Aa=void 0,Ba=void 0,Ca=void 0,Da=void 0,Ea=void 0,Fa=void 0,Ga=void 0,Ha=void 0,Ia=void 0,Ja=void 0,Ka=void 0,La=void 0,Ma=void 0,Na=void 0,Oa=void 0;return sa={initialize:c,getType:Y,getSeekTarget:T,setSeekTarget:U,setTimeToLoadDelay:V,getTimeToLoadDelay:W,replaceRequest:x,switchTrackAsked:w,isStarted:d,start:e,stop:f,reset:ca,setPlayList:Z,getBufferTarget:X,finalisePlayList:$},b(),sa}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(185),i=a(100),j=d(i),k=a(103),l=d(k),m=a(135),n=d(m),o=a(136),p=d(o),q=a(114),r=d(q),s=a(46),t=d(s),u=a(50),v=d(u),w=a(47),x=d(w),y=a(45),z=d(y),A=a(106),B=d(A);e.__dashjs_factory_name="ScheduleController",c.default=x.default.getClassFactory(e),b.exports=c.default},{100:100,103:103,106:106,114:114,135:135,136:136,185:185,45:45,46:46,47:47,50:50,98:98}],110:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){ka=(0,x.default)(ha).getInstance().getLogger(ja),ua=(0,F.default)(ha).getInstance(),va=(0,H.default)(ha).getInstance(),ta=(0,J.default)(ha).getInstance(),Aa=(0,z.default)(ha).getInstance(),Ba=(0,B.default)(ha).getInstance(),da()}function b(a,b){Y(),Ia=a,Ha=b,Da.initialize(),ma=(0,m.default)(ha).create(),ma.setConfig({manifestModel:oa,dashManifestModel:pa,mediaPlayerModel:Pa,manifestLoader:na,errHandler:Ca}),ma.initialize(),va.setConfig({dashManifestModel:pa}),ia.on(q.default.TIME_SYNCHRONIZATION_COMPLETED,O,this),ia.on(q.default.PLAYBACK_SEEKING,f,this),ia.on(q.default.PLAYBACK_TIME_UPDATED,c,this),ia.on(q.default.PLAYBACK_ENDED,y,this),ia.on(q.default.PLAYBACK_ERROR,V,this),ia.on(q.default.PLAYBACK_STARTED,h,this),ia.on(q.default.PLAYBACK_PAUSED,j,this),ia.on(q.default.MANIFEST_UPDATED,P,this),ia.on(q.default.STREAM_BUFFERING_COMPLETED,p,this),ia.on(q.default.MANIFEST_VALIDITY_CHANGED,aa,this),ia.on(q.default.WALLCLOCK_TIME_UPDATED,d,this),ia.on(D.default.METRIC_ADDED,fa,this)}function c(){if(R()){var a=Na.getPlaybackQuality();a&&ra.addDroppedFrames(g.default.VIDEO,a)}}function d(){if(!(!Pa.getJumpGaps()||!Fa||0===Fa.getProcessors().length||Oa.isSeeking()||Qa||Ja||Ka||La)&&++Xa>=ga){var a=Oa.getTime();_a===a?e(a):_a=a,Xa=0}}function e(a){for(var b=Fa.getProcessors(),c=Pa.getSmallGapLimit(),d=void 0,e=0;e<b.length;e++){var f=b[e].getBuffer(),g=f.getAllBufferRanges(),h=void 0;if(g&&!(g.length<=1)){for(var i=0;i<g.length;i++)if(a<g.start(i)){h=g.start(i);break}if(h>0){var j=h-a;j>0&&j<=c&&(void 0===d||h>d)&&(d=h)}}}var k=Oa.getTimeToStreamEnd();void 0===d&&!isNaN(k)&&k<c&&(d=a+k),d>0&&(!isNaN(k)&&d>=a+k?(ka.info("Jumping media gap (discontinuity) at time ",a,". Jumping to end of the stream"),ia.trigger(q.default.PLAYBACK_ENDED,{isLast:W().isLast})):(ka.info("Jumping media gap (discontinuity) at time ",a,". Jumping to time position",d),Oa.seek(d)))}function f(a){var b=t(a.seekTime);Wa&&(l(),Va=!1),b===Fa&&$a&&$a.deactivate(!0),b&&(b!==Fa||$a&&!Fa.isActive())?(T(v.PlayListTrace.END_OF_PERIOD_STOP_REASON),C(Fa,b,a.seekTime)):T(v.PlayListTrace.USER_REQUEST_STOP_REASON),U(v.PlayList.SEEK_START_REASON)}function h(){ka.debug("[onPlaybackStarted]"),Ra?(Ra=!1,U(v.PlayList.INITIAL_PLAYOUT_START_REASON)):Qa&&(Qa=!1,U(v.PlayList.RESUME_FROM_PAUSE_START_REASON),n())}function j(a){ka.debug("[onPlaybackPaused]"),a.ended||(Qa=!0,T(v.PlayListTrace.USER_REQUEST_STOP_REASON),n())}function l(){ka.debug("[toggleEndPeriodTimer] stop end period timer."),clearTimeout(Wa),Wa=void 0}function n(){if(Va)if(Wa)l();else{var a=Oa.getTimeToStreamEnd(),b=a>0?1e3*a:0;ka.debug("[toggleEndPeriodTimer] start-up of timer to notify PLAYBACK_ENDED event. It will be triggered in "+b+" milliseconds"),Wa=setTimeout(function(){ia.trigger(q.default.PLAYBACK_ENDED,{isLast:W().isLast})},b);var c=b<2e3?b/4:b-2e3;ka.info("[StreamController][toggleEndPeriodTimer] Going to fire preload in "+c),setTimeout(r,c)}}function p(){var a=W().isLast;Ma&&a?(ka.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),ta.signalEndOfStream(Ma)):Ma&&void 0===Wa&&(ka.info("[StreamController][onStreamBufferingCompleted] end of period detected"),Va=!0,!1===Qa&&n())}function r(){var a=W().isLast;Ma&&!a&&function(){var a=A();(Za=Fa.isCompatibleWithStream(a))&&(ka.info("[StreamController][onStreamCanLoadNext] Preloading next stream"),Fa.stopEventController(),Fa.deactivate(!0),a.preload(Ma,Ya),$a=a,a.getProcessors().forEach(function(b){qa.setIndexHandlerTime(b,a.getStartTime())}))}()}function t(a){var b=0,c=null,d=Ea.length;d>0&&(b+=Ea[0].getStartTime());for(var e=0;e<d;e++)if(c=Ea[e],b=parseFloat((b+c.getDuration()).toFixed(5)),a<b)return c;return null}function u(a,b){for(var c=null,d=0,e=0,f=null,g=Ea.length,h=0;h<g;h++){if(c=Ea[h],e=c.getStartTime(),f=c.getDuration(),Number.isFinite(e)&&(d=e),c.getId()===b)return a-d;Number.isFinite(f)&&(d+=f)}return null}function w(){return Fa?Fa.getProcessors():[]}function y(){var a=A();a?(Ua=void 0,Ta=void 0,C(Fa,a,NaN)):ka.debug("StreamController no next stream found"),T(a?v.PlayListTrace.END_OF_PERIOD_STOP_REASON:v.PlayListTrace.END_OF_CONTENT_STOP_REASON),Wa=void 0,Va=!1}function A(){if(Fa){var a=function(){var a=Fa.getStreamInfo().start,b=Fa.getStreamInfo().duration;return{v:Ea.filter(function(c){return c.getStreamInfo().start===parseFloat((a+b).toFixed(5))})[0]}}();if("object"==typeof a)return a.v}}function C(a,b,c){Ja||!b||a===b&&b.isActive()||(Ja=!0,ia.trigger(q.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:a?a.getStreamInfo():null,toStreamInfo:b.getStreamInfo()}),Za=!1,a&&(a.stopEventController(),Za=Fa.isCompatibleWithStream(b)&&!c||b.getPreloaded(),a.deactivate(Za)),Fa=b,$a=!1,Oa.initialize(Fa.getStreamInfo(),Za),Na.getElement()?I(c,a,!1,Za):E(c))}function E(a){K(a,Za)}function G(a){Fa&&(Oa.initialize(Fa.getStreamInfo()),I(a,null,!0,!1))}function I(a,b,c,d){function e(){Ma&&(ka.debug("MediaSource is open!"),window.URL.revokeObjectURL(f),Ma.removeEventListener("sourceopen",e),Ma.removeEventListener("webkitsourceopen",e),L(),b||ia.trigger(q.default.SOURCE_INITIALIZED),c?Fa.setMediaSource(Ma):K(a,d))}var f=void 0;Ma?d?(K(a,d),b||ia.trigger(q.default.SOURCE_INITIALIZED)):(ta.detachMediaSource(Na),Ma.addEventListener("sourceopen",e,!1),Ma.addEventListener("webkitsourceopen",e,!1),f=ta.attachMediaSource(Ma,Na),ka.debug("MediaSource attached to element. Waiting on open...")):(Ma=ta.createMediaSource(),Ma.addEventListener("sourceopen",e,!1),Ma.addEventListener("webkitsourceopen",e,!1),f=ta.attachMediaSource(Ma,Na),ka.debug("MediaSource attached to element. Waiting on open..."))}function K(a,b){Ya=Fa.activate(Ma,b?Ya:void 0),Ua=S(g.default.AUDIO),Ta=S(g.default.VIDEO),Ra||(isNaN(a)?function(){var a=Oa.getStreamStartTime(!0);b||Fa.getProcessors().forEach(function(b){qa.setIndexHandlerTime(b,a)})}():Oa.seek(a)),Fa.startEventController(),!Ia&&Ra||Oa.play(),Ja=!1,ia.trigger(q.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Fa.getStreamInfo()})}function L(){var a=Fa.getStreamInfo().manifestInfo.duration,b=ta.setDuration(Ma,a);ka.debug("Duration successfully set to: "+b)}function M(a){for(var b=0,c=Ea.length;b<c;b++)if(Ea[b].getId()===a.id)return Ea[b];return null}function N(){try{var a=qa.getStreamsInfo();if(0===a.length)throw new Error("There are no streams");var b=sa.getCurrentManifestUpdate(ra.getMetricsFor(g.default.STREAM));ra.updateManifestUpdateInfo(b,{currentTime:Oa.getTime(),buffered:Na.getBufferRange(),presentationStartTime:a[0].start,clientTimeOffset:Da.getClientTimeOffset()});for(var c=0,d=a.length;c<d;c++){var e=a[c],f=M(e);f?f.updateData(e):(f=(0,k.default)(ha).create({manifestModel:oa,dashManifestModel:pa,mediaPlayerModel:Pa,metricsModel:ra,dashMetrics:sa,manifestUpdater:ma,adapter:qa,timelineConverter:Da,capabilities:la,errHandler:Ca,baseURLController:va,domStorage:wa,abrController:xa,playbackController:Oa,mediaController:ya,textController:za,videoModel:Na,streamController:ja}),Ea.push(f),f.initialize(e,Ga)),ra.addManifestUpdateStreamInfo(b,e.id,e.index,e.start,e.duration)}if(!Fa){var h=Oa.getStartTimeFromUriParameters(),i=null;if(h){i=t(isNaN(h.fragS)?h.fragT:h.fragS)}C(null,null!==i?i:Ea[0],NaN)}ia.trigger(q.default.STREAMS_COMPOSED)}catch(j){Ca.manifestError(j.message,"nostreamscomposed",oa.getValue()),La=!0,ea()}}function O(){var a=oa.getValue();Ga&&(ia.trigger(q.default.PROTECTION_CREATED,{controller:Ga,manifest:a}),Ga.setMediaElement(Na.getElement()),Ha&&Ga.setProtectionData(Ha)),N()}function P(a){a.error?(La=!0,ea()):function(){var b=a.manifest;qa.updatePeriods(b);var c=qa.getStreamsInfo(void 0,1)[0],d=qa.getMediaInfoForType(c,g.default.VIDEO)||qa.getMediaInfoForType(c,g.default.AUDIO),e=void 0;d&&(e=pa.getUseCalculatedLiveEdgeTimeForAdaptation(qa.getDataForMedia(d)))&&(ka.debug("SegmentTimeline detected using calculated Live Edge Time"),Pa.setUseManifestDateHeaderTimeSource(!1));var f=pa.getUTCTimingSources(a.manifest),h=!pa.getIsDynamic(b)||e?f:f.concat(Pa.getUTCTimingSources()),i=Ba.isHTTPS(a.manifest.url);h.forEach(function(a){a.value.replace(/.*?:\/\//g,"")===s.default.DEFAULT_UTC_TIMING_SOURCE.value.replace(/.*?:\/\//g,"")&&(a.value=a.value.replace(i?new RegExp(/^(http:)?\/\//i):new RegExp(/^(https:)?\/\//i),i?"https://":"http://"),ka.debug("Matching default timing source protocol to manifest protocol: ",a.value))}),va.initialize(b),ua.setConfig({metricsModel:ra,dashMetrics:sa,baseURLController:va}),ua.initialize(h,Pa.getUseManifestDateHeaderTimeSource())}()}function Q(){return Ua}function R(){return Ta}function S(a){var b=!1;return Fa&&Fa.getProcessors().forEach(function(c){c.getMediaInfo().type===a&&(b=!0)}),b}function T(a,b){b=b||new Date,Sa&&(Fa&&Fa.getProcessors().forEach(function(c){var d=c.getScheduleController();d&&d.finalisePlayList(b,a)}),ra.addPlayList(Sa),Sa=null)}function U(a){Sa=new v.PlayList,Sa.start=new Date,Sa.mstart=1e3*Oa.getTime(),Sa.starttype=a,Fa&&Fa.getProcessors().forEach(function(a){var b=a.getScheduleController();b&&b.setPlayList(Sa)})}function V(a){if(a.error){var b="";switch(a.error.code){case 1:b="MEDIA_ERR_ABORTED";break;case 2:b="MEDIA_ERR_NETWORK";break;case 3:b="MEDIA_ERR_DECODE";break;case 4:b="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:b="MEDIA_ERR_ENCRYPTED";break;default:b="UNKNOWN"}Ka=!0,a.error.message&&(b+=" ("+a.error.message+")"),a.error.msExtendedCode&&(b+=" (0x"+(a.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),ka.fatal("Video Element Error: "+b),a.error&&ka.fatal(a.error),Ca.mediaSourceError(b),ea()}}function W(){return Fa?Fa.getStreamInfo():null}function X(a){return Ea.filter(function(b){return b.getId()===a})[0]}function Y(){if(!(na&&na.hasOwnProperty("load")&&Da&&Da.hasOwnProperty("initialize")&&Da.hasOwnProperty("reset")&&Da.hasOwnProperty("getClientTimeOffset")))throw new Error("setConfig function has to be called previously")}function Z(){if(!ma||!ma.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}function $(a){Y(),na.load(a)}function _(a){Z(),ma.setManifest(a)}function aa(a){isNaN(a.newDuration)||L(a.newDuration)}function ba(a){a&&(a.capabilities&&(la=a.capabilities),a.manifestLoader&&(na=a.manifestLoader),a.manifestModel&&(oa=a.manifestModel),a.dashManifestModel&&(pa=a.dashManifestModel),a.mediaPlayerModel&&(Pa=a.mediaPlayerModel),a.protectionController&&(Ga=a.protectionController),a.adapter&&(qa=a.adapter),a.metricsModel&&(ra=a.metricsModel),a.dashMetrics&&(sa=a.dashMetrics),a.errHandler&&(Ca=a.errHandler),a.timelineConverter&&(Da=a.timelineConverter),a.videoModel&&(Na=a.videoModel),a.playbackController&&(Oa=a.playbackController),a.domStorage&&(wa=a.domStorage),a.abrController&&(xa=a.abrController),a.mediaController&&(ya=a.mediaController),a.textController&&(za=a.textController))}function ca(a){Ha=a}function da(){Ea=[],Ga=null,Ja=!1,Fa=null,Ka=!1,La=!1,Ta=void 0,Ua=void 0,Ra=!0,Qa=!1,Ia=!0,Sa=null,Wa=void 0,Va=!1,Xa=0}function ea(){Y(),ua.reset(),T(Ka||La?v.PlayListTrace.FAILURE_STOP_REASON:v.PlayListTrace.USER_REQUEST_STOP_REASON);for(var a=0,b=Ea?Ea.length:0;a<b;a++){Ea[a].reset(Ka)}ia.off(q.default.PLAYBACK_TIME_UPDATED,c,this),ia.off(q.default.PLAYBACK_SEEKING,f,this),ia.off(q.default.PLAYBACK_ERROR,V,this),ia.off(q.default.PLAYBACK_STARTED,h,this),ia.off(q.default.PLAYBACK_PAUSED,j,this),ia.off(q.default.PLAYBACK_ENDED,y,this),ia.off(q.default.MANIFEST_UPDATED,P,this),ia.off(q.default.STREAM_BUFFERING_COMPLETED,p,this),ia.off(D.default.METRIC_ADDED,fa,this),ia.off(q.default.MANIFEST_VALIDITY_CHANGED,aa,this),va.reset(),ma.reset(),ra.clearAllCurrentMetrics(),oa.setValue(null),na.reset(),Da.reset(),Aa.reset(),Ma&&(ta.detachMediaSource(Na),Ma=null),Na=null,Ga&&(Ga.setMediaElement(null),Ga=null,Ha=null,oa.getValue()&&ia.trigger(q.default.PROTECTION_DESTROYED,{data:oa.getValue().url})),ia.trigger(q.default.STREAM_TEARDOWN_COMPLETE),da()}function fa(a){a.metric===i.default.DVR_INFO&&a.mediaType===g.default.AUDIO&&ta.setSeekable(Ma,a.value.range.start,a.value.range.end)}var ga=40,ha=this.context,ia=(0,o.default)(ha).getInstance(),ja=void 0,ka=void 0,la=void 0,ma=void 0,na=void 0,oa=void 0,pa=void 0,qa=void 0,ra=void 0,sa=void 0,ta=void 0,ua=void 0,va=void 0,wa=void 0,xa=void 0,ya=void 0,za=void 0,Aa=void 0,Ba=void 0,Ca=void 0,Da=void 0,Ea=void 0,Fa=void 0,Ga=void 0,Ha=void 0,Ia=void 0,Ja=void 0,Ka=void 0,La=void 0,Ma=void 0,Na=void 0,Oa=void 0,Pa=void 0,Qa=void 0,Ra=void 0,Sa=void 0,Ta=void 0,Ua=void 0,Va=void 0,Wa=void 0,Xa=void 0,Ya=void 0,Za=void 0,$a=void 0,_a=void 0;return ja={initialize:b,getActiveStreamInfo:W,isVideoTrackPresent:R,isAudioTrackPresent:Q,switchToVideoElement:G,getStreamById:X,getStreamForTime:t,getTimeRelativeToStreamId:u,load:$,loadWithManifest:_,getActiveStreamProcessors:w,setConfig:ba,setProtectionData:ca,reset:ea},a(),ja}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(99),i=d(h),j=a(95),k=d(j),l=a(90),m=d(l),n=a(46),o=d(n),p=a(50),q=d(p),r=a(116),s=d(r),t=a(47),u=d(t),v=a(185),w=a(45),x=d(w),y=a(152),z=d(y),A=a(158),B=d(A),C=a(92),D=d(C),E=a(111),F=d(E),G=a(101),H=d(G),I=a(107),J=d(I);e.__dashjs_factory_name="StreamController",c.default=u.default.getSingletonFactory(e),b.exports=c.default},{101:101,107:107,111:111,116:116,152:152,158:158,185:185,45:45,46:46,47:47,50:50,90:90,92:92,95:95,98:98,99:99}],111:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){I=(0,r.default)(E).getInstance().getLogger(H)}function b(a,b){M=b,J=0,K=!1,L=!1,N={"urn:mpeg:dash:utc:http-head:2014":z,"urn:mpeg:dash:utc:http-xsdate:2014":y.bind(null,p),"urn:mpeg:dash:utc:http-iso:2014":y.bind(null,q),"urn:mpeg:dash:utc:direct:2014":x,"urn:mpeg:dash:utc:http-head:2012":z,"urn:mpeg:dash:utc:http-xsdate:2012":y.bind(null,p),"urn:mpeg:dash:utc:http-iso:2012":y.bind(null,q),"urn:mpeg:dash:utc:direct:2012":x,"urn:mpeg:dash:utc:http-ntp:2014":w,"urn:mpeg:dash:utc:ntp:2014":w,"urn:mpeg:dash:utc:sntp:2014":w},f()||(C(a),h(!0))}function c(a){a&&(a.metricsModel&&(O=a.metricsModel),a.dashMetrics&&(P=a.dashMetrics),a.baseURLController&&(Q=a.baseURLController))}function d(){return m()}function e(a){K=a}function f(){return K}function h(a){L=a}function k(a){J=a}function m(){return J}function o(a){var b=1e3,c=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/,d=void 0,e=void 0,f=c.exec(a);return d=Date.UTC(parseInt(f[1],10),parseInt(f[2],10)-1,parseInt(f[3],10),parseInt(f[4],10),parseInt(f[5],10),f[6]&&(parseInt(f[6],10)||0),f[7]&&parseFloat(f[7])*b||0),f[9]&&f[10]&&(e=60*parseInt(f[9],10)+parseInt(f[10],10),d+=("+"===f[8]?-1:1)*e*60*b),new Date(d).getTime()}function p(a){var b=Date.parse(a);return isNaN(b)&&(b=o(a)),b}function q(a){return Date.parse(a)}function s(a){return Date.parse(a)}function w(a,b,c){c()}function x(a,b,c){var d=p(a);if(!isNaN(d))return void b(d);c()}function y(a,b,c,d,e){var f=void 0,g=void 0,h=!1,i=new XMLHttpRequest,k=e?j.HTTPRequest.HEAD:j.HTTPRequest.GET,l=b.match(/\S+/g);if(b=l.shift(),f=function(){h||(h=!0,l.length?y(a,l.join(" "),c,d,e):d())},g=function(){var b=void 0,d=void 0;200===i.status&&(b=e?i.getResponseHeader("Date"):i.response,d=a(b),isNaN(d)||(c(d),h=!0))},G.isRelative(b)){var m=Q.resolve();m&&(b=G.resolve(b,m.url))}i.open(k,b),i.timeout=v||0,i.onload=g,i.onloadend=f,i.send()}function z(a,b,c){y(s,a,b,c,!0)}function A(){var a=O.getReadOnlyMetricsFor(g.default.STREAM),b=P.getLatestMPDRequestHeaderValueByID(a,"Date"),c=null!==b?new Date(b).getTime():Number.NaN;isNaN(c)?B(!0):(k(c-(new Date).getTime()),B(!1,c/1e3,J))}function B(a,b,c){e(!1),F.trigger(n.default.TIME_SYNCHRONIZATION_COMPLETED,{time:b,offset:c,error:a?new i.default(u):null})}function C(a,b){var c=b||0,d=a[c],f=function(a,b){var c=!a||!b;c&&M?A():B(c,a,b)};e(!0),d?N.hasOwnProperty(d.schemeIdUri)?N[d.schemeIdUri](d.value,function(a){var b=(new Date).getTime(),c=1e3*Math.trunc((a-b)/1e3);k(c),I.debug("Local time: "+new Date(b)),I.debug("Server time: "+new Date(a)),I.info("Server Time - Local Time (ms): "+c),f(a,c)},function(){C(a,c+1)}):C(a,c+1):(k(0),f())}function D(){h(!1),e(!1)}var E=this.context,F=(0,l.default)(E).getInstance(),G=(0,t.default)(E).getInstance(),H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0,Q=void 0;return H={initialize:b,getOffsetToDeviceTimeMs:d,setConfig:c,reset:D},a(),H}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(163),i=d(h),j=a(183),k=a(46),l=d(k),m=a(50),n=d(m),o=a(47),p=d(o),q=a(45),r=d(q),s=a(158),t=d(s),u=1,v=5e3;e.__dashjs_factory_name="TimeSyncController";var w=p.default.getSingletonFactory(e);w.TIME_SYNC_FAILED_ERROR_CODE=u,w.HTTP_TIMEOUT_MS=v,p.default.updateSingletonFactory(e.__dashjs_factory_name,w),c.default=w,b.exports=c.default},{158:158,163:163,183:183,45:45,46:46,47:47,50:50,98:98}],112:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){A.on(k.default.XLINK_ELEMENT_LOADED,j,C),H=(0,g.default)(z).create({errHandler:a.errHandler,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier})}function c(a){a&&(D=a)}function d(a){a&&(E=a)}function e(a){var b=void 0;G=new o.default({escapeMode:!1,attributePrefix:"",
|
25 |
+
arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:D}),F=a,b=m(F.Period_asArray,F,t,r),h(b,t,r)}function f(){A.off(k.default.XLINK_ELEMENT_LOADED,j,C),H&&(H.reset(),H=null)}function h(a,b,c){var d={},e=void 0,f=void 0;d.elements=a,d.type=b,d.resolveType=c,0===d.elements.length&&l(d);for(var g=0;g<d.elements.length;g++)e=d.elements[g],f=B.isHTTPURL(e.url)?e.url:e.originalContent.BaseURL+e.url,H.load(f,e,d)}function j(a){var b=void 0,c=void 0,d="";if(b=a.element,c=a.resolveObject,b.resolvedContent){var e=0;0===b.resolvedContent.indexOf("<?xml")&&(e=b.resolvedContent.indexOf("?>")+2),d=b.resolvedContent.substr(0,e)+"<response>"+b.resolvedContent.substr(e)+"</response>",b.resolvedContent=G.xml_str2json(d)}x(c)&&l(c)}function l(a){var b=[],c=void 0,d=void 0;if(n(a),a.resolveType===s&&A.trigger(k.default.XLINK_READY,{manifest:F}),a.resolveType===r)switch(a.type){case t:for(c=0;c<F[t+"_asArray"].length;c++)d=F[t+"_asArray"][c],d.hasOwnProperty(u+"_asArray")&&(b=b.concat(m(d[u+"_asArray"],d,u,r))),d.hasOwnProperty(v+"_asArray")&&(b=b.concat(m(d[v+"_asArray"],d,v,r)));h(b,u,r);break;case u:A.trigger(k.default.XLINK_READY,{manifest:F})}}function m(a,b,c,d){var e=[],f=void 0,g=void 0,h=void 0;for(g=a.length-1;g>=0;g--)f=a[g],f.hasOwnProperty("xlink:href")&&f["xlink:href"]===w&&a.splice(g,1);for(g=0;g<a.length;g++)f=a[g],f.hasOwnProperty("xlink:href")&&f.hasOwnProperty("xlink:actuate")&&f["xlink:actuate"]===d&&(h=p(f["xlink:href"],b,c,g,d,f),e.push(h));return e}function n(a){var b=[],c=void 0,d=void 0,e=void 0,f=void 0,g=void 0,h=void 0;for(f=a.elements.length-1;f>=0;f--){if(c=a.elements[f],d=c.type+"_asArray",!c.resolvedContent||y())delete c.originalContent["xlink:actuate"],delete c.originalContent["xlink:href"],b.push(c.originalContent);else if(c.resolvedContent)for(g=0;g<c.resolvedContent[d].length;g++)e=c.resolvedContent[d][g],b.push(e);for(c.parentElement[d].splice(c.index,1),h=0;h<b.length;h++)c.parentElement[d].splice(c.index+h,0,b[h]);b=[]}a.elements.length>0&&E.run(F)}function p(a,b,c,d,e,f){return{url:a,parentElement:b,type:c,index:d,resolveType:e,originalContent:f,resolvedContent:null,resolved:!1}}function x(a){var b=void 0,c=void 0;for(b=0;b<a.elements.length;b++)if(c=a.elements[b],!1===c.resolved)return!1;return!0}function y(){return!1}a=a||{};var z=this.context,A=(0,i.default)(z).getInstance(),B=(0,q.default)(z).getInstance(),C=void 0,D=void 0,E=void 0,F=void 0,G=void 0,H=void 0;return C={resolveManifestOnLoad:e,setMatchers:c,setIron:d,reset:f},b(),C}Object.defineProperty(c,"__esModule",{value:!0});var f=a(97),g=d(f),h=a(46),i=d(h),j=a(50),k=d(j),l=a(47),m=d(l),n=a(3),o=d(n),p=a(158),q=d(p),r="onLoad",s="onActuate",t="Period",u="AdaptationSet",v="EventStream",w="urn:mpeg:dash:resolve-to-zero:2013";e.__dashjs_factory_name="XlinkController",c.default=m.default.getClassFactory(e),b.exports=c.default},{158:158,3:3,46:46,47:47,50:50,97:97}],113:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(){function a(){i()}function b(a){a.dashManifestModel&&(o=a.dashManifestModel)}function c(a,b,c){var d=o.getBaseURLsFromElement(c);a[b]?q.areEqual(d,a[b].data.baseUrls)||(a[b].data.baseUrls=d,a[b].data.selectedIdx=k):a[b]=new l(d)}function d(a){var b=o.getBaseURLsFromElement(a);q.areEqual(b,n.data.baseUrls)||(n.data.baseUrls=b,n.data.selectedIdx=k),a.Period_asArray&&a.Period_asArray.forEach(function(a,b){c(n.children,b,a),a.AdaptationSet_asArray&&a.AdaptationSet_asArray.forEach(function(a,d){c(n.children[b].children,d,a),a.Representation_asArray&&a.Representation_asArray.sort(o.getRepresentationSortFunction()).forEach(function(a,e){c(n.children[b].children[d].children,e,a)})})})}function e(a,b){var c=b||n;a(c.data),c.children&&c.children.forEach(function(b){return e(a,b)})}function f(a){e(function(b){isNaN(b.selectedIdx)||a===b.baseUrls[b.selectedIdx].serviceLocation&&(b.selectedIdx=k)})}function g(a){d(a)}function i(){n=new l}function j(a){var b=n,c=[b.data];return a&&a.forEach(function(a){(b=b.children[a])&&c.push(b.data)}),c.filter(function(a){return a.baseUrls.length})}var m=void 0,n=void 0,o=void 0,p=this.context,q=(0,h.default)(p).getInstance();return m={reset:i,update:g,getForPath:j,invalidateSelectedIndexes:f,setConfig:b},a(),m}Object.defineProperty(c,"__esModule",{value:!0});var g=a(155),h=d(g),i=a(47),j=d(i),k=NaN,l=function a(b,c){e(this,a),this.data={baseUrls:b||null,selectedIdx:c||k},this.children=[]};f.__dashjs_factory_name="BaseURLTreeModel",c.default=j.default.getClassFactory(f),b.exports=c.default},{155:155,47:47}],114:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){L=(0,o.default)(G).getInstance().getLogger(K),D(),H.on(i.default.LOADING_COMPLETED,A,K),H.on(i.default.LOADING_DATA_PROGRESS,B,K),H.on(i.default.LOADING_ABANDONED,C,K)}function c(a){M=a}function d(){return M}function e(a){var b=function(a,b){return a.action===m.default.ACTION_COMPLETE&&a.action===b.action},c=function(a,b){return!isNaN(a.index)&&a.startTime===b.startTime&&a.adaptationIndex===b.adaptationIndex&&a.type===b.type},d=function(a,b){return isNaN(a.index)&&isNaN(b.index)&&a.quality===b.quality},e=function(e){var f=!1;return e.some(function(e){if(c(a,e)||d(a,e)||b(a,e))return f=!0}),f};return!!a&&e(N)}function f(a){var b=!1,c=0,d=void 0;if(!(b=e(a)))for(c=0;c<O.length;c++)d=O[c],a.url===d.url&&a.startTime===d.startTime&&(b=!0);return b}function h(a){var b=a?a.state instanceof Array?a.state:[a.state]:[],c=[];return b.forEach(function(b){var d=y(b);c=c.concat(x(d,a))}),c}function j(a){return isNaN(a.duration)?.25:a.duration/8}function k(a){N=N.filter(function(b){var c=j(b);return isNaN(b.startTime)||void 0!==a&&b.startTime>=a-c})}function l(a){N=N.filter(function(b){return isNaN(b.startTime)||void 0!==a&&b.startTime<a})}function n(a,b){b<=a+.5||(N=N.filter(function(c){var d=j(c);return isNaN(c.startTime)||c.startTime>=b-d||isNaN(c.duration)||c.startTime+c.duration<=a+d}))}function r(a,b){if(!a||0===a.length)return void k();for(var c=0,d=0,e=a.length;d<e;d++)n(c,a.start(d)),c=a.end(d);b>0&&n(c,b)}function t(){J.abort(),O=[]}function u(a){switch(a.action){case m.default.ACTION_COMPLETE:N.push(a),z(a,q),L.debug("executeRequest trigger STREAM_COMPLETED"),H.trigger(i.default.STREAM_COMPLETED,{request:a,fragmentModel:this});break;case m.default.ACTION_DOWNLOAD:z(a,p),O.push(a),v(a);break;default:L.warn("Unknown request action.")}}function v(a){H.trigger(i.default.FRAGMENT_LOADING_STARTED,{sender:K,request:a}),J.load(a)}function w(a,b,c){for(var d=a.length-1,e=d;e>=0;e--){var f=a[e],g=f.startTime,h=g+f.duration;if(c=isNaN(c)?j(f):c,!isNaN(g)&&!isNaN(h)&&b+c>=g&&b-c<h||isNaN(g)&&isNaN(b))return f}return null}function x(a,b){return b.hasOwnProperty("time")?[w(a,b.time,b.threshold)]:a.filter(function(a){for(var c in b)if("state"!==c&&b.hasOwnProperty(c)&&a[c]!=b[c])return!1;return!0})}function y(a){var b=void 0;switch(a){case p:b=O;break;case q:b=N;break;default:b=[]}return b}function z(a,b){I.addSchedulingInfo(a.mediaType,new Date,a.type,a.startTime,a.availabilityStartTime,a.duration,a.quality,a.range,b),I.addRequestsQueue(a.mediaType,O,N)}function A(a){a.sender===J&&(O.splice(O.indexOf(a.request),1),a.response&&!a.error&&N.push(a.request),z(a.request,a.error?s:q),H.trigger(i.default.FRAGMENT_LOADING_COMPLETED,{request:a.request,response:a.response,error:a.error,sender:this}))}function B(a){a.sender===J&&H.trigger(i.default.FRAGMENT_LOADING_PROGRESS,{request:a.request,response:a.response,error:a.error,sender:this})}function C(a){a.sender===J&&H.trigger(i.default.FRAGMENT_LOADING_ABANDONED,{streamProcessor:this.getStreamProcessor(),request:a.request,mediaType:a.mediaType})}function D(){N=[],O=[]}function E(){H.off(i.default.LOADING_COMPLETED,A,this),H.off(i.default.LOADING_DATA_PROGRESS,B,this),H.off(i.default.LOADING_ABANDONED,C,this),J&&J.reset(),D()}function F(a){N.push(a)}a=a||{};var G=this.context,H=(0,g.default)(G).getInstance(),I=a.metricsModel,J=a.fragmentLoader,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0;return K={setStreamProcessor:c,getStreamProcessor:d,getRequests:h,isFragmentLoaded:e,isFragmentLoadedOrPending:f,removeExecutedRequestsBeforeTime:k,removeExecutedRequestsAfterTime:l,syncExecutedRequestsWithBufferedRange:r,abortRequests:t,executeRequest:u,reset:E,addExecutedRequest:F},b(),K}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(50),i=d(h),j=a(47),k=d(j),l=a(165),m=d(l),n=a(45),o=d(n),p="loading",q="executed",r="canceled",s="failed";e.__dashjs_factory_name="FragmentModel";var t=k.default.getClassFactory(e);t.FRAGMENT_MODEL_LOADING=p,t.FRAGMENT_MODEL_EXECUTED=q,t.FRAGMENT_MODEL_CANCELED=r,t.FRAGMENT_MODEL_FAILED=s,k.default.updateClassFactory(e.__dashjs_factory_name,t),c.default=t,b.exports=c.default},{165:165,45:45,46:46,47:47,50:50}],115:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){return e}function b(a){e=a,a&&d.trigger(i.default.MANIFEST_LOADED,{data:a})}var c=this.context,d=(0,g.default)(c).getInstance(),e=void 0;return{getValue:a,setValue:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(50),i=d(h),j=a(47),k=d(j);e.__dashjs_factory_name="ManifestModel",c.default=k.default.getSingletonFactory(e),b.exports=c.default},{46:46,47:47,50:50}],116:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(){function a(){var a,b;eb=[],db=!1,cb=!0,hb=!0,xb=k.default.ABR_STRATEGY_DYNAMIC,yb=!0,Ab=!1,lb={enabled:!0,ttl:n},mb={enabled:!0,ttl:o},fb=m,gb=void 0,ib=r,jb=s,kb=t,nb=NaN,ob=w,pb=x,qb=y,rb=z,sb=p,tb=q,wb=N,Eb=!1,Fb=A,Hb=B,zb={default:O},Bb=[],Cb=k.default.MOVING_AVERAGE_SLIDING_WINDOW,Gb=!1,a={},e(a,i.HTTPRequest.MPD_TYPE,G),e(a,i.HTTPRequest.XLINK_EXPANSION_TYPE,I),e(a,i.HTTPRequest.MEDIA_SEGMENT_TYPE,E),e(a,i.HTTPRequest.INIT_SEGMENT_TYPE,E),e(a,i.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,E),e(a,i.HTTPRequest.INDEX_SEGMENT_TYPE,E),e(a,i.HTTPRequest.OTHER_TYPE,E),ub=a,b={},e(b,i.HTTPRequest.MPD_TYPE,H),e(b,i.HTTPRequest.XLINK_EXPANSION_TYPE,J),e(b,i.HTTPRequest.MEDIA_SEGMENT_TYPE,F),e(b,i.HTTPRequest.INIT_SEGMENT_TYPE,F),e(b,i.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,F),e(b,i.HTTPRequest.INDEX_SEGMENT_TYPE,F),e(b,i.HTTPRequest.OTHER_TYPE,F),vb=b,Db={},Db[k.default.VIDEO]=C,Db[k.default.AUDIO]=D}function b(a){xb=a}function c(){return xb}function d(a){yb=a}function f(){return yb}function g(a){var b=void 0;for(b=0;b<Bb.length;b++)if(Bb[b].rulename===a)return b;return-1}function h(){return Bb}function j(a,b,c){var d=g(b);-1===d?Bb.push({type:a,rulename:b,rule:c}):(Bb[d].type=a,Bb[d].rule=c)}function l(a){var b=g(a);-1!==b&&Bb.splice(b,1)}function P(){Bb=[]}function Q(a){sb=a}function R(){return sb}function S(a){tb=a}function T(){return tb}function U(a){nb=a}function V(){var a=isNaN(nb)?Ab?v:u:nb;return Ya()?a/L:a}function W(a){ob=a}function X(){return ob}function Y(a){pb=a}function Z(){return pb}function $(a){qb=a}function _(){return qb}function aa(a){rb=a}function ba(){return rb}function ca(a,b){Db[a]=b}function da(a){return Db[a]}function ea(a){ib=a}function fa(){return ib}function ga(a){jb=a}function ha(){return jb}function ia(a,b){lb.enabled=a,void 0===b||isNaN(b)||"number"!=typeof b||(lb.ttl=b)}function ja(){return lb}function ka(a,b){mb.enabled=a,void 0===b||isNaN(b)||"number"!=typeof b||(mb.ttl=b)}function la(){return mb}function ma(a){kb=a}function na(){return kb}function oa(a){ub[i.HTTPRequest.MEDIA_SEGMENT_TYPE]=a}function pa(a){ub[i.HTTPRequest.MPD_TYPE]=a}function qa(a,b){ub[a]=b}function ra(){return ub[i.HTTPRequest.MEDIA_SEGMENT_TYPE]}function sa(){return ub[i.HTTPRequest.MPD_TYPE]}function ta(a){return Ya()?ub[a]*M:ub[a]}function ua(a){vb[i.HTTPRequest.MEDIA_SEGMENT_TYPE]=a}function va(a){vb[i.HTTPRequest.MPD_TYPE]=a}function wa(a,b){vb[a]=b}function xa(){return vb[i.HTTPRequest.MEDIA_SEGMENT_TYPE]}function ya(){return vb[i.HTTPRequest.MPD_TYPE]}function za(a){return Ya()?vb[a]/L:vb[a]}function Aa(a){wb=a}function Ba(){return wb}function Ca(a){hb=a}function Da(){return hb}function Ea(a){fb=a}function Fa(a){gb=a}function Ga(){return fb}function Ha(){return Gb?gb||K:gb}function Ia(a){cb=a}function Ja(){return cb}function Ka(a){db=a}function La(){return db}function Ma(a){eb=a}function Na(){return eb}function Oa(a,b){a?zb[a]=!!b:Object.keys(zb).forEach(function(a){Oa(a,b)})}function Pa(a){var b=zb[a];return void 0===b?zb.default:b}function Qa(){return Ab}function Ra(a){Ab=a}function Sa(a){Cb=a}function Ta(){return Cb}function Ua(a){Eb=a}function Va(){return Eb}function Wa(a){Fb=a}function Xa(){return Fb}function Ya(){return Gb}function Za(a){Gb=a}function $a(a){Hb=a}function _a(){return Hb}function ab(){}var bb=void 0,cb=void 0,db=void 0,eb=void 0,fb=void 0,gb=void 0,hb=void 0,ib=void 0,jb=void 0,kb=void 0,lb=void 0,mb=void 0,nb=void 0,ob=void 0,pb=void 0,qb=void 0,rb=void 0,sb=void 0,tb=void 0,ub=void 0,vb=void 0,wb=void 0,xb=void 0,yb=void 0,zb=void 0,Ab=void 0,Bb=void 0,Cb=void 0,Db=void 0,Eb=void 0,Fb=void 0,Gb=void 0,Hb=void 0;return bb={setABRStrategy:b,getABRStrategy:c,setUseDefaultABRRules:d,getUseDefaultABRRules:f,getABRCustomRules:h,addABRCustomRule:j,removeABRCustomRule:l,removeAllABRCustomRule:P,setBandwidthSafetyFactor:Q,getBandwidthSafetyFactor:R,setAbandonLoadTimeout:S,getAbandonLoadTimeout:T,setLastBitrateCachingInfo:ia,getLastBitrateCachingInfo:ja,setLastMediaSettingsCachingInfo:ka,getLastMediaSettingsCachingInfo:la,setStableBufferTime:U,getStableBufferTime:V,setBufferTimeAtTopQuality:W,getBufferTimeAtTopQuality:X,setBufferTimeAtTopQualityLongForm:Y,getBufferTimeAtTopQualityLongForm:Z,setLongFormContentDurationThreshold:$,getLongFormContentDurationThreshold:_,setSegmentOverlapToleranceTime:aa,getSegmentOverlapToleranceTime:ba,getCacheLoadThresholdForType:da,setCacheLoadThresholdForType:ca,setBufferToKeep:ea,getBufferToKeep:fa,setBufferAheadToKeep:ga,getBufferAheadToKeep:ha,setBufferPruningInterval:ma,getBufferPruningInterval:na,setFragmentRetryAttempts:oa,getFragmentRetryAttempts:ra,setManifestRetryAttempts:pa,getManifestRetryAttempts:sa,setRetryAttemptsForType:qa,getRetryAttemptsForType:ta,setFragmentRetryInterval:ua,getFragmentRetryInterval:xa,setManifestRetryInterval:va,getManifestRetryInterval:ya,setRetryIntervalForType:wa,getRetryIntervalForType:za,setWallclockTimeUpdateInterval:Aa,getWallclockTimeUpdateInterval:Ba,setScheduleWhilePaused:Ca,getScheduleWhilePaused:Da,getUseSuggestedPresentationDelay:La,setUseSuggestedPresentationDelay:Ka,setLiveDelayFragmentCount:Ea,getLiveDelayFragmentCount:Ga,getLiveDelay:Ha,setLiveDelay:Fa,setUseManifestDateHeaderTimeSource:Ia,getUseManifestDateHeaderTimeSource:Ja,setUTCTimingSources:Ma,getUTCTimingSources:Na,setXHRWithCredentialsForType:Oa,getXHRWithCredentialsForType:Pa,setFastSwitchEnabled:Ra,getFastSwitchEnabled:Qa,setMovingAverageMethod:Sa,getMovingAverageMethod:Ta,setJumpGaps:Ua,getJumpGaps:Va,setSmallGapLimit:Wa,getSmallGapLimit:Xa,getLowLatencyEnabled:Ya,setLowLatencyEnabled:Za,setManifestUpdateRetryInterval:$a,getManifestUpdateRetryInterval:_a,reset:ab},a(),bb}Object.defineProperty(c,"__esModule",{value:!0});var g=a(47),h=d(g),i=a(183),j=a(98),k=d(j),l={scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"http://time.akamai.com/?iso"},m=4,n=36e4,o=36e4,p=.9,q=1e4,r=20,s=80,t=10,u=12,v=20,w=30,x=60,y=600,z=.2,A=.8,B=100,C=50,D=5,E=3,F=1e3,G=3,H=500,I=1,J=500,K=2.8,L=10,M=5,N=50,O=!1;f.__dashjs_factory_name="MediaPlayerModel";var P=h.default.getSingletonFactory(f);P.DEFAULT_UTC_TIMING_SOURCE=l,h.default.updateSingletonFactory(f.__dashjs_factory_name,P),c.default=P,b.exports=c.default},{183:183,47:47,98:98}],117:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){W={}}function b(a){a&&a.adapter&&(V=a.adapter)}function c(){T.trigger(G.default.METRICS_CHANGED)}function d(a){T.trigger(G.default.METRIC_CHANGED,{mediaType:a}),c()}function e(a,b,c){T.trigger(G.default.METRIC_UPDATED,{mediaType:a,metric:b,value:c}),d(a)}function f(a,b,c){T.trigger(G.default.METRIC_ADDED,{mediaType:a,metric:b,value:c}),d(a)}function h(a){delete W[a],d(a)}function j(){W={},c()}function l(a){return W.hasOwnProperty(a)?W[a]:null}function o(a){var b=void 0;return W.hasOwnProperty(a)?b=W[a]:(b=new k.default,W[a]=b),b}function q(a,b,c){var d=o(a);d[b].push(c),d[b].length>R&&d[b].shift()}function s(a,b,c,d,e,f){var g=new m.default;return g.tcpid=b,g.dest=c,g.topen=d,g.tclose=e,g.tconnect=f,B(a,i.default.TCP_CONNECTION,g),g}function u(a,b,c,d){var e=new n.HTTPRequestTrace;return e.s=b,e.d=c,e.b=d,a.trace.push(e),a.interval||(a.interval=0),a.interval+=c,e}function w(a,b,c,d,e,f,g,h,j,k,l,m,o,p){var q=new n.HTTPRequest;return e&&e!==d&&(w(a,null,c,d,null,null,g,h,null,null,null,m,null,null),q.actualurl=e),q.tcpid=b,q.type=c,q.url=d,q.range=g,q.trequest=h,q.tresponse=j,q.responsecode=l,q._tfinish=k,q._stream=a,q._mediaduration=m,q._responseHeaders=o,q._serviceLocation=f,p?p.forEach(function(a){u(q,a.s,a.d,a.b)}):(delete q.interval,delete q.trace),B(a,i.default.HTTP_REQUEST,q),q}function z(a,b,c,d,e){var f=new p.default;return f.t=b,f.mt=c,f.to=d,e?f.lto=e:delete f.lto,B(a,i.default.TRACK_SWITCH,f),f}function B(a,b,c){q(a,b,c),f(a,b,c)}function D(a,b,c){var d=new r.default;return d.t=b,d.level=c,B(a,i.default.BUFFER_LEVEL,d),d}function F(a,b,c){var d=new t.default;return d.target=c,d.state=b,B(a,i.default.BUFFER_STATE,d),d}function H(a,b,c,d){var e=new v.default;return e.time=b,e.range=d,e.manifestInfo=c,B(a,i.default.DVR_INFO,e),e}function I(a,b){var c=new x.default,d=o(a).DroppedFrames;return c.time=b.creationTime,c.droppedFrames=b.droppedVideoFrames,d.length>0&&d[d.length-1]==c?d[d.length-1]:(B(a,i.default.DROPPED_FRAMES,c),c)}function J(a,b,c,d,e,f,g,h,j){var k=new A.default;return k.mediaType=a,k.t=b,k.type=c,k.startTime=d,k.availabilityStartTime=e,k.duration=f,k.quality=g,k.range=h,k.state=j,B(a,i.default.SCHEDULING_INFO,k),k}function K(a,b,c){var d=new E.default;d.loadingRequests=b,d.executedRequests=c,o(a).RequestsQueue=d,f(a,i.default.REQUESTS_QUEUE,d)}function L(a,b,c,d,e,h,j,k,l,m){var n=new y.ManifestUpdate;return n.mediaType=a,n.type=b,n.requestTime=c,n.fetchTime=d,n.availabilityStartTime=e,n.presentationStartTime=h,n.clientTimeOffset=j,n.currentTime=k,n.buffered=l,n.latency=m,q(g.default.STREAM,i.default.MANIFEST_UPDATE,n),f(a,i.default.MANIFEST_UPDATE,n),n}function M(a,b){if(a){for(var c in b)a[c]=b[c];e(a.mediaType,i.default.MANIFEST_UPDATE,a)}}function N(a,b,c,d,f){if(a){var g=new y.ManifestUpdateStreamInfo;return g.id=b,g.index=c,g.start=d,g.duration=f,a.streamInfo.push(g),e(a.mediaType,i.default.MANIFEST_UPDATE_STREAM_INFO,a),g}return null}function O(a,b,c,d,f,g,h,j){if(a){var k=new y.ManifestUpdateRepresentationInfo;return k.id=b,k.index=c,k.streamIndex=d,k.mediaType=f,k.startNumber=h,k.fragmentInfoType=j,k.presentationTimeOffset=g,a.representationInfo.push(k),e(a.mediaType,i.default.MANIFEST_UPDATE_TRACK_INFO,a),k}return null}function P(a){var b=g.default.STREAM;return a.trace&&Array.isArray(a.trace)?a.trace.forEach(function(a){a.hasOwnProperty("subreplevel")&&!a.subreplevel&&delete a.subreplevel}):delete a.trace,B(b,i.default.PLAY_LIST,a),a}function Q(a){return B(g.default.STREAM,i.default.DVB_ERRORS,a),a}var R=1e3,S=this.context,T=(0,C.default)(S).getInstance(),U=void 0,V=void 0,W=void 0;return U={clearCurrentMetricsForType:h,clearAllCurrentMetrics:j,getReadOnlyMetricsFor:l,getMetricsFor:o,addTcpConnection:s,addHttpRequest:w,addRepresentationSwitch:z,addBufferLevel:D,addBufferState:F,addDVRInfo:H,addDroppedFrames:I,addSchedulingInfo:J,addRequestsQueue:K,addManifestUpdate:L,updateManifestUpdateInfo:M,addManifestUpdateStreamInfo:N,addManifestUpdateRepresentationInfo:O,addPlayList:P,addDVBErrors:Q,setConfig:b},a(),U}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(99),i=d(h),j=a(171),k=d(j),l=a(189),m=d(l),n=a(183),o=a(186),p=d(o),q=a(179),r=d(q),s=a(180),t=d(s),u=a(181),v=d(u),w=a(182),x=d(w),y=a(184),z=a(188),A=d(z),B=a(46),C=d(B),D=a(187),E=d(D),F=a(50),G=d(F),H=a(47),I=d(H);e.__dashjs_factory_name="MetricsModel",c.default=I.default.getSingletonFactory(e),b.exports=c.default},{171:171,179:179,180:180,181:181,182:182,183:183,184:184,186:186,187:187,188:188,189:189,46:46,47:47,50:50,98:98,99:99}],118:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){if(c=new g.default,!a)return null;var b=a.indexOf("#");if(-1!==b)for(var d=a.substr(b+1).split("&"),e=0,f=d.length;e<f;++e){var h=d[e],i=h.indexOf("=");if(-1!==i){var j=h.substring(0,i);c.hasOwnProperty(j)&&(c[j]=h.substr(i+1))}}}function b(){return c}var c=void 0;return{initialize:a,getURIFragmentData:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(178),g=d(f),h=a(47),i=d(h);e.__dashjs_factory_name="URIFragmentModel",c.default=i.default.getSingletonFactory(e),b.exports=c.default},{178:178,47:47}],119:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){X=(0,m.default)(ba).getInstance().getLogger(W)}function b(){ca.on(k.default.PLAYBACK_PLAYING,x,this)}function c(){ca.off(k.default.PLAYBACK_PLAYING,x,this)}function d(){Y&&(Y.playbackRate=_||1,Y.removeEventListener("canplay",d))}function e(a){Y&&(Y.readyState<=2&&a>0?Y.addEventListener("canplay",d):Y.playbackRate=a)}function f(a,b){if(Y){if(Y.currentTime==a)return;try{a=b?g(a):a,Y.currentTime=a}catch(c){0===Y.readyState&&c.code===c.INVALID_STATE_ERR&&setTimeout(function(){Y.currentTime=a},400)}}}function g(a){var b=K(),c=a,d=9999999999;if(b)for(var e=0;e<b.length;e++){var f=b.start(e),g=b.end(e),h=Math.abs(f-a),i=Math.abs(g-a);if(a>=f&&a<=g)return a;h<d&&(d=h,c=f),i<d&&(d=i,c=g)}return c}function h(){return Y}function j(a){if(!(null===a||void 0===a||a&&/^(VIDEO|AUDIO)$/i.test(a.nodeName)))throw aa;(Y=a)&&(Y.preload="auto")}function l(a){Y&&(a?Y.src=a:(Y.removeAttribute("src"),Y.load()))}function n(){return Y?Y.src:null}function o(){return $}function p(a){$=a}function q(){return Z}function r(a){Z=a,Z.style.position="absolute",Z.style.display="flex",Z.style.overflow="hidden",Z.style.pointerEvents="none",Z.style.top=0,Z.style.left=0}function s(a,b){w(a,b)}function t(){return da.length>0}function u(a){var b=void 0;null===a||Y.seeking||-1!==da.indexOf(a)||(da.push(a),Y&&1===da.length&&(b=document.createEvent("Event"),b.initEvent("waiting",!0,!1),_=Y.playbackRate,e(0),Y.dispatchEvent(b)))}function v(a){var b=da.indexOf(a),c=void 0;null!==a&&(-1!==b&&da.splice(b,1),Y&&!1===t()&&0===Y.playbackRate&&(e(_||1),Y.paused||(c=document.createEvent("Event"),c.initEvent("playing",!0,!1),Y.dispatchEvent(c))))}function w(a,b){b?u(a):v(a)}function x(){if(Y&&t()&&0===Y.playbackRate){var a=document.createEvent("Event");a.initEvent("waiting",!0,!1),Y.dispatchEvent(a)}}function y(){if(!Y)return null;var a="webkitDroppedFrameCount"in Y&&"webkitDecodedFrameCount"in Y,b="getVideoPlaybackQuality"in Y,c=null;return b?c=Y.getVideoPlaybackQuality():a&&(c={droppedVideoFrames:Y.webkitDroppedFrameCount,totalVideoFrames:Y.webkitDroppedFrameCount+Y.webkitDecodedFrameCount,creationTime:new Date}),c}function z(){if(Y){Y.autoplay=!0;var a=Y.play();a&&"undefined"!=typeof Promise&&a instanceof Promise&&a.catch(function(a){"NotAllowedError"===a.name&&ca.trigger(k.default.PLAYBACK_NOT_ALLOWED),X.warn("Caught pending play exception - continuing ("+a+")")})}}function A(){return Y?Y.paused:null}function B(){Y&&(Y.pause(),Y.autoplay=!1)}function C(){return Y?Y.seeking:null}function D(){return Y?Y.currentTime:null}function E(){return Y?Y.playbackRate:null}function F(){return Y?Y.played:null}function G(){return Y?Y.ended:null}function H(a,b){Y&&Y.addEventListener(a,b)}function I(a,b){Y&&Y.removeEventListener(a,b)}function J(){return Y?Y.readyState:NaN}function K(){return Y?Y.buffered:null}function L(){return Y?Y.clientWidth:NaN}function M(){return Y?Y.clientHeight:NaN}function N(){return Y?Y.videoWidth:NaN}function O(){return Y?Y.videoHeight:NaN}function P(){return Y&&Y.parentNode?Y.getBoundingClientRect().top-Y.parentNode.getBoundingClientRect().top:NaN}function Q(){return Y&&Y.parentNode?Y.getBoundingClientRect().left-Y.parentNode.getBoundingClientRect().left:NaN}function R(){return Y?Y.textTracks:[]}function S(a,b,c,d,e){if(Y)for(var f=0;f<Y.textTracks.length;f++)if(Y.textTracks[f].kind===a&&(!b||Y.textTracks[f].label==b)&&Y.textTracks[f].language===c&&Y.textTracks[f].isTTML===d&&Y.textTracks[f].isEmbedded===e)return Y.textTracks[f];return null}function T(a,b,c){return Y?Y.addTextTrack(a,b,c):null}function U(a){Y&&(Y.appendChild(a),void 0!==a.isTTML&&(Y.textTracks[Y.textTracks.length-1].isTTML=a.isTTML,Y.textTracks[Y.textTracks.length-1].isEmbedded=a.isEmbedded))}function V(a){Y&&Y.removeChild(a)}var W=void 0,X=void 0,Y=void 0,Z=void 0,$=void 0,_=void 0,aa="element is not video or audio DOM type!",ba=this.context,ca=(0,i.default)(ba).getInstance(),da=[];return W={initialize:b,setCurrentTime:f,play:z,isPaused:A,pause:B,isSeeking:C,getTime:D,getPlaybackRate:E,getPlayedRanges:F,getEnded:G,setStallState:s,getElement:h,setElement:j,setSource:l,getSource:n,getVideoContainer:o,setVideoContainer:p,getTTMLRenderingDiv:q,setTTMLRenderingDiv:r,getPlaybackQuality:y,addEventListener:H,removeEventListener:I,getReadyState:J,getBufferRange:K,getClientWidth:L,getClientHeight:M,getTextTracks:R,getTextTrack:S,addTextTrack:T,appendChild:U,removeChild:V,getVideoWidth:N,getVideoHeight:O,getVideoRelativeOffsetTop:P,getVideoRelativeOffsetLeft:Q,reset:c},a(),W}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(46),i=d(h),j=a(50),k=d(j),l=a(45),m=d(l);e.__dashjs_factory_name="VideoModel",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{45:45,46:46,47:47,50:50}],120:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){var b=new Date,e=a.request,h=new Headers;e.range&&h.append("Range","bytes="+e.range),e.requestStartDate||(e.requestStartDate=b),g&&g.modifyRequestHeader({setRequestHeader:function(a,b){h.append(a,b)}});var j=void 0;"function"==typeof window.AbortController&&(j=new AbortController,a.abortController=j);var k={method:a.method,headers:h,credentials:a.withCredentials?"include":void 0,signal:j?j.signal:void 0};fetch(a.url,k).then(function(b){a.response||(a.response={}),a.response.status=b.status,a.response.statusText=b.statusText,a.response.responseURL=b.url,b.ok||a.onerror();var e="",g=!0,h=!1,j=void 0;try{for(var k,l=b.headers.keys()[Symbol.iterator]();!(g=(k=l.next()).done);g=!0){var m=k.value;e+=m+": "+b.headers.get(m)+"\n"}}catch(t){h=!0,j=t}finally{try{!g&&l.return&&l.return()}finally{if(h)throw j}}if(a.response.responseHeaders=e,!b.body)return b.arrayBuffer().then(function(b){a.response.response=b;var c={loaded:b.byteLength,total:b.byteLength};a.progress(c),a.onload(),a.onend()});var n=parseInt(b.headers.get("Content-Length"),10),o=0,p=!1,q=new Uint8Array,r=0;a.reader=b.body.getReader();var s=[];c(a,function b(e){var g=e.value;if(e.done)return q&&(a.progress({loaded:o,total:isNaN(n)?o:n,lengthComputable:!0,time:f(s,o)}),a.response.response=q.buffer),a.onload(),void a.onend();if(g&&g.length>0){q=d(q,g),o+=g.length,s.push({ts:Date.now(),bytes:g.length});var h=(0,i.default)().getInstance().findLastTopIsoBoxCompleted(["moov","mdat"],q,r);if(h.found){var j=h.lastCompletedOffset+h.size,k=void 0;j===q.length?(k=q,q=new Uint8Array):(k=new Uint8Array(q.subarray(0,j)),q=q.subarray(j)),a.progress({data:k.buffer,lengthComputable:!1,noTrace:!0}),r=0}else r=h.lastCompletedOffset,p||(a.progress({lengthComputable:!1,noTrace:!0}),p=!0)}c(a,b)})}).catch(function(b){a.onerror&&a.onerror(b)})}function c(a,b){a.reader.read().then(b).catch(function(){})}function d(a,b){if(0===a.length)return b;var c=new Uint8Array(a.length+b.length);return c.set(a),c.set(b,a.length),c}function e(a){if(a.abortController)a.abortController.abort();else if(a.reader)try{a.reader.cancel()}catch(b){}}function f(a,b){if(a=a.filter(function(c){return c.bytes>b/4/a.length}),a.length>1){var c=function(){var b=0,c=(a[a.length-1].ts-a[0].ts)/a.length;return a.forEach(function(d,e){var f=a[e+1];if(f){var g=f.ts-d.ts;b+=g<c?g:0}}),{v:b}}();if("object"==typeof c)return c.v}return null}a=a||{};var g=a.requestModifier;return{load:b,abort:e,calculateDownloadedTime:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(146),i=d(h);e.__dashjs_factory_name="FetchLoader";var j=g.default.getClassFactory(e);c.default=j,b.exports=c.default},{146:146,47:47}],121:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){function b(){var a;r=[],s=[],t=[],a={},e(a,k.HTTPRequest.MPD_TYPE,o.default.DOWNLOAD_ERROR_ID_MANIFEST),e(a,k.HTTPRequest.XLINK_EXPANSION_TYPE,o.default.DOWNLOAD_ERROR_ID_XLINK),e(a,k.HTTPRequest.INIT_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_INITIALIZATION),e(a,k.HTTPRequest.MEDIA_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,k.HTTPRequest.INDEX_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,k.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,k.HTTPRequest.OTHER_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT),u=a}function c(a,b){var d=a.request,e=[],f=!0,o=!0,q=new Date,v=q,w=0,x=void 0;if(!n||!l||!i)throw new Error("config object is not correct or missing");var y=function(a){o=!1,d.requestStartDate=q,d.requestEndDate=new Date,d.firstByteDate=d.firstByteDate||q,d.checkExistenceOnly||l.addHttpRequest(d.mediaType,null,d.type,d.url,x.response?x.response.responseURL:null,d.serviceLocation||null,d.range||null,d.requestStartDate,d.firstByteDate,d.requestEndDate,x.response?x.response.status:null,d.duration,x.response&&x.response.getAllResponseHeaders?x.response.getAllResponseHeaders():x.response.responseHeaders,a?e:null)},z=function(){-1!==r.indexOf(x)&&(r.splice(r.indexOf(x),1),o&&(y(!1),b>0?(b--,t.push(setTimeout(function(){c(a,b)},m.getRetryIntervalForType(d.type)))):(i.downloadError(u[d.type],d.url,d),a.error&&a.error(d,"error",x.response.statusText),a.complete&&a.complete(d,x.response.statusText))))},A=function(b){var c=new Date;f&&(f=!1,(!b.lengthComputable||b.lengthComputable&&b.total!==b.loaded)&&(d.firstByteDate=c)),b.lengthComputable&&(d.bytesLoaded=b.loaded,d.bytesTotal=b.total),b.noTrace||(e.push({s:v,d:b.time?b.time:c.getTime()-v.getTime(),b:[b.loaded?b.loaded-w:0]}),v=c,w=b.loaded),a.progress&&b&&a.progress(b)},B=function(){x.response.status>=200&&x.response.status<=299&&(y(!0),a.success&&a.success(x.response.response,x.response.statusText,x.response.responseURL),a.complete&&a.complete(d,x.response.statusText))},C=function(){a.abort&&a.abort(d)},D=void 0;D=p&&window.fetch&&"arraybuffer"===d.responseType?(0,j.default)(g).create({requestModifier:n}):(0,h.default)(g).create({requestModifier:n});var E=n.modifyRequestURL(d.url),F=d.checkExistenceOnly?k.HTTPRequest.HEAD:k.HTTPRequest.GET,G=m.getXHRWithCredentialsForType(d.type);x={url:E,method:F,withCredentials:G,request:d,onload:B,onend:z,onerror:z,progress:A,onabort:C,loader:D};var H=(new Date).getTime();isNaN(d.delayLoadingTime)||H>=d.delayLoadingTime?(r.push(x),D.load(x)):function(){var a={httpRequest:x};s.push(a),a.delayTimeout=setTimeout(function(){if(-1!==s.indexOf(a)){s.splice(s.indexOf(a),1);try{q=new Date,v=q,r.push(a.httpRequest),D.load(a.httpRequest)}catch(b){a.httpRequest.onerror()}}},d.delayLoadingTime-H)}()}function d(a){a.request&&c(a,m.getRetryAttemptsForType(a.request.type))}function f(){t.forEach(function(a){return clearTimeout(a)}),t=[],s.forEach(function(a){return clearTimeout(a.delayTimeout)}),s=[],r.forEach(function(a){
|
26 |
+
a.onloadend=a.onerror=a.onprogress=void 0,a.loader.abort(a),a.onabort()}),r=[]}a=a||{};var g=this.context,i=a.errHandler,l=a.metricsModel,m=a.mediaPlayerModel,n=a.requestModifier,p=a.useFetch||!1,q=void 0,r=void 0,s=void 0,t=void 0,u=void 0;return q={load:d,abort:f},b(),q}Object.defineProperty(c,"__esModule",{value:!0});var g=a(122),h=d(g),i=a(120),j=d(i),k=a(183),l=a(47),m=d(l),n=a(151),o=d(n);f.__dashjs_factory_name="HTTPLoader";var p=m.default.getClassFactory(f);c.default=p,b.exports=c.default},{120:120,122:122,151:151,183:183,47:47}],122:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){var b=new Date,c=a.request,e=new XMLHttpRequest;e.open(a.method,a.url,!0),c.responseType&&(e.responseType=c.responseType),c.range&&e.setRequestHeader("Range","bytes="+c.range),c.requestStartDate||(c.requestStartDate=b),d&&(e=d.modifyRequestHeader(e)),e.withCredentials=a.withCredentials,e.onload=a.onload,e.onloadend=a.onend,e.onerror=a.onerror,e.onprogress=a.progress,e.onabort=a.onabort,e.send(),a.response=e}function c(a){var b=a.response;b.onloadend=b.onerror=b.onprogress=void 0,b.abort()}a=a||{};var d=a.requestModifier;return{load:b,abort:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="XHRLoader";var h=g.default.getClassFactory(e);c.default=h,b.exports=c.default},{47:47}],123:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b){var c=b&&b.droppedVideoFrames?b.droppedVideoFrames:0,g=b&&b.totalVideoFrames?b.totalVideoFrames:0,h=c-e;e=c;var i=g-f;f=g,isNaN(a)||(d[a]?(d[a].droppedVideoFrames+=h,d[a].totalVideoFrames+=i):d[a]={droppedVideoFrames:h,totalVideoFrames:i})}function b(){return d}function c(a){d=[],e=a.droppedVideoFrames,f=a.totalVideoFrames}var d=[],e=0,f=0;return{push:a,getFrameHistory:b,reset:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="DroppedFramesHistory";var h=g.default.getClassFactory(e);c.default=h,b.exports=c.default},{47:47}],124:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){return n.mediaInfo.type}function c(){return n.mediaInfo.streamInfo}function d(){return n.mediaInfo}function e(){return n}function f(){return m}function g(){return l}function h(){return o}function i(){return p}function j(){return q}function k(){return r}a=a||{};var l=a.abrController,m=a.streamProcessor,n=a.streamProcessor.getCurrentRepresentationInfo(),o=a.switchHistory,p=a.droppedFramesHistory,q=a.currentRequest,r=a.useBufferOccupancyABR;return{getMediaType:b,getMediaInfo:d,getDroppedFramesHistory:i,getCurrentRequest:j,getSwitchHistory:h,getStreamInfo:c,getStreamProcessor:f,getAbrController:g,getRepresentationInfo:e,useBufferOccupancyABR:k}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="RulesContext",c.default=g.default.getClassFactory(e),b.exports=c.default},{47:47}],125:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){function d(a){var b=i.DEFAULT;return a!==i.DEFAULT&&a!==i.STRONG&&a!==i.WEAK||(b=a),b}var e=void 0,f=void 0,g=void 0;return e=void 0===a?h:a,f=d(c),g=void 0===b?null:b,{quality:e,reason:g,priority:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=-1,i={DEFAULT:.5,STRONG:1,WEAK:0};e.__dashjs_factory_name="SwitchRequest";var j=g.default.getClassFactory(e);j.NO_CHANGE=h,j.PRIORITY=i,g.default.updateClassFactory(e.__dashjs_factory_name,j),c.default=j,b.exports=c.default},{47:47}],126:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){a.newValue===i.default.NO_CHANGE&&(a.newValue=a.oldValue),d[a.oldValue]||(d[a.oldValue]={noDrops:0,drops:0,dropSize:0});var b=a.newValue-a.oldValue,c=b<0?1:0,f=c?-b:0,g=c?0:1;if(d[a.oldValue].drops+=c,d[a.oldValue].dropSize+=f,d[a.oldValue].noDrops+=g,e.push({idx:a.oldValue,noDrop:g,drop:c,dropSize:f}),e.length>j){var h=e.shift();d[h.idx].drops-=h.drop,d[h.idx].dropSize-=h.dropSize,d[h.idx].noDrops-=h.noDrop}}function b(){return d}function c(){d=[],e=[]}var d=[],e=[];return{push:a,getSwitchRequests:b,reset:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(125),i=d(h),j=8;e.__dashjs_factory_name="SwitchRequestHistory";var k=g.default.getClassFactory(e);c.default=k,b.exports=c.default},{125:125,47:47}],127:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){F={throughputHalfLife:{fast:x,slow:w},latencyHalfLife:{fast:z,slow:y}},p()}function c(a,b,c){return a===g.default.VIDEO?c<A.getCacheLoadThresholdForType(g.default.VIDEO):a===g.default.AUDIO?c<A.getCacheLoadThresholdForType(g.default.AUDIO):void 0}function d(a,b,d){if(b.trace&&b.trace.length){var f=b.tresponse.getTime()-b.trequest.getTime()||1,g=b._tfinish.getTime()-b.tresponse.getTime()||1,h=b.trace.reduce(function(a,b){return a+b.d},0),i=b.trace.reduce(function(a,b){return a+b.b[0]},0),j=d?g:f+g;j=A.getLowLatencyEnabled()?h:j;var k=Math.round(8*i/j);if(n(a),c(a,f,g)){if(B[a].length>0&&!B[a].hasCachedEntries)return;B[a].hasCachedEntries=!0}else B[a]&&B[a].hasCachedEntries&&o(a);B[a].push(k),B[a].length>q&&B[a].shift(),C[a].push(f),C[a].length>q&&C[a].shift(),e(D[a],k,.001*g,F.throughputHalfLife),e(E[a],f,1,F.latencyHalfLife)}}function e(a,b,c,d){var e=Math.pow(.5,c/d.fast);a.fastEstimate=(1-e)*b+e*a.fastEstimate;var f=Math.pow(.5,c/d.slow);a.slowEstimate=(1-f)*b+f*a.slowEstimate,a.totalWeight+=c}function f(a,b,c){var d=void 0,e=void 0;if(a?(d=B[b],e=c?r:s):(d=C[b],e=t),d){if(e>=d.length)e=d.length;else if(a)for(var f=1;f<e;++f){var g=d[f]/d[f-1];if((g>=v||g<=1/u)&&(e+=1)===d.length)break}}else e=0;return e}function h(a,b,c){return A.getMovingAverageMethod()!==g.default.MOVING_AVERAGE_SLIDING_WINDOW?j(a,b):i(a,b,c)}function i(a,b,c){var d=f(a,b,c),e=a?B:C,g=e[b];return 0!==d&&g&&0!==g.length?(g=g.slice(-d),g.reduce(function(a,b){return a+b})/g.length):NaN}function j(a,b){var c=a?F.throughputHalfLife:F.latencyHalfLife,d=a?D[b]:E[b];if(!d||d.totalWeight<=0)return NaN;var e=d.fastEstimate/(1-Math.pow(.5,d.totalWeight/c.fast)),f=d.slowEstimate/(1-Math.pow(.5,d.totalWeight/c.slow));return a?Math.min(e,f):Math.max(e,f)}function k(a,b){return h(!0,a,b)}function l(a,b){var c=k(a,b);return isNaN(c)||(c*=A.getBandwidthSafetyFactor()),c}function m(a){return h(!1,a)}function n(a){B[a]=B[a]||[],C[a]=C[a]||[],D[a]=D[a]||{fastEstimate:0,slowEstimate:0,totalWeight:0},E[a]=E[a]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function o(a){delete B[a],delete C[a],delete D[a],delete E[a],n(a)}function p(){B={},C={},D={},E={}}a=a||{};var q=20,r=3,s=4,t=4,u=1.3,v=1.3,w=8,x=3,y=2,z=1,A=a.mediaPlayerModel,B=void 0,C=void 0,D=void 0,E=void 0,F=void 0,G={push:d,getAverageThroughput:k,getSafeAverageThroughput:l,getAverageLatency:m,reset:p};return b(),G}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(47),i=d(h);e.__dashjs_factory_name="ThroughputHistory",c.default=i.default.getClassFactory(e),b.exports=c.default},{47:47,98:98}],128:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){r=[],s=[],l.getUseDefaultABRRules()&&(r.push((0,q.default)(j).create({metricsModel:n,dashMetrics:p,mediaPlayerModel:l})),r.push((0,g.default)(j).create({metricsModel:n,dashMetrics:p})),r.push((0,i.default)(j).create({metricsModel:n,dashMetrics:p})),r.push((0,o.default)(j).create()),r.push((0,m.default)(j).create()),s.push((0,k.default)(j).create({metricsModel:n,dashMetrics:p,mediaPlayerModel:l}))),l.getABRCustomRules().forEach(function(a){a.type===v&&r.push(a.rule(j).create()),a.type===w&&s.push(a.rule(j).create())})}function c(a){return a.filter(function(a){return a.quality>u.default.NO_CHANGE})}function d(a){var b={},c=void 0,d=void 0,e=void 0,f=void 0,g=void 0;if(0!==a.length){for(b[u.default.PRIORITY.STRONG]=u.default.NO_CHANGE,b[u.default.PRIORITY.WEAK]=u.default.NO_CHANGE,b[u.default.PRIORITY.DEFAULT]=u.default.NO_CHANGE,c=0,d=a.length;c<d;c+=1)e=a[c],e.quality!==u.default.NO_CHANGE&&(b[e.priority]=b[e.priority]>u.default.NO_CHANGE?Math.min(b[e.priority],e.quality):e.quality);return b[u.default.PRIORITY.WEAK]!==u.default.NO_CHANGE&&(f=b[u.default.PRIORITY.WEAK]),b[u.default.PRIORITY.DEFAULT]!==u.default.NO_CHANGE&&(f=b[u.default.PRIORITY.DEFAULT]),b[u.default.PRIORITY.STRONG]!==u.default.NO_CHANGE&&(f=b[u.default.PRIORITY.STRONG]),f!==u.default.NO_CHANGE&&(g=f),(0,u.default)(j).create(g)}}function e(a){return d(c(r.map(function(b){return b.getMaxIndex(a)})))||(0,u.default)(j).create()}function f(a){return d(c(s.map(function(b){return b.shouldAbandon(a)})))||(0,u.default)(j).create()}function h(){[r,s].forEach(function(a){a&&a.length&&a.forEach(function(a){return a.reset&&a.reset()})}),r=[],s=[]}a=a||{};var j=this.context,l=a.mediaPlayerModel,n=a.metricsModel,p=a.dashMetrics,r=void 0,s=void 0;return{initialize:b,reset:h,getMaxQuality:e,shouldAbandonFragment:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(134),g=d(f),h=a(132),i=d(h),j=a(129),k=d(j),l=a(131),m=d(l),n=a(133),o=d(n),p=a(130),q=d(p),r=a(47),s=d(r),t=a(125),u=d(t),v="qualitySwitchRules",w="abandonFragmentRules";e.__dashjs_factory_name="ABRRulesCollection";var x=s.default.getClassFactory(e);x.QUALITY_SWITCH_RULES=v,x.ABANDON_FRAGMENT_RULES=w,s.default.updateSingletonFactory(e.__dashjs_factory_name,x),c.default=x,b.exports=c.default},{125:125,129:129,130:130,131:131,132:132,133:133,134:134,47:47}],129:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){r=(0,k.default)(m).getInstance().getLogger(q),h()}function c(a,b){s[a]=s[a]||{},s[a][b]=s[a][b]||{}}function d(a,b){u[a]=u[a]||[],u[a].push(b)}function f(a){var b=(0,g.default)(m).create(g.default.NO_CHANGE,{name:e.__dashjs_factory_name});if(!(a&&a.hasOwnProperty("getMediaInfo")&&a.hasOwnProperty("getMediaType")&&a.hasOwnProperty("getCurrentRequest")&&a.hasOwnProperty("getRepresentationInfo")&&a.hasOwnProperty("getAbrController")))return b;var f=a.getMediaInfo(),h=a.getMediaType(),k=a.getCurrentRequest();if(!isNaN(k.index)){c(h,k.index);var q=n.getStableBufferTime();if(p.getCurrentBufferLevel(o.getReadOnlyMetricsFor(h))>q)return b;var v=s[h][k.index];if(null===v||null===k.firstByteDate||t.hasOwnProperty(v.id))return b;if(void 0===v.firstByteTime&&(u[h]=[],v.firstByteTime=k.firstByteDate.getTime(),v.segmentDuration=k.duration,v.bytesTotal=k.bytesTotal,v.id=k.index),v.bytesLoaded=k.bytesLoaded,v.elapsedTime=(new Date).getTime()-v.firstByteTime,v.bytesLoaded>0&&v.elapsedTime>0&&d(h,Math.round(8*v.bytesLoaded/v.elapsedTime)),u[h].length>=l&&v.elapsedTime>j&&v.bytesLoaded<v.bytesTotal){var w=u[h].reduce(function(a,b){return a+b},0);if(v.measuredBandwidthInKbps=Math.round(w/u[h].length),v.estimatedTimeOfDownload=+(8*v.bytesTotal/v.measuredBandwidthInKbps/1e3).toFixed(2),v.estimatedTimeOfDownload<v.segmentDuration*i||0===a.getRepresentationInfo().quality)return b;if(!t.hasOwnProperty(v.id)){var x=a.getAbrController(),y=v.bytesTotal-v.bytesLoaded,z=x.getBitrateList(f),A=x.getQualityForBitrate(f,v.measuredBandwidthInKbps*n.getBandwidthSafetyFactor());y>v.bytesTotal*z[A].bitrate/z[x.getQualityFor(h,f.streamInfo)].bitrate&&(b.quality=A,b.reason.throughput=v.measuredBandwidthInKbps,b.reason.fragmentID=v.id,t[v.id]=v,r.debug("( ",h,"frag id",v.id,") is asking to abandon and switch to quality to ",A," measured bandwidth was",v.measuredBandwidthInKbps),delete s[h][v.id])}}else v.bytesLoaded===v.bytesTotal&&delete s[h][v.id]}return b}function h(){s={},t={},u=[]}a=a||{};var i=1.8,j=500,l=5,m=this.context,n=a.mediaPlayerModel,o=a.metricsModel,p=a.dashMetrics,q=void 0,r=void 0,s=void 0,t=void 0,u=void 0;return q={shouldAbandon:f,reset:h},b(),q}Object.defineProperty(c,"__esModule",{value:!0});var f=a(125),g=d(f),h=a(47),i=d(h),j=a(45),k=d(j);e.__dashjs_factory_name="AbandonRequestsRule",c.default=i.default.getClassFactory(e),b.exports=c.default},{125:125,45:45,47:47}],130:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){P=(0,r.default)(J).getInstance().getLogger(O),H(),N.on(p.default.BUFFER_EMPTY,y,O),N.on(p.default.PLAYBACK_SEEKING,z,O),N.on(p.default.PERIOD_SWITCH_STARTED,A,O),N.on(p.default.MEDIA_FRAGMENT_LOADED,B,O),N.on(p.default.METRIC_ADDED,C,O),N.on(p.default.QUALITY_CHANGE_REQUESTED,E,O),N.on(p.default.FRAGMENT_LOADING_ABANDONED,F,O)}function c(a){return a.map(function(a){return Math.log(a)})}function d(a,b,c){var d=c.reduce(function(a,b,d){return b>c[a]?d:a},0);if(0===d)return null;var e=Math.max(a,v+w*b.length),f=(c[d]-1)/(e/v-1);return{gp:f,Vp:v/f}}function e(a){var b={},e=a.getMediaInfo(),g=e.bitrateList.map(function(a){return a.bandwidth}),h=c(g);h=h.map(function(a){return a-h[0]+1});var i=M.getStableBufferTime(),j=d(i,g,h);return j?(b.state=t,b.bitrates=g,b.utilities=h,b.stableBufferTime=i,b.Vp=j.Vp,b.gp=j.gp,b.lastQuality=0,f(b)):b.state=s,b}function f(a){a.placeholderBuffer=0,a.mostAdvancedSegmentStart=NaN,a.lastSegmentWasReplacement=!1,a.lastSegmentStart=NaN,a.lastSegmentDurationS=NaN,a.lastSegmentRequestTimeMs=NaN,a.lastSegmentFinishTimeMs=NaN}function h(a,b){var c=M.getStableBufferTime();if(a.stableBufferTime!==c){var e=d(c,a.bitrates,a.utilities);if(e.Vp!==a.Vp||e.gp!==a.gp){var f=K.getCurrentBufferLevel(L.getReadOnlyMetricsFor(b)),g=f+a.placeholderBuffer;g-=v,g*=e.Vp/a.Vp,g+=v,a.stableBufferTime=c,a.Vp=e.Vp,a.gp=e.gp,a.placeholderBuffer=Math.max(0,g-f)}}}function j(a){var b=a.getMediaType(),c=Q[b];return c?c.state!==s&&h(c,b):(c=e(a),Q[b]=c),c}function k(a,b){for(var c=a.bitrates.length,d=NaN,e=NaN,f=0;f<c;++f){var g=(a.Vp*(a.utilities[f]+a.gp)-b)/a.bitrates[f];(isNaN(e)||g>=e)&&(e=g,d=f)}return d}function m(a,b){return a.Vp*(a.utilities[b]+a.gp)}function o(a,b){for(var c=a.bitrates[b],d=a.utilities[b],e=0,f=b-1;f>=0;--f)if(a.utilities[f]<a.utilities[b]){var g=a.bitrates[f],h=a.utilities[f],i=a.Vp*(a.gp+(c*h-g*d)/(c-g));e=Math.max(e,i)}return e}function q(a,b){var c=Date.now();if(isNaN(a.lastSegmentFinishTimeMs)){if(!isNaN(a.lastCallTimeMs)){var d=.001*(c-a.lastCallTimeMs);a.placeholderBuffer+=Math.max(0,d)}}else{var d=.001*(c-a.lastSegmentFinishTimeMs);a.placeholderBuffer+=Math.max(0,d)}a.lastCallTimeMs=c,a.lastSegmentStart=NaN,a.lastSegmentRequestTimeMs=NaN,a.lastSegmentFinishTimeMs=NaN,h(a,b)}function y(){for(var a in Q)Q.hasOwnProperty(a)&&Q[a].state===u&&(Q[a].placeholderBuffer=0)}function z(){for(var a in Q)if(Q.hasOwnProperty(a)){var b=Q[a];b.state!==s&&(b.state=t,f(b))}}function A(){}function B(a){if(a&&a.chunk&&a.chunk.mediaInfo){var b=Q[a.chunk.mediaInfo.type];if(b&&b.state!==s){var c=a.chunk.start;isNaN(b.mostAdvancedSegmentStart)||c>b.mostAdvancedSegmentStart?(b.mostAdvancedSegmentStart=c,b.lastSegmentWasReplacement=!1):b.lastSegmentWasReplacement=!0,b.lastSegmentStart=c,b.lastSegmentDurationS=a.chunk.duration,b.lastQuality=a.chunk.quality,D(b,a.chunk.mediaInfo.type)}}}function C(a){if(a&&a.metric===g.default.HTTP_REQUEST&&a.value&&a.value.type===l.HTTPRequest.MEDIA_SEGMENT_TYPE&&a.value.trace&&a.value.trace.length){var b=Q[a.mediaType];b&&b.state!==s&&(b.lastSegmentRequestTimeMs=a.value.trequest.getTime(),b.lastSegmentFinishTimeMs=a.value._tfinish.getTime(),D(b,a.mediaType))}}function D(a,b){if(!isNaN(a.lastSegmentStart)&&!isNaN(a.lastSegmentRequestTimeMs)&&!isNaN(a.placeholderBuffer)){if(a.placeholderBuffer*=x,!isNaN(a.lastSegmentFinishTimeMs)){var c=K.getCurrentBufferLevel(L.getReadOnlyMetricsFor(b)),d=c+.001*(a.lastSegmentFinishTimeMs-a.lastSegmentRequestTimeMs),e=m(a,a.lastQuality),f=Math.max(0,e-d);a.placeholderBuffer=Math.min(f,a.placeholderBuffer)}a.lastSegmentWasReplacement&&!isNaN(a.lastSegmentDurationS)&&(a.placeholderBuffer+=a.lastSegmentDurationS),a.lastSegmentStart=NaN,a.lastSegmentRequestTimeMs=NaN}}function E(a){if(a){var b=Q[a.mediaType];b&&b.state!==s&&(b.abrQuality=a.newQuality)}}function F(a){if(a){var b=Q[a.mediaType];if(b&&b.state!==s){var c=K.getCurrentBufferLevel(L.getReadOnlyMetricsFor(a.mediaType)),d=void 0;d=b.abrQuality>0?o(b,b.abrQuality):v;var e=Math.max(0,d-c);b.placeholderBuffer=Math.min(b.placeholderBuffer,e)}}}function G(a){var b=a.getMediaInfo(),c=a.getMediaType(),d=L.getReadOnlyMetricsFor(c),e=a.getStreamProcessor(),g=a.getStreamInfo(),h=a.getAbrController(),l=h.getThroughputHistory(),n=g?g.id:null,p=g&&g.manifestInfo&&g.manifestInfo.isDynamic,r=a.useBufferOccupancyABR(),v=(0,i.default)(J).create();if(v.reason=v.reason||{},!r)return v;e.getScheduleController().setTimeToLoadDelay(0);var w=j(a);if(w.state===s)return v;var x=K.getCurrentBufferLevel(d),y=l.getAverageThroughput(c,p),z=l.getSafeAverageThroughput(c,p),A=l.getAverageLatency(c),B=void 0;if(v.reason.state=w.state,v.reason.throughput=y,v.reason.latency=A,isNaN(y))return v;switch(w.state){case t:B=h.getQualityForBitrate(b,z,A),v.quality=B,v.reason.throughput=z,w.placeholderBuffer=Math.max(0,o(w,B)-x),w.lastQuality=B,!isNaN(w.lastSegmentDurationS)&&x>=w.lastSegmentDurationS&&(w.state=u);break;case u:q(w,c),B=k(w,x+w.placeholderBuffer);var C=h.getQualityForBitrate(b,z,A);B>w.lastQuality&&B>C&&(B=Math.max(C,w.lastQuality));var D=Math.max(0,x+w.placeholderBuffer-m(w,B));D<=w.placeholderBuffer?(w.placeholderBuffer-=D,D=0):(D-=w.placeholderBuffer,w.placeholderBuffer=0,B<h.getTopQualityIndexFor(c,n)?e.getScheduleController().setTimeToLoadDelay(1e3*D):D=0),v.quality=B,v.reason.throughput=y,v.reason.latency=A,v.reason.bufferLevel=x,v.reason.placeholderBuffer=w.placeholderBuffer,v.reason.delay=D,w.lastQuality=B;break;default:P.debug("BOLA ABR rule invoked in bad state."),v.quality=h.getQualityForBitrate(b,z,A),v.reason.state=w.state,v.reason.throughput=z,v.reason.latency=A,w.state=t,f(w)}return v}function H(){Q={}}function I(){H(),N.off(p.default.BUFFER_EMPTY,y,O),N.off(p.default.PLAYBACK_SEEKING,z,O),N.off(p.default.PERIOD_SWITCH_STARTED,A,O),N.off(p.default.MEDIA_FRAGMENT_LOADED,B,O),N.off(p.default.METRIC_ADDED,C,O),N.off(p.default.QUALITY_CHANGE_REQUESTED,E,O),N.off(p.default.FRAGMENT_LOADING_ABANDONED,F,O)}a=a||{};var J=this.context,K=a.dashMetrics,L=a.metricsModel,M=a.mediaPlayerModel,N=(0,n.default)(J).getInstance(),O=void 0,P=void 0,Q=void 0;return O={getMaxIndex:G,reset:I},b(),O}Object.defineProperty(c,"__esModule",{value:!0});var f=a(99),g=d(f),h=a(125),i=d(h),j=a(47),k=d(j),l=a(183),m=a(46),n=d(m),o=a(50),p=d(o),q=a(45),r=d(q),s=0,t=1,u=2,v=10,w=2,x=.99;e.__dashjs_factory_name="BolaRule",c.default=k.default.getClassFactory(e),b.exports=c.default},{125:125,183:183,45:45,46:46,47:47,50:50,99:99}],131:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){e=(0,k.default)(c).getInstance().getLogger(d)}function b(a){var b=a.getDroppedFramesHistory();if(b){for(var d=b.getFrameHistory(),h=0,j=0,k=i.default.NO_CHANGE,l=1;l<d.length;l++)if(d[l]&&(h=d[l].droppedVideoFrames,(j=d[l].totalVideoFrames)>g&&h/j>f)){k=l-1,e.debug("index: "+k+" Dropped Frames: "+h+" Total Frames: "+j);break}return(0,i.default)(c).create(k,{droppedFrames:h})}return(0,i.default)(c).create()}var c=this.context,d=void 0,e=void 0,f=.15,g=375;return d={getMaxIndex:b},a(),d}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(125),i=d(h),j=a(45),k=d(j);e.__dashjs_factory_name="DroppedFramesRule",c.default=g.default.getClassFactory(e),b.exports=c.default},{125:125,45:45,47:47}],132:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){t=(0,o.default)(m).getInstance().getLogger(s),f(),n.on(k.default.PLAYBACK_SEEKING,h,s)}function c(){if(!(p&&p.hasOwnProperty("getReadOnlyMetricsFor")&&r&&r.hasOwnProperty("getCurrentBufferLevel")))throw new Error("Missing config parameter(s)")}function d(a){var b=(0,q.default)(m).create();if(!a||!a.hasOwnProperty("getMediaType"))return b;c();var d=a.getMediaType(),f=p.getReadOnlyMetricsFor(d),h=f.BufferState.length>0?f.BufferState[f.BufferState.length-1]:null,i=a.getRepresentationInfo(),j=i.fragmentDuration;if(!h||!e(d,h)||!j)return b;if(h.state===g.default.BUFFER_EMPTY)t.info("Switch to index 0; buffer is empty."),b.quality=0,b.reason="InsufficientBufferRule: Buffer is empty";else{var k=a.getMediaInfo(),n=a.getAbrController(),o=n.getThroughputHistory(),s=r.getCurrentBufferLevel(f),u=o.getAverageThroughput(d),v=o.getAverageLatency(d),w=u*(s/j)*l;b.quality=n.getQualityForBitrate(k,w,v),b.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return b}function e(a,b){u[a]=u[a]||{};var c=!1;return u[a].firstBufferLoadedEvent?c=!0:b&&b.state===g.default.BUFFER_LOADED&&(u[a].firstBufferLoadedEvent=!0,c=!0),c}function f(){u={}}function h(){f()}function j(){f(),n.off(k.default.PLAYBACK_SEEKING,h,s)}a=a||{};var l=.5,m=this.context,n=(0,i.default)(m).getInstance(),p=a.metricsModel,r=a.dashMetrics,s=void 0,t=void 0,u=void 0;return s={getMaxIndex:d,reset:j},b(),s}Object.defineProperty(c,"__esModule",{value:!0});var f=a(103),g=d(f),h=a(46),i=d(h),j=a(50),k=d(j),l=a(47),m=d(l),n=a(45),o=d(n),p=a(125),q=d(p);e.__dashjs_factory_name="InsufficientBufferRule",c.default=m.default.getClassFactory(e),b.exports=c.default},{103:103,125:125,45:45,46:46,47:47,50:50}],133:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){e=(0,i.default)(c).getInstance().getLogger(d)}function b(a){for(var b=a?a.getSwitchHistory():null,d=b?b.getSwitchRequests():[],h=0,i=0,j=0,l=(0,k.default)(c).create(),m=0;m<d.length;m++)if(void 0!==d[m]&&(h+=d[m].drops,i+=d[m].noDrops,j+=d[m].dropSize,h+i>=g&&h/i>f)){l.quality=m>0&&d[m].drops>0?m-1:m,l.reason={index:l.quality,drops:h,noDrops:i,dropSize:j},e.info("Switch history rule index: "+l.quality+" samples: "+(h+i)+" drops: "+h);break}return l}var c=this.context,d=void 0,e=void 0,f=.075,g=6;return d={getMaxIndex:b},a(),d}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(45),i=d(h),j=a(125),k=d(j);e.__dashjs_factory_name="SwitchHistoryRule",c.default=g.default.getClassFactory(e),b.exports=c.default},{125:125,45:45,47:47}],134:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){k=(0,m.default)(f).getInstance().getLogger(j)}function c(){if(!h||!h.hasOwnProperty("getReadOnlyMetricsFor"))throw new Error("Missing config parameter(s)")}function d(a){var b=(0,o.default)(f).create();if(!(a&&a.hasOwnProperty("getMediaInfo")&&a.hasOwnProperty("getMediaType")&&a.hasOwnProperty("useBufferOccupancyABR")&&a.hasOwnProperty("getAbrController")&&a.hasOwnProperty("getStreamProcessor")))return b;c();var d=a.getMediaInfo(),e=a.getMediaType(),j=h.getReadOnlyMetricsFor(e),l=a.getStreamProcessor(),m=a.getAbrController(),n=a.getStreamInfo(),p=n&&n.manifestInfo?n.manifestInfo.isDynamic:null,q=m.getThroughputHistory(),r=q.getSafeAverageThroughput(e,p),s=q.getAverageLatency(e),t=j.BufferState.length>0?j.BufferState[j.BufferState.length-1]:null,u=a.useBufferOccupancyABR();return!j||isNaN(r)||!t||u?b:(m.getAbandonmentStateFor(e)!==i.default.ABANDON_LOAD&&(t.state===g.default.BUFFER_LOADED||p)&&(b.quality=m.getQualityForBitrate(d,r,s),l.getScheduleController().setTimeToLoadDelay(0),k.info("requesting switch to index: ",b.quality,"type: ",e,"Average throughput",Math.round(r),"kbps"),b.reason={throughput:r,latency:s}),b)}function e(){}a=a||{};var f=this.context,h=a.metricsModel,j=void 0,k=void 0;return j={getMaxIndex:d,reset:e},b(),j}Object.defineProperty(c,"__esModule",{value:!0});var f=a(103),g=d(f),h=a(100),i=d(h),j=a(47),k=d(j),l=a(45),m=d(l),n=a(125),o=d(n);e.__dashjs_factory_name="ThroughputRule",c.default=k.default.getClassFactory(e),b.exports=c.default},{100:100,103:103,125:125,45:45,47:47}],135:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){}function c(a,b,c){return e.getCurrentBufferLevel(f.getReadOnlyMetricsFor(b))<d(a,b,c)}function d(a,b,c){var d=NaN,k=a.getCurrentRepresentationInfo();if(b===g.default.FRAGMENTED_TEXT)d=i.isTextEnabled()?k.fragmentDuration:0;else if(b===g.default.AUDIO&&c){var l=e.getCurrentBufferLevel(f.getReadOnlyMetricsFor(g.default.VIDEO));d=isNaN(k.fragmentDuration)?l:Math.max(l,k.fragmentDuration)}else{var m=k.mediaInfo.streamInfo;if(j.isPlayingAtTopQuality(m)){var n=m.manifestInfo.duration>=h.getLongFormContentDurationThreshold();d=n?h.getBufferTimeAtTopQualityLongForm():h.getBufferTimeAtTopQuality()}else d=h.getStableBufferTime()}return d}a=a||{};var e=a.dashMetrics,f=a.metricsModel,h=a.mediaPlayerModel,i=a.textController,j=a.abrController,k={execute:c,getBufferTarget:d};return b(),k}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(47),i=d(h);e.__dashjs_factory_name="BufferLevelRule",c.default=i.default.getClassFactory(e),b.exports=c.default},{47:47,98:98}],136:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){j=(0,i.default)(d).getInstance().getLogger(h)}function c(a,b){var c=a.getCurrentRepresentationInfo(),d=c.mediaInfo,h=d.type,i=a.getScheduleController(),k=i.getSeekTarget(),l=!isNaN(k),n=a.getBufferController(),o=a.getPlaybackController().getTime(),p=l?k:e.getIndexHandlerTime(a),q=!1;if(isNaN(p)||h===g.default.FRAGMENTED_TEXT&&!f.isTextEnabled())return null;if(l&&i.setSeekTarget(NaN),n){var r=n.getRangeAt(p),s=n.getRangeAt(o),t=n.getBuffer().getAllBufferRanges(),u=t?t.length:0;null===r&&null===s||l||((!r||s&&s.start!=r.start&&s.end!=r.end)&&(u>1&&(a.getFragmentModel().removeExecutedRequestsAfterTime(s.end),q=!0),r=s),j.debug("Prior to making a request for time, NextFragmentRequestRule is aligning index handler's currentTime with bufferedRange.end for",h,".",p,"was changed to",r.end),p=r.end)}var v=void 0;if(b)p=b.startTime+b.duration/2,v=e.getFragmentRequestForTime(a,c,p,{timeThreshold:0,ignoreIsFinished:!0});else{for(v=e.getFragmentRequestForTime(a,c,p,{keepIdx:!l&&!q});v&&v.action!==m.default.ACTION_COMPLETE&&a.getFragmentModel().isFragmentLoaded(v);)v=e.getNextFragmentRequest(a,c);v&&(isNaN(v.startTime+v.duration)||e.setIndexHandlerTime(a,v.startTime+v.duration),v.delayLoadingTime=(new Date).getTime()+i.getTimeToLoadDelay(),i.setTimeToLoadDelay(0))}return v}a=a||{};var d=this.context,e=a.adapter,f=a.textController,h=void 0,j=void 0;return h={execute:c},b(),h}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(45),i=d(h),j=a(47),k=d(j),l=a(165),m=d(l);e.__dashjs_factory_name="NextFragmentRequestRule",c.default=k.default.getClassFactory(e),b.exports=c.default},{165:165,45:45,47:47,98:98}],137:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){for(var b="",c=0;c<a.length;++c){b+=a[c].uchar}return b.length-b.replace(/^\s+/,"").length}function b(a){return"left: "+3.125*a.x+"%; top: "+6.66*a.y1+"%; width: "+(100-3.125*a.x)+"%; height: "+6.66*Math.max(a.y2-1-a.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function c(a){return"red"===a?"rgb(255, 0, 0)":"green"===a?"rgb(0, 255, 0)":"blue"===a?"rgb(0, 0, 255)":"cyan"===a?"rgb(0, 255, 255)":"magenta"===a?"rgb(255, 0, 255)":"yellow"===a?"rgb(255, 255, 0)":"white"===a?"rgb(255, 255, 255)":"black"===a?"rgb(0, 0, 0)":a}function d(a,b){var d=a.videoHeight/15;return b?"font-size: "+d+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(b.foreground?c(b.foreground):"rgb(255, 255, 255)")+"; font-style: "+(b.italics?"italic":"normal")+"; text-decoration: "+(b.underline?"underline":"none")+"; white-space: pre; background-color: "+(b.background?c(b.background):"transparent")+";":"font-size: "+d+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function e(a){return a.replace(/^\s+/g,"")}function f(a){return a.replace(/\s+$/g,"")}function g(c,g,i,j){var k=null,l=null,m=!1,n=-1,o={start:g,end:i,spans:[]},p="style_cea608_white_black",q={},r={},s=[],t=void 0,u=void 0;for(t=0;t<15;++t){var v=j.rows[t],w="",x=null;if(!1===v.isEmpty()){var y=a(v.chars);null===k&&(k={x:y,y1:t,y2:t+1,p:[]}),y!==n&&m&&(k.p.push(o),o={start:g,end:i,spans:[]},k.y2=t,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,!1===q.hasOwnProperty(k.name)?(s.push(k),q[k.name]=k):(l=q[k.name],l.p.contat(k.p)),k={x:y,y1:t,y2:t+1,p:[]});for(var z=0;z<v.chars.length;++z){var A=v.chars[z],B=A.penState;if(null===x||!B.equals(x)){w.trim().length>0&&(o.spans.push({name:p,line:w,row:t}),w="");var C="style_cea608_"+B.foreground+"_"+B.background;B.underline&&(C+="_underline"),B.italics&&(C+="_italics"),r.hasOwnProperty(C)||(r[C]=JSON.parse(JSON.stringify(B))),x=B,p=C}w+=A.uchar}w.trim().length>0&&o.spans.push({name:p,line:w,row:t}),m=!0,n=y}else m=!1,n=-1,k&&(k.p.push(o),o={start:g,end:i,spans:[]},k.y2=t,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,!1===q.hasOwnProperty(k.name)?(s.push(k),q[k.name]=k):(l=q[k.name],l.p.contat(k.p)),k=null)}k&&(k.p.push(o),k.y2=t+1,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,!1===q.hasOwnProperty(k.name)?(s.push(k),q[k.name]=k):(l=q[k.name],l.p.contat(k.p)),k=null);var D=[];for(t=0;t<s.length;++t){var E=s[t],F="sub_cea608_"+h++,G=document.createElement("div");G.id=F;var H=b(E);G.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+H;var I=document.createElement("div");I.className="paragraph bodyStyle",I.style.cssText=d(c);var J=document.createElement("div");J.className="cueUniWrapper",J.style.cssText="unicode-bidi: normal; direction: ltr;";for(var K=0;K<E.p.length;++K){var L=E.p[K],M=0;for(u=0;u<L.spans.length;++u){var N=L.spans[u];if(N.line.length>0){if(0!==u&&M!=N.row){var O=document.createElement("br");O.className="lineBreak",J.appendChild(O)}var P=!1;M===N.row&&(P=!0),M=N.row;var Q=r[N.name],R=document.createElement("span");R.className="spanPadding "+N.name+" customSpanColor",R.style.cssText=d(c,Q),0!==u&&P?u===L.spans.length-1?R.textContent=f(N.line):R.textContent=N.line:L.spans.length>1&&u<L.spans.length-1&&N.row===L.spans[u+1].row?R.textContent=e(N.line):R.textContent=N.line.trim(),J.appendChild(R)}}}I.appendChild(J),G.appendChild(I);var S={bodyStyle:["%",90]};for(var T in r)r.hasOwnProperty(T)&&(S[T]=["%",90]);D.push({type:"html",start:g,end:i,cueHTMLElement:G,cueID:F,cellResolution:[32,15],isFromCEA608:!0,regions:s,regionID:E.name,videoHeight:c.videoHeight,videoWidth:c.videoWidth,fontSize:S,lineHeight:{},linePadding:{}})}return D}var h=0;return{createHTMLCaptionsFromScreen:g}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="EmbeddedTextHtmlRender",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{47:47}],138:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){L=!1,M=null,O=null,K=!1,D.on(k.default.DATA_UPDATE_COMPLETED,x,J),D.on(k.default.INIT_FRAGMENT_LOADED,y,J)}function c(){return t}function d(a){j(a),O=I.getRepresentationController(),P=(0,o.default)(C).getInstance()}function e(a){try{if(N=(0,q.default)(C).create(M,a),!L){var b=N.getBuffer();b.hasOwnProperty(g.default.INITIALIZE)&&b.initialize(H,I),L=!0}return N}catch(c){if(a.isText||-1!==a.codec.indexOf('codecs="stpp')||-1!==a.codec.indexOf('codecs="wvtt'))try{N=E.getTextSourceBuffer()}catch(c){F.mediaSourceError("Error creating "+G+" source buffer.")}else F.mediaSourceError("Error creating "+G+" source buffer.")}}function f(){return G}function h(){return N}function j(a){M=a}function l(){return M}function m(){return I}function n(){return!1}function p(){}function r(){}function u(){return 0}function v(){return K}function w(a){D.off(k.default.DATA_UPDATE_COMPLETED,x,J),D.off(k.default.INIT_FRAGMENT_LOADED,y,J),!a&&N&&(N.abort(),N.reset(),N=null)}function x(a){if(a.sender.getStreamProcessor()===I){
|
27 |
+
P.extract(I.getStreamInfo().id,a.sender.getCurrentRepresentation().id)||D.trigger(k.default.TIMED_TEXT_REQUESTED,{index:0,sender:a.sender})}}function y(a){a.fragmentModel===I.getFragmentModel()&&a.chunk.bytes&&(P.save(a.chunk),N.append(a.chunk),D.trigger(k.default.STREAM_COMPLETED,{request:a.request,fragmentModel:a.fragmentModel}))}function z(a,b){P.extract(a,b)||D.trigger(k.default.TIMED_TEXT_REQUESTED,{index:0,sender:J})}function A(){return null}function B(a){N.timestampOffset===a||isNaN(a)||(N.timestampOffset=a)}a=a||{};var C=this.context,D=(0,i.default)(C).getInstance(),E=(0,s.default)(C).getInstance(),F=a.errHandler,G=a.type,H=a.mimeType,I=a.streamProcessor,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0;return J={getBufferControllerType:c,initialize:d,createBuffer:e,getType:f,getStreamProcessor:m,setSeekStartTime:r,getBuffer:h,getBufferLevel:u,setMediaSource:j,getMediaSource:l,getIsBufferingCompleted:v,getIsPruningInProgress:n,dischargePreBuffer:p,switchInitData:z,getRangeAt:A,reset:w,updateTimestampOffset:B},b(),J}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(46),i=d(h),j=a(50),k=d(j),l=a(47),m=d(l),n=a(152),o=d(n),p=a(94),q=d(p),r=a(140),s=d(r),t="NotFragmentedTextBufferController";e.__dashjs_factory_name=t,c.default=m.default.getClassFactory(e),b.exports=c.default},{140:140,152:152,46:46,47:47,50:50,94:94,98:98}],139:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){y=a.type===g.default.FRAGMENTED_TEXT?(0,k.default)(x).create({type:a.type,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,manifestModel:a.manifestModel,errHandler:a.errHandler,streamController:a.streamController,mediaController:a.mediaController,adapter:a.adapter,textController:a.textController,abrController:a.abrController,playbackController:a.playbackController,streamProcessor:a.streamProcessor}):(0,m.default)(x).create({type:a.type,mimeType:a.mimeType,errHandler:a.errHandler,streamProcessor:a.streamProcessor})}function c(){return y.getBufferControllerType()}function d(a,b){return y.initialize(a,b)}function e(a){return y.createBuffer(a)}function f(){return y.getType()}function h(){return y.getBuffer()}function i(a){y.setBuffer(a)}function j(){return y.getMediaSource()}function l(a){y.setMediaSource(a)}function n(){y.getStreamProcessor()}function o(a){y.setSeekStartTime(a)}function p(){return y.getBufferLevel()}function q(a){y.reset(a)}function r(){return y.getIsBufferingCompleted()}function s(a,b){y.switchInitData(a,b)}function t(){return y.getIsPruningInProgress()}function u(){return y.dischargePreBuffer()}function v(a){return y.getRangeAt(a)}function w(a){var b=h();b.timestampOffset===a||isNaN(a)||(b.timestampOffset=a)}a=a||{};var x=this.context,y=void 0,z=void 0;return z={getBufferControllerType:c,initialize:d,createBuffer:e,getType:f,getStreamProcessor:n,setSeekStartTime:o,getBuffer:h,setBuffer:i,getBufferLevel:p,setMediaSource:l,getMediaSource:j,getIsBufferingCompleted:r,getIsPruningInProgress:t,dischargePreBuffer:u,switchInitData:s,getRangeAt:v,reset:q,updateTimestampOffset:w},b(),z}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(47),i=d(h),j=a(103),k=d(j),l=a(138),m=d(l);e.__dashjs_factory_name="TextBufferController",c.default=i.default.getClassFactory(e),b.exports=c.default},{103:103,138:138,47:47,98:98}],140:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){L="",M=-1,N=!0,P=!1,H=(0,m.default)(y).getInstance(),I=(0,o.default)(y).getInstance(),J=(0,q.default)(y).getInstance(),A=(0,k.default)(y).getInstance(),K=(0,s.default)(y).getInstance(),H.initialize(),K.on(u.default.TEXT_TRACKS_QUEUE_INITIALIZED,i,z),w()}function b(a){a&&(a.errHandler&&(B=a.errHandler),a.dashManifestModel&&(C=a.dashManifestModel),a.manifestModel&&(D=a.manifestModel),a.mediaController&&(E=a.mediaController),a.videoModel&&(F=a.videoModel),a.streamController&&(G=a.streamController),a.textTracks&&(H=a.textTracks),a.vttParser&&(I=a.vttParser),a.ttmlParser&&(J=a.ttmlParser),A.setConfig({errHandler:B,dashManifestModel:C,manifestModel:D,mediaController:E,videoModel:F,streamController:G,textTracks:H,vttParser:I,ttmlParser:J}))}function c(){return A}function d(){return O}function e(a){A.addEmbeddedTrack(a)}function f(a){"string"==typeof a&&(L=a)}function h(){return L}function i(a){var b=this,c=a.tracks,d=a.index;c.some(function(a,c){if(a.lang===L)return b.setTextTrack(c),d=c,!0}),N||this.setTextTrack(-1),M=d,K.trigger(u.default.TEXT_TRACKS_ADDED,{enabled:p(),index:d,tracks:c})}function j(a){"boolean"==typeof a&&(N=a)}function l(){return N}function n(a){"boolean"==typeof a&&p()!==a&&(a&&this.setTextTrack(M),a||(M=this.getCurrentTrackIdx(),this.setTextTrack(-1)))}function p(){var a=!0;return O&&!P&&(a=!1),a}function r(a){"boolean"==typeof a&&(P=a)}function t(a){var b=A.getConfig(),c=b.fragmentModel,d=b.fragmentedTracks,e=void 0,f=void 0,h=H.getCurrentTrackIdx();if(h!==a){H.setModeForTrackIdx(h,g.default.TEXT_HIDDEN),H.setCurrentTrackIdx(a),H.setModeForTrackIdx(a,g.default.TEXT_SHOWING);var i=H.getCurrentTrackInfo();if(i&&i.isFragmented&&!i.isEmbedded)for(var j=0;j<d.length;j++){var k=d[j];if(i.lang===k.lang&&i.index===k.index&&(k.id?i.label===k.id:i.label===k.index)){var l=E.getCurrentTrackFor(g.default.FRAGMENTED_TEXT,G.getActiveStreamInfo());k!==l&&(c.abortRequests(),c.removeExecutedRequestsBeforeTime(),A.remove(),H.deleteCuesFromTrackIdx(h),E.setTrack(k),A.setCurrentFragmentedTrackIdx(j))}}else if(i&&!i.isFragmented){for(var m=G.getActiveStreamProcessors(),j=0;j<m.length;j++)if(m[j].getType()===g.default.TEXT){f=m[j],e=f.getMediaInfoArr();break}if(f&&e)for(var j=0;j<e.length;j++)if(e[j].index===i.index&&e[j].lang===i.lang){f.selectMediaInfo(e[j]);break}}}O=-1===a}function v(){return H.getCurrentTrackIdx()}function w(){O=!1}function x(){w(),A.resetEmbedded(),A.reset()}var y=this.context,z=void 0,A=void 0,B=void 0,C=void 0,D=void 0,E=void 0,F=void 0,G=void 0,H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0;return z={setConfig:b,getTextSourceBuffer:c,getAllTracksAreDisabled:d,addEmbeddedTrack:e,getTextDefaultLanguage:h,setTextDefaultLanguage:f,setTextDefaultEnabled:j,getTextDefaultEnabled:l,enableText:n,isTextEnabled:p,setTextTrack:t,getCurrentTrackIdx:v,enableForcedTextStreaming:r,reset:x},a(),z}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(47),i=d(h),j=a(141),k=d(j),l=a(142),m=d(l),n=a(159),o=d(n),p=a(157),q=d(p),r=a(46),s=d(r),t=a(50),u=d(t);e.__dashjs_factory_name="TextController",c.default=i.default.getSingletonFactory(e),b.exports=c.default},{141:141,142:142,157:157,159:159,46:46,47:47,50:50,98:98}],141:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){H=(0,t.default)(A).getInstance().getLogger(G)}function b(a,b){if(N=null,U=null,V=!1,W=NaN,X=[],$=null,E||f(),R=b.getMediaInfoArr(),S.setConfig({videoModel:Y}),S.initialize(),T=!K.getIsTextTrack(a),I=(0,n.default)(A).getInstance(),Q=(0,l.default)(A).getInstance(),Q.setConfig({boxParser:I}),T){U=b.getFragmentModel(),this.buffered=(0,p.default)(A).create(),X=M.getTracksFor(g.default.FRAGMENTED_TEXT,Z.getActiveStreamInfo());for(var c=M.getCurrentTrackFor(g.default.FRAGMENTED_TEXT,Z.getActiveStreamInfo()),d=0;d<X.length;d++)if(X[d]===c){_=d;break}}}function c(){S.deleteAllTextTracks(),Q=null,I=null,R=null,T=!1,U=null,V=!1,X=[]}function d(){N=null,Z=null,Y=null,W=NaN,S=null}function e(a){var b=a.chunk;b.mediaInfo.embeddedCaptions&&r(b.bytes,b)}function f(){aa=[],R=[],S=(0,v.default)(A).getInstance(),S.setConfig({videoModel:Y}),S.initialize(),I=(0,n.default)(A).getInstance(),Q=(0,l.default)(A).getInstance(),Q.setConfig({boxParser:I}),T=!1,_=null,ba=!1,ca=0,fa=[],ea=[],da=null,E=!0,ga=(0,x.default)(A).getInstance();var a=Z.getActiveStreamProcessors();for(var b in a)if("video"===a[b].getType()){ha=a[b].getCurrentRepresentationInfo().MSETimeOffset;break}C.on(F.default.VIDEO_CHUNK_RECEIVED,e,this)}function i(){C.off(F.default.VIDEO_CHUNK_RECEIVED,e,this),S&&S.deleteAllTextTracks(),E=!1,aa=[],fa=[null,null],ea=[],da=null}function k(a){if(E||f(),a.id===g.default.CC1||a.id===g.default.CC3){for(var b=0;b<aa.length;b++)if(aa[b].id===a.id)return;aa.push(a)}else H.warn("Embedded track "+a.id+" not supported!")}function m(a){a&&(a.errHandler&&(J=a.errHandler),a.dashManifestModel&&(K=a.dashManifestModel),a.manifestModel&&(L=a.manifestModel),a.mediaController&&(M=a.mediaController),a.videoModel&&(Y=a.videoModel),a.streamController&&(Z=a.streamController),a.textTracks&&(S=a.textTracks),a.vttParser&&(O=a.vttParser),a.ttmlParser&&(P=a.ttmlParser))}function o(){return{errHandler:J,dashManifestModel:K,mediaController:M,videoModel:Y,fragmentModel:U,streamController:Z,textTracks:S,isFragmented:T,embeddedTracks:aa,fragmentedTracks:X}}function q(a){_=a}function r(a,b){function c(a,b){var c=new j.default,d={subtitle:"subtitles",caption:"captions"},e=function(){var a=b.roles.length>0?d[b.roles[0]]:d.caption;return a=a===d.caption||a===d.subtitle?a:d.caption},f=function(){var a=!1;return b.codec&&b.codec.search(g.default.STPP)>=0&&(a=!0),b.mimeType&&b.mimeType.search(g.default.TTML)>=0&&(a=!0),a};c.captionData=a,c.lang=b.lang,c.label=b.id?b.id:b.index,c.index=b.index,c.isTTML=f(),c.defaultTrack=u(b),c.isFragmented=T,c.isEmbedded=!!b.isEmbedded,c.kind=e(),c.roles=b.roles,c.accessibility=b.accessibility;var h=(R?R.length:0)+aa.length;S.addTextTrack(c,h)}var d=void 0,e=void 0,f=void 0,i=void 0,k=void 0,l=void 0,m=void 0,n=b.mediaInfo,o=n.type,p=n.mimeType,q=n.codec||p;if(!q)return void H.error("No text type defined");if(o===g.default.FRAGMENTED_TEXT)if(V)if(l=Q.getSamplesInfo(a),e=l.sampleList,!$&&e.length>0&&($=e[0].cts-b.start*W),q.search(g.default.STPP)>=0)for(N=null!==N?N:w(q),f=0;f<e.length;f++){var r=e[f],t=r.cts,v=t-$;this.buffered.add(v/W,(v+r.duration)/W);var x=new DataView(a,r.offset,r.subSizes[0]);m=z.default.Utils.dataViewToString(x,g.default.UTF8);var y=[],A=r.offset+r.subSizes[0];for(i=1;i<r.subSizes.length;i++){var C=new Uint8Array(a,A,r.subSizes[i]),D=String.fromCharCode.apply(null,C);y.push(D),A+=r.subSizes[i]}try{var E=L.getValue(),F=E.ttmlTimeIsRelative?t/W:0;d=N.parse(m,F,t/W,(t+r.duration)/W,y),S.addCaptions(_,$/W,d)}catch(oa){U.removeExecutedRequestsBeforeTime(),this.remove(),H.error("TTML parser error: "+oa.message)}}else{var G=[];for(f=0;f<e.length;f++){var r=e[f];r.cts-=$,this.buffered.add(r.cts/W,(r.cts+r.duration)/W);var I=a.slice(r.offset,r.offset+r.size),K=z.default.parseBuffer(I);for(i=0;i<K.boxes.length;i++){var M=K.boxes[i];if(H.debug("VTT box1: "+M.type),"vtte"!==M.type&&"vttc"===M.type)for(H.debug("VTT vttc boxes.length = "+M.boxes.length),k=0;k<M.boxes.length;k++){var O=M.boxes[k];if(H.debug("VTT box2: "+O.type),"payl"===O.type){var P=O.cue_text;H.debug("VTT cue_text = "+P);var X=r.cts/W,Z=(r.cts+r.duration)/W;G.push({start:X,end:Z,data:P,styles:{}}),H.debug("VTT "+X+"-"+Z+" : "+P)}}}}G.length>0&&S.addCaptions(_,0,G)}else{for(V=!0,f=0;f<R.length;f++)c(null,R[f]);W=Q.getMediaTimescaleFromMoov(a)}else if(o===g.default.TEXT){var x=new DataView(a,0,a.byteLength);m=z.default.Utils.dataViewToString(x,g.default.UTF8);try{for(d=w(q).parse(m,0),f=0;f<R.length;f++)c(null,R[f]);S.addCaptions(S.getCurrentTrackIdx(),0,d)}catch(oa){J.timedTextError(oa,"parse",m)}}else if(o===g.default.VIDEO)if(b.segmentType===h.HTTPRequest.INIT_SEGMENT_TYPE){if(0===ca)for(ca=Q.getMediaTimescaleFromMoov(a),f=0;f<aa.length;f++)c(null,aa[f])}else{if(0===ca)return void H.warn("CEA-608: No timescale for embeddedTextTrack yet");var ba=function(a,b){function c(a,c,d){var e=null;if(Y.getTTMLRenderingDiv())e=ga.createHTMLCaptionsFromScreen(Y.getElement(),a,c,d);else{e=[{start:a,end:c,data:d.getDisplayText(),styles:{}}]}e&&S.addCaptions(b,0,e)}return c};l=Q.getSamplesInfo(a);var ha=l.lastSequenceNumber;if(!fa[0]&&!fa[1]){var ia=void 0,ja=void 0;for(f=0;f<aa.length;f++){if(aa[f].id===g.default.CC1?(0,ja=S.getTrackIdxForId(g.default.CC1)):aa[f].id===g.default.CC3&&(1,ja=S.getTrackIdxForId(g.default.CC3)),-1===ja)return void H.warn("CEA-608: data before track is ready.");ia=ba(this,ja),fa[f]=new B.default.Cea608Parser(f+1,{newCue:ia},null)}}if(ca&&-1==ea.indexOf(ha)){if(null!==da&&ha!==da+l.numSequences)for(f=0;f<fa.length;f++)fa[f]&&fa[f].reset();for(var ka=s(a,l.sampleList),la=0;la<fa.length;la++){var ma=ka.fields[la],na=fa[la];if(na)for(f=0;f<ma.length;f++)na.addData(ma[f][0]/ca,ma[f][1])}da=ha,ea.push(ha)}}}function s(a,b){if(0===b.length)return null;for(var c={splits:[],fields:[[],[]]},d=new DataView(a),e=0;e<b.length;e++)for(var f=b[e],g=B.default.findCea608Nalus(d,f.offset,f.size),h=null,i=0,j=0;j<g.length;j++)for(var k=B.default.extractCea608DataFromRange(d,g[j]),l=0;l<2;l++)k[l].length>0&&(f.cts!==h?i=0:i+=1,c.fields[l].push([f.cts+ha*ca,k[l],i]),h=f.cts);return c.fields.forEach(function(a){a.sort(function(a,b){return a[0]===b[0]?a[2]-b[2]:a[0]-b[0]})}),c}function u(a){var b=!1;return aa.length>1&&a.isEmbedded?b=a.id&&a.id===g.default.CC1:1===aa.length?a.id&&"CC"===a.id.substring(0,2)&&(b=!0):0===aa.length&&(b=a.index===R[0].index),b}function w(a){var b=void 0;return a.search(g.default.VTT)>=0?b=O:(a.search(g.default.TTML)>=0||a.search(g.default.STPP)>=0)&&(b=P),b}function y(a,b){void 0===a&&a===b&&(a=this.buffered.start(0),b=this.buffered.end(this.buffered.length-1)),this.buffered.remove(a,b)}var A=this.context,C=(0,D.default)(A).getInstance(),E=!1,G=void 0,H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0,Q=void 0,R=void 0,S=void 0,T=void 0,U=void 0,V=void 0,W=void 0,X=void 0,Y=void 0,Z=void 0,$=void 0,_=void 0,aa=void 0,ba=void 0,ca=void 0,da=void 0,ea=void 0,fa=void 0,ga=void 0,ha=void 0;return G={initialize:b,append:r,abort:c,addEmbeddedTrack:k,resetEmbedded:i,setConfig:m,getConfig:o,setCurrentFragmentedTrackIdx:q,remove:y,reset:d},a(),G}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(183),i=a(175),j=d(i),k=a(71),l=d(k),m=a(146),n=d(m),o=a(148),p=d(o),q=a(47),r=d(q),s=a(45),t=d(s),u=a(142),v=d(u),w=a(137),x=d(w),y=a(5),z=d(y),A=a(2),B=d(A),C=a(46),D=d(C),E=a(50),F=d(E);e.__dashjs_factory_name="TextSourceBuffer",c.default=r.default.getSingletonFactory(e),b.exports=c.default},{137:137,142:142,146:146,148:148,175:175,183:183,2:2,45:45,46:46,47:47,5:5,50:50,71:71,98:98}],142:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){H=(0,o.default)(E).getInstance().getLogger(G)}function b(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(I=window.VTTCue||window.TextTrackCue,K=[],L=[],M=-1,N=0,O=0,P=0,Q=0,R=null,S=null,V=!1,X=2147483647,W=null,T=!!navigator.userAgent.match(/Chrome/)&&!navigator.userAgent.match(/Edge/),void 0!==document.fullscreenElement?U="fullscreenElement":void 0!==document.webkitIsFullScreen?U="webkitIsFullScreen":document.msFullscreenElement?U="msFullscreenElement":document.mozFullScreen&&(U="mozFullScreen"))}function c(a){var b=K[a].kind,c=void 0!==K[a].label?K[a].label:K[a].lang,d=K[a].lang,e=K[a].isTTML,f=K[a].isEmbedded,g=J.addTextTrack(b,c,d);return g.isEmbedded=f,g.isTTML=e,g}function d(a){V=a,R&&!document[U]&&(R.style.zIndex=a?X:null)}function e(a,b){if(K.length===b)return void H.error("Trying to add too many tracks.");if(K.push(a),K.length===b){K.sort(function(a,b){return a.index-b.index}),R=J.getTTMLRenderingDiv();for(var d=-1,e=0;e<K.length;e++){var f=c.call(this,e);L.push(f),K[e].defaultTrack&&(f.default=!0,d=e);var h=n(e);h&&(h.mode=g.default.TEXT_SHOWING,R&&(K[e].isTTML||K[e].isEmbedded)?h.renderingType="html":h.renderingType="default"),this.addCaptions(e,0,K[e].captionData),F.trigger(k.default.TEXT_TRACK_ADDED)}if(s.call(this,d),d>=0)for(var i=0;i<K.length;i++){var j=n(i);j&&(j.mode=i===d?g.default.TEXT_SHOWING:g.default.TEXT_HIDDEN)}F.trigger(k.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:M,tracks:K})}}function f(a,b,c,d,e,f){var g=a/b,h=c/d,i=0,j=0;g>h?(j=b,i=j/d*c):(i=a,j=i/c*d);var k=0,l=0,m=0,n=0;return i/j>e?(n=j,m=j*e):(m=i,n=i/e),k=(a-m)/2,l=(b-n)/2,f?{x:k+.1*m,y:l+.1*n,w:.8*m,h:.8*n}:{x:k,y:l,w:m,h:n}}function h(a,b){var c=J.getClientWidth(),d=J.getClientHeight(),e=J.getVideoWidth(),g=J.getVideoHeight(),h=J.getVideoRelativeOffsetTop(),i=J.getVideoRelativeOffsetLeft(),j=e/g,k=!1;a.isFromCEA608&&(j=3.5/3,k=!0);var l=f.call(this,c,d,e,g,j,k),m=l.w,n=l.h,o=l.x,p=l.y;if(m!=P||n!=Q||o!=N||p!=O||b){N=o+i,O=p+h,P=m,Q=n,R&&(R.style.left=N+"px",R.style.top=O+"px",R.style.width=P+"px",R.style.height=Q+"px");for(var q=0;a.activeCues&&q<a.activeCues.length;++q){var r=a.activeCues[q];r.scaleCue(r)}R&&(U&&document[U]||V?R.style.zIndex=X:R.style.zIndex=null)}}function j(a){var b=P,c=Q,d=void 0,e=void 0,f=void 0,g=void 0,h=void 0;if(a.cellResolution){var i=[b/a.cellResolution[0],c/a.cellResolution[1]];if(a.linePadding)for(d in a.linePadding)if(a.linePadding.hasOwnProperty(d)){var j=a.linePadding[d];e=(j*i[0]).toString();for(var k=document.getElementsByClassName("spanPadding"),m=0;m<k.length;m++)k[m].style.cssText=k[m].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+e),k[m].style.cssText=k[m].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+e)}if(a.fontSize){for(d in a.fontSize)if(a.fontSize.hasOwnProperty(d)){"%"===a.fontSize[d][0]?f=a.fontSize[d][1]/100:"c"===a.fontSize[d][0]&&(f=a.fontSize[d][1]),e=(f*i[1]).toString(),h="defaultFontSize"!==d?document.getElementsByClassName(d):document.getElementsByClassName("paragraph");for(var n=0;n<h.length;n++)h[n].style.cssText=h[n].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+e)}if(a.lineHeight)for(d in a.lineHeight)if(a.lineHeight.hasOwnProperty(d)){"%"===a.lineHeight[d][0]?g=a.lineHeight[d][1]/100:"c"===a.fontSize[d][0]&&(g=a.lineHeight[d][1]),e=(g*i[1]).toString(),h=document.getElementsByClassName(d);for(var o=0;o<h.length;o++)h[o].style.cssText=h[o].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+e)}}}if(a.isd){var p=document.getElementById(a.cueID);p&&R.removeChild(p),l(a)}}function l(a){if(R){var b=document.createElement("div");R.appendChild(b),W=(0,p.renderHTML)(a.isd,b,function(b){var c=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,d=/^#(.*)$/;if(c.test(b)){var e=c.exec(b),f=parseInt(e[4],10)-1,g=btoa(a.images[f]),h="data:image/png;base64,"+g;return h}if(d.test(b)){var e=d.exec(b),f=e[1],h="data:image/png;base64,"+a.embeddedImages[f];return h}return null},R.clientHeight,R.clientWidth,!1,function(a){H.info("renderCaption :",a)},W,!0),b.id=a.cueID}}function m(a,b,c){var d=n(a),e=this;if(d&&c&&0!==c.length)for(var f=0;f<c.length;f++){var h=void 0,i=c[f];d.cellResolution=i.cellResolution,d.isFromCEA608=i.isFromCEA608,"html"===i.type&&R?(h=new I(i.start-b,i.end-b,""),h.cueHTMLElement=i.cueHTMLElement,h.isd=i.isd,h.images=i.images,h.embeddedImages=i.embeddedImages,h.cueID=i.cueID,h.scaleCue=j.bind(e),h.cellResolution=i.cellResolution,h.lineHeight=i.lineHeight,h.linePadding=i.linePadding,h.fontSize=i.fontSize,R.style.left=N+"px",R.style.top=O+"px",R.style.width=P+"px",R.style.height=Q+"px",h.onenter=function(){d.mode===g.default.TEXT_SHOWING&&(this.isd?(l(this),H.debug("Cue enter id:"+this.cueID)):(R.appendChild(this.cueHTMLElement),j.call(e,this)))},h.onexit=function(){if(R)for(var a=R.childNodes,b=0;b<a.length;++b)a[b].id===this.cueID&&(H.debug("Cue exit id:"+a[b].id),R.removeChild(a[b]))}):i.data&&(h=new I(i.start-b,i.end-b,i.data),i.styles&&(void 0!==i.styles.align&&"align"in h&&(h.align=i.styles.align),void 0!==i.styles.line&&"line"in h&&(h.line=i.styles.line),void 0!==i.styles.position&&"position"in h&&(h.position=i.styles.position),void 0!==i.styles.size&&"size"in h&&(h.size=i.styles.size)));try{h?d.addCue(h):H.error("impossible to display subtitles.")}catch(k){throw u(d),d.addCue(h),k}}}function n(a){return a>=0&&K[a]?J.getTextTrack(K[a].kind,K[a].label,K[a].lang,K[a].isTTML,K[a].isEmbedded):null}function q(){return M}function r(a){for(var b=-1,c=0;c<K.length;c++)if(K[c].label===a){b=c;break}return b}function s(a){if(a!==M){M=a;var b=n(M);t.call(this,b),S&&(clearInterval(S),S=null),b&&"html"===b.renderingType&&(h.call(this,b,!0),S=setInterval(h.bind(this,b),500))}}function t(a){A.call(this),a&&"html"===a.renderingType?y.call(this):z.call(this)}function u(a){if(a.cues)for(var b=a.cues,c=b.length-1,d=c;d>=0;d--)a.removeCue(b[d])}function v(a){var b=n(a);b&&u(b)}function w(){for(var a=L?L.length:0,b=0;b<a;b++){var c=n(b);c&&(u.call(this,c),c.mode="disabled")}L=[],K=[],S&&(clearInterval(S),S=null),M=-1,A.call(this)}function x(a){J.removeChild(L[a]),L.splice(a,1)}function y(){if(T){var a=document.getElementById("native-cue-style");if(!a){a=document.createElement("style"),a.id="native-cue-style",document.head.appendChild(a);var b=a.sheet,c=J.getElement();c&&(c.id?b.insertRule("#"+c.id+"::cue {background: transparent}",0):0!==c.classList.length?b.insertRule("."+c.className+"::cue {background: transparent}",0):b.insertRule("video::cue {background: transparent}",0))}}}function z(){if(T){var a=document.getElementById("native-cue-style");a&&document.head.removeChild(a)}}function A(){if(R)for(;R.firstChild;)R.removeChild(R.firstChild)}function B(a){a&&a.videoModel&&(J=a.videoModel)}function C(a,b){var c=n(a);c&&c.mode!==b&&(c.mode=b)}function D(){return K[M]}var E=this.context,F=(0,i.default)(E).getInstance(),G=void 0,H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0,Q=void 0,R=void 0,S=void 0,T=void 0,U=void 0,V=void 0,W=void 0,X=void 0;return G={initialize:b,displayCConTop:d,addTextTrack:e,addCaptions:m,getCurrentTrackIdx:q,setCurrentTrackIdx:s,getTrackIdxForId:r,getCurrentTrackInfo:D,setModeForTrackIdx:C,deleteCuesFromTrackIdx:v,deleteAllTextTracks:w,deleteTextTrack:x,setConfig:B},a(),G}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(46),i=d(h),j=a(50),k=d(j),l=a(47),m=d(l),n=a(45),o=d(n),p=a(40);e.__dashjs_factory_name="TextTracks",c.default=m.default.getSingletonFactory(e),b.exports=c.default},{40:40,45:45,46:46,47:47,50:50,98:98}],143:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){h(),n=(0,m.default)(j).create({dashManifestModel:a.dashManifestModel,adapter:a.adapter,baseURLController:a.baseURLController,stream:a.stream})}function c(a){var b=n.getCurrentTrack();if(!b||b.segmentDuration<=0)return null;var c=Math.floor(a/b.segmentDuration),e=a%b.segmentDuration,f=Math.floor(e*b.tilesHor*b.tilesVert/b.segmentDuration),g=new k.default;return g.url=d(b,c),g.width=Math.floor(b.widthPerTile),g.height=Math.floor(b.heightPerTile),g.x=Math.floor(f%b.tilesHor)*b.widthPerTile,g.y=Math.floor(f/b.tilesHor)*b.heightPerTile,g}function d(a,b){var c=b+a.startNumber,d=(0,p.replaceTokenForTemplate)(a.templateUrl,"Number",c);return d=(0,p.replaceTokenForTemplate)(d,"Time",(c-1)*a.segmentDuration),d=(0,p.replaceTokenForTemplate)(d,"Bandwidth",a.bandwidth),(0,p.unescapeDollarsInTemplate)(d)}function e(a){n.setTrackByIndex(a)}function f(){return n.getCurrentTrackIndex()}function g(){var a=n.getTracks();if(!a||0===a.length)return[];var b=0;return a.map(function(a){var c=new o.default;return c.mediaType=i.default.IMAGE,c.qualityIndex=b++,c.bitrate=a.bitrate,c.width=a.width,c.height=a.height,c})}function h(){n&&n.reset()}var j=this.context,l=void 0,n=void 0;return l={get:c,setTrackByIndex:e,getCurrentTrackIndex:f,getBitrateList:g,reset:h},b(),l}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(98),i=d(h),j=a(176),k=d(j),l=a(144),m=d(l),n=a(162),o=d(n),p=a(75);e.__dashjs_factory_name="ThumbnailController",c.default=g.default.getClassFactory(e),b.exports=c.default},{144:144,162:162,176:176,47:47,75:75,98:98}],144:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){l(),c()}function c(){if(u&&r&&s){var a=u?u.getStreamInfo():null;if(a){var b=s.getMediaInfoForType(a,g.default.IMAGE);if(b){var c=s.getDataForMedia(b);if(c){var e=r.getRepresentationsForAdaptation(c);e&&e.length>0&&e.forEach(function(a){a.segmentInfoType===i.default.SEGMENT_TEMPLATE&&a.segmentDuration>0&&a.media&&d(a)}),x.length>0&&(x.sort(function(a,b){return a.bitrate-b.bitrate}),y=x.length-1)}}}}}function d(a){var b=new m.default;b.id=a.id,b.bitrate=a.bandwidth,b.width=a.width,b.height=a.height,b.tilesHor=1,b.tilesVert=1,b.startNumber=a.startNumber,b.segmentDuration=a.segmentDuration,b.timescale=a.timescale,b.templateUrl=e(a),a.essentialProperties&&a.essentialProperties.forEach(function(a){if(a.schemeIdUri===q&&a.value){var c=a.value.split("x");2!==c.length||isNaN(c[0])||isNaN(c[1])||(b.tilesHor=parseInt(c[0],10),b.tilesVert=parseInt(c[1],10))}}),b.tilesHor>0&&b.tilesVert>0&&(b.widthPerTile=b.width/b.tilesHor,b.heightPerTile=b.height/b.tilesVert,x.push(b))}function e(a){var b=v.isRelative(a.media)?v.resolve(a.media,t.resolve(a.path).url):a.media;return b?(0,p.replaceIDForTemplate)(b,a.id):""}function f(){return x}function h(){return y}function j(){return y<0?null:x[y]}function k(a){x&&0!==x.length&&(a>=x.length&&(a=x.length-1),y=a)}function l(){x=[],y=-1}var n=this.context,r=a.dashManifestModel,s=a.adapter,t=a.baseURLController,u=a.stream,v=(0,o.default)(n).getInstance(),w=void 0,x=void 0,y=void 0;return w={initialize:b,getTracks:f,reset:l,setTrackByIndex:k,getCurrentTrack:j,getCurrentTrackIndex:h},b(),w}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(57),i=d(h),j=a(47),k=d(j),l=a(177),m=d(l),n=a(158),o=d(n),p=a(75),q="http://dashif.org/thumbnail_tile";e.__dashjs_factory_name="ThumbnailTracks",c.default=k.default.getClassFactory(e),b.exports=c.default},{158:158,177:177,47:47,57:57,75:75,98:98}],145:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){p=(0,k.default)(h).create({updateEventName:i.default.SERVICE_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:i.default.SERVICE_LOCATION_BLACKLIST_ADD}),q=(0,o.default)(h).create({blacklistController:p}),t=(0,m.default)(h).create({blacklistController:p}),u=q}function b(a){a.selector&&(u=a.selector),a.dashManifestModel&&(l=a.dashManifestModel)}function c(){if(!l||!l.hasOwnProperty("getIsDVB"))throw new Error("Missing config parameter(s)")}function d(a){c(),u=l.getIsDVB(a)?t:q}function e(a){var b=a.baseUrls,c=a.selectedIdx;if(!isNaN(c))return b[c];var d=u.select(b);return d?(a.selectedIdx=b.indexOf(d),d):(j.trigger(i.default.URL_RESOLUTION_FAILED,{error:new Error(r,s)}),void(u===q&&f()))}function f(){p.reset()}var h=this.context,j=(0,g.default)(h).getInstance(),l=void 0,n=void 0,p=void 0,q=void 0,t=void 0,u=void 0;return n={chooseSelectorFromManifest:d,select:e,reset:f,setConfig:b},a(),n}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(50),i=d(h),j=a(102),k=d(j),l=a(161),m=d(l),n=a(160),o=d(n),p=a(47),q=d(p),r=1,s="Failed to resolve a valid URL";e.__dashjs_factory_name="BaseURLSelector";var t=q.default.getClassFactory(e);t.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=r,t.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE=s,q.default.updateClassFactory(e.__dashjs_factory_name,t),c.default=t,b.exports=c.default},{102:102,160:160,161:161,46:46,47:47,50:50}],146:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){if(!a)return null;void 0===a.fileStart&&(a.fileStart=0);var b=k.default.parseBuffer(a),c=(0,g.default)(e).create();return c.setData(b),c}function b(a,b,e){if(void 0===e&&(e=0),!b||e+8>=b.byteLength)return new m.default(0,!1);for(var f=b instanceof ArrayBuffer?new Uint8Array(b):b,g=void 0,h=0;e<f.byteLength;){var i=c(f,e),j=d(f,e+4);if(0===i)break;e+i<=f.byteLength&&(a.indexOf(j)>=0?g=new m.default(e,!0,i):h=e+i),e+=i}return g||new m.default(h,!1)}function c(a,b){return a[b+3]>>>0|a[b+2]<<8>>>0|a[b+1]<<16>>>0|a[b]<<24>>>0}function d(a,b){return String.fromCharCode(a[b++])+String.fromCharCode(a[b++])+String.fromCharCode(a[b++])+String.fromCharCode(a[b])}var e=this.context;return{parse:a,findLastTopIsoBoxCompleted:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(153),g=d(f),h=a(47),i=d(h),j=a(5),k=d(j),l=a(168),m=d(l);e.__dashjs_factory_name="BoxParser",c.default=i.default.getSingletonFactory(e),b.exports=c.default},{153:153,168:168,47:47,5:5}],147:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){g=!1}function b(){var a="WebKitMediaSource"in window,b="MediaSource"in window;return a||b}function c(){return g}function d(a){g=a}function e(a){return!!("MediaSource"in window&&MediaSource.isTypeSupported(a))||!!("WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(a))}var f=void 0,g=void 0;return f={supportsMediaSource:b,supportsEncryptedMedia:c,supportsCodec:e,setEncryptedMediaSupported:d},a(),f}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="Capabilities",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{47:47}],148:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b){var c=0;for(c=0;c<this.customTimeRangeArray.length&&a>this.customTimeRangeArray[c].start;c++);for(this.customTimeRangeArray.splice(c,0,{start:a,end:b}),c=0;c<this.customTimeRangeArray.length-1;c++)this.mergeRanges(c,c+1)&&c--;this.length=this.customTimeRangeArray.length}function b(){this.customTimeRangeArray=[],this.length=0}function c(a,b){for(var c=0;c<this.customTimeRangeArray.length;c++)if(a<=this.customTimeRangeArray[c].start&&b>=this.customTimeRangeArray[c].end)this.customTimeRangeArray.splice(c,1),c--;else{if(a>this.customTimeRangeArray[c].start&&b<this.customTimeRangeArray[c].end){this.customTimeRangeArray.splice(c+1,0,{start:b,end:this.customTimeRangeArray[c].end}),this.customTimeRangeArray[c].end=a;break}a>this.customTimeRangeArray[c].start&&a<this.customTimeRangeArray[c].end?this.customTimeRangeArray[c].end=a:b>this.customTimeRangeArray[c].start&&b<this.customTimeRangeArray[c].end&&(this.customTimeRangeArray[c].start=b)}this.length=this.customTimeRangeArray.length}function d(a,b){var c=this.customTimeRangeArray[a],d=this.customTimeRangeArray[b];return c.start<=d.start&&d.start<=c.end&&c.end<=d.end?(c.end=d.end,this.customTimeRangeArray.splice(b,1),!0):d.start<=c.start&&c.start<=d.end&&d.end<=c.end?(c.start=d.start,this.customTimeRangeArray.splice(b,1),!0):d.start<=c.start&&c.start<=d.end&&c.end<=d.end?(this.customTimeRangeArray.splice(a,1),!0):c.start<=d.start&&d.start<=c.end&&d.end<=c.end&&(this.customTimeRangeArray.splice(b,1),!0)}function e(a){if(null===a||isNaN(a)||a%1!=0)throw new Error("index argument is not an integer")}function f(a){return e(a),a>=this.customTimeRangeArray.length||a<0?NaN:this.customTimeRangeArray[a].start}function g(a){return e(a),a>=this.customTimeRangeArray.length||a<0?NaN:this.customTimeRangeArray[a].end}return{customTimeRangeArray:[],length:0,add:a,clear:b,remove:c,mergeRanges:d,start:f,end:g}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="CustomTimeRanges",c.default=g.default.getClassFactory(e),b.exports=c.default},{47:47}],149:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){w=(0,i.default)(t).getInstance().getLogger(v),d()}function c(a){if(void 0!==x)return x;x=!1;var b="1",c="1",d=void 0;try{"undefined"!=typeof window&&(d=window[a])}catch(e){return w.warn("DOMStorage access denied: "+e.message),x}if(!d||a!==m&&a!==n)return x;try{d.setItem(b,c),d.removeItem(b),x=!0}catch(e){w.warn("DOMStorage is supported, but cannot be used: "+e.message)}return x}function d(){c(m)&&j.forEach(function(a){var b=localStorage.getItem(a.oldKey);if(b){localStorage.removeItem(a.oldKey);try{localStorage.setItem(a.newKey,b)}catch(c){w.error(c.message)}}})}function e(){var a=6e5;return Math.round((new Date).getTime()/a)*a}function f(a,b){return c(a)&&u["get"+b+"CachingInfo"]().enabled}function g(){
|
28 |
+
if(!u||!u.hasOwnProperty("getLastMediaSettingsCachingInfo"))throw new Error("Missing config parameter(s)")}function h(a){if(g(),!f(m,p))return null;var b=null,c=l.replace(/\?/,a);try{var d=JSON.parse(localStorage.getItem(c))||{},e=(new Date).getTime()-parseInt(d.timestamp,10)>=u.getLastMediaSettingsCachingInfo().ttl||!1;b=d.settings,e&&(localStorage.removeItem(c),b=null)}catch(h){return null}return b}function q(a){var b=NaN;if(g(),f(m,o)){var c=k.replace(/\?/,a);try{var d=JSON.parse(localStorage.getItem(c))||{},e=(new Date).getTime()-parseInt(d.timestamp,10)>=u.getLastMediaSettingsCachingInfo().ttl||!1,h=parseFloat(d.bitrate);isNaN(h)||e?e&&localStorage.removeItem(c):(b=h,w.debug("Last saved bitrate for "+a+" was "+h))}catch(i){return null}}return b}function r(a,b){if(f(m,p)){var c=l.replace(/\?/,a);try{localStorage.setItem(c,JSON.stringify({settings:b,timestamp:e()}))}catch(d){w.error(d.message)}}}function s(a,b){if(f(m,o)&&b){var c=k.replace(/\?/,a);try{localStorage.setItem(c,JSON.stringify({bitrate:b.toFixed(3),timestamp:e()}))}catch(d){w.error(d.message)}}}a=a||{};var t=this.context,u=a.mediaPlayerModel,v=void 0,w=void 0,x=void 0;return v={getSavedBitrateSettings:q,setSavedBitrateSettings:s,getSavedMediaSettings:h,setSavedMediaSettings:r},b(),v}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(45),i=d(h),j=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],k="dashjs_?_bitrate",l="dashjs_?_settings",m="localStorage",n="sessionStorage",o="LastBitrate",p="LastMediaSettings";e.__dashjs_factory_name="DOMStorage";var q=g.default.getSingletonFactory(e);c.default=q,b.exports=c.default},{45:45,47:47}],150:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){return n}function c(a){n=a}function d(a,b){var c=!0,d=0,e=void 0,f=void 0;if(void 0===b&&(b=!1),a.tag>16777215?(m.getUint32(n)!==a.tag&&(c=!1),d=4):a.tag>65535?(e=m.getUint16(n),f=m.getUint8(n+2),256*e+f!==a.tag&&(c=!1),d=3):a.tag>255?(m.getUint16(n)!==a.tag&&(c=!1),d=2):(m.getUint8(n)!==a.tag&&(c=!1),d=1),!c&&a.required&&!b)throw new Error("required tag not found");return c&&(n+=d),c}function e(a,b){var c=d(a,b);return c&&h(),c}function f(a){var b=void 0;return d(a),b=h(),l[a.parse](b)}function g(a,b){var c=d(a,b),e=void 0;return c&&(e=h(),n+=e),c}function h(a){var b=1,c=128,d=8,e=-1,f=0,g=m.getUint8(n),h=0;for(h=0;h<d;h+=1){if((g&c)===c){f=void 0===a?g&~c:g,e=h;break}c>>=1}for(h=0;h<e;h+=1,b+=1)f=f<<8|255&m.getUint8(n+b);return n+=b,f}function i(a){var b=void 0;switch(a){case 4:b=m.getFloat32(n),n+=4;break;case 8:b=m.getFloat64(n),n+=8}return b}function j(a){for(var b=0,c=0;c<a;c+=1)b<<=8,b|=255&m.getUint8(n+c);return n+=a,b}function k(){return n<m.byteLength}a=a||{};var l=void 0,m=new DataView(a.data),n=0;return l={getPos:b,setPos:c,consumeTag:d,consumeTagAndSize:e,parseTag:f,skipOverElement:g,getMatroskaCodedNum:h,getMatroskaFloat:i,getMatroskaUint:j,moreData:k}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="EBMLParser",c.default=g.default.getClassFactory(e),b.exports=c.default},{47:47}],151:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){l.trigger(i.default.ERROR,{error:"capability",event:a})}function b(a,b,c){l.trigger(i.default.ERROR,{error:"download",event:{id:a,url:b,request:c}})}function c(a,b,c,d){l.trigger(i.default.ERROR,{error:"manifestError",event:{message:a,id:b,manifest:c,event:d}})}function d(a,b,c){l.trigger(i.default.ERROR,{error:"cc",event:{message:a,id:b,cc:c}})}function e(a){l.trigger(i.default.ERROR,{error:"mediasource",event:a})}function f(a){l.trigger(i.default.ERROR,{error:"key_session",event:a})}function h(a){l.trigger(i.default.ERROR,{error:"key_message",event:a})}function j(a){l.trigger(i.default.ERROR,{error:"mssError",event:a})}var k=this.context,l=(0,g.default)(k).getInstance();return{capabilityError:a,downloadError:b,manifestError:c,timedTextError:d,mediaSourceError:e,mediaKeySessionError:f,mediaKeyMessageError:h,mssError:j}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(46),g=d(f),h=a(50),i=d(h),j=a(47),k=d(j),l="mediasource",m="mediakeys",n="manifest",o="SIDX",p="content",q="initialization",r="xlink",s="codec",t="parse",u="nostreams",v="parse";e.__dashjs_factory_name="ErrorHandler";var w=k.default.getSingletonFactory(e);w.CAPABILITY_ERROR_MEDIASOURCE=l,w.CAPABILITY_ERROR_MEDIAKEYS=m,w.DOWNLOAD_ERROR_ID_MANIFEST=n,w.DOWNLOAD_ERROR_ID_SIDX=o,w.DOWNLOAD_ERROR_ID_CONTENT=p,w.DOWNLOAD_ERROR_ID_INITIALIZATION=q,w.DOWNLOAD_ERROR_ID_XLINK=r,w.MANIFEST_ERROR_ID_CODEC=s,w.MANIFEST_ERROR_ID_PARSE=t,w.MANIFEST_ERROR_ID_NOSTREAMS=u,w.TIMED_TEXT_ERROR_ID_PARSE=v,k.default.updateSingletonFactory(e.__dashjs_factory_name,w),c.default=w,b.exports=c.default},{46:46,47:47,50:50}],152:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var b=a.streamId,c=a.representationId;d[b]=d[b]||{},d[b][c]=a}function b(a,b){return d&&d[a]&&d[a][b]?d[a][b]:null}function c(){d={}}var d={};return{save:a,extract:b,reset:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="InitCache",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{47:47}],153:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){return a&&f&&f.boxes&&0!==f.boxes.length&&"function"==typeof f.fetch?e(f.fetch(a)):null}function b(a){var b=[];if(!a||!f||"function"!=typeof f.fetchAll)return b;for(var c=f.fetchAll(a),d=void 0,g=0,h=c.length;g<h;g++)(d=e(c[g]))&&b.push(d);return b}function c(a){f=a}function d(){if(!f||!f.boxes||!f.boxes.length)return null;var a=f.boxes[f.boxes.length-1].type,c=b(a);return c.length>0?c[c.length-1]:null}function e(a){if(!a)return null;var b=new g.default(a);return a.hasOwnProperty("_incomplete")&&(b.isComplete=!a._incomplete),b}var f=void 0;return{getBox:a,getBoxes:b,setData:c,getLastBox:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(167),g=d(f),h=a(47),i=d(h);e.__dashjs_factory_name="IsoFile",c.default=i.default.getClassFactory(e),b.exports=c.default},{167:167,47:47}],154:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){if(!(e&&e.hasOwnProperty("getExpectedLiveEdge")&&f&&f.hasOwnProperty("getCurrentRepresentationInfo")))throw new Error("Missing config parameter(s)")}function c(){b();var a=f.getCurrentRepresentationInfo(),c=a.DVRWindow.end;return a.useCalculatedLiveEdgeTime&&(c=e.getExpectedLiveEdge(),e.setClientTimeOffset(c-a.DVRWindow.end)),c}function d(){e=null,f=null}a=a||{};var e=a.timelineConverter,f=a.streamProcessor;return{getLiveEdge:c,reset:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="LiveEdgeFinder",c.default=g.default.getClassFactory(e),b.exports=c.default},{47:47}],155:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b){return(0,i.default)(a,b)}return{areEqual:a}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(6),i=d(h);e.__dashjs_factory_name="ObjectUtils",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{47:47,6:6}],156:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){return a}function b(a){return a}return{modifyRequestURL:a,modifyRequestHeader:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="RequestModifier",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{47:47}],157:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){g=(0,i.default)(d).getInstance().getLogger(f)}function b(){var a="cue_TTML_"+h;return h++,a}function c(a,c,d,f,h){var i=void 0,j="",k=[],l=void 0,o=void 0,p={},q={},r="",s="",t={onOpenTag:function(a,b,c){if("image"===b&&"http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"===a){if(!c[" imagetype"]||"PNG"!==c[" imagetype"].value)return void g.warn("smpte-tt imagetype != PNG. Discarded");r=c["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){r&&(q[r]=s.trim()),s="",r=""},onText:function(a){r&&(s+=a)}};if(!a)throw j="no ttml data to parse",new Error(j);p.data=a,e.trigger(m.default.TTML_TO_PARSE,p);var u=(0,n.fromXML)(p.data,function(a){j=a},t);e.trigger(m.default.TTML_PARSED,{ttmlString:p.data,ttmlDoc:u});var v=u.getMediaTimeEvents();for(i=0;i<v.length;i++){var w=(0,n.generateISD)(u,v[i],function(a){j=a});w.contents.some(function(a){return a.contents.length})&&(l=v[i]+c<d?d:v[i]+c,o=v[i+1]+c>f?f:v[i+1]+c,l<o&&k.push({start:l,end:o,type:"html",cueID:b(),isd:w,images:h,embeddedImages:q}))}if(""!==j)throw g.error(j),new Error(j);return k}var d=this.context,e=(0,k.default)(d).getInstance(),f=void 0,g=void 0,h=0;return f={parse:c},a(),f}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(45),i=d(h),j=a(46),k=d(j),l=a(50),m=d(l),n=a(40);e.__dashjs_factory_name="TTMLParser",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{40:40,45:45,46:46,47:47,50:50}],158:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){try{new window.URL("x","http://y");k=p}catch(a){}finally{k=k||q}}function b(a){var b=a.indexOf("/"),c=a.lastIndexOf("/");return-1!==b?c===b+1?a:(-1!==a.indexOf("?")&&(a=a.substring(0,a.indexOf("?"))),a.substring(0,c+1)):""}function c(a){var b=a.match(o);return b?b[1]:""}function d(a){var b=a.match(l);return b?b[0]:""}function e(a){return!l.test(a)}function f(a){return e(a)&&"/"===a.charAt(0)}function g(a){return 0===a.indexOf("//")}function h(a){return m.test(a)}function i(a){return n.test(a)}function j(a,b){return k(a,b)}var k=void 0,l=/^[a-z][a-z0-9+\-.]*:/i,m=/^https?:\/\//i,n=/^https:\/\//i,o=/^([a-z][a-z0-9+\-.]*:\/\/[^\/]+)\/?/i,p=function(a,b){try{return new window.URL(a,b).toString()}catch(c){return a}},q=function(a,h){var i=b;if(!h)return a;if(!e(a))return a;f(a)&&(i=c),g(a)&&(i=d);var j=i(h);return[j,a].join("/"!==j.charAt(j.length-1)&&"/"!==a.charAt(0)?"/":"")};return a(),{parseBaseUrl:b,parseOrigin:c,parseScheme:d,isRelative:e,isPathAbsolute:f,isSchemeRelative:g,isHTTPURL:h,isHTTPS:i,resolve:j}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="URLUtils",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{47:47}],159:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){k=(0,i.default)(g).getInstance().getLogger(h),l=/(?:\r\n|\r|\n)/gm,m=/-->/,n=/(^[\s]+|[\s]+$)/g,o=/\s\b/g}function b(a){var b=[],e=void 0,g=void 0;if(!a)return b;a=a.split(l),e=a.length,g=-1;for(var h=0;h<e;h++){var i=a[h];if(i.length>0&&i!==j&&i.match(m)){var o=d(i),p=o.cuePoints,q=o.styles,r=f(a,h+1),s=c(p[0].replace(n,"")),t=c(p[1].replace(n,""));!isNaN(s)&&!isNaN(t)&&s>=g&&t>s?""!==r?(g=s,b.push({start:s,end:t,data:r,styles:q})):k.error("Skipping cue due to empty/malformed cue text"):k.error("Skipping cue due to incorrect cue timing")}}return b}function c(a){var b=a.split(":"),c=b.length-1;return a=60*parseInt(b[c-1],10)+parseFloat(b[c]),2===c&&(a+=3600*parseInt(b[0],10)),a}function d(a){var b=a.split(m),c=b[1].split(o);return c.shift(),b[1]=c[0],c.shift(),{cuePoints:b,styles:e(c)}}function e(a){var b={};return a.forEach(function(a){if(a.split(/:/).length>1){var c=a.split(/:/)[1];c&&-1!=c.search(/%/)&&(c=parseInt(c.replace(/%/,""),10)),(a.match(/align/)||a.match(/A/))&&(b.align=c),(a.match(/line/)||a.match(/L/))&&(b.line=c),(a.match(/position/)||a.match(/P/))&&(b.position=c),(a.match(/size/)||a.match(/S/))&&(b.size=c)}}),b}function f(a,b){for(var c=b,d="",e="",f=void 0;""!==a[c]&&c<a.length;)c++;if((f=c-b)>1)for(var g=0;g<f;g++){if(e=a[b+g],e.match(m)){d="";break}d+=e,g!==f-1&&(d+="\n")}else e=a[b],e.match(m)||(d=e);return d}var g=this.context,h=void 0,k=void 0,l=void 0,m=void 0,n=void 0,o=void 0;return h={parse:b},a(),h}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(45),i=d(h),j="WEBVTT";e.__dashjs_factory_name="VTTParser",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{45:45,47:47}],160:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){var b=0,d=void 0;return a&&a.some(function(a,d){return b=d,!c.contains(a.serviceLocation)})&&(d=a[b]),d}a=a||{};var c=a.blacklistController;return{select:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="BasicSelector",c.default=g.default.getClassFactory(e),b.exports=c.default},{47:47}],161:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){var b=[],c=function(a){return!b.length||!a.dvb_priority||-1===b.indexOf(a.dvb_priority)},d=function(a){return!e.contains(a.serviceLocation)||(a.dvb_priority&&b.push(a.dvb_priority),!1)};return a.filter(d).filter(c)}function c(a){var b=function(a,b){var c=a.dvb_priority-b.dvb_priority;return isNaN(c)?0:c},c=function(a,b,c){return!b||c[0].dvb_priority&&a.dvb_priority&&c[0].dvb_priority===a.dvb_priority},d=0,e=[],f=0,g=void 0,h=void 0;if(h=a.sort(b).filter(c),h.length)return h.length>1&&(h.forEach(function(a){d+=a.dvb_weight,e.push(d)}),g=Math.floor(Math.random()*(d-1)),e.every(function(a,b){return f=b,!(g<a)})),h[f]}function d(a){return a&&c(b(a))}a=a||{};var e=a.blacklistController;return{select:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f);e.__dashjs_factory_name="DVBSelector",c.default=g.default.getClassFactory(e),b.exports=c.default},{47:47}],162:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN};c.default=e,b.exports=c.default},{}],163:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(b,c,e){d(this,a),this.code=b||null,this.message=c||null,this.data=e||null};c.default=e,b.exports=c.default},{}],164:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null};c.default=e,b.exports=c.default},{}],165:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.action=a.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer",this.representationId=null};e.ACTION_DOWNLOAD="download",e.ACTION_COMPLETE="complete",c.default=e,b.exports=c.default},{}],166:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(165),i=d(h),j=function(a){function b(a){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.url=a||null,this.checkForExistenceOnly=!0}return f(b,a),b}(i.default);c.default=j,b.exports=c.default},{165:165}],167:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b){if(d(this,a),this.offset=b._offset,this.type=b.type,this.size=b.size,this.boxes=[],b.boxes)for(var c=0;c<b.boxes.length;c++)this.boxes.push(new a(b.boxes[c]));switch(this.isComplete=!0,b.type){case"sidx":if(this.timescale=b.timescale,this.earliest_presentation_time=b.earliest_presentation_time,this.first_offset=b.first_offset,this.references=b.references,b.references){this.references=[];for(var c=0;c<b.references.length;c++){var e={reference_type:b.references[c].reference_type,referenced_size:b.references[c].referenced_size,subsegment_duration:b.references[c].subsegment_duration};this.references.push(e)}}break;case"emsg":this.id=b.id,this.value=b.value,this.timescale=b.timescale,this.scheme_id_uri=b.scheme_id_uri,this.presentation_time_delta=b.presentation_time_delta,this.event_duration=b.event_duration,this.message_data=b.message_data;break;case"mdhd":this.timescale=b.timescale;break;case"mfhd":this.sequence_number=b.sequence_number;break;case"subs":this.entry_count=b.entry_count,this.entries=b.entries;break;case"tfhd":this.base_data_offset=b.base_data_offset,this.sample_description_index=b.sample_description_index,this.default_sample_duration=b.default_sample_duration,this.default_sample_size=b.default_sample_size,this.default_sample_flags=b.default_sample_flags,this.flags=b.flags;break;case"tfdt":this.version=b.version,this.baseMediaDecodeTime=b.baseMediaDecodeTime,this.flags=b.flags;break;case"trun":if(this.sample_count=b.sample_count,this.first_sample_flags=b.first_sample_flags,this.data_offset=b.data_offset,this.flags=b.flags,this.samples=b.samples,b.samples){this.samples=[];for(var c=0,f=b.samples.length;c<f;c++){var g={sample_size:b.samples[c].sample_size,sample_duration:b.samples[c].sample_duration,sample_composition_time_offset:b.samples[c].sample_composition_time_offset};this.samples.push(g)}}}}return e(a,[{key:"getChildBox",value:function(a){for(var b=0;b<this.boxes.length;b++)if(this.boxes[b].type===a)return this.boxes[b]}},{key:"getChildBoxes",value:function(a){for(var b=[],c=0;c<this.boxes.length;c++)this.boxes[c].type===a&&b.push(this.boxes[c]);return b}}]),a}();c.default=f,b.exports=c.default},{}],168:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(b,c,e){d(this,a),this.lastCompletedOffset=b,this.found=c,this.size=e};c.default=e,b.exports=c.default},{}],169:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.DVRWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null};c.default=e,b.exports=c.default},{}],170:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.id=null,this.index=null,this.type=null,this.streamInfo=null,this.representationCount=0,this.lang=null,this.viewpoint=null,this.accessibility=null,this.audioChannelConfiguration=null,this.roles=null,this.codec=null,this.mimeType=null,this.contentProtection=null,this.isText=!1,this.KID=null,this.bitrateList=null};c.default=e,b.exports=c.default},{}],171:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]};c.default=e,b.exports=c.default},{}],172:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.id=null,this.quality=null,this.DVRWindow=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null};c.default=e,b.exports=c.default},{}],173:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0};c.default=e,b.exports=c.default},{}],174:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(98),i=d(h),j=a(165),k=d(j),l=function(a){function b(a,c){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.url=a||null,this.type=c||null,this.mediaType=i.default.STREAM,this.responseType=""}return f(b,a),b}(k.default);c.default=l,b.exports=c.default},{165:165,98:98}],175:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.captionData=null,this.label=null,this.lang=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1};c.default=e,b.exports=c.default},{}],176:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null};c.default=e,b.exports=c.default},{}],177:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.bitrate=0,this.width=0,this.height=0,this.tilesHor=0,this.tilesVert=0,this.widthPerTile=0,this.heightPerTile=0,this.startNumber=0,this.segmentDuration=0,this.timescale=0,this.templateUrl="",this.id=""};c.default=e,b.exports=c.default},{}],178:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null};c.default=e,b.exports=c.default},{}],179:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.t=null,this.level=null};c.default=e,b.exports=c.default},{}],180:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var f=a(103),g=d(f),h=function a(){e(this,a),this.target=null,this.state=g.default.BUFFER_EMPTY};c.default=h,b.exports=c.default},{103:103}],181:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.time=null,this.range=null,this.manifestInfo=null};c.default=e,b.exports=c.default},{}],182:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.time=null,this.droppedFrames=null};c.default=e,b.exports=c.default},{}],183:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this._stream=null,this._tfinish=null,this._mediaduration=null,this._responseHeaders=null,this._serviceLocation=null},f=function a(){d(this,a),this.s=null,this.d=null,this.b=[]};e.GET="GET",e.HEAD="HEAD",e.MPD_TYPE="MPD",e.XLINK_EXPANSION_TYPE="XLinkExpansion",e.INIT_SEGMENT_TYPE="InitializationSegment",e.INDEX_SEGMENT_TYPE="IndexSegment",e.MEDIA_SEGMENT_TYPE="MediaSegment",e.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",e.OTHER_TYPE="other",c.HTTPRequest=e,c.HTTPRequestTrace=f},{}],184:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]},f=function a(){d(this,a),this.id=null,this.index=null,this.start=null,this.duration=null},g=function a(){d(this,a),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null};c.ManifestUpdate=e,c.ManifestUpdateStreamInfo=f,c.ManifestUpdateRepresentationInfo=g},{}],185:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]};e.INITIAL_PLAYOUT_START_REASON="initial_playout",e.SEEK_START_REASON="seek",e.RESUME_FROM_PAUSE_START_REASON="resume",e.METRICS_COLLECTION_START_REASON="metrics_collection_start";var f=function a(){d(this,a),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null};f.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",f.REBUFFERING_REASON="rebuffering",f.USER_REQUEST_STOP_REASON="user_request",f.END_OF_PERIOD_STOP_REASON="end_of_period",f.END_OF_CONTENT_STOP_REASON="end_of_content",f.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",f.FAILURE_STOP_REASON="failure",c.PlayList=e,c.PlayListTrace=f},{}],186:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.t=null,this.mt=null,this.to=null,this.lto=null};c.default=e,b.exports=c.default},{}],187:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.loadingRequests=[],this.executedRequests=[]};c.default=e,b.exports=c.default},{}],188:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.quality=null,this.range=null,this.state=null};c.default=e,b.exports=c.default},{}],189:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.tcpid=null,this.dest=null,this.topen=null,this.tclose=null,this.tconnect=null};c.default=e,b.exports=c.default},{}]},{},[4]);
|
29 |
|
30 |
|
31 |
/*jslint browser: true, for: true */
|
flowplayer/fv-flowplayer.min.js
CHANGED
@@ -27,13 +27,26 @@ if( typeof(fv_flowplayer_conf) != "undefined" ) {
|
|
27 |
|
28 |
flowplayer.conf = fv_flowplayer_conf;
|
29 |
flowplayer.conf.share = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
flowplayer.support.fvmobile = !!( !flowplayer.support.firstframe || flowplayer.support.iOS || flowplayer.support.android );
|
39 |
|
@@ -618,37 +631,30 @@ function fv_player_preload() {
|
|
618 |
|
619 |
jQuery(document).ajaxComplete( function() {
|
620 |
fv_player_load();
|
621 |
-
});
|
|
|
|
|
622 |
}
|
623 |
|
624 |
|
625 |
function fv_player_load() {
|
626 |
|
627 |
-
|
628 |
-
jQuery('.flowplayer[data-item]' ).each( function(i,el) {
|
629 |
var root = jQuery(el);
|
630 |
var api = root.data('flowplayer');
|
631 |
if( api ) return;
|
632 |
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
// Playlist - new style
|
637 |
-
jQuery('.fp-playlist-external' ).each( function(i,el) {
|
638 |
-
var playlist = jQuery(el);
|
639 |
-
var player = jQuery( '#' + playlist.attr('rel'));
|
640 |
-
if( player.length ) {
|
641 |
-
var api = player.data('flowplayer');
|
642 |
-
if( api ) return;
|
643 |
-
var items = [];
|
644 |
-
|
645 |
if ( playlist.find('a[data-item]').length == 0 ) return; // respect old playlist script setup
|
646 |
|
|
|
647 |
playlist.find('a[data-item]').each( function() {
|
648 |
-
items.push( fv_player_videos_parse(jQuery(this).attr('data-item'),
|
649 |
});
|
650 |
|
651 |
-
|
652 |
}
|
653 |
} );
|
654 |
|
@@ -932,6 +938,7 @@ if( isIE11 ) {
|
|
932 |
*/
|
933 |
flowplayer(function (api,root) {
|
934 |
root = jQuery(root);
|
|
|
935 |
|
936 |
if( root.data('end_popup_preview') ){
|
937 |
jQuery(document).ready( function() {
|
@@ -939,9 +946,15 @@ flowplayer(function (api,root) {
|
|
939 |
});
|
940 |
}
|
941 |
|
942 |
-
|
943 |
-
|
944 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
945 |
if( !root.hasClass('is-cva') && root.find('#'+player_id+'_ad').length == 0 && typeof(fv_flowplayer_ad) != "undefined" && typeof(fv_flowplayer_ad[player_id]) != "undefined" && root.width() >= parseInt(fv_flowplayer_ad[player_id].width) ) {
|
946 |
var html = fv_flowplayer_ad[player_id].html;
|
947 |
html = html.replace( '%random%', Math.random() );
|
@@ -949,40 +962,14 @@ flowplayer(function (api,root) {
|
|
949 |
}
|
950 |
}).bind("finish", function (e, api) {
|
951 |
if( typeof(api.video.index) == "undefined" || api.video.index+1 == api.conf.playlist.length ) {
|
952 |
-
|
953 |
-
root.find('.wpfp_custom_popup').show();
|
954 |
-
root.find('.fp-logo').hide();
|
955 |
-
} else if( typeof(fv_flowplayer_popup) != "undefined" && typeof(fv_flowplayer_popup[player_id]) != "undefined" ) {
|
956 |
-
root.find('.fp-player').append( '<div id="'+player_id+'_custom_popup" class="wpfp_custom_popup">'+fv_flowplayer_popup[player_id].html+'</div>' );
|
957 |
-
root.find('.fp-logo').hide();
|
958 |
-
}
|
959 |
}
|
960 |
-
|
961 |
}).bind("pause", function (e, api) {
|
962 |
-
//
|
963 |
-
|
964 |
-
if(
|
965 |
-
|
966 |
-
|
967 |
-
root.find('.fp-logo').hide();
|
968 |
-
} else if( typeof(fv_flowplayer_popup) != "undefined" && typeof(fv_flowplayer_popup[player_id]) != "undefined" && fv_flowplayer_popup[player_id].html.indexOf('fv-player-ppv-purchase-btn-wrapper') > -1 ) {
|
969 |
-
root.find('.fp-player').append( '<div id="'+player_id+'_custom_popup" class="wpfp_custom_popup">'+fv_flowplayer_popup[player_id].html+'</div>' );
|
970 |
-
root.find('.fp-logo').hide();
|
971 |
-
}
|
972 |
-
}
|
973 |
-
|
974 |
-
}).bind("resume unload", function (e, api) {
|
975 |
-
if( typeof(fv_flowplayer_popup) != "undefined" && typeof(fv_flowplayer_popup[player_id]) != "undefined" ) {
|
976 |
-
root.find('.wpfp_custom_popup').hide();
|
977 |
-
root.find('.fp-logo').show();
|
978 |
-
}
|
979 |
-
}).bind("load", function(e,api) {
|
980 |
-
if( navigator.userAgent.indexOf("Safari") > -1) { // even crazier workaround to make sure the video is visible in Safari Version 7.1 (9537.85.10.17.1)
|
981 |
-
/*root.find('video').css('position','inherit');
|
982 |
-
root.find('video').delay(20).queue( function(next) {
|
983 |
-
jQuery(this).css('position','absolute');
|
984 |
-
next();
|
985 |
-
} );*/
|
986 |
}
|
987 |
});
|
988 |
});
|
@@ -1453,7 +1440,6 @@ if (typeof (flowplayer) !== "undefined" && typeof(fv_flowplayer_conf) != "undefi
|
|
1453 |
if( link.parents('.fvp-share-bar').length == 0 ) fv_autoplay_exec();
|
1454 |
} );
|
1455 |
});
|
1456 |
-
jQuery(window).on('hashchange',fv_autoplay_exec);
|
1457 |
|
1458 |
}
|
1459 |
|
@@ -1689,7 +1675,7 @@ if( typeof(flowplayer) != "undefined" ) { // stop lightbox from playing if it's
|
|
1689 |
}
|
1690 |
|
1691 |
// unstable Android
|
1692 |
-
if(
|
1693 |
fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,'firefox');
|
1694 |
}
|
1695 |
|
@@ -1722,8 +1708,13 @@ if( typeof(flowplayer) != "undefined" ) { // stop lightbox from playing if it's
|
|
1722 |
}
|
1723 |
});
|
1724 |
}
|
1725 |
-
|
1726 |
-
|
|
|
|
|
|
|
|
|
|
|
1727 |
api.on('error', function(e,api,error) {
|
1728 |
fv_player_warning(root,fv_flowplayer_translations.warning_samsungbrowser,'warning_samsungbrowser');
|
1729 |
});
|
@@ -2074,7 +2065,7 @@ if( flowplayer.conf.mobile_force_fullscreen && ( 'ontouchstart' in window ) && f
|
|
2074 |
/*
|
2075 |
* MPEG-DASH and HLS.js ABR changes
|
2076 |
*/
|
2077 |
-
if( localStorage.FVPlayerHLSQuality ) {
|
2078 |
flowplayer.conf.hlsjs.startLevel = localStorage.FVPlayerHLSQuality;
|
2079 |
}
|
2080 |
|
@@ -2090,7 +2081,9 @@ flowplayer( function(api,root) {
|
|
2090 |
if( localStorage.FVPlayerDashQuality ) {
|
2091 |
if( !api.conf.dash ) api.conf.dash = {};
|
2092 |
api.conf.dash.initialVideoQuality = 'restore'; // special flag for Dash.js
|
2093 |
-
}
|
|
|
|
|
2094 |
flowplayer.conf.hlsjs.startLevel = localStorage.FVPlayerHLSQuality;
|
2095 |
}
|
2096 |
|
@@ -2732,7 +2725,7 @@ flowplayer( function(api,root) {
|
|
2732 |
|
2733 |
// HSL engine on iOS and on Safari doesn't report error for HTTP 403. If there is no progress event for 5 second and it's not loading or anything, we can assume that the HLS segment has failed to load
|
2734 |
flowplayer( function(api,root) {
|
2735 |
-
if( !flowplayer.support.browser.safari && !flowplayer.support.iOS
|
2736 |
|
2737 |
root = jQuery(root);
|
2738 |
|
@@ -2745,11 +2738,13 @@ flowplayer( function(api,root) {
|
|
2745 |
});
|
2746 |
|
2747 |
api.on('ready', function() {
|
2748 |
-
|
|
|
|
|
2749 |
|
2750 |
time_delay = new Date().getTime() - time_start;
|
2751 |
|
2752 |
-
console.log('
|
2753 |
|
2754 |
if( time_delay < 500 ) time_delay = 500;
|
2755 |
time_delay = 10 * time_delay;
|
@@ -2767,7 +2762,7 @@ flowplayer( function(api,root) {
|
|
2767 |
function hls_check() {
|
2768 |
if( api.ready && api.playing && !api.loading && !api.finished ) {
|
2769 |
clearInterval(no_progress);
|
2770 |
-
console.log('
|
2771 |
fv_player_notice(root,fv_flowplayer_translations.video_reload+' <a class="fv-player-reload" href="#">↻</a>','progress error unload');
|
2772 |
jQuery('.fv-player-reload').click( function() {
|
2773 |
api.trigger('error', [api, { code: 4, video: api.video }]);
|
27 |
|
28 |
flowplayer.conf = fv_flowplayer_conf;
|
29 |
flowplayer.conf.share = false;
|
30 |
+
|
31 |
+
if( !flowplayer.support.android && flowplayer.conf.dacast_hlsjs ) {
|
32 |
+
function FVAbrController(hls) {
|
33 |
+
this.hls = hls;
|
34 |
+
this.nextAutoLevel = 3;
|
35 |
+
}
|
36 |
|
37 |
+
FVAbrController.prototype.nextAutoLevel = function(nextLevel) {
|
38 |
+
this.nextAutoLevel = nextLevel;
|
39 |
+
}
|
40 |
+
|
41 |
+
FVAbrController.prototype.destroy = function() {
|
42 |
+
EventHandler.prototype.destroy.call(this);
|
43 |
+
}
|
44 |
+
|
45 |
+
flowplayer.conf.hlsjs = {
|
46 |
+
startLevel: -1, // todo: doesn't seem to work, fix it to pick quality matching the player size
|
47 |
+
abrController: FVAbrController
|
48 |
+
}
|
49 |
+
}
|
50 |
|
51 |
flowplayer.support.fvmobile = !!( !flowplayer.support.firstframe || flowplayer.support.iOS || flowplayer.support.android );
|
52 |
|
631 |
|
632 |
jQuery(document).ajaxComplete( function() {
|
633 |
fv_player_load();
|
634 |
+
});
|
635 |
+
|
636 |
+
jQuery(window).on('hashchange',fv_autoplay_exec);
|
637 |
}
|
638 |
|
639 |
|
640 |
function fv_player_load() {
|
641 |
|
642 |
+
jQuery('.flowplayer' ).each( function(i,el) {
|
|
|
643 |
var root = jQuery(el);
|
644 |
var api = root.data('flowplayer');
|
645 |
if( api ) return;
|
646 |
|
647 |
+
if( root.attr('data-item') ) {
|
648 |
+
root.flowplayer( { clip: fv_player_videos_parse(root.attr('data-item'), root) });
|
649 |
+
} else if( playlist = jQuery( '[rel='+root.attr('id')+']' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
if ( playlist.find('a[data-item]').length == 0 ) return; // respect old playlist script setup
|
651 |
|
652 |
+
var items = [];
|
653 |
playlist.find('a[data-item]').each( function() {
|
654 |
+
items.push( fv_player_videos_parse(jQuery(this).attr('data-item'), root) );
|
655 |
});
|
656 |
|
657 |
+
root.flowplayer( { playlist: items } );
|
658 |
}
|
659 |
} );
|
660 |
|
938 |
*/
|
939 |
flowplayer(function (api,root) {
|
940 |
root = jQuery(root);
|
941 |
+
var player_id = root.attr('id');
|
942 |
|
943 |
if( root.data('end_popup_preview') ){
|
944 |
jQuery(document).ready( function() {
|
946 |
});
|
947 |
}
|
948 |
|
949 |
+
function show_popup( event ) {
|
950 |
+
var popup = root.find('.wpfp_custom_popup');
|
951 |
+
if( typeof(fv_flowplayer_popup) != "undefined" && typeof(fv_flowplayer_popup[player_id]) != "undefined" && ( event == 'finish' || fv_flowplayer_popup[player_id].pause || fv_flowplayer_popup[player_id].html.match(/fv-player-ppv-purchase-btn-wrapper/) ) ) {
|
952 |
+
root.addClass('is-popup-showing');
|
953 |
+
root.find('.fp-player').append( '<div id="'+player_id+'_custom_popup" class="wpfp_custom_popup">'+fv_flowplayer_popup[player_id].html+'</div>' );
|
954 |
+
}
|
955 |
+
}
|
956 |
+
|
957 |
+
api.bind("ready", function (e, api) {
|
958 |
if( !root.hasClass('is-cva') && root.find('#'+player_id+'_ad').length == 0 && typeof(fv_flowplayer_ad) != "undefined" && typeof(fv_flowplayer_ad[player_id]) != "undefined" && root.width() >= parseInt(fv_flowplayer_ad[player_id].width) ) {
|
959 |
var html = fv_flowplayer_ad[player_id].html;
|
960 |
html = html.replace( '%random%', Math.random() );
|
962 |
}
|
963 |
}).bind("finish", function (e, api) {
|
964 |
if( typeof(api.video.index) == "undefined" || api.video.index+1 == api.conf.playlist.length ) {
|
965 |
+
show_popup(e.type);
|
|
|
|
|
|
|
|
|
|
|
|
|
966 |
}
|
|
|
967 |
}).bind("pause", function (e, api) {
|
968 |
+
show_popup(e.type); // todo: only if showing on pause is enabled or FV Player PPV
|
969 |
+
}).bind("resume unload seek", function (e, api) {
|
970 |
+
if( root.hasClass('is-popup-showing') ) {
|
971 |
+
root.find('.wpfp_custom_popup').remove();
|
972 |
+
root.removeClass('is-popup-showing');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
973 |
}
|
974 |
});
|
975 |
});
|
1440 |
if( link.parents('.fvp-share-bar').length == 0 ) fv_autoplay_exec();
|
1441 |
} );
|
1442 |
});
|
|
|
1443 |
|
1444 |
}
|
1445 |
|
1675 |
}
|
1676 |
|
1677 |
// unstable Android
|
1678 |
+
if( flowplayer.support.android && flowplayer.support.android.version < 5 && ( flowplayer.support.android.samsung || flowplayer.support.browser.safari ) ){
|
1679 |
fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,'firefox');
|
1680 |
}
|
1681 |
|
1708 |
}
|
1709 |
});
|
1710 |
}
|
1711 |
+
|
1712 |
+
var sup = flowplayer.support;
|
1713 |
+
if( sup.android && (
|
1714 |
+
sup.android.samsung && parseInt(sup.browser.version) < 66 || // Samsung Browser is just old version of Google Chrome!
|
1715 |
+
sup.browser.safari // and in some cases it's detected as Safari
|
1716 |
+
)
|
1717 |
+
) {
|
1718 |
api.on('error', function(e,api,error) {
|
1719 |
fv_player_warning(root,fv_flowplayer_translations.warning_samsungbrowser,'warning_samsungbrowser');
|
1720 |
});
|
2065 |
/*
|
2066 |
* MPEG-DASH and HLS.js ABR changes
|
2067 |
*/
|
2068 |
+
if( localStorage.FVPlayerHLSQuality && typeof(flowplayer.conf.hlsjs.autoLevelEnabled) == "undefined" ) {
|
2069 |
flowplayer.conf.hlsjs.startLevel = localStorage.FVPlayerHLSQuality;
|
2070 |
}
|
2071 |
|
2081 |
if( localStorage.FVPlayerDashQuality ) {
|
2082 |
if( !api.conf.dash ) api.conf.dash = {};
|
2083 |
api.conf.dash.initialVideoQuality = 'restore'; // special flag for Dash.js
|
2084 |
+
}
|
2085 |
+
|
2086 |
+
if( localStorage.FVPlayerHLSQuality && typeof(flowplayer.conf.hlsjs.autoLevelEnabled) == "undefined" ) {
|
2087 |
flowplayer.conf.hlsjs.startLevel = localStorage.FVPlayerHLSQuality;
|
2088 |
}
|
2089 |
|
2725 |
|
2726 |
// HSL engine on iOS and on Safari doesn't report error for HTTP 403. If there is no progress event for 5 second and it's not loading or anything, we can assume that the HLS segment has failed to load
|
2727 |
flowplayer( function(api,root) {
|
2728 |
+
if( !flowplayer.support.browser.safari && !flowplayer.support.iOS ) return;
|
2729 |
|
2730 |
root = jQuery(root);
|
2731 |
|
2738 |
});
|
2739 |
|
2740 |
api.on('ready', function() {
|
2741 |
+
root.find('video').on( "stalled", function(e) {} ); // could be helpful, but just using this event alone is not enough: https://github.com/flowplayer/flowplayer/issues/1403
|
2742 |
+
|
2743 |
+
if( api.engine.engineName == 'html5' ) {
|
2744 |
|
2745 |
time_delay = new Date().getTime() - time_start;
|
2746 |
|
2747 |
+
console.log('Video took '+time_delay+' ms to start');
|
2748 |
|
2749 |
if( time_delay < 500 ) time_delay = 500;
|
2750 |
time_delay = 10 * time_delay;
|
2762 |
function hls_check() {
|
2763 |
if( api.ready && api.playing && !api.loading && !api.finished ) {
|
2764 |
clearInterval(no_progress);
|
2765 |
+
console.log('Video stale for '+time_delay+' ms, triggering error!');
|
2766 |
fv_player_notice(root,fv_flowplayer_translations.video_reload+' <a class="fv-player-reload" href="#">↻</a>','progress error unload');
|
2767 |
jQuery('.fv-player-reload').click( function() {
|
2768 |
api.trigger('error', [api, { code: 4, video: api.video }]);
|
flowplayer/hls.min.js
CHANGED
@@ -1,3 +1,2 @@
|
|
1 |
"undefined"!=typeof window&&function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Hls=e():t.Hls=e()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var a=r[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=29)}([function(t,e,r){"use strict";function i(){}function a(t,e){return e="["+t+"] > "+e}function n(t){var e=c.console[t];return e?function(){for(var r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];i[0]&&(i[0]=a(t,i[0])),e.apply(c.console,i)}:i}function o(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];r.forEach(function(e){d[e]=t[e]?t[e].bind(t):n(e)})}r.d(e,"a",function(){return h}),r.d(e,"b",function(){return f});var s=r(5),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u={trace:i,debug:i,log:i,warn:i,info:i,error:i},d=u,c=Object(s.a)(),h=function(t){if(!0===t||"object"===(void 0===t?"undefined":l(t))){o(t,"debug","log","info","warn","error");try{d.log()}catch(t){d=u}}else d=u},f=d},function(t,e,r){"use strict";var i={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated"
|
1 |
"undefined"!=typeof window&&function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Hls=e():t.Hls=e()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var a=r[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=29)}([function(t,e,r){"use strict";function i(){}function a(t,e){return e="["+t+"] > "+e}function n(t){var e=c.console[t];return e?function(){for(var r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];i[0]&&(i[0]=a(t,i[0])),e.apply(c.console,i)}:i}function o(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];r.forEach(function(e){d[e]=t[e]?t[e].bind(t):n(e)})}r.d(e,"a",function(){return h}),r.d(e,"b",function(){return f});var s=r(5),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u={trace:i,debug:i,log:i,warn:i,info:i,error:i},d=u,c=Object(s.a)(),h=function(t){if(!0===t||"object"===(void 0===t?"undefined":l(t))){o(t,"debug","log","info","warn","error");try{d.log()}catch(t){d=u}}else d=u},f=d},function(t,e,r){"use strict";var i={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated"
|