FV Flowplayer Video Player - Version 6.6.1

Version Description

  • FV Player Pro 0.9.17 and 0.9.17.1 users - make sure you update FV Player Pro before this plugin!
Download this release

Release Info

Developer FolioVision
Plugin Icon 128x128 FV Flowplayer Video Player
Version 6.6.1
Comparing to
See all releases

Code changes from version 6.5.2 to 6.6.1

controller/editor.php CHANGED
@@ -91,8 +91,7 @@ function fv_wp_flowplayer_edit_form_after_editor( ) {
91
 
92
  global $FV_Player_VAST ;
93
  if( isset($FV_Player_VAST ) && $FV_Player_VAST ) {
94
- // todo: there should be a better way than this
95
- add_action('admin_footer', array( $FV_Player_VAST , 'styles' ) );
96
  add_action('admin_footer', array( $FV_Player_VAST , 'func__wp_enqueue_scripts' ) );
97
  }
98
 
91
 
92
  global $FV_Player_VAST ;
93
  if( isset($FV_Player_VAST ) && $FV_Player_VAST ) {
94
+ // todo: there should be a better way than this
 
95
  add_action('admin_footer', array( $FV_Player_VAST , 'func__wp_enqueue_scripts' ) );
96
  }
97
 
css/flowplayer-beta.css CHANGED
@@ -536,7 +536,7 @@
536
  transition: opacity .1s;
537
  filter: alpha(opacity=0);
538
  opacity: 0; }
539
- .flowplayer.fp-ui-shown .fp-ui, .flowplayer.is-paused .fp-ui, .flowplayer.is-mouseover .fp-ui, .flowplayer.is-loading .fp-ui {
540
  /*background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.25)), color-stop(15%, transparent));
541
  background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.25), transparent 15%);
542
  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.25), transparent 15%);*/
536
  transition: opacity .1s;
537
  filter: alpha(opacity=0);
538
  opacity: 0; }
539
+ .flowplayer.fp-ui-shown .fp-ui, .flowplayer.is-mouseover .fp-ui, .flowplayer.is-loading .fp-ui, .is-splash.flowplayer .fp-player .fp-ui, .is-paused.flowplayer .fp-player .fp-ui,#content .is-paused.flowplayer .fp-player .fp-ui,#content .is-splash.flowplayer .fp-player .fp-ui {
540
  /*background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.25)), color-stop(15%, transparent));
541
  background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.25), transparent 15%);
542
  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.25), transparent 15%);*/
css/sitemap-index.xsl ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet version="2.0"
3
+ xmlns:html="http://www.w3.org/TR/REC-html40"
4
+ xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
5
+ sitemap:news="http://www.google.com/schemas/sitemap-news/0.9"
6
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
8
+ <xsl:template match="/">
9
+ <html xmlns="http://www.w3.org/1999/xhtml">
10
+ <head>
11
+ <title>FV Player Video Sitemap - Index</title>
12
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13
+ <style type="text/css">body{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;font-size:13px}#header,#footer{padding:2px;margin:10px;font-size:8pt;color:gray}a{color:black}td{font-size:11px}th{text-align:left;padding-right:30px;font-size:11px}tr.high{background-color:whitesmoke}#footer img{vertical-align:bottom}</style>
14
+ </head>
15
+ <body>
16
+ <h1><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAVCAMAAABrN94UAAAAnFBMVEUAAADCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPGGkHKK07OO1zWXHfabIXefJLnna3rrbvvvsnzztb33uT77/H///8eueH7AAAAJnRSTlMADA8SFRgnLTAzS1pdYGZscnuKkJmcqKuxur3Dz9Lb3uHw8/b5/LxE5h0AAAC4SURBVBgZBcHBcsIgFADA5QFNos60p/7/B/bQcdSCIaG7AAAAEgCx6CeABOm6rRvgr7XniYTrdwUA4+dO4KsCAOUThXqBrcwHwPbxFtSEjwIAlWCB0B8ArBQyLtlS5La7pdehEmS8dv01ZCWNg0wQAEORDSSCE+AcqZY5cBIcAIYaY2IQHADGzA4YBB3AHOYOncIOrUFrwE6wPwEA3m8C9wMAOH+RIN+WdQX01h8DCYAlzAYAAADAP7/SRtpaCbGoAAAAAElFTkSuQmCC" alt="FV Player" title="FV Player" /> FV Player Video Sitemap - Index</h1>
17
+ <div id="header">
18
+
19
+ </div>
20
+ <div id="content">
21
+ <table cellpadding="5">
22
+ <tr class="high">
23
+ <th>#</th>
24
+ <th>XML Sitemap</th>
25
+ <th>Last Changed</th>
26
+ </tr>
27
+ <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
28
+ <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
29
+ <xsl:for-each select="sitemap:sitemapindex/sitemap:sitemap">
30
+ <tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">high</xsl:attribute></xsl:if>
31
+ <td><xsl:value-of select="position()"/></td>
32
+ <td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable>
33
+ <a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a>
34
+ </td>
35
+ <td><xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/></td>
36
+ </tr>
37
+ </xsl:for-each>
38
+ </table>
39
+ </div>
40
+ <div id="footer">
41
+ <p>Generated by <a href="https://foliovision.com/player" title="FV Player">FV Player</a></p>
42
+ </div>
43
+ </body>
44
+ </html>
45
+ </xsl:template>
46
+ </xsl:stylesheet>
css/sitemap-video.xsl ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet version="2.0"
3
+ xmlns:html="http://www.w3.org/TR/html5/"
4
+ xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
5
+ xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"
6
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
8
+
9
+ <xsl:template match="/">
10
+ <html>
11
+ <head>
12
+ <title>FV Player Video Sitemap</title>
13
+ <meta charset="UTF-8" />
14
+ <style type="text/css">
15
+ body {
16
+ font-family: Helvetica, Arial, sans-serif;
17
+ font-size: 12px;
18
+ color: #545353;
19
+ }
20
+ a img {
21
+ border: none;
22
+ }
23
+ table {
24
+ border: none;
25
+ border-collapse: collapse;
26
+ }
27
+ #sitemap tbody tr:nth-child(odd) {
28
+ background-color: #eee;
29
+ }
30
+ #sitemap tbody tr:hover {
31
+ background-color: #ccc;
32
+ }
33
+ #sitemap tbody tr:hover td, #sitemap tbody tr:hover td a {
34
+ color: #000;
35
+ }
36
+ #content {
37
+ margin: 0 auto;
38
+ width: 1000px;
39
+ }
40
+ p.expl {
41
+ margin: 10px 0px;
42
+ line-height: 1.3em;
43
+ }
44
+ p.expl a {
45
+ color: #da3114;
46
+ }
47
+ a {
48
+ color: #000;
49
+ text-decoration: none;
50
+ }
51
+ a:visited {
52
+ color: #777;
53
+ }
54
+ a:hover {
55
+ text-decoration: underline;
56
+ }
57
+ td {
58
+ font-size:11px;
59
+ padding: 5px 15px 5px 0;
60
+ vertical-align: top;
61
+ }
62
+ td img {
63
+ padding: 0 5px;
64
+ }
65
+ th {
66
+ text-align:left;
67
+ padding-right:30px;
68
+ font-size:11px;
69
+ }
70
+ thead th {
71
+ border-bottom: 1px solid #000;
72
+ }
73
+ </style>
74
+ </head>
75
+ <body>
76
+ <div id="content">
77
+ <h1>FV Player Video Sitemap</h1>
78
+ <p class="expl">
79
+ This sitemap contains <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> URLs.
80
+ </p>
81
+ <div class="content">
82
+ <table id="sitemap">
83
+ <thead>
84
+ <tr>
85
+ <th width="10%">Video</th>
86
+ <th width="20%">Title</th>
87
+ <th width="25%">Description</th>
88
+ <th width="10%">Category</th>
89
+ <th width="15%">Pub Date</th>
90
+ </tr>
91
+ </thead>
92
+ <tbody>
93
+ <xsl:for-each select="sitemap:urlset/sitemap:url">
94
+ <tr>
95
+ <xsl:if test="position() mod 2 = 1">
96
+ <xsl:attribute name="class">odd</xsl:attribute>
97
+ </xsl:if>
98
+
99
+ <td>
100
+ <xsl:variable name="thumbURL">
101
+ <xsl:value-of select="video:video/video:thumbnail_loc"/>
102
+ </xsl:variable>
103
+
104
+ <xsl:variable name="flvURL">
105
+ <xsl:value-of select="video:video/video:player_loc"/>
106
+ </xsl:variable>
107
+
108
+ <img src="{$thumbURL}" width="100" />
109
+ </td>
110
+
111
+ <td>
112
+ <xsl:variable name="itemURL">
113
+ <xsl:value-of select="sitemap:loc"/>
114
+ </xsl:variable>
115
+ <a href="{$itemURL}">
116
+ <strong><xsl:value-of disable-output-escaping="yes" select="video:video/video:title"/></strong>
117
+ </a>
118
+ </td>
119
+
120
+ <td>
121
+ <xsl:variable name="desc">
122
+ <xsl:value-of disable-output-escaping="yes" select="video:video/video:description"/>
123
+ </xsl:variable>
124
+ <xsl:choose>
125
+ <xsl:when test="string-length($desc) &lt; 200">
126
+ <xsl:value-of select="$desc"/>
127
+ </xsl:when>
128
+ <xsl:otherwise>
129
+ <xsl:value-of select="concat(substring($desc,1,200),' ...')"/>
130
+ </xsl:otherwise>
131
+ </xsl:choose>
132
+ </td>
133
+
134
+ <td>
135
+ <xsl:value-of select="video:video/video:category"/>
136
+ </td>
137
+
138
+ <td>
139
+ <xsl:value-of select="concat(substring(video:video/video:publication_date,0,11),concat(' ', substring(video:video/video:publication_date,12,5)))"/>
140
+ </td>
141
+ </tr>
142
+ </xsl:for-each>
143
+ </tbody>
144
+ </table>
145
+ </div>
146
+
147
+ </div>
148
+ </body>
149
+ </html>
150
+ </xsl:template>
151
+
152
+ </xsl:stylesheet>
flowplayer-beta/embed.min.js CHANGED
@@ -1 +1 @@
1
- !function n(e,t,r){function o(u,c){if(!t[u]){if(!e[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var a=t[u]={exports:{}};e[u][0].call(a.exports,function(n){var t=e[u][1][n];return o(t?t:n)},a,a.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,e,t){function r(n,e){"use strict";var t=n.common.createElement("div");t.setAttribute("data-origin",e.e.href),e.e.parentNode.replaceChild(t,e.e),e.c.e=1,e.c.swf=e.c.swf||p,e.c.swfHls=e.c.swfHls||m,n(t,e.c)}function o(n){"use strict";return"function"==typeof window.requirejs?n():void a("https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.16/require.min.js",n)}function i(n,e){"use strict";o(function(){requirejs([n],e)})}function u(n){"use strict";var e=n.common.createElement("div",{className:"flowplayer"});return e.style.display="none",document.body.appendChild(e),e}function c(n){"use strict";var e=u(n),t=0===window.getComputedStyle(e).getPropertyValue("counter-increment").indexOf("flowplayer");return n.common.removeNode(e),t}function f(n,e){"use strict";return c(n)?e(n):(document.head.appendChild(n.common.createElement("link",{rel:"stylesheet",href:h})),void e(n))}var s=window._fpes,a=n("scriptjs"),l="//releases.flowplayer.org/7.2.4/commercial",d=l+"/flowplayer.min.js",p=l+"/flowplayer.swf",m=l+"/flowplayerhls.swf",h=l+"/skin/functional.css";s.forEach(function(n){"use strict";i(n.l||d,function(e){f(e,function(e){r(e,n)})})})},{scriptjs:2}],2:[function(n,e,t){!function(n,t){"undefined"!=typeof e&&e.exports?e.exports=t():"function"==typeof define&&define.amd?define(t):this[n]=t()}("$script",function(){function n(n,e){for(var t=0,r=n.length;r>t;++t)if(!e(n[t]))return f;return 1}function e(e,t){n(e,function(n){return!t(n)})}function t(i,u,c){function f(n){return n.call?n():d[n]}function a(){if(!--w){d[y]=1,v&&v();for(var t in m)n(t.split("|"),f)&&!e(m[t],f)&&(m[t]=[])}}i=i[s]?i:[i];var l=u&&u.call,v=l?u:c,y=l?i.join(""):u,w=i.length;return setTimeout(function(){e(i,function n(e,t){return null===e?a():(t||/^https?:\/\//.test(e)||!o||(e=-1===e.indexOf(".js")?o+e+".js":o+e),h[e]?(y&&(p[y]=1),2==h[e]?a():setTimeout(function(){n(e,!0)},0)):(h[e]=1,y&&(p[y]=1),void r(e,a)))})},0),t}function r(n,e){var t,r=u.createElement("script");r.onload=r.onerror=r[l]=function(){r[a]&&!/^c|loade/.test(r[a])||t||(r.onload=r[l]=null,t=1,h[n]=2,e())},r.async=1,r.src=i?n+(-1===n.indexOf("?")?"?":"&")+i:n,c.insertBefore(r,c.lastChild)}var o,i,u=document,c=u.getElementsByTagName("head")[0],f=!1,s="push",a="readyState",l="onreadystatechange",d={},p={},m={},h={};return t.get=r,t.order=function(n,e,r){!function o(i){i=n.shift(),n.length?t(i,o):t(i,e,r)}()},t.path=function(n){o=n},t.urlArgs=function(n){i=n},t.ready=function(r,o,i){r=r[s]?r:[r];var u=[];return!e(r,function(n){d[n]||u[s](n)})&&n(r,function(n){return d[n]})?o():!function(n){m[n]=m[n]||[],m[n][s](o),i&&i(u)}(r.join("|")),t},t.done=function(n){t([null],n)},t})},{}]},{},[1]);
1
+ !function n(e,t,r){function o(u,c){if(!t[u]){if(!e[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var a=t[u]={exports:{}};e[u][0].call(a.exports,function(n){var t=e[u][1][n];return o(t?t:n)},a,a.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,e,t){function r(n,e){"use strict";var t=n.common.createElement("div");t.setAttribute("data-origin",e.e.href),e.e.parentNode.replaceChild(t,e.e),e.c.e=1,e.c.swf=e.c.swf||p,e.c.swfHls=e.c.swfHls||m,n(t,e.c)}function o(n){"use strict";return"function"==typeof window.requirejs?n():void a("https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.16/require.min.js",n)}function i(n,e){"use strict";o(function(){requirejs([n],e)})}function u(n){"use strict";var e=n.common.createElement("div",{className:"flowplayer"});return e.style.display="none",document.body.appendChild(e),e}function c(n){"use strict";var e=u(n),t=0===window.getComputedStyle(e).getPropertyValue("counter-increment").indexOf("flowplayer");return n.common.removeNode(e),t}function f(n,e){"use strict";return c(n)?e(n):(document.head.appendChild(n.common.createElement("link",{rel:"stylesheet",href:h})),void e(n))}var s=window._fpes,a=n("scriptjs"),l="//releases.flowplayer.org/7.2.6/commercial",d=l+"/flowplayer.min.js",p=l+"/flowplayer.swf",m=l+"/flowplayerhls.swf",h=l+"/skin/functional.css";s.forEach(function(n){"use strict";i(n.l||d,function(e){f(e,function(e){r(e,n)})})})},{scriptjs:2}],2:[function(n,e,t){!function(n,t){"undefined"!=typeof e&&e.exports?e.exports=t():"function"==typeof define&&define.amd?define(t):this[n]=t()}("$script",function(){function n(n,e){for(var t=0,r=n.length;r>t;++t)if(!e(n[t]))return f;return 1}function e(e,t){n(e,function(n){return!t(n)})}function t(i,u,c){function f(n){return n.call?n():d[n]}function a(){if(!--w){d[y]=1,v&&v();for(var t in m)n(t.split("|"),f)&&!e(m[t],f)&&(m[t]=[])}}i=i[s]?i:[i];var l=u&&u.call,v=l?u:c,y=l?i.join(""):u,w=i.length;return setTimeout(function(){e(i,function n(e,t){return null===e?a():(t||/^https?:\/\//.test(e)||!o||(e=-1===e.indexOf(".js")?o+e+".js":o+e),h[e]?(y&&(p[y]=1),2==h[e]?a():setTimeout(function(){n(e,!0)},0)):(h[e]=1,y&&(p[y]=1),void r(e,a)))})},0),t}function r(n,e){var t,r=u.createElement("script");r.onload=r.onerror=r[l]=function(){r[a]&&!/^c|loade/.test(r[a])||t||(r.onload=r[l]=null,t=1,h[n]=2,e())},r.async=1,r.src=i?n+(-1===n.indexOf("?")?"?":"&")+i:n,c.insertBefore(r,c.lastChild)}var o,i,u=document,c=u.getElementsByTagName("head")[0],f=!1,s="push",a="readyState",l="onreadystatechange",d={},p={},m={},h={};return t.get=r,t.order=function(n,e,r){!function o(i){i=n.shift(),n.length?t(i,o):t(i,e,r)}()},t.path=function(n){o=n},t.urlArgs=function(n){i=n},t.ready=function(r,o,i){r=r[s]?r:[r];var u=[];return!e(r,function(n){d[n]||u[s](n)})&&n(r,function(n){return d[n]})?o():!function(n){m[n]=m[n]||[],m[n][s](o),i&&i(u)}(r.join("|")),t},t.done=function(n){t([null],n)},t})},{}]},{},[1]);
flowplayer-beta/flowplayer.dashjs.min.js CHANGED
@@ -1,41 +1,625 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /*!
2
 
3
- MPEG-DASH engine plugin for Flowplayer HTML5
4
 
5
- Copyright (c) 2015-2016, Flowplayer Oy
6
 
7
  Released under the MIT License:
8
  http://www.opensource.org/licenses/mit-license.php
9
 
10
- Includes hls.js
11
- Copyright (c) 2015 Dailymotion (http://www.dailymotion.com)
12
- https://github.com/dailymotion/hls.js/blob/master/LICENSE
13
-
14
- Includes es5.js
15
- https://github.com/inexorabletash/polyfill/blob/master/es5.js
16
- for compatibility with legacy browsers
17
 
18
  Requires Flowplayer HTML5 version 6.x
19
- v1.0.0-8-g70e6eb8
20
 
21
  */
22
- /*@cc_on @*/
23
- /*@
24
- @if (@_jscript_version > 10)
25
- @*/
26
- !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(188)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n,r){var i=o(r);!i[e]&&t&&(i[e]={instance:t,override:n})}function t(e,t){for(var n in l){var r=l[n];if(r.context===e&&r.name===t)return r.instance}return null}function n(e,t,n){for(var r in l){var i=l[r];if(i.context===e&&i.name===t)return void(l[r].instance=n)}l.push({name:t,context:e,instance:n})}function r(e){return function(t){return void 0===t&&(t={}),{create:function(){return a(e.__dashjs_factory_name,e.apply({context:t},arguments),t,arguments)}}}}function i(e){return function(n){var r=void 0;return void 0===n&&(n={}),{getInstance:function(){return r||(r=t(n,e.__dashjs_factory_name)),r||(r=a(e.__dashjs_factory_name,e.apply({context:n},arguments),n,arguments),l.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}}}function a(e,t,n,r){var i=o(n),a=i[e];if(a){var u=a.instance;if(!a.override)return u.apply({context:n,factory:s},r);u=u.apply({context:n,factory:s,parent:t},r);for(var l in u)t.hasOwnProperty(l)&&(t[l]=u[l])}return t}function o(e){var t=void 0;return u.forEach(function(n){n===e&&(t=n)}),t||(t=u.push(e)),t}var s=void 0,u=[],l=[];return s={extend:e,getSingletonInstance:t,setSingletonInstance:n,getSingletonFactory:i,getClassFactory:r}}();t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(75),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t,n){var i=arguments.length<=3||void 0===arguments[3]?s:arguments[3];if(!e)throw new Error("event type cannot be null or undefined");if(!t||"function"!=typeof t)throw new Error("listener must be a function: "+t);if(!(r(e,t,n)>=0)){a[e]=a[e]||[];var o={callback:t,scope:n,priority:i},u=a[e].some(function(t,n){if(i>t.priority)return a[e].splice(n,0,o),!0});u||a[e].push(o)}}function t(e,t,n){if(e&&t&&a[e]){var i=r(e,t,n);i<0||a[e].splice(i,1)}}function n(e,t){if(e&&a[e]){if(t=t||{},t.hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");t.type=e,a[e].forEach(function(e){return e.callback.call(e.scope,t)})}}function r(e,t,n){var r=-1;return a[e]?(a[e].some(function(e,i){if(e.callback===t&&(!n||n===e.scope))return r=i,!0}),r):r}function i(){a={}}var a={},o={on:e,off:t,trigger:n,reset:i};return o}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=0,u=5e3;i.__dashjs_factory_name="EventBus";var l=o["default"].getSingletonFactory(i);l.EVENT_PRIORITY_LOW=s,l.EVENT_PRIORITY_HIGH=u,t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){f=!0,d=!0,c=(new Date).getTime()}function t(e){d=e}function n(e){f=e}function r(){return f}function i(){var e="",t=null;d&&(t=(new Date).getTime(),e+="["+(t-c)+"]"),e.length>0&&(e+=" "),Array.apply(null,arguments).forEach(function(t){e+=t+" "}),f&&console.log(e),s.trigger(u["default"].LOG,{message:e})}var a=this.context,s=(0,o["default"])(a).getInstance(),l=void 0,f=void 0,d=void 0,c=void 0;return l={log:i,setLogTimestampVisible:t,setLogToBrowserConsole:n,getLogToBrowserConsole:r},e(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="Debug",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){function e(){var e,t;Re=[],Ie=!1,Se=!0,be=!0,He=!1,Ye=!1,Oe={enabled:!0,ttl:d},Pe={enabled:!0,ttl:c},Ae=f,Me=void 0,Ce=h,De=v,we=NaN,Ne=y,Le=E,xe=T,Fe=S,Ue=g,Be=p,Ke=D,qe=O,e={},i(e,u.HTTPRequest.MPD_TYPE,A),i(e,u.HTTPRequest.XLINK_EXPANSION_TYPE,b),i(e,u.HTTPRequest.MEDIA_SEGMENT_TYPE,I),i(e,u.HTTPRequest.INIT_SEGMENT_TYPE,I),i(e,u.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,I),i(e,u.HTTPRequest.INDEX_SEGMENT_TYPE,I),i(e,u.HTTPRequest.OTHER_TYPE,I),ke=e,t={},i(t,u.HTTPRequest.MPD_TYPE,M),i(t,u.HTTPRequest.XLINK_EXPANSION_TYPE,C),i(t,u.HTTPRequest.MEDIA_SEGMENT_TYPE,R),i(t,u.HTTPRequest.INIT_SEGMENT_TYPE,R),i(t,u.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,R),i(t,u.HTTPRequest.INDEX_SEGMENT_TYPE,R),i(t,u.HTTPRequest.OTHER_TYPE,R),je=t}function t(e){He=e}function n(){return He}function r(e){Ue=e}function a(){return Ue}function o(e){Be=e}function s(){return Be}function l(e){we=e}function P(){return isNaN(we)?Ye?_:m:we}function w(e){Ne=e}function N(){return Ne}function L(e){Le=e}function x(){return Le}function F(e){xe=e}function U(){return xe}function B(e){Fe=e}function k(){return Fe}function j(e){Ce=e}function K(){return Ce}function H(e,t){Oe.enabled=e,void 0===t||isNaN(t)||"number"!=typeof t||(Oe.ttl=t)}function q(){return Oe}function Y(e,t){Pe.enabled=e,void 0===t||isNaN(t)||"number"!=typeof t||(Pe.ttl=t)}function G(){return Pe}function V(e){De=e}function z(){return De}function W(e){ke[u.HTTPRequest.MEDIA_SEGMENT_TYPE]=e}function Q(e,t){ke[e]=t}function X(){return ke[u.HTTPRequest.MEDIA_SEGMENT_TYPE]}function Z(e){return ke[e]}function J(e){je[u.HTTPRequest.MEDIA_SEGMENT_TYPE]=e}function $(e,t){je[e]=t}function ee(){return je[u.HTTPRequest.MEDIA_SEGMENT_TYPE]}function te(e){return je[e]}function ne(e){Ke=e}function re(){return Ke}function ie(e){be=e}function ae(){return be}function oe(e){Ae=e}function se(e){Me=e}function ue(){return Ae}function le(){return Me}function fe(e){Se=e}function de(){return Se}function ce(e){Ie=e}function ge(){return Ie}function pe(e){Re=e}function he(){return Re}function ve(e){qe=!!e}function me(){return qe}function _e(){return Ye}function ye(e){Ye=e}function Ee(){}var Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0,De=void 0,Oe=void 0,Pe=void 0,we=void 0,Ne=void 0,Le=void 0,xe=void 0,Fe=void 0,Ue=void 0,Be=void 0,ke=void 0,je=void 0,Ke=void 0,He=void 0,qe=void 0,Ye=void 0;return Te={setBufferOccupancyABREnabled:t,getBufferOccupancyABREnabled:n,setBandwidthSafetyFactor:r,getBandwidthSafetyFactor:a,setAbandonLoadTimeout:o,getAbandonLoadTimeout:s,setLastBitrateCachingInfo:H,getLastBitrateCachingInfo:q,setLastMediaSettingsCachingInfo:Y,getLastMediaSettingsCachingInfo:G,setStableBufferTime:l,getStableBufferTime:P,setBufferTimeAtTopQuality:w,getBufferTimeAtTopQuality:N,setBufferTimeAtTopQualityLongForm:L,getBufferTimeAtTopQualityLongForm:x,setLongFormContentDurationThreshold:F,getLongFormContentDurationThreshold:U,setRichBufferThreshold:B,getRichBufferThreshold:k,setBufferToKeep:j,getBufferToKeep:K,setBufferPruningInterval:V,getBufferPruningInterval:z,setFragmentRetryAttempts:W,getFragmentRetryAttempts:X,setRetryAttemptsForType:Q,getRetryAttemptsForType:Z,setFragmentRetryInterval:J,getFragmentRetryInterval:ee,setRetryIntervalForType:$,getRetryIntervalForType:te,setWallclockTimeUpdateInterval:ne,getWallclockTimeUpdateInterval:re,setScheduleWhilePaused:ie,getScheduleWhilePaused:ae,getUseSuggestedPresentationDelay:ge,setUseSuggestedPresentationDelay:ce,setLiveDelayFragmentCount:oe,getLiveDelayFragmentCount:ue,getLiveDelay:le,setLiveDelay:se,setUseManifestDateHeaderTimeSource:fe,getUseManifestDateHeaderTimeSource:de,setUTCTimingSources:pe,getUTCTimingSources:he,setXHRWithCredentials:ve,getXHRWithCredentials:me,setFastSwitchEnabled:ye,getFastSwitchEnabled:_e,reset:Ee},e(),Te}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),s=r(o),u=n(7),l={scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"http://time.akamai.com/?iso"},f=4,d=36e4,c=36e4,g=.9,p=1e4,h=30,v=30,m=12,_=20,y=30,E=60,T=600,S=20,I=3,R=1e3,A=3,M=500,b=1,C=500,D=50,O=!1;a.__dashjs_factory_name="MediaPlayerModel";var P=s["default"].getSingletonFactory(a);P.DEFAULT_UTC_TIMING_SOURCE=l,t["default"]=P,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t,r){n(this,i),this.code=e||null,this.message=t||null,this.data=r||null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function a(){n(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},i=function o(){n(this,o),this.s=null,this.d=null,this.b=[]};r.MPD_TYPE="MPD",r.XLINK_EXPANSION_TYPE="XLinkExpansion",r.INIT_SEGMENT_TYPE="InitializationSegment",r.INDEX_SEGMENT_TYPE="IndexSegment",r.MEDIA_SEGMENT_TYPE="MediaSegment",r.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",r.OTHER_TYPE="other",t.HTTPRequest=r,t.HTTPRequestTrace=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){var r=void 0===e?s:e,i=void 0===t?u:t,a=void 0===n?null:n,o={value:r,priority:i,reason:a};return o}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=999,u=.5,l=1,f=0;i.__dashjs_factory_name="SwitchRequest";var d=o["default"].getClassFactory(i);d.NO_CHANGE=s,d.DEFAULT=u,d.STRONG=l,d.WEAK=f,t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){ce=0,ge=NaN,pe=null,me=null,ye=!1,he={},_e=(0,f["default"])($).getInstance()}function t(e){ve=e,re=de.getElement(),Z(),me=ve.manifestInfo.isDynamic,ge=ve.start,te.on(p["default"].DATA_UPDATE_COMPLETED,L,this),te.on(p["default"].LIVE_EDGE_SEARCH_COMPLETED,x,this),te.on(p["default"].BYTES_APPENDED,Q,this),te.on(p["default"].BUFFER_LEVEL_STATE_CHANGED,X,this),te.on(p["default"].PERIOD_SWITCH_STARTED,n,this),ye&&(ye=!1,l())}function n(e){e.fromStreamInfo&&he[e.fromStreamInfo.id]&&delete he[e.fromStreamInfo.id]}function r(){return C(!0)+ve.duration-m()}function i(){return m()>0}function a(){return ve.id}function s(){return ve.duration}function l(){if(re){re.autoplay=!0;var e=re.play();e&&"undefined"!=typeof Promise&&e instanceof Promise&&e["catch"](function(e){"NotAllowedError"===e.name&&te.trigger(p["default"].PLAYBACK_NOT_ALLOWED),ee("Caught pending play exception - continuing ("+e+")")})}else ye=!0}function d(){if(re)return re.paused}function g(){re&&(re.pause(),re.autoplay=!1)}function h(){if(re)return re.seeking}function v(e){de&&(ee("Requesting seek to time: "+e),de.setCurrentTime(e))}function m(){if(re)return re.currentTime}function y(){if(re)return re.playbackRate}function E(){if(re)return re.played}function T(){if(re)return re.ended}function S(){return me}function I(e){ge=e}function R(){return ge}function A(e,t){var n=le.getMpd(ue.getValue()),r=void 0,i=10;r=_e.getUseSuggestedPresentationDelay()&&n.hasOwnProperty("suggestedPresentationDelay")?n.suggestedPresentationDelay:_e.getLiveDelay()?_e.getLiveDelay():isNaN(e)?2*ve.manifestInfo.minBufferTime:e*_e.getLiveDelayFragmentCount();var a=Math.max(t-i,t/2);return Math.min(r,a)}function M(){de&&re&&(te.off(p["default"].DATA_UPDATE_COMPLETED,L,this),te.off(p["default"].BUFFER_LEVEL_STATE_CHANGED,X,this),te.off(p["default"].LIVE_EDGE_SEARCH_COMPLETED,x,this),te.off(p["default"].BYTES_APPENDED,Q,this),P(),J()),de=null,ve=null,re=null,me=null,e()}function b(e){e&&(e.streamController&&(ie=e.streamController),e.timelineConverter&&(ae=e.timelineConverter),e.metricsModel&&(oe=e.metricsModel),e.dashMetrics&&(se=e.dashMetrics),e.manifestModel&&(ue=e.manifestModel),e.dashManifestModel&&(le=e.dashManifestModel),e.adapter&&(fe=e.adapter),e.videoModel&&(de=e.videoModel))}function C(e){var t=void 0,n=(0,u["default"])($).getInstance().getURIFragmentData(),r=parseInt(n.s,10),i=parseInt(n.t,10),a=NaN;if(e||(a=isNaN(r)?i:r),me)!isNaN(a)&&a>1262304e3&&(t=a-ve.manifestInfo.availableFrom.getTime()/1e3,(t>ge||t<ge-ve.manifestInfo.DVRWindowSize)&&(t=null)),t=t||ge;else if(!isNaN(a)&&a<Math.max(ve.manifestInfo.duration,ve.duration)&&a>=0)t=a;else{var o=he[ve.id];void 0===o&&(o=ie.getActiveStreamCommonEarliestTime()),t=Math.max(o,ve.start)}return t}function D(e){var t,n=oe.getReadOnlyMetricsFor("video")||oe.getReadOnlyMetricsFor("audio"),r=se.getCurrentDVRInfo(n),i=r?r.range:null;return i?e>=i.start&&e<=i.end?e:t=Math.max(i.end-2*ve.manifestInfo.minBufferTime,i.start):NaN}function O(){if(null===pe){var e=function(){W()};pe=setInterval(e,_e.getWallclockTimeUpdateInterval())}}function P(){clearInterval(pe),pe=null}function w(){var e=C(!1);e>0&&(v(e),ee("Starting playback at offset: "+e))}function N(){if(!d()&&me&&0!==re.readyState){var e=m(),t=D(e),n=!isNaN(t)&&t!==e;n&&v(t)}}function L(e){if(!e.error){var t=fe.convertDataToTrack(ue.getValue(),e.currentRepresentation),n=t.mediaInfo.streamInfo;ve.id===n.id&&(ve=n,N())}}function x(e){e.error||0===re.readyState||w()}function F(){te.trigger(p["default"].CAN_PLAY)}function U(){ee("Native video element event: play"),N(),O(),te.trigger(p["default"].PLAYBACK_STARTED,{startTime:m()})}function B(){ee("Native video element event: playing"),te.trigger(p["default"].PLAYBACK_PLAYING,{playingTime:m()})}function k(){ee("Native video element event: pause"),te.trigger(p["default"].PLAYBACK_PAUSED,{ended:T()})}function j(){var e=m();ee("Seeking to: "+e),O(),te.trigger(p["default"].PLAYBACK_SEEKING,{seekTime:e})}function K(){ee("Native video element event: seeked"),te.trigger(p["default"].PLAYBACK_SEEKED)}function H(){var e=m();e!==ce&&(ce=e,te.trigger(p["default"].PLAYBACK_TIME_UPDATED,{timeToEnd:r(),time:e}))}function q(){te.trigger(p["default"].PLAYBACK_PROGRESS)}function Y(){var e=y();ee("Native video element event: ratechange: ",e),te.trigger(p["default"].PLAYBACK_RATE_CHANGED,{playbackRate:e})}function G(){ee("Native video element event: loadedmetadata"),(!me&&ve.isFirst||ae.isTimeSyncCompleted())&&w(),te.trigger(p["default"].PLAYBACK_METADATA_LOADED),O()}function V(){ee("Native video element event: ended"),g(),P(),te.trigger(p["default"].PLAYBACK_ENDED)}function z(e){var t=e.target||e.srcElement;te.trigger(p["default"].PLAYBACK_ERROR,{error:t.error})}function W(){te.trigger(p["default"].WALLCLOCK_TIME_UPDATED,{isDynamic:me,time:new Date})}function Q(e){var t=e.bufferedRanges;if(t&&t.length){var n=Math.max(t.start(0),ve.start),r=void 0===he[ve.id]?n:Math.max(he[ve.id],n);r!==he[ve.id]&&(!me&&C(!0)<r&&m()<r&&v(r),he[ve.id]=r)}}function X(e){e.streamInfo.id===ve.id&&de.setStallState(e.mediaType,e.state===o["default"].BUFFER_EMPTY)}function Z(){re.addEventListener("canplay",F),re.addEventListener("play",U),re.addEventListener("playing",B),re.addEventListener("pause",k),re.addEventListener("error",z),re.addEventListener("seeking",j),re.addEventListener("seeked",K),re.addEventListener("timeupdate",H),re.addEventListener("progress",q),re.addEventListener("ratechange",Y),re.addEventListener("loadedmetadata",G),re.addEventListener("ended",V)}function J(){re.removeEventListener("canplay",F),re.removeEventListener("play",U),re.removeEventListener("playing",B),re.removeEventListener("pause",k),re.removeEventListener("error",z),re.removeEventListener("seeking",j),re.removeEventListener("seeked",K),re.removeEventListener("timeupdate",H),re.removeEventListener("progress",q),re.removeEventListener("ratechange",Y),re.removeEventListener("loadedmetadata",G),re.removeEventListener("ended",V)}var $=this.context,ee=(0,_["default"])($).getInstance().log,te=(0,c["default"])($).getInstance(),ne=void 0,re=void 0,ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0;return ne={initialize:t,setConfig:b,getStreamStartTime:C,getTimeToStreamEnd:r,isPlaybackStarted:i,getStreamId:a,getStreamDuration:s,getTime:m,getPlaybackRate:y,getPlayedRanges:E,getEnded:T,getIsDynamic:S,setLiveStartTime:I,getLiveStartTime:R,computeLiveDelay:A,play:l,isPaused:d,pause:g,isSeeking:h,seek:v,reset:M},e(),ne}Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),o=r(a),s=n(40),u=r(s),l=n(5),f=r(l),d=n(3),c=r(d),g=n(2),p=r(g),h=n(1),v=r(h),m=n(4),_=r(m);i.__dashjs_factory_name="PlaybackController",t["default"]=v["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){ue={video:!0,audio:!0},le={},fe={},de={},ce={},ge={},pe={},ve={},he={},_e=!1,ye=!1,Re=(0,d["default"])(ne).getInstance(),Ie=(0,h["default"])(ne).getInstance(),Ee=(0,A["default"])(ne).getInstance(),Te=(0,b["default"])(ne).getInstance(),Se=(0,D["default"])(ne).getInstance()}function t(e,t){he[e]=t,ve[e]=ve[e]||{},ve[e].state=P,re.on(T["default"].LOADING_PROGRESS,te,this)}function n(e){e&&(e.abrRulesCollection&&(ae=e.abrRulesCollection),e.rulesController&&(oe=e.rulesController),e.streamController&&(se=e.streamController))}function r(e,t){var n;return le[t]=le[t]||{},le[t].hasOwnProperty(e)||(le[t][e]=0),n=J(le[t][e],e),n=$(n,e,le[t][e]),n=ee(n,e)}function i(e){var t=Re.getSavedBitrateSettings(e);if(!ce.hasOwnProperty(e))if(ge.hasOwnProperty(e)){var n=Ee.getValue(),r=Te.getAdaptationForType(n,0,e).Representation;if(Array.isArray(r)){var i=Math.max(Math.round(r.length*ge[e])-1,0);ce[e]=r[i].bandwidth}else ce[e]=0}else isNaN(t)?ce[e]="video"===e?w:N:ce[e]=t;return ce[e]}function o(e,t){ce[e]=t}function u(e){return ge.hasOwnProperty(e)?ge[e]:null}function f(e,t){ge[e]=t}function c(e){return ce.hasOwnProperty("max")&&ce.max.hasOwnProperty(e)?ce.max[e]:NaN}function p(e,t){ce.max=ce.max||{},ce.max[e]=t}function v(e){return ge.hasOwnProperty("max")&&ge.max.hasOwnProperty(e)?ge.max[e]:1}function _(e,t){ge.max=ge.max||{},ge.max[e]=t}function E(e){return ue[e]}function S(e,t){ue[e]=t}function I(){return _e}function R(e){_e=e}function M(){return ye}function C(e){ye=e}function x(e,t){var n=e.getType(),i=e.getStreamInfo(),a=i.id,o=function(e){var o=r(n,a),s=e.value;s<0&&(s=0),s>o&&(s=o);var u=z(n,i);s!==u&&(ve[n].state===P||s>u)&&(X(n,a,e.confidence),U(n,i,u,s,e.reason)),t&&t()};if(E(n)){var u=ae.getRules(g["default"].QUALITY_SWITCH_RULES);oe.applyRules(u,e,o,z(n,i),function(e,t){return e=e===s["default"].NO_CHANGE?0:e,Math.max(e,t)})}else t&&t()}function F(e,t,n,i){var a=t.id,o=z(e,t),s=null!==n&&!isNaN(n)&&n%1===0;if(!s)throw new Error("argument is not an integer");n!==o&&n>=0&&n<=r(e,a)&&U(e,t,o,n,i)}function U(e,t,n,r,i){W(e,t.id,r),re.trigger(T["default"].QUALITY_CHANGE_REQUESTED,{mediaType:e,streamInfo:t,oldQuality:n,newQuality:r,reason:i})}function B(e,t){ve[e].state=t}function k(e){return ve[e].state}function j(e,t){var n=K(e);if(!n||0===n.length)return L;for(var r=n.length-1;r>=0;r--){var i=n[r];if(1e3*t>=i.bitrate)return r}return 0}function K(e){if(!e||!e.bitrateList)return null;for(var t,n=e.bitrateList,r=e.type,i=[],a=0,o=n.length;a<o;a++)t=new l["default"],t.mediaType=r,t.qualityIndex=a,t.bitrate=n[a].bandwidth,t.width=n[a].width,t.height=n[a].height,i.push(t);return i}function H(e,t){pe[e]=t}function q(e){return pe[e]}function Y(e){var t=e.type,n=e.streamInfo.id,r=e.representationCount-1;return Z(t,n,r),r}function G(e){var t,n=e.id,i=z("audio",e),a=z("video",e);return t=i===r("audio",n)&&a===r("video",n)}function V(){re.off(T["default"].LOADING_PROGRESS,te,this),clearTimeout(me),me=null,e()}function z(e,t){var n,r=t.id;return fe[r]=fe[r]||{},fe[r].hasOwnProperty(e)||(fe[r][e]=L),n=fe[r][e]}function W(e,t,n){fe[t]=fe[t]||{},fe[t][e]=n}function Q(e,t){var n;return de[t]=de[t]||{},de[t].hasOwnProperty(e)||(de[t][e]=0),n=de[t][e]}function X(e,t,n){de[t]=de[t]||{},de[t][e]=n}function Z(e,t,n){le[t]=le[t]||{},le[t][e]=n}function J(e,t){var n=c(t);if(isNaN(n)||!he[t])return e;var r=j(he[t].getMediaInfo(),n);return Math.min(e,r)}function $(e,t,n){var r=v(t);return isNaN(r)||r>=1||r<0?e:Math.min(e,Math.round(n*r))}function ee(e,t){if("video"!==t||!_e||!he[t])return e;var n=ye&&window.hasOwnProperty("devicePixelRatio"),r=n?window.devicePixelRatio:1,i=Se.getElement(),a=i.clientWidth*r,o=i.clientHeight*r,s=Ee.getValue(),u=Te.getAdaptationForType(s,0,t).Representation,l=e;if(a>0&&o>0){for(;l>0&&u[l]&&a<u[l].width&&a-u[l-1].width<u[l].width-a;)l-=1;u.length-2>=l&&u[l].width===u[l+1].width&&(l=Math.min(e,l+1))}return l}function te(e){var t=e.request.mediaType;if(E(t)){var n=function(){var n=ae.getRules(g["default"].ABANDON_FRAGMENT_RULES),r=he[t].getScheduleController();if(!r)return{v:void 0};var i=function(n){if(n.confidence===s["default"].STRONG&&n.value<z(t,se.getActiveStreamInfo())){var i=r.getFragmentModel(),a=i.getRequests({state:m["default"].FRAGMENT_MODEL_LOADING,index:e.request.index})[0];a&&(i.abortRequests(),B(t,O),F(t,se.getActiveStreamInfo(),n.value,n.reason),re.trigger(T["default"].FRAGMENT_LOADING_ABANDONED,{streamProcessor:he[t],request:a,mediaType:t}),clearTimeout(me),me=setTimeout(function(){B(t,P),me=null},Ie.getAbandonLoadTimeout()))}};oe.applyRules(n,he[t],i,e,function(e,t){return t})}();if("object"===("undefined"==typeof n?"undefined":a(n)))return n.v}}var ne=this.context,re=(0,y["default"])(ne).getInstance(),ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0;return ie={isPlayingAtTopQuality:G,updateTopQualityIndex:Y,getAverageThroughput:q,getBitrateList:K,getQualityForBitrate:j,getMaxAllowedBitrateFor:c,setMaxAllowedBitrateFor:p,getMaxAllowedRepresentationRatioFor:v,setMaxAllowedRepresentationRatioFor:_,getInitialBitrateFor:i,setInitialBitrateFor:o,getInitialRepresentationRatioFor:u,setInitialRepresentationRatioFor:f,setAutoSwitchBitrateFor:S,getAutoSwitchBitrateFor:E,setLimitBitrateByPortal:R,getLimitBitrateByPortal:I,getUsePixelRatioInLimitBitrateByPortal:M,setUsePixelRatioInLimitBitrateByPortal:C,getConfidenceFor:Q,getQualityFor:z,getAbandonmentStateFor:k,setAbandonmentStateFor:B,setPlaybackQuality:F,getPlaybackQuality:x,setAverageThroughput:H,getTopQualityIndexFor:r,initialize:t,setConfig:n,reset:V},e(),ie}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),s=r(o),u=n(165),l=r(u),f=n(50),d=r(f),c=n(47),g=r(c),p=n(5),h=r(p),v=n(30),m=r(v),_=n(3),y=r(_),E=n(2),T=r(E),S=n(1),I=r(S),R=n(31),A=r(R),M=n(12),b=r(M),C=n(19),D=r(C),O="abandonload",P="allowload",w=1e3,N=100,L=0;i.__dashjs_factory_name="AbrController";var x=I["default"].getSingletonFactory(i);x.ABANDON_LOAD=O,x.QUALITY_DEFAULT=L,t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){d.trigger(u["default"].ERROR,{error:"capability",event:e})}function t(e,t,n){d.trigger(u["default"].ERROR,{error:"download",event:{id:e,url:t,request:n}})}function n(e,t,n,r){d.trigger(u["default"].ERROR,{error:"manifestError",event:{message:e,id:t,manifest:n,event:r}})}function r(e,t,n){d.trigger(u["default"].ERROR,{error:"cc",event:{message:e,id:t,cc:n}})}function i(e){d.trigger(u["default"].ERROR,{error:"mediasource",event:e})}function a(e){d.trigger(u["default"].ERROR,{error:"key_session",event:e})}function s(e){d.trigger(u["default"].ERROR,{error:"key_message",event:e})}var l=void 0,f=this.context,d=(0,o["default"])(f).getInstance();return l={capabilityError:e,downloadError:t,manifestError:n,timedTextError:r,mediaSourceError:i,mediaKeySessionError:a,mediaKeyMessageError:s}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d="mediasource",c="mediakeys",g="manifest",p="SIDX",h="content",v="initialization",m="xlink",_="codec",y="parse",E="nostreams",T="parse";i.__dashjs_factory_name="ErrorHandler";var S=f["default"].getSingletonFactory(i);S.CAPABILITY_ERROR_MEDIASOURCE=d,S.CAPABILITY_ERROR_MEDIAKEYS=c,S.DOWNLOAD_ERROR_ID_MANIFEST=g,S.DOWNLOAD_ERROR_ID_SIDX=p,S.DOWNLOAD_ERROR_ID_CONTENT=h,S.DOWNLOAD_ERROR_ID_INITIALIZATION=v,S.DOWNLOAD_ERROR_ID_XLINK=m,S.MANIFEST_ERROR_ID_CODEC=_,S.MANIFEST_ERROR_ID_PARSE=y,S.MANIFEST_ERROR_ID_NOSTREAMS=E,S.TIMED_TEXT_ERROR_ID_PARSE=T,t["default"]=S,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n,r,i,a=!1,o=!1,s=e.ContentComponent_asArray,u="text"!==t?new RegExp(t):new RegExp("(vtt|ttml)");if(e.Representation_asArray.length>0&&e.Representation_asArray[0].hasOwnProperty("codecs")){var l=e.Representation_asArray[0].codecs;if("stpp"===l||"wvtt"===l)return"fragmentedText"===t}if(s){if(s.length>1)return"muxed"===t;s[0]&&s[0].contentType===t&&(a=!0,o=!0)}if(e.hasOwnProperty("mimeType")&&(a=u.test(e.mimeType),o=!0),!o)for(n=0,r=e.Representation_asArray.length;!o&&n<r;)i=e.Representation_asArray[n],i.hasOwnProperty("mimeType")&&(a=u.test(i.mimeType),o=!0),n++;return a}function t(t){return e(t,"audio")}function n(t){return e(t,"video")}function r(t){return e(t,"fragmentedText")}function i(t){return e(t,"text")}function a(t){return e(t,"muxed")}function s(e){return"text/vtt"===e||"application/ttml+xml"===e}function l(e){var t="";return e.hasOwnProperty("lang")&&(t=e.lang.replace(/[^A-Za-z0-9-]/g,"")),t}function d(e){return e.hasOwnProperty("Viewpoint")?e.Viewpoint:null}function g(e){return e.hasOwnProperty("Role_asArray")?e.Role_asArray:[]}function h(e){return e.hasOwnProperty("Accessibility_asArray")?e.Accessibility_asArray:[]}function m(e){return e.hasOwnProperty("AudioChannelConfiguration_asArray")?e.AudioChannelConfiguration_asArray:[]}function y(e){return g(e).filter(function(e){return"main"===e.value})[0]}function T(){return function(e,t){return e.bandwidth-t.bandwidth}}function I(e){return void 0!==e.Representation_asArray&&null!==e.Representation_asArray&&e.Representation_asArray.sort(T()),e}function A(e,t,n){var r,i,a=t.Period_asArray[n].AdaptationSet_asArray;for(r=0,i=a.length;r<i;r++)if(a[r].hasOwnProperty("id")&&a[r].id===e)return a[r];return null}function b(e,t,n){var r=t.Period_asArray[n].AdaptationSet_asArray;return r[e]}function D(e,t,n){var r,i,a=t.Period_asArray[n].AdaptationSet_asArray;for(r=0,i=a.length;r<i;r++)if(a[r]===e)return r;return-1}function O(t,n,r){var i,a,o=t.Period_asArray[n].AdaptationSet_asArray,s=[];for(i=0,a=o.length;i<a;i++)e(o[i],r)&&s.push(I(o[i]));return s}function P(e,t,n,r){var i=O(e,t,n);if(!i||0===i.length)return null;if(i.length>1&&r)for(var a=de.getCurrentTrackFor(n,r),o=ce.getAllMediaInfoForType(e,r,n),s=0,u=i.length;s<u;s++){if(a&&de.isTracksEqual(a,o[s]))return i[s];if(y(i[s]))return i[s]}return i[0]}function w(e){var t=e.Representation_asArray[0];return t.mimeType+';codecs="'+t.codecs+'"'}function N(e){return e.Representation_asArray[0].mimeType}function L(e){return e&&e.hasOwnProperty("cenc:default_KID")?e["cenc:default_KID"]:null}function x(e){return e&&e.hasOwnProperty("ContentProtection_asArray")&&0!==e.ContentProtection_asArray.length?e.ContentProtection_asArray:null}function F(e){var t=!1;return e.hasOwnProperty("type")&&(t="dynamic"===e.type),t}function U(e){var t,n,r=F(e);return t=!isNaN(e.timeShiftBufferDepth),n=r&&t}function B(e,t){var n=!1;return e.profiles&&e.profiles.length>0&&(n=e.profiles.indexOf(t)!==-1),n}function k(e){return B(e,"urn:mpeg:dash:profile:isoff-on-demand:2011")}function j(e){return B(e,"urn:dvb:dash:profile:dvb-dash:2014")}function K(e){var t;return t=e.hasOwnProperty("mediaPresentationDuration")?e.mediaPresentationDuration:Number.MAX_VALUE}function H(e){return e.bandwidth}function q(e){var t=NaN,n=2;return e.hasOwnProperty("minimumUpdatePeriod")&&(t=Math.max(parseFloat(e.minimumUpdatePeriod),n)),t}function Y(e){return e.Representation_asArray.length}function G(e){if(!e||!e.Representation_asArray||!e.Representation_asArray.length)return null;for(var t=I(e),n=t.Representation_asArray,r=n.length,i=[],a=0;a<r;a++)i.push({bandwidth:n[a].bandwidth,width:n[a].width||0,height:n[a].height||0});return i}function V(e,t){return t.Representation_asArray[e]}function z(e,t){for(var n,r,i,a,u,l=I(e.Period_asArray[t.period.index].AdaptationSet_asArray[t.index]),f=[],d=0;d<l.Representation_asArray.length;d++)a=l.Representation_asArray[d],n=new o["default"],n.index=d,n.adaptation=t,a.hasOwnProperty("id")&&(n.id=a.id),a.hasOwnProperty("bandwidth")&&(n.bandwidth=a.bandwidth),a.hasOwnProperty("maxPlayoutRate")&&(n.maxPlayoutRate=a.maxPlayoutRate),a.hasOwnProperty("SegmentBase")?(i=a.SegmentBase,n.segmentInfoType="SegmentBase"):a.hasOwnProperty("SegmentList")?(i=a.SegmentList,i.hasOwnProperty("SegmentTimeline")?(n.segmentInfoType="SegmentTimeline",u=i.SegmentTimeline.S_asArray[i.SegmentTimeline.S_asArray.length-1],(!u.hasOwnProperty("r")||u.r>=0)&&(n.useCalculatedLiveEdgeTime=!0)):(n.segmentInfoType="SegmentList",n.useCalculatedLiveEdgeTime=!0)):a.hasOwnProperty("SegmentTemplate")?(i=a.SegmentTemplate,i.hasOwnProperty("SegmentTimeline")?(n.segmentInfoType="SegmentTimeline",u=i.SegmentTimeline.S_asArray[i.SegmentTimeline.S_asArray.length-1],(!u.hasOwnProperty("r")||u.r>=0)&&(n.useCalculatedLiveEdgeTime=!0)):n.segmentInfoType="SegmentTemplate",i.hasOwnProperty("initialization")&&(n.initialization=i.initialization.split("$Bandwidth$").join(a.bandwidth).split("$RepresentationID$").join(a.id))):(i=a.BaseURL,n.segmentInfoType="BaseURL"),i.hasOwnProperty("Initialization")?(r=i.Initialization,r.hasOwnProperty("sourceURL")?n.initialization=r.sourceURL:r.hasOwnProperty("range")&&(n.range=r.range)):a.hasOwnProperty("mimeType")&&s(a.mimeType)&&(n.range=0),i.hasOwnProperty("timescale")&&(n.timescale=i.timescale),i.hasOwnProperty("duration")&&(n.segmentDuration=i.duration/n.timescale),i.hasOwnProperty("startNumber")&&(n.startNumber=i.startNumber),i.hasOwnProperty("indexRange")&&(n.indexRange=i.indexRange),i.hasOwnProperty("presentationTimeOffset")&&(n.presentationTimeOffset=i.presentationTimeOffset/n.timescale),n.MSETimeOffset=fe.calcMSETimeOffset(n),n.path=[t.period.index,t.index,d],f.push(n);return f}function W(e,i){for(var o,s,l=e.Period_asArray[i.index],f=[],d=0;d<l.AdaptationSet_asArray.length;d++)s=l.AdaptationSet_asArray[d],o=new u["default"],s.hasOwnProperty("id")&&(o.id=s.id),o.index=d,o.period=i,a(s)?o.type="muxed":t(s)?o.type="audio":n(s)?o.type="video":r(s)?o.type="fragmentedText":o.type="text",f.push(o);return f}function Q(e,t){var n,r,i=F(e),a=[],o=null,s=null,u=null,l=null;for(r=0,n=e.Period_asArray.length;r<n;r++)s=e.Period_asArray[r],s.hasOwnProperty("start")?(l=new f["default"],
27
- l.start=s.start):null!==o&&s.hasOwnProperty("duration")&&null!==u?(l=new f["default"],l.start=u.start+u.duration,l.duration=s.duration):0!==r||i||(l=new f["default"],l.start=0),null!==u&&isNaN(u.duration)&&(u.duration=l.start-u.start),null!==l&&(l.id=X(s)),null!==l&&s.hasOwnProperty("duration")&&(l.duration=s.duration),null!==l&&(l.index=r,l.mpd=t,a.push(l),o=s,u=l),s=null,l=null;return 0===a.length?a:(null!==u&&isNaN(u.duration)&&(u.duration=ee(e,u)-u.start),a)}function X(e){if(!e)throw new Error("Period cannot be null or undefined");var t=f["default"].DEFAULT_ID;return e.hasOwnProperty("id")&&"__proto__"!==e.id&&(t=e.id),t}function Z(e){var t=new c["default"];return t.manifest=e,e.hasOwnProperty("availabilityStartTime")?t.availabilityStartTime=new Date(e.availabilityStartTime.getTime()):t.availabilityStartTime=new Date(e.loadedTime.getTime()),e.hasOwnProperty("availabilityEndTime")&&(t.availabilityEndTime=new Date(e.availabilityEndTime.getTime())),e.hasOwnProperty("suggestedPresentationDelay")&&(t.suggestedPresentationDelay=e.suggestedPresentationDelay),e.hasOwnProperty("timeShiftBufferDepth")&&(t.timeShiftBufferDepth=e.timeShiftBufferDepth),e.hasOwnProperty("maxSegmentDuration")&&(t.maxSegmentDuration=e.maxSegmentDuration),t}function J(e,t){return fe.calcPresentationTimeFromWallTime(e.loadedTime,t)}function $(e,t){var n,r=NaN;return e.hasOwnProperty("minimumUpdatePeriod")&&(n=J(e,t),r=n+e.minimumUpdatePeriod),r}function ee(e,t){var n,r=$(e,t);if(e.mediaPresentationDuration)n=e.mediaPresentationDuration;else{if(isNaN(r))throw new Error("Must have @mediaPresentationDuration or @minimumUpdatePeriod on MPD or an explicit @duration on the last period.");n=r}return n}function te(e,t){var n=e.Period_asArray,r=n[t.index].EventStream_asArray,i=[];if(r)for(var a=0;a<r.length;a++){var o=new M["default"];if(o.period=t,o.timescale=1,!r[a].hasOwnProperty("schemeIdUri"))throw new Error("Invalid EventStream. SchemeIdUri has to be set");o.schemeIdUri=r[a].schemeIdUri,r[a].hasOwnProperty("timescale")&&(o.timescale=r[a].timescale),r[a].hasOwnProperty("value")&&(o.value=r[a].value);for(var s=0;s<r[a].Event_asArray.length;s++){var u=new S["default"];u.presentationTime=0,u.eventStream=o,r[a].Event_asArray[s].hasOwnProperty("presentationTime")&&(u.presentationTime=r[a].Event_asArray[s].presentationTime),r[a].Event_asArray[s].hasOwnProperty("duration")&&(u.duration=r[a].Event_asArray[s].duration),r[a].Event_asArray[s].hasOwnProperty("id")&&(u.id=r[a].Event_asArray[s].id),i.push(u)}}return i}function ne(e,t){var n=[];if(!e)return n;for(var r=0;r<e.length;r++){var i=new M["default"];if(i.timescale=1,i.representation=t,!e[r].hasOwnProperty("schemeIdUri"))throw new Error("Invalid EventStream. SchemeIdUri has to be set");i.schemeIdUri=e[r].schemeIdUri,e[r].hasOwnProperty("timescale")&&(i.timescale=e[r].timescale),e[r].hasOwnProperty("value")&&(i.value=e[r].value),n.push(i)}return n}function re(e,t){var n=e.Period_asArray[t.period.index].AdaptationSet_asArray[t.index].InbandEventStream_asArray;return ne(n,null)}function ie(e,t){var n=e.Period_asArray[t.adaptation.period.index].AdaptationSet_asArray[t.adaptation.index].Representation_asArray[t.index].InbandEventStream_asArray;return ne(n,t)}function ae(e){var t=F(e),n=e.hasOwnProperty("availabilityStartTime"),r=e.UTCTiming_asArray,i=[];return(t||n)&&r&&r.forEach(function(e){var t=new p["default"];e.hasOwnProperty("schemeIdUri")&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty("value")&&(t.value=e.value.toString(),i.push(t)))}),i}function oe(e){var t=[],n=e.BaseURL_asArray||[e.baseUri],r=!1;return n.some(function(n){if(n){var i=new R["default"],a=n.__text||n;return ge.isRelative(a)&&(r=!0,e.baseUri&&(a=e.baseUri+a)),i.url=a,n.hasOwnProperty("serviceLocation")&&n.serviceLocation.length?i.serviceLocation=n.serviceLocation:i.serviceLocation=a,n.hasOwnProperty("dvb:priority")&&(i.dvb_priority=n["dvb:priority"]),n.hasOwnProperty("dvb:weight")&&(i.dvb_weight=n["dvb:weight"]),t.push(i),r}}),t}function se(e){return e.hasOwnProperty("Location")&&(e.Location=e.Location_asArray[0]),e.Location}var ue=void 0,le=this.context,fe=(0,v["default"])(le).getInstance(),de=(0,_["default"])(le).getInstance(),ce=(0,E["default"])(le).getInstance(),ge=(0,C["default"])(le).getInstance();return ue={getIsTypeOf:e,getIsAudio:t,getIsVideo:n,getIsText:i,getIsMuxed:a,getIsTextTrack:s,getIsFragmentedText:r,getIsMain:y,getLanguageForAdaptation:l,getViewpointForAdaptation:d,getRolesForAdaptation:g,getAccessibilityForAdaptation:h,getAudioChannelConfigurationForAdaptation:m,processAdaptation:I,getAdaptationForIndex:b,getIndexForAdaptation:D,getAdaptationForId:A,getAdaptationsForType:O,getAdaptationForType:P,getCodec:w,getMimeType:N,getKID:L,getContentProtectionData:x,getIsDynamic:F,getIsDVR:U,getIsOnDemand:k,getIsDVB:j,getDuration:K,getBandwidth:H,getRefreshDelay:q,getRepresentationCount:Y,getBitrateListForAdaptation:G,getRepresentationFor:V,getRepresentationsForAdaptation:z,getAdaptationsForPeriod:W,getRegularPeriods:Q,getPeriodId:X,getMpd:Z,getFetchTime:J,getCheckTime:$,getEndTimeForLastPeriod:ee,getEventsForPeriod:te,getEventStreams:ne,getEventStreamForAdaptationSet:re,getEventStreamForRepresentation:ie,getUTCTimingSources:ae,getBaseURLsFromElement:oe,getRepresentationSortFunction:T,getLocation:se}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(96),o=r(a),s=n(92),u=r(s),l=n(95),f=r(l),d=n(94),c=r(d),g=n(58),p=r(g),h=n(26),v=r(h),m=n(13),_=r(m),y=n(15),E=r(y),T=n(57),S=r(T),I=n(56),R=r(I),A=n(93),M=r(A),b=n(22),C=r(b),D=n(1),O=r(D);i.__dashjs_factory_name="DashManifestModel",t["default"]=O["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){k={},O(),D()}function t(e,t){var n=f(e),i=r(e,t),a=[];return"fragmentedText"===e?void s(i[0]):(n||(n=U.getSavedMediaSettings(e),l(e,n)),void(i&&0!==i.length&&(n&&i.forEach(function(e){C(n,e)&&a.push(e)}),s(0===a.length?P(i):a.length>1?P(a):a[0]))))}function n(e){var t=e?e.type:null,n=e?e.streamInfo.id:null,r=f(t);return!(!e||!I(t))&&(k[n]=k[n]||w(),!(k[n][t].list.indexOf(e)>=0)&&(k[n][t].list.push(e),r&&C(r,e)&&!i(t,e.streamInfo)&&s(e),!0))}function r(e,t){if(!e||!t)return[];var n=t.id;return k[n]&&k[n][e]?k[n][e].list:[]}function i(e,t){return!e||!t||t&&!k[t.id]?null:k[t.id][e].current}function a(e){var t=e.type,n=e.streamInfo.id;return k[n]&&k[n][t]&&R(k[n][t].current,e)}function s(e){if(e){var t=e.type,n=e.streamInfo,r=n.id,a=i(t,n);if(k[r]&&k[r][t]&&(!a||!R(e,a))){k[r][t].current=e,a&&x.trigger(o["default"].CURRENT_TRACK_CHANGED,{oldMediaInfo:a,newMediaInfo:e,switchMode:H[t]});var s=b(e);s&&k[r][t].storeLastSettings&&(s.roles&&(s.role=s.roles[0],delete s.roles),s.accessibility&&(s.accessibility=s.accessibility[0]),s.audioChannelConfiguration&&(s.audioChannelConfiguration=s.audioChannelConfiguration[0]),U.setSavedMediaSettings(t,s))}}}function l(e,t){e&&t&&(j[e]=t)}function f(e){return e?j[e]:null}function d(e,t){var n=Y.indexOf(t)!==-1;return n?void(H[e]=t):void L("track switch mode is not supported: "+t)}function g(e){return H[e]}function h(e){var t=G.indexOf(e)!==-1;return t?void(K=e):void L("track selection mode is not supported: "+e)}function S(){return K||T}function I(e){return"audio"===e||"video"===e||"text"===e||"fragmentedText"===e}function R(e,t){var n=e.id===t.id,r=e.viewpoint===t.viewpoint,i=e.lang===t.lang,a=e.roles.toString()===t.roles.toString(),o=e.accessibility.toString()===t.accessibility.toString(),s=e.audioChannelConfiguration.toString()===t.audioChannelConfiguration.toString();return n&&r&&i&&a&&o&&s}function A(e){e&&e.errHandler&&(q=e.errHandler)}function M(){e(),F.resetEmbedded()}function b(e){var t={lang:e.lang,viewpoint:e.viewpoint,roles:e.roles,accessibility:e.accessibility,audioChannelConfiguration:e.audioChannelConfiguration},n=t.lang||t.viewpoint||t.role&&t.role.length>0||t.accessibility&&t.accessibility.length>0||t.audioChannelConfiguration&&t.audioChannelConfiguration.length>0;return n?t:null}function C(e,t){var n=!e.lang||e.lang===t.lang,r=!e.viewpoint||e.viewpoint===t.viewpoint,i=!e.role||!!t.roles.filter(function(t){return t===e.role})[0],a=!e.accessibility||!!t.accessibility.filter(function(t){return t===e.accessibility})[0],o=!e.audioChannelConfiguration||!!t.audioChannelConfiguration.filter(function(t){return t===e.audioChannelConfiguration})[0];return n&&r&&i&&a&&o}function D(){H={audio:_,video:m}}function O(){j={audio:null,video:null}}function P(e){var t=S(),n=[],r=function(e){var t,n=0,r=[];return e.forEach(function(e){t=Math.max.apply(Math,e.bitrateList.map(function(e){return e.bandwidth})),t>n?(n=t,r=[e]):t===n&&r.push(e)}),r},i=function(e){var t,n=0,r=[];return e.forEach(function(e){t=e.representationCount,t>n?(n=t,r=[e]):t===n&&r.push(e)}),r};switch(t){case y:n=r(e),n.length>1&&(n=i(n));break;case E:n=i(e),n.length>1&&(n=r(e));break;default:L("track selection mode is not supported: "+t)}return n[0]}function w(){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}}}var N=this.context,L=(0,c["default"])(N).getInstance().log,x=(0,u["default"])(N).getInstance(),F=(0,p["default"])(N).getInstance(),U=(0,v["default"])(N).getInstance(),B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=[_,m],G=[y,E];return B={initialize:e,checkInitialMediaSettingsForType:t,addTrack:n,getTracksFor:r,getCurrentTrackFor:i,isCurrentTrack:a,setTrack:s,setInitialSettings:l,getInitialSettings:f,setSwitchMode:d,getSwitchMode:g,setSelectionModeForInitialTrack:h,getSelectionModeForInitialTrack:S,isMultiTrackSupportedByType:I,isTracksEqual:R,setConfig:A,reset:M}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),o=r(a),s=n(3),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d),g=n(17),p=r(g),h=n(50),v=r(h),m="neverReplace",_="alwaysReplace",y="highestBitrate",E="widestRange",T=y;i.__dashjs_factory_name="MediaController";var S=f["default"].getSingletonFactory(i);S.TRACK_SWITCH_MODE_NEVER_REPLACE=m,S.TRACK_SWITCH_MODE_ALWAYS_REPLACE=_,S.TRACK_SELECTION_MODE_HIGHEST_BITRATE=y,S.TRACK_SELECTION_MODE_WIDEST_RANGE=E,S.DEFAULT_INIT_TRACK_SELECTION_MODE=T,t["default"]=S,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){G={}}function t(e){e&&e.adapter&&(Y=e.adapter)}function n(){H.trigger(C["default"].METRICS_CHANGED)}function r(e){H.trigger(C["default"].METRIC_CHANGED,{mediaType:e}),n()}function i(e,t,n){H.trigger(C["default"].METRIC_UPDATED,{mediaType:e,metric:t,value:n}),r(e)}function a(e,t,n){H.trigger(C["default"].METRIC_ADDED,{mediaType:e,metric:t,value:n}),r(e)}function s(e){delete G[e],r(e)}function f(){G={},n()}function c(e){return G.hasOwnProperty(e)?G[e]:null}function p(e){var t;return G.hasOwnProperty(e)?t=G[e]:(t=new o["default"],G[e]=t),t}function v(e,t,n,r,i,o){var s=new u["default"];return s.tcpid=t,s.dest=n,s.topen=r,s.tclose=i,s.tconnect=o,p(e).TcpList.push(s),a(e,Y.metricsList.TCP_CONNECTION,s),s}function _(e,t,n,r){var i=new l.HTTPRequestTrace;return i.s=t,i.d=n,i.b=r,e.trace.push(i),e.interval||(e.interval=0),e.interval+=n,i}function T(e,t,n,r,i,o,s,u,f,d,c,g,h,v){var m=new l.HTTPRequest;return i&&i!==r&&(T(e,null,n,r,null,null,s,u,null,null,null,g,null,null),m.actualurl=i),m.tcpid=t,m.type=n,m.url=r,m.range=s,m.trequest=u,m.tresponse=f,m.responsecode=c,m._tfinish=d,m._stream=e,m._mediaduration=g,m._responseHeaders=h,m._serviceLocation=o,v?v.forEach(function(e){_(m,e.s,e.d,e.b)}):(delete m.interval,delete m.trace),p(e).HttpList.push(m),a(e,Y.metricsList.HTTP_REQUEST,m),m}function I(e,t,n,r,i){var o=new d["default"];return o.t=t,o.mt=n,o.to=r,i?o.lto=i:delete o.lto,p(e).RepSwitchList.push(o),a(e,Y.metricsList.TRACK_SWITCH,o),o}function A(e,t,n){var r=new g["default"];return r.t=t,r.level=n,p(e).BufferLevel.push(r),a(e,Y.metricsList.BUFFER_LEVEL,r),r}function b(e,t,n){var r=new h["default"];return r.target=n,r.state=t,p(e).BufferState.push(r),a(e,Y.metricsList.BUFFER_STATE,r),r}function D(e,t,n,r){var i=new m["default"];return i.time=t,i.range=r,i.manifestInfo=n,p(e).DVRInfo.push(i),a(e,Y.metricsList.DVR_INFO,i),i}function O(e,t){var n=new y["default"],r=p(e).DroppedFrames;return n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,r.length>0&&r[r.length-1]==n?r[r.length-1]:(r.push(n),a(e,Y.metricsList.DROPPED_FRAMES,n),n)}function P(e,t,n,r,i,o,s,u,l){var f=new S["default"];return f.mediaType=e,f.t=t,f.type=n,f.startTime=r,f.availabilityStartTime=i,f.duration=o,f.quality=s,f.range=u,f.state=l,p(e).SchedulingInfo.push(f),a(e,Y.metricsList.SCHEDULING_INFO,f),f}function N(e,t,n){var r=new M["default"];r.loadingRequests=t,r.executedRequests=n,p(e).RequestsQueue=r,a(e,Y.metricsList.REQUESTS_QUEUE,r)}function L(e,t,n,r,i,o,s,u,l,f){var d=new E.ManifestUpdate,c=p("stream");return d.mediaType=e,d.type=t,d.requestTime=n,d.fetchTime=r,d.availabilityStartTime=i,d.presentationStartTime=o,d.clientTimeOffset=s,d.currentTime=u,d.buffered=l,d.latency=f,c.ManifestUpdate.push(d),a(e,Y.metricsList.MANIFEST_UPDATE,d),d}function x(e,t){if(e){for(var n in t)e[n]=t[n];i(e.mediaType,Y.metricsList.MANIFEST_UPDATE,e)}}function F(e,t,n,r,a){if(e){var o=new E.ManifestUpdateStreamInfo;return o.id=t,o.index=n,o.start=r,o.duration=a,e.streamInfo.push(o),i(e.mediaType,Y.metricsList.MANIFEST_UPDATE_STREAM_INFO,e),o}return null}function U(e,t,n,r,a,o,s,u){if(e){var l=new E.ManifestUpdateTrackInfo;return l.id=t,l.index=n,l.streamIndex=r,l.mediaType=a,l.startNumber=s,l.fragmentInfoType=u,l.presentationTimeOffset=o,e.trackInfo.push(l),i(e.mediaType,Y.metricsList.MANIFEST_UPDATE_TRACK_INFO,e),l}return null}function B(e){var t="stream";return e.trace&&Array.isArray(e.trace)?e.trace.forEach(function(e){e.hasOwnProperty("subreplevel")&&!e.subreplevel&&delete e.subreplevel}):delete e.trace,p(t).PlayList.push(e),a(t,Y.metricsList.PLAY_LIST,e),e}function k(e){var t="stream";return p(t).DVBErrors.push(e),a(t,Y.metricsList.DVB_ERRORS,e),e}function j(e,t){var n=new w["default"];return n._s=t,p(e).BolaState=[n],a(e,"BolaState",n),n}var K=this.context,H=(0,R["default"])(K).getInstance(),q=void 0,Y=void 0,G=void 0;return q={metricsChanged:n,metricChanged:r,metricUpdated:i,metricAdded:a,clearCurrentMetricsForType:s,clearAllCurrentMetrics:f,getReadOnlyMetricsFor:c,getMetricsFor:p,addTcpConnection:v,addHttpRequest:T,addRepresentationSwitch:I,addBufferLevel:A,addBufferState:b,addDVRInfo:D,addDroppedFrames:O,addSchedulingInfo:P,addRequestsQueue:N,addManifestUpdate:L,updateManifestUpdateInfo:x,addManifestUpdateStreamInfo:F,addManifestUpdateRepresentationInfo:U,addPlayList:B,addDVBErrors:k,updateBolaState:j,setConfig:t},e(),q}Object.defineProperty(t,"__esModule",{value:!0});var a=n(171),o=r(a),s=n(185),u=r(s),l=n(7),f=n(182),d=r(f),c=n(177),g=r(c),p=n(178),h=r(p),v=n(179),m=r(v),_=n(180),y=r(_),E=n(181),T=n(184),S=r(T),I=n(3),R=r(I),A=n(183),M=r(A),b=n(2),C=r(b),D=n(1),O=r(D),P=n(176),w=r(P);i.__dashjs_factory_name="MetricsModel",t["default"]=O["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(){function e(e){e&&e.dashManifestModel&&(L=e.dashManifestModel)}function t(){x=[],F={}}function n(e,t){return t.getRepresentationForQuality(e.quality)}function r(e){return F[e.streamInfo.id][e.index]}function i(e){for(var t=x.length,n=0;n<t;n++){var r=x[n];if(e.id===r.id)return r}return null}function a(e,t){var n=new s["default"],r=t.adaptation.period.mpd.manifest.Period_asArray[t.adaptation.period.index].AdaptationSet_asArray[t.adaptation.index],i=L.getRepresentationFor(t.index,r);return n.id=t.id,n.quality=t.index,n.bandwidth=L.getBandwidth(i),n.DVRWindow=t.segmentAvailabilityRange,n.fragmentDuration=t.segmentDuration||(t.segments&&t.segments.length>0?t.segments[0].duration:NaN),n.MSETimeOffset=t.MSETimeOffset,n.useCalculatedLiveEdgeTime=t.useCalculatedLiveEdgeTime,n.mediaInfo=o(e,t.adaptation),n}function o(e,t){var n,r=new l["default"],i=t.period.mpd.manifest.Period_asArray[t.period.index].AdaptationSet_asArray[t.index];return r.id=t.id,r.index=t.index,r.type=t.type,r.streamInfo=f(e,t.period),r.representationCount=L.getRepresentationCount(i),r.lang=L.getLanguageForAdaptation(i),n=L.getViewpointForAdaptation(i),r.viewpoint=n?n.value:void 0,r.accessibility=L.getAccessibilityForAdaptation(i).map(function(e){var t=e.value,n=t;return e.schemeIdUri&&e.schemeIdUri.search("cea-608")>=0&&"undefined"!=typeof y["default"]&&(n=t?"cea-608:"+t:"cea-608",r.embeddedCaptions=!0),n}),r.audioChannelConfiguration=L.getAudioChannelConfigurationForAdaptation(i).map(function(e){return e.value}),r.roles=L.getRolesForAdaptation(i).map(function(e){return e.value}),r.codec=L.getCodec(i),r.mimeType=L.getMimeType(i),r.contentProtection=L.getContentProtectionData(i),r.bitrateList=L.getBitrateListForAdaptation(i),r.contentProtection&&r.contentProtection.forEach(function(e){e.KID=L.getKID(e)}),r.isText=L.getIsTextTrack(r.mimeType),r}function u(e,t,n){e.id=t,e.index=100+parseInt(t.substring(2,3)),e.type="embeddedText",e.codec="cea-608-in-SEI",e.isText=!0,e.isEmbedded=!0,e.lang=t+" "+n,e.roles=["caption"]}function f(e,t){var n=new d["default"],r=1;return n.id=t.id,n.index=t.index,n.start=t.start,n.duration=t.duration,n.manifestInfo=c(e,t.mpd),n.isLast=1===e.Period_asArray.length||Math.abs(n.start+n.duration-n.manifestInfo.duration)<r,n.isFirst=1===e.Period_asArray.length||L.getRegularPeriods(e,L.getMpd(e))[0].id===t.id,n}function c(e,t){var n=new g["default"];return n.DVRWindowSize=t.timeShiftBufferDepth,n.loadedTime=t.manifest.loadedTime,n.availableFrom=t.availabilityStartTime,n.minBufferTime=t.manifest.minBufferTime,n.maxFragmentDuration=t.maxSegmentDuration,n.duration=L.getDuration(e),n.isDynamic=L.getIsDynamic(e),n}function p(e,t,n){var r=L.getAdaptationForType(e,t.index,n,t);if(!r)return null;var a=i(t),s=a.id,u=L.getIndexForAdaptation(r,e,t.index);return F[s]=F[s]||L.getAdaptationsForPeriod(e,a),o(e,F[s][u])}function v(e,t,n){var r,a,s,l,f,d,c=i(t),g=c.id,p=L.getAdaptationsForType(e,t.index,"embeddedText"!==n?n:"video"),h=[];if(!p)return h;for(F[g]=F[g]||L.getAdaptationsForPeriod(e,c),l=0,d=p.length;l<d;l++){if(r=p[l],s=L.getIndexForAdaptation(r,e,t.index),a=o(e,F[g][s]),"embeddedText"===n){var v=a.accessibility.length;for(f=0;f<v;f++)if(a){var m=a.accessibility[f];if(0===m.indexOf("cea-608:")){var _=m.substring(8),y=_.split(";");if("CC"===y[0].substring(0,2))for(f=0;f<y.length;f++)a||(a=o.call(this,e,F[g][s])),u(a,y[f].substring(0,3),y[f].substring(4)),h.push(a),a=null;else for(f=0;f<y.length;f++)a||(a=o.call(this,e,F[g][s])),u(a,"CC"+(f+1),y[f]),h.push(a),a=null}else 0===m.indexOf("cea-608")&&(u(a,"CC1","eng"),h.push(a),a=null)}}a&&"embeddedText"!==n&&h.push(a)}return h}function m(e){var t,n,r,i=[];if(!e)return null;for(t=L.getMpd(e),x=L.getRegularPeriods(e,t),t.checkTime=L.getCheckTime(e,x[0]),F={},n=x.length,r=0;r<n;r++)i.push(f(e,x[r]));return i}function _(e){var t=L.getMpd(e);return c(e,t)}function E(e,t){var n=e.getRepresentationController().getRepresentationForQuality(t);return e.getIndexHandler().getInitRequest(n)}function S(e,t){var r=n(t,e.getRepresentationController());return e.getIndexHandler().getNextSegmentRequest(r)}function I(e,t,r,i){var a=n(t,e.getRepresentationController());return e.getIndexHandler().getSegmentRequestForTime(a,r,i)}function R(e,t,r){var i=n(t,e.getRepresentationController());return e.getIndexHandler().generateSegmentRequestForTime(i,r)}function A(e){return e.getIndexHandler().getCurrentTime()}function M(e,t){return e.getIndexHandler().setCurrentTime(t)}function b(e,t){var n,a,o=i(t.getStreamInfo()),s=t.getMediaInfo(),u=r(s),l=t.getType();n=s.id,a=n?L.getAdaptationForId(n,e,o.index):L.getAdaptationForIndex(s.index,e,o.index),t.getRepresentationController().updateData(a,u,l)}function C(e,t,n){var r=t.getRepresentationForQuality(n);return r?a(e,r):null}function D(e,t){var n=t.getCurrentRepresentation();return n?a(e,n):null}function O(e,t,n){var r=new h["default"],i=e.scheme_id_uri,a=e.value,o=e.timescale,s=e.presentation_time_delta,u=e.event_duration,l=e.id,f=e.message_data,d=n*o+s;return t[i]?(r.eventStream=t[i],r.eventStream.value=a,r.eventStream.timescale=o,r.duration=u,r.id=l,r.presentationTime=d,r.messageData=f,r.presentationTimeDelta=s,r):null}function P(e,t,a){var o=[];return t instanceof d["default"]?o=L.getEventsForPeriod(e,i(t)):t instanceof l["default"]?o=L.getEventStreamForAdaptationSet(e,r(t)):t instanceof s["default"]&&(o=L.getEventStreamForRepresentation(e,n(t,a.getRepresentationController()))),o}function w(){x=[],F={}}var N=void 0,L=void 0,x=void 0,F=void 0;return N={initialize:t,convertDataToTrack:a,convertDataToMedia:o,convertDataToStream:f,getDataForTrack:n,getDataForMedia:r,getDataForStream:i,getStreamsInfo:m,getManifestInfo:_,getMediaInfoForType:p,getAllMediaInfoForType:v,getCurrentRepresentationInfo:D,getRepresentationInfoForQuality:C,updateData:b,getInitRequest:E,getNextFragmentRequest:S,getFragmentRequestForTime:I,generateFragmentRequestForTime:R,getIndexHandlerTime:A,setIndexHandlerTime:M,getEventsFor:P,getEvent:O,setConfig:e,reset:w,metricsList:T}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(174),s=i(o),u=n(170),l=i(u),f=n(172),d=i(f),c=n(169),g=i(c),p=n(57),h=i(p),v=n(1),m=i(v),_=n(52),y=i(_),E=n(54),T=r(E);a.__dashjs_factory_name="DashAdapter",t["default"]=m["default"].getSingletonFactory(a),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(){function e(e,t){var n,r=C.getValue(),i=r.Period_asArray[t];return n=I(i,e),null===n?null:n.bandwidth}function t(e,t){var n,r=C.getValue(),i=r.Period_asArray[t];return n=S(i,e)}function n(e,t){var n,r=C.getValue(),i=r.Period_asArray[t];return n=A(i,e)}function r(e){return c(e,p.TRACK_SWITCH)}function i(e){return c(e,p.BUFFER_LEVEL)}function a(e){var t=i(e);return t?(0,h.round10)(t.level/1e3,-3):0}function s(e){return e.RequestsQueue}function l(e){if(null===e)return null;var t,n,r=e.HttpList,i=null;if(null===r||r.length<=0)return null;for(t=r.length,n=t-1;n>=0;){if(r[n].responsecode){i=r[n];break}n--}return i}function d(e){return null===e?[]:e.HttpList?e.HttpList:[]}function c(e,t){if(null===e)return null;var n=e[t];if(null===n)return null;var r=n.length;return r<=0?null:n[r-1]}function g(e){return c(e,p.DROPPED_FRAMES)}function v(e){return c(e,p.SCHEDULING_INFO)}function m(e){return c(e,p.MANIFEST_UPDATE)}function _(e){return c(e,p.DVR_INFO)}function y(e,t){var n,r,i,a={};if(null===e)return null;for(n=d(e),i=n.length-1;i>=0;i--)if(r=n[i],r.type===o.HTTPRequest.MPD_TYPE){a=T(r._responseHeaders);break}return void 0===a[t]?null:a[t]}function E(e,t){if(null===e)return null;var n,r=l(e);return null===r||null===r._responseHeaders?null:(n=T(r._responseHeaders),void 0===n[t]?null:n[t])}function T(e){var t={};if(!e)return t;for(var n=e.split("\r\n"),r=0,i=n.length;r<i;r++){var a=n[r],o=a.indexOf(": ");o>0&&(t[a.substring(0,o)]=a.substring(o+2))}return t}function S(e,t){var n=I(e,t,!0);return null!==n?n:-1}function I(e,t,n){var r,i,a,o,s,u;for(i=e.AdaptationSet_asArray,s=0;s<i.length;s+=1)for(r=i[s],o=r.Representation_asArray,u=0;u<o.length;u+=1)if(a=o[u],t===a.id)return n?u:a;return null}function R(e,t){return(0,f["default"])(b).getInstance().getIsTypeOf(e,t)}function A(e,t){var n,r,i,a;if(!e||!t)return-1;for(r=e.AdaptationSet_asArray,a=0;a<r.length;a+=1)if(n=r[a],i=n.Representation_asArray,R(n,t))return i.length;return-1}var M=void 0,b=this.context,C=(0,u["default"])(b).getInstance();return M={getBandwidthForRepresentation:e,getIndexForRepresentation:t,getMaxIndexForBufferType:n,getCurrentRepresentationSwitch:r,getLatestBufferLevelVO:i,getCurrentBufferLevel:a,getCurrentHttpRequest:l,getHttpRequests:d,getCurrentDroppedFrames:g,getCurrentSchedulingInfo:v,getCurrentDVRInfo:_,getCurrentManifestUpdate:m,getLatestFragmentRequestHeaderValueByID:E,getLatestMPDRequestHeaderValueByID:y,getRequestsQueue:s}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),s=n(31),u=i(s),l=n(12),f=i(l),d=n(1),c=i(d),g=n(54),p=r(g),h=n(186);a.__dashjs_factory_name="DashMetrics",t["default"]=c["default"].getSingletonFactory(a),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,n){B=!1,k=null,V=null,z=!1,W=NaN,Q=[],J=null,O||t();var r=n.getStreamProcessor();if(q=r.getMediaInfoArr(),Y.setConfig({videoModel:X}),Y.initialize(),G=!F.getIsTextTrack(e),N=(0,f["default"])(C).getInstance(),H=(0,u["default"])(C).getInstance(),H.setConfig({boxParser:N}),G){V=r.getFragmentModel(),this.buffered=(0,c["default"])(C).create(),Q=U.getTracksFor("fragmentedText",Z.getActiveStreamInfo());for(var i=U.getCurrentTrackFor("fragmentedText",Z.getActiveStreamInfo()),a=0;a<Q.length;a++)if(Q[a]===i){$=a;break}}}function t(){ee=[],q=[],X=(0,_["default"])(C).getInstance(),Y=(0,E["default"])(C).getInstance(),Y.setConfig({videoModel:X}),Y.initialize(),N=(0,f["default"])(C).getInstance(),H=(0,u["default"])(C).getInstance(),H.setConfig({boxParser:N}),G=!1,$=null,te=!1,ne=0,ae=[],ie=[],re=null,O=!0}function n(e,t){function n(e,t){var n=new o["default"],r={subtitle:"subtitles",caption:"captions"},i=function(){var e=t.roles.length>0?r[t.roles[0]]:r.caption;return e=e===r.caption||e===r.subtitle?e:r.caption},a=function(){var e=!1;return t.codec&&t.codec.search("stpp")>=0&&(e=!0),t.mimeType&&t.mimeType.search("ttml")>=0&&(e=!0),e};n.captionData=e,n.lang=t.lang,n.label=t.id,n.index=t.index,n.isTTML=a(),n.video=X.getElement(),n.defaultTrack=M(t),n.isFragmented=G,n.isEmbedded=!!t.isEmbedded,n.kind=i();var s=(q?q.length:0)+ee.length;Y.addTextTrack(n,s)}var i,a,s,u,l,f=t.mediaInfo,d=f.type,c=f.mimeType,g=f.codec||c;if(!g)return void D("No text type defined");if("fragmentedText"===d)if(z)if(u=H.getSamplesInfo(e),a=u.sampleList,!J&&a.length>0&&(J=a[0].cts-t.start*W),g.search("stpp")>=0)for(k=null!==k?k:b(g),s=0;s<a.length;s++){var h=a[s],v=h.cts,m=v-J;this.buffered.add(m/W,(m+h.duration)/W);var _=new DataView(e,h.offset,h.size);l=S["default"].Utils.dataViewToString(_,"utf-8");try{i=k.parse(l,v/W,(v+h.duration)/W),Y.addCaptions($,J/W,i)}catch(y){D("TTML parser error: "+y.message)}}else{var E=[];for(s=0;s<a.length;s++){var T=a[s];T.cts-=J,this.buffered.add(T.cts/W,(T.cts+T.duration)/W);for(var I=e.slice(T.offset,T.offset+T.size),A=S["default"].parseBuffer(I),C=0;C<A.boxes.length;C++){var O=A.boxes[C];if(D("VTT box1: "+O.type),"vtte"!==O.type&&"vttc"===O.type){D("VTT vttc boxes.length = "+O.boxes.length);for(var P=0;P<O.boxes.length;P++){var w=O.boxes[P];if(D("VTT box2: "+w.type),"payl"===w.type){var N=w.cue_text;D("VTT cue_text = "+N);var x=T.cts/W,F=(T.cts+T.duration)/W;E.push({start:x,end:F,data:N,styles:{}}),D("VTT "+x+"-"+F+" : "+N)}}}}}E.length>0&&Y.addCaptions($,0,E)}else{for(z=!0,s=0;s<q.length;s++)n(null,q[s]);W=H.getMediaTimescaleFromMoov(e)}else if("text"===d){var _=new DataView(e,0,e.byteLength);l=S["default"].Utils.dataViewToString(_,"utf-8");try{i=b(g).parse(l),n(i,f)}catch(y){L.timedTextError(y,"parse",l)}}else if("video"===d)if("InitializationSegment"===t.segmentType){if(0===ne)for(ne=H.getMediaTimescaleFromMoov(e),s=0;s<ee.length;s++)n(null,ee[s])}else{if(0===ne)return void D("CEA-608: No timescale for embeddedTextTrack yet");var U=function(e,t){function n(e,n,r){var i=null;if(X.getTTMLRenderingDiv())i=p(X.getElement(),e,n,r);else{var a=r.getDisplayText();i=[{start:e,end:n,data:a,styles:{}}]}i&&Y.addCaptions(t,0,i)}return n};u=H.getSamplesInfo(e);var B=u.sequenceNumber;if(!ae[0]&&!ae[1]){var j=void 0,K=void 0,V=void 0;for(s=0;s<ee.length;s++){if("CC1"===ee[s].id?(j=0,V=Y.getTrackIdxForId("CC1")):"CC3"===ee[s].id&&(j=1,V=Y.getTrackIdxForId("CC3")),V===-1)return void D("CEA-608: data before track is ready.");K=U(this,V),ae[s]=new R["default"].Cea608Parser(s,{newCue:K},null)}}if(ne&&ie.indexOf(B)==-1){if(null!==re&&B!==re+1)for(s=0;s<ae.length;s++)ae[s]&&ae[s].reset();for(var Q=r(e),Z=0;Z<ae.length;Z++){var te=Q.fields[Z],oe=ae[Z];if(oe){for(s=0;s<te.length;s++)oe.addData(te[s][0]/ne,te[s][1]);Q.endTime&&oe.cueSplitAtTime(Q.endTime/ne)}}re=B,ie.push(B)}}}function r(e){var t=function(e,t,n){var r=e.length;if(r>0){if(t>=e[r-1][0])e.push([t,n]);else for(var i=r-1;i>=0;i--)if(t<e[i][0]){e.splice(i,0,[t,n]);break}}else e.push([t,n])},n=N.parse(e),r=n.getBox("moof"),i=n.getBox("tfdt"),a=n.getBoxes("trun"),o=null;if(0===a.length)return null;o=a[0],a.length>1&&D("Warning: Too many truns");for(var s=r.offset+o.data_offset,u=o.sample_count,l=s,f=i.baseMediaDecodeTime,d=new DataView(e),c={startTime:null,endTime:null,fields:[[],[]]},g=0,p=0;p<u;p++){for(var h=o.samples[p],v=f+g+h.sample_composition_time_offset,m=R["default"].findCea608Nalus(d,l,h.sample_size),_=0;_<m.length;_++)for(var y=R["default"].extractCea608DataFromRange(d,m[_]),E=0;E<2;E++)y[E].length>0&&t(c.fields[E],v,y[E]);g+=h.sample_duration,l+=h.sample_size}var T=f+g;return c.startTime=f,c.endTime=T,c}function i(e){for(var t="",n=0;n<e.length;++n){var r=e[n];t+=r.uchar}var i=t.length,a=t.replace(/^\s+/,"").length;return i-a}function a(e){return"left: "+3.125*e.x+"%; top: "+6.66*e.y1+"%; width: "+(100-3.125*e.x)+"%; height: "+6.66*Math.max(e.y2-1-e.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function s(e){return"red"==e?"rgb(255, 0, 0)":"green"==e?"rgb(0, 255, 0)":"blue"==e?"rgb(0, 0, 255)":"cyan"==e?"rgb(0, 255, 255)":"magenta"==e?"rgb(255, 0, 255)":"yellow"==e?"rgb(255, 255, 0)":"white"==e?"rgb(255, 255, 255)":"black"==e?"rgb(0, 0, 0)":e}function l(e,t){var n=e.videoHeight/15;return t?"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(t.foreground?s(t.foreground):"rgb(255, 255, 255)")+"; font-style: "+(t.italics?"italic":"normal")+"; text-decoration: "+(t.underline?"underline":"none")+"; white-space: pre; background-color: "+(t.background?s(t.background):"transparent")+";":"font-size: "+n+"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 d(e){var t=e.replace(/^\s+/g,"");return t}function g(e){var t=e.replace(/\s+$/g,"");return t}function p(e,t,n,r){var o=null,s=null,u=!1,f=-1,c={start:t,end:n,spans:[]},p="style_cea608_white_black",h={},v={},m=[],_=void 0,y=void 0;for(_=0;_<15;++_){var E=r.rows[_],T="",S=null;if(!1===E.isEmpty()){var I=i(E.chars);null===o&&(o={x:I,y1:_,y2:_+1,p:[]}),I!==f&&u&&(o.p.push(c),c={start:t,end:n,spans:[]},o.y2=_,o.name="region_"+o.x+"_"+o.y1+"_"+o.y2,!1===h.hasOwnProperty(o.name)?(m.push(o),h[o.name]=o):(s=h[o.name],s.p.contat(o.p)),o={x:I,y1:_,y2:_+1,p:[]});for(var R=0;R<E.chars.length;++R){var A=E.chars[R],M=A.penState;if(null===S||!M.equals(S)){T.trim().length>0&&(c.spans.push({name:p,line:T,row:_}),T="");var b="style_cea608_"+M.foreground+"_"+M.background;M.underline&&(b+="_underline"),M.italics&&(b+="_italics"),v.hasOwnProperty(b)||(v[b]=JSON.parse(JSON.stringify(M))),S=M,p=b}T+=A.uchar}T.trim().length>0&&c.spans.push({name:p,line:T,row:_}),u=!0,f=I}else u=!1,f=-1,o&&(o.p.push(c),c={start:t,end:n,spans:[]},o.y2=_,o.name="region_"+o.x+"_"+o.y1+"_"+o.y2,!1===h.hasOwnProperty(o.name)?(m.push(o),h[o.name]=o):(s=h[o.name],s.p.contat(o.p)),o=null)}o&&(o.p.push(c),o.y2=_+1,o.name="region_"+o.x+"_"+o.y1+"_"+o.y2,!1===h.hasOwnProperty(o.name)?(m.push(o),h[o.name]=o):(s=h[o.name],s.p.contat(o.p)),o=null);var C=[];for(_=0;_<m.length;++_){var D=m[_],O="sub_cea608_"+P++,w=document.createElement("div");
28
- w.id=O;var N=a(D);w.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+N;var L=document.createElement("div");L.className="paragraph bodyStyle",L.style.cssText=l(e);var x=document.createElement("div");x.className="cueUniWrapper",x.style.cssText="unicode-bidi: normal; direction: ltr;";for(var F=0;F<D.p.length;++F){var U=D.p[F],B=0;for(y=0;y<U.spans.length;++y){var k=U.spans[y];if(k.line.length>0){if(0!==y&&B!=k.row){var j=document.createElement("br");j.className="lineBreak",x.appendChild(j)}var K=!1;B===k.row&&(K=!0),B=k.row;var H=v[k.name],q=document.createElement("span");q.className="spanPadding "+k.name+" customSpanColor",q.style.cssText=l(e,H),0!==y&&K?y===U.spans.length-1?q.textContent=g(k.line):q.textContent=k.line:0===y&&U.spans.length>1&&k.row===U.spans[1].row?q.textContent=d(k.line):q.textContent=k.line.trim(),x.appendChild(q)}}}L.appendChild(x),w.appendChild(L);var Y={bodyStyle:90};for(y in v)v.hasOwnProperty(y)&&(Y[y]=90);C.push({type:"html",start:t,end:n,cueHTMLElement:w,cueID:O,cellResolution:[32,15],isFromCEA608:!0,regions:m,regionID:D.name,videoHeight:e.videoHeight,videoWidth:e.videoWidth,fontSize:Y||{defaultFontSize:"100"},lineHeight:{},linePadding:{}})}return C}function h(){Y.deleteAllTextTracks(),B=!1,k=null,H=null,q=null,Y=null,G=!1,V=null,z=!1,W=NaN,Q=[],X=null,Z=null,O=!1,ee=null}function m(e){O||t(),"CC1"===e.id||"CC3"===e.id?ee.push(e):D("Warning: Embedded track "+e.id+" not supported!")}function y(){O=!1,ee=[],ae=[null,null],ie=[],re=null}function T(){return B}function I(e){e&&(e.errHandler&&(L=e.errHandler),e.adapter&&(x=e.adapter),e.dashManifestModel&&(F=e.dashManifestModel),e.mediaController&&(U=e.mediaController),e.videoModel&&(X=e.videoModel),e.streamController&&(Z=e.streamController),e.textTracks&&(Y=e.textTracks),e.VTTParser&&(j=e.VTTParser),e.TTMLParser&&(K=e.TTMLParser))}function A(){for(var e=X.getElement(),t=e.textTracks,n=t.length,r=n-ee.length,i=Y.getCurrentTrackIdx(),a=0;a<n;a++){var o=t[a];if(B="showing"!==o.mode,"showing"===o.mode){if(i!==a&&(Y.setCurrentTrackIdx(a),Y.addCaptions(a,0,null),G&&a<r)){var s=U.getCurrentTrackFor("fragmentedText",Z.getActiveStreamInfo()),u=Q[a];u!==s&&(V.abortRequests(),Y.deleteTrackCues(s),U.setTrack(u),$=a)}break}}B&&Y.setCurrentTrackIdx(-1)}function M(e){var t=!1;return ee.length>1?t=e.id&&"CC1"===e.id:1===ee.length?e.id&&"CC"===e.id.substring(0,2)&&(t=!0):t=e.index===q[0].index,t}function b(e){var t;return e.search("vtt")>=0?t=j:(e.search("ttml")>=0||e.search("stpp")>=0)&&(t=K,t.setConfig({videoModel:X})),t}var C=this.context,D=(0,v["default"])(C).getInstance().log,O=!1,P=0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0,B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0,ae=void 0;return w={initialize:e,append:n,abort:h,getAllTracksAreDisabled:T,setTextTrack:A,setConfig:I,addEmbeddedTrack:m,resetEmbedded:y}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(173),o=r(a),s=n(87),u=r(s),l=n(49),f=r(l),d=n(67),c=r(d),g=n(1),p=r(g),h=n(4),v=r(h),m=n(19),_=r(m),y=n(39),E=r(y),T=n(71),S=r(T),I=n(52),R=r(I);i.__dashjs_factory_name="TextSourceBuffer",t["default"]=p["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){pe=c["default"].QUALITY_DEFAULT,he=!1,ve=0,me=Number.POSITIVE_INFINITY,ye=0,Ee=0,Se=null,Ie=O,Ae=0,Me=!1,be=!1,Ce=!1,De=!1}function n(e,t,n){Te=e,J(t),Pe=n,Le=(0,u["default"])(ne).getInstance(),Oe=(0,p["default"])(ne).getInstance(),we=(0,c["default"])(ne).getInstance(),xe=(0,C["default"])(ne).getInstance(),Ne=Pe.getScheduleController(),pe=we.getQualityFor(Te,Pe.getStreamInfo()),ie.on(E["default"].DATA_UPDATE_COMPLETED,j,this),ie.on(E["default"].INIT_FRAGMENT_LOADED,a,this),ie.on(E["default"].MEDIA_FRAGMENT_LOADED,l,this),ie.on(E["default"].QUALITY_CHANGE_REQUESTED,h,this),ie.on(E["default"].STREAM_COMPLETED,K,this),ie.on(E["default"].PLAYBACK_PROGRESS,y,this),ie.on(E["default"].PLAYBACK_TIME_UPDATED,y,this),ie.on(E["default"].PLAYBACK_RATE_CHANGED,Y,this),ie.on(E["default"].PLAYBACK_SEEKING,m,this),ie.on(E["default"].WALLCLOCK_TIME_UPDATED,q,this),ie.on(E["default"].CURRENT_TRACK_CHANGED,H,this,_["default"].EVENT_PRIORITY_HIGH),ie.on(E["default"].SOURCEBUFFER_APPEND_COMPLETED,g,this),ie.on(E["default"].SOURCEBUFFER_REMOVE_COMPLETED,B,this)}function r(e){if(!e||!_e||!Pe)return null;var t=null;try{t=se.createSourceBuffer(_e,e),t&&t.hasOwnProperty("initialize")&&t.initialize(Te,this)}catch(n){ue.mediaSourceError("Error creating "+Te+" source buffer.")}return Q(t),k(Pe.getRepresentationInfoForQuality(pe).MSETimeOffset),t}function i(){return Pe.getStreamInfo().id===le.getActiveStreamInfo().id}function a(e){e.fragmentModel===Pe.getFragmentModel()&&(re("Init fragment finished loading saving to",Te+"'s init cache"),xe.save(e.chunk),d(e.chunk))}function s(e,t){var n=xe.extract(e,Te,t);n?d(n):ie.trigger(E["default"].INIT_REQUESTED,{sender:ge})}function l(e){if(e.fragmentModel===Pe.getFragmentModel()){var t=e.chunk,n=t.bytes,r=t.quality,i=Pe.getRepresentationInfoForQuality(r),a=oe.getValue(),s=de.getEventsFor(a,i.mediaInfo,Pe),u=de.getEventsFor(a,i,Pe);if(s.length>0||u.length>0){var l=Pe.getFragmentModel().getRequests({state:o["default"].FRAGMENT_MODEL_EXECUTED,quality:r,index:t.index})[0],f=w(n,l,s,u);Pe.getEventController().addInbandEvents(f)}t.bytes=N(n),d(t)}}function d(e){be=!0,Re=e,se.append(Se,e),"video"===e.mediaInfo.type&&e.mediaInfo.embeddedCaptions&&ce.append(e.bytes,e)}function g(e){if(Se===e.buffer){if(e.error||!L())return e.error.code===f["default"].QUOTA_EXCEEDED_ERROR_CODE&&(me=.8*se.getTotalBufferedTime(Se)),void(e.error.code!==f["default"].QUOTA_EXCEEDED_ERROR_CODE&&L()||(ie.trigger(E["default"].QUOTA_EXCEEDED,{sender:ge,criticalBufferLevel:me}),U(F())));isNaN(Re.index)||(ye=Math.max(Re.index,ye),R());var t=se.getAllRanges(Se);if(t&&t.length>0)for(var n=0,r=t.length;n<r;n++)re("Buffered Range for type:",Te,":",t.start(n)," - ",t.end(n));y(),be=!1,ie.trigger(E["default"].BYTES_APPENDED,{sender:ge,quality:Re.quality,startTime:Re.start,index:Re.index,bufferedRanges:t})}}function h(e){pe!==e.newQuality&&Te===e.mediaType&&Pe.getStreamInfo().id===e.streamInfo.id&&(k(Pe.getRepresentationInfoForQuality(e.newQuality).MSETimeOffset),pe=e.newQuality)}function m(){Ee=0,he=!1,y()}function y(){T(),I()}function T(){ve=se.getBufferLength(Se,Oe.getTime()),ie.trigger(E["default"].BUFFER_LEVEL_UPDATED,{sender:ge,bufferLevel:ve}),A()}function I(){i()&&(ae.addBufferState(Te,Ie,Ne.getBufferTarget()),ae.addBufferLevel(Te,new Date,1e3*ve))}function R(){var e=ye===Ee-1;e&&!he&&(he=!0,ie.trigger(E["default"].BUFFERING_COMPLETED,{sender:ge,streamInfo:Pe.getStreamInfo()}))}function A(){b(ve<P&&!he?O:D)}function b(e){Ie===e||"fragmentedText"===Te&&ce.getAllTracksAreDisabled()||(Ie=e,I(),ie.trigger(E["default"].BUFFER_LEVEL_STATE_CHANGED,{sender:ge,state:e,mediaType:Te,streamInfo:Pe.getStreamInfo()}),ie.trigger(e===D?E["default"].BUFFER_LOADED:E["default"].BUFFER_EMPTY,{mediaType:Te}),re(e===D?"Got enough buffer to start.":"Waiting for more buffer before starting playback."))}function w(e,t,n,r){var i=Math.max(isNaN(t.startTime)?0:t.startTime,0),a=[],o=[];De=!1;for(var s=n.concat(r),u=0,l=s.length;u<l;u++)a[s[u].schemeIdUri]=s[u];for(var f=(0,S["default"])(ne).getInstance().parse(e),d=f.getBoxes("emsg"),u=0,l=d.length;u<l;u++){var c=de.getEvent(d[u],a,i);c&&o.push(c)}return o}function N(e){if(!De)return e;for(var t=e.length,n=Math.pow(256,2),r=Math.pow(256,3),i=new Uint8Array(e.length),a=0,o=0;a<t;){var s=String.fromCharCode(e[a+4],e[a+5],e[a+6],e[a+7]),u=e[a]*r+e[a+1]*n+256*e[a+2]+1*e[a+3];if("emsg"!=s)for(var l=a;l<a+u;l++)i[o]=e[l],o++;a+=u}return i.subarray(0,o)}function L(){var e=se.getTotalBufferedTime(Se);return e<me}function x(){if("fragmentedText"!==Te){var e=Se.buffered.length?Se.buffered.start(0):0,t=Oe.getTime()-e-Le.getBufferToKeep();t>0&&(re("pruning buffer: "+t+" seconds."),Ce=!0,se.remove(Se,0,Math.round(e+t),_e))}}function F(){if(!Se)return null;var e=Oe.getTime(),t=Pe.getFragmentModel().getRequests({state:o["default"].FRAGMENT_MODEL_EXECUTED,time:e})[0],n=se.getBufferRange(Se,e),r=t&&!isNaN(t.startTime)?t.startTime:Math.floor(e);return null===n&&Se.buffered.length>0&&(r=Se.buffered.end(Se.buffered.length-1)),{start:Se.buffered.start(0),end:r}}function U(e){e&&Se&&se.remove(Se,e.start,e.end,_e)}function B(e){Se===e.buffer&&(Ce&&(Ce=!1),T(),ie.trigger(E["default"].BUFFER_CLEARED,{sender:ge,from:e.from,to:e.to,hasEnoughSpaceToAppend:L()}))}function k(e){Se&&Se.timestampOffset!==e&&!isNaN(e)&&(Se.timestampOffset=e)}function j(e){e.sender.getStreamProcessor()!==Pe||e.error||k(e.currentRepresentation.MSETimeOffset)}function K(e){e.fragmentModel===Pe.getFragmentModel()&&(Ee=e.request.index,R())}function H(e){Se&&e.newMediaInfo.type===Te&&e.newMediaInfo.streamInfo.id===Pe.getStreamInfo().id&&fe.getSwitchMode(Te)===v["default"].TRACK_SWITCH_MODE_ALWAYS_REPLACE&&U(F())}function q(){Ae++;var e=Ae*(Le.getWallclockTimeUpdateInterval()/1e3);e>=Le.getBufferPruningInterval()&&!be&&(Ae=0,x())}function Y(){A()}function G(){return Te}function V(){return Pe}function z(e){Pe=e}function W(){return Se}function Q(e){Se=e}function X(){return ve}function Z(){return me}function J(e){_e=e}function $(){return _e}function ee(){return he}function te(e){ie.off(E["default"].DATA_UPDATE_COMPLETED,j,this),ie.off(E["default"].QUALITY_CHANGE_REQUESTED,h,this),ie.off(E["default"].INIT_FRAGMENT_LOADED,a,this),ie.off(E["default"].MEDIA_FRAGMENT_LOADED,l,this),ie.off(E["default"].STREAM_COMPLETED,K,this),ie.off(E["default"].CURRENT_TRACK_CHANGED,H,this),ie.off(E["default"].PLAYBACK_PROGRESS,y,this),ie.off(E["default"].PLAYBACK_TIME_UPDATED,y,this),ie.off(E["default"].PLAYBACK_RATE_CHANGED,Y,this),ie.off(E["default"].PLAYBACK_SEEKING,m,this),ie.off(E["default"].WALLCLOCK_TIME_UPDATED,q,this),ie.off(E["default"].SOURCEBUFFER_APPEND_COMPLETED,g,this),ie.off(E["default"].SOURCEBUFFER_REMOVE_COMPLETED,B,this),me=Number.POSITIVE_INFINITY,Ie=O,pe=c["default"].QUALITY_DEFAULT,Ee=0,ye=0,Re=null,Me=!1,he=!1,be=!1,Ce=!1,Oe=null,Pe=null,we=null,Ne=null,e||(se.abort(_e,Se),se.removeSourceBuffer(_e,Se)),Se=null}var ne=this.context,re=(0,M["default"])(ne).getInstance().log,ie=(0,_["default"])(ne).getInstance(),ae=e.metricsModel,oe=e.manifestModel,se=e.sourceBufferController,ue=e.errHandler,le=e.streamController,fe=e.mediaController,de=e.adapter,ce=e.textSourceBuffer,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0,De=void 0,Oe=void 0,Pe=void 0,we=void 0,Ne=void 0,Le=void 0,xe=void 0;return ge={initialize:n,createBuffer:r,getType:G,getStreamProcessor:V,setStreamProcessor:z,getBuffer:W,setBuffer:Q,getBufferLevel:X,getCriticalBufferLevel:Z,setMediaSource:J,getMediaSource:$,getIsBufferingCompleted:ee,switchInitData:s,reset:te},t(),ge}Object.defineProperty(t,"__esModule",{value:!0});var a=n(30),o=r(a),s=n(5),u=r(s),l=n(28),f=r(l),d=n(10),c=r(d),g=n(9),p=r(g),h=n(13),v=r(h),m=n(3),_=r(m),y=n(2),E=r(y),T=n(49),S=r(T),I=n(1),R=r(I),A=n(4),M=r(A),b=n(68),C=r(b),D="bufferLoaded",O="bufferStalled",P=.5;i.__dashjs_factory_name="BufferController";var w=R["default"].getClassFactory(i);w.BUFFER_LOADED=D,w.BUFFER_EMPTY=O,t["default"]=w,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){T=[]}function t(e){!_||_.readyState<2||(_.playbackRate=e)}function n(e){if(_.currentTime!=e)try{_.currentTime=e}catch(t){0===_.readyState&&t.code===t.INVALID_STATE_ERR&&setTimeout(function(){_.currentTime=e},400)}}function r(){return _}function i(e){_=e,_.preload="auto"}function a(e){e?_.src=e:(_.removeAttribute("src"),_.load())}function o(){return _.src}function s(){return E}function u(e){E=e}function l(){return y}function f(e){y=e,y.style.position="absolute",y.style.display="flex",y.style.overflow="hidden",y.style.pointerEvents="none",y.style.top=0,y.style.left=0}function d(e,t){h(e,t)}function c(){return T.length>0}function g(e){var n=void 0;null===e||_.seeking||T.indexOf(e)!==-1||(T.push(e),1===T.length&&(n=document.createEvent("Event"),n.initEvent("waiting",!0,!1),S=_.playbackRate,t(0),_.dispatchEvent(n)))}function p(e){var n=T.indexOf(e),r=void 0;null!==e&&(n!==-1&&T.splice(n,1),c()===!1&&0===_.playbackRate&&(r=document.createEvent("Event"),r.initEvent("playing",!0,!1),t(S||1),_.dispatchEvent(r)))}function h(e,t){t?g(e):p(e)}function v(){var e="webkitDroppedFrameCount"in _,t="getVideoPlaybackQuality"in _,n=null;return t?n=_.getVideoPlaybackQuality():e&&(n={droppedVideoFrames:_.webkitDroppedFrameCount,creationTime:new Date}),n}var m=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0;return m={initialize:e,setCurrentTime:n,setStallState:d,getElement:r,setElement:i,setSource:a,getSource:o,getVideoContainer:s,setVideoContainer:u,getTTMLRenderingDiv:l,setTTMLRenderingDiv:f,getPlaybackQuality:v}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="VideoModel",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){pe=null,ce=[],Re=(0,E["default"])(z).getInstance(),ve=!0,me=!1,_e=!1,Ae=!1,Me=!0,be=null,ye=!1,Ee=!1}function t(e,t){ve=e,he=t,de.initialize(),le=(0,b["default"])(z).getInstance(),J=(0,f["default"])(z).getInstance(),J.setConfig({log:W,manifestModel:ee,dashManifestModel:te}),J.initialize($),Se=(0,_["default"])(z).getInstance(),Ie=(0,o["default"])(z).getInstance(),Ie.setConfig({streamController:X,timelineConverter:de,metricsModel:re,dashMetrics:ie,manifestModel:ee,dashManifestModel:te,adapter:ne,videoModel:Se}),Q.on(p["default"].TIME_SYNCHRONIZATION_COMPLETED,L,this),Q.on(p["default"].PLAYBACK_SEEKING,g,this),Q.on(p["default"].PLAYBACK_TIME_UPDATED,l,this),Q.on(p["default"].PLAYBACK_ENDED,d,this),Q.on(p["default"].PLAYBACK_ERROR,s,this),Q.on(p["default"].PLAYBACK_STARTED,h,this),Q.on(p["default"].PLAYBACK_PAUSED,m,this),Q.on(p["default"].MANIFEST_UPDATED,x,this),Q.on(p["default"].STREAM_BUFFERING_COMPLETED,y,this)}function n(e,t){t=t||new Date,be&&(ge&&ge.getProcessors().forEach(function(n){var r=n.getScheduleController();r&&r.finalisePlayList(t,e)}),re.addPlayList(be),be=null)}function r(e){be=new I.PlayList,be.start=new Date,be.mstart=1e3*Ie.getTime(),be.starttype=e,ge&&ge.getProcessors().forEach(function(e){var t=e.getScheduleController();t&&t.setPlayList(be)})}function i(e,t,n){Q.trigger(e,{fromStreamInfo:t?t.getStreamInfo():null,toStreamInfo:n.getStreamInfo()})}function a(){ge.isActivated()&&Me&&0===ge.getStreamInfo().index&&(ge.startEventController(),ve&&Ie.play())}function s(e){if(e.error){var t="";switch(e.error.code){case 1:t="MEDIA_ERR_ABORTED";break;case 2:t="MEDIA_ERR_NETWORK";break;case 3:t="MEDIA_ERR_DECODE";break;case 4:t="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:t="MEDIA_ERR_ENCRYPTED";break;default:t="UNKNOWN"}ye=!0,e.error.msExtendedCode&&(t+=" (0x"+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),W("Video Element Error: "+t),e.error&&W(e.error),fe.mediaSourceError(t),G()}}function l(e){if(F()){var t=Se.getPlaybackQuality();t&&re.addDroppedFrames("video",t)}Ie.isSeeking()||e.timeToEnd<V&&oe.signalEndOfStream(Te)}function d(){var e=T();e&&C(ge,e,NaN),n(e?I.PlayListTrace.END_OF_PERIOD_STOP_REASON:I.PlayListTrace.END_OF_CONTENT_STOP_REASON)}function g(e){var t=S(e.seekTime);t&&t!==ge?(n(I.PlayListTrace.END_OF_PERIOD_STOP_REASON),C(ge,t,e.seekTime)):n(I.PlayListTrace.USER_REQUEST_STOP_REASON),r(I.PlayList.SEEK_START_REASON)}function h(){Me?(Me=!1,r(I.PlayList.INITIAL_PLAYOUT_START_REASON)):Ae&&(Ae=!1,r(I.PlayList.RESUME_FROM_PAUSE_START_REASON))}function m(e){e.ended||(Ae=!0,n(I.PlayListTrace.USER_REQUEST_STOP_REASON))}function y(e){Te&&e.streamInfo.isLast&&oe.signalEndOfStream(Te)}function T(){var e=ge.getStreamInfo().start,t=ge.getStreamInfo().duration;return ce.filter(function(n){return n.getStreamInfo().start===e+t})[0]}function S(e){var t=0,n=null,r=ce.length;r>0&&(t+=ce[0].getStartTime());for(var i=0;i<r;i++)if(n=ce[i],t+=n.getDuration(),e<t)return n;return null}function R(e,t){for(var n=null,r=0,i=0,a=null,o=ce.length,s=0;s<o;s++){if(n=ce[s],i=n.getStartTime(),a=n.getDuration(),Number.isFinite(i)&&(r=i),n.getId()===t)return e-r;Number.isFinite(a)&&(r+=a)}return null}function M(){var e=[];return ge.getProcessors().forEach(function(t){e.push(t.getIndexHandler().getEarliestTime())}),Math.min.apply(Math,e)}function C(e,t,n){function r(){isNaN(n)?!function(){var e=Ie.getStreamStartTime(!0);ge.getProcessors().forEach(function(t){ne.setIndexHandlerTime(t,e)}),Ie.seek(e)}():Ie.seek(n),Ie.play(),ge.startEventController(),me=!1,i(p["default"].PERIOD_SWITCH_COMPLETED,e,t)}!me&&e&&t&&e!==t&&(me=!0,i(p["default"].PERIOD_SWITCH_STARTED,e,t),e.deactivate(),ge=t,Ie.initialize(ge.getStreamInfo()),Ce=U(),D(r))}function D(e){function t(){W("MediaSource is open!"),window.URL.revokeObjectURL(n),Te.removeEventListener("sourceopen",t),Te.removeEventListener("webkitsourceopen",t),O(),ge.activate(Te),e&&e()}var n=void 0;Te?oe.detachMediaSource(Se):Te=oe.createMediaSource(),Te.addEventListener("sourceopen",t,!1),Te.addEventListener("webkitsourceopen",t,!1),n=oe.attachMediaSource(Te,Se),W("MediaSource attached to element. Waiting on open...")}function O(){var e,t;e=ge.getStreamInfo().manifestInfo.duration,t=oe.setDuration(Te,e),W("Duration successfully set to: "+t)}function P(){var e,t,n,r,a,o,s,l=ee.getValue(),f=re.getMetricsFor("stream"),d=ie.getCurrentManifestUpdate(f),c=[];if(l){o=ne.getStreamsInfo(l),pe&&(Q.trigger(p["default"].PROTECTION_CREATED,{controller:pe,manifest:l}),pe.setMediaElement(Se.getElement()),he&&pe.setProtectionData(he));try{if(0===o.length)throw new Error("There are no streams");for(re.updateManifestUpdateInfo(d,{currentTime:Ie.getTime(),buffered:Se.getElement().buffered,presentationStartTime:o[0].start,clientTimeOffset:de.getClientTimeOffset()}),_e=!0,r=0,t=o.length;r<t;r++){for(e=o[r],a=0,n=ce.length;a<n;a++)ce[a].getId()===e.id&&(s=ce[a],c.push(s),s.updateData(e));s||(s=(0,u["default"])(z).create({manifestModel:ee,manifestUpdater:J,adapter:ne,timelineConverter:de,capabilities:Z,errHandler:fe,baseURLController:ue}),s.initialize(e,pe),Q.on(p["default"].STREAM_INITIALIZED,N,this),c.push(s),ge&&s.updateData(e)),re.addManifestUpdateStreamInfo(d,e.id,e.index,e.start,e.duration),s=null}ce=c,ge||(ge=ce[0],i(p["default"].PERIOD_SWITCH_STARTED,null,ge),Ie.initialize(ge.getStreamInfo()),i(p["default"].PERIOD_SWITCH_COMPLETED,null,ge)),Te||D(),_e=!1,w()}catch(g){fe.manifestError(g.message,"nostreamscomposed",l),Ee=!0,G()}}}function w(){if(!_e){var e=ce.length,t=0;for(a(),t;t<e;t++)if(!ce[t].isInitialized())return;Q.trigger(p["default"].STREAMS_COMPOSED)}}function N(){w()}function L(){P()}function x(e){if(e.error)Ee=!0,G();else{var t,n,r=e.manifest,i=ne.getStreamsInfo(r)[0],a=ne.getMediaInfoForType(r,i,"video")||ne.getMediaInfoForType(r,i,"audio");a&&(t=ne.getDataForMedia(a),n=te.getRepresentationsForAdaptation(r,t)[0].useCalculatedLiveEdgeTime,n&&(W("SegmentTimeline detected using calculated Live Edge Time"),Re.setUseManifestDateHeaderTimeSource(!1)));var o=te.getUTCTimingSources(e.manifest),s=!te.getIsDynamic(r)||n?o:o.concat(Re.getUTCTimingSources()),u=(0,v["default"])(z).getInstance().isManifestHTTPS();s.forEach(function(e){e.value.replace(/.*?:\/\//g,"")===E["default"].DEFAULT_UTC_TIMING_SOURCE.value.replace(/.*?:\/\//g,"")&&(e.value=e.value.replace(u?new RegExp(/^(http:)?\/\//i):new RegExp(/^(https:)?\/\//i),u?"https://":"http://"),W("Matching default timing source protocol to manifest protocol: ",e.value))}),ue.initialize(r),se.setConfig({metricsModel:re,dashMetrics:ie}),se.initialize(s,Re.getUseManifestDateHeaderTimeSource())}}function F(){return void 0===Ce&&(Ce=U()),Ce}function U(){var e=!1;return ge.getProcessors().forEach(function(t){"video"===t.getMediaInfo().type&&(e=!0)}),e}function B(){return ve}function k(){return ge?ge.getStreamInfo():null}function j(e){return ge.getId()===e.id}function K(e){return ce.filter(function(t){return t.getId()===e})[0]}function H(e){$.load(e)}function q(e){J.setManifest(e)}function Y(e){e&&(e.capabilities&&(Z=e.capabilities),e.manifestLoader&&($=e.manifestLoader),e.manifestModel&&(ee=e.manifestModel),e.dashManifestModel&&(te=e.dashManifestModel),e.protectionController&&(pe=e.protectionController),e.adapter&&(ne=e.adapter),e.metricsModel&&(re=e.metricsModel),e.dashMetrics&&(ie=e.dashMetrics),e.liveEdgeFinder&&(ae=e.liveEdgeFinder),e.mediaSourceController&&(oe=e.mediaSourceController),e.timeSyncController&&(se=e.timeSyncController),e.baseURLController&&(ue=e.baseURLController),e.errHandler&&(fe=e.errHandler),e.timelineConverter&&(de=e.timelineConverter))}function G(){se.reset(),n(ye||Ee?I.PlayListTrace.FAILURE_STOP_REASON:I.PlayListTrace.USER_REQUEST_STOP_REASON);for(var e=0,t=ce.length;e<t;e++){var r=ce[e];Q.off(p["default"].STREAM_INITIALIZED,N,this),r.reset(ye)}ce=[],Q.off(p["default"].PLAYBACK_TIME_UPDATED,l,this),Q.off(p["default"].PLAYBACK_SEEKING,g,this),Q.off(p["default"].PLAYBACK_ERROR,s,this),Q.off(p["default"].PLAYBACK_STARTED,h,this),Q.off(p["default"].PLAYBACK_PAUSED,m,this),Q.off(p["default"].PLAYBACK_ENDED,d,this),Q.off(p["default"].MANIFEST_UPDATED,x,this),Q.off(p["default"].STREAM_BUFFERING_COMPLETED,y,this),ue.reset(),J.reset(),re.clearAllCurrentMetrics(),ee.setValue(null),$.reset(),de.reset(),ae.reset(),ne.reset(),le.reset(),me=!1,_e=!1,ge=null,ye=!1,Ee=!1,Ce=void 0,Me=!0,Ae=!1,Te&&(oe.detachMediaSource(Se),Te=null),Se=null,pe&&(pe.setMediaElement(null),pe=null,he=null,ee.getValue()&&Q.trigger(p["default"].PROTECTION_DESTROYED,{data:ee.getValue().url})),Q.trigger(p["default"].STREAM_TEARDOWN_COMPLETE)}var V=1,z=this.context,W=(0,A["default"])(z).getInstance().log,Q=(0,c["default"])(z).getInstance(),X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0;return X={initialize:t,getAutoPlay:B,getActiveStreamInfo:k,isStreamActive:j,isVideoTrackPresent:F,getStreamById:K,getTimeRelativeToStreamId:R,load:H,loadWithManifest:q,getActiveStreamCommonEarliestTime:M,setConfig:Y,reset:G},e(),X}Object.defineProperty(t,"__esModule",{value:!0});var a=n(9),o=r(a),s=n(101),u=r(s),l=n(99),f=r(l),d=n(3),c=r(d),g=n(2),p=r(g),h=n(40),v=r(h),m=n(19),_=r(m),y=n(5),E=r(y),T=n(1),S=r(T),I=n(70),R=n(4),A=r(R),M=n(68),b=r(M);i.__dashjs_factory_name="StreamController",t["default"]=S["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(34),s=r(o),u=function(){function e(){i(this,e)}return a(e,null,[{key:"findCencContentProtection",value:function(e){for(var t=null,n=0;n<e.length;++n){var r=e[n];"urn:mpeg:dash:mp4protection:2011"===r.schemeIdUri.toLowerCase()&&"cenc"===r.value.toLowerCase()&&(t=r)}return t}},{key:"getPSSHData",value:function(e){var t=8,n=new DataView(e),r=n.getUint8(t);return t+=20,r>0&&(t+=4+16*n.getUint32(t)),t+=4,e.slice(t)}},{key:"getPSSHForKeySystem",value:function(t,n){var r=e.parsePSSHList(n);return r.hasOwnProperty(t.uuid.toLowerCase())?r[t.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(e){return"pssh"in e?s["default"].decodeArray(e.pssh.__text).buffer:null}},{key:"parsePSSHList",value:function(e){if(null===e)return[];for(var t=new DataView(e),n=!1,r={},i=0;!n;){var a,o,s,u,l,f=i;if(i>=t.buffer.byteLength)break;if(a=t.getUint32(i),o=i+a,i+=4,1886614376===t.getUint32(i))if(i+=4,s=t.getUint8(i),0===s||1===s){i++,i+=3,u="";var d,c;for(d=0;d<4;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=4,u+="-",d=0;d<2;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=2,u+="-",d=0;d<2;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=2,u+="-",d=0;d<2;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=2,u+="-",d=0;d<6;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;i+=6,u=u.toLowerCase(),l=t.getUint32(i),i+=4,r[u]=t.buffer.slice(f,o),i=o}else i=o;else i=o}return r}}]),e}();t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var t="";return e.indexOf("/")!==-1&&(e.indexOf("?")!==-1&&(e=e.substring(0,e.indexOf("?"))),t=e.substring(0,e.lastIndexOf("/")+1)),t}function t(e){var t=e.match(u);return t?t[1]:""}function n(e){return!o.test(e)}function r(e){return o.test(e)&&"/"===e.charAt(0)}function i(e){return s.test(e)}var a=void 0,o=/^(?:(?:[a-z]+:)?\/)?\//i,s=/^https?:\/\//i,u=/^(https?:\/\/[^\/]+)\/?/i;return a={parseBaseUrl:e,parseOrigin:t,isRelative:n,isPathAbsolute:r,isHTTPURL:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="URLUtils",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.action=i.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"};r.ACTION_DOWNLOAD="download",r.ACTION_COMPLETE="complete",t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){n(this,e)}return r(e,[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e)!e.hasOwnProperty(i)||this[i]&&!n||r&&e[i].indexOf("public_")===-1||(this[i]=e[i])}}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(;e.length<t;)e="0"+e;return e}function a(e,t){return e.representation.startNumber+t}function o(e,t,n){for(var r,a,o,s,u,l,f="%0",d=t.length,c=f.length;;){if(r=e.indexOf("$"+t),r<0)return e;if(a=e.indexOf("$",r+d),a<0)return e;if(o=e.indexOf(f,r+d),o>r&&o<a)switch(s=e.charAt(a-1),u=parseInt(e.substring(o+c,a-1),10),s){case"d":case"i":case"u":l=i(n.toString(),u);break;case"x":l=i(n.toString(16),u);break;case"X":l=i(n.toString(16),u).toUpperCase();break;case"o":l=i(n.toString(8),u);break;default:return e}else l=n;e=e.substring(0,r)+l+e.substring(a+1)}}function s(e,t,n,r){var i,o,s,u;return o=n.segmentDuration,isNaN(o)&&(o=n.adaptation.period.duration),s=n.adaptation.period.start+r*o,u=s+o,i=new g["default"],i.representation=n,i.duration=o,i.presentationStartTime=s,i.mediaStartTime=e.calcMediaTimeFromPresentationTime(i.presentationStartTime,n),i.availabilityStartTime=e.calcAvailabilityStartTimeFromPresentationTime(i.presentationStartTime,n.adaptation.period.mpd,t),i.availabilityEndTime=e.calcAvailabilityEndTimeFromPresentationTime(u,n.adaptation.period.mpd,t),i.wallStartTime=e.calcWallTimeForSegment(i,t),i.replacementNumber=a(i,r),i.availabilityIdx=r,i}function u(e,t,n,r,i,s,u,l,f){var d,c,p,h=r/s,v=Math.min(i/s,n.adaptation.period.mpd.maxSegmentDuration);return d=e.calcPresentationTimeFromMediaTime(h,n),c=d+v,p=new g["default"],p.representation=n,p.duration=v,p.mediaStartTime=h,p.presentationStartTime=d,p.availabilityStartTime=n.adaptation.period.mpd.manifest.loadedTime,p.availabilityEndTime=e.calcAvailabilityEndTimeFromPresentationTime(c,n.adaptation.period.mpd,t),p.wallStartTime=e.calcWallTimeForSegment(p,t),p.replacementTime=r,p.replacementNumber=a(p,f),u=o(u,"Number",p.replacementNumber),u=o(u,"Time",p.replacementTime),p.media=u,p.mediaRange=l,p.availabilityIdx=f,p}function l(e,t){if(!t||!t.segments)return null;var n,r,i=t.segments.length;if(e<i&&(n=t.segments[e],n&&n.availabilityIdx===e))return n;for(r=0;r<i;r++)if(n=t.segments[r],n&&n.availabilityIdx===e)return n;return null}function f(e,t,n,r,i){var a,o,s,u=2,l=i||10,f=0,d=Number.POSITIVE_INFINITY;return t&&!e.isTimeSyncCompleted()?s={start:f,end:d}:!t&&n||r<0?null:(a=Math.max(r-u,f),o=Math.min(r+l,d),s={start:a,end:o})}function d(e,t,n,r,i,a){var o,s,u,f=n.segmentDuration,d=n.adaptation.period.mpd.manifest.minBufferTime,c=n.segmentAvailabilityRange,g={start:e.calcPeriodRelativeTimeFromMpdRelativeTime(n,c.start),end:e.calcPeriodRelativeTimeFromMpdRelativeTime(n,c.end)},p=n.segments,h=2*f,v=a||Math.max(2*d,10*f),m=NaN,_=null;return g.start=Math.max(g.start,0),t&&!e.isTimeSyncCompleted()?(o=Math.floor(g.start/f),s=Math.floor(g.end/f),u={start:o,end:s}):(p&&p.length>0?(_=l(i,n),m=_?e.calcPeriodRelativeTimeFromMpdRelativeTime(n,_.presentationStartTime):i>0?i*f:e.calcPeriodRelativeTimeFromMpdRelativeTime(n,r)):m=i>0?i*f:t?g.end:g.start,o=Math.floor(Math.max(m-h,g.start)/f),s=Math.floor(Math.min(o+v/f,g.end/f)),u={start:o,end:s})}Object.defineProperty(t,"__esModule",{value:!0}),t.replaceTokenForTemplate=o,t.getIndexBasedSegment=s,t.getTimeBasedSegment=u,t.getSegmentByIndex=l,t.decideSegmentListRangeForTimeline=f,t.decideSegmentListRangeForTemplate=d;var c=n(37),g=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){A=0,M=!1,b=NaN,I.on(u["default"].LIVE_EDGE_SEARCH_COMPLETED,_,this),I.on(u["default"].TIME_SYNCHRONIZATION_COMPLETED,y,this)}function t(){return M}function n(e){M=e}function r(){return A}function i(){return b}function a(e){b=e}function s(e,t,n,r){var i=NaN;return i=r?n&&t.timeShiftBufferDepth!=Number.POSITIVE_INFINITY?new Date(t.availabilityStartTime.getTime()+1e3*(e+t.timeShiftBufferDepth)):t.availabilityEndTime:n?new Date(t.availabilityStartTime.getTime()+1e3*(e-A)):t.availabilityStartTime}function l(e,t,n){return s.call(this,e,t,n)}function f(e,t,n){return s.call(this,e,t,n,!0)}function d(e,t){return(e.getTime()-t.mpd.availabilityStartTime.getTime()+1e3*A)/1e3}function c(e,t){var n=t.adaptation.period.start,r=t.presentationTimeOffset;return e+(n-r)}function g(e,t){var n=t.adaptation.period.start,r=t.presentationTimeOffset;return e-n+r}function p(e,t){var n,r,i;return t&&(n=e.representation.adaptation.period.mpd.suggestedPresentationDelay,r=e.presentationStartTime+n,i=new Date(e.availabilityStartTime.getTime()+1e3*r)),i}function h(e,t){var n,r,i=e.adaptation.period.start,a=i+e.adaptation.period.duration,o={start:i,end:a},s=e.segmentDuration||(e.segments&&e.segments.length?e.segments[e.segments.length-1].duration:0);if(!t)return o;if(!M&&e.segmentAvailabilityRange)return e.segmentAvailabilityRange;n=e.adaptation.period.mpd.checkTime,r=d(new Date,e.adaptation.period),i=Math.max(r-e.adaptation.period.mpd.timeShiftBufferDepth,e.adaptation.period.start);
29
- var u=isNaN(n)?r:Math.min(n,r),l=e.adaptation.period.start+e.adaptation.period.duration;return a=(u>=l&&u-s<l?l:u)-s,o={start:i,end:a}}function v(e,t){var n=e.adaptation.period.start;return t-n}function m(e,t){var n=e.adaptation.period.start;return t+n}function _(e){M||e.error||(A+=e.liveEdge-(b+e.searchTime),M=!0)}function y(e){M||e.error||(A=e.offset/1e3,M=!0)}function E(e){var t=e.presentationTimeOffset,n=e.adaptation.period.start;return n-t}function T(){I.off(u["default"].LIVE_EDGE_SEARCH_COMPLETED,_,this),I.off(u["default"].TIME_SYNCHRONIZATION_COMPLETED,y,this),A=0,M=!1,b=NaN}var S=this.context,I=(0,o["default"])(S).getInstance(),R=void 0,A=void 0,M=void 0,b=void 0;return R={initialize:e,isTimeSyncCompleted:t,setTimeSyncCompleted:n,getClientTimeOffset:r,getExpectedLiveEdge:i,setExpectedLiveEdge:a,calcAvailabilityStartTimeFromPresentationTime:l,calcAvailabilityEndTimeFromPresentationTime:f,calcPresentationTimeFromWallTime:d,calcPresentationTimeFromMediaTime:c,calcPeriodRelativeTimeFromMpdRelativeTime:v,calcMpdRelativeTimeFromPeriodRelativeTime:m,calcMediaTimeFromPresentationTime:g,calcSegmentAvailabilityRange:h,calcWallTimeForSegment:p,calcMSETimeOffset:E,reset:T}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="TimelineConverter",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){function t(){var e;h=[],v=[],m=[],e={},i(e,o.HTTPRequest.MPD_TYPE,c["default"].DOWNLOAD_ERROR_ID_MANIFEST),i(e,o.HTTPRequest.XLINK_EXPANSION_TYPE,c["default"].DOWNLOAD_ERROR_ID_XLINK),i(e,o.HTTPRequest.INIT_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_INITIALIZATION),i(e,o.HTTPRequest.MEDIA_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),i(e,o.HTTPRequest.INDEX_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),i(e,o.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),i(e,o.HTTPRequest.OTHER_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),_=e}function n(e,t){var r=e.request,i=new XMLHttpRequest,a=[],o=!0,s=!0,f=new Date,c=f,p=0,y=function(e){s=!1,r.requestStartDate=f,r.requestEndDate=new Date,r.firstByteDate=r.firstByteDate||f,r.checkExistenceOnly||d.addHttpRequest(r.mediaType,null,r.type,r.url,i.responseURL||null,r.serviceLocation||null,r.range||null,r.requestStartDate,r.firstByteDate,r.requestEndDate,i.status,r.duration,i.getAllResponseHeaders(),e?a:null)},E=function(){h.indexOf(i)!==-1&&(h.splice(h.indexOf(i),1),s&&(y(!1),t>0?(t--,m.push(setTimeout(function(){n(e,t)},u.getRetryIntervalForType(r.type)))):(l.downloadError(_[r.type],r.url,r),e.error&&e.error(r,"error",i.statusText),e.complete&&e.complete(r,i.statusText))))},T=function(t){var n=new Date;o&&(o=!1,(!t.lengthComputable||t.lengthComputable&&t.total!==t.loaded)&&(r.firstByteDate=n)),t.lengthComputable&&(r.bytesLoaded=t.loaded,r.bytesTotal=t.total),a.push({s:c,d:n.getTime()-c.getTime(),b:[t.loaded?t.loaded-p:0]}),c=n,p=t.loaded,e.progress&&e.progress()},S=function(){i.status>=200&&i.status<=299&&(y(!0),e.success&&e.success(i.response,i.statusText,i),e.complete&&e.complete(r,i.statusText))};try{var I=g.modifyRequestURL(r.url),R=r.checkExistenceOnly?"HEAD":"GET";i.open(R,I,!0),r.responseType&&(i.responseType=r.responseType),r.range&&i.setRequestHeader("Range","bytes="+r.range),r.requestStartDate||(r.requestStartDate=f),i=g.modifyRequestHeader(i),i.withCredentials=u.getXHRWithCredentials(),i.onload=S,i.onloadend=E,i.onerror=E,i.onprogress=T;var A=(new Date).getTime();isNaN(r.delayLoadingTime)||A>=r.delayLoadingTime?(h.push(i),i.send()):!function(){var e={xhr:i};v.push(e),e.delayTimeout=setTimeout(function(){if(v.indexOf(e)!==-1){v.splice(v.indexOf(e),1);try{h.push(e.xhr),e.xhr.send()}catch(t){e.xhr.onerror()}}},r.delayLoadingTime-A)}()}catch(M){i.onerror()}}function r(e){e.request&&n(e,u.getRetryAttemptsForType(e.request.type))}function a(){m.forEach(function(e){return clearTimeout(e)}),m=[],v.forEach(function(e){return clearTimeout(e.delayTimeout)}),v=[],h.forEach(function(e){e.onloadend=e.onerror=e.onprogress=void 0,e.abort()}),h=[]}var s=this.context,u=(0,f["default"])(s).getInstance(),l=e.errHandler,d=e.metricsModel,g=e.requestModifier,p=void 0,h=void 0,v=void 0,m=void 0,_=void 0;return p={load:r,abort:a},t(),p}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),s=n(1),u=r(s),l=n(5),f=r(l),d=n(11),c=r(d);a.__dashjs_factory_name="XHRLoader";var g=u["default"].getClassFactory(a);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n=t.codec,r=null;try{if(n.match(/application\/mp4;\s*codecs="(stpp|wvtt)"/i))throw new R["default"]("not really supported");r=e.addSourceBuffer(n)}catch(i){if(!t.isText&&n.indexOf('codecs="stpp"')===-1&&n.indexOf('codecs="wvtt"')===-1)throw i;r=(0,o["default"])(y).getInstance(),r.setConfig({errHandler:(0,c["default"])(y).getInstance(),adapter:(0,f["default"])(y).getInstance(),dashManifestModel:A,mediaController:(0,u["default"])(y).getInstance(),videoModel:(0,S["default"])(y).getInstance(),streamController:(0,p["default"])(y).getInstance(),textTracks:(0,v["default"])(y).getInstance(),VTTParser:(0,_["default"])(y).getInstance(),TTMLParser:(0,E["default"])(y).getInstance()})}return r}function t(e,t){try{e.removeSourceBuffer(t)}catch(n){}}function n(e,t,n){var r,i,a=null,o=0,s=0,u=null,l=null,f=0,d=n||.15;try{a=e.buffered}catch(c){return null}if(null!==a&&void 0!==a){for(i=0,r=a.length;i<r;i++)if(o=a.start(i),s=a.end(i),null===u)f=Math.abs(o-t),t>=o&&t<s?(u=o,l=s):f<=d&&(u=o,l=s);else{if(f=o-l,!(f<=d))break;l=s}if(null!==u)return{start:u,end:l}}return null}function r(e){var t=null;try{return t=e.buffered}catch(n){return null}}function i(e){var t,n,i=r(e),a=0;if(!i)return a;for(n=0,t=i.length;n<t;n++)a+=i.end(n)-i.start(n);return a}function a(e,t,r){var i,a;return i=n(e,t,r),a=null===i?0:i.end-t}function s(e,t){if(!t)return null;var n,i,a,o,s,u,l,f,d,c=r(t);if(!c)return null;for(var g=0,p=c.length;g<p;g++){if(f=e.length>g,s=f?{start:e.start(g),end:e.end(g)}:null,n=c.start(g),i=c.end(g),!s)return d={start:n,end:i};if(a=s.start===n,o=s.end===i,!a||!o){if(a)d={start:s.end,end:i};else{if(!o)return d={start:n,end:i};d={start:n,end:s.start}}return u=e.length>g+1?{start:e.start(g+1),end:e.end(g+1)}:null,l=g+1<p?{start:c.start(g+1),end:c.end(g+1)}:null,!u||l&&l.start===u.start&&l.end===u.end||(d.end=u.start),d}}return null}function l(e,t){var n=t.bytes,r="append"in e?"append":"appendBuffer"in e?"appendBuffer":null,i="Object"===Object.prototype.toString.call(e).slice(8,-1);if(r)try{m(e,function(){i?e[r](n,t):e[r](n),m(e,function(){T.trigger(C["default"].SOURCEBUFFER_APPEND_COMPLETED,{buffer:e,bytes:n})})})}catch(a){T.trigger(C["default"].SOURCEBUFFER_APPEND_COMPLETED,{buffer:e,bytes:n,error:new R["default"](a.code,a.message,null)})}}function d(e,t,n,r){try{m(e,function(){t>=0&&n>t&&"ended"!==r.readyState&&e.remove(t,n),m(e,function(){T.trigger(C["default"].SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:t,to:n})})})}catch(i){T.trigger(C["default"].SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:t,to:n,error:new R["default"](i.code,i.message,null)})}}function g(e,t){try{"open"===e.readyState?t.abort():t.setTextTrack&&"ended"===e.readyState&&t.abort()}catch(n){}}function h(e){e&&e.dashManifestModel&&(A=e.dashManifestModel)}function m(e,t){var n,r=50,i=function(){e.updating||(clearInterval(n),t())},a=function s(){e.updating||(e.removeEventListener("updateend",s,!1),t())};if(!e.updating)return void t();if("function"==typeof e.addEventListener)try{e.addEventListener("updateend",a,!1)}catch(o){n=setInterval(i,r)}else n=setInterval(i,r)}var y=this.context,T=(0,M["default"])(y).getInstance(),I=void 0,A=void 0;return I={append:l,remove:d,abort:g,createSourceBuffer:e,removeSourceBuffer:t,getBufferRange:n,getAllRanges:r,getTotalBufferedTime:i,getBufferLength:a,getRangeDifference:s,setConfig:h}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(17),o=r(a),s=n(13),u=r(s),l=n(15),f=r(l),d=n(11),c=r(d),g=n(20),p=r(g),h=n(39),v=r(h),m=n(164),_=r(m),y=n(163),E=r(y),T=n(19),S=r(T),I=n(6),R=r(I),A=n(3),M=r(A),b=n(2),C=r(b),D=n(1),O=r(D),P=22;i.__dashjs_factory_name="SourceBufferController";var w=O["default"].getSingletonFactory(i);w.QUOTA_EXCEEDED_ERROR_CODE=P,t["default"]=w,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",this.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer"}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){D=null,w=null,O=[],P=[],M.on(u["default"].LOADING_COMPLETED,S,C)}function n(e){w=e}function r(e){D=e}function i(){return D}function a(e){var t=function(e,t){return e.action===c["default"].ACTION_COMPLETE&&e.action===t.action},n=function(e,t){return!isNaN(e.index)&&e.startTime===t.startTime&&e.adaptationIndex===t.adaptationIndex},r=function(e,t){return isNaN(e.index)&&isNaN(t.index)&&e.quality===t.quality},i=function(i){var a=!1;return i.some(function(i){if(n(e,i)||r(e,i)||t(e,i))return a=!0}),a};return i(O)}function s(e){var t=e.state instanceof Array?e.state:[e.state],n=[];return t.forEach(function(t){var r=E(t);n=n.concat(y(r,e))}),n}function l(e){O=O.filter(function(t){return isNaN(t.startTime)||t.startTime>=e})}function f(){w.abort(),P=[]}function d(e){switch(e.action){case c["default"].ACTION_COMPLETE:O.push(e),T(e,v),M.trigger(u["default"].STREAM_COMPLETED,{request:e,fragmentModel:this});break;case c["default"].ACTION_DOWNLOAD:T(e,h),P.push(e),g(e);break;default:A("Unknown request action.")}}function g(e){M.trigger(u["default"].FRAGMENT_LOADING_STARTED,{sender:C,request:e}),w.load(e)}function m(e,t,n){for(var r=e.length-1,i=r;i>=0;i--){var a=e[i],o=a.startTime,s=o+a.duration;if(n=void 0!==n?n:a.duration/2,!isNaN(o)&&!isNaN(s)&&t+n>=o&&t-n<s||isNaN(o)&&isNaN(t))return a}return null}function y(e,t){return t.hasOwnProperty("time")?[m(e,t.time,t.threshold)]:e.filter(function(e){for(var n in t)if("state"!==n&&t.hasOwnProperty(n)&&e[n]!=t[n])return!1;return!0})}function E(e){var t=void 0;switch(e){case h:t=P;break;case v:t=O;break;default:t=[]}return t}function T(e,t){b.addSchedulingInfo(e.mediaType,new Date,e.type,e.startTime,e.availabilityStartTime,e.duration,e.quality,e.range,t),b.addRequestsQueue(e.mediaType,P,O)}function S(e){e.sender===w&&(P.splice(P.indexOf(e.request),1),e.response&&!e.error&&O.push(e.request),T(e.request,e.error?_:v),M.trigger(u["default"].FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this}))}function I(){M.off(u["default"].LOADING_COMPLETED,S,this),w&&(w.reset(),w=null),O=[],P=[]}var R=this.context,A=(0,p["default"])(R).getInstance().log,M=(0,o["default"])(R).getInstance(),b=e.metricsModel,C=void 0,D=void 0,O=void 0,P=void 0,w=void 0;return C={setLoader:n,setScheduleController:r,getScheduleController:i,getRequests:s,isFragmentLoaded:a,removeExecutedRequestsBeforeTime:l,abortRequests:f,executeRequest:d,reset:I},t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d=n(23),c=r(d),g=n(4),p=r(g),h="loading",v="executed",m="canceled",_="failed";i.__dashjs_factory_name="FragmentModel";var y=f["default"].getClassFactory(i);y.FRAGMENT_MODEL_LOADING=h,y.FRAGMENT_MODEL_EXECUTED=v,y.FRAGMENT_MODEL_CANCELED=m,y.FRAGMENT_MODEL_FAILED=_,t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){return a}function t(e){a=e,e&&r.trigger(u["default"].MANIFEST_LOADED,{data:e})}var n=this.context,r=(0,o["default"])(n).getInstance(),i=void 0,a=void 0;return i={getValue:e,setValue:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="ManifestModel",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&e.log&&(y=e.log)}function t(){T=[];var e;e=(0,c["default"])(h).getInstance(),T.push(e),e=(0,f["default"])(h).getInstance(),T.push(e),e=(0,u["default"])(h).getInstance(),T.push(e),S=e}function n(){return T}function r(e){for(var t=0;t<T.length;t++)if(T[t].systemString===e)return T[t];return null}function i(e){return e===S}function a(e,t){if(e.byteLength===t.byteLength){for(var n=new Uint8Array(e),r=new Uint8Array(t),i=0;i<n.length;i++)if(n[i]!==r[i])return!1;return!0}return!1}function s(e){var t,n,r,i,a=[];if(e)for(r=0;r<T.length;++r)for(n=T[r],i=0;i<e.length;++i)if(t=e[i],t.schemeIdUri.toLowerCase()===n.schemeIdURI){var o=n.getInitData(t);o&&a.push({ks:T[r],initData:o})}return a}function l(e,t){var n,r=[],i=o["default"].parsePSSHList(e);for(n=0;n<T.length;++n){var a=T[n].systemString,s=!t||a in t;T[n].uuid in i&&s&&r.push({ks:T[n],initData:i[T[n].uuid]})}return r}function d(e,t,n){if("license-release"===n||"individualization-request"===n)return null;var r=null;return t&&t.hasOwnProperty("drmtoday")?r=(0,p["default"])(h).getInstance():"com.widevine.alpha"===e.systemString?r=(0,_["default"])(h).getInstance():"com.microsoft.playready"===e.systemString?r=(0,v["default"])(h).getInstance():"org.w3.clearkey"===e.systemString&&(r=(0,E["default"])(h).getInstance()),r}function g(e,t){try{return S.getClearKeysFromProtectionData(e,t)}catch(n){return y("Failed to retrieve clearkeys from ProtectionData"),null}}var h=this.context,m=void 0,y=void 0,T=void 0,S=void 0;return m={initialize:t,isClearKey:i,initDataEquals:a,getKeySystems:n,getKeySystemBySystemString:r,getSupportedKeySystemsFromContentProtection:s,getSupportedKeySystems:l,getLicenseServer:d,processClearKeyLicenseRequest:g,setConfig:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),o=r(a),s=n(135),u=r(s),l=n(137),f=r(l),d=n(136),c=r(d),g=n(142),p=r(g),h=n(143),v=r(h),m=n(144),_=r(m),y=n(141),E=r(y),T=n(1),S=r(T);i.__dashjs_factory_name="ProtectionKeyController",t["default"]=S["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(e){return e}var n=void 0;return n={modifyRequestURL:e,modifyRequestHeader:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="RequestModifier",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";var r={};r.encode=function(e){for(var t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?(t.push(192|r>>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t},r.decode=function(e){for(var t=[],n=0;n<e.length;){var r=e[n++];r<128||(r<224?(r=(31&r)<<6,r|=63&e[n++]):r<240?(r=(15&r)<<12,r|=(63&e[n++])<<6,r|=63&e[n++]):(r=(7&r)<<18,r|=(63&e[n++])<<12,r|=(63&e[n++])<<6,r|=63&e[n++])),t.push(String.fromCharCode(r))}return t.join("")};var i={};!function(e){var t=function(t){for(var n=0,r=[],i=0|t.length/3;0<i--;){var a=(t[n]<<16)+(t[n+1]<<8)+t[n+2];n+=3,r.push(e.charAt(63&a>>18)),r.push(e.charAt(63&a>>12)),r.push(e.charAt(63&a>>6)),r.push(e.charAt(63&a))}if(2==t.length-n){var a=(t[n]<<16)+(t[n+1]<<8);r.push(e.charAt(63&a>>18)),r.push(e.charAt(63&a>>12)),r.push(e.charAt(63&a>>6)),r.push("=")}else if(1==t.length-n){var a=t[n]<<16;r.push(e.charAt(63&a>>18)),r.push(e.charAt(63&a>>12)),r.push("==")}return r.join("")},n=function(){for(var t=[],n=0;n<e.length;++n)t[e.charCodeAt(n)]=n;return t["=".charCodeAt(0)]=0,t}(),o=function(e){for(var t=0,r=[],i=0|e.length/4;0<i--;){var a=(n[e.charCodeAt(t)]<<18)+(n[e.charCodeAt(t+1)]<<12)+(n[e.charCodeAt(t+2)]<<6)+n[e.charCodeAt(t+3)];r.push(255&a>>16),r.push(255&a>>8),r.push(255&a),t+=4}return r&&("="==e.charAt(t-2)?(r.pop(),r.pop()):"="==e.charAt(t-1)&&r.pop()),r},u={};u.encode=function(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t},u.decode=function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")},i.decodeArray=function(e){var t=o(e);return new Uint8Array(t)},i.encodeASCII=function(e){var n=u.encode(e);return t(n)},i.decodeASCII=function(e){var t=o(e);return u.decode(t)},i.encode=function(e){var n=r.encode(e);return t(n)},i.decode=function(e){var t=o(e);return r.decode(t)}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),t.decode=i.decode,t.decodeArray=i.decodeArray},function(e,t){"use strict";function n(e,t,n){function r(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function i(e){return e.prefix}function a(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):e}function o(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/")}function s(a){if(a.nodeType==E.DOCUMENT_NODE){var u,l,f,d=a.firstChild;for(l=0,f=a.childNodes.length;l<f;l+=1)if(a.childNodes[l].nodeType!==E.COMMENT_NODE){d=a.childNodes[l];break}if(n)u=s(d);else{u={};var c=r(d);u[c]=s(d)}return u}if(a.nodeType==E.ELEMENT_NODE){var u=new Object;u.__cnt=0;for(var g=[],p=a.childNodes,h=0;h<p.length;h++){var d=p.item(h),c=r(d);if(u.__cnt++,null==u[c]){var v=s(d);if("#text"!=c||/[^\s]/.test(v)){var m={};m[c]=v,g.push(m)}u[c]=v,u[c+"_asArray"]=new Array(1),u[c+"_asArray"][0]=u[c]}else{if(null!=u[c]&&!(u[c]instanceof Array)){var _=u[c];u[c]=new Array,u[c][0]=_,u[c+"_asArray"]=u[c]}for(var T=0;null!=u[c][T];)T++;var v=s(d);if("#text"!=c||/[^\s]/.test(v)){var m={};m[c]=v,g.push(m)}u[c][T]=v}}u.__children=g;for(var S=0;S<a.attributes.length;S++){var I=a.attributes.item(S);u.__cnt++;for(var R=I.value,A=0,M=e.length;A<M;A++){var b=e[A];b.test(I)&&(R=b.converter(I.value))}u[t+I.name]=R}var C=i(a);return null!=C&&""!=C&&(u.__cnt++,u.__prefix=C),1==u.__cnt&&null!=u["#text"]&&(u=u["#text"]),null!=u["#text"]&&(u.__text=u["#text"],y&&(u.__text=o(u.__text)),delete u["#text"],delete u["#text_asArray"]),null!=u["#cdata-section"]&&(u.__cdata=u["#cdata-section"],delete u["#cdata-section"],delete u["#cdata-section_asArray"]),null==u.__text&&null==u.__cdata||(u.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),u}return a.nodeType==E.TEXT_NODE||a.nodeType==E.CDATA_SECTION_NODE?a.nodeValue:a.nodeType==E.COMMENT_NODE?null:void 0}function u(e,t,n,r){var i="<"+(null!=e&&null!=e.__prefix?e.__prefix+":":"")+t;if(null!=n)for(var a=0;a<n.length;a++){var o=n[a],s=e[o];i+=" "+o.substr(1)+"='"+s+"'"}return i+=r?"/>":">"}function l(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function f(e,t){return e.indexOf(t,e.length-t.length)!==-1}function d(e,t){return!!(f(t.toString(),"_asArray")||0==t.toString().indexOf("_")||e[t]instanceof Function)}function c(e){var t=0;if(e instanceof Object)for(var n in e)d(e,n)||t++;return t}function g(e){var t=[];if(e instanceof Object)for(var n in e)n.toString().indexOf("__")==-1&&0==n.toString().indexOf("_")&&t.push(n);return t}function p(e){var t="";return null!=e.__cdata&&(t+="<![CDATA["+e.__cdata+"]]>"),null!=e.__text&&(t+=y?a(e.__text):e.__text),t}function h(e){var t="";return e instanceof Object?t+=p(e):null!=e&&(t+=y?a(e):e),t}function v(e,t,n){var r="";if(0==e.length)r+=u(e,t,n,!0);else for(var i=0;i<e.length;i++)r+=u(e[i],t,g(e[i]),!1),r+=m(e[i]),r+=l(e[i],t);return r}function m(e){var t="",n=c(e);if(n>0)for(var r in e)if(!d(e,r)){var i=e[r],a=g(i);if(null==i||void 0==i)t+=u(i,r,a,!0);else if(i instanceof Object)if(i instanceof Array)t+=v(i,r,a);else{var o=c(i);o>0||null!=i.__text||null!=i.__cdata?(t+=u(i,r,a,!1),t+=m(i),t+=l(i,r)):t+=u(i,r,a,!0)}else t+=u(i,r,a,!1),t+=h(i),t+=l(i,r)}return t+=h(e)}null!==t&&void 0!==t||(t="_"),null!==n&&void 0!==n||(n=!1);var _="1.0.11",y=!1,E={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(e){var t,n,r;if(window.DOMParser){n=new window.DOMParser;try{r=n.parseFromString("<","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(i){}try{t=n.parseFromString(e,"text/xml"),r&&t.getElementsByTagNameNS(r,"parsererror").length&&(t=void 0)}catch(i){}}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},this.xml2json=function(e){return s(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return t?this.xml2json(t):void 0},this.json2xml_str=function(e){return m(e)},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return _},this.escapeMode=function(e){y=e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,r){n(this,e),this._test=t,this._converter=r}return r(e,[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.BUFFER_EMPTY="bufferstalled",this.BUFFER_LOADED="bufferloaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.ERROR="error",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="streamswitchcompleted",this.PERIOD_SWITCH_STARTED="streamswitchstarted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.STREAM_INITIALIZED="streaminitialized",this.TEXT_TRACKS_ADDED="alltexttracksadded",this.TEXT_TRACK_ADDED="texttrackadded",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_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated"}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){D=window.VTTCue||window.TextTrackCue,w=[],N=[],L=-1,x=0,F=0,U=0,B=0,k=null,j=null,q=!1,Y=2147483647,K=!!navigator.userAgent.match(/Chrome/)&&!navigator.userAgent.match(/Edge/),void 0!==document.fullscreenElement?H="fullscreenElement":void 0!==document.webkitIsFullScreen?H="webkitIsFullScreen":document.msFullscreenElement?H="msFullscreenElement":document.mozFullScreen&&(H="mozFullScreen")}function t(e){var t=w[e].kind,n=void 0!==w[e].label?w[e].label:w[e].lang,r=w[e].lang,i=K?document.createElement("track"):P.addTextTrack(t,n,r);return K&&(i.kind=t,i.label=n,i.srclang=r),i}function n(e){q=e,k&&!document[H]&&(k.style.zIndex=e?Y:null)}function r(e,n){if(w.length===n)return void b("Trying to add too many tracks.");if(w.push(e),void 0===P&&(P=e.video),w.length===n){w.sort(function(e,t){return e.index-t.index}),k=O.getTTMLRenderingDiv();for(var r=-1,i=0;i<w.length;i++){var a=t.call(this,i);N.push(a),w[i].defaultTrack&&(a["default"]=!0,r=i),K&&P.appendChild(a);var o=P.textTracks[i];o.nonAddedCues=[],k&&(w[i].isTTML||w[i].isEmbedded)?o.renderingType="html":o.renderingType="default",this.addCaptions(i,0,w[i].captionData),M.trigger(u["default"].TEXT_TRACK_ADDED)}v.call(this,r),r>=0&&(P.textTracks[r].mode="showing",this.addCaptions(r,0,null)),M.trigger(u["default"].TEXT_TRACKS_ADDED,{index:L,tracks:w})}}function i(e,t,n,r,i,a){var o=e/t,s=n/r,u=0,l=0;o>s?(l=t,u=l/r*n):(u=e,l=u/n*r);var f=0,d=0,c=0,g=0,p=u/l;return p>i?(g=l,c=l/(1/i),f=(e-c)/2,d=0):(c=u,g=u/i,f=0,d=(t-g)/2),a?{x:f+.1*c,y:d+.1*g,w:.8*c,h:.8*g}:{x:f,y:d,w:c,h:g}}function a(){var e=this.getCurrentTextTrack();if(e&&"html"===e.renderingType){var t=P.clientWidth/P.clientHeight,n=!1;e.isFromCEA608&&(t=3.5/3,n=!0);var r=i.call(this,P.clientWidth,P.clientHeight,P.videoWidth,P.videoHeight,t,n),a=r.w,o=r.h;if(a!=U||o!=B){x=r.x,F=r.y,U=a,B=o,k.style.left=x+"px",k.style.top=F+"px",k.style.width=U+"px",k.style.height=B+"px";for(var s=0;e.activeCues&&s<e.activeCues.length;++s){var u=e.activeCues[s];u.scaleCue(u)}H&&document[H]||q?k.style.zIndex=Y:k.style.zIndex=null}}}function s(e,t){var n=Math.round(.01*e*t).toString()+"px";return n}function l(e){var t=U,n=B;if(t*n!==0&&e.layout){var r=e.layout,i=s(r.left,t),a=s(r.top,n),o=s(r.width,t),u=s(r.height,n);k.style.left=i,k.style.top=a,k.style.width=o,k.style.height=u;var l=k.firstChild;l&&l.style&&(l.style.left="0px",l.style.top="0px",l.style.width=o,l.style.height=u)}}function f(e){var t,n,r,i=U,a=B,o=[i/e.cellResolution[0],a/e.cellResolution[1]];if(e.linePadding)for(t in e.linePadding)if(e.linePadding.hasOwnProperty(t)){var s=e.linePadding[t];n=(s*o[0]).toString();for(var u=document.getElementsByClassName("spanPadding"),l=0;l<u.length;l++)u[l].style.cssText=u[l].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n),u[l].style.cssText=u[l].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}if(e.fontSize)for(t in e.fontSize)if(e.fontSize.hasOwnProperty(t)){var f=e.fontSize[t]/100;n=(f*o[1]).toString(),r="defaultFontSize"!==t?document.getElementsByClassName(t):document.getElementsByClassName("paragraph");for(var d=0;d<r.length;d++)r[d].style.cssText=r[d].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}if(e.lineHeight)for(t in e.lineHeight)if(e.lineHeight.hasOwnProperty(t)){var c=e.lineHeight[t]/100;n=(c*o[1]).toString(),r=document.getElementsByClassName(t);for(var g=0;g<r.length;g++)r[g].style.cssText=r[g].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}}function d(e,t,n){var r=e>=0?P.textTracks[e]:null,i=this;if(r){if("showing"!==r.mode)return void(n&&n.length>0&&(r.nonAddedCues=r.nonAddedCues.concat(n)));if(n||(n=r.nonAddedCues,r.nonAddedCues=[]),n&&0!==n.length)for(var o in n){var s,u=n[o];r.cellResolution=u.cellResolution,r.isFromCEA608=u.isFromCEA608,j||"html"!==u.type&&"image"!==u.type||(j=setInterval(a.bind(this),500)),"image"===u.type?(s=new D(u.start-t,u.end-t,""),s.image=u.data,s.id=u.id,s.size=0,s.type="image",s.layout=u.layout,s.scaleCue=l.bind(i),s.onenter=function(){if(k&&"showing"===r.mode){var e=new Image;e.id="ttmlImage_"+this.id,e.src=this.image,e.style.cssText="z-index: 2147483648; pointer-events: none; display: block; visibility: visible !important; position: relative !important;",k.appendChild(e),l.call(i,this)}},s.onexit=function(){if(k)for(var e=k.childNodes,t=0;t<e.length;t++)e[t].id==="ttmlImage_"+this.id&&k.removeChild(e[t])}):"html"===u.type?(s=new D(u.start-t,u.end-t,""),s.cueHTMLElement=u.cueHTMLElement,s.regions=u.regions,s.regionID=u.regionID,s.cueID=u.cueID,s.videoWidth=u.videoWidth,s.videoHeight=u.videoHeight,s.cellResolution=u.cellResolution,s.fontSize=u.fontSize,s.lineHeight=u.lineHeight,s.linePadding=u.linePadding,s.scaleCue=f.bind(i),k.style.left=x+"px",k.style.top=F+"px",k.style.width=U+"px",k.style.height=B+"px",s.onenter=function(){"showing"===r.mode&&(b("Cue "+this.startTime+"-"+this.endTime+" : "+this.cueHTMLElement.id+" : "+this.cueHTMLElement.innerText),k.appendChild(this.cueHTMLElement),f.call(i,this))},s.onexit=function(){for(var e=k.childNodes,t=0;t<e.length;++t)e[t].id===this.cueID&&k.removeChild(e[t])}):(s=new D(u.start-t,u.end-t,u.data),u.styles&&(void 0!==u.styles.align&&s.hasOwnProperty("align")&&(s.align=u.styles.align),void 0!==u.styles.line&&s.hasOwnProperty("line")&&(s.line=u.styles.line),void 0!==u.styles.position&&s.hasOwnProperty("position")&&(s.position=u.styles.position),void 0!==u.styles.size&&s.hasOwnProperty("size")&&(s.size=u.styles.size))),r.addCue(s)}}}function g(){return L>=0?P.textTracks[L]:null}function p(){return L}function h(e){for(var t=-1,n=0;n<P.textTracks.length;n++)if(P.textTracks[n].label===e){t=n;break}return t}function v(e){if(L=e,I.call(this),e>=0){var t=P.textTracks[e];"html"===t.renderingType?T.call(this):S.call(this)}else S.call(this)}function m(e){return P.textTracks[e]}function _(e){if(e.cues){for(var t=e.cues,n=t.length-1,r=n;r>=0;r--)e.removeCue(t[r]);
30
- e.mode="disabled"}}function y(){for(var e=N.length,t=0;t<e;t++)if(K)P.removeChild(N[t]);else{var n=m.call(this,t);n.nonAddedCues=[],_.call(this,n)}N=[],w=[],j&&(clearInterval(j),j=null),I.call(this)}function E(e){P.removeChild(N[e]),N.splice(e,1)}function T(){if(K){var e=document.getElementById("native-cue-style");if(!e){e=document.createElement("style"),e.id="native-cue-style",document.head.appendChild(e);var t=e.sheet;P.id?t.insertRule("#"+P.id+"::cue {background: transparent}",0):0!==P.classList.length?t.insertRule("."+P.className+"::cue {background: transparent}",0):t.insertRule("video::cue {background: transparent}",0)}}}function S(){if(K){var e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}}function I(){if(k)for(;k.firstChild;)k.removeChild(k.firstChild)}function R(e){e&&e.videoModel&&(O=e.videoModel)}var A=this.context,M=(0,o["default"])(A).getInstance(),b=(0,c["default"])(A).getInstance().log,C=void 0,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0,B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0;return C={initialize:e,displayCConTop:n,addTextTrack:r,addCaptions:d,getTextTrack:m,getCurrentTextTrack:g,getCurrentTrackIdx:p,setCurrentTrackIdx:v,getTrackIdxForId:h,deleteTrackCues:_,deleteAllTextTracks:y,deleteTextTrack:E,setConfig:R}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d);i.__dashjs_factory_name="TextTracks",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){s=new o["default"],u=[],l=!1}function t(){return s}function n(){return u}function r(){return l}function i(e){function t(e,t,n,r){var i=r[0].split(/[=]/);return r.push({key:i[0],value:i[1]}),r.shift(),r}function n(e,t,n){return t>0&&(d&&0===u.length?u=n[t].split(/[&]/):c&&(i=n[t].split(/[&]/))),n}if(!e)return null;var r,i=[],a=new RegExp(/[?]/),o=new RegExp(/[#]/),f=new RegExp(/^(https:)?\/\//i),d=a.test(e),c=o.test(e);return l=f.test(e),r=e.split(/[?#]/).map(n),u.length>0&&(u=u.reduce(t,null)),i.length>0&&(i=i.reduce(t,null),i.forEach(function(e){s[e.key]=e.value})),e}var a=void 0,s=void 0,u=void 0,l=void 0;return a={initialize:e,parseURI:i,getURIFragmentData:t,getURIQueryData:n,isManifestHTTPS:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(175),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="URIQueryAndFragmentModel",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.sessionToken=e,this.error=t};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t,r,a){n(this,i),this.sessionToken=e,this.message=t,this.defaultURL=r,this.messageType=a?a:"license-request"};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.keySystem=e,this.ksConfiguration=t};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t,r,a,o){n(this,i),this.initDataTypes=["cenc"],this.audioCapabilities=e,this.videoCapabilities=t,this.distinctiveIdentifier=r,this.persistentState=a,this.sessionTypes=o};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.initData=e,this.initDataType=t};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){l={}}function t(e){e&&(e.abrRulesCollection&&(l[h]=e.abrRulesCollection),e.synchronizationRulesCollection&&(l[v]=e.synchronizationRulesCollection))}function n(e,t,n,r,a){var o,s,l={},f={},d=e.length,c=d,g=i(t,r),p=function(e){var t,i,o;if(e.value!==u["default"].NO_CHANGE){var s=a(l[e.priority],e.value);s!==l[e.priority]&&(l[e.priority]=s,f[e.priority]=e.reason)}--d||(l[u["default"].WEAK]!==u["default"].NO_CHANGE&&(o=u["default"].WEAK,t=l[u["default"].WEAK],i=f[u["default"].WEAK]),l[u["default"].DEFAULT]!==u["default"].NO_CHANGE&&(o=u["default"].DEFAULT,t=l[u["default"].DEFAULT],i=f[u["default"].DEFAULT]),l[u["default"].STRONG]!==u["default"].NO_CHANGE&&(o=u["default"].STRONG,t=l[u["default"].STRONG],i=f[u["default"].STRONG]),o!=u["default"].STRONG&&o!=u["default"].WEAK&&(o=u["default"].DEFAULT),n(void 0!==t?{value:t,confidence:o,reason:i}:{value:r,confidence:o,reason:{name:"NO_CHANGE"}}))};for(l[u["default"].STRONG]=u["default"].NO_CHANGE,l[u["default"].WEAK]=u["default"].NO_CHANGE,l[u["default"].DEFAULT]=u["default"].NO_CHANGE,s=0;s<c;s++)o=e[s],o.execute(g,p)}function r(){var e,t,n=l[h],r=l[v],i=(n.getRules(f["default"].QUALITY_SWITCH_RULES)||[]).concat(n.getRules(f["default"].ABANDON_FRAGMENT_RULES)||[]).concat(r.getRules(c["default"].TIME_SYNCHRONIZED_RULES)||[]).concat(r.getRules(c["default"].BEST_GUESS_RULES)||[]),a=i.length;for(t=0;t<a;t++)e=i[t],"function"==typeof e.reset&&e.reset();l={}}function i(e,t){return(0,o["default"])(a).create({streamProcessor:e,currentValue:t})}var a=this.context,s=void 0,l=void 0;return s={initialize:e,setConfig:t,applyRules:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(146),o=r(a),s=n(8),u=r(s),l=n(47),f=r(l),d=n(48),c=r(d),g=n(1),p=r(g),h=0,v=1;i.__dashjs_factory_name="RulesController";var m=p["default"].getSingletonFactory(i);m.ABR_RULE=h,m.SYNC_RULE=v,t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){i=[],a=[];var e=(0,E["default"])(n).getInstance(),t=(0,S["default"])(n).getInstance(),r=(0,_["default"])(n).getInstance();r.getBufferOccupancyABREnabled()?(i.push((0,p["default"])(n).create({metricsModel:e,dashMetrics:(0,S["default"])(n).getInstance()})),a.push((0,v["default"])(n).create({metricsModel:e,dashMetrics:(0,S["default"])(n).getInstance()}))):(i.push((0,o["default"])(n).create({metricsModel:e,dashMetrics:t})),i.push((0,u["default"])(n).create({metricsModel:e,dashMetrics:t})),i.push((0,f["default"])(n).create({metricsModel:e})),a.push((0,c["default"])(n).create()))}function t(e){switch(e){case A:return i;case M:return a;default:return null}}var n=this.context,r=void 0,i=void 0,a=void 0;return r={initialize:e,getRules:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(151),o=r(a),s=n(149),u=r(s),l=n(150),f=r(l),d=n(147),c=r(d),g=n(66),p=r(g),h=n(148),v=r(h),m=n(5),_=r(m),y=n(14),E=r(y),T=n(16),S=r(T),I=n(1),R=r(I),A="qualitySwitchRules",M="abandonFragmentRules";i.__dashjs_factory_name="ABRRulesCollection";var b=R["default"].getSingletonFactory(i);b.QUALITY_SWITCH_RULES=A,b.ABANDON_FRAGMENT_RULES=M,t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){i=[],a=[],i.push((0,c["default"])(n).create({timelineConverter:(0,u["default"])(n).getInstance()})),a.push((0,f["default"])(n).create({timelineConverter:(0,u["default"])(n).getInstance(),adapter:(0,p["default"])(n).getInstance()}))}function t(e){switch(e){case h:return i;case v:return a;default:return null}}var n=this.context,r=void 0,i=void 0,a=void 0;return r={initialize:e,getRules:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(26),u=r(s),l=n(156),f=r(l),d=n(157),c=r(d),g=n(15),p=r(g),h="withAccurateTimeSourceRules",v="bestGuestRules";i.__dashjs_factory_name="SynchronizationRulesCollection";var m=o["default"].getSingletonFactory(i);m.TIME_SYNCHRONIZED_RULES=h,m.BEST_GUESS_RULES=v,t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){if(!e)return null;void 0===e.fileStart&&(e.fileStart=0);var t=f["default"].parseBuffer(e),r=(0,o["default"])(n).create();return r.setData(t),r}var t=void 0,n=this.context;return t={parse:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(161),o=r(a),s=n(1),u=r(s),l=n(71),f=r(l);i.__dashjs_factory_name="BoxParser",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){if(void 0!==y)return y;y=!1;var t,n="1",r="1";try{"undefined"!=typeof window&&(t=window[e])}catch(i){return m("Warning: DOMStorage access denied: "+i.message),y}if(!t||e!==p&&e!==h)return y;try{t.setItem(n,r),t.removeItem(n),y=!0}catch(i){m("Warning: DOMStorage is supported, but cannot be used: "+i.message)}return y}function t(){e(p)&&d.forEach(function(e){var t=localStorage.getItem(e.oldKey);if(t){localStorage.removeItem(e.oldKey);try{localStorage.setItem(e.newKey,t)}catch(n){m(n.message)}}})}function n(){E=(0,u["default"])(v).getInstance(),t()}function r(){var e=6e5;return Math.round((new Date).getTime()/e)*e}function i(t,n){return e(t)&&E["get"+n+"CachingInfo"]().enabled}function a(e){if(!i(p,"LastMediaSettings"))return null;var t=g.replace(/\?/,e),n=JSON.parse(localStorage.getItem(t))||{},r=(new Date).getTime()-parseInt(n.timestamp,10)>=E.getLastMediaSettingsCachingInfo().ttl||!1,a=n.settings;return r&&(localStorage.removeItem(t),a=null),a}function o(e){var t=NaN;if(i(p,"LastBitrate")){var n=c.replace(/\?/,e),r=JSON.parse(localStorage.getItem(n))||{},a=(new Date).getTime()-parseInt(r.timestamp,10)>=E.getLastBitrateCachingInfo().ttl||!1,o=parseInt(r.bitrate,10);isNaN(o)||a?a&&localStorage.removeItem(n):(t=o,m("Last saved bitrate for "+e+" was "+o))}return t}function s(e,t){if(i(p,"LastMediaSettings")){var n=g.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({settings:t,timestamp:r()}))}catch(a){m(a.message)}}}function l(e,t){if(i(p,"LastBitrate")&&t){var n=c.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({bitrate:t/1e3,timestamp:r()}))}catch(a){m(a.message)}}}var v=this.context,m=(0,f["default"])(v).getInstance().log,_=void 0,y=void 0,E=void 0;return _={getSavedBitrateSettings:o,setSavedBitrateSettings:l,getSavedMediaSettings:a,setSavedMediaSettings:s,isSupported:e},n(),_}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(5),u=r(s),l=n(4),f=r(l),d=[{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"}],c="dashjs_?_bitrate",g="dashjs_?_settings",p="localStorage",h="sessionStorage";i.__dashjs_factory_name="DOMStorage";var v=o["default"].getSingletonFactory(i);t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){g=e,h=t,_=!1,y=NaN,T=null,v=(0,p["default"])(s).getInstance(),S=o["default"].BEST_GUESS_RULES,l.on(c["default"].STREAM_INITIALIZED,a,this)}function t(){_=!1,y=NaN}function n(){return T}function r(){l.off(c["default"].STREAM_INITIALIZED,a,this),t(),T=null,g=null,h=null,_=!1,y=NaN,S=null,v=null}function i(e){var t=((new Date).getTime()-y)/1e3;T=e.value,l.trigger(c["default"].LIVE_EDGE_SEARCH_COMPLETED,{liveEdge:T,searchTime:t,error:null===T?new u["default"](m,"live edge has not been found",null):null})}function a(e){!h.isDynamic()||_||e.error||(S=g.isTimeSyncCompleted()?o["default"].TIME_SYNCHRONIZED_RULES:o["default"].BEST_GUESS_RULES,E=(0,o["default"])(s).getInstance().getRules(S),_=!0,y=(new Date).getTime(),v.applyRules(E,h,i,null,function(e,t){return t}))}var s=this.context,l=(0,f["default"])(s).getInstance(),d=void 0,g=void 0,h=void 0,v=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0;return d={initialize:e,abortSearch:t,getLiveEdge:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(48),o=r(a),s=n(6),u=r(s),l=n(3),f=r(l),d=n(2),c=r(d),g=n(46),p=r(g),h=n(1),v=r(h),m=1;i.__dashjs_factory_name="LiveEdgeFinder";var _=v["default"].getSingletonFactory(i);_.LIVE_EDGE_NOT_FOUND_ERROR_CODE=m,t["default"]=_,e.exports=t["default"]},function(e,t,n){"use strict";!function(e){var t={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},n=function(e){var n=e;return t.hasOwnProperty(e)&&(n=t[e]),String.fromCharCode(n)},r=15,i=32,a={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={17:2,18:4,21:6,22:8,23:10,19:13,20:15},s={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},l=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],f={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var n=this.verboseFilter[e];this.verboseLevel>=n&&console.log(this.time+" ["+e+"] "+t)}},d=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},c=function(e,t,n,r,i){this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1};c.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},copy:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var g=function(e,t,n,r,i,a){this.uchar=e||" ",this.penState=new c(t,n,r,i,a)};g.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(e,t){this.uchar=e,this.penState.copy(t)},setPenState:function(e){this.penState.copy(e)},equals:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},copy:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var p=function(){this.chars=[];for(var e=0;e<i;e++)this.chars.push(new g);this.pos=0,this.currPenState=new c};p.prototype={equals:function(e){for(var t=!0,n=0;n<i;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<i;t++)this.chars[t].copy(e.chars[t])},isEmpty:function(){for(var e=!0,t=0;t<i;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},setCursor:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(f.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>i&&(f.log("ERROR","Too large cursor position "+this.pos),this.pos=i)},moveCursor:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(e){e>=144&&this.backSpace();var t=n(e);return this.pos>=i?void f.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),void this.moveCursor(1))},clearFromPos:function(e){var t;for(t=e;t<i;t++)this.chars[t].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var e=[],t=!0,n=0;n<i;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},setPenStyles:function(e){this.currPenState.setStyles(e);var t=this.chars[this.pos];t.setPenState(this.currPenState)}};var h=function(){this.rows=[];for(var e=0;e<r;e++)this.rows.push(new p);this.currRow=r-1,this.nrRollUpRows=null,this.reset()};h.prototype={reset:function(){for(var e=0;e<r;e++)this.rows[e].clear();this.currRow=r-1},equals:function(e){for(var t=!0,n=0;n<r;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<r;t++)this.rows[t].copy(e.rows[t])},isEmpty:function(){for(var e=!0,t=0;t<r;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},backSpace:function(){var e=this.rows[this.currRow];e.backSpace()},clearToEndOfRow:function(){var e=this.rows[this.currRow];e.clearToEndOfRow()},insertChar:function(e){var t=this.rows[this.currRow];t.insertChar(e)},setPen:function(e){var t=this.rows[this.currRow];t.setPenStyles(e)},moveCursor:function(e){var t=this.rows[this.currRow];t.moveCursor(e)},setCursor:function(e){f.log("INFO","setCursor: "+e);var t=this.rows[this.currRow];t.setCursor(e)},setPAC:function(e){f.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.currRow=t;var n=this.rows[this.currRow];if(null!==e.indent){var r=e.indent,i=Math.max(r-1,0);n.setCursor(e.indent),e.color=n.chars[i].penState.foreground}var a={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(a)},setBkgData:function(e){f.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},setRollUpRows:function(e){this.nrRollUpRows=e},rollUp:function(){if(null===this.nrRollUpRows)return void f.log("DEBUG","roll_up but nrRollUpRows not set yet");f.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),f.log("INFO","Rolling up")},getDisplayText:function(e){e=e||!1;for(var t=[],n="",i=-1,a=0;a<r;a++){var o=this.rows[a].getTextString();o&&(i=a+1,e?t.push("Row "+i+': "'+o+'"'):t.push(o.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},getTextAndFormat:function(){return this.rows}};var v=function(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new h,this.nonDisplayedMemory=new h,this.lastOutputScreen=new h,this.currRollUpRow=this.displayedMemory.rows[r-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};v.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[r-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(e){this.outputFilter=e},setPAC:function(e){this.writeScreen.setPAC(e)},setBkgData:function(e){this.writeScreen.setBkgData(e)},setMode:function(e){e!==this.mode&&(this.mode=e,f.log("INFO","MODE="+e),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},insertChars:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";f.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(f.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){f.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){f.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(){f.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(e){f.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},cc_FON:function(){f.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){f.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){f.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){f.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){f.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){f.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){f.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(f.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,f.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(e){f.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},cc_MIDROW:function(e){var t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}f.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},outputDataUpdate:function(){var e=f.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}};var m=function(e,t,n){this.field=e||1,this.outputs=[t,n],this.channels=[new v(1,t),new v(2,n)],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}};m.prototype={getHandler:function(e){return this.channels[e].getHandler()},setHandler:function(e,t){this.channels[e].setHandler(t)},addData:function(e,t){var n,r,i,a=!1;this.lastTime=e,f.setTime(e);for(var o=0;o<t.length;o+=2)if(r=127&t[o],i=127&t[o+1],0!==r||0!==i){if(f.log("DATA","["+d([t[o],t[o+1]])+"] -> ("+d([r,i])+")"),n=this.parseCmd(r,i),n||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(a=this.parseChars(r,i)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(a)}else f.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:a?this.dataCounters["char"]+=2:(this.dataCounters.other+=2,f.log("WARNING","Couldn't parse cleaned data "+d([r,i])+" orig: "+d([t[o],t[o+1]])))}else this.dataCounters.padding+=2},parseCmd:function(e,t){var n=null,r=(20===e||28===e)&&32<=t&&t<=47,i=(23===e||31===e)&&33<=t&&t<=35;if(!r&&!i)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,f.log("DEBUG","Repeated command ("+d([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var a=this.channels[n-1];return 20===e||28===e?32===t?a.cc_RCL():33===t?a.cc_BS():34===t?a.cc_AOF():35===t?a.cc_AON():36===t?a.cc_DER():37===t?a.cc_RU(2):38===t?a.cc_RU(3):39===t?a.cc_RU(4):40===t?a.cc_FON():41===t?a.cc_RDC():42===t?a.cc_TR():43===t?a.cc_RTD():44===t?a.cc_EDM():45===t?a.cc_CR():46===t?a.cc_ENM():47===t&&a.cc_EOC():a.cc_TO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},parseMidrow:function(e,t){var n=null;if((17===e||25===e)&&32<=t&&t<=47){if(n=17===e?1:2,n!==this.currChNr)return f.log("ERROR","Mismatch channel in midrow parsing"),!1;var r=this.channels[n-1];return r.cc_MIDROW(t),f.log("DEBUG","MIDROW ("+d([e,t])+")"),!0}return!1},parsePAC:function(e,t){var n=null,r=null,i=(17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127,l=(16===e||24===e)&&64<=t&&t<=95;if(!i&&!l)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=e<=23?1:2,r=64<=t&&t<=95?1===n?a[e]:s[e]:1===n?o[e]:u[e];var f=this.interpretPAC(r,t),d=this.channels[n-1];return d.setPAC(f),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},interpretPAC:function(e,t){var n=t,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1===(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},parseChars:function(e,t){var r=null,i=null,a=null;if(e>=25?(r=2,a=e-8):(r=1,a=e),17<=a&&a<=19){var o=t;o=17===a?t+80:18===a?t+112:t+144,f.log("INFO","Special char '"+n(o)+"' in channel "+r),i=[o]}else 32<=e&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var s=d(i);f.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i},parseBackgroundAttributes:function(e,t){var n,r,i,a,o=(16===e||24===e)&&32<=t&&t<=47,s=(23===e||31===e)&&45<=t&&t<=47;return!(!o&&!s)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=l[r],t%2===1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,a=this.channels[i-1],a.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)},reset:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}};var _=function(e,t,n){for(var r=0,i=t,a=0,o=[],s=function(e,t,n,r){if(4!==e||t<8)return null;var i=n.getUint8(r),a=n.getUint16(r+1),o=n.getUint32(r+3),s=n.getUint8(r+7);return 181==i&&49==a&&1195456820==o&&3==s};i<t+n;){if(r=e.getUint32(i),a=31&e.getUint8(i+4),6===a)for(var u=i+5,l=-1;u<i+4+r-1;){l=0;for(var f=255;255===f;)f=e.getUint8(u),l+=f,u++;var d=0;for(f=255;255===f;)f=e.getUint8(u),d+=f,u++;s(l,d,e,u)&&o.push([u,d]),u+=d}i+=r+4}return o},y=function(e,t){var n=t[0],r=[[],[]];n+=8;var i=31&e.getUint8(n);n+=2;for(var a=0;a<i;a++){var o=e.getUint8(n),s=4&o,u=3&o;n++;var l=e.getUint8(n);n++;var f=e.getUint8(n);n++,s&&(127&l)+(127&f)!==0&&(0===u?(r[0].push(l),r[0].push(f)):1===u&&(r[1].push(l),r[1].push(f)))}return r};e.logger=f,e.PenState=c,e.CaptionScreen=h,e.Cea608Parser=m,e.findCea608Nalus=_,e.extractCea608DataFromRange=y}(t)},function(e,t){"use strict";function n(){return r}Object.defineProperty(t,"__esModule",{value:!0}),t.getVersionString=n;var r="2.3.0"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="TcpList";t.TCP_CONNECTION=n;var r="HttpList";t.HTTP_REQUEST=r;var i="RepSwitchList";t.TRACK_SWITCH=i;var a="BufferLevel";t.BUFFER_LEVEL=a;var o="BufferState";t.BUFFER_STATE=o;var s="DVRInfo";t.DVR_INFO=s;var u="DroppedFrames";t.DROPPED_FRAMES=u;var l="SchedulingInfo";t.SCHEDULING_INFO=l;var f="RequestsQueue";t.REQUESTS_QUEUE=f;var d="ManifestUpdate";t.MANIFEST_UPDATE=d;var c="ManifestUpdatePeriodInfo";t.MANIFEST_UPDATE_STREAM_INFO=c;var g="ManifestUpdateRepresentationInfo";t.MANIFEST_UPDATE_TRACK_INFO=g;var p="PlayList";t.PLAY_LIST=p;var h="DVBErrors";t.DVB_ERRORS=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(81),s=r(o),u=function(){function e(t,n,r,a,o){var u=this;i(this,e),this._name=t||"",this._properties=[],this._children=r||[],this._isRoot=a||!1,this._isArray=o||!0,Array.isArray(n)&&n.forEach(function(e){u._properties.push(new s["default"](e))})}return a(e,[{key:"name",get:function(){return this._name}},{key:"isRoot",get:function(){return this._isRoot}},{key:"isArray",get:function(){return this._isArray}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),e}();t["default"]=u,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=1,i=1,a=function o(e,t,a,s){n(this,o),this.url=e||"",this.serviceLocation=t||e||"",this.dvb_priority=a||r,this.dvb_weight=s||i};a.DEFAULT_DVB_PRIORITY=r,a.DEFAULT_DVB_WEIGHT=i,t["default"]=a,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.schemeIdUri="",this.value=""};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){$t=!1,en=!1,tn=!0,an=null,Jt=null,sn=null,ie["default"].extend(oe["default"]),ln=(0,L["default"])(Vt).getInstance()}function t(e,t,n){return dn=(0,E["default"])(Vt).getInstance(),fn=(0,_["default"])(Vt).getInstance(),dn.supportsMediaSource()?void($t||($t=!0,nn=(0,B["default"])(Vt).getInstance(),pn=(0,u["default"])(Vt).getInstance(),rn=(0,c["default"])(Vt).getInstance(),rn.initialize(),vn=(0,he["default"])(Vt).getInstance(),hn=(0,me["default"])(Vt).getInstance(),un=(0,F["default"])(Vt).getInstance(),un.setConfig({adapter:xt()}),rt(),pe(void 0===n||n),e&&At(e),t&&Dt(t),Qt("[dash.js "+q()+"] MediaPlayer has been initialized"))):void fn.capabilityError("mediasource")}function n(){return!!mn&&!!Zt}function r(){if(!en)throw Ht;(!tn||a()&&en)&&pn.play()}function i(){if(!en)throw Ht;pn.pause()}function a(){if(!en)throw Ht;return pn.isPaused()}function s(){if(!en)throw Ht;return pn.isSeeking()}function l(e){if(!mn)throw qt;Rt().muted=e}function d(){if(!mn)throw qt;return Rt().muted}function g(e){if(!mn)throw qt;Rt().volume=e}function h(){if(!mn)throw qt;return Rt().volume}function m(e){var t=["video","audio","fragmentedText"];
31
- if(e){if(t.indexOf(e)!==-1){var n=Te().getCurrentBufferLevel(Se(e));return n?n:NaN}return Qt("Warning - getBufferLength requested for invalid type"),NaN}return t.map(function(e){return Fe(e).length>0?Te().getCurrentBufferLevel(Se(e)):Number.MAX_VALUE}).reduce(function(e,t){return Math.min(e,t)})}function y(){var e=Bt();return e?e.manifestInfo.DVRWindowSize:0}function T(e){var t=Bt();if(!t)return 0;var n=t.range.start+e;return n>t.range.end&&(n=t.range.end),n}function I(e){if(!en)throw Ht;var t=pn.getIsDynamic()?T(e):e;pn.seek(t)}function A(e){if(!en)throw Ht;var t=Rt().currentTime;if(void 0!==e)t=cn.getTimeRelativeToStreamId(t,e);else if(pn.getIsDynamic()){var n=Bt();t=null===n?0:b()-(n.range.end-n.time)}return t}function b(){if(!en)throw Ht;var e=Rt().duration;if(pn.getIsDynamic()){var t,n=Bt();if(!n)return 0;t=n.range.end-n.range.start,e=t<n.manifestInfo.DVRWindowSize?t:n.manifestInfo.DVRWindowSize}return e}function D(){if(!en)throw Ht;return A()<0?NaN:kt(A())}function P(){if(!en)throw Ht;return kt(b())}function N(e,t,n){var r=new Date(1e3*e),i=r.toLocaleDateString(t),a=r.toLocaleTimeString(t,{hour12:n});return a+" "+i}function x(e){e=Math.max(e,0);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);return(0===t?"":t<10?"0"+t.toString()+":":t.toString()+":")+(n<10?"0"+n.toString():n.toString())+":"+(r<10?"0"+r.toString():r.toString())}function U(e,t,n){ue["default"].extend(e,t,n,Vt)}function k(e,t,n){zt.on(e,t,n)}function K(e,t,n){zt.off(e,t,n)}function q(){return(0,le.getVersionString)()}function G(){return Wt}function z(){if(!mn)throw qt;return mn}function Q(e){ln.setLiveDelayFragmentCount(e)}function Z(e){ln.setLiveDelay(e)}function $(e){ln.setUseSuggestedPresentationDelay(e)}function te(e,t){ln.setLastBitrateCachingInfo(e,t)}function re(e,t){ln.setLastMediaSettingsCachingInfo(e,t)}function ae(e,t){nn.setMaxAllowedBitrateFor(e,t)}function se(e){return nn.getMaxAllowedBitrateFor(e)}function fe(e,t){nn.setMaxAllowedRepresentationRatioFor(e,t)}function ce(e){return nn.getMaxAllowedRepresentationRatioFor(e)}function pe(e){tn=e}function ve(){return tn}function _e(e){ln.setScheduleWhilePaused(e)}function Ee(){return ln.getScheduleWhilePaused()}function Te(){return hn}function Se(e){return un.getReadOnlyMetricsFor(e)}function Ie(e){if(!en)throw Ht;return nn.getQualityFor(e,cn.getActiveStreamInfo())}function Re(e,t){if(!en)throw Ht;nn.setPlaybackQuality(e,cn.getActiveStreamInfo(),t)}function Ae(){return nn.getLimitBitrateByPortal()}function Me(e){nn.setLimitBitrateByPortal(e)}function be(){return nn.getUsePixelRatioInLimitBitrateByPortal()}function Ce(e){nn.setUsePixelRatioInLimitBitrateByPortal(e)}function De(e){if(!en)throw Ht;void 0===_n&&(_n=(0,C["default"])(Vt).getInstance());for(var t=Rt().textTracks,n=t.length,r=0;r<n;r++){var i=t[r],a=e===r?"showing":"hidden";i.mode!==a&&(i.mode=a)}_n.setTextTrack()}function Oe(e){if(!en)throw Ht;var t=jt();return t?t.getBitrateListFor(e):[]}function Pe(e,t){nn.setInitialBitrateFor(e,t)}function we(e){if(!en)throw Ht;return nn.getInitialBitrateFor(e)}function Ne(e,t){nn.setInitialRepresentationRatioFor(e,t)}function Le(e){return nn.getInitialRepresentationRatioFor(e)}function xe(e){if(!en)throw Ht;return sn.getStreamsInfo(e)}function Fe(e){if(!en)throw Ht;var t=cn.getActiveStreamInfo();return t?rn.getTracksFor(e,t):[]}function Ue(e,t,n){if(!en)throw Ht;return n=n||sn.getStreamsInfo(t)[0],n?sn.getAllMediaInfoForType(t,n,e):[]}function Be(e){if(!en)throw Ht;var t=cn.getActiveStreamInfo();return t?rn.getCurrentTrackFor(e,t):null}function ke(e,t){rn.setInitialSettings(e,t)}function je(e){return rn.getInitialSettings(e)}function Ke(e){if(!en)throw Ht;rn.setTrack(e)}function He(e){return rn.getSwitchMode(e)}function qe(e,t){rn.setSwitchMode(e,t)}function Ye(e){rn.setSelectionModeForInitialTrack(e)}function Ge(){return rn.getSelectionModeForInitialTrack()}function Ve(){return nn.getAutoSwitchBitrateFor("video")||nn.getAutoSwitchBitrateFor("audio")}function ze(e){nn.setAutoSwitchBitrateFor("video",e),nn.setAutoSwitchBitrateFor("audio",e)}function We(e){return nn.getAutoSwitchBitrateFor(e)}function Qe(e,t){nn.setAutoSwitchBitrateFor(e,t)}function Xe(e){ln.setFastSwitchEnabled(e)}function Ze(){return ln.getFastSwitchEnabled()}function Je(e){ln.setBufferOccupancyABREnabled(e)}function $e(e,t){var n=Nt(),r=this,i=function o(e){e.error?t(null,e.error):t(e.manifest),zt.off(ie["default"].INTERNAL_MANIFEST_LOADED,o,r),n.reset()};zt.on(ie["default"].INTERNAL_MANIFEST_LOADED,i,r);var a=(0,O["default"])(Vt).getInstance();a.initialize(),n.load(a.parseURI(e))}function et(e,t){tt(e,t);var n=new o["default"];n.schemeIdUri=e,n.value=t,ln.getUTCTimingSources().push(n)}function tt(e,t){var n=ln.getUTCTimingSources();n.forEach(function(r,i){r.schemeIdUri===e&&r.value===t&&n.splice(i,1)})}function nt(){ln.setUTCTimingSources([])}function rt(){et(L["default"].DEFAULT_UTC_TIMING_SOURCE.scheme,L["default"].DEFAULT_UTC_TIMING_SOURCE.value)}function it(e){ln.setUseManifestDateHeaderTimeSource(e)}function at(e){ln.setBufferToKeep(e)}function ot(e){ln.setBufferPruningInterval(e)}function st(e){ln.setStableBufferTime(e)}function ut(e){ln.setBufferTimeAtTopQuality(e)}function lt(e){ln.setBufferTimeAtTopQualityLongForm(e)}function ft(e){ln.setLongFormContentDurationThreshold(e)}function dt(e){ln.setRichBufferThreshold(e)}function ct(e){ln.setBandwidthSafetyFactor(e)}function gt(){return ln.getBandwidthSafetyFactor()}function pt(e){ln.setAbandonLoadTimeout(e)}function ht(e){ln.setFragmentRetryAttempts(e)}function vt(e){ln.setFragmentRetryInterval(e)}function mt(e){ln.setXHRWithCredentials(e)}function _t(){return Ft()}function yt(e){an=e}function Et(e){Jt=e}function Tt(e){var t=(0,S["default"])(Vt).getInstance();t.setConfig({videoModel:mn}),t.initialize(),t.displayCConTop(e)}function St(){return mn?mn.getVideoContainer():null}function It(e){if(!mn)throw qt;mn.setVideoContainer(e)}function Rt(){if(!mn)throw qt;return mn.getElement()}function At(e){if(!$t)throw Gt;mn=null,e&&(mn=(0,Y["default"])(Vt).getInstance(),mn.initialize(),mn.setElement(e),Ft(),Ut()),Pt()}function Mt(){return mn?mn.getTTMLRenderingDiv():null}function bt(e){if(!mn)throw qt;mn.setTTMLRenderingDiv(e)}function Ct(){if(!Zt)throw Yt;return Zt}function Dt(e){if(!$t)throw Gt;if("string"==typeof e){var t=(0,O["default"])(Vt).getInstance();t.initialize(),Zt=t.parseURI(e)}else Zt=e;Pt()}function Ot(){Dt(null),At(null),Jt=null,an=null}function Pt(){en?(en=!1,sn.reset(),cn.reset(),pn.reset(),nn.reset(),gn.reset(),rn.reset(),cn=null,on=null,n()&&Kt()):n()&&Kt()}function wt(){var e=(0,W["default"])(Vt).getInstance();e.initialize();var t=(0,H["default"])(Vt).getInstance();t.initialize();var n=(0,R["default"])(Vt).getInstance();n.setConfig({dashManifestModel:vn}),rn.initialize(),rn.setConfig({errHandler:fn}),gn=(0,V["default"])(Vt).getInstance(),gn.initialize(),gn.setConfig({abrRulesCollection:t,synchronizationRulesCollection:e}),cn=(0,f["default"])(Vt).getInstance(),cn.setConfig({capabilities:dn,manifestLoader:Nt(),manifestModel:(0,w["default"])(Vt).getInstance(),dashManifestModel:vn,protectionController:an,adapter:sn,metricsModel:un,dashMetrics:hn,liveEdgeFinder:(0,v["default"])(Vt).getInstance(),mediaSourceController:(0,X["default"])(Vt).getInstance(),timeSyncController:(0,j["default"])(Vt).getInstance(),baseURLController:(0,J["default"])(Vt).getInstance(),errHandler:fn,timelineConverter:(0,ye["default"])(Vt).getInstance()}),cn.initialize(tn,Jt),nn.setConfig({abrRulesCollection:t,rulesController:gn,streamController:cn})}function Nt(){return(0,p["default"])(Vt).create({errHandler:fn,parser:Lt(),metricsModel:un,requestModifier:(0,M["default"])(Vt).getInstance()})}function Lt(){return(0,ge["default"])(Vt).create()}function xt(){return sn=(0,de["default"])(Vt).getInstance(),sn.initialize(),sn.setConfig({dashManifestModel:vn}),sn}function Ft(){if(an)return an;var e=dashjs.Protection;if("function"==typeof e){var t=e(Vt).create();return ie["default"].extend(e.events),oe["default"].extend(e.events,{publicOnly:!0}),an=t.createProtectionSystem({log:Qt,videoModel:mn,capabilities:dn,eventBus:zt,adapter:sn})}return null}function Ut(){if(on)return on;var e=dashjs.MetricsReporting;if("function"==typeof e){var t=e(Vt).create();return on=t.createMetricsReporting({log:Qt,eventBus:zt,mediaElement:Rt(),dashManifestModel:vn,metricsModel:un})}return null}function Bt(){var e=un.getReadOnlyMetricsFor("video")||un.getReadOnlyMetricsFor("audio");return hn.getCurrentDVRInfo(e)}function kt(e){var t,n,r=Bt();return r?(t=r.manifestInfo.availableFrom.getTime()/1e3,n=e+(t+r.range.start)):0}function jt(){if(!en)throw Ht;var e=cn.getActiveStreamInfo();return e?cn.getStreamById(e.id):null}function Kt(){en||(en=!0,Qt("Playback Initialized"),wt(),"string"==typeof Zt?cn.load(Zt):cn.loadWithManifest(Zt))}var Ht="You must first call play() to init playback before calling this method",qt="You must first call attachView() to set the video element before calling this method",Yt="You must first call attachSource() with a valid source before calling this method",Gt="MediaPlayer not initialized!",Vt=this.context,zt=(0,ne["default"])(Vt).getInstance(),Wt=(0,ee["default"])(Vt).getInstance(),Qt=Wt.log,Xt=void 0,Zt=void 0,Jt=void 0,$t=void 0,en=void 0,tn=void 0,nn=void 0,rn=void 0,an=void 0,on=void 0,sn=void 0,un=void 0,ln=void 0,fn=void 0,dn=void 0,cn=void 0,gn=void 0,pn=void 0,hn=void 0,vn=void 0,mn=void 0,_n=void 0;return Xt={initialize:t,on:k,off:K,extend:U,attachView:At,attachSource:Dt,isReady:n,play:r,isPaused:a,pause:i,isSeeking:s,seek:I,setMute:l,isMuted:d,setVolume:g,getVolume:h,time:A,duration:b,timeAsUTC:D,durationAsUTC:P,getActiveStream:jt,getDVRWindowSize:y,getDVRSeekOffset:T,convertToTimeCode:x,formatUTC:N,getVersion:q,getDebug:G,getBufferLength:m,getVideoModel:z,getVideoContainer:St,getTTMLRenderingDiv:Mt,getVideoElement:Rt,getSource:Ct,setLiveDelayFragmentCount:Q,setLiveDelay:Z,useSuggestedPresentationDelay:$,enableLastBitrateCaching:te,enableLastMediaSettingsCaching:re,setMaxAllowedBitrateFor:ae,getMaxAllowedBitrateFor:se,setMaxAllowedRepresentationRatioFor:fe,getMaxAllowedRepresentationRatioFor:ce,setAutoPlay:pe,getAutoPlay:ve,setScheduleWhilePaused:_e,getScheduleWhilePaused:Ee,getDashMetrics:Te,getMetricsFor:Se,getQualityFor:Ie,setQualityFor:Re,getLimitBitrateByPortal:Ae,setLimitBitrateByPortal:Me,getUsePixelRatioInLimitBitrateByPortal:be,setUsePixelRatioInLimitBitrateByPortal:Ce,setTextTrack:De,getBitrateInfoListFor:Oe,setInitialBitrateFor:Pe,getInitialBitrateFor:we,setInitialRepresentationRatioFor:Ne,getInitialRepresentationRatioFor:Le,getStreamsFromManifest:xe,getTracksFor:Fe,getTracksForTypeFromManifest:Ue,getCurrentTrackFor:Be,setInitialMediaSettingsFor:ke,getInitialMediaSettingsFor:je,setCurrentTrack:Ke,getTrackSwitchModeFor:He,setTrackSwitchModeFor:qe,setSelectionModeForInitialTrack:Ye,getSelectionModeForInitialTrack:Ge,getAutoSwitchQuality:Ve,setAutoSwitchQuality:ze,setFastSwitchEnabled:Xe,getFastSwitchEnabled:Ze,getAutoSwitchQualityFor:We,setAutoSwitchQualityFor:Qe,enableBufferOccupancyABR:Je,setBandwidthSafetyFactor:ct,getBandwidthSafetyFactor:gt,setAbandonLoadTimeout:pt,retrieveManifest:$e,addUTCTimingSource:et,removeUTCTimingSource:tt,clearDefaultUTCTimingSources:nt,restoreDefaultUTCTimingSources:rt,setBufferToKeep:at,setBufferPruningInterval:ot,setStableBufferTime:st,setBufferTimeAtTopQuality:ut,setFragmentLoaderRetryAttempts:ht,setFragmentLoaderRetryInterval:vt,setXHRWithCredentials:mt,setBufferTimeAtTopQualityLongForm:lt,setLongFormContentDurationThreshold:ft,setRichBufferThreshold:dt,getProtectionController:_t,attachProtectionController:yt,setProtectionData:Et,enableManifestDateHeaderTimeSource:it,displayCaptionsOnTop:Tt,attachVideoContainer:It,attachTTMLRenderingDiv:bt,reset:Ot},e(),Xt}Object.defineProperty(t,"__esModule",{value:!0});var a=n(58),o=r(a),s=n(9),u=r(s),l=n(20),f=r(l),d=n(13),c=r(d),g=n(98),p=r(g),h=n(51),v=r(h),m=n(11),_=r(m),y=n(159),E=r(y),T=n(39),S=r(T),I=n(28),R=r(I),A=n(33),M=r(A),b=n(17),C=r(b),D=n(40),O=r(D),P=n(31),w=r(P),N=n(5),L=r(N),x=n(14),F=r(x),U=n(10),B=r(U),k=n(111),j=r(k),K=n(47),H=r(K),q=n(19),Y=r(q),G=n(46),V=r(G),z=n(48),W=r(z),Q=n(108),X=r(Q),Z=n(104),J=r(Z),$=n(4),ee=r($),te=n(3),ne=r(te),re=n(2),ie=r(re),ae=n(38),oe=r(ae),se=n(1),ue=r(se),le=n(53),fe=n(15),de=r(fe),ce=n(80),ge=r(ce),pe=n(12),he=r(pe),ve=n(16),me=r(ve),_e=n(26),ye=r(_e);i.__dashjs_factory_name="MediaPlayer";var Ee=ue["default"].getClassFactory(i);Ee.events=oe["default"],t["default"]=Ee,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(t,n){var r,i=t.match(o);if(i){try{r=l[i[1]](s).create({eventBus:e.eventBus}),r.initialize(i[1],n,i[3],i[5])}catch(u){r=null,a("MetricsHandlerFactory: Could not create handler for type "+i[1]+" with args "+i[3]+", "+i[5]+" ("+u.message+")")}return r}}function n(e,t){l[e]=t}function r(e){delete l[e]}var i=void 0,a=e.log,o=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,s=this.context,l={BufferLevel:u["default"],DVBErrors:f["default"],HttpList:c["default"],PlayList:p["default"],RepSwitchList:p["default"],TcpList:p["default"]};return i={create:t,register:n,unregister:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(119),u=r(s),l=n(120),f=r(l),d=n(122),c=r(d),g=n(121),p=r(g);i.__dashjs_factory_name="MetricsHandlerFactory",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){var n;try{n=i[e.schemeIdUri](a).create(),n.initialize(e,t)}catch(r){n=null,o("ReportingFactory: could not create Reporting with schemeIdUri "+e.schemeIdUri+" ("+r.message+")")}return n}function n(e,t){i[e]=t}function r(e){delete i[e]}var i={"urn:dvb:dash:reporting:2014":u["default"]},a=this.context,o=e.log,s=void 0;return s={create:t,register:n,unregister:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(123),u=r(s);i.__dashjs_factory_name="ReportingFactory",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){return{reconstructFullMetricName:function(e,t,n){var r=e;return t&&(r+="("+t,n&&n.length&&(r+=","+n),r+=")"),r},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="HandlerHelpers",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var n=null,r=(0,u["default"])(i).getInstance();r.setConfig({log:e.log}),r.initialize();var a=t(e);return!n&&a&&(n=(0,o["default"])(i).create({protectionModel:a,protectionKeyController:r,adapter:e.adapter,eventBus:e.eventBus,log:e.log}),e.capabilities.setEncryptedMediaSupported(!0)),n}function t(e){var t=e.log,r=e.eventBus,a=e.videoModel.getElement();return void 0!==a.onencrypted&&void 0!==a.mediaKeys&&void 0!==navigator.requestMediaKeySystemAccess&&"function"==typeof navigator.requestMediaKeySystemAccess?(t("EME detected on this user agent! (ProtectionModel_21Jan2015)"),(0,c["default"])(i).create({log:t,eventBus:r})):n(a,E)?(t("EME detected on this user agent! (ProtectionModel_3Feb2014)"),(0,p["default"])(i).create({log:t,eventBus:r,api:n(a,E)})):n(a,y)?(t("EME detected on this user agent! (ProtectionModel_01b)"),(0,v["default"])(i).create({log:t,eventBus:r,api:n(a,y)})):(t("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null)}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("function"==typeof e[r[Object.keys(r)[0]]])return r}return null}var r=void 0,i=this.context;return r={createProtectionSystem:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(134),o=r(a),s=n(32),u=r(s),l=n(133),f=r(l),d=n(139),c=r(d),g=n(140),p=r(g),h=n(138),v=r(h),m=n(1),_=r(m),y=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],E=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];i.__dashjs_factory_name="Protection";var T=_["default"].getClassFactory(i);T.events=f["default"],t["default"]=T,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,r){if(n(this,e),r&&"persistent"!==r&&"temporary"!==r)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=t,this.type=r}return r(e,[{key:"toJWK",value:function(){var e,t=this.keyPairs.length,n={keys:[]};for(e=0;e<t;e++){var r={kty:"oct",alg:"A128KW",kid:this.keyPairs[e].keyID,k:this.keyPairs[e].key};n.keys.push(r)}this.type&&(n.type=this.type);var i=JSON.stringify(n),a=i.length,o=new ArrayBuffer(a),s=new Uint8Array(o);for(e=0;e<a;e++)s[e]=i.charCodeAt(e);return o}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.keyID=e,this.key=t};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){k={},j=[],K=(0,f["default"])(N).getInstance(),H=(0,c["default"])(N).getInstance(),q=(0,h["default"])(N).getInstance(),U.on(y["default"].BUFFER_EMPTY,v,B),U.on(y["default"].PLAYBACK_SEEKING,_,B),U.on(y["default"].PERIOD_SWITCH_STARTED,E,B)}function n(e){return e.map(function(e){return Math.log(e)})}function r(e,t,r,i){var a=NaN;if(i?(a=0,i.forEach(function(e,t){e>i[a]&&(a=t)})):(i=n(r),a=i.length-1),0===a)return null;var o=1-i[0]+(i[a]-i[0])/(t/e-1),s=e/(i[0]+o-1);return{utilities:i,gp:o,Vp:s}}function a(e){var t={},n=e.getMediaInfo(),i=e.getStreamProcessor(),a=e.getStreamInfo(),o=e.getTrackInfo(),s=i.isDynamic(),u=a.manifestInfo.duration,l=o.fragmentDuration,f=n.bitrateList.map(function(e){return e.bandwidth}),d=r(M,b,f,null);if(null===d)return t.state=S,t;if(t.state=I,t.bitrates=f,t.utilities=d.utilities,t.Vp=d.Vp,t.gp=d.gp,t.isDynamic=s,t.movieDuration=u,t.fragmentDuration=l,t.bandwidthSafetyFactor=K.getBandwidthSafetyFactor(),t.rebufferSafetyFactor=C,t.bufferTarget=K.getStableBufferTime(),t.lastQuality=0,t.virtualBuffer=0,t.throughputCount=s?P:w,A){for(var c="",g=0;g<f.length;++g){var p=d.utilities[g],h=f[g],v=0;if(g>0){var m=d.utilities[g-1],_=f[g-1];v=d.Vp*((m*h-p*_)/(h-_)+d.gp)}var y=d.Vp*(p+d.gp);c+="\n"+g+":"+(1e-6*f[g]).toFixed(3)+"Mbps "+v.toFixed(3)+"/"+y.toFixed(3)}L("BolaDebug "+n.type+" bitrates"+c)}return t}function s(e,t){for(var n=e.bitrates.length,r=NaN,i=NaN,a=0;a<n;++a){var o=(e.Vp*(e.utilities[a]+e.gp)-t)/e.bitrates[a];(isNaN(i)||o>=i)&&(i=o,r=a)}return r}function u(e,t){for(var n=x.getHttpRequests(e),r=[],i=n.length-1;i>=0&&r.length<t;--i){var a=n[i];a.type===g.HTTPRequest.MEDIA_SEGMENT_TYPE&&a._tfinish&&a.tresponse&&a.trace&&r.push(a)}return r}function l(e,t,n){var r=u(e,t);if(0===r.length)return 0;for(var i=0,a="",o=0;o<r.length;++o){var s=.001*(r[o]._tfinish.getTime()-r[o].trequest.getTime()),l=8*r[o].trace.reduce(function(e,t){return e+t.b[0]},0);A&&(a+=" "+(1e-6*l).toFixed(3)+"/"+s.toFixed(3)+"="+(1e-6*l/s).toFixed(3)+"Mbps"),i+=s/l}return A&&L("BolaDebug "+n+" BolaRule recent throughput = "+(r.length/(1e6*i)).toFixed(3)+"Mbps:"+a),r.length/i}function d(e,t){var n=0;return e.bitrates.some(function(e,r){return e>t||(n=r,!1)}),n}function p(e,t){var n=u(e,1);if(0===n.length)return 0;var r=n[0],i=Date.now(),a=r._tfinish.getTime();a>i&&(a=i);var o=k[t];k[t]=i;var s=0;return s=o&&o>a?i-o:i-a,s<=0?0:.001*s}function v(){A&&L("BolaDebug BUFFER_EMPTY"),j.forEach(function(e){var t=F.getReadOnlyMetricsFor(e);if(0!==t.BolaState.length){var n=t.BolaState[0]._s;n.state===R&&(n.virtualBuffer=0,F.updateBolaState(e,n))}})}function _(e){A&&L("BolaDebug PLAYBACK_SEEKING "+e.seekTime.toFixed(3)),j.forEach(function(e){var t=F.getReadOnlyMetricsFor(e);if(0!==t.BolaState.length){var n=t.BolaState[0]._s;n.state!==S&&(n.state=I),F.updateBolaState(e,n)}})}function E(){}function D(e,t){var n=e.getStreamProcessor();n.getScheduleController().setTimeToLoadDelay(0);var r=(0,o["default"])(N).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name}),u=e.getMediaInfo(),f=u.type,c=F.getReadOnlyMetricsFor(f);if(0===c.BolaState.length){A&&L("BolaDebug "+f+"\nBolaDebug "+f+" BolaRule for state=- fragmentStart="+q.getIndexHandlerTime(e.getStreamProcessor()).toFixed(3));var g=a(e);F.updateBolaState(f,g);var h=0;if(g.state!==S){j.push(f);var v=l(c,g.throughputCount,f);if(0===v)return A&&L("BolaDebug "+f+" BolaRule quality unchanged for INITIALIZE"),void t(r);h=d(g,v*g.bandwidthSafetyFactor),g.lastQuality=h,r.value=h,r.priority=o["default"].DEFAULT,r.reason.state=g.state,r.reason.throughput=v}return A&&L("BolaDebug "+f+" BolaRule quality "+h+" for INITIALIZE"),void t(r)}var m=c.BolaState[0]._s;if(m.state===S)return A&&L("BolaDebug "+f+" BolaRule quality 0 for ONE_BITRATE"),void t(r);var _=m.bitrates,y=m.utilities;A&&L("BolaDebug "+f+"\nBolaDebug "+f+" EXECUTE BolaRule for state="+m.state+" fragmentStart="+q.getIndexHandlerTime(e.getStreamProcessor()).toFixed(3));var E=x.getCurrentBufferLevel(c)?x.getCurrentBufferLevel(c):0,T=l(c,m.throughputCount,f);E<=.1&&(m.virtualBuffer=0);var M=p(c,f);M>0&&(m.virtualBuffer+=M),m.virtualBuffer<0&&(m.virtualBuffer=0);var b=E+m.virtualBuffer,D=s(m,b);if(A&&L("BolaDebug "+f+" BolaRule bufferLevel="+E.toFixed(3)+"(+"+m.virtualBuffer.toFixed(3)+"="+b.toFixed(3)+") recentThroughput="+(1e-6*T).toFixed(3)+" tentativeQuality="+D),m.state===I){var h=d(m,T*m.bandwidthSafetyFactor);if(E>m.fragmentDuration/C){m.state=R;for(var O=0,P=0;P<h;++P){var w=m.Vp*(m.gp+(_[h]*y[P]-_[P]*y[h])/(_[h]-_[P]));w>O&&(O=w)}O>E&&(m.virtualBuffer=O-E)}return A&&L("BolaDebug "+f+" BolaRule quality "+h+" for STARTUP"),m.lastQuality=h,F.updateBolaState(f,m),r.value=h,r.priority=o["default"].DEFAULT,r.reason.state=I,r.reason.throughput=T,void t(r)}if(D>m.lastQuality){var h=d(m,T);D>h&&(h<m.lastQuality&&(h=m.lastQuality),D=h)}if(T>0)for(var U=C*T*E/m.fragmentDuration;D>0&&_[D]>U;)--D;var B=0,k=m.Vp*(y[D]+m.gp);B=b-k,B>0&&(B>m.virtualBuffer?(B-=m.virtualBuffer,m.virtualBuffer=0):(m.virtualBuffer-=B,B=0)),B>0?D===_.length-1?B=0:n.getScheduleController().setTimeToLoadDelay(1e3*B):B=0,m.lastQuality=D,F.updateBolaState(f,m),r.value=D,r.priority=o["default"].DEFAULT,r.reason.state=m.state,r.reason.throughput=T,r.reason.bufferLevel=E,A&&L("BolaDebug "+f+" BolaRule quality "+D+" delay="+B.toFixed(3)+" for STEADY"),t(r)}function O(){U.off(y["default"].BUFFER_EMPTY,v,B),U.off(y["default"].PLAYBACK_SEEKING,_,B),U.off(y["default"].PERIOD_SWITCH_STARTED,E,B),t()}var P=2,w=3,N=this.context,L=(0,T["default"])(N).getInstance().log,x=e.dashMetrics,F=e.metricsModel,U=(0,m["default"])(N).getInstance(),B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0;return B={execute:D,reset:O},t(),B}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(1),u=r(s),l=n(5),f=r(l),d=n(9),c=r(d),g=n(7),p=n(15),h=r(p),v=n(3),m=r(v),_=n(2),y=r(_),E=n(4),T=r(E),S=0,I=1,R=2,A=!1,M=10,b=30,C=.5;i.__dashjs_factory_name="BolaRule";var D=u["default"].getClassFactory(i);D.BOLA_STATE_ONE_BITRATE=S,D.BOLA_STATE_STARTUP=I,D.BOLA_STATE_STEADY=R,D.BOLA_DEBUG=A,t["default"]=D,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n=0;for(n=0;n<this.customTimeRangeArray.length&&e>this.customTimeRangeArray[n].start;n++);for(this.customTimeRangeArray.splice(n,0,{start:e,end:t}),n=0;n<this.customTimeRangeArray.length-1;n++)this.mergeRanges(n,n+1)&&n--;this.length=this.customTimeRangeArray.length}function t(){this.customTimeRangeArray=[],this.length=0}function n(e,t){for(var n=0;n<this.customTimeRangeArray.length;n++)if(e<=this.customTimeRangeArray[n].start&&t>=this.customTimeRangeArray[n].end)this.customTimeRangeArray.splice(n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end){this.customTimeRangeArray.splice(n+1,0,{start:t,end:this.customTimeRangeArray[n].end}),this.customTimeRangeArray[n].end=e;break}e>this.customTimeRangeArray[n].start&&e<this.customTimeRangeArray[n].end?this.customTimeRangeArray[n].end=e:t>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end&&(this.customTimeRangeArray[n].start=t)}this.length=this.customTimeRangeArray.length}function r(e,t){var n=this.customTimeRangeArray[e],r=this.customTimeRangeArray[t];return n.start<=r.start&&r.start<=n.end&&n.end<=r.end?(n.end=r.end,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&r.end<=n.end?(n.start=r.start,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&n.end<=r.end?(this.customTimeRangeArray.splice(e,1),!0):n.start<=r.start&&r.start<=n.end&&r.end<=n.end&&(this.customTimeRangeArray.splice(t,1),!0)}function i(e){return this.customTimeRangeArray[e].start}function a(e){return this.customTimeRangeArray[e].end}var o=[],s=0;return{customTimeRangeArray:o,length:s,add:e,clear:t,remove:n,mergeRanges:r,start:i,end:a}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="CustomTimeRanges",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var t=e.streamId,n=e.mediaInfo.type,i=e.quality;r[t]=r[t]||{},r[t][n]=r[t][n]||{},r[t][n][i]=e}function t(e,t,n){return r[e][t][n]}function n(){r={}}var r={},i={save:e,extract:t,reset:n};return i}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="InitCache",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(23),l=r(u),f=function(e){function t(e,n){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.url=e||null,this.type=n||null,this.mediaType="stream",this.responseType="text"}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function a(){n(this,a),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]};r.INITIAL_PLAYOUT_START_REASON="initial_playout",r.SEEK_START_REASON="seek",r.RESUME_FROM_PAUSE_START_REASON="resume",r.METRICS_COLLECTION_START_REASON="metrics_collection_start";var i=function o(){n(this,o),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null};i.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",i.REBUFFERING_REASON="rebuffering",i.USER_REQUEST_STOP_REASON="user_request",i.END_OF_PERIOD_STOP_REASON="end_of_period",i.END_OF_CONTENT_STOP_REASON="end_of_content",i.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",i.FAILURE_STOP_REASON="failure",t.PlayList=r,t.PlayListTrace=i},function(e,t,n){"use strict";var r={};r.parseBuffer=function(e){return new i(e).parse()},r.Utils={},r.Utils.dataViewToString=function(e,t){var n=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(e);var r=[],i=0;if("utf-8"===n)for(;i<e.byteLength;){var a=e.getUint8(i++);a<128||(a<224?(a=(31&a)<<6,a|=63&e.getUint8(i++)):a<240?(a=(15&a)<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++)):(a=(7&a)<<18,a|=(63&e.getUint8(i++))<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++))),r.push(String.fromCharCode(a))}else for(;i<e.byteLength;)r.push(String.fromCharCode(e.getUint8(i++)));return r.join("")},t.parseBuffer=r.parseBuffer,t.Utils=r.Utils,r.Cursor=function(e){this.offset="undefined"==typeof e?0:e};var i=function(e){this._raw=new DataView(e),this._cursor=new r.Cursor,this.boxes=[]};i.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},i.prototype.fetchAll=function(e,t){var n=[];return i._sweep.call(this,e,n,t),n},i.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=a.parse(this);if("undefined"==typeof e.type)break;this.boxes.push(e)}return this},i._sweep=function(e,t,n){this.type&&this.type==e&&t.push(this);for(var r in this.boxes){if(t.length&&n)return;i._sweep.call(this.boxes[r],e,t,n)}};var a=function(){this._cursor=new r.Cursor};a.parse=function(e){var t=new a;return t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,t._parseBox(),e._cursor.offset=t._raw.byteOffset+t._raw.byteLength,t},a.prototype._readInt=function(e){var t=null;switch(e){case 8:t=this._raw.getInt8(this._cursor.offset-this._raw.byteOffset);break;case 16:t=this._raw.getInt16(this._cursor.offset-this._raw.byteOffset);break;case 32:t=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset);break;case 64:var n=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset),r=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset+4);t=n*Math.pow(2,32)+r}return this._cursor.offset+=e>>3,t},a.prototype._readUint=function(e){var t=null;switch(e){case 8:t=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset);break;case 16:t=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset);break;case 24:var n=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset),r=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset+2);t=(n<<8)+r;break;case 32:t=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset);break;case 64:var n=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset),r=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset+4);t=n*Math.pow(2,32)+r}return this._cursor.offset+=e>>3,t},a.prototype._readString=function(e){for(var t="",n=0;n<e;n++){var r=this._readUint(8);
32
- t+=String.fromCharCode(r)}return t},a.prototype._readTerminatedString=function(){for(var e="";;){var t=this._readUint(8);if(0==t)break;e+=String.fromCharCode(t)}return e},a.prototype._readTemplate=function(e){var t=this._readUint(e/2),n=this._readUint(e/2);return t+n/Math.pow(2,e/2)},a.prototype._parseBox=function(){if(this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)return void(this._root._incomplete=!0);switch(this.size=this._readUint(32),this.type=this._readString(4),1==this.size&&(this.largesize=this._readUint(64)),"uuid"==this.type&&(this.usertype=this._readString(16)),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset);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._boxParsers[this.type]&&this._boxParsers[this.type].call(this)},a.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},a.prototype._boxParsers={},["moov","trak","tref","mdia","minf","stbl","edts","dinf","mvex","moof","traf","mfra","udta","meco","strk","vttc"].forEach(function(e){a.prototype._boxParsers[e]=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(a.parse(this))}}),a.prototype._boxParsers.elst=function(){this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];for(var e=1;e<=this.entry_count;e++){var t={};1==this.version?(t.segment_duration=this._readUint(64),t.media_time=this._readInt(64)):(t.segment_duration=this._readUint(32),t.media_time=this._readInt(32)),t.media_rate_integer=this._readInt(16),t.media_rate_fraction=this._readInt(16),this.entries.push(t)}},a.prototype._boxParsers.emsg=function(){this._parseFullBox(),this.scheme_id_uri=this._readTerminatedString(),this.value=this._readTerminatedString(),this.timescale=this._readUint(32),this.presentation_time_delta=this._readUint(32),this.event_duration=this._readUint(32),this.id=this._readUint(32),this.message_data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},a.prototype._boxParsers.free=a.prototype._boxParsers.skip=function(){this.data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},a.prototype._boxParsers.ftyp=a.prototype._boxParsers.styp=function(){for(this.major_brand=this._readString(4),this.minor_versions=this._readUint(32),this.compatible_brands=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.compatible_brands.push(this._readString(4))},a.prototype._boxParsers.hdlr=function(){this._parseFullBox(),this.pre_defined=this._readUint(32),this.handler_type=this._readString(4),this.reserved=[this._readUint(32),this._readUint(32),this._readUint(32)],this.name=this._readTerminatedString()},a.prototype._boxParsers.mdat=function(){this.data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},a.prototype._boxParsers.mdhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32));var e=this._readUint(16);this.pad=e>>15,this.language=String.fromCharCode((e>>10&31)+96,(e>>5&31)+96,(31&e)+96),this.pre_defined=this._readUint(16)},a.prototype._boxParsers.mfhd=function(){this._parseFullBox(),this.sequence_number=this._readUint(32)},a.prototype._boxParsers.mvhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32)),this.rate=this._readTemplate(32),this.volume=this._readTemplate(16),this.reserved1=this._readUint(16),this.reserved2=[this._readUint(32),this._readUint(32)],this.matrix=[];for(var e=0;e<9;e++)this.matrix.push(this._readTemplate(32));this.pre_defined=[];for(var e=0;e<6;e++)this.pre_defined.push(this._readUint(32));this.next_track_ID=this._readUint(32)},a.prototype._boxParsers.payl=function(){var e=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.cue_text=r.Utils.dataViewToString(e)},a.prototype._boxParsers.sidx=function(){this._parseFullBox(),this.reference_ID=this._readUint(32),this.timescale=this._readUint(32),0==this.version?(this.earliest_presentation_time=this._readUint(32),this.first_offset=this._readUint(32)):(this.earliest_presentation_time=this._readUint(64),this.first_offset=this._readUint(64)),this.reserved=this._readUint(16),this.reference_count=this._readUint(16),this.references=[];for(var e=0;e<this.reference_count;e++){var t={},n=this._readUint(32);t.reference_type=n>>31&1,t.referenced_size=2147483647&n,t.subsegment_duration=this._readUint(32);var r=this._readUint(32);t.starts_with_SAP=r>>31&1,t.SAP_type=r>>28&7,t.SAP_delta_time=268435455&r,this.references.push(t)}},a.prototype._boxParsers.ssix=function(){this._parseFullBox(),this.subsegment_count=this._readUint(32),this.subsegments=[];for(var e=0;e<this.subsegment_count;e++){var t={};t.ranges_count=this._readUint(32),t.ranges=[];for(var n=0;n<t.ranges_count;n++){var r={};r.level=this._readUint(8),r.range_size=this._readUint(24),t.ranges.push(r)}this.subsegments.push(t)}},a.prototype._boxParsers.tfdt=function(){this._parseFullBox(),1==this.version?this.baseMediaDecodeTime=this._readUint(64):this.baseMediaDecodeTime=this._readUint(32)},a.prototype._boxParsers.tfhd=function(){this._parseFullBox(),this.track_ID=this._readUint(32),1&this.flags&&(this.base_data_offset=this._readUint(64)),2&this.flags&&(this.sample_description_offset=this._readUint(32)),8&this.flags&&(this.default_sample_duration=this._readUint(32)),16&this.flags&&(this.default_sample_size=this._readUint(32)),32&this.flags&&(this.default_sample_flags=this._readUint(32))},a.prototype._boxParsers.tkhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(32)),this.reserved2=[this._readUint(32),this._readUint(32)],this.layer=this._readUint(16),this.alternate_group=this._readUint(16),this.volume=this._readTemplate(16),this.reserved3=this._readUint(16),this.matrix=[];for(var e=0;e<9;e++)this.matrix.push(this._readTemplate(32));this.width=this._readUint(32),this.height=this._readUint(32)},a.prototype._boxParsers.trun=function(){this._parseFullBox(),this.sample_count=this._readUint(32),1&this.flags&&(this.data_offset=this._readInt(32)),4&this.flags&&(this.first_sample_flags=this._readUint(32)),this.samples=[];for(var e=0;e<this.sample_count;e++){var t={};256&this.flags&&(t.sample_duration=this._readUint(32)),512&this.flags&&(t.sample_size=this._readUint(32)),1024&this.flags&&(t.sample_flags=this._readUint(32)),2048&this.flags&&(0==this.version?t.sample_composition_time_offset=this._readUint(32):t.sample_composition_time_offset=this._readInt(32)),this.samples.push(t)}},a.prototype._boxParsers.vlab=function(){var e=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.source_label=r.Utils.dataViewToString(e)},a.prototype._boxParsers.vttC=function(){var e=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.config=r.Utils.dataViewToString(e)},a.prototype._boxParsers.vtte=function(){}},function(e,t,n){(function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(){var r=function(e,t){var n,r="dash",i=window.MediaSource,a=t.common,o=t.extend,s=t.version,u=function(e,t,n){return"application/dash+xml"===e.toLowerCase()&&i.isTypeSupported(t+';codecs="'+n+'"')&&(n.indexOf("mp4a.40.5")<0||navigator.userAgent.indexOf("Android")<0)},l=function(i,l){var f,d,c,g,p=t.bean,h={engineName:r,pick:function(e){var t,r,i,o;for(t=0;t<e.length;t+=1)if(r=e[t],i=r.dashType||n.type,o=r.dashCodecs||n.codecs,u(r.type,i,o))return"string"==typeof r.src&&(r.src=a.createAbsoluteUrl(r.src)),r},load:function(s){var u=i.conf,c=o(n,u.dash,u.clip.dash),g={ended:"finish",loadeddata:"ready",pause:"pause",play:"resume",progress:"buffer",ratechange:"speed",seeked:"seek",timeupdate:"progress",volumechange:"volume"},h=e.MediaPlayer.events,v=!!s.autoplay||!!u.autoplay,m="is-poster",_=0;if(f)(i.video.src&&s.src!==i.video.src||s.index)&&f.setAutoPlay(!0),f.attachSource(s.src);else{if(a.removeNode(a.findDirect("video",l)[0]||a.find(".fp-player > video",l)[0]),d=a.createElement("video",{"class":"fp-engine "+r+"-engine",volume:i.volumeLevel,"x-webkit-airplay":"allow"}),Object.keys(g).forEach(function(e){var t,n=g[e],c=e+"."+r;p.on(d,c,function(e){if(u.debug&&n.indexOf("progress")<0&&console.log(c,"->",n,e.originalEvent),i.ready||!(n.indexOf("ready")<0)){var r,g,p=d.currentTime,h=0,v=0;switch(n){case"ready":t=o(i.video,{duration:f.duration(),seekable:d.seekable.end(null),width:d.videoWidth,height:d.videoHeight,url:i.video.src});break;case"resume":i.poster&&(a.removeClass(l,m),i.poster=!1);break;case"seek":t=f.time();break;case"progress":i.live&&!_&&p>0&&(_=p),t=i.live?_?p-_:0:p;break;case"speed":t=d.playbackRate;break;case"volume":t=d.volume;break;case"buffer":try{if(p)for(r=d.buffered,g=r.length-1;g>-1;g-=1)v=r.end(g),v>=p&&(h=v)}catch(y){}s.buffer=h,t=h}i.trigger(n,[i,t])}})}),u.poster){var y=function(e){"stop"!==e.type&&v||setTimeout(function(){i.poster||(a.addClass(l,m),i.poster=!0)})};i.one("ready."+r,y).on("stop."+r,y)}i.on("error."+r,function(){f&&(f.reset(),f=0)}),f=e.MediaPlayer().create(),i.engine[r]=f,f.enableBufferOccupancyABR(c.bufferOccupancyABR),f.enableLastBitrateCaching(!1),f.setScheduleWhilePaused(!0),f.getDebug().setLogToBrowserConsole(c.debug),Object.keys(h).forEach(function(e){var t=h[e],n=r+t.charAt(0).toUpperCase()+t.slice(1),a=c.listeners,u=a&&a.indexOf(t)>-1;f.on(t,function(t){var r,a,l=o({},t),f=i.video.src;switch(delete l.type,e){case"ERROR":switch(l.error){case"download":r=4;break;case"manifestError":r=5;break;case"mediasource":switch(t.event){case"MEDIA_ERR_DECODE":r=3;break;case"MEDIA_ERR_SRC_NOT_SUPPORTED":r=5;break;case"MEDIA_ERR_NETWORK":r=2;break;case"MEDIA_ERR_ABORTED":r=1}}if(r)return a={code:r},r>2&&(a.video=o(s,{src:f,url:l.event.url||f})),void i.trigger("error",[i,a])}u&&i.trigger(n,[i,l])})}),a.prepend(a.find(".fp-player",l)[0],d),f.initialize(d,s.src,v)}i.video=s,d.paused&&v&&(t.support.firstframe?f.play():(d.play(),d.pause(),f.play()))},resume:function(){f.play()},pause:function(){f.pause()},seek:function(e){f.seek(e)},volume:function(e){d&&(d.volume=e)},speed:function(e){d.playbackRate=e,i.trigger("speed",[i,e])},unload:function(){if(f){var e="."+r;f.reset(),f=0,i.off(e),p.off(l,e),p.off(d,e),a.removeNode(d),d=0}}};return!/^6\.0\.[0-3]$/.test(s)||i.conf.splash||i.conf.poster||i.conf.autoplay||(c=a.css(l,"backgroundColor"),g="none"!==a.css(l,"backgroundImage")||c&&"rgba(0, 0, 0, 0)"!==c&&"transparent"!==c,g&&(i.conf.poster=!0)),h};i&&"function"==typeof i.isTypeSupported&&0!==s.indexOf("5.")&&(l.engineName=r,l.canPlay=function(e,i){return n=o({type:"video/mp4",codecs:"avc1.42c01e,mp4a.40.2"},t.conf[r],i[r],i.clip[r]),u(e,n.type,n.codecs)},t.engines.unshift(l))};"object"===t(e)&&e.exports?e.exports=r.bind(void 0,n(74)):window.dashjs&&window.flowplayer&&r(window.dashjs,window.flowplayer)}()}).call(t,n(187)(e))},function(e,t){"use strict";function n(e){var t,n,i;for(t=[],i=0,n=e.length;i<n;i+=1)e[i].isRoot?t.push("root"):t.push(e[i].name);var a=function(e,t){var n;if(null!==e&&null!==t)for(n in e)e.hasOwnProperty(n)&&(t.hasOwnProperty(n)||(t[n]=e[n]))},o=function(e,t,n){var i,o,s,u,l;if(null!==e&&0!==e.length)for(i=0,o=e.length;i<o;i+=1)s=e[i],t.hasOwnProperty(s.name)&&(n.hasOwnProperty(s.name)?s.merge&&(u=t[s.name],l=n[s.name],"object"===("undefined"==typeof u?"undefined":r(u))&&"object"===("undefined"==typeof l?"undefined":r(l))?a(u,l):null!=s.mergeFunction?n[s.name]=s.mergeFunction(u,l):n[s.name]=u+l):n[s.name]=t[s.name])},s=function l(e,t){var n,r,i,a,s,u,f,d=e;if(null!==d.children&&0!==d.children.length)for(n=0,r=d.children.length;n<r;n+=1)if(u=d.children[n],t.hasOwnProperty(u.name))if(u.isArray)for(s=t[u.name+"_asArray"],i=0,a=s.length;i<a;i+=1)f=s[i],o(d.properties,t,f),l(u,f);else f=t[u.name],o(d.properties,t,f),l(u,f)},u=function f(n){var i,a,o,u,l,d,c;if(null===n)return n;if("object"!==("undefined"==typeof n?"undefined":r(n)))return n;for(i=0,a=t.length;i<a;i+=1)"root"===t[i]&&(l=e[i],d=n,s(l,d));for(u in n)if(n.hasOwnProperty(u)&&"__children"!=u){if(o=t.indexOf(u),o!==-1)if(l=e[o],l.isArray)for(c=n[u+"_asArray"],i=0,a=c.length;i<a;i+=1)d=c[i],s(l,d);else d=n[u],s(l,d);f(n[u])}return n};return{run:u}}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(59),a=r(i),o=n(63),s=r(o),u=n(113),l=r(u),f=n(100),d=r(f),c=n(53),g=window||e,p=g.dashjs;p||(p=g.dashjs={}),p.MediaPlayer=a["default"],p.Protection=s["default"],p.MetricsReporting=l["default"],p.MediaPlayerFactory=d["default"],p.Version=(0,c.getVersionString)(),t["default"]=p,t.MediaPlayer=a["default"],t.Protection=s["default"],t.MetricsReporting=l["default"],t.MediaPlayerFactory=d["default"]}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.AST_IN_FUTURE="astinfuture",this.BUFFERING_COMPLETED="bufferingCompleted",this.BUFFER_CLEARED="bufferCleared",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.BYTES_APPENDED="bytesAppended",this.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",this.CHUNK_APPENDED="chunkAppended",this.CURRENT_TRACK_CHANGED="currenttrackchanged",this.DATA_UPDATE_COMPLETED="dataUpdateCompleted",this.DATA_UPDATE_STARTED="dataUpdateStarted",this.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",this.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",this.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",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.MANIFEST_UPDATED="manifestUpdated",this.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",this.QUOTA_EXCEEDED="quotaExceeded",this.REPRESENTATION_UPDATED="representationUpdated",this.SEGMENTS_LOADED="segmentsLoaded",this.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",this.SOURCEBUFFER_APPEND_COMPLETED="sourceBufferAppendCompleted",this.SOURCEBUFFER_REMOVE_COMPLETED="sourceBufferRemoveCompleted",this.STREAMS_COMPOSED="streamsComposed",this.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",this.STREAM_COMPLETED="streamCompleted",this.STREAM_INITIALIZED="streaminitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TIMED_TEXT_REQUESTED="timedTextRequested",this.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",this.URL_RESOLUTION_FAILED="urlResolutionFailed",this.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",this.XLINK_ALL_ELEMENTS_LOADED="xlinkAllElementsLoaded",this.XLINK_ELEMENT_LOADED="xlinkElementLoaded",this.XLINK_READY="xlinkReady"}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){V=-1,X=0,Z=NaN,B.on(d["default"].INITIALIZATION_LOADED,L,G),B.on(d["default"].SEGMENTS_LOADED,x,G)}function n(t){J=t,Q=J.getType(),W=J.isDynamic(),$=(0,S["default"])(F).create(e,W)}function r(){return J}function i(e){X=e}function a(){return X}function s(){return V}function f(){return Z}function c(){$=null,X=0,Z=NaN,z=NaN,V=-1,W=null,Q=null,J=null,B.off(d["default"].INITIALIZATION_LOADED,L,G),B.off(d["default"].SEGMENTS_LOADED,x,G)}function p(e){return e.split("$$").join("$")}function h(e,t){if(null===t||e.indexOf("$RepresentationID$")===-1)return e;var n=t.toString();return e.split("$RepresentationID$").join(n)}function v(e,t,n){var r,i,a=Y.resolve(n.path);return a&&t!==a.url&&k.isRelative(t)?(r=a.url,i=a.serviceLocation,t&&(r+=t)):r=t,!k.isRelative(r)&&(e.url=r,e.serviceLocation=i,!0)}function _(e,t){var n,r,i=new o["default"];if(n=e.adaptation.period,i.mediaType=t,i.type=l.HTTPRequest.INIT_SEGMENT_TYPE,i.range=e.range,r=n.start,i.availabilityStartTime=K.calcAvailabilityStartTimeFromPresentationTime(r,e.adaptation.period.mpd,W),i.availabilityEndTime=K.calcAvailabilityEndTimeFromPresentationTime(r+n.duration,n.mpd,W),i.quality=e.index,i.mediaInfo=J.getMediaInfo(),v(i,e.initialization,e))return i}function T(e){var t;return e?t=_(e,Q):null}function R(e){var t,n,r,i=e.adaptation.period,a=e.segmentInfoType,o=!1;return V<0?o=!1:W||V<e.availableSegmentsNumber?(n=(0,E.getSegmentByIndex)(V,e),n&&(r=n.presentationStartTime-i.start,t=e.adaptation.period.duration,U(e.segmentInfoType+": "+r+" / "+t),o=("SegmentTimeline"!==a||!W)&&r>=t)):o=!0,o}function A(e){return $.getSegments(e,z,V,M)}function M(e,t){if(e.segments=t,t&&t.length>0&&(Z=isNaN(Z)?t[0].presentationStartTime:Math.min(t[0].presentationStartTime,Z)),W&&isNaN(K.getExpectedLiveEdge())){var n=t.length-1,r=t[n],i=r.presentationStartTime,a=q.getMetricsFor("stream");K.setExpectedLiveEdge(i),q.updateManifestUpdateInfo(H.getCurrentManifestUpdate(a),{presentationStartTime:i})}}function b(e){if(!e)throw new u["default"]("no representation");return e.segments=null,A(e),e}function C(e,t){var n,r=e.initialization,i="BaseURL"!==e.segmentInfoType&&"SegmentBase"!==e.segmentInfoType&&!e.indexRange;return e.segmentDuration||e.segments||b(e),e.segmentAvailabilityRange=null,e.segmentAvailabilityRange=K.calcSegmentAvailabilityRange(e,W),e.segmentAvailabilityRange.end<e.segmentAvailabilityRange.start&&!e.useCalculatedLiveEdgeTime?(n=new u["default"](I,"no segments are available yet",{availabilityDelay:e.segmentAvailabilityRange.start-e.segmentAvailabilityRange.end}),void B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:e,error:n})):(t||(V=-1),e.segmentDuration&&b(e),r||j.loadInitialization(e),i||j.loadSegments(e,Q,e.indexRange),void(r&&i&&B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:e})))}function D(e,t,n){var r,i,a,o,s,u=t.segments,l=u?u.length:null,f=-1;if(u&&l>0)for(s=0;s<l;s++)if(i=u[s],a=i.presentationStartTime,o=i.duration,r=void 0===n||null===n?o/2:n,e+r>=a&&e-r<a+o){f=i.availabilityIdx;break}return f}function O(e){if(null===e||void 0===e)return null;var t=new o["default"],n=e.representation,r=n.adaptation.period.mpd.manifest.Period_asArray[n.adaptation.period.index].AdaptationSet_asArray[n.adaptation.index].Representation_asArray[n.index].bandwidth,i=e.media;return i=(0,E.replaceTokenForTemplate)(i,"Number",e.replacementNumber),i=(0,E.replaceTokenForTemplate)(i,"Time",e.replacementTime),i=(0,E.replaceTokenForTemplate)(i,"Bandwidth",r),i=h(i,n.id),i=p(i),t.mediaType=Q,t.type=l.HTTPRequest.MEDIA_SEGMENT_TYPE,t.range=e.mediaRange,t.startTime=e.presentationStartTime,t.duration=e.duration,t.timescale=n.timescale,t.availabilityStartTime=e.availabilityStartTime,t.availabilityEndTime=e.availabilityEndTime,t.wallStartTime=e.wallStartTime,t.quality=n.index,t.index=e.availabilityIdx,t.mediaInfo=J.getMediaInfo(),t.adaptationIndex=n.adaptation.index,v(t,i,n)?t:void 0}function P(e,t,n){var r,i,a,s=V,u=!!n&&n.keepIdx,l=n?n.timeThreshold:null,f=!(!n||!n.ignoreIsFinished);return e?(z!==t&&(z=t,U("Getting the request for "+Q+" time : "+t)),V=D(t,e,l),A(e),V<0&&(V=D(t,e,l)),V>0&&U("Index for "+Q+" time "+t+" is "+V),a=!f&&R(e),a?(r=new o["default"],r.action=o["default"].ACTION_COMPLETE,r.index=V,r.mediaType=Q,r.mediaInfo=J.getMediaInfo(),U("Signal complete.",r)):(i=(0,E.getSegmentByIndex)(V,e),r=O(i)),u&&s>=0&&(V="SegmentTimeline"===e.segmentInfoType&&W?V:s),r):null}function w(e,t){var n=(e.segmentAvailabilityRange.end-e.segmentAvailabilityRange.start)/2;return e.segments=null,e.segmentAvailabilityRange={start:t-n,end:t+n},P(e,t,{keepIdx:!1,ignoreIsFinished:!0})}function N(e){var t,n,r;return e&&V!==-1?(z=null,V++,U("Getting the next request at index: "+V),r=R(e),r?(t=new o["default"],t.action=o["default"].ACTION_COMPLETE,t.index=V,t.mediaType=Q,t.mediaInfo=J.getMediaInfo(),U("Signal complete.")):(A(e),n=(0,E.getSegmentByIndex)(V,e),t=O(n),!n&&W&&V--),t):null}function L(e){var t=e.representation;t.segments&&B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:t})}function x(e){if(!e.error&&Q===e.mediaType){var t,n,r,i,a=e.segments,o=e.representation,s=[],u=0;for(t=0,n=a.length;t<n;t++)r=a[t],i=(0,E.getTimeBasedSegment)(K,W,o,r.startTime,r.duration,r.timescale,r.media,r.mediaRange,u),s.push(i),i=null,u++;o.segmentAvailabilityRange={start:s[0].presentationStartTime,end:s[n-1].presentationStartTime},o.availableSegmentsNumber=n,M(o,s),o.initialization&&B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:o})}}var F=this.context,U=(0,m["default"])(F).getInstance().log,B=(0,g["default"])(F).getInstance(),k=(0,y["default"])(F).getInstance(),j=e.segmentBaseLoader,K=e.timelineConverter,H=e.dashMetrics,q=e.metricsModel,Y=e.baseURLController,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0;return G={initialize:n,getStreamProcessor:r,getInitRequest:T,getSegmentRequestForTime:P,getNextSegmentRequest:N,generateSegmentRequestForTime:w,updateRepresentation:C,setCurrentTime:i,getCurrentTime:a,getCurrentIndex:s,getEarliestTime:f,reset:c},t(),G}Object.defineProperty(t,"__esModule",{value:!0});var a=n(23),o=r(a),s=n(6),u=r(s),l=n(7),f=n(2),d=r(f),c=n(3),g=r(c),p=n(1),h=r(p),v=n(4),m=r(v),_=n(22),y=r(_),E=n(25),T=n(89),S=r(T),I=1;i.__dashjs_factory_name="DashHandler";var R=h["default"].getClassFactory(i);R.SEGMENTS_UNAVAILABLE_ERROR_CODE=I,t["default"]=R,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){E=(0,c["default"])(g).getInstance(),T=(0,_["default"])(g).getInstance(),I=(0,o["default"])(g).getInstance()}function t(e){e.baseURLController&&(R=e.baseURLController)}function n(e,t){var r=!0,i=null,a=null,o=new XMLHttpRequest,u=R.resolve(e.path),f=t||{url:u?u.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,request:o};h("Start searching for initialization."),o.onload=function(){o.status<200||o.status>299||(r=!1,f.bytesLoaded=f.range.end,a=T.parse(o.response),i=s(a),i?(e.range=i,e.initialization=f.url,m.trigger(p["default"].INITIALIZATION_LOADED,{representation:e})):(f.range.end=f.bytesLoaded+f.bytesToLoad,n(e,f)))},o.onloadend=o.onerror=function(){r&&(r=!1,E.downloadError("initialization",f.url,o),m.trigger(p["default"].INITIALIZATION_LOADED,{representation:e}))},l(o,f),h("Perform init search: "+f.url)}function r(e,t,n,i,o){if(n&&(void 0===n.start||void 0===n.end)){var s=n?n.toString().split("-"):null;n=s?{start:parseFloat(s[0]),end:parseFloat(s[1])}:null}o=o?o:d;var u=!0,f=null,c=null,g=!!n,p=new XMLHttpRequest,v=R.resolve(e.path),m={url:v?v.url:void 0,range:g?n:{start:0,end:1500},searching:!g,bytesLoaded:i?i.bytesLoaded:0,bytesToLoad:1500,request:p};p.onload=function(){if(!(p.status<200||p.status>299)){var n=m.bytesToLoad,i=p.response.byteLength;if(u=!1,m.bytesLoaded=m.range.end-m.range.start,f=T.parse(p.response),c=f.getBox("sidx"),c&&c.isComplete){var s,l,d=c.references;if(null!==d&&void 0!==d&&d.length>0&&(s=1===d[0].reference_type),s){h("Initiate multiple SIDX load."),m.range.end=m.range.start+c.size;var g,v,_,y,E,S=[],I=0,R=(c.offset||m.range.start)+c.size,A=function(n){n?(S=S.concat(n),I++,I>=v&&o(S,e,t)):o(null,e,t)};for(g=0,v=d.length;g<v;g++)_=R,y=R+d[g].referenced_size-1,R+=d[g].referenced_size,E={start:_,end:y},r(e,null,E,m,A)}else h("Parsing segments from SIDX."),l=a(c,m),o(l,e,t)}else{if(c)m.range.start=c.offset||m.range.start,m.range.end=m.range.start+(c.size||n);else{if(i<m.bytesLoaded)return void o(null,e,t);var M=f.getLastBox();M&&M.size?(m.range.start=M.offset+M.size,m.range.end=m.range.start+n):m.range.end+=n}r(e,t,m.range,m,o)}}},p.onloadend=p.onerror=function(){u&&(u=!1,E.downloadError("SIDX",m.url,p),o(null,e,t))},l(p,m),h("Perform SIDX load: "+m.url)}function i(){E=null,T=null,I=null,h=null}function a(e,t){for(var n,r,i,a,o=e.references,s=o.length,l=e.timescale,f=e.earliest_presentation_time,d=t.range.start+e.offset+e.first_offset+e.size,c=[],g=0;g<s;g++)i=o[g].subsegment_duration,a=o[g].referenced_size,n=new u["default"],n.duration=i,n.media=t.url,n.startTime=f,n.timescale=l,r=d+a-1,n.mediaRange=d+"-"+r,c.push(n),f+=i,d+=a;return c}function s(e){var t,n,r=e.getBox("ftyp"),i=e.getBox("moov"),a=null;return h("Searching for initialization."),i&&i.isComplete&&(t=r?r.offset:i.offset,n=i.offset+i.size-1,a=t+"-"+n,h("Found the initialization. Range: "+a)),a}function l(e,t){t.url&&(e.open("GET",I.modifyRequestURL(t.url)),e.responseType="arraybuffer",e.setRequestHeader("Range","bytes="+t.range.start+"-"+t.range.end),e=I.modifyRequestHeader(e),e.send(null))}function d(e,t,n){e?m.trigger(p["default"].SEGMENTS_LOADED,{segments:e,representation:t,mediaType:n}):m.trigger(p["default"].SEGMENTS_LOADED,{segments:null,representation:t,mediaType:n,error:new f["default"](null,"error loading segments",null)})}var g=this.context,h=(0,S["default"])(g).getInstance().log,m=(0,v["default"])(g).getInstance(),y=void 0,E=void 0,T=void 0,I=void 0,R=void 0;return y={setConfig:t,initialize:e,loadInitialization:n,loadSegments:r,reset:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(33),o=r(a),s=n(37),u=r(s),l=n(6),f=r(l),d=n(11),c=r(d),g=n(2),p=r(g),h=n(3),v=r(h),m=n(49),_=r(m),y=n(1),E=r(y),T=n(4),S=r(T);i.__dashjs_factory_name="SegmentBaseLoader",t["default"]=E["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){R={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"},CueBlockNumber:{tag:21368}}}}},Void:{tag:236,required:!0}}}function t(){M=(0,v["default"])(h).getInstance(),b=(0,_["default"])(h).getInstance(),D=(0,A["default"])(h).create({errHandler:M,metricsModel:C,requestModifier:b})}function n(e){if(!e.baseURLController||!e.metricsModel)throw new Error("Missing config parameter(s)");O=e.baseURLController,C=e.metricsModel}function r(e){var t=[],n=void 0,r=void 0,i=void 0,a=(0,f["default"])(h).create({data:e}),o=void 0;for(a.consumeTag(R.Segment.Cues),r=a.getMatroskaCodedNum();a.moreData()&&a.consumeTagAndSize(R.Segment.Cues.CuePoint,!0);){for(n={},n.CueTime=a.parseTag(R.Segment.Cues.CuePoint.CueTime),n.CueTracks=[];a.moreData()&&a.consumeTagAndSize(R.Segment.Cues.CuePoint.CueTrackPositions,!0);){if(i={},i.Track=a.parseTag(R.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===i.Track)throw new Error("Cue track cannot be 0");i.ClusterPosition=a.parseTag(R.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),a.getPos()+4>r||!a.consumeTag(R.Segment.Cues.CuePoint.CueTrackPositions.CueBlockNumber,!0)?n.CueTracks.push(i):(o=a.getMatroskaCodedNum(),i.BlockNumber=a.getMatroskaUint(o),n.CueTracks.push(i))}if(0===n.CueTracks.length)throw new Error("Mandatory cuetrack not found");t.push(n)}if(0===t.length)throw new Error("mandatory cuepoint not found");return t}function i(e,t,n,i,a){var o=void 0,s=void 0,u=void 0,l=void 0,f=void 0,d=void 0,c=void 0,g=void 0;for(s=r(e),u=[],f=0,d=s.length;f<d;f+=1)l=new E["default"],o=0,o=f<s.length-1?s[f+1].CueTime-s[f].CueTime:a-s[f].CueTime,l.duration=o,l.media=t,l.startTime=s[f].CueTime,l.timescale=1e3,c=s[f].CueTracks[0].ClusterPosition+n,g=f<s.length-1?s[f+1].CueTracks[0].ClusterPosition+n-1:i-1,l.mediaRange=c+"-"+g,u.push(l);return m("Parsed cues: "+u.length+" cues."),u}function a(e,t,n,r){var a=(0,f["default"])(h).create({data:e}),o=void 0,s=void 0,u=n.split("-"),l=null,d={url:t,range:{start:parseFloat(u[0]),end:parseFloat(u[1])},request:l},g=void 0,p=void 0;for(m("Parse EBML header: "+d.url),a.skipOverElement(R.EBML),a.consumeTag(R.Segment),g=a.getMatroskaCodedNum(),g+=a.getPos(),p=a.getPos();a.moreData()&&!a.consumeTagAndSize(R.Segment.Info,!0);)if(!(a.skipOverElement(R.Segment.SeekHead,!0)||a.skipOverElement(R.Segment.Tracks,!0)||a.skipOverElement(R.Segment.Cues,!0)||a.skipOverElement(R.Void,!0)))throw new Error("no valid top level element found");for(;void 0===o;){var v=a.getMatroskaCodedNum(!0),_=a.getMatroskaCodedNum();switch(v){case R.Segment.Info.Duration.tag:o=a[R.Segment.Info.Duration.parse](_);break;default:a.setPos(a.getPos()+_)}}l=c(d);var y=function(e){s=i(e,d.url,p,g,o),r(s)},E=function(){m("Download Error: Cues "+d.url),r(null)};D.load({request:l,success:y,error:E}),m("Perform cues load: "+d.url+" bytes="+d.range.start+"-"+d.range.end)}function s(e,t){var n=null,r=O.resolve(e.path),i=r?r.url:void 0,a=e.range.split("-"),s=t||{range:{start:parseFloat(a[0]),end:parseFloat(a[1])},request:n,url:i,init:!0};m("Start loading initialization."),n=c(s);var u=function(){e.initialization=s.url,y.trigger(o["default"].INITIALIZATION_LOADED,{representation:e})},l=function(){y.trigger(o["default"].INITIALIZATION_LOADED,{
33
- representation:e})};D.load({request:n,success:u,error:l}),m("Perform init load: "+s.url)}function l(e,t,n,r){var i=null,o=O.resolve(e.path),s=o?o.url:void 0,u=8192,l={bytesLoaded:0,bytesToLoad:u,range:{start:0,end:u},request:i,url:s,init:!1};r=r?r:d,i=c(l),m("Parsing ebml header");var f=function(i){a(i,s,n,function(n){r(n,e,t)})},g=function(){r(null,e,t)};D.load({request:i,success:f,error:g})}function d(e,t,n){e?y.trigger(o["default"].SEGMENTS_LOADED,{segments:e,representation:t,mediaType:n}):y.trigger(o["default"].SEGMENTS_LOADED,{segments:null,representation:t,mediaType:n,error:new Error(null,"error loading segments",null)})}function c(e){var t=new I["default"];return t.type=e.init?T.HTTPRequest.INIT_SEGMENT_TYPE:T.HTTPRequest.MEDIA_SEGMENT_TYPE,t.url=e.url,t.range=e.range.start+"-"+e.range.end,t}function g(){M=null,b=null,m=null}var h=this.context,m=(0,p["default"])(h).getInstance().log,y=(0,u["default"])(h).getInstance(),S=void 0,R=void 0,M=void 0,b=void 0,C=void 0,D=void 0,O=void 0;return S={setConfig:n,initialize:t,loadInitialization:s,loadSegments:l,reset:g},e(),S}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),o=r(a),s=n(3),u=r(s),l=n(160),f=r(l),d=n(1),c=r(d),g=n(4),p=r(g),h=n(11),v=r(h),m=n(33),_=r(m),y=n(37),E=r(y),T=n(7),S=n(23),I=r(S),R=n(27),A=r(R);i.__dashjs_factory_name="WebmSegmentBaseLoader",t["default"]=c["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){K=null,H=-1,q=!0,Y=[],z=(0,c["default"])(B).getInstance(),Q=(0,v["default"])(B).getInstance(),X=(0,p["default"])(B).getInstance(),Z=(0,_["default"])(B).getInstance(),J=(0,E["default"])(B).getInstance(),$=(0,R["default"])(B).getInstance(),ee=(0,f["default"])(B).getInstance(),te=(0,o["default"])(B).getInstance(),ne=(0,u["default"])(B).getInstance(),re=(0,S["default"])(B).getInstance(),k.on(O["default"].QUALITY_CHANGE_REQUESTED,F,j),k.on(O["default"].REPRESENTATION_UPDATED,w,j),k.on(O["default"].WALLCLOCK_TIME_UPDATED,N,j),k.on(O["default"].BUFFER_LEVEL_UPDATED,x,j),k.on(O["default"].LIVE_EDGE_SEARCH_COMPLETED,L,j)}function t(e){e.abrController&&(z=e.abrController)}function n(e){V=e,W=V.getIndexHandler()}function r(){return V}function i(){return K}function a(){return H}function s(){return q}function l(){return G}function d(){k.off(O["default"].QUALITY_CHANGE_REQUESTED,F,j),k.off(O["default"].REPRESENTATION_UPDATED,w,j),k.off(O["default"].WALLCLOCK_TIME_UPDATED,N,j),k.off(O["default"].BUFFER_LEVEL_UPDATED,x,j),k.off(O["default"].LIVE_EDGE_SEARCH_COMPLETED,L,j),K=null,H=-1,q=!0,Y=[],z=null,Q=null,X=null,Z=null,J=null,$=null,ee=null,te=null,ne=null,re=null}function g(e,t,n){var r,i,a=null,o=V.getStreamInfo(),s=z.getTopQualityIndexFor(n,o.id);if(q=!0,k.trigger(O["default"].DATA_UPDATE_STARTED,{sender:this}),Y=A(t),null===K&&"fragmentedText"!==n?(i=z.getAverageThroughput(n),a=i||z.getInitialBitrateFor(n,o),r=z.getQualityForBitrate(V.getMediaInfo(),a)):r=z.getQualityFor(n,o),r>s&&(r=s),G=y(r),K=e,"video"!==n&&"audio"!==n&&"fragmentedText"!==n)return q=!1,void k.trigger(O["default"].DATA_UPDATE_COMPLETED,{sender:this,data:K,currentRepresentation:G});for(var u=0;u<Y.length;u++)W.updateRepresentation(Y[u],!0)}function h(){var e=new Date,t=l(),n=1e3*X.getTime();J.addRepresentationSwitch(t.adaptation.type,e,n,t.id)}function m(){var e=ee.calcSegmentAvailabilityRange(G,V.isDynamic());J.addDVRInfo(V.getType(),X.getTime(),V.getStreamInfo().manifestInfo,e)}function y(e){return Y[e]}function T(e){return Y.indexOf(e)}function I(){for(var e=0,t=Y.length;e<t;e++){var n=Y[e].segmentInfoType;if(null===Y[e].segmentAvailabilityRange||null===Y[e].initialization||("SegmentBase"===n||"BaseURL"===n)&&!Y[e].segments)return!1}return!0}function A(e){var t,n=Z.getValue();return H=te.getIndexForAdaptation(K,n,e.period.index),t=te.getRepresentationsForAdaptation(n,e)}function b(e){for(var t,n=0,r=Y.length;n<r;n++)t=Y[n],t.segmentAvailabilityRange=ee.calcSegmentAvailabilityRange(t,e)}function D(){Y.forEach(function(e){e.segmentAvailabilityRange=null})}function P(e){var t=e,n=function(){if(!s()){q=!0,k.trigger(O["default"].DATA_UPDATE_STARTED,{sender:j}),D();for(var e=0;e<Y.length;e++)W.updateRepresentation(Y[e],!0)}};q=!1,k.trigger(O["default"].AST_IN_FUTURE,{delay:t}),setTimeout(n,t)}function w(e){if(e.sender.getStreamProcessor()===V&&s()){var t,n,r,i=e.representation,a=J.getMetricsFor("stream"),o=J.getMetricsFor(l().adaptation.type),u=ne.getCurrentManifestUpdate(a),f=!1,d=0;if("dynamic"===i.adaptation.period.mpd.manifest.type){var c=i.segmentAvailabilityRange.end-i.segmentAvailabilityRange.start,g=X.computeLiveDelay(G.segmentDuration,V.getStreamInfo().manifestInfo.DVRWindowSize);d=1e3*(g-c)}if(d>0)return m(),P(d),n=new M["default"](U,"Segments update failed",null),void k.trigger(O["default"].DATA_UPDATE_COMPLETED,{sender:this,data:K,currentRepresentation:G,error:n});if(u){for(var p=0;p<u.trackInfo.length;p++)if(t=u.trackInfo[p],t.index===i.index&&t.mediaType===V.getType()){f=!0;break}f||J.addManifestUpdateRepresentationInfo(u,i.id,i.index,i.adaptation.period.index,V.getType(),i.presentationTimeOffset,i.startNumber,i.segmentInfoType)}I()&&(q=!1,z.setPlaybackQuality(V.getType(),V.getStreamInfo(),T(G)),J.updateManifestUpdateInfo(u,{latency:G.segmentAvailabilityRange.end-X.getTime()}),r=ne.getCurrentRepresentationSwitch(o),r||h(),k.trigger(O["default"].DATA_UPDATE_COMPLETED,{sender:this,data:K,currentRepresentation:G}))}}function N(e){e.isDynamic&&b(e.isDynamic)}function L(e){if(!e.error){b(!0),W.updateRepresentation(G,!1);var t=Z.getValue(),n=G.adaptation.period,r=Q.getActiveStreamInfo();r.isLast&&(n.mpd.checkTime=te.getCheckTime(t,n),n.duration=te.getEndTimeForLastPeriod(Z.getValue(),n)-n.start,r.duration=n.duration)}}function x(e){e.sender.getStreamProcessor()===V&&m()}function F(e){e.mediaType===V.getType()&&V.getStreamInfo().id===e.streamInfo.id&&e.oldQuality!==e.newQuality&&(G=y(e.newQuality),$.setSavedBitrateSettings(e.mediaType,G.bandwidth),h())}var U=1,B=this.context,k=(0,C["default"])(B).getInstance(),j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0;return j={initialize:n,setConfig:t,getData:i,getDataIndex:a,isUpdating:s,updateData:g,getStreamProcessor:r,getCurrentRepresentation:l,getRepresentationForQuality:y,reset:d},e(),j}Object.defineProperty(t,"__esModule",{value:!0});var a=n(12),o=r(a),s=n(16),u=r(s),l=n(26),f=r(l),d=n(10),c=r(d),g=n(9),p=r(g),h=n(20),v=r(h),m=n(31),_=r(m),y=n(14),E=r(y),T=n(5),S=r(T),I=n(50),R=r(I),A=n(6),M=r(A),b=n(3),C=r(b),D=n(2),O=r(D),P=n(1),w=r(P);i.__dashjs_factory_name="RepresentationController",t["default"]=w["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){s=[new v["default"],new _["default"],new E["default"]],u=new p["default"](s,"",(!0)),l=new c["default"]([new S["default"],new R["default"]])}function t(e,t){var n;try{var a=window.performance.now();if(n=u.xml_str2json(e),!n)throw new Error("parser error");var o=window.performance.now();l.run(n);var f=window.performance.now();t.setMatchers(s),t.setIron(l),r("Parsing complete: ( xml2json: "+(o-a).toPrecision(3)+"ms, objectiron: "+(f-o).toPrecision(3)+"ms, total: "+((f-a)/1e3).toPrecision(3)+"s)")}catch(d){return i.manifestError("parsing the manifest failed","parse",e,d),null}return n}var n=this.context,r=(0,f["default"])(n).getInstance().log,i=(0,o["default"])(n).getInstance(),a=void 0,s=void 0,u=void 0,l=void 0;return a={parse:t},e(),a}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),o=r(a),s=n(1),u=r(s),l=n(4),f=r(l),d=n(73),c=r(d),g=n(35),p=r(g),h=n(85),v=r(h),m=n(84),_=r(m),y=n(86),E=r(y),T=n(82),S=r(T),I=n(83),R=r(I);i.__dashjs_factory_name="DashParser",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,r){n(this,e);var i=function(e){return e&&e.length&&e.charAt(0)===e.charAt(0).toUpperCase()};this._name=t,this._merge=void 0!==r?r:i(t)}return r(e,[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(55),l=r(u),f=function(e){function t(){i(this,t);var e=["profiles","width","height","sar","frameRate","audioSamplingRate","mimeType","segmentProfiles","codecs","maximumSAPPeriod","startWithSAP","maxPlayoutRate","codingDependency","scanType","FramePacking","AudioChannelConfiguration","ContentProtection","EssentialProperty","SupplementalProperty","InbandEventStream"];return s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,"AdaptationSet",e,[new l["default"]("Representation",e,[new l["default"]("SubRepresentation",e)])])}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(55),l=r(u),f=function(e){function t(){i(this,t);var e=["SegmentBase","SegmentTemplate","SegmentList"];return s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,"Period",e,[new l["default"]("AdaptationSet",e,[new l["default"]("Representation",e)])])}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(36),l=r(u),f=60,d=60,c=1e3,g=/^([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}))?/,p=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,function(e){return g.test(e.value)},function(e){var t=g.exec(e),n=void 0;if(n=Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10),t[6]&&parseInt(t[6],10)||0,t[7]&&parseFloat(t[7])*c||0),t[9]&&t[10]){var r=parseInt(t[9],10)*d+parseInt(t[10],10);n+=("+"===t[8]?-1:1)*r*f*c}return new Date(n)})}return a(t,e),t}(l["default"]);t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(36),l=r(u),f=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,d=31536e3,c=2592e3,g=86400,p=3600,h=60,v=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,function(e){for(var t=["minBufferTime","mediaPresentationDuration","minimumUpdatePeriod","timeShiftBufferDepth","maxSegmentDuration","maxSubsegmentDuration","suggestedPresentationDelay","start","starttime","duration"],n=t.length,r=0;r<n;r++)if(e.nodeName===t[r])return f.test(e.value);return!1},function(e){var t=f.exec(e),n=parseFloat(t[2]||0)*d+parseFloat(t[4]||0)*c+parseFloat(t[6]||0)*g+parseFloat(t[8]||0)*p+parseFloat(t[10]||0)*h+parseFloat(t[12]||0);return void 0!==t[1]&&(n=-n),n})}return a(t,e),t}(l["default"]);t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(36),l=r(u),f=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,d=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,function(e){return f.test(e.value)},function(e){return parseFloat(e)})}return a(t,e),t}(l["default"]);t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&e.boxParser&&(i=e.boxParser)}function t(e){var t,n,r,a,o,s,u,l,f,d,c,g=i.parse(e),p=g.getBox("tfhd"),h=g.getBox("tfdt"),v=g.getBox("trun"),m=g.getBox("moof"),_=g.getBox("mfhd");for(d=_.sequence_number,r=v.sample_count,o=h.baseMediaDecodeTime,f=(p.base_data_offset||0)+(v.data_offset||0),s=[],l=0;l<r;l++)u=v.samples[l],t=void 0!==u.sample_duration?u.sample_duration:p.default_sample_duration,a=void 0!==u.sample_size?u.sample_size:p.default_sample_size,n=void 0!==u.sample_composition_time_offset?u.sample_composition_time_offset:0,s.push({dts:o,cts:o+n,duration:t,offset:m.offset+f,size:a}),f+=a,o+=t;return c=o-h.baseMediaDecodeTime,{sampleList:s,sequenceNumber:d,totalDuration:c}}function n(e){var t=i.parse(e),n=t.getBox("mdhd");return n?n.timescale:NaN}var r=void 0,i=void 0;return r={getSamplesInfo:t,getMediaTimescaleFromMoov:n,setConfig:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="FragmentedTextBoxParser",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(e,n,i,a){var o,u,l,f,d,c,g,p=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,h=p.SegmentURL_asArray.length,v=[];for(g=e.startNumber,f=(0,s.decideSegmentListRangeForTemplate)(r,t,e,n,i,a),d=Math.max(f.start,0),c=Math.min(f.end,p.SegmentURL_asArray.length-1),o=d;o<=c;o++)l=p.SegmentURL_asArray[o],u=(0,s.getIndexBasedSegment)(r,t,e,o),u.replacementTime=(g+o-1)*e.segmentDuration,u.media=l.media?l.media:"",u.mediaRange=l.mediaRange,u.index=l.index,u.indexRange=l.indexRange,v.push(u),u=null;return e.availableSegmentsNumber=h,v}var r=e.timelineConverter,i=void 0;return i={getSegments:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(25);i.__dashjs_factory_name="ListSegmentsGetter";var u=o["default"].getClassFactory(i);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(){s=(0,u["default"])(a).create(e,t),l=(0,f["default"])(a).create(e,t),d=(0,c["default"])(a).create(e,t)}function r(e,t,n,r,a){var o,u=e.segmentInfoType;return"SegmentBase"!==u&&"BaseURL"!==u&&i(e,n)?("SegmentTimeline"===u?o=s.getSegments(e,t,n,a):"SegmentTemplate"===u?o=l.getSegments(e,t,n,a):"SegmentList"===u&&(o=d.getSegments(e,t,n,a)),r&&r(e,o)):o=e.segments,o}function i(e,t){var n,r,i=e.segments,a=!1;return i&&0!==i.length?(r=i[0].availabilityIdx,n=i[i.length-1].availabilityIdx,a=t<r||t>n):a=!0,a}var a=this.context,o=void 0,s=void 0,l=void 0,d=void 0;return o={getSegments:r},n(),o}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(91),u=r(s),l=n(90),f=r(l),d=n(88),c=r(d);i.__dashjs_factory_name="SegmentsGetter";var g=o["default"].getClassFactory(i);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(e,n,i,a){var o,u,l,f,d,c=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate,g=e.segmentDuration,p=e.segmentAvailabilityRange,h=[],v=null,m=null;for(d=e.startNumber,o=isNaN(g)&&!t?{start:d,end:d}:(0,s.decideSegmentListRangeForTemplate)(r,t,e,n,i,a),l=o.start,f=o.end,u=l;u<=f;u++)m=(0,s.getIndexBasedSegment)(r,t,e,u),m.replacementTime=(d+u-1)*e.segmentDuration,v=c.media,v=(0,s.replaceTokenForTemplate)(v,"Number",m.replacementNumber),v=(0,s.replaceTokenForTemplate)(v,"Time",m.replacementTime),m.media=v,h.push(m),m=null;return isNaN(g)?e.availableSegmentsNumber=1:e.availableSegmentsNumber=Math.ceil((p.end-p.start)/g),h}var r=e.timelineConverter,i=void 0;return i={getSegments:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(25);i.__dashjs_factory_name="TemplateSegmentsGetter";var u=o["default"].getClassFactory(i);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(e,n,i,a){var o,u,l,f,d,c,g,p,h,v,m,_,y,E,T=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,S=T.SegmentTimeline,I=T.SegmentURL_asArray,R=e.availableSegmentsNumber>0,A=10,M=0,b=0,C=-1,D=[],O=!1,P=function(n,i){var a=T.media,o=n.mediaRange;return I&&(a=I[i].media||"",o=I[i].mediaRange),(0,s.getTimeBasedSegment)(r,t,e,M,n.d,E,a,o,C)};for(E=e.timescale,o=S.S_asArray,h=(0,s.decideSegmentListRangeForTimeline)(r,t,n,i,a),h?(_=h.start,y=h.end):m=r.calcMediaTimeFromPresentationTime(n||0,e),l=0,f=o.length;l<f;l++){if(u=o[l],c=0,u.hasOwnProperty("r")&&(c=u.r),u.hasOwnProperty("t")&&(M=u.t,b=M/E),c<0){if(p=o[l+1],p&&p.hasOwnProperty("t"))g=p.t/E;else{var w=e.segmentAvailabilityRange?e.segmentAvailabilityRange.end:r.calcSegmentAvailabilityRange(e,t).end;g=r.calcMediaTimeFromPresentationTime(w,e),e.segmentDuration=u.d/E}c=Math.ceil((g-b)/(u.d/E))-1}if(v){if(R)break;C+=c+1}else for(d=0;d<=c;d++){if(C++,h){if(C>y){if(v=!0,R)break;continue}C>=_&&D.push(P(u,C))}else{if(D.length>A){if(v=!0,R)break;continue}O?D.push(P(u,C)):b>=m-u.d/E*1.5&&(O=!0,D.push(P(u,C)))}M+=u.d,b=M/E}}return R||(e.availableSegmentsNumber=C+1),D}var r=e.timelineConverter,i=void 0;return i={getSegments:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(25);i.__dashjs_factory_name="TimelineSegmentsGetter";var u=o["default"].getClassFactory(i);t["default"]=u,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.period=null,this.index=-1,this.type=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri=""};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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.checkTime=NaN,this.clientServerTimeShift=0,this.isClientServerTimeSyncCompleted=!1};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null};r.DEFAULT_ID="defaultId",t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=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.maxPlayoutRate=NaN};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){g=(0,o["default"])(s).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier})}function n(e){var t=function(t){l.trigger(p["default"].CHECK_FOR_EXISTENCE_COMPLETED,{request:e,exists:t})};if(e){var n=new u["default"](e.url);g.load({request:n,success:function(){t(!0)},error:function(){t(!1)}})}else t(!1)}function r(e){var t=function(t,n){l.trigger(p["default"].LOADING_COMPLETED,{request:e,response:t||null,error:n||null,sender:d})};e?g.load({request:e,progress:function(){l.trigger(p["default"].LOADING_PROGRESS,{request:e})},success:function(e){t(e)},error:function(e,n,r){t(void 0,new f["default"](m,r,n))}}):t(void 0,new f["default"](_,y))}function i(){g&&g.abort()}function a(){g&&(g.abort(),g=null)}var s=this.context,l=(0,c["default"])(s).getInstance(),d=void 0,g=void 0;return d={checkForExistence:n,load:r,abort:i,reset:a},t(),d}Object.defineProperty(t,"__esModule",{value:!0});var a=n(27),o=r(a),s=n(167),u=r(s),l=n(6),f=r(l),d=n(3),c=r(d),g=n(2),p=r(g),h=n(1),v=r(h),m=1,_=2,y="request is null";i.__dashjs_factory_name="FragmentLoader";var E=v["default"].getClassFactory(i);E.FRAGMENT_LOADER_ERROR_LOADING_FAILURE=m,E.FRAGMENT_LOADER_ERROR_NULL_REQUEST=_,t["default"]=E,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){s.on(y["default"].XLINK_READY,n,g),v=(0,u["default"])(a).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier}),_=(0,o["default"])(a).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier})}function n(e){s.trigger(y["default"].INTERNAL_MANIFEST_LOADED,{manifest:e.manifest})}function r(e){var t=new c["default"](e,h.HTTPRequest.MPD_TYPE);v.load({request:t,success:function(t,n,r){var i,a;r.responseURL&&r.responseURL!==e?(a=l.parseBaseUrl(r.responseURL),i=r.responseURL):(l.isRelative(e)&&(e=l.parseBaseUrl(window.location.href)+e),a=l.parseBaseUrl(e));var o=d.parse(t,_);o?(o.url=i||e,o.originalUrl||(o.originalUrl=o.url),o.baseUri=a,o.loadedTime=new Date,_.resolveManifestOnLoad(o)):s.trigger(y["default"].INTERNAL_MANIFEST_LOADED,{manifest:null,error:new p["default"](S,R)})},error:function(t,n,r){s.trigger(y["default"].INTERNAL_MANIFEST_LOADED,{manifest:null,error:new p["default"](I,"Failed loading manifest: "+e+", "+r)})}})}function i(){s.off(y["default"].XLINK_READY,n,g),_&&(_.reset(),_=null),v&&(v.abort(),v=null)}var a=this.context,s=(0,m["default"])(a).getInstance(),l=(0,f["default"])(a).getInstance(),d=e.parser,g=void 0,v=void 0,_=void 0;return g={load:r,reset:i},t(),g}Object.defineProperty(t,"__esModule",{value:!0});var a=n(112),o=r(a),s=n(27),u=r(s),l=n(22),f=r(l),d=n(69),c=r(d),g=n(6),p=r(g),h=n(7),v=n(3),m=r(v),_=n(2),y=r(_),E=n(1),T=r(E),S=1,I=2,R="parsing failed";i.__dashjs_factory_name="ManifestLoader";var A=T["default"].getClassFactory(i);A.MANIFEST_LOADER_ERROR_PARSING_FAILURE=S,A.MANIFEST_LOADER_ERROR_LOADING_FAILURE=I,t["default"]=A,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&(e.manifestModel&&(A=e.manifestModel),e.dashManifestModel&&(M=e.dashManifestModel))}function t(e){R=e,E=NaN,T=null,I=!1,S=!0,_.on(u["default"].STREAMS_COMPOSED,h,this),_.on(u["default"].PLAYBACK_STARTED,g,this),_.on(u["default"].PLAYBACK_PAUSED,p,this),_.on(u["default"].INTERNAL_MANIFEST_LOADED,d,this)}function n(e){l(e)}function r(){return R}function i(){_.off(u["default"].PLAYBACK_STARTED,g,this),_.off(u["default"].PLAYBACK_PAUSED,p,this),_.off(u["default"].STREAMS_COMPOSED,h,this),_.off(u["default"].INTERNAL_MANIFEST_LOADED,d,this),S=!0,I=!1,a(),E=NaN}function a(){null!==T&&(clearInterval(T),T=null)}function s(){a(),isNaN(E)||(m("Refresh manifest in "+E+" seconds."),T=setTimeout(f,Math.min(1e3*E,Math.pow(2,31)-1),this))}function l(e){var t,n,r=new Date;A.setValue(e),m("Manifest has been refreshed at "+r+"["+r.getTime()/1e3+"] "),t=M.getRefreshDelay(e),n=((new Date).getTime()-e.loadedTime.getTime())/1e3,E=Math.max(t-n,0),_.trigger(u["default"].MANIFEST_UPDATED,{manifest:e}),S||s()}function f(){var e,t;if(!S&&!I){I=!0,e=A.getValue(),t=e.url;var n=M.getLocation(e);n&&(t=n),R.load(t)}}function d(e){e.error||l(e.manifest)}function g(){S=!1,s()}function p(){S=!0,a()}function h(){I=!1}var v=this.context,m=(0,c["default"])(v).getInstance().log,_=(0,o["default"])(v).getInstance(),y=void 0,E=void 0,T=void 0,S=void 0,I=void 0,R=void 0,A=void 0,M=void 0;return y={initialize:t,setManifest:n,getManifestLoader:r,setConfig:e,reset:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d);i.__dashjs_factory_name="ManifestUpdater",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t,n){if(!e||"VIDEO"!==e.nodeName)return null;if(e._dashjs_player)return e._dashjs_player;var i,a=e.id||e.name||"video element";if(t=t||[].slice.call(e.querySelectorAll("source")).filter(function(e){return e.type==r})[0],!t&&e.src)t=document.createElement("source"),t.src=e.src;else if(!t&&!e.src)return null;return n=n||{},i=(0,s["default"])(n).create(),i.initialize(e,t.src,e.autoplay),i.getDebug().log("Converted "+a+" to dash.js player and added content: "+t.src),e._dashjs_player=i,i}function t(t,i){var a=[];t=t||"[data-dashjs-player]",i=i||document;for(var o=i.querySelectorAll(t),s=0;s<o.length;s++){var u=e(o[s],null);a.push(u)}for(var l=i.querySelectorAll('source[type="'+r+'"]'),s=0;s<l.length;s++){var f=n(l[s]),u=e(f,null);a.push(u)}return a}function n(e){for(var t=!0;t;){var n=e;if(t=!1,"video"===n.nodeName.toLowerCase())return n;e=n.parentNode,t=!0}}var r="application/dash+xml";return{create:e,createAll:t}}function a(){window.removeEventListener("load",a),u.createAll()}Object.defineProperty(t,"__esModule",{value:!0});var o=n(59),s=r(o),u=i(),l=window&&window.dashjs&&window.dashjs.skipAutoCreate;!l&&window&&window.addEventListener&&("complete"===window.document.readyState?u.createAll():window.addEventListener("load",a)),t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){le=[],fe=!1,de=!1,ce=null,ge={},pe=!1,he=!1,me=(0,o["default"])(J).getInstance(),_e=(0,S["default"])(J).getInstance(),Se=(0,v["default"])(J).getInstance(),ye=(0,f["default"])(J).getInstance(),Ee=(0,p["default"])(J).create(),Ie=(0,j["default"])(J).getInstance(),ee.on(L["default"].BUFFERING_COMPLETED,V,ue),ee.on(L["default"].DATA_UPDATE_COMPLETED,z,ue)}function n(e,t){ce=e,ve=t,ve&&(ee.on(L["default"].KEY_ERROR,D,ue),ee.on(L["default"].SERVER_CERTIFICATE_UPDATED,D,ue),ee.on(L["default"].LICENSE_REQUEST_COMPLETE,D,ue),ee.on(L["default"].KEY_SYSTEM_SELECTED,D,ue),ee.on(L["default"].KEY_SESSION_CREATED,D,ue))}function r(e){fe?G():(ee.on(L["default"].CURRENT_TRACK_CHANGED,x,ue),H(e))}function i(){for(var e=le.length,t=0;t<e;t++)le[t].reset();
34
- le=[],fe=!1,de=!1,I(),ee.off(L["default"].CURRENT_TRACK_CHANGED,x,ue)}function a(){_e&&(_e.pause(),_e=null),Ee&&(Ee.reset(),Ee=null),me.abortSearch(),i(),ye=null,Se=null,ne=null,te=null,re=null,ie=null,$=null,ae=null,pe=!1,he=!1,ge={},ee.off(L["default"].DATA_UPDATE_COMPLETED,z,ue),ee.off(L["default"].BUFFERING_COMPLETED,V,ue),ee.off(L["default"].KEY_ERROR,D,ue),ee.off(L["default"].SERVER_CERTIFICATE_UPDATED,D,ue),ee.off(L["default"].LICENSE_REQUEST_COMPLETE,D,ue),ee.off(L["default"].KEY_SYSTEM_SELECTED,D,ue),ee.off(L["default"].KEY_SESSION_CREATED,D,ue)}function s(){return ce.duration}function l(){return ce.start}function d(){return ce.index}function g(){return ce.id}function h(){return ce}function m(e){return null!==Y(e)}function y(e){var t=Y(e);return Se.getBitrateList(t)}function T(){Te&&Te.start()}function I(){Te&&Te.clear()}function A(){return fe}function b(){return he}function D(e){e.error&&(ae.mediaKeySessionError(e.error),$(e.error),a())}function P(e){return"text"===e.type?e.mimeType:e.type}function N(e,t,n){var r,i,a=e.type;if("muxed"===a&&e)return i="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",$(i),ae.manifestError(i,"multiplexedrep",te.getValue()),!1;if("text"===a||"fragmentedText"===a||"embeddedText"===a)return!0;if(r=e.codec,$(a+" codec: "+r),e.contentProtection&&!ie.supportsEncryptedMedia())ae.capabilityError("encryptedmedia");else if(!ie.supportsCodec((0,_["default"])(J).getInstance().getElement(),r))return i=a+"Codec ("+r+") is not supported.",ae.manifestError(i,"codec",n),$(i),!1;return!0}function x(e){if(e.newMediaInfo.streamInfo.id===ce.id){var t=W(e.oldMediaInfo);if(t){var n=_e.getTime(),r=t.getBuffer(),i=e.newMediaInfo,a=te.getValue(),o=le.indexOf(t),s=t.getMediaSource();"fragmentedText"!==i.type?(t.reset(!0),k(i,a,s,{buffer:r,replaceIdx:o,currentTime:n}),_e.seek(_e.getTime())):t.updateMediaInfo(a,i)}}}function U(e){var t=e.split("/")[1];return"webm"===t.toLowerCase()}function B(e){var t=U(e.mimeType)?(0,C["default"])(J).getInstance():(0,M["default"])(J).getInstance();t.setConfig({baseURLController:se,metricsModel:(0,E["default"])(J).getInstance()}),t.initialize();var n=(0,R["default"])(J).create({segmentBaseLoader:t,timelineConverter:oe,dashMetrics:(0,O["default"])(J).getInstance(),metricsModel:(0,E["default"])(J).getInstance(),baseURLController:se});return n}function k(e,t,n,r){var i=(0,u["default"])(J).create({indexHandler:B(e),timelineConverter:oe,adapter:re,manifestModel:te}),a=re.getAllMediaInfoForType(t,ce,e.type);if(i.initialize(P(e),Ee,n,ue,Te),Se.updateTopQualityIndex(e),r?(i.setBuffer(r.buffer),i.getIndexHandler().setCurrentTime(r.currentTime),le[r.replaceIdx]=i):le.push(i),"text"===e.type||"fragmentedText"===e.type){for(var o,s=0;s<a.length;s++)a[s].index===e.index&&(o=s),i.updateMediaInfo(t,a[s]);"fragmentedText"===e.type&&i.updateMediaInfo(t,a[o])}else i.updateMediaInfo(t,e);return i}function K(e,t){var n,r=te.getValue(),i=re.getAllMediaInfoForType(r,ce,e),a=null;if(!i||0===i.length)return void $("No "+e+" data.");for(var o=0,s=i.length;o<s;o++)if(a=i[o],"embeddedText"===e)Ie.addEmbeddedTrack(a);else{if(!N(a,t,r))continue;ye.isMultiTrackSupportedByType(a.type)&&ye.addTrack(a,ce)}"embeddedText"!==e&&0!==ye.getTracksFor(e,ce).length&&(ye.checkInitialMediaSettingsForType(e,ce),n=ye.getCurrentTrackFor(e,ce),k(n,r,t))}function H(e){var t,n=te.getValue();if(Te=(0,c["default"])(J).getInstance(),Te.initialize(),Te.setConfig({manifestModel:te,manifestUpdater:ne}),t=re.getEventsFor(n,ce),Te.addInlineEvents(t),pe=!0,K("video",e),K("audio",e),K("text",e),K("fragmentedText",e),K("embeddedText",e),K("muxed",e),G(),de=!0,pe=!1,0===le.length){var r="No streams to play.";ae.manifestError(r,"nostreams",n),$(r)}else me.initialize(oe,le[0]),q()}function q(){var e=le.length,t=!!ge.audio||!!ge.video,n=t?new Error(Z,"Data update failed",null):null,r=0;for(r;r<e;r++)if(le[r].isUpdating()||pe)return;he=!0,fe=!0,de&&(ve&&ve.initialize(te.getValue(),Y("audio"),Y("video")),ee.trigger(L["default"].STREAM_INITIALIZED,{streamInfo:ce,error:n}))}function Y(e){for(var t=le.length,n=null,r=0;r<t;r++)if(n=le[r],n.getType()===e)return n.getMediaInfo();return null}function G(){for(var e=0,t=le.length;e<t;e++)le[e].createBuffer()}function V(e){if(e.streamInfo===ce){var t=Q(),n=t.length,r=0;for(r;r<n;r++)if(!t[r].isBufferingCompleted())return;ee.trigger(L["default"].STREAM_BUFFERING_COMPLETED,{streamInfo:ce})}}function z(e){var t=e.sender.getStreamProcessor();t.getStreamInfo()===ce&&(ge[t.getType()]=e.error,q())}function W(e){if(!e)return!1;var t=Q();return t.filter(function(t){return t.getType()===e.type})[0]}function Q(){var e,t,n=le.length,r=[],i=0;for(i;i<n;i++)t=le[i],e=t.getType(),"audio"!==e&&"video"!==e&&"fragmentedText"!==e||r.push(t);return r}function X(e){$("Manifest updated... updating data system wide.");var t=te.getValue();if(fe=!1,pe=!0,he=!1,ce=e,Te){var n=re.getEventsFor(t,ce);Te.addInlineEvents(n)}for(var r=0,i=le.length;r<i;r++){var a=le[r],o=re.getMediaInfoForType(t,ce,a.getType());Se.updateTopQualityIndex(o),a.updateMediaInfo(t,o)}pe=!1,q()}var Z=1,J=this.context,$=(0,F["default"])(J).getInstance().log,ee=(0,w["default"])(J).getInstance(),te=e.manifestModel,ne=e.manifestUpdater,re=e.adapter,ie=e.capabilities,ae=e.errHandler,oe=e.timelineConverter,se=e.baseURLController,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0;return ue={initialize:n,activate:r,deactivate:i,getDuration:s,getStartTime:l,getStreamIndex:d,getId:g,getStreamInfo:h,hasMedia:m,getBitrateListFor:y,startEventController:T,isActivated:A,isInitialized:b,updateData:X,reset:a,getProcessors:Q},t(),ue}Object.defineProperty(t,"__esModule",{value:!0});var a=n(51),o=r(a),s=n(102),u=r(s),l=n(13),f=r(l),d=n(106),c=r(d),g=n(107),p=r(g),h=n(10),v=r(h),m=n(19),_=r(m),y=n(14),E=r(y),T=n(9),S=r(T),I=n(76),R=r(I),A=n(77),M=r(A),b=n(78),C=r(b),D=n(16),O=r(D),P=n(3),w=r(P),N=n(2),L=r(N),x=n(4),F=r(x),U=n(1),B=r(U),k=n(17),j=r(k);i.__dashjs_factory_name="Stream",t["default"]=B["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){ne=[]}function n(e,t,n,r,i){te=e,re=r,ie=i,le=t,$=re.getStreamInfo().manifestInfo.isDynamic,W.initialize(this),ae=(0,o["default"])(z).getInstance(),ae.initialize(te,this),oe=V(e),se=(0,v["default"])(z).create({metricsModel:(0,S["default"])(z).getInstance(),manifestModel:Z,adapter:X,dashMetrics:(0,L["default"])(z).getInstance(),dashManifestModel:(0,w["default"])(z).getInstance(),timelineConverter:Q,rulesController:(0,_["default"])(z).getInstance(),mediaPlayerModel:(0,E["default"])(z).getInstance()}),oe.initialize(te,n,this),se.initialize(te,this),fe=(0,R["default"])(z).create({metricsModel:(0,S["default"])(z).getInstance(),errHandler:(0,B["default"])(z).getInstance(),requestModifier:(0,M["default"])(z).getInstance()}),de=se.getFragmentModel(),de.setLoader(fe),ue=(0,F["default"])(z).create(),ue.initialize(this)}function r(e){W.reset(),oe&&(oe.reset(e),oe=null),se&&(se.reset(),se=null),ue&&(ue.reset(),ue=null),le=null,fe=null,ie=null,re=null,$=null,ee=null,ne=[],te=null}function i(){return ue.isUpdating()}function a(){return te}function s(){return ae}function l(){return ue}function d(){return fe}function g(){return W}function h(){return le}function m(){return oe.getBuffer()}function y(e){oe.setBuffer(e)}function T(){return oe}function I(){return de}function A(){return re.getStreamInfo()}function b(e,t){t===ee||t&&ee&&t.type!==ee.type||(ee=t),ne.indexOf(t)===-1&&ne.push(t),X.updateData(e,this)}function D(){return ne}function P(){return ee}function N(){return oe.getMediaSource()}function x(){return se}function U(){return ie}function k(){se.start()}function j(){se.stop()}function K(){return X.getCurrentRepresentationInfo(Z.getValue(),ue)}function H(e){return X.getRepresentationInfoForQuality(Z.getValue(),ue,e)}function q(){return oe.getIsBufferingCompleted()}function Y(){return oe.getBuffer()||oe.createBuffer(ee)}function G(){return $}function V(e){var t=null;return t="video"===e||"audio"===e||"fragmentedText"===e?(0,u["default"])(z).create({metricsModel:(0,S["default"])(z).getInstance(),manifestModel:Z,sourceBufferController:(0,C["default"])(z).getInstance(),errHandler:(0,B["default"])(z).getInstance(),streamController:(0,f["default"])(z).getInstance(),mediaController:(0,c["default"])(z).getInstance(),adapter:X,textSourceBuffer:(0,O["default"])(z).getInstance()}):(0,p["default"])(z).create({errHandler:(0,B["default"])(z).getInstance(),sourceBufferController:(0,C["default"])(z).getInstance()})}var z=this.context,W=e.indexHandler,Q=e.timelineConverter,X=e.adapter,Z=e.manifestModel,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0;return J={initialize:n,isUpdating:i,getType:a,getBufferController:T,getABRController:s,getFragmentLoader:d,getFragmentModel:I,getScheduleController:x,getEventController:U,getFragmentController:h,getRepresentationController:l,getIndexHandler:g,getCurrentRepresentationInfo:K,getRepresentationInfoForQuality:H,isBufferingCompleted:q,createBuffer:Y,getStreamInfo:A,updateMediaInfo:b,getMediaInfoArr:D,getMediaInfo:P,getMediaSource:N,getBuffer:m,setBuffer:y,start:k,stop:j,isDynamic:G,reset:r},t(),J}Object.defineProperty(t,"__esModule",{value:!0});var a=n(10),o=r(a),s=n(18),u=r(s),l=n(20),f=r(l),d=n(13),c=r(d),g=n(110),p=r(g),h=n(109),v=r(h),m=n(46),_=r(m),y=n(5),E=r(y),T=n(14),S=r(T),I=n(97),R=r(I),A=n(33),M=r(A),b=n(28),C=r(b),D=n(17),O=r(D),P=n(12),w=r(P),N=n(16),L=r(N),x=n(79),F=r(x),U=n(11),B=r(U),k=n(1),j=r(k);i.__dashjs_factory_name="StreamProcessor",t["default"]=j["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t,n){var i=function(r,i){t.resolved=!0,t.resolvedContent=r?r:null,a.trigger(h["default"].XLINK_ELEMENT_LOADED,{element:t,resolveObject:n,error:r||i?null:new o["default"](_,"Failed loading Xlink element: "+e)})};if(e===r)i(null,!0);else{var u=new d["default"](e,l.HTTPRequest.XLINK_TYPE);s.load({request:u,success:function(e){i(e)},error:function(){i(null)}})}}function n(){s&&(s.abort(),s=null)}var r="urn:mpeg:dash:resolve-to-zero:2013",i=this.context,a=(0,g["default"])(i).getInstance(),s=(0,u["default"])(i).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier}),f=void 0;return f={load:t,reset:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),o=r(a),s=n(27),u=r(s),l=n(7),f=n(69),d=r(f),c=n(3),g=r(c),p=n(2),h=r(p),v=n(1),m=r(v),_=1;i.__dashjs_factory_name="XlinkLoader";var y=m["default"].getClassFactory(i);y.XLINK_LOADER_ERROR_LOADING_FAILURE=_,t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){p.invalidateSelectedIndexes(e.entry)}function t(){p=(0,o["default"])(l).create(),h=(0,u["default"])(l).create(),d.on(_["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,e,s)}function n(e){p.update(e),h.chooseSelectorFromManifest(e)}function r(e){var t=p.getForPath(e),n=t.reduce(function(e,t){var n=h.select(t);return n&&(g.isRelative(n.url)?e.url+=n.url:g.isPathAbsolute(n.url)?e.url=g.parseOrigin(e.url)+n.url:(e.url=n.url,e.serviceLocation=n.serviceLocation)),e},new c["default"]);if(!g.isRelative(n.url))return n}function i(){p.reset(),h.reset()}function a(e){n(e)}var s=void 0,l=this.context,d=(0,v["default"])(l).getInstance(),g=(0,f["default"])(l).getInstance(),p=void 0,h=void 0;return s={reset:i,initialize:a,resolve:r},t(),s}Object.defineProperty(t,"__esModule",{value:!0});var a=n(132),o=r(a),s=n(158),u=r(s),l=n(22),f=r(l),d=n(56),c=r(d),g=n(1),p=r(g),h=n(3),v=r(h),m=n(2),_=r(m);i.__dashjs_factory_name="BaseURLController",t["default"]=p["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){return!!(o.length&&e&&e.length)&&o.indexOf(e)!==-1}function n(e){o.indexOf(e)===-1&&(o.push(e),s.trigger(l,{entry:e}))}function r(e){e.error&&n(e.request.serviceLocation)}function i(){f&&s.on(f,r,this)}function a(){o=[]}var o=[],s=(0,u["default"])(this.context).getInstance(),l=e.updateEventName,f=e.loadFailedEventName;return i(),{add:n,contains:t,reset:a}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(3),u=r(s);i.__dashjs_factory_name="BlackListController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){D=!1,E={},T={},S={},I=null,R=100,A=R/1e3,C=(0,o["default"])(v).getInstance()}function t(){null!==I&&D&&(clearInterval(I),I=null,D=!1)}function n(){m("Start Event Controller"),D||isNaN(R)||(D=!0,I=setInterval(s,R))}function r(e){if(E={},e)for(var t=0;t<e.length;t++){var n=e[t];E[n.id]=n,m("Add inline event with id "+n.id)}m("Added "+e.length+" inline events")}function i(e){for(var t=0;t<e.length;t++){var n=e[t];n.id in T?m("Repeated event with id "+n.id):(T[n.id]=n,m("Add inband event with id "+n.id))}}function a(){if(S)for(var e=C.getTime(),t=Object.keys(S),n=0;n<t.length;n++){var r=t[n],i=S[r];null!==i&&(i.duration+i.presentationTime)/i.eventStream.timescale<e&&(m("Remove Event "+r+" at time "+e),i=null,delete S[r])}}function s(){l(T),l(E),a()}function u(){var e=M.getValue(),t=e.url;e.hasOwnProperty("Location")&&(t=e.Location),m("Refresh manifest @ "+t),b.getManifestLoader().load(t)}function l(e){var t,n=C.getTime();if(e)for(var r=Object.keys(e),i=0;i<r.length;i++){var a=r[i],o=e[a];void 0!==o&&(t=o.presentationTime/o.eventStream.timescale,(0===t||t<=n&&t+A>n)&&(m("Start Event "+a+" at "+n),o.duration>0&&(S[a]=o),o.eventStream.schemeIdUri==p&&o.eventStream.value==h?u():_.trigger(o.eventStream.schemeIdUri,{event:o}),delete e[a]))}}function d(e){e&&(e.manifestModel&&(M=e.manifestModel),e.manifestUpdater&&(b=e.manifestUpdater))}function g(){t(),E=null,T=null,S=null,C=null}var p="urn:mpeg:dash:event:2012",h=1,v=this.context,m=(0,f["default"])(v).getInstance().log,_=(0,c["default"])(v).getInstance(),y=void 0,E=void 0,T=void 0,S=void 0,I=void 0,R=void 0,A=void 0,M=void 0,b=void 0,C=void 0,D=void 0;return y={initialize:e,addInlineEvents:r,addInbandEvents:i,clear:t,start:n,setConfig:d,reset:g}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(9),o=r(a),s=n(1),u=r(s),l=n(4),f=r(l),d=n(3),c=r(d);i.__dashjs_factory_name="EventController",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){m={},p.on(h["default"].FRAGMENT_LOADING_COMPLETED,u,v)}function t(e){var t=null;return null!==e&&void 0!==e&&e.byteLength>0&&(t=new Uint8Array(e)),t}function n(e){var t=m[e];return t||(t=(0,l["default"])(f).create({metricsModel:(0,d["default"])(f).getInstance()}),m[e]=t),t}function r(e){return e&&e.type&&e.type===a.HTTPRequest.INIT_SEGMENT_TYPE}function i(){p.off(h["default"].FRAGMENT_LOADING_COMPLETED,u,this);for(var e in m)m[e].reset();m={}}function o(e,t,n){var r=new s["default"];return r.streamId=n,r.mediaInfo=t.mediaInfo,r.segmentType=t.type,r.start=t.startTime,r.duration=t.duration,r.end=r.start+r.duration,r.bytes=e,r.index=t.index,r.quality=t.quality,r}function u(e){if(m[e.request.mediaType]===e.sender){var t=e.sender.getScheduleController(),n=e.request,i=e.response,a=r(n),s=t.getStreamProcessor().getStreamInfo().id;if(!i)return void c("No "+n.mediaType+" bytes to push.");var u=o(i,n,s);p.trigger(a?h["default"].INIT_FRAGMENT_LOADED:h["default"].MEDIA_FRAGMENT_LOADED,{chunk:u,fragmentModel:e.sender})}}var f=this.context,c=(0,y["default"])(f).getInstance().log,p=(0,g["default"])(f).getInstance(),v=void 0,m=void 0;return v={process:t,getModel:n,isInitializationRequest:r,reset:i},e(),v}Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),o=n(166),s=r(o),u=n(30),l=r(u),f=n(14),d=r(f),c=n(3),g=r(c),p=n(2),h=r(p),v=n(1),m=r(v),_=n(4),y=r(_);i.__dashjs_factory_name="FragmentController",t["default"]=m["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){var e="WebKitMediaSource"in window,t="MediaSource"in window;return t?new MediaSource:e?new WebKitMediaSource:null}function t(e,t){var n=window.URL.createObjectURL(e);return t.setSource(n),n}function n(e){e.setSource(null)}function r(e,t){return e.duration!=t&&(e.duration=t),e.duration}function i(e){var t=e.sourceBuffers,n=t.length,r=0;if("open"===e.readyState){for(r;r<n;r++){if(t[r].updating)return;if(0===t[r].buffered.length)return}e.endOfStream()}}var a=void 0;return a={createMediaSource:e,attachMediaSource:t,detachMediaSource:n,setDuration:r,signalEndOfStream:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="MediaSourceController",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){Se=!0,qe=NaN,He=NaN,Ye=[],Ie=!1,Re=null,Ae=null,Me=!0,be=!1,Ce=0,Oe=NaN}function n(e,t){me=e,Le=t,Ue=(0,P["default"])(oe).getInstance(),Pe=(0,s["default"])(oe).getInstance(),we=(0,g["default"])(oe).getInstance(),Ne=(0,l["default"])(oe).getInstance(),xe=(0,k["default"])(oe).getInstance(),Fe=Le.getFragmentController(),Be=Le.getBufferController(),ye=Fe.getModel(me),ye.setScheduleController(this),Ee=Le.isDynamic(),Ke=he.getScheduleWhilePaused(),ke=(0,h["default"])(oe).create({dashMetrics:(0,A["default"])(oe).getInstance(),metricsModel:(0,T["default"])(oe).getInstance(),textSourceBuffer:(0,y["default"])(oe).getInstance()}),je=(0,m["default"])(oe).create({adapter:(0,b["default"])(oe).getInstance(),sourceBufferController:(0,D["default"])(oe).getInstance(),textSourceBuffer:(0,y["default"])(oe).getInstance()}),ge.getIsTextTrack(me)&&ue.on(x["default"].TIMED_TEXT_REQUESTED,q,this),ue.on(x["default"].LIVE_EDGE_SEARCH_COMPLETED,z,this),ue.on(x["default"].QUALITY_CHANGE_REQUESTED,_,this),ue.on(x["default"].DATA_UPDATE_STARTED,F,this),ue.on(x["default"].DATA_UPDATE_COMPLETED,S,this),ue.on(x["default"].FRAGMENT_LOADING_COMPLETED,C,this),ue.on(x["default"].STREAM_COMPLETED,M,this),ue.on(x["default"].STREAM_INITIALIZED,R,this),ue.on(x["default"].BUFFER_LEVEL_STATE_CHANGED,B,this),ue.on(x["default"].BUFFER_CLEARED,U,this),ue.on(x["default"].BYTES_APPENDED,w,this),ue.on(x["default"].INIT_REQUESTED,c,this),ue.on(x["default"].QUOTA_EXCEEDED,j,this),ue.on(x["default"].BUFFER_LEVEL_STATE_CHANGED,B,this),ue.on(x["default"].PLAYBACK_STARTED,Y,this),ue.on(x["default"].PLAYBACK_SEEKING,G,this),ue.on(x["default"].PLAYBACK_RATE_CHANGED,V,this),ue.on(x["default"].PLAYBACK_TIME_UPDATED,O,this),ue.on(x["default"].URL_RESOLUTION_FAILED,H,this),ue.on(x["default"].FRAGMENT_LOADING_ABANDONED,L,this)}function r(){_e&&(ie(),Ie=!1,Se?p(Te.quality):f(0),Se&&(Se=!1),se("Schedule controller starting for "+me))}function i(){Ie||(Ie=!0,clearTimeout(De),se("Schedule controller stopping for "+me))}function o(){if(!(Ie||be||!Be||Pe.isPaused()&&!Ke)){u();var e=Ye.length>0,t=ke.execute(Le,me,xe.isVideoTrackPresent());if(t||e){var n=function(){if(Te.quality!==qe)qe=Te.quality,Be.switchInitData(Le.getStreamInfo().id,Te.quality);else{var e=je.execute(Le,Ye.shift());e?ye.executeRequest(e):(be=!1,f(250))}};be=!0,e?n():Ne.getPlaybackQuality(Le,n)}else f(500)}}function u(){var e=1.5*Te.fragmentDuration,t=ye.getRequests({state:I["default"].FRAGMENT_MODEL_EXECUTED,time:Pe.getTime()+e,threshold:0})[0];t&&Ye.indexOf(t)===-1&&!ge.getIsTextTrack(me)&&(!we.isCurrentTrack(t.mediaInfo)||he.getFastSwitchEnabled()&&t.quality<Te.quality&&Be.getBufferLevel()>=e&&Ne.getAbandonmentStateFor(me)!==l["default"].ABANDON_LOAD?(v(t),se("Reloading outdated fragment at index: ",t.index)):t.quality>Te.quality&&Q(Pe.getTime()+Be.getBufferLevel()))}function f(e){clearTimeout(De),De=setTimeout(o,e)}function c(e){e.sender.getStreamProcessor()===Le&&p(Te.quality)}function p(e){qe=e;var t=de.getInitRequest(Le,e);t&&(be=!0,ye.executeRequest(t))}function v(e){Ye.push(e)}function _(e){if(me===e.mediaType&&Le.getStreamInfo().id===e.streamInfo.id){if(Te=Le.getRepresentationInfoForQuality(e.newQuality),null===Te||void 0===Te)throw new Error("Unexpected error! - currentRepresentationInfo is null or undefined");re(new Date,a.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON),ie()}}function E(e){var t=ye.getRequests({state:I["default"].FRAGMENT_MODEL_EXECUTED,time:Pe.getTime(),threshold:0})[0];t&&Pe.getTime()>=t.startTime&&(t.quality!==He&&e&&ue.trigger(x["default"].QUALITY_CHANGE_RENDERED,{mediaType:me,oldQuality:He,newQuality:t.quality}),He=t.quality)}function S(e){e.error||e.sender.getStreamProcessor()!==Le||(Te=de.convertDataToTrack(fe.getValue(),e.currentRepresentation))}function R(e){e.error||Le.getStreamInfo().id!==e.streamInfo.id||(Te=Le.getCurrentRepresentationInfo(),Ee&&null===Ue.getLiveEdge()||(_e=!0),Ie&&r())}function M(e){e.fragmentModel===ye&&(i(),be=!1,se("Stream is complete"))}function C(e){e.sender===ye&&(ge.getIsTextTrack(me)&&(be=!1),e.error&&e.serviceLocation&&!Ie&&v(e.request))}function O(){E(!0)}function w(e){e.sender.getStreamProcessor()===Le&&(be=!1,f(0))}function L(e){e.streamProcessor===Le&&(v(e.request),be=!1,f(0))}function F(e){e.sender.getStreamProcessor()===Le&&i()}function U(e){e.sender.getStreamProcessor()===Le&&(ye.removeExecutedRequestsBeforeTime(e.to),e.hasEnoughSpaceToAppend&&!Be.getIsBufferingCompleted()&&Ie&&r())}function B(e){e.sender.getStreamProcessor()!==Le||e.state!==d["default"].BUFFER_EMPTY||Pe.isSeeking()||(se("Buffer is empty! Stalling!"),re(new Date,a.PlayListTrace.REBUFFERING_REASON))}function j(e){e.sender.getStreamProcessor()===Le&&i()}function H(){ye.abortRequests(),i()}function q(e){e.sender.getStreamProcessor()===Le&&p(e.index)}function Y(){Ie&&r()}function G(e){Oe=e.seekTime,Z(0),Ie&&r();var t=ce.getCurrentManifestUpdate(le.getMetricsFor("stream")),n=Te.DVRWindow?Te.DVRWindow.end-Pe.getTime():NaN;le.updateManifestUpdateInfo(t,{latency:n})}function V(e){Ae&&(Ae.playbackspeed=e.playbackRate.toString())}function z(e){if(!e.error){var t=Te.mediaInfo.streamInfo.manifestInfo.DVRWindowSize/2,n=e.liveEdge-Pe.computeLiveDelay(Te.fragmentDuration,t),i=ce.getCurrentManifestUpdate(le.getMetricsFor("stream")),a=Pe.getLiveStartTime(),o=de.getFragmentRequestForTime(Le,Te,n,{ignoreIsFinished:!0});Oe=a,(isNaN(a)||o.startTime>a)&&(Pe.setLiveStartTime(o.startTime),Oe=o.startTime),le.updateManifestUpdateInfo(i,{currentTime:Oe,presentationStartTime:e.liveEdge,latency:e.liveEdge-Oe,clientTimeOffset:pe.getClientTimeOffset()}),_e=!0,Ie&&r()}}function W(){return Oe}function Q(e){Oe=e}function X(){return ye}function Z(e){Ce=e}function J(){return Ce}function $(){return Le}function ee(){return ke.getBufferTarget(Le,me,xe.isVideoTrackPresent())}function te(e){Re=e}function ne(e,t){re(e,t),Re=null}function re(e,t){if(Re&&Me===!1){var n=Ae.start,r=e.getTime()-n.getTime();Ae.duration=r,Ae.stopreason=t,Re.trace.push(Ae),Me=!0}}function ie(){Re&&Me===!0&&Te&&(Me=!1,Ae=new a.PlayListTrace,Ae.representationid=Te.id,Ae.start=new Date,Ae.mstart=1e3*Pe.getTime(),Ae.playbackspeed=Pe.getPlaybackRate().toString())}function ae(){ue.off(x["default"].LIVE_EDGE_SEARCH_COMPLETED,z,this),ue.off(x["default"].DATA_UPDATE_STARTED,F,this),ue.off(x["default"].DATA_UPDATE_COMPLETED,S,this),ue.off(x["default"].BUFFER_LEVEL_STATE_CHANGED,B,this),ue.off(x["default"].QUALITY_CHANGE_REQUESTED,_,this),ue.off(x["default"].FRAGMENT_LOADING_COMPLETED,C,this),ue.off(x["default"].STREAM_COMPLETED,M,this),ue.off(x["default"].STREAM_INITIALIZED,R,this),ue.off(x["default"].QUOTA_EXCEEDED,j,this),ue.off(x["default"].BYTES_APPENDED,w,this),ue.off(x["default"].BUFFER_CLEARED,U,this),ue.off(x["default"].INIT_REQUESTED,c,this),ue.off(x["default"].PLAYBACK_RATE_CHANGED,V,this),ue.off(x["default"].PLAYBACK_SEEKING,G,this),ue.off(x["default"].PLAYBACK_STARTED,Y,this),ue.off(x["default"].PLAYBACK_TIME_UPDATED,O,this),ue.off(x["default"].URL_RESOLUTION_FAILED,H,this),ue.off(x["default"].FRAGMENT_LOADING_ABANDONED,L,this),ge.getIsTextTrack(me)&&ue.off(x["default"].TIMED_TEXT_REQUESTED,q,this),i(),E(!1),be=!1,Ce=0,Oe=NaN,Pe=null,Re=null}var oe=this.context,se=(0,K["default"])(oe).getInstance().log,ue=(0,N["default"])(oe).getInstance(),le=e.metricsModel,fe=e.manifestModel,de=e.adapter,ce=e.dashMetrics,ge=e.dashManifestModel,pe=e.timelineConverter,he=e.mediaPlayerModel,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0,De=void 0,Oe=void 0,Pe=void 0,we=void 0,Ne=void 0,Le=void 0,xe=void 0,Fe=void 0,Ue=void 0,Be=void 0,ke=void 0,je=void 0,Ke=void 0,He=void 0,qe=void 0,Ye=void 0;return ve={initialize:n,getStreamProcessor:$,getSeekTarget:W,setSeekTarget:Q,getFragmentModel:X,setTimeToLoadDelay:Z,getTimeToLoadDelay:J,replaceRequest:v,start:r,stop:i,reset:ae,setPlayList:te,getBufferTarget:ee,finalisePlayList:ne},t(),ve}Object.defineProperty(t,"__esModule",{value:!0});var a=n(70),o=n(9),s=r(o),u=n(10),l=r(u),f=n(18),d=r(f),c=n(13),g=r(c),p=n(154),h=r(p),v=n(155),m=r(v),_=n(17),y=r(_),E=n(14),T=r(E),S=n(30),I=r(S),R=n(16),A=r(R),M=n(15),b=r(M),C=n(28),D=r(C),O=n(51),P=r(O),w=n(3),N=r(w),L=n(2),x=r(L),F=n(1),U=r(F),B=n(20),k=r(B),j=n(4),K=r(j);i.__dashjs_factory_name="ScheduleController",t["default"]=U["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){_=!1,y=null,E=null,T=null,S=null,I=null,p.on(u["default"].DATA_UPDATE_COMPLETED,d,this),p.on(u["default"].INIT_FRAGMENT_LOADED,c,this)}function n(e,t,n){T=e,s(t),S=n,I=S.getRepresentationController()}function r(e){try{E=h.createSourceBuffer(y,e),_||(E.hasOwnProperty("initialize")&&E.initialize(T,this),_=!0)}catch(t){v.mediaSourceError("Error creating "+T+" source buffer.")}return E}function i(){return E}function a(e){E=e}function s(e){y=e}function l(){return S}function f(e){p.off(u["default"].DATA_UPDATE_COMPLETED,d,this),p.off(u["default"].INIT_FRAGMENT_LOADED,c,this),e||(h.abort(y,E),h.removeSourceBuffer(y,E))}function d(e){e.sender.getStreamProcessor()===S&&p.trigger(u["default"].TIMED_TEXT_REQUESTED,{index:0,sender:e.sender})}function c(e){e.fragmentModel===S.getFragmentModel()&&e.chunk.bytes&&h.append(E,e.chunk)}var g=this.context,p=(0,o["default"])(g).getInstance(),h=e.sourceBufferController,v=e.errHandler,m=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0,I=void 0;return m={initialize:n,createBuffer:r,getBuffer:i,setBuffer:a,getStreamProcessor:l,setMediaSource:s,reset:f},t(),m}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="TextController",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){N=t,O=0,P=!1,w=!1,L={"urn:mpeg:dash:utc:http-head:2014":T,"urn:mpeg:dash:utc:http-xsdate:2014":E.bind(null,c),"urn:mpeg:dash:utc:http-iso:2014":E.bind(null,g),"urn:mpeg:dash:utc:direct:2014":y,"urn:mpeg:dash:utc:http-head:2012":T,"urn:mpeg:dash:utc:http-xsdate:2012":E.bind(null,c),"urn:mpeg:dash:utc:http-iso:2012":E.bind(null,g),"urn:mpeg:dash:utc:direct:2012":y,"urn:mpeg:dash:utc:http-ntp:2014":_,"urn:mpeg:dash:utc:ntp:2014":_,"urn:mpeg:dash:utc:sntp:2014":_},i()||(R(e),a(!0))}function t(e){e&&(e.metricsModel&&(x=e.metricsModel),e.dashMetrics&&(F=e.dashMetrics))}function n(){return l()}function r(e){P=e}function i(){return P}function a(e){w=e}function s(e){O=e}function l(){return O}function d(e){var t,n,r=60,i=60,a=1e3,o=/^([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}))?/,s=o.exec(e);return t=Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10),parseInt(s[4],10),parseInt(s[5],10),s[6]&&(parseInt(s[6],10)||0),s[7]&&parseFloat(s[7])*a||0),s[9]&&s[10]&&(n=parseInt(s[9],10)*i+parseInt(s[10],10),t+=("+"===s[8]?-1:1)*n*r*a),new Date(t).getTime()}function c(e){var t=Date.parse(e);return isNaN(t)&&(t=d(e)),t}function g(e){return Date.parse(e)}function m(e){return Date.parse(e)}function _(e,t,n){n()}function y(e,t,n){var r=c(e);return isNaN(r)?void n():void t(r)}function E(e,t,n,r,i){var a,o,s=!1,u=new XMLHttpRequest,l=i?"HEAD":"GET",f=t.match(/\S+/g);t=f.shift(),a=function(){s||(s=!0,f.length?E(e,f.join(" "),n,r,i):r())},o=function(){var t,r;200===u.status&&(t=i?u.getResponseHeader("Date"):u.response,r=e(t),isNaN(r)||(n(r),s=!0))},u.open(l,t),u.timeout=v||0,u.onload=o,u.onloadend=a,u.send()}function T(e,t,n){E(m,e,t,n,!0)}function S(){var e=x.getReadOnlyMetricsFor("stream"),t=F.getLatestMPDRequestHeaderValueByID(e,"Date"),n=null!==t?new Date(t).getTime():Number.NaN;isNaN(n)?I(!0):(s(n-(new Date).getTime()),I(!1,n/1e3,O))}function I(e,t,n){r(!1),C.trigger(f["default"].TIME_SYNCHRONIZATION_COMPLETED,{time:t,offset:n,error:e?new o["default"](h):null})}function R(e,t){var n=t||0,i=e[n],a=function(e,t){var n=!e||!t;n&&N?S():I(n,e,t)};r(!0),i?L.hasOwnProperty(i.schemeIdUri)?L[i.schemeIdUri](i.value,function(e){var t=(new Date).getTime(),n=e-t;s(n),b("Local time: "+new Date(t)),b("Server time: "+new Date(e)),b("Difference (ms): "+n),a(e,n)},function(){R(e,n+1)}):R(e,n+1):(s(0),a())}function A(){a(!1),r(!1)}var M=this.context,b=(0,p["default"])(M).getInstance().log,C=(0,u["default"])(M).getInstance(),D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0;return D={initialize:e,getOffsetToDeviceTimeMs:n,setConfig:t,reset:A}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),o=r(a),s=n(3),u=r(s),l=n(2),f=r(l),d=n(1),c=r(d),g=n(4),p=r(g),h=1,v=5e3;i.__dashjs_factory_name="TimeSyncController";var m=c["default"].getSingletonFactory(i);m.TIME_SYNC_FAILED_ERROR_CODE=h,m.HTTP_TIMEOUT_MS=v,t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){M.on(f["default"].XLINK_ELEMENT_LOADED,l,C),N=(0,o["default"])(A).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier})}function n(e){D=e}function r(e){O=e}function i(e){var t;w=new p["default"](D,"",(!0)),P=e,t=c(P.Period_asArray,P,y,m),s(t,y,m)}function a(){M.off(f["default"].XLINK_ELEMENT_LOADED,l,C),N&&(N.reset(),N=null)}function s(e,t,n){var r,i,a,o={};for(o.elements=e,o.type=t,o.resolveType=n,0===o.elements.length&&d(o),a=0;a<o.elements.length;a++)r=o.elements[a],i=b.isHTTPURL(r.url)?r.url:r.originalContent.BaseURL+r.url,N.load(i,r,o)}function l(e){var t,n,r,i="<response>",a="</response>",o="";t=e.element,n=e.resolveObject,t.resolvedContent&&(r=t.resolvedContent.indexOf(">")+1,o=t.resolvedContent.substr(0,r)+i+t.resolvedContent.substr(r)+a,t.resolvedContent=w.xml_str2json(o)),I(n)&&d(n)}function d(e){var t,n,r=[];if(g(e),e.resolveType===_&&M.trigger(f["default"].XLINK_READY,{manifest:P}),e.resolveType===m)switch(e.type){case y:for(t=0;t<P[y+"_asArray"].length;t++)n=P[y+"_asArray"][t],n.hasOwnProperty(E+"_asArray")&&(r=r.concat(c(n[E+"_asArray"],n,E,m))),n.hasOwnProperty(T+"_asArray")&&(r=r.concat(c(n[T+"_asArray"],n,T,m)));s(r,E,m);break;case E:M.trigger(f["default"].XLINK_READY,{manifest:P})}}function c(e,t,n,r){var i,a,o,s=[];for(a=e.length-1;a>=0;a--)i=e[a],i.hasOwnProperty("xlink:href")&&i["xlink:href"]===S&&e.splice(a,1);for(a=0;a<e.length;a++)i=e[a],i.hasOwnProperty("xlink:href")&&i.hasOwnProperty("xlink:actuate")&&i["xlink:actuate"]===r&&(o=h(i["xlink:href"],t,n,a,r,i),s.push(o));return s}function g(e){var t,n,r,i,a,o,s=[];for(i=e.elements.length-1;i>=0;i--){if(t=e.elements[i],n=t.type+"_asArray",!t.resolvedContent||R())delete t.originalContent["xlink:actuate"],
35
- delete t.originalContent["xlink:href"],s.push(t.originalContent);else if(t.resolvedContent)for(a=0;a<t.resolvedContent[n].length;a++)r=t.resolvedContent[n][a],s.push(r);for(t.parentElement[n].splice(t.index,1),o=0;o<s.length;o++)t.parentElement[n].splice(t.index+o,0,s[o]);s=[]}e.elements.length>0&&O.run(P)}function h(e,t,n,r,i,a){return{url:e,parentElement:t,type:n,index:r,resolveType:i,originalContent:a,resolvedContent:null,resolved:!1}}function I(e){var t,n;for(t=0;t<e.elements.length;t++)if(n=e.elements[t],n.resolved===!1)return!1;return!0}function R(){return!1}var A=this.context,M=(0,u["default"])(A).getInstance(),b=(0,v["default"])(A).getInstance(),C=void 0,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0;return C={resolveManifestOnLoad:i,setMatchers:n,setIron:r,reset:a},t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(103),o=r(a),s=n(3),u=r(s),l=n(2),f=r(l),d=n(1),c=r(d),g=n(35),p=r(g),h=n(22),v=r(h),m="onLoad",_="onActuate",y="Period",E="AdaptationSet",T="EventStream",S="urn:mpeg:dash:resolve-to-zero:2013";i.__dashjs_factory_name="XlinkController",t["default"]=c["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return a=(0,o["default"])(r).getInstance({eventBus:e.eventBus,metricsModel:e.metricsModel}),(0,f["default"])(r).create(e)}function t(){return(0,p["default"])(r).getInstance()}function n(){return(0,c["default"])(r).getInstance()}var r=this.context,i=void 0,a=void 0;return i={createMetricsReporting:e,getReportingFactory:t,getMetricsHandlerFactory:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(124),o=r(a),s=n(29),u=r(s),l=n(114),f=r(l),d=n(60),c=r(d),g=n(61),p=r(g),h=n(1),v=r(h);i.__dashjs_factory_name="MetricsReporting";var m=v["default"].getClassFactory(i);m.events=u["default"],t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(t){if(!t.error){var n=Object.keys(i),r=(0,u["default"])(a).getInstance({dashManifestModel:e.dashManifestModel}).getMetrics(t.manifest);r.forEach(function(t){var r=JSON.stringify(t);if(i.hasOwnProperty(r))n.splice(r,1);else try{var s=(0,o["default"])(a).create(e);s.initialize(t),i[r]=s}catch(u){}}),n.forEach(function(e){i[e].reset(),delete i[e]}),s.trigger(c["default"].METRICS_INITIALISATION_COMPLETE)}}function n(){Object.keys(i).forEach(function(e){i[e].reset()}),i={}}function r(){s.on(p["default"].MANIFEST_UPDATED,t),s.on(p["default"].STREAM_TEARDOWN_COMPLETE,n)}var i={},a=this.context,s=e.eventBus;return r(),{}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(115),o=r(a),s=n(125),u=r(s),l=n(1),f=r(l),d=n(29),c=r(d),g=n(2),p=r(g);i.__dashjs_factory_name="MetricsCollectionController",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(t){try{a=(0,u["default"])(s).create({mediaElement:e.mediaElement}),a.initialize(t.Range),i=(0,f["default"])(s).create({log:e.log}),i.initialize(t.Reporting,a),r=(0,c["default"])(s).create({log:e.log,eventBus:e.eventBus}),r.initialize(t.metrics,i)}catch(o){throw n(),o}}function n(){r&&r.reset(),i&&i.reset(),a&&a.reset()}var r=void 0,i=void 0,a=void 0,o=void 0,s=this.context;return o={initialize:t,reset:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(117),u=r(s),l=n(118),f=r(l),d=n(116),c=r(d);i.__dashjs_factory_name="MetricsController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){i.forEach(function(t){t.handleNewMetric(e.metric,e.value,e.mediaType)})}function n(e,n){e.split(",").forEach(function(e,t,r){var a;if(e.indexOf("(")!==-1&&e.indexOf(")")===-1){var o=r[t+1];o&&o.indexOf("(")===-1&&o.indexOf(")")!==-1&&(e+=","+o,delete r[t+1])}a=l.create(e,n),a&&i.push(a)}),u.on(f["default"].METRIC_ADDED,t,a),u.on(f["default"].METRIC_UPDATED,t,a)}function r(){u.off(f["default"].METRIC_ADDED,t,a),u.off(f["default"].METRIC_UPDATED,t,a),i.forEach(function(e){return e.reset()}),i=[]}var i=[],a=void 0,s=this.context,u=e.eventBus,l=(0,o["default"])(s).getInstance({log:e.log,eventBus:e.eventBus});return a={initialize:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(60),o=r(a),s=n(1),u=r(s),l=n(38),f=r(l);i.__dashjs_factory_name="MetricsHandlersController",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){e&&e.length&&(e.forEach(function(e){var t=e.starttime,n=t+e.duration;l.add(t,n)}),a=!!e[0]._useWallClockTime)}function n(){l.clear()}function r(){l=(0,u["default"])(o).create()}function i(){var e,t=l.length;if(!t)return!0;e=a?(new Date).getTime()/1e3:f.currentTime;for(var n=0;n<t;n+=1){var r=l.start(n),i=l.end(n);if(r<=e&&e<i)return!0}return!1}var a=!1,o=this.context,s=void 0,l=void 0,f=e.mediaElement;return s={initialize:t,reset:n,isEnabled:i},r(),s}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(67),u=r(s);i.__dashjs_factory_name="RangeController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){e.some(function(e){var n=o.create(e,t);if(n)return i.push(n),!0})}function n(){i.forEach(function(e){return e.reset()}),i=[]}function r(e,t){i.forEach(function(n){return n.report(e,t)})}var i=[],a=void 0,o=(0,u["default"])(this.context).getInstance({log:e.log});return a={initialize:t,reset:n,report:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(61),u=r(s);i.__dashjs_factory_name="ReportingController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){try{return Object.keys(p).map(function(e){return p[e]}).reduce(function(e,t){return e.level<t.level?e:t})}catch(e){return}}function t(){var t=e();t&&d!==t.t&&(d=t.t,o.report(l,t))}function n(e,n,r){n&&(s=g.validateN(r),o=n,l=g.reconstructFullMetricName(e,r),f=setInterval(t,s))}function r(){clearInterval(f),f=null,s=0,o=null,d=null}function i(e,t,n){"BufferLevel"===e&&(p[n]=t)}var a=void 0,o=void 0,s=void 0,l=void 0,f=void 0,d=void 0,c=this.context,g=(0,u["default"])(c).getInstance(),p=[];return a={initialize:n,reset:r,handleNewMetric:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(62),u=r(s);i.__dashjs_factory_name="BufferLevelHandler",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){s.off(u["default"].METRICS_INITIALISATION_COMPLETE,t,this),s.trigger(u["default"].BECAME_REPORTING_PLAYER)}function n(e,n){n&&(o=n,s.on(u["default"].METRICS_INITIALISATION_COMPLETE,t,this))}function r(){o=null}function i(e,t){"DVBErrors"===e&&o&&o.report(e,t)}var a=void 0,o=void 0,s=e.eventBus;return a={initialize:n,reset:r,handleNewMetric:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(29),u=r(s);t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){i=e,a=t}function t(){a=null,i=void 0}function n(e,t){e===i&&a&&a.report(i,t)}var r=void 0,i=void 0,a=void 0;return r={initialize:e,reset:t,handleNewMetric:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="GenericMetricHandler",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){var e=d;e.length&&a&&a.report(l,e),d=[]}function t(t,n,r,i){n&&(o=c.validateN(r),a=n,i&&i.length&&(s=i),l=c.reconstructFullMetricName(t,r,i),f=setInterval(e,o))}function n(){clearInterval(f),f=null,o=null,s=null,d=[],a=null}function r(e,t){"HttpList"===e&&(s&&s!==t.type||d.push(t))}var i=void 0,a=void 0,o=void 0,s=void 0,l=void 0,f=void 0,d=[],c=(0,u["default"])(this.context).getInstance();return i={initialize:t,reset:n,handleNewMetric:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(62),u=r(s);i.__dashjs_factory_name="HttpListHandler",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t,n){var r=new XMLHttpRequest,i=function(){var e=v.indexOf(r);e!==-1&&(v.splice(e,1),r.status>=200&&r.status<300?t&&t():n&&n())};v.push(r);try{r.open("GET",e),r.onloadend=i,r.onerror=i,r.send()}catch(a){r.onerror()}}function t(t,n){Array.isArray(n)||(n=[n]),d&&p.isEnabled()&&n.forEach(function(n){var r=o.serialise(n);l&&"DVBErrors"!==t&&(r="metricname="+t+"&"+r),r=g+"?"+r,e(r,null,function(){d=!1})})}function n(e,t){var n;if(p=t,g=e["dvb:reportingUrl"],!g)throw new Error("required parameter missing (dvb:reportingUrl)");c||(n=e["dvb:probability"]||e["dvb:priority"]||0,n&&(1e3===n||n/1e3>=s.random())&&(d=!0),c=!0)}function r(){h||(v.forEach(function(e){return e.abort()}),v=[]),c=!1,d=!1,g=null,p=null}var i=void 0,a=this.context,o=(0,u["default"])(a).getInstance(),s=(0,f["default"])(a).getInstance(),l=!0,d=!1,c=!1,g=null,p=null,h=!0,v=[];return i={report:t,initialize:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(126),u=r(s),l=n(127),f=r(l);i.__dashjs_factory_name="DVBReporting",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){var t=new o["default"];if(m){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.mpdurl||(t.mpdurl=m.originalUrl||m.url),t.terror||(t.terror=new Date),v.addDVBErrors(t)}}function n(e){e.error||(m=e.manifest)}function r(e){t({errorcode:o["default"].BASE_URL_CHANGED,servicelocation:e.entry})}function i(){t({errorcode:o["default"].BECAME_REPORTER})}function a(e){(0===e.responsecode||e.responsecode>=400||e.responsecode<100||e.responsecode>=600)&&t({errorcode:e.responsecode||o["default"].CONNECTION_ERROR,url:e.url,terror:e.tresponse,servicelocation:e._serviceLocation})}function s(e){switch(e.metric){case"HttpList":a(e.value)}}function l(e){var n,r=e.error?e.error.code:0;switch(r){case MediaError.MEDIA_ERR_NETWORK:n=o["default"].CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:n=o["default"].CORRUPT_MEDIA_OTHER;break;default:return}t({errorcode:n})}function d(){h.on(u["default"].MANIFEST_UPDATED,n,p),h.on(u["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,r,p),h.on(f["default"].METRIC_ADDED,s,p),h.on(f["default"].METRIC_UPDATED,s,p),h.on(f["default"].PLAYBACK_ERROR,l,p),h.on(c["default"].BECAME_REPORTING_PLAYER,i,p)}function g(){h.off(u["default"].MANIFEST_UPDATED,n,p),h.off(u["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,r,p),h.off(f["default"].METRIC_ADDED,s,p),h.off(f["default"].METRIC_UPDATED,s,p),h.off(f["default"].PLAYBACK_ERROR,l,p),h.off(c["default"].BECAME_REPORTING_PLAYER,i,p)}var p=void 0,h=e.eventBus,v=e.metricsModel,m=void 0;return p={initialise:d,reset:g},d(),p}Object.defineProperty(t,"__esModule",{value:!0});var a=n(128),o=r(a),s=n(2),u=r(s),l=n(38),f=r(l),d=n(29),c=r(d),g=n(1),p=r(g);i.__dashjs_factory_name="DVBErrorsTranslator",t["default"]=p["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t,n){var r,a,o=i.getMpd(e),s=0;return t?s=o.availabilityStartTime.getTime()/1e3:(r=this.getRegularPeriods(e,o),r.length&&(s=r[0].start)),a=s,n&&n.hasOwnProperty("starttime")&&(a+=n.starttime),a}function n(e){var n=[];return e.Metrics_asArray&&e.Metrics_asArray.forEach(function(r){var a=new o["default"],s=i.getIsDynamic(e);r.hasOwnProperty("metrics")&&(a.metrics=r.metrics,r.Range_asArray&&r.Range_asArray.forEach(function(n){var r=new u["default"];r.starttime=t(e,s,n),n.hasOwnProperty("duration")?r.duration=n.duration:r.duration=i.getDuration(e),r._useWallClockTime=s,a.Range.push(r)}),r.Reporting_asArray&&(r.Reporting_asArray.forEach(function(e){var t=new f["default"];if(e.hasOwnProperty("schemeIdUri")){t.schemeIdUri=e.schemeIdUri;for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);a.Reporting.push(t)}}),n.push(a)))}),n}var r=void 0,i=e.dashManifestModel;return r={getMetrics:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(129),o=r(a),s=n(130),u=r(s),l=n(131),f=r(l),d=n(1),c=r(d);i.__dashjs_factory_name="ManifestParsing",t["default"]=c["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(t){var n,r,i=[],a=[];for(n in t)if(t.hasOwnProperty(n)&&0!==n.indexOf("_")){if(r=t[n],void 0!==r&&null!==r||(r=""),Array.isArray(r)){if(!r.length)continue;a=[],r.forEach(function(t){var n="Object"!==Object.prototype.toString.call(t).slice(8,-1);a.push(n?t:e(t))}),r=encodeURIComponent(a.join(","))}else"string"==typeof r?r=encodeURIComponent(r):r instanceof Date?r=r.toISOString():"number"==typeof r&&(r=Math.round(r));i.push(n+"="+r)}return i.join("&")}return{serialise:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="MetricSerialiser",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){n&&(o||(o=new r(a)),n.getRandomValues(o),s=0)}function t(t,r){var a;return t||(t=0),r||(r=1),n?(s===o.length&&e(),a=o[s]/i,s+=1):a=Math.random(),a*(r-t)+t}var n=window.crypto||window.msCrypto,r=Uint32Array,i=Math.pow(2,8*r.BYTES_PER_ELEMENT)-1,a=10,o=void 0,s=void 0,u=void 0;return u={random:t},e(),u}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="RNG",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null};r.SSL_CONNECTION_FAILED_PREFIX="SSL",r.DNS_RESOLUTION_FAILED="C00",r.HOST_UNREACHABLE="C01",r.CONNECTION_REFUSED="C02",r.CONNECTION_ERROR="C03",r.CORRUPT_MEDIA_ISOBMFF="M00",r.CORRUPT_MEDIA_OTHER="M01",r.BASE_URL_CHANGED="F00",r.BECAME_REPORTER="S00",t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.metrics="",this.Range=[],this.Reporting=[]};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.schemeIdUri="",this.value=""};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(){function e(){d=new g}function t(e,t,n){var r=h.getBaseURLsFromElement(n);e[t]?v.areSimpleEquivalent(r,e[t].data.baseUrls)||(e[t].data.baseUrls=r,e[t].data.selectedIdx=c):e[t]=new g(r)}function n(e){var n=h.getBaseURLsFromElement(e);v.areSimpleEquivalent(n,d.data.baseUrls)||(d.data.baseUrls=n,d.data.selectedIdx=c),e.Period_asArray&&e.Period_asArray.forEach(function(e,n){t(d.children,n,e),e.AdaptationSet_asArray&&e.AdaptationSet_asArray.forEach(function(e,r){t(d.children[n].children,r,e),e.Representation_asArray&&e.Representation_asArray.sort(h.getRepresentationSortFunction()).forEach(function(e,i){t(d.children[n].children[r].children,i,e)})})})}function r(e,t){var n=t||d;e(n.data),n.children&&n.children.forEach(function(t){return r(e,t)})}function i(e){r(function(t){isNaN(t.selectedIdx)||e===t.baseUrls[t.selectedIdx].serviceLocation&&(t.selectedIdx=c)})}function a(e){n(e)}function o(){d=new g}function u(e){var t=d,n=[t.data];return e.forEach(function(e){t=t.children[e],t&&n.push(t.data)}),n.filter(function(e){return e.baseUrls.length})}var f=void 0,d=void 0,p=this.context,h=(0,s["default"])(p).getInstance(),v=(0,l["default"])(p).getInstance();return f={reset:o,update:a,getForPath:u,invalidateSelectedIndexes:i},e(),f}Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),s=r(o),u=n(162),l=r(u),f=n(1),d=r(f),c=NaN,g=function p(e,t){i(this,p),this.data={baseUrls:e||null,selectedIdx:t||c},this.children=[]};a.__dashjs_factory_name="BaseURLTreeModel",t["default"]=d["default"].getClassFactory(a),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.INTERNAL_KEY_MESSAGE="internalKeyMessage",this.INTERNAL_KEY_SYSTEM_SELECTED="internalKeySystemSelected",this.KEY_ADDED="public_keyAdded",this.KEY_ERROR="public_keyError",this.KEY_MESSAGE="public_keyMessage",this.KEY_SESSION_CLOSED="public_keySessionClosed",this.KEY_SESSION_CREATED="public_keySessionCreated",this.KEY_SESSION_REMOVED="public_keySessionRemoved",this.KEY_STATUSES_CHANGED="public_keyStatusesChanged",this.KEY_SYSTEM_ACCESS_COMPLETE="keySystemAccessComplete",this.KEY_SYSTEM_SELECTED="public_keySystemSelected",this.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",this.NEED_KEY="needkey",this.PROTECTION_CREATED="public_protectioncreated",this.PROTECTION_DESTROYED="public_protectiondestroyed",this.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",this.TEARDOWN_COMPLETE="protectionTeardownComplete",this.VIDEO_ELEMENT_SELECTED="videoElementSelected"}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){O=R.getKeySystems(),P=[],x=!1,F="temporary",U="",l["default"].extend(m["default"].events)}function n(e,t,n){if(!x){var r;t||n||(r=M.getStreamsInfo(e)[0]),w=t||(r?M.getMediaInfoForType(e,r,"audio"):null),N=n||(r?M.getMediaInfoForType(e,r,"video"):null);var i=N?N:w,a=R.getSupportedKeySystemsFromContentProtection(i.contentProtection);a&&a.length>0&&E(a,!0),x=!0}}function r(e){var t=s["default"].getPSSHForKeySystem(B,e);if(t){for(var n=A.getAllInitData(),r=0;r<n.length;r++)if(R.initDataEquals(t,n[r]))return void C("DRM: Ignoring initData because we have already seen it!");try{A.createKeySession(t,F)}catch(i){b.trigger(l["default"].KEY_SESSION_CREATED,{data:null,error:"Error creating key session! "+i.message})}}else b.trigger(l["default"].KEY_SESSION_CREATED,{data:null,error:"Selected key system is "+B.systemString+". needkey/encrypted event contains no initData corresponding to that key system!"})}function i(e){A.loadKeySession(e)}function o(e){A.removeKeySession(e)}function u(e){A.closeKeySession(e)}function f(e){A.setServerCertificate(e)}function c(e){e?(A.setMediaElement(e),b.on(l["default"].NEED_KEY,I,this),b.on(l["default"].INTERNAL_KEY_MESSAGE,S,this)):null===e&&(A.setMediaElement(e),b.off(l["default"].NEED_KEY,I,this),b.off(l["default"].INTERNAL_KEY_MESSAGE,S,this))}function p(e){F=e}function h(e){U=e}function v(e){L=e}function _(){c(null),B=void 0,A&&(A.reset(),A=null)}function y(e){var t=null,n=e.systemString;return L&&(t=n in L?L[n]:null),t}function E(e,t){var n=this,i=[],a=[];N&&a.push(new d["default"](N.codec,U)),w&&i.push(new d["default"](w.codec,U));var o,s=new g["default"](i,a,"optional","temporary"===F?"optional":"required",[F]),u=[];if(B){for(o=0;o<e.length;o++)if(B===e[o].ks){var f=function(){u.push({ks:e[o].ks,configs:[s]});var i=function a(i){b.off(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,a,n),i.error?t||b.trigger(l["default"].KEY_SYSTEM_SELECTED,{error:"DRM: KeySystem Access Denied! -- "+i.error}):(C("DRM: KeySystem Access Granted"),b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:i.data}),r(e[o].initData))};return b.on(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,i,n),A.requestKeySystemAccess(u),"break"}();if("break"===f)break}}else if(void 0===B){B=null,P.push(e);for(var c=0;c<e.length;c++)u.push({ks:e[c].ks,configs:[s]});var p,h=function m(e){b.off(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,m,n),e.error?(B=void 0,b.off(l["default"].INTERNAL_KEY_SYSTEM_SELECTED,v,n),t||b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:null,error:"DRM: KeySystem Access Denied! -- "+e.error})):(p=e.data,C("DRM: KeySystem Access Granted ("+p.keySystem.systemString+")! Selecting key system..."),A.selectKeySystem(p))},v=function _(e){if(b.off(l["default"].INTERNAL_KEY_SYSTEM_SELECTED,_,n),b.off(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,h,n),e.error)B=void 0,t||b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:null,error:"DRM: Error selecting key system! -- "+e.error});else{B=A.getKeySystem(),b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:p});for(var i=0;i<P.length;i++)for(o=0;o<P[i].length;o++)if(B===P[i][o].ks){r(P[i][o].initData);break}}};b.on(l["default"].INTERNAL_KEY_SYSTEM_SELECTED,v,n),b.on(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,h,n),A.requestKeySystemAccess(u)}else P.push(e)}function T(e,t){b.trigger(l["default"].LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function S(e){if(C("DRM: onKeyMessage"),e.error)return void C(e.error);var t=e.data;b.trigger(l["default"].KEY_MESSAGE,{data:t});var n=t.messageType?t.messageType:"license-request",r=t.message,i=t.sessionToken,o=y(B),u=B.systemString,f=R.getLicenseServer(B,o,n),d={sessionToken:i,messageType:n};if(!f)return C("DRM: License server request not required for this message (type = "+e.data.messageType+"). Session ID = "+i.getSessionID()),void T(d);if(R.isClearKey(B)){var c=R.processClearKeyLicenseRequest(o,r);if(c)return C("DRM: ClearKey license request handled by application!"),T(d),void A.updateKeySession(i,c)}var g=new XMLHttpRequest,p=null;if(o)if(o.serverURL){var h=o.serverURL;"string"==typeof h&&""!==h?p=h:"object"===("undefined"==typeof h?"undefined":a(h))&&h.hasOwnProperty(n)&&(p=h[n])}else o.laURL&&""!==o.laURL&&(p=o.laURL);else p=B.getLicenseServerURLFromInitData(s["default"].getPSSHData(i.initData)),p||(p=e.data.laURL);if(p=f.getServerURLFromMessage(p,r,n),!p)return void T(d,"DRM: No license server URL specified!");g.open(f.getHTTPMethod(n),p,!0),g.responseType=f.getResponseType(u,n),g.onload=function(){200==this.status?(T(d),A.updateKeySession(i,f.getLicenseMessage(this.response,u,n))):T(d,"DRM: "+u+' update, XHR status is "'+this.statusText+'" ('+this.status+"), expected to be 200. readyState is "+this.readyState+". Response is "+(this.response?f.getErrorResponse(this.response,u,n):"NONE"))},g.onabort=function(){T(d,"DRM: "+u+' update, XHR aborted. status is "'+this.statusText+'" ('+this.status+"), readyState is "+this.readyState)},g.onerror=function(){T(d,"DRM: "+u+' update, XHR error. status is "'+this.statusText+'" ('+this.status+"), readyState is "+this.readyState)};var v=function(e){var t;if(e)for(t in e)"authorization"===t.toLowerCase()&&(g.withCredentials=!0),g.setRequestHeader(t,e[t])};o&&v(o.httpRequestHeaders),v(B.getRequestHeadersFromMessage(r)),o&&o.withCredentials&&(g.withCredentials=!0),g.send(B.getLicenseRequestFromMessage(r))}function I(e){if(C("DRM: onNeedKey"),"cenc"!==e.key.initDataType)return void C("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+e.key.initDataType);var t=e.key.initData;ArrayBuffer.isView(t)&&(t=t.buffer),C("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(t)));var n=R.getSupportedKeySystems(t,L);return 0===n.length?void C("DRM: Received needkey event with initData, but we don't support any of the key systems!"):void E(n,!1)}var R=e.protectionKeyController,A=e.protectionModel,M=e.adapter,b=e.eventBus,C=e.log,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0,B=void 0;return D={initialize:n,createKeySession:r,loadKeySession:i,removeKeySession:o,closeKeySession:u,setServerCertificate:f,setMediaElement:c,setSessionType:p,setRobustnessLevel:h,setProtectionData:v,reset:_},t(),D}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(21),s=r(o),u=n(2),l=r(u),f=n(145),d=r(f),c=n(44),g=r(c),p=n(1),h=r(p),v=n(63),m=r(v);i.__dashjs_factory_name="ProtectionController",t["default"]=h["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n=null;if(e){for(var r=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),i=[],a=0;a<r.kids.length;a++){var s=r.kids[a],l=e.clearkeys.hasOwnProperty(s)?e.clearkeys[s]:null;if(!l)throw new Error("DRM: ClearKey keyID ("+s+") is not known!");i.push(new o["default"](s,l))}n=new u["default"](i)}return n}function t(e){return f["default"].parseInitDataFromContentProtection(e)}function n(){return null}function r(e){return new Uint8Array(e)}function i(){return null}var a=void 0;return a={uuid:g,schemeIdURI:h,systemString:p,getInitData:t,getRequestHeadersFromMessage:n,getLicenseRequestFromMessage:r,getLicenseServerURLFromInitData:i,getClearKeysFromProtectionData:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),o=r(a),s=n(64),u=r(s),l=n(21),f=r(l),d=n(1),c=r(d),g="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",p="org.w3.clearkey",h="urn:uuid:"+g;i.__dashjs_factory_name="KeySystemClearKey",t["default"]=c["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var t,n,r={},i=new DOMParser,a="utf16"===s?new Uint16Array(e):new Uint8Array(e);t=String.fromCharCode.apply(null,a),n=i.parseFromString(t,"application/xml");for(var o=n.getElementsByTagName("name"),u=n.getElementsByTagName("value"),l=0;l<o.length;l++)r[o[l].childNodes[0].nodeValue]=u[l].childNodes[0].nodeValue;return r.hasOwnProperty("Content")&&(r["Content-Type"]=r.Content,delete r.Content),r}function t(e){var t,n,r=null,i=new DOMParser,a="utf16"===s?new Uint16Array(e):new Uint8Array(e);if(t=String.fromCharCode.apply(null,a),n=i.parseFromString(t,"application/xml"),n.getElementsByTagName("Challenge")[0]){var o=n.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;o&&(r=c["default"].decode(o))}return r}function n(e){if(e)for(var t=new DataView(e),n=t.getUint16(4,!0),r=6,i=new DOMParser,a=0;a<n;a++){var o=t.getUint16(r,!0);r+=2;var s=t.getUint16(r,!0);if(r+=2,1===o){var u=e.slice(r,r+s),l=String.fromCharCode.apply(null,new Uint16Array(u)),f=i.parseFromString(l,"application/xml");if(f.getElementsByTagName("LA_URL")[0]){var d=f.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(d)return d}if(f.getElementsByTagName("LUI_URL")[0]){var c=f.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(c)return c}}else r+=s}return null}function r(e){var t,n,r,i,a,s=new Uint8Array([112,115,115,104,0,0,0,0]),u=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=0,f=null;if("pssh"in e)return o["default"].parseInitDataFromContentProtection(e);if("pro"in e)f=c["default"].decodeArray(e.pro.__text);else{if(!("prheader"in e))return null;f=c["default"].decodeArray(e.prheader.__text)}return t=f.length,n=4+s.length+u.length+4+t,r=new ArrayBuffer(n),i=new Uint8Array(r),a=new DataView(r),a.setUint32(l,n),l+=4,i.set(s,l),l+=s.length,i.set(u,l),l+=u.length,a.setUint32(l,t),l+=4,i.set(f,l),l+=t,i.buffer}function i(e){if("utf8"!==e&&"utf16"!==e)throw new u["default"]("Illegal PlayReady message format! -- "+e);s=e}var a=void 0,s="utf16";return a={uuid:g,schemeIdURI:h,systemString:p,getInitData:r,getRequestHeadersFromMessage:e,getLicenseRequestFromMessage:t,getLicenseServerURLFromInitData:n,setPlayReadyMessageFormat:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),o=r(a),s=n(6),u=r(s),l=n(1),f=r(l),d=n(34),c=r(d),g="9a04f079-9840-4286-ab92-e65be0885f95",p="com.microsoft.playready",h="urn:uuid:"+g;i.__dashjs_factory_name="KeySystemPlayReady",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return o["default"].parseInitDataFromContentProtection(e)}function t(){return null}function n(e){return new Uint8Array(e)}function r(){return null}var i=void 0;return i={uuid:l,schemeIdURI:d,systemString:f,getInitData:e,getRequestHeadersFromMessage:t,getLicenseRequestFromMessage:n,getLicenseServerURLFromInitData:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),o=r(a),s=n(1),u=r(s),l="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",f="com.widevine.alpha",d="urn:uuid:"+l;i.__dashjs_factory_name="KeySystemWidevine",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){O=null,P=null,L=[],x=[],w=(0,o["default"])(A).getInstance(),N=(0,E["default"])(A).getInstance(),U=S()}function n(){O&&R();for(var e=0;e<x.length;e++)h(x[e]);M.trigger(_["default"].TEARDOWN_COMPLETE)}function r(){return P}function i(){for(var e=[],t=0;t<L.length;t++)e.push(L[t].initData);for(var t=0;t<x.length;t++)e.push(x[t].initData);return e}function a(e){var t=O;t||(t=document.createElement("video"));for(var n=!1,r=0;r<e.length;r++)for(var i=e[r].ks.systemString,a=e[r].configs,o=null,s=null,u=0;u<a.length;u++){var l=a[u].videoCapabilities;if(l&&0!==l.length){s=[];for(var f=0;f<l.length;f++)""!==t.canPlayType(l[f].contentType,i)&&s.push(l[f])}if(!(!o&&!s||o&&0===o.length||s&&0===s.length)){n=!0;var d=new p["default"](o,s),c=w.getKeySystemBySystemString(i);M.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{data:new v["default"](c,d)});break}}n||M.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})}function s(e){P=e.keySystem,M.trigger(_["default"].INTERNAL_KEY_SYSTEM_SELECTED)}function l(e){O!==e&&(O&&R(),O=e,O&&(O.addEventListener(C.keyerror,U),O.addEventListener(C.needkey,U),O.addEventListener(C.keymessage,U),
36
- O.addEventListener(C.keyadded,U),M.trigger(_["default"].VIDEO_ELEMENT_SELECTED)))}function d(e){if(!P)throw new Error("Can not create sessions until you have selected a key system");if(F||0===x.length){var t={sessionID:null,initData:e,getSessionID:function(){return this.sessionID},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return L.push(t),O[C.generateKeyRequest](P.systemString,new Uint8Array(e)),t}throw new Error("Multiple sessions not allowed!")}function g(e,t){var n=e.sessionID;if(w.isClearKey(P))for(var r=0;r<t.keyPairs.length;r++)O[C.addKey](P.systemString,t.keyPairs[r].key,t.keyPairs[r].keyID,n);else O[C.addKey](P.systemString,new Uint8Array(t),e.initData,n)}function h(e){O[C.cancelKeyRequest](P.systemString,e.sessionID)}function m(){}function y(){}function T(){}function S(){return{handleEvent:function(e){var t=null;switch(e.type){case C.needkey:var n=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;M.trigger(_["default"].NEED_KEY,{key:new u["default"](n,"cenc")});break;case C.keyerror:if(t=I(x,e.sessionId),t||(t=I(L,e.sessionId)),t){var r="";switch(e.errorCode.code){case 1:r+="MEDIA_KEYERR_UNKNOWN - An unspecified error occurred. This value is used for errors that don't match any of the other codes.";break;case 2:r+="MEDIA_KEYERR_CLIENT - The Key System could not be installed or updated.";break;case 3:r+="MEDIA_KEYERR_SERVICE - The message passed into update indicated an error from the license service.";break;case 4:r+="MEDIA_KEYERR_OUTPUT - There is no available output device with the required characteristics for the content protection system.";break;case 5:r+="MEDIA_KEYERR_HARDWARECHANGE - A hardware configuration change caused a content protection error.";break;case 6:r+="MEDIA_KEYERR_DOMAIN - An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain."}r+=" System Code = "+e.systemCode,M.trigger(_["default"].KEY_ERROR,{data:new f["default"](t,r)})}else b("No session token found for key error");break;case C.keyadded:t=I(x,e.sessionId),t||(t=I(L,e.sessionId)),t?(b("DRM: Key added."),M.trigger(_["default"].KEY_ADDED,{data:t})):b("No session token found for key added");break;case C.keymessage:if(F=null!==e.sessionId&&void 0!==e.sessionId,F?(t=I(x,e.sessionId),!t&&L.length>0&&(t=L.shift(),x.push(t),t.sessionID=e.sessionId)):L.length>0&&(t=L.shift(),x.push(t),0!==L.length&&N.mediaKeyMessageError("Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!")),t){var i=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;t.keyMessage=i,M.trigger(_["default"].INTERNAL_KEY_MESSAGE,{data:new c["default"](t,i,e.defaultURL)})}else b("No session token found for key message")}}}}function I(e,t){if(t&&e){for(var n=e.length,r=0;r<n;r++)if(e[r].sessionID==t)return e[r];return null}return null}function R(){O.removeEventListener(C.keyerror,U),O.removeEventListener(C.needkey,U),O.removeEventListener(C.keymessage,U),O.removeEventListener(C.keyadded,U)}var A=this.context,M=e.eventBus,b=e.log,C=e.api,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0;return D={getAllInitData:i,requestKeySystemAccess:a,getKeySystem:r,selectKeySystem:s,setMediaElement:l,createKeySession:d,updateKeySession:g,closeKeySession:h,setServerCertificate:m,loadKeySession:y,removeKeySession:T,reset:n},t(),D}Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),o=r(a),s=n(45),u=r(s),l=n(41),f=r(l),d=n(42),c=r(d),g=n(44),p=r(g),h=n(43),v=r(h),m=n(2),_=r(m),y=n(11),E=r(y),T=n(1),S=r(T);i.__dashjs_factory_name="ProtectionModel_01b",t["default"]=S["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){M=null,b=null,C=null,D=[],P=(0,o["default"])(w).getInstance(),O=S()}function n(){var e,t=D.length;if(0!==t)for(var n=function(e){I(e),0===D.length&&(b?(b.removeEventListener("encrypted",O),b.setMediaKeys(null).then(function(){N.trigger(v["default"].TEARDOWN_COMPLETE)})):N.trigger(v["default"].TEARDOWN_COMPLETE))},r=0;r<t;r++)e=D[r],function(t){e.session.closed.then(function(){n(t)}),T(e)["catch"](function(){n(t)})}(e);else N.trigger(v["default"].TEARDOWN_COMPLETE)}function r(){return M}function i(){for(var e=[],t=0;t<D.length;t++)e.push(D[t].initData);return e}function a(e){E(e,0)}function s(e){e.mksa.createMediaKeys().then(function(t){M=e.keySystem,C=t,b&&b.setMediaKeys(C),N.trigger(v["default"].INTERNAL_KEY_SYSTEM_SELECTED)})["catch"](function(){N.trigger(v["default"].INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+e.keySystem.systemString+")! Could not create MediaKeys -- TODO"})})}function l(e){b!==e&&(b&&(b.removeEventListener("encrypted",O),b.setMediaKeys(null)),b=e,b&&(b.addEventListener("encrypted",O),C&&b.setMediaKeys(C)))}function d(e){if(!M||!C)throw new Error("Can not set server certificate until you have selected a key system");C.setServerCertificate(e).then(function(){L("DRM: License server certificate successfully updated."),N.trigger(v["default"].SERVER_CERTIFICATE_UPDATED)})["catch"](function(e){N.trigger(v["default"].SERVER_CERTIFICATE_UPDATED,{error:"Error updating server certificate -- "+e.name})})}function g(e,t){if(!M||!C)throw new Error("Can not create sessions until you have selected a key system");var n=C.createSession(t),r=R(n,e,t);n.generateRequest("cenc",e).then(function(){L("DRM: Session created. SessionID = "+r.getSessionID()),N.trigger(v["default"].KEY_SESSION_CREATED,{data:r})})["catch"](function(e){I(r),N.trigger(v["default"].KEY_SESSION_CREATED,{data:null,error:"Error generating key request -- "+e.name})})}function h(e,t){var n=e.session;P.isClearKey(M)&&(t=t.toJWK()),n.update(t)["catch"](function(t){N.trigger(v["default"].KEY_ERROR,{data:new f["default"](e,"Error sending update() message! "+t.name)})})}function m(e){if(!M||!C)throw new Error("Can not load sessions until you have selected a key system");var t=C.createSession();t.load(e).then(function(n){if(n){var r=R(t);L("DRM: Session created. SessionID = "+r.getSessionID()),N.trigger(v["default"].KEY_SESSION_CREATED,{data:r})}else N.trigger(v["default"].KEY_SESSION_CREATED,{data:null,error:"Could not load session! Invalid Session ID ("+e+")"})})["catch"](function(t){N.trigger(v["default"].KEY_SESSION_CREATED,{data:null,error:"Could not load session ("+e+")! "+t.name})})}function _(e){var t=e.session;t.remove().then(function(){L("DRM: Session removed. SessionID = "+e.getSessionID()),N.trigger(v["default"].KEY_SESSION_REMOVED,{data:e.getSessionID()})},function(t){N.trigger(v["default"].KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+e.getSessionID()+"). "+t.name})})}function y(e){T(e)["catch"](function(t){I(e),N.trigger(v["default"].KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.getSessionID()+") "+t.name})})}function E(e,t){!function(t){var n=e[t].ks,r=e[t].configs;navigator.requestMediaKeySystemAccess(n.systemString,r).then(function(e){var t="function"==typeof e.getConfiguration?e.getConfiguration():null,r=new p["default"](n,t);r.mksa=e,N.trigger(v["default"].KEY_SYSTEM_ACCESS_COMPLETE,{data:r})})["catch"](function(){++t<e.length?E(e,t):N.trigger(v["default"].KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied!"})})}(t)}function T(e){var t=e.session;return t.removeEventListener("keystatuseschange",e),t.removeEventListener("message",e),t.close()}function S(){return{handleEvent:function(e){switch(e.type){case"encrypted":if(e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;N.trigger(v["default"].NEED_KEY,{key:new u["default"](t,e.initDataType)})}}}}}function I(e){for(var t=0;t<D.length;t++)if(D[t]===e){D.splice(t,1);break}}function R(e,t,n){var r={session:e,initData:t,handleEvent:function(e){switch(e.type){case"keystatuseschange":N.trigger(v["default"].KEY_STATUSES_CHANGED,{data:this});break;case"message":var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;N.trigger(v["default"].INTERNAL_KEY_MESSAGE,{data:new c["default"](this,t,(void 0),e.messageType)})}},getSessionID:function(){return e.sessionId},getExpirationTime:function(){return e.expiration},getKeyStatuses:function(){return e.keyStatuses},getSessionType:function(){return n}};return e.addEventListener("keystatuseschange",r),e.addEventListener("message",r),e.closed.then(function(){I(r),L("DRM: Session closed. SessionID = "+r.getSessionID()),N.trigger(v["default"].KEY_SESSION_CLOSED,{data:r.getSessionID()})}),D.push(r),r}var A,M,b,C,D,O,P,w=this.context,N=e.eventBus,L=e.log;return A={getAllInitData:i,requestKeySystemAccess:a,getKeySystem:r,selectKeySystem:s,setMediaElement:l,setServerCertificate:d,createKeySession:g,updateKeySession:h,loadKeySession:m,removeKeySession:_,closeKeySession:y,reset:n},t(),A}Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),o=r(a),s=n(45),u=r(s),l=n(41),f=r(l),d=n(42),c=r(d),g=n(43),p=r(g),h=n(2),v=r(h),m=n(1),_=r(m);i.__dashjs_factory_name="ProtectionModel_21Jan2015",t["default"]=_["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){D=null,O=null,P=null,w=null,N=[],x=(0,o["default"])(R).getInstance(),L=T()}function n(){try{for(var e=0;e<N.length;e++)h(N[e]);D&&D.removeEventListener(b.needkey,L),A.trigger(_["default"].TEARDOWN_COMPLETE)}catch(t){A.trigger(_["default"].TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+t.message})}}function r(){return O}function i(){for(var e=[],t=0;t<N.length;t++)e.push(N[t].initData);return e}function a(e){for(var t=!1,n=0;n<e.length;n++)for(var r=e[n].ks.systemString,i=e[n].configs,a=null,o=null,s=0;s<i.length;s++){var u=i[s].audioCapabilities,l=i[s].videoCapabilities;if(u&&0!==u.length){a=[];for(var f=0;f<u.length;f++)window[b.MediaKeys].isTypeSupported(r,u[f].contentType)&&a.push(u[f])}if(l&&0!==l.length){o=[];for(var d=0;d<l.length;d++)window[b.MediaKeys].isTypeSupported(r,l[d].contentType)&&o.push(l[d])}if(!(!a&&!o||a&&0===a.length||o&&0===o.length)){t=!0;var c=new p["default"](a,o),g=x.getKeySystemBySystemString(r);A.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{data:new v["default"](g,c)});break}}t||A.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})}function s(e){try{P=e.mediaKeys=new window[b.MediaKeys](e.keySystem.systemString),O=e.keySystem,w=e,D&&S(),A.trigger(_["default"].INTERNAL_KEY_SYSTEM_SELECTED)}catch(t){A.trigger(_["default"].INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+O.systemString+")! Could not create MediaKeys -- TODO"})}}function l(e){D!==e&&(D&&D.removeEventListener(b.needkey,L),D=e,D&&(D.addEventListener(b.needkey,L),P&&S()))}function d(e){if(!O||!P||!w)throw new Error("Can not create sessions until you have selected a key system");var t=null;if(null!==w.ksConfiguration.videoCapabilities&&w.ksConfiguration.videoCapabilities.length>0&&(t=w.ksConfiguration.videoCapabilities[0]),null===t&&null!==w.ksConfiguration.audioCapabilities&&w.ksConfiguration.audioCapabilities.length>0&&(t=w.ksConfiguration.audioCapabilities[0]),null===t)throw new Error("Can not create sessions for unknown content types.");var n=t.contentType,r=P.createSession(n,new Uint8Array(e)),i=I(r,e);r.addEventListener(b.error,i),r.addEventListener(b.message,i),r.addEventListener(b.ready,i),r.addEventListener(b.close,i),N.push(i),M("DRM: Session created. SessionID = "+i.getSessionID()),A.trigger(_["default"].KEY_SESSION_CREATED,{data:i})}function g(e,t){var n=e.session;x.isClearKey(O)?n.update(new Uint8Array(t.toJWK())):n.update(new Uint8Array(t))}function h(e){var t=e.session;t.removeEventListener(b.error,e),t.removeEventListener(b.message,e),t.removeEventListener(b.ready,e),t.removeEventListener(b.close,e);for(var n=0;n<N.length;n++)if(N[n]===e){N.splice(n,1);break}t[b.release]()}function m(){}function y(){}function E(){}function T(){return{handleEvent:function(e){switch(e.type){case b.needkey:if(e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;A.trigger(_["default"].NEED_KEY,{key:new u["default"](t,"cenc")})}}}}}function S(){var e=null,t=function(){D.removeEventListener("loadedmetadata",e),D[b.setMediaKeys](P),A.trigger(_["default"].VIDEO_ELEMENT_SELECTED)};D.readyState>=1?t():(e=t.bind(this),D.addEventListener("loadedmetadata",e))}function I(e,t){return{session:e,initData:t,getSessionID:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(e){switch(e.type){case b.error:var t="KeyError";A.trigger(_["default"].KEY_ERROR,{data:new f["default"](this,t)});break;case b.message:var n=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;A.trigger(_["default"].INTERNAL_KEY_MESSAGE,{data:new c["default"](this,n,e.destinationURL)});break;case b.ready:M("DRM: Key added."),A.trigger(_["default"].KEY_ADDED);break;case b.close:M("DRM: Session closed. SessionID = "+this.getSessionID()),A.trigger(_["default"].KEY_SESSION_CLOSED,{data:this.getSessionID()})}}}}var R=this.context,A=e.eventBus,M=e.log,b=e.api,C=void 0,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0;return C={getAllInitData:i,requestKeySystemAccess:a,getKeySystem:r,selectKeySystem:s,setMediaElement:l,createKeySession:d,updateKeySession:g,closeKeySession:h,setServerCertificate:m,loadKeySession:y,removeKeySession:E,reset:n},t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),o=r(a),s=n(45),u=r(s),l=n(41),f=r(l),d=n(42),c=r(d),g=n(44),p=r(g),h=n(43),v=r(h),m=n(2),_=r(m),y=n(1),E=r(y);i.__dashjs_factory_name="ProtectionModel_3Feb2014",t["default"]=E["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t)));e+="/?";for(var r=0;r<n.kids.length;r++)e+=n.kids[r]+"&";return e=e.substring(0,e.length-1)}function t(){return"GET"}function n(){return"json"}function r(e){if(!e.hasOwnProperty("keys"))return null;for(var t=[],n=0;n<e.keys.length;n++){var r=e.keys[n],i=r.kid.replace(/=/g,""),a=r.k.replace(/=/g,"");t.push(new o["default"](i,a))}return new u["default"](t)}function i(e){return String.fromCharCode.apply(null,new Uint8Array(e))}var a=void 0;return a={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),o=r(a),s=n(64),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="ClearKey",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(){return"POST"}function n(e){return a[e].responseType}function r(e,t){return a[t].getLicenseMessage(e)}function i(e,t){return a[t].getErrorResponse(e)}var a={"com.widevine.alpha":{responseType:"json",getLicenseMessage:function(e){return u["default"].decodeArray(e.license)},getErrorResponse:function(e){return e}},"com.microsoft.playready":{responseType:"arraybuffer",getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}},o=void 0;return o={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(34),u=r(s);i.__dashjs_factory_name="DRMToday",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(){return"POST"}function n(){return"arraybuffer"}function r(e){return e}function i(e){return String.fromCharCode.apply(null,new Uint8Array(e))}var a=void 0;return a={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="PlayReady",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(){return"POST"}function n(){return"arraybuffer"}function r(e){return e}function i(e){return String.fromCharCode.apply(null,new Uint8Array(e))}var a=void 0;return a={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="Widevine",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.contentType=e,this.robustness=t};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){return u.mediaInfo.streamInfo}function n(){return u.mediaInfo}function r(){return u}function i(){return f}function a(){return u.mediaInfo.streamInfo.manifestInfo}function o(){return l}var s=void 0,u=e.streamProcessor.getCurrentRepresentationInfo(),l=e.streamProcessor,f=e.currentValue;return s={getStreamInfo:t,getMediaInfo:n,getTrackInfo:r,getCurrentValue:i,getManifestInfo:a,getStreamProcessor:o}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="RulesContext",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){p={},h={},v=[],m=(0,u["default"])(d).getInstance()}function t(e,t){p[e]=p[e]||{},p[e][t]=p[e][t]||{}}function n(e,t){v[e]=v[e]||[],v[e].push(t)}function r(e,r){var a=e.getMediaInfo(),u=a.type,c=e.getCurrentValue().request,_=(0,o["default"])(d).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});if(!isNaN(c.index)){t(u,c.index);var y=p[u][c.index];if(null===y||null===c.firstByteDate||h.hasOwnProperty(y.id))return void r(_);if(void 0===y.firstByteTime&&(v[u]=[],y.firstByteTime=c.firstByteDate.getTime(),y.segmentDuration=c.duration,y.bytesTotal=c.bytesTotal,y.id=c.index),y.bytesLoaded=c.bytesLoaded,y.elapsedTime=(new Date).getTime()-y.firstByteTime,y.bytesLoaded>0&&y.elapsedTime>0&&n(u,Math.round(8*y.bytesLoaded/y.elapsedTime)),v[u].length>=f&&y.elapsedTime>l&&y.bytesLoaded<y.bytesTotal){var E=v[u].reduce(function(e,t){return e+t},0);if(y.measuredBandwidthInKbps=Math.round(E/v[u].length),y.estimatedTimeOfDownload=(8*y.bytesTotal/y.measuredBandwidthInKbps/1e3).toFixed(2),y.estimatedTimeOfDownload<y.segmentDuration*s||0===e.getTrackInfo().quality)return void r(_);if(!h.hasOwnProperty(y.id)){var T=e.getStreamProcessor().getABRController(),S=y.bytesTotal-y.bytesLoaded,I=T.getBitrateList(a),R=T.getQualityForBitrate(a,y.measuredBandwidthInKbps*m.getBandwidthSafetyFactor()),A=y.bytesTotal*I[R].bitrate/I[T.getQualityFor(u,a.streamInfo)].bitrate;S>A&&(_.value=R,_.priority=o["default"].STRONG,_.reason.throughput=y.measuredBandwidthInKbps,h[y.id]=y,g("AbandonRequestsRule ( ",u,"frag id",y.id,") is asking to abandon and switch to quality to ",R," measured bandwidth was",y.measuredBandwidthInKbps),delete p[u][y.id])}}else y.bytesLoaded===y.bytesTotal&&delete p[u][y.id]}r(_)}function a(){e()}var s=1.8,l=500,f=5,d=this.context,g=(0,c["default"])(d).getInstance().log,p=void 0,h=void 0,v=void 0,m=void 0,_={execute:r,reset:a};return e(),_}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(5),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d);i.__dashjs_factory_name="AbandonRequestsRule",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){_={},y=(0,u["default"])(d).getInstance()}function n(e,t,n){_[e]={index:t,quality:n}}function r(e,t,n){var r=_[e];return!r||(t!==r.index||n<r.quality)}function a(e,t){var a=e.getMediaInfo(),s=a.type,u=v.getReadOnlyMetricsFor(s),c=e.getCurrentValue(),m=c.request,y=(0,o["default"])(d).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});if(0===u.BolaState.length)return g("WARNING: executing BolaAbandonRule before initializing BolaRule"),_[s]=null,void t(y);var E=u.BolaState[0]._s,T=m.index,S=m.quality;if(isNaN(T)||0===S||!r(s,T,S)||!m.firstByteDate)return void t(y);var I=Date.now(),R=I-m.firstByteDate.getTime(),A=m.bytesLoaded,M=m.bytesTotal,b=M-A,C=m.duration,D=h.getCurrentBufferLevel(u)?h.getCurrentBufferLevel(u):0,O=D+E.virtualBuffer,P=8*A/(.001*R),w=E.bandwidthSafetyFactor*P,N=.001*(m.firstByteDate.getTime()-m.requestStartDate.getTime());N<.001*f&&(N=.001*f);var L=N+8*M/w,x="";p["default"].BOLA_DEBUG&&(x="index="+T+" quality="+S+" bytesLoaded/bytesTotal="+A+"/"+M+" bufferLevel="+D+" timeSince1stByte="+(R/1e3).toFixed(3)+" estThroughput="+(w/1e6).toFixed(3)+" latency="+N.toFixed(3));var F=M*E.bitrates[0]/E.bitrates[S],U=b-N*w/8;if(U<1&&(U=1),R<l||b<=F||D>E.bufferTarget||U<=F||L<=C)return void t(y);var B=O-N;B<0&&(B=0);for(var k=0;k+1<S&&M*E.bitrates[k+1]/E.bitrates[S]<U;)++k;var j=S;if(E.state===p["default"].BOLA_STATE_STARTUP){j=0;for(var K=0;K<=k&&(F=M*E.bitrates[K]/E.bitrates[S],!(8*F/C>w));++K)j=K}else for(var H=(E.Vp*(E.utilities[S]+E.gp)-B)/U,K=0;K<=k;++K){F=M*E.bitrates[K]/E.bitrates[S];var q=(E.Vp*(E.utilities[K]+E.gp)-B)/F;q>H&&(j=K,H=q)}var Y=E.rebufferSafetyFactor*P*(D-N)/8;if(j===S&&U>Y&&(j=k),j===S)return void t(y);for(;j>0&&(F=M*E.bitrates[j]/E.bitrates[S],!(F<=Y));)--j;E.lastQuality=j,v.updateBolaState(s,E),p["default"].BOLA_DEBUG&&g("BolaDebug "+s+" BolaAbandonRule abandon to "+j+" - "+x),n(s,T,S),y.value=j,y.priority=o["default"].STRONG,y.reason.state=E.state,y.reason.throughput=P,y.reason.bufferLevel=D,y.reason.bytesLoaded=m.bytesLoaded,y.reason.bytesTotal=m.bytesTotal,y.reason.elapsedTimeMs=R,t(y)}function s(){_={}}var l=500,f=200,d=this.context,g=(0,c["default"])(d).getInstance().log,h=e.dashMetrics,v=e.metricsModel,m=void 0,_=void 0,y=void 0;return m={execute:a,reset:s},t(),m}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(5),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d),g=n(66),p=r(g);i.__dashjs_factory_name="BolaAbandonRule",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){g=0,h=(0,u["default"])(s).getInstance()}function n(e,t){var n=(new Date).getTime()/1e3,r=e.getMediaInfo(),a=e.getTrackInfo(),u=r.type,p=isNaN(a.fragmentDuration)?2:a.fragmentDuration/2,v=e.getCurrentValue(),m=e.getStreamProcessor(),_=m.getABRController(),y=d.getReadOnlyMetricsFor(u),E=c.getCurrentBufferLevel(y),T=y.BufferState.length>0?y.BufferState[y.BufferState.length-1]:null,S=!1,I=r.representationCount-1,R=(0,o["default"])(s).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});return n-g<p||_.getAbandonmentStateFor(u)===f["default"].ABANDON_LOAD?void t(R):(null!==T&&E>T.target&&(S=E-T.target>h.getRichBufferThreshold(),S&&r.representationCount>1&&(R.value=I,R.priority=o["default"].STRONG,R.reason.bufferLevel=E,R.reason.bufferTarget=T.target)),R.value!==o["default"].NO_CHANGE&&R.value!==v&&l("BufferOccupancyRule requesting switch to index: ",R.value,"type: ",u," Priority: ",R.priority===o["default"].DEFAULT?"Default":R.priority===o["default"].STRONG?"Strong":"Weak"),void t(R))}function r(){g=0}var a=void 0,s=this.context,l=(0,p["default"])(s).getInstance().log,d=e.metricsModel,c=e.dashMetrics,g=void 0,h=void 0;return a={execute:n,reset:r},t(),a}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(5),u=r(s),l=n(10),f=r(l),d=n(1),c=r(d),g=n(4),p=r(g);i.__dashjs_factory_name="BufferOccupancyRule",t["default"]=c["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){m={},_=0,y=1e3,g.on(c["default"].PLAYBACK_SEEKING,a,h)}function n(e,t){var n=(new Date).getTime(),a=e.getMediaInfo().type,s=e.getCurrentValue(),f=p.getReadOnlyMetricsFor(a),c=f.BufferState.length>0?f.BufferState[f.BufferState.length-1]:null,g=(0,o["default"])(l).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});return n-_<y||null===c?void t(g):(r(a,c.state),c.state===u["default"].BUFFER_EMPTY&&void 0!==m[a].firstBufferLoadedEvent&&(g.value=0,g.priority=o["default"].STRONG,g.reason.bufferState=c.state,g=(0,o["default"])(l).create(0,o["default"].STRONG)),g.value!==o["default"].NO_CHANGE&&g.value!==s&&d("InsufficientBufferRule requesting switch to index: ",g.value,"type: ",a," Priority: ",g.priority===o["default"].DEFAULT?"Default":g.priority===o["default"].STRONG?"Strong":"Weak"),_=n,void t(g))}function r(e,t){m[e]=m[e]||{},m[e].state=t,t!==u["default"].BUFFER_LOADED||m[e].firstBufferLoadedEvent||(m[e].firstBufferLoadedEvent=!0)}function a(){m={}}function s(){g.off(c["default"].PLAYBACK_SEEKING,a,h),m={},_=0}var l=this.context,d=(0,v["default"])(l).getInstance().log,g=(0,f["default"])(l).getInstance(),p=e.metricsModel,h=void 0,m=void 0,_=void 0,y=void 0;return h={execute:n,reset:s},t(),h}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(18),u=r(s),l=n(3),f=r(l),d=n(2),c=r(d),g=n(1),p=r(g),h=n(4),v=r(h);i.__dashjs_factory_name="InsufficientBufferRule",t["default"]=p["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){A=[],M={audio:{threshold:_,value:NaN},video:{threshold:v,value:NaN}},b=(0,c["default"])(T).getInstance()}function n(e,t){A[e]=A[e]||[],A[e].push(t)}function r(e,t){var n=Math.min(A[e].length,t?p:h),r=A[e].slice(n*-1,A[e].length);return r.length>1&&r.reduce(function(e,t){return(e*E<=t||e>=t*y)&&n++,t}),n=Math.min(A[e].length,n),A[e].slice(n*-1,A[e].length)}function a(e,t){var n=r(e,t),i=0;if(n.length>0){var a=n.reduce(function(e,t){return e+t},0);i=a/n.length}return A[e].length>=d&&A[e].shift(),i/1e3*b.getBandwidthSafetyFactor()}function s(e,t){var r=e.getMediaInfo(),s=r.type,l=e.getCurrentValue(),d=R.getReadOnlyMetricsFor(s),c=e.getStreamProcessor(),p=c.getABRController(),h=c.isDynamic(),v=I.getCurrentHttpRequest(d),m=d.BufferState.length>0?d.BufferState[d.BufferState.length-1]:null,_=(0,o["default"])(T).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});if(!d||!v||v.type!==g.HTTPRequest.MEDIA_SEGMENT_TYPE||!m)return void t(_);var y=void 0;if(v.trace&&v.trace.length){y=v._tfinish.getTime()-v.tresponse.getTime()+1;var E=v.trace.reduce(function(e,t){return e+t.b[0]},0),A=Math.round(8*E/(y/1e3));y<=M[s].threshold?M[s].value=A/1e3:(M[s].value=NaN,n(s,A))}var b=Math.round(isNaN(M[s].value)?a(s,h):M[s].value);if(p.setAverageThroughput(s,b),p.getAbandonmentStateFor(s)!==f["default"].ABANDON_LOAD){if(m.state===u["default"].BUFFER_LOADED||h){var C=p.getQualityForBitrate(r,b);c.getScheduleController().setTimeToLoadDelay(0),_.value=C,_.priority=o["default"].DEFAULT,_.reason.throughput=b}_.value!==o["default"].NO_CHANGE&&_.value!==l&&S("ThroughputRule requesting switch to index: ",_.value,"type: ",s," Priority: ",_.priority===o["default"].DEFAULT?"Default":_.priority===o["default"].STRONG?"Strong":"Weak","Average throughput",Math.round(b),"kbps")}t(_)}function l(){t()}var d=20,p=3,h=4,v=50,_=5,y=1.3,E=1.3,T=this.context,S=(0,m["default"])(T).getInstance().log,I=e.dashMetrics,R=e.metricsModel,A=void 0,M=void 0,b=void 0,C={execute:s,reset:l};return t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(18),u=r(s),l=n(10),f=r(l),d=n(5),c=r(d),g=n(7),p=n(1),h=r(p),v=n(4),m=r(v);i.__dashjs_factory_name="ThroughputRule",t["default"]=h["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){var t,n=0;return e&&e.some(function(e,t){return n=t,!r.contains(e.serviceLocation)})&&(t=e[n]),t}var n=void 0,r=e.blacklistController;return n={select:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="BasicSelector",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){var t=[],n=function(e){return!t.length||!e.dvb_priority||t.indexOf(e.dvb_priority)===-1},r=function(e){return!a.contains(e.serviceLocation)||(e.dvb_priority&&t.push(e.dvb_priority),!1)};return e.filter(r).filter(n)}function n(e){var t,n,r=function(e,t){var n=e.dvb_priority-t.dvb_priority;return isNaN(n)?0:n},i=function(e,t,n){return!t||n[0].dvb_priority&&e.dvb_priority&&n[0].dvb_priority===e.dvb_priority},a=0,o=[],s=0;if(n=e.sort(r).filter(i),n.length)return n.length>1&&(n.forEach(function(e){a+=e.dvb_weight,o.push(a)}),t=Math.floor(Math.random()*(a-1)),o.every(function(e,n){return s=n,!(t<e)})),n[s]}function r(e){return e&&n(t(e))}var i=void 0,a=e.blacklistController;return i={select:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="DVBSelector",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){f=(0,o["default"])(i).getInstance(),d=(0,u["default"])(i).getInstance()}function n(e,t,n){var i=a.getCurrentBufferLevel(s.getReadOnlyMetricsFor(t));return i<r(e,t,n)}function r(e,t,n){var r=NaN,i=e.getCurrentRepresentationInfo();if("fragmentedText"===t)r=l.getAllTracksAreDisabled()?0:i.fragmentDuration;else if("audio"===t&&n){var o=a.getCurrentBufferLevel(s.getReadOnlyMetricsFor("video"));r=Math.floor(Math.max(o,i.fragmentDuration))}else{var u=i.mediaInfo.streamInfo,d=e.getABRController();if(d.isPlayingAtTopQuality(u)){var c=u.manifestInfo.duration>=f.getLongFormContentDurationThreshold();r=c?f.getBufferTimeAtTopQualityLongForm():f.getBufferTimeAtTopQuality()}else r=f.getStableBufferTime()}return r}var i=this.context,a=e.dashMetrics,s=e.metricsModel,l=e.textSourceBuffer,f=void 0,d=void 0,c={execute:n,getBufferTarget:r};return t(),c}Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),o=r(a),s=n(9),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="BufferLevelRule",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){var n=e.getCurrentRepresentationInfo(),o=n.mediaInfo,u=o.type,l=e.getScheduleController(),f=l.getSeekTarget(),d=!isNaN(f),c=e.getBuffer(),g=d?f:i.getIndexHandlerTime(e);if(isNaN(g)||"fragmentedText"===u&&s.getAllTracksAreDisabled())return null;if(d&&l.setSeekTarget(NaN),c){var p=a.getBufferRange(e.getBuffer(),g);null!==p&&(r("Prior to making a request for time, NextFragmentRequestRule is aligning index handler's currentTime with bufferedRange.end.",g," was changed to ",p.end),g=p.end)}var h=void 0;return t?(g=t.startTime+t.duration/2,h=i.getFragmentRequestForTime(e,n,g,{timeThreshold:0,ignoreIsFinished:!0})):(h=i.getFragmentRequestForTime(e,n,g,{keepIdx:!d}),h&&e.getFragmentModel().isFragmentLoaded(h)&&(h=i.getNextFragmentRequest(e,n)),h&&(i.setIndexHandlerTime(e,h.startTime+h.duration),h.delayLoadingTime=(new Date).getTime()+l.getTimeToLoadDelay(),l.setTimeToLoadDelay(0))),h}var n=this.context,r=(0,o["default"])(n).getInstance().log,i=e.adapter,a=e.sourceBufferController,s=e.textSourceBuffer,u={execute:t};return u}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="NextFragmentRequestRule",
37
- t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){m=NaN,_=null,y=NaN,E=null,T=!1,S=NaN,I=o["default"].DEFAULT}function n(e,t){var n,r;if(R=t,M=e.getStreamProcessor(),A=M.getFragmentLoader(),E=e.getTrackInfo(),S=E.fragmentDuration,r=E.DVRWindow,m=r.end,E.useCalculatedLiveEdgeTime){var u=h.getExpectedLiveEdge();return h.setExpectedLiveEdge(m),void R((0,o["default"])(d).create(u,I))}_={start:Math.max(0,m-g),end:m+g},y=Math.floor((r.end-r.start)/2),n=p.getFragmentRequestForTime(M,E,m,{ignoreIsFinished:!0}),i(m,s,a,n)}function r(){m=NaN,_=null,y=NaN,E=null,T=!1,S=NaN,M=null,A=null}function i(e,t,n,r){var a;if(null===r)a=p.generateFragmentRequestForTime(M,E,e),i(e,t,n,a);else{var o=function s(r){c.off(f["default"].CHECK_FOR_EXISTENCE_COMPLETED,s,this),r.exists?t(r.request,e):n(r.request,e)};c.on(f["default"].CHECK_FOR_EXISTENCE_COMPLETED,o,this),A.checkForExistence(r)}}function a(e,t){var n,r,u;return T?void l(!1,t):(u=t-m,n=u>0?m-u:m+Math.abs(u)+y,void(n<_.start&&n>_.end?R((0,o["default"])(d).create(null,I)):(r=p.getFragmentRequestForTime(M,E,n,{ignoreIsFinished:!0}),i(n,s,a,r))))}function s(e,t){var n,r,a=e.startTime;if(!T){if(!E.fragmentDuration)return void R((0,o["default"])(d).create(a,I));if(T=!0,_.end=a+2*y,t===m)return r=t+S,n=p.getFragmentRequestForTime(M,E,r,{ignoreIsFinished:!0}),void i(r,function(){l(!0,r)},function(){R((0,o["default"])(d).create(r,I))},n)}l(!0,t)}function l(e,t){var n,r,u;e?_.start=t:_.end=t,n=Math.floor(_.end-_.start)<=S,n?R((0,o["default"])(d).create(e?t:t-S,I)):(u=(_.start+_.end)/2,r=p.getFragmentRequestForTime(M,E,u,{ignoreIsFinished:!0}),i(u,s,a,r))}var d=this.context,c=(0,u["default"])(d).getInstance(),p=e.adapter,h=e.timelineConverter,v=void 0,m=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0,I=void 0,R=void 0,A=void 0,M=void 0;return v={execute:n,reset:r},t(),v}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(3),u=r(s),l=n(2),f=r(l),d=n(1),c=r(d),g=43200;i.__dashjs_factory_name="LiveEdgeBinarySearchRule",t["default"]=c["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){var n=e.getTrackInfo(),a=n.DVRWindow.end,s=o["default"].DEFAULT;if(n.useCalculatedLiveEdgeTime){var u=i.getExpectedLiveEdge();i.setExpectedLiveEdge(a),t((0,o["default"])(r).create(u,s))}else t((0,o["default"])(r).create(a,s))}var n=void 0,r=this.context,i=e.timelineConverter;return n={execute:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="LiveEdgeWithTimeSynchronizationRule",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){d=(0,c["default"])(i).create({updateEventName:u["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,loadFailedEventName:u["default"].FRAGMENT_LOADING_COMPLETED}),g=(0,v["default"])(i).create({blacklistController:d}),h=(0,p["default"])(i).create({blacklistController:d}),m=g}function t(e){m=s.getIsDVB(e)?h:g}function n(e){var t=e.baseUrls,n=e.selectedIdx;if(!isNaN(n))return t[n];var r=m.select(t);return r?(e.selectedIdx=t.indexOf(r),r):void a.trigger(u["default"].URL_RESOLUTION_FAILED,{error:new Error(y,E)})}function r(){d.reset()}var i=this.context,a=(0,o["default"])(i).getInstance(),s=(0,f["default"])(i).getInstance(),l=void 0,d=void 0,g=void 0,h=void 0,m=void 0;return l={chooseSelectorFromManifest:t,select:n,reset:r},e(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(12),f=r(l),d=n(105),c=r(d),g=n(153),p=r(g),h=n(152),v=r(h),m=n(1),_=r(m),y=1,E="Failed to resolve a valid URL";i.__dashjs_factory_name="BaseURLSelector";var T=_["default"].getClassFactory(i);T.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=y,T.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE=E,t["default"]=T,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){o=!1}function t(){var e="WebKitMediaSource"in window,t="MediaSource"in window;return e||t}function n(){return o}function r(e){o=e}function i(e,t){var n=e.canPlayType(t);return"probably"===n||"maybe"===n}var a=void 0,o=void 0;return a={supportsMediaSource:t,supportsEncryptedMedia:n,supportsCodec:i,setEncryptedMediaSupported:r},e(),a}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="Capabilities",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){return p}function n(e){p=e}function r(e,t){var n=!0,r=0,i=void 0,a=void 0;if(void 0===t&&(t=!1),e.tag>16777215?(g.getUint32(p)!==e.tag&&(n=!1),r=4):e.tag>65535?(i=g.getUint16(p),a=g.getUint8(p+2),256*i+a!==e.tag&&(n=!1),r=3):e.tag>255?(g.getUint16(p)!==e.tag&&(n=!1),r=2):(g.getUint8(p)!==e.tag&&(n=!1),r=1),!n&&e.required&&!t)throw new u["default"]("required tag not found");return n&&(p+=r),n}function i(e,t){var n=r(e,t);return n&&s(),n}function a(e){var t=void 0;return r(e),t=s(),c[e.parse](t)}function o(e,t){var n=r(e,t),i=void 0;return n&&(i=s(),p+=i),n}function s(e){var t=1,n=128,r=8,i=-1,a=0,o=g.getUint8(p),s=void 0;for(s=0;s<r;s+=1){if((o&n)===n){a=void 0===e?o&~n:o,i=s;break}n>>=1}for(s=0;s<i;s+=1,t+=1)a=a<<8|255&g.getUint8(p+t);return p+=t,a}function l(e){var t=void 0;switch(e){case 4:t=g.getFloat32(p),p+=4;break;case 8:t=g.getFloat64(p),p+=8}return t}function f(e){var t=0,n=void 0;for(n=0;n<e;n+=1)t<<=8,t|=255&g.getUint8(p+n);return p+=e,t}function d(){return p<g.byteLength}var c=void 0,g=new DataView(e.data),p=0;return c={getPos:t,setPos:n,consumeTag:r,consumeTagAndSize:i,parseTag:a,skipOverElement:o,getMatroskaCodedNum:s,getMatroskaFloat:l,getMatroskaUint:f,moreData:d}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(6),u=r(s);i.__dashjs_factory_name="EBMLParser",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e&&f&&f.boxes&&0!==f.boxes.length?u(f.fetch(e)):null}function t(e){for(var t,n=f.fetchAll(e),r=[],i=0,a=n.length;i<a;i++)t=u(n[i]),t&&r.push(t);return r}function n(e){f=e}function r(){if(!f||!f.boxes||!f.boxes.length)return null;var e=f.boxes[f.boxes.length-1].type,n=t(e);return n[n.length-1]}function i(){return f._cursor.offset}function a(){d={offset:"_offset",size:"size",type:"type"},c={references:"references",timescale:"timescale",earliest_presentation_time:"earliest_presentation_time",first_offset:"first_offset"},g={reference_type:"reference_type",referenced_size:"referenced_size",subsegment_duration:"subsegment_duration"},p={id:"id",value:"value",timescale:"timescale",scheme_id_uri:"scheme_id_uri",presentation_time_delta:"presentation_time_delta",event_duration:"event_duration",message_data:"message_data"},h={timescale:"timescale"},v={sequence_number:"sequence_number"},m={base_data_offset:"base_data_offset",sample_description_index:"sample_description_index",default_sample_duration:"default_sample_duration",default_sample_size:"default_sample_size",default_sample_flags:"default_sample_flags",flags:"flags"},_={version:"version",baseMediaDecodeTime:"baseMediaDecodeTime",flags:"flags"},y={sample_count:"sample_count",first_sample_flags:"first_sample_flags",data_offset:"data_offset",flags:"flags",samples:"samples"},E={sample_size:"sample_size",sample_duration:"sample_duration",sample_composition_time_offset:"sample_composition_time_offset"}}function s(e,t,n){for(var r in n)t[r]=e[n[r]]}function u(e){if(!e)return null;var t,n,r=new o["default"];switch(s(e,r,d),e.hasOwnProperty("_incomplete")&&(r.isComplete=!e._incomplete),r.type){case"sidx":if(s(e,r,c),r.references)for(t=0,n=r.references.length;t<n;t++)s(e.references[t],r.references[t],g);break;case"emsg":s(e,r,p);break;case"mdhd":s(e,r,h);break;case"mfhd":s(e,r,v);break;case"tfhd":s(e,r,m);break;case"tfdt":s(e,r,_);break;case"trun":if(s(e,r,y),r.samples)for(t=0,n=r.samples.length;t<n;t++)s(e.samples[t],r.samples[t],E)}return r}var l=void 0,f=void 0,d=void 0,c=void 0,g=void 0,p=void 0,h=void 0,v=void 0,m=void 0,_=void 0,y=void 0,E=void 0;return l={getBox:e,getBoxes:t,setData:n,getLastBox:r,getOffset:i},a(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(168),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="IsoFile",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){return JSON.stringify(e)===JSON.stringify(t)}var t=void 0;return t={areSimpleEquivalent:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="ObjectUtils",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&e.videoModel&&(ne=e.videoModel)}function t(e){if(e.hasOwnProperty("begin")&&e.hasOwnProperty("end")){var t=h(e.begin),n=h(e.end);return[t,n]}return null}function n(){var e="cue_TTML_"+re;return re++,e}function r(e,t,n){function r(e,t){if(e.hasOwnProperty(t)){var n=e[t];a.indexOf(n)<0&&a.push(n)}}for(var i=[],a=[],o=[],s=0;s<e.length;s++){var u=e[s];r(u,"begin"),r(u,"end")}if(0===a.length)return o;if("undefined"!=typeof t&&"undefined"!=typeof n){for(var s=0;s<a.length;s++){var l=h(a[s]);t<l&&l<n&&i.push(l)}i.push(t),i.push(n)}else for(var s=0;s<a.length;s++)i.push(h(a[s]));i.sort(function(e,t){return e-t});for(var s=0;s<i.length-1;s++)o.push([i[s],i[s+1]]);return o}function i(e,t){return"undefined"!=typeof startInterval&&e<t&&(e=t),e}function o(e,t){return"undefined"!=typeof t&&e>t&&(e=t),e}function s(e,t,n){var r=h(e.begin),a=h(e.end);return r=i(r,t),a=o(a,n),"undefined"!=typeof t&&"undefined"!=typeof n&&(a<t||r>n)?(B("TTML: Cue "+r+"-"+a+" outside interval "+t+"-"+n),null):[r,a]}function u(e,n){var r=!0;if(e.hasOwnProperty("span")){var i=t(e.span);null!==i&&(r=i[0]<n[1]&&i[1]>n[0])}return r}function f(e,i,a){var o=void 0,f=void 0,d=void 0,c=void 0,g=void 0,p="",h=new l["default"]([],"",(!1));if(K=h.xml_str2json(e),!K)throw new Error("TTML document could not be parsed");if(ne.getTTMLRenderingDiv()&&(g="html"),o=K.tt,!o)throw new Error("TTML document lacks tt element");var _=v(o,"http://www.w3.org/ns/ttml");if(_&&m(o,_),c=o["tts:extent"],f=o.head,!f)throw new Error("TTML document lacks head element");if(f.layout&&(q=f.layout.region_asArray),f.styling&&(H=f.styling.style_asArray),d=o.body,!d)throw new Error("TTML document lacks body element");var y=P(),I=ne.getElement().clientWidth,R=ne.getElement().clientHeight,A=[I/y[0],R/y[1]];W["font-size"]=A[1]+"px;";var M=[];if(q)for(var O=0;O<q.length;O++)M.push(C(JSON.parse(JSON.stringify(q[O])),A));var F=v(K.tt,"http://www.w3.org/ns/ttml#parameter");o.hasOwnProperty(F+":frameRate")&&(o.frameRate=parseInt(o[F+":frameRate"],10));for(var U=[],k=o.body_asArray[0].__children,j=0;j<k.length;j++){var z=k[j].div,Q=null;if(null===(Q=t(z))){var X=z.p_asArray;if(null===Q&&(!X||0===X.length))return p="TTML has div that contains no timing and no paragraphs.",B(p),U;for(var Z=0;Z<X.length;Z++){var J=X[Z],$=J.span_asArray,ee=[];if(J.hasOwnProperty("begin")&&J.hasOwnProperty("end")){var te=s(J,i,a);null!==te&&ee.push(te)}else ee=r($,i,a);if(0!==ee.length)for(var re=J.__children,ie=0;ie<ee.length;ie++){for(var ae=ee[ie],oe=[],se=0;se<re.length;se++){var ue=re[se];u(ue,ae)&&oe.push(ue)}if(0!==oe.length)if("html"===g){G={},V={},Y={};var le=L(J,z,A),fe=x(J,A),de=fe[1];fe=fe[0];var ce=document.createElement("div");ce.className=de;var ge=N(oe,A);ge.className="cueDirUniWrapper",E("unicode-bidi",fe)&&(ge.style.cssText+=T("unicode-bidi",fe),S("unicode-bidi",fe)),E("direction",fe)&&(ge.style.cssText+=T("direction",fe),S("direction",fe)),E("padding-left",fe)&&E("padding-right",fe)&&(ge.innerHTML=w(ge,fe)),E("padding-left",fe)&&E("padding-right",fe)&&(S("padding-left",fe),S("padding-right",fe));var pe="";if(E("regionID",le)){var he=T("regionID",le);pe=he.slice(he.indexOf(":")+1,he.length-1)}fe&&(ce.style.cssText=fe.join(" ")+"display:flex;"),le&&(le=le.join(" ")),ce.appendChild(ge);var ve=document.createElement("div");ve.appendChild(ce),ve.id=n(),ve.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+le,0===Object.keys(Y).length&&(Y.defaultFontSize="100"),U.push({start:ae[0],end:ae[1],type:"html",cueHTMLElement:ve,regions:M,regionID:pe,cueID:ve.id,videoHeight:R,videoWidth:I,cellResolution:y,fontSize:Y||{defaultFontSize:"100"},lineHeight:G,linePadding:V})}else{var me="",_e=oe;_e.length&&_e.forEach(function(e){if(e.hasOwnProperty("span")){var t=e.span.__children;t.forEach(function(e){t.hasOwnProperty("metadata")||(e.hasOwnProperty("#text")?me+=e["#text"].replace(/[\r\n]+/gm," ").trim():"br"in e&&(me+="\n"))})}else me+=e.hasOwnProperty("br")?"\n":e["#text"].replace(/[\r\n]+/gm," ").trim()}),U.push({start:ae[0],end:ae[1],data:me,type:"text"})}}else p="TTML: Empty paragraph"}}else{var ye=void 0;if(z.region){var Ee=D(q,z.region);ye=b(Ee,c)}ye||(ye=b(z,c));var Te=o.head.metadata.image_asArray;if(void 0!==z["smpte:backgroundImage"])for(var Se=0;Se<Te.length;Se++)"#"+Te[Se]["xml:id"]===z["smpte:backgroundImage"]&&U.push({start:Q[0],end:Q[1],id:n(),data:"data:image/"+Te[Se].imagetype.toLowerCase()+";base64, "+Te[Se].__text,type:"image",layout:ye})}}if(""!==p&&B(p),U.length>0)return U;throw new Error(p)}function p(){j=/^([0-9][0-9]+):([0-5][0-9]):([0-5][0-9])|(60)(\.([0-9])+)?$/,Y={},G={},V={},z={top:"auto;",left:"auto;",width:"90%;",height:"10%;","align-items":"flex-start;",overflow:"visible;","-ms-writing-mode":"lr-tb, horizontal-tb;","-webkit-writing-mode":"horizontal-tb;","-moz-writing-mode":"horizontal-tb;","writing-mode":"horizontal-tb;"},W={color:"rgb(255,255,255);",direction:"ltr;","font-family":"monospace, sans-serif;","font-style":"normal;","line-height":"normal;","font-weight":"normal;","text-align":"start;","justify-content":"flex-start;","text-decoration":"none;","unicode-bidi":"normal;","white-space":"normal;",width:"100%;"},Q={monospace:"font-family: monospace;",sansSerif:"font-family: sans-serif;",serif:"font-family: serif;",monospaceSansSerif:"font-family: monospace, sans-serif;",monospaceSerif:"font-family: monospace, serif;",proportionalSansSerif:"font-family: Arial;",proportionalSerif:"font-family: Times New Roman;","default":"font-family: monospace, sans-serif;"},X={right:["justify-content: flex-end;","text-align: right;"],start:["justify-content: flex-start;","text-align: start;"],center:["justify-content: center;","text-align: center;"],end:["justify-content: flex-end;","text-align: end;"],left:["justify-content: flex-start;","text-align: left;"]},Z={start:"text-align: start;",center:"text-align: center;",end:"text-align: end;",auto:""},J={wrap:"white-space: normal;",noWrap:"white-space: nowrap;"},$={normal:"unicode-bidi: normal;",embed:"unicode-bidi: embed;",bidiOverride:"unicode-bidi: bidi-override;"},ee={before:"align-items: flex-start;",center:"align-items: center;",after:"align-items: flex-end;"},te={lrtb:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;",rltb:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;direction: rtl;unicode-bidi: bidi-override;",tbrl:"-webkit-writing-mode: vertical-rl;writing-mode: vertical-rl;-webkit-text-orientation: upright;text-orientation: upright;",tblr:"-webkit-writing-mode: vertical-lr;writing-mode: vertical-lr;-webkit-text-orientation: upright;text-orientation: upright;",lr:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;",rl:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;direction: rtl;",tb:"-webkit-writing-mode: vertical-rl;writing-mode: vertical-rl;-webkit-text-orientation: upright;text-orientation: upright;"}}function h(e){var t,n,r,i=j.test(e);if(!i)return NaN;if(t=e.split(":"),n=parseFloat(t[0])*c+parseFloat(t[1])*g+parseFloat(t[2]),t[3]){if(r=K.tt.frameRate,!r||isNaN(r))return NaN;n+=parseFloat(t[3])/r}return n}function v(e,t){var n=Object.keys(e).filter(function(n){return("xmlns"===n.split(":")[0]||"xmlns"===n.split(":")[1])&&e[n]===t}).map(function(e){return e.split(":")[2]||e.split(":")[1]});return 1!=n.length?null:n[0]}function m(e,t){for(var n in e)if(e.hasOwnProperty(n)){if(("object"===a(e[n])||e[n]instanceof Object)&&!Array.isArray(e[n]))m(e[n],t);else if(Array.isArray(e[n]))for(var r=0;r<e[n].length;r++)m(e[n][r],t);var i=n.slice(n.indexOf(t)+t.length+1);e[i]=e[n],delete e[n]}}function _(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function y(e){var t=e.slice(1),n=t.match(/.{2}/g),r=parseFloat(parseInt(parseInt(n[3],16)/255*1e3,10)/1e3),i=n.slice(0,3).map(function(e){return parseInt(e,16)});return"rgba("+i.join(",")+","+r+");"}function E(e,t){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>-1)return!0;return!1}function T(e,t){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>-1)return t[n];return null}function S(e,t){t.splice(t.indexOf(T(e,t)),1)}function I(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<t.length;r++)e[n]&&e[n].split(":")[0].indexOf(t[r].split(":")[0])>-1&&e.splice(n,1);return e.concat(t)}function R(e,t,n){var r=[];for(var i in e)if(e.hasOwnProperty(i)){var a=i.replace("ebutts:","");a=a.replace("xml:",""),a=a.replace("tts:",""),a=_(a),e[a]=e[i],delete e[i]}if("line-padding"in e){var o=parseFloat(e["line-padding"].slice(e["line-padding"].indexOf(":")+1,e["line-padding"].indexOf("c")));"id"in e&&(V[e.id]=o);var s=o*t[0]+"px;";r.push("padding-left:"+s),r.push("padding-right:"+s)}if("font-size"in e){var u=parseFloat(e["font-size"].slice(e["font-size"].indexOf(":")+1,e["font-size"].indexOf("%")));"id"in e&&(Y[e.id]=u);var l=u/100*t[1]+"px;";r.push("font-size:"+l)}if("line-height"in e)if("normal"===e["line-height"])r.push("line-height: normal;");else{var f=parseFloat(e["line-height"].slice(e["line-height"].indexOf(":")+1,e["line-height"].indexOf("%")));"id"in e&&(G[e.id]=f);var d=f/100*t[1]+"px;";r.push("line-height:"+d)}"font-family"in e&&(e["font-family"]in Q?r.push(Q[e["font-family"]]):r.push("font-family:"+e["font-family"]+";")),"text-align"in e&&e["text-align"]in X&&(r.push(X[e["text-align"]][0]),r.push(X[e["text-align"]][1])),"multi-row-align"in e&&(E("text-align",r)&&"auto"!=e["multi-row-align"]&&S("text-align",r),e["multi-row-align"]in Z&&r.push(Z[e["multi-row-align"]]));var c;return"background-color"in e&&(e["background-color"].indexOf("#")>-1&&e["background-color"].length-1===8?(c=y(e["background-color"]),r.push("background-color: "+c)):r.push("background-color:"+e["background-color"]+";")),"color"in e&&(e.color.indexOf("#")>-1&&e.color.length-1===8?(c=y(e.color),r.push("color: "+c)):r.push("color:"+e.color+";")),"wrap-option"in e&&(e["wrap-option"]in J?r.push(J[e["wrap-option"]]):r.push("white-space:"+e["wrap-option"])),"unicode-bidi"in e&&(e["unicode-bidi"]in $?r.push($[e["unicode-bidi"]]):r.push("unicode-bidi:"+e["unicode-bidi"])),"font-style"in e&&r.push("font-style:"+e["font-style"]+";"),"font-weight"in e&&r.push("font-weight:"+e["font-weight"]+";"),"direction"in e&&r.push("direction:"+e.direction+";"),"text-decoration"in e&&r.push("text-decoration:"+e["text-decoration"]+";"),n&&(r=r.concat(C(e,t))),K.tt.hasOwnProperty("xml:space")&&"preserve"===K.tt["xml:space"]&&r.push("white-space: pre;"),r}function A(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r["xml:id"]===t||r.id===t)return r}return null}function M(e,t,n){var r=[],i=e.match(/\S+/g);return i.forEach(function(e){var i=A(H,e);if(i){var a=R(JSON.parse(JSON.stringify(i)),t,n);r=r.concat(a)}}),r}function b(e,t){var n=/([\d\.]+)(%|px)\s+([\d\.]+)(%|px)/;if("tts:extent"in e&&"tts:origin"in e){var r=n.exec(e["tts:extent"]),i=n.exec(e["tts:origin"]);if(null===r||null===i)return B("Bad extent or origin: "+e["tts:extent"]+" "+e["tts:origin"]),null;var a=parseFloat(r[1]),o=parseFloat(r[3]),s=parseFloat(i[1]),u=parseFloat(i[3]);if(t){var l=n.exec(t);if(null===l||"px"!==l[2]||"px"!==l[4])return B("Bad tt.extent: "+t),null;var f=parseFloat(l[1]),d=parseFloat(l[3]);"px"===r[2]&&(a=a/f*100),"px"===r[4]&&(o=o/d*100),"px"===i[2]&&(s=s/f*100),"px"===i[4]&&(u=u/d*100)}return{left:s,top:u,width:a,height:o}}return null}function C(e,t){var n=[];for(var r in e){var i=r.replace("tts:","");i=i.replace("xml:",""),i=_(i),e[i]=e[r],i!==r&&delete e[r]}if("extent"in e){var a=e.extent.split(/\s/);n.push("width: "+a[0]+";"),n.push("height: "+a[1]+";")}if("origin"in e){var o=e.origin.split(/\s/);n.push("left: "+o[0]+";"),n.push("top: "+o[1]+";")}if("display-align"in e&&n.push(ee[e["display-align"]]),"writing-mode"in e&&n.push(te[e["writing-mode"]]),"style"in e){var s=M(e.style,t,!0);n=n.concat(s)}return"padding"in e&&n.push("padding:"+e.padding+";"),"overflow"in e&&n.push("overflow:"+e.overflow+";"),"show-background"in e&&n.push("show-background:"+e["show-background"]+";"),"id"in e&&n.push("regionID:"+e.id+";"),n}function D(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r["xml:id"]===t||r.id===t)return r}return null}function O(e,t){var n=[],r=e.match(/\S+/g);return r.forEach(function(e){var r=D(q,e);if(r){var i=C(JSON.parse(JSON.stringify(r)),t);n=n.concat(i)}}),n}function P(){var e=[32,15];return K.tt.hasOwnProperty("ttp:cellResolution")?K.tt["ttp:cellResolution"].split(" ").map(parseFloat):e}function w(e,t){for(var n=T("padding-left",t),r=T("padding-right",t),i=n.concat(" "+r+" "),a="",o="",s="",u=Array.prototype.slice.call(e.children),l=e.getElementsByClassName("lineBreak")[0],f=u.indexOf(l),d=[];f!=-1;)d.push(f),f=u.indexOf(l,f+1);var c="</span>",g="<br>",p='<span class="spanPadding" style="-webkit-box-decoration-break: clone; box-decoration-break: clone; ';if(d.length)d.forEach(function(e,t){if(0===t){for(var n="",r=0;r<e;r++)a+=u[r].outerHTML,0===r&&(n=i.concat(u[r].style.cssText));a=p+n+'">'+a}for(var l="",f=e+1;f<u.length;f++)o+=u[f].outerHTML,f===u.length-1&&(l+=i.concat(u[f].style.cssText));o=p+l+'">'+o,a&&o&&t===d.length-1?s+=a+c+g+o+c:a&&o&&t!==d.length-1?s+=a+c+g+o+c+g:a&&!o?s+=a+c:!a&&o&&t===d.length-1?s+=o+c:!a&&o&&t!==d.length-1&&(s+=o+c+g)});else{for(var h="",v=0;v<u.length;v++)h+=u[v].style.cssText;s=p+i+h+'">'+e.innerHTML+c}return s}function N(e,t){var n=document.createElement("div");return e.forEach(function(e){if(!e.hasOwnProperty("metadata"))if(e.hasOwnProperty("span")){var r=e.span.__children,i=document.createElement("span");if(e.span.hasOwnProperty("style")){var a=M(e.span.style,t);i.className="spanPadding "+e.span.style,i.style.cssText=a.join(" ")}r.forEach(function(e){if(!r.hasOwnProperty("metadata"))if(e.hasOwnProperty("#text")){var t=document.createTextNode(e["#text"]);i.appendChild(t)}else if("br"in e){i.hasChildNodes()&&n.appendChild(i);var a=document.createElement("br");a.className="lineBreak",n.appendChild(a);var o=document.createElement("span");o.className=i.className,o.style.cssText=i.style.cssText,i=o}}),n.appendChild(i)}else if(e.hasOwnProperty("br")){var o=document.createElement("br");o.className="lineBreak",n.appendChild(o)}else if(e.hasOwnProperty("#text")){var s=document.createElement("span");s.textContent=e["#text"],n.appendChild(s)}}),n}function L(e,t,n){var r,i,a=[],o=e.region,s=t.region;return s&&(r=O(s,n)),o?(i=a.concat(O(o,n)),a=r?I(r,i):i):r&&(a=r),F(a,z),a}function x(e,t){var n,r,i,a=[],o=e.style,s=K.tt.body.style,u=K.tt.body.div.style,l="";return s&&(n=M(s,t),l="paragraph "+s),u&&(r=M(u,t),n?(r=I(n,r),l+=" "+u):l="paragraph "+u),o?(i=M(o,t),n&&r?(a=I(r,i),l+=" "+o):n?(a=I(n,i),l+=" "+o):r?(a=I(r,i),l+=" "+o):(a=i,l="paragraph "+o)):n&&!r?a=n:!n&&r&&(a=r),F(a,W),[a,l]}function F(e,t){for(var n in t)t.hasOwnProperty(n)&&(E(n,e)||e.push(n+":"+t[n]))}var U=this.context,B=(0,d["default"])(U).getInstance().log,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=0;return k={parse:f,setConfig:e},p(),k}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),s=r(o),u=n(35),l=r(u),f=n(4),d=r(f),c=3600,g=60;i.__dashjs_factory_name="TTMLParser",t["default"]=s["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){f=/(?:\r\n|\r|\n)/gm,d=/-->/,c=/(^[\s]+|[\s]+$)/g,g=/\s\b/g}function t(e){var t,i,o=[];e=e.split(f),t=e.length,i=-1;for(var u=0;u<t;u++){var l=e[u];if(l.length>0&&"WEBVTT"!==l&&l.match(d)){var g=r(l),p=g.cuePoints,h=g.styles,v=a(e,u+1),m=n(p[0].replace(c,"")),_=n(p[1].replace(c,""));!isNaN(m)&&!isNaN(_)&&m>=i&&_>m?""!==v?(i=m,o.push({start:m,end:_,data:v,styles:h})):s("Skipping cue due to empty/malformed cue text"):s("Skipping cue due to incorrect cue timing")}}return o}function n(e){var t=e.split(":"),n=t.length-1;return e=60*parseInt(t[n-1],10)+parseFloat(t[n]),2===n&&(e+=3600*parseInt(t[0],10)),e}function r(e){var t=e.split(d),n=t[1].split(g);return n.shift(),t[1]=n[0],n.shift(),{cuePoints:t,styles:i(n)}}function i(e){var t={};return e.forEach(function(e){if(e.split(/:/).length>1){var n=e.split(/:/)[1];n&&n.search(/%/)!=-1&&(n=parseInt(n.replace(/%/,""),10)),(e.match(/align/)||e.match(/A/))&&(t.align=n),(e.match(/line/)||e.match(/L/))&&(t.line=n),(e.match(/position/)||e.match(/P/))&&(t.position=n),(e.match(/size/)||e.match(/S/))&&(t.size=n)}}),t}function a(e,t){for(var n,r=t,i="",a="";""!==e[r]&&r<e.length;)r++;if(n=r-t,n>1)for(var o=0;o<n;o++){if(a=e[t+o],a.match(d)){i="";break}i+=a,o!==n-1&&(i+="\n")}else a=e[t],a.match(d)||(i=a);return decodeURI(i)}var o=this.context,s=(0,u["default"])(o).getInstance().log,l=void 0,f=void 0,d=void 0,c=void 0,g=void 0;return l={parse:t},e(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(4),u=r(s);i.__dashjs_factory_name="VTTParser",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.qualityIndex=NaN};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}},u=n(23),l=r(u),f=function(e){function t(e){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.url=e||null,this.checkForExistenceOnly=!0}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.offset=NaN,this.type=null,this.size=NaN,this.isComplete=!0};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.DVRWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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=[],this.BolaState=[]};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0,this.isFirst=!0};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.video=null,this.captionData=null,this.label=null,this.lang=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.quality=null,this.DVRWindow=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this._s=void 0};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.t=null,this.level=null};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";
38
- function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),o=r(a),s=function u(){i(this,u),this.target=null,this.state=o["default"].BUFFER_EMPTY};t["default"]=s,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.time=null,this.range=null,this.manifestInfo=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.time=null,this.droppedFrames=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function o(){n(this,o),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.trackInfo=[]},i=function s(){n(this,s),this.id=null,this.index=null,this.start=null,this.duration=null},a=function u(){n(this,u),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null};t.ManifestUpdate=r,t.ManifestUpdateStreamInfo=i,t.ManifestUpdateTrackInfo=a},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.t=null,this.mt=null,this.to=null,this.lto=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.loadingRequests=[],this.executedRequests=[]};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.tcpid=null,this.dest=null,this.topen=null,this.tclose=null,this.tconnect=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";var n=t.decimalAdjust=function(e,t,n){return"undefined"==typeof n||0===+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!=typeof n||n%1!==0?NaN:(t=t.toString().split("e"),t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+n:n))))};e.exports={round10:function(e,t){return n("round",e,t)},floor10:function(e,t){return n("floor",e,t)},ceil10:function(e,t){return n("ceil",e,t)}},e.exports.polyfill=function(){Math.round10||(Math.round10=e.exports.round10),Math.floor10||(Math.floor10=e.exports.floor10),Math.ceil10||(Math.ceil10=e.exports.ceil10)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){var r=n(72);r(flowplayer)}]);
39
- /*@
40
- @end
41
- @*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! v2.6.7-e2394a6, 2018-03-14T14:20:10Z */
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){var b,c,d;for(b=[],d=0,c=a.length;d<c;d+=1)a[d].isRoot?b.push("root"):b.push(a[d].name);var e=function(a,b){var c;if(null!==a&&null!==b)for(c in a)a.hasOwnProperty(c)&&(b.hasOwnProperty(c)||(b[c]=a[c]))},f=function(a,b,c){var d,f,g,h,i;if(null!==a&&0!==a.length)for(d=0,f=a.length;d<f;d+=1)g=a[d],b.hasOwnProperty(g.name)&&(c.hasOwnProperty(g.name)?g.merge&&(h=b[g.name],i=c[g.name],"object"==typeof h&&"object"==typeof i?e(h,i):null!=g.mergeFunction?c[g.name]=g.mergeFunction(h,i):c[g.name]=h+i):c[g.name]=b[g.name])},g=function a(b,c){var d,e,g,h,i,j,k,l=b;if(null!==l.children&&0!==l.children.length)for(d=0,e=l.children.length;d<e;d+=1)if(j=l.children[d],c.hasOwnProperty(j.name))if(j.isArray)for(i=c[j.name+"_asArray"],g=0,h=i.length;g<h;g+=1)k=i[g],f(l.properties,c,k),a(j,k);else k=c[j.name],f(l.properties,c,k),a(j,k)};return{run:function c(d){var e,f,h,i,j,k,l;if(null===d)return d;if("object"!=typeof d)return d;for(e=0,f=b.length;e<f;e+=1)"root"===b[e]&&(j=a[e],k=d,g(j,k));for(i in d)if(d.hasOwnProperty(i)&&"__children"!=i){if(-1!==(h=b.indexOf(i)))if(j=a[h],j.isArray)for(l=d[i+"_asArray"],e=0,f=l.length;e<f;e+=1)k=l[e],g(j,k);else k=d[i],g(j,k);c(d[i])}return d}}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=d,b.exports=c.default},{}],4:[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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):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},{}],5:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0});var e=a(6),f=a(116),g=d(f),h=a(147),i=d(h),j=a(93),k=d(j);dashjs.Protection=i.default,dashjs.MetricsReporting=g.default,dashjs.MediaPlayerFactory=k.default,c.default=dashjs,c.MediaPlayer=e.MediaPlayer,c.Protection=i.default,c.MetricsReporting=g.default,c.MediaPlayerFactory=k.default},{116:116,147:147,6:6,93:93}],6:[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(49),h=d(g),i=a(50),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:{})},{49:49,50:50,91:91}],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 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(10).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}},{10:10}],10:[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(7),X=a(15),Y=a(25);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:{})},{15:15,25:25,7:7}],11:[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(){}},{}],12:[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(24)})},{24:24}],13:[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}},{}],14:[function(a,b,c){"use strict";b.exports=function a(b,c){if(b===c)return!0;var d,e=Array.isArray(b),f=Array.isArray(c);if(e&&f){if(b.length!=c.length)return!1;for(d=0;d<b.length;d++)if(!a(b[d],c[d]))return!1;return!0}if(e!=f)return!1;if(b&&c&&"object"==typeof b&&"object"==typeof c){var g=Object.keys(b);if(g.length!==Object.keys(c).length)return!1;var h=b instanceof Date,i=c instanceof Date;if(h&&i)return b.getTime()==c.getTime();if(h!=i)return!1;var j=b instanceof RegExp,k=c instanceof RegExp;if(j&&k)return b.toString()==c.toString();if(j!=k)return!1;for(d=0;d<g.length;d++)if(!Object.prototype.hasOwnProperty.call(c,g[d]))return!1;for(d=0;d<g.length;d++)if(!a(b[g[d]],c[g[d]]))return!1;return!0}return!1}},{}],15:[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}},{}],16:[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(43):sax,"undefined"==typeof imscNames?a(20):imscNames,"undefined"==typeof imscStyles?a(21):imscStyles,"undefined"==typeof imscUtils?a(22):imscUtils)},{20:20,21:21,22:22,43:43}],17:[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(20):imscNames,"undefined"==typeof imscStyles?a(21):imscStyles)},{20:20,21:21}],18:[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(20):imscNames,"undefined"==typeof imscStyles?a(21):imscStyles)},{20:20,21:21}],19:[function(a,b,c){c.generateISD=a(18).generateISD,c.fromXML=a(16).fromXML,c.renderHTML=a(17).render},{16:16,17:17,18:18}],20:[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)},{}],21:[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(20):imscNames,"undefined"==typeof imscUtils?a(22):imscUtils)},{20:20,22:22}],22:[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)},{}],23:[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}},{}],24:[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 <feross@feross.org> <http://feross.org>
14
+ * @license MIT
15
+ */
16
+ b.exports=function(a){return null!=a&&(d(a)||e(a)||!!a._isBuffer)}},{}],25:[function(a,b,c){var d={}.toString;b.exports=Array.isArray||function(a){return"[object Array]"==d.call(a)}},{}],26:[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=c:b.exports=a.nextTick}).call(this,a(27))},{27:27}],27:[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}},{}],28:[function(a,b,c){b.exports=a(29)},{29:29}],29:[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(f,this)}function f(a){a.end()}var g=a(26),h=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b};b.exports=d;var i=a(12);i.inherits=a(23);var j=a(31),k=a(33);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(b,a)}},{12:12,23:23,26:26,31:31,33:33}],30:[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(32),f=a(12);f.inherits=a(23),f.inherits(d,e),d.prototype._transform=function(a,b,c){c(null,a)}},{12:12,23:23,32:32}],31:[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(29),b=b||{},this.objectMode=!!b.objectMode,c instanceof H&&(this.objectMode=this.objectMode||!!b.readableObjectMode);var d=b.highWaterMark,e=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:e,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(45).StringDecoder),this.decoder=new Q(b.encoding),this.encoding=b.encoding)}function i(b){if(H=H||a(29),!(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(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(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(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(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(26);b.exports=i;var H,I=a(25);i.ReadableState=h;var J=(a(13).EventEmitter,function(a,b){return a.listeners(b).length}),K=a(36),L=a(42).Buffer,M=d.Uint8Array||function(){},N=a(12);N.inherits=a(23);var O=a(8),P=void 0;P=O&&O.debuglog?O.debuglog("stream"):function(){};var Q,R=a(34),S=a(35);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(45).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(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(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._readableState,c=!1,d=this;a.on("end",function(){if(P("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(P("wrapped data"),b.decoder&&(e=b.decoder.write(e)),(!b.objectMode||null!==e&&void 0!==e)&&(b.objectMode||e&&e.length)){d.push(e)||(c=!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],d.emit.bind(d,T[f]));return d._read=function(b){P("wrapped _read",b),c&&(c=!1,a.resume())},d},i._fromList=z}).call(this,a(27),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{12:12,13:13,23:23,25:25,26:26,27:27,29:29,34:34,35:35,36:36,42:42,45:45,8:8}],32:[function(a,b,c){"use strict";function d(a){this.afterTransform=function(b,c){return e(a,b,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function e(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,null!==c&&void 0!==c&&a.push(c),e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length<f.highWaterMark)&&a._read(f.highWaterMark)}function f(a){if(!(this instanceof f))return new f(a);h.call(this,a),this._transformState=new d(this);var b=this;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.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(a,c){g(b,a,c)}):g(b)})}function g(a,b,c){if(b)return a.emit("error",b);null!==c&&void 0!==c&&a.push(c);var d=a._writableState,e=a._transformState;if(d.length)throw new Error("Calling transform done when ws.length != 0");if(e.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}b.exports=f;var h=a(29),i=a(12);i.inherits=a(23),i.inherits(f,h),f.prototype.push=function(a,b){return this._transformState.needTransform=!1,h.prototype.push.call(this,a,b)},f.prototype._transform=function(a,b,c){throw new Error("_transform() is not implemented")},f.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)}},f.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},f.prototype._destroy=function(a,b){var c=this;h.prototype._destroy.call(this,a,function(a){b(a),c.emit("close")})}},{12:12,23:23,29:29}],33:[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(29),b=b||{},this.objectMode=!!b.objectMode,c instanceof C&&(this.objectMode=this.objectMode||!!b.writableObjectMode);var d=b.highWaterMark,f=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:f,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 g=!1===b.decodeStrings;this.decodeStrings=!g,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(29),!(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(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(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(e,d),B(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)}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.writing)break}null===c&&(b.lastBufferedRequest=null)}b.bufferedRequestCount=0,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(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(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(26);b.exports=j;var C,D=!c.browser&&["v0.10","v0.9."].indexOf(c.version.slice(0,5))>-1?setImmediate:B;j.WritableState=i;var E=a(12);E.inherits=a(23);var F={deprecate:a(46)},G=a(36),H=a(42).Buffer,I=d.Uint8Array||function(){},J=a(35);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)||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=g(a)&&!d.objectMode;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(27),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{12:12,23:23,26:26,27:27,29:29,35:35,36:36,42:42,46:46}],34:[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(42).Buffer;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}()},{42:42}],35:[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;if(d||e)return void(b?b(a):!a||this._writableState&&this._writableState.errorEmitted||g(f,this,a));this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(a){!b&&a?(g(f,c,a),c._writableState&&(c._writableState.errorEmitted=!0)):b&&b(a)})}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(26);b.exports={destroy:d,undestroy:e}},{26:26}],36:[function(a,b,c){b.exports=a(13).EventEmitter},{13:13}],37:[function(a,b,c){b.exports=a(38).PassThrough},{38:38}],38:[function(a,b,c){c=b.exports=a(31),c.Stream=c,c.Readable=c,c.Writable=a(33),c.Duplex=a(29),c.Transform=a(32),c.PassThrough=a(30)},{29:29,30:30,31:31,32:32,33:33}],39:[function(a,b,c){b.exports=a(38).Transform},{38:38}],40:[function(a,b,c){b.exports=a(33)},{33:33}],41:[function(a,b,c){var d=c.decimalAdjust=function(a,b,c){return void 0===c||0==+c?Math[a](b):(b=+b,c=+c,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))))};b.exports={round10:function(a,b){return d("round",a,b)},floor10:function(a,b){return d("floor",a,b)},ceil10:function(a,b){return d("ceil",a,b)}},b.exports.polyfill=function(){Math.round10||(Math.round10=b.exports.round10),Math.floor10||(Math.floor10=b.exports.floor10),Math.ceil10||(Math.ceil10=b.exports.ceil10)}},{}],42:[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(10),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)}},{10:10}],43:[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){
17
+ 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(44).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(9).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(10).Buffer)},{10:10,44:44,9:9}],44:[function(a,b,c){function d(){e.call(this)}b.exports=d;var e=a(13).EventEmitter;a(23)(d,e),d.Readable=a(38),d.Writable=a(40),d.Duplex=a(28),d.Transform=a(39),d.PassThrough=a(37),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}},{13:13,23:23,28:28,37:37,38:38,39:39,40:40}],45:[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(42).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}},{42:42}],46:[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:{})},{}],47:[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(48),g=d(f),h=a(52),i=d(h),j=a(49),k=d(j);e.__dashjs_factory_name="Debug",c.default=k.default.getSingletonFactory(e),b.exports=c.default},{48:48,49:49,52:52}],48:[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(49),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},{49:49}],49:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=function(){function a(a,b,c,d){var e=n(d);!e[a]&&b&&(e[a]={instance:b,override:c})}function b(a,b){for(var c in q){var d=q[c];if(d.context===a&&d.name===b)return d.instance}return null}function c(a,b,c){for(var d in q){var e=q[d];if(e.context===a&&e.name===b)return void(q[d].instance=c)}q.push({name:b,context:a,instance:c})}function d(a,b,c){for(var d in c){if(c[d].name===a)return void(c[d].factory=b)}c.push({name:a,factory:b})}function e(a,b){for(var c in b){if(b[c].name===a)return b[c].factory}return null}function f(a,b,c){for(var d in c){if(c[d].name===a)return void(c[d].factory=b)}}function g(a,b){f(a,b,s)}function h(a){return e(a,s)}function i(a){var b=e(a.__dashjs_factory_name,s);return b||(b=function(b){return void 0===b&&(b={}),{create:function(){return m(a.__dashjs_factory_name,a.apply({context:b},arguments),b,arguments)}}},d(a.__dashjs_factory_name,b,s)),b}function j(a,b){f(a,b,r)}function k(a){return e(a,r)}function l(a){var c=e(a.__dashjs_factory_name,r);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=m(a.__dashjs_factory_name,a.apply({context:c},arguments),c,arguments),q.push({name:a.__dashjs_factory_name,context:c,instance:d})),d}}},d(a.__dashjs_factory_name,c,r)),c}function m(a,b,c,d){b.getClassName=function(){return a};var e=n(c),f=e[a];if(f){var g=f.instance;if(!f.override)return g.apply({context:c,factory:o},d);g=g.apply({context:c,factory:o,parent:b},d);for(var h in g)b.hasOwnProperty(h)&&(b[h]=g[h])}return b}function n(a){var b=void 0;return p.forEach(function(c){c===a&&(b=c)}),b||(p.push(a),b=a),b}var o=void 0,p=[],q=[],r=[],s=[];return o={extend:a,getSingletonInstance:b,setSingletonInstance:c,getSingletonFactory:l,getSingletonFactoryByName:k,updateSingletonFactory:j,getClassFactory:i,getClassFactoryByName:h,updateClassFactory:g}}();c.default=d,b.exports=c.default},{}],50:[function(a,b,c){"use strict";function d(){return e}Object.defineProperty(c,"__esModule",{value:!0}),c.getVersionString=d;var e="2.6.7"},{}],51:[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(53),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.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_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},{53:53}],52:[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).apply(this,arguments)}return f(b,a),b}(i.default),k=new j;c.default=k,b.exports=c.default},{51:51}],53:[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},{}],54:[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=b+" "+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){var b=[],c=O;if(a){t();var d=N.getMpd(a);c=N.getRegularPeriods(d)}for(var e=0;e<c.length;e++)b.push(n(c[e]));return b}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(100),g=d(f),h=a(218),i=d(h),j=a(216),k=d(j),l=a(219),m=d(l),n=a(215),o=d(n),p=a(81),q=d(p),r=a(49),s=d(r),t=a(2),u=d(t);e.__dashjs_factory_name="DashAdapter",c.default=s.default.getSingletonFactory(e),b.exports=c.default},{100:100,2:2,215:215,216:216,218:218,219:219,49:49,81:81}],55:[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=null,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(100),g=d(f),h=a(59),i=d(h),j=a(212),k=d(j),l=a(210),m=d(l),n=a(229),o=a(52),p=d(o),q=a(48),r=d(q),s=a(49),t=d(s),u=a(47),v=d(u),w=a(205),x=d(w),y=a(85),z=d(y),A=a(75),B=a(74),C=d(B),D=a(57),E=d(D),F=a(58),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},{100:100,205:205,210:210,212:212,229:229,47:47,48:48,49:49,52:52,57:57,58:58,59:59,74:74,75:75,85:85}],56:[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){return y(A.getValue().Period_asArray[b],a)}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?(0,k.round10)(b.level/1e3,-3):0}function i(a){return a?a.RequestsQueue:null}function l(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=l(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){
19
+ 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:l,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(229),g=a(49),h=d(g),i=a(101),j=d(i),k=a(41);e.__dashjs_factory_name="DashMetrics",c.default=h.default.getSingletonFactory(e),b.exports=c.default},{101:101,229:229,41:41,49:49}],57:[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(203),g=d(f),h=a(86),i=d(h),j=a(210),k=d(j),l=a(52),m=d(l),n=a(48),o=d(n),p=a(193),q=d(p),r=a(49),s=d(r),t=a(47),u=d(t),v=a(229),w=a(212),x=d(w),y=a(98),z=d(y);e.__dashjs_factory_name="SegmentBaseLoader",c.default=s.default.getSingletonFactory(e),b.exports=c.default},{193:193,203:203,210:210,212:212,229:229,47:47,48:48,49:49,52:52,86:86,98:98}],58:[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(52),g=d(f),h=a(48),i=d(h),j=a(197),k=d(j),l=a(49),m=d(l),n=a(47),o=d(n),p=a(203),q=d(p),r=a(86),s=d(r),t=a(229),u=a(212),v=d(u),w=a(98),x=d(w);e.__dashjs_factory_name="WebmSegmentBaseLoader",c.default=m.default.getSingletonFactory(e),b.exports=c.default},{197:197,203:203,212:212,229:229,47:47,48:48,49:49,52:52,86:86,98:98}],59:[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.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},{}],60:[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(100),g=d(f),h=a(59),i=d(h),j=a(210),k=d(j),l=a(48),m=d(l),n=a(52),o=d(n),p=a(49),q=d(p),r=a(85),s=d(r);e.__dashjs_factory_name="RepresentationController",c.default=q.default.getClassFactory(e),b.exports=c.default},{100:100,210:210,48:48,49:49,52:52,59:59,85:85}],61:[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&&na(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&&na(c)&&b.Period_asArray[c]?b.Period_asArray[c].AdaptationSet_asArray:null;return d&&na(a)?d[a]:null}function F(a,b,c){var d=b&&b.Period_asArray&&na(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)(ha).getInstance();if(g.areEqual(d[f],a))return f}return-1}function G(a,c,d){var e=a&&a.Period_asArray&&na(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){for(var f=ja.getCurrentTrackFor(c,d),g=la.getAllMediaInfoForType(d,c),h=0,i=e.length;h<i;h++)if(f&&ja.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=na(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,ma)}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&&na(a)?b.Representation_asArray[a]:null}function W(a){var b=[],c=void 0,d=void 0,e=void 0,f=void 0,g=void 0,h=void 0,j=void 0;if(a&&a.period&&na(a.period.index)){var m=a.period.mpd.manifest.Period_asArray[a.period.index];m&&m.AdaptationSet_asArray&&na(a.index)&&(f=B(m.AdaptationSet_asArray[a.index]))}if(f&&f.Representation_asArray)for(h=0;f&&h<f.Representation_asArray.length;h++)g=f.Representation_asArray[h],c=new k.default,c.index=h,c.adaptation=a,g.hasOwnProperty(i.default.ID)&&(c.id=g.id),g.hasOwnProperty(i.default.CODECS)&&(c.codecs=g.codecs),g.hasOwnProperty(i.default.CODEC_PRIVATE_DATA)&&(c.codecPrivateData=g.codecPrivateData),g.hasOwnProperty(i.default.BANDWITH)&&(c.bandwidth=g.bandwidth),g.hasOwnProperty(i.default.WIDTH)&&(c.width=g.width),g.hasOwnProperty(i.default.HEIGHT)&&(c.height=g.height),g.hasOwnProperty(i.default.SCAN_TYPE)&&(c.scanType=g.scanType),g.hasOwnProperty(i.default.MAX_PLAYOUT_RATE)&&(c.maxPlayoutRate=g.maxPlayoutRate),g.hasOwnProperty(i.default.SEGMENT_BASE)?(e=g.SegmentBase,c.segmentInfoType=i.default.SEGMENT_BASE):g.hasOwnProperty(i.default.SEGMENT_LIST)?(e=g.SegmentList,e.hasOwnProperty(i.default.SEGMENT_TIMELINE)?(c.segmentInfoType=i.default.SEGMENT_TIMELINE,j=e.SegmentTimeline.S_asArray[e.SegmentTimeline.S_asArray.length-1],(!j.hasOwnProperty("r")||j.r>=0)&&(c.useCalculatedLiveEdgeTime=!0)):(c.segmentInfoType=i.default.SEGMENT_LIST,c.useCalculatedLiveEdgeTime=!0)):g.hasOwnProperty(i.default.SEGMENT_TEMPLATE)?(e=g.SegmentTemplate,e.hasOwnProperty(i.default.SEGMENT_TIMELINE)?(c.segmentInfoType=i.default.SEGMENT_TIMELINE,j=e.SegmentTimeline.S_asArray[e.SegmentTimeline.S_asArray.length-1],(!j.hasOwnProperty("r")||j.r>=0)&&(c.useCalculatedLiveEdgeTime=!0)):c.segmentInfoType=i.default.SEGMENT_TEMPLATE,e.hasOwnProperty(i.default.INITIALIZATION_MINUS)&&(c.initialization=e.initialization.split("$Bandwidth$").join(g.bandwidth).split("$RepresentationID$").join(g.id))):c.segmentInfoType=i.default.BASE_URL,c.essentialProperties=U(g),e&&(e.hasOwnProperty(i.default.INITIALIZATION)?(d=e.Initialization,d.hasOwnProperty(i.default.SOURCE_URL)?c.initialization=d.sourceURL:d.hasOwnProperty(i.default.RANGE)&&(c.range=d.range)):g.hasOwnProperty(i.default.MIME_TYPE)&&l(g.mimeType)&&(c.range=0),e.hasOwnProperty(i.default.TIMESCALE)&&(c.timescale=e.timescale),e.hasOwnProperty(i.default.DURATION)&&(c.segmentDuration=e.duration/c.timescale),e.hasOwnProperty(i.default.MEDIA)&&(c.media=e.media),e.hasOwnProperty(i.default.START_NUMBER)&&(c.startNumber=e.startNumber),e.hasOwnProperty(i.default.INDEX_RANGE)&&(c.indexRange=e.indexRange),e.hasOwnProperty(i.default.PRESENTATION_TIME_OFFSET)&&(c.presentationTimeOffset=e.presentationTimeOffset/c.timescale)),c.MSETimeOffset=ka.calcMSETimeOffset(c),c.path=[a.period.index,a.index,h],b.push(c);return b}function X(a){var b=a&&na(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 Y(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=Z(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((_(f)-f.start).toFixed(5))),c)}function Z(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 $(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 _(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 @mediaPresentationDuratio on MPD or an explicit @duration on the last period.");c=Number.POSITIVE_INFINITY}return c}function aa(a){var b=a&&a.mpd&&a.mpd.manifest?a.mpd.manifest:null,c=b?b.Period_asArray:null,d=c&&a&&na(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 ba(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 ca(a,b){var c=void 0,d=void 0,e=void 0;return a&&a.Period_asArray&&b&&b.period&&na(b.period.index)&&(d=a.Period_asArray[b.period.index])&&d.AdaptationSet_asArray&&na(b.index)&&(e=d.AdaptationSet_asArray[b.index])&&(c=e.InbandEventStream_asArray),ba(c,null)}function da(a,b){var c=void 0,d=void 0,e=void 0,f=void 0
20
+ ;return a&&a.Period_asArray&&b&&b.adaptation&&b.adaptation.period&&na(b.adaptation.period.index)&&(d=a.Period_asArray[b.adaptation.period.index])&&d.AdaptationSet_asArray&&na(b.adaptation.index)&&(e=d.AdaptationSet_asArray[b.adaptation.index])&&e.Representation_asArray&&na(b.index)&&(f=e.Representation_asArray[b.index])&&(c=f.InbandEventStream_asArray),ba(c,b)}function ea(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 fa(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 ia.isRelative(f)&&(d=!0,a.baseUri&&(f=ia.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]),b.push(e),d}}),b}function ga(a){if(a&&a.hasOwnProperty(g.default.LOCATION))return a.Location=a.Location_asArray[0],a.Location}a=a||{};var ha=this.context,ia=(0,C.default)(ha).getInstance(),ja=a.mediaController,ka=a.timelineConverter,la=a.adapter,ma="urn:dvb:dash:profile:dvb-dash:2014",na=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:W,getAdaptationsForPeriod:X,getRegularPeriods:Y,getMpd:$,getEventsForPeriod:aa,getEventStreamForAdaptationSet:ca,getEventStreamForRepresentation:da,getUTCTimingSources:ea,getBaseURLsFromElement:fa,getRepresentationSortFunction:z,getLocation:ga}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(59),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(202),A=d(z),B=a(205),C=d(B),D=a(49),E=d(D);e.__dashjs_factory_name="DashManifestModel",c.default=E.default.getSingletonFactory(e),b.exports=c.default},{100:100,202:202,205:205,49:49,59:59,79:79,80:80,81:81,82:82,83:83,84:84,85:85,87:87}],62:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){n=[new q.default,new s.default,new u.default,new o.default],p=new m.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:n}),r=new k.default([new w.default,new y.default])}function c(){if(!j||!j.hasOwnProperty("manifestError"))throw new Error("Missing config parameter(s)")}function d(){return n}function e(){return r}function f(a){var b=void 0;c();try{var d=window.performance.now();if(!(b=p.xml_str2json(a)))throw new Error("parser error");var e=window.performance.now();r.run(b);var f=window.performance.now();h("Parsing complete: ( xml2json: "+(e-d).toPrecision(3)+"ms, objectiron: "+(f-e).toPrecision(3)+"ms, total: "+((f-d)/1e3).toPrecision(3)+"s)")}catch(g){return j.manifestError("parsing the manifest failed","parse",a,g),null}return b}a=a||{};var g=this.context,h=(0,i.default)(g).getInstance().log,j=a.errorHandler,l=void 0,n=void 0,p=void 0,r=void 0;return l={parse:f,getMatchers:d,getIron:e},b(),l}Object.defineProperty(c,"__esModule",{value:!0});var f=a(49),g=d(f),h=a(47),i=d(h),j=a(3),k=d(j),l=a(4),m=d(l),n=a(71),o=d(n),p=a(69),q=d(p),r=a(68),s=d(r),t=a(70),u=d(t),v=a(65),w=d(v),x=a(66),y=d(x);e.__dashjs_factory_name="DashParser",c.default=g.default.getClassFactory(e),b.exports=c.default},{3:3,4:4,47:47,49:49,65:65,66:66,68:68,69:69,70:70,71:71}],63:[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);var e=function(a){return a&&a.length&&a.charAt(0)===a.charAt(0).toUpperCase()};this._name=b,this._merge=void 0!==c?c:e(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},{}],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")}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(63),h=d(g),i=function(){function a(b,c,d,f,g){var i=this;e(this,a),this._name=b||"",this._properties=[],this._children=d||[],this._isRoot=f||!1,this._isArray=g||!0,Array.isArray(c)&&c.forEach(function(a){i._properties.push(new h.default(a))})}return f(a,[{key:"name",get:function(){return this._name}},{key:"isRoot",get:function(){return this._isRoot}},{key:"isArray",get:function(){return this._isArray}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),a}();c.default=i,b.exports=c.default},{63:63}],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=a(59),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},{59:59,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(59),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},{59:59,64:64}],67:[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},{}],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(67),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},{67:67}],69:[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(67),i=d(h),j=a(100),k=d(j),l=a(59),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},{100:100,59:59,67:67}],70:[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(67),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},{67:67}],71:[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(67),j=d(i),k=a(59),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},{59:59,67:67}],72:[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)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(49),g=d(f);e.__dashjs_factory_name="FragmentedTextBoxParser",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{49:49}],73:[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(49),g=d(f),h=a(75);e.__dashjs_factory_name="ListSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{49:49,75:75}],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(59),g=d(f),h=a(49),i=d(h),j=a(78),k=d(j),l=a(76),m=d(l),n=a(73),o=d(n);e.__dashjs_factory_name="SegmentsGetter";var p=i.default.getClassFactory(e);c.default=p,b.exports=c.default},{49:49,59:59,73:73,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(49),g=d(f),h=a(75);e.__dashjs_factory_name="TemplateSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{49:49,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;return d.start=Math.max(f-c.mpd.timeShiftBufferDepth,c.start),d.end=f>=g&&f-e<g?g-e:f-e,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(48),g=d(f),h=a(52),i=d(h),j=a(49),k=d(j);e.__dashjs_factory_name="TimelineConverter",c.default=k.default.getSingletonFactory(e),b.exports=c.default},{48:48,49:49,52:52}],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(49),g=d(f),h=a(75);e.__dashjs_factory_name="TimelineSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{49:49,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};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,
21
+ 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){"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(59),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}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},{59:59}],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})}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(){j.trigger(o.default.LOADING_PROGRESS,{request:a})},success:function(a){b(a)},error:function(a,c,d){b(void 0,new k.default(r,d,c))},abort:function(a,b){a&&0===b&&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(98),g=d(f),h=a(213),i=d(h),j=a(210),k=d(j),l=a(48),m=d(l),n=a(52),o=d(n),p=a(49),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},{210:210,213:213,48:48,49:49,52:52,98:98}],89:[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()):A.manifestError("manifest type unsupported","createParser"),b):a.indexOf("MPD")>-1?(0,z.default)(h).create({errorHandler:A}):b}function e(a){var b=new o.default(a,r.HTTPRequest.MPD_TYPE);u.load({request:b,success:function(b,c,e){var f=void 0,h=void 0;if(e.responseURL&&e.responseURL!==a?(h=l.parseBaseUrl(e.responseURL),f=e.responseURL):(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: "+a)});w.setMatchers(x.getMatchers()),w.setIron(x.getIron());var i=x.parse(b);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(100),g=d(f),h=a(115),i=d(h),j=a(98),k=d(j),l=a(205),m=d(l),n=a(220),o=d(n),p=a(210),q=d(p),r=a(229),s=a(48),t=d(s),u=a(52),v=d(u),w=a(49),x=d(w),y=a(62),z=d(y),A=a(47),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},{100:100,115:115,205:205,210:210,220:220,229:229,47:47,48:48,49:49,52:52,62:62,98:98}],90:[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))}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(){f(),isNaN(u)||(s("Refresh manifest in "+u+" seconds."),v=setTimeout(l,1e3*u))}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),t.trigger(i.default.MANIFEST_UPDATED,{manifest:a}),s("Manifest has been refreshed at "+b+"["+b.getTime()/1e3+"] "),w||h()}function l(){w&&!B.getScheduleWhilePaused()||x||j()}function n(a){a.error||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;return{initialize:b,setManifest:c,refreshManifest:j,setConfig:a,reset:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(48),g=d(f),h=a(52),i=d(h),j=a(49),k=d(j),l=a(47),m=d(l);e.__dashjs_factory_name="ManifestUpdater",c.default=k.default.getClassFactory(e),b.exports=c.default},{47:47,48:48,49:49,52:52}],91:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){Hc=!1,Jc=!1,Ic=!1,Kc=!0,Oc=null,Gc=null,Rc=null,W.default.extend(Y.default),Tc=(0,I.default)(Ac).getInstance(),_c=(0,O.default)(Ac).getInstance()}function b(a){a&&(a.capabilities&&(Vc=a.capabilities),a.streamController&&(Wc=a.streamController),a.playbackController&&(Xc=a.playbackController),a.mediaPlayerModel&&(Tc=a.mediaPlayerModel),a.abrController&&(Lc=a.abrController),a.mediaController&&(Nc=a.mediaController))}function c(a,b,c){if(Vc||(Vc=(0,w.default)(Ac).getInstance()),Uc=(0,u.default)(Ac).getInstance(),!Vc.supportsMediaSource())return void Uc.capabilityError("mediasource");Hc||(Hc=!0,Mc=(0,ha.default)(Ac).getInstance(),Lc||(Lc=(0,M.default)(Ac).getInstance()),Xc||(Xc=(0,m.default)(Ac).getInstance()),Nc||(Nc=(0,q.default)(Ac).getInstance()),Rc=(0,ba.default)(Ac).getInstance(),Zc=(0,da.default)(Ac).getInstance({mediaController:Nc,timelineConverter:Mc,adapter:Rc}),$c=(0,G.default)(Ac).getInstance(),Yc=(0,fa.default)(Ac).getInstance({manifestModel:$c,dashManifestModel:Zc}),Sc=(0,K.default)(Ac).getInstance(),ad=(0,C.default)(Ac).getInstance(),bd=(0,Q.default)(Ac).getInstance({mediaPlayerModel:Tc}),Rc.setConfig({dashManifestModel:Zc}),Sc.setConfig({adapter:Rc}),Za(),Ca(void 0===c||c),a&&Nb(a),b&&gc(b),Dc("[dash.js "+j()+"] MediaPlayer has been initialized"))}function d(){gc(null),Nb(null),Gc=null,Oc&&(Oc.reset(),Oc=null),Pc&&(Pc.reset(),Pc=null)}function e(){return!!Fc&&!!_c.getElement()}function f(a,b,c){Bc.on(a,b,c)}function h(a,b,c){Bc.off(a,b,c)}function j(){return(0,_.getVersionString)()}function l(){return Cc}function n(){if(_c.getElement()||Ic)return!1;if(!Fc)throw xc;tc()}function p(){if(!Jc)throw vc;(!Kc||t()&&Jc)&&Xc.play()}function r(){if(!Jc)throw vc;Xc.pause()}function t(){if(!Jc)throw vc;return Xc.isPaused()}function v(a){if(!Jc)throw vc;if("number"!=typeof a||isNaN(a))throw zc;var b=Xc.getIsDynamic()?R(a):a;Xc.seek(b)}function x(){if(!Jc)throw vc;return Xc.isSeeking()}function z(){if(!Jc)throw vc;return Xc.getIsDynamic()}function B(a){if(!_c.getElement())throw wc;Kb().playbackRate=a}function D(){if(!_c.getElement())throw wc;return Kb().playbackRate}function F(a){if(!_c.getElement())throw wc;Kb().muted=a}function H(){if(!_c.getElement())throw wc;return Kb().muted}function J(a){if(!_c.getElement())throw wc;Kb().volume=a}function L(){if(!_c.getElement())throw wc;return Kb().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=zb().getCurrentBufferLevel(Ab(a));return c||NaN}return Dc("Warning - getBufferLength requested for invalid type"),NaN}var c=b.map(function(a){return Sb(a).length>0?zb().getCurrentBufferLevel(Ab(a)):Number.MAX_VALUE}).reduce(function(a,b){return Math.min(a,b)});return c===Number.MAX_VALUE?NaN:c}function P(){var a=qc();return a?a.manifestInfo.DVRWindowSize:0}function R(a){var b=qc(),c=Xc.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(!Jc)throw vc;var b=Kb().currentTime;if(void 0!==a)b=Wc.getTimeRelativeToStreamId(b,a);else if(Xc.getIsDynamic()){var c=qc();b=null===c?0:V()-(c.range.end-c.time)}return b}function V(){if(!Jc)throw vc;var a=Kb().duration;if(Xc.getIsDynamic()){var b=qc(),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(!Jc)throw vc;return T()<0?NaN:rc(T())}function Z(){if(!Jc)throw vc;return rc(V())}function aa(a,b){Lc.setMaxAllowedBitrateFor(a,b)}function ca(a,b){Lc.setMinAllowedBitrateFor(a,b)}function ea(a){return Lc.getMaxAllowedBitrateFor(a)}function ga(a){return Lc.getMinAllowedBitrateFor(a)}function ja(a,b){Lc.setMaxAllowedRepresentationRatioFor(a,b)}function la(a){return Lc.getMaxAllowedRepresentationRatioFor(a)}function na(a){if(!Ic)throw uc;if(a===g.default.IMAGE){var b=sc();if(!b)return-1;var c=b.getThumbnailController();return c?c.getCurrentTrackIndex():-1}return Lc.getQualityFor(a,Wc.getActiveStreamInfo())}function oa(a,b){if(!Ic)throw uc;if(a===g.default.IMAGE){var c=sc();if(!c)return;var d=c.getThumbnailController();d&&d.setTrackByIndex(b)}Lc.setPlaybackQuality(a,Wc.getActiveStreamInfo(),b)}function pa(){Lc.setElementSize(),Lc.setWindowResizeEventCalled(!0)}function qa(){return Lc.getLimitBitrateByPortal()}function ra(a){Lc.setLimitBitrateByPortal(a)}function sa(){return Lc.getUsePixelRatioInLimitBitrateByPortal()}function ta(a){Lc.setUsePixelRatioInLimitBitrateByPortal(a)}function ua(a,b){Lc.setInitialBitrateFor(a,b)}function va(a){if(!Ic)throw uc;return Lc.getInitialBitrateFor(a)}function wa(a,b){Lc.setInitialRepresentationRatioFor(a,b)}function xa(a){return Lc.getInitialRepresentationRatioFor(a)}function ya(a){return Lc.getAutoSwitchBitrateFor(a)}function za(a,b){Lc.setAutoSwitchBitrateFor(a,b)}function Aa(){return Lc.getUseDeadTimeLatency()}function Ba(a){Lc.setUseDeadTimeLatency(a)}function Ca(a){Kc=a}function Da(){return Kc}function Ea(a){Tc.setLiveDelayFragmentCount(a)}function Fa(a){Tc.setLiveDelay(a)}function Ga(){return Tc.getLiveDelay()}function Ha(a){Tc.setUseSuggestedPresentationDelay(a)}function Ia(a,b){Tc.setLastBitrateCachingInfo(a,b)}function Ja(a,b){Tc.setLastMediaSettingsCachingInfo(a,b)}function Ka(a){Tc.setScheduleWhilePaused(a)}function La(){return Tc.getScheduleWhilePaused()}function Ma(a){Tc.setFastSwitchEnabled(a)}function Na(){return Tc.getFastSwitchEnabled()}function Oa(a){a===g.default.ABR_STRATEGY_DYNAMIC||a===g.default.ABR_STRATEGY_BOLA||a===g.default.ABR_STRATEGY_THROUGHPUT?Tc.setABRStrategy(a):Dc("Warning: Ignoring setABRStrategy("+a+") - unknown value.")}function Pa(){return Tc.getABRStrategy()}function Qa(a){Tc.setUseDefaultABRRules(a)}function Ra(a,b,c){Tc.addABRCustomRule(a,b,c)}function Sa(a){Tc.removeABRCustomRule(a)}function Ta(){Tc.removeAllABRCustomRule()}function Ua(a){a===g.default.MOVING_AVERAGE_SLIDING_WINDOW||a===g.default.MOVING_AVERAGE_EWMA?Tc.setMovingAverageMethod(a):Dc("Warning: Ignoring setMovingAverageMethod("+a+") - unknown value.")}function Va(){return Tc.getMovingAverageMethod()}function Wa(a,b){Xa(a,b);var c=new k.default;c.schemeIdUri=a,c.value=b,Tc.getUTCTimingSources().push(c)}function Xa(a,b){var c=Tc.getUTCTimingSources();c.forEach(function(d,e){d.schemeIdUri===a&&d.value===b&&c.splice(e,1)})}function Ya(){Tc.setUTCTimingSources([])}function Za(){Wa(I.default.DEFAULT_UTC_TIMING_SOURCE.scheme,I.default.DEFAULT_UTC_TIMING_SOURCE.value)}function $a(a){Tc.setUseManifestDateHeaderTimeSource(a)}function _a(a){Tc.setBufferToKeep(a)}function ab(a){Tc.setBufferAheadToKeep(a)}function bb(a){Tc.setBufferPruningInterval(a)}function cb(a){Tc.setStableBufferTime(a)}function db(){return Tc.getStableBufferTime()}function eb(a){Tc.setBufferTimeAtTopQuality(a)}function fb(){return Tc.getBufferTimeAtTopQuality()}function gb(a){Tc.setBufferTimeAtTopQualityLongForm(a)}function hb(){return Tc.getBufferTimeAtTopQualityLongForm()}function ib(a){Tc.setLongFormContentDurationThreshold(a)}function jb(a){Tc.setSegmentOverlapToleranceTime(a)}function kb(a,b){Tc.setCacheLoadThresholdForType(a,b)}function lb(a){Tc.setBandwidthSafetyFactor(a)}function mb(){return Tc.getBandwidthSafetyFactor()}function nb(a){var b=Lc.getThroughputHistory();return b?b.getAverageThroughput(a):0}function ob(a){Tc.setAbandonLoadTimeout(a)}function pb(a){Tc.setFragmentRetryAttempts(a)}function qb(a){Tc.setFragmentRetryInterval(a)}function rb(a){Tc.setManifestRetryAttempts(a)}function sb(a){Tc.setManifestRetryInterval(a)}function tb(a,b){Tc.setXHRWithCredentialsForType(a,b)}function ub(a){return Tc.getXHRWithCredentialsForType(a)}function vb(a){Tc.setJumpGaps(a)}function wb(){return Tc.getJumpGaps()}function xb(a){Tc.setSmallGapLimit(a)}function yb(){return Tc.getSmallGapLimit()}function zb(){return Yc}function Ab(a){return Sc.getReadOnlyMetricsFor(a)}function Bb(a){void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.setTextDefaultLanguage(a)}function Cb(){return void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.getTextDefaultLanguage()}function Db(a){void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.setTextDefaultEnabled(a)}function Eb(){return void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.getTextDefaultEnabled()}function Fb(a){void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.enableText(a)}function Gb(){return void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.isTextEnabled()}function Hb(a){if(!Jc)throw vc;void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.setTextTrack(a)}function Ib(){var a=NaN;return ad&&(a=ad.getCurrentTrackIdx()),a}function Jb(a){var b=(0,y.default)(Ac).getInstance();b.setConfig({videoModel:_c}),b.initialize(),b.displayCConTop(a)}function Kb(){if(!_c.getElement())throw wc;return _c.getElement()}function Lb(){return _c?_c.getVideoContainer():null}function Mb(a){if(!_c.getElement())throw wc;_c.setVideoContainer(a)}function Nb(a){if(!Hc)throw yc;a&&(_c.setElement(a),nc(),oc(),pc(),Wc&&Wc.switchToVideoElement()),Jc&&kc(),tc()}function Ob(){return _c?_c.getTTMLRenderingDiv():null}function Pb(a){if(!_c.getElement())throw wc;_c.setTTMLRenderingDiv(a)}function Qb(a){if(!Ic)throw uc;var b=sc();return b?b.getBitrateListFor(a):[]}function Rb(a){if(!Ic)throw uc;return Rc.getStreamsInfo(a)}function Sb(a){if(!Ic)throw uc;var b=Wc.getActiveStreamInfo();return b?Nc.getTracksFor(a,b):[]}function Tb(a,b,c){if(!Ic)throw uc;return c=c||Rc.getStreamsInfo(b)[0],c?Rc.getAllMediaInfoForType(c,a,b):[]}function Ub(a){if(!Ic)throw uc;var b=Wc.getActiveStreamInfo();return b?Nc.getCurrentTrackFor(a,b):null}function Vb(a,b){if(!Hc)throw yc;Nc.setInitialSettings(a,b)}function Wb(a){if(!Hc)throw yc;return Nc.getInitialSettings(a)}function Xb(a){if(!Ic)throw uc;Nc.setTrack(a)}function Yb(a){if(!Hc)throw yc;return Nc.getSwitchMode(a)}function Zb(a,b){if(!Hc)throw yc;Nc.setSwitchMode(a,b)}function $b(a){if(!Hc)throw yc;Nc.setSelectionModeForInitialTrack(a)}function _b(){if(!Hc)throw yc;return Nc.getSelectionModeForInitialTrack()}function ac(){return nc()}function bc(a){Oc=a}function cc(a){Gc=a,Wc&&Wc.setProtectionData(Gc)}function dc(a){if(a<0)return null;var b=Xc.getIsDynamic()?R(a):a,c=Wc.getStreamForTime(b);if(null===c)return null;var d=c.getThumbnailController(),e=c.getStreamInfo();if(!d||!e)return null;var f=Wc.getTimeRelativeToStreamId(b,c.getId());return d.get(f)}function ec(a,b){var c=mc(),d=this,e=function a(e){e.error?b(null,e.error):b(e.manifest),Bc.off(W.default.INTERNAL_MANIFEST_LOADED,a,d),c.reset()};Bc.on(W.default.INTERNAL_MANIFEST_LOADED,e,d);var f=(0,E.default)(Ac).getInstance();f.initialize(),c.load(f.parseURI(a))}function fc(){if(!Fc)throw xc;return Fc}function gc(a){if(!Hc)throw yc;if("string"==typeof a){var b=(0,E.default)(Ac).getInstance();b.initialize(),Fc=b.parseURI(a)}else Fc=a;(Ic||Jc)&&kc(),e()&&tc()}function hc(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 ic(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 jc(a,b,c){$.default.extend(a,b,c,Ac)}function kc(){Jc=!1,Ic=!1,Rc.reset(),Wc.reset(),Xc.reset(),Lc.reset(),Nc.reset(),ad.reset(),Oc&&(Oc.reset(),Oc=null,nc())}function lc(){var a=mc();Wc||(Wc=(0,o.default)(Ac).getInstance()),Nc.setConfig({errHandler:Uc,domStorage:bd}),Wc.setConfig({capabilities:Vc,manifestLoader:a,manifestModel:$c,dashManifestModel:Zc,mediaPlayerModel:Tc,protectionController:Oc,adapter:Rc,metricsModel:Sc,dashMetrics:Yc,errHandler:Uc,timelineConverter:Mc,videoModel:_c,playbackController:Xc,domStorage:bd,abrController:Lc,mediaController:Nc,textController:ad}),Xc.setConfig({streamController:Wc,metricsModel:Sc,dashMetrics:Yc,manifestModel:$c,mediaPlayerModel:Tc,dashManifestModel:Zc,adapter:Rc,videoModel:_c}),Lc.setConfig({streamController:Wc,domStorage:bd,mediaPlayerModel:Tc,metricsModel:Sc,dashMetrics:Yc,dashManifestModel:Zc,manifestModel:$c,videoModel:_c,adapter:Rc}),Lc.createAbrRulesCollection(),ad.setConfig({errHandler:Uc,manifestModel:$c,dashManifestModel:Zc,mediaController:Nc,streamController:Wc,videoModel:_c}),Wc.initialize(Kc,Gc)}function mc(){return(0,s.default)(Ac).create({errHandler:Uc,metricsModel:Sc,mediaPlayerModel:Tc,requestModifier:(0,A.default)(Ac).getInstance(),mssHandler:Qc})}function nc(){if(Oc)return Oc;var a=dashjs.Protection;if("function"==typeof a){var b=a(Ac).create();return W.default.extend(a.events),Y.default.extend(a.events,{publicOnly:!0}),Vc||(Vc=(0,w.default)(Ac).getInstance()),Oc=b.createProtectionSystem({log:Dc,errHandler:Uc,videoModel:_c,capabilities:Vc,eventBus:Bc,events:W.default,BASE64:ka.default,constants:g.default})}return null}function oc(){if(!Pc){var a=dashjs.MetricsReporting;if("function"==typeof a){var b=a(Ac).create();Pc=b.createMetricsReporting({log:Dc,eventBus:Bc,mediaElement:Kb(),dashManifestModel:Zc,metricsModel:Sc,events:W.default,constants:g.default,metricsConstants:i.default})}}}function pc(){if(!Qc){var a=dashjs.MssHandler;"function"==typeof a&&(Qc=a(Ac).create({eventBus:Bc,mediaPlayerModel:Tc,metricsModel:Sc,playbackController:Xc,protectionController:Oc,errHandler:Uc,events:W.default,constants:g.default,log:Dc,initSegmentType:ia.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:ka.default,ISOBoxer:ma.default}))}}function qc(){var a=Sc.getReadOnlyMetricsFor(g.default.VIDEO)||Sc.getReadOnlyMetricsFor(g.default.AUDIO);return Yc.getCurrentDVRInfo(a)}function rc(a){var b=qc(),c=void 0;return b?(c=b.manifestInfo.availableFrom.getTime()/1e3,a+(c+b.range.start)):0}function sc(){if(!Ic)throw uc;var a=Wc.getActiveStreamInfo();return a?Wc.getStreamById(a.id):null}function tc(){!Ic&&Fc&&(Ic=!0,Dc("Streaming Initialized"),lc(),"string"==typeof Fc?Wc.load(Fc):Wc.loadWithManifest(Fc)),!Jc&&e()&&(Jc=!0,Dc("Playback Initialized"))}var uc="You must first call initialize() and set a source before calling this method",vc="You must first call initialize() and set a valid source and view before calling this method",wc="You must first call attachView() to set the video element before calling this method",xc="You must first call attachSource() with a valid source before calling this method",yc="MediaPlayer not initialized!",zc="MediaPlayer Invalid Arguments!",Ac=this.context,Bc=(0,U.default)(Ac).getInstance(),Cc=(0,S.default)(Ac).getInstance(),Dc=Cc.log,Ec=void 0,Fc=void 0,Gc=void 0,Hc=void 0,Ic=void 0,Jc=void 0,Kc=void 0,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;return Ec={initialize:c,setConfig:b,on:f,off:h,extend:jc,attachView:Nb,attachSource:gc,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:sc,getDVRWindowSize:P,getDVRSeekOffset:R,convertToTimeCode:ic,formatUTC:hc,getVersion:j,getDebug:l,getBufferLength:N,getVideoContainer:Lb,getTTMLRenderingDiv:Ob,getVideoElement:Kb,getSource:fc,setLiveDelayFragmentCount:Ea,setLiveDelay:Fa,getLiveDelay:Ga,useSuggestedPresentationDelay:Ha,enableLastBitrateCaching:Ia,enableLastMediaSettingsCaching:Ja,setMaxAllowedBitrateFor:aa,getMaxAllowedBitrateFor:ea,setMinAllowedBitrateFor:ca,getMinAllowedBitrateFor:ga,setMaxAllowedRepresentationRatioFor:ja,getMaxAllowedRepresentationRatioFor:la,setAutoPlay:Ca,getAutoPlay:Da,setScheduleWhilePaused:Ka,getScheduleWhilePaused:La,getDashMetrics:zb,getMetricsFor:Ab,getQualityFor:na,setQualityFor:oa,updatePortalSize:pa,getLimitBitrateByPortal:qa,setLimitBitrateByPortal:ra,getUsePixelRatioInLimitBitrateByPortal:sa,setUsePixelRatioInLimitBitrateByPortal:ta,setTextDefaultLanguage:Bb,getTextDefaultLanguage:Cb,setTextDefaultEnabled:Db,getTextDefaultEnabled:Eb,enableText:Fb,isTextEnabled:Gb,setTextTrack:Hb,getBitrateInfoListFor:Qb,setInitialBitrateFor:ua,getInitialBitrateFor:va,setInitialRepresentationRatioFor:wa,getInitialRepresentationRatioFor:xa,getStreamsFromManifest:Rb,getTracksFor:Sb,getTracksForTypeFromManifest:Tb,getCurrentTrackFor:Ub,setInitialMediaSettingsFor:Vb,getInitialMediaSettingsFor:Wb,setCurrentTrack:Xb,getTrackSwitchModeFor:Yb,setTrackSwitchModeFor:Zb,setSelectionModeForInitialTrack:$b,getSelectionModeForInitialTrack:_b,setFastSwitchEnabled:Ma,getFastSwitchEnabled:Na,setMovingAverageMethod:Ua,getMovingAverageMethod:Va,getAutoSwitchQualityFor:ya,setAutoSwitchQualityFor:za,setABRStrategy:Oa,getABRStrategy:Pa,useDefaultABRRules:Qa,addABRCustomRule:Ra,removeABRCustomRule:Sa,removeAllABRCustomRule:Ta,setBandwidthSafetyFactor:lb,getBandwidthSafetyFactor:mb,getAverageThroughput:nb,setAbandonLoadTimeout:ob,retrieveManifest:ec,addUTCTimingSource:Wa,removeUTCTimingSource:Xa,clearDefaultUTCTimingSources:Ya,restoreDefaultUTCTimingSources:Za,setBufferToKeep:_a,setBufferAheadToKeep:ab,setBufferPruningInterval:bb,setStableBufferTime:cb,getStableBufferTime:db,setBufferTimeAtTopQuality:eb,getBufferTimeAtTopQuality:fb,setBufferTimeAtTopQualityLongForm:gb,getBufferTimeAtTopQualityLongForm:hb,setFragmentLoaderRetryAttempts:pb,setFragmentLoaderRetryInterval:qb,setManifestLoaderRetryAttempts:rb,setManifestLoaderRetryInterval:sb,setXHRWithCredentialsForType:tb,getXHRWithCredentialsForType:ub,setJumpGaps:vb,getJumpGaps:wb,setSmallGapLimit:xb,getSmallGapLimit:yb,setLongFormContentDurationThreshold:ib,setSegmentOverlapToleranceTime:jb,setCacheLoadThresholdForType:kb,getProtectionController:ac,attachProtectionController:bc,setProtectionData:cc,enableManifestDateHeaderTimeSource:$a,displayCaptionsOnTop:Jb,attachVideoContainer:Mb,attachTTMLRenderingDiv:Pb,getCurrentTextTrackIndex:Ib,getUseDeadTimeLatencyForAbr:Aa,setUseDeadTimeLatencyForAbr:Ba,getThumbnail:dc,reset:d},a(),Ec}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(101),i=d(h),j=a(87),k=d(j),l=a(111),m=d(l),n=a(113),o=d(n),p=a(109),q=d(p),r=a(89),s=d(r),t=a(198),u=d(t),v=a(194),w=d(v),x=a(189),y=d(x),z=a(203),A=d(z),B=a(187),C=d(B),D=a(144),E=d(D),F=a(141),G=d(F),H=a(142),I=d(H),J=a(143),K=d(J),L=a(103),M=d(L),N=a(145),O=d(N),P=a(196),Q=d(P),R=a(47),S=d(R),T=a(48),U=d(T),V=a(52),W=d(V),X=a(92),Y=d(X),Z=a(49),$=d(Z),_=a(50),aa=a(54),ba=d(aa),ca=a(61),da=d(ca),ea=a(56),fa=d(ea),ga=a(77),ha=d(ga),ia=a(229),ja=a(1),ka=d(ja),la=a(11),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,101:101,103:103,109:109,11:11,111:111,113:113,141:141,142:142,143:143,144:144,145:145,187:187,189:189,194:194,196:196,198:198,203:203,229:229,47:47,48:48,49:49,50:50,52:52,54:54,56:56,61:61,77:77,87:87,89:89,92:92}],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(53),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_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.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.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged"}return f(b,a),b}(i.default),k=new j;c.default=k,b.exports=c.default},{53:53}],93:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b,c){if(!a||"VIDEO"!==a.nodeName)return null;if(a._dashjs_player)return a._dashjs_player;var e=void 0,f=a.id||a.name||"video element";if(!(b=b||[].slice.call(a.querySelectorAll("source")).filter(function(a){return a.type==d})[0])&&a.src)b=document.createElement("source"),b.src=a.src;else if(!b&&!a.src)return null;return c=c||{},e=(0,i.default)(c).create(),e.initialize(a,b.src,a.autoplay),e.getDebug().log("Converted "+f+" to dash.js player and added content: "+b.src),a._dashjs_player=e,e}function b(b,e){var f=[];b=b||"[data-dashjs-player]",e=e||document;for(var g=e.querySelectorAll(b),h=0;h<g.length;h++){var i=a(g[h],null);f.push(i)}for(var j=e.querySelectorAll('source[type="'+d+'"]'),h=0;h<j.length;h++){var k=c(j[h]),i=a(k,null);f.push(i)}return f}function c(a){for(var b=!0;b;){var c=a;if(b=!1,"video"===c.nodeName.toLowerCase())return c;a=c.parentNode,b=!0}}var d="application/dash+xml";return{create:a,createAll:b}}function f(){window.removeEventListener("load",f),j.createAll()}function g(){window.dashjs&&(window.clearInterval(k),
22
+ j.createAll())}Object.defineProperty(c,"__esModule",{value:!0});var h=a(91),i=d(h),j=e(),k=void 0;!("undefined"!=typeof window&&window&&window.dashjs&&window.dashjs.skipAutoCreate)&&"undefined"!=typeof window&&window&&window.addEventListener&&("complete"===window.document.readyState?window.dashjs?j.createAll():k=window.setInterval(g,500):window.addEventListener("load",f)),c.default=j,b.exports=c.default},{91:91}],94:[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(47),g=d(f),h=a(49),i=d(h);e.__dashjs_factory_name="PreBufferSink";var j=i.default.getClassFactory(e);c.default=j,b.exports=c.default},{47:47,49:49}],95:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){function d(){v=!1;var c=b.codec;try{if(c.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))throw new Error("not really supported");u=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)(r).getInstance();u=d.getTextSourceBuffer()}}function e(){if(u){try{a.removeSourceBuffer(u)}catch(b){s("Failed to remove source buffer from media source.")}v=!1,u=null}w=[],x=null}function f(){return u}function h(){return u.buffered}function j(a){w.push(a),v||p(u,n.bind(this))}function l(b,c,d){var e=this;p(u,function(){try{b>=0&&c>b&&(d||"ended"!==a.readyState)&&u.remove(b,c),p(u,function(){t.trigger(m.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:b,to:c})})}catch(f){t.trigger(m.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:b,to:c,error:new i.default(f.code,f.message,null)})}})}function n(){var a=this;w.length>0&&function(){v=!0;var b=w[0];w.splice(0,1);var c=function(){w.length>0?n.call(this):(v=!1,x&&x({chunk:b}))};try{u.appendBuffer?u.appendBuffer(b.bytes):u.append(b.bytes,b),p(u,c.bind(a))}catch(d){s('SourceBuffer append failed "'+d+'"'),w.length>0?n():v=!1,x&&x({chunk:b,error:new i.default(d.code,d.message,null)})}}()}function o(){try{"open"===a.readyState?u.abort():u.setTextTrack&&"ended"===a.readyState&&u.abort()}catch(b){s('SourceBuffer append abort failed: "'+b+'"')}w=[]}function p(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 r=this.context,s=(0,g.default)(r).getInstance().log,t=(0,k.default)(r).getInstance(),u=void 0,v=void 0,w=[],x=c,y={getAllBufferRanges:h,getBuffer:f,append:j,remove:l,abort:o,reset:e};return d(),y}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(210),i=d(h),j=a(48),k=d(j),l=a(52),m=d(l),n=a(49),o=d(n),p=a(187),q=d(p);e.__dashjs_factory_name="SourceBufferSink";var r=o.default.getClassFactory(e);c.default=r,b.exports=c.default},{187:187,210:210,47:47,48:48,49:49,52:52}],96:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){h(),oa=(0,m.default)(S).create({mediaPlayerModel:X,metricsModel:ba,errHandler:_}),U.on(s.default.BUFFERING_COMPLETED,M,ga),U.on(s.default.DATA_UPDATE_COMPLETED,N,ga)}function c(a,b){ka=a,(na=b)&&(U.on(s.default.KEY_ERROR,B,ga),U.on(s.default.SERVER_CERTIFICATE_UPDATED,B,ga),U.on(s.default.LICENSE_REQUEST_COMPLETE,B,ga),U.on(s.default.KEY_SYSTEM_SELECTED,B,ga),U.on(s.default.KEY_SESSION_CREATED,B,ga))}function d(a){ia||(U.on(s.default.CURRENT_TRACK_CHANGED,E,ga),H(a),ia=!0),L()}function e(){for(var a=ha?ha.length:0,b=0;b<a;b++){ha[b].getFragmentModel().removeExecutedRequestsBeforeTime(n()+l()),ha[b].reset()}ha=[],ia=!1,ja=!1,U.off(s.default.CURRENT_TRACK_CHANGED,E,ga)}function f(a){for(var b=0;b<ha.length;)D(ha[b].getMediaInfo())?(ha[b].setMediaSource(a),b++):(ha[b].reset(),ha.splice(b,1));for(var b=0;b<ha.length;b++)ha[b].dischargePreBuffer();if(0===ha.length){var c="No streams to play.";_.manifestError(c,"nostreams",V.getValue()),T(c)}}function h(){e(),ka=null,la={},ma=!1}function j(){da&&da.pause(),oa&&(oa.reset(),oa=null),h(),T=null,U.off(s.default.DATA_UPDATE_COMPLETED,N,ga),U.off(s.default.BUFFERING_COMPLETED,M,ga),U.off(s.default.KEY_ERROR,B,ga),U.off(s.default.SERVER_CERTIFICATE_UPDATED,B,ga),U.off(s.default.LICENSE_REQUEST_COMPLETE,B,ga),U.off(s.default.KEY_SYSTEM_SELECTED,B,ga),U.off(s.default.KEY_SESSION_CREATED,B,ga)}function l(){return ka?ka.duration:NaN}function n(){return ka?ka.start:NaN}function p(){return ka?ka.id:NaN}function r(){return ka}function t(){return qa}function v(){return oa}function w(){return pa}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 pa?pa.getBitrateList():[];var b=K(a);return ca.getBitrateList(b)}function z(){qa&&qa.start()}function A(){qa&&qa.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===ka.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"),ra=a,Y.refreshManifest()):(b.updateMediaInfo(d),d.type!==g.default.FRAGMENTED_TEXT&&(ca.updateTopQualityIndex(d),b.switchTrackAsked()))}}}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:ga,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),ha[e.replaceIdx]=f):ha.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(ka,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.isMultiTrackSupportedByType(e.type)&&ea.addTrack(e,ka)}if(b!==g.default.EMBEDDED_TEXT&&0!==ea.getTracksFor(b,ka).length){if(b===g.default.IMAGE)return void(pa=(0,o.default)(S).create({dashManifestModel:W,adapter:Z,baseURLController:a.baseURLController,stream:ga}));ea.checkInitialMediaSettingsForType(b,ka),f=ea.getCurrentTrackFor(b,ka),F(f,d,c)}}function H(a){x();var b=void 0;if(qa||(qa=(0,k.default)(S).create(),qa.setConfig({manifestModel:V,manifestUpdater:Y,playbackController:da}),b=Z.getEventsFor(ka),qa.addInlineEvents(b)),ma=!0,I(g.default.VIDEO),I(g.default.AUDIO),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(),ja=!0,ma=!1,0===ha.length){var c="No streams to play.";_.manifestError(c,"nostreams",V.getValue()),T(c)}else J()}function I(a){var b=W.getAdaptationForType(V.getValue(),ka.index,a,ka);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=ha.length,b=!!la.audio||!!la.video,c=b?new Error(R,"Data update failed",null):null,d=0;d<a;d++)if(ha[d].isUpdating()||ma)return;if(ja){if(na)for(var d=0;d<a&&ha[d];d++)ha[d].getType()!==g.default.AUDIO&&ha[d].getType()!==g.default.VIDEO&&ha[d].getType()!==g.default.FRAGMENTED_TEXT||na.initializeForMedia(ha[d].getMediaInfo());U.trigger(s.default.STREAM_INITIALIZED,{streamInfo:ka,error:c})}}function K(a){for(var b=ha.length,c=null,d=0;d<b;d++)if(c=ha[d],c.getType()===a)return c.getMediaInfo();return null}function L(){for(var a=0,b=ha.length;a<b;a++)ha[a].createBuffer()}function M(a){if(a.streamInfo===ka){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:ka})}}function N(a){var b=a.sender.getStreamProcessor();b.getStreamInfo()===ka&&(la[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=ha.length,b=[],c=void 0,d=void 0,e=0;e<a;e++)d=ha[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."),ia=!1,ma=!0,ka=a,qa){var b=Z.getEventsFor(ka);qa.addInlineEvents(b)}I(g.default.VIDEO),I(g.default.AUDIO);for(var c=0,d=ha.length;c<d;c++){var e=ha[c],f=Z.getMediaInfoForType(ka,e.getType());ca.updateTopQualityIndex(f),e.updateMediaInfo(f)}if(ra){var f=ra.newMediaInfo;if("fragmentedText"!==f.type){var h=O(ra.oldMediaInfo);if(!h)return;h.switchTrackAsked(),ra=void 0}}ma=!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=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;return ga={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(),ga}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(97),i=d(h),j=a(107),k=d(j),l=a(108),m=d(l),n=a(190),o=d(n),p=a(48),q=d(p),r=a(52),s=d(r),t=a(47),u=d(t),v=a(49),w=d(v);e.__dashjs_factory_name="Stream",c.default=w.default.getClassFactory(e),b.exports=c.default},{100:100,107:107,108:108,190:190,47:47,48:48,49:49,52:52,97:97}],97:[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(100),g=d(f),h=a(201),i=d(h),j=a(106),k=d(j),l=a(186),m=d(l),n=a(112),o=d(n),p=a(60),q=d(p),r=a(49),s=d(r),t=a(55),u=d(t);e.__dashjs_factory_name="StreamProcessor",c.default=s.default.getClassFactory(e),b.exports=c.default},{100:100,106:106,112:112,186:186,201:201,49:49,55:55,60:60}],98:[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;n=[],o=[],p=[],a={},e(a,g.HTTPRequest.MPD_TYPE,k.default.DOWNLOAD_ERROR_ID_MANIFEST),e(a,g.HTTPRequest.XLINK_EXPANSION_TYPE,k.default.DOWNLOAD_ERROR_ID_XLINK),e(a,g.HTTPRequest.INIT_SEGMENT_TYPE,k.default.DOWNLOAD_ERROR_ID_INITIALIZATION),e(a,g.HTTPRequest.MEDIA_SEGMENT_TYPE,k.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,g.HTTPRequest.INDEX_SEGMENT_TYPE,k.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,g.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,k.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,g.HTTPRequest.OTHER_TYPE,k.default.DOWNLOAD_ERROR_ID_CONTENT),q=a}function c(a,b){var d=a.request,e=new XMLHttpRequest,f=[],k=!0,m=!0,r=new Date,s=r,t=0,u=function(a){m=!1,d.requestStartDate=r,d.requestEndDate=new Date,d.firstByteDate=d.firstByteDate||r,d.checkExistenceOnly||i.addHttpRequest(d.mediaType,null,d.type,d.url,e.responseURL||null,d.serviceLocation||null,d.range||null,d.requestStartDate,d.firstByteDate,d.requestEndDate,e.status,d.duration,e.getAllResponseHeaders(),a?f:null)},v=function(){-1!==n.indexOf(e)&&(n.splice(n.indexOf(e),1),m&&(u(!1),b>0?(b--,p.push(setTimeout(function(){c(a,b)},j.getRetryIntervalForType(d.type)))):(h.downloadError(q[d.type],d.url,d),a.error&&a.error(d,"error",e.statusText),a.complete&&a.complete(d,e.statusText))))},w=function(b){var c=new Date;k&&(k=!1,(!b.lengthComputable||b.lengthComputable&&b.total!==b.loaded)&&(d.firstByteDate=c)),b.lengthComputable&&(d.bytesLoaded=b.loaded,d.bytesTotal=b.total),f.push({s:s,d:c.getTime()-s.getTime(),b:[b.loaded?b.loaded-t:0]}),s=c,t=b.loaded,a.progress&&a.progress()},x=function(){e.status>=200&&e.status<=299&&(u(!0),a.success&&a.success(e.response,e.statusText,e),a.complete&&a.complete(d,e.statusText))},y=function(){a.abort&&a.abort(d,e.status)};if(!l||!i||!h)throw new Error("config object is not correct or missing");try{var z=l.modifyRequestURL(d.url),A=d.checkExistenceOnly?g.HTTPRequest.HEAD:g.HTTPRequest.GET;e.open(A,z,!0),d.responseType&&(e.responseType=d.responseType),d.range&&e.setRequestHeader("Range","bytes="+d.range),d.requestStartDate||(d.requestStartDate=r),e=l.modifyRequestHeader(e),e.withCredentials=j.getXHRWithCredentialsForType(d.type),e.onload=x,e.onloadend=v,e.onerror=v,e.onprogress=w,e.onabort=y;var B=(new Date).getTime();isNaN(d.delayLoadingTime)||B>=d.delayLoadingTime?(n.push(e),e.send()):function(){var a={xhr:e};o.push(a),a.delayTimeout=setTimeout(function(){if(-1!==o.indexOf(a)){o.splice(o.indexOf(a),1);try{r=new Date,s=r,n.push(a.xhr),a.xhr.send()}catch(b){a.xhr.onerror()}}},d.delayLoadingTime-B)}()}catch(C){e.onerror()}}function d(a){a.request&&c(a,j.getRetryAttemptsForType(a.request.type))}function f(){p.forEach(function(a){return clearTimeout(a)}),p=[],o.forEach(function(a){return clearTimeout(a.delayTimeout)}),o=[],n.forEach(function(a){a.onloadend=a.onerror=a.onprogress=void 0,a.abort()}),n=[]}a=a||{};var h=a.errHandler,i=a.metricsModel,j=a.mediaPlayerModel,l=a.requestModifier,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0;return m={load:d,abort:f},b(),m}Object.defineProperty(c,"__esModule",{value:!0});var g=a(229),h=a(49),i=d(h),j=a(198),k=d(j);f.__dashjs_factory_name="XHRLoader";var l=i.default.getClassFactory(f);c.default=l,b.exports=c.default},{198:198,229:229,49:49}],99:[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(210),g=d(f),h=a(98),i=d(h),j=a(229),k=a(220),l=d(k),m=a(48),n=d(m),o=a(52),p=d(o),q=a(49),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},{210:210,220:220,229:229,48:48,49:49,52:52,98:98}],100:[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},{}],101:[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},{}],102:[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.CLEARKEY_KEYSTEM_STRING="org.w3.clearkey",this.WIDEVINE_KEYSTEM_STRING="com.widevine.alpha",this.PLAYREADY_KEYSTEM_STRING="com.microsoft.playready"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],103:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){ua=ra.log.bind(ta),e()}function b(a,b){Ra[a]=(0,A.default)(qa).create(),Ca[a]=b,Da[a]=Da[a]||{},Da[a].state=J,Ua[a]=!1,sa.on(s.default.LOADING_PROGRESS,pa,this),a==i.default.VIDEO&&(sa.on(s.default.QUALITY_CHANGE_RENDERED,j,this),Sa=(0,C.default)(qa).create(),na()),sa.on(s.default.METRIC_ADDED,l,this),Ta=(0,E.default)(qa).create({mediaPlayerModel:Oa})}function c(a){delete Ca[a]}function d(){va=(0,g.default)(qa).create({metricsModel:Va,dashMetrics:Wa,mediaPlayerModel:Oa,adapter:Ma}),va.initialize()}function e(){xa={video:!0,audio:!0},ya={},za={},Aa={},Ba={},Da={},Ca={},Ra={},Ua={},Fa=!1,Xa=!0,Ga=!1,void 0===Ha&&(Ha=!1),Qa=void 0,Sa=void 0,Ta=void 0,clearTimeout(Ea),Ea=null}function f(){e(),sa.off(s.default.LOADING_PROGRESS,pa,this),sa.off(s.default.QUALITY_CHANGE_RENDERED,j,this),sa.off(s.default.METRIC_ADDED,l,this),va&&va.reset()}function h(a){a&&(a.streamController&&(wa=a.streamController),a.domStorage&&(Pa=a.domStorage),a.mediaPlayerModel&&(Oa=a.mediaPlayerModel),a.metricsModel&&(Va=a.metricsModel),a.dashMetrics&&(Wa=a.dashMetrics),a.dashManifestModel&&(La=a.dashManifestModel),a.adapter&&(Ma=a.adapter),a.manifestModel&&(Ka=a.manifestModel),a.videoModel&&(Na=a.videoModel))}function j(a){a.mediaType===i.default.VIDEO&&(Qa=a.oldQuality,Sa.push(Qa,Na.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||Ta.push(a.mediaType,a.value,Xa),a.metric!==k.default.BUFFER_LEVEL||a.mediaType!==i.default.AUDIO&&a.mediaType!==i.default.VIDEO||ca(a.mediaType,.001*a.value.level)}function n(a,b){var c=void 0;return ya[b]=ya[b]||{},ya[b].hasOwnProperty(a)||(ya[b][a]=0),c=ka(ya[b][a],a),c=la(c,a,ya[b][a]),c=oa(c,a)}function p(a){var b=Pa.getSavedBitrateSettings(a);if(!Aa.hasOwnProperty(a))if(Ba.hasOwnProperty(a)){var c=Ka.getValue(),d=La.getAdaptationForType(c,0,a).Representation;if(Array.isArray(d)){var e=Math.max(Math.round(d.length*Ba[a])-1,0);Aa[a]=d[e].bandwidth}else Aa[a]=0}else isNaN(b)?Aa[a]=a===i.default.VIDEO?K:L:Aa[a]=b;return Aa[a]}function r(a,b){Aa[a]=b}function t(a){return Ba.hasOwnProperty(a)?Ba[a]:null}function u(a,b){Ba[a]=b}function v(a){return Aa.hasOwnProperty("max")&&Aa.max.hasOwnProperty(a)?Aa.max[a]:NaN}function x(a){return Aa.hasOwnProperty("min")&&Aa.min.hasOwnProperty(a)?Aa.min[a]:NaN}function z(a,b){Aa.max=Aa.max||{},Aa.max[a]=b}function B(a,b){Aa.min=Aa.min||{},Aa.min[a]=b}function D(a){var b=v(a);return b?aa(Ca[a].getMediaInfo(),b):void 0}function G(a){var b=x(a);if(b){var c=ba(Ca[a].getMediaInfo()),d=aa(Ca[a].getMediaInfo(),b);return c[d]&&d<c.length-1&&c[d].bitrate<1e3*b&&d++,d}}function N(a){return Ba.hasOwnProperty("max")&&Ba.max.hasOwnProperty(a)?Ba.max[a]:1}function O(a,b){Ba.max=Ba.max||{},Ba.max[a]=b}function P(a){return xa[a]}function Q(a,b){xa[a]=b}function R(){return Fa}function S(a){Fa=a}function T(){return Ga}function U(a){Ga=a}function V(){return Xa}function W(a){Xa=a}function X(a){if(a&&Ca&&Ca[a]){var b=Ca[a].getStreamInfo(),c=b?b.id:null,d=ha(a),e=(0,w.default)(qa).create({abrController:ta,streamProcessor:Ca[a],currentValue:d,switchHistory:Ra[a],droppedFramesHistory:Sa,useBufferOccupancyABR:da(a)});if(Sa){var f=Na.getPlaybackQuality();f&&Sa.push(Qa,f)}if(P(a)){var g=G(a),h=n(a,c),i=va.getMaxQuality(e),j=i.quality;if(void 0!==g&&j<g&&(j=g),j>h&&(j=h),Ra[a].push({oldValue:d,newValue:j}),j>y.default.NO_CHANGE&&j!=d)(Da[a].state===J||j>d)&&Z(a,d,j,h,i.reason);else if(ra.getLogToBrowserConsole()){var k=Wa.getCurrentBufferLevel(Va.getReadOnlyMetricsFor(a));ua("AbrController ("+a+") stay on "+d+"/"+h+" (buffer: "+k+")")}}}}function Y(a,b,c,d){var e=b.id,f=ha(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&&Z(a,f,c,g,d)}function Z(a,b,c,d,e){if(a&&Ca[a]){var f=Ca[a].getStreamInfo(),g=f?f.id:null;if(ra.getLogToBrowserConsole()){var h=Wa.getCurrentBufferLevel(Va.getReadOnlyMetricsFor(a));ua("AbrController ("+a+") switch from "+b+" to "+c+"/"+d+" (buffer: "+h+") "+(e?JSON.stringify(e):"."))}ia(a,g,c),sa.trigger(s.default.QUALITY_CHANGE_REQUESTED,{mediaType:a,streamInfo:f,oldQuality:b,newQuality:c,reason:e})}}function $(a,b){Da[a].state=b}function _(a){return Da[a]?Da[a].state:null}function aa(a,b,c){if(Xa&&c&&Ca[a.type].getCurrentRepresentationInfo()&&Ca[a.type].getCurrentRepresentationInfo().fragmentDuration){c/=1e3;var d=Ca[a.type].getCurrentRepresentationInfo().fragmentDuration;if(c>d)return 0;b*=1-c/d}var e=ba(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 ba(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 ca(a,b){var c=Oa.getABRStrategy();if(c===i.default.ABR_STRATEGY_BOLA)return void(Ua[a]=!0);if(c===i.default.ABR_STRATEGY_THROUGHPUT)return void(Ua[a]=!1);var d=Oa.getStableBufferTime(),e=d,f=.5*d,g=Ua[a],h=b>(g?f:e);Ua[a]=h,h!==g&&ua(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 da(a){return Ua[a]}function ea(){return Ta}function fa(a){var b=a.type,c=a.streamInfo.id,d=a.representationCount-1;return ja(b,c,d),d}function ga(a){var b=a.id,c=ha(i.default.AUDIO),d=ha(i.default.VIDEO);return c===n(i.default.AUDIO,b)&&d===n(i.default.VIDEO,b)}function ha(a){if(a&&Ca[a]){var b=Ca[a].getStreamInfo(),c=b?b.id:null;if(c)return za[c]=za[c]||{},za[c].hasOwnProperty(a)||(za[c][a]=M),za[c][a]}return M}function ia(a,b,c){za[b]=za[b]||{},za[b][a]=c}function ja(a,b,c){ya[b]=ya[b]||{},ya[b][a]=c}function ka(a,b){var c=a;if(!Ca[b])return c;var d=G(b);void 0!==d&&(c=Math.max(a,d));var e=D(b);return void 0!==e&&(c=Math.min(c,e)),c}function la(a,b,c){var d=N(b);return isNaN(d)||d>=1||d<0?a:Math.min(a,Math.round(c*d))}function ma(a){Ha=a}function na(){if(Na){var a=Ga&&window.hasOwnProperty("devicePixelRatio"),b=a?window.devicePixelRatio:1;Ia=Na.getClientWidth()*b,Ja=Na.getClientHeight()*b}}function oa(a,b){if(b!==i.default.VIDEO||!Fa||!Ca[b])return a;Ha||na();var c=Ka.getValue(),d=La.getAdaptationForType(c,0,b).Representation,e=a;if(Ia>0&&Ja>0){for(;e>0&&d[e]&&Ia<d[e].width&&Ia-d[e-1].width<d[e].width-Ia;)e-=1;d.length-2>=e&&d[e].width===d[e+1].width&&(e=Math.min(a,e+1))}return e}function pa(a){var b=a.request.mediaType;if(P(b)){var c=Ca[b];if(!c)return;var d=(0,w.default)(qa).create({abrController:ta,streamProcessor:c,currentRequest:a.request,useBufferOccupancyABR:da(b)}),e=va.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),Ra[b].reset(),Ra[b].push({oldValue:ha(b,wa.getActiveStreamInfo()),newValue:e.quality,confidence:1,reason:e.reason}),Y(b,wa.getActiveStreamInfo(),e.quality,e.reason),clearTimeout(Ea),Ea=setTimeout(function(){$(b,J),Ea=null},Oa.getAbandonLoadTimeout()))}}}var qa=this.context,ra=(0,H.default)(qa).getInstance(),sa=(0,
23
+ q.default)(qa).getInstance(),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 ta={isPlayingAtTopQuality:ga,updateTopQualityIndex:fa,getThroughputHistory:ea,getBitrateList:ba,getQualityForBitrate:aa,getMaxAllowedBitrateFor:v,getMinAllowedBitrateFor:x,setMaxAllowedBitrateFor:z,setMinAllowedBitrateFor:B,getMaxAllowedIndexFor:D,getMinAllowedIndexFor:G,getMaxAllowedRepresentationRatioFor:N,setMaxAllowedRepresentationRatioFor:O,getInitialBitrateFor:p,setInitialBitrateFor:r,getInitialRepresentationRatioFor:t,setInitialRepresentationRatioFor:u,setAutoSwitchBitrateFor:Q,getAutoSwitchBitrateFor:P,getUseDeadTimeLatency:V,setUseDeadTimeLatency:W,setLimitBitrateByPortal:S,getLimitBitrateByPortal:R,getUsePixelRatioInLimitBitrateByPortal:T,setUsePixelRatioInLimitBitrateByPortal:U,getQualityFor:ha,getAbandonmentStateFor:_,setPlaybackQuality:Y,checkPlaybackQuality:X,getTopQualityIndexFor:n,setElementSize:na,setWindowResizeEventCalled:ma,createAbrRulesCollection:d,registerStreamType:b,unRegisterStreamType:c,setConfig:h,reset:f},a(),ta}Object.defineProperty(c,"__esModule",{value:!0});var f=a(175),g=d(f),h=a(100),i=d(h),j=a(101),k=d(j),l=a(209),m=d(l),n=a(140),o=d(n),p=a(48),q=d(p),r=a(52),s=d(r),t=a(49),u=d(t),v=a(171),w=d(v),x=a(172),y=d(x),z=a(173),A=d(z),B=a(170),C=d(B),D=a(174),E=d(D),F=a(229),G=a(47),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},{100:100,101:101,140:140,170:170,171:171,172:172,173:173,174:174,175:175,209:209,229:229,47:47,48:48,49:49,52:52}],104:[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):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(139),g=d(f),h=a(192),i=d(h),j=a(205),k=d(j),l=a(80),m=d(l),n=a(49),o=d(n),p=a(48),q=d(p),r=a(52),s=d(r);e.__dashjs_factory_name="BaseURLController",c.default=o.default.getSingletonFactory(e),b.exports=c.default},{139:139,192:192,205:205,48:48,49:49,52:52,80:80}],105:[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(49),g=d(f),h=a(48),i=d(h);e.__dashjs_factory_name="BlackListController",c.default=g.default.getClassFactory(e),b.exports=c.default},{48:48,49:49}],106:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){Ea=(0,A.default)(qa).getInstance().log.bind(Da),Sa=(0,C.default)(qa).getInstance(),oa()}function c(){return K}function d(a){ia(a),Fa=za.getQualityFor(Ba,Ca.getStreamInfo()),ra.on(u.default.DATA_UPDATE_COMPLETED,$,this),ra.on(u.default.INIT_FRAGMENT_LOADED,j,this),ra.on(u.default.MEDIA_FRAGMENT_LOADED,n,this),ra.on(u.default.QUALITY_CHANGE_REQUESTED,v,this),ra.on(u.default.STREAM_COMPLETED,_,this),ra.on(u.default.PLAYBACK_PROGRESS,L,this),ra.on(u.default.PLAYBACK_TIME_UPDATED,L,this),ra.on(u.default.PLAYBACK_RATE_CHANGED,ca,this),ra.on(u.default.PLAYBACK_SEEKING,x,this),ra.on(u.default.WALLCLOCK_TIME_UPDATED,ba,this),ra.on(u.default.CURRENT_TRACK_CHANGED,aa,this,s.default.EVENT_PRIORITY_HIGH),ra.on(u.default.SOURCEBUFFER_REMOVE_COMPLETED,Y,this)}function e(a){if(!Sa||!a||!Ca)return null;if(Ja)try{Ma=(0,k.default)(qa).create(Ja,a,t.bind(this)),"function"==typeof Ma.getBuffer().initialize&&Ma.getBuffer().initialize(Ba,Ca)}catch(b){Ea("Caught error on create SourceBuffer: "+b),ua.mediaSourceError("Error creating "+Ba+" source buffer.")}else Ma=(0,m.default)(qa).create(t.bind(this));Z(Ca.getRepresentationInfoForQuality(Fa).MSETimeOffset)}function f(){if(Ma&&Na&&"function"==typeof Na.discharge){var a=Na.getAllBufferRanges();if(a.length>0){for(var b="Beginning "+Ba+"PreBuffer discharge, adding buffer for:",c=0;c<a.length;c++)b+=" start: "+a.start(c)+", end: "+a.end(c)+";";Ea(b)}else Ea("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");for(var d=Na.discharge(),e=null,f=0;f<d.length;f++){var g=d[f],h=Sa.extract(g.streamId,g.representationId);h&&(e!==h&&(Ma.append(h),e=h),Ma.append(g))}Na.reset(),Na=null}}function h(){return!(!Ca||!va)&&Ca.getStreamInfo().id===va.getActiveStreamInfo().id}function j(a){a.fragmentModel===Ca.getFragmentModel()&&(Ea("Init fragment finished loading saving to",Ba+"'s init cache"),Sa.save(a.chunk),Ea("Append Init fragment",Ba," with representationId:",a.chunk.representationId," and quality:",a.chunk.quality),p(a.chunk))}function l(a,b,c){var d=Sa.extract(a,b);Wa=!0===c&&c,d?(Ea("Append Init fragment",Ba," with representationId:",d.representationId," and quality:",d.quality),p(d)):ra.trigger(u.default.INIT_REQUESTED,{sender:Da})}function n(a){if(a.fragmentModel===Ca.getFragmentModel()){var b=a.chunk,c=b.bytes,d=b.quality,e=Ca.getRepresentationInfoForQuality(d),f=xa.getEventsFor(e.mediaInfo,Ca),g=xa.getEventsFor(e,Ca);if(f&&f.length>0||g&&g.length>0){var h=Ca.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,quality:d,index:b.index})[0],j=T(c,h,f,g);Ca.getEventController().addInbandEvents(j)}if(Wa){Xa=b;var k=Ma&&Ma.getAllBufferRanges();k&&k.length>0&&Aa.getTimeToStreamEnd()>G&&(Ea("Clearing buffer because track changed - "+(k.end(k.length-1)+H)),W([{start:0,end:k.end(k.length-1)+H,force:!0}]))}else p(b)}}function p(a){Ma.append(a),a.mediaInfo.type===g.default.VIDEO&&ra.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++)Ea("Buffered Range for type:",Ba,":",a.start(b)," - ",a.end(b)," currentTime = ",Aa.getTime())}function t(a){if(a.error){if(a.error.code===J&&(Ia=.8*ma(),Ea("Quota exceeded for type: "+Ba+", Critical Buffer: "+Ia),Ia>0)){var b=Math.max(.2*Ia,1),c=Ia-b;ta.setBufferToKeep(parseFloat(b).toFixed(5)),ta.setBufferAheadToKeep(parseFloat(c).toFixed(5))}return void(a.error.code!==J&&na()||(Ea("Clearing playback buffer to overcome quota exceed situation for type: "+Ba),ra.trigger(u.default.QUOTA_EXCEEDED,{sender:Da,criticalBufferLevel:Ia}),y()))}(Pa=a.chunk)&&!isNaN(Pa.index)&&(Ka=Math.max(Pa.index,Ka),Q());var d=Ma.getAllBufferRanges();if(Pa.segmentType===D.HTTPRequest.MEDIA_SEGMENT_TYPE)r(d),L();else if(Wa){var e=Aa.getTime();Ea("[BufferController][",Ba,"] appendToBuffer seek target should be "+e),Ca.getScheduleController().setSeekTarget(e),xa.setIndexHandlerTime(Ca,e)}Ea("[BufferController][",Ba,"] onAppended chunk type = ",Pa.segmentType," and index = ",Pa.index),Pa&&ra.trigger(u.default.BYTES_APPENDED,{sender:Da,quality:Pa.quality,startTime:Pa.start,index:Pa.index,bufferedRanges:d})}function v(a){Fa!==a.newQuality&&Ba===a.mediaType&&Ca.getStreamInfo().id===a.streamInfo.id&&(Z(Ca.getRepresentationInfoForQuality(a.newQuality).MSETimeOffset),Fa=a.newQuality)}function x(){Ga&&(Ua=!0,Ga=!1,La=Number.POSITIVE_INFINITY),Ba!==g.default.FRAGMENTED_TEXT?y():L(),Ta=void 0}function y(){var a=z();a&&0!==a.length||L(),W(a)}function z(){var a=[],b=Ma.getAllBufferRanges();if(!b||0===b.length)return a;var c=Aa.getTime(),d=b.end(b.length-1)+H,e=Ca.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:c,threshold:I})[0];if(e){var f={start:0,end:e.startTime-G},g=Ca.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=Ca.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 Ea("getAllRangesWithSafetyFactor for",Ba,"- No request found in current time position, removing full buffer 0 -",d),a.push({start:0,end:d});return a}function B(){var a=Aa.getTime();if(Ta){var b=Ma.getAllBufferRanges();b&&b.length&&(a=Math.max(b.start(0),Ta))}return a}function L(){Wa||(O(),P())}function M(a,b){var c=Ma.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 N(a,b){var c=void 0;return c=M(a,b),null===c?0:c.end-a}function O(){Aa&&(Ha=N(B()||0),ra.trigger(u.default.BUFFER_LEVEL_UPDATED,{sender:Da,bufferLevel:Ha}),R())}function P(){h()&&(sa.addBufferState(Ba,Oa,Ca.getScheduleController().getBufferTarget()),sa.addBufferLevel(Ba,new Date,1e3*Ha))}function Q(){Ka>=La-1&&!Ga&&void 0===Ma.discharge&&(Ga=!0,Ea("[BufferController]["+Ba+"] checkIfBufferingCompleted trigger BUFFERING_COMPLETED"),ra.trigger(u.default.BUFFERING_COMPLETED,{sender:Da,streamInfo:Ca.getStreamInfo()}))}function R(){"audio"!==Ba&&"video"!==Ba||(Ua&&!Ga&&Aa&&Aa.getTimeToStreamEnd()-Ha<G&&(Ua=!1,Ga=!0,Ea("[BufferController]["+Ba+"] checkIfSufficientBuffer trigger BUFFERING_COMPLETED"),ra.trigger(u.default.BUFFERING_COMPLETED,{sender:Da,streamInfo:Ca.getStreamInfo()})),Ha<G&&!Ga?S(F):(Ga||Ha>=ta.getStableBufferTime())&&S(E))}function S(a){Oa===a||Ba===g.default.FRAGMENTED_TEXT&&ya.getAllTracksAreDisabled()||(Oa=a,P(),ra.trigger(u.default.BUFFER_LEVEL_STATE_CHANGED,{sender:Da,state:a,mediaType:Ba,streamInfo:Ca.getStreamInfo()}),ra.trigger(a===E?u.default.BUFFER_LOADED:u.default.BUFFER_EMPTY,{mediaType:Ba}),Ea(a===E?"Got enough buffer to start for "+Ba:"Waiting for more buffer before starting playback for "+Ba))}function T(a,b,c,d){for(var e=Math.max(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)(qa).getInstance().parse(a),l=k.getBoxes("emsg"),i=0,j=l.length;i<j;i++){var m=xa.getEvent(l[i],f,e);m&&g.push(m)}return g}function U(){Ma&&Ba!==g.default.FRAGMENTED_TEXT&&(Ga||W(V()))}function V(){var a=[],b=Ma.getAllBufferRanges();if(!b||0===b.length)return a;var c=Aa.getTime(),d={start:Math.max(0,c-ta.getBufferToKeep()),end:c+ta.getBufferAheadToKeep()},e=Ca.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)),Ea("getClearRanges for",Ba,"- Remove buffer out of ",d.start," - ",d.end),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 W(a){a&&Ma&&0!==a.length&&(Va.push.apply(Va,a),Ra||X())}function X(){if(0!==Va.length){var a=Va.shift();Ea("Removing",Ba,"buffer from:",a.start,"to",a.end),Ra=!0;var b=Aa.getTime();b<a.end&&(Ga=!1,Ka=0,Wa||(Ca.getScheduleController().setSeekTarget(b),xa.setIndexHandlerTime(Ca,b))),Ma.remove(a.start,a.end,a.force)}}function Y(a){if(Ma===a.buffer){Ea("[BufferController][",Ba,"] onRemoved buffer from:",a.from,"to",a.to);r(Ma.getAllBufferRanges()),0===Va.length&&(Ra=!1),Ra?X():(Wa?(Wa=!1,p(Xa)):(Ea("onRemoved : call updateBufferLevel"),O()),ra.trigger(u.default.BUFFER_CLEARED,{sender:Da,from:a.from,to:a.to,hasEnoughSpaceToAppend:na()}))}}function Z(a){var b=Ma&&Ma.getBuffer?Ma.getBuffer():null;b&&b.timestampOffset!==a&&!isNaN(a)&&(b.timestampOffset=a)}function $(a){a.sender.getStreamProcessor()!==Ca||a.error||Z(a.currentRepresentation.MSETimeOffset)}function _(a){a.fragmentModel===Ca.getFragmentModel()&&(La=a.request.index,Q())}function aa(a){var b=Ma&&Ma.getAllBufferRanges();b&&a.newMediaInfo.type===Ba&&a.newMediaInfo.streamInfo.id===Ca.getStreamInfo().id&&(Ea("[BufferController]["+Ba+"] track change asked"),wa.getSwitchMode(Ba)===q.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&b&&b.length>0&&Aa.getTimeToStreamEnd()>G&&(Ga=!1,La=Number.POSITIVE_INFINITY,Ca.getFragmentModel().abortRequests()))}function ba(){++Qa*(ta.getWallclockTimeUpdateInterval()/1e3)>=ta.getBufferPruningInterval()&&(Qa=0,U())}function ca(){R()}function da(){return Ba}function ea(){return Ca}function fa(a){Ta=a}function ga(){return Ma}function ha(){return Ha}function ia(a,b){Ja=a,Ma&&b&&"function"==typeof Ma.discharge&&(Na=Ma,e(b))}function ja(){return Ja}function ka(){return Ga}function la(){return Ra}function ma(){var a=Ma.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 na(){return ma()<Ia}function oa(a){Ia=Number.POSITIVE_INFINITY,Oa=F,Fa=o.default.QUALITY_DEFAULT,La=Number.POSITIVE_INFINITY,Ka=0,Pa=null,Ga=!1,Ra=!1,Ua=!1,Ha=0,Qa=0,Va=[],Ma&&(a||Ma.abort(),Ma.reset(),Ma=null),Wa=!1}function pa(a){ra.off(u.default.DATA_UPDATE_COMPLETED,$,this),ra.off(u.default.QUALITY_CHANGE_REQUESTED,v,this),ra.off(u.default.INIT_FRAGMENT_LOADED,j,this),ra.off(u.default.MEDIA_FRAGMENT_LOADED,n,this),ra.off(u.default.STREAM_COMPLETED,_,this),ra.off(u.default.CURRENT_TRACK_CHANGED,aa,this),ra.off(u.default.PLAYBACK_PROGRESS,L,this),ra.off(u.default.PLAYBACK_TIME_UPDATED,L,this),ra.off(u.default.PLAYBACK_RATE_CHANGED,ca,this),ra.off(u.default.PLAYBACK_SEEKING,x,this),ra.off(u.default.WALLCLOCK_TIME_UPDATED,ba,this),ra.off(u.default.SOURCEBUFFER_REMOVE_COMPLETED,Y,this),oa(a)}a=a||{};var qa=this.context,ra=(0,s.default)(qa).getInstance(),sa=a.metricsModel,ta=a.mediaPlayerModel,ua=a.errHandler,va=a.streamController,wa=a.mediaController,xa=a.adapter,ya=a.textController,za=a.abrController,Aa=a.playbackController,Ba=a.type,Ca=a.streamProcessor,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 Da={getBufferControllerType:c,initialize:d,createBuffer:e,dischargePreBuffer:f,getType:da,getStreamProcessor:ea,setSeekStartTime:fa,getBuffer:ga,getBufferLevel:ha,getRangeAt:M,setMediaSource:ia,getMediaSource:ja,getIsBufferingCompleted:ka,switchInitData:l,getIsPruningInProgress:la,reset:pa},b(),Da}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(140),i=d(h),j=a(95),k=d(j),l=a(94),m=d(l),n=a(103),o=d(n),p=a(109),q=d(p),r=a(48),s=d(r),t=a(52),u=d(t),v=a(193),w=d(v),x=a(49),y=d(x),z=a(47),A=d(z),B=a(199),C=d(B),D=a(229),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,103:103,109:109,140:140,193:193,199:199,229:229,47:47,48:48,49:49,52:52,94:94,95:95}],107:[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(49),g=d(f),h=a(47),i=d(h),j=a(48),k=d(j),l=a(52),m=d(l);e.__dashjs_factory_name="EventController",c.default=g.default.getClassFactory(e),b.exports=c.default},{47:47,48:48,49:49,52:52}],108:[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)}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),e()}function i(a,b,c){var d=new j.default;return d.streamId=c,d.mediaInfo=b.mediaInfo,d.segmentType=b.type,d.start=b.startTime,d.duration=b.duration,d.end=d.start+d.duration,d.bytes=a,d.index=b.index,d.quality=b.quality,d.representationId=b.representationId,d}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||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);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(100),g=d(f),h=a(229),i=a(211),j=d(i),k=a(140),l=d(k),m=a(88),n=d(m),o=a(203),p=d(o),q=a(48),r=d(q),s=a(52),t=d(s),u=a(49),v=d(u),w=a(47),x=d(w);e.__dashjs_factory_name="FragmentController",c.default=v.default.getClassFactory(e),b.exports=c.default},{100:100,140:140,203:203,211:211,229:229,47:47,48:48,49:49,52:52,88:88}],109:[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){var b=a?a.type:null,c=a?a.streamInfo.id:null,d=l(b);if(a&&w(b)){K[c]=K[c]||F();for(var f=K[c][b].list.length,g=0;g<f;g++)if(x(K[c][b].list[g],a))return;K[c][b].list.push(a),d&&B(d,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(100),g=d(f),h=a(52),i=d(h),j=a(48),k=d(j),l=a(49),m=d(l),n=a(47),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},{100:100,47:47,48:48,49:49,52:52}],110:[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(49),g=d(f);e.__dashjs_factory_name="MediaSourceController",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{49:49}],111:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){A()}function b(a){ra=a,$(),sa=ra.manifestInfo.isDynamic,ma=ra.start,ca.on(o.default.DATA_UPDATE_COMPLETED,I,this),ca.on(o.default.BYTES_APPENDED,Y,this),ca.on(o.default.BUFFER_LEVEL_STATE_CHANGED,Z,this),ca.on(o.default.PERIOD_SWITCH_STARTED,c,this),ua&&(ua=!1,e())}function c(a){!sa&&a.fromStreamInfo&&void 0!==oa[a.fromStreamInfo.id]&&(delete qa[a.fromStreamInfo.id],delete oa[a.fromStreamInfo.id])}function d(){var a=D(!0),b=sa?a-ra.start:0;return parseFloat((a+(ra.duration-b)-n()).toFixed(5))}function e(){ra&&ka&&ka.getElement()?ka.play():ua=!0}function f(){return ra&&ka?ka.isPaused():null}function h(){ra&&ka&&ka.pause()}function j(){return ra&&ka?ka.isSeeking():null}function l(a){ra&&ka&&(ca.trigger(o.default.PLAYBACK_SEEK_ASKED),ba("Requesting seek to time: "+a),ka.setCurrentTime(a))}function n(){return ra&&ka?ka.getTime():null}function p(){return ra&&ka?ka.getPlaybackRate():null}function q(){return ra&&ka?ka.getPlayedRanges():null}function r(){return ra&&ka?ka.getEnded():null}function u(){return sa}function v(){return ea}function w(a){ma=a}function x(){return ma}function y(a,b){var c=ia.getMpd(ha.getValue()),d=void 0,e=void 0;if(d=ta.getUseSuggestedPresentationDelay()&&c.hasOwnProperty(g.default.SUGGESTED_PRESENTATION_DELAY)?c.suggestedPresentationDelay:ta.getLiveDelay()?ta.getLiveDelay():isNaN(a)?2*ra.manifestInfo.minBufferTime:a*ta.getLiveDelayFragmentCount(),b>0){var f=Math.max(b-10,b/2);e=Math.min(d,f)}else e=d;return pa=e,e}function z(){return pa}function A(){la=0,ma=NaN,na=null,ua=!1,oa={},pa=0,qa={},ka&&(ca.off(o.default.DATA_UPDATE_COMPLETED,I,this),ca.off(o.default.BUFFER_LEVEL_STATE_CHANGED,Z,this),ca.off(o.default.BYTES_APPENDED,Y,this),ca.off(o.default.PERIOD_SWITCH_STARTED,c,this),G(),_()),ka=null,ra=null,sa=null}function B(a){a&&(a.streamController&&(ea=a.streamController),a.metricsModel&&(fa=a.metricsModel),a.dashMetrics&&(ga=a.dashMetrics),a.manifestModel&&(ha=a.manifestModel),a.dashManifestModel&&(ia=a.dashManifestModel),a.mediaPlayerModel&&(ta=a.mediaPlayerModel),a.adapter&&(ja=a.adapter),a.videoModel&&(ka=a.videoModel))}function C(){var a=(0,k.default)(aa).getInstance().getURIFragmentData(),b=void 0;if(a){b={};var c=parseInt(a.r,10);c>=0&&ra&&c<ra.manifestInfo.DVRWindowSize&&null===a.t&&(a.t=Math.floor(Date.now()/1e3)-ra.manifestInfo.DVRWindowSize+c),b.fragS=parseInt(a.s,10),b.fragT=parseInt(a.t,10)}return b}function D(a,b){var c=void 0,d=NaN,e=C();if(d=e?a?ra.start:isNaN(e.fragS)?e.fragT:e.fragS:0,sa)isNaN(d)||((c=d-ra.manifestInfo.availableFrom.getTime()/1e3)>ma||c<(isNaN(b)?NaN:b-ra.manifestInfo.DVRWindowSize))&&(c=null),c=c||ma;else if(!isNaN(d)&&d<Math.max(ra.manifestInfo.duration,ra.duration)&&d>=0)c=d;else{var f=oa[ra.id];c=void 0!==f?Math.max(void 0!==f.audio?f.audio:0,void 0!==f.video?f.video:0,ra.start):ra.start}return c}function E(a){var b=fa.getReadOnlyMetricsFor(g.default.VIDEO)||fa.getReadOnlyMetricsFor(g.default.AUDIO),c=ga.getCurrentDVRInfo(b),d=c?c.range:null,e=void 0;if(!d)return NaN;if(a>d.end)e=Math.max(d.end-2*ra.manifestInfo.minBufferTime,d.start);else{if(!(a+.25<d.start))return a;e=d.start}return e}function F(){if(null===na){var a=function(){W()};na=setInterval(a,ta.getWallclockTimeUpdateInterval())}}function G(){clearInterval(na),na=null}function H(){if(!f()&&sa&&0!==ka.getReadyState()){var a=n(),b=E(a);!isNaN(b)&&b!==a&&l(b)}}function I(a){if(!a.error){var b=ja.convertDataToRepresentationInfo(a.currentRepresentation),c=b.mediaInfo.streamInfo;ra.id===c.id&&(ra=c,H())}}function J(){ca.trigger(o.default.CAN_PLAY)}function K(){ba("Native video element event: play"),H(),F(),ca.trigger(o.default.PLAYBACK_STARTED,{startTime:n()})}function L(){ba("Native video element event: playing"),ca.trigger(o.default.PLAYBACK_PLAYING,{playingTime:n()})}function M(){ba("Native video element event: pause"),ca.trigger(o.default.PLAYBACK_PAUSED,{ended:r()})}function N(){var a=n();ba("Seeking to: "+a),F(),ca.trigger(o.default.PLAYBACK_SEEKING,{seekTime:a})}function O(){ba("Native video element event: seeked"),ca.trigger(o.default.PLAYBACK_SEEKED)}function P(){var a=n();la=a,ca.trigger(o.default.PLAYBACK_TIME_UPDATED,{timeToEnd:d(),time:a})}function Q(){var a=Date.now();(!va||a>va+t)&&(va=a,P())}function R(){ca.trigger(o.default.PLAYBACK_PROGRESS)}function S(){var a=p();ba("Native video element event: ratechange: ",a),ca.trigger(o.default.PLAYBACK_RATE_CHANGED,{playbackRate:a})}function T(){ba("Native video element event: loadedmetadata"),ca.trigger(o.default.PLAYBACK_METADATA_LOADED),F()}function U(){ba("Native video element event: ended"),h(),G(),ca.trigger(o.default.PLAYBACK_ENDED)}function V(a){var b=a.target||a.srcElement;ca.trigger(o.default.PLAYBACK_ERROR,{error:b.error})}function W(){ca.trigger(o.default.WALLCLOCK_TIME_UPDATED,{isDynamic:sa,time:new Date}),u()&&f()&&Q()}function X(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 Y(a){var b=void 0,c=void 0,d=a.bufferedRanges;if(d&&d.length&&(!oa[ra.id]||!0!==oa[ra.id].started)){var e=a.sender.getType();void 0===qa[ra.id]&&(qa[ra.id]=[]),qa[ra.id][e]=d,void 0===oa[ra.id]&&(oa[ra.id]=[],oa[ra.id].started=!1),void 0===oa[ra.id][e]&&(oa[ra.id][e]=Math.max(d.start(0),ra.start));var f=ea.isVideoTrackPresent(),g=ea.isAudioTrackPresent();c=D(!1),
24
+ g&&f?isNaN(oa[ra.id].audio)||isNaN(oa[ra.id].video)||(oa[ra.id].audio<oa[ra.id].video?(b=oa[ra.id].video>c?oa[ra.id].video:c,d=qa[ra.id].audio):(b=oa[ra.id].audio>c?oa[ra.id].audio:c,d=qa[ra.id].video),X(b,d)&&(j()||l(b),oa[ra.id].started=!0)):oa[ra.id][e]&&(b=oa[ra.id][e]>c?oa[ra.id][e]:c,j()||l(b),oa[ra.id].started=!0)}}function Z(a){a.streamInfo.id===ra.id&&ka.setStallState(a.mediaType,a.state===i.default.BUFFER_EMPTY)}function $(){ka.addEventListener("canplay",J),ka.addEventListener("play",K),ka.addEventListener("playing",L),ka.addEventListener("pause",M),ka.addEventListener("error",V),ka.addEventListener("seeking",N),ka.addEventListener("seeked",O),ka.addEventListener("timeupdate",P),ka.addEventListener("progress",R),ka.addEventListener("ratechange",S),ka.addEventListener("loadedmetadata",T),ka.addEventListener("ended",U)}function _(){ka.removeEventListener("canplay",J),ka.removeEventListener("play",K),ka.removeEventListener("playing",L),ka.removeEventListener("pause",M),ka.removeEventListener("error",V),ka.removeEventListener("seeking",N),ka.removeEventListener("seeked",O),ka.removeEventListener("timeupdate",P),ka.removeEventListener("progress",R),ka.removeEventListener("ratechange",S),ka.removeEventListener("loadedmetadata",T),ka.removeEventListener("ended",U)}var aa=this.context,ba=(0,s.default)(aa).getInstance().log,ca=(0,m.default)(aa).getInstance(),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;return da={initialize:b,setConfig:B,getStartTimeFromUriParameters:C,getStreamStartTime:D,getTimeToStreamEnd:d,getTime:n,getPlaybackRate:p,getPlayedRanges:q,getEnded:r,getIsDynamic:u,getStreamController:v,setLiveStartTime:w,getLiveStartTime:x,computeLiveDelay:y,getLiveDelay:z,play:e,isPaused:f,pause:h,isSeeking:j,seek:l,reset:A},a(),da}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(106),i=d(h),j=a(144),k=d(j),l=a(48),m=d(l),n=a(52),o=d(n),p=a(49),q=d(p),r=a(47),s=d(r),t=500;e.__dashjs_factory_name="PlaybackController",c.default=q.default.getSingletonFactory(e),b.exports=c.default},{100:100,106:106,144:144,47:47,48:48,49:49,52:52}],112:[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,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);c&&b.quality<va.quality&&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});ma.setLiveStartTime(e.startTime),Ea=ma.getStreamStartTime(!1,b),Ea>va.mediaInfo.streamInfo.start+va.mediaInfo.streamInfo.duration&&ma.seek(Ea);var f=ha.getCurrentManifestUpdate(fa.getMetricsFor(g.default.STREAM));fa.updateManifestUpdateInfo(f,{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()||(ta("[ScheduleController][onFragmentLoadingAbandoned] for "+pa+", request: "+a.request.url+" has to be downloaded again, origin is not seeking process"),x(a.request)),s(!1),o(0))}function K(a){a.sender.getStreamProcessor()===qa&&f()}function L(a){a.sender.getStreamProcessor()===qa&&(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,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(100),g=d(f),h=a(231),i=a(103),j=d(i),k=a(106),l=d(k),m=a(182),n=d(m),o=a(183),p=d(o),q=a(140),r=d(q),s=a(48),t=d(s),u=a(52),v=d(u),w=a(49),x=d(w),y=a(47),z=d(y),A=a(109),B=d(A);e.__dashjs_factory_name="ScheduleController",c.default=x.default.getClassFactory(e),b.exports=c.default},{100:100,103:103,106:106,109:109,140:140,182:182,183:183,231:231,47:47,48:48,49:49,52:52}],113:[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}),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(){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(b)[0],d=pa.getMediaInfoForType(c,g.default.VIDEO)||pa.getMediaInfoForType(c,g.default.AUDIO),e=void 0,f=void 0;d&&(e=pa.getDataForMedia(d),(f=oa.getRepresentationsForAdaptation(e)[0].useCalculatedLiveEdgeTime)&&(ha("SegmentTimeline detected using calculated Live Edge Time"),Oa.setUseManifestDateHeaderTimeSource(!1)));var h=oa.getUTCTimingSources(a.manifest),i=!oa.getIsDynamic(b)||f?h:h.concat(Oa.getUTCTimingSources()),j=Aa.isHTTPS(a.manifest.url);i.forEach(function(a){a.value.replace(/.*?:\/\//g,"")===s.default.DEFAULT_UTC_TIMING_SOURCE.value.replace(/.*?:\/\//g,"")&&(a.value=a.value.replace(j?new RegExp(/^(http:)?\/\//i):new RegExp(/^(https:)?\/\//i),j?"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(i,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(100),g=d(f),h=a(101),i=d(h),j=a(96),k=d(j),l=a(90),m=d(l),n=a(48),o=d(n),p=a(52),q=d(p),r=a(142),s=d(r),t=a(49),u=d(t),v=a(231),w=a(47),x=d(w),y=a(199),z=d(y),A=a(205),B=d(A),C=a(92),D=d(C),E=a(114),F=d(E),G=a(104),H=d(G),I=a(110),J=d(I);e.__dashjs_factory_name="StreamController",c.default=u.default.getSingletonFactory(e),b.exports=c.default},{100:100,101:101,104:104,110:110,114:114,142:142,199:199,205:205,231:231,47:47,48:48,49:49,52:52,90:90,92:92,96:96}],114:[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(100),g=d(f),h=a(210),i=d(h),j=a(229),k=a(48),l=d(k),m=a(52),n=d(m),o=a(49),p=d(o),q=a(47),r=d(q),s=a(205),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},{100:100,205:205,210:210,229:229,47:47,48:48,49:49,52:52}],115:[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(99),g=d(f),h=a(48),i=d(h),j=a(52),k=d(j),l=a(49),m=d(l),n=a(4),o=d(n),p=a(205),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},{205:205,4:4,48:48,49:49,52:52,99:99}],116:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){return e=(0,g.default)(d).getInstance({eventBus:a.eventBus,metricsModel:a.metricsModel,metricsConstants:a.metricsConstants,events:a.events}),(0,k.default)(d).create(a)}
25
+ function b(){return(0,o.default)(d).getInstance()}function c(){return(0,m.default)(d).getInstance()}var d=this.context,e=void 0;return{createMetricsReporting:a,getReportingFactory:b,getMetricsHandlerFactory:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(130),g=d(f),h=a(117),i=d(h),j=a(118),k=d(j),l=a(123),m=d(l),n=a(128),o=d(n);e.__dashjs_factory_name="MetricsReporting";var p=dashjs.FactoryMaker.getClassFactory(e);p.events=i.default,dashjs.FactoryMaker.updateClassFactory(e.__dashjs_factory_name,p),c.default=p,b.exports=c.default},{117:117,118:118,123:123,128:128,130:130}],117:[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(53),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",this.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer"}return f(b,a),b}(i.default),k=new j;c.default=k,b.exports=c.default},{53:53}],118:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(b){if(!b.error){var c=Object.keys(f);(0,i.default)(h).getInstance({dashManifestModel:a.dashManifestModel,constants:a.constants}).getMetrics(b.manifest).forEach(function(b){var d=JSON.stringify(b);if(f.hasOwnProperty(d))c.splice(d,1);else try{var e=(0,g.default)(h).create(a);e.initialize(b),f[d]=e}catch(b){}}),c.forEach(function(a){f[a].reset(),delete f[a]}),j.trigger(k.default.METRICS_INITIALISATION_COMPLETE)}}function c(){Object.keys(f).forEach(function(a){f[a].reset()}),f={}}function d(){j.on(l.MANIFEST_UPDATED,b),j.on(l.STREAM_TEARDOWN_COMPLETE,c)}function e(){j.off(l.MANIFEST_UPDATED,b),j.off(l.STREAM_TEARDOWN_COMPLETE,c)}a=a||{};var f={},h=this.context,j=a.eventBus,l=a.events;return d(),{reset:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(119),g=d(f),h=a(132),i=d(h),j=a(117),k=d(j);e.__dashjs_factory_name="MetricsCollectionController",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{117:117,119:119,132:132}],119:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(b){try{f=(0,g.default)(h).create({mediaElement:a.mediaElement}),f.initialize(b.Range),e=(0,i.default)(h).create({log:a.log,metricsConstants:a.metricsConstants}),e.initialize(b.Reporting,f),d=(0,k.default)(h).create({log:a.log,eventBus:a.eventBus,metricsConstants:a.metricsConstants,events:a.events}),d.initialize(b.metrics,e)}catch(j){throw c(),j}}function c(){d&&d.reset(),e&&e.reset(),f&&f.reset()}a=a||{};var d=void 0,e=void 0,f=void 0,h=this.context;return{initialize:b,reset:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(121),g=d(f),h=a(122),i=d(h),j=a(120),k=d(j);e.__dashjs_factory_name="MetricsController",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{120:120,121:121,122:122}],120:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){e.forEach(function(b){b.handleNewMetric(a.metric,a.value,a.mediaType)})}function c(a,c){a.split(",").forEach(function(a,b,d){var f=void 0;if(-1!==a.indexOf("(")&&-1===a.indexOf(")")){var g=d[b+1];g&&-1===g.indexOf("(")&&-1!==g.indexOf(")")&&(a+=","+g,delete d[b+1])}(f=k.create(a,c))&&e.push(f)}),i.on(j.METRIC_ADDED,b,f),i.on(j.METRIC_UPDATED,b,f)}function d(){i.off(j.METRIC_ADDED,b,f),i.off(j.METRIC_UPDATED,b,f),e.forEach(function(a){return a.reset()}),e=[]}a=a||{};var e=[],f=void 0,h=this.context,i=a.eventBus,j=a.events,k=(0,g.default)(h).getInstance({log:a.log,eventBus:a.eventBus,metricsConstants:a.metricsConstants});return f={initialize:c,reset:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(123),g=d(f);e.__dashjs_factory_name="MetricsHandlersController",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{123:123}],121:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){a&&a.length&&(a.forEach(function(a){var b=a.starttime,c=b+a.duration;j.add(b,c)}),f=!!a[0]._useWallClockTime)}function c(){j.clear()}function d(){j=(0,g.default)(h).create()}function e(){var a=j.length,b=void 0;if(!a)return!0;b=f?(new Date).getTime()/1e3:k.currentTime;for(var c=0;c<a;c+=1){var d=j.start(c),e=j.end(c);if(d<=b&&b<e)return!0}return!1}a=a||{};var f=!1,h=this.context,i=void 0,j=void 0,k=a.mediaElement;return i={initialize:b,reset:c,isEnabled:e},d(),i}Object.defineProperty(c,"__esModule",{value:!0});var f=a(195),g=d(f);e.__dashjs_factory_name="RangeController",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{195:195}],122:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b){a.some(function(a){var c=f.create(a,b);if(c)return e.push(c),!0})}function c(){e.forEach(function(a){return a.reset()}),e=[]}function d(a,b){e.forEach(function(c){return c.report(a,b)})}var e=[],f=(0,g.default)(this.context).getInstance(a);return{initialize:b,reset:c,report:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(128),g=d(f);e.__dashjs_factory_name="ReportingController",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{128:128}],123:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(b,c){var d,g=b.match(f);if(g){try{d=j[g[1]](h).create({eventBus:a.eventBus,metricsConstants:a.metricsConstants}),d.initialize(g[1],c,g[3],g[5])}catch(i){d=null,e("MetricsHandlerFactory: Could not create handler for type "+g[1]+" with args "+g[3]+", "+g[5]+" ("+i.message+")")}return d}}function c(a,b){j[a]=b}function d(a){delete j[a]}a=a||{};var e=a.log,f=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,h=this.context,j={BufferLevel:g.default,DVBErrors:i.default,HttpList:k.default,PlayList:m.default,RepSwitchList:m.default,TcpList:m.default};return{create:b,register:c,unregister:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(124),g=d(f),h=a(125),i=d(h),j=a(127),k=d(j),l=a(126),m=d(l);e.__dashjs_factory_name="MetricsHandlerFactory",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{124:124,125:125,126:126,127:127}],124:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){try{return Object.keys(o).map(function(a){return o[a]}).reduce(function(a,b){return a.level<b.level?a:b})}catch(a){return}}function c(){var a=b();a&&l!==a.t&&(l=a.t,h.report(j,a))}function d(a,b,d){b&&(i=n.validateN(d),h=b,j=n.reconstructFullMetricName(a,d),k=setInterval(c,i))}function e(){clearInterval(k),k=null,i=0,h=null,l=null}function f(a,b,c){a===p.BUFFER_LEVEL&&(o[c]=b)}a=a||{};var h=void 0,i=void 0,j=void 0,k=void 0,l=void 0,m=this.context,n=(0,g.default)(m).getInstance(),o=[],p=a.metricsConstants;return{initialize:d,reset:e,handleNewMetric:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(131),g=d(f);e.__dashjs_factory_name="BufferLevelHandler",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{131:131}],125:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){h.off(g.default.METRICS_INITIALISATION_COMPLETE,b,this),h.trigger(g.default.BECAME_REPORTING_PLAYER)}function c(a,c){c&&(f=c,h.on(g.default.METRICS_INITIALISATION_COMPLETE,b,this))}function d(){f=null}function e(a,b){a===i.DVB_ERRORS&&f&&f.report(a,b)}a=a||{};var f=void 0,h=a.eventBus,i=a.metricsConstants;return{initialize:c,reset:d,handleNewMetric:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(117),g=d(f);c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{117:117}],126:[function(a,b,c){"use strict";function d(){function a(a,b){d=a,e=b}function b(){e=null,d=void 0}function c(a,b){a===d&&e&&e.report(d,b)}var d=void 0,e=void 0;return{initialize:a,reset:b,handleNewMetric:c}}Object.defineProperty(c,"__esModule",{value:!0}),d.__dashjs_factory_name="GenericMetricHandler",c.default=dashjs.FactoryMaker.getClassFactory(d),b.exports=c.default},{}],127:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){var a=l;a.length&&f&&f.report(j,a),l=[]}function c(a,c,d,e){c&&(h=m.validateN(d),f=c,e&&e.length&&(i=e),j=m.reconstructFullMetricName(a,d,e),k=setInterval(b,h))}function d(){clearInterval(k),k=null,h=null,i=null,l=[],f=null}function e(a,b){a===n.HTTP_REQUEST&&(i&&i!==b.type||l.push(b))}a=a||{};var f=void 0,h=void 0,i=void 0,j=void 0,k=void 0,l=[],m=(0,g.default)(this.context).getInstance(),n=a.metricsConstants;return{initialize:c,reset:d,handleNewMetric:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(131),g=d(f);e.__dashjs_factory_name="HttpListHandler",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{131:131}],128:[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;try{c=e[a.schemeIdUri](f).create({metricsConstants:i}),c.initialize(a,b)}catch(d){c=null,h("ReportingFactory: could not create Reporting with schemeIdUri "+a.schemeIdUri+" ("+d.message+")")}return c}function c(a,b){e[a]=b}function d(a){delete e[a]}a=a||{};var e={"urn:dvb:dash:reporting:2014":g.default},f=this.context,h=a.log,i=a.metricsConstants;return{create:b,register:c,unregister:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(129),g=d(f);e.__dashjs_factory_name="ReportingFactory",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{129:129}],129:[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 d=new XMLHttpRequest,e=function(){var a=q.indexOf(d);-1!==a&&(q.splice(a,1),d.status>=200&&d.status<300?b&&b():c&&c())};q.push(d);try{d.open("GET",a),d.onloadend=e,d.onerror=e,d.send()}catch(f){d.onerror()}}function c(a,c){Array.isArray(c)||(c=[c]),l&&o.isEnabled()&&c.forEach(function(c){var d=h.serialise(c);k&&a!==r.DVB_ERRORS&&(d="metricname="+a+"&"+d),d=n+"?"+d,b(d,null,function(){l=!1})})}function d(a,b){var c=void 0;if(o=b,!(n=a["dvb:reportingUrl"]))throw new Error("required parameter missing (dvb:reportingUrl)");m||(c=a["dvb:probability"]||a["dvb:priority"]||0,c&&(1e3===c||c/1e3>=j.random())&&(l=!0),m=!0)}function e(){p||(q.forEach(function(a){return a.abort()}),q=[]),m=!1,l=!1,n=null,o=null}a=a||{};var f=this.context,h=(0,g.default)(f).getInstance(),j=(0,i.default)(f).getInstance(),k=!0,l=!1,m=!1,n=null,o=null,p=!0,q=[],r=a.metricsConstants;return{report:c,initialize:d,reset:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(133),g=d(f),h=a(134),i=d(h);e.__dashjs_factory_name="DVBReporting",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{133:133,134:134}],130:[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 g.default;if(p){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);b.mpdurl||(b.mpdurl=p.originalUrl||p.url),b.terror||(b.terror=new Date),o.addDVBErrors(b)}}function c(a){a.error||(p=a.manifest)}function d(a){b({errorcode:g.default.BASE_URL_CHANGED,servicelocation:a.entry})}function e(){b({errorcode:g.default.BECAME_REPORTER})}function f(a){(0===a.responsecode||a.responsecode>=400||a.responsecode<100||a.responsecode>=600)&&b({errorcode:a.responsecode||g.default.CONNECTION_ERROR,url:a.url,terror:a.tresponse,servicelocation:a._serviceLocation})}function h(a){switch(a.metric){case q.HTTP_REQUEST:f(a.value)}}function j(a){var c=a.error?a.error.code:0,d=void 0;switch(c){case MediaError.MEDIA_ERR_NETWORK:d=g.default.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:d=g.default.CORRUPT_MEDIA_OTHER;break;default:return}b({errorcode:d})}function k(){n.on(r.MANIFEST_UPDATED,c,m),n.on(r.SERVICE_LOCATION_BLACKLIST_CHANGED,d,m),n.on(r.METRIC_ADDED,h,m),n.on(r.METRIC_UPDATED,h,m),n.on(r.PLAYBACK_ERROR,j,m),n.on(i.default.BECAME_REPORTING_PLAYER,e,m)}function l(){n.off(r.MANIFEST_UPDATED,c,m),n.off(r.SERVICE_LOCATION_BLACKLIST_CHANGED,d,m),n.off(r.METRIC_ADDED,h,m),n.off(r.METRIC_UPDATED,h,m),n.off(r.PLAYBACK_ERROR,j,m),n.off(i.default.BECAME_REPORTING_PLAYER,e,m)}a=a||{};var m=void 0,n=a.eventBus,o=a.metricsModel,p=void 0,q=a.metricsConstants,r=a.events;return m={initialise:k,reset:l},k(),m}Object.defineProperty(c,"__esModule",{value:!0});var f=a(135),g=d(f),h=a(117),i=d(h);e.__dashjs_factory_name="DVBErrorsTranslator",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{117:117,135:135}],131:[function(a,b,c){"use strict";function d(){return{reconstructFullMetricName:function(a,b,c){var d=a;return b&&(d+="("+b,c&&c.length&&(d+=","+c),d+=")"),d},validateN:function(a){if(!a)throw new Error("missing n");if(isNaN(a))throw new Error("n is NaN");if(a<0)throw new Error("n must be positive");return a}}}Object.defineProperty(c,"__esModule",{value:!0}),d.__dashjs_factory_name="HandlerHelpers",c.default=dashjs.FactoryMaker.getSingletonFactory(d),b.exports=c.default},{}],132:[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 f,g,h=d.getMpd(a),i=0;return b?i=h.availabilityStartTime.getTime()/1e3:(f=this.getRegularPeriods(h),f.length&&(i=f[0].start)),g=i,c&&c.hasOwnProperty(e.START_TIME)&&(g+=c.starttime),g}function c(a){var c=[];return a.Metrics_asArray&&a.Metrics_asArray.forEach(function(f){var h=new g.default,j=d.getIsDynamic(a);f.hasOwnProperty("metrics")&&(h.metrics=f.metrics,f.Range_asArray&&f.Range_asArray.forEach(function(c){var e=new i.default;e.starttime=b(a,j,c),c.hasOwnProperty("duration")?e.duration=c.duration:e.duration=d.getDuration(a),e._useWallClockTime=j,h.Range.push(e)}),f.Reporting_asArray&&(f.Reporting_asArray.forEach(function(a){var b=new k.default;if(a.hasOwnProperty(e.SCHEME_ID_URI)){b.schemeIdUri=a.schemeIdUri;for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);h.Reporting.push(b)}}),c.push(h)))}),c}a=a||{};var d=a.dashManifestModel,e=a.constants;return{getMetrics:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(136),g=d(f),h=a(137),i=d(h),j=a(138),k=d(j);e.__dashjs_factory_name="ManifestParsing",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{136:136,137:137,138:138}],133:[function(a,b,c){"use strict";function d(){function a(b){var c=[],d=[],e=void 0,f=void 0;for(e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("_")){if(f=b[e],void 0!==f&&null!==f||(f=""),Array.isArray(f)){if(!f.length)continue;d=[],f.forEach(function(b){var c="Object"!==Object.prototype.toString.call(b).slice(8,-1);d.push(c?b:a(b))}),f=d.map(encodeURIComponent).join(",")}else"string"==typeof f?f=encodeURIComponent(f):f instanceof Date?f=f.toISOString():"number"==typeof f&&(f=Math.round(f));c.push(e+"="+f)}return c.join("&")}return{serialise:a}}Object.defineProperty(c,"__esModule",{value:!0}),d.__dashjs_factory_name="MetricSerialiser",c.default=dashjs.FactoryMaker.getSingletonFactory(d),b.exports=c.default},{}],134:[function(a,b,c){"use strict";function d(){function a(){c&&(g||(g=new d(f)),c.getRandomValues(g),h=0)}function b(b,d){var f=void 0;return b||(b=0),d||(d=1),c?(h===g.length&&a(),f=g[h]/e,h+=1):f=Math.random(),f*(d-b)+b}var c=window.crypto||window.msCrypto,d=Uint32Array,e=Math.pow(2,8*d.BYTES_PER_ELEMENT)-1,f=10,g=void 0,h=void 0,i=void 0;return i={random:b},a(),i}Object.defineProperty(c,"__esModule",{value:!0}),d.__dashjs_factory_name="RNG",c.default=dashjs.FactoryMaker.getSingletonFactory(d),b.exports=c.default},{}],135:[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.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null};e.SSL_CONNECTION_FAILED_PREFIX="SSL",e.DNS_RESOLUTION_FAILED="C00",e.HOST_UNREACHABLE="C01",e.CONNECTION_REFUSED="C02",e.CONNECTION_ERROR="C03",e.CORRUPT_MEDIA_ISOBMFF="M00",e.CORRUPT_MEDIA_OTHER="M01",e.BASE_URL_CHANGED="F00",e.BECAME_REPORTER="S00",c.default=e,b.exports=c.default},{}],136:[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.metrics="",this.Range=[],this.Reporting=[]};c.default=e,b.exports=c.default},{}],137:[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.starttime=0,this.duration=1/0,this._useWallClockTime=!1};c.default=e,b.exports=c.default},{}],138:[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},{}],139:[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(202),h=d(g),i=a(49),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},{202:202,49:49}],140:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){B(),G.on(i.default.LOADING_COMPLETED,z,J),G.on(i.default.LOADING_ABANDONED,A,J)}function c(a){K=a}function d(){return K}function e(a){var b=function(a,b){return a.url===b.url},c=function(a,b){return a.action===m.default.ACTION_COMPLETE&&a.action===b.action},d=function(a,b){return!isNaN(a.index)&&a.startTime===b.startTime&&a.adaptationIndex===b.adaptationIndex},e=function(a,b){return isNaN(a.index)&&isNaN(b.index)&&a.quality===b.quality},f=function(f){var g=!1;return f.some(function(f){if(b(a,f)&&(d(a,f)||e(a,f)||c(a,f)))return g=!0}),g};return!!a&&f(L)}function f(a){var b=!1,c=0,d=void 0;if(!(b=e(a)))for(c=0;c<M.length;c++)d=M[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=x(b);c=c.concat(w(d,a))}),c}function j(a){return isNaN(a.duration)?.25:a.duration/8}function k(a){L=L.filter(function(b){var c=j(b);return!(!isNaN(b.startTime)&&void 0===a)&&b.startTime>=a-c})}function l(a,b){b<=a+.5||(L=L.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 n(a,b){if(!a||0===a.length)return void(L=[]);for(var c=0,d=0,e=a.length;d<e;d++)l(c,a.start(d)),c=a.end(d);b>0&&l(c,b)}function r(){I.abort(),M=[]}function t(a){switch(a.action){case m.default.ACTION_COMPLETE:L.push(a),y(a,q),F("[FragmentModel] executeRequest trigger STREAM_COMPLETED"),G.trigger(i.default.STREAM_COMPLETED,{request:a,fragmentModel:this});break;case m.default.ACTION_DOWNLOAD:y(a,p),M.push(a),u(a);break;default:F("Unknown request action.")}}function u(a){G.trigger(i.default.FRAGMENT_LOADING_STARTED,{sender:J,request:a}),I.load(a)}function v(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 w(a,b){return b.hasOwnProperty("time")?[v(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 x(a){var b=void 0;switch(a){case p:b=M;break;case q:b=L;break;default:b=[]}return b}function y(a,b){H.addSchedulingInfo(a.mediaType,new Date,a.type,a.startTime,a.availabilityStartTime,a.duration,a.quality,a.range,b),H.addRequestsQueue(a.mediaType,M,L)}function z(a){a.sender===I&&(M.splice(M.indexOf(a.request),1),a.response&&!a.error&&L.push(a.request),y(a.request,a.error?s:q),G.trigger(i.default.FRAGMENT_LOADING_COMPLETED,{request:a.request,response:a.response,error:a.error,sender:this}))}function A(a){a.sender===I&&G.trigger(i.default.FRAGMENT_LOADING_ABANDONED,{streamProcessor:this.getStreamProcessor(),request:a.request,mediaType:a.mediaType})}function B(){L=[],M=[]}function C(){G.off(i.default.LOADING_COMPLETED,z,this),G.off(i.default.LOADING_ABANDONED,A,this),I&&I.reset(),B()}function D(a){L.push(a)}a=a||{};var E=this.context,F=(0,o.default)(E).getInstance().log,G=(0,g.default)(E).getInstance(),H=a.metricsModel,I=a.fragmentLoader,J=void 0,K=void 0,L=void 0,M=void 0;return J={setStreamProcessor:c,getStreamProcessor:d,getRequests:h,isFragmentLoaded:e,isFragmentLoadedOrPending:f,removeExecutedRequestsBeforeTime:k,syncExecutedRequestsWithBufferedRange:n,abortRequests:r,executeRequest:t,reset:C,addExecutedRequest:D},b(),J}Object.defineProperty(c,"__esModule",{value:!0});var f=a(48),g=d(f),h=a(52),i=d(h),j=a(49),k=d(j),l=a(212),m=d(l),n=a(47),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},{212:212,47:47,48:48,49:49,52:52}],141:[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(48),g=d(f),h=a(52),i=d(h),j=a(49),k=d(j);e.__dashjs_factory_name="ManifestModel",c.default=k.default.getSingletonFactory(e),b.exports=c.default},{48:48,49:49,52:52}],142:[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;Ya=[],Xa=!1,Wa=!0,_a=!0,pb=k.default.ABR_STRATEGY_DYNAMIC,qb=!0,sb=!1,db={enabled:!0,ttl:n},eb={enabled:!0,ttl:o},Za=m,$a=void 0,ab=r,bb=s,cb=t,fb=NaN,gb=w,hb=x,ib=y,jb=z,kb=p,lb=q,ob=J,wb=!1,xb=A,rb={default:K},tb=[],ub=k.default.MOVING_AVERAGE_SLIDING_WINDOW,a={},e(a,i.HTTPRequest.MPD_TYPE,F),e(a,i.HTTPRequest.XLINK_EXPANSION_TYPE,H),e(a,i.HTTPRequest.MEDIA_SEGMENT_TYPE,D),e(a,i.HTTPRequest.INIT_SEGMENT_TYPE,D),e(a,i.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,D),e(a,i.HTTPRequest.INDEX_SEGMENT_TYPE,D),e(a,i.HTTPRequest.OTHER_TYPE,D),mb=a,b={},e(b,i.HTTPRequest.MPD_TYPE,G),e(b,i.HTTPRequest.XLINK_EXPANSION_TYPE,I),e(b,i.HTTPRequest.MEDIA_SEGMENT_TYPE,E),e(b,i.HTTPRequest.INIT_SEGMENT_TYPE,E),e(b,i.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,E),e(b,i.HTTPRequest.INDEX_SEGMENT_TYPE,E),e(b,i.HTTPRequest.OTHER_TYPE,E),nb=b,vb={},vb[k.default.VIDEO]=B,vb[k.default.AUDIO]=C}function b(a){pb=a}function c(){return pb}function d(a){qb=a}function f(){return qb}function g(a){var b=void 0;for(b=0;b<tb.length;b++)if(tb[b].rulename===a)return b;return-1}function h(){return tb}function j(a,b,c){var d=g(b);-1===d?tb.push({type:a,rulename:b,rule:c}):(tb[d].type=a,tb[d].rule=c)}function l(a){var b=g(a);-1!==b&&tb.splice(b,1)}function L(){tb=[]}function M(a){kb=a}function N(){return kb}function O(a){lb=a}function P(){return lb}function Q(a){fb=a}function R(){return isNaN(fb)?sb?v:u:fb}function S(a){gb=a}function T(){return gb}function U(a){hb=a}function V(){return hb}function W(a){ib=a}function X(){return ib}function Y(a){jb=a}function Z(){return jb}function $(a,b){vb[a]=b}function _(a){return vb[a]}function aa(a){ab=a}function ba(){return ab}function ca(a){bb=a}function da(){return bb}function ea(a,b){db.enabled=a,void 0===b||isNaN(b)||"number"!=typeof b||(db.ttl=b)}function fa(){return db}function ga(a,b){eb.enabled=a,void 0===b||isNaN(b)||"number"!=typeof b||(eb.ttl=b)}function ha(){return eb}function ia(a){cb=a}function ja(){return cb}function ka(a){mb[i.HTTPRequest.MEDIA_SEGMENT_TYPE]=a}function la(a){mb[i.HTTPRequest.MPD_TYPE]=a}function ma(a,b){mb[a]=b}function na(){return mb[i.HTTPRequest.MEDIA_SEGMENT_TYPE]}function oa(){return mb[i.HTTPRequest.MPD_TYPE]}function pa(a){return mb[a]}function qa(a){nb[i.HTTPRequest.MEDIA_SEGMENT_TYPE]=a}function ra(a){nb[i.HTTPRequest.MPD_TYPE]=a}function sa(a,b){nb[a]=b}function ta(){return nb[i.HTTPRequest.MEDIA_SEGMENT_TYPE]}function ua(){return nb[i.HTTPRequest.MPD_TYPE]}function va(a){return nb[a]}function wa(a){ob=a}function xa(){return ob}function ya(a){_a=a}function za(){return _a}function Aa(a){Za=a}function Ba(a){$a=a}function Ca(){return Za}function Da(){return $a}function Ea(a){Wa=a}function Fa(){return Wa}function Ga(a){Xa=a}function Ha(){return Xa}function Ia(a){Ya=a}function Ja(){return Ya}function Ka(a,b){a?rb[a]=!!b:Object.keys(rb).forEach(function(a){Ka(a,b)})}function La(a){var b=rb[a];return void 0===b?rb.default:b}function Ma(){return sb}function Na(a){sb=a}function Oa(a){ub=a}function Pa(){return ub}function Qa(a){wb=a}function Ra(){return wb}function Sa(a){xb=a}function Ta(){return xb}function Ua(){}var Va=void 0,Wa=void 0,Xa=void 0,Ya=void 0,Za=void 0,$a=void 0,_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;return Va={setABRStrategy:b,getABRStrategy:c,setUseDefaultABRRules:d,getUseDefaultABRRules:f,getABRCustomRules:h,addABRCustomRule:j,removeABRCustomRule:l,removeAllABRCustomRule:L,setBandwidthSafetyFactor:M,getBandwidthSafetyFactor:N,setAbandonLoadTimeout:O,getAbandonLoadTimeout:P,setLastBitrateCachingInfo:ea,getLastBitrateCachingInfo:fa,setLastMediaSettingsCachingInfo:ga,getLastMediaSettingsCachingInfo:ha,setStableBufferTime:Q,getStableBufferTime:R,setBufferTimeAtTopQuality:S,getBufferTimeAtTopQuality:T,setBufferTimeAtTopQualityLongForm:U,getBufferTimeAtTopQualityLongForm:V,setLongFormContentDurationThreshold:W,getLongFormContentDurationThreshold:X,setSegmentOverlapToleranceTime:Y,getSegmentOverlapToleranceTime:Z,getCacheLoadThresholdForType:_,setCacheLoadThresholdForType:$,setBufferToKeep:aa,getBufferToKeep:ba,setBufferAheadToKeep:ca,getBufferAheadToKeep:da,setBufferPruningInterval:ia,getBufferPruningInterval:ja,setFragmentRetryAttempts:ka,getFragmentRetryAttempts:na,setManifestRetryAttempts:la,getManifestRetryAttempts:oa,setRetryAttemptsForType:ma,getRetryAttemptsForType:pa,setFragmentRetryInterval:qa,getFragmentRetryInterval:ta,setManifestRetryInterval:ra,getManifestRetryInterval:ua,setRetryIntervalForType:sa,getRetryIntervalForType:va,setWallclockTimeUpdateInterval:wa,getWallclockTimeUpdateInterval:xa,setScheduleWhilePaused:ya,getScheduleWhilePaused:za,getUseSuggestedPresentationDelay:Ha,setUseSuggestedPresentationDelay:Ga,setLiveDelayFragmentCount:Aa,getLiveDelayFragmentCount:Ca,getLiveDelay:Da,setLiveDelay:Ba,setUseManifestDateHeaderTimeSource:Ea,getUseManifestDateHeaderTimeSource:Fa,setUTCTimingSources:Ia,getUTCTimingSources:Ja,setXHRWithCredentialsForType:Ka,getXHRWithCredentialsForType:La,setFastSwitchEnabled:Na,getFastSwitchEnabled:Ma,setMovingAverageMethod:Oa,getMovingAverageMethod:Pa,setJumpGaps:Qa,getJumpGaps:Ra,setSmallGapLimit:Sa,getSmallGapLimit:Ta,reset:Ua},a(),Va}Object.defineProperty(c,"__esModule",{value:!0});var g=a(49),h=d(g),i=a(229),j=a(100),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=.05,A=.8,B=50,C=5,D=3,E=1e3,F=3,G=500,H=1,I=500,J=50,K=!1;f.__dashjs_factory_name="MediaPlayerModel";var L=h.default.getSingletonFactory(f);L.DEFAULT_UTC_TIMING_SOURCE=l,h.default.updateSingletonFactory(f.__dashjs_factory_name,L),c.default=L,b.exports=c.default},{100:100,229:229,49:49}],143:[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
26
+ ;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(100),g=d(f),h=a(101),i=d(h),j=a(217),k=d(j),l=a(235),m=d(l),n=a(229),o=a(232),p=d(o),q=a(225),r=d(q),s=a(226),t=d(s),u=a(227),v=d(u),w=a(228),x=d(w),y=a(230),z=a(234),A=d(z),B=a(48),C=d(B),D=a(233),E=d(D),F=a(52),G=d(F),H=a(49),I=d(H);e.__dashjs_factory_name="MetricsModel",c.default=I.default.getSingletonFactory(e),b.exports=c.default},{100:100,101:101,217:217,225:225,226:226,227:227,228:228,229:229,230:230,232:232,233:233,234:234,235:235,48:48,49:49,52:52}],144:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){f=new g.default,h=[],i=!1}function b(){return f}function c(){return h}function d(){return i}function e(a){function b(a,b,c,d){var e=d[0].split(/[=]/);return d.push({key:e[0],value:e[1]}),d.shift(),d}function c(a,b,c){return b>0&&(k&&0===h.length?h=c[b].split(/[&]/):l&&(d=c[b].split(/[&]/))),c}if(!a)return null;var d=[],e=new RegExp(/[?]/),g=new RegExp(/[#]/),j=new RegExp(/^(https:)?\/\//i),k=e.test(a),l=g.test(a);return i=j.test(a),a.split(/[?#]/).map(c),h.length>0&&(h=h.reduce(b,null)),d.length>0&&(d=d.reduce(b,null),d.forEach(function(a){f[a.key]=a.value})),a}var f=void 0,h=void 0,i=void 0;return{initialize:a,parseURI:e,getURIFragmentData:b,getURIQueryData:c,isManifestHTTPS:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(224),g=d(f),h=a(49),i=d(h);e.__dashjs_factory_name="URIQueryAndFragmentModel",c.default=i.default.getSingletonFactory(e),b.exports=c.default},{224:224,49:49}],145:[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){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 _.length>0}function s(a){var b=void 0;null===a||U.seeking||-1!==_.indexOf(a)||(_.push(a),U&&1===_.length&&(b=document.createEvent("Event"),b.initEvent("waiting",!0,!1),X=U.playbackRate,d(0),U.dispatchEvent(b)))}function t(a){var b=_.indexOf(a),c=void 0;null!==a&&(-1!==b&&_.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),Z("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=this.context,Z=(0,m.default)(Y).getInstance().log,$=(0,i.default)(Y).getInstance(),_=[];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(49),g=d(f),h=a(48),i=d(h),j=a(52),k=d(j),l=a(47),m=d(l);e.__dashjs_factory_name="VideoModel",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{47:47,48:48,49:49,52:52}],146:[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,null,[{key:"findCencContentProtection",value:function(a){for(var b=null,c=0;c<a.length;++c){var d=a[c];"urn:mpeg:dash:mp4protection:2011"===d.schemeIdUri.toLowerCase()&&"cenc"===d.value.toLowerCase()&&(b=d)}return b}},{key:"getPSSHData",value:function(a){var b=8,c=new DataView(a),d=c.getUint8(b);return b+=20,d>0&&(b+=4+16*c.getUint32(b)),b+=4,a.slice(b)}},{key:"getPSSHForKeySystem",value:function(b,c){var d=a.parsePSSHList(c);return d.hasOwnProperty(b.uuid.toLowerCase())?d[b.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(a,b){return"pssh"in a?b.decodeArray(a.pssh.__text).buffer:null}},{key:"parsePSSHList",value:function(a){if(null===a)return[];for(var b=new DataView(a.buffer||a),c=!1,d={},e=0;!c;){var f=void 0,g=void 0,h=void 0,i=void 0,j=e;if(e>=b.buffer.byteLength)break;if(f=b.getUint32(e),g=e+f,e+=4,1886614376===b.getUint32(e))if(e+=4,0===(h=b.getUint8(e))||1===h){e++,e+=3,i="";var k=void 0,l=void 0;for(k=0;k<4;k++)l=b.getUint8(e+k).toString(16),i+=1===l.length?"0"+l:l;for(e+=4,i+="-",k=0;k<2;k++)l=b.getUint8(e+k).toString(16),i+=1===l.length?"0"+l:l;for(e+=2,i+="-",k=0;k<2;k++)l=b.getUint8(e+k).toString(16),i+=1===l.length?"0"+l:l;for(e+=2,i+="-",k=0;k<2;k++)l=b.getUint8(e+k).toString(16),i+=1===l.length?"0"+l:l;for(e+=2,i+="-",k=0;k<6;k++)l=b.getUint8(e+k).toString(16),i+=1===l.length?"0"+l:l;e+=6,i=i.toLowerCase(),b.getUint32(e),e+=4,d[i]=b.buffer.slice(j,g),e=g}else e=g;else e=g}return d}}]),a}();c.default=f,b.exports=c.default},{}],147:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var c=null,e=(0,i.default)(d).getInstance();e.setConfig({log:a.log,BASE64:a.BASE64}),e.initialize();var f=b(a);return!c&&f&&(c=(0,g.default)(d).create({protectionModel:f,protectionKeyController:e,eventBus:a.eventBus,log:a.log,events:a.events,BASE64:a.BASE64,constants:a.constants}),a.capabilities.setEncryptedMediaSupported(!0)),c}function b(a){var b=a.log,e=a.eventBus,f=a.errHandler,g=a.videoModel?a.videoModel.getElement():null;return g&&void 0===g.onencrypted||g&&void 0===g.mediaKeys?c(g,s)?(b("EME detected on this user agent! (ProtectionModel_3Feb2014)"),(0,o.default)(d).create({log:b,eventBus:e,events:a.events,api:c(g,s)})):c(g,r)?(b("EME detected on this user agent! (ProtectionModel_01b)"),(0,q.default)(d).create({log:b,eventBus:e,errHandler:f,events:a.events,api:c(g,r)})):(b("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(b("EME detected on this user agent! (ProtectionModel_21Jan2015)"),(0,m.default)(d).create({log:b,eventBus:e,events:a.events}))}function c(a,b){for(var c=0;c<b.length;c++){var d=b[c];if("function"==typeof a[d[Object.keys(d)[0]]])return d}return null}var d=this.context;return{createProtectionSystem:a}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(149),g=d(f),h=a(150),i=d(h),j=a(148),k=d(j),l=a(156),m=d(l),n=a(157),o=d(n),p=a(155),q=d(p),r=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],s=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];e.__dashjs_factory_name="Protection";var t=dashjs.FactoryMaker.getClassFactory(e);t.events=k.default,dashjs.FactoryMaker.updateClassFactory(e.__dashjs_factory_name,t),c.default=t,b.exports=c.default},{148:148,149:149,150:150,155:155,156:156,157:157}],148:[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(53),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.INTERNAL_KEY_MESSAGE="internalKeyMessage",this.INTERNAL_KEY_SYSTEM_SELECTED="internalKeySystemSelected",this.KEY_ADDED="public_keyAdded",this.KEY_ERROR="public_keyError",this.KEY_MESSAGE="public_keyMessage",this.KEY_SESSION_CLOSED="public_keySessionClosed",this.KEY_SESSION_CREATED="public_keySessionCreated",this.KEY_SESSION_REMOVED="public_keySessionRemoved",this.KEY_STATUSES_CHANGED="public_keyStatusesChanged",this.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",this.KEY_SYSTEM_SELECTED="public_keySystemSelected",this.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",this.NEED_KEY="needkey",this.PROTECTION_CREATED="public_protectioncreated",this.PROTECTION_DESTROYED="public_protectiondestroyed",this.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",this.TEARDOWN_COMPLETE="protectionTeardownComplete",this.VIDEO_ELEMENT_SELECTED="videoElementSelected"}return f(b,a),b}(i.default),k=new j;c.default=k,b.exports=c.default},{53:53}],149:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){G=[],H=[],J="temporary",K=""}function c(a){A.on(B.INTERNAL_KEY_MESSAGE,v,this),H.push(a);var b=y.getSupportedKeySystemsFromContentProtection(a.contentProtection);b&&b.length>0&&t(b,!0)}function d(a){return y.getSupportedKeySystemsFromContentProtection(a)}function e(a,b){var c=g.default.getPSSHForKeySystem(L,a),d=r(L);if(c){for(var e=z.getAllInitData(),f=0;f<e.length;f++)if(y.initDataEquals(c,e[f]))return void C("DRM: Ignoring initData because we have already seen it!");try{z.createKeySession(c,d,J,b)}catch(h){A.trigger(B.KEY_SESSION_CREATED,{data:null,error:"Error creating key session! "+h.message})}}else a?z.createKeySession(a,d,J,b):A.trigger(B.KEY_SESSION_CREATED,{data:null,error:"Selected key system is "+L.systemString+". needkey/encrypted event contains no initData corresponding to that key system!"})}function f(a){z.loadKeySession(a)}function h(a){z.removeKeySession(a)}function j(a){z.closeKeySession(a)}function l(a){z.setServerCertificate(a)}function m(a){a?(z.setMediaElement(a),A.on(B.NEED_KEY,w,this)):null===a&&(z.setMediaElement(a),A.off(B.NEED_KEY,w,this))}function n(a){J=a}function o(a){K=a}function p(a){I=a,y.setProtectionData(a)}function q(){A.off(B.INTERNAL_KEY_MESSAGE,v,this),m(null),L=void 0,z&&(z.reset(),z=null),H=[]}function r(a){var b=null,c=a.systemString;return I&&(b=c in I?I[c]:null),b}function s(a){var b=r(a),c=[],d=[],e=b&&b.audioRobustness&&b.audioRobustness.length>0?b.audioRobustness:K,f=b&&b.videoRobustness&&b.videoRobustness.length>0?b.videoRobustness:K;return H.forEach(function(a){a.type===E.AUDIO?c.push(new i.default(a.codec,e)):a.type===E.VIDEO&&d.push(new i.default(a.codec,f))}),new k.default(c,d,"optional","temporary"===J?"optional":"required",[J])}function t(a,b){var c=this,d=[],f=void 0;if(L){for(f=0;f<a.length;f++)if(L===a[f].ks){var g=function(){d.push({ks:a[f].ks,configs:[s(L)]});var g=function d(g){A.off(B.KEY_SYSTEM_ACCESS_COMPLETE,d,c),g.error?b||A.trigger(B.KEY_SYSTEM_SELECTED,{error:"DRM: KeySystem Access Denied! -- "+g.error}):(C("DRM: KeySystem Access Granted"),A.trigger(B.KEY_SYSTEM_SELECTED,{data:g.data}),e(a[f].initData,a[f].cdmData))};return A.on(B.KEY_SYSTEM_ACCESS_COMPLETE,g,c),z.requestKeySystemAccess(d),"break"}();if("break"===g)break}}else if(void 0===L){var h;!function(){L=null,G.push(a);for(var g=0;g<a.length;g++)d.push({ks:a[g].ks,configs:[s(a[g].ks)]});var i=void 0,j=function a(d){A.off(B.KEY_SYSTEM_ACCESS_COMPLETE,a,c),d.error?(L=void 0,A.off(B.INTERNAL_KEY_SYSTEM_SELECTED,h,c),b||A.trigger(B.KEY_SYSTEM_SELECTED,{data:null,error:"DRM: KeySystem Access Denied! -- "+d.error})):(i=d.data,C("DRM: KeySystem Access Granted ("+i.keySystem.systemString+")! Selecting key system..."),z.selectKeySystem(i))};h=function a(d){if(A.off(B.INTERNAL_KEY_SYSTEM_SELECTED,a,c),A.off(B.KEY_SYSTEM_ACCESS_COMPLETE,j,c),d.error)L=void 0,b||A.trigger(B.KEY_SYSTEM_SELECTED,{data:null,error:"DRM: Error selecting key system! -- "+d.error});else{L=z.getKeySystem(),A.trigger(B.KEY_SYSTEM_SELECTED,{data:i});var g=r(L);g&&g.serverCertificate&&g.serverCertificate.length>0&&z.setServerCertificate(D.decodeArray(g.serverCertificate).buffer);for(var h=0;h<G.length;h++)for(f=0;f<G[h].length;f++)if(L===G[h][f].ks){if(y.isClearKey(L)&&g&&g.hasOwnProperty("clearkeys")){var k={kids:Object.keys(g.clearkeys)};G[h][f].initData=(new TextEncoder).encode(JSON.stringify(k))}e(G[h][f].initData,G[h][f].cdmData);break}}},A.on(B.INTERNAL_KEY_SYSTEM_SELECTED,h,c),A.on(B.KEY_SYSTEM_ACCESS_COMPLETE,j,c),z.requestKeySystemAccess(d)}()}else G.push(a)}function u(a,b){A.trigger(B.LICENSE_REQUEST_COMPLETE,{data:a,error:b})}function v(a){if(C("DRM: onKeyMessage"),a.error)return void C(a.error);var b=a.data;A.trigger(B.KEY_MESSAGE,{data:b});var c=b.messageType?b.messageType:"license-request",d=b.message,e=b.sessionToken,f=r(L),h=L.systemString,i=y.getLicenseServer(L,f,c),j={sessionToken:e,messageType:c};if(!i)return C("DRM: License server request not required for this message (type = "+a.data.messageType+"). Session ID = "+e.getSessionID()),void u(j);if(y.isClearKey(L)){var k=y.processClearKeyLicenseRequest(L,f,d);if(k)return C("DRM: ClearKey license request handled by application!"),u(j),void z.updateKeySession(e,k)}var l=new XMLHttpRequest,m=null;if(f&&f.serverURL){var n=f.serverURL;"string"==typeof n&&""!==n?m=n:"object"==typeof n&&n.hasOwnProperty(c)&&(m=n[c])}else f&&f.laURL&&""!==f.laURL?m=f.laURL:(m=L.getLicenseServerURLFromInitData(g.default.getPSSHData(e.initData)))||(m=a.data.laURL);if(!(m=i.getServerURLFromMessage(m,d,c)))return void u(j,"DRM: No license server URL specified!");var o=function(a,b,c,d){var e=a.response?i.getErrorResponse(a.response,c,d):"NONE";u(b,"DRM: "+c+' update, XHR complete. status is "'+a.statusText+'" ('+a.status+"), readyState is "+a.readyState+". Response is "+e)};l.open(i.getHTTPMethod(c),m,!0),l.responseType=i.getResponseType(h,c),l.onload=function(){if(200==this.status){var a=i.getLicenseMessage(this.response,h,c);null!==a?(u(j),z.updateKeySession(e,a)):o(this,j,h,c)}else o(this,j,h,c)},l.onabort=function(){u(j,"DRM: "+h+' update, XHR aborted. status is "'+this.statusText+'" ('+this.status+"), readyState is "+this.readyState)},l.onerror=function(){u(j,"DRM: "+h+' update, XHR error. status is "'+this.statusText+'" ('+this.status+"), readyState is "+this.readyState)};var p=function(a){if(a)for(var b in a)"authorization"===b.toLowerCase()&&(l.withCredentials=!0),l.setRequestHeader(b,a[b])};f&&p(f.httpRequestHeaders),p(L.getRequestHeadersFromMessage(d)),f&&"boolean"==typeof f.withCredentials&&(l.withCredentials=f.withCredentials),l.send(L.getLicenseRequestFromMessage(d))}function w(a){if(C("DRM: onNeedKey"),"cenc"!==a.key.initDataType)return void C("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+a.key.initDataType);var b=a.key.initData;if(ArrayBuffer.isView(b)&&(b=b.buffer),L){var c=g.default.getPSSHForKeySystem(L,b);if(c)for(var d=z.getAllInitData(),e=0;e<d.length;e++)if(y.initDataEquals(c,d[e]))return void C("DRM: Ignoring initData because we have already seen it!")}C("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(b)));var f=y.getSupportedKeySystems(b,I);if(0===f.length)return void C("DRM: Received needkey event with initData, but we don't support any of the key systems!");t(f,!1)}function x(){return y?y.getKeySystems():[]}a=a||{};var y=a.protectionKeyController,z=a.protectionModel,A=a.eventBus,B=a.events,C=a.log,D=a.BASE64,E=a.constants,F=void 0,G=void 0,H=void 0,I=void 0,J=void 0,K=void 0,L=void 0;return F={initializeForMedia:c,createKeySession:e,loadKeySession:f,removeKeySession:h,closeKeySession:j,setServerCertificate:l,setMediaElement:m,setSessionType:n,setRobustnessLevel:o,setProtectionData:p,getSupportedKeySystemsFromContentProtection:d,getKeySystems:x,reset:q},b(),F}Object.defineProperty(c,"__esModule",{value:!0});var f=a(146),g=d(f),h=a(168),i=d(h),j=a(167),k=d(j);e.__dashjs_factory_name="ProtectionController",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{146:146,167:167,168:168}],150:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){a&&(a.log&&(t=a.log),a.BASE64&&(x=a.BASE64))}function b(){v=[];var a=void 0;a=(0,o.default)(r).getInstance({BASE64:x}),v.push(a),a=(0,m.default)(r).getInstance({BASE64:x}),v.push(a),a=(0,i.default)(r).getInstance({BASE64:x}),v.push(a),z=a,a=(0,k.default)(r).getInstance({BASE64:x,log:t}),v.push(a),A=a}function c(){return v}function d(a){for(var b=0;b<v.length;b++)if(v[b].systemString===a)return v[b];return null}function e(a){return a===z||a===A}function f(a,b){if(a.byteLength===b.byteLength){for(var c=new Uint8Array(a),d=new Uint8Array(b),e=0;e<c.length;e++)if(c[e]!==d[e])return!1;return!0}return!1}function h(a){var b=void 0,c=void 0,d=void 0,e=void 0,f=[];if(a)for(d=0;d<v.length;++d)for(c=v[d],e=0;e<a.length;++e)if(b=a[e],b.schemeIdUri.toLowerCase()===c.schemeIdURI){var g=c.getInitData(b);g?f.push({ks:v[d],initData:g,cdmData:c.getCDMData()}):this.isClearKey(c)&&f.push({ks:c,initData:null})}return f}function j(a,b){for(var c=[],d=g.default.parsePSSHList(a),e=0;e<v.length;++e){var f=v[e].systemString,h=!b||f in b;v[e].uuid in d&&h&&c.push({ks:v[e],initData:d[v[e].uuid]})}return c}function l(a,b,c){if("license-release"===c||"individualization-request"===c)return null;var d=null;return b&&b.hasOwnProperty("drmtoday")?d=(0,q.default)(r).getInstance({BASE64:x}):a.systemString===y.default.WIDEVINE_KEYSTEM_STRING?d=(0,u.default)(r).getInstance():a.systemString===y.default.PLAYREADY_KEYSTEM_STRING?d=(0,s.default)(r).getInstance():a.systemString===y.default.CLEARKEY_KEYSTEM_STRING&&(d=(0,w.default)(r).getInstance()),d}function n(a,b,c){try{return a.getClearKeysFromProtectionData(b,c)}catch(d){return t("Failed to retrieve clearkeys from ProtectionData"),null}}function p(a){for(var b=(function(b){var c=null;return a&&(c=b in a?a[b]:null),c}),c=0;c<v.length;c++){var d=v[c];d.hasOwnProperty("init")&&d.init(b(d.systemString))}}var r=this.context,t=void 0,v=void 0,x=void 0,z=void 0,A=void 0;return{initialize:b,setProtectionData:p,isClearKey:e,initDataEquals:f,getKeySystems:c,getKeySystemBySystemString:d,getSupportedKeySystemsFromContentProtection:h,getSupportedKeySystems:j,getLicenseServer:l,processClearKeyLicenseRequest:n,setConfig:a}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(146),g=d(f),h=a(151),i=d(h),j=a(153),k=d(j),l=a(154),m=d(l),n=a(152),o=d(n),p=a(159),q=d(p),r=a(160),s=d(r),t=a(161),u=d(t),v=a(158),w=d(v),x=a(102),y=d(x);e.__dashjs_factory_name="ProtectionKeyController",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{102:102,146:146,151:151,152:152,153:153,154:154,158:158,159:159,160:160,161:161}],151:[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=null;if(a){for(var d=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(b))),e=[],f=0;f<d.kids.length;f++){var h=d.kids[f],j=a.clearkeys&&a.clearkeys.hasOwnProperty(h)?a.clearkeys[h]:null;if(!j)throw new Error("DRM: ClearKey keyID ("+h+") is not known!");e.push(new g.default(h,j))}c=new i.default(e)}return c}function c(a){return k.default.parseInitDataFromContentProtection(a,j)}function d(){return null}function e(a){return new Uint8Array(a)}function f(){return null}function h(){return null}a=a||{};var j=a.BASE64;return{uuid:n,schemeIdURI:p,systemString:o,getInitData:c,getRequestHeadersFromMessage:d,getLicenseRequestFromMessage:e,getLicenseServerURLFromInitData:f,getCDMData:h,getClearKeysFromProtectionData:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(165),g=d(f),h=a(162),i=d(h),j=a(146),k=d(j),l=a(102),m=d(l),n="e2719d58-a985-b3c9-781a-b030af78d30e",o=m.default.CLEARKEY_KEYSTEM_STRING,p="urn:uuid:"+n;e.__dashjs_factory_name="KeySystemClearKey",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{102:102,146:146,162:162,165:165}],152:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){if(!q||!q.hasOwnProperty("decodeArray")||!q.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}function c(a){var b=void 0,c=void 0,d={},e=new DOMParser,f="utf16"===p?new Uint16Array(a):new Uint8Array(a);b=String.fromCharCode.apply(null,f),c=e.parseFromString(b,"application/xml");for(var g=c.getElementsByTagName("name"),h=c.getElementsByTagName("value"),i=0;i<g.length;i++)d[g[i].childNodes[0].nodeValue]=h[i].childNodes[0].nodeValue;return d.hasOwnProperty("Content")&&(d["Content-Type"]=d.Content,delete d.Content),d}function d(a){var c=void 0,d=void 0,e=null,f=new DOMParser,g="utf16"===p?new Uint16Array(a):new Uint8Array(a);if(b(),c=String.fromCharCode.apply(null,g),d=f.parseFromString(c,"application/xml"),d.getElementsByTagName("Challenge")[0]){var h=d.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;h&&(e=q.decode(h))}return e}function e(a){if(a)for(var b=new DataView(a),c=b.getUint16(4,!0),d=6,e=new DOMParser,f=0;f<c;f++){var g=b.getUint16(d,!0);d+=2;var h=b.getUint16(d,!0);if(d+=2,1===g){var i=a.slice(d,d+h),j=String.fromCharCode.apply(null,new Uint16Array(i)),k=e.parseFromString(j,"application/xml");if(k.getElementsByTagName("LA_URL")[0]){var l=k.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(l)return l}if(k.getElementsByTagName("LUI_URL")[0]){var m=k.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(m)return m}}else d+=h}return null}function f(a){var c=new Uint8Array([112,115,115,104,0,0,0,0]),d=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),e=0,f=null,h=void 0,i=void 0,j=void 0,k=void 0,l=void 0;if(b(),"pssh"in a)return g.default.parseInitDataFromContentProtection(a,q);if("pro"in a)f=q.decodeArray(a.pro.__text);else{if(!("prheader"in a))return null;f=q.decodeArray(a.prheader.__text)}return h=f.length,i=4+c.length+d.length+4+h,j=new ArrayBuffer(i),k=new Uint8Array(j),l=new DataView(j),l.setUint32(e,i),e+=4,k.set(c,e),e+=c.length,k.set(d,e),e+=d.length,l.setUint32(e,h),e+=4,k.set(f,e),e+=h,k.buffer}function h(a){if("utf8"!==a&&"utf16"!==a)throw new Error("Illegal PlayReady message format! -- "+a);p=a}function i(a){a&&(n=a)}function o(){var a=void 0,c=void 0,d=void 0,e=void 0;if(b(),n&&n.cdmData){for(a=[],e=0;e<n.cdmData.length;++e)a.push(n.cdmData.charCodeAt(e)),a.push(0);for(a=String.fromCharCode.apply(null,a),a=q.encode(a),c=m.replace("%CUSTOMDATA%",a),d=[],e=0;e<c.length;++e)d.push(c.charCodeAt(e)),d.push(0);return new Uint8Array(d).buffer}return null}a=a||{};var p="utf16",q=a.BASE64;return{uuid:j,schemeIdURI:l,systemString:k,getInitData:f,getRequestHeadersFromMessage:c,getLicenseRequestFromMessage:d,getLicenseServerURLFromInitData:e,getCDMData:o,setPlayReadyMessageFormat:h,init:i}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(146),g=d(f),h=a(102),i=d(h),j="9a04f079-9840-4286-ab92-e65be0885f95",k=i.default.PLAYREADY_KEYSTEM_STRING,l="urn:uuid:"+j,m='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>',n=void 0;e.__dashjs_factory_name="KeySystemPlayReady",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{102:102,146:146}],153:[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=null;if(a){for(var d=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(b))),e=[],f=0;f<d.kids.length;f++){var h=d.kids[f],j=a.clearkeys&&a.clearkeys.hasOwnProperty(h)?a.clearkeys[h]:null;if(!j)throw new Error("DRM: ClearKey keyID ("+h+") is not known!");e.push(new g.default(h,j))}c=new i.default(e),l("Warning: ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4")}return c}function c(a){return k.default.parseInitDataFromContentProtection(a,j)}function d(){return null}function e(a){return new Uint8Array(a)}function f(){return null}function h(){return null}var j=a.BASE64,l=a.log;return{uuid:n,schemeIdURI:p,systemString:o,getInitData:c,getRequestHeadersFromMessage:d,getLicenseRequestFromMessage:e,getLicenseServerURLFromInitData:f,getCDMData:h,getClearKeysFromProtectionData:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(165),g=d(f),h=a(162),i=d(h),j=a(146),k=d(j),l=a(102),m=d(l),n="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",o=m.default.CLEARKEY_KEYSTEM_STRING,p="urn:uuid:"+n;e.__dashjs_factory_name="KeySystemW3CClearKey",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{102:102,146:146,162:162,165:165}],154:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){a&&(i=a)}function c(a){return g.default.parseInitDataFromContentProtection(a,m)}function d(){return null}function e(a){return new Uint8Array(a)}function f(){return null}function h(){return null}a=a||{};var i=null,m=a.BASE64;return{uuid:j,schemeIdURI:l,systemString:k,init:b,getInitData:c,getRequestHeadersFromMessage:d,getLicenseRequestFromMessage:e,getLicenseServerURLFromInitData:f,getCDMData:h}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(146),g=d(f),h=a(102),i=d(h),j="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",k=i.default.WIDEVINE_KEYSTEM_STRING,l="urn:uuid:"+j;e.__dashjs_factory_name="KeySystemWidevine",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{102:102,146:146}],155:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){E=null,F=null,H=[],I=[],G=(0,g.default)(x).getInstance(),K=u()}function c(){E&&w();for(var a=0;a<I.length;a++)p(I[a]);y.trigger(z.TEARDOWN_COMPLETE)}function d(){return F}function e(){for(var a=[],b=0;b<H.length;b++)a.push(H[b].initData);for(var b=0;b<I.length;b++)a.push(I[b].initData);return a}function f(a){var b=E;b||(b=document.createElement("video"));for(var c=!1,d=0;d<a.length;d++)for(var e=a[d].ks.systemString,f=a[d].configs,g=null,h=null,i=0;i<f.length;i++){var j=f[i].videoCapabilities;if(j&&0!==j.length){h=[];for(var k=0;k<j.length;k++)""!==b.canPlayType(j[k].contentType,e)&&h.push(j[k])}if(!(!g&&!h||g&&0===g.length||h&&0===h.length)){c=!0;var l=new o.default(g,h),m=G.getKeySystemBySystemString(e);y.trigger(z.KEY_SYSTEM_ACCESS_COMPLETE,{
27
+ data:new q.default(m,l)});break}}c||y.trigger(z.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})}function h(a){F=a.keySystem,y.trigger(z.INTERNAL_KEY_SYSTEM_SELECTED)}function j(a){E!==a&&(E&&w(),(E=a)&&(E.addEventListener(B.keyerror,K),E.addEventListener(B.needkey,K),E.addEventListener(B.keymessage,K),E.addEventListener(B.keyadded,K),y.trigger(z.VIDEO_ELEMENT_SELECTED)))}function l(a){if(!F)throw new Error("Can not create sessions until you have selected a key system");if(J||0===I.length){var b={sessionID:null,initData:a,getSessionID:function(){return this.sessionID},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return H.push(b),E[B.generateKeyRequest](F.systemString,new Uint8Array(a)),b}throw new Error("Multiple sessions not allowed!")}function n(a,b){var c=a.sessionID;if(G.isClearKey(F))for(var d=0;d<b.keyPairs.length;d++)E[B.addKey](F.systemString,b.keyPairs[d].key,b.keyPairs[d].keyID,c);else E[B.addKey](F.systemString,new Uint8Array(b),new Uint8Array(a.initData),c)}function p(a){E[B.cancelKeyRequest](F.systemString,a.sessionID)}function r(){}function s(){}function t(){}function u(){return{handleEvent:function(a){var b=null;switch(a.type){case B.needkey:var c=ArrayBuffer.isView(a.initData)?a.initData.buffer:a.initData;y.trigger(z.NEED_KEY,{key:new i.default(c,"cenc")});break;case B.keyerror:if(b=v(I,a.sessionId),b||(b=v(H,a.sessionId)),b){var d="";switch(a.errorCode.code){case 1:d+="MEDIA_KEYERR_UNKNOWN - An unspecified error occurred. This value is used for errors that don't match any of the other codes.";break;case 2:d+="MEDIA_KEYERR_CLIENT - The Key System could not be installed or updated.";break;case 3:d+="MEDIA_KEYERR_SERVICE - The message passed into update indicated an error from the license service.";break;case 4:d+="MEDIA_KEYERR_OUTPUT - There is no available output device with the required characteristics for the content protection system.";break;case 5:d+="MEDIA_KEYERR_HARDWARECHANGE - A hardware configuration change caused a content protection error.";break;case 6:d+="MEDIA_KEYERR_DOMAIN - An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain."}d+=" System Code = "+a.systemCode,y.trigger(z.KEY_ERROR,{data:new k.default(b,d)})}else A("No session token found for key error");break;case B.keyadded:b=v(I,a.sessionId),b||(b=v(H,a.sessionId)),b?(A("DRM: Key added."),y.trigger(z.KEY_ADDED,{data:b})):A("No session token found for key added");break;case B.keymessage:if(J=null!==a.sessionId&&void 0!==a.sessionId,J?!(b=v(I,a.sessionId))&&H.length>0&&(b=H.shift(),I.push(b),b.sessionID=a.sessionId):H.length>0&&(b=H.shift(),I.push(b),0!==H.length&&C.mediaKeyMessageError("Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!")),b){var e=ArrayBuffer.isView(a.message)?a.message.buffer:a.message;b.keyMessage=e,y.trigger(z.INTERNAL_KEY_MESSAGE,{data:new m.default(b,e,a.defaultURL)})}else A("No session token found for key message")}}}}function v(a,b){if(b&&a){for(var c=a.length,d=0;d<c;d++)if(a[d].sessionID==b)return a[d];return null}return null}function w(){E.removeEventListener(B.keyerror,K),E.removeEventListener(B.needkey,K),E.removeEventListener(B.keymessage,K),E.removeEventListener(B.keyadded,K)}a=a||{};var x=this.context,y=a.eventBus,z=a.events,A=a.log,B=a.api,C=a.errHandler,D=void 0,E=void 0,F=void 0,G=void 0,H=void 0,I=void 0,J=void 0,K=void 0;return D={getAllInitData:e,requestKeySystemAccess:f,getKeySystem:d,selectKeySystem:h,setMediaElement:j,createKeySession:l,updateKeySession:n,closeKeySession:p,setServerCertificate:r,loadKeySession:s,removeKeySession:t,reset:c},b(),D}Object.defineProperty(c,"__esModule",{value:!0});var f=a(150),g=d(f),h=a(169),i=d(h),j=a(163),k=d(j),l=a(164),m=d(l),n=a(167),o=d(n),p=a(166),q=d(p);e.__dashjs_factory_name="ProtectionModel_01b",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{150:150,163:163,164:164,166:166,167:167,169:169}],156:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){E=null,F=null,G=null,H=[],J=(0,g.default)(z).getInstance(),I=w()}function c(){var a=H.length,b=void 0;0!==a?function(){for(var c=function(a){x(a),0===H.length&&(F?(F.removeEventListener("encrypted",I),F.setMediaKeys(null).then(function(){A.trigger(B.TEARDOWN_COMPLETE)})):A.trigger(B.TEARDOWN_COMPLETE))},d=0;d<a;d++)b=H[d],function(a){b.session.closed.then(function(){c(a)}),v(b).catch(function(){c(a)})}(b)}():A.trigger(B.TEARDOWN_COMPLETE)}function d(){return E}function e(){for(var a=[],b=0;b<H.length;b++)a.push(H[b].initData);return a}function f(a){u(a,0)}function h(a){a.mksa.createMediaKeys().then(function(b){E=a.keySystem,G=b,F?F.setMediaKeys(G).then(function(){A.trigger(B.INTERNAL_KEY_SYSTEM_SELECTED)}):A.trigger(B.INTERNAL_KEY_SYSTEM_SELECTED)}).catch(function(){A.trigger(B.INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+a.keySystem.systemString+")! Could not create MediaKeys -- TODO"})})}function j(a){F!==a&&(F&&(F.removeEventListener("encrypted",I),F.setMediaKeys&&F.setMediaKeys(null)),(F=a)&&(F.addEventListener("encrypted",I),F.setMediaKeys&&G&&F.setMediaKeys(G)))}function l(a){if(!E||!G)throw new Error("Can not set server certificate until you have selected a key system");G.setServerCertificate(a).then(function(){C("DRM: License server certificate successfully updated."),A.trigger(B.SERVER_CERTIFICATE_UPDATED)}).catch(function(a){A.trigger(B.SERVER_CERTIFICATE_UPDATED,{error:"Error updating server certificate -- "+a.name})})}function n(a,b,c){if(!E||!G)throw new Error("Can not create sessions until you have selected a key system");var d=G.createSession(c),e=y(d,a,c),f=this.getKeySystem(),g=f.systemString===q.default.CLEARKEY_KEYSTEM_STRING&&b&&b.clearkeys?"keyids":"cenc";d.generateRequest(g,a).then(function(){C("DRM: Session created. SessionID = "+e.getSessionID()),A.trigger(B.KEY_SESSION_CREATED,{data:e})}).catch(function(a){x(e),A.trigger(B.KEY_SESSION_CREATED,{data:null,error:"Error generating key request -- "+a.name})})}function p(a,b){var c=a.session;J.isClearKey(E)&&(b=b.toJWK()),c.update(b).catch(function(b){A.trigger(B.KEY_ERROR,{data:new k.default(a,"Error sending update() message! "+b.name)})})}function r(a){if(!E||!G)throw new Error("Can not load sessions until you have selected a key system");var b=G.createSession();b.load(a).then(function(c){if(c){var d=y(b);C("DRM: Session created. SessionID = "+d.getSessionID()),A.trigger(B.KEY_SESSION_CREATED,{data:d})}else A.trigger(B.KEY_SESSION_CREATED,{data:null,error:"Could not load session! Invalid Session ID ("+a+")"})}).catch(function(b){A.trigger(B.KEY_SESSION_CREATED,{data:null,error:"Could not load session ("+a+")! "+b.name})})}function s(a){a.session.remove().then(function(){C("DRM: Session removed. SessionID = "+a.getSessionID()),A.trigger(B.KEY_SESSION_REMOVED,{data:a.getSessionID()})},function(b){A.trigger(B.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+a.getSessionID()+"). "+b.name})})}function t(a){v(a).catch(function(b){x(a),A.trigger(B.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+a.getSessionID()+") "+b.name})})}function u(a,b){if(void 0===navigator.requestMediaKeySystemAccess||"function"!=typeof navigator.requestMediaKeySystemAccess)return void A.trigger(B.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Insecure origins are not allowed"});!function(b){var c=a[b].ks,d=a[b].configs;navigator.requestMediaKeySystemAccess(c.systemString,d).then(function(a){var b="function"==typeof a.getConfiguration?a.getConfiguration():null,d=new o.default(c,b);d.mksa=a,A.trigger(B.KEY_SYSTEM_ACCESS_COMPLETE,{data:d})}).catch(function(c){++b<a.length?u(a,b):A.trigger(B.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! "+c.message})})}(b)}function v(a){var b=a.session;return b.removeEventListener("keystatuseschange",a),b.removeEventListener("message",a),b.close()}function w(){return{handleEvent:function(a){switch(a.type){case"encrypted":if(a.initData){var b=ArrayBuffer.isView(a.initData)?a.initData.buffer:a.initData;A.trigger(B.NEED_KEY,{key:new i.default(b,a.initDataType)})}}}}}function x(a){for(var b=0;b<H.length;b++)if(H[b]===a){H.splice(b,1);break}}function y(a,b,c){var d={session:a,initData:b,handleEvent:function(a){switch(a.type){case"keystatuseschange":A.trigger(B.KEY_STATUSES_CHANGED,{data:this});break;case"message":var b=ArrayBuffer.isView(a.message)?a.message.buffer:a.message;A.trigger(B.INTERNAL_KEY_MESSAGE,{data:new m.default(this,b,void 0,a.messageType)})}},getSessionID:function(){return a.sessionId},getExpirationTime:function(){return a.expiration},getKeyStatuses:function(){return a.keyStatuses},getSessionType:function(){return c}};return a.addEventListener("keystatuseschange",d),a.addEventListener("message",d),a.closed.then(function(){x(d),C("DRM: Session closed. SessionID = "+d.getSessionID()),A.trigger(B.KEY_SESSION_CLOSED,{data:d.getSessionID()})}),H.push(d),d}a=a||{};var z=this.context,A=a.eventBus,B=a.events,C=a.log,D=void 0,E=void 0,F=void 0,G=void 0,H=void 0,I=void 0,J=void 0;return D={getAllInitData:e,requestKeySystemAccess:f,getKeySystem:d,selectKeySystem:h,setMediaElement:j,setServerCertificate:l,createKeySession:n,updateKeySession:p,loadKeySession:r,removeKeySession:s,closeKeySession:t,reset:c},b(),D}Object.defineProperty(c,"__esModule",{value:!0});var f=a(150),g=d(f),h=a(169),i=d(h),j=a(163),k=d(j),l=a(164),m=d(l),n=a(166),o=d(n),p=a(102),q=d(p);e.__dashjs_factory_name="ProtectionModel_21Jan2015",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{102:102,150:150,163:163,164:164,166:166,169:169}],157:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){D=null,E=null,F=null,G=null,H=[],J=(0,g.default)(x).getInstance(),I=u()}function c(){try{for(var a=0;a<H.length;a++)p(H[a]);D&&D.removeEventListener(B.needkey,I),y.trigger(z.TEARDOWN_COMPLETE)}catch(b){y.trigger(z.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+b.message})}}function d(){return E}function e(){for(var a=[],b=0;b<H.length;b++)a.push(H[b].initData);return a}function f(a){for(var b=!1,c=0;c<a.length;c++)for(var d=a[c].ks.systemString,e=a[c].configs,f=null,g=null,h=0;h<e.length;h++){var i=e[h].audioCapabilities,j=e[h].videoCapabilities;if(i&&0!==i.length){f=[];for(var k=0;k<i.length;k++)window[B.MediaKeys].isTypeSupported(d,i[k].contentType)&&f.push(i[k])}if(j&&0!==j.length){g=[];for(var l=0;l<j.length;l++)window[B.MediaKeys].isTypeSupported(d,j[l].contentType)&&g.push(j[l])}if(!(!f&&!g||f&&0===f.length||g&&0===g.length)){b=!0;var m=new o.default(f,g),n=J.getKeySystemBySystemString(d);y.trigger(z.KEY_SYSTEM_ACCESS_COMPLETE,{data:new q.default(n,m)});break}}b||y.trigger(z.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})}function h(a){try{F=a.mediaKeys=new window[B.MediaKeys](a.keySystem.systemString),E=a.keySystem,G=a,D&&v(),y.trigger(z.INTERNAL_KEY_SYSTEM_SELECTED)}catch(b){y.trigger(z.INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+E.systemString+")! Could not create MediaKeys -- TODO"})}}function j(a){D!==a&&(D&&D.removeEventListener(B.needkey,I),(D=a)&&(D.addEventListener(B.needkey,I),F&&v()))}function l(a,b,c,d){if(!E||!F||!G)throw new Error("Can not create sessions until you have selected a key system");var e=null;if(null!==G.ksConfiguration.videoCapabilities&&G.ksConfiguration.videoCapabilities.length>0&&(e=G.ksConfiguration.videoCapabilities[0]),null===e&&null!==G.ksConfiguration.audioCapabilities&&G.ksConfiguration.audioCapabilities.length>0&&(e=G.ksConfiguration.audioCapabilities[0]),null===e)throw new Error("Can not create sessions for unknown content types.");var f=e.contentType,g=F.createSession(f,new Uint8Array(a),d?new Uint8Array(d):null),h=w(g,a);g.addEventListener(B.error,h),g.addEventListener(B.message,h),g.addEventListener(B.ready,h),g.addEventListener(B.close,h),H.push(h),A("DRM: Session created. SessionID = "+h.getSessionID()),y.trigger(z.KEY_SESSION_CREATED,{data:h})}function n(a,b){var c=a.session;J.isClearKey(E)?c.update(new Uint8Array(b.toJWK())):c.update(new Uint8Array(b))}function p(a){var b=a.session;b.removeEventListener(B.error,a),b.removeEventListener(B.message,a),b.removeEventListener(B.ready,a),b.removeEventListener(B.close,a);for(var c=0;c<H.length;c++)if(H[c]===a){H.splice(c,1);break}b[B.release]()}function r(){}function s(){}function t(){}function u(){return{handleEvent:function(a){switch(a.type){case B.needkey:if(a.initData){var b=ArrayBuffer.isView(a.initData)?a.initData.buffer:a.initData;y.trigger(z.NEED_KEY,{key:new i.default(b,"cenc")})}}}}}function v(){var a=null,b=function(){D.removeEventListener("loadedmetadata",a),D[B.setMediaKeys](F),y.trigger(z.VIDEO_ELEMENT_SELECTED)};D.readyState>=1?b():(a=b.bind(this),D.addEventListener("loadedmetadata",a))}function w(a,b){return{session:a,initData:b,getSessionID:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(a){switch(a.type){case B.error:y.trigger(z.KEY_ERROR,{data:new k.default(this,"KeyError")});break;case B.message:var b=ArrayBuffer.isView(a.message)?a.message.buffer:a.message;y.trigger(z.INTERNAL_KEY_MESSAGE,{data:new m.default(this,b,a.destinationURL)});break;case B.ready:A("DRM: Key added."),y.trigger(z.KEY_ADDED);break;case B.close:A("DRM: Session closed. SessionID = "+this.getSessionID()),y.trigger(z.KEY_SESSION_CLOSED,{data:this.getSessionID()})}}}}a=a||{};var x=this.context,y=a.eventBus,z=a.events,A=a.log,B=a.api,C=void 0,D=void 0,E=void 0,F=void 0,G=void 0,H=void 0,I=void 0,J=void 0;return C={getAllInitData:e,requestKeySystemAccess:f,getKeySystem:d,selectKeySystem:h,setMediaElement:j,createKeySession:l,updateKeySession:n,closeKeySession:p,setServerCertificate:r,loadKeySession:s,removeKeySession:t,reset:c},b(),C}Object.defineProperty(c,"__esModule",{value:!0});var f=a(150),g=d(f),h=a(169),i=d(h),j=a(163),k=d(j),l=a(164),m=d(l),n=a(167),o=d(n),p=a(166),q=d(p);e.__dashjs_factory_name="ProtectionModel_3Feb2014",c.default=dashjs.FactoryMaker.getClassFactory(e),b.exports=c.default},{150:150,163:163,164:164,166:166,167:167,169:169}],158:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b){var c=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(b)));a+="/?";for(var d=0;d<c.kids.length;d++)a+=c.kids[d]+"&";return a=a.substring(0,a.length-1)}function b(){return"GET"}function c(){return"json"}function d(a){if(!a.hasOwnProperty("keys"))return null;for(var b=[],c=0;c<a.keys.length;c++){var d=a.keys[c],e=d.kid.replace(/=/g,""),f=d.k.replace(/=/g,"");b.push(new g.default(e,f))}return new i.default(b)}function e(a){return String.fromCharCode.apply(null,new Uint8Array(a))}return{getServerURLFromMessage:a,getHTTPMethod:b,getResponseType:c,getLicenseMessage:d,getErrorResponse:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(165),g=d(f),h=a(162),i=d(h);e.__dashjs_factory_name="ClearKey",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{162:162,165:165}],159:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){if(!i||!i.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}function c(a){return a}function d(){return"POST"}function e(a){return j[a].responseType}function f(a,c){return b(),j[c].getLicenseMessage(a)}function h(a,b){return j[b].getErrorResponse(a)}a=a||{};var i=a.BASE64,j={};j[g.default.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(a){return i.decodeArray(a.license)},getErrorResponse:function(a){return a}},j[g.default.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(a){return a},getErrorResponse:function(a){return String.fromCharCode.apply(null,new Uint8Array(a))}};return{getServerURLFromMessage:c,getHTTPMethod:d,getResponseType:e,getLicenseMessage:f,getErrorResponse:h}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(102),g=d(f);e.__dashjs_factory_name="DRMToday",c.default=dashjs.FactoryMaker.getSingletonFactory(e),b.exports=c.default},{102:102}],160:[function(a,b,c){"use strict";function d(){function a(a){var b=String.fromCharCode.apply(null,new Uint8Array(a));return decodeURIComponent(escape(b))}function b(b){if(window.DOMParser){var c=a(b),d=new window.DOMParser,e=d.parseFromString(c,"text/xml"),f=e?e.getElementsByTagNameNS(i,"Envelope")[0]:null,g=f?f.getElementsByTagNameNS(i,"Body")[0]:null;if(g?g.getElementsByTagNameNS(i,"Fault")[0]:null)return null}return b}function c(b){var c="",d="",e="",f=-1,g=-1;if(window.DOMParser){var h=a(b),j=new window.DOMParser,k=j.parseFromString(h,"text/xml"),l=k?k.getElementsByTagNameNS(i,"Envelope")[0]:null,m=l?l.getElementsByTagNameNS(i,"Body")[0]:null,n=m?m.getElementsByTagNameNS(i,"Fault")[0]:null,o=n?n.getElementsByTagName("detail")[0]:null,p=o?o.getElementsByTagName("Exception")[0]:null,q=null;if(null===n)return h;q=n.getElementsByTagName("faultstring")[0].firstChild,c=q?q.nodeValue:null,null!==p&&(q=p.getElementsByTagName("StatusCode")[0],d=q?q.firstChild.nodeValue:null,q=p.getElementsByTagName("Message")[0],e=q?q.firstChild.nodeValue:null,f=e?e.lastIndexOf("[")+1:-1,g=e?e.indexOf("]"):-1,e=e?e.substring(f,g):"")}var r="code: "+d+", name: "+c;return e&&(r+=", message: "+e),r}function d(a){return a}function e(){return"POST"}function f(){return"arraybuffer"}function g(a){return b.call(this,a)}function h(a){return c.call(this,a)}var i="http://schemas.xmlsoap.org/soap/envelope/";return{getServerURLFromMessage:d,getHTTPMethod:e,getResponseType:f,getLicenseMessage:g,getErrorResponse:h}}Object.defineProperty(c,"__esModule",{value:!0}),d.__dashjs_factory_name="PlayReady",c.default=dashjs.FactoryMaker.getSingletonFactory(d),b.exports=c.default},{}],161:[function(a,b,c){"use strict";function d(){function a(a){return a}function b(){return"POST"}function c(){return"arraybuffer"}function d(a){return a}function e(a){return String.fromCharCode.apply(null,new Uint8Array(a))}return{getServerURLFromMessage:a,getHTTPMethod:b,getResponseType:c,getLicenseMessage:d,getErrorResponse:e}}Object.defineProperty(c,"__esModule",{value:!0}),d.__dashjs_factory_name="Widevine",c.default=dashjs.FactoryMaker.getSingletonFactory(d),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(){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){if(d(this,a),c&&"persistent"!==c&&"temporary"!==c)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=b,this.type=c}return e(a,[{key:"toJWK",value:function(){var a=void 0,b=this.keyPairs.length,c={keys:[]};for(a=0;a<b;a++){var d={kty:"oct",alg:"A128KW",kid:this.keyPairs[a].keyID,k:this.keyPairs[a].key};c.keys.push(d)}this.type&&(c.type=this.type);var e=JSON.stringify(c),f=e.length,g=new ArrayBuffer(f),h=new Uint8Array(g);for(a=0;a<f;a++)h[a]=e.charCodeAt(a);return g}}]),a}();c.default=f,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){d(this,a),this.sessionToken=b,this.error=c};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(b,c,e,f){d(this,a),this.sessionToken=b,this.message=c,this.defaultURL=e,this.messageType=f||"license-request"};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(b,c){d(this,a),this.keyID=b,this.key=c};c.default=e,b.exports=c.default},{}],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 a(b,c){d(this,a),this.keySystem=b,this.ksConfiguration=c};c.default=e,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,f,g){d(this,a),this.initDataTypes=["cenc"],b&&b.length&&(this.audioCapabilities=b),c&&c.length&&(this.videoCapabilities=c),this.distinctiveIdentifier=e,this.persistentState=f,this.sessionTypes=g};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(b,c){d(this,a),this.contentType=b,this.robustness=c};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(b,c){d(this,a),this.initData=b,this.initDataType=c};c.default=e,b.exports=c.default},{}],170:[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.droppedVideoFrames-e;e=b.droppedVideoFrames;var g=b.totalVideoFrames-f;f=b.totalVideoFrames,isNaN(a)||(d[a]?(d[a].droppedVideoFrames+=c,d[a].totalVideoFrames+=g):d[a]={droppedVideoFrames:c,totalVideoFrames:g})}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(49),g=d(f);e.__dashjs_factory_name="DroppedFramesHistory";var h=g.default.getClassFactory(e);c.default=h,b.exports=c.default},{49:49}],171:[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(49),g=d(f);e.__dashjs_factory_name="RulesContext",c.default=g.default.getClassFactory(e),b.exports=c.default},{49:49}],172:[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(49),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},{49:49}],173:[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(49),g=d(f),h=a(172),i=d(h),j=8;e.__dashjs_factory_name="SwitchRequestHistory";var k=g.default.getClassFactory(e);c.default=k,b.exports=c.default},{172:172,49:49}],174:[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(100),g=d(f),h=a(49),i=d(h);e.__dashjs_factory_name="ThroughputHistory",c.default=i.default.getClassFactory(e),b.exports=c.default},{100:100,49:49}],175:[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(181),g=d(f),h=a(179),i=d(h),j=a(176),k=d(j),l=a(178),m=d(l),n=a(180),o=d(n),p=a(177),q=d(p),r=a(49),s=d(r),t=a(172),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},{172:172,176:176,177:177,178:178,179:179,180:180,181:181,49:49}],176:[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,
28
+ 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(172),g=d(f),h=a(49),i=d(h),j=a(47),k=d(j);e.__dashjs_factory_name="AbandonRequestsRule",c.default=i.default.getClassFactory(e),b.exports=c.default},{172:172,47:47,49:49}],177:[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 K("BOLA ABR rule invoked for media type '"+c+"' with only one bitrate."),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(101),g=d(f),h=a(172),i=d(h),j=a(49),k=d(j),l=a(229),m=a(48),n=d(m),o=a(52),p=d(o),q=a(47),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},{101:101,172:172,229:229,47:47,48:48,49:49,52:52}],178:[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(49),g=d(f),h=a(172),i=d(h),j=a(47),k=d(j);e.__dashjs_factory_name="DroppedFramesRule",c.default=g.default.getClassFactory(e),b.exports=c.default},{172:172,47:47,49:49}],179:[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(106),g=d(f),h=a(48),i=d(h),j=a(52),k=d(j),l=a(49),m=d(l),n=a(47),o=d(n),p=a(172),q=d(p);e.__dashjs_factory_name="InsufficientBufferRule",c.default=m.default.getClassFactory(e),b.exports=c.default},{106:106,172:172,47:47,48:48,49:49,52:52}],180:[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(49),g=d(f),h=a(47),i=d(h),j=a(172),k=d(j);e.__dashjs_factory_name="SwitchHistoryRule",c.default=g.default.getClassFactory(e),b.exports=c.default},{172:172,47:47,49:49}],181:[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(106),g=d(f),h=a(103),i=d(h),j=a(49),k=d(j),l=a(47),m=d(l),n=a(172),o=d(n);e.__dashjs_factory_name="ThroughputRule",c.default=k.default.getClassFactory(e),b.exports=c.default},{103:103,106:106,172:172,47:47,49:49}],182:[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.getAllTracksAreDisabled()?0:k.fragmentDuration;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(100),g=d(f),h=a(49),i=d(h);e.__dashjs_factory_name="BufferLevelRule",c.default=i.default.getClassFactory(e),b.exports=c.default},{100:100,49:49}],183:[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.getAllTracksAreDisabled())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(100),g=d(f),h=a(47),i=d(h),j=a(49),k=d(j),l=a(212),m=d(l);e.__dashjs_factory_name="NextFragmentRequestRule",c.default=k.default.getClassFactory(e),b.exports=c.default},{100:100,212:212,47:47,49:49}],184:[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(49),g=d(f);e.__dashjs_factory_name="EmbeddedTextHtmlRender",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{49:49}],185:[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(100),g=d(f),h=a(48),i=d(h),j=a(52),k=d(j),l=a(49),m=d(l),n=a(199),o=d(n),p=a(95),q=d(p),r=a(187),s=d(r),t="NotFragmentedTextBufferController";e.__dashjs_factory_name=t,c.default=m.default.getClassFactory(e),b.exports=c.default},{100:100,187:187,199:199,48:48,49:49,52:52,95:95}],186:[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(100),g=d(f),h=a(49),i=d(h),j=a(106),k=d(j),l=a(185),m=d(l);e.__dashjs_factory_name="TextBufferController",c.default=i.default.getClassFactory(e),b.exports=c.default},{100:100,106:106,185:185,49:49}],187:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){K="",L=-1,M=!0,G=(0,m.default)(x).getInstance(),H=(0,o.default)(x).getInstance(),I=(0,q.default)(x).getInstance(),z=(0,k.default)(x).getInstance(),J=(0,s.default)(x).getInstance(),G.initialize(),J.on(u.default.TEXT_TRACKS_QUEUE_INITIALIZED,i,y),v()}function b(a){a&&(a.errHandler&&(A=a.errHandler),a.dashManifestModel&&(B=a.dashManifestModel),a.manifestModel&&(C=a.manifestModel),a.mediaController&&(D=a.mediaController),a.videoModel&&(E=a.videoModel),a.streamController&&(F=a.streamController),a.textTracks&&(G=a.textTracks),a.vttParser&&(H=a.vttParser),a.ttmlParser&&(I=a.ttmlParser),z.setConfig({errHandler:A,dashManifestModel:B,manifestModel:C,mediaController:D,videoModel:E,streamController:F,textTracks:G,vttParser:H,ttmlParser:I}))}function c(){return z}function d(){return N}function e(a){z.addEmbeddedTrack(a)}function f(a){"string"==typeof a&&(K=a)}function h(){return K}function i(a){var b=a.tracks,c=a.index,d=b.findIndex(function(a){return a.lang===K});-1!==d&&(this.setTextTrack(d),c=d),M||this.setTextTrack(-1),L=c,J.trigger(u.default.TEXT_TRACKS_ADDED,{enabled:!N,index:c,tracks:b})}function j(a){"boolean"==typeof a&&(M=a)}function l(){return M}function n(a){if("boolean"==typeof a){!N!==a&&(a&&this.setTextTrack(L),a||(L=this.getCurrentTrackIdx(),this.setTextTrack(-1)))}}function p(){return!N}function r(a){var b=z.getConfig(),c=b.fragmentModel,d=b.fragmentedTracks,e=G.getCurrentTrackIdx();if(e!==a){G.setModeForTrackIdx(e,g.default.TEXT_HIDDEN),G.setCurrentTrackIdx(a),G.setModeForTrackIdx(a,g.default.TEXT_SHOWING);var f=G.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=D.getCurrentTrackFor(g.default.FRAGMENTED_TEXT,F.getActiveStreamInfo());i!==j&&(c.abortRequests(),c.removeExecutedRequestsBeforeTime(),z.remove(),G.deleteCuesFromTrackIdx(e),D.setTrack(i),z.setCurrentFragmentedTrackIdx(h))}}}N=-1===a}function t(){return G.getCurrentTrackIdx()}function v(){N=!1}function w(){v(),z.resetEmbedded()}var x=this.context,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,H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0;return y={setConfig:b,getTextSourceBuffer:c,getAllTracksAreDisabled:d,addEmbeddedTrack:e,getTextDefaultLanguage:h,setTextDefaultLanguage:f,setTextDefaultEnabled:j,getTextDefaultEnabled:l,enableText:n,isTextEnabled:p,setTextTrack:r,getCurrentTrackIdx:t,reset:w},a(),y}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(49),i=d(h),j=a(188),k=d(j),l=a(189),m=d(l),n=a(206),o=d(n),p=a(204),q=d(p),r=a(48),s=d(r),t=a(52),u=d(t);e.__dashjs_factory_name="TextController",c.default=i.default.getSingletonFactory(e),b.exports=c.default},{100:100,188:188,189:189,204:204,206:206,48:48,49:49,52:52}],188:[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(),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){C||d(),a.id===g.default.CC1||a.id===g.default.CC3?Z.push(a):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(na){y("TTML parser error: "+na.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 R=M.boxes[i];if(y("VTT box1: "+R.type),"vtte"!==R.type&&"vttc"===R.type)for(y("VTT vttc boxes.length = "+R.boxes.length),k=0;k<R.boxes.length;k++){var U=R.boxes[k];if(y("VTT box2: "+U.type),"payl"===U.type){var W=U.cue_text;y("VTT cue_text = "+W);var $=u.cts/T,ea=(u.cts+u.duration)/T;J.push({start:$,end:ea,data:W,styles:{}}),y("VTT "+$+"-"+ea+" : "+W)}}}}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(na){G.timedTextError(na,"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 fa=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 ga=l.lastSequenceNumber;if(!ca[0]&&!ca[1]){var ha=void 0,ia=void 0;for(f=0;f<Z.length;f++){if(Z[f].id===g.default.CC1?(0,ia=P.getTrackIdxForId(g.default.CC1)):Z[f].id===g.default.CC3&&(1,ia=P.getTrackIdxForId(g.default.CC3)),-1===ia)return void y("CEA-608: data before track is ready.");ha=fa(this,ia),ca[f]=new B.default.Cea608Parser(f,{newCue:ha},null)}}if(_&&-1==ba.indexOf(ga)){if(null!==aa&&ga!==aa+l.numSequences)for(f=0;f<ca.length;f++)ca[f]&&ca[f].reset();for(var ja=q(a,l.sampleList),ka=0;ka<ca.length;ka++){var la=ja.fields[ka],ma=ca[ka];if(ma)for(f=0;f<la.length;f++)ma.addData(la[f][0]/_,la[f][1])}aa=ga,ba.push(ga)}}}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,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)}
29
+ 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;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(100),g=d(f),h=a(229),i=a(221),j=d(i),k=a(72),l=d(k),m=a(193),n=d(m),o=a(195),p=d(o),q=a(49),r=d(q),s=a(47),t=d(s),u=a(189),v=d(u),w=a(184),x=d(w),y=a(11),z=d(y),A=a(2),B=d(A),C=a(48),D=d(C),E=a(52),F=d(E);e.__dashjs_factory_name="TextSourceBuffer",c.default=r.default.getSingletonFactory(e),b.exports=c.default},{100:100,11:11,184:184,189:189,193:193,195:195,2:2,221:221,229:229,47:47,48:48,49:49,52:52,72:72}],189:[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=R?document.createElement("track"):H.addTextTrack(b,c,d);return R&&(g.kind=b,g.label=c,g.srclang=d),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),R&&H.appendChild(f);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 in c){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))),d.addCue(i)}}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++)if(R)H.removeChild(J[b]);else{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(100),g=d(f),h=a(48),i=d(h),j=a(52),k=d(j),l=a(49),m=d(l),n=a(47),o=d(n),p=a(19);e.__dashjs_factory_name="TextTracks",c.default=m.default.getSingletonFactory(e),b.exports=c.default},{100:100,19:19,47:47,48:48,49:49,52:52}],190:[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(49),g=d(f),h=a(100),i=d(h),j=a(222),k=d(j),l=a(191),m=d(l),n=a(209),o=d(n),p=a(75);e.__dashjs_factory_name="ThumbnailController",c.default=g.default.getClassFactory(e),b.exports=c.default},{100:100,191:191,209:209,222:222,49:49,75:75}],191:[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(100),g=d(f),h=a(59),i=d(h),j=a(49),k=d(j),l=a(223),m=d(l),n=a(205),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},{100:100,205:205,223:223,49:49,59:59,75:75}],192:[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):void j.trigger(i.default.URL_RESOLUTION_FAILED,{error:new Error(r,s)})}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(48),g=d(f),h=a(52),i=d(h),j=a(105),k=d(j),l=a(208),m=d(l),n=a(207),o=d(n),p=a(49),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},{105:105,207:207,208:208,48:48,49:49,52:52}],193:[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 c=k.default.parseBuffer(a),d=(0,g.default)(b).create();return d.setData(c),d}var b=this.context;return{parse:a}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(200),g=d(f),h=a(49),i=d(h),j=a(11),k=d(j);e.__dashjs_factory_name="BoxParser",c.default=i.default.getSingletonFactory(e),b.exports=c.default},{11:11,200:200,49:49}],194:[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(49),g=d(f);e.__dashjs_factory_name="Capabilities",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{49:49}],195:[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(49),g=d(f);e.__dashjs_factory_name="CustomTimeRanges",c.default=g.default.getClassFactory(e),b.exports=c.default},{49:49}],196:[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(49),g=d(f),h=a(47),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},{47:47,49:49}],197:[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(49),g=d(f);e.__dashjs_factory_name="EBMLParser",c.default=g.default.getClassFactory(e),b.exports=c.default},{49:49}],198:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){k.trigger(i.default.ERROR,{error:"capability",event:a})}function b(a,b,c){k.trigger(i.default.ERROR,{error:"download",event:{id:a,url:b,request:c}})}function c(a,b,c,d){k.trigger(i.default.ERROR,{error:"manifestError",event:{message:a,id:b,manifest:c,event:d}})}function d(a,b,c){k.trigger(i.default.ERROR,{error:"cc",event:{message:a,id:b,cc:c}})}function e(a){k.trigger(i.default.ERROR,{error:"mediasource",event:a})}function f(a){k.trigger(i.default.ERROR,{error:"key_session",event:a})}function h(a){k.trigger(i.default.ERROR,{error:"key_message",event:a})}var j=this.context,k=(0,g.default)(j).getInstance();return{capabilityError:a,downloadError:b,manifestError:c,timedTextError:d,mediaSourceError:e,mediaKeySessionError:f,mediaKeyMessageError:h}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(48),g=d(f),h=a(52),i=d(h),j=a(49),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},{48:48,49:49,52:52}],199:[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(49),g=d(f);e.__dashjs_factory_name="InitCache",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{49:49}],200:[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(214),g=d(f),h=a(49),i=d(h);e.__dashjs_factory_name="IsoFile",c.default=i.default.getClassFactory(e),b.exports=c.default},{214:214,49:49}],201:[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(49),g=d(f);e.__dashjs_factory_name="LiveEdgeFinder",c.default=g.default.getClassFactory(e),b.exports=c.default},{49:49}],202:[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(49),g=d(f),h=a(14),i=d(h);e.__dashjs_factory_name="ObjectUtils",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{14:14,49:49}],203:[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(49),g=d(f);e.__dashjs_factory_name="RequestModifier",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{49:49}],204:[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=void 0,k="",l=[],o=void 0,p=void 0,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 k="no ttml data to parse",new Error(k);var u=(0,n.fromXML)(b,function(a){k=a},t);f.trigger(m.default.TTML_PARSED,{ttmlString:b,ttmlDoc:u});var v=u.getMediaTimeEvents();for(i=0;i<v.length;i++){var w=(0,n.generateISD)(u,v[i],function(a){k=a});for(j=0;j<w.contents.length;j++)w.contents[j].contents.length>=1&&(o=v[i]+c<d?d:v[i]+c,p=v[i+1]+c>g?g:v[i+1]+c,o<p&&l.push({start:o,end:p,type:"html",cueID:a(),isd:w,images:h,embeddedImages:q}))}if(""!==k&&e(k),l.length>0)return l;throw new Error(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(49),g=d(f),h=a(47),i=d(h),j=a(48),k=d(j),l=a(52),m=d(l),n=a(19);e.__dashjs_factory_name="TTMLParser",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{19:19,47:47,48:48,49:49,52:52}],205:[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(49),g=d(f);e.__dashjs_factory_name="URLUtils",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{49:49}],206:[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(49),g=d(f),h=a(47),i=d(h),j="WEBVTT";e.__dashjs_factory_name="VTTParser",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{47:47,49:49}],207:[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(49),g=d(f);e.__dashjs_factory_name="BasicSelector",c.default=g.default.getClassFactory(e),b.exports=c.default},{49:49}],208:[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(49),g=d(f);e.__dashjs_factory_name="DVBSelector",c.default=g.default.getClassFactory(e),b.exports=c.default},{49:49}],209:[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},{}],210:[function(a,b,c){"use strict";function d(a,b){
30
+ 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},{}],211:[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};c.default=e,b.exports=c.default},{}],212:[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},{}],213:[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(212),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},{212:212}],214:[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},{}],215:[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},{}],216:[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},{}],217:[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},{}],218:[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},{}],219:[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},{}],220:[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(100),i=d(h),j=a(212),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},{100:100,212:212}],221:[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},{}],222:[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},{}],223:[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},{}],224:[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},{}],225:[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},{}],226:[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(106),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},{106:106}],227:[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},{}],228:[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},{}],229:[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},{}],230:[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},{}],231:[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},{}],232:[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},{}],233:[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},{}],234:[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},{}],235:[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},{}]},{},[5]);
31
+ //# sourceMappingURL=dash.all.min.js.map
32
+
33
+
34
+ /*jslint browser: true, for: true */
35
+ /*global dashjs, flowplayer, MediaPlayer, window */
36
+
37
  /*!
38
 
39
+ DASH engine plugin for Flowplayer HTML5
40
 
41
+ Copyright (c) 2015-2017, Flowplayer Drive Oy
42
 
43
  Released under the MIT License:
44
  http://www.opensource.org/licenses/mit-license.php
45
 
46
+ Includes dash.js
47
+ Copyright (c) 2015, Dash Industry Forum. All rights reserved.
48
+ https://github.com/Dash-Industry-Forum/dash.js/blob/master/LICENSE.md
 
 
 
 
49
 
50
  Requires Flowplayer HTML5 version 6.x
51
+ $GIT_DESC$
52
 
53
  */
54
+ (function () {
55
+ "use strict";
56
+ var extension = function (dashjs, flowplayer) {
57
+ var engineName = "dash",
58
+ mse = window.MediaSource || window.WebKitMediaSource,
59
+ UA = navigator.userAgent,
60
+ common = flowplayer.common,
61
+ extend = flowplayer.extend,
62
+ version = flowplayer.version,
63
+ coreV6 = version.indexOf("6.") === 0,
64
+ dashconf,
65
+
66
+ dashCanPlay = function (sourceType, dashType, dashCodecs) {
67
+ return sourceType.toLowerCase() === "application/dash+xml" &&
68
+ mse.isTypeSupported(dashType + ';codecs="' + dashCodecs + '"') &&
69
+ // Android MSE advertises he-aac, but fails
70
+ (dashCodecs.indexOf("mp4a.40.5") < 0 || UA.indexOf("Android") < 0);
71
+ },
72
+
73
+ engineImpl = function dashjsEngine(player, root) {
74
+ var bean = flowplayer.bean,
75
+ support = flowplayer.support,
76
+ brwsr = support.browser,
77
+ desktopSafari = brwsr.safari && support.dataload, // exclude IEMobile
78
+ mediaPlayer,
79
+ videoTag,
80
+ handleError = function (errorCode, src, url) {
81
+ var errobj = {code: errorCode};
82
+
83
+ if (errorCode > 2) {
84
+ errobj.video = extend(player.video, {
85
+ src: src,
86
+ url: url || src
87
+ });
88
+ }
89
+ return errobj;
90
+ },
91
+
92
+ lastSelectedQuality = -1,
93
+ initQualitySelection = function (dashQualitiesConf, initialVideoQuality, data) {
94
+ // multiperiod not supported
95
+ var vsets = [],
96
+ qualities,
97
+ audioBandwidth = 0,
98
+ getLevel = function (q) {
99
+ return isNaN(Number(q))
100
+ ? q.level
101
+ : q;
102
+ },
103
+ setInitialVideoQuality = function (initialVideoQuality, vsets, qsel) {
104
+ initialVideoQuality = Math.min(initialVideoQuality, vsets.length - 1);
105
+ mediaPlayer.setAutoSwitchQualityFor("video", false);
106
+ mediaPlayer.setInitialBitrateFor("video", vsets[initialVideoQuality].bandwidth / 1000);
107
+ if (qsel) {
108
+ player.video.quality = -1;
109
+ }
110
+ player.one("progress." + engineName, function () {
111
+ mediaPlayer.setAutoSwitchQualityFor("video", true);
112
+ });
113
+ },
114
+ qselConf = dashQualitiesConf && support.inlineVideo &&
115
+ data.Period_asArray.length === 1 &&
116
+ (!desktopSafari || (desktopSafari && dashconf.qualitiesForSafari));
117
+
118
+ if (!qselConf && initialVideoQuality < 0) {
119
+ return;
120
+ }
121
+
122
+ data.Period_asArray[0].AdaptationSet_asArray.forEach(function (aset) {
123
+ var representations = aset.Representation_asArray,
124
+ mimeType = aset.mimeType || representations[0].mimeType;
125
+
126
+ if (mimeType.indexOf("video/") === 0) {
127
+ vsets = vsets.concat(representations.filter(function (repr) {
128
+ var codecs = (repr.mimeType || mimeType) + ";codecs=" + repr.codecs;
129
+
130
+ return mse.isTypeSupported(codecs);
131
+ }));
132
+ } else if (mimeType.indexOf("audio/") === 0 && !audioBandwidth) {
133
+ // too simple: audio tracks may have different bitrates
134
+ audioBandwidth = representations[0].bandwidth;
135
+ }
136
+ });
137
+ if (vsets.length < 2) {
138
+ return;
139
+ }
140
+
141
+ vsets.sort(function (a, b) {
142
+ return a.bandwidth - b.bandwidth;
143
+ });
144
+
145
+ if (!qselConf) {
146
+ setInitialVideoQuality(initialVideoQuality, vsets);
147
+ return;
148
+ }
149
+
150
+ switch (typeof dashQualitiesConf) {
151
+ case "object":
152
+ qualities = dashQualitiesConf.map(getLevel);
153
+ break;
154
+ case "string":
155
+ qualities = dashQualitiesConf.split(/\s*,\s*/).map(Number);
156
+ break;
157
+ default:
158
+ qualities = vsets.map(function (_repr, i) {
159
+ return i;
160
+ });
161
+ qualities.unshift(-1);
162
+ }
163
+ qualities = qualities.filter(function (q) {
164
+ return q < vsets.length && q > -2;
165
+ });
166
+
167
+ if (qualities.length < 2) {
168
+ return;
169
+ }
170
+
171
+ player.video.qualities = qualities.map(function (idx) {
172
+ var level = vsets[idx],
173
+ q = typeof dashQualitiesConf === "object"
174
+ ? dashQualitiesConf.filter(function (q) {
175
+ return getLevel(q) === idx;
176
+ })[0]
177
+ : idx,
178
+ label = q.label || (idx < 0
179
+ ? "Auto"
180
+ : Math.min(level.width, level.height) + "p " +
181
+ "(" + Math.round((level.bandwidth + audioBandwidth) / 1000) + "k)");
182
+
183
+ return {value: idx, label: label};
184
+ });
185
+
186
+ if (lastSelectedQuality < 0 && initialVideoQuality > -1) {
187
+ setInitialVideoQuality(initialVideoQuality, vsets, true);
188
+ } else if (qualities.indexOf(lastSelectedQuality) > -1) {
189
+ mediaPlayer.setAutoSwitchQualityFor("video", lastSelectedQuality < 0);
190
+ if (lastSelectedQuality > -1) {
191
+ mediaPlayer.setInitialBitrateFor("video", vsets[lastSelectedQuality].bandwidth / 1000);
192
+ }
193
+ player.video.quality = lastSelectedQuality;
194
+ } else {
195
+ player.video.quality = -1;
196
+ }
197
+ },
198
+ keySystem,
199
+
200
+ bc,
201
+ has_bg,
202
+
203
+ engine = {
204
+ engineName: engineName,
205
+
206
+ pick: function (sources) {
207
+ var source = sources.filter(function (s) {
208
+ var dashType = s.dashType || dashconf.type,
209
+ dashCodecs = s.dashCodecs || dashconf.codecs;
210
+
211
+ return dashCanPlay(s.type, dashType, dashCodecs);
212
+ })[0];
213
+
214
+ if (typeof source.src === 'string') {
215
+ source.src = common.createAbsoluteUrl(source.src);
216
+ }
217
+ return source;
218
+ },
219
+
220
+ load: function (video) {
221
+ var conf = player.conf,
222
+ dashUpdatedConf = extend(dashconf, conf.dash, video.dash),
223
+ dashQualitiesConf = video.dashQualities || conf.dashQualities,
224
+ EVENTS = {
225
+ ended: "finish",
226
+ loadeddata: "ready",
227
+ pause: "pause",
228
+ play: "resume",
229
+ progress: "buffer",
230
+ ratechange: "speed",
231
+ seeked: "seek",
232
+ timeupdate: "progress",
233
+ volumechange: "volume",
234
+ error: "error"
235
+ },
236
+ DASHEVENTS = dashjs.MediaPlayer.events,
237
+ protection = video.dash && video.dash.protection,
238
+ autoplay = !!video.autoplay || !!conf.autoplay || !!conf.splash,
239
+ posterClass = "is-poster",
240
+ livestartpos = 0;
241
+
242
+ if (video.dashQualities === false || coreV6) {
243
+ dashQualitiesConf = false;
244
+ } else if (dashQualitiesConf === undefined) {
245
+ dashQualitiesConf = true;
246
+ }
247
+
248
+ if (!mediaPlayer) {
249
+ videoTag = common.findDirect("video", root)[0]
250
+ || common.find(".fp-player > video", root)[0];
251
+
252
+ if (videoTag) {
253
+ // destroy video tag
254
+ // otherwise <video autoplay> continues to play
255
+ common.find("source", videoTag).forEach(function (source) {
256
+ source.removeAttribute("src");
257
+ });
258
+ videoTag.removeAttribute("src");
259
+ videoTag.load();
260
+ common.removeNode(videoTag);
261
+ }
262
+
263
+ // dash.js enforces preload="auto" and
264
+ // autoplay depending on initialization
265
+ // so setting the attributes here will have no effect
266
+ videoTag = common.createElement("video", {
267
+ "class": "fp-engine " + engineName + "-engine"
268
+ });
269
+ if (support.mutedAutoplay && !conf.splash && autoplay) {
270
+ videoTag.muted = true;
271
+ }
272
+
273
+ Object.keys(EVENTS).forEach(function (key) {
274
+ var flow = EVENTS[key],
275
+ type = key + "." + engineName,
276
+ arg;
277
+
278
+ bean.on(videoTag, type, function (e) {
279
+ if (conf.debug && flow.indexOf("progress") < 0) {
280
+ console.log(type, "->", flow, e.originalEvent);
281
+ }
282
+
283
+ var vct = videoTag.currentTime,
284
+ ct = (mediaPlayer.time && mediaPlayer.time()) || vct,
285
+ dur = mediaPlayer.duration(),
286
+ buffered = videoTag.buffered,
287
+ buffends = [],
288
+ i,
289
+ updatedVideo = player.video,
290
+ src = updatedVideo.src,
291
+ errorCode;
292
+
293
+ switch (flow) {
294
+ case "ready":
295
+ arg = extend(updatedVideo, {
296
+ duration: dur,
297
+ seekable: dur,
298
+ width: videoTag.videoWidth,
299
+ height: videoTag.videoHeight,
300
+ url: src
301
+ });
302
+ break;
303
+ case "resume":
304
+ if (coreV6 && player.poster) {
305
+ common.removeClass(root, posterClass);
306
+ player.poster = false;
307
+ }
308
+ break;
309
+ case "seek":
310
+ arg = ct;
311
+ break;
312
+ case "progress":
313
+ if (player.live && !player.dvr) {
314
+ if (!livestartpos && vct) {
315
+ livestartpos = vct;
316
+ }
317
+ arg = vct - livestartpos;
318
+ } else {
319
+ arg = ct;
320
+ }
321
+ break;
322
+ case "speed":
323
+ // dash.js often triggers playback rate changes
324
+ // when adapting bit rate
325
+ // except when in debug mode, only
326
+ // trigger explicit events via speed method
327
+ if (!dashUpdatedConf.debug) {
328
+ e.preventDefault();
329
+ return;
330
+ }
331
+ arg = videoTag.playbackRate;
332
+ break;
333
+ case "volume":
334
+ arg = videoTag.volume;
335
+ break;
336
+ case "buffer":
337
+ for (i = 0; i < buffered.length; i += 1) {
338
+ buffends.push(buffered.end(i));
339
+ }
340
+ arg = buffends.filter(function (b) {
341
+ return b >= ct;
342
+ }).sort()[0];
343
+ updatedVideo.buffer = arg;
344
+ break;
345
+ case "error":
346
+ errorCode = videoTag.error && videoTag.error.code;
347
+ arg = handleError(errorCode, src);
348
+ break;
349
+ }
350
+
351
+ player.trigger(flow, [player, arg]);
352
+ });
353
+ });
354
+
355
+ player.on("error." + engineName, function () {
356
+ if (mediaPlayer) {
357
+ player.engine.unload();
358
+ }
359
+ });
360
+
361
+ if (!coreV6) {
362
+ player.on("quality." + engineName, function (_e, _api, q) {
363
+ mediaPlayer.setAutoSwitchQualityFor("video", q < 0);
364
+ if (q > -1) {
365
+ mediaPlayer.setLimitBitrateByPortal(false);
366
+ mediaPlayer.setUsePixelRatioInLimitBitrateByPortal(false);
367
+ mediaPlayer.setQualityFor("video", q);
368
+ } else {
369
+ mediaPlayer.setLimitBitrateByPortal(true);
370
+ mediaPlayer.setUsePixelRatioInLimitBitrateByPortal(true);
371
+ }
372
+ lastSelectedQuality = q;
373
+ });
374
+
375
+ } else if (conf.poster) {
376
+ var posterHack = function (e) {
377
+ if (e.type === "stop" || !autoplay) {
378
+ setTimeout(function () {
379
+ if (!player.poster) {
380
+ common.addClass(root, posterClass);
381
+ player.poster = true;
382
+ }
383
+ });
384
+ }
385
+ };
386
+
387
+ player.one("ready." + engineName, posterHack).on("stop." + engineName, posterHack);
388
+ }
389
+
390
+ common.prepend(common.find(".fp-player", root)[0], videoTag);
391
+
392
+ } else {
393
+ mediaPlayer.reset();
394
+ }
395
+
396
+ mediaPlayer = dashjs.MediaPlayer().create();
397
+ player.engine[engineName] = mediaPlayer;
398
+
399
+ if (protection) {
400
+ mediaPlayer.setProtectionData(protection);
401
+ mediaPlayer.on(dashjs.Protection.events.KEY_SYSTEM_SELECTED, function (e) {
402
+ keySystem = e.data.keySystem.systemString;
403
+ });
404
+ }
405
+ // caching can cause failures in playlists
406
+ // for the moment disable entirely
407
+ mediaPlayer.enableLastBitrateCaching(false);
408
+ // for seeking in paused state
409
+ mediaPlayer.setScheduleWhilePaused(true);
410
+ mediaPlayer.setFastSwitchEnabled(UA.indexOf("Trident/7") < 0);
411
+ mediaPlayer.getDebug().setLogToBrowserConsole(dashUpdatedConf.debug);
412
+ // live
413
+ if (typeof dashUpdatedConf.liveDelay === "number") {
414
+ mediaPlayer.setLiveDelay(dashUpdatedConf.liveDelay);
415
+ }
416
+ if (typeof dashUpdatedConf.liveDelayFragmentCount === "number") {
417
+ mediaPlayer.setLiveDelayFragmentCount(dashUpdatedConf.liveDelayFragmentCount);
418
+ }
419
+ mediaPlayer.useSuggestedPresentationDelay(dashUpdatedConf.useSuggestedPresentationDelay);
420
+
421
+ if (dashUpdatedConf.xhrWithCredentials && dashUpdatedConf.xhrWithCredentials.length) {
422
+ dashUpdatedConf.xhrWithCredentials.forEach(function (requestType) {
423
+ mediaPlayer.setXHRWithCredentialsForType(requestType, true);
424
+ });
425
+ }
426
+
427
+ Object.keys(DASHEVENTS).forEach(function (key) {
428
+ var etype = DASHEVENTS[key],
429
+ fpEventType = engineName + etype.charAt(0).toUpperCase() + etype.slice(1),
430
+ listeners = dashUpdatedConf.listeners,
431
+ expose = listeners && listeners.indexOf(fpEventType) > -1;
432
+
433
+ mediaPlayer.on(etype, function (e) {
434
+ var src = player.video.src,
435
+ videoDashConf = player.video.dash,
436
+ loadingClass = "is-loading",
437
+ errors = player.conf.errors,
438
+ protectionError = "None of the protection key systems supported. Try a different browser.",
439
+ fperr,
440
+ errobj;
441
+
442
+ switch (key) {
443
+ case "MANIFEST_LOADED":
444
+ if (brwsr.chrome && videoDashConf && videoDashConf.protectionLevel) {
445
+ mediaPlayer.getProtectionController().setRobustnessLevel(videoDashConf.protectionLevel);
446
+ }
447
+ initQualitySelection(dashQualitiesConf,
448
+ dashUpdatedConf.initialVideoQuality, e.data);
449
+ break;
450
+ case "CAN_PLAY":
451
+ if (desktopSafari && autoplay) {
452
+ // hack to avoid "heaving" in Safari
453
+ // at least in splash setups and playlist transitions
454
+ common.addClass(root, loadingClass);
455
+ bean.one(videoTag, "timeupdate." + engineName, function () {
456
+ setTimeout(function () {
457
+ common.removeClass(root, loadingClass);
458
+ });
459
+ });
460
+ }
461
+ break;
462
+ case "BUFFER_LEVEL_STATE_CHANGED":
463
+ common.toggleClass(root, "is-seeking", e.state === "bufferStalled");
464
+ break;
465
+ case "ERROR":
466
+ switch (e.error) {
467
+ case "capability":
468
+ if (e.event === "encryptedmedia" && protection && !keySystem) {
469
+ errors.push(protectionError);
470
+ fperr = errors.length - 1;
471
+ } else {
472
+ fperr = 5;
473
+ }
474
+ break;
475
+ case "download":
476
+ fperr = 4;
477
+ break;
478
+ case "manifestError":
479
+ fperr = 5;
480
+ break;
481
+ case "mediasource":
482
+ switch (e.event) {
483
+ case "MEDIA_ERR_DECODE":
484
+ fperr = 3;
485
+ break;
486
+ case "MEDIA_ERR_SRC_NOT_SUPPORTED":
487
+ fperr = 5;
488
+ break;
489
+ case "MEDIA_ERR_NETWORK":
490
+ fperr = 2;
491
+ break;
492
+ case "MEDIA_ERR_ABORTED":
493
+ fperr = 1;
494
+ break;
495
+ }
496
+ break;
497
+ default:
498
+ fperr = 5;
499
+ }
500
+ errobj = handleError(fperr, src, e.event.url);
501
+ player.trigger('error', [player, errobj]);
502
+ break;
503
+ }
504
+
505
+ if (expose) {
506
+ player.trigger(fpEventType, [player, e]);
507
+ }
508
+ });
509
+ });
510
+
511
+ keySystem = null;
512
+
513
+ // update video object before ready
514
+ player.video = video;
515
+ if( video.manifest ) {
516
+ mediaPlayer.initialize(videoTag,false,autoplay);
517
+
518
+ var XlinkController = dashjs.FactoryMaker.getClassFactory({ '__dashjs_factory_name': 'XlinkController' });
519
+ var xlink = XlinkController({}).create({ errHandler: function(e,f,g,h) {console.log('FV Player XlinkController error',e,f,g,h)} });
520
+
521
+ var DashParserFactory = dashjs.FactoryMaker.getClassFactory({ '__dashjs_factory_name': 'DashParser' });
522
+ var mpdParser = DashParserFactory({}).create( {errorHandler: { manifestError: function(e,f,g,h) {console.log('FV Player DashParser error',e,h)} } } );
523
+ var manifest = mpdParser.parse(video.manifest,xlink);
524
+ manifest.loadedTime = new Date;
525
+ mediaPlayer.attachSource(manifest);
526
+
527
+ } else {
528
+ mediaPlayer.initialize(videoTag, video.src, autoplay);
529
+ }
530
+
531
+ if (!support.firstframe && support.dataload && !brwsr.mozilla &&
532
+ autoplay && videoTag.paused) {
533
+ videoTag.load();
534
+ }
535
+ },
536
+
537
+ resume: function () {
538
+ mediaPlayer.play();
539
+ },
540
+
541
+ pause: function () {
542
+ mediaPlayer.pause();
543
+ },
544
+
545
+ seek: function (time) {
546
+ mediaPlayer.seek(time);
547
+ },
548
+
549
+ volume: function (level) {
550
+ if (videoTag) {
551
+ videoTag.volume = level;
552
+ }
553
+ },
554
+
555
+ speed: function (val) {
556
+ videoTag.playbackRate = val;
557
+ // see ratechange/speed event
558
+ player.trigger('speed', [player, val]);
559
+ },
560
+
561
+ unload: function () {
562
+ if (mediaPlayer) {
563
+ var listeners = "." + engineName;
564
+
565
+ mediaPlayer.reset();
566
+ mediaPlayer = 0;
567
+ player.off(listeners);
568
+ bean.off(root, listeners);
569
+ bean.off(videoTag, listeners);
570
+ common.removeNode(videoTag);
571
+ videoTag = 0;
572
+ }
573
+ }
574
+ };
575
+
576
+ // pre 6.0.4: no boolean api.conf.poster and no poster with autoplay
577
+ if (/^6\.0\.[0-3]$/.test(version) &&
578
+ !player.conf.splash && !player.conf.poster && !player.conf.autoplay) {
579
+ bc = common.css(root, 'backgroundColor');
580
+ // spaces in rgba arg mandatory for recognition
581
+ has_bg = common.css(root, 'backgroundImage') !== "none" ||
582
+ (bc && bc !== "rgba(0, 0, 0, 0)" && bc !== "transparent");
583
+ if (has_bg) {
584
+ player.conf.poster = true;
585
+ }
586
+ }
587
+
588
+ return engine;
589
+ };
590
+
591
+ if (mse && typeof mse.isTypeSupported === "function" && version.indexOf("5.") !== 0) {
592
+ // only load engine if it can be used
593
+ engineImpl.engineName = engineName; // must be exposed
594
+ engineImpl.canPlay = function (type, conf) {
595
+ /*
596
+ WARNING: MediaSource.isTypeSupported very inconsistent!
597
+ e.g. Safari ignores codecs entirely, even bogus, like codecs="XYZ"
598
+ example avc3 main level 3.1 + aac_he: avc3.4d401f; mp4a.40.5
599
+ example avc1 high level 4.1 + aac_lc: avc1.640029; mp4a.40.2
600
+ default: avc1 baseline level 3.0 + aac_lc
601
+ */
602
+ // inject dash conf at earliest opportunity
603
+ dashconf = extend({
604
+ type: "video/mp4",
605
+ codecs: "avc1.42c01e,mp4a.40.2",
606
+ initialVideoQuality: -1,
607
+ qualitiesForSafari: true
608
+ }, conf[engineName], conf.clip[engineName]);
609
+
610
+ return dashCanPlay(type, dashconf.type, dashconf.codecs);
611
+ };
612
+
613
+ // put on top of engine stack
614
+ // so mpegedash is tested before html5
615
+ flowplayer.engines.unshift(engineImpl);
616
+
617
+ }
618
+
619
+ };
620
+ if (typeof module === 'object' && module.exports) {
621
+ module.exports = extension.bind(undefined, require('dashjs'));
622
+ } else if (window.dashjs && window.flowplayer) {
623
+ extension(window.dashjs, window.flowplayer);
624
+ }
625
+ }());
flowplayer-beta/flowplayer.hlsjs.min.js CHANGED
@@ -22,7 +22,7 @@
22
  !function(t){function e(i){if(r[i])return r[i].exports;var a=r[i]={exports:{},id:i,loaded:!1};return t[i].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(5)},function(t,e,r){!function(){"use strict";var e=function(t,e){var i,a="hlsjs",n=e.common,o=e.extend,s=e.support,l=s.browser,u=e.version,d=0===u.indexOf("6."),c=window,f=c.MediaSource||c.WebKitMediaSource,h=c.performance,p=function(t){return t.toLowerCase().indexOf("mpegurl")>-1},g=function(t){var e=t.clip&&t.clip.hlsQualities||t.hlsQualities;return s.inlineVideo&&(e===!0||e&&e.length)},v=function(t){var e=n.findDirect("video",t)[0]||n.find(".fp-player>video",t)[0];e&&(n.find("source",e).forEach(function(t){t.removeAttribute("src")}),e.removeAttribute("src"),e.load(),n.removeNode(e))},m=r(3),y=new m.TextDecoder("utf-8"),b=function(t){var e="";try{e=y.decode(t)}catch(r){try{y=new m.TextDecoder("utf-16be"),e=y.decode(t)}catch(r){try{y=new m.TextDecoder("utf-16le"),e=y.decode(t)}catch(t){}}}return e},E=function(t,e,r){e.title=e.title||r+"";var i={time:e.startTime,subtitle:e,visible:!1};t.subtitles.push(e),t.addCuepoint(i),t.addCuepoint({time:e.endTime,subtitleEnd:e.title,visible:!1}),0!==e.startTime||t.video.time||t.splash||t.trigger("cuepoint",[t,i]),t.splash&&t.one("ready."+a,function(){t.trigger("cuepoint",[t,i])})},T=function(r,l){var c,m,y,T,R,S,A,w,_,L,k,D=e.bean,I="is-seeking",O="is-poster",C=function(t,e,i){if(t.debug&&console.log("recovery."+a,"<-",e),n.removeClass(l,"is-paused"),n.addClass(l,I),i)m.startLoad();else{var o=h.now();!T||o-T>3e3?(T=h.now(),m.recoverMediaError()):(!R||o-R>3e3)&&(R=h.now(),m.swapAudioCodec(),m.recoverMediaError())}y>0&&(y-=1),D.one(c,"seeked."+a,function(){c.paused&&(n.removeClass(l,O),r.poster=!1,c.play()),n.removeClass(l,I)})},x=function(t,e,i){var a={code:t};return t>2&&(a.video=o(r.video,{src:e,url:i||e})),a},P=function(){D.one(c,"timeupdate."+a,function(){n.addClass(l,O),r.poster=!0})},F=function(){d&&r.poster&&D.one(c,"timeupdate."+a,function(){n.removeClass(l,O),r.poster=!1})},N=0,M=function(t){if(w&&w.length>1){var e=m.audioTracks,r=e.filter(function(r){var i=m.levels[t].attrs;return r.autoselect&&i&&r.groupId===i.AUDIO&&r.name===e[m.audioTrack].name}),i=r.length&&r[0].id;void 0!==i&&i!==m.audioTrack&&(m.audioTrack=i)}},U=function(t){n.find(".fp-audio",l)[0].innerHTML=t.lang||t.name,n.find(".fp-audio-menu a",l).forEach(function(e){var r=e.getAttribute("data-audio"),i=r===t.name;n.toggleClass(e,"fp-selected",i),n.toggleClass(e,"fp-color",i)})},B=function(){n.find(".fp-audio-menu",l).forEach(n.removeNode),n.find(".fp-audio",l).forEach(n.removeNode)},G=function(t){var e=n.find(".fp-subtitle-menu",l)[0];n.toggleClass(n.find("a.fp-selected",e)[0],"fp-selected"),n.toggleClass(n.find('a[data-subtitle-index="'+t+'"]',e)[0],"fp-selected")},j=function(t,e){var i=b(t.payload),a=t.frag.trackId;i&&(k[a]||(k[a]=[]),i=e.subtitleParser(i),i.forEach(function(t){if(t.text&&(k[a].push(t),r.ready&&(E(r,t,k[a].length),r.live))){var e=r.video.seekOffset;k[a]=k[a].filter(function(t){return t.endTime>=e}),r.subtitles=r.subtitles.filter(function(t){return t.endTime>=e}),r.cuepoints.forEach(function(t){t.subtitle&&t.time<e&&r.removeCuepoint(t)})}}))},K=function(){[].forEach.call(c.textTracks,function(t){"subtitles"===t.kind&&(t.mode="hidden")})},H=function(t,e){var i=t.subtitleTracks;e.subtitles&&i.length&&s.inlineVideo&&!d&&(i=i.filter(function(t){return t.groupId===i[0].groupId}),r.video.subtitles=i.map(function(t){var e={kind:"subtitles",id:t.id,srclang:t.lang,label:t.name,default:t.default};return n.append(c,n.createElement("track",e)),e}),r.on("ready."+a,function(t,e){var r,i=m.subtitleTracks;i&&i.length&&(L?n.addClass(c,"native-subtitles"):K(),i.map(function(t,e){t.default&&(m.subtitleTrack=e)}),r=m.subtitleTrack,r>-1?(!L&&k[r]&&k[r].forEach(function(t,r){E(e,t,r+1)}),G(r)):G(-1))}),D.on(l,"click."+a,".fp-subtitle-menu [data-subtitle-index]",function(t){t.preventDefault();var e=t.target.getAttribute("data-subtitle-index");return r.disableSubtitles(),m.subtitleTrack=e,e<0?void K():(G(e),void(!L&&k[e]&&k[e].forEach(function(t,e){E(r,t,e+1)})))}))},W=function(t){w=[],_=[],t.levels.forEach(function(t){var e=t.attrs&&t.attrs.AUDIO,r=t.audioCodec;e&&w.indexOf(e)<0&&(!r||f.isTypeSupported("audio/mp4;codecs="+r))&&w.push(e)}),w.length&&(_=t.audioTracks.filter(function(t){return t.groupId===w[0]})),!s.inlineVideo||d||_.length<2||(D.on(l,"click."+a,".fp-audio",function(){var t=n.find(".fp-audio-menu",l)[0];n.hasClass(t,"fp-active")?r.hideMenu():r.showMenu(t)}),D.on(l,"click."+a,".fp-audio-menu a",function(t){var e=t.target.getAttribute("data-audio"),r=m.audioTracks,i=r[m.audioTrack].groupId,a=r.filter(function(t){return t.groupId===i&&(t.name===e||t.lang===e)})[0];m.audioTrack=a.id,U(a)}),r.on("ready."+a,function(){if(B(),m&&_&&!(_.length<2)){var t=n.find(".fp-ui",l)[0],e=n.find(".fp-controls",t)[0],r=m.audioTracks[m.audioTrack],i=n.createElement("div",{className:"fp-menu fp-audio-menu",css:{width:"auto"}},"<strong>Audio</strong>");_.forEach(function(t){i.appendChild(n.createElement("a",{"data-audio":t.name},t.name))}),t.appendChild(i),e.appendChild(n.createElement("strong",{className:"fp-audio"},r)),U(r)}}))},V="active",q=function(t){return t?r.qualities.indexOf(t)<0&&(t="abr"):t=r.quality,t.toLowerCase().replace(/\ /g,"")},Y=function(){var t=r.qualities;t&&(n.removeClass(l,"quality-abr"),t.forEach(function(t){n.removeClass(l,"quality-"+q(t))}))},z=function(){d&&(delete r.hlsQualities,Y(),n.find(".fp-quality-selector",l).forEach(n.removeNode))},X=function(){return r.hlsQualities[r.qualities.indexOf(r.quality)+1]},Q=-1,J=function(t,e,i){var o,s,u,h=i.levels,p=function(t){return isNaN(Number(t))?t.level:t};if(z(),t&&!(h.length<2)){if("drive"===t){switch(h.length){case 4:o=[1,2,3];break;case 5:o=[1,2,3,4];break;case 6:o=[1,3,4,5];break;case 7:o=[1,3,5,6];break;case 8:o=[1,3,6,7];break;default:if(h.length<3||h[0].height&&h[2].height&&h[0].height===h[2].height)return;o=[1,2]}o.unshift(-1)}else switch(typeof t){case"object":o=t.map(p);break;case"string":o=t.split(/\s*,\s*/).map(Number);break;default:o=h.map(function(t,e){return e}),o.unshift(-1)}if(d&&o.indexOf(-1)<0&&o.unshift(-1),o=o.filter(function(t){if(t>-1&&t<h.length){var e=h[t];return!e.videoCodec||e.videoCodec&&f.isTypeSupported("video/mp4;codecs="+e.videoCodec)}return t===-1}),s=o.map(function(e,r){var i=h[e],a="object"==typeof t?t.filter(function(t){return p(t)===e})[0]:e,n="Level "+(r+1);return e<0?n=a.label||"Auto":a.label?n=a.label:(i.width&&i.height&&(n=Math.min(i.width,i.height)+"p"),"drive"!==t&&i.bitrate&&(n+=" ("+Math.round(i.bitrate/1e3)+"k)")),d?n:{value:e,label:n}}),!d)return r.video.qualities=s,Q>-1||o.indexOf(-1)<0?(m.loadLevel=o.indexOf(Q)<0?o[0]:Q,m.config.startLevel=m.loadLevel,r.video.quality=m.loadLevel):r.video.quality=-1,void(Q=r.video.quality);r.hlsQualities=o,r.qualities=s.slice(1),u=n.createElement("ul",{class:"fp-quality-selector"}),n.find(".fp-ui",l)[0].appendChild(u),!r.quality||s.indexOf(r.quality)<1?r.quality="abr":(m.loadLevel=X(),m.config.startLevel=m.loadLevel),s.forEach(function(t){u.appendChild(n.createElement("li",{"data-quality":q(t)},t))}),n.addClass(l,"quality-"+q()),D.on(l,"click."+a,".fp-quality-selector li",function(t){var i=t.currentTarget,o=n.find(".fp-quality-selector li",l),s=e.smoothSwitching,u=c.paused;n.hasClass(i,V)||(u||s||D.one(c,"pause."+a,function(){n.removeClass(l,"is-paused")}),o.forEach(function(t,e){var a=t===i;a&&(r.quality=e>0?r.qualities[e-1]:"abr",s&&!r.poster?m.nextLevel=X():m.currentLevel=X(),n.addClass(i,V),u&&c.play()),n.toggleClass(t,V,a)}),Y(),n.addClass(l,"quality-"+q()))})}},$={engineName:a,pick:function(t){var e=t.filter(function(t){return p(t.type)})[0];return"string"==typeof e.src&&(e.src=n.createAbsoluteUrl(e.src)),e},load:function(e){var u=r.conf,f={ended:"finish",loadeddata:"ready",pause:"pause",play:"resume",progress:"buffer",ratechange:"speed",seeked:"seek",timeupdate:"progress",volumechange:"volume",error:"error"},h=t.Events,p=!!e.autoplay||!!u.autoplay||!!u.splash,E=e.hlsQualities||u.hlsQualities,S=o(i,u.hlsjs,e.hlsjs),A=o({},S);if(e.hlsQualities===!1&&(E=!1),L=S.subtitles&&s.subtitles&&u.nativesubtitles,m?(m.destroy(),n.find("track",c).forEach(n.removeNode),n.removeClass(c,"native-subtitles"),(r.video.src&&e.src!==r.video.src||e.index)&&n.attr(c,"autoplay","autoplay")):(v(l),c=n.createElement("video",{class:"fp-engine "+a+"-engine",autoplay:!!p&&"autoplay",volume:r.volumeLevel}),s.mutedAutoplay&&!u.splash&&p&&(c.muted=!0),Object.keys(f).forEach(function(t){var e,i=f[t],s=t+"."+a;D.on(c,s,function(t){u.debug&&i.indexOf("progress")<0&&console.log(s,"->",i,t.originalEvent);var a,f,h,p=c.currentTime,g=c.seekable,v=r.video,y=r.dvr?v.seekOffset:r.live?m.liveSyncPosition:0,b=c.buffered,E=[],T=v.src,R=r.quality;switch(i){case"ready":e=o(v,{duration:c.duration,seekable:g.length&&g.end(null),width:c.videoWidth,height:c.videoHeight,url:T});break;case"resume":F(),S.bufferWhilePaused||m.startLoad(p),p<y&&(c.currentTime=y);break;case"seek":F(),!S.bufferWhilePaused&&c.paused&&m.stopLoad(),e=p;break;case"pause":S.bufferWhilePaused||m.stopLoad();break;case"progress":e=p;break;case"speed":e=c.playbackRate;break;case"volume":e=c.volume;break;case"buffer":for(a=0;a<b.length;a+=1)E.push(b.end(a));e=E.filter(function(t){return t>=p}).sort()[0],v.buffer=e;break;case"finish":S.bufferWhilePaused&&m.autoLevelEnabled&&(v.loop||u.playlist.length<2||u.advance===!1)&&(m.nextLoadLevel=N);break;case"error":if(h=c.error&&c.error.code,S.recoverMediaError&&(3===h||!h)||S.recoverNetworkError&&2===h||S.recover&&(2===h||3===h))return t.preventDefault(),void C(u,i,2===h);e=x(h,T)}r.trigger(i,[r,e]),d&&"ready"===i&&R&&(f="abr"===R?0:r.qualities.indexOf(R)+1,n.addClass(n.find(".fp-quality-selector li",l)[f],V))})}),r.on("error."+a,function(){m&&r.engine.unload()}).on("beforeseek."+a,function(t,e,r){void 0===r?t.preventDefault():!S.bufferWhilePaused&&e.paused&&m.startLoad(r)}),d?u.poster&&(r.on("stop."+a,P),!r.live||p||r.video.autoplay||D.one(c,"seeked."+a,P)):r.on("quality."+a,function(t,e,r){S.smoothSwitching?m.nextLevel=r:m.currentLevel=r,Q=r}),n.prepend(n.find(".fp-player",l)[0],c)),r.video=e,N=0,Object.keys(S).forEach(function(e){t.DefaultConfig.hasOwnProperty(e)||delete A[e];var r=S[e];switch(e){case"adaptOnStartOnly":r&&(A.startLevel=-1);break;case"autoLevelCapping":r===!1&&(r=-1),A[e]=r;break;case"startLevel":switch(r){case"auto":r=-1;break;case"firstLevel":r=void 0}A[e]=r;break;case"recover":S.recoverMediaError=!1,S.recoverNetworkError=!1,y=r;break;case"strict":r&&(S.recoverMediaError=!1,S.recoverNetworkError=!1,y=0)}}),m=new t(A),r.engine[a]=m,T=null,R=null,r.disableSubtitles(),k={},Object.keys(h).forEach(function(e){var i=h[e],s=S.listeners,f=s&&s.indexOf(i)>-1;m.on(i,function(i,s){var h,p={},v=t.ErrorTypes,T=t.ErrorDetails,R=r.video,A=R.src;switch(e){case"MANIFEST_PARSED":!g(u)||!d&&r.pluginQualitySelectorEnabled?d&&delete r.quality:J(E,S,s);break;case"MANIFEST_LOADED":W(s);break;case"SUBTITLE_TRACKS_UPDATED":H(s,S);break;case"MEDIA_ATTACHED":m.loadSource(A);break;case"FRAG_LOADED":"subtitle"===s.frag.type&&S.subtitles&&!L&&j(s,u),S.bufferWhilePaused&&!r.live&&m.autoLevelEnabled&&m.nextLoadLevel>N&&(N=m.nextLoadLevel);break;case"SUBTITLE_TRACK_SWITCH":L&&[].forEach.call(c.textTracks,function(t){t.mode=m.subtitleTracks[s.id].lang===t.language&&"subtitles"===t.kind?"showing":"hidden"});break;case"FRAG_PARSING_METADATA":if(d)return;s.samples.forEach(function(t){var e;e=function(){if(!(c.currentTime<t.dts)){D.off(c,"timeupdate."+a,e);var i=b(t.unit||t.data);r.trigger("metadata",[r,{key:i.substr(10,4),data:i}])}},D.on(c,"timeupdate."+a,e)});break;case"LEVEL_UPDATED":r.live&&(o(R,{seekOffset:s.details.fragments[0].start+m.config.nudgeOffset,duration:m.liveSyncPosition}),r.dvr&&r.playing&&r.trigger("dvrwindow",[r,{start:R.seekOffset,end:m.liveSyncPosition}]));break;case"LEVEL_SWITCHED":S.audioABR&&r.one("buffer."+a,function(t,e,r){r>e.video.time&&M(s.level)});break;case"BUFFER_APPENDED":n.removeClass(l,I);break;case"ERROR":if(s.fatal||S.strict){switch(s.type){case v.NETWORK_ERROR:S.recoverNetworkError||y?C(u,s.type,!0):s.frag&&s.frag.url?(p.url=s.frag.url,h=2):h=4;break;case v.MEDIA_ERROR:S.recoverMediaError||y?C(u,s.type):h=3;break;default:h=5}void 0!==h&&(p=x(h,A,s.url),r.trigger("error",[r,p]))}else s.details!==T.FRAG_LOOP_LOADING_ERROR&&s.details!==T.BUFFER_STALLED_ERROR||n.addClass(l,I)}f&&r.trigger(i,[r,s])})}),S.adaptOnStartOnly&&D.one(c,"timeupdate."+a,function(){m.loadLevel=m.loadLevel}),m.attachMedia(c),p&&c.paused){var w=c.play();void 0!==w&&w.catch(function(){s.mutedAutoplay||(r.unload(),d||r.message("Please click the play button",3e3))})}},resume:function(){c.play()},pause:function(){c.pause()},seek:function(t){c&&(c.currentTime=t)},volume:function(t){c&&(c.volume=t)},speed:function(t){c.playbackRate=t,r.trigger("speed",[r,t])},unload:function(){if(m){var t="."+a;r.disableSubtitles(),m.destroy(),m=0,z(),B(),r.off(t),D.off(l,t),D.off(c,t),n.removeNode(c),c=0}}};return!/^6\.0\.[0-3]$/.test(u)||r.conf.splash||r.conf.poster||r.conf.autoplay||(S=n.css(l,"backgroundColor"),A="none"!==n.css(l,"backgroundImage")||S&&"rgba(0, 0, 0, 0)"!==S&&"transparent"!==S,A&&(r.conf.poster=!0)),$};t.isSupported()&&0!==u.indexOf("5.")&&(T.engineName=a,T[a+"ClientVersion"]=t.version,T.canPlay=function(t,e){return e[a]!==!1&&e.clip[a]!==!1&&(i=o({bufferWhilePaused:!0,smoothSwitching:!0,recoverMediaError:!0},e[a],e.clip[a]),p(t)&&(!(l.safari&&s.dataload)||i.safari))},e(function(t,e){var r=t.conf;d?t.pluginQualitySelectorEnabled=g(r)&&T.canPlay("application/x-mpegurl",r):!s.mutedAutoplay||r.splash||r.autoplay||"7.1.0"!==u&&"7.0.0"!==u||(t.splash=!0,r.splash="string"!=typeof r.poster||r.poster,r.poster=void 0,r.autoplay=!0,v(e))}),e.engines.unshift(T))};"object"==typeof t&&t.exports?t.exports=e.bind(void 0,r(2)):window.Hls&&window.flowplayer&&e(window.Hls,window.flowplayer)}()},function(t,e,r){!function(e,r){t.exports=r()}(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=7)}([function(t,e,r){"use strict";function i(){}function a(t,e){return e="["+t+"] > "+e}function n(t){var e=self.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(self.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){u[e]=t[e]?t[e].bind(t):n(e)})}r.d(e,"a",function(){return d}),r.d(e,"b",function(){return c});var s="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},l={trace:i,debug:i,log:i,warn:i,info:i,error:i},u=l,d=function(t){if(t===!0||"object"===("undefined"==typeof t?"undefined":s(t))){o(t,"debug","log","info","warn","error");try{u.log()}catch(t){u=l}}else u=l},c=u},function(t,e,r){"use strict";e.a={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCH:"hlsLevelSwitch",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},function(t,e,r){"use strict";r.d(e,"b",function(){return i}),r.d(e,"a",function(){return a});var i={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},a={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(){i(this,t)}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,r){for(var i=r,a=0;t.isHeader(e,r);){a+=10;var n=t._readSize(e,r+6);a+=n,t.isFooter(e,r+10)&&(a+=10),r+=a}if(a>0)return e.subarray(i,i+a)},t._readSize=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},t.getTimeStamp=function(e){for(var r=t.getID3Frames(e),i=0;i<r.length;i++){var a=r[i];if(t.isTimeStampFrame(a))return t._readTimeStamp(a)}},t.isTimeStampFrame=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},t._getFrameData=function(e){var r=String.fromCharCode(e[0],e[1],e[2],e[3]),i=t._readSize(e,4),a=10;return{type:r,size:i,data:e.subarray(a,a+i)}},t.getID3Frames=function(e){for(var r=0,i=[];t.isHeader(e,r);){var a=t._readSize(e,r+6);r+=10;for(var n=r+a;r+8<n;){var o=t._getFrameData(e.subarray(r)),s=t._decodeFrame(o);s&&i.push(s),r+=o.size+10}t.isFooter(e,r)&&(r+=10)}return i},t._decodeFrame=function(e){return"PRIV"===e.type?t._decodePrivFrame(e):"T"===e.type[0]?t._decodeTextFrame(e):"W"===e.type[0]?t._decodeURLFrame(e):void 0},t._readTimeStamp=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),r=1&e[3],i=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return i/=45,r&&(i+=47721858.84),Math.round(i)}},t._decodePrivFrame=function(e){if(!(e.size<2)){var r=t._utf8ArrayToStr(e.data),i=new Uint8Array(e.data.subarray(r.length+1));return{key:e.type,info:r,data:i.buffer}}},t._decodeTextFrame=function(e){if(!(e.size<2)){if("TXXX"===e.type){var r=1,i=t._utf8ArrayToStr(e.data.subarray(r));r+=i.length+1;var a=t._utf8ArrayToStr(e.data.subarray(r));return{key:e.type,info:i,data:a}}var n=t._utf8ArrayToStr(e.data.subarray(1));return{key:e.type,data:n}}},t._decodeURLFrame=function(e){if("WXXX"===e.type){if(e.size<2)return;var r=1,i=t._utf8ArrayToStr(e.data.subarray(r));r+=i.length+1;var a=t._utf8ArrayToStr(e.data.subarray(r));return{key:e.type,info:i,data:a}}var n=t._utf8ArrayToStr(e.data);return{key:e.type,data:n}},t._utf8ArrayToStr=function(t){for(var e=void 0,r=void 0,i="",a=0,n=t.length;a<n;){var o=t[a++];switch(o>>4){case 0:return i;case 1:case 2:case 3:case 4:case 5:case 6:case 7:i+=String.fromCharCode(o);break;case 12:case 13:e=t[a++],i+=String.fromCharCode((31&o)<<6|63&e);break;case 14:e=t[a++],r=t[a++],i+=String.fromCharCode((15&o)<<12|(63&e)<<6|(63&r)<<0)}}return i},t}();e.a=a},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function a(t){return"number"==typeof t}function n(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!a(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,a,s,l,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var d=new Error('Uncaught, unspecified "error" event. ('+e+")");throw d.context=e,d}if(r=this._events[t],o(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(n(r))for(s=Array.prototype.slice.call(arguments,1),u=r.slice(),a=u.length,l=0;l<a;l++)u[l].apply(this,s);return!0},r.prototype.addListener=function(t,e){var a;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?n(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,n(this._events[t])&&!this._events[t].warned&&(a=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,a&&a>0&&this._events[t].length>a&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),a||(a=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var a=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,a,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=r.length,a=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(n(r)){for(s=o;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){!function(e){var r=/^((?:[^\/;?#]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/;?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),e=e.trim(),!e){if(!r.alwaysNormalize)return t;var a=this.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");return a.path=o.normalizePath(a.path),o.buildURLFromParts(a)}var n=this.parseURL(e);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return r.alwaysNormalize?(n.path=o.normalizePath(n.path),o.buildURLFromParts(n)):e;var s=this.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=i.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(u.netLoc=s.netLoc,"/"!==n.path[0]))if(n.path){var d=s.path,c=d.substring(0,d.lastIndexOf("/")+1)+n.path;u.path=o.normalizePath(c)}else u.path=s.path,n.params||(u.params=s.params,n.query||(u.query=s.query));return null===u.path&&(u.path=r.alwaysNormalize?o.normalizePath(n.path):n.path),o.buildURLFromParts(u)},parseURL:function(t){var e=r.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(a,"");t.length!==(t=t.replace(n,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};t.exports=o}(this)},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e,r,i){var a,n,o,s,l,u=navigator.userAgent.toLowerCase(),d=i,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return a=((192&e[r+2])>>>6)+1,n=(60&e[r+2])>>>2,n>c.length-1?void t.trigger(Event.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+n}):(s=(1&e[r+2])<<2,s|=(192&e[r+3])>>>6,N.b.log("manifest codec:"+i+",ADTS data:type:"+a+",sampleingIndex:"+n+"["+c[n]+"Hz],channelConfig:"+s),/firefox/i.test(u)?n>=6?(a=5,l=new Array(4),o=n-3):(a=2,l=new Array(2),o=n):u.indexOf("android")!==-1?(a=2,l=new Array(2),o=n):(a=5,l=new Array(4),i&&(i.indexOf("mp4a.40.29")!==-1||i.indexOf("mp4a.40.5")!==-1)||!i&&n>=6?o=n-3:((i&&i.indexOf("mp4a.40.2")!==-1&&(n>=6&&1===s||/vivaldi/i.test(u))||!i&&1===s)&&(a=2,l=new Array(2)),o=n)),l[0]=a<<3,l[0]|=(14&n)>>1,l[1]|=(1&n)<<7,l[1]|=s<<3,5===a&&(l[1]|=(14&o)>>1,l[2]=(1&o)<<7,l[2]|=8,l[3]=0),{config:l,samplerate:c[n],channelCount:s,codec:"mp4a.40."+a,manifestCodec:d})}function l(t,e){return 255===t[e]&&240===(246&t[e+1])}function u(t,e){return 1&t[e+1]?7:9}function d(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function c(t,e){return!!(e+1<t.length&&l(t,e))}function f(t,e){if(e+1<t.length&&l(t,e)){var r=u(t,e),i=r;e+5<t.length&&(i=d(t,e));var a=e+i;if(a===t.length||a+1<t.length&&l(t,a))return!0}return!1}function h(t,e,r,i,a){if(!t.samplerate){var n=s(e,r,i,a);t.config=n.config,t.samplerate=n.samplerate,t.channelCount=n.channelCount,t.codec=n.codec,t.manifestCodec=n.manifestCodec,N.b.log("parsed codec:"+t.codec+",rate:"+n.samplerate+",nb channel:"+n.channelCount)}}function p(t){return 9216e4/t}function g(t,e,r,i,a){var n,o,s,l=t.length;if(n=u(t,e),o=d(t,e),o-=n,o>0&&e+n+o<=l)return s=r+i*a,{headerLength:n,frameLength:o,stamp:s}}function v(t,e,r,i,a){var n=p(t.samplerate),o=g(e,r,i,a,n);if(o){var s=o.stamp,l=o.headerLength,u=o.frameLength,d={unit:e.subarray(r+l,r+l+u),pts:s,dts:s};return t.samples.push(d),t.len+=u,{sample:d,length:u+l}}}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var k=r(1),D=r(2),I=function(){function t(e,r){i(this,t),this.subtle=e,this.aesIV=r}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}(),O=I,C=function(){function t(e,r){a(this,t),this.subtle=e,this.key=r}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}(),x=C,P=function(){function t(){n(this,t),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return t.prototype.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),r=new Uint32Array(4),i=0;i<4;i++)r[i]=e.getUint32(4*i);return r},t.prototype.initTable=function(){var t=this.sBox,e=this.invSBox,r=this.subMix,i=r[0],a=r[1],n=r[2],o=r[3],s=this.invSubMix,l=s[0],u=s[1],d=s[2],c=s[3],f=new Uint32Array(256),h=0,p=0,g=0;for(g=0;g<256;g++)g<128?f[g]=g<<1:f[g]=g<<1^283;for(g=0;g<256;g++){var v=p^p<<1^p<<2^p<<3^p<<4;v=v>>>8^255&v^99,t[h]=v,e[v]=h;var m=f[h],y=f[m],b=f[y],E=257*f[v]^16843008*v;i[h]=E<<24|E>>>8,a[h]=E<<16|E>>>16,n[h]=E<<8|E>>>24,o[h]=E,E=16843009*b^65537*y^257*m^16843008*h,l[v]=E<<24|E>>>8,u[v]=E<<16|E>>>16,d[v]=E<<8|E>>>24,c[v]=E,h?(h=m^f[f[f[b^m]]],p^=f[f[p]]):h=p=1}},t.prototype.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i<e.length&&r;)r=e[i]===this.key[i],i++;if(!r){this.key=e;var a=this.keySize=e.length;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size="+a);var n=this.ksRows=4*(a+6+1),o=void 0,s=void 0,l=this.keySchedule=new Uint32Array(n),u=this.invKeySchedule=new Uint32Array(n),d=this.sBox,c=this.rcon,f=this.invSubMix,h=f[0],p=f[1],g=f[2],v=f[3],m=void 0,y=void 0;
23
  for(o=0;o<n;o++)o<a?m=l[o]=e[o]:(y=m,o%a===0?(y=y<<8|y>>>24,y=d[y>>>24]<<24|d[y>>>16&255]<<16|d[y>>>8&255]<<8|d[255&y],y^=c[o/a|0]<<24):a>6&&o%a===4&&(y=d[y>>>24]<<24|d[y>>>16&255]<<16|d[y>>>8&255]<<8|d[255&y]),l[o]=m=(l[o-a]^y)>>>0);for(s=0;s<n;s++)o=n-s,y=3&s?l[o]:l[o-4],s<4||o<=4?u[s]=y:u[s]=h[d[y>>>24]]^p[d[y>>>16&255]]^g[d[y>>>8&255]]^v[d[255&y]],u[s]=u[s]>>>0}},t.prototype.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},t.prototype.decrypt=function(t,e,r){for(var i,a,n=this.keySize+6,o=this.invKeySchedule,s=this.invSBox,l=this.invSubMix,u=l[0],d=l[1],c=l[2],f=l[3],h=this.uint8ArrayToUint32Array_(r),p=h[0],g=h[1],v=h[2],m=h[3],y=new Int32Array(t),b=new Int32Array(y.length),E=void 0,T=void 0,R=void 0,S=void 0,A=void 0,w=void 0,_=void 0,L=void 0,k=void 0,D=void 0,I=void 0,O=void 0,C=this.networkToHostOrderSwap;e<y.length;){for(k=C(y[e]),D=C(y[e+1]),I=C(y[e+2]),O=C(y[e+3]),A=k^o[0],w=O^o[1],_=I^o[2],L=D^o[3],i=4,a=1;a<n;a++)E=u[A>>>24]^d[w>>16&255]^c[_>>8&255]^f[255&L]^o[i],T=u[w>>>24]^d[_>>16&255]^c[L>>8&255]^f[255&A]^o[i+1],R=u[_>>>24]^d[L>>16&255]^c[A>>8&255]^f[255&w]^o[i+2],S=u[L>>>24]^d[A>>16&255]^c[w>>8&255]^f[255&_]^o[i+3],A=E,w=T,_=R,L=S,i+=4;E=s[A>>>24]<<24^s[w>>16&255]<<16^s[_>>8&255]<<8^s[255&L]^o[i],T=s[w>>>24]<<24^s[_>>16&255]<<16^s[L>>8&255]<<8^s[255&A]^o[i+1],R=s[_>>>24]<<24^s[L>>16&255]<<16^s[A>>8&255]<<8^s[255&w]^o[i+2],S=s[L>>>24]<<24^s[A>>16&255]<<16^s[w>>8&255]<<8^s[255&_]^o[i+3],i+=3,b[e]=C(E^p),b[e+1]=C(S^g),b[e+2]=C(R^v),b[e+3]=C(T^m),p=k,g=D,v=I,m=O,e+=4}return b.buffer},t.prototype.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},t}(),F=P,N=r(0),M=function(){function t(e,r){o(this,t),this.observer=e,this.config=r,this.logEnabled=!0;try{var i=crypto?crypto:self.crypto;this.subtle=i.subtle||i.webkitSubtle}catch(t){}this.disableWebCrypto=!this.subtle}return t.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.prototype.decrypt=function(t,e,r,i){var a=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(N.b.log("JS AES decrypt"),this.logEnabled=!1);var n=this.decryptor;n||(this.decryptor=n=new F),n.expandKey(e),i(n.decrypt(t,0,r))}else{this.logEnabled&&(N.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var o=this.subtle;this.key!==e&&(this.key=e,this.fastAesKey=new x(o,e)),this.fastAesKey.expandKey().then(function(n){var s=new O(o,r);s.decrypt(t,n).catch(function(n){a.onWebCryptoError(n,t,e,r,i)}).then(function(t){i(t)})}).catch(function(n){a.onWebCryptoError(n,t,e,r,i)})}},t.prototype.onWebCryptoError=function(t,e,r,i,a){this.config.enableSoftwareAES?(N.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(e,r,i,a)):(N.b.error("decrypting error : "+t.message),this.observer.trigger(Event.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))},t.prototype.destroy=function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)},t}(),U=M,B=r(3),G=function(){function t(e,r,i){m(this,t),this.observer=e,this.config=i,this.remuxer=r}return t.prototype.resetInitSegment=function(t,e,r,i){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:e,duration:i,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var e=B.a.getID3Data(t,0)||[],r=e.length,i=t.length;r<i;r++)if(f(t,r))return N.b.log("ADTS sync word found !"),!0;return!1},t.prototype.append=function(t,e,r,i){for(var a=this._audioTrack,n=B.a.getID3Data(t,0)||[],o=B.a.getTimeStamp(n),s=o?90*o:9e4*e,l=0,u=s,d=t.length,f=n.length,p=[{pts:u,dts:u,data:n}];f<d-1;)if(c(t,f)&&f+5<d){h(a,this.observer,t,f,a.manifestCodec);var g=v(a,t,f,s,l);if(!g){N.b.log("Unable to parse AAC frame");break}f+=g.length,u=g.sample.pts,l++}else B.a.isHeader(t,f)?(n=B.a.getID3Data(t,f),p.push({pts:u,dts:u,data:n}),f+=n.length):f++;this.remuxer.remux(a,{samples:[]},{samples:p,inputTimeScale:9e4},{samples:[]},e,r,i)},t.prototype.destroy=function(){},t}(),j=G,K=Math.pow(2,32)-1,H=function(){function t(e,r){y(this,t),this.observer=e,this.remuxer=r}return t.prototype.resetTimeStamp=function(t){this.initPTS=t},t.prototype.resetInitSegment=function(e,r,i,a){if(e&&e.byteLength){var n=this.initData=t.parseInitSegment(e),o={};n.audio&&n.video?o.audiovideo={container:"video/mp4",codec:r+","+i,initSegment:a?e:null}:(n.audio&&(o.audio={container:"audio/mp4",codec:r,initSegment:a?e:null}),n.video&&(o.video={container:"video/mp4",codec:i,initSegment:a?e:null})),this.observer.trigger(k.a.FRAG_PARSING_INIT_SEGMENT,{tracks:o})}else r&&(this.audioCodec=r),i&&(this.videoCodec=i)},t.probe=function(e){if(e.length>=8){var r=t.bin2str(e.subarray(4,8));return["moof","ftyp","styp"].indexOf(r)>=0}return!1},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return r<0?4294967296+r:r},t.writeUint32=function(t,e,r){t.data&&(e+=t.start,t=t.data),t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},t.findBox=function(e,r){var i,a,n,o,s,l,u,d=[];if(e.data?(l=e.start,o=e.end,e=e.data):(l=0,o=e.byteLength),!r.length)return null;for(i=l;i<o;)a=t.readUint32(e,i),n=t.bin2str(e.subarray(i+4,i+8)),u=a>1?i+a:o,n===r[0]&&(1===r.length?d.push({data:e,start:i+8,end:u}):(s=t.findBox({data:e,start:i+8,end:u},r.slice(1)),s.length&&(d=d.concat(s)))),i=u;return d},t.parseInitSegment=function(e){var r=[],i=t.findBox(e,["moov","trak"]);return i.forEach(function(e){var i=t.findBox(e,["tkhd"])[0];if(i){var a=i.data[i.start],n=0===a?12:20,o=t.readUint32(i,n),s=t.findBox(e,["mdia","mdhd"])[0];if(s){a=s.data[s.start],n=0===a?12:20;var l=t.readUint32(s,n),u=t.findBox(e,["mdia","hdlr"])[0];if(u){var d=t.bin2str(u.data.subarray(u.start+8,u.start+12)),c={soun:"audio",vide:"video"}[d];c&&(r[o]={timescale:l,type:c},r[c]={timescale:l,id:o})}}}}),r},t.getStartDTS=function(e,r){var i,a,n;return i=t.findBox(r,["moof","traf"]),a=[].concat.apply([],i.map(function(r){return t.findBox(r,["tfhd"]).map(function(i){var a,n,o;return a=t.readUint32(i,4),n=e[a].timescale||9e4,o=t.findBox(r,["tfdt"]).map(function(e){var r,i;return r=e.data[e.start],i=t.readUint32(e,4),1===r&&(i*=Math.pow(2,32),i+=t.readUint32(e,8)),i})[0],o/n})})),n=Math.min.apply(null,a),isFinite(n)?n:0},t.offsetStartDTS=function(e,r,i){t.findBox(r,["moof","traf"]).map(function(r){return t.findBox(r,["tfhd"]).map(function(a){var n=t.readUint32(a,4),o=e[n].timescale||9e4;t.findBox(r,["tfdt"]).map(function(e){var r=e.data[e.start],a=t.readUint32(e,4);if(0===r)t.writeUint32(e,4,a-i*o);else{a*=Math.pow(2,32),a+=t.readUint32(e,8),a-=i*o,a=Math.max(a,0);var n=Math.floor(a/(K+1)),s=Math.floor(a%(K+1));t.writeUint32(e,4,n),t.writeUint32(e,8,s)}})})})},t.prototype.append=function(e,r,i,a){var n=this.initData;n||(this.resetInitSegment(e,this.audioCodec,this.videoCodec),n=this.initData);var o=void 0,s=this.initPTS;if(void 0===s){var l=t.getStartDTS(n,e);this.initPTS=s=l-r,this.observer.trigger(k.a.INIT_PTS_FOUND,{initPTS:s})}t.offsetStartDTS(n,e,s),o=t.getStartDTS(n,e),this.remuxer.remux(n.audio,n.video,null,null,o,i,a,e)},t.prototype.destroy=function(){},t}(),W=H,V={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],appendFrame:function(t,e,r,i,a){if(!(r+24>e.length)){var n=this.parseHeader(e,r);if(n&&r+n.frameLength<=e.length){var o=10368e4/n.sampleRate,s=i+a*o,l={unit:e.subarray(r,r+n.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=n.channelCount,t.samplerate=n.sampleRate,t.samples.push(l),t.len+=n.frameLength,{sample:l,length:n.frameLength}}}},parseHeader:function(t,e){var r=t[e+1]>>3&3,i=t[e+1]>>1&3,a=t[e+2]>>4&15,n=t[e+2]>>2&3,o=!!(2&t[e+2]);if(1!==r&&0!==a&&15!==a&&3!==n){var s=3===r?3-i:3===i?3:4,l=1e3*V.BitratesMap[14*s+a-1],u=3===r?0:2===r?1:2,d=V.SamplingRateMap[3*u+n],c=o?1:0,f=t[e+3]>>6===3?1:2,h=3===i?(3===r?12:6)*l/d+c<<2:(3===r?144:72)*l/d+c|0;return{sampleRate:d,channelCount:f,frameLength:h}}},isHeaderPattern:function(t,e){return 255===t[e]&&224===(224&t[e+1])&&0!==(6&t[e+1])},isHeader:function(t,e){return!!(e+1<t.length&&this.isHeaderPattern(t,e))},probe:function(t,e){if(e+1<t.length&&this.isHeaderPattern(t,e)){var r=4,i=this.parseHeader(t,e),a=r;i&&i.frameLength&&(a=i.frameLength);var n=e+a;if(n===t.length||n+1<t.length&&this.isHeaderPattern(t,n))return!0}return!1}},q=V,Y=function(){function t(e){b(this,t),this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}return t.prototype.loadWord=function(){var t=this.data,e=this.bytesAvailable,r=t.byteLength-e,i=new Uint8Array(4),a=Math.min(4,e);if(0===a)throw new Error("no bytes available");i.set(t.subarray(r,r+a)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*a,this.bytesAvailable-=a},t.prototype.skipBits=function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,e=t>>3,t-=e>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},t.prototype.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&N.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0&&this.bitsAvailable?r<<e|this.readBits(e):r},t.prototype.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!==(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},t.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},t.prototype.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},t.prototype.readBoolean=function(){return 1===this.readBits(1)},t.prototype.readUByte=function(){return this.readBits(8)},t.prototype.readUShort=function(){return this.readBits(16)},t.prototype.readUInt=function(){return this.readBits(32)},t.prototype.skipScalingList=function(t){var e,r,i=8,a=8;for(e=0;e<t;e++)0!==a&&(r=this.readEG(),a=(i+r+256)%256),i=0===a?i:a},t.prototype.readSPS=function(){var t,e,r,i,a,n,o,s,l,u=0,d=0,c=0,f=0,h=this.readUByte.bind(this),p=this.readBits.bind(this),g=this.readUEG.bind(this),v=this.readBoolean.bind(this),m=this.skipBits.bind(this),y=this.skipEG.bind(this),b=this.skipUEG.bind(this),E=this.skipScalingList.bind(this);if(h(),t=h(),e=p(5),m(3),r=h(),b(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var T=g();if(3===T&&m(1),b(),b(),m(1),v())for(s=3!==T?8:12,l=0;l<s;l++)v()&&E(l<6?16:64)}b();var R=g();if(0===R)g();else if(1===R)for(m(1),y(),y(),i=g(),l=0;l<i;l++)y();b(),m(1),a=g(),n=g(),o=p(1),0===o&&m(1),m(1),v()&&(u=g(),d=g(),c=g(),f=g());var S=[1,1];if(v()&&v()){var A=h();switch(A){case 1:S=[1,1];break;case 2:S=[12,11];break;case 3:S=[10,11];break;case 4:S=[16,11];break;case 5:S=[40,33];break;case 6:S=[24,11];break;case 7:S=[20,11];break;case 8:S=[32,11];break;case 9:S=[80,33];break;case 10:S=[18,11];break;case 11:S=[15,11];break;case 12:S=[64,33];break;case 13:S=[160,99];break;case 14:S=[4,3];break;case 15:S=[3,2];break;case 16:S=[2,1];break;case 255:S=[h()<<8|h(),h()<<8|h()]}}return{width:Math.ceil(16*(a+1)-2*u-2*d),height:(2-o)*(n+1)*16-(o?2:4)*(c+f),pixelRatio:S}},t.prototype.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}(),z=Y,X=function(){function t(e,r,i,a){E(this,t),this.decryptdata=i,this.discardEPB=a,this.decrypter=new U(e,r)}return t.prototype.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,e)},t.prototype.decryptAacSample=function(t,e,r,i){var a=t[e].unit,n=a.subarray(16,a.length-a.length%16),o=n.buffer.slice(n.byteOffset,n.byteOffset+n.length),s=this;this.decryptBuffer(o,function(n){n=new Uint8Array(n),a.set(n,16),i||s.decryptAacSamples(t,e+1,r)})},t.prototype.decryptAacSamples=function(t,e,r){for(;;e++){if(e>=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},t.prototype.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,a=32;a<=t.length-16;a+=160,i+=16)r.set(t.subarray(a,a+16),i);return r},t.prototype.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var r=0,i=32;i<=t.length-16;i+=160,r+=16)t.set(e.subarray(r,r+16),i);return t},t.prototype.decryptAvcSample=function(t,e,r,i,a,n){var o=this.discardEPB(a.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,function(s){a.data=l.getAvcDecryptedUnit(o,s),n||l.decryptAvcSamples(t,e,r+1,i)})},t.prototype.decryptAvcSamples=function(t,e,r,i){for(;;e++,r=0){if(e>=t.length)return void i();for(var a=t[e].units;!(r>=a.length);r++){var n=a[r];if(!(n.length<=48||1!==n.type&&5!==n.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,n,o),!o)return}}}},t}(),Q=X,J=function(){function t(e,r,i,a){T(this,t),this.observer=e,this.config=i,this.typeSupported=a,this.remuxer=r,this.sampleAes=null}return t.prototype.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new Q(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(t){return t.length>=564&&71===t[0]&&71===t[188]&&71===t[376]},t.prototype.resetInitSegment=function(t,e,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack={container:"video/mp2t",type:"video",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:0},this._audioTrack={container:"video/mp2t",type:"audio",id:-1,inputTimeScale:9e4,duration:i,sequenceNumber:0,samples:[],len:0,isAAC:!0},this._id3Track={type:"id3",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0},this._txtTrack={type:"text",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0},this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=e,this.videoCodec=r,this._duration=i},t.prototype.resetTimeStamp=function(){},t.prototype.append=function(t,e,r,i){var a,n,o,s,l,u,d=t.length,c=!1;this.contiguous=r;var f=this.pmtParsed,h=this._avcTrack,p=this._audioTrack,g=this._id3Track,v=h.id,m=p.id,y=g.id,b=this._pmtId,E=h.pesData,T=p.pesData,R=g.pesData,S=this._parsePAT,A=this._parsePMT,w=this._parsePES,_=this._parseAVCPES.bind(this),L=this._parseAACPES.bind(this),I=this._parseMPEGPES.bind(this),O=this._parseID3PES.bind(this);for(d-=d%188,a=0;a<d;a+=188)if(71===t[a]){if(n=!!(64&t[a+1]),o=((31&t[a+1])<<8)+t[a+2],s=(48&t[a+3])>>4,s>1){if(l=a+5+t[a+4],l===a+188)continue}else l=a+4;switch(o){case v:n&&(E&&(u=w(E))&&_(u,!1),E={data:[],size:0}),E&&(E.data.push(t.subarray(l,a+188)),E.size+=a+188-l);break;case m:n&&(T&&(u=w(T))&&(p.isAAC?L(u):I(u)),T={data:[],size:0}),T&&(T.data.push(t.subarray(l,a+188)),T.size+=a+188-l);break;case y:n&&(R&&(u=w(R))&&O(u),R={data:[],size:0}),R&&(R.data.push(t.subarray(l,a+188)),R.size+=a+188-l);break;case 0:n&&(l+=t[l]+1),b=this._pmtId=S(t,l);break;case b:n&&(l+=t[l]+1);var C=A(t,l,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,null!=this.sampleAes);v=C.avc,v>0&&(h.id=v),m=C.audio,m>0&&(p.id=m,p.isAAC=C.isAAC),y=C.id3,y>0&&(g.id=y),c&&!f&&(N.b.log("reparse from beginning"),c=!1,a=-188),f=this.pmtParsed=!0;break;case 17:case 8191:break;default:c=!0}}else this.observer.trigger(k.a.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});E&&(u=w(E))?(_(u,!0),h.pesData=null):h.pesData=E,T&&(u=w(T))?(p.isAAC?L(u):I(u),p.pesData=null):(T&&T.size&&N.b.log("last AAC PES packet truncated,might overlap between fragments"),p.pesData=T),R&&(u=w(R))?(O(u),g.pesData=null):g.pesData=R,null==this.sampleAes?this.remuxer.remux(p,h,g,this._txtTrack,e,r,i):this.decryptAndRemux(p,h,g,this._txtTrack,e,r,i)},t.prototype.decryptAndRemux=function(t,e,r,i,a,n,o){if(t.samples&&t.isAAC){var s=this;this.sampleAes.decryptAacSamples(t.samples,0,function(){s.decryptAndRemuxAvc(t,e,r,i,a,n,o)})}else this.decryptAndRemuxAvc(t,e,r,i,a,n,o)},t.prototype.decryptAndRemuxAvc=function(t,e,r,i,a,n,o){if(e.samples){var s=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,function(){s.remuxer.remux(t,e,r,i,a,n,o)})}else this.remuxer.remux(t,e,r,i,a,n,o)},t.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t.prototype._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},t.prototype._parsePMT=function(t,e,r,i){var a,n,o,s,l={audio:-1,avc:-1,id3:-1,isAAC:!0};for(a=(15&t[e+1])<<8|t[e+2],n=e+3+a-4,o=(15&t[e+10])<<8|t[e+11],e+=12+o;e<n;){switch(s=(31&t[e+1])<<8|t[e+2],t[e]){case 207:if(!i){N.b.log("unkown stream type:"+t[e]);break}case 15:l.audio===-1&&(l.audio=s);break;case 21:l.id3===-1&&(l.id3=s);break;case 219:if(!i){N.b.log("unkown stream type:"+t[e]);break}case 27:l.avc===-1&&(l.avc=s);break;case 3:case 4:r?l.audio===-1&&(l.audio=s,l.isAAC=!1):N.b.log("MPEG audio found, not supported in this browser for now");break;case 36:N.b.warn("HEVC stream type found, not supported for now");break;default:N.b.log("unkown stream type:"+t[e])}e+=((15&t[e+3])<<8|t[e+4])+5}return l},t.prototype._parsePES=function(t){var e,r,i,a,n,o,s,l,u,d=0,c=t.data;if(!t||0===t.size)return null;for(;c[0].length<19&&c.length>1;){var f=new Uint8Array(c[0].length+c[1].length);f.set(c[0]),f.set(c[1],c[0].length),c[0]=f,c.splice(1,1)}if(e=c[0],i=(e[0]<<16)+(e[1]<<8)+e[2],1===i){if(a=(e[4]<<8)+e[5],a&&a>t.size-6)return null;r=e[7],192&r&&(s=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,s>4294967295&&(s-=8589934592),64&r?(l=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,l>4294967295&&(l-=8589934592),s-l>54e5&&(N.b.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l)):l=s),n=e[8],u=n+9,t.size-=u,o=new Uint8Array(t.size);for(var h=0,p=c.length;h<p;h++){e=c[h];var g=e.byteLength;if(u){if(u>g){u-=g;continue}e=e.subarray(u),g-=u,u=0}o.set(e,d),d+=g}return a&&(a-=n+3),{data:o,pts:s,dts:l,len:a}}return null},t.prototype.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var r=e.samples,i=r.length;!this.config.forceKeyFrameOnDiscontinuity||t.key===!0||e.sps&&(i||this.contiguous)?(t.id=i,r.push(t)):e.dropped++}t.debug.length&&N.b.log(t.pts+"/"+t.dts+":"+t.debug)},t.prototype._parseAVCPES=function(t,e){var r,i,a,n=this,o=this._avcTrack,s=this._parseAVCNALu(t.data),l=!1,u=this.avcSample,d=!1,c=this.pushAccesUnit.bind(this),f=function(t,e,r,i){return{key:t,pts:e,dts:r,units:[],debug:i}};t.data=null,u&&s.length&&!o.audFound&&(c(u,o),u=this.avcSample=f(!1,t.pts,t.dts,"")),s.forEach(function(e){switch(e.type){case 1:i=!0,u||(u=n.avcSample=f(!0,t.pts,t.dts,"")),l&&(u.debug+="NDR "),u.frame=!0;var s=e.data;if(d&&s.length>4){var h=new z(s).readSliceType();2!==h&&4!==h&&7!==h&&9!==h||(u.key=!0)}break;case 5:i=!0,u||(u=n.avcSample=f(!0,t.pts,t.dts,"")),l&&(u.debug+="IDR "),u.key=!0,u.frame=!0;break;case 6:i=!0,l&&u&&(u.debug+="SEI "),r=new z(n.discardEPB(e.data)),r.readUByte();for(var p=0,g=0,v=!1,m=0;!v&&r.bytesAvailable>1;){p=0;do m=r.readUByte(),p+=m;while(255===m);g=0;do m=r.readUByte(),g+=m;while(255===m);if(4===p&&0!==r.bytesAvailable){v=!0;var y=r.readUByte();if(181===y){var b=r.readUShort();if(49===b){var E=r.readUInt();if(1195456820===E){var T=r.readUByte();if(3===T){var R=r.readUByte(),S=r.readUByte(),A=31&R,w=[R,S];for(a=0;a<A;a++)w.push(r.readUByte()),w.push(r.readUByte()),w.push(r.readUByte());n._insertSampleInOrder(n._txtTrack.samples,{type:3,pts:t.pts,bytes:w})}}}}}else if(g<r.bytesAvailable)for(a=0;a<g;a++)r.readUByte()}break;case 7:if(i=!0,d=!0,l&&u&&(u.debug+="SPS "),!o.sps){r=new z(e.data);var _=r.readSPS();o.width=_.width,o.height=_.height,o.pixelRatio=_.pixelRatio,o.sps=[e.data],o.duration=n._duration;var L=e.data.subarray(1,4),k="avc1.";for(a=0;a<3;a++){var D=L[a].toString(16);D.length<2&&(D="0"+D),k+=D}o.codec=k}break;case 8:i=!0,l&&u&&(u.debug+="PPS "),o.pps||(o.pps=[e.data]);break;case 9:i=!1,o.audFound=!0,u&&c(u,o),u=n.avcSample=f(!1,t.pts,t.dts,l?"AUD ":"");break;case 12:i=!1;break;default:i=!1,u&&(u.debug+="unknown NAL "+e.type+" ")}if(u&&i){var I=u.units;I.push(e)}}),e&&u&&(c(u,o),this.avcSample=null)},t.prototype._insertSampleInOrder=function(t,e){var r=t.length;if(r>0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts<t[i].pts){t.splice(i,0,e);break}}else t.push(e)},t.prototype._getLastNalUnit=function(){var t=this.avcSample,e=void 0;if(!t||0===t.units.length){var r=this._avcTrack,i=r.samples;t=i[i.length-1]}if(t){var a=t.units;e=a[a.length-1]}return e},t.prototype._parseAVCNALu=function(t){var e,r,i,a,n,o=0,s=t.byteLength,l=this._avcTrack,u=l.naluState||0,d=u,c=[],f=-1;for(u===-1&&(f=0,n=31&t[0],u=0,o=1);o<s;)if(e=t[o++],u)if(1!==u)if(e)if(1===e){if(f>=0)i={data:t.subarray(f,o-u-1),type:n},c.push(i);else{var h=this._getLastNalUnit();if(h&&(d&&o<=4-d&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-d)),r=o-u-1,r>0)){var p=new Uint8Array(h.data.byteLength+r);p.set(h.data,0),p.set(t.subarray(0,r),h.data.byteLength),h.data=p}}o<s?(a=31&t[o],f=o,n=a,u=0):u=-1}else u=0;else u=3;else u=e?0:2;else u=e?0:1;if(f>=0&&u>=0&&(i={data:t.subarray(f,s),type:n,state:u},c.push(i)),0===c.length){var g=this._getLastNalUnit();if(g){var v=new Uint8Array(g.data.byteLength+t.byteLength);v.set(g.data,0),v.set(t,g.data.byteLength),g.data=v}}return l.naluState=u,c},t.prototype.discardEPB=function(t){for(var e,r,i=t.byteLength,a=[],n=1;n<i-2;)0===t[n]&&0===t[n+1]&&3===t[n+2]?(a.push(n+2),n+=2):n++;if(0===a.length)return t;e=i-a.length,r=new Uint8Array(e);var o=0;for(n=0;n<e;o++,n++)o===a[0]&&(o++,a.shift()),r[n]=t[o];return r},t.prototype._parseAACPES=function(t){var e,r,i,a,n,o=this._audioTrack,s=t.data,l=t.pts,u=0,d=this.aacOverFlow,f=this.aacLastPTS;if(d){var g=new Uint8Array(d.byteLength+s.byteLength);g.set(d,0),g.set(s,d.byteLength),s=g}for(i=u,n=s.length;i<n-1&&!c(s,i);i++);if(i){var m,y;if(i<n-1?(m="AAC PES did not start with ADTS header,offset:"+i,y=!1):(m="no ADTS header found in AAC PES",y=!0),N.b.warn("parsing error:"+m),this.observer.trigger(k.a.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_PARSING_ERROR,fatal:y,reason:m}),y)return}if(h(o,this.observer,s,i,this.audioCodec),r=0,e=p(o.samplerate),d&&f){var b=f+e;Math.abs(b-l)>1&&(N.b.log("AAC: align PTS for overlapping frames by "+Math.round((b-l)/90)),l=b)}for(;i<n;)if(c(s,i)&&i+5<n){var E=v(o,s,i,l,r);if(!E)break;i+=E.length,a=E.sample.pts,r++}else i++;d=i<n?s.subarray(i,n):null,this.aacOverFlow=d,this.aacLastPTS=a},t.prototype._parseMPEGPES=function(t){for(var e=t.data,r=e.length,i=0,a=0,n=t.pts;a<r;)if(q.isHeader(e,a)){var o=q.appendFrame(this._audioTrack,e,a,n,i);if(!o)break;a+=o.length,i++}else a++},t.prototype._parseID3PES=function(t){this._id3Track.samples.push(t)},t}(),$=J,Z=function(){function t(e,r,i){R(this,t),this.observer=e,this.config=i,this.remuxer=r}return t.prototype.resetInitSegment=function(t,e,r,i){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:e,duration:i,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){var e,r,i=B.a.getID3Data(t,0);if(i&&void 0!==B.a.getTimeStamp(i))for(e=i.length,r=Math.min(t.length-1,e+100);e<r;e++)if(q.probe(t,e))return N.b.log("MPEG Audio sync word found !"),!0;return!1},t.prototype.append=function(t,e,r,i){for(var a=B.a.getID3Data(t,0),n=90*B.a.getTimeStamp(a),o=a.length,s=t.length,l=0,u=0,d=this._audioTrack,c=[{pts:n,dts:n,data:a}];o<s;)if(q.isHeader(t,o)){var f=q.appendFrame(d,t,o,n,l);if(!f)break;o+=f.length,u=f.sample.pts,l++}else B.a.isHeader(t,o)?(a=B.a.getID3Data(t,o),c.push({pts:u,dts:u,data:a}),o+=a.length):o++;this.remuxer.remux(d,{samples:[]},{samples:c,inputTimeScale:9e4},{samples:[]},e,r,i)},t.prototype.destroy=function(){},t}(),tt=Z,et=function(){function t(){S(this,t)}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}(),rt=et,it=Math.pow(2,32)-1,at=function(){function t(){A(this,t)}return t.init=function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var e;for(e in t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:r,audio:i};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=n,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,l,o,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,a))},t.box=function(t){for(var e,r=Array.prototype.slice.call(arguments,1),i=8,a=r.length,n=a;a--;)i+=r[a].byteLength;for(e=new Uint8Array(i),e[0]=i>>24&255,e[1]=i>>16&255,e[2]=i>>8&255,e[3]=255&i,e.set(t,4),a=0,i=8;a<n;a++)e.set(r[a],i),i+=r[a].byteLength;return e},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,r){r*=e;var i=Math.floor(r/(it+1)),a=Math.floor(r%(it+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var i=Math.floor(r/(it+1)),a=Math.floor(r%(it+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,n)},t.sdtp=function(e){var r,i,a=e.samples||[],n=new Uint8Array(4+a.length);for(i=0;i<a.length;i++)r=a[i].flags,n[i+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return t.box(t.types.sdtp,n)},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(e){var r,i,a,n=[],o=[];for(r=0;r<e.sps.length;r++)i=e.sps[r],a=i.byteLength,n.push(a>>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)i=e.pps[r],a=i.byteLength,o.push(a>>>8&255),o.push(255&a),o=o.concat(Array.prototype.slice.call(i));var s=t.box(t.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(o))),l=e.width,u=e.height,d=e.pixelRatio[0],c=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,c>>24,c>>16&255,c>>8&255,255&c])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,i=e.duration*e.timescale,a=e.width,n=e.height,o=Math.floor(i/(it+1)),s=Math.floor(i%(it+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,n>>8&255,255&n,0,0]))},t.traf=function(e,r){var i=t.sdtp(e),a=e.id,n=Math.floor(r/(it+1)),o=Math.floor(r%(it+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i,a,n,o,s,l,u=e.samples||[],d=u.length,c=12+16*d,f=new Uint8Array(c);for(r+=8+c,f.set([0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i<d;i++)a=u[i],n=a.duration,o=a.size,s=a.flags,l=a.cts,f.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);
24
  return t.box(t.types.trun,f)},t.initSegment=function(e){t.types||t.init();var r,i=t.moov(e);return r=new Uint8Array(t.FTYP.byteLength+i.byteLength),r.set(t.FTYP),r.set(i,t.FTYP.byteLength),r},t}(),nt=at,ot=1e4,st=function(){function t(e,r,i,a){w(this,t),this.observer=e,this.config=r,this.typeSupported=i;var n=navigator.userAgent;this.isSafari=a&&a.indexOf("Apple")>-1&&n&&!n.match("CriOS"),this.ISGenerated=!1}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},t.prototype.resetInitSegment=function(){this.ISGenerated=!1},t.prototype.remux=function(t,e,r,i,a,n,o){if(this.ISGenerated||this.generateIS(t,e,a),this.ISGenerated){var s=t.samples.length,l=e.samples.length,u=a,d=a;if(s&&l){var c=(t.samples[0].dts-e.samples[0].dts)/e.inputTimeScale;u+=Math.max(0,c),d+=Math.max(0,-c)}if(s){t.timescale||(N.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,a));var f=this.remuxAudio(t,u,n,o);if(l){var h=void 0;f&&(h=f.endPTS-f.startPTS),e.timescale||(N.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,a)),this.remuxVideo(e,d,n,h,o)}}else{var p=void 0;l&&(p=this.remuxVideo(e,d,n,o)),p&&t.codec&&this.remuxEmptyAudio(t,u,n,p)}}r.samples.length&&this.remuxID3(r,a),i.samples.length&&this.remuxText(i,a),this.observer.trigger(k.a.FRAG_PARSED)},t.prototype.generateIS=function(t,e,r){var i,a,n=this.observer,o=t.samples,s=e.samples,l=this.typeSupported,u="audio/mp4",d={},c={tracks:d},f=void 0===this._initPTS;if(f&&(i=a=1/0),t.config&&o.length&&(t.timescale=t.samplerate,N.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(l.mpeg?(u="audio/mpeg",t.codec=""):l.mp3&&(t.codec="mp3")),d.audio={container:u,codec:t.codec,initSegment:!t.isAAC&&l.mpeg?new Uint8Array:nt.initSegment([t]),metadata:{channelCount:t.channelCount}},f&&(i=a=o[0].pts-t.inputTimeScale*r)),e.sps&&e.pps&&s.length){var h=e.inputTimeScale;e.timescale=h,d.video={container:"video/mp4",codec:e.codec,initSegment:nt.initSegment([e]),metadata:{width:e.width,height:e.height}},f&&(i=Math.min(i,s[0].pts-h*r),a=Math.min(a,s[0].dts-h*r),this.observer.trigger(k.a.INIT_PTS_FOUND,{initPTS:i}))}Object.keys(d).length?(n.trigger(k.a.FRAG_PARSING_INIT_SEGMENT,c),this.ISGenerated=!0,f&&(this._initPTS=i,this._initDTS=a)):n.trigger(k.a.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.prototype.remuxVideo=function(t,e,r,i,a){var n,o,s,l,u,d,c,f,h=8,p=t.timescale,g=t.samples,v=[],m=g.length,y=this._PTSNormalize,b=this._initDTS,E=this.nextAvcDts,T=this.isSafari;T&&(r|=g.length&&E&&(a&&Math.abs(e-E/p)<.1||Math.abs(g[0].pts-E-b)<p/5)),r||(E=e*p),g.forEach(function(t){t.pts=y(t.pts-b,E),t.dts=y(t.dts-b,E)}),g.sort(function(t,e){var r=t.dts-e.dts,i=t.pts-e.pts;return r?r:i?i:t.id-e.id});var R=g.reduce(function(t,e){return Math.max(Math.min(t,e.pts-e.dts),-18e3)},0);if(R<0){N.b.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(R/90)+" ms to overcome this issue");for(var S=0;S<g.length;S++)g[S].dts+=R}var A=g[0];u=Math.max(A.dts,0),l=Math.max(A.pts,0);var w=Math.round((u-E)/90);r&&w&&(w>1?N.b.log("AVC:"+w+" ms hole between fragments detected,filling it"):w<-1&&N.b.log("AVC:"+-w+" ms overlapping between fragments detected"),u=E,g[0].dts=u,l=Math.max(l-w,E),g[0].pts=l,N.b.log("Video/PTS/DTS adjusted: "+Math.round(l/90)+"/"+Math.round(u/90)+",delta:"+w+" ms")),d=u,A=g[g.length-1],f=Math.max(A.dts,0),c=Math.max(A.pts,0,f),T&&(n=Math.round((f-u)/(g.length-1)));for(var _=0,L=0,I=0;I<m;I++){for(var O=g[I],C=O.units,x=C.length,P=0,F=0;F<x;F++)P+=C[F].data.length;L+=P,_+=x,O.length=P,T?O.dts=u+I*n:O.dts=Math.max(O.dts,u),O.pts=Math.max(O.pts,O.dts)}var M=L+4*_+8;try{o=new Uint8Array(M)}catch(t){return void this.observer.trigger(k.a.ERROR,{type:D.b.MUX_ERROR,details:D.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:M,reason:"fail allocating video mdat "+M})}var U=new DataView(o.buffer);U.setUint32(0,M),o.set(nt.types.mdat,4);for(var B=0;B<m;B++){for(var G=g[B],j=G.units,K=0,H=void 0,W=0,V=j.length;W<V;W++){var q=j[W],Y=q.data,z=q.data.byteLength;U.setUint32(h,z),h+=4,o.set(Y,h),h+=z,K+=4+z}if(T)H=Math.max(0,n*Math.round((G.pts-G.dts)/n));else{if(B<m-1)n=g[B+1].dts-G.dts;else{var X=this.config,Q=G.dts-g[B>0?B-1:B].dts;if(X.stretchShortVideoTrack){var J=X.maxBufferHole,$=X.maxSeekHole,Z=Math.floor(Math.min(J,$)*p),tt=(i?l+i*p:this.nextAudioPts)-G.pts;tt>Z?(n=tt-Q,n<0&&(n=Q),N.b.log("It is approximately "+tt/90+" ms to the next segment; using duration "+n/90+" ms for the last video frame.")):n=Q}else n=Q}H=Math.round(G.pts-G.dts)}v.push({size:K,duration:n,cts:H,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:G.key?2:1,isNonSync:G.key?0:1}})}this.nextAvcDts=f+n;var et=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,v.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var rt=v[0].flags;rt.dependsOn=2,rt.isNonSync=0}t.samples=v,s=nt.moof(t.sequenceNumber++,u,t),t.samples=[];var it={data1:s,data2:o,startPTS:l/p,endPTS:(c+n)/p,startDTS:u/p,endDTS:this.nextAvcDts/p,type:"video",nb:v.length,dropped:et};return this.observer.trigger(k.a.FRAG_PARSING_DATA,it),it},t.prototype.remuxAudio=function(t,e,r,i){var a,n,o,s,l,u,d,c=t.inputTimeScale,f=t.timescale,h=c/f,p=t.isAAC?1024:1152,g=p*h,v=this._PTSNormalize,m=this._initDTS,y=!t.isAAC&&this.typeSupported.mpeg,b=t.samples,E=[],T=this.nextAudioPts;if(r|=b.length&&T&&(i&&Math.abs(e-T/c)<.1||Math.abs(b[0].pts-T-m)<20*g),r||(T=e*c),b.forEach(function(t){t.pts=t.dts=v(t.pts-m,T)}),b.sort(function(t,e){return t.pts-e.pts}),i&&t.isAAC)for(var R=this.config.maxAudioFramesDrift,S=0,A=T;S<b.length;){var w,_=b[S],L=_.pts;w=L-A;var I=Math.abs(1e3*w/c);if(w<=-R*g)N.b.warn("Dropping 1 audio frame @ "+(A/c).toFixed(3)+"s due to "+Math.round(I)+" ms overlap."),b.splice(S,1),t.len-=_.unit.length;else if(w>=R*g&&I<ot&&A){var O=Math.round(w/g);N.b.warn("Injecting "+O+" audio frame @ "+(A/c).toFixed(3)+"s due to "+Math.round(1e3*w/c)+" ms gap.");for(var C=0;C<O;C++){var x=Math.max(A,0);o=rt.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),o||(N.b.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),o=_.unit.subarray()),b.splice(S,0,{unit:o,pts:x,dts:x}),t.len+=o.length,A+=g,S++}_.pts=_.dts=A,A+=g,S++}else Math.abs(w)>.1*g,_.pts=_.dts=A,A+=g,S++}for(var P=0,F=b.length;P<F;P++){var M=b[P],U=M.unit,B=M.pts;if(void 0!==d)n.duration=Math.round((B-d)/h);else{var G=Math.round(1e3*(B-T)/c),j=0;if(r&&t.isAAC&&G){if(G>0&&G<ot)j=Math.round((B-T)/g),N.b.log(G+" ms hole between AAC samples detected,filling it"),j>0&&(o=rt.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),o||(o=U.subarray()),t.len+=j*o.length);else if(G<-12){N.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(T/c).toFixed(3)+"s/"+(B/c).toFixed(3)+"s/"+-G+"ms"),t.len-=U.byteLength;continue}B=T}if(u=Math.max(0,B),!(t.len>0))return;var K=y?t.len:t.len+8;a=y?0:8;try{s=new Uint8Array(K)}catch(t){return void this.observer.trigger(k.a.ERROR,{type:D.b.MUX_ERROR,details:D.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:K,reason:"fail allocating audio mdat "+K})}if(!y){var H=new DataView(s.buffer);H.setUint32(0,K),s.set(nt.types.mdat,4)}for(var W=0;W<j;W++)o=rt.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),o||(N.b.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),o=U.subarray()),s.set(o,a),a+=o.byteLength,n={size:o.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(n)}s.set(U,a);var V=U.byteLength;a+=V,n={size:V,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(n),d=B}var q=0,Y=E.length;if(Y>=2&&(q=E[Y-2].duration,n.duration=q),Y){this.nextAudioPts=T=d+h*q,t.len=0,t.samples=E,l=y?new Uint8Array:nt.moof(t.sequenceNumber++,u/h,t),t.samples=[];var z=u/c,X=T/c,Q={data1:l,data2:s,startPTS:z,endPTS:X,startDTS:z,endDTS:X,type:"audio",nb:Y};return this.observer.trigger(k.a.FRAG_PARSING_DATA,Q),Q}return null},t.prototype.remuxEmptyAudio=function(t,e,r,i){var a=t.inputTimeScale,n=t.samplerate?t.samplerate:a,o=a/n,s=this.nextAudioPts,l=(void 0!==s?s:i.startDTS*a)+this._initDTS,u=i.endDTS*a+this._initDTS,d=1024,c=o*d,f=Math.ceil((u-l)/c),h=rt.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(N.b.warn("remux empty Audio"),!h)return void N.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var p=[],g=0;g<f;g++){var v=l+g*c;p.push({unit:h,pts:v,dts:v}),t.len+=h.length}t.samples=p,this.remuxAudio(t,e,r)},t.prototype.remuxID3=function(t,e){var r,i=t.samples.length,a=t.inputTimeScale,n=this._initPTS,o=this._initDTS;if(i){for(var s=0;s<i;s++)r=t.samples[s],r.pts=(r.pts-n)/a,r.dts=(r.dts-o)/a;this.observer.trigger(k.a.FRAG_PARSING_METADATA,{samples:t.samples})}t.samples=[],e=e},t.prototype.remuxText=function(t,e){t.samples.sort(function(t,e){return t.pts-e.pts});var r,i=t.samples.length,a=t.inputTimeScale,n=this._initPTS;if(i){for(var o=0;o<i;o++)r=t.samples[o],r.pts=(r.pts-n)/a;this.observer.trigger(k.a.FRAG_PARSING_USERDATA,{samples:t.samples})}t.samples=[],e=e},t.prototype._PTSNormalize=function(t,e){var r;if(void 0===e)return t;for(r=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=r;return t},t}(),lt=st,ut=function(){function t(e){_(this,t),this.observer=e}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(){},t.prototype.resetInitSegment=function(){},t.prototype.remux=function(t,e,r,i,a,n,o,s){var l=this.observer,u="";t&&(u+="audio"),e&&(u+="video"),l.trigger(k.a.FRAG_PARSING_DATA,{data1:s,startPTS:a,startDTS:a,type:u,nb:1,dropped:0}),l.trigger(k.a.FRAG_PARSED)},t}(),dt=ut,ct=function(){function t(e,r,i,a){L(this,t),this.observer=e,this.typeSupported=r,this.config=i,this.vendor=a}return t.prototype.destroy=function(){var t=this.demuxer;t&&t.destroy()},t.prototype.push=function(t,e,r,i,a,n,o,s,l,u,d,c){if(t.byteLength>0&&null!=e&&null!=e.key&&"AES-128"===e.method){var f=this.decrypter;null==f&&(f=this.decrypter=new U(this.observer,this.config));var h,p=this;try{h=performance.now()}catch(t){h=Date.now()}f.decrypt(t,e.key.buffer,e.iv.buffer,function(t){var f;try{f=performance.now()}catch(t){f=Date.now()}p.observer.trigger(k.a.FRAG_DECRYPTED,{stats:{tstart:h,tdecrypt:f}}),p.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),i,a,n,o,s,l,u,d,c)})}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),i,a,n,o,s,l,u,d,c)},t.prototype.pushDecrypted=function(t,e,r,i,a,n,o,s,l,u,d,c){var f=this.demuxer;if(!f||o&&!this.probe(t)){for(var h=this.observer,p=this.typeSupported,g=this.config,v=[{demux:$,remux:lt},{demux:j,remux:lt},{demux:tt,remux:lt},{demux:W,remux:dt}],m=0,y=v.length;m<y;m++){var b=v[m],E=b.demux.probe;if(E(t)){var T=this.remuxer=new b.remux(h,g,p,this.vendor);f=new b.demux(h,T,g,p),this.probe=E;break}}if(!f)return void h.trigger(k.a.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=f}var R=this.remuxer;(o||s)&&(f.resetInitSegment(r,i,a,u),R.resetInitSegment()),o&&(f.resetTimeStamp(c),R.resetTimeStamp(c)),"function"==typeof f.setDecryptData&&f.setDecryptData(e),f.append(t,n,l,d)},t}();e.a=ct},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){var r=Mt[e];return!!r&&r[t.slice(0,4)]===!0}function o(t){return MediaSource.isTypeSupported('video/mp4;codecs="'+t+'"')}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e,r){var i=t[e],a=t[r],n=a.startPTS;isNaN(n)?r>e?a.start=i.start+i.duration:a.start=Math.max(i.start-a.duration,0):r>e?(i.duration=n-i.start,i.duration<0&&Dt.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-n,a.duration<0&&Dt.b.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"))}function y(t,e,r,i,a,n){var o=r;if(!isNaN(e.startPTS)){var s=Math.abs(e.startPTS-r);isNaN(e.deltaPTS)?e.deltaPTS=s:e.deltaPTS=Math.max(s,e.deltaPTS),o=Math.max(r,e.startPTS),r=Math.min(r,e.startPTS),i=Math.max(i,e.endPTS),a=Math.min(a,e.startDTS),n=Math.max(n,e.endDTS)}var l=r-e.start;e.start=e.startPTS=r,e.maxStartPTS=o,e.endPTS=i,e.startDTS=a,e.endDTS=n,e.duration=i-r;var u=e.sn;if(!t||u<t.startSN||u>t.endSN)return 0;var d,c,f;for(d=u-t.startSN,c=t.fragments,c[d]=e,f=d;f>0;f--)m(c,f,f-1);for(f=d;f<c.length-1;f++)m(c,f,f+1);return t.PTSKnown=!0,l}function b(t,e){var r,i=Math.max(t.startSN,e.startSN)-e.startSN,a=Math.min(t.endSN,e.endSN)-e.startSN,n=e.startSN-t.startSN,o=t.fragments,s=e.fragments,l=0;if(a<i)return void(e.PTSKnown=!1);for(var u=i;u<=a;u++){var d=o[n+u],c=s[u];c&&d&&(l=d.cc-c.cc,isNaN(d.startPTS)||(c.start=c.startPTS=d.startPTS,c.endPTS=d.endPTS,c.duration=d.duration,c.backtracked=d.backtracked,c.dropped=d.dropped,r=c))}if(l)for(Dt.b.log("discontinuity sliding from playlist, take drift into account"),u=0;u<s.length;u++)s[u].cc+=l;if(r)y(e,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS);else if(n>=0&&n<o.length){var f=o[n].start;for(u=0;u<s.length;u++)s[u].start+=f}e.PTSKnown=t.PTSKnown}function E(t,e){for(var r=null,i=0;i<t.length;i+=1){var a=t[i];if(a&&a.cc===e){r=a;break}}return r}function T(t,e){return $t.search(t,function(t){return t.cc<e?1:t.cc>e?-1:0})}function R(t,e,r){var i=!1;return e&&e.details&&r&&(r.endCC>r.startCC||t&&t.cc<r.startCC)&&(i=!0),i}function S(t,e){var r=t.fragments,i=e.fragments;if(!i.length||!r.length)return void Dt.b.log("No fragments to align");var a=E(r,i[0].cc);return!a||a&&!a.startPTS?void Dt.b.log("No frag in previous level to align on"):a}function A(t,e){e.fragments.forEach(function(e){if(e){var r=e.start+t;e.start=e.startPTS=r,e.endPTS=r+e.duration}}),e.PTSKnown=!0}function w(t,e,r){if(R(t,e,r)){var i=S(e.details,r);i&&(Dt.b.log("Adjusting PTS using last level due to CC increase within current level"),A(i.start,r))}if(r.PTSKnown===!1&&e&&e.details){var a=e.details.programDateTime,n=r.programDateTime,o=(n-a)/1e3+e.details.fragments[0].start;isNaN(o)||(Dt.b.log("adjusting PTS using programDateTime delta, sliding:"+o.toFixed(3)),A(o,r))}}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function k(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function D(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function O(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function C(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function P(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function B(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function K(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function H(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function V(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function z(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function X(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function $(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function et(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function rt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new We,this.regionList=[]}function it(t){function e(t,e,r,i){return 3600*(0|t)+60*(0|e)+(0|r)+(0|i)/1e3}var r=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?e(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?e(r[1],r[2],0,r[4]):e(0,r[1],r[2],r[4]):null}function at(){this.values=Object.create(null)}function nt(t,e,r,i){var a=i?t.split(i):[t];for(var n in a)if("string"==typeof a[n]){var o=a[n].split(r);if(2===o.length){var s=o[0],l=o[1];e(s,l)}}}function ot(t,e,r){function i(){var e=it(t);if(null===e)throw new Error("Malformed timestamp: "+o);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function a(t,e){var i=new at;nt(t,function(t,e){switch(t){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===e){i.set(t,r[a].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":var n=e.split(","),o=n[0];i.integer(t,o),i.percent(t,o)&&i.set("snapToLines",!1),i.alt(t,o,["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",qe,"end"]);break;case"position":n=e.split(","),i.percent(t,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",qe,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",qe,"end","left","right"])}},/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&Ve.line===-1&&(a=-1),e.line=a,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",qe);var n=i.get("position","auto");"auto"===n&&50===Ve.position&&(n="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=n}function n(){t=t.replace(/^\s+/,"")}var o=t;if(n(),e.startTime=i(),n(),"-->"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);t=t.substr(3),n(),e.endTime=i(),n(),a(t,e)}function st(t){return t.replace(/<br(?: \/)?>/gi,"\n")}function lt(t,e,r,i){for(var a,n,o,s,l,u=window.VTTCue||window.TextTrackCue,d=0;d<i.rows.length;d++)if(a=i.rows[d],o=!0,s=0,l="",!a.isEmpty()){for(var c=0;c<a.chars.length;c++)a.chars[c].uchar.match(/\s/)&&o?s++:(l+=a.chars[c].uchar,o=!1);a.cueStartTime=e,e===r&&(r+=1e-4),n=new u(e,r,st(l.trim())),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?n.line=d+1:n.line=d>7?d-2:d+1,n.align="left",n.position=Math.max(0,Math.min(100,100*(s/32)+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(n)}}function ut(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ct(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function ft(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function ht(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}function pt(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function gt(t,e,r,i){return Math.min(e,i)-Math.max(t,r)}function vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function yt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function bt(t){for(var e=[],r=0;r<t.length;r++)"subtitles"===t[r].kind&&e.push(t[r]);return e}function Et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function Rt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function St(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var At={};r.d(At,"newCue",function(){return lt});var wt=r(5),_t=r.n(wt),Lt=r(1),kt=r(2),Dt=r(0),It="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},Ot=function(){function t(e){i(this,t),this.hls=e,this.onEvent=this.onEvent.bind(this);for(var r=arguments.length,a=Array(r>1?r-1:0),n=1;n<r;n++)a[n-1]=arguments[n];this.handledEvents=a,this.useGenericHandler=!0,this.registerListeners()}return t.prototype.destroy=function(){this.unregisterListeners()},t.prototype.isEventHandler=function(){return"object"===It(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent},t.prototype.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){if("hlsEventGeneric"===t)throw new Error("Forbidden event name: "+t);this.hls.on(t,this.onEvent)},this)},t.prototype.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){this.hls.off(t,this.onEvent)},this)},t.prototype.onEvent=function(t,e){this.onEventGeneric(t,e)},t.prototype.onEventGeneric=function(t,e){var r=function(t,e){var r="on"+t.replace("hls","");if("function"!=typeof this[r])throw new Error("Event "+t+" has no generic handler in this "+this.constructor.name+" class (tried "+r+")");return this[r].bind(this,e)};try{r.call(this,t,e).call()}catch(e){Dt.b.error("internal error happened while processing "+t+":"+e.message),this.hls.trigger(Lt.a.ERROR,{type:kt.b.OTHER_ERROR,details:kt.a.INTERNAL_EXCEPTION,fatal:!1,event:t,err:e})}},t}(),Ct=Ot,xt=/^(\d+)x(\d+)$/,Pt=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,Ft=function(){function t(e){a(this,t),"string"==typeof e&&(e=t.parseAttrList(e));for(var r in e)e.hasOwnProperty(r)&&(this[r]=e[r])}return t.prototype.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;i<e.length/2;i++)r[i]=parseInt(e.slice(2*i,2*i+2),16);return r}return null},t.prototype.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.decimalFloatingPoint=function(t){return parseFloat(this[t])},t.prototype.enumeratedString=function(t){return this[t]},t.prototype.decimalResolution=function(t){var e=xt.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,r={};for(Pt.lastIndex=0;null!==(e=Pt.exec(t));){var i=e[2],a='"';0===i.indexOf(a)&&i.lastIndexOf(a)===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}(),Nt=Ft,Mt={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}},Ut=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),Bt=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,Gt=/#EXT-X-MEDIA:(.*)/g,jt=new RegExp([/#EXTINF:(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)(\S+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),Kt=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,Ht=function(){function t(){u(this,t),this.method=null,this.key=null,this.iv=null,this._uri=null}return Ut(t,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=_t.a.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}]),t}(),Wt=function(){function t(){u(this,t),this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[]}return t.prototype.createInitializationVector=function(t){for(var e=new Uint8Array(16),r=12;r<16;r++)e[r]=t>>8*(15-r)&255;return e},t.prototype.fragmentDecryptdataFromLevelkey=function(t,e){var r=t;return t&&t.method&&t.uri&&!t.iv&&(r=new Ht,r.method=t.method,r.baseuri=t.baseuri,r.reluri=t.reluri,r.iv=this.createInitializationVector(e)),r},t.prototype.cloneObj=function(t){return JSON.parse(JSON.stringify(t))},Ut(t,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=_t.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange){var t=this._byteRange=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var r=this.lastByteRangeEndOffset;t[0]=r?r:0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0]}}return this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",
25
- get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}}]),t}(),Vt=function(t){function e(r){u(this,e);var i=s(this,t.call(this,r,Lt.a.MANIFEST_LOADING,Lt.a.LEVEL_LOADING,Lt.a.AUDIO_TRACK_LOADING,Lt.a.SUBTITLE_TRACK_LOADING));return i.loaders={},i}return l(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},Ct.prototype.destroy.call(this)},e.prototype.onManifestLoading=function(t){this.load(t.url,{type:"manifest"})},e.prototype.onLevelLoading=function(t){this.load(t.url,{type:"level",level:t.level,id:t.id})},e.prototype.onAudioTrackLoading=function(t){this.load(t.url,{type:"audioTrack",id:t.id})},e.prototype.onSubtitleTrackLoading=function(t){this.load(t.url,{type:"subtitleTrack",id:t.id})},e.prototype.load=function(t,e){var r=this.loaders[e.type];if(r){var i=r.context;if(i&&i.url===t)return void Dt.b.trace("playlist request ongoing");Dt.b.warn("abort previous loader for type:"+e.type),r.abort()}var a=this.hls.config,n=void 0,o=void 0,s=void 0,l=void 0;"manifest"===e.type?(n=a.manifestLoadingMaxRetry,o=a.manifestLoadingTimeOut,s=a.manifestLoadingRetryDelay,l=a.manifestLoadingMaxRetryTimeout):(n=a.levelLoadingMaxRetry,o=a.levelLoadingTimeOut,s=a.levelLoadingRetryDelay,l=a.levelLoadingMaxRetryTimeout,Dt.b.log("loading playlist for "+e.type+" "+(e.level||e.id))),r=this.loaders[e.type]=e.loader="undefined"!=typeof a.pLoader?new a.pLoader(a):new a.loader(a),e.url=t,e.responseType="";var u=void 0,d=void 0;u={timeout:o,maxRetry:n,retryDelay:s,maxRetryDelay:l},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.url=e.url+"?no_cache="+Math.random(),r.load(e,u,d)},e.prototype.resolve=function(t,e){return _t.a.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},e.prototype.parseMasterPlaylist=function(t,e){function r(t,e){["video","audio"].forEach(function(r){var i=t.filter(function(t){return n(t,r)});if(i.length){var a=i.filter(function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)});e[r+"Codec"]=a.length>0?a[0]:i[0],t=t.filter(function(t){return i.indexOf(t)===-1})}}),e.unknownCodecs=t}var i=[],a=void 0;for(Bt.lastIndex=0;null!=(a=Bt.exec(t));){var o={},s=o.attrs=new Nt(a[1]);o.url=this.resolve(a[2],e);var l=s.decimalResolution("RESOLUTION");l&&(o.width=l.width,o.height=l.height),o.bitrate=s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),o.name=s.NAME,r([].concat((s.CODECS||"").split(/[ ,]+/)),o),o.videoCodec&&o.videoCodec.indexOf("avc1")!==-1&&(o.videoCodec=this.avc1toavcoti(o.videoCodec)),i.push(o)}return i},e.prototype.parseMasterPlaylistMedia=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=void 0,n=[],o=0;for(Gt.lastIndex=0;null!=(a=Gt.exec(t));){var s={},l=new Nt(a[1]);l.TYPE===r&&(s.groupId=l["GROUP-ID"],s.name=l.NAME,s.type=r,s.default="YES"===l.DEFAULT,s.autoselect="YES"===l.AUTOSELECT,s.forced="YES"===l.FORCED,l.URI&&(s.url=this.resolve(l.URI,e)),s.lang=l.LANGUAGE,s.name||(s.name=s.lang),i&&(s.audioCodec=i),s.id=o++,n.push(s))}return n},e.prototype.avc1toavcoti=function(t){var e,r=t.split(".");return r.length>2?(e=r.shift()+".",e+=parseInt(r.shift()).toString(16),e+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):e=t,e},e.prototype.parseLevelPlaylist=function(t,e,r,i){var a,n,o=0,s=0,l={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},u=new Ht,d=0,c=null,f=new Wt;for(jt.lastIndex=0;null!==(a=jt.exec(t));){var h=a[1];if(h){f.duration=parseFloat(h);var p=(" "+a[2]).slice(1);f.title=p?p:null,f.tagList.push(p?["INF",h,p]:["INF",h])}else if(a[3]){if(!isNaN(f.duration)){var g=o++;f.type=i,f.start=s,f.levelkey=u,f.sn=g,f.level=r,f.cc=d,f.baseurl=e,f.relurl=(" "+a[3]).slice(1),l.fragments.push(f),c=f,s+=f.duration,f=new Wt}}else if(a[4]){if(f.rawByteRange=(" "+a[4]).slice(1),c){var v=c.byteRangeEndOffset;v&&(f.lastByteRangeEndOffset=v)}}else if(a[5])f.rawProgramDateTime=(" "+a[5]).slice(1),f.tagList.push(["PROGRAM-DATE-TIME",f.rawProgramDateTime]),void 0===l.programDateTime&&(l.programDateTime=new Date(new Date(Date.parse(a[5]))-1e3*s));else{for(a=a[0].match(Kt),n=1;n<a.length&&void 0===a[n];n++);var m=(" "+a[n+1]).slice(1),y=(" "+a[n+2]).slice(1);switch(a[n]){case"#":f.tagList.push(y?[m,y]:[m]);break;case"PLAYLIST-TYPE":l.type=m.toUpperCase();break;case"MEDIA-SEQUENCE":o=l.startSN=parseInt(m);break;case"TARGETDURATION":l.targetduration=parseFloat(m);break;case"VERSION":l.version=parseInt(m);break;case"EXTM3U":break;case"ENDLIST":l.live=!1;break;case"DIS":d++,f.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":d=parseInt(m);break;case"KEY":var b=m,E=new Nt(b),T=E.enumeratedString("METHOD"),R=E.URI,S=E.hexadecimalInteger("IV");T&&(u=new Ht,R&&["AES-128","SAMPLE-AES"].indexOf(T)>=0&&(u.method=T,u.baseuri=e,u.reluri=R,u.key=null,u.iv=S));break;case"START":var A=m,w=new Nt(A),_=w.decimalFloatingPoint("TIME-OFFSET");isNaN(_)||(l.startTimeOffset=_);break;case"MAP":var L=new Nt(m);f.relurl=L.URI,f.rawByteRange=L.BYTERANGE,f.baseurl=e,f.level=r,f.type=i,f.sn="initSegment",l.initSegment=f,f=new Wt;break;default:Dt.b.warn("line parsed but not handled: "+a)}}}return f=c,f&&!f.relurl&&(l.fragments.pop(),s-=f.duration),l.totalduration=s,l.averagetargetduration=s/l.fragments.length,l.endSN=o-1,l.startCC=l.fragments[0]?l.fragments[0].cc:0,l.endCC=d,l},e.prototype.loadsuccess=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=t.data,n=t.url,o=r.type,s=r.id,l=r.level,u=this.hls;if(this.loaders[o]=void 0,void 0!==n&&0!==n.indexOf("data:")||(n=r.url),e.tload=performance.now(),0===a.indexOf("#EXTM3U"))if(a.indexOf("#EXTINF:")>0){var d="audioTrack"!==o&&"subtitleTrack"!==o,c=isNaN(l)?isNaN(s)?0:s:l,f=this.parseLevelPlaylist(a,n,c,"audioTrack"===o?"audio":"subtitleTrack"===o?"subtitle":"main");f.tload=e.tload,"manifest"===o&&u.trigger(Lt.a.MANIFEST_LOADED,{levels:[{url:n,details:f}],audioTracks:[],url:n,stats:e,networkDetails:i}),e.tparsed=performance.now(),f.targetduration?d?u.trigger(Lt.a.LEVEL_LOADED,{details:f,level:l||0,id:s||0,stats:e,networkDetails:i}):"audioTrack"===o?u.trigger(Lt.a.AUDIO_TRACK_LOADED,{details:f,id:s,stats:e,networkDetails:i}):"subtitleTrack"===o&&u.trigger(Lt.a.SUBTITLE_TRACK_LOADED,{details:f,id:s,stats:e,networkDetails:i}):u.trigger(Lt.a.ERROR,{type:kt.b.NETWORK_ERROR,details:kt.a.MANIFEST_PARSING_ERROR,fatal:!0,url:n,reason:"invalid targetduration",networkDetails:i})}else{var h=this.parseMasterPlaylist(a,n);if(h.length){var p=this.parseMasterPlaylistMedia(a,n,"AUDIO",h[0].audioCodec),g=this.parseMasterPlaylistMedia(a,n,"SUBTITLES");if(p.length){var v=!1;p.forEach(function(t){t.url||(v=!0)}),v===!1&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(Dt.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),p.unshift({type:"main",name:"main"}))}u.trigger(Lt.a.MANIFEST_LOADED,{levels:h,audioTracks:p,subtitles:g,url:n,stats:e,networkDetails:i})}else u.trigger(Lt.a.ERROR,{type:kt.b.NETWORK_ERROR,details:kt.a.MANIFEST_PARSING_ERROR,fatal:!0,url:n,reason:"no level found in manifest",networkDetails:i})}else u.trigger(Lt.a.ERROR,{type:kt.b.NETWORK_ERROR,details:kt.a.MANIFEST_PARSING_ERROR,fatal:!0,url:n,reason:"no EXTM3U delimiter",networkDetails:i})},e.prototype.loaderror=function(t,e){var r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e.loader;switch(e.type){case"manifest":r=kt.a.MANIFEST_LOAD_ERROR,i=!0;break;case"level":r=kt.a.LEVEL_LOAD_ERROR,i=!1;break;case"audioTrack":r=kt.a.AUDIO_TRACK_LOAD_ERROR,i=!1}n&&(n.abort(),this.loaders[e.type]=void 0),this.hls.trigger(Lt.a.ERROR,{type:kt.b.NETWORK_ERROR,details:r,fatal:i,url:n.url,loader:n,response:t,context:e,networkDetails:a})},e.prototype.loadtimeout=function(t,e){var r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e.loader;switch(e.type){case"manifest":r=kt.a.MANIFEST_LOAD_TIMEOUT,i=!0;break;case"level":r=kt.a.LEVEL_LOAD_TIMEOUT,i=!1;break;case"audioTrack":r=kt.a.AUDIO_TRACK_LOAD_TIMEOUT,i=!1}n&&(n.abort(),this.loaders[e.type]=void 0),this.hls.trigger(Lt.a.ERROR,{type:kt.b.NETWORK_ERROR,details:r,fatal:i,url:n.url,loader:n,context:e,networkDetails:a})},e}(Ct),qt=Vt,Yt=function(t){function e(r){d(this,e);var i=c(this,t.call(this,r,Lt.a.FRAG_LOADING));return i.loaders={},i}return f(e,t),e.prototype.destroy=function(){var t=this.loaders;for(var e in t){var r=t[e];r&&r.destroy()}this.loaders={},Ct.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag,r=e.type,i=this.loaders[r],a=this.hls.config;e.loaded=0,i&&(Dt.b.warn("abort previous fragment loader for type:"+r),i.abort()),i=this.loaders[r]=e.loader="undefined"!=typeof a.fLoader?new a.fLoader(a):new a.loader(a);var n=void 0,o=void 0,s=void 0;n={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var l=e.byteRangeStartOffset,u=e.byteRangeEndOffset;isNaN(l)||isNaN(u)||(n.rangeStart=l,n.rangeEnd=u),o={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},s={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},i.load(n,o,s)},e.prototype.loadsuccess=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=t.data,n=r.frag;n.loader=void 0,this.loaders[n.type]=void 0,this.hls.trigger(Lt.a.FRAG_LOADED,{payload:a,frag:n,stats:e,networkDetails:i})},e.prototype.loaderror=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Lt.a.ERROR,{type:kt.b.NETWORK_ERROR,details:kt.a.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t,networkDetails:r})},e.prototype.loadtimeout=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Lt.a.ERROR,{type:kt.b.NETWORK_ERROR,details:kt.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag,networkDetails:r})},e.prototype.loadprogress=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=e.frag;a.loaded=t.loaded,this.hls.trigger(Lt.a.FRAG_LOAD_PROGRESS,{frag:a,stats:t,networkDetails:i})},e}(Ct),zt=Yt,Xt=function(t){function e(r){h(this,e);var i=p(this,t.call(this,r,Lt.a.KEY_LOADING));return i.loaders={},i.decryptkey=null,i.decrypturl=null,i}return g(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},Ct.prototype.destroy.call(this)},e.prototype.onKeyLoading=function(t){var e=t.frag,r=e.type,i=this.loaders[r],a=e.decryptdata,n=a.uri;if(n!==this.decrypturl||null===this.decryptkey){var o=this.hls.config;i&&(Dt.b.warn("abort previous key loader for type:"+r),i.abort()),e.loader=this.loaders[r]=new o.loader(o),this.decrypturl=n,this.decryptkey=null;var s=void 0,l=void 0,u=void 0;s={url:n,frag:e,responseType:"arraybuffer"},l={timeout:o.fragLoadingTimeOut,maxRetry:o.fragLoadingMaxRetry,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(s,l,u)}else this.decryptkey&&(a.key=this.decryptkey,this.hls.trigger(Lt.a.KEY_LOADED,{frag:e}))},e.prototype.loadsuccess=function(t,e,r){var i=r.frag;this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(Lt.a.KEY_LOADED,{frag:i})},e.prototype.loaderror=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Lt.a.ERROR,{type:kt.b.NETWORK_ERROR,details:kt.a.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.prototype.loadtimeout=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Lt.a.ERROR,{type:kt.b.NETWORK_ERROR,details:kt.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},e}(Ct),Qt=Xt,Jt={search:function(t,e){for(var r=0,i=t.length-1,a=null,n=null;r<=i;){a=(r+i)/2|0,n=t[a];var o=e(n);if(o>0)r=a+1;else{if(!(o<0))return n;i=a-1}}return null}},$t=Jt,Zt={isBuffered:function(t,e){if(t)for(var r=t.buffered,i=0;i<r.length;i++)if(e>=r.start(i)&&e<=r.end(i))return!0;return!1},bufferInfo:function(t,e,r){if(t){var i,a=t.buffered,n=[];for(i=0;i<a.length;i++)n.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(n,e,r)}return{len:0,start:e,end:e,nextStart:void 0}},bufferedInfo:function(t,e,r){var i,a,n,o,s,l=[];for(t.sort(function(t,e){var r=t.start-e.start;return r?r:e.end-t.end}),s=0;s<t.length;s++){var u=l.length;if(u){var d=l[u-1].end;t[s].start-d<r?t[s].end>d&&(l[u-1].end=t[s].end):l.push(t[s])}else l.push(t[s])}for(s=0,i=0,a=n=e;s<l.length;s++){var c=l[s].start,f=l[s].end;if(e+r>=c&&e<f)a=c,n=f,i=n-e;else if(e+r<c){o=c;break}}return{len:i,start:a,end:n,nextStart:o}}},te=Zt,ee=r(6),re=r(4),ie=r.n(re),ae=r(8),ne=r.n(ae),oe=function(){function t(e,r){v(this,t),this.hls=e,this.id=r;var i=this.observer=new ie.a,a=e.config;i.trigger=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),a=1;a<e;a++)r[a-1]=arguments[a];i.emit.apply(i,[t,t].concat(r))},i.off=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),a=1;a<e;a++)r[a-1]=arguments[a];i.removeListener.apply(i,[t].concat(r))};var n=function(t,r){r=r||{},r.frag=this.frag,r.id=this.id,e.trigger(t,r)}.bind(this);i.on(Lt.a.FRAG_DECRYPTED,n),i.on(Lt.a.FRAG_PARSING_INIT_SEGMENT,n),i.on(Lt.a.FRAG_PARSING_DATA,n),i.on(Lt.a.FRAG_PARSED,n),i.on(Lt.a.ERROR,n),i.on(Lt.a.FRAG_PARSING_METADATA,n),i.on(Lt.a.FRAG_PARSING_USERDATA,n),i.on(Lt.a.INIT_PTS_FOUND,n);var o={mp4:MediaSource.isTypeSupported("video/mp4"),mpeg:MediaSource.isTypeSupported("audio/mpeg"),mp3:MediaSource.isTypeSupported('audio/mp4; codecs="mp3"')},s=navigator.vendor;if(a.enableWorker&&"undefined"!=typeof Worker){Dt.b.log("demuxing in webworker");var l=void 0;try{l=this.w=ne()(9),this.onwmsg=this.onWorkerMessage.bind(this),l.addEventListener("message",this.onwmsg),l.onerror=function(t){e.trigger(Lt.a.ERROR,{type:kt.b.OTHER_ERROR,details:kt.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},l.postMessage({cmd:"init",typeSupported:o,vendor:s,id:r,config:JSON.stringify(a)})}catch(t){Dt.b.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),l&&URL.revokeObjectURL(l.objectURL),this.demuxer=new ee.a(i,o,a,s),this.w=void 0}}else this.demuxer=new ee.a(i,o,a,s)}return t.prototype.destroy=function(){var t=this.w;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.w=null;else{var e=this.demuxer;e&&(e.destroy(),this.demuxer=null)}var r=this.observer;r&&(r.removeAllListeners(),this.observer=null)},t.prototype.push=function(t,e,r,i,a,n,o,s){var l=this.w,u=isNaN(a.startDTS)?a.start:a.startDTS,d=a.decryptdata,c=this.frag,f=!(c&&a.cc===c.cc),h=!(c&&a.level===c.level),p=c&&a.sn===c.sn+1,g=!h&&p;if(f&&Dt.b.log(this.id+":discontinuity detected"),h&&Dt.b.log(this.id+":switch detected"),this.frag=a,l)l.postMessage({cmd:"demux",data:t,decryptdata:d,initSegment:e,audioCodec:r,videoCodec:i,timeOffset:u,discontinuity:f,trackSwitch:h,contiguous:g,duration:n,accurateTimeOffset:o,defaultInitPTS:s},[t]);else{var v=this.demuxer;v&&v.push(t,d,e,r,i,u,f,h,g,n,o,s)}},t.prototype.onWorkerMessage=function(t){var e=t.data,r=this.hls;switch(e.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case Lt.a.FRAG_PARSING_DATA:e.data.data1=new Uint8Array(e.data1),e.data2&&(e.data.data2=new Uint8Array(e.data2));default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,r.trigger(e.event,e.data)}},t}(),se=oe,le={toString:function(t){for(var e="",r=t.length,i=0;i<r;i++)e+="["+t.start(i).toFixed(3)+","+t.end(i).toFixed(3)+"]";return e}},ue=le,de=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),ce={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR"},fe=function(t){function e(r){_(this,e);var i=L(this,t.call(this,r,Lt.a.MEDIA_ATTACHED,Lt.a.MEDIA_DETACHING,Lt.a.MANIFEST_LOADING,Lt.a.MANIFEST_PARSED,Lt.a.LEVEL_LOADED,Lt.a.KEY_LOADED,Lt.a.FRAG_LOADED,Lt.a.FRAG_LOAD_EMERGENCY_ABORTED,Lt.a.FRAG_PARSING_INIT_SEGMENT,Lt.a.FRAG_PARSING_DATA,Lt.a.FRAG_PARSED,Lt.a.ERROR,Lt.a.AUDIO_TRACK_SWITCHING,Lt.a.AUDIO_TRACK_SWITCHED,Lt.a.BUFFER_CREATED,Lt.a.BUFFER_APPENDED,Lt.a.BUFFER_FLUSHED));return i.config=r.config,i.audioCodecSwap=!1,i.ticks=0,i._state=ce.STOPPED,i.ontick=i.tick.bind(i),i}return k(e,t),e.prototype.destroy=function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),Ct.prototype.destroy.call(this),this.state=ce.STOPPED},e.prototype.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var i=r.startLevel;i===-1&&(i=0,this.bitrateTest=!0),this.level=r.nextLoadLevel=i,this.loadedmetadata=!1}e>0&&t===-1&&(Dt.b.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=ce.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=ce.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=ce.STOPPED,this.forceStartLoad=!1},e.prototype.tick=function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){switch(this.state){case ce.ERROR:break;case ce.BUFFER_FLUSHING:this.fragLoadError=0;break;case ce.IDLE:this._doTickIdle();break;case ce.WAITING_LEVEL:var t=this.levels[this.level];t&&t.details&&(this.state=ce.IDLE);break;case ce.FRAG_LOADING_WAITING_RETRY:var e=performance.now(),r=this.retryDate;(!r||e>=r||this.media&&this.media.seeking)&&(Dt.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=ce.IDLE);break;case ce.ERROR:case ce.STOPPED:case ce.FRAG_LOADING:case ce.PARSING:case ce.PARSED:case ce.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},e.prototype._doTickIdle=function(){var t=this.hls,e=t.config,r=this.media;if(void 0!==this.levelLastLoaded&&(r||!this.startFragRequested&&e.startFragPrefetch)){var i=void 0;i=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var a=t.nextLoadLevel,n=this.levels[a];if(n){var o=n.bitrate,s=void 0;s=o?Math.max(8*e.maxBufferSize/o,e.maxBufferLength):e.maxBufferLength,s=Math.min(s,e.maxMaxBufferLength);var l=te.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,i,e.maxBufferHole),u=l.len;if(!(u>=s)){Dt.b.trace("buffer length of "+u.toFixed(3)+" is below max of "+s.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=a;var d=n.details;if("undefined"==typeof d||d.live&&this.levelLastLoaded!==a)return void(this.state=ce.WAITING_LEVEL);var c=this.fragPrevious;if(!d.live&&c&&!c.backtracked&&c.sn===d.endSN&&!l.nextStart){var f=Math.min(r.duration,c.start+c.duration);if(f-Math.max(l.end,c.start)<=Math.max(.2,c.duration)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(Lt.a.BUFFER_EOS,h),void(this.state=ce.ENDED)}}this._fetchPayloadOrEos(i,l,d)}}}},e.prototype._fetchPayloadOrEos=function(t,e,r){var i=this.fragPrevious,a=this.level,n=r.fragments,o=n.length;if(0!==o){var s=n[0].start,l=n[o-1].start+n[o-1].duration,u=e.end,d=void 0;if(r.initSegment&&!r.initSegment.data)d=r.initSegment;else if(r.live){var c=this.config.initialLiveManifestSize;if(o<c)return void Dt.b.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+c);if(d=this._ensureFragmentAtLivePoint(r,u,s,l,i,n,o),null===d)return}else u<s&&(d=n[0]);d||(d=this._findFragment(s,i,o,n,u,l,r)),d&&this._loadFragmentOrKey(d,a,r,t,u)}},e.prototype._ensureFragmentAtLivePoint=function(t,e,r,i,a,n,o){var s=this.hls.config,l=this.media,u=void 0,d=void 0!==s.liveMaxLatencyDuration?s.liveMaxLatencyDuration:s.liveMaxLatencyDurationCount*t.targetduration;if(e<Math.max(r-s.maxFragLookUpTolerance,i-d)){var c=this.liveSyncPosition=this.computeLivePosition(r,t);Dt.b.log("buffer end: "+e.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+c.toFixed(3)),e=c,l&&l.readyState&&l.duration>c&&(l.currentTime=c),this.nextLoadPosition=c}if(t.PTSKnown&&e>i&&l&&l.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(a){var f=a.sn+1;if(f>=t.startSN&&f<=t.endSN){var h=n[f-t.startSN];a.cc===h.cc&&(u=h,Dt.b.log("live playlist, switching playlist, load frag with next SN: "+u.sn))}u||(u=$t.search(n,function(t){return a.cc-t.cc}),u&&Dt.b.log("live playlist, switching playlist, load frag with same CC: "+u.sn))}u||(u=n[Math.min(o-1,Math.round(o/2))],Dt.b.log("live playlist, switching playlist, unknown, load middle frag : "+u.sn))}return u},e.prototype._findFragment=function(t,e,r,i,a,n,o){var s=this.hls.config,l=void 0,u=void 0,d=s.maxFragLookUpTolerance,c=e?i[e.sn-i[0].sn+1]:void 0,f=function(t){var e=Math.min(d,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-e<=a?1:t.start-e>a&&t.start?-1:0};if(a<n?(a>n-d&&(d=0),u=c&&!f(c)?c:$t.search(i,f)):u=i[r-1],u){l=u;var h=l.sn-o.startSN,p=e&&l.level===e.level,g=i[h-1],v=i[h+1];if(e&&l.sn===e.sn)if(p&&!l.backtracked)if(l.sn<o.endSN){var m=e.deltaPTS;m&&m>s.maxBufferHole&&e.dropped&&h?(l=g,Dt.b.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),e.loadCounter--):(l=v,Dt.b.log("SN just loaded, load next one: "+l.sn))}else l=null;else l.backtracked&&(v&&v.backtracked?(Dt.b.warn("Already backtracked from fragment "+v.sn+", will not backtrack to fragment "+l.sn+". Loading fragment "+v.sn),l=v):(Dt.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),l.dropped=0,g?(g.loadCounter&&g.loadCounter--,l=g,l.backtracked=!0):h&&(l=null)))}return l},e.prototype._loadFragmentOrKey=function(t,e,r,i,a){var n=this.hls,o=n.config;if(!t.decryptdata||null==t.decryptdata.uri||null!=t.decryptdata.key){if(Dt.b.log("Loading "+t.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+e+", currentTime:"+i.toFixed(3)+",bufferEnd:"+a.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,t.loadCounter){t.loadCounter++;var s=o.fragLoadingLoopThreshold;if(t.loadCounter>s&&Math.abs(this.fragLoadIdx-t.loadIdx)<s)return void n.trigger(Lt.a.ERROR,{type:kt.b.MEDIA_ERROR,details:kt.a.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:t})}else t.loadCounter=1;return t.loadIdx=this.fragLoadIdx,t.autoLevel=n.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.fragCurrent=t,this.startFragRequested=!0,isNaN(t.sn)||t.bitrateTest||(this.nextLoadPosition=t.start+t.duration),n.trigger(Lt.a.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new se(n,"main")),void(this.state=ce.FRAG_LOADING)}Dt.b.log("Loading key for "+t.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+e),this.state=ce.KEY_LOADING,n.trigger(Lt.a.KEY_LOADING,{frag:t})},e.prototype.getBufferedFrag=function(t){return $t.search(this._bufferedFrags,function(e){return t<e.startPTS?-1:t>e.endPTS?1:0})},e.prototype.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},e.prototype._checkFragmentChanged=function(){var t,e,
22
  !function(t){function e(i){if(r[i])return r[i].exports;var a=r[i]={exports:{},id:i,loaded:!1};return t[i].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(5)},function(t,e,r){!function(){"use strict";var e=function(t,e){var i,a="hlsjs",n=e.common,o=e.extend,s=e.support,l=s.browser,u=e.version,d=0===u.indexOf("6."),c=window,f=c.MediaSource||c.WebKitMediaSource,h=c.performance,p=function(t){return t.toLowerCase().indexOf("mpegurl")>-1},g=function(t){var e=t.clip&&t.clip.hlsQualities||t.hlsQualities;return s.inlineVideo&&(e===!0||e&&e.length)},v=function(t){var e=n.findDirect("video",t)[0]||n.find(".fp-player>video",t)[0];e&&(n.find("source",e).forEach(function(t){t.removeAttribute("src")}),e.removeAttribute("src"),e.load(),n.removeNode(e))},m=r(3),y=new m.TextDecoder("utf-8"),b=function(t){var e="";try{e=y.decode(t)}catch(r){try{y=new m.TextDecoder("utf-16be"),e=y.decode(t)}catch(r){try{y=new m.TextDecoder("utf-16le"),e=y.decode(t)}catch(t){}}}return e},E=function(t,e,r){e.title=e.title||r+"";var i={time:e.startTime,subtitle:e,visible:!1};t.subtitles.push(e),t.addCuepoint(i),t.addCuepoint({time:e.endTime,subtitleEnd:e.title,visible:!1}),0!==e.startTime||t.video.time||t.splash||t.trigger("cuepoint",[t,i]),t.splash&&t.one("ready."+a,function(){t.trigger("cuepoint",[t,i])})},T=function(r,l){var c,m,y,T,R,S,A,w,_,L,k,D=e.bean,I="is-seeking",O="is-poster",C=function(t,e,i){if(t.debug&&console.log("recovery."+a,"<-",e),n.removeClass(l,"is-paused"),n.addClass(l,I),i)m.startLoad();else{var o=h.now();!T||o-T>3e3?(T=h.now(),m.recoverMediaError()):(!R||o-R>3e3)&&(R=h.now(),m.swapAudioCodec(),m.recoverMediaError())}y>0&&(y-=1),D.one(c,"seeked."+a,function(){c.paused&&(n.removeClass(l,O),r.poster=!1,c.play()),n.removeClass(l,I)})},x=function(t,e,i){var a={code:t};return t>2&&(a.video=o(r.video,{src:e,url:i||e})),a},P=function(){D.one(c,"timeupdate."+a,function(){n.addClass(l,O),r.poster=!0})},F=function(){d&&r.poster&&D.one(c,"timeupdate."+a,function(){n.removeClass(l,O),r.poster=!1})},N=0,M=function(t){if(w&&w.length>1){var e=m.audioTracks,r=e.filter(function(r){var i=m.levels[t].attrs;return r.autoselect&&i&&r.groupId===i.AUDIO&&r.name===e[m.audioTrack].name}),i=r.length&&r[0].id;void 0!==i&&i!==m.audioTrack&&(m.audioTrack=i)}},U=function(t){n.find(".fp-audio",l)[0].innerHTML=t.lang||t.name,n.find(".fp-audio-menu a",l).forEach(function(e){var r=e.getAttribute("data-audio"),i=r===t.name;n.toggleClass(e,"fp-selected",i),n.toggleClass(e,"fp-color",i)})},B=function(){n.find(".fp-audio-menu",l).forEach(n.removeNode),n.find(".fp-audio",l).forEach(n.removeNode)},G=function(t){var e=n.find(".fp-subtitle-menu",l)[0];n.toggleClass(n.find("a.fp-selected",e)[0],"fp-selected"),n.toggleClass(n.find('a[data-subtitle-index="'+t+'"]',e)[0],"fp-selected")},j=function(t,e){var i=b(t.payload),a=t.frag.trackId;i&&(k[a]||(k[a]=[]),i=e.subtitleParser(i),i.forEach(function(t){if(t.text&&(k[a].push(t),r.ready&&(E(r,t,k[a].length),r.live))){var e=r.video.seekOffset;k[a]=k[a].filter(function(t){return t.endTime>=e}),r.subtitles=r.subtitles.filter(function(t){return t.endTime>=e}),r.cuepoints.forEach(function(t){t.subtitle&&t.time<e&&r.removeCuepoint(t)})}}))},K=function(){[].forEach.call(c.textTracks,function(t){"subtitles"===t.kind&&(t.mode="hidden")})},H=function(t,e){var i=t.subtitleTracks;e.subtitles&&i.length&&s.inlineVideo&&!d&&(i=i.filter(function(t){return t.groupId===i[0].groupId}),r.video.subtitles=i.map(function(t){var e={kind:"subtitles",id:t.id,srclang:t.lang,label:t.name,default:t.default};return n.append(c,n.createElement("track",e)),e}),r.on("ready."+a,function(t,e){var r,i=m.subtitleTracks;i&&i.length&&(L?n.addClass(c,"native-subtitles"):K(),i.map(function(t,e){t.default&&(m.subtitleTrack=e)}),r=m.subtitleTrack,r>-1?(!L&&k[r]&&k[r].forEach(function(t,r){E(e,t,r+1)}),G(r)):G(-1))}),D.on(l,"click."+a,".fp-subtitle-menu [data-subtitle-index]",function(t){t.preventDefault();var e=t.target.getAttribute("data-subtitle-index");return r.disableSubtitles(),m.subtitleTrack=e,e<0?void K():(G(e),void(!L&&k[e]&&k[e].forEach(function(t,e){E(r,t,e+1)})))}))},W=function(t){w=[],_=[],t.levels.forEach(function(t){var e=t.attrs&&t.attrs.AUDIO,r=t.audioCodec;e&&w.indexOf(e)<0&&(!r||f.isTypeSupported("audio/mp4;codecs="+r))&&w.push(e)}),w.length&&(_=t.audioTracks.filter(function(t){return t.groupId===w[0]})),!s.inlineVideo||d||_.length<2||(D.on(l,"click."+a,".fp-audio",function(){var t=n.find(".fp-audio-menu",l)[0];n.hasClass(t,"fp-active")?r.hideMenu():r.showMenu(t)}),D.on(l,"click."+a,".fp-audio-menu a",function(t){var e=t.target.getAttribute("data-audio"),r=m.audioTracks,i=r[m.audioTrack].groupId,a=r.filter(function(t){return t.groupId===i&&(t.name===e||t.lang===e)})[0];m.audioTrack=a.id,U(a)}),r.on("ready."+a,function(){if(B(),m&&_&&!(_.length<2)){var t=n.find(".fp-ui",l)[0],e=n.find(".fp-controls",t)[0],r=m.audioTracks[m.audioTrack],i=n.createElement("div",{className:"fp-menu fp-audio-menu",css:{width:"auto"}},"<strong>Audio</strong>");_.forEach(function(t){i.appendChild(n.createElement("a",{"data-audio":t.name},t.name))}),t.appendChild(i),e.appendChild(n.createElement("strong",{className:"fp-audio"},r)),U(r)}}))},V="active",q=function(t){return t?r.qualities.indexOf(t)<0&&(t="abr"):t=r.quality,t.toLowerCase().replace(/\ /g,"")},Y=function(){var t=r.qualities;t&&(n.removeClass(l,"quality-abr"),t.forEach(function(t){n.removeClass(l,"quality-"+q(t))}))},z=function(){d&&(delete r.hlsQualities,Y(),n.find(".fp-quality-selector",l).forEach(n.removeNode))},X=function(){return r.hlsQualities[r.qualities.indexOf(r.quality)+1]},Q=-1,J=function(t,e,i){var o,s,u,h=i.levels,p=function(t){return isNaN(Number(t))?t.level:t};if(z(),t&&!(h.length<2)){if("drive"===t){switch(h.length){case 4:o=[1,2,3];break;case 5:o=[1,2,3,4];break;case 6:o=[1,3,4,5];break;case 7:o=[1,3,5,6];break;case 8:o=[1,3,6,7];break;default:if(h.length<3||h[0].height&&h[2].height&&h[0].height===h[2].height)return;o=[1,2]}o.unshift(-1)}else switch(typeof t){case"object":o=t.map(p);break;case"string":o=t.split(/\s*,\s*/).map(Number);break;default:o=h.map(function(t,e){return e}),o.unshift(-1)}if(d&&o.indexOf(-1)<0&&o.unshift(-1),o=o.filter(function(t){if(t>-1&&t<h.length){var e=h[t];return!e.videoCodec||e.videoCodec&&f.isTypeSupported("video/mp4;codecs="+e.videoCodec)}return t===-1}),s=o.map(function(e,r){var i=h[e],a="object"==typeof t?t.filter(function(t){return p(t)===e})[0]:e,n="Level "+(r+1);return e<0?n=a.label||"Auto":a.label?n=a.label:(i.width&&i.height&&(n=Math.min(i.width,i.height)+"p"),"drive"!==t&&i.bitrate&&(n+=" ("+Math.round(i.bitrate/1e3)+"k)")),d?n:{value:e,label:n}}),!d)return r.video.qualities=s,Q>-1||o.indexOf(-1)<0?(m.loadLevel=o.indexOf(Q)<0?o[0]:Q,m.config.startLevel=m.loadLevel,r.video.quality=m.loadLevel):r.video.quality=-1,void(Q=r.video.quality);r.hlsQualities=o,r.qualities=s.slice(1),u=n.createElement("ul",{class:"fp-quality-selector"}),n.find(".fp-ui",l)[0].appendChild(u),!r.quality||s.indexOf(r.quality)<1?r.quality="abr":(m.loadLevel=X(),m.config.startLevel=m.loadLevel),s.forEach(function(t){u.appendChild(n.createElement("li",{"data-quality":q(t)},t))}),n.addClass(l,"quality-"+q()),D.on(l,"click."+a,".fp-quality-selector li",function(t){var i=t.currentTarget,o=n.find(".fp-quality-selector li",l),s=e.smoothSwitching,u=c.paused;n.hasClass(i,V)||(u||s||D.one(c,"pause."+a,function(){n.removeClass(l,"is-paused")}),o.forEach(function(t,e){var a=t===i;a&&(r.quality=e>0?r.qualities[e-1]:"abr",s&&!r.poster?m.nextLevel=X():m.currentLevel=X(),n.addClass(i,V),u&&c.play()),n.toggleClass(t,V,a)}),Y(),n.addClass(l,"quality-"+q()))})}},$={engineName:a,pick:function(t){var e=t.filter(function(t){return p(t.type)})[0];return"string"==typeof e.src&&(e.src=n.createAbsoluteUrl(e.src)),e},load:function(e){var u=r.conf,f={ended:"finish",loadeddata:"ready",pause:"pause",play:"resume",progress:"buffer",ratechange:"speed",seeked:"seek",timeupdate:"progress",volumechange:"volume",error:"error"},h=t.Events,p=!!e.autoplay||!!u.autoplay||!!u.splash,E=e.hlsQualities||u.hlsQualities,S=o(i,u.hlsjs,e.hlsjs),A=o({},S);if(e.hlsQualities===!1&&(E=!1),L=S.subtitles&&s.subtitles&&u.nativesubtitles,m?(m.destroy(),n.find("track",c).forEach(n.removeNode),n.removeClass(c,"native-subtitles"),(r.video.src&&e.src!==r.video.src||e.index)&&n.attr(c,"autoplay","autoplay")):(v(l),c=n.createElement("video",{class:"fp-engine "+a+"-engine",autoplay:!!p&&"autoplay",volume:r.volumeLevel}),s.mutedAutoplay&&!u.splash&&p&&(c.muted=!0),Object.keys(f).forEach(function(t){var e,i=f[t],s=t+"."+a;D.on(c,s,function(t){u.debug&&i.indexOf("progress")<0&&console.log(s,"->",i,t.originalEvent);var a,f,h,p=c.currentTime,g=c.seekable,v=r.video,y=r.dvr?v.seekOffset:r.live?m.liveSyncPosition:0,b=c.buffered,E=[],T=v.src,R=r.quality;switch(i){case"ready":e=o(v,{duration:c.duration,seekable:g.length&&g.end(null),width:c.videoWidth,height:c.videoHeight,url:T});break;case"resume":F(),S.bufferWhilePaused||m.startLoad(p),p<y&&(c.currentTime=y);break;case"seek":F(),!S.bufferWhilePaused&&c.paused&&m.stopLoad(),e=p;break;case"pause":S.bufferWhilePaused||m.stopLoad();break;case"progress":e=p;break;case"speed":e=c.playbackRate;break;case"volume":e=c.volume;break;case"buffer":for(a=0;a<b.length;a+=1)E.push(b.end(a));e=E.filter(function(t){return t>=p}).sort()[0],v.buffer=e;break;case"finish":S.bufferWhilePaused&&m.autoLevelEnabled&&(v.loop||u.playlist.length<2||u.advance===!1)&&(m.nextLoadLevel=N);break;case"error":if(h=c.error&&c.error.code,S.recoverMediaError&&(3===h||!h)||S.recoverNetworkError&&2===h||S.recover&&(2===h||3===h))return t.preventDefault(),void C(u,i,2===h);e=x(h,T)}r.trigger(i,[r,e]),d&&"ready"===i&&R&&(f="abr"===R?0:r.qualities.indexOf(R)+1,n.addClass(n.find(".fp-quality-selector li",l)[f],V))})}),r.on("error."+a,function(){m&&r.engine.unload()}).on("beforeseek."+a,function(t,e,r){void 0===r?t.preventDefault():!S.bufferWhilePaused&&e.paused&&m.startLoad(r)}),d?u.poster&&(r.on("stop."+a,P),!r.live||p||r.video.autoplay||D.one(c,"seeked."+a,P)):r.on("quality."+a,function(t,e,r){S.smoothSwitching?m.nextLevel=r:m.currentLevel=r,Q=r}),n.prepend(n.find(".fp-player",l)[0],c)),r.video=e,N=0,Object.keys(S).forEach(function(e){t.DefaultConfig.hasOwnProperty(e)||delete A[e];var r=S[e];switch(e){case"adaptOnStartOnly":r&&(A.startLevel=-1);break;case"autoLevelCapping":r===!1&&(r=-1),A[e]=r;break;case"startLevel":switch(r){case"auto":r=-1;break;case"firstLevel":r=void 0}A[e]=r;break;case"recover":S.recoverMediaError=!1,S.recoverNetworkError=!1,y=r;break;case"strict":r&&(S.recoverMediaError=!1,S.recoverNetworkError=!1,y=0)}}),m=new t(A),r.engine[a]=m,T=null,R=null,r.disableSubtitles(),k={},Object.keys(h).forEach(function(e){var i=h[e],s=S.listeners,f=s&&s.indexOf(i)>-1;m.on(i,function(i,s){var h,p={},v=t.ErrorTypes,T=t.ErrorDetails,R=r.video,A=R.src;switch(e){case"MANIFEST_PARSED":!g(u)||!d&&r.pluginQualitySelectorEnabled?d&&delete r.quality:J(E,S,s);break;case"MANIFEST_LOADED":W(s);break;case"SUBTITLE_TRACKS_UPDATED":H(s,S);break;case"MEDIA_ATTACHED":m.loadSource(A);break;case"FRAG_LOADED":"subtitle"===s.frag.type&&S.subtitles&&!L&&j(s,u),S.bufferWhilePaused&&!r.live&&m.autoLevelEnabled&&m.nextLoadLevel>N&&(N=m.nextLoadLevel);break;case"SUBTITLE_TRACK_SWITCH":L&&[].forEach.call(c.textTracks,function(t){t.mode=m.subtitleTracks[s.id].lang===t.language&&"subtitles"===t.kind?"showing":"hidden"});break;case"FRAG_PARSING_METADATA":if(d)return;s.samples.forEach(function(t){var e;e=function(){if(!(c.currentTime<t.dts)){D.off(c,"timeupdate."+a,e);var i=b(t.unit||t.data);r.trigger("metadata",[r,{key:i.substr(10,4),data:i}])}},D.on(c,"timeupdate."+a,e)});break;case"LEVEL_UPDATED":r.live&&(o(R,{seekOffset:s.details.fragments[0].start+m.config.nudgeOffset,duration:m.liveSyncPosition}),r.dvr&&r.playing&&r.trigger("dvrwindow",[r,{start:R.seekOffset,end:m.liveSyncPosition}]));break;case"LEVEL_SWITCHED":S.audioABR&&r.one("buffer."+a,function(t,e,r){r>e.video.time&&M(s.level)});break;case"BUFFER_APPENDED":n.removeClass(l,I);break;case"ERROR":if(s.fatal||S.strict){switch(s.type){case v.NETWORK_ERROR:S.recoverNetworkError||y?C(u,s.type,!0):s.frag&&s.frag.url?(p.url=s.frag.url,h=2):h=4;break;case v.MEDIA_ERROR:S.recoverMediaError||y?C(u,s.type):h=3;break;default:h=5}void 0!==h&&(p=x(h,A,s.url),r.trigger("error",[r,p]))}else s.details!==T.FRAG_LOOP_LOADING_ERROR&&s.details!==T.BUFFER_STALLED_ERROR||n.addClass(l,I)}f&&r.trigger(i,[r,s])})}),S.adaptOnStartOnly&&D.one(c,"timeupdate."+a,function(){m.loadLevel=m.loadLevel}),m.attachMedia(c),p&&c.paused){var w=c.play();void 0!==w&&w.catch(function(){s.mutedAutoplay||(r.unload(),d||r.message("Please click the play button",3e3))})}},resume:function(){c.play()},pause:function(){c.pause()},seek:function(t){c&&(c.currentTime=t)},volume:function(t){c&&(c.volume=t)},speed:function(t){c.playbackRate=t,r.trigger("speed",[r,t])},unload:function(){if(m){var t="."+a;r.disableSubtitles(),m.destroy(),m=0,z(),B(),r.off(t),D.off(l,t),D.off(c,t),n.removeNode(c),c=0}}};return!/^6\.0\.[0-3]$/.test(u)||r.conf.splash||r.conf.poster||r.conf.autoplay||(S=n.css(l,"backgroundColor"),A="none"!==n.css(l,"backgroundImage")||S&&"rgba(0, 0, 0, 0)"!==S&&"transparent"!==S,A&&(r.conf.poster=!0)),$};t.isSupported()&&0!==u.indexOf("5.")&&(T.engineName=a,T[a+"ClientVersion"]=t.version,T.canPlay=function(t,e){return e[a]!==!1&&e.clip[a]!==!1&&(i=o({bufferWhilePaused:!0,smoothSwitching:!0,recoverMediaError:!0},e[a],e.clip[a]),p(t)&&(!(l.safari&&s.dataload)||i.safari))},e(function(t,e){var r=t.conf;d?t.pluginQualitySelectorEnabled=g(r)&&T.canPlay("application/x-mpegurl",r):!s.mutedAutoplay||r.splash||r.autoplay||"7.1.0"!==u&&"7.0.0"!==u||(t.splash=!0,r.splash="string"!=typeof r.poster||r.poster,r.poster=void 0,r.autoplay=!0,v(e))}),e.engines.unshift(T))};"object"==typeof t&&t.exports?t.exports=e.bind(void 0,r(2)):window.Hls&&window.flowplayer&&e(window.Hls,window.flowplayer)}()},function(t,e,r){!function(e,r){t.exports=r()}(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=7)}([function(t,e,r){"use strict";function i(){}function a(t,e){return e="["+t+"] > "+e}function n(t){var e=self.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(self.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){u[e]=t[e]?t[e].bind(t):n(e)})}r.d(e,"a",function(){return d}),r.d(e,"b",function(){return c});var s="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},l={trace:i,debug:i,log:i,warn:i,info:i,error:i},u=l,d=function(t){if(t===!0||"object"===("undefined"==typeof t?"undefined":s(t))){o(t,"debug","log","info","warn","error");try{u.log()}catch(t){u=l}}else u=l},c=u},function(t,e,r){"use strict";e.a={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCH:"hlsLevelSwitch",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},function(t,e,r){"use strict";r.d(e,"b",function(){return i}),r.d(e,"a",function(){return a});var i={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},a={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(){i(this,t)}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,r){for(var i=r,a=0;t.isHeader(e,r);){a+=10;var n=t._readSize(e,r+6);a+=n,t.isFooter(e,r+10)&&(a+=10),r+=a}if(a>0)return e.subarray(i,i+a)},t._readSize=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},t.getTimeStamp=function(e){for(var r=t.getID3Frames(e),i=0;i<r.length;i++){var a=r[i];if(t.isTimeStampFrame(a))return t._readTimeStamp(a)}},t.isTimeStampFrame=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},t._getFrameData=function(e){var r=String.fromCharCode(e[0],e[1],e[2],e[3]),i=t._readSize(e,4),a=10;return{type:r,size:i,data:e.subarray(a,a+i)}},t.getID3Frames=function(e){for(var r=0,i=[];t.isHeader(e,r);){var a=t._readSize(e,r+6);r+=10;for(var n=r+a;r+8<n;){var o=t._getFrameData(e.subarray(r)),s=t._decodeFrame(o);s&&i.push(s),r+=o.size+10}t.isFooter(e,r)&&(r+=10)}return i},t._decodeFrame=function(e){return"PRIV"===e.type?t._decodePrivFrame(e):"T"===e.type[0]?t._decodeTextFrame(e):"W"===e.type[0]?t._decodeURLFrame(e):void 0},t._readTimeStamp=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),r=1&e[3],i=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return i/=45,r&&(i+=47721858.84),Math.round(i)}},t._decodePrivFrame=function(e){if(!(e.size<2)){var r=t._utf8ArrayToStr(e.data),i=new Uint8Array(e.data.subarray(r.length+1));return{key:e.type,info:r,data:i.buffer}}},t._decodeTextFrame=function(e){if(!(e.size<2)){if("TXXX"===e.type){var r=1,i=t._utf8ArrayToStr(e.data.subarray(r));r+=i.length+1;var a=t._utf8ArrayToStr(e.data.subarray(r));return{key:e.type,info:i,data:a}}var n=t._utf8ArrayToStr(e.data.subarray(1));return{key:e.type,data:n}}},t._decodeURLFrame=function(e){if("WXXX"===e.type){if(e.size<2)return;var r=1,i=t._utf8ArrayToStr(e.data.subarray(r));r+=i.length+1;var a=t._utf8ArrayToStr(e.data.subarray(r));return{key:e.type,info:i,data:a}}var n=t._utf8ArrayToStr(e.data);return{key:e.type,data:n}},t._utf8ArrayToStr=function(t){for(var e=void 0,r=void 0,i="",a=0,n=t.length;a<n;){var o=t[a++];switch(o>>4){case 0:return i;case 1:case 2:case 3:case 4:case 5:case 6:case 7:i+=String.fromCharCode(o);break;case 12:case 13:e=t[a++],i+=String.fromCharCode((31&o)<<6|63&e);break;case 14:e=t[a++],r=t[a++],i+=String.fromCharCode((15&o)<<12|(63&e)<<6|(63&r)<<0)}}return i},t}();e.a=a},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function a(t){return"number"==typeof t}function n(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!a(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,a,s,l,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var d=new Error('Uncaught, unspecified "error" event. ('+e+")");throw d.context=e,d}if(r=this._events[t],o(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(n(r))for(s=Array.prototype.slice.call(arguments,1),u=r.slice(),a=u.length,l=0;l<a;l++)u[l].apply(this,s);return!0},r.prototype.addListener=function(t,e){var a;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?n(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,n(this._events[t])&&!this._events[t].warned&&(a=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,a&&a>0&&this._events[t].length>a&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),a||(a=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var a=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,a,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=r.length,a=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(n(r)){for(s=o;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){!function(e){var r=/^((?:[^\/;?#]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/;?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),e=e.trim(),!e){if(!r.alwaysNormalize)return t;var a=this.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");return a.path=o.normalizePath(a.path),o.buildURLFromParts(a)}var n=this.parseURL(e);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return r.alwaysNormalize?(n.path=o.normalizePath(n.path),o.buildURLFromParts(n)):e;var s=this.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=i.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(u.netLoc=s.netLoc,"/"!==n.path[0]))if(n.path){var d=s.path,c=d.substring(0,d.lastIndexOf("/")+1)+n.path;u.path=o.normalizePath(c)}else u.path=s.path,n.params||(u.params=s.params,n.query||(u.query=s.query));return null===u.path&&(u.path=r.alwaysNormalize?o.normalizePath(n.path):n.path),o.buildURLFromParts(u)},parseURL:function(t){var e=r.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(a,"");t.length!==(t=t.replace(n,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};t.exports=o}(this)},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e,r,i){var a,n,o,s,l,u=navigator.userAgent.toLowerCase(),d=i,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return a=((192&e[r+2])>>>6)+1,n=(60&e[r+2])>>>2,n>c.length-1?void t.trigger(Event.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+n}):(s=(1&e[r+2])<<2,s|=(192&e[r+3])>>>6,N.b.log("manifest codec:"+i+",ADTS data:type:"+a+",sampleingIndex:"+n+"["+c[n]+"Hz],channelConfig:"+s),/firefox/i.test(u)?n>=6?(a=5,l=new Array(4),o=n-3):(a=2,l=new Array(2),o=n):u.indexOf("android")!==-1?(a=2,l=new Array(2),o=n):(a=5,l=new Array(4),i&&(i.indexOf("mp4a.40.29")!==-1||i.indexOf("mp4a.40.5")!==-1)||!i&&n>=6?o=n-3:((i&&i.indexOf("mp4a.40.2")!==-1&&(n>=6&&1===s||/vivaldi/i.test(u))||!i&&1===s)&&(a=2,l=new Array(2)),o=n)),l[0]=a<<3,l[0]|=(14&n)>>1,l[1]|=(1&n)<<7,l[1]|=s<<3,5===a&&(l[1]|=(14&o)>>1,l[2]=(1&o)<<7,l[2]|=8,l[3]=0),{config:l,samplerate:c[n],channelCount:s,codec:"mp4a.40."+a,manifestCodec:d})}function l(t,e){return 255===t[e]&&240===(246&t[e+1])}function u(t,e){return 1&t[e+1]?7:9}function d(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function c(t,e){return!!(e+1<t.length&&l(t,e))}function f(t,e){if(e+1<t.length&&l(t,e)){var r=u(t,e),i=r;e+5<t.length&&(i=d(t,e));var a=e+i;if(a===t.length||a+1<t.length&&l(t,a))return!0}return!1}function h(t,e,r,i,a){if(!t.samplerate){var n=s(e,r,i,a);t.config=n.config,t.samplerate=n.samplerate,t.channelCount=n.channelCount,t.codec=n.codec,t.manifestCodec=n.manifestCodec,N.b.log("parsed codec:"+t.codec+",rate:"+n.samplerate+",nb channel:"+n.channelCount)}}function p(t){return 9216e4/t}function g(t,e,r,i,a){var n,o,s,l=t.length;if(n=u(t,e),o=d(t,e),o-=n,o>0&&e+n+o<=l)return s=r+i*a,{headerLength:n,frameLength:o,stamp:s}}function v(t,e,r,i,a){var n=p(t.samplerate),o=g(e,r,i,a,n);if(o){var s=o.stamp,l=o.headerLength,u=o.frameLength,d={unit:e.subarray(r+l,r+l+u),pts:s,dts:s};return t.samples.push(d),t.len+=u,{sample:d,length:u+l}}}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var k=r(1),D=r(2),I=function(){function t(e,r){i(this,t),this.subtle=e,this.aesIV=r}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}(),O=I,C=function(){function t(e,r){a(this,t),this.subtle=e,this.key=r}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}(),x=C,P=function(){function t(){n(this,t),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return t.prototype.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),r=new Uint32Array(4),i=0;i<4;i++)r[i]=e.getUint32(4*i);return r},t.prototype.initTable=function(){var t=this.sBox,e=this.invSBox,r=this.subMix,i=r[0],a=r[1],n=r[2],o=r[3],s=this.invSubMix,l=s[0],u=s[1],d=s[2],c=s[3],f=new Uint32Array(256),h=0,p=0,g=0;for(g=0;g<256;g++)g<128?f[g]=g<<1:f[g]=g<<1^283;for(g=0;g<256;g++){var v=p^p<<1^p<<2^p<<3^p<<4;v=v>>>8^255&v^99,t[h]=v,e[v]=h;var m=f[h],y=f[m],b=f[y],E=257*f[v]^16843008*v;i[h]=E<<24|E>>>8,a[h]=E<<16|E>>>16,n[h]=E<<8|E>>>24,o[h]=E,E=16843009*b^65537*y^257*m^16843008*h,l[v]=E<<24|E>>>8,u[v]=E<<16|E>>>16,d[v]=E<<8|E>>>24,c[v]=E,h?(h=m^f[f[f[b^m]]],p^=f[f[p]]):h=p=1}},t.prototype.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i<e.length&&r;)r=e[i]===this.key[i],i++;if(!r){this.key=e;var a=this.keySize=e.length;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size="+a);var n=this.ksRows=4*(a+6+1),o=void 0,s=void 0,l=this.keySchedule=new Uint32Array(n),u=this.invKeySchedule=new Uint32Array(n),d=this.sBox,c=this.rcon,f=this.invSubMix,h=f[0],p=f[1],g=f[2],v=f[3],m=void 0,y=void 0;
23
  for(o=0;o<n;o++)o<a?m=l[o]=e[o]:(y=m,o%a===0?(y=y<<8|y>>>24,y=d[y>>>24]<<24|d[y>>>16&255]<<16|d[y>>>8&255]<<8|d[255&y],y^=c[o/a|0]<<24):a>6&&o%a===4&&(y=d[y>>>24]<<24|d[y>>>16&255]<<16|d[y>>>8&255]<<8|d[255&y]),l[o]=m=(l[o-a]^y)>>>0);for(s=0;s<n;s++)o=n-s,y=3&s?l[o]:l[o-4],s<4||o<=4?u[s]=y:u[s]=h[d[y>>>24]]^p[d[y>>>16&255]]^g[d[y>>>8&255]]^v[d[255&y]],u[s]=u[s]>>>0}},t.prototype.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},t.prototype.decrypt=function(t,e,r){for(var i,a,n=this.keySize+6,o=this.invKeySchedule,s=this.invSBox,l=this.invSubMix,u=l[0],d=l[1],c=l[2],f=l[3],h=this.uint8ArrayToUint32Array_(r),p=h[0],g=h[1],v=h[2],m=h[3],y=new Int32Array(t),b=new Int32Array(y.length),E=void 0,T=void 0,R=void 0,S=void 0,A=void 0,w=void 0,_=void 0,L=void 0,k=void 0,D=void 0,I=void 0,O=void 0,C=this.networkToHostOrderSwap;e<y.length;){for(k=C(y[e]),D=C(y[e+1]),I=C(y[e+2]),O=C(y[e+3]),A=k^o[0],w=O^o[1],_=I^o[2],L=D^o[3],i=4,a=1;a<n;a++)E=u[A>>>24]^d[w>>16&255]^c[_>>8&255]^f[255&L]^o[i],T=u[w>>>24]^d[_>>16&255]^c[L>>8&255]^f[255&A]^o[i+1],R=u[_>>>24]^d[L>>16&255]^c[A>>8&255]^f[255&w]^o[i+2],S=u[L>>>24]^d[A>>16&255]^c[w>>8&255]^f[255&_]^o[i+3],A=E,w=T,_=R,L=S,i+=4;E=s[A>>>24]<<24^s[w>>16&255]<<16^s[_>>8&255]<<8^s[255&L]^o[i],T=s[w>>>24]<<24^s[_>>16&255]<<16^s[L>>8&255]<<8^s[255&A]^o[i+1],R=s[_>>>24]<<24^s[L>>16&255]<<16^s[A>>8&255]<<8^s[255&w]^o[i+2],S=s[L>>>24]<<24^s[A>>16&255]<<16^s[w>>8&255]<<8^s[255&_]^o[i+3],i+=3,b[e]=C(E^p),b[e+1]=C(S^g),b[e+2]=C(R^v),b[e+3]=C(T^m),p=k,g=D,v=I,m=O,e+=4}return b.buffer},t.prototype.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},t}(),F=P,N=r(0),M=function(){function t(e,r){o(this,t),this.observer=e,this.config=r,this.logEnabled=!0;try{var i=crypto?crypto:self.crypto;this.subtle=i.subtle||i.webkitSubtle}catch(t){}this.disableWebCrypto=!this.subtle}return t.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.prototype.decrypt=function(t,e,r,i){var a=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(N.b.log("JS AES decrypt"),this.logEnabled=!1);var n=this.decryptor;n||(this.decryptor=n=new F),n.expandKey(e),i(n.decrypt(t,0,r))}else{this.logEnabled&&(N.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var o=this.subtle;this.key!==e&&(this.key=e,this.fastAesKey=new x(o,e)),this.fastAesKey.expandKey().then(function(n){var s=new O(o,r);s.decrypt(t,n).catch(function(n){a.onWebCryptoError(n,t,e,r,i)}).then(function(t){i(t)})}).catch(function(n){a.onWebCryptoError(n,t,e,r,i)})}},t.prototype.onWebCryptoError=function(t,e,r,i,a){this.config.enableSoftwareAES?(N.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(e,r,i,a)):(N.b.error("decrypting error : "+t.message),this.observer.trigger(Event.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))},t.prototype.destroy=function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)},t}(),U=M,B=r(3),G=function(){function t(e,r,i){m(this,t),this.observer=e,this.config=i,this.remuxer=r}return t.prototype.resetInitSegment=function(t,e,r,i){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:e,duration:i,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var e=B.a.getID3Data(t,0)||[],r=e.length,i=t.length;r<i;r++)if(f(t,r))return N.b.log("ADTS sync word found !"),!0;return!1},t.prototype.append=function(t,e,r,i){for(var a=this._audioTrack,n=B.a.getID3Data(t,0)||[],o=B.a.getTimeStamp(n),s=o?90*o:9e4*e,l=0,u=s,d=t.length,f=n.length,p=[{pts:u,dts:u,data:n}];f<d-1;)if(c(t,f)&&f+5<d){h(a,this.observer,t,f,a.manifestCodec);var g=v(a,t,f,s,l);if(!g){N.b.log("Unable to parse AAC frame");break}f+=g.length,u=g.sample.pts,l++}else B.a.isHeader(t,f)?(n=B.a.getID3Data(t,f),p.push({pts:u,dts:u,data:n}),f+=n.length):f++;this.remuxer.remux(a,{samples:[]},{samples:p,inputTimeScale:9e4},{samples:[]},e,r,i)},t.prototype.destroy=function(){},t}(),j=G,K=Math.pow(2,32)-1,H=function(){function t(e,r){y(this,t),this.observer=e,this.remuxer=r}return t.prototype.resetTimeStamp=function(t){this.initPTS=t},t.prototype.resetInitSegment=function(e,r,i,a){if(e&&e.byteLength){var n=this.initData=t.parseInitSegment(e),o={};n.audio&&n.video?o.audiovideo={container:"video/mp4",codec:r+","+i,initSegment:a?e:null}:(n.audio&&(o.audio={container:"audio/mp4",codec:r,initSegment:a?e:null}),n.video&&(o.video={container:"video/mp4",codec:i,initSegment:a?e:null})),this.observer.trigger(k.a.FRAG_PARSING_INIT_SEGMENT,{tracks:o})}else r&&(this.audioCodec=r),i&&(this.videoCodec=i)},t.probe=function(e){if(e.length>=8){var r=t.bin2str(e.subarray(4,8));return["moof","ftyp","styp"].indexOf(r)>=0}return!1},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return r<0?4294967296+r:r},t.writeUint32=function(t,e,r){t.data&&(e+=t.start,t=t.data),t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},t.findBox=function(e,r){var i,a,n,o,s,l,u,d=[];if(e.data?(l=e.start,o=e.end,e=e.data):(l=0,o=e.byteLength),!r.length)return null;for(i=l;i<o;)a=t.readUint32(e,i),n=t.bin2str(e.subarray(i+4,i+8)),u=a>1?i+a:o,n===r[0]&&(1===r.length?d.push({data:e,start:i+8,end:u}):(s=t.findBox({data:e,start:i+8,end:u},r.slice(1)),s.length&&(d=d.concat(s)))),i=u;return d},t.parseInitSegment=function(e){var r=[],i=t.findBox(e,["moov","trak"]);return i.forEach(function(e){var i=t.findBox(e,["tkhd"])[0];if(i){var a=i.data[i.start],n=0===a?12:20,o=t.readUint32(i,n),s=t.findBox(e,["mdia","mdhd"])[0];if(s){a=s.data[s.start],n=0===a?12:20;var l=t.readUint32(s,n),u=t.findBox(e,["mdia","hdlr"])[0];if(u){var d=t.bin2str(u.data.subarray(u.start+8,u.start+12)),c={soun:"audio",vide:"video"}[d];c&&(r[o]={timescale:l,type:c},r[c]={timescale:l,id:o})}}}}),r},t.getStartDTS=function(e,r){var i,a,n;return i=t.findBox(r,["moof","traf"]),a=[].concat.apply([],i.map(function(r){return t.findBox(r,["tfhd"]).map(function(i){var a,n,o;return a=t.readUint32(i,4),n=e[a].timescale||9e4,o=t.findBox(r,["tfdt"]).map(function(e){var r,i;return r=e.data[e.start],i=t.readUint32(e,4),1===r&&(i*=Math.pow(2,32),i+=t.readUint32(e,8)),i})[0],o/n})})),n=Math.min.apply(null,a),isFinite(n)?n:0},t.offsetStartDTS=function(e,r,i){t.findBox(r,["moof","traf"]).map(function(r){return t.findBox(r,["tfhd"]).map(function(a){var n=t.readUint32(a,4),o=e[n].timescale||9e4;t.findBox(r,["tfdt"]).map(function(e){var r=e.data[e.start],a=t.readUint32(e,4);if(0===r)t.writeUint32(e,4,a-i*o);else{a*=Math.pow(2,32),a+=t.readUint32(e,8),a-=i*o,a=Math.max(a,0);var n=Math.floor(a/(K+1)),s=Math.floor(a%(K+1));t.writeUint32(e,4,n),t.writeUint32(e,8,s)}})})})},t.prototype.append=function(e,r,i,a){var n=this.initData;n||(this.resetInitSegment(e,this.audioCodec,this.videoCodec),n=this.initData);var o=void 0,s=this.initPTS;if(void 0===s){var l=t.getStartDTS(n,e);this.initPTS=s=l-r,this.observer.trigger(k.a.INIT_PTS_FOUND,{initPTS:s})}t.offsetStartDTS(n,e,s),o=t.getStartDTS(n,e),this.remuxer.remux(n.audio,n.video,null,null,o,i,a,e)},t.prototype.destroy=function(){},t}(),W=H,V={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],appendFrame:function(t,e,r,i,a){if(!(r+24>e.length)){var n=this.parseHeader(e,r);if(n&&r+n.frameLength<=e.length){var o=10368e4/n.sampleRate,s=i+a*o,l={unit:e.subarray(r,r+n.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=n.channelCount,t.samplerate=n.sampleRate,t.samples.push(l),t.len+=n.frameLength,{sample:l,length:n.frameLength}}}},parseHeader:function(t,e){var r=t[e+1]>>3&3,i=t[e+1]>>1&3,a=t[e+2]>>4&15,n=t[e+2]>>2&3,o=!!(2&t[e+2]);if(1!==r&&0!==a&&15!==a&&3!==n){var s=3===r?3-i:3===i?3:4,l=1e3*V.BitratesMap[14*s+a-1],u=3===r?0:2===r?1:2,d=V.SamplingRateMap[3*u+n],c=o?1:0,f=t[e+3]>>6===3?1:2,h=3===i?(3===r?12:6)*l/d+c<<2:(3===r?144:72)*l/d+c|0;return{sampleRate:d,channelCount:f,frameLength:h}}},isHeaderPattern:function(t,e){return 255===t[e]&&224===(224&t[e+1])&&0!==(6&t[e+1])},isHeader:function(t,e){return!!(e+1<t.length&&this.isHeaderPattern(t,e))},probe:function(t,e){if(e+1<t.length&&this.isHeaderPattern(t,e)){var r=4,i=this.parseHeader(t,e),a=r;i&&i.frameLength&&(a=i.frameLength);var n=e+a;if(n===t.length||n+1<t.length&&this.isHeaderPattern(t,n))return!0}return!1}},q=V,Y=function(){function t(e){b(this,t),this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}return t.prototype.loadWord=function(){var t=this.data,e=this.bytesAvailable,r=t.byteLength-e,i=new Uint8Array(4),a=Math.min(4,e);if(0===a)throw new Error("no bytes available");i.set(t.subarray(r,r+a)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*a,this.bytesAvailable-=a},t.prototype.skipBits=function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,e=t>>3,t-=e>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},t.prototype.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&N.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0&&this.bitsAvailable?r<<e|this.readBits(e):r},t.prototype.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!==(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},t.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},t.prototype.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},t.prototype.readBoolean=function(){return 1===this.readBits(1)},t.prototype.readUByte=function(){return this.readBits(8)},t.prototype.readUShort=function(){return this.readBits(16)},t.prototype.readUInt=function(){return this.readBits(32)},t.prototype.skipScalingList=function(t){var e,r,i=8,a=8;for(e=0;e<t;e++)0!==a&&(r=this.readEG(),a=(i+r+256)%256),i=0===a?i:a},t.prototype.readSPS=function(){var t,e,r,i,a,n,o,s,l,u=0,d=0,c=0,f=0,h=this.readUByte.bind(this),p=this.readBits.bind(this),g=this.readUEG.bind(this),v=this.readBoolean.bind(this),m=this.skipBits.bind(this),y=this.skipEG.bind(this),b=this.skipUEG.bind(this),E=this.skipScalingList.bind(this);if(h(),t=h(),e=p(5),m(3),r=h(),b(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var T=g();if(3===T&&m(1),b(),b(),m(1),v())for(s=3!==T?8:12,l=0;l<s;l++)v()&&E(l<6?16:64)}b();var R=g();if(0===R)g();else if(1===R)for(m(1),y(),y(),i=g(),l=0;l<i;l++)y();b(),m(1),a=g(),n=g(),o=p(1),0===o&&m(1),m(1),v()&&(u=g(),d=g(),c=g(),f=g());var S=[1,1];if(v()&&v()){var A=h();switch(A){case 1:S=[1,1];break;case 2:S=[12,11];break;case 3:S=[10,11];break;case 4:S=[16,11];break;case 5:S=[40,33];break;case 6:S=[24,11];break;case 7:S=[20,11];break;case 8:S=[32,11];break;case 9:S=[80,33];break;case 10:S=[18,11];break;case 11:S=[15,11];break;case 12:S=[64,33];break;case 13:S=[160,99];break;case 14:S=[4,3];break;case 15:S=[3,2];break;case 16:S=[2,1];break;case 255:S=[h()<<8|h(),h()<<8|h()]}}return{width:Math.ceil(16*(a+1)-2*u-2*d),height:(2-o)*(n+1)*16-(o?2:4)*(c+f),pixelRatio:S}},t.prototype.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}(),z=Y,X=function(){function t(e,r,i,a){E(this,t),this.decryptdata=i,this.discardEPB=a,this.decrypter=new U(e,r)}return t.prototype.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,e)},t.prototype.decryptAacSample=function(t,e,r,i){var a=t[e].unit,n=a.subarray(16,a.length-a.length%16),o=n.buffer.slice(n.byteOffset,n.byteOffset+n.length),s=this;this.decryptBuffer(o,function(n){n=new Uint8Array(n),a.set(n,16),i||s.decryptAacSamples(t,e+1,r)})},t.prototype.decryptAacSamples=function(t,e,r){for(;;e++){if(e>=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},t.prototype.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,a=32;a<=t.length-16;a+=160,i+=16)r.set(t.subarray(a,a+16),i);return r},t.prototype.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var r=0,i=32;i<=t.length-16;i+=160,r+=16)t.set(e.subarray(r,r+16),i);return t},t.prototype.decryptAvcSample=function(t,e,r,i,a,n){var o=this.discardEPB(a.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,function(s){a.data=l.getAvcDecryptedUnit(o,s),n||l.decryptAvcSamples(t,e,r+1,i)})},t.prototype.decryptAvcSamples=function(t,e,r,i){for(;;e++,r=0){if(e>=t.length)return void i();for(var a=t[e].units;!(r>=a.length);r++){var n=a[r];if(!(n.length<=48||1!==n.type&&5!==n.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,n,o),!o)return}}}},t}(),Q=X,J=function(){function t(e,r,i,a){T(this,t),this.observer=e,this.config=i,this.typeSupported=a,this.remuxer=r,this.sampleAes=null}return t.prototype.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new Q(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(t){return t.length>=564&&71===t[0]&&71===t[188]&&71===t[376]},t.prototype.resetInitSegment=function(t,e,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack={container:"video/mp2t",type:"video",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:0},this._audioTrack={container:"video/mp2t",type:"audio",id:-1,inputTimeScale:9e4,duration:i,sequenceNumber:0,samples:[],len:0,isAAC:!0},this._id3Track={type:"id3",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0},this._txtTrack={type:"text",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0},this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=e,this.videoCodec=r,this._duration=i},t.prototype.resetTimeStamp=function(){},t.prototype.append=function(t,e,r,i){var a,n,o,s,l,u,d=t.length,c=!1;this.contiguous=r;var f=this.pmtParsed,h=this._avcTrack,p=this._audioTrack,g=this._id3Track,v=h.id,m=p.id,y=g.id,b=this._pmtId,E=h.pesData,T=p.pesData,R=g.pesData,S=this._parsePAT,A=this._parsePMT,w=this._parsePES,_=this._parseAVCPES.bind(this),L=this._parseAACPES.bind(this),I=this._parseMPEGPES.bind(this),O=this._parseID3PES.bind(this);for(d-=d%188,a=0;a<d;a+=188)if(71===t[a]){if(n=!!(64&t[a+1]),o=((31&t[a+1])<<8)+t[a+2],s=(48&t[a+3])>>4,s>1){if(l=a+5+t[a+4],l===a+188)continue}else l=a+4;switch(o){case v:n&&(E&&(u=w(E))&&_(u,!1),E={data:[],size:0}),E&&(E.data.push(t.subarray(l,a+188)),E.size+=a+188-l);break;case m:n&&(T&&(u=w(T))&&(p.isAAC?L(u):I(u)),T={data:[],size:0}),T&&(T.data.push(t.subarray(l,a+188)),T.size+=a+188-l);break;case y:n&&(R&&(u=w(R))&&O(u),R={data:[],size:0}),R&&(R.data.push(t.subarray(l,a+188)),R.size+=a+188-l);break;case 0:n&&(l+=t[l]+1),b=this._pmtId=S(t,l);break;case b:n&&(l+=t[l]+1);var C=A(t,l,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,null!=this.sampleAes);v=C.avc,v>0&&(h.id=v),m=C.audio,m>0&&(p.id=m,p.isAAC=C.isAAC),y=C.id3,y>0&&(g.id=y),c&&!f&&(N.b.log("reparse from beginning"),c=!1,a=-188),f=this.pmtParsed=!0;break;case 17:case 8191:break;default:c=!0}}else this.observer.trigger(k.a.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});E&&(u=w(E))?(_(u,!0),h.pesData=null):h.pesData=E,T&&(u=w(T))?(p.isAAC?L(u):I(u),p.pesData=null):(T&&T.size&&N.b.log("last AAC PES packet truncated,might overlap between fragments"),p.pesData=T),R&&(u=w(R))?(O(u),g.pesData=null):g.pesData=R,null==this.sampleAes?this.remuxer.remux(p,h,g,this._txtTrack,e,r,i):this.decryptAndRemux(p,h,g,this._txtTrack,e,r,i)},t.prototype.decryptAndRemux=function(t,e,r,i,a,n,o){if(t.samples&&t.isAAC){var s=this;this.sampleAes.decryptAacSamples(t.samples,0,function(){s.decryptAndRemuxAvc(t,e,r,i,a,n,o)})}else this.decryptAndRemuxAvc(t,e,r,i,a,n,o)},t.prototype.decryptAndRemuxAvc=function(t,e,r,i,a,n,o){if(e.samples){var s=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,function(){s.remuxer.remux(t,e,r,i,a,n,o)})}else this.remuxer.remux(t,e,r,i,a,n,o)},t.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t.prototype._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},t.prototype._parsePMT=function(t,e,r,i){var a,n,o,s,l={audio:-1,avc:-1,id3:-1,isAAC:!0};for(a=(15&t[e+1])<<8|t[e+2],n=e+3+a-4,o=(15&t[e+10])<<8|t[e+11],e+=12+o;e<n;){switch(s=(31&t[e+1])<<8|t[e+2],t[e]){case 207:if(!i){N.b.log("unkown stream type:"+t[e]);break}case 15:l.audio===-1&&(l.audio=s);break;case 21:l.id3===-1&&(l.id3=s);break;case 219:if(!i){N.b.log("unkown stream type:"+t[e]);break}case 27:l.avc===-1&&(l.avc=s);break;case 3:case 4:r?l.audio===-1&&(l.audio=s,l.isAAC=!1):N.b.log("MPEG audio found, not supported in this browser for now");break;case 36:N.b.warn("HEVC stream type found, not supported for now");break;default:N.b.log("unkown stream type:"+t[e])}e+=((15&t[e+3])<<8|t[e+4])+5}return l},t.prototype._parsePES=function(t){var e,r,i,a,n,o,s,l,u,d=0,c=t.data;if(!t||0===t.size)return null;for(;c[0].length<19&&c.length>1;){var f=new Uint8Array(c[0].length+c[1].length);f.set(c[0]),f.set(c[1],c[0].length),c[0]=f,c.splice(1,1)}if(e=c[0],i=(e[0]<<16)+(e[1]<<8)+e[2],1===i){if(a=(e[4]<<8)+e[5],a&&a>t.size-6)return null;r=e[7],192&r&&(s=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,s>4294967295&&(s-=8589934592),64&r?(l=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,l>4294967295&&(l-=8589934592),s-l>54e5&&(N.b.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l)):l=s),n=e[8],u=n+9,t.size-=u,o=new Uint8Array(t.size);for(var h=0,p=c.length;h<p;h++){e=c[h];var g=e.byteLength;if(u){if(u>g){u-=g;continue}e=e.subarray(u),g-=u,u=0}o.set(e,d),d+=g}return a&&(a-=n+3),{data:o,pts:s,dts:l,len:a}}return null},t.prototype.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var r=e.samples,i=r.length;!this.config.forceKeyFrameOnDiscontinuity||t.key===!0||e.sps&&(i||this.contiguous)?(t.id=i,r.push(t)):e.dropped++}t.debug.length&&N.b.log(t.pts+"/"+t.dts+":"+t.debug)},t.prototype._parseAVCPES=function(t,e){var r,i,a,n=this,o=this._avcTrack,s=this._parseAVCNALu(t.data),l=!1,u=this.avcSample,d=!1,c=this.pushAccesUnit.bind(this),f=function(t,e,r,i){return{key:t,pts:e,dts:r,units:[],debug:i}};t.data=null,u&&s.length&&!o.audFound&&(c(u,o),u=this.avcSample=f(!1,t.pts,t.dts,"")),s.forEach(function(e){switch(e.type){case 1:i=!0,u||(u=n.avcSample=f(!0,t.pts,t.dts,"")),l&&(u.debug+="NDR "),u.frame=!0;var s=e.data;if(d&&s.length>4){var h=new z(s).readSliceType();2!==h&&4!==h&&7!==h&&9!==h||(u.key=!0)}break;case 5:i=!0,u||(u=n.avcSample=f(!0,t.pts,t.dts,"")),l&&(u.debug+="IDR "),u.key=!0,u.frame=!0;break;case 6:i=!0,l&&u&&(u.debug+="SEI "),r=new z(n.discardEPB(e.data)),r.readUByte();for(var p=0,g=0,v=!1,m=0;!v&&r.bytesAvailable>1;){p=0;do m=r.readUByte(),p+=m;while(255===m);g=0;do m=r.readUByte(),g+=m;while(255===m);if(4===p&&0!==r.bytesAvailable){v=!0;var y=r.readUByte();if(181===y){var b=r.readUShort();if(49===b){var E=r.readUInt();if(1195456820===E){var T=r.readUByte();if(3===T){var R=r.readUByte(),S=r.readUByte(),A=31&R,w=[R,S];for(a=0;a<A;a++)w.push(r.readUByte()),w.push(r.readUByte()),w.push(r.readUByte());n._insertSampleInOrder(n._txtTrack.samples,{type:3,pts:t.pts,bytes:w})}}}}}else if(g<r.bytesAvailable)for(a=0;a<g;a++)r.readUByte()}break;case 7:if(i=!0,d=!0,l&&u&&(u.debug+="SPS "),!o.sps){r=new z(e.data);var _=r.readSPS();o.width=_.width,o.height=_.height,o.pixelRatio=_.pixelRatio,o.sps=[e.data],o.duration=n._duration;var L=e.data.subarray(1,4),k="avc1.";for(a=0;a<3;a++){var D=L[a].toString(16);D.length<2&&(D="0"+D),k+=D}o.codec=k}break;case 8:i=!0,l&&u&&(u.debug+="PPS "),o.pps||(o.pps=[e.data]);break;case 9:i=!1,o.audFound=!0,u&&c(u,o),u=n.avcSample=f(!1,t.pts,t.dts,l?"AUD ":"");break;case 12:i=!1;break;default:i=!1,u&&(u.debug+="unknown NAL "+e.type+" ")}if(u&&i){var I=u.units;I.push(e)}}),e&&u&&(c(u,o),this.avcSample=null)},t.prototype._insertSampleInOrder=function(t,e){var r=t.length;if(r>0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts<t[i].pts){t.splice(i,0,e);break}}else t.push(e)},t.prototype._getLastNalUnit=function(){var t=this.avcSample,e=void 0;if(!t||0===t.units.length){var r=this._avcTrack,i=r.samples;t=i[i.length-1]}if(t){var a=t.units;e=a[a.length-1]}return e},t.prototype._parseAVCNALu=function(t){var e,r,i,a,n,o=0,s=t.byteLength,l=this._avcTrack,u=l.naluState||0,d=u,c=[],f=-1;for(u===-1&&(f=0,n=31&t[0],u=0,o=1);o<s;)if(e=t[o++],u)if(1!==u)if(e)if(1===e){if(f>=0)i={data:t.subarray(f,o-u-1),type:n},c.push(i);else{var h=this._getLastNalUnit();if(h&&(d&&o<=4-d&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-d)),r=o-u-1,r>0)){var p=new Uint8Array(h.data.byteLength+r);p.set(h.data,0),p.set(t.subarray(0,r),h.data.byteLength),h.data=p}}o<s?(a=31&t[o],f=o,n=a,u=0):u=-1}else u=0;else u=3;else u=e?0:2;else u=e?0:1;if(f>=0&&u>=0&&(i={data:t.subarray(f,s),type:n,state:u},c.push(i)),0===c.length){var g=this._getLastNalUnit();if(g){var v=new Uint8Array(g.data.byteLength+t.byteLength);v.set(g.data,0),v.set(t,g.data.byteLength),g.data=v}}return l.naluState=u,c},t.prototype.discardEPB=function(t){for(var e,r,i=t.byteLength,a=[],n=1;n<i-2;)0===t[n]&&0===t[n+1]&&3===t[n+2]?(a.push(n+2),n+=2):n++;if(0===a.length)return t;e=i-a.length,r=new Uint8Array(e);var o=0;for(n=0;n<e;o++,n++)o===a[0]&&(o++,a.shift()),r[n]=t[o];return r},t.prototype._parseAACPES=function(t){var e,r,i,a,n,o=this._audioTrack,s=t.data,l=t.pts,u=0,d=this.aacOverFlow,f=this.aacLastPTS;if(d){var g=new Uint8Array(d.byteLength+s.byteLength);g.set(d,0),g.set(s,d.byteLength),s=g}for(i=u,n=s.length;i<n-1&&!c(s,i);i++);if(i){var m,y;if(i<n-1?(m="AAC PES did not start with ADTS header,offset:"+i,y=!1):(m="no ADTS header found in AAC PES",y=!0),N.b.warn("parsing error:"+m),this.observer.trigger(k.a.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_PARSING_ERROR,fatal:y,reason:m}),y)return}if(h(o,this.observer,s,i,this.audioCodec),r=0,e=p(o.samplerate),d&&f){var b=f+e;Math.abs(b-l)>1&&(N.b.log("AAC: align PTS for overlapping frames by "+Math.round((b-l)/90)),l=b)}for(;i<n;)if(c(s,i)&&i+5<n){var E=v(o,s,i,l,r);if(!E)break;i+=E.length,a=E.sample.pts,r++}else i++;d=i<n?s.subarray(i,n):null,this.aacOverFlow=d,this.aacLastPTS=a},t.prototype._parseMPEGPES=function(t){for(var e=t.data,r=e.length,i=0,a=0,n=t.pts;a<r;)if(q.isHeader(e,a)){var o=q.appendFrame(this._audioTrack,e,a,n,i);if(!o)break;a+=o.length,i++}else a++},t.prototype._parseID3PES=function(t){this._id3Track.samples.push(t)},t}(),$=J,Z=function(){function t(e,r,i){R(this,t),this.observer=e,this.config=i,this.remuxer=r}return t.prototype.resetInitSegment=function(t,e,r,i){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:e,duration:i,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){var e,r,i=B.a.getID3Data(t,0);if(i&&void 0!==B.a.getTimeStamp(i))for(e=i.length,r=Math.min(t.length-1,e+100);e<r;e++)if(q.probe(t,e))return N.b.log("MPEG Audio sync word found !"),!0;return!1},t.prototype.append=function(t,e,r,i){for(var a=B.a.getID3Data(t,0),n=90*B.a.getTimeStamp(a),o=a.length,s=t.length,l=0,u=0,d=this._audioTrack,c=[{pts:n,dts:n,data:a}];o<s;)if(q.isHeader(t,o)){var f=q.appendFrame(d,t,o,n,l);if(!f)break;o+=f.length,u=f.sample.pts,l++}else B.a.isHeader(t,o)?(a=B.a.getID3Data(t,o),c.push({pts:u,dts:u,data:a}),o+=a.length):o++;this.remuxer.remux(d,{samples:[]},{samples:c,inputTimeScale:9e4},{samples:[]},e,r,i)},t.prototype.destroy=function(){},t}(),tt=Z,et=function(){function t(){S(this,t)}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}(),rt=et,it=Math.pow(2,32)-1,at=function(){function t(){A(this,t)}return t.init=function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var e;for(e in t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:r,audio:i};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=n,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,l,o,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,a))},t.box=function(t){for(var e,r=Array.prototype.slice.call(arguments,1),i=8,a=r.length,n=a;a--;)i+=r[a].byteLength;for(e=new Uint8Array(i),e[0]=i>>24&255,e[1]=i>>16&255,e[2]=i>>8&255,e[3]=255&i,e.set(t,4),a=0,i=8;a<n;a++)e.set(r[a],i),i+=r[a].byteLength;return e},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,r){r*=e;var i=Math.floor(r/(it+1)),a=Math.floor(r%(it+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var i=Math.floor(r/(it+1)),a=Math.floor(r%(it+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,n)},t.sdtp=function(e){var r,i,a=e.samples||[],n=new Uint8Array(4+a.length);for(i=0;i<a.length;i++)r=a[i].flags,n[i+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return t.box(t.types.sdtp,n)},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(e){var r,i,a,n=[],o=[];for(r=0;r<e.sps.length;r++)i=e.sps[r],a=i.byteLength,n.push(a>>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)i=e.pps[r],a=i.byteLength,o.push(a>>>8&255),o.push(255&a),o=o.concat(Array.prototype.slice.call(i));var s=t.box(t.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(o))),l=e.width,u=e.height,d=e.pixelRatio[0],c=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,c>>24,c>>16&255,c>>8&255,255&c])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,i=e.duration*e.timescale,a=e.width,n=e.height,o=Math.floor(i/(it+1)),s=Math.floor(i%(it+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,n>>8&255,255&n,0,0]))},t.traf=function(e,r){var i=t.sdtp(e),a=e.id,n=Math.floor(r/(it+1)),o=Math.floor(r%(it+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i,a,n,o,s,l,u=e.samples||[],d=u.length,c=12+16*d,f=new Uint8Array(c);for(r+=8+c,f.set([0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i<d;i++)a=u[i],n=a.duration,o=a.size,s=a.flags,l=a.cts,f.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);
24
  return t.box(t.types.trun,f)},t.initSegment=function(e){t.types||t.init();var r,i=t.moov(e);return r=new Uint8Array(t.FTYP.byteLength+i.byteLength),r.set(t.FTYP),r.set(i,t.FTYP.byteLength),r},t}(),nt=at,ot=1e4,st=function(){function t(e,r,i,a){w(this,t),this.observer=e,this.config=r,this.typeSupported=i;var n=navigator.userAgent;this.isSafari=a&&a.indexOf("Apple")>-1&&n&&!n.match("CriOS"),this.ISGenerated=!1}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},t.prototype.resetInitSegment=function(){this.ISGenerated=!1},t.prototype.remux=function(t,e,r,i,a,n,o){if(this.ISGenerated||this.generateIS(t,e,a),this.ISGenerated){var s=t.samples.length,l=e.samples.length,u=a,d=a;if(s&&l){var c=(t.samples[0].dts-e.samples[0].dts)/e.inputTimeScale;u+=Math.max(0,c),d+=Math.max(0,-c)}if(s){t.timescale||(N.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,a));var f=this.remuxAudio(t,u,n,o);if(l){var h=void 0;f&&(h=f.endPTS-f.startPTS),e.timescale||(N.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,a)),this.remuxVideo(e,d,n,h,o)}}else{var p=void 0;l&&(p=this.remuxVideo(e,d,n,o)),p&&t.codec&&this.remuxEmptyAudio(t,u,n,p)}}r.samples.length&&this.remuxID3(r,a),i.samples.length&&this.remuxText(i,a),this.observer.trigger(k.a.FRAG_PARSED)},t.prototype.generateIS=function(t,e,r){var i,a,n=this.observer,o=t.samples,s=e.samples,l=this.typeSupported,u="audio/mp4",d={},c={tracks:d},f=void 0===this._initPTS;if(f&&(i=a=1/0),t.config&&o.length&&(t.timescale=t.samplerate,N.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(l.mpeg?(u="audio/mpeg",t.codec=""):l.mp3&&(t.codec="mp3")),d.audio={container:u,codec:t.codec,initSegment:!t.isAAC&&l.mpeg?new Uint8Array:nt.initSegment([t]),metadata:{channelCount:t.channelCount}},f&&(i=a=o[0].pts-t.inputTimeScale*r)),e.sps&&e.pps&&s.length){var h=e.inputTimeScale;e.timescale=h,d.video={container:"video/mp4",codec:e.codec,initSegment:nt.initSegment([e]),metadata:{width:e.width,height:e.height}},f&&(i=Math.min(i,s[0].pts-h*r),a=Math.min(a,s[0].dts-h*r),this.observer.trigger(k.a.INIT_PTS_FOUND,{initPTS:i}))}Object.keys(d).length?(n.trigger(k.a.FRAG_PARSING_INIT_SEGMENT,c),this.ISGenerated=!0,f&&(this._initPTS=i,this._initDTS=a)):n.trigger(k.a.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.prototype.remuxVideo=function(t,e,r,i,a){var n,o,s,l,u,d,c,f,h=8,p=t.timescale,g=t.samples,v=[],m=g.length,y=this._PTSNormalize,b=this._initDTS,E=this.nextAvcDts,T=this.isSafari;T&&(r|=g.length&&E&&(a&&Math.abs(e-E/p)<.1||Math.abs(g[0].pts-E-b)<p/5)),r||(E=e*p),g.forEach(function(t){t.pts=y(t.pts-b,E),t.dts=y(t.dts-b,E)}),g.sort(function(t,e){var r=t.dts-e.dts,i=t.pts-e.pts;return r?r:i?i:t.id-e.id});var R=g.reduce(function(t,e){return Math.max(Math.min(t,e.pts-e.dts),-18e3)},0);if(R<0){N.b.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(R/90)+" ms to overcome this issue");for(var S=0;S<g.length;S++)g[S].dts+=R}var A=g[0];u=Math.max(A.dts,0),l=Math.max(A.pts,0);var w=Math.round((u-E)/90);r&&w&&(w>1?N.b.log("AVC:"+w+" ms hole between fragments detected,filling it"):w<-1&&N.b.log("AVC:"+-w+" ms overlapping between fragments detected"),u=E,g[0].dts=u,l=Math.max(l-w,E),g[0].pts=l,N.b.log("Video/PTS/DTS adjusted: "+Math.round(l/90)+"/"+Math.round(u/90)+",delta:"+w+" ms")),d=u,A=g[g.length-1],f=Math.max(A.dts,0),c=Math.max(A.pts,0,f),T&&(n=Math.round((f-u)/(g.length-1)));for(var _=0,L=0,I=0;I<m;I++){for(var O=g[I],C=O.units,x=C.length,P=0,F=0;F<x;F++)P+=C[F].data.length;L+=P,_+=x,O.length=P,T?O.dts=u+I*n:O.dts=Math.max(O.dts,u),O.pts=Math.max(O.pts,O.dts)}var M=L+4*_+8;try{o=new Uint8Array(M)}catch(t){return void this.observer.trigger(k.a.ERROR,{type:D.b.MUX_ERROR,details:D.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:M,reason:"fail allocating video mdat "+M})}var U=new DataView(o.buffer);U.setUint32(0,M),o.set(nt.types.mdat,4);for(var B=0;B<m;B++){for(var G=g[B],j=G.units,K=0,H=void 0,W=0,V=j.length;W<V;W++){var q=j[W],Y=q.data,z=q.data.byteLength;U.setUint32(h,z),h+=4,o.set(Y,h),h+=z,K+=4+z}if(T)H=Math.max(0,n*Math.round((G.pts-G.dts)/n));else{if(B<m-1)n=g[B+1].dts-G.dts;else{var X=this.config,Q=G.dts-g[B>0?B-1:B].dts;if(X.stretchShortVideoTrack){var J=X.maxBufferHole,$=X.maxSeekHole,Z=Math.floor(Math.min(J,$)*p),tt=(i?l+i*p:this.nextAudioPts)-G.pts;tt>Z?(n=tt-Q,n<0&&(n=Q),N.b.log("It is approximately "+tt/90+" ms to the next segment; using duration "+n/90+" ms for the last video frame.")):n=Q}else n=Q}H=Math.round(G.pts-G.dts)}v.push({size:K,duration:n,cts:H,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:G.key?2:1,isNonSync:G.key?0:1}})}this.nextAvcDts=f+n;var et=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,v.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var rt=v[0].flags;rt.dependsOn=2,rt.isNonSync=0}t.samples=v,s=nt.moof(t.sequenceNumber++,u,t),t.samples=[];var it={data1:s,data2:o,startPTS:l/p,endPTS:(c+n)/p,startDTS:u/p,endDTS:this.nextAvcDts/p,type:"video",nb:v.length,dropped:et};return this.observer.trigger(k.a.FRAG_PARSING_DATA,it),it},t.prototype.remuxAudio=function(t,e,r,i){var a,n,o,s,l,u,d,c=t.inputTimeScale,f=t.timescale,h=c/f,p=t.isAAC?1024:1152,g=p*h,v=this._PTSNormalize,m=this._initDTS,y=!t.isAAC&&this.typeSupported.mpeg,b=t.samples,E=[],T=this.nextAudioPts;if(r|=b.length&&T&&(i&&Math.abs(e-T/c)<.1||Math.abs(b[0].pts-T-m)<20*g),r||(T=e*c),b.forEach(function(t){t.pts=t.dts=v(t.pts-m,T)}),b.sort(function(t,e){return t.pts-e.pts}),i&&t.isAAC)for(var R=this.config.maxAudioFramesDrift,S=0,A=T;S<b.length;){var w,_=b[S],L=_.pts;w=L-A;var I=Math.abs(1e3*w/c);if(w<=-R*g)N.b.warn("Dropping 1 audio frame @ "+(A/c).toFixed(3)+"s due to "+Math.round(I)+" ms overlap."),b.splice(S,1),t.len-=_.unit.length;else if(w>=R*g&&I<ot&&A){var O=Math.round(w/g);N.b.warn("Injecting "+O+" audio frame @ "+(A/c).toFixed(3)+"s due to "+Math.round(1e3*w/c)+" ms gap.");for(var C=0;C<O;C++){var x=Math.max(A,0);o=rt.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),o||(N.b.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),o=_.unit.subarray()),b.splice(S,0,{unit:o,pts:x,dts:x}),t.len+=o.length,A+=g,S++}_.pts=_.dts=A,A+=g,S++}else Math.abs(w)>.1*g,_.pts=_.dts=A,A+=g,S++}for(var P=0,F=b.length;P<F;P++){var M=b[P],U=M.unit,B=M.pts;if(void 0!==d)n.duration=Math.round((B-d)/h);else{var G=Math.round(1e3*(B-T)/c),j=0;if(r&&t.isAAC&&G){if(G>0&&G<ot)j=Math.round((B-T)/g),N.b.log(G+" ms hole between AAC samples detected,filling it"),j>0&&(o=rt.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),o||(o=U.subarray()),t.len+=j*o.length);else if(G<-12){N.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(T/c).toFixed(3)+"s/"+(B/c).toFixed(3)+"s/"+-G+"ms"),t.len-=U.byteLength;continue}B=T}if(u=Math.max(0,B),!(t.len>0))return;var K=y?t.len:t.len+8;a=y?0:8;try{s=new Uint8Array(K)}catch(t){return void this.observer.trigger(k.a.ERROR,{type:D.b.MUX_ERROR,details:D.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:K,reason:"fail allocating audio mdat "+K})}if(!y){var H=new DataView(s.buffer);H.setUint32(0,K),s.set(nt.types.mdat,4)}for(var W=0;W<j;W++)o=rt.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),o||(N.b.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),o=U.subarray()),s.set(o,a),a+=o.byteLength,n={size:o.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(n)}s.set(U,a);var V=U.byteLength;a+=V,n={size:V,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(n),d=B}var q=0,Y=E.length;if(Y>=2&&(q=E[Y-2].duration,n.duration=q),Y){this.nextAudioPts=T=d+h*q,t.len=0,t.samples=E,l=y?new Uint8Array:nt.moof(t.sequenceNumber++,u/h,t),t.samples=[];var z=u/c,X=T/c,Q={data1:l,data2:s,startPTS:z,endPTS:X,startDTS:z,endDTS:X,type:"audio",nb:Y};return this.observer.trigger(k.a.FRAG_PARSING_DATA,Q),Q}return null},t.prototype.remuxEmptyAudio=function(t,e,r,i){var a=t.inputTimeScale,n=t.samplerate?t.samplerate:a,o=a/n,s=this.nextAudioPts,l=(void 0!==s?s:i.startDTS*a)+this._initDTS,u=i.endDTS*a+this._initDTS,d=1024,c=o*d,f=Math.ceil((u-l)/c),h=rt.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(N.b.warn("remux empty Audio"),!h)return void N.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var p=[],g=0;g<f;g++){var v=l+g*c;p.push({unit:h,pts:v,dts:v}),t.len+=h.length}t.samples=p,this.remuxAudio(t,e,r)},t.prototype.remuxID3=function(t,e){var r,i=t.samples.length,a=t.inputTimeScale,n=this._initPTS,o=this._initDTS;if(i){for(var s=0;s<i;s++)r=t.samples[s],r.pts=(r.pts-n)/a,r.dts=(r.dts-o)/a;this.observer.trigger(k.a.FRAG_PARSING_METADATA,{samples:t.samples})}t.samples=[],e=e},t.prototype.remuxText=function(t,e){t.samples.sort(function(t,e){return t.pts-e.pts});var r,i=t.samples.length,a=t.inputTimeScale,n=this._initPTS;if(i){for(var o=0;o<i;o++)r=t.samples[o],r.pts=(r.pts-n)/a;this.observer.trigger(k.a.FRAG_PARSING_USERDATA,{samples:t.samples})}t.samples=[],e=e},t.prototype._PTSNormalize=function(t,e){var r;if(void 0===e)return t;for(r=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=r;return t},t}(),lt=st,ut=function(){function t(e){_(this,t),this.observer=e}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(){},t.prototype.resetInitSegment=function(){},t.prototype.remux=function(t,e,r,i,a,n,o,s){var l=this.observer,u="";t&&(u+="audio"),e&&(u+="video"),l.trigger(k.a.FRAG_PARSING_DATA,{data1:s,startPTS:a,startDTS:a,type:u,nb:1,dropped:0}),l.trigger(k.a.FRAG_PARSED)},t}(),dt=ut,ct=function(){function t(e,r,i,a){L(this,t),this.observer=e,this.typeSupported=r,this.config=i,this.vendor=a}return t.prototype.destroy=function(){var t=this.demuxer;t&&t.destroy()},t.prototype.push=function(t,e,r,i,a,n,o,s,l,u,d,c){if(t.byteLength>0&&null!=e&&null!=e.key&&"AES-128"===e.method){var f=this.decrypter;null==f&&(f=this.decrypter=new U(this.observer,this.config));var h,p=this;try{h=performance.now()}catch(t){h=Date.now()}f.decrypt(t,e.key.buffer,e.iv.buffer,function(t){var f;try{f=performance.now()}catch(t){f=Date.now()}p.observer.trigger(k.a.FRAG_DECRYPTED,{stats:{tstart:h,tdecrypt:f}}),p.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),i,a,n,o,s,l,u,d,c)})}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),i,a,n,o,s,l,u,d,c)},t.prototype.pushDecrypted=function(t,e,r,i,a,n,o,s,l,u,d,c){var f=this.demuxer;if(!f||o&&!this.probe(t)){for(var h=this.observer,p=this.typeSupported,g=this.config,v=[{demux:$,remux:lt},{demux:j,remux:lt},{demux:tt,remux:lt},{demux:W,remux:dt}],m=0,y=v.length;m<y;m++){var b=v[m],E=b.demux.probe;if(E(t)){var T=this.remuxer=new b.remux(h,g,p,this.vendor);f=new b.demux(h,T,g,p),this.probe=E;break}}if(!f)return void h.trigger(k.a.ERROR,{type:D.b.MEDIA_ERROR,details:D.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=f}var R=this.remuxer;(o||s)&&(f.resetInitSegment(r,i,a,u),R.resetInitSegment()),o&&(f.resetTimeStamp(c),R.resetTimeStamp(c)),"function"==typeof f.setDecryptData&&f.setDecryptData(e),f.append(t,n,l,d)},t}();e.a=ct},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){var r=Mt[e];return!!r&&r[t.slice(0,4)]===!0}function o(t){return MediaSource.isTypeSupported('video/mp4;codecs="'+t+'"')}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e,r){var i=t[e],a=t[r],n=a.startPTS;isNaN(n)?r>e?a.start=i.start+i.duration:a.start=Math.max(i.start-a.duration,0):r>e?(i.duration=n-i.start,i.duration<0&&Dt.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-n,a.duration<0&&Dt.b.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"))}function y(t,e,r,i,a,n){var o=r;if(!isNaN(e.startPTS)){var s=Math.abs(e.startPTS-r);isNaN(e.deltaPTS)?e.deltaPTS=s:e.deltaPTS=Math.max(s,e.deltaPTS),o=Math.max(r,e.startPTS),r=Math.min(r,e.startPTS),i=Math.max(i,e.endPTS),a=Math.min(a,e.startDTS),n=Math.max(n,e.endDTS)}var l=r-e.start;e.start=e.startPTS=r,e.maxStartPTS=o,e.endPTS=i,e.startDTS=a,e.endDTS=n,e.duration=i-r;var u=e.sn;if(!t||u<t.startSN||u>t.endSN)return 0;var d,c,f;for(d=u-t.startSN,c=t.fragments,c[d]=e,f=d;f>0;f--)m(c,f,f-1);for(f=d;f<c.length-1;f++)m(c,f,f+1);return t.PTSKnown=!0,l}function b(t,e){var r,i=Math.max(t.startSN,e.startSN)-e.startSN,a=Math.min(t.endSN,e.endSN)-e.startSN,n=e.startSN-t.startSN,o=t.fragments,s=e.fragments,l=0;if(a<i)return void(e.PTSKnown=!1);for(var u=i;u<=a;u++){var d=o[n+u],c=s[u];c&&d&&(l=d.cc-c.cc,isNaN(d.startPTS)||(c.start=c.startPTS=d.startPTS,c.endPTS=d.endPTS,c.duration=d.duration,c.backtracked=d.backtracked,c.dropped=d.dropped,r=c))}if(l)for(Dt.b.log("discontinuity sliding from playlist, take drift into account"),u=0;u<s.length;u++)s[u].cc+=l;if(r)y(e,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS);else if(n>=0&&n<o.length){var f=o[n].start;for(u=0;u<s.length;u++)s[u].start+=f}e.PTSKnown=t.PTSKnown}function E(t,e){for(var r=null,i=0;i<t.length;i+=1){var a=t[i];if(a&&a.cc===e){r=a;break}}return r}function T(t,e){return $t.search(t,function(t){return t.cc<e?1:t.cc>e?-1:0})}function R(t,e,r){var i=!1;return e&&e.details&&r&&(r.endCC>r.startCC||t&&t.cc<r.startCC)&&(i=!0),i}function S(t,e){var r=t.fragments,i=e.fragments;if(!i.length||!r.length)return void Dt.b.log("No fragments to align");var a=E(r,i[0].cc);return!a||a&&!a.startPTS?void Dt.b.log("No frag in previous level to align on"):a}function A(t,e){e.fragments.forEach(function(e){if(e){var r=e.start+t;e.start=e.startPTS=r,e.endPTS=r+e.duration}}),e.PTSKnown=!0}function w(t,e,r){if(R(t,e,r)){var i=S(e.details,r);i&&(Dt.b.log("Adjusting PTS using last level due to CC increase within current level"),A(i.start,r))}if(r.PTSKnown===!1&&e&&e.details){var a=e.details.programDateTime,n=r.programDateTime,o=(n-a)/1e3+e.details.fragments[0].start;isNaN(o)||(Dt.b.log("adjusting PTS using programDateTime delta, sliding:"+o.toFixed(3)),A(o,r))}}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function k(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function D(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function O(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function C(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function P(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function B(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function K(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function H(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function V(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function z(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function X(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function $(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function et(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function rt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new We,this.regionList=[]}function it(t){function e(t,e,r,i){return 3600*(0|t)+60*(0|e)+(0|r)+(0|i)/1e3}var r=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?e(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?e(r[1],r[2],0,r[4]):e(0,r[1],r[2],r[4]):null}function at(){this.values=Object.create(null)}function nt(t,e,r,i){var a=i?t.split(i):[t];for(var n in a)if("string"==typeof a[n]){var o=a[n].split(r);if(2===o.length){var s=o[0],l=o[1];e(s,l)}}}function ot(t,e,r){function i(){var e=it(t);if(null===e)throw new Error("Malformed timestamp: "+o);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function a(t,e){var i=new at;nt(t,function(t,e){switch(t){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===e){i.set(t,r[a].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":var n=e.split(","),o=n[0];i.integer(t,o),i.percent(t,o)&&i.set("snapToLines",!1),i.alt(t,o,["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",qe,"end"]);break;case"position":n=e.split(","),i.percent(t,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",qe,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",qe,"end","left","right"])}},/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&Ve.line===-1&&(a=-1),e.line=a,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",qe);var n=i.get("position","auto");"auto"===n&&50===Ve.position&&(n="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=n}function n(){t=t.replace(/^\s+/,"")}var o=t;if(n(),e.startTime=i(),n(),"-->"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);t=t.substr(3),n(),e.endTime=i(),n(),a(t,e)}function st(t){return t.replace(/<br(?: \/)?>/gi,"\n")}function lt(t,e,r,i){for(var a,n,o,s,l,u=window.VTTCue||window.TextTrackCue,d=0;d<i.rows.length;d++)if(a=i.rows[d],o=!0,s=0,l="",!a.isEmpty()){for(var c=0;c<a.chars.length;c++)a.chars[c].uchar.match(/\s/)&&o?s++:(l+=a.chars[c].uchar,o=!1);a.cueStartTime=e,e===r&&(r+=1e-4),n=new u(e,r,st(l.trim())),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?n.line=d+1:n.line=d>7?d-2:d+1,n.align="left",n.position=Math.max(0,Math.min(100,100*(s/32)+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(n)}}function ut(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ct(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function ft(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function ht(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}function pt(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function gt(t,e,r,i){return Math.min(e,i)-Math.max(t,r)}function vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function yt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function bt(t){for(var e=[],r=0;r<t.length;r++)"subtitles"===t[r].kind&&e.push(t[r]);return e}function Et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function Rt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function St(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var At={};r.d(At,"newCue",function(){return lt});var wt=r(5),_t=r.n(wt),Lt=r(1),kt=r(2),Dt=r(0),It="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},Ot=function(){function t(e){i(this,t),this.hls=e,this.onEvent=this.onEvent.bind(this);for(var r=arguments.length,a=Array(r>1?r-1:0),n=1;n<r;n++)a[n-1]=arguments[n];this.handledEvents=a,this.useGenericHandler=!0,this.registerListeners()}return t.prototype.destroy=function(){this.unregisterListeners()},t.prototype.isEventHandler=function(){return"object"===It(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent},t.prototype.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){if("hlsEventGeneric"===t)throw new Error("Forbidden event name: "+t);this.hls.on(t,this.onEvent)},this)},t.prototype.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){this.hls.off(t,this.onEvent)},this)},t.prototype.onEvent=function(t,e){this.onEventGeneric(t,e)},t.prototype.onEventGeneric=function(t,e){var r=function(t,e){var r="on"+t.replace("hls","");if("function"!=typeof this[r])throw new Error("Event "+t+" has no generic handler in this "+this.constructor.name+" class (tried "+r+")");return this[r].bind(this,e)};try{r.call(this,t,e).call()}catch(e){Dt.b.error("internal error happened while processing "+t+":"+e.message),this.hls.trigger(Lt.a.ERROR,{type:kt.b.OTHER_ERROR,details:kt.a.INTERNAL_EXCEPTION,fatal:!1,event:t,err:e})}},t}(),Ct=Ot,xt=/^(\d+)x(\d+)$/,Pt=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,Ft=function(){function t(e){a(this,t),"string"==typeof e&&(e=t.parseAttrList(e));for(var r in e)e.hasOwnProperty(r)&&(this[r]=e[r])}return t.prototype.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;i<e.length/2;i++)r[i]=parseInt(e.slice(2*i,2*i+2),16);return r}return null},t.prototype.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.decimalFloatingPoint=function(t){return parseFloat(this[t])},t.prototype.enumeratedString=function(t){return this[t]},t.prototype.decimalResolution=function(t){var e=xt.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,r={};for(Pt.lastIndex=0;null!==(e=Pt.exec(t));){var i=e[2],a='"';0===i.indexOf(a)&&i.lastIndexOf(a)===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}(),Nt=Ft,Mt={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}},Ut=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),Bt=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,Gt=/#EXT-X-MEDIA:(.*)/g,jt=new RegExp([/#EXTINF:(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)(\S+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),Kt=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,Ht=function(){function t(){u(this,t),this.method=null,this.key=null,this.iv=null,this._uri=null}return Ut(t,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=_t.a.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}]),t}(),Wt=function(){function t(){u(this,t),this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[]}return t.prototype.createInitializationVector=function(t){for(var e=new Uint8Array(16),r=12;r<16;r++)e[r]=t>>8*(15-r)&255;return e},t.prototype.fragmentDecryptdataFromLevelkey=function(t,e){var r=t;return t&&t.method&&t.uri&&!t.iv&&(r=new Ht,r.method=t.method,r.baseuri=t.baseuri,r.reluri=t.reluri,r.iv=this.createInitializationVector(e)),r},t.prototype.cloneObj=function(t){return JSON.parse(JSON.stringify(t))},Ut(t,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=_t.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange){var t=this._byteRange=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var r=this.lastByteRangeEndOffset;t[0]=r?r:0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0]}}return this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",