tcplayer.js 4.8.0-beta.2 → 4.8.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
|
|
7
7
|
<title>腾讯云视频点播示例</title>
|
|
8
8
|
<link href="https://web.sdk.qcloud.com/player/tcplayer/release/v4.6.0/tcplayer.min.css" rel="stylesheet"/>
|
|
9
|
-
|
|
9
|
+
<script src="https://imgcache.qq.com/open/qcloud/video/tcplayer/libs/vconsole.min.3.3.0.js"></script>
|
|
10
10
|
<!--播放器脚本文件-->
|
|
11
11
|
<script src="https://testmig-1306264703.cos.ap-guangzhou.myqcloud.com/vin/tcplayer.v4.8.0.min.js"></script>
|
|
12
12
|
|
|
@@ -33,17 +33,9 @@
|
|
|
33
33
|
</style>
|
|
34
34
|
</head>
|
|
35
35
|
<body>
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
<video id="player-container-id1" preload="auto" width="640" height="360" playsinline webkit-playsinline>
|
|
40
|
-
</video>
|
|
41
|
-
|
|
42
|
-
<video id="player-container-id2" style="display: none" preload="auto" width="640" height="360" playsinline webkit-playsinline>
|
|
43
|
-
</video>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
<!-- 设置播放器容器 -->
|
|
37
|
+
<video id="player-container-id" preload="auto" width="640" height="360" playsinline webkit-playsinline>
|
|
38
|
+
</video>
|
|
47
39
|
<!--
|
|
48
40
|
注意事项:
|
|
49
41
|
* 播放器容器必须为 video 标签
|
|
@@ -53,52 +45,44 @@
|
|
|
53
45
|
* 设置 x5-playsinline 属性会使用 X5 UI 的播放器
|
|
54
46
|
-->
|
|
55
47
|
<script>
|
|
56
|
-
var
|
|
48
|
+
var vConsole = new VConsole();
|
|
49
|
+
var player = TCPlayer('player-container-id', { // player-container-id 为播放器容器ID,必须与html中一致
|
|
57
50
|
autoplay: true,
|
|
58
|
-
|
|
59
|
-
//
|
|
51
|
+
|
|
52
|
+
// 播放卡住
|
|
53
|
+
// appID: '1500015539',
|
|
54
|
+
// fileID: '3270835010799147274',
|
|
55
|
+
// psign: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MTUwMDAxNTUzOSwiY29udGVudEluZm8iOnsiYXVkaW9WaWRlb1R5cGUiOiJPcmlnaW5hbCIsImltYWdlU3ByaXRlRGVmaW5pdGlvbiI6MTAsInJhd0FkYXB0aXZlRGVmaW5pdGlvbiI6MTB9LCJjdXJyZW50VGltZVN0YW1wIjoxNjg5NzUwMTYwLCJleHBpcmVUaW1lU3RhbXAiOjE2ODk4MzY1NjAsImZpbGVJZCI6IjMyNzA4MzUwMTA3OTkxNDcyNzQiLCJ1cmxBY2Nlc3NJbmZvIjp7InQiOiI2NGI4ZGMxMCJ9fQ.cjNK5v1Hlhy10UTvDcnZwTCeSTOliNIsx4nizlCNRtg',
|
|
56
|
+
|
|
60
57
|
fileID: '243791576943072647',
|
|
61
58
|
appID: '1306264703',
|
|
62
59
|
psign: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MTMwNjI2NDcwMywiZmlsZUlkIjoiMjQzNzkxNTc2OTQzMDcyNjQ3IiwiY3VycmVudFRpbWVTdGFtcCI6MTY3MDQ2OTk3MSwiY29udGVudEluZm8iOnsiYXVkaW9WaWRlb1R5cGUiOiJQcm90ZWN0ZWRBZGFwdGl2ZSIsImRybUFkYXB0aXZlSW5mbyI6eyJwcml2YXRlRW5jcnlwdGlvbkRlZmluaXRpb24iOjEyfX0sInVybEFjY2Vzc0luZm8iOnsiZG9tYWluIjoiMTMwNjI2NDcwMy52b2QyLm15cWNsb3VkLmNvbSIsInNjaGVtZSI6IkhUVFBTIn19.FOcmChHfrGY9tYCDn20MSQi-IqvQ9U_U6qLNgx9MhLg',
|
|
63
60
|
|
|
64
|
-
|
|
65
61
|
hlsConfig: {
|
|
66
62
|
skip: true,
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
});
|
|
63
|
+
},
|
|
70
64
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
document.getElementById('player-container-id2').style.display = 'block';
|
|
87
|
-
var player = TCPlayer('player-container-id2', { // player-container-id 为播放器容器ID,必须与html中一致
|
|
88
|
-
autoplay: true,
|
|
89
|
-
|
|
90
|
-
// 6. AES
|
|
91
|
-
fileID: '243791576943072647',
|
|
92
|
-
appID: '1306264703',
|
|
93
|
-
psign: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MTMwNjI2NDcwMywiZmlsZUlkIjoiMjQzNzkxNTc2OTQzMDcyNjQ3IiwiY3VycmVudFRpbWVTdGFtcCI6MTY3MDQ2OTk3MSwiY29udGVudEluZm8iOnsiYXVkaW9WaWRlb1R5cGUiOiJQcm90ZWN0ZWRBZGFwdGl2ZSIsImRybUFkYXB0aXZlSW5mbyI6eyJwcml2YXRlRW5jcnlwdGlvbkRlZmluaXRpb24iOjEyfX0sInVybEFjY2Vzc0luZm8iOnsiZG9tYWluIjoiMTMwNjI2NDcwMy52b2QyLm15cWNsb3VkLmNvbSIsInNjaGVtZSI6IkhUVFBTIn19.FOcmChHfrGY9tYCDn20MSQi-IqvQ9U_U6qLNgx9MhLg',
|
|
94
|
-
|
|
95
|
-
fakeFullScreen: true,
|
|
96
|
-
hlsConfig: {
|
|
97
|
-
skip: false,
|
|
65
|
+
//其他参数请在开发文档中查看
|
|
66
|
+
plugins: {
|
|
67
|
+
ContinuePlay: {
|
|
68
|
+
// auto: true // 是否在播放时自动续播
|
|
69
|
+
},
|
|
70
|
+
ProgressMarker: true,
|
|
71
|
+
ContextMenu: {
|
|
72
|
+
statistic: true,
|
|
73
|
+
levelSwitch: {
|
|
74
|
+
open: true, // 打开切换提示
|
|
75
|
+
// switchingText: '开始', // 开始切换时文案
|
|
76
|
+
// switchedText: '成功', // 切换成功时文案
|
|
77
|
+
// switchErrorText: '失败', // 切换失败时文案
|
|
98
78
|
}
|
|
99
|
-
}
|
|
79
|
+
}
|
|
100
80
|
}
|
|
101
81
|
});
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
// player.src('webrtc://global-lebtest-play.myqcloud.com/live/lebtest?txSecret=f22a813b284137ed10d3259a7b5c224b&txTime=69f1eb8c');
|
|
85
|
+
// player.src('https://global-lebtest-play.myqcloud.com/live/lebtest.flv');
|
|
102
86
|
|
|
103
87
|
</script>
|
|
104
88
|
</body>
|
|
@@ -4,8 +4,8 @@ e.prototype.getChild=function(e){if(e)return e=toTitleCase(e),this.childNameInde
|
|
|
4
4
|
;var _objCreate=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();ParsingError.prototype=_objCreate(Error.prototype),ParsingError.prototype.constructor=ParsingError,ParsingError.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Settings.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var ESCAPE={"&":"&","<":"<",">":">","‎":"","‏":""," ":" "},TAG_NAME={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},TAG_ANNOTATION={v:"title",lang:"lang"},NEEDS_PARENT={rt:"ruby"},strongRTLRanges=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];StyleBox.prototype.applyStyles=function(e,t){t=t||this.div;for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},StyleBox.prototype.formatStyle=function(e,t){return 0===e?0:e+t},CueStyleBox.prototype=_objCreate(StyleBox.prototype),CueStyleBox.prototype.constructor=CueStyleBox,BoxPosition.prototype.move=function(e,t){switch(t=t!==undefined?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},BoxPosition.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},BoxPosition.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},BoxPosition.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},BoxPosition.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},BoxPosition.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},BoxPosition.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},BoxPosition.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e,{left:e.left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},WebVTT$1.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},WebVTT$1.convertCueToDOMTree=function(e,t){return e&&t?parseContent(e,t):null},WebVTT$1.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],o=BoxPosition.getSimpleBoxPosition(r),a=Math.round(.05*o.height*100)/100,s={font:a+"px sans-serif"};!function(){for(var n,a,c=0;c<t.length;c++)a=t[c],n=new CueStyleBox(e,a,s),r.appendChild(n.div),moveBoxToLinePosition(e,n,o,i),a.displayState=n.div,i.push(BoxPosition.getSimpleBoxPosition(n))}()}else for(var c=0;c<t.length;c++)r.appendChild(t[c].displayState)},WebVTT$1.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},WebVTT$1.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof ParsingError))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){function t(){for(var e=i.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,i.buffer=e.substr(t),n}function n(e){var t=new Settings;if(parseOptions(e,function(e,n){switch(e){case"id":t.set(e,n);break;case"width":t.percent(e,n);break;case"lines":t.integer(e,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var i=new Settings;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;t.set(e+"X",i.get("x")),t.set(e+"Y",i.get("y"));break;case"scroll":t.alt(e,n,["up"])}},/=/,/\s/),t.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=t.get("width",100),n.lines=t.get("lines",3),n.regionAnchorX=t.get("regionanchorX",0),n.regionAnchorY=t.get("regionanchorY",100),n.viewportAnchorX=t.get("viewportanchorX",0),n.viewportAnchorY=t.get("viewportanchorY",100),n.scroll=t.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:t.get("id"),region:n})}}function r(e){var t=new Settings;parseOptions(e,function(e,n){switch(e){case"MPEGT":t.integer(e+"S",n);break;case"LOCA":t.set(e+"L",parseTimeStamp(n))}},/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}var i=this;e&&(i.buffer+=i.decoder.decode(e,{stream:!0}));try{var o;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;o=t();var a=o.match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new ParsingError(ParsingError.Errors.BadSignature);i.state="HEADER"}for(var s=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(s?s=!1:o=t(),i.state){case"HEADER":/:/.test(o)?function(e){e.match(/X-TIMESTAMP-MAP/)?parseOptions(e,function(e,t){switch(e){case"X-TIMESTAMP-MAP":r(t)}},/=/):parseOptions(e,function(e,t){switch(e){case"Region":n(t)}},/:/)}(o):o||(i.state="ID");continue;case"NOTE":o||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(o)){i.state="NOTE";break}if(!o)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===o.indexOf("--\x3e")){i.cue.id=o;continue}case"CUE":try{parseCue(o,i.cue,i.regionList)}catch(l){i.reportOrThrowError(l),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var c=-1!==o.indexOf("--\x3e");if(!o||c&&(s=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=o;continue;case"BADCUE":o||(i.state="ID");continue}}}catch(l){i.reportOrThrowError(l),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new ParsingError(ParsingError.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var vtt$1=WebVTT$1,autoKeyword="auto",directionSetting={"":!0,lr:!0,rl:!0},alignSetting={start:!0,middle:!0,end:!0,left:!0,right:!0};VTTCue.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var vttcue=VTTCue,scrollSetting={"":!0,up:!0},vttregion=VTTRegion,browserIndex=createCommonjsModule(function(e){var t=e.exports={WebVTT:vtt$1,VTTCue:vttcue,VTTRegion:vttregion};window_1.vttjs=t,window_1.WebVTT=t.WebVTT;var n=t.VTTCue,r=t.VTTRegion,i=window_1.VTTCue,o=window_1.VTTRegion;t.shim=function(){window_1.VTTCue=n,window_1.VTTRegion=r},t.restore=function(){window_1.VTTCue=i,window_1.VTTRegion=o},window_1.VTTCue||t.shim()}),Tech=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){};classCallCheck(this,t),r.reportTouchActivity=!1;var o=possibleConstructorReturn(this,e.call(this,n,r,i));return o.hasStarted_=!1,o.on("playing",function(){this.hasStarted_=!0}),o.on("loadstart",function(){this.hasStarted_=!1}),ALL.names.forEach(function(e){var t=ALL[e];r&&r[t.getterName]&&(o[t.privateName]=r[t.getterName])}),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(e){!1===r["native"+e+"Tracks"]&&(o["featuresNative"+e+"Tracks"]=!1)}),!1===r.nativeCaptions||!1===r.nativeTextTracks?o.featuresNativeTextTracks=!1:!0!==r.nativeCaptions&&!0!==r.nativeTextTracks||(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks||o.emulateTextTracks(),o.autoRemoteTextTracks_=new ALL.text.ListClass,o.initTrackListeners(),r.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}return inherits(t,e),t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(bind(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return createTimeRanges(0,0)},t.prototype.bufferedPercent=function(){return bufferedPercent(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(NORMAL.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;e=[].concat(e),e.forEach(function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}})},t.prototype.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},t.prototype.reset=function(){},t.prototype.error=function(e){return e!==undefined&&(this.error_=new MediaError(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?createTimeRanges(0,0):createTimeRanges()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTrackListeners=function(){var e=this;NORMAL.names.forEach(function(t){var n=NORMAL[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)})})},t.prototype.addWebVttScript_=function(){var e=this;if(!window_1.WebVTT)if(document_1.body.contains(this.el())){if(!this.options_["vtt.js"]&&isPlain(browserIndex)&&Object.keys(browserIndex).length>0)return void this.trigger("vttjsloaded");var t=document_1.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){t.onload=null,t.onerror=null}),window_1.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return e.trigger("texttrackchange")},a=function(){o();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",o)}})},t.prototype.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return createTrackHelper(this,e,t,n)},t.prototype.createRemoteTextTrack=function(e){var t=mergeOptions(e,{tech:this});return new REMOTE.remoteTextEl.TrackClass(t)},t.prototype.addRemoteTextTrack=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(t);return!0!==n&&!1!==n&&(log$2.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready(function(){return e.autoRemoteTextTracks_.addTrack(r.track)}),r},t.prototype.addAudioTrack=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=mergeOptions(t,{tech:this}),i=new NORMAL.audio.TrackClass(r);return this.audioTracks_.addTrack(i),!0!==n&&this.ready(function(){return e.audioTracks_.addTrack(i)}),i},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=toTitleCase(e),t.techs_[e]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return e=toTitleCase(e),t.techs_&&t.techs_[e]?t.techs_[e]:window_1&&window_1.videojs&&window_1.videojs[e]?(log$2.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),window_1.videojs[e]):void 0},t}(Component);ALL.names.forEach(function(e){var t=ALL[e];Tech.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),Tech.prototype.featuresVolumeControl=!0,Tech.prototype.featuresMuteControl=!0,Tech.prototype.featuresFullscreenResize=!1,Tech.prototype.featuresPlaybackRate=!1,Tech.prototype.featuresProgressEvents=!1,Tech.prototype.featuresTimeupdateEvents=!1,Tech.prototype.featuresNativeTextTracks=!1,Tech.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),n===undefined&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n=e.sourceHandlers||[],r=void 0,i=0;i<n.length;i++)if(r=n[i].canPlayType(t))return r;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""},["seekable","duration"].forEach(function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:log$2.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Component.registerComponent("Tech",Tech),Tech.registerTech("Tech",Tech),Tech.defaultTechOrder_=[];var middlewares={},allowedGetters={buffered:1,currentTime:1,duration:1,seekable:1,played:1},allowedSetters={setCurrentTime:1},MimetypesKind={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},getMimetype=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"",t=getFileExtension(e);return MimetypesKind[t.toLowerCase()]||""},filterSource=function e(t){if(Array.isArray(t)){var n=[];t.forEach(function(t){t=e(t),Array.isArray(t)?n=n.concat(t):isObject$1(t)&&n.push(t)}),t=n}else t="string"==typeof t&&t.trim()?[fixSource({src:t})]:isObject$1(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[fixSource(t)]:[];return t},fixSource=function(e){if(!e.type){var t=getMimetype(e.src);t&&(e.type=t)}return e},MediaLoader=function(e){function t(n,r,i){classCallCheck(this,t);var o=mergeOptions({createEl:!1},r),a=possibleConstructorReturn(this,e.call(this,n,o,i));if(r.playerOptions.sources&&0!==r.playerOptions.sources.length)n.src(r.playerOptions.sources);else for(var s=0,c=r.playerOptions.techOrder;s<c.length;s++){var l=toTitleCase(c[s]),u=Tech.getTech(l);if(l||(u=Component.getComponent(l)),u&&u.isSupported()){n.loadTech_(l);break}}return a}return inherits(t,e),t}(Component);Component.registerComponent("MediaLoader",MediaLoader);var ClickableComponent=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.emitTapEvents(),i.enable(),i}return inherits(t,e),t.prototype.createEl=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"div",n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};n=assign({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&log$2.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=assign({role:"button","aria-live":"polite"},r),this.tabIndex_=n.tabIndex;var i=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(i),i},t.prototype.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=createEl("span",{className:"vjs-control-text"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.el();if(e===undefined)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,textContent(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},t.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){on(document_1,"keydown",bind(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){off(document_1,"keydown",bind(this,this.handleKeyPress))},t}(Component);Component.registerComponent("ClickableComponent",ClickableComponent);var PosterImage=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.update(),n.on("posterchange",bind(i,i.update)),i}return inherits(t,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=createEl("div",{className:"vjs-poster",tabIndex:-1});if(!BACKGROUND_SIZE_SUPPORTED){this.fallbackImg_=createEl("img");var t=this.player().height()||parseInt(this.player().el().style.height);this.player().width()||parseInt(this.player().el().style.width);this.fallbackImg_.onload=function(){this.width;this.height>t&&(this.style.maxHeight=t+"px",this.style.width="auto")};var n=createEl("div"),r=createEl("span");r.appendChild(this.fallbackImg_),n.appendChild(r),e.appendChild(n)}return e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?this.player_.play():this.player_.pause())},t}(ClickableComponent);Component.registerComponent("PosterImage",PosterImage);var darkGray="#222",lightGray="#ccc",fontMap={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},TextTrackDisplay=function(e){function t(n,r,i){classCallCheck(this,t);var o=possibleConstructorReturn(this,e.call(this,n,r,i));return n.on("loadstart",bind(o,o.toggleDisplay)),n.on("texttrackchange",bind(o,o.updateDisplay)),n.on("loadstart",bind(o,o.preselectTrack)),n.ready(bind(o,function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)return void this.hide();n.on("fullscreenchange",bind(this,this.updateDisplay));for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()})),o}return inherits(t,e),t.prototype.preselectTrack=function(){for(var e={captions:1,subtitles:1},t=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage,r=void 0,i=void 0,o=void 0,a=0;a<t.length;a++){var s=t[a];n&&n.enabled&&n.language===s.language?s.kind===n.kind?o=s:o||(o=s):n&&!n.enabled?(o=null,r=null,i=null):s["default"]&&("descriptions"!==s.kind||r?s.kind in e&&!i&&(i=s):r=s)}o?o.mode="showing":i?i.mode="showing":r&&(r.mode="showing")},t.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},t.prototype.clearDisplay=function(){"function"==typeof window_1.WebVTT&&window_1.WebVTT.processCues(window_1,[],this.el_)},t.prototype.updateDisplay=function(){var e=this.player_.textTracks();this.clearDisplay();for(var t=null,n=null,r=e.length;r--;){var i=e[r];"showing"===i.mode&&("descriptions"===i.kind?t=i:n=i)}n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):t&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(t))},t.prototype.updateForTrack=function(e){if("function"==typeof window_1.WebVTT&&e.activeCues){for(var t=this.player_.textTrackSettings.getValues(),n=[],r=0;r<e.activeCues.length;r++)n.push(e.activeCues[r]);window_1.WebVTT.processCues(window_1,n,this.el_);for(var i=n.length;i--;){var o=n[i];if(o){var a=o.displayState;if(t.color&&(a.firstChild.style.color=t.color),t.textOpacity&&tryUpdateStyle(a.firstChild,"color",constructColor(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(a.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&tryUpdateStyle(a.firstChild,"backgroundColor",constructColor(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?tryUpdateStyle(a,"backgroundColor",constructColor(t.windowColor,t.windowOpacity)):a.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px "+darkGray+", 2px 2px 4px "+darkGray+", 2px 2px 5px "+darkGray:"raised"===t.edgeStyle?a.firstChild.style.textShadow="1px 1px "+darkGray+", 2px 2px "+darkGray+", 3px 3px "+darkGray:"depressed"===t.edgeStyle?a.firstChild.style.textShadow="1px 1px "+lightGray+", 0 1px "+lightGray+", -1px -1px "+darkGray+", 0 -1px "+darkGray:"uniform"===t.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px "+darkGray+", 0 0 4px "+darkGray+", 0 0 4px "+darkGray+", 0 0 4px "+darkGray)),t.fontPercent&&1!==t.fontPercent){var s=window_1.parseFloat(a.style.fontSize);a.style.fontSize=s*t.fontPercent+"px",a.style.height="auto",a.style.top="auto",a.style.bottom="2px"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=fontMap[t.fontFamily])}}}},t}(Component);Component.registerComponent("TextTrackDisplay",TextTrackDisplay);var LoadingSpinner=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},t}(Component);Component.registerComponent("LoadingSpinner",LoadingSpinner);var Button=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};e="button",t=assign({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=assign({type:"button","aria-live":"polite"},n);var r=Component.prototype.createEl.call(this,e,t,n);return this.createControlTextEl(r),r},t.prototype.addChild=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=this.constructor.name;return log$2.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Component.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(ClickableComponent);Component.registerComponent("Button",Button);var BigPlayButton=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(!(this.mouseused_&&e.clientX&&e.clientY)){var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(!r)return void this.player_.focus();var i=function(){return r.focus()};isPromise(t)?t.then(i,function(){}):this.setTimeout(i,1)}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(Button);BigPlayButton.prototype.controlText_="Play Video",Component.registerComponent("BigPlayButton",BigPlayButton);var CloseButton=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.controlText(r&&r.controlText||i.localize("Close")),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(Button);Component.registerComponent("CloseButton",CloseButton);var PlayToggle=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"play",i.handlePlay),i.on(n,"pause",i.handlePause),i.on(n,"ended",i.handleEnded),i}return inherits(t,e),
|
|
5
5
|
t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(Button);PlayToggle.prototype.controlText_="Play",Component.registerComponent("PlayToggle",PlayToggle);var TimeDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.throttledUpdateContent=throttle(bind(i,i.updateContent),25),i.on(n,"timeupdate",i.throttledUpdateContent),i}return inherits(t,e),t.prototype.createEl=function(t){var n=this.buildCSSClass(),r=e.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control"});return this.contentEl_=createEl("div",{className:n+"-display"},{"aria-live":"off"},createEl("span",{className:"vjs-control-text",textContent:this.localize(this.controlText_)})),this.updateTextNode_(),r.appendChild(this.contentEl_),r},t.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=document_1.createTextNode(this.formattedTime_||"0:00"),this.contentEl_.appendChild(this.textNode_)}},t.prototype.formatTime_=function(e){return formatTime(e)},t.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.updateContent=function(e){},t}(Component);TimeDisplay.prototype.controlText_="Time",Component.registerComponent("TimeDisplay",TimeDisplay);var CurrentTimeDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"ended",i.handleEnded),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-current-time"},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(TimeDisplay);CurrentTimeDisplay.prototype.controlText_="Current Time",Component.registerComponent("CurrentTimeDisplay",CurrentTimeDisplay);var DurationDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"durationchange",i.updateContent),i.on(n,"loadedmetadata",i.throttledUpdateContent),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-duration"},t.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(TimeDisplay);DurationDisplay.prototype.controlText_="Duration Time",Component.registerComponent("DurationDisplay",DurationDisplay);var TimeDivider=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},t}(Component);Component.registerComponent("TimeDivider",TimeDivider);var RemainingTimeDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"durationchange",i.throttledUpdateContent),i.on(n,"ended",i.handleEnded),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-remaining-time"},t.prototype.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},t.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(TimeDisplay);RemainingTimeDisplay.prototype.controlText_="Remaining Time",Component.registerComponent("RemainingTimeDisplay",RemainingTimeDisplay);var LiveDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.isLoadedMetaData=!1,i.hide(),i.on(i.player(),"durationchange",i.onDurationChange),i.on(i.player(),"loadedmetadata",i.onLoadMetadata),n.on("loadnewvideo",videojs.bind(i,i.resetStatus)),i}return inherits(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=createEl("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"</span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.resetStatus=function(){this.setStatus(!1)},t.prototype.onDurationChange=function(){this.isLoadedMetaData&&this.update()},t.prototype.onLoadMetadata=function(){this.setStatus(!0),this.update()},t.prototype.setStatus=function(e){this.isLoadedMetaData=e},t.prototype.update=function(){this.player().duration()===Infinity?this.show():this.hide()},t}(Component);Component.registerComponent("LiveDisplay",LiveDisplay);var Slider=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return inherits(t,e),t.prototype.enabled=function(){return this.enabled_},t.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.prototype.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.prototype.createEl=function(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return n.className=n.className+" vjs-slider",n=assign({tabIndex:0},n),r=assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;e.preventDefault(),blockTextSelection(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;unblockTextSelection(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!==e||e<0||e===Infinity)&&(e=0);var n=(100*e).toFixed(2)+"%",r=t.el().style;return this.vertical()?r.height=n:r.width=n,e}}},t.prototype.calculateDistance=function(e){var t=getPointerPosition(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){if(e===undefined)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Component);Component.registerComponent("Slider",Slider);var LoadProgressBar=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.partEls_=[],i.on(n,"progress",i.update),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},t.prototype.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},t.prototype.update=function(e){var t=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),i=this.partEls_,o=function(e,t){var n=e/t||0;return 100*(n>=1?1:n)+"%"};this.el_.style.width=o(r,n);for(var a=0;a<t.length;a++){var s=t.start(a),c=t.end(a),l=i[a];l||(l=this.el_.appendChild(createEl()),i[a]=l),l.style.left=o(s,r),l.style.width=o(c-s,r)}for(var u=i.length;u>t.length;u--)this.el_.removeChild(i[u-1]);i.length=t.length},t}(Component);Component.registerComponent("LoadProgressBar",LoadProgressBar);var TimeTooltip=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,n){var r=getBoundingClientRect(this.el_),i=getBoundingClientRect(this.player_.el()),o=e.width*t;if(i&&r){var a=e.left-i.left+o,s=e.width-o+(i.right-e.right),c=r.width/2;a<c?c+=c-a:s<c&&(c=s),c<0?c=0:c>r.width&&(c=r.width),this.el_.style.right="-"+c+"px",textContent(this.el_,n)}},t}(Component);Component.registerComponent("TimeTooltip",TimeTooltip);var PlayProgressBar=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),i=formatTime(r,n.player_.duration()),o=n.getChild("timeTooltip");o&&o.update(e,t,i)})},t}(Component);PlayProgressBar.prototype.options_={children:[]},IE_VERSION&&!(IE_VERSION>8)||IS_IOS||IS_ANDROID||PlayProgressBar.prototype.options_.children.push("timeTooltip"),Component.registerComponent("PlayProgressBar",PlayProgressBar);var MouseTimeDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.update=throttle(bind(i,i.update),25),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=n.player_.duration(),i=formatTime(t*r,r);n.el_.style.left=e.width*t+"px",n.getChild("timeTooltip").update(e,t,i)})},t}(Component);MouseTimeDisplay.prototype.options_={children:["timeTooltip"]},Component.registerComponent("MouseTimeDisplay",MouseTimeDisplay);var STEP_SECONDS=5,UPDATE_REFRESH_INTERVAL=30,SeekBar=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.update=throttle(bind(i,i.update),UPDATE_REFRESH_INTERVAL),i.on(n,"timeupdate",i.update),i.on(n,"ended",i.handleEnded),i.updateInterval=null,i.on(n,["playing"],function(){i.clearInterval(i.updateInterval),i.updateInterval=i.setInterval(function(){i.requestAnimationFrame(function(){i.update()})},UPDATE_REFRESH_INTERVAL)}),i.on(n,["ended","pause","waiting"],function(){i.clearInterval(i.updateInterval)}),i.on(n,["timeupdate","ended"],i.update),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update_=function(e,t){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[formatTime(e,n),formatTime(n,n)],"{1} of {2}")),this.bar.update(getBoundingClientRect(this.el_),t)},t.prototype.update=function(t){var n=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},t.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){isSingleLeftClick(t)&&(this.player_.trigger("beforeseek"),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.prototype.handleMouseMove=function(e){if(isSingleLeftClick(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},t.prototype.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.prototype.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&silencePromise(this.player_.play())},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+STEP_SECONDS)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-STEP_SECONDS)},t.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(Slider);SeekBar.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},IE_VERSION&&!(IE_VERSION>8)||IS_IOS||IS_ANDROID||SeekBar.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),SeekBar.prototype.playerEvent="timeupdate",Component.registerComponent("SeekBar",SeekBar);var ProgressControl=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.handleMouseMove=throttle(bind(i,i.handleMouseMove),25),i.throttledHandleMouseSeek=throttle(bind(i,i.handleMouseSeek),25),i.enable(),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar"),n=t.getChild("mouseTimeDisplay"),r=t.el(),i=getBoundingClientRect(r),o=getPointerPosition(r,e).x;o>1?o=1:o<0&&(o=0),n&&n.update(i,o)},t.prototype.handleMouseSeek=function(e){this.getChild("seekBar").handleMouseMove(e)},t.prototype.enabled=function(){return this.enabled_},t.prototype.disable=function(){this.children().forEach(function(e){return e.disable&&e.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.prototype.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(Component);ProgressControl.prototype.options_={children:["seekBar"]},Component.registerComponent("ProgressControl",ProgressControl);var FullscreenToggle=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"fullscreenchange",i.handleFullscreenChange),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Button);FullscreenToggle.prototype.controlText_="Fullscreen",Component.registerComponent("FullscreenToggle",FullscreenToggle);var checkVolumeSupport=function(e,t){!t.tech_||t.tech_.featuresVolumeControl||t.tech_.featuresMuteControl?t.tech_&&t.tech_.featuresVolumeControl&&e.addClass("enable-volume-control"):e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresVolumeControl||t.tech_.featuresMuteControl?t.tech_.featuresVolumeControl&&(e.removeClass("vjs-hidden"),e.addClass("enable-volume-control")):e.addClass("vjs-hidden")})},VolumeLevel=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(Component);Component.registerComponent("VolumeLevel",VolumeLevel);var VolumeBar=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on("slideractive",i.updateLastVolume_),i.on(n,"volumechange",i.updateARIAAttributes),n.ready(function(){return i.updateARIAAttributes()}),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.prototype.handleMouseDown=function(t){isSingleLeftClick(t)&&e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){isSingleLeftClick(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},t}(Slider);VolumeBar.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},VolumeBar.prototype.playerEvent="volumechange",Component.registerComponent("VolumeBar",VolumeBar);var VolumeControl=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,t),r.vertical=r.vertical||!1,("undefined"==typeof r.volumeBar||isPlain(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var i=possibleConstructorReturn(this,e.call(this,n,r));return checkVolumeSupport(i,n),i.throttledHandleMouseMove=throttle(bind(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}return inherits(t,e),t.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Component);VolumeControl.prototype.options_={children:["volumeBar"]},Component.registerComponent("VolumeControl",VolumeControl);var MuteToggle=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return checkVolumeSupport(i,n),i.on(n,["loadstart","volumechange"],i.update),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},t.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)removeClass(this.el_,"vjs-vol-"+n);addClass(this.el_,"vjs-vol-"+t)},t.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume(),t=e?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},t}(Button);MuteToggle.prototype.controlText_="Mute",Component.registerComponent("MuteToggle",MuteToggle);var VolumePanel=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,t),"undefined"!=typeof r.inline?r.inline=r.inline:r.inline=!0,("undefined"==typeof r.volumeControl||isPlain(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var i=possibleConstructorReturn(this,e.call(this,n,r));return checkVolumeSupport(i,n),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.muteToggle,"focus",i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i.on(i.muteToggle,"blur",i.sliderInactive_),i}return inherits(t,e),t.prototype.sliderActive_=function(){IS_ANDROID||IS_IOS||this.addClass("vjs-slider-active")},t.prototype.sliderInactive_=function(){IS_ANDROID||IS_IOS||this.removeClass("vjs-slider-active")},t.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(Component);VolumePanel.prototype.options_={children:["muteToggle","volumeControl"]},Component.registerComponent("VolumePanel",VolumePanel);var Menu=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return r&&(i.menuButton_=r.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}return inherits(t,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",bind(this,function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())}))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=createEl(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),on(n,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),n},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;this.focusedChild_!==undefined&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;this.focusedChild_!==undefined&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(Component);Component.registerComponent("Menu",Menu);var MenuButton=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));i.menuButton_=new Button(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var o=Button.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+o,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on("keydown",i.handleSubmenuKeyPress),i}return inherits(t,e),t.prototype.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new Menu(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=createEl("li",{className:"vjs-menu-title",innerHTML:toTitleCase(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),prependTo(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e},t.prototype.createItems=function(){},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},t.prototype.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Button.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},t.prototype.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},t.prototype.controlText=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},t.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",bind(this,function(e){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.focus=function(){this.menuButton_.focus()},t.prototype.blur=function(){this.menuButton_.blur()},t.prototype.handleFocus=function(){on(document_1,"keydown",bind(this,this.handleKeyPress))},t.prototype.handleBlur=function(){off(document_1,"keydown",bind(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},t.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),IS_IOS&&isInFrame())return;this.menu.focus()}},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(Component);Component.registerComponent("MenuButton",MenuButton);var TrackButton=function(e){function t(n,r){classCallCheck(this,t);var i=r.tracks,o=possibleConstructorReturn(this,e.call(this,n,r));if(o.items.length<=1&&o.hide(),!i)return possibleConstructorReturn(o);var a=bind(o,o.update);return i.addEventListener("removetrack",a),i.addEventListener("addtrack",a),o.player_.on("ready",a),o.player_.on("dispose",function(){i.removeEventListener("removetrack",a),i.removeEventListener("addtrack",a)}),o}return inherits(t,e),t}(MenuButton);Component.registerComponent("TrackButton",TrackButton);var MenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.selectable=r.selectable,i.selected(r.selected),i.selectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitem"),i}return inherits(t,e),t.prototype.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",assign({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),
|
|
6
6
|
this.el_.setAttribute("aria-checked","false"),this.controlText("")))},t}(ClickableComponent);Component.registerComponent("MenuItem",MenuItem);var TextTrackMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=r.track,o=n.textTracks();r.label=i.label||i.language||"Unknown",r.selected="showing"===i.mode;var a=possibleConstructorReturn(this,e.call(this,n,r));a.track=i;var s=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];a.handleTracksChange.apply(a,t)},c=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];a.handleSelectedLanguageChange.apply(a,t)};if(n.on(["loadstart","texttrackchange"],s),o.addEventListener("change",s),o.addEventListener("selectedlanguagechange",c),a.on("dispose",function(){n.off(["loadstart","texttrackchange"],s),o.removeEventListener("change",s),o.removeEventListener("selectedlanguagechange",c)}),o.onchange===undefined){var l=void 0;a.on(["tap","click"],function(){if("object"!==_typeof(window_1.Event))try{l=new window_1.Event("change")}catch(e){}l||(l=document_1.createEvent("Event"),l.initEvent("change",!0,!0)),o.dispatchEvent(l)})}return a.handleTracksChange(),a}return inherits(t,e),t.prototype.handleClick=function(t){var n=this.track.kind,r=this.track.kinds,i=this.player_.textTracks();if(r||(r=[n]),e.prototype.handleClick.call(this,t),i)for(var o=0;o<i.length;o++){var a=i[o];a===this.track&&r.indexOf(a.kind)>-1?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled")}},t.prototype.handleTracksChange=function(e){this.selected("showing"===this.track.mode)},t.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.prototype.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(MenuItem);Component.registerComponent("TextTrackMenuItem",TextTrackMenuItem);var OffTextTrackMenuItem=function(e){function t(n,r){return classCallCheck(this,t),r.track={player:n,kind:r.kind,kinds:r.kinds,"default":!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0,possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}this.selected(n)},t.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(TextTrackMenuItem);Component.registerComponent("OffTextTrackMenuItem",OffTextTrackMenuItem);var TextTrackButton=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return classCallCheck(this,t),r.tracks=n.textTracks(),possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.createItems=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:TextTrackMenuItem,n=void 0;this.label_&&(n=this.label_+" off"),e.push(new OffTextTrackMenuItem(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new t(this.player_,{track:o,selectable:!0});a.addClass("vjs-"+o.kind+"-menu-item"),e.push(a)}}return e},t}(TrackButton);Component.registerComponent("TextTrackButton",TextTrackButton);var ChaptersTrackMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=r.track,o=r.cue,a=n.currentTime();r.selectable=!0,r.label=o.text,r.selected=o.startTime<=a&&a<o.endTime;var s=possibleConstructorReturn(this,e.call(this,n,r));return s.track=i,s.cue=o,i.addEventListener("cuechange",bind(s,s.update)),s}return inherits(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.prototype.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(MenuItem);Component.registerComponent("ChaptersTrackMenuItem",ChaptersTrackMenuItem);var ChaptersButton=function(e){function t(n,r,i){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r,i))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},t.prototype.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},t.prototype.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(toTitleCase(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new ChaptersTrackMenuItem(this.player_,{track:this.track_,cue:i});e.push(o)}return e},t}(TextTrackButton);ChaptersButton.prototype.kind_="chapters",ChaptersButton.prototype.controlText_="Chapters",Component.registerComponent("ChaptersButton",ChaptersButton);var DescriptionsButton=function(e){function t(n,r,i){classCallCheck(this,t);var o=possibleConstructorReturn(this,e.call(this,n,r,i)),a=n.textTracks(),s=bind(o,o.handleTracksChange);return a.addEventListener("change",s),o.on("dispose",function(){a.removeEventListener("change",s)}),o}return inherits(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var o=t[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},t.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(TextTrackButton);DescriptionsButton.prototype.kind_="descriptions",DescriptionsButton.prototype.controlText_="Descriptions",Component.registerComponent("DescriptionsButton",DescriptionsButton);var SubtitlesButton=function(e){function t(n,r,i){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r,i))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(TextTrackButton);SubtitlesButton.prototype.kind_="subtitles",SubtitlesButton.prototype.controlText_="Subtitles",Component.registerComponent("SubtitlesButton",SubtitlesButton);var CaptionSettingsMenuItem=function(e){function t(n,r){classCallCheck(this,t),r.track={player:n,kind:r.kind,label:r.kind+" settings",selectable:!1,"default":!1,mode:"disabled"},r.selectable=!1,r.name="CaptionSettingsMenuItem";var i=possibleConstructorReturn(this,e.call(this,n,r));return i.addClass("vjs-texttrack-settings"),i.controlText(", opens "+r.kind+" settings dialog"),i}return inherits(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(TextTrackMenuItem);Component.registerComponent("CaptionSettingsMenuItem",CaptionSettingsMenuItem);var CaptionsButton=function(e){function t(n,r,i){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r,i))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(t.push(new CaptionSettingsMenuItem(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(TextTrackButton);CaptionsButton.prototype.kind_="captions",CaptionsButton.prototype.controlText_="Captions",Component.registerComponent("CaptionsButton",CaptionsButton);var SubsCapsMenuItem=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,assign({innerHTML:i},n),r)},t}(TextTrackMenuItem);Component.registerComponent("SubsCapsMenuItem",SubsCapsMenuItem);var SubsCapsButton=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(toTitleCase(i.label_)),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(t.push(new CaptionSettingsMenuItem(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,SubsCapsMenuItem)},t}(TextTrackButton);SubsCapsButton.prototype.kinds_=["captions","subtitles"],SubsCapsButton.prototype.controlText_="Subtitles",Component.registerComponent("SubsCapsButton",SubsCapsButton);var AudioTrackMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=r.track,o=n.audioTracks();r.label=i.label||i.language||"Unknown",r.selected=i.enabled;var a=possibleConstructorReturn(this,e.call(this,n,r));a.track=i;var s=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];a.handleTracksChange.apply(a,t)};return a.changeHandler=s,o.addEventListener("change",s),o.addEventListener("enabledchange",s),a.on("dispose",function(){o.removeEventListener("change",s),o.removeEventListener("enabledchange",s)}),a}return inherits(t,e),t.prototype.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t),this.player_.tech_.hlsProvider.hls.audioTrack=this.track.id;for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},t.prototype.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(MenuItem);Component.registerComponent("AudioTrackMenuItem",AudioTrackMenuItem);var AudioTrackButton=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return classCallCheck(this,t),r.tracks=n.audioTracks(),possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new AudioTrackMenuItem(this.player_,{track:r,selectable:!0}))}return e},t}(TrackButton);AudioTrackButton.prototype.controlText_="Audio Track",Component.registerComponent("AudioTrackButton",AudioTrackButton);var PlaybackRateMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=r.rate,o=parseFloat(i,10);r.label=i,r.selected=1===o,r.selectable=!0;var a=possibleConstructorReturn(this,e.call(this,n,r));return a.label=i,a.rate=o,a.on(n,"ratechange",a.update),a}return inherits(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.prototype.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(MenuItem);PlaybackRateMenuItem.prototype.contentElType="button",Component.registerComponent("PlaybackRateMenuItem",PlaybackRateMenuItem);var PlaybackRateMenuButton=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.updateVisibility(),i.updateLabel(),i.on(n,"loadstart",i.updateVisibility),i.on(n,"ratechange",i.updateLabel),i}return inherits(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},t.prototype.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createMenu=function(){var e=new Menu(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new PlaybackRateMenuItem(this.player(),{rate:t[n]+"x"}));return e},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(e){var t=this.player().playbackRate();if(1.1===t)return!1;this.playbackRateSupported()&&(this.labelEl_.innerHTML=t+"x")},t}(MenuButton);PlaybackRateMenuButton.prototype.controlText_="Playback Rate",Component.registerComponent("PlaybackRateMenuButton",PlaybackRateMenuButton);var Spacer=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(Component);Component.registerComponent("Spacer",Spacer);var CustomControlSpacer=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Spacer);Component.registerComponent("CustomControlSpacer",CustomControlSpacer);var ControlBar=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},t}(Component);if(ControlBar.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","audioTrackButton","fullscreenToggle"]},IS_ENABLED_MSE&&!IS_SAFARI){var controlChildren=ControlBar.prototype.options_.children;controlChildren.splice(controlChildren.length-2,0,"subsCapsButton")}Component.registerComponent("ControlBar",ControlBar);var ErrorDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"error",i.open),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(ModalDialog);ErrorDisplay.prototype.options_=mergeOptions(ModalDialog.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Component.registerComponent("ErrorDisplay",ErrorDisplay);var LOCAL_STORAGE_KEY="vjs-text-track-settings",COLOR_BLACK=["#000","Black"],COLOR_BLUE=["#00F","Blue"],COLOR_CYAN=["#0FF","Cyan"],COLOR_GREEN=["#0F0","Green"],COLOR_MAGENTA=["#F0F","Magenta"],COLOR_RED=["#F00","Red"],COLOR_WHITE=["#FFF","White"],COLOR_YELLOW=["#FF0","Yellow"],OPACITY_OPAQUE=["1","Opaque"],OPACITY_SEMI=["0.5","Semi-Transparent"],OPACITY_TRANS=["0","Transparent"],selectConfigs={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[COLOR_BLACK,COLOR_WHITE,COLOR_RED,COLOR_GREEN,COLOR_BLUE,COLOR_YELLOW,COLOR_MAGENTA,COLOR_CYAN]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[OPACITY_OPAQUE,OPACITY_SEMI,OPACITY_TRANS]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[COLOR_WHITE,COLOR_BLACK,COLOR_RED,COLOR_GREEN,COLOR_BLUE,COLOR_YELLOW,COLOR_MAGENTA,COLOR_CYAN]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],"default":2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[OPACITY_OPAQUE,OPACITY_SEMI]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[OPACITY_TRANS,OPACITY_SEMI,OPACITY_OPAQUE]}};selectConfigs.windowColor.options=selectConfigs.backgroundColor.options;var TextTrackSettings=function(e){function t(n,r){classCallCheck(this,t),r.temporary=!1;var i=possibleConstructorReturn(this,e.call(this,n,r));return i.updateDisplay=bind(i,i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=createEl("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),r.persistTextTrackSettings===undefined&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),each(selectConfigs,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}return inherits(t,e),t.prototype.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},t.prototype.createElSelect_=function(e){var t=this,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"",r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"label",i=selectConfigs[e],o=i.id.replace("%s",this.id_);return["<"+r+' id="'+o+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(i.label),"</"+r+">",'<select aria-labelledby="'+(""!==n?n+" ":"")+o+'">'].concat(i.options.map(function(e){var r=o+"-"+e[1];return['<option id="'+r+'" value="'+e[0]+'" ','aria-labelledby="'+(""!==n?n+" ":"")+o+" "+r+'">',t.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")},t.prototype.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElColors_=function(){return createEl("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.prototype.createElFont_=function(){return createEl("div",{className:'vjs-track-settings-font">',innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},t.prototype.createElControls_=function(){var e=this.localize("restore all settings to the default values");return createEl("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},t.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.prototype.label=function(){return this.localize("Caption Settings Dialog")},t.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.prototype.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.prototype.getValues=function(){var e=this;return reduce(selectConfigs,function(t,n,r){var i=getSelectedOptionValue(e.$(n.selector),n.parser);return i!==undefined&&(t[r]=i),t},{})},t.prototype.setValues=function(e){var t=this;each(selectConfigs,function(n,r){setSelectedOption(t.$(n.selector),e[r],n.parser)})},t.prototype.setDefaults=function(){var e=this;each(selectConfigs,function(t){var n=t.hasOwnProperty("default")?t["default"]:0;e.$(t.selector).selectedIndex=n})},t.prototype.restoreSettings=function(){var e=void 0;try{e=JSON.parse(window_1.localStorage.getItem(LOCAL_STORAGE_KEY))}catch(t){log$2.warn(t)}e&&this.setValues(e)},t.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?window_1.localStorage.setItem(LOCAL_STORAGE_KEY,JSON.stringify(e)):window_1.localStorage.removeItem(LOCAL_STORAGE_KEY)}catch(t){log$2.warn(t)}}},t.prototype.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(document_1,"keydown",this.handleKeyDown);var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(ModalDialog);Component.registerComponent("TextTrackSettings",TextTrackSettings);var _templateObject$2=taggedTemplateLiteralLoose(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]),Html5=function(e){function t(n,r,i){classCallCheck(this,t);var o=possibleConstructorReturn(this,e.call(this,n,r,i)),a=r.source,s=!1;if(a&&(o.el_.currentSrc!==a.src||r.tag&&3===r.tag.initNetworkState_)?o.setSource(a):o.handleLateInit_(o.el_),o.el_.hasChildNodes()){for(var c=o.el_.childNodes,l=c.length,u=[];l--;){var d=c[l];"track"===d.nodeName.toLowerCase()&&(o.featuresNativeTextTracks?(o.remoteTextTrackEls().addTrackElement_(d),o.remoteTextTracks().addTrack(d.track),o.textTracks().addTrack(d.track),s||o.el_.hasAttribute("crossorigin")||!isCrossOrigin(d.src)||(s=!0)):u.push(d))}for(var p=0;p<u.length;p++)o.el_.removeChild(u[p])}return o.proxyNativeTracks_(),o.featuresNativeTextTracks&&s&&log$2.warn(tsml(_templateObject$2)),o.restoreMetadataTracksInIOSNativePlayer_(),(TOUCH_ENABLED||IS_IPHONE||IS_NATIVE_ANDROID)&&!0===r.nativeControlsForTouch&&o.setControls(!0),o.proxyWebkitFullscreen_(),o.triggerReady(),o}return inherits(t,e),t.prototype.dispose=function(){t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},t.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var e=this.textTracks(),t=void 0,n=function(){t=[];for(var n=0;n<e.length;n++){var r=e[n];"metadata"===r.kind&&t.push({track:r,storedMode:r.mode})}};n(),e.addEventListener("change",n),this.on("dispose",function(){return e.removeEventListener("change",n)});var r=function i(){for(var n=0;n<t.length;n++){var r=t[n];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}e.removeEventListener("change",i)};this.on("webkitbeginfullscreen",function(){e.removeEventListener("change",n),e.removeEventListener("change",r),e.addEventListener("change",r)}),this.on("webkitendfullscreen",function(){e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",r)})},t.prototype.proxyNativeTracks_=function(){var e=this;NORMAL.names.forEach(function(t){var n=NORMAL[t],r=e.el()[n.getterName],i=e[n.getterName]();if(e["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var o={change:function(e){i.trigger({type:"change",target:i,currentTarget:i,srcElement:i})},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},a=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};Object.keys(o).forEach(function(t){var n=o[t];r.addEventListener(t,n),e.on("dispose",function(e){return r.removeEventListener(t,n)})}),e.on("loadstart",a),e.on("dispose",function(t){return e.off("loadstart",a)})}})},t.prototype.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=document_1.createElement("video");var r=this.options_.tag&&getAttributes(this.options_.tag),i=mergeOptions({},r);TOUCH_ENABLED&&!0===this.options_.nativeControlsForTouch||delete i.controls,setAttributes(e,assign(i,{id:this.options_.techId,"class":"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!=typeof this.options_.preload&&setAttribute(e,"preload",this.options_.preload);for(var o=["loop","muted","playsinline","autoplay"],a=0;a<o.length;a++){var s=o[a],c=this.options_[s];void 0!==c&&(c?setAttribute(e,s,s):removeAttribute(e,s),e[s]=c)}return e},t.prototype.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")})}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(e){this.trigger(e)},this)})}},t.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(t){log$2(t,"Video is not ready. (Video.js)")}},t.prototype.duration=function(){var e=this;if(this.el_.duration===Infinity&&IS_ANDROID&&IS_CHROME&&0===this.el_.currentTime){var t=function n(){e.el_.currentTime>0&&(e.el_.duration===Infinity&&e.trigger("durationchange"),e.off("timeupdate",n))};return this.on("timeupdate",t),NaN}return this.el_.duration||NaN},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)})}},t.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=window_1.navigator&&window_1.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){e.pause(),e.webkitEnterFullScreen()},0)):e.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(e){if(e===undefined)return this.el_.src;this.setSrc(e)},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.setControls=function(e){this.el_.controls=!!e},t.prototype.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},t.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=document_1.createElement("track")
|
|
7
|
-
;return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t["default"]&&(n["default"]=t["default"]),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},t.prototype.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},t.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),window_1.performance&&"function"==typeof window_1.performance.now?e.creationTime=window_1.performance.now():window_1.performance&&window_1.performance.timing&&"number"==typeof window_1.performance.timing.navigationStart&&(e.creationTime=window_1.Date.now()-window_1.performance.timing.navigationStart),e},t}(Tech);if(isReal()){Html5.TEST_VID=document_1.createElement("video");var track=document_1.createElement("track");track.kind="captions",track.srclang="en",track.label="English",Html5.TEST_VID.appendChild(track)}Html5.isSupported=function(){try{Html5.TEST_VID.volume=.5}catch(e){return!1}return!(!Html5.TEST_VID||!Html5.TEST_VID.canPlayType)},Html5.canPlayType=function(e){return Html5.TEST_VID.canPlayType(e)},Html5.canPlaySource=function(e,t){return Html5.canPlayType(e.type)},Html5.canControlVolume=function(){try{var e=Html5.TEST_VID.volume;return Html5.TEST_VID.volume=e/2+.1,e!==Html5.TEST_VID.volume}catch(t){return!1}},Html5.canControlMute=function(){try{var e=Html5.TEST_VID.muted;return Html5.TEST_VID.muted=!0,e!==Html5.TEST_VID.muted}catch(t){return!1}},Html5.canControlPlaybackRate=function(){if(IS_ANDROID&&IS_CHROME&&CHROME_VERSION<58)return!1;try{var e=Html5.TEST_VID.playbackRate;return Html5.TEST_VID.playbackRate=e/2+.1,e!==Html5.TEST_VID.playbackRate}catch(t){return!1}},Html5.supportsNativeTextTracks=function(){return IS_ANY_SAFARI},Html5.supportsNativeVideoTracks=function(){return!(!Html5.TEST_VID||!Html5.TEST_VID.videoTracks)},Html5.supportsNativeAudioTracks=function(){return!(!Html5.TEST_VID||!Html5.TEST_VID.audioTracks)},Html5.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Html5.prototype.featuresVolumeControl=Html5.canControlVolume(),Html5.prototype.featuresMuteControl=Html5.canControlMute(),Html5.prototype.featuresPlaybackRate=Html5.canControlPlaybackRate(),Html5.prototype.movingMediaElementInDOM=!IS_IOS,Html5.prototype.featuresFullscreenResize=!0,Html5.prototype.featuresProgressEvents=!0,Html5.prototype.featuresTimeupdateEvents=!0,Html5.prototype.featuresNativeTextTracks=Html5.supportsNativeTextTracks(),Html5.prototype.featuresNativeVideoTracks=Html5.supportsNativeVideoTracks(),Html5.prototype.featuresNativeAudioTracks=Html5.supportsNativeAudioTracks();var canPlayType=Html5.TEST_VID&&Html5.TEST_VID.constructor.prototype.canPlayType,mpegurlRE=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,mp4RE=/^video\/mp4/i;Html5.patchCanPlayType=function(){ANDROID_VERSION>=4&&!IS_FIREFOX?Html5.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&mpegurlRE.test(e)?"maybe":canPlayType.call(this,e)}:IS_OLD_ANDROID&&(Html5.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&mp4RE.test(e)?"maybe":canPlayType.call(this,e)})},Html5.unpatchCanPlayType=function(){var e=Html5.TEST_VID.constructor.prototype.canPlayType;return Html5.TEST_VID.constructor.prototype.canPlayType=canPlayType,e},Html5.patchCanPlayType(),Html5.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(t){}}()}},Html5.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){Html5.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){Html5.prototype["set"+toTitleCase(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(e){Html5.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){Html5.prototype["set"+toTitleCase(e)]=function(t){this.el_[e]=t}}),["pause","load","play"].forEach(function(e){Html5.prototype[e]=function(){return this.el_[e]()}}),Tech.withSourceHandlers(Html5),Html5.nativeSourceHandler={},Html5.nativeSourceHandler.canPlayType=function(e){setTimeout(function(){},2e3);try{return Html5.TEST_VID.canPlayType(e)}catch(t){return""}},Html5.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Html5.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=getFileExtension(e.src);return Html5.nativeSourceHandler.canPlayType("video/"+n)}return""},Html5.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Html5.nativeSourceHandler.dispose=function(){},Html5.registerSourceHandler(Html5.nativeSourceHandler),Tech.registerTech("Html5",Html5);var _templateObject$1=taggedTemplateLiteralLoose(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),TECH_EVENTS_RETRIGGER=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","resize","volumechange","texttrackchange"],Player=function(e){function t(n,r,i){if(classCallCheck(this,t),n.id=n.id||"vjs_video_"+newGUID(),r=assign(t.getTagSettings(n),r),r.initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(r.language=o.getAttribute("lang"))}else for(var a=n;a&&1===a.nodeType;){if(getAttributes(a).hasOwnProperty("lang")){r.language=a.getAttribute("lang");break}a=a.parentNode}var s=possibleConstructorReturn(this,e.call(this,null,r,i));if(s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&getAttributes(n),s.language(s.options_.language),r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach(function(e){c[e.toLowerCase()]=r.languages[e]}),s.languages_=c}else s.languages_=t.prototype.options_.languages;s.cache_={},s.poster_=r.poster||"",s.controls_=!!r.controls,s.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),s.scrubbing_=!1,s.el_=s.createEl(),evented(s,{eventBusKey:"el_"});var l=mergeOptions(s.options_);if(r.plugins){var u=r.plugins;Object.keys(u).forEach(function(e){if("function"!=typeof this[e])throw new Error('plugin "'+e+'" does not exist');this[e](u[e])},s)}return s.options_.playerOptions=l,s.middleware_=[],s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),IS_IOS||IS_ANDROID||s.addClass("vjs-workinghover"),t.players[s.id_]=s,s.userActive(!0),s.reportUserActivity(),s.listenForUserActivity_(),s.on("fullscreenchange",s.handleFullscreenChange_),s.on("stageclick",s.handleStageClick_),s.changingSrc_=!1,s.playWaitingForReady_=!1,s.playOnLoadstart_=null,s.forceAutoplayInChrome_(),s}return inherits(t,e),t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&this.tech_.dispose(),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,n=void 0,r=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=t.parentNode:i||(n=this.el_=e.prototype.createEl.call(this,"div"));var o=getAttributes(t);if(i){for(n=this.el_=t,t=this.tag=document_1.createElement("video");n.children.length;)t.appendChild(n.firstChild);hasClass(n,"video-js")||addClass(n,"video-js"),n.appendChild(t),r=this.playerElIngest_=n}if(t.setAttribute("tabindex","-1"),t.removeAttribute("width"),t.removeAttribute("height"),Object.getOwnPropertyNames(o).forEach(function(e){"class"===e?(n.className+=" "+o[e],i&&(t.className+=" "+o[e])):(n.setAttribute(e,o[e]),i&&t.setAttribute(e,o[e]))}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=n.player=this,this.addClass("vjs-paused"),!0!==window_1.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=createStyleElement("vjs-styles-dimensions");var a=$(".vjs-styles-defaults"),s=$("head");s.insertBefore(this.styleEl_,a?a.nextSibling:s.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var c=t.getElementsByTagName("a"),l=0;l<c.length;l++){var u=c.item(l);addClass(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}t.initNetworkState_=t.networkState,t.parentNode&&!r&&t.parentNode.insertBefore(n,t),prependTo(t,n),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_);var d=document_1.createElement("div");return addClass(d,"safe-check-element"),n.appendChild(d),this.el_=n,n},t.prototype.width=function(e,t){return this.dimension("width",e,t)},t.prototype.height=function(e,t){return this.dimension("height",e,t)},t.prototype.dimension=function(e,t,n){var r=e+"_";if(t===undefined)return this[r]||0;if(""===t)return this[r]=undefined,void this.updateStyleEl_();var i=parseFloat(t);if(isNaN(i))return void log$2.error('Improper value "'+t+'" supplied for for '+e);this[r]=i,this.updateStyleEl_(),this.isReady_&&!n&&this.trigger("playerresize")},t.prototype.fluid=function(e){if(e===undefined)return!!this.fluid_;this.fluid_=!!e,e?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},t.prototype.aspectRatio=function(e){if(e===undefined)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},t.prototype.updateStyleEl_=function(){if(!0===window_1.VIDEOJS_NO_DYNAMIC_STYLE){var e="number"==typeof this.width_?this.width_:this.options_.width,t="number"==typeof this.height_?this.height_:this.options_.height,n=this.tech_&&this.tech_.el();return void(n&&(e>=0&&(n.width=e),t>=0&&(n.height=t)))}var r=void 0,i=void 0,o=void 0,a=void 0;o=this.aspectRatio_!==undefined&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var s=o.split(":"),c=s[1]/s[0];r=this.width_!==undefined?this.width_:this.height_!==undefined?this.height_/c:this.videoWidth()||300,i=this.height_!==undefined?this.height_:r*c,a=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(a),setTextContent(this.styleEl_,"\n ."+a+" {\n width: "+r+"px;\n height: "+i+"px;\n }\n\n ."+a+".vjs-fluid {\n padding-top: "+100*c+"%;\n }\n ")},t.prototype.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=toTitleCase(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(Tech.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:t,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",autoplay:this.options_.autoplay,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],swf:this.options_.swf,hlsConfig:this.options_.hlsConfig,dashConfig:this.options_.dashConfig,flvConfig:this.options_.flvConfig,webrtcConfig:this.options_.webrtcConfig,xp2pConfig:this.options_.xp2pConfig};ALL.names.forEach(function(e){var t=ALL[e];o[t.getterName]=n[t.privateName]}),assign(o,this.options_[r]),assign(o,this.options_[i]),assign(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var a=Tech.getTech(e);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(this,o),this.tech_.ready(bind(this,this.handleTechReady_),!0),textTrackConverter.jsonToTextTracks(this.textTracksJson_||[],this.tech_),TECH_EVENTS_RETRIGGER.forEach(function(e){n.on(n.tech_,e,n["handleTech"+toTitleCase(e)+"_"])}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"x5videoexitfullscreen",this.handleX5ExitFullscreen_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||prependTo(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){var e=this;ALL.names.forEach(function(t){var n=ALL[t];e[n.privateName]=e[n.getterName]()}),this.textTracksJson_=textTrackConverter.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},t.prototype.tech=function(e){return e===undefined&&log$2.warn(tsml(_templateObject$1)),this.tech_},t.prototype.addTechControlsListeners_=function(){this.tech_&&(this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_))},t.prototype.removeTechControlsListeners_=function(){this.tech_&&(this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_))},t.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(e){log$2("deleting tag.poster throws in some browsers",e)}},t.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},t.prototype.hasStarted=function(e){if(e===undefined)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},t.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return e.removeClass("vjs-waiting")})},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(log$2.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){isSingleLeftClick(e)&&this.controls_&&(this.paused()?this.play():this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){IS_IOS||(this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen"))},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.toggleFullscreenClass_=function(){IS_IOS||(this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen"))},t.prototype.documentFullscreenChange_=function(e){var t=FullscreenApi;this.isFullscreen(document_1[t.fullscreenElement]),!1===this.isFullscreen()&&off(document_1,t.fullscreenchange,bind(this,this.documentFullscreenChange_)),prefixedAPI||this.trigger("fullscreenchange")},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.handleX5ExitFullscreen_=function(){this.removeClass("vjs-fullscreen"),this.isFullscreen_=!this.isFullscreen_},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){this.ready(function(){if(e in allowedSetters)return set$1(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(n){throw log$2(n),n}},!0)},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in allowedGetters)return get$1(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(this.tech_[e]===undefined)throw log$2("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw log$2("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw log$2(t),t}}},t.prototype.play=function(){var e=this;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return this.techGet_("play");this.playOnLoadstart_=function(){e.playOnLoadstart_=null,silencePromise(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready(function(){e.playWaitingForReady_=!1,silencePromise(e.play())})}},t.prototype.pause=function(){this.techCall_("pause")},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.played=function(){return this.techGet_("played")||createTimeRanges(0,0)},t.prototype.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.prototype.currentTime=function(e){if(void 0!==e)return e<0&&(e=0),void this.techCall_("setCurrentTime",e);try{return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime}catch(t){return 0}},t.prototype.duration=function(e){if(e===undefined)return this.cache_.duration!==undefined?this.cache_.duration:NaN;e=parseFloat(e),e<=0&&(e=Infinity),e!==this.cache_.duration&&(this.cache_.duration=e,e===Infinity?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=createTimeRanges(0,0)),e},t.prototype.bufferedPercent=function(){return bufferedPercent(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},t.prototype.volume=function(e){var t=void 0;return e!==undefined?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){return e!==undefined?void this.techCall_("setMuted",e):this.techGet_("muted")||!1},t.prototype.defaultMuted=function(e){return e!==undefined?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.prototype.lastVolume_=function(e){return e!==undefined&&0!==e?void(this.cache_.lastVolume=e):this.cache_.lastVolume},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){return e!==undefined?(this.isFullscreen_=!!e,void this.toggleFullscreenClass_()):!!this.isFullscreen_},t.prototype.requestFullscreen=function(){var e=FullscreenApi;if(this.isFullscreen(!0),this.options_.fakeFullscreen){var t=this;return IS_IOS?(t.el_.style.width="100vw",t.el_.style.height="100vh",this.trigger("fullscreenchange")):(this.enterFullWindow(),this.trigger("fullscreenchange")),!1}e.requestFullscreen?(on(document_1,e.fullscreenchange,bind(this,this.documentFullscreenChange_)),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.prototype.exitFullscreen=function(){var e=FullscreenApi;if(this.isFullscreen(!1),this.options_.fakeFullscreen)return IS_IOS?(this.el_.removeAttribute("style"),this.trigger("fullscreenchange")):(this.exitFullWindow(),this.trigger("fullscreenchange")),!1;e.requestFullscreen?document_1[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=document_1.documentElement.style.overflow,on(document_1,"keydown",bind(this,this.fullWindowOnEscKey)),document_1.documentElement.style.overflow="hidden",addClass(document_1.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,off(document_1,"keydown",this.fullWindowOnEscKey),document_1.documentElement.style.overflow=this.docOrigOverflow,removeClass(document_1.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=Tech.getTech(i);if(o||(o=Component.getComponent(i)),o){if(o.isSupported()&&(t=o.canPlayType(e)))return t}else log$2.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},t.prototype.selectSource=function(e){var t=this,n=this.options_.techOrder.map(function(e){return[e,Tech.getTech(e)]}).filter(function(e){var t=e[0],n=e[1];return n?n.isSupported():(log$2.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),r=function(e,t,n){var r=void 0;return e.some(function(e){return t.some(function(t){if(r=n(e,t))return!0})}),r},i=function(e,n){var r=e[0];if(e[1].canPlaySource(n,t.options_[r.toLowerCase()]))return{source:n,tech:r}};return(this.options_.sourceOrder?r(e,n,function(e){return function(t,n){return e(n,t)}}(i)):r(n,e,i))||!1},t.prototype.src=function(e){var t=this;if(void 0===e)return this.cache_.src||this.techGet_("src");var n=filterSource(e);if(!n.length)return void this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);if(this.options_&&this.options_.hlsConfig&&this.options_.hlsConfig.skip&&n.map(function(e){e.skipHlsJs=!0}),this.cache_.source&&isWebrtcUrl(this.cache_.source.src)&&isWebrtcUrl(n[0].src)&&this.cache_.source.src!==n[0].src){var r=this.tech_.webrtcProvider;if(r&&r.webrtcPlayer&&r.webrtcPlayer.switchStream)return this.tech_.webrtcProvider.webrtcPlayer.switchStream(n[0].src),this.cache_.sources=n,this.cache_.source=n[0],!1}this.cache_.sources=n,this.changingSrc_=!0,this.cache_.source=n[0];try{this.cache_.source&&!isWebrtcUrl(this.cache_.source.src)&&this.options_.autoplay&&setTimeout(function(){var e=t.play&&t.play();isPromise(e)&&e.then()["catch"](function(){t.trigger("blocked")})},1e3)}catch(i){}setSource(this,n[0],function(e,r){if(t.middleware_=r,t.src_(e)){if(n.length>1){var i=n.slice(1),o=i[0].qualityLabelList;return o&&t.QualitySwitcher().setOptions({qualityLabelList:{video:o.slice(1)}}),t.src(i)}return t.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void t.triggerReady()}t.changingSrc_=!1,t.cache_.src=e.src,setTech(r,t.tech_)})},t.prototype.src_=function(e){var t=this.selectSource([e]);return!t||(window_1.performance&&"function"==typeof window_1.performance.mark&&window_1.performance.mark("firstFrameStart"),titleCaseEquals(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),"auto"===this.options_.preload&&this.load()},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),!1))},t.prototype.load=function(){this.techCall_("load")},t.prototype.reset=function(){this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},t.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},t.prototype.currentSource=function(){return this.cache_.source||{}},t.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.prototype.preload=function(e){return e!==undefined?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.prototype.autoplay=function(e){return e!==undefined?(this.techCall_("setAutoplay",e),this.options_.autoplay=e,void this.ready(this.forceAutoplayInChrome_)):this.techGet_("autoplay",e)},t.prototype.forceAutoplayInChrome_=function(){this.paused()&&(this.autoplay()||this.options_.autoplay)&&IS_CHROME&&!IS_ANDROID&&this.play()},t.prototype.playsinline=function(e){return e!==undefined?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.prototype.loop=function(e){return e!==undefined?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.prototype.poster=function(e){if(e===undefined)return this.poster_;e||(e=""),this.poster_=e,this.trigger("posterchange")},t.prototype.handleTechPosterChange_=function(){!this.poster_&&this.tech_&&this.tech_.poster&&(this.poster_=this.tech_.poster()||"",this.trigger("posterchange"))},t.prototype.controls=function(e){if(e===undefined)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.prototype.usingNativeControls=function(e){if(e===undefined)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.prototype.error=function(e){return e===undefined?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new MediaError(e),this.addClass("vjs-error"),log$2.error("(CODE:"+this.error_.code+" "+MediaError.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger({type:"error",data:this.error_}))},t.prototype.reportUserActivity=function(e){this.userActivity_=!0},t.prototype.userActive=function(e){if(e===undefined)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.prototype.listenForUserActivity_=function(){var e=void 0,t=void 0,n=void 0,r=bind(this,this.reportUserActivity),i=function(e){
|
|
8
|
-
e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())},o=function(){r(),this.clearInterval(e),e=this.setInterval(r,250)},a=function(t){r(),this.clearInterval(e)};this.on("mousedown",o),this.on("mousemove",i),this.on("mouseup",a),this.on("keydown",r),this.on("keyup",r);var s=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(s);var e=this.options_.inactivityTimeout;e<=0||(s=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},t.prototype.playbackRate=function(e){return e!==undefined?void this.techCall_("setPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},t.prototype.defaultPlaybackRate=function(e){return e!==undefined?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.prototype.isAudio=function(e){return e!==undefined?void(this.isAudio_=!!e):!!this.isAudio_},t.prototype.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=e.track,n=t===undefined?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},t.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){if(e===undefined)return this.language_;this.language_=String(e).toLowerCase()},t.prototype.languages=function(){return mergeOptions(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=mergeOptions(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];r=mergeOptions(r),r.player=undefined,e.tracks[n]=r}return e},t.prototype.createModal=function(e,t){var n=this;t=t||{},t.content=e||"";var r=new ModalDialog(this,t);return this.addChild(r),r.on("dispose",function(){n.removeChild(r)}),r.open(),r},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=getAttributes(e),r=n["data-setup"];if(hasClass(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=tuple(r||"{}"),o=i[0],a=i[1];o&&log$2.error(o),assign(n,a)}if(assign(t,n),e.hasChildNodes())for(var s=e.childNodes,c=0,l=s.length;c<l;c++){var u=s[c],d=u.nodeName.toLowerCase();"source"===d?t.sources.push(getAttributes(u)):"track"===d&&t.tracks.push(getAttributes(u))}return t},t.prototype.flexNotSupported_=function(){var e=document_1.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},t}(Component);ALL.names.forEach(function(e){var t=ALL[e];Player.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),Player.players={};var navigator$1=window_1.navigator;Player.prototype.options_={techOrder:Tech.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings","videoStatisticPanel"],language:navigator$1&&(navigator$1.languages&&navigator$1.languages[0]||navigator$1.userLanguage||navigator$1.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach(function(e){Player.prototype[e]=function(){return this.techGet_(e)}}),TECH_EVENTS_RETRIGGER.forEach(function(e){Player.prototype["handleTech"+toTitleCase(e)+"_"]=function(){return this.trigger(e)}}),Component.registerComponent("Player",Player);var BASE_PLUGIN_NAME="plugin",PLUGIN_CACHE_KEY="activePlugins_",pluginStorage={},pluginExists=function(e){return pluginStorage.hasOwnProperty(e)},getPlugin=function(e){return pluginExists(e)?pluginStorage[e]:undefined},markPluginAsActive=function(e,t){e[PLUGIN_CACHE_KEY]=e[PLUGIN_CACHE_KEY]||{},e[PLUGIN_CACHE_KEY][t]=!0},triggerSetupEvent=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},createBasicPlugin=function(e,t){var n=function(){triggerSetupEvent(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return markPluginAsActive(this,e),triggerSetupEvent(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach(function(e){n[e]=t[e]}),n},createPluginFactory=function(e,t){return t.prototype.name=e,function(){triggerSetupEvent(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=new(Function.prototype.bind.apply(t,[null].concat([this].concat(r))));return this[e]=function(){return o},triggerSetupEvent(this,o.getEventHash()),o}},Plugin=function(){function e(t){if(classCallCheck(this,e),this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,evented(this),delete this.trigger,stateful(this,this.constructor.defaultState),markPluginAsActive(t,this.name),this.dispose=bind(this,this.dispose),t.on("dispose",this.dispose)}return e.prototype.version=function(){return this.constructor.VERSION},e.prototype.getEventHash=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.prototype.trigger=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return trigger(this.eventBusEl_,e,this.getEventHash(t))},e.prototype.handleStateChanged=function(e){},e.prototype.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[PLUGIN_CACHE_KEY][e]=!1,this.player=this.state=null,t[e]=createPluginFactory(e,pluginStorage[e])},e.isBasic=function(t){var n="string"==typeof t?getPlugin(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+(void 0===t?"undefined":_typeof(t))+".");if(pluginExists(t))log$2.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Player.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+(void 0===n?"undefined":_typeof(n))+".");return pluginStorage[t]=n,t!==BASE_PLUGIN_NAME&&(e.isBasic(n)?Player.prototype[t]=createBasicPlugin(t,n):Player.prototype[t]=createPluginFactory(t,n)),n},e.deregisterPlugin=function(e){if(e===BASE_PLUGIN_NAME)throw new Error("Cannot de-register base plugin.");pluginExists(e)&&(delete pluginStorage[e],delete Player.prototype[e])},e.getPlugins=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:Object.keys(pluginStorage),t=void 0;return e.forEach(function(e){var n=getPlugin(e);n&&(t=t||{},t[e]=n)}),t},e.getPluginVersion=function(e){var t=getPlugin(e);return t&&t.VERSION||""},e}();Plugin.getPlugin=getPlugin,Plugin.BASE_PLUGIN_NAME=BASE_PLUGIN_NAME,Plugin.registerPlugin(BASE_PLUGIN_NAME,Plugin),Player.prototype.usingPlugin=function(e){return!!this[PLUGIN_CACHE_KEY]&&!0===this[PLUGIN_CACHE_KEY][e]},Player.prototype.hasPlugin=function(e){return!!pluginExists(e)};var _inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)},extendFn=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=function(){e.apply(this,arguments)},r={};"object"===(void 0===t?"undefined":_typeof(t))?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),_inherits(n,e);for(var i in r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n};if("undefined"==typeof HTMLVideoElement&&isReal()&&(document_1.createElement("video"),document_1.createElement("audio"),document_1.createElement("track"),document_1.createElement("video-js")),videojs.hooks_={},videojs.hooks=function(e,t){return videojs.hooks_[e]=videojs.hooks_[e]||[],t&&(videojs.hooks_[e]=videojs.hooks_[e].concat(t)),videojs.hooks_[e]},videojs.hook=function(e,t){videojs.hooks(e,t)},videojs.hookOnce=function(e,t){videojs.hooks(e,[].concat(t).map(function(t){return function n(){return videojs.removeHook(e,n),t.apply(undefined,arguments)}}))},videojs.removeHook=function(e,t){var n=videojs.hooks(e).indexOf(t);return!(n<=-1)&&(videojs.hooks_[e]=videojs.hooks_[e].slice(),videojs.hooks_[e].splice(n,1),!0)},!0!==window_1.VIDEOJS_NO_DYNAMIC_STYLE&&isReal()){var style=$(".vjs-styles-defaults");if(!style){style=createStyleElement("vjs-styles-defaults");var head=$("head");head&&head.insertBefore(style,head.firstChild),setTextContent(style,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}autoSetupTimeout(1,videojs),videojs.VERSION=version,videojs.options=Player.prototype.options_,videojs.getPlayers=function(){return Player.players},videojs.players=Player.players,videojs.getComponent=Component.getComponent,videojs.registerComponent=function(e,t){Tech.isTech(t)&&log$2.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Component.registerComponent.call(Component,e,t)},videojs.getTech=Tech.getTech,videojs.registerTech=Tech.registerTech,videojs.use=use,videojs.browser=browser,videojs.TOUCH_ENABLED=TOUCH_ENABLED,videojs.extend=extendFn,videojs.mergeOptions=mergeOptions,videojs.bind=bind,videojs.registerPlugin=Plugin.registerPlugin,videojs.plugin=function(e,t){return log$2.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Plugin.registerPlugin(e,t)},videojs.getPlugins=Plugin.getPlugins,videojs.getPlugin=Plugin.getPlugin,videojs.getPluginVersion=Plugin.getPluginVersion,videojs.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),videojs.options.languages=mergeOptions(videojs.options.languages,(n={},n[e]=t,n)),videojs.options.languages[e]},videojs.log=log$2,videojs.createTimeRange=videojs.createTimeRanges=createTimeRanges,videojs.formatTime=formatTime,videojs.parseUrl=parseUrl,videojs.isCrossOrigin=isCrossOrigin,videojs.EventTarget=EventTarget,videojs.on=on,videojs.one=one,videojs.off=off,videojs.trigger=trigger,videojs.xhr=xhr,videojs.TextTrack=TextTrack,videojs.AudioTrack=AudioTrack,videojs.VideoTrack=VideoTrack,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){videojs[e]=function(){return log$2.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Dom[e].apply(null,arguments)}}),videojs.computedStyle=computedStyle,videojs.dom=Dom,videojs.url=Url;var enc=createCommonjsModule(function(module,exports){!function(e,t){module.exports=t()}(self,function(){return function(){function __webpack_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}var __webpack_modules__={"./node_modules/@tencent/js-armor-loader/dist/runtime.js":function node_modulesTencentJsArmorLoaderDistRuntimeJs(module){eval("function T(f,l,c,r,g,s,a,v){var h,n=!r,t=(f=+f,l=l||[0],r=r||[[this],[{}]],g=g||{},[]),o=null;function p(){return function(n,t,o){return new(Function.bind.apply(n,t))}.apply(null,arguments)}Function.prototype.bind||(h=[].slice,Function.prototype.bind=function(n){if(\"function\"!=typeof this)throw new TypeError(\"bind101\");var t=h.call(arguments,1),o=t.length,p=this,e=function(){},u=function(){return t.length=o,t.push.apply(t,arguments),p.apply(e.prototype.isPrototypeOf(this)?this:n,t)};return this.prototype&&(e.prototype=this.prototype),u.prototype=new e,u});for(var e=[function(){var n=l[f++],t=r[r.length-2-n];r[r.length-2-n]=r.pop(),r.push(t)},function(){r[r.length-2]=r[r.length-2]===r.pop()},function(){r[r.length-2]=r[r.length-2]-r.pop()},function(){r[r.length-2]=r[r.length-2]%r.pop()},function(){var n=r[r.length-2],t=Object.getOwnPropertyDescriptor(n[0],n[1])||{configurable:!0,enumerable:!0};t.get=r[r.length-1],Object.defineProperty(n[0],n[1],t)},function(){t.pop()},function(){r.push([c,r.pop()])},function(){r.push([r.pop(),r.pop()].reverse())},function(){r.push(!0)},function(){return!0},function(){var n=r[r.length-2],t=Object.getOwnPropertyDescriptor(n[0],n[1])||{configurable:!0,enumerable:!0};t.set=r[r.length-1],Object.defineProperty(n[0],n[1],t)},function(){r[r[r.length-1][0]]=r[r[r.length-1][0]]===undefined?[]:r[r[r.length-1][0]]},function(){r[r.length-2]=r[r.length-2]instanceof r.pop()},function(){o=null},function(){r[r.length-2]=r[r.length-2]<=r.pop()},function(){for(var o=l[f++],p=[],n=l[f++],t=l[f++],e=[],u=0;u<n;u++)p[l[f++]]=r[l[f++]];for(u=0;u<t;u++)e[u]=l[f++];r.push(function h(){var n=p.slice(0);n[0]=[this],n[1]=[arguments],n[2]=[h];for(var t=0;t<e.length&&t<arguments.length;t++)0<e[t]&&(n[e[t]]=[arguments[t]]);return T(o,l,c,n,g,s,a,v)})},function(){var n=l[f++];r[r.length-1]&&(f=n)},function(){r.push(!r.pop())},function(){r.push(null)},function(){r[r.length-2]=r[r.length-2]>>r.pop()},function(){r[r.length-1]+=String.fromCharCode(l[f++])},function(){r[r.length-2]=r[r.length-2]*r.pop()},function(){var n=r.pop();r.push(n[0][n[1]])},function(){var n=r.pop();r.push(delete n[0][n[1]])},function(){var n=l[f++],t=n?r.slice(-n):[];r.length-=n,r.push(r.pop().apply(c,t))},function(){return!!o},function(){var n=l[f++],t=n?r.slice(-n):[],n=(r.length-=n,r.pop());r.push(n[0][n[1]].apply(n[0],t))},function(){for(var n=r.pop(),o=l[f++],p=[],t=l[f++],e=l[f++],u=[],h=0;h<t;h++)p[l[f++]]=r[l[f++]];for(h=0;h<e;h++)u[h]=l[f++];var i=function(){var n=p.slice(0);n[0]=[this],n[1]=[arguments],n[2]=[i];for(var t=0;t<u.length&&t<arguments.length;t++)0<u[t]&&(n[u[t]]=[arguments[t]]);return T(o,l,c,n,g,s,a,v)};i.toString=function(){return n},r.push(i)},function(){r[r.length-2]=r[r.length-2]<<r.pop()},function(){var n,t=[];for(n in r.pop())t.push(n);r.push(t)},function(){var n=r[r.length-2];n[0][n[1]]=r[r.length-1]},function(){r.push(l[f++])},function(){r.length=l[f++]},function(){t.push([l[f++],r.length,l[f++]])},function(){var n=r.pop();g[n]||(c[n]=c[n](),g[n]=1),r.push(c[n])},function(){r[r.length-2]=r[r.length-2]in r.pop()},function(){r[r.length-1].length?r.push(r[r.length-1].shift(),!0):r.push(undefined,!1)},function(){r[r[r.length-2][0]][0]=r[r.length-1]},function(){r[r.length-2]=r[r.length-2]|r.pop()},function(){r[r.length-2]=r[r.length-2]<r.pop()},function(){r[r.length-2]=r[r.length-2]^r.pop()},function(){var n=l[f++];r[n]=r[n]===undefined?[]:r[n]},function(){r.push(typeof r.pop())},function(){r[r.length-2]=r[r.length-2]&r.pop()},function(){r.push(undefined)},function(){r[r.length-2]=r[r.length-2]>r.pop()},function(){},function(){r[r.length-2]=r[r.length-2]>=r.pop()},function(){r.length-=l[f++]},function(){r.push(~r.pop())},function(){r[r.length-1]=c[r[r.length-1]]},function(){r.push(\"\")},function(){var n=r.pop(),t=r.pop();r.push([t[0][t[1]],n])},function(){r[r.length-2]=r[r.length-2]>>>r.pop()},function(){r.pop()},function(){r.push(r[l[f++]][0])},function(){throw r[r.length-1]},function(){f=l[f++]},function(){r[r.length-1]=l[f++]},function(){r.push(!1)},function(){r[r.length-2]=r[r.length-2]==r.pop()},function(){r.push([l[f++]])},function(){var n=l[f++],t=n?r.slice(-n):[];r.length-=n,t.unshift(null),r.push(p(r.pop(),t))},function(){var n=r.pop();g[n]||(c[n]=c[n](),g[n]=1),r.push([c,n])},function(){r[r.length-2]=r[r.length-2]+r.pop()},function(){var n=l[f++],t=n?r.slice(-n):[],n=(r.length-=n,t.unshift(null),r.pop());r.push(p(n[0][n[1]],t))},function(){r[r.length-2]=r[r.length-2]/r.pop()},function(){r.push(r[r.length-1])},function(){r.push(r[r.pop()[0]][0])},function(){var n=r.pop();r.push([r[r.pop()][0],n])}];;)try{for(var u=!1;!u;)u=e[l[f++]]();if(o)throw o;return n?(r.pop(),r.slice(3+T.v)):r.pop()}catch(y){var i=t.pop();if(i===undefined)throw y;o=y,f=i[0],r.length=i[1],i[2]&&(r[i[2]][0]=o)}}T.v=0;\n \"use strict\";\n\n/* eslint-disable */\nfunction arrayIndexOf(arr, searchElement, fromIndex) {\n if (typeof Array.prototype.indexOf === 'function') {\n return Array.prototype.indexOf.call(arr, searchElement, fromIndex);\n }\n\n var k;\n var len = o.length;\n\n if (len === 0) {\n return -1;\n }\n\n var n = fromIndex | 0;\n\n if (n >= len) {\n return -1;\n }\n\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n for (; k < len; k++) {\n if (k in o && o[k] === searchElement) return k;\n }\n\n return -1;\n}\n\nfunction base64Decode(t) {\n var r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split('');\n var o = String(t).replace(/[=]+$/, '');\n\n for (var e, n, a = 0, i = 0, c = ''; n = o.charAt(i++); ~n && (e = a % 4 ? 64 * e + n : n, a++ % 4) ? c += String.fromCharCode(255 & e >> (-2 * a & 6)) : 0) n = arrayIndexOf(r, n);\n\n return c;\n}\n/** releaseSymbols, 识别导入的全局变量 */\n\n\nmodule.exports.r = function (symbols) {\n var result = [];\n\n for (var i = 0; i < symbols.length; i++) {\n try {\n result.push(eval(symbols[i]));\n } catch (_) {\n result.push(undefined);\n }\n }\n\n return result;\n};\n/** decompress, 解压字节码 */\n\n\nmodule.exports.d = function (arr) {\n if (typeof arr[1] !== `object`) {\n return arr;\n }\n\n var compressed = arr[0];\n var bigNumbers = arr[1];\n var restored = [];\n var bytes = base64Decode(compressed);\n var pos = bigNumbers.shift();\n var num = bigNumbers.shift();\n var current = 0;\n\n function insertBigNumber() {\n while (current === pos) {\n restored.push(num);\n current++;\n pos = bigNumbers.shift();\n num = bigNumbers.shift();\n }\n }\n\n for (var i = 0; i < bytes.length; i++) {\n var charCode = bytes.charAt(i).charCodeAt(0);\n insertBigNumber();\n restored.push(charCode);\n current++;\n }\n\n insertBigNumber();\n return restored;\n};\n/** getResult 从 vm 执行结果中获取局部变量 */\n\n\nmodule.exports.g = function (result) {\n return result.shift()[0];\n};\n/** vm */\n\n\nmodule.exports.v = T;\n \n\n//# sourceURL=webpack://enc/./node_modules/@tencent/js-armor-loader/dist/runtime.js?")},"./enc.source.js":function encSourceJs(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("\n\nvar armor = __webpack_require__(/*! !./node_modules/@tencent/js-armor-loader/dist/runtime.js */ \"./node_modules/@tencent/js-armor-loader/dist/runtime.js\");\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = void 0;\nvar _jsencrypt = _interopRequireDefault(__webpack_require__(/*! jsencrypt */ \"./node_modules/jsencrypt/lib/index.js\"));\nvar _utils = __webpack_require__(/*! ./utils */ \"./utils.js\");\nvar _aes = _interopRequireDefault(__webpack_require__(/*! ./utils/aes */ \"./utils/aes.js\"));\nvar _md = _interopRequireDefault(__webpack_require__(/*! md5 */ \"./node_modules/md5/md5.js\"));\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { 'default': obj };\n}\nfunction _typeof(obj) {\n '@babel/helpers - typeof';\n return _typeof = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && 'function' == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n }, _typeof(obj);\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps)\n _defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, 'prototype', { writable: false });\n return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, 'string');\n return _typeof(key) === 'symbol' ? key : String(key);\n}\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== 'object' || input === null)\n return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || 'default');\n if (_typeof(res) !== 'object')\n return res;\n throw new TypeError('@@toPrimitive must return a primitive value.');\n }\n return (hint === 'string' ? String : Number)(input);\n}\nvar Enc = function () {\n function Enc() {\n _classCallCheck(this, Enc);\n _defineProperty(this, 'handleWatermarkElementAdd', function (ctx) {\n if (!ctx.options.keep) {\n console.log(document.querySelector('.tcp-dynamic-watermark-container'), document.querySelector('.tcp-dynamic-watermark-content'), ctx);\n if (!ctx.player.$('.tcp-dynamic-watermark-container')) {\n ctx.player.el() && ctx.player.el().appendChild(ctx.containerElement);\n } else if (!ctx.player.$('.tcp-dynamic-watermark-content')) {\n ctx.containerElement.appendChild(ctx.markContentElement);\n }\n } else {\n if (!ctx.waterMarkWillAdd) {\n ctx.waterMarkWillAdd = true;\n setTimeout(function () {\n ctx.player && ctx.player.el() && ctx.player.el().appendChild(ctx.containerElement);\n ctx.waterMarkWillAdd = false;\n ctx.isFirstShow = false;\n }, (ctx.isFirstShow ? ctx.ghostCycle.firstShow : ctx.ghostCycle.ghostOff) * 1000);\n }\n }\n });\n }\n _createClass(Enc, [\n {\n key: 'elemManage',\n value: function elemManage(player) {\n var _this = this;\n var _self = this;\n player.on('dispose', function () {\n clearInterval(_self.timer);\n });\n this.timer = setInterval(function () {\n var safeCheckElem = document.querySelector('.safe-check-element');\n if (!safeCheckElem || safeCheckElem.style.display === 'none') {\n clearInterval(_this.timer);\n player.dispose();\n }\n }, 5000);\n }\n },\n {\n key: 'base64ToHex',\n value: function base64ToHex(str) {\n var raw = atob(str);\n var result = '';\n for (var i = 0; i < raw.length; i++) {\n var hex = raw.charCodeAt(i).toString(16);\n result += hex.length === 2 ? hex : '0' + hex;\n }\n return result;\n }\n },\n {\n key: 'checkEnvironment',\n value: function checkEnvironment() {\n if (!Hls || !Hls.isSupported()) {\n console.error('未检测到 Hls 全局变量或当前环境不支持 hls.js\\uFF0C请选择其他播放方式');\n return false;\n }\n return true;\n }\n },\n {\n key: 'checksum',\n value: function checksum(request, body) {\n return armor.g(armor.v(0,armor.d([\"IAQpAikDORsgBSkCKQMpBD0DHwA/MxRnFGUUdBRSFGUUcxRwFG8UbhRzFGUUSBRlFGEUZBRlFHI0MxRYFC0UVhRvFGQULRRDFGgUZRRjFGsUcxR1FG0aASU2Nj0EHwA6AT8zFGQUZRRmFGEUdRRsFHQ0Fh8AOgI/MxRkFGUUYxRyFHkUcBR0FG80Fj0AMxRvFHYUZRRyFGwUYRR5FEsUZRR5RRYYAR8AOgI/MxRkFGUUYxRyFHkUcBR0FG80Fj0AMxRvFHYUZRRyFGwUYRR5FEkUdkUWGAFAHwM/MxR0FHIUaRRtNBoAQBgBJTY2NwMQ9Tn8GzY3BDcDAREQNjk6NjsJCAk9Aw8JAAAlNjYsCQ==\",[7,263,253,258,256,261]]),[function() { return typeof request == 'undefined' ? undefined : request },function() { return typeof _md == 'undefined' ? undefined : _md },function() { return typeof _utils == 'undefined' ? undefined : _utils },function() { return typeof body == 'undefined' ? undefined : body }])).call(this)\n }\n },\n {\n key: 'generatePlayCgiUrl',\n value: function generatePlayCgiUrl(url, browser, skip) {\n return armor.g(armor.v(0,armor.d([\"IAQpAikDOSkgCSkCKQMpBCkFKQYpBykIPQMfADoAPzMUZxRlFG4UTxR2FGUUchRsFGEUeTQWGAAlNjY9BB8AOgA/MxRnFGUUbhRPFHYUZRRyFGwUYRR5NBYYACU2Nj0FHwE/MxRkFGUUZhRhFHUUbBR0NEEAJTY2PQYzFE0USRRHFGYUTRRBFDAURxRDFFMUcRRHFFMUSRRiFDMURBRRFEUUQhRBFFEUVRRBFEEUNBRHFE4UQRREFEMUQhRpFFEUSxRCFGcUURRDFDMUcBREFEEUNxRHFFQUeBRPFHYUThRiFFgUUhRHFE0UaRQ5FFEUUxRJFHoUURRFFEkUKxRFFE0URBQxFEgUYxRVFFAUShRTFFEUUxRGFHUUUhRrFFoUaxRXFG8UNBRWFFEURRRDFHUUUBRSFGcULxR4FFYUahRxFHcUWBQxFHkUVRRyFEgUVRR2FEcUURRKFHMUQhR3FFQUUxQvFDYUTBRJFGMUURRpFFMUdxRZFHMUTxRxFGYUKxQ4FFQUVxR4FEcUURRPFEoUeRRXFDQUNhRnFFAUUBRRFFYUehRUFGoUThRUFGkUVRRvFHEUNBQzFDUUURRCFDAUdhQxFDEUbBROFHgUdhRLFFcUQhRRFEkUWhRMFG0UYRRjFFUUWhQyFHIUMRRBFFAUdBRhFDcUaRQvFE0UWRQ0FEwUeBQ5FFgUbBRaFFYUTRRaFE4UVRRkFFUUeRR3FEkURBRBFFEUQRRCJTY2PQUzFHMUZRR0FFAUdRRiFGwUaRRjFEsUZRR5RTcGGgE2PQc9ADMUYhRhFHMUZRQ2FDQUVBRvFEgUZRR4RT0FMxRlFG4UYxRyFHkUcBR0RTcDGgEaASU2Nj0IPQAzFGIUYRRzFGUUNhQ0FFQUbxRIFGUUeEU9BTMUZRRuFGMUchR5FHAUdEU3BBoBGgElNjoCPzMUTRRlFGQUaRRhFFMUbxR1FHIUYxRlNBYQNjkwNh8CPzMUTRRlFGQUaRRhFFMUbxR1FHIUYxRlNDMUcBRyFG8UdBRvFHQUeRRwFGU0MxRlFG4UZBRPFGYUUxR0FHIUZRRhFG00MxR0FG8UUxR0FHIUaRRuFGc0GgAzFHIUZRRwFGwUYRRjFGUHHwMiMxRcFHMzFGcYAjMaAjMUZhR1FG4UYxR0FGkUbxRuFGUUbhRkFE8UZhRTFHQUchRlFGEUbRQoFCkUexRbFG4UYRR0FGkUdhRlFGMUbxRkFGUUXRR9AREQOgI/MxRNFGUUZBRpFGEUUxRvFHUUchRjFGU0MxRwFHIUbxR0FG8UdBR5FHAUZTQzFGEUZBRkFFMUbxR1FHIUYxRlFEIUdRRmFGYUZRRyNDMUdBRvFFMUdBRyFGkUbhRnNBoAMxRyFGUUcBRsFGEUYxRlBx8DIjMUXBRzMxRnGAIzGgIzFGYUdRRuFGMUdBRpFG8UbhRhFGQUZBRTFG8UdRRyFGMUZRRCFHUUZhRmFGUUchQoFCkUexRbFG4UYRR0FGkUdhRlFGMUbxRkFGUUXRR9AREQNjkpNj0HPQAzFGIUYRRzFGUUNhQ0FFQUbxRIFGUUeEU9BTMUZRRuFGMUchR5FHAUdEUfADoAPzMUZxRlFG4UTxR2FGUUchRsFGEUeTQWGAAaARoBJTY2PQg9ADMUYhRhFHMUZRQ2FDQUVBRvFEgUZRR4RT0FMxRlFG4UYxRyFHkUcBR0RR8AOgA/MxRnFGUUbhRPFHYUZRRyFGwUYRR5NBYYABoBGgElNjYfBD9DFjMUJhRjFGkUcBRoFGUUchRlFGQUTxR2FGUUchRsFGEUeRRLFGUUeRQ9MxRjFG8UbhRjFGEUdAc3BzMUJhRjFGkUcBRoFGUUchRlFGQUTxR2FGUUchRsFGEUeRRJFHYUPRoCMxRjFG8UbhRjFGEUdAc3CDMUJhRrFGUUeRRJFGQUPRQxGgJAHgAANjoFPzMUSRRTFF8URRROFEEUQhRMFEUURBRfFE0UUxRFNBYQOQA2HwU/MxRJFFMUXxRUFEIUUzQWERA5PTYfBT8zFEkUUxRfFE0UURRRFEI0FhEQOQ82HwU/MxRJFFMUXxRTFEEURhRBFFIUSTQWERA5HzYfBT8zFEkURRRfFFYURRRSFFMUSRRPFE40FhA5QTYfBT8zFEkURRRfFFYURRRSFFMUSRRPFE40Fh8LLxERERA6BiIQNjkQNh8EP0MWMxQmFG0UcxRlFD0UbxRmFGZAHgAANjoEP0MWMxQmFHEUcxRpFGcUbhQ9HwA6Bz8zFGQUZRRmFGEUdRRsFHQ0FjMUbxR2FGUUchRsFGEUeRRLFGUUeRQ9MxRjFG8UbhRjFGEUdAc3AzMUJhRvFHYUZRRyFGwUYRR5FEkUdhQ9GgIzFGMUbxRuFGMUYRR0BzcEMxQmFG0UcxRlFD0UbxRmFGYaAhgBQEAeNjY9ADMUbxR2FGUUchRsFGEUeRRLFGUUeUUfADoAPzMUZRRuFGMUchR5FHAUdBRvNBY3AxgBHjY2PQAzFG8UdhRlFHIUbBRhFHkUSRR2RR8AOgA/MxRlFG4UYxRyFHkUcBR0FG80FjcEGAEeAAA2OgQiCT0DDwkAACU2NiwJ\",[7,1949,730,735,733,1319,933,1146,1147,1152,1150,1319,1497,1501,1499,1521,1522,1526,1524,1548,1549,1553,1551,1579,1580,1584,1582,1648,1612,1616,1614,1647,1650,1654,1655,1660,1658,1836]]),[function() { return typeof _utils == 'undefined' ? undefined : _utils },function() { return typeof _jsencrypt == 'undefined' ? undefined : _jsencrypt },function() { return typeof window == 'undefined' ? undefined : window },function() { return typeof RegExp == 'undefined' ? undefined : RegExp },function() { return typeof url == 'undefined' ? undefined : url },function() { return typeof browser == 'undefined' ? undefined : browser },function() { return typeof skip == 'undefined' ? undefined : skip },function() { return typeof _md == 'undefined' ? undefined : _md }])).call(this)\n }\n },\n {\n key: 'generateKey',\n value: function generateKey(key) {\n var responseKey = new Uint8Array(key);\n var decryptedKey;\n if (this.overlayKey && this.overlayIv) {\n var keyArray = [];\n var ivArray = [];\n for (var i = 0; i < 16; i++) {\n var _key = this.overlayKey.substring(i * 2, i * 2 + 2);\n var _iv = this.overlayIv.substring(i * 2, i * 2 + 2);\n keyArray.push(parseInt(_key, 16));\n ivArray.push(parseInt(_iv, 16));\n }\n var aesCbc = new _aes['default'].modeOfOperation.cbc(keyArray, ivArray);\n decryptedKey = aesCbc.decrypt(responseKey);\n }\n return decryptedKey || responseKey;\n }\n },\n {\n key: 'calculateGhost',\n value: function calculateGhost(duration) {\n var period = duration / 4;\n var ghostCycle;\n if (period <= 15) {\n ghostCycle = duration / 2;\n } else if (period <= 30 * 60 / 4) {\n ghostCycle = duration / 4;\n } else {\n ghostCycle = 30 * 60 / 4;\n }\n var ghostOn = ghostCycle / 4;\n var ghostOff = ghostCycle - ghostOn;\n return {\n firstShow: localStorage.getItem('ghostWatermarkFirstShow') || Math.random() * ghostOff + 0.01,\n ghostOn: ghostOn,\n ghostOff: ghostOff\n };\n }\n }\n ]);\n return Enc;\n}();\nvar _default = Enc;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://enc/./enc.source.js?")},"./utils.js":function utilsJs(__unused_webpack_module,exports,__webpack_require__){"use strict"
|
|
7
|
+
;return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t["default"]&&(n["default"]=t["default"]),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},t.prototype.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},t.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),window_1.performance&&"function"==typeof window_1.performance.now?e.creationTime=window_1.performance.now():window_1.performance&&window_1.performance.timing&&"number"==typeof window_1.performance.timing.navigationStart&&(e.creationTime=window_1.Date.now()-window_1.performance.timing.navigationStart),e},t}(Tech);if(isReal()){Html5.TEST_VID=document_1.createElement("video");var track=document_1.createElement("track");track.kind="captions",track.srclang="en",track.label="English",Html5.TEST_VID.appendChild(track)}Html5.isSupported=function(){try{Html5.TEST_VID.volume=.5}catch(e){return!1}return!(!Html5.TEST_VID||!Html5.TEST_VID.canPlayType)},Html5.canPlayType=function(e){return Html5.TEST_VID.canPlayType(e)},Html5.canPlaySource=function(e,t){return Html5.canPlayType(e.type)},Html5.canControlVolume=function(){try{var e=Html5.TEST_VID.volume;return Html5.TEST_VID.volume=e/2+.1,e!==Html5.TEST_VID.volume}catch(t){return!1}},Html5.canControlMute=function(){try{var e=Html5.TEST_VID.muted;return Html5.TEST_VID.muted=!0,e!==Html5.TEST_VID.muted}catch(t){return!1}},Html5.canControlPlaybackRate=function(){if(IS_ANDROID&&IS_CHROME&&CHROME_VERSION<58)return!1;try{var e=Html5.TEST_VID.playbackRate;return Html5.TEST_VID.playbackRate=e/2+.1,e!==Html5.TEST_VID.playbackRate}catch(t){return!1}},Html5.supportsNativeTextTracks=function(){return IS_ANY_SAFARI},Html5.supportsNativeVideoTracks=function(){return!(!Html5.TEST_VID||!Html5.TEST_VID.videoTracks)},Html5.supportsNativeAudioTracks=function(){return!(!Html5.TEST_VID||!Html5.TEST_VID.audioTracks)},Html5.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Html5.prototype.featuresVolumeControl=Html5.canControlVolume(),Html5.prototype.featuresMuteControl=Html5.canControlMute(),Html5.prototype.featuresPlaybackRate=Html5.canControlPlaybackRate(),Html5.prototype.movingMediaElementInDOM=!IS_IOS,Html5.prototype.featuresFullscreenResize=!0,Html5.prototype.featuresProgressEvents=!0,Html5.prototype.featuresTimeupdateEvents=!0,Html5.prototype.featuresNativeTextTracks=Html5.supportsNativeTextTracks(),Html5.prototype.featuresNativeVideoTracks=Html5.supportsNativeVideoTracks(),Html5.prototype.featuresNativeAudioTracks=Html5.supportsNativeAudioTracks();var canPlayType=Html5.TEST_VID&&Html5.TEST_VID.constructor.prototype.canPlayType,mpegurlRE=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,mp4RE=/^video\/mp4/i;Html5.patchCanPlayType=function(){ANDROID_VERSION>=4&&!IS_FIREFOX?Html5.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&mpegurlRE.test(e)?"maybe":canPlayType.call(this,e)}:IS_OLD_ANDROID&&(Html5.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&mp4RE.test(e)?"maybe":canPlayType.call(this,e)})},Html5.unpatchCanPlayType=function(){var e=Html5.TEST_VID.constructor.prototype.canPlayType;return Html5.TEST_VID.constructor.prototype.canPlayType=canPlayType,e},Html5.patchCanPlayType(),Html5.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(t){}}()}},Html5.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){Html5.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){Html5.prototype["set"+toTitleCase(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(e){Html5.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){Html5.prototype["set"+toTitleCase(e)]=function(t){this.el_[e]=t}}),["pause","load","play"].forEach(function(e){Html5.prototype[e]=function(){return this.el_[e]()}}),Tech.withSourceHandlers(Html5),Html5.nativeSourceHandler={},Html5.nativeSourceHandler.canPlayType=function(e){setTimeout(function(){},2e3);try{return Html5.TEST_VID.canPlayType(e)}catch(t){return""}},Html5.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Html5.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=getFileExtension(e.src);return Html5.nativeSourceHandler.canPlayType("video/"+n)}return""},Html5.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Html5.nativeSourceHandler.dispose=function(){},Html5.registerSourceHandler(Html5.nativeSourceHandler),Tech.registerTech("Html5",Html5);var _templateObject$1=taggedTemplateLiteralLoose(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),preventScroll=function(e){e.preventDefault()},TECH_EVENTS_RETRIGGER=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","resize","volumechange","texttrackchange"],Player=function(e){function t(n,r,i){if(classCallCheck(this,t),n.id=n.id||"vjs_video_"+newGUID(),r=assign(t.getTagSettings(n),r),r.initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(r.language=o.getAttribute("lang"))}else for(var a=n;a&&1===a.nodeType;){if(getAttributes(a).hasOwnProperty("lang")){r.language=a.getAttribute("lang");break}a=a.parentNode}var s=possibleConstructorReturn(this,e.call(this,null,r,i));if(s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&getAttributes(n),s.language(s.options_.language),r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach(function(e){c[e.toLowerCase()]=r.languages[e]}),s.languages_=c}else s.languages_=t.prototype.options_.languages;s.cache_={},s.poster_=r.poster||"",s.controls_=!!r.controls,s.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),s.scrubbing_=!1,s.el_=s.createEl(),evented(s,{eventBusKey:"el_"});var l=mergeOptions(s.options_);if(r.plugins){var u=r.plugins;Object.keys(u).forEach(function(e){if("function"!=typeof this[e])throw new Error('plugin "'+e+'" does not exist');this[e](u[e])},s)}return s.options_.playerOptions=l,s.middleware_=[],s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),IS_IOS||IS_ANDROID||s.addClass("vjs-workinghover"),t.players[s.id_]=s,s.userActive(!0),s.reportUserActivity(),s.listenForUserActivity_(),s.on("fullscreenchange",s.handleFullscreenChange_),s.on("stageclick",s.handleStageClick_),s.changingSrc_=!1,s.playWaitingForReady_=!1,s.playOnLoadstart_=null,s.forceAutoplayInChrome_(),s}return inherits(t,e),t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&this.tech_.dispose(),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,n=void 0,r=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=t.parentNode:i||(n=this.el_=e.prototype.createEl.call(this,"div"));var o=getAttributes(t);if(i){for(n=this.el_=t,t=this.tag=document_1.createElement("video");n.children.length;)t.appendChild(n.firstChild);hasClass(n,"video-js")||addClass(n,"video-js"),n.appendChild(t),r=this.playerElIngest_=n}if(t.setAttribute("tabindex","-1"),t.removeAttribute("width"),t.removeAttribute("height"),Object.getOwnPropertyNames(o).forEach(function(e){"class"===e?(n.className+=" "+o[e],i&&(t.className+=" "+o[e])):(n.setAttribute(e,o[e]),i&&t.setAttribute(e,o[e]))}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=n.player=this,this.addClass("vjs-paused"),!0!==window_1.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=createStyleElement("vjs-styles-dimensions");var a=$(".vjs-styles-defaults"),s=$("head");s.insertBefore(this.styleEl_,a?a.nextSibling:s.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var c=t.getElementsByTagName("a"),l=0;l<c.length;l++){var u=c.item(l);addClass(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}t.initNetworkState_=t.networkState,t.parentNode&&!r&&t.parentNode.insertBefore(n,t),prependTo(t,n),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_);var d=document_1.createElement("div");return addClass(d,"safe-check-element"),n.appendChild(d),this.el_=n,n},t.prototype.width=function(e,t){return this.dimension("width",e,t)},t.prototype.height=function(e,t){return this.dimension("height",e,t)},t.prototype.dimension=function(e,t,n){var r=e+"_";if(t===undefined)return this[r]||0;if(""===t)return this[r]=undefined,void this.updateStyleEl_();var i=parseFloat(t);if(isNaN(i))return void log$2.error('Improper value "'+t+'" supplied for for '+e);this[r]=i,this.updateStyleEl_(),this.isReady_&&!n&&this.trigger("playerresize")},t.prototype.fluid=function(e){if(e===undefined)return!!this.fluid_;this.fluid_=!!e,e?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},t.prototype.aspectRatio=function(e){if(e===undefined)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},t.prototype.updateStyleEl_=function(){if(!0===window_1.VIDEOJS_NO_DYNAMIC_STYLE){var e="number"==typeof this.width_?this.width_:this.options_.width,t="number"==typeof this.height_?this.height_:this.options_.height,n=this.tech_&&this.tech_.el();return void(n&&(e>=0&&(n.width=e),t>=0&&(n.height=t)))}var r=void 0,i=void 0,o=void 0,a=void 0;o=this.aspectRatio_!==undefined&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var s=o.split(":"),c=s[1]/s[0];r=this.width_!==undefined?this.width_:this.height_!==undefined?this.height_/c:this.videoWidth()||300,i=this.height_!==undefined?this.height_:r*c,a=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(a),setTextContent(this.styleEl_,"\n ."+a+" {\n width: "+r+"px;\n height: "+i+"px;\n }\n\n ."+a+".vjs-fluid {\n padding-top: "+100*c+"%;\n }\n ")},t.prototype.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=toTitleCase(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(Tech.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:t,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",autoplay:this.options_.autoplay,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],swf:this.options_.swf,hlsConfig:this.options_.hlsConfig,dashConfig:this.options_.dashConfig,flvConfig:this.options_.flvConfig,webrtcConfig:this.options_.webrtcConfig,xp2pConfig:this.options_.xp2pConfig};ALL.names.forEach(function(e){var t=ALL[e];o[t.getterName]=n[t.privateName]}),assign(o,this.options_[r]),assign(o,this.options_[i]),assign(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var a=Tech.getTech(e);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(this,o),this.tech_.ready(bind(this,this.handleTechReady_),!0),textTrackConverter.jsonToTextTracks(this.textTracksJson_||[],this.tech_),TECH_EVENTS_RETRIGGER.forEach(function(e){n.on(n.tech_,e,n["handleTech"+toTitleCase(e)+"_"])}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"x5videoexitfullscreen",this.handleX5ExitFullscreen_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||prependTo(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){var e=this;ALL.names.forEach(function(t){var n=ALL[t];e[n.privateName]=e[n.getterName]()}),this.textTracksJson_=textTrackConverter.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},t.prototype.tech=function(e){return e===undefined&&log$2.warn(tsml(_templateObject$1)),this.tech_},t.prototype.addTechControlsListeners_=function(){this.tech_&&(this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_))},t.prototype.removeTechControlsListeners_=function(){this.tech_&&(this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_))},t.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(e){log$2("deleting tag.poster throws in some browsers",e)}},t.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},t.prototype.hasStarted=function(e){if(e===undefined)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},t.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return e.removeClass("vjs-waiting")})},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(log$2.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){isSingleLeftClick(e)&&this.controls_&&(this.paused()?this.play():this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){IS_IOS||(this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen"))},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.toggleFullscreenClass_=function(){IS_IOS||(this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen"))},t.prototype.documentFullscreenChange_=function(e){var t=FullscreenApi;this.isFullscreen(document_1[t.fullscreenElement]),!1===this.isFullscreen()&&off(document_1,t.fullscreenchange,bind(this,this.documentFullscreenChange_)),prefixedAPI||this.trigger("fullscreenchange")},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.handleX5ExitFullscreen_=function(){this.removeClass("vjs-fullscreen"),this.isFullscreen_=!this.isFullscreen_},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){this.ready(function(){if(e in allowedSetters)return set$1(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(n){throw log$2(n),n}},!0)},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in allowedGetters)return get$1(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(this.tech_[e]===undefined)throw log$2("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw log$2("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw log$2(t),t}}},t.prototype.play=function(){var e=this;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return this.techGet_("play");this.playOnLoadstart_=function(){e.playOnLoadstart_=null,silencePromise(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready(function(){e.playWaitingForReady_=!1,silencePromise(e.play())})}},t.prototype.pause=function(){this.techCall_("pause")},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.played=function(){return this.techGet_("played")||createTimeRanges(0,0)},t.prototype.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.prototype.currentTime=function(e){if(void 0!==e)return e<0&&(e=0),void this.techCall_("setCurrentTime",e);try{return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime}catch(t){return 0}},t.prototype.duration=function(e){if(e===undefined)return this.cache_.duration!==undefined?this.cache_.duration:NaN;e=parseFloat(e),e<=0&&(e=Infinity),e!==this.cache_.duration&&(this.cache_.duration=e,e===Infinity?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=createTimeRanges(0,0)),e},t.prototype.bufferedPercent=function(){return bufferedPercent(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},t.prototype.volume=function(e){var t=void 0;return e!==undefined?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){return e!==undefined?void this.techCall_("setMuted",e):this.techGet_("muted")||!1},t.prototype.defaultMuted=function(e){return e!==undefined?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.prototype.lastVolume_=function(e){return e!==undefined&&0!==e?void(this.cache_.lastVolume=e):this.cache_.lastVolume},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){return e!==undefined?(this.isFullscreen_=!!e,void this.toggleFullscreenClass_()):!!this.isFullscreen_},t.prototype.requestFullscreen=function(){var e=FullscreenApi;if(this.isFullscreen(!0),this.options_.fakeFullscreen){var t=this;return IS_IOS?(t.el_.style.width="100vw",t.el_.style.height="100%",t.el_.style.position="fixed",t.el_.style.zIndex="999",t.el_.style.top="0",document_1.body.style.overflowY="hidden",document_1.addEventListener("touchmove",preventScroll,{passive:!1}),this.trigger("fullscreenchange")):(this.enterFullWindow(),this.trigger("fullscreenchange")),!1}e.requestFullscreen?(on(document_1,e.fullscreenchange,bind(this,this.documentFullscreenChange_)),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.prototype.exitFullscreen=function(){var e=FullscreenApi;if(this.isFullscreen(!1),this.options_.fakeFullscreen)return IS_IOS?(this.el_.removeAttribute("style"),document_1.removeEventListener("touchmove",preventScroll,{passive:!1}),document_1.body.style.overflowY="",this.trigger("fullscreenchange")):(this.exitFullWindow(),this.trigger("fullscreenchange")),!1;e.requestFullscreen?document_1[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=document_1.documentElement.style.overflow,on(document_1,"keydown",bind(this,this.fullWindowOnEscKey)),document_1.documentElement.style.overflow="hidden",addClass(document_1.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,off(document_1,"keydown",this.fullWindowOnEscKey),document_1.documentElement.style.overflow=this.docOrigOverflow,removeClass(document_1.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=Tech.getTech(i);if(o||(o=Component.getComponent(i)),o){if(o.isSupported()&&(t=o.canPlayType(e)))return t}else log$2.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},t.prototype.selectSource=function(e){var t=this,n=this.options_.techOrder.map(function(e){return[e,Tech.getTech(e)]}).filter(function(e){var t=e[0],n=e[1];return n?n.isSupported():(log$2.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),r=function(e,t,n){var r=void 0;return e.some(function(e){return t.some(function(t){if(r=n(e,t))return!0})}),r},i=function(e,n){var r=e[0];if(e[1].canPlaySource(n,t.options_[r.toLowerCase()]))return{source:n,tech:r}};return(this.options_.sourceOrder?r(e,n,function(e){return function(t,n){return e(n,t)}}(i)):r(n,e,i))||!1},t.prototype.src=function(e){var t=this;if(void 0===e)return this.cache_.src||this.techGet_("src");var n=filterSource(e);if(!n.length)return void this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);if(this.options_&&this.options_.hlsConfig&&this.options_.hlsConfig.skip&&n.map(function(e){e.skipHlsJs=!0}),this.cache_.source&&isWebrtcUrl(this.cache_.source.src)&&isWebrtcUrl(n[0].src)&&this.cache_.source.src!==n[0].src){var r=this.tech_.webrtcProvider;if(r&&r.webrtcPlayer&&r.webrtcPlayer.switchStream)return this.tech_.webrtcProvider.webrtcPlayer.switchStream(n[0].src),this.cache_.sources=n,this.cache_.source=n[0],!1}this.cache_.sources=n,this.changingSrc_=!0,this.cache_.source=n[0];try{this.cache_.source&&!isWebrtcUrl(this.cache_.source.src)&&this.options_.autoplay&&setTimeout(function(){var e=t.play&&t.play();isPromise(e)&&e.then()["catch"](function(){t.trigger("blocked")})},1e3)}catch(i){}setSource(this,n[0],function(e,r){if(t.middleware_=r,t.src_(e)){if(n.length>1){var i=n.slice(1),o=i[0].qualityLabelList;return o&&t.QualitySwitcher().setOptions({qualityLabelList:{video:o.slice(1)}}),t.src(i)}return t.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void t.triggerReady()}t.changingSrc_=!1,t.cache_.src=e.src,setTech(r,t.tech_)})},t.prototype.src_=function(e){var t=this.selectSource([e]);return!t||(window_1.performance&&"function"==typeof window_1.performance.mark&&window_1.performance.mark("firstFrameStart"),titleCaseEquals(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),"auto"===this.options_.preload&&this.load()},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),!1))},t.prototype.load=function(){this.techCall_("load")},t.prototype.reset=function(){this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},t.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},t.prototype.currentSource=function(){return this.cache_.source||{}},t.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.prototype.preload=function(e){return e!==undefined?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.prototype.autoplay=function(e){return e!==undefined?(this.techCall_("setAutoplay",e),this.options_.autoplay=e,void this.ready(this.forceAutoplayInChrome_)):this.techGet_("autoplay",e)},t.prototype.forceAutoplayInChrome_=function(){this.paused()&&(this.autoplay()||this.options_.autoplay)&&IS_CHROME&&!IS_ANDROID&&this.play()},t.prototype.playsinline=function(e){return e!==undefined?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.prototype.loop=function(e){return e!==undefined?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.prototype.poster=function(e){if(e===undefined)return this.poster_;e||(e=""),this.poster_=e,this.trigger("posterchange")},t.prototype.handleTechPosterChange_=function(){!this.poster_&&this.tech_&&this.tech_.poster&&(this.poster_=this.tech_.poster()||"",this.trigger("posterchange"))},t.prototype.controls=function(e){if(e===undefined)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.prototype.usingNativeControls=function(e){if(e===undefined)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.prototype.error=function(e){return e===undefined?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new MediaError(e),this.addClass("vjs-error"),log$2.error("(CODE:"+this.error_.code+" "+MediaError.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger({type:"error",data:this.error_}))},t.prototype.reportUserActivity=function(e){this.userActivity_=!0},t.prototype.userActive=function(e){if(e===undefined)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive")
|
|
8
|
+
;this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.prototype.listenForUserActivity_=function(){var e=void 0,t=void 0,n=void 0,r=bind(this,this.reportUserActivity),i=function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())},o=function(){r(),this.clearInterval(e),e=this.setInterval(r,250)},a=function(t){r(),this.clearInterval(e)};this.on("mousedown",o),this.on("mousemove",i),this.on("mouseup",a),this.on("keydown",r),this.on("keyup",r);var s=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(s);var e=this.options_.inactivityTimeout;e<=0||(s=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},t.prototype.playbackRate=function(e){return e!==undefined?void this.techCall_("setPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},t.prototype.defaultPlaybackRate=function(e){return e!==undefined?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.prototype.isAudio=function(e){return e!==undefined?void(this.isAudio_=!!e):!!this.isAudio_},t.prototype.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=e.track,n=t===undefined?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},t.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){if(e===undefined)return this.language_;this.language_=String(e).toLowerCase()},t.prototype.languages=function(){return mergeOptions(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=mergeOptions(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];r=mergeOptions(r),r.player=undefined,e.tracks[n]=r}return e},t.prototype.createModal=function(e,t){var n=this;t=t||{},t.content=e||"";var r=new ModalDialog(this,t);return this.addChild(r),r.on("dispose",function(){n.removeChild(r)}),r.open(),r},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=getAttributes(e),r=n["data-setup"];if(hasClass(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=tuple(r||"{}"),o=i[0],a=i[1];o&&log$2.error(o),assign(n,a)}if(assign(t,n),e.hasChildNodes())for(var s=e.childNodes,c=0,l=s.length;c<l;c++){var u=s[c],d=u.nodeName.toLowerCase();"source"===d?t.sources.push(getAttributes(u)):"track"===d&&t.tracks.push(getAttributes(u))}return t},t.prototype.flexNotSupported_=function(){var e=document_1.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},t}(Component);ALL.names.forEach(function(e){var t=ALL[e];Player.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),Player.players={};var navigator$1=window_1.navigator;Player.prototype.options_={techOrder:Tech.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings","videoStatisticPanel"],language:navigator$1&&(navigator$1.languages&&navigator$1.languages[0]||navigator$1.userLanguage||navigator$1.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach(function(e){Player.prototype[e]=function(){return this.techGet_(e)}}),TECH_EVENTS_RETRIGGER.forEach(function(e){Player.prototype["handleTech"+toTitleCase(e)+"_"]=function(){return this.trigger(e)}}),Component.registerComponent("Player",Player);var BASE_PLUGIN_NAME="plugin",PLUGIN_CACHE_KEY="activePlugins_",pluginStorage={},pluginExists=function(e){return pluginStorage.hasOwnProperty(e)},getPlugin=function(e){return pluginExists(e)?pluginStorage[e]:undefined},markPluginAsActive=function(e,t){e[PLUGIN_CACHE_KEY]=e[PLUGIN_CACHE_KEY]||{},e[PLUGIN_CACHE_KEY][t]=!0},triggerSetupEvent=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},createBasicPlugin=function(e,t){var n=function(){triggerSetupEvent(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return markPluginAsActive(this,e),triggerSetupEvent(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach(function(e){n[e]=t[e]}),n},createPluginFactory=function(e,t){return t.prototype.name=e,function(){triggerSetupEvent(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=new(Function.prototype.bind.apply(t,[null].concat([this].concat(r))));return this[e]=function(){return o},triggerSetupEvent(this,o.getEventHash()),o}},Plugin=function(){function e(t){if(classCallCheck(this,e),this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,evented(this),delete this.trigger,stateful(this,this.constructor.defaultState),markPluginAsActive(t,this.name),this.dispose=bind(this,this.dispose),t.on("dispose",this.dispose)}return e.prototype.version=function(){return this.constructor.VERSION},e.prototype.getEventHash=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.prototype.trigger=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return trigger(this.eventBusEl_,e,this.getEventHash(t))},e.prototype.handleStateChanged=function(e){},e.prototype.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[PLUGIN_CACHE_KEY][e]=!1,this.player=this.state=null,t[e]=createPluginFactory(e,pluginStorage[e])},e.isBasic=function(t){var n="string"==typeof t?getPlugin(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+(void 0===t?"undefined":_typeof(t))+".");if(pluginExists(t))log$2.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Player.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+(void 0===n?"undefined":_typeof(n))+".");return pluginStorage[t]=n,t!==BASE_PLUGIN_NAME&&(e.isBasic(n)?Player.prototype[t]=createBasicPlugin(t,n):Player.prototype[t]=createPluginFactory(t,n)),n},e.deregisterPlugin=function(e){if(e===BASE_PLUGIN_NAME)throw new Error("Cannot de-register base plugin.");pluginExists(e)&&(delete pluginStorage[e],delete Player.prototype[e])},e.getPlugins=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:Object.keys(pluginStorage),t=void 0;return e.forEach(function(e){var n=getPlugin(e);n&&(t=t||{},t[e]=n)}),t},e.getPluginVersion=function(e){var t=getPlugin(e);return t&&t.VERSION||""},e}();Plugin.getPlugin=getPlugin,Plugin.BASE_PLUGIN_NAME=BASE_PLUGIN_NAME,Plugin.registerPlugin(BASE_PLUGIN_NAME,Plugin),Player.prototype.usingPlugin=function(e){return!!this[PLUGIN_CACHE_KEY]&&!0===this[PLUGIN_CACHE_KEY][e]},Player.prototype.hasPlugin=function(e){return!!pluginExists(e)};var _inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)},extendFn=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=function(){e.apply(this,arguments)},r={};"object"===(void 0===t?"undefined":_typeof(t))?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),_inherits(n,e);for(var i in r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n};if("undefined"==typeof HTMLVideoElement&&isReal()&&(document_1.createElement("video"),document_1.createElement("audio"),document_1.createElement("track"),document_1.createElement("video-js")),videojs.hooks_={},videojs.hooks=function(e,t){return videojs.hooks_[e]=videojs.hooks_[e]||[],t&&(videojs.hooks_[e]=videojs.hooks_[e].concat(t)),videojs.hooks_[e]},videojs.hook=function(e,t){videojs.hooks(e,t)},videojs.hookOnce=function(e,t){videojs.hooks(e,[].concat(t).map(function(t){return function n(){return videojs.removeHook(e,n),t.apply(undefined,arguments)}}))},videojs.removeHook=function(e,t){var n=videojs.hooks(e).indexOf(t);return!(n<=-1)&&(videojs.hooks_[e]=videojs.hooks_[e].slice(),videojs.hooks_[e].splice(n,1),!0)},!0!==window_1.VIDEOJS_NO_DYNAMIC_STYLE&&isReal()){var style=$(".vjs-styles-defaults");if(!style){style=createStyleElement("vjs-styles-defaults");var head=$("head");head&&head.insertBefore(style,head.firstChild),setTextContent(style,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}autoSetupTimeout(1,videojs),videojs.VERSION=version,videojs.options=Player.prototype.options_,videojs.getPlayers=function(){return Player.players},videojs.players=Player.players,videojs.getComponent=Component.getComponent,videojs.registerComponent=function(e,t){Tech.isTech(t)&&log$2.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Component.registerComponent.call(Component,e,t)},videojs.getTech=Tech.getTech,videojs.registerTech=Tech.registerTech,videojs.use=use,videojs.browser=browser,videojs.TOUCH_ENABLED=TOUCH_ENABLED,videojs.extend=extendFn,videojs.mergeOptions=mergeOptions,videojs.bind=bind,videojs.registerPlugin=Plugin.registerPlugin,videojs.plugin=function(e,t){return log$2.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Plugin.registerPlugin(e,t)},videojs.getPlugins=Plugin.getPlugins,videojs.getPlugin=Plugin.getPlugin,videojs.getPluginVersion=Plugin.getPluginVersion,videojs.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),videojs.options.languages=mergeOptions(videojs.options.languages,(n={},n[e]=t,n)),videojs.options.languages[e]},videojs.log=log$2,videojs.createTimeRange=videojs.createTimeRanges=createTimeRanges,videojs.formatTime=formatTime,videojs.parseUrl=parseUrl,videojs.isCrossOrigin=isCrossOrigin,videojs.EventTarget=EventTarget,videojs.on=on,videojs.one=one,videojs.off=off,videojs.trigger=trigger,videojs.xhr=xhr,videojs.TextTrack=TextTrack,videojs.AudioTrack=AudioTrack,videojs.VideoTrack=VideoTrack,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){videojs[e]=function(){return log$2.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Dom[e].apply(null,arguments)}}),videojs.computedStyle=computedStyle,videojs.dom=Dom,videojs.url=Url;var enc=createCommonjsModule(function(module,exports){!function(e,t){module.exports=t()}(self,function(){return function(){function __webpack_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}var __webpack_modules__={"./node_modules/@tencent/js-armor-loader/dist/runtime.js":function node_modulesTencentJsArmorLoaderDistRuntimeJs(module){eval("function T(f,l,c,r,g,s,a,v){var h,n=!r,t=(f=+f,l=l||[0],r=r||[[this],[{}]],g=g||{},[]),o=null;function p(){return function(n,t,o){return new(Function.bind.apply(n,t))}.apply(null,arguments)}Function.prototype.bind||(h=[].slice,Function.prototype.bind=function(n){if(\"function\"!=typeof this)throw new TypeError(\"bind101\");var t=h.call(arguments,1),o=t.length,p=this,e=function(){},u=function(){return t.length=o,t.push.apply(t,arguments),p.apply(e.prototype.isPrototypeOf(this)?this:n,t)};return this.prototype&&(e.prototype=this.prototype),u.prototype=new e,u});for(var e=[function(){var n=l[f++],t=r[r.length-2-n];r[r.length-2-n]=r.pop(),r.push(t)},function(){r[r.length-2]=r[r.length-2]===r.pop()},function(){r[r.length-2]=r[r.length-2]-r.pop()},function(){r[r.length-2]=r[r.length-2]%r.pop()},function(){var n=r[r.length-2],t=Object.getOwnPropertyDescriptor(n[0],n[1])||{configurable:!0,enumerable:!0};t.get=r[r.length-1],Object.defineProperty(n[0],n[1],t)},function(){t.pop()},function(){r.push([c,r.pop()])},function(){r.push([r.pop(),r.pop()].reverse())},function(){r.push(!0)},function(){return!0},function(){var n=r[r.length-2],t=Object.getOwnPropertyDescriptor(n[0],n[1])||{configurable:!0,enumerable:!0};t.set=r[r.length-1],Object.defineProperty(n[0],n[1],t)},function(){r[r[r.length-1][0]]=r[r[r.length-1][0]]===undefined?[]:r[r[r.length-1][0]]},function(){r[r.length-2]=r[r.length-2]instanceof r.pop()},function(){o=null},function(){r[r.length-2]=r[r.length-2]<=r.pop()},function(){for(var o=l[f++],p=[],n=l[f++],t=l[f++],e=[],u=0;u<n;u++)p[l[f++]]=r[l[f++]];for(u=0;u<t;u++)e[u]=l[f++];r.push(function h(){var n=p.slice(0);n[0]=[this],n[1]=[arguments],n[2]=[h];for(var t=0;t<e.length&&t<arguments.length;t++)0<e[t]&&(n[e[t]]=[arguments[t]]);return T(o,l,c,n,g,s,a,v)})},function(){var n=l[f++];r[r.length-1]&&(f=n)},function(){r.push(!r.pop())},function(){r.push(null)},function(){r[r.length-2]=r[r.length-2]>>r.pop()},function(){r[r.length-1]+=String.fromCharCode(l[f++])},function(){r[r.length-2]=r[r.length-2]*r.pop()},function(){var n=r.pop();r.push(n[0][n[1]])},function(){var n=r.pop();r.push(delete n[0][n[1]])},function(){var n=l[f++],t=n?r.slice(-n):[];r.length-=n,r.push(r.pop().apply(c,t))},function(){return!!o},function(){var n=l[f++],t=n?r.slice(-n):[],n=(r.length-=n,r.pop());r.push(n[0][n[1]].apply(n[0],t))},function(){for(var n=r.pop(),o=l[f++],p=[],t=l[f++],e=l[f++],u=[],h=0;h<t;h++)p[l[f++]]=r[l[f++]];for(h=0;h<e;h++)u[h]=l[f++];var i=function(){var n=p.slice(0);n[0]=[this],n[1]=[arguments],n[2]=[i];for(var t=0;t<u.length&&t<arguments.length;t++)0<u[t]&&(n[u[t]]=[arguments[t]]);return T(o,l,c,n,g,s,a,v)};i.toString=function(){return n},r.push(i)},function(){r[r.length-2]=r[r.length-2]<<r.pop()},function(){var n,t=[];for(n in r.pop())t.push(n);r.push(t)},function(){var n=r[r.length-2];n[0][n[1]]=r[r.length-1]},function(){r.push(l[f++])},function(){r.length=l[f++]},function(){t.push([l[f++],r.length,l[f++]])},function(){var n=r.pop();g[n]||(c[n]=c[n](),g[n]=1),r.push(c[n])},function(){r[r.length-2]=r[r.length-2]in r.pop()},function(){r[r.length-1].length?r.push(r[r.length-1].shift(),!0):r.push(undefined,!1)},function(){r[r[r.length-2][0]][0]=r[r.length-1]},function(){r[r.length-2]=r[r.length-2]|r.pop()},function(){r[r.length-2]=r[r.length-2]<r.pop()},function(){r[r.length-2]=r[r.length-2]^r.pop()},function(){var n=l[f++];r[n]=r[n]===undefined?[]:r[n]},function(){r.push(typeof r.pop())},function(){r[r.length-2]=r[r.length-2]&r.pop()},function(){r.push(undefined)},function(){r[r.length-2]=r[r.length-2]>r.pop()},function(){},function(){r[r.length-2]=r[r.length-2]>=r.pop()},function(){r.length-=l[f++]},function(){r.push(~r.pop())},function(){r[r.length-1]=c[r[r.length-1]]},function(){r.push(\"\")},function(){var n=r.pop(),t=r.pop();r.push([t[0][t[1]],n])},function(){r[r.length-2]=r[r.length-2]>>>r.pop()},function(){r.pop()},function(){r.push(r[l[f++]][0])},function(){throw r[r.length-1]},function(){f=l[f++]},function(){r[r.length-1]=l[f++]},function(){r.push(!1)},function(){r[r.length-2]=r[r.length-2]==r.pop()},function(){r.push([l[f++]])},function(){var n=l[f++],t=n?r.slice(-n):[];r.length-=n,t.unshift(null),r.push(p(r.pop(),t))},function(){var n=r.pop();g[n]||(c[n]=c[n](),g[n]=1),r.push([c,n])},function(){r[r.length-2]=r[r.length-2]+r.pop()},function(){var n=l[f++],t=n?r.slice(-n):[],n=(r.length-=n,t.unshift(null),r.pop());r.push(p(n[0][n[1]],t))},function(){r[r.length-2]=r[r.length-2]/r.pop()},function(){r.push(r[r.length-1])},function(){r.push(r[r.pop()[0]][0])},function(){var n=r.pop();r.push([r[r.pop()][0],n])}];;)try{for(var u=!1;!u;)u=e[l[f++]]();if(o)throw o;return n?(r.pop(),r.slice(3+T.v)):r.pop()}catch(y){var i=t.pop();if(i===undefined)throw y;o=y,f=i[0],r.length=i[1],i[2]&&(r[i[2]][0]=o)}}T.v=0;\n \"use strict\";\n\n/* eslint-disable */\nfunction arrayIndexOf(arr, searchElement, fromIndex) {\n if (typeof Array.prototype.indexOf === 'function') {\n return Array.prototype.indexOf.call(arr, searchElement, fromIndex);\n }\n\n var k;\n var len = o.length;\n\n if (len === 0) {\n return -1;\n }\n\n var n = fromIndex | 0;\n\n if (n >= len) {\n return -1;\n }\n\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n for (; k < len; k++) {\n if (k in o && o[k] === searchElement) return k;\n }\n\n return -1;\n}\n\nfunction base64Decode(t) {\n var r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split('');\n var o = String(t).replace(/[=]+$/, '');\n\n for (var e, n, a = 0, i = 0, c = ''; n = o.charAt(i++); ~n && (e = a % 4 ? 64 * e + n : n, a++ % 4) ? c += String.fromCharCode(255 & e >> (-2 * a & 6)) : 0) n = arrayIndexOf(r, n);\n\n return c;\n}\n/** releaseSymbols, 识别导入的全局变量 */\n\n\nmodule.exports.r = function (symbols) {\n var result = [];\n\n for (var i = 0; i < symbols.length; i++) {\n try {\n result.push(eval(symbols[i]));\n } catch (_) {\n result.push(undefined);\n }\n }\n\n return result;\n};\n/** decompress, 解压字节码 */\n\n\nmodule.exports.d = function (arr) {\n if (typeof arr[1] !== `object`) {\n return arr;\n }\n\n var compressed = arr[0];\n var bigNumbers = arr[1];\n var restored = [];\n var bytes = base64Decode(compressed);\n var pos = bigNumbers.shift();\n var num = bigNumbers.shift();\n var current = 0;\n\n function insertBigNumber() {\n while (current === pos) {\n restored.push(num);\n current++;\n pos = bigNumbers.shift();\n num = bigNumbers.shift();\n }\n }\n\n for (var i = 0; i < bytes.length; i++) {\n var charCode = bytes.charAt(i).charCodeAt(0);\n insertBigNumber();\n restored.push(charCode);\n current++;\n }\n\n insertBigNumber();\n return restored;\n};\n/** getResult 从 vm 执行结果中获取局部变量 */\n\n\nmodule.exports.g = function (result) {\n return result.shift()[0];\n};\n/** vm */\n\n\nmodule.exports.v = T;\n \n\n//# sourceURL=webpack://enc/./node_modules/@tencent/js-armor-loader/dist/runtime.js?")},"./enc.source.js":function encSourceJs(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("\n\nvar armor = __webpack_require__(/*! !./node_modules/@tencent/js-armor-loader/dist/runtime.js */ \"./node_modules/@tencent/js-armor-loader/dist/runtime.js\");\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = void 0;\nvar _jsencrypt = _interopRequireDefault(__webpack_require__(/*! jsencrypt */ \"./node_modules/jsencrypt/lib/index.js\"));\nvar _utils = __webpack_require__(/*! ./utils */ \"./utils.js\");\nvar _aes = _interopRequireDefault(__webpack_require__(/*! ./utils/aes */ \"./utils/aes.js\"));\nvar _md = _interopRequireDefault(__webpack_require__(/*! md5 */ \"./node_modules/md5/md5.js\"));\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { 'default': obj };\n}\nfunction _typeof(obj) {\n '@babel/helpers - typeof';\n return _typeof = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && 'function' == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n }, _typeof(obj);\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps)\n _defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, 'prototype', { writable: false });\n return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, 'string');\n return _typeof(key) === 'symbol' ? key : String(key);\n}\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== 'object' || input === null)\n return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || 'default');\n if (_typeof(res) !== 'object')\n return res;\n throw new TypeError('@@toPrimitive must return a primitive value.');\n }\n return (hint === 'string' ? String : Number)(input);\n}\nvar Enc = function () {\n function Enc() {\n _classCallCheck(this, Enc);\n _defineProperty(this, 'handleWatermarkElementAdd', function (ctx) {\n if (!ctx.options.keep) {\n console.log(document.querySelector('.tcp-dynamic-watermark-container'), document.querySelector('.tcp-dynamic-watermark-content'), ctx);\n if (!ctx.player.$('.tcp-dynamic-watermark-container')) {\n ctx.player.el() && ctx.player.el().appendChild(ctx.containerElement);\n } else if (!ctx.player.$('.tcp-dynamic-watermark-content')) {\n ctx.containerElement.appendChild(ctx.markContentElement);\n }\n } else {\n if (!ctx.waterMarkWillAdd) {\n ctx.waterMarkWillAdd = true;\n setTimeout(function () {\n ctx.player && ctx.player.el() && ctx.player.el().appendChild(ctx.containerElement);\n ctx.waterMarkWillAdd = false;\n ctx.isFirstShow = false;\n }, (ctx.isFirstShow ? ctx.ghostCycle.firstShow : ctx.ghostCycle.ghostOff) * 1000);\n }\n }\n });\n }\n _createClass(Enc, [\n {\n key: 'elemManage',\n value: function elemManage(player) {\n var _this = this;\n var _self = this;\n player.on('dispose', function () {\n clearInterval(_self.timer);\n });\n this.timer = setInterval(function () {\n var safeCheckElem = document.querySelector('.safe-check-element');\n if (!safeCheckElem || safeCheckElem.style.display === 'none') {\n clearInterval(_this.timer);\n player.dispose();\n }\n }, 5000);\n }\n },\n {\n key: 'base64ToHex',\n value: function base64ToHex(str) {\n var raw = atob(str);\n var result = '';\n for (var i = 0; i < raw.length; i++) {\n var hex = raw.charCodeAt(i).toString(16);\n result += hex.length === 2 ? hex : '0' + hex;\n }\n return result;\n }\n },\n {\n key: 'checkEnvironment',\n value: function checkEnvironment() {\n if (!Hls || !Hls.isSupported()) {\n console.error('未检测到 Hls 全局变量或当前环境不支持 hls.js\\uFF0C请选择其他播放方式');\n return false;\n }\n return true;\n }\n },\n {\n key: 'checksum',\n value: function checksum(request, body) {\n return armor.g(armor.v(0,armor.d([\"IAQpAikDORsgBSkCKQMpBD0DHwA/MxRnFGUUdBRSFGUUcxRwFG8UbhRzFGUUSBRlFGEUZBRlFHI0MxRYFC0UVhRvFGQULRRDFGgUZRRjFGsUcxR1FG0aASU2Nj0EHwA6AT8zFGQUZRRmFGEUdRRsFHQ0Fh8AOgI/MxRkFGUUYxRyFHkUcBR0FG80Fj0AMxRvFHYUZRRyFGwUYRR5FEsUZRR5RRYYAR8AOgI/MxRkFGUUYxRyFHkUcBR0FG80Fj0AMxRvFHYUZRRyFGwUYRR5FEkUdkUWGAFAHwM/MxR0FHIUaRRtNBoAQBgBJTY2NwMQ9Tn8GzY3BDcDAREQNjk6NjsJCAk9Aw8JAAAlNjYsCQ==\",[7,263,253,258,256,261]]),[function() { return typeof request == 'undefined' ? undefined : request },function() { return typeof _md == 'undefined' ? undefined : _md },function() { return typeof _utils == 'undefined' ? undefined : _utils },function() { return typeof body == 'undefined' ? undefined : body }])).call(this)\n }\n },\n {\n key: 'generatePlayCgiUrl',\n value: function generatePlayCgiUrl(url, browser, skip) {\n return armor.g(armor.v(0,armor.d([\"IAQpAikDOSkgCSkCKQMpBCkFKQYpBykIPQMfADoAPzMUZxRlFG4UTxR2FGUUchRsFGEUeTQWGAAlNjY9BB8AOgA/MxRnFGUUbhRPFHYUZRRyFGwUYRR5NBYYACU2Nj0FHwE/MxRkFGUUZhRhFHUUbBR0NEEAJTY2PQYzFE0USRRHFGYUTRRBFDAURxRDFFMUcRRHFFMUSRRiFDMURBRRFEUUQhRBFFEUVRRBFEEUNBRHFE4UQRREFEMUQhRpFFEUSxRCFGcUURRDFDMUcBREFEEUNxRHFFQUeBRPFHYUThRiFFgUUhRHFE0UaRQ5FFEUUxRJFHoUURRFFEkUKxRFFE0URBQxFEgUYxRVFFAUShRTFFEUUxRGFHUUUhRrFFoUaxRXFG8UNBRWFFEURRRDFHUUUBRSFGcULxR4FFYUahRxFHcUWBQxFHkUVRRyFEgUVRR2FEcUURRKFHMUQhR3FFQUUxQvFDYUTBRJFGMUURRpFFMUdxRZFHMUTxRxFGYUKxQ4FFQUVxR4FEcUURRPFEoUeRRXFDQUNhRnFFAUUBRRFFYUehRUFGoUThRUFGkUVRRvFHEUNBQzFDUUURRCFDAUdhQxFDEUbBROFHgUdhRLFFcUQhRRFEkUWhRMFG0UYRRjFFUUWhQyFHIUMRRBFFAUdBRhFDcUaRQvFE0UWRQ0FEwUeBQ5FFgUbBRaFFYUTRRaFE4UVRRkFFUUeRR3FEkURBRBFFEUQRRCJTY2PQUzFHMUZRR0FFAUdRRiFGwUaRRjFEsUZRR5RTcGGgE2PQc9ADMUYhRhFHMUZRQ2FDQUVBRvFEgUZRR4RT0FMxRlFG4UYxRyFHkUcBR0RTcDGgEaASU2Nj0IPQAzFGIUYRRzFGUUNhQ0FFQUbxRIFGUUeEU9BTMUZRRuFGMUchR5FHAUdEU3BBoBGgElNjoCPzMUTRRlFGQUaRRhFFMUbxR1FHIUYxRlNBYQNjkwNh8CPzMUTRRlFGQUaRRhFFMUbxR1FHIUYxRlNDMUcBRyFG8UdBRvFHQUeRRwFGU0MxRlFG4UZBRPFGYUUxR0FHIUZRRhFG00MxR0FG8UUxR0FHIUaRRuFGc0GgAzFHIUZRRwFGwUYRRjFGUHHwMiMxRcFHMzFGcYAjMaAjMUZhR1FG4UYxR0FGkUbxRuFGUUbhRkFE8UZhRTFHQUchRlFGEUbRQoFCkUexRbFG4UYRR0FGkUdhRlFGMUbxRkFGUUXRR9AREQOgI/MxRNFGUUZBRpFGEUUxRvFHUUchRjFGU0MxRwFHIUbxR0FG8UdBR5FHAUZTQzFGEUZBRkFFMUbxR1FHIUYxRlFEIUdRRmFGYUZRRyNDMUdBRvFFMUdBRyFGkUbhRnNBoAMxRyFGUUcBRsFGEUYxRlBx8DIjMUXBRzMxRnGAIzGgIzFGYUdRRuFGMUdBRpFG8UbhRhFGQUZBRTFG8UdRRyFGMUZRRCFHUUZhRmFGUUchQoFCkUexRbFG4UYRR0FGkUdhRlFGMUbxRkFGUUXRR9AREQNjkpNj0HPQAzFGIUYRRzFGUUNhQ0FFQUbxRIFGUUeEU9BTMUZRRuFGMUchR5FHAUdEUfADoAPzMUZxRlFG4UTxR2FGUUchRsFGEUeTQWGAAaARoBJTY2PQg9ADMUYhRhFHMUZRQ2FDQUVBRvFEgUZRR4RT0FMxRlFG4UYxRyFHkUcBR0RR8AOgA/MxRnFGUUbhRPFHYUZRRyFGwUYRR5NBYYABoBGgElNjYfBD9DFjMUJhRjFGkUcBRoFGUUchRlFGQUTxR2FGUUchRsFGEUeRRLFGUUeRQ9MxRjFG8UbhRjFGEUdAc3BzMUJhRjFGkUcBRoFGUUchRlFGQUTxR2FGUUchRsFGEUeRRJFHYUPRoCMxRjFG8UbhRjFGEUdAc3CDMUJhRrFGUUeRRJFGQUPRQxGgJAHgAANjoFPzMUSRRTFF8URRROFEEUQhRMFEUURBRfFE0UUxRFNBYQOQA2HwU/MxRJFFMUXxRUFEIUUzQWERA5PTYfBT8zFEkUUxRfFE0UURRRFEI0FhEQOQ82HwU/MxRJFFMUXxRTFEEURhRBFFIUSTQWERA5HzYfBT8zFEkURRRfFFYURRRSFFMUSRRPFE40FhA5QTYfBT8zFEkURRRfFFYURRRSFFMUSRRPFE40Fh8LLxERERA6BiIQNjkQNh8EP0MWMxQmFG0UcxRlFD0UbxRmFGZAHgAANjoEP0MWMxQmFHEUcxRpFGcUbhQ9HwA6Bz8zFGQUZRRmFGEUdRRsFHQ0FjMUbxR2FGUUchRsFGEUeRRLFGUUeRQ9MxRjFG8UbhRjFGEUdAc3AzMUJhRvFHYUZRRyFGwUYRR5FEkUdhQ9GgIzFGMUbxRuFGMUYRR0BzcEMxQmFG0UcxRlFD0UbxRmFGYaAhgBQEAeNjY9ADMUbxR2FGUUchRsFGEUeRRLFGUUeUUfADoAPzMUZRRuFGMUchR5FHAUdBRvNBY3AxgBHjY2PQAzFG8UdhRlFHIUbBRhFHkUSRR2RR8AOgA/MxRlFG4UYxRyFHkUcBR0FG80FjcEGAEeAAA2OgQiCT0DDwkAACU2NiwJ\",[7,1949,730,735,733,1319,933,1146,1147,1152,1150,1319,1497,1501,1499,1521,1522,1526,1524,1548,1549,1553,1551,1579,1580,1584,1582,1648,1612,1616,1614,1647,1650,1654,1655,1660,1658,1836]]),[function() { return typeof _utils == 'undefined' ? undefined : _utils },function() { return typeof _jsencrypt == 'undefined' ? undefined : _jsencrypt },function() { return typeof window == 'undefined' ? undefined : window },function() { return typeof RegExp == 'undefined' ? undefined : RegExp },function() { return typeof url == 'undefined' ? undefined : url },function() { return typeof browser == 'undefined' ? undefined : browser },function() { return typeof skip == 'undefined' ? undefined : skip },function() { return typeof _md == 'undefined' ? undefined : _md }])).call(this)\n }\n },\n {\n key: 'generateKey',\n value: function generateKey(key) {\n var responseKey = new Uint8Array(key);\n var decryptedKey;\n if (this.overlayKey && this.overlayIv) {\n var keyArray = [];\n var ivArray = [];\n for (var i = 0; i < 16; i++) {\n var _key = this.overlayKey.substring(i * 2, i * 2 + 2);\n var _iv = this.overlayIv.substring(i * 2, i * 2 + 2);\n keyArray.push(parseInt(_key, 16));\n ivArray.push(parseInt(_iv, 16));\n }\n var aesCbc = new _aes['default'].modeOfOperation.cbc(keyArray, ivArray);\n decryptedKey = aesCbc.decrypt(responseKey);\n }\n return decryptedKey || responseKey;\n }\n },\n {\n key: 'calculateGhost',\n value: function calculateGhost(duration) {\n var period = duration / 4;\n var ghostCycle;\n if (period <= 15) {\n ghostCycle = duration / 2;\n } else if (period <= 30 * 60 / 4) {\n ghostCycle = duration / 4;\n } else {\n ghostCycle = 30 * 60 / 4;\n }\n var ghostOn = ghostCycle / 4;\n var ghostOff = ghostCycle - ghostOn;\n return {\n firstShow: localStorage.getItem('ghostWatermarkFirstShow') || Math.random() * ghostOff + 0.01,\n ghostOn: ghostOn,\n ghostOff: ghostOff\n };\n }\n }\n ]);\n return Enc;\n}();\nvar _default = Enc;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://enc/./enc.source.js?")},"./utils.js":function utilsJs(__unused_webpack_module,exports,__webpack_require__){"use strict"
|
|
9
9
|
;eval("\n\nvar armor = __webpack_require__(/*! !./node_modules/@tencent/js-armor-loader/dist/runtime.js */ \"./node_modules/@tencent/js-armor-loader/dist/runtime.js\");\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.decrypto = decrypto;\nexports.encrypto = encrypto;\nexports.genOverlay = genOverlay;\nexports.getRandomInt = getRandomInt;\nexports.loadScript = loadScript;\nfunction loadScript(src, callback, attrs) {\n var remove = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var tag = document.createElement('script');\n tag.onload = tag.onreadystatechange = function () {\n if (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete') {\n if (typeof callback == 'function') {\n callback();\n }\n tag.onload = tag.onreadystatechange = null;\n if (tag.parentNode && !remove) {\n tag.parentNode.removeChild(tag);\n }\n }\n };\n if (attrs) {\n for (var k in attrs) {\n if (!attrs.hasOwnProperty(k))\n continue;\n var attr = attrs[k];\n if (attr === null)\n tag.removeAttribute(attr);\n else\n tag.setAttribute(k, attr);\n }\n }\n tag.src = src;\n document.getElementsByTagName('head')[0].appendChild(tag);\n}\nfunction genOverlay() {\n var key = '';\n var array = [\n '0',\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n 'a',\n 'b',\n 'c',\n 'd',\n 'e',\n 'f'\n ];\n for (var i = 0; i < 32; i++) {\n var randomInt = getRandomInt(0, 15);\n key += array[randomInt];\n }\n return key;\n}\nfunction getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction encrypto(str) {\n return armor.g(armor.v(0,armor.d([\"IAQpAikDORsgCikCKQMpBCkFKQYpBykIKQkfACIqMxRzFHQUchRpFG4UZwEREDQ2OTcpNiwJPQMfASI+ACU2Nj0EHxklNjY9BR97JTY2PQYfACU2Nj0GRB8APzMUbBRlFG4UZxR0FGg0Fi8REHM2OegPNj0HHwA/MxRjFGgUYRRyFEMUbxRkFGUUQRR0NDcGGgElNjY9BzcHHwEVNwUoJTY2PQc9BzMUdBRvFFMUdBRyFGkUbhRnRTcEGgElNjY9AzMUcBR1FHMUaEU3BxoBNj0GQ0RDAAEAAB8BQCU2OgAAACY2OVYbPQgfAj8zFGYUchRvFG0UQxRoFGEUchRDFG8UZBRlNDcEH2FAGgElNjY9CT0DMxRqFG8UaRRuRTcIGgElNjY3CQk9Aw8JAAAlNjYsCQ==\",[7,297]]),[function() { return typeof str == 'undefined' ? undefined : str },function() { return typeof Array == 'undefined' ? undefined : Array },function() { return typeof String == 'undefined' ? undefined : String }])).call(this)\n}\nfunction decrypto(str) {\n return armor.g(armor.v(0,armor.d([\"IAQpAikDOT4gDCkCKQMpBCkFKQYpBykIKQkpCikLHwAiKjMUcxR0FHIUaRRuFGcBERA4Njk7GjYsCT0DHwEiPgAlNjY9BB8BIj4AJTY2PQUfGSU2Nj0GH3slNjY9Bx8CPzMUZhRyFG8UbRRDFGgUYRRyFEMUbxRkFGU0NwUfYUAaASU2Nj0DHwA/MxRzFHAUbBRpFHQ0NwcaASU2Nj0IHwAlNjY9CEQ9AzMUbBRlFG4UZxR0FGhFFi8REME2ORA2PQkfAz89AzcIRRY3BRoCJTY2PQk3CR8BFTcGKCU2Nj0KHwI/MxRmFHIUbxRtFEMUaBRhFHIUQxRvFGQUZTQ3CRoBJTY2PQQzFHAUdRRzFGhFNwoaATY9CENEQwABAAAfAUAlNjoAAAAmNjmlGj0LPQQzFGoUbxRpFG5FMxoBJTY2NwsJPQMPCQAAJTY2LAk=\",[7,326,191,303]]),[function() { return typeof str == 'undefined' ? undefined : str },function() { return typeof Array == 'undefined' ? undefined : Array },function() { return typeof String == 'undefined' ? undefined : String },function() { return typeof parseInt == 'undefined' ? undefined : parseInt }])).call(this)\n}\n\n//# sourceURL=webpack://enc/./utils.js?")},"./utils/aes.js":function utilsAesJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict"
|
|
10
10
|
;eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */\n// (function (root) {\n\n\nfunction checkInt(value) {\n return parseInt(value) === value;\n}\nfunction checkInts(arrayish) {\n if (!checkInt(arrayish.length)) {\n return false;\n }\n for (var i = 0; i < arrayish.length; i++) {\n if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {\n return false;\n }\n }\n return true;\n}\nfunction coerceArray(arg, copy) {\n // ArrayBuffer view\n if (arg.buffer && arg.name === 'Uint8Array') {\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n return arg;\n }\n\n // It's an array; check it is a valid representation of a byte\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error('Array contains invalid value: ' + arg);\n }\n return new Uint8Array(arg);\n }\n\n // Something else, but behaves like an array (maybe a Buffer? Arguments?)\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n throw new Error('unsupported array-like object');\n}\nfunction createArray(length) {\n return new Uint8Array(length);\n}\nfunction copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n}\nvar convertUtf8 = function () {\n function toBytes(text) {\n var result = [];\n var i = 0;\n text = encodeURI(text);\n while (i < text.length) {\n var c = text.charCodeAt(i++);\n\n // if it is a % sign, encode the following 2 bytes as a hex value\n if (c === 37) {\n result.push(parseInt(text.substr(i, 2), 16));\n i += 2;\n\n // otherwise, just the actual byte\n } else {\n result.push(c);\n }\n }\n return coerceArray(result);\n }\n function fromBytes(bytes) {\n var result = [];\n var i = 0;\n while (i < bytes.length) {\n var c = bytes[i];\n if (c < 128) {\n result.push(String.fromCharCode(c));\n i++;\n } else if (c > 191 && c < 224) {\n result.push(String.fromCharCode((c & 0x1f) << 6 | bytes[i + 1] & 0x3f));\n i += 2;\n } else {\n result.push(String.fromCharCode((c & 0x0f) << 12 | (bytes[i + 1] & 0x3f) << 6 | bytes[i + 2] & 0x3f));\n i += 3;\n }\n }\n return result.join('');\n }\n return {\n toBytes: toBytes,\n fromBytes: fromBytes\n };\n}();\nvar convertHex = function () {\n function toBytes(text) {\n var result = [];\n for (var i = 0; i < text.length; i += 2) {\n result.push(parseInt(text.substr(i, 2), 16));\n }\n return result;\n }\n\n // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html\n var Hex = '0123456789abcdef';\n function fromBytes(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i++) {\n var v = bytes[i];\n result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]);\n }\n return result.join('');\n }\n return {\n toBytes: toBytes,\n fromBytes: fromBytes\n };\n}();\n\n// Number of rounds by keysize\nvar numberOfRounds = {\n 16: 10,\n 24: 12,\n 32: 14\n};\n\n// Round constant words\nvar rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];\n\n// S-box and Inverse S-box (S is for Substitution)\nvar S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16];\nvar Si = [0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];\n\n// Transformations for encryption\nvar T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];\nvar T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];\nvar T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];\nvar T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];\n\n// Transformations for decryption\nvar T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];\nvar T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];\nvar T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];\nvar T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];\n\n// Transformations for decryption key expansion\nvar U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];\nvar U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];\nvar U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];\nvar U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];\nfunction convertToInt32(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i += 4) {\n result.push(bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]);\n }\n return result;\n}\nvar AES = function AES(key) {\n if (!(this instanceof AES)) {\n throw Error('AES must be instanitated with `new`');\n }\n Object.defineProperty(this, 'key', {\n value: coerceArray(key, true)\n });\n this._prepare();\n};\nAES.prototype._prepare = function () {\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error('invalid key size (must be 16, 24 or 32 bytes)');\n }\n\n // encryption round keys\n this._Ke = [];\n\n // decryption round keys\n this._Kd = [];\n for (var i = 0; i <= rounds; i++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n\n // convert the key into ints\n var tk = convertToInt32(this.key);\n\n // copy values into round key arrays\n var index;\n for (var i = 0; i < KC; i++) {\n index = i >> 2;\n this._Ke[index][i % 4] = tk[i];\n this._Kd[rounds - index][i % 4] = tk[i];\n }\n\n // key expansion (fips-197 section 5.2)\n var rconpointer = 0;\n var t = KC;\n var tt;\n while (t < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= S[tt >> 16 & 0xFF] << 24 ^ S[tt >> 8 & 0xFF] << 16 ^ S[tt & 0xFF] << 8 ^ S[tt >> 24 & 0xFF] ^ rcon[rconpointer] << 24;\n rconpointer += 1;\n\n // key expansion (for non-256 bit)\n if (KC != 8) {\n for (var i = 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n\n // key expansion for 256-bit keys is \"slightly different\" (fips-197)\n } else {\n for (var i = 1; i < KC / 2; i++) {\n tk[i] ^= tk[i - 1];\n }\n tt = tk[KC / 2 - 1];\n tk[KC / 2] ^= S[tt & 0xFF] ^ S[tt >> 8 & 0xFF] << 8 ^ S[tt >> 16 & 0xFF] << 16 ^ S[tt >> 24 & 0xFF] << 24;\n for (var i = KC / 2 + 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n }\n\n // copy values into round key arrays\n var i = 0;\n var r;\n var c;\n while (i < KC && t < roundKeyCount) {\n r = t >> 2;\n c = t % 4;\n this._Ke[r][c] = tk[i];\n this._Kd[rounds - r][c] = tk[i++];\n t++;\n }\n }\n\n // inverse-cipher-ify the decryption round key (fips-197 section 5.3)\n for (var r = 1; r < rounds; r++) {\n for (var c = 0; c < 4; c++) {\n tt = this._Kd[r][c];\n this._Kd[r][c] = U1[tt >> 24 & 0xFF] ^ U2[tt >> 16 & 0xFF] ^ U3[tt >> 8 & 0xFF] ^ U4[tt & 0xFF];\n }\n }\n};\nAES.prototype.encrypt = function (plaintext) {\n if (plaintext.length != 16) {\n throw new Error('invalid plaintext size (must be 16 bytes)');\n }\n var rounds = this._Ke.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(plaintext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Ke[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = T1[t[i] >> 24 & 0xff] ^ T2[t[(i + 1) % 4] >> 16 & 0xff] ^ T3[t[(i + 2) % 4] >> 8 & 0xff] ^ T4[t[(i + 3) % 4] & 0xff] ^ this._Ke[r][i];\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16);\n var tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Ke[rounds][i];\n result[4 * i] = (S[t[i] >> 24 & 0xff] ^ tt >> 24) & 0xff;\n result[4 * i + 1] = (S[t[(i + 1) % 4] >> 16 & 0xff] ^ tt >> 16) & 0xff;\n result[4 * i + 2] = (S[t[(i + 2) % 4] >> 8 & 0xff] ^ tt >> 8) & 0xff;\n result[4 * i + 3] = (S[t[(i + 3) % 4] & 0xff] ^ tt) & 0xff;\n }\n return result;\n};\nAES.prototype.decrypt = function (ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error('invalid ciphertext size (must be 16 bytes)');\n }\n var rounds = this._Kd.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(ciphertext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Kd[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = T5[t[i] >> 24 & 0xff] ^ T6[t[(i + 3) % 4] >> 16 & 0xff] ^ T7[t[(i + 2) % 4] >> 8 & 0xff] ^ T8[t[(i + 1) % 4] & 0xff] ^ this._Kd[r][i];\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16);\n var tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Kd[rounds][i];\n result[4 * i] = (Si[t[i] >> 24 & 0xff] ^ tt >> 24) & 0xff;\n result[4 * i + 1] = (Si[t[(i + 3) % 4] >> 16 & 0xff] ^ tt >> 16) & 0xff;\n result[4 * i + 2] = (Si[t[(i + 2) % 4] >> 8 & 0xff] ^ tt >> 8) & 0xff;\n result[4 * i + 3] = (Si[t[(i + 1) % 4] & 0xff] ^ tt) & 0xff;\n }\n return result;\n};\n\n/**\n * Mode Of Operation - Cipher Block Chaining (CBC)\n */\nvar ModeOfOperationCBC = function ModeOfOperationCBC(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error('AES must be instanitated with `new`');\n }\n this.description = 'Cipher Block Chaining';\n this.name = 'cbc';\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n this._lastCipherblock = coerceArray(iv, true);\n this._aes = new AES(key);\n};\nModeOfOperationCBC.prototype.encrypt = function (plaintext) {\n plaintext = coerceArray(plaintext);\n if (plaintext.length % 16 !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n for (var j = 0; j < 16; j++) {\n block[j] ^= this._lastCipherblock[j];\n }\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i);\n }\n return ciphertext;\n};\nModeOfOperationCBC.prototype.decrypt = function (ciphertext) {\n ciphertext = coerceArray(ciphertext);\n if (ciphertext.length % 16 !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n for (var j = 0; j < 16; j++) {\n plaintext[i + j] = block[j] ^ this._lastCipherblock[j];\n }\n copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);\n }\n return plaintext;\n};\n\n/**\n * Counter object for CTR common mode of operation\n */\nvar Counter = function Counter(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error('Counter must be instanitated with `new`');\n }\n\n // We allow 0, but anything false-ish uses the default 1\n if (initialValue !== 0 && !initialValue) {\n initialValue = 1;\n }\n if (typeof initialValue === 'number') {\n this._counter = createArray(16);\n this.setValue(initialValue);\n } else {\n this.setBytes(initialValue);\n }\n};\nCounter.prototype.setValue = function (value) {\n if (typeof value !== 'number' || parseInt(value) != value) {\n throw new Error('invalid counter value (must be an integer)');\n }\n\n // We cannot safely handle numbers beyond the safe range for integers\n if (value > Number.MAX_SAFE_INTEGER) {\n throw new Error('integer value out of safe range');\n }\n for (var index = 15; index >= 0; --index) {\n this._counter[index] = value % 256;\n value = parseInt(value / 256);\n }\n};\nCounter.prototype.setBytes = function (bytes) {\n bytes = coerceArray(bytes, true);\n if (bytes.length != 16) {\n throw new Error('invalid counter bytes size (must be 16 bytes)');\n }\n this._counter = bytes;\n};\nCounter.prototype.increment = function () {\n for (var i = 15; i >= 0; i--) {\n if (this._counter[i] === 255) {\n this._counter[i] = 0;\n } else {\n this._counter[i]++;\n break;\n }\n }\n};\n\n/// ////////////////////\n// Padding\n\n// See:https://tools.ietf.org/html/rfc2315\nfunction pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - data.length % 16;\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i = data.length; i < result.length; i++) {\n result[i] = padder;\n }\n return result;\n}\nfunction pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) {\n throw new Error('PKCS#7 invalid length');\n }\n var padder = data[data.length - 1];\n if (padder > 16) {\n throw new Error('PKCS#7 padding byte out of range');\n }\n var length = data.length - padder;\n for (var i = 0; i < padder; i++) {\n if (data[length + i] !== padder) {\n throw new Error('PKCS#7 invalid padding byte');\n }\n }\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\n return result;\n}\n\n/// ////////////////////\n// Exporting\n\n// The block cipher\nvar aesjs = {\n AES: AES,\n Counter: Counter,\n modeOfOperation: {\n cbc: ModeOfOperationCBC\n },\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n _arrayTest: {\n coerceArray: coerceArray,\n createArray: createArray,\n copyArray: copyArray\n }\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (aesjs);\n\n// node.js\n// if (typeof exports !== 'undefined') {\n// module.exports = aesjs;\n\n// // RequireJS/AMD\n// // http://www.requirejs.org/docs/api.html\n// // https://github.com/amdjs/amdjs-api/wiki/AMD\n// // eslint-disable-next-line no-undef\n// } else if (typeof (define) === 'function' && define.amd) {\n// // eslint-disable-next-line no-undef\n// define([], function () {\n// return aesjs;\n// });\n\n// // Web Browsers\n// } else {\n// // If there was an existing library at \"aesjs\" make sure it's still available\n// if (root.aesjs) {\n// aesjs._aesjs = root.aesjs;\n// }\n\n// root.aesjs = aesjs;\n// }\n// })(this);\n\n//# sourceURL=webpack://enc/./utils/aes.js?")
|
|
11
11
|
},"./node_modules/charenc/charenc.js":function node_modulesCharencCharencJs(module){eval("var charenc = {\n // UTF-8 encoding\n utf8: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n }\n },\n\n // Binary encoding\n bin: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n for (var bytes = [], i = 0; i < str.length; i++)\n bytes.push(str.charCodeAt(i) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n for (var str = [], i = 0; i < bytes.length; i++)\n str.push(String.fromCharCode(bytes[i]));\n return str.join('');\n }\n }\n};\n\nmodule.exports = charenc;\n\n\n//# sourceURL=webpack://enc/./node_modules/charenc/charenc.js?")},"./node_modules/crypt/crypt.js":function node_modulesCryptCryptJs(module){eval("(function() {\n var base64map\n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n crypt = {\n // Bit-wise rotation left\n rotl: function(n, b) {\n return (n << b) | (n >>> (32 - b));\n },\n\n // Bit-wise rotation right\n rotr: function(n, b) {\n return (n << (32 - b)) | (n >>> b);\n },\n\n // Swap big-endian to little-endian and vice versa\n endian: function(n) {\n // If number given, swap endian\n if (n.constructor == Number) {\n return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n }\n\n // Else, assume array and swap all items\n for (var i = 0; i < n.length; i++)\n n[i] = crypt.endian(n[i]);\n return n;\n },\n\n // Generate an array of any length of random bytes\n randomBytes: function(n) {\n for (var bytes = []; n > 0; n--)\n bytes.push(Math.floor(Math.random() * 256));\n return bytes;\n },\n\n // Convert a byte array to big-endian 32-bit words\n bytesToWords: function(bytes) {\n for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n words[b >>> 5] |= bytes[i] << (24 - b % 32);\n return words;\n },\n\n // Convert big-endian 32-bit words to a byte array\n wordsToBytes: function(words) {\n for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a hex string\n bytesToHex: function(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n hex.push((bytes[i] >>> 4).toString(16));\n hex.push((bytes[i] & 0xF).toString(16));\n }\n return hex.join('');\n },\n\n // Convert a hex string to a byte array\n hexToBytes: function(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n return bytes;\n },\n\n // Convert a byte array to a base-64 string\n bytesToBase64: function(bytes) {\n for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n for (var j = 0; j < 4; j++)\n if (i * 8 + j * 6 <= bytes.length * 8)\n base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n else\n base64.push('=');\n }\n return base64.join('');\n },\n\n // Convert a base-64 string to a byte array\n base64ToBytes: function(base64) {\n // Remove non-base-64 characters\n base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n imod4 = ++i % 4) {\n if (imod4 == 0) continue;\n bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n }\n return bytes;\n }\n };\n\n module.exports = crypt;\n})();\n\n\n//# sourceURL=webpack://enc/./node_modules/crypt/crypt.js?")},"./node_modules/is-buffer/index.js":function node_modulesIsBufferIndexJs(module){eval("/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n\n//# sourceURL=webpack://enc/./node_modules/is-buffer/index.js?")},"./node_modules/jsencrypt/lib/JSEncrypt.js":function node_modulesJsencryptLibJSEncryptJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ JSEncrypt: () => (/* binding */ JSEncrypt)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ \"./node_modules/jsencrypt/lib/lib/jsbn/base64.js\");\n/* harmony import */ var _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./JSEncryptRSAKey */ \"./node_modules/jsencrypt/lib/JSEncryptRSAKey.js\");\nvar _a;\n\n\nvar version = typeof process !== 'undefined'\n ? (_a = process.env) === null || _a === void 0 ? void 0 : _a.npm_package_version\n : undefined;\n/**\n *\n * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour\n * possible parameters are:\n * - default_key_size {number} default: 1024 the key size in bit\n * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent\n * - log {boolean} default: false whether log warn/error or not\n * @constructor\n */\nvar JSEncrypt = /** @class */ (function () {\n function JSEncrypt(options) {\n if (options === void 0) { options = {}; }\n options = options || {};\n this.default_key_size = options.default_key_size\n ? parseInt(options.default_key_size, 10)\n : 1024;\n this.default_public_exponent = options.default_public_exponent || \"010001\"; // 65537 default openssl public exponent for rsa key type\n this.log = options.log || false;\n // The private and public key.\n this.key = null;\n }\n /**\n * Method to set the rsa key parameter (one method is enough to set both the public\n * and the private key, since the private key contains the public key paramenters)\n * Log a warning if logs are enabled\n * @param {Object|string} key the pem encoded string or an object (with or without header/footer)\n * @public\n */\n JSEncrypt.prototype.setKey = function (key) {\n if (this.log && this.key) {\n console.warn(\"A key was already set, overriding existing.\");\n }\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey(key);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPrivateKey = function (privkey) {\n // Create the key.\n this.setKey(privkey);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPublicKey = function (pubkey) {\n // Sets the public key.\n this.setKey(pubkey);\n };\n /**\n * Proxy method for RSAKey object's decrypt, decrypt the string using the private\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str base64 encoded crypted string to decrypt\n * @return {string} the decrypted string\n * @public\n */\n JSEncrypt.prototype.decrypt = function (str) {\n // Return the decrypted string.\n try {\n return this.getKey().decrypt((0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's encrypt, encrypt the string using the public\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str the string to encrypt\n * @return {string} the encrypted string encoded in base64\n * @public\n */\n JSEncrypt.prototype.encrypt = function (str) {\n // Return the encrypted string.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().encrypt(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's sign.\n * @param {string} str the string to sign\n * @param {function} digestMethod hash method\n * @param {string} digestName the name of the hash algorithm\n * @return {string} the signature encoded in base64\n * @public\n */\n JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {\n // return the RSA signature of 'str' in 'hex' format.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().sign(str, digestMethod, digestName));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's verify.\n * @param {string} str the string to verify\n * @param {string} signature the signature encoded in base64 to compare the string to\n * @param {function} digestMethod hash method\n * @return {boolean} whether the data and signature match\n * @public\n */\n JSEncrypt.prototype.verify = function (str, signature, digestMethod) {\n // Return the decrypted 'digest' of the signature.\n try {\n return this.getKey().verify(str, (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(signature), digestMethod);\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object\n * will be created and returned\n * @param {callback} [cb] the callback to be called if we want the key to be generated\n * in an async fashion\n * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object\n * @public\n */\n JSEncrypt.prototype.getKey = function (cb) {\n // Only create new if it does not exist.\n if (!this.key) {\n // Get a new private key.\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey();\n if (cb && {}.toString.call(cb) === \"[object Function]\") {\n this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);\n return;\n }\n // Generate the key.\n this.key.generate(this.default_key_size, this.default_public_exponent);\n }\n return this.key;\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateKey();\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateBaseKeyB64();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicKey();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicBaseKeyB64();\n };\n JSEncrypt.version = version;\n return JSEncrypt;\n}());\n\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/JSEncrypt.js?")},"./node_modules/jsencrypt/lib/JSEncryptRSAKey.js":function node_modulesJsencryptLibJSEncryptRSAKeyJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ JSEncryptRSAKey: () => (/* binding */ JSEncryptRSAKey)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ "./node_modules/jsencrypt/lib/lib/jsbn/base64.js");\n/* harmony import */ var _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/asn1js/hex */ "./node_modules/jsencrypt/lib/lib/asn1js/hex.js");\n/* harmony import */ var _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/asn1js/base64 */ "./node_modules/jsencrypt/lib/lib/asn1js/base64.js");\n/* harmony import */ var _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/asn1js/asn1 */ "./node_modules/jsencrypt/lib/lib/asn1js/asn1.js");\n/* harmony import */ var _lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/jsbn/rsa */ "./node_modules/jsencrypt/lib/lib/jsbn/rsa.js");\n/* harmony import */ var _lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/jsbn/jsbn */ "./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js");\n/* harmony import */ var _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/jsrsasign/asn1-1.0 */ "./node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n\n\n/**\n * Create a new JSEncryptRSAKey that extends Tom Wu\'s RSA key object.\n * This object is just a decorator for parsing the key parameter\n * @param {string|Object} key - The key in string format, or an object containing\n * the parameters needed to build a RSAKey object.\n * @constructor\n */\nvar JSEncryptRSAKey = /** @class */ (function (_super) {\n __extends(JSEncryptRSAKey, _super);\n function JSEncryptRSAKey(key) {\n var _this = _super.call(this) || this;\n // Call the super constructor.\n // RSAKey.call(this);\n // If a key key was provided.\n if (key) {\n // If this is a string...\n if (typeof key === "string") {\n _this.parseKey(key);\n }\n else if (JSEncryptRSAKey.hasPrivateKeyProperty(key) ||\n JSEncryptRSAKey.hasPublicKeyProperty(key)) {\n // Set the values for the key.\n _this.parsePropertiesFrom(key);\n }\n }\n return _this;\n }\n /**\n * Method to parse a pem encoded string containing both a public or private key.\n * The method will translate the pem encoded string in a der encoded string and\n * will parse private key and public key parameters. This method accepts public key\n * in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).\n *\n * @todo Check how many rsa formats use the same format of pkcs #1.\n *\n * The format is defined as:\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * it\'s possible to examine the structure of the keys obtained from openssl using\n * an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/\n * @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer\n * @private\n */\n JSEncryptRSAKey.prototype.parseKey = function (pem) {\n try {\n var modulus = 0;\n var public_exponent = 0;\n var reHex = /^\\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\\s*)+$/;\n var der = reHex.test(pem) ? _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__.Hex.decode(pem) : _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__.Base64.unarmor(pem);\n var asn1 = _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__.ASN1.decode(der);\n // Fixes a bug with OpenSSL 1.0+ private keys\n if (asn1.sub.length === 3) {\n asn1 = asn1.sub[2].sub[0];\n }\n if (asn1.sub.length === 9) {\n // Parse the private key.\n modulus = asn1.sub[1].getHexStringValue(); // bigint\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = asn1.sub[2].getHexStringValue(); // int\n this.e = parseInt(public_exponent, 16);\n var private_exponent = asn1.sub[3].getHexStringValue(); // bigint\n this.d = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(private_exponent, 16);\n var prime1 = asn1.sub[4].getHexStringValue(); // bigint\n this.p = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(prime1, 16);\n var prime2 = asn1.sub[5].getHexStringValue(); // bigint\n this.q = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(prime2, 16);\n var exponent1 = asn1.sub[6].getHexStringValue(); // bigint\n this.dmp1 = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(exponent1, 16);\n var exponent2 = asn1.sub[7].getHexStringValue(); // bigint\n this.dmq1 = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(exponent2, 16);\n var coefficient = asn1.sub[8].getHexStringValue(); // bigint\n this.coeff = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(coefficient, 16);\n }\n else if (asn1.sub.length === 2) {\n if (asn1.sub[0].sub) {\n // Parse ASN.1 SubjectPublicKeyInfo type as defined by X.509\n var bit_string = asn1.sub[1];\n var sequence = bit_string.sub[0];\n modulus = sequence.sub[0].getHexStringValue();\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = sequence.sub[1].getHexStringValue();\n this.e = parseInt(public_exponent, 16);\n }\n else {\n // Parse ASN.1 RSAPublicKey type as defined by PKCS #1\n modulus = asn1.sub[0].getHexStringValue();\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = asn1.sub[1].getHexStringValue();\n this.e = parseInt(public_exponent, 16);\n }\n }\n else {\n return false;\n }\n return true;\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Translate rsa parameters in a hex encoded string representing the rsa key.\n *\n * The translation follow the ASN.1 notation :\n * RSAPrivateKey ::= SEQUENCE {\n * version Version,\n * modulus INTEGER, -- n\n * publicExponent INTEGER, -- e\n * privateExponent INTEGER, -- d\n * prime1 INTEGER, -- p\n * prime2 INTEGER, -- q\n * exponent1 INTEGER, -- d mod (p1)\n * exponent2 INTEGER, -- d mod (q-1)\n * coefficient INTEGER, -- (inverse of q) mod p\n * }\n * @returns {string} DER Encoded String representing the rsa private key\n * @private\n */\n JSEncryptRSAKey.prototype.getPrivateBaseKey = function () {\n var options = {\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: 0 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.n }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: this.e }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.d }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.p }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.q }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.dmp1 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.dmq1 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.coeff }),\n ],\n };\n var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence(options);\n return seq.getEncodedHex();\n };\n /**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPrivateBaseKeyB64 = function () {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getPrivateBaseKey());\n };\n /**\n * Translate rsa parameters in a hex encoded string representing the rsa public key.\n * The representation follow the ASN.1 notation :\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * @returns {string} DER Encoded String representing the rsa public key\n * @private\n */\n JSEncryptRSAKey.prototype.getPublicBaseKey = function () {\n var first_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERNull(),\n ],\n });\n var second_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.n }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: this.e }),\n ],\n });\n var bit_string = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERBitString({\n hex: "00" + second_sequence.getEncodedHex(),\n });\n var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [first_sequence, bit_string],\n });\n return seq.getEncodedHex();\n };\n /**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function () {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getPublicBaseKey());\n };\n /**\n * wrap the string in block of width chars. The default value for rsa keys is 64\n * characters.\n * @param {string} str the pem encoded string without header and footer\n * @param {Number} [width=64] - the length the string has to be wrapped at\n * @returns {string}\n * @private\n */\n JSEncryptRSAKey.wordwrap = function (str, width) {\n width = width || 64;\n if (!str) {\n return str;\n }\n var regex = "(.{1," + width + "})( +|$\\n?)|(.{1," + width + "})";\n return str.match(RegExp(regex, "g")).join("\\n");\n };\n /**\n * Retrieve the pem encoded private key\n * @returns {string} the pem encoded private key with header/footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPrivateKey = function () {\n var key = "-----BEGIN RSA PRIVATE KEY-----\\n";\n key += JSEncryptRSAKey.wordwrap(this.getPrivateBaseKeyB64()) + "\\n";\n key += "-----END RSA PRIVATE KEY-----";\n return key;\n };\n /**\n * Retrieve the pem encoded public key\n * @returns {string} the pem encoded public key with header/footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPublicKey = function () {\n var key = "-----BEGIN PUBLIC KEY-----\\n";\n key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + "\\n";\n key += "-----END PUBLIC KEY-----";\n return key;\n };\n /**\n * Check if the object contains the necessary parameters to populate the rsa modulus\n * and public exponent parameters.\n * @param {Object} [obj={}] - An object that may contain the two public key\n * parameters\n * @returns {boolean} true if the object contains both the modulus and the public exponent\n * properties (n and e)\n * @todo check for types of n and e. N should be a parseable bigInt object, E should\n * be a parseable integer number\n * @private\n */\n JSEncryptRSAKey.hasPublicKeyProperty = function (obj) {\n obj = obj || {};\n return obj.hasOwnProperty("n") && obj.hasOwnProperty("e");\n };\n /**\n * Check if the object contains ALL the parameters of an RSA key.\n * @param {Object} [obj={}] - An object that may contain nine rsa key\n * parameters\n * @returns {boolean} true if the object contains all the parameters needed\n * @todo check for types of the parameters all the parameters but the public exponent\n * should be parseable bigint objects, the public exponent should be a parseable integer number\n * @private\n */\n JSEncryptRSAKey.hasPrivateKeyProperty = function (obj) {\n obj = obj || {};\n return (obj.hasOwnProperty("n") &&\n obj.hasOwnProperty("e") &&\n obj.hasOwnProperty("d") &&\n obj.hasOwnProperty("p") &&\n obj.hasOwnProperty("q") &&\n obj.hasOwnProperty("dmp1") &&\n obj.hasOwnProperty("dmq1") &&\n obj.hasOwnProperty("coeff"));\n };\n /**\n * Parse the properties of obj in the current rsa object. Obj should AT LEAST\n * include the modulus and public exponent (n, e) parameters.\n * @param {Object} obj - the object containing rsa parameters\n * @private\n */\n JSEncryptRSAKey.prototype.parsePropertiesFrom = function (obj) {\n this.n = obj.n;\n this.e = obj.e;\n if (obj.hasOwnProperty("d")) {\n this.d = obj.d;\n this.p = obj.p;\n this.q = obj.q;\n this.dmp1 = obj.dmp1;\n this.dmq1 = obj.dmq1;\n this.coeff = obj.coeff;\n }\n };\n return JSEncryptRSAKey;\n}(_lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__.RSAKey));\n\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/JSEncryptRSAKey.js?')},"./node_modules/jsencrypt/lib/index.js":function node_modulesJsencryptLibIndexJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ JSEncrypt: () => (/* reexport safe */ _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__.JSEncrypt),\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./JSEncrypt */ "./node_modules/jsencrypt/lib/JSEncrypt.js");\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_JSEncrypt__WEBPACK_IMPORTED_MODULE_0__.JSEncrypt);\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/index.js?')},"./node_modules/jsencrypt/lib/lib/asn1js/asn1.js":function node_modulesJsencryptLibLibAsn1jsAsn1Js(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tcplayer.js",
|
|
3
3
|
"description": "腾讯云 Web 播放器",
|
|
4
|
-
"version": "4.8.0-beta.
|
|
4
|
+
"version": "4.8.0-beta.4",
|
|
5
5
|
"main": "./dist/tcplayer.v4.8.0.min.js",
|
|
6
6
|
"style": "./dist/tcplayer.min.css",
|
|
7
7
|
"copyright": "Copyright Brightcove, Inc. <https://www.brightcove.com/>",
|