56effa6ddfe05037ba06cc807a20dc5756a9b6f4352483965865360c9ede2408

Source Code:

(function(e,t){if(typeof define==="function"&&define.amd){define("bc",[],function(){var r=t.apply(this,arguments);e.videojs.log.warn("DEPRECATION: Using the default named RequireJS module in the Brightcove Player is deprecated. See: https://support.brightcove.com/requirejs-and-brightcove-player#Future_implementation");return r})}else if(typeof exports==="object"){module.exports=t()}else{e.bc=t(e)}})(this,function(e){var t='@charset "UTF-8";.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABDkAAsAAAAAG6gAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3hY21hcAAAAYQAAADaAAADPv749/pnbHlmAAACYAAAC3AAABHQZg6OcWhlYWQAAA3QAAAAKwAAADYZw251aGhlYQAADfwAAAAdAAAAJA+RCLFobXR4AAAOHAAAABMAAACM744AAGxvY2EAAA4wAAAASAAAAEhF6kqubWF4cAAADngAAAAfAAAAIAE0AIFuYW1lAAAOmAAAASUAAAIK1cf1oHBvc3QAAA/AAAABJAAAAdPExYuNeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS7wTiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGJHcRdyA4RZgQRADK3CxEAAHic7dFZbsMgAEXRS0ycyZnnOeG7y+qC8pU1dHusIOXxuoxaOlwZYWQB0Aea4quIEN4E9LzKbKjzDeM6H/mua6Lmc/p8yhg0lvdYx15ZG8uOLQOGjMp3EzqmzJizYMmKNRu27Nhz4MiJMxeu3Ljz4Ekqm7T8P52G8PP3lnTOVk++Z6iN6QZzNN1F7ptuN7eGOjDUoaGODHVsuvU8MdTO9Hd5aqgzQ50b6sJQl4a6MtS1oW4MdWuoO0PdG+rBUI+GejLUs6FeDPVqqDdDvRvqw1CfhpqM9At0iFLaAAB4nJ1YDXBTVRZ+5/22TUlJ8we0pHlJm7RJf5O8F2j6EymlSPkpxaL8U2xpa3DKj0CBhc2IW4eWKSokIoLsuMqssM64f+jA4HSdWXXXscBq67IOs3FXZ1ZYWVyRFdo899yXtIBQZ90k7717zz3v3HPPOfd854YCCj9cL9dL0RQFOqCbGJnrHb5EayiKIWN8iA/hWBblo6hUWm8TtCDwE80WMJus/irwyxOdxeB0MDb14VNJHnXYoLLSl6FfCUYO9nYPTA8Epg9090LprfbBbZ2hY0UlJUXHQp3/vtWkS6EBv8+rPMq5u9692f/dNxJNiqwC1xPE9TCUgCsSdQWgE3XQD25lkG4CN2xmTcOXWBOyser6RN6KnGbKSbmQ3+d0OI1m2W8QzLLkI2sykrWAgJJEtA8vGGW/2Q+CmT3n8zS9wZwu2DCvtuZKZN3xkrLh36yCZuUomQSqGpY8t/25VfHVhw8z4ebGBtfLb0ya9PCaDc+8dGTvk2dsh6z7WzvowlXKUSWo9MJ15a3KrEP2loOr2Ojhw6iW6hf2BDdEccQvZGpaAy7YovSwq8kr7HGllxpd71rkS6G0Sf11sl9OvMK1+jwPPODxjUwkOim9CU3ix1wNjXDfmJSEn618Bs6lpWwUpU+8PCqLMY650zjq8VhCIP17NEKTx3eaLL+s5Pi6yJWaWjTHLR1jYzPSV9VF/6Ojdb/1kO3Mk3uhHC0x6gc1BjlKQ+nQFxTYdaJkZ7ySVxLBbhR1dsboNXp1tCYKW2LRaEzpYcIx2BKNxaL0ZaUnSqfFoiNhHKR/GkX6PWUSAaJelQaqZL1EpoHNsajSEyPSoJ9IjhIxTdjHLmwZvhRDOiFTY/YeQnvrVZmiTQtGncECXtFTBZLOVwwMRgoXHAkXzMzPn1nAJJ8jYSbMDaqN2waGLzNhih/bZynUBMpIWSg7VYi7DRx2m8ALkIdRCJwI6ArJx2EI8kaDWeTQKeAFk9fjl/1AvwktjQ1P7NjyMGQyfd4vjipX6M/i52D7Cq80kqlcxEcGXRr/FEcgs0u5uGgB4VWuMFfpdn2Re6Hi3PqzmxWKsz6+ae2Pn9hXXw/fqM859UiGC0oKYYILJBqJrsn1Z1E5qOs9rQCiUQRREjm8yJcbHF5cUJufX1vAHlefw0XgUoboS3ETfQlTxBC4SOtuE8VPRJTBSCQSjZCpk7Gqzu+masaZ2y7Zjehho4F3g82BNDkAHpORG4+OCS+f6JTPmtRn/PH1kch6d04sp7AQb25aQ/pqUyXeQ8vrebG8OYQdXOQ+585u0sdW9rqalzRURiJ+9F4MweRFrKUjl1GUYhH1A27WOHw5cTFSFPMo9EeUIGnQTZHIaJ7AHLaOKsOODaNF9jkBjYG2QEsQ2xjMUAx2bBEbeTBWMHwskBjngq56S/yfgkBnWBa4K9sqKtq2t1UI8S9He5XuBRbawAdatrQEAi30Aks2+LM8WeCbalVZkWNylvJ+dqJnzVb+OHlSoKW8nPCP7Rd+CcZ2DdWAGqJ2CBFOphgywFFCFBNtfAbGtNPBCwxvygHeYMZMY9ZboBqwq/pVrsbgN5tkv152ODlbMfiqwGMBgxa4Exz3QhovRIUp6acqZmQzRq0ypDXS2TPLT02YIkQETnOE445oOGxOmXAqUJNNG7XgupMjPq2ua9asrj5yY/yuKteO1Kx0YNJTufrirLe1mZnat7OL6rnUdCWenpW6I8mAnbsY8KWs1PuSovCW9A/Z25PQ24a7cNOqgmTkLmBMgh4THgc4b9k2IVv1/g/F5nGljwPLfOgHAzJzh45V/4+WenTzmMtR5Z7us2Tys909UHqrPY7KbckoxRvRHhmVc3cJGE97uml0R1S0jdULVl7EvZtDFVBF35N9cEdjpgmAiOlFZ+Dtoh93+D3zzHr8RRNZQhnCNMNbcegOvpEwZoL+06cJQ07h+th3fZ/7PVbVC6ngTAV/KoLFuO6+2KFcU651gEb5ugPSIb1D+Xp8V4+k3sEIGnw5mYe4If4k1lFYr6SCzmM2EQ8iWtmwjnBI9kTwe1TlfAmXh7H02by9fW2gsjKwtv0aaURKil4OdV7rDL1MXIFNrhdxohcZXYTnq47WisrKitaObbf5+yvkLi5J6lCNZZ+B6GC38VNBZBDidSS/+mSvh6s+srgC8pyKMvDtt+de3c9fU76ZPfuM8ud4Kv0fyP/LqfepMT/3oZxSqpZaTa1DaQYLY8TFsHYbWYsPoRhRWfL5eSSQbhUGgGC3YLbVMk6PitTFNGpAsNrC6D1VNBKgBHMejaiuRWEWGgsSDBTJjqWIl8kJLlsaLJ2tXDr6xGfT85bM2Q06a46x2HTgvdnV8z5YDy/27J4zt6x2VtkzjoYpkq36kaBr4eQSg7tyiVweWubXZugtadl58ydapfbORfKsDTuZ0OBgx4cfdjCf5tbWNITnL120fdOi1RV1C3uKGzNdwYLcMvZ3BxoPyTOCD1XvXTp7U10gWCVmTV9b3r2z0SkGWovb2hp9I89O8a2smlyaO8muMU+dRmtzp60IzAoFpjLr1n388boLyf0dRvxhsHZ0qbWqDkwqvvpkj4l0fY6EIXRi5sQSrAvsVYwXRy4qJ2EVtD1AN7a0HWth9ymvL1xc3WTUKK/TAHA/bXDVtVWfOMfuGxGZv4Ln/jVr9jc3j1yMv0tndmyt9Vq88Y9gH1wtLX3KWjot5++jWHgAoZZkQ14wGQ20Fli71UmKJAy4xKMSTGbVdybW7FDDAut9XpD5AzWrYO7zQ8qffqF8+Ynd/clrHcdyxGy3a/3+mfNnzC/cBsveTjnTvXf1o6vzOlZw7WtqtdmPK/Errz/6NNtD72zmNOZfbmYdTGHfoofqI79Oc+R2n1lrnL6pOm0Up7kwxhTW12Amm7WYkXR2qYrF2AmgmbAsxZjwy1xpg/m1Je2vrp8v/nz2xpmlBg4E9hrMU341wVpTOh/OfmGvAnra8q6uctr60ZQHV3Q+WMQJykMj8ZsWn2QBOmmHMB+m5pDIpTFonYigiaKAhGEiAHF7EliVnQkjoLVIMPtJpBKHYd3A8GYH9jJzrWwmHx5Qjp7vDAX0suGRym1vtm/9W1/HyR8vczfMs6Sk8DSv855/5dlX9oQq52hT8syyp2rx5Id17IAyAM3wIjQPMOHzytEB64q6D5zT91yNbnx3V/nqnd017S9Y0605k3izoXLpsxde2n38yoOV9s1LcjwzNjbdX6asnBVaBj/6/DwKwPkpcqbDG7BnsXoSqWnUAmottYF6jMSdVyYZh3zVXCjwTiwwHH6sGuRiEHQGzuRX6whZkp123oy1BWE2mEfJ/tvIRtM4ZM5bDXiMsPMaAKOTyc5uL57rqyyc5y5JE5pm1i2S2iUX0CcaQ6lC6Zog7JqSqZmYlosl2K6pwNA84zRnQW6SaALYZQGW5lhCtU/W34N6o+bKfZ8cf3/Cl/+iTX3wBzpOY4mRkeNf3rptycGSshQWgGbYt5jFc2e0+DglIrwl6DVWQ7BuwaJ3Xk1J4VL5urnLl/Wf+gHU/hZoZdKNym6lG+I34FaNeZKcSpJIo2IeCVvpdsDGfKvzJnAwmeD37Ow65ZWwSowpgwX5T69s/rB55dP5BcpgDKFV8p7q2sn/1uc93bVzT/w6UrCqDTWvfCq/oCD/qZXNoUj8BL5Kp6GU017frfNXkAtiiyf/SOCEeLqnd8R/Ql9GlCRfctS6k5chvIBuQ1zCCjoCHL2DHNHIXxMJ3kQeO8lbsUXONeSfA5EjcG6/E+KdhN4bP04vBhdi883+BFBzQbxFbvZzQeY9LNBZc0FNfn5NwfDn6rCTnTw6R8o+gfpf5hCom33cRuiTlss3KHmZjD+BPN+5gXuA2ziS/Q73mLxUkpbKN/eqwz5uK0X9F3h2d1V4nGNgZGBgAOJd776+iue3+crAzc4AAje5Bfcg0xz9YHEOBiYQBQA8FQlFAHicY2BkYGBnAAGOPgaG//85+hkYGVCBMgBGGwNYAAAAeJxjYGBgYB8EmKOPgQEAQ04BfgAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAcICGAJYArQC4AMwA7AD3gQwBJYE3AUkBWYFigYgBmYGtAbqB1gIEghYCG4IhAi2COh4nGNgZGBgUGYoZWBnAAEmIOYCQgaG/2A+AwAYCQG2AHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkMl2wjAMRfOAhABlKm2h80C3+ajgCKKDY6cegP59TYBzukAL+z1Zsq8ctaJTTKPrsUQLbXQQI0EXKXroY4AbDDHCGBNMcYsZ7nCPB8yxwCOe8IwXvOIN7/jAJ76wxHfUqWX+OzgumWAjJMV17i0Ndlr6irLKO+qftdT7i6y4uFSUvCknay+lFYZIZaQcmfH/xIFdYn98bqhra1aKTM/6lWMnyaYirx1rFUQZFBkb2zJUtoXeJCeg0WnLtHeSFc3OtrnozNwqi0TkSpBMDB1nSde5oJXW23hTS2/T0LilglXX7dmFVxLnq5U0vYATHFk3zX3BOisoQHNDFDeZnqKDy9hRNawN7Vh727hFzcJ5c8TILrKZfH7tIPxAFP0BpLeJPA==) format("woff");font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:"\\f101"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:"\\f102"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:"\\f103"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:"\\f104"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:"\\f105"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:"\\f106"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:"\\f107"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:"\\f108"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:"\\f109"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:"\\f10a"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:"\\f10b"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:"\\f10c"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:"\\f10d"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:"\\f10e"}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:"\\f10f"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:"\\f110"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:"\\f111"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:"\\f112"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:"\\f113"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:"\\f114"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:"\\f115"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:"\\f116"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:"\\f117"}.vjs-icon-gplus{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-gplus:before{content:"\\f118"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:"\\f119"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:"\\f11a"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:"\\f11b"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:"\\f11c"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:"\\f11d"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:"\\f11e"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:"\\f11f"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:"\\f120"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:"\\f121"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:"\\f122"}.video-js{display:block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:initial}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:0}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-fluid{width:100%;max-width:100%;height:0}.video-js.vjs-16-9{padding-top:56.25%}.video-js.vjs-4-3{padding-top:75%}.video-js.vjs-fill{width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}body.vjs-full-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen{width:100%!important;height:100%!important;padding-top:0!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:10px;left:10px;padding:0;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:rgba(43,51,63,.7);border-radius:.3em;transition:all .4s}.vjs-big-play-centered .vjs-big-play-button{top:50%;left:50%;margin-top:-.81666em;margin-left:-1.5em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{border-color:#fff;background-color:#73859f;background-color:rgba(115,133,159,.5);transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block}.video-js button{background:0 0;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),rgba(255,255,255,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em 0;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover,.video-js.vjs-no-flex .vjs-menu-button-inline{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-no-flex .vjs-menu-button-inline .vjs-menu{display:block;opacity:1;position:relative;width:auto}.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu{width:auto}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.vjs-has-started .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible}.vjs-has-started.vjs-no-flex .vjs-control-bar{display:table}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-no-flex .vjs-control{display:table-cell;vertical-align:middle}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.vjs-no-flex .vjs-progress-control{width:auto}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;top:-.3333333333em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:rgba(255,255,255,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.vjs-no-flex .vjs-progress-control .vjs-mouse-display{z-index:0}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display{display:none}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em 0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#73859f;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;margin-right:0}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{width:10em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;visibility:visible;opacity:1;position:relative;transition:none}.video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical,.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{position:absolute;bottom:3em;left:.5em}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{top:-.3em;right:-.5em}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.vjs-poster{display:inline-block;vertical-align:middle;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;background-color:#000;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster{display:block}.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.vjs-no-flex .vjs-live-control{display:table-cell;width:auto;text-align:left}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.vjs-no-flex .vjs-seek-to-live-control{display:table-cell;width:auto;text-align:left}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.vjs-live .vjs-time-control{display:none}.video-js .vjs-current-time,.vjs-no-flex .vjs-current-time{display:none}.video-js .vjs-duration,.vjs-no-flex .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-live .vjs-time-divider{display:none}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:"X";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block;-webkit-animation:vjs-spinner-show 0s linear .3s forwards;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-loading-spinner:after,.vjs-loading-spinner:before{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@-webkit-keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{100%{transform:rotate(360deg)}}@-webkit-keyframes vjs-spinner-spin{100%{-webkit-transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}@-webkit-keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"\uf10d";font-size:1.5em;line-height:inherit}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" \uf11d";font-size:1.5em;line-height:inherit}.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-audio-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-captions-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-chapters-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-current-time,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-descriptions-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-duration,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-playback-rate,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-remaining-time,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-subtitles-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-time-divider,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-control,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-audio-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-captions-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-chapters-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-current-time,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-descriptions-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-duration,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-playback-rate,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-remaining-time,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-subtitles-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-time-divider,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-control,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-audio-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-captions-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-chapters-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-current-time,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-descriptions-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-duration,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-playback-rate,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-remaining-time,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-subtitles-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-time-divider,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-control{display:none}.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto;width:initial}.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-subs-caps-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small:not(.vjs-live) .vjs-subs-caps-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small:not(.vjs-liveui) .vjs-subs-caps-button{display:none}.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-custom-control-spacer,.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui .vjs-custom-control-spacer{flex:auto;display:block}.video-js:not(.vjs-fullscreen).vjs-layout-tiny.vjs-no-flex .vjs-custom-control-spacer,.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui.vjs-no-flex .vjs-custom-control-spacer{width:auto}.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-progress-control,.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui .vjs-progress-control{display:none}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0 24px}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:5px;padding:3px;border:none}.vjs-text-track-settings fieldset span{display:inline-block}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;margin:0 0 5px 0}.vjs-text-track-settings .vjs-label{position:absolute;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);display:block;margin:0 0 5px 0;padding:0;border:0;height:1px;width:1px;overflow:hidden}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f 100%)}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f 100%);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:0;background:0 0}.video-js .vjs-menu :focus:not(:focus-visible),.video-js :focus:not(:focus-visible){outline:0;background:0 0}',r='.bc-player-H1KarKWEW_default *,.bc-player-H1KarKWEW_default :after,.bc-player-H1KarKWEW_default :before{box-sizing:inherit;font-size:inherit;color:inherit;line-height:inherit}.bc-player-H1KarKWEW_default{width:300px;height:150px;font-size:14px;overflow:hidden}.bc-player-H1KarKWEW_default.vjs-fluid,.bc-player-H1KarKWEW_default.vjs-fluid.vjs-16-9{padding-top:56.25%}.bc-player-H1KarKWEW_default.vjs-fluid.vjs-4-3{padding-top:75%}.bc-player-H1KarKWEW_default.vjs-fill{width:100%;height:100%}.bc-iframe,.bc-iframe body,.bc-player-H1KarKWEW_default,.bc-player-H1KarKWEW_default .vjs-poster{background-color:#151B17}.bc-iframe,.bc-iframe .bc-player-H1KarKWEW_default,.bc-iframe body{margin:0;width:100%;height:100%;overflow:hidden}.bc-player-H1KarKWEW_default.vjs-fullscreen,.bc-player-H1KarKWEW_default.vjs-fullscreen .vjs-tech{width:100%!important;height:100%!important}.bc-player-H1KarKWEW_default .vjs-track-setting select{color:#000;background-color:#fff}.bc-player-H1KarKWEW_default .vjs-audio-button .vjs-menu-item,.bc-player-H1KarKWEW_default .vjs-chapters-button .vjs-menu-item,.bc-player-H1KarKWEW_default .vjs-descriptions-button .vjs-menu-item,.bc-player-H1KarKWEW_default .vjs-subs-caps-button .vjs-menu-item{text-transform:none}.bc-player-H1KarKWEW_default.vjs-waiting-for-autoplay .vjs-big-play-button{opacity:0}.bc-player-H1KarKWEW_default .vjs-progress-control .vjs-mouse-display{z-index:2}.vjs-error-display{color:#fff;display:none;font-family:Helvetica,Arial,sans serif;font-size:16px;line-height:1.428}.vjs-error .vjs-error-display{display:block;position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5)}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:14px}.vjs-errors-dialog{text-align:left;border:1px #999 solid;overflow:hidden;position:absolute;top:2%;bottom:2%;left:5%;right:5%;padding-left:1%;padding-right:1%;background:rgba(24,24,24,.8);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#CC000000, endColorstr=#CC000000)"}.vjs-errors-details{margin-top:15px}.vjs-errors-message{border:1px #999 solid;background-color:#2c2c2c;overflow:auto;margin-top:15px;padding:15px}.vjs-errors-ok-button-container{display:block;position:absolute;bottom:15px;left:15px;right:15px;text-align:center}.vjs-errors-ok-button{display:block;margin:0 auto;width:80px;height:36px;background-color:#000;border:1px #999 solid;border-radius:5px;color:#999;font-size:14px;cursor:pointer}.vjs-errors-ok-button:hover{border:1px #FFF solid;color:#CCC}.vjs-errors-content-container{overflow:auto;position:absolute;padding-bottom:15px;top:0;left:15px;right:15px;bottom:61px}.vjs-errors-headline{font-size:14px;font-weight:700;padding-right:3em}.vjs-errors-dialog .vjs-control.vjs-close-button{width:3em;height:3em;top:0}.vjs-errors-flashmessage{float:right;font-size:9px;font-style:italic}.vjs-xs.vjs-error-display{font-size:14px;background-color:#000}.vjs-xs.vjs-error-display .vjs-errors-details,.vjs-xs.vjs-error-display .vjs-errors-message{display:none}.vjs-xs .vjs-errors-content-container{top:0}.vjs-xs .vjs-errors-headline{font-size:16px;font-weight:700}.vjs-xs .vjs-errors-dialog{border:none;top:0;bottom:0;left:0;right:0}.vjs-xs.vjs-errors-flashmessage{display:none}@media (max-width:600px),(max-height:250px){.vjs-error-display{font-size:14px;background-color:#000}.vjs-error-display .vjs-errors-details,.vjs-error-display .vjs-errors-message{display:none}.vjs-error-display .vjs-errors-content-container{top:15px}.vjs-error-display .vjs-errors-headline{font-size:16px;font-weight:700}.vjs-error-display .vjs-errors-dialog{border:none;top:0;bottom:0;left:0;right:0}.vjs-errors-flashmessage{display:none}}.vjs-errors-ref-id{color:rgba(255,255,255,.5);font-size:.75em;margin:.5em 0 0}/*! @name videojs-contextmenu-ui @version 5.2.0 @license Apache-2.0 */.vjs-contextmenu-ui-menu{position:absolute}.vjs-contextmenu-ui-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);border-radius:.3em;padding:.25em}.vjs-contextmenu-ui-menu .vjs-menu-item{border-radius:.3em;cursor:pointer;margin:0 0 1px;padding:.5em 1em;font-size:1em;line-height:1.2;text-transform:none}.vjs-contextmenu-ui-menu .vjs-menu-item:active,.vjs-contextmenu-ui-menu .vjs-menu-item:hover{background-color:rgba(0,0,0,.5);text-shadow:0 0 1em #fff}.vjs-modal-dialog.vjs-player-info-modal{background:rgba(0,0,0,.9);font-size:10px}.vjs-modal-dialog.vjs-player-info-modal .vjs-modal-dialog-content{overflow:auto}.vjs-modal-dialog.vjs-player-info-modal .vjs-pi-section{float:left;width:49%}.vjs-modal-dialog.vjs-player-info-modal .vjs-pi-section:nth-child(2n+1){float:right}.vjs-modal-dialog.vjs-player-info-modal .vjs-pi-section.vjs-pi-section--source{float:none;clear:both;width:auto}.vjs-modal-dialog.vjs-player-info-modal .vjs-pi-section.vjs-pi-section--source td:first-child{min-width:150px}.vjs-modal-dialog.vjs-player-info-modal table{border-collapse:collapse;margin-bottom:1em;width:100%}.vjs-modal-dialog.vjs-player-info-modal th{font-weight:400;text-align:left}.vjs-modal-dialog.vjs-player-info-modal td{border-bottom:1px solid rgba(255,255,255,.2);opacity:.5}.vjs-modal-dialog.vjs-player-info-modal tr:last-child td{border-bottom:0}.vjs-modal-dialog.vjs-player-info-modal tr:hover td{opacity:1}.bc-player-H1KarKWEW_default .vjs-control-bar{background-color:rgba(0,0,0,.45);color:#fff}.bc-player-H1KarKWEW_default .vjs-control{color:inherit}.bc-player-H1KarKWEW_default .vjs-mouse-display:after,.bc-player-H1KarKWEW_default .vjs-play-progress:after{border-radius:0}.bc-player-H1KarKWEW_default .vjs-menu-button-inline:hover,.bc-player-H1KarKWEW_default.vjs-no-flex .vjs-menu-button-inline{width:8.35em}.bc-player-H1KarKWEW_default .vjs-control:focus:before,.bc-player-H1KarKWEW_default .vjs-control:hover:before{text-shadow:0 0 1em #fff,0 0 1em #fff,0 0 1em #fff}.bc-player-H1KarKWEW_default .vjs-spacer{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-flex:1 1 auto;-moz-box-flex:1 1 auto;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto}.bc-player-H1KarKWEW_default .vjs-time-control{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-flex:0 1 auto;-moz-box-flex:0 1 auto;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;width:auto}.bc-player-H1KarKWEW_default .vjs-time-control.vjs-time-divider{width:14px}.bc-player-H1KarKWEW_default .vjs-time-control.vjs-time-divider div{width:100%;text-align:center}.bc-player-H1KarKWEW_default .vjs-time-control.vjs-current-time{margin-left:1em}.bc-player-H1KarKWEW_default .vjs-time-control .vjs-current-time-display,.bc-player-H1KarKWEW_default .vjs-time-control .vjs-duration-display{width:100%}.bc-player-H1KarKWEW_default .vjs-time-control .vjs-current-time-display{text-align:right}.bc-player-H1KarKWEW_default .vjs-time-control .vjs-duration-display{text-align:left}.bc-player-H1KarKWEW_default .vjs-remaining-time{display:none}.bc-player-H1KarKWEW_default.vjs-no-flex .vjs-time-control.vjs-remaining-time{display:none}.bc-player-H1KarKWEW_default.vjs-no-flex .vjs-time-control{display:table-cell;width:4em}.bc-player-H1KarKWEW_default .vjs-play-progress,.bc-player-H1KarKWEW_default .vjs-volume-level{background-color:#d52484}.bc-player-H1KarKWEW_default .vjs-play-progress:before,.bc-player-H1KarKWEW_default .vjs-volume-level:before{display:none}.bc-player-H1KarKWEW_default .vjs-volume-level:after{display:none}.bc-player-H1KarKWEW_default .vjs-progress-control{position:absolute;left:0;right:0;width:100%;height:1.5em;top:-1.5em}.bc-player-H1KarKWEW_default .vjs-progress-control .vjs-load-progress,.bc-player-H1KarKWEW_default .vjs-progress-control .vjs-play-progress,.bc-player-H1KarKWEW_default .vjs-progress-control .vjs-progress-holder{height:100%}.bc-player-H1KarKWEW_default .vjs-progress-control .vjs-progress-holder{margin:0}.bc-player-H1KarKWEW_default .vjs-progress-control:hover{height:1.5em;top:-1.5em}.bc-player-H1KarKWEW_default .vjs-control-bar:not(.vjs-focus-within){-webkit-transition:-webkit-transform .1s ease 0s;-moz-transition:-moz-transform .1s ease 0s;-ms-transition:-ms-transform .1s ease 0s;-o-transition:-o-transform .1s ease 0s;transition:transform .1s ease 0s}.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-control-bar:not(.vjs-focus-within):not(.vjs-control-bar-visible),.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-control-bar:not(.vjs-focus-within):not(.vjs-control-bar-visible),.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-control-bar:not(.vjs-focus-within):not(.vjs-control-bar-visible),.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar:not(.vjs-focus-within):not(.vjs-control-bar-visible),.bc-player-H1KarKWEW_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-control-bar,.bc-player-H1KarKWEW_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar:not(.vjs-focus-within):not(.vjs-control-bar-visible){visibility:visible;opacity:1;-webkit-backface-visibility:hidden;-webkit-transform:translateY(3em);-moz-transform:translateY(3em);-ms-transform:translateY(3em);-o-transform:translateY(3em);transform:translateY(3em);-webkit-transition:-webkit-transform 1s ease 0s;-moz-transition:-moz-transform 1s ease 0s;-ms-transition:-ms-transform 1s ease 0s;-o-transition:-o-transform 1s ease 0s;transition:transform 1s ease 0s}.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-progress-control,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-progress-control,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-progress-control,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-progress-control,.bc-player-H1KarKWEW_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-progress-control,.bc-player-H1KarKWEW_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-progress-control{height:.3em;top:-.3em;pointer-events:none;-webkit-transition:height 1s,top 1s;-moz-transition:height 1s,top 1s;-ms-transition:height 1s,top 1s;-o-transition:height 1s,top 1s;transition:height 1s,top 1s}.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active.vjs-fullscreen .vjs-progress-control,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive.vjs-fullscreen .vjs-progress-control,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active.vjs-fullscreen .vjs-progress-control,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive.vjs-fullscreen .vjs-progress-control,.bc-player-H1KarKWEW_default.vjs-has-started.vjs-playing.vjs-user-inactive.vjs-fullscreen .vjs-progress-control{opacity:0;-webkit-transition:opacity 1s;-moz-transition:opacity 1s;-ms-transition:opacity 1s;-o-transition:opacity 1s;transition:opacity 1s}.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-menu,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-volume-vertical,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-menu,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-volume-vertical,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-menu,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-volume-vertical,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-menu,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-volume-vertical,.bc-player-H1KarKWEW_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-menu,.bc-player-H1KarKWEW_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-volume-vertical,.bc-player-H1KarKWEW_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-menu,.bc-player-H1KarKWEW_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-volume-vertical{opacity:0;-webkit-transition:opacity 1s;-moz-transition:opacity 1s;-ms-transition:opacity 1s;-o-transition:opacity 1s;transition:opacity 1s}.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-control-bar-visible .vjs-menu,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-control-bar-visible .vjs-menu,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-control-bar-visible .vjs-menu,.bc-player-H1KarKWEW_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu,.bc-player-H1KarKWEW_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu-item,.bc-player-H1KarKWEW_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu{opacity:1}.bc-player-H1KarKWEW_default.vjs-live .vjs-live-control{margin-left:1em}.bc-player-H1KarKWEW_default.vjs-live .vjs-time-control.vjs-current-time,.bc-player-H1KarKWEW_default.vjs-live .vjs-time-control.vjs-duration,.bc-player-H1KarKWEW_default.vjs-live .vjs-time-control.vjs-time-divider{display:none}.bc-player-H1KarKWEW_default .vjs-big-play-button{top:50%;left:50%;margin-left:-1em;margin-top:-1em;width:2em;height:2em;line-height:2em;border:none;border-radius:50%;font-size:3.5em;background-color:rgba(0,0,0,.45);color:#fff;-webkit-transition:border-color .4s,outline .4s,background-color .4s;-moz-transition:border-color .4s,outline .4s,background-color .4s;-ms-transition:border-color .4s,outline .4s,background-color .4s;-o-transition:border-color .4s,outline .4s,background-color .4s;transition:border-color .4s,outline .4s,background-color .4s}.bc-player-H1KarKWEW_default .vjs-big-play-button:active,.bc-player-H1KarKWEW_default .vjs-big-play-button:focus,.bc-player-H1KarKWEW_default:active .vjs-big-play-button,.bc-player-H1KarKWEW_default:hover .vjs-big-play-button{background-color:#d52484}.bc-player-H1KarKWEW_default .vjs-menu-button-popup .vjs-menu{left:-3em}.bc-player-H1KarKWEW_default .vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:transparent;width:12em;left:-1.5em;padding-bottom:.5em}.bc-player-H1KarKWEW_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item,.bc-player-H1KarKWEW_default .vjs-menu-button-popup .vjs-menu .vjs-menu-title{background-color:#151B17;margin:.3em 0;padding:.5em;border-radius:.3em}.bc-player-H1KarKWEW_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item.vjs-selected{background-color:#d52484}.bc-player-H1KarKWEW_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item:active,.bc-player-H1KarKWEW_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item:focus,.bc-player-H1KarKWEW_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item:hover{text-shadow:0 0 1em #fff,0 0 1em #fff,0 0 1em #fff;color:#fff}.bc-player-H1KarKWEW_default.vjs-ad-playing .vjs-mouse-display,.bc-player-H1KarKWEW_default.vjs-ad-playing .vjs-mouse-display:after{display:none}.bc-player-H1KarKWEW_default.vjs-ad-playing.vjs-ad-playing .vjs-progress-control:after{pointer-events:auto;width:100%;height:100%;position:absolute;left:0;bottom:0;content:" ";user-select:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none}.bc-player-H1KarKWEW_default.vjs-ad-playing .vjs-picture-in-picture-control{display:none}.bc-player-H1KarKWEW_default.vjs-no-flex .vjs-spacer{display:table-cell}.bc-player-H1KarKWEW_default.vjs-no-flex .vjs-time-control{display:table-cell;width:4em}.bc-player-H1KarKWEW_default.vjs-no-flex .vjs-remaining-time{display:none}.vjs-mouse.bc-player-H1KarKWEW_default .vjs-control-bar{font-size:10px}.vjs-mouse.bc-player-H1KarKWEW_default .vjs-progress-control{height:.5em;top:-.5em}.vjs-mouse.bc-player-H1KarKWEW_default .vjs-progress-control:hover{height:1.5em;top:-1.5em}.bc-player-H1KarKWEW_default select{width:inherit}.bc-player-H1KarKWEW_default.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-progress-control,.bc-player-H1KarKWEW_default.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui .vjs-progress-control{display:block}.bc-player-H1KarKWEW_default .vjs-big-play-button,.bc-player-H1KarKWEW_default .vjs-control-bar{background-color:#000}.bc-player-H1KarKWEW_default .vjs-big-play-button,.bc-player-H1KarKWEW_default .vjs-control-bar{color:#fff}.bc-iframe .vjs-playlist-sidebar .vjs-playlist-show-hide button:hover,.bc-player-H1KarKWEW_default .vjs-big-play-button:active,.bc-player-H1KarKWEW_default .vjs-big-play-button:focus,.bc-player-H1KarKWEW_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item.vjs-selected,.bc-player-H1KarKWEW_default .vjs-play-progress,.bc-player-H1KarKWEW_default .vjs-volume-level,.bc-player-H1KarKWEW_default:active .vjs-big-play-button,.bc-player-H1KarKWEW_default:hover .vjs-big-play-button{background-color:#a8a6a0}',i="bc-style-H1KarKWEW-default",n,a="bc-style-vjs",s,o,l,u,c=document.querySelector("head"),d=c.firstChild,f=function(e,t){var r=document.createElement("style");r.type="text/css";r.appendChild(document.createTextNode(e));if(t){c.insertBefore(r,t)}else{c.appendChild(r)}return r};o=function(e,t){var r=undefined;var i=e.define;var n=[];var a=function(){var t=e.navigator.userAgent.match(/applewebkit\/(\d*).*Version\/(\d*.\d*)/i);return l.browser.IS_ANDROID&&l.browser.ANDROID_VERSION<5&&t&&t[2]>0};var s=e.videojs;e.VIDEOJS_NO_DYNAMIC_STYLE=true;var o=function(r,i){"use strict";r=r&&r.hasOwnProperty("default")?r["default"]:r;i=i&&i.hasOwnProperty("default")?i["default"]:i;var n="0.7.1";var a=typeof globalThis!=="undefined"?globalThis:typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function s(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function o(e,t){return t={exports:{}},e(t,t.exports),t.exports}var l=o(function(r,i){(function(e,t){r.exports=t()})(a,function(){function r(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}function i(e){return typeof e==="function"}var n=void 0;if(Array.isArray){n=Array.isArray}else{n=function(e){return Object.prototype.toString.call(e)==="[object Array]"}}var o=n;var l=0;var u=void 0;var c=void 0;var d=function e(t,r){j[l]=t;j[l+1]=r;l+=2;if(l===2){if(c){c(E)}else{C()}}};function f(e){c=e}function h(e){d=e}var p=typeof e!=="undefined"?e:undefined;var v=p||{};var m=v.MutationObserver||v.WebKitMutationObserver;var g=typeof self==="undefined"&&typeof process!=="undefined"&&{}.toString.call(process)==="[object process]";var y=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function _(){return function(){return process.nextTick(E)}}function b(){if(typeof u!=="undefined"){return function(){u(E)}}return k()}function T(){var e=0;var r=new m(E);var i=t.createTextNode("");r.observe(i,{characterData:true});return function(){i.data=e=++e%2}}function S(){var e=new MessageChannel;e.port1.onmessage=E;return function(){return e.port2.postMessage(0)}}function k(){var e=setTimeout;return function(){return e(E,1)}}var j=new Array(1e3);function E(){for(var e=0;e<l;e+=2){var t=j[e];var r=j[e+1];t(r);j[e]=undefined;j[e+1]=undefined}l=0}function w(){try{var e=Function("return this")().require("vertx");u=e.runOnLoop||e.runOnContext;return b()}catch(e){return k()}}var C=void 0;if(g){C=_()}else if(m){C=T()}else if(y){C=S()}else if(p===undefined&&typeof s==="function"){C=w()}else{C=k()}function A(e,t){var r=this;var i=new this.constructor(P);if(i[x]===undefined){J(i)}var n=r._state;if(n){var a=arguments[n-1];d(function(){return G(n,i,a,r._result)})}else{K(r,i,e,t)}return i}function I(e){var t=this;if(e&&typeof e==="object"&&e.constructor===t){return e}var r=new t(P);W(r,e);return r}var x=Math.random().toString(36).substring(2);function P(){}var O=void 0;var D=1;var L=2;function R(){return new TypeError("You cannot resolve a promise with itself")}function U(){return new TypeError("A promises callback cannot return that same promise.")}function N(e,t,r,i){try{e.call(t,r,i)}catch(e){return e}}function M(e,t,r){d(function(e){var i=false;var n=N(r,t,function(r){if(i){return}i=true;if(t!==r){W(e,r)}else{q(e,r)}},function(t){if(i){return}i=true;V(e,t)},"Settle: "+(e._label||" unknown promise"));if(!i&&n){i=true;V(e,n)}},e)}function B(e,t){if(t._state===D){q(e,t._result)}else if(t._state===L){V(e,t._result)}else{K(t,undefined,function(t){return W(e,t)},function(t){return V(e,t)})}}function F(e,t,r){if(t.constructor===e.constructor&&r===A&&t.constructor.resolve===I){B(e,t)}else{if(r===undefined){q(e,t)}else if(i(r)){M(e,t,r)}else{q(e,t)}}}function W(e,t){if(e===t){V(e,R())}else if(r(t)){var i=void 0;try{i=t.then}catch(t){V(e,t);return}F(e,t,i)}else{q(e,t)}}function H(e){if(e._onerror){e._onerror(e._result)}z(e)}function q(e,t){if(e._state!==O){return}e._result=t;e._state=D;if(e._subscribers.length!==0){d(z,e)}}function V(e,t){if(e._state!==O){return}e._state=L;e._result=t;d(H,e)}function K(e,t,r,i){var n=e._subscribers;var a=n.length;e._onerror=null;n[a]=t;n[a+D]=r;n[a+L]=i;if(a===0&&e._state){d(z,e)}}function z(e){var t=e._subscribers;var r=e._state;if(t.length===0){return}var i=void 0,n=void 0,a=e._result;for(var s=0;s<t.length;s+=3){i=t[s];n=t[s+r];if(i){G(r,i,n,a)}else{n(a)}}e._subscribers.length=0}function G(e,t,r,n){var a=i(r),s=void 0,o=void 0,l=true;if(a){try{s=r(n)}catch(e){l=false;o=e}if(t===s){V(t,U());return}}else{s=n}if(t._state!==O);else if(a&&l){W(t,s)}else if(l===false){V(t,o)}else if(e===D){q(t,s)}else if(e===L){V(t,s)}}function Y(e,t){try{t(function t(r){W(e,r)},function t(r){V(e,r)})}catch(t){V(e,t)}}var X=0;function $(){return X++}function J(e){e[x]=X++;e._state=undefined;e._result=undefined;e._subscribers=[]}function Q(){return new Error("Array Methods must be provided an Array")}var Z=function(){function e(e,t){this._instanceConstructor=e;this.promise=new e(P);if(!this.promise[x]){J(this.promise)}if(o(t)){this.length=t.length;this._remaining=t.length;this._result=new Array(this.length);if(this.length===0){q(this.promise,this._result)}else{this.length=this.length||0;this._enumerate(t);if(this._remaining===0){q(this.promise,this._result)}}}else{V(this.promise,Q())}}e.prototype._enumerate=function e(t){for(var r=0;this._state===O&&r<t.length;r++){this._eachEntry(t[r],r)}};e.prototype._eachEntry=function e(t,r){var i=this._instanceConstructor;var n=i.resolve;if(n===I){var a=void 0;var s=void 0;var o=false;try{a=t.then}catch(e){o=true;s=e}if(a===A&&t._state!==O){this._settledAt(t._state,r,t._result)}else if(typeof a!=="function"){this._remaining--;this._result[r]=t}else if(i===ae){var l=new i(P);if(o){V(l,s)}else{F(l,t,a)}this._willSettleAt(l,r)}else{this._willSettleAt(new i(function(e){return e(t)}),r)}}else{this._willSettleAt(n(t),r)}};e.prototype._settledAt=function e(t,r,i){var n=this.promise;if(n._state===O){this._remaining--;if(t===L){V(n,i)}else{this._result[r]=i}}if(this._remaining===0){q(n,this._result)}};e.prototype._willSettleAt=function e(t,r){var i=this;K(t,undefined,function(e){return i._settledAt(D,r,e)},function(e){return i._settledAt(L,r,e)})};return e}();function ee(e){return new Z(this,e).promise}function te(e){var t=this;if(!o(e)){return new t(function(e,t){return t(new TypeError("You must pass an array to race."))})}else{return new t(function(r,i){var n=e.length;for(var a=0;a<n;a++){t.resolve(e[a]).then(r,i)}})}}function re(e){var t=this;var r=new t(P);V(r,e);return r}function ie(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ne(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var ae=function(){function e(t){this[x]=$();this._result=this._state=undefined;this._subscribers=[];if(P!==t){typeof t!=="function"&&ie();this instanceof e?Y(this,t):ne()}}e.prototype.catch=function e(t){return this.then(null,t)};e.prototype.finally=function e(t){var r=this;var n=r.constructor;if(i(t)){return r.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}return r.then(t,t)};return e}();ae.prototype.then=A;ae.all=ee;ae.race=te;ae.resolve=I;ae.reject=re;ae._setScheduler=f;ae._setAsap=h;ae._asap=d;function se(){var e=void 0;if(typeof a!=="undefined"){e=a}else if(typeof self!=="undefined"){e=self}else{try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if(r==="[object Promise]"&&!t.cast){return}}e.Promise=ae}ae.polyfill=se;ae.Promise=ae;return ae})});var u=3;var c=50;var d=function e(t){var n=r.body;var a=r.createElement("div");a.className="pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text_ads_2 text-ads text-ad-links";a.innerHTML=" ";a.setAttribute("style","height:10px!important;font-size:20px;color:transparent;position:absolute;bottom:0;left:-10000px");var s=0;var o=function e(){s++;var r=a.offsetHeight===0||!n.contains(a)||a.style.display==="none"||a.style.visibility==="hidden";if(r||s===u){if(a.parentNode){a.parentNode.removeChild(a)}return t(r)}i.setTimeout(e,c)};n.appendChild(a);o()};var f=null;var h;function p(e){if(e||!h){h=new l(function(e){if(r.readyState==="complete"||r.readyState!=="loading"&&!r.documentElement.doScroll){d(e)}else{r.addEventListener("DOMContentLoaded",function(){d(e)})}})}return h.then(function(e){f=e;return e})}Object.defineProperties(p,{VERSION:{enumerable:true,value:"n/a"},lastResult:{enumerable:true,get:function e(){return f}},mightBe:{enumerable:true,get:function e(){return f!==false}},mightNotBe:{enumerable:true,get:function e(){return f!==true}}});var v=o(function(e){function t(){e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){e[i]=r[i]}}}return e};return t.apply(this,arguments)}e.exports=t});var m=i.performance;var g={};["memory","navigation","timing"].forEach(function(e){g[e]=m&&m[e]||{}});["clearMarks","clearMeasures","clearResourceTimings","getEntries","getEntriesByName","getEntriesByType","mark","measure","now","setResourceTimingBufferSize","toJSON"].forEach(function(e){g[e]=function(){if(m&&m[e]){return m[e].apply(m,arguments)}}});function y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var _=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function b(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function T(e,t,r,i){t=t||"&";r=r||"=";if(e===null){e=undefined}if(typeof e==="object"){return S(k(e),function(i){var n=encodeURIComponent(b(i))+r;if(_(e[i])){return S(e[i],function(e){return n+encodeURIComponent(b(e))}).join(t)}else{return n+encodeURIComponent(b(e[i]))}}).join(t)}if(!i)return"";return encodeURIComponent(b(i))+r+encodeURIComponent(b(e))}function S(e,t){if(e.map)return e.map(t);var r=[];for(var i=0;i<e.length;i++){r.push(t(e[i],i))}return r}var k=Object.keys||function(e){var t=[];for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t.push(r)}return t};function j(e,t,r,i){t=t||"&";r=r||"=";var n={};if(typeof e!=="string"||e.length===0){return n}var a=/\+/g;e=e.split(t);var s=1e3;if(i&&typeof i.maxKeys==="number"){s=i.maxKeys}var o=e.length;if(s>0&&o>s){o=s}for(var l=0;l<o;++l){var u=e[l].replace(a,"%20"),c=u.indexOf(r),d,f,h,p;if(c>=0){d=u.substr(0,c);f=u.substr(c+1)}else{d=u;f=""}h=decodeURIComponent(d);p=decodeURIComponent(f);if(!y(n,h)){n[h]=p}else if(_(n[h])){n[h].push(p)}else{n[h]=[n[h],p]}}return n}var E={encode:T,stringify:T,decode:j,parse:j};function w(e){if(e===void 0){e=i&&i.location||{}}return v({hash:E.parse((e.hash||"#").substr(1)),search:E.parse((e.search||"?").substr(1))},E)}var C={isArr:function e(t){return Array.isArray(t)},isFn:function e(t){return typeof t==="function"},isNil:function e(t){return t===null||t===undefined},isNum:function e(t){return typeof t==="number"&&t===t},isNonEmptyStr:function e(t){return typeof t==="string"&&/\S/.test(t)},isObj:function e(t){return Object.prototype.toString.call(t)==="[object Object]"}};var A={perf:g,Promise:l,qs:w,assign:function e(){return v.apply(void 0,arguments)},withoutNilValues:function e(t){var r=t;if(C.isArr(t)){r=t.filter(function(e){return!C.isNil(e)}).map(A.withoutNilValues)}else if(C.isObj(t)){r={};Object.keys(t).forEach(function(e){if(!C.isNil(t[e])){r[e]=A.withoutNilValues(t[e])}})}return r},debounce:function e(t,r,n,a){if(a===void 0){a=i}var s;return function(){var e=this;var i=arguments;var o=function r(){s=null;o=null;if(!n){t.apply(e,i)}};if(!s&&n){t.apply(e,i)}a.clearTimeout(s);s=a.setTimeout(o,r)}},throttle:function e(t,r){var i=Date.now();return function(){var e=Date.now();if(e-i>=r){t.apply(void 0,arguments);i=e}}}};A.assign(A,C);A.VERSION="n/a";var I=function e(t){var r=t.registerPlugin||t.plugin;r("urlparams",function(e){e=e||{};var r=function e(t){var r=0,i;t=(t||"").replace(/^\s+|\s+$/g,"");if(!t||!/^(\d+h)?(\d+m)?(\d+s)?$/.test(t)){return-1}i=t.match(/^(\d+)h/);if(i){r+=parseFloat(i[1])*3600;t=t.replace(/^(\d+)h/,"")}i=t.match(/^(\d+)m/);if(i){r+=parseFloat(i[1])*60;t=t.replace(/^(\d+)m/,"")}i=t.match(/^(\d+)s/);if(i){r+=parseFloat(i[1])}return r},i=.9,n=function e(t,r){var n=t-r;if(isNaN(n)){return false}return Math.abs(n)<i},a=function e(t){s.ready(function(){if(s.networkState()===2){t()}else{s.one("loadedmetadata",function(){s.setTimeout(t,0)})}})},s=this,o=A.qs(),l=o.hash.t||o.search.t,u;if(typeof e.time==="number"){u=e.time}else{u=r(e.time)}if(l){if(/^[\d]+$/.test(l)){u=Number(l)}else{u=r(l)}if(!e.iframe&&u!==-1){t.log.warn("DEPRECATION: Using the `t` query parameter or URL hash value to set an initial playback start time for advanced, in-page embeds is deprecated and will be removed in Brightcove Player 7. Please add a `data-start-time` attribute going forward!")}}if(u>0){(function(){var t=e.delay||250,r,i=false,o=function e(){if(i||n(s.currentTime(),u)){i=true;l()}else{s.currentTime(u);r=s.setTimeout(e,t)}},l=function e(){s.clearTimeout(r);s.off("timeupdate",e);if(!i){s.currentTime(u)}};s.on("timeupdate",l);a(o)})()}if(o.hash.captions!==undefined||o.search.captions!==undefined){(function(){var e=o.hash.captions||o.search.captions;s.one("play",function(){var t=s.textTracks(),r,i;if(t){for(i=0;i<t.length;i++){r=t[i];if(r.language===e){r.mode="showing";break}}}})})()}})};function x(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var P=x;function O(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var D=O;var L={activeCues:null,cues:null,id:"",inBandMetadataTrackDispatchType:undefined,kind:"metadata",label:"",language:"",mode:"",oncuechange:undefined};var R=["activeCues","cues","id","inBandMetadataTrackDispatchType","kind","label","language"];var U=["mode"];var N=function e(t,r){if(t==="media"&&r.kind==="metadata"&&r.label==="media-cues"){return true}if(t==="id3"&&typeof r.inBandMetadataTrackDispatchType==="string"&&r.inBandMetadataTrackDispatchType.trim().length>0){return true}return false};var M=function e(t){var r=function(e){D(r,e);function r(r,i,n){var a;if(n===void 0){n=function e(){}}a=e.call(this)||this;var s=P(a);s.player_=r;s.reTriggerEvent_=t.bind(s,s.reTriggerEvent_);s.update_=t.bind(s,s.update_);s.type_=i;s.logger_=n;R.concat(U).forEach(function(e){var t={get:function t(){return s.track_&&s.track_[e]||L[e]},enumerable:true};if(U.indexOf(e)!==-1){t.set=function(t){if(!s.track_){return}s.track_[e]=t}}Object.defineProperty(s,e,t)});s.update_();var o=r.textTracks();var l=function e(t){if(!s.track_){s.update_(t)}else if(s.track_.mode!=="hidden"){s.track_.mode="hidden";s.logger_("timeupdate -> type:"+s.type_+(s.track_?",mode:"+s.track_.mode:"")+" -> track was set to hidden")}};["addtrack","removetrack"].forEach(function(e){return o.addEventListener(e,s.update_)});s.player_.on("timeupdate",l);return s||P(a)}var i=r.prototype;i.addCue=function e(){var t=this;var r=arguments;if(!this.track_){this.one("trackexists",function(){return t.addCue.apply(t,r)});return}return this.track_.addCue.apply(this.track_,r)};i.removeCue=function e(){var t=this;var r=arguments;if(!this.track_){return this.one("trackexists",function(){return t.removeCue.apply(t,r)})}return this.track_.removeCue.apply(this.track_,r)};i.reTriggerEvent_=function e(t){this.trigger(t)};i.update_=function e(t){if(t===void 0){t={}}var r;if(t.type==="removetrack"&&t.track&&t.track===this.track_){r=null}else if(t.type==="addtrack"&&t.track&&!this.track_&&N(this.type_,t.track)){r=t.track}else{var i=this.player_.textTracks();var n=i.length;while(n--){if(N(this.type_,i[n])){r=i[n];break}}}this.logger_("update -> type:"+this.type_+", mode:"+(r?r.mode:"?")+" -> event:"+(t.type||"constructor"));if(this.track_===r){this.logger_("update -> type:"+this.type_+", mode:"+(r?r.mode:"?")+" -> "+(r?"already proxied":"no track to proxy"));return}if(this.track_){this.track_.removeEventListener("cuechange",this.reTriggerEvent_)}this.track_=r;if(!this.track_){this.logger_("update -> type:"+this.type_+", mode:"+(r?r.mode:"?")+" -> track changed, but no new track exists");return}if(this.track_.mode!=="hidden"){this.track_.mode="hidden"}this.track_.addEventListener("cuechange",this.reTriggerEvent_);this.trigger("trackexists");this.logger_("update -> type:"+this.type_+", mode:"+(r?r.mode:"?")+" -> track exists")};return r}(t.EventTarget);r.prototype.allowedEvents_={cuechange:"cuechange"};return r};var B=function e(t){var r=M(t);var i={id3CuePointsTrack:function e(t){var i=this.proxyTracks_.id3;if(!i){i=this.proxyTracks_.id3=new r(this,"id3",t)}return i},mediaCuePointsTrack:function e(t){var i=this.proxyTracks_.media;if(i){return i}i=this.proxyTracks_.media=new r(this,"media",t);if(i.track_){return i}this.addTextTrack("metadata","media-cues");i.update_();return i}};function a(e){var r=this;if(e===void 0){e={}}this.proxyTracks_={};var n=t.createLogger("proxyTracks");if(!e.debug){n=function e(){}}n("initialized");Object.keys(i).forEach(function(e){r[e]=function(){return i[e].call(r,n)}});this.ready(function(){Object.keys(i).forEach(function(t){var i=r[t]();if(e.debug){i.on("cuechange",function(){for(var e=0;e<i.activeCues.length;e++){var t=i.activeCues[e];n(i.type_+" -> cuechange -> activeCues["+e+"]: "+(t.value&&t.value.key||t.frame&&t.frame.id))}})}})})}t.registerPlugin("proxyTracks",a);a.VERSION=n};var F={verbose:false,maxSavedSeekEvents:10,debounceTimeout:1e3,playbackRateTolerance:1.5,stableTimeUpdateCount:3,minInterval:1};var W=function e(t){t.trigger("seek")};var H=function e(t){var r=function e(r){var i=t.mergeOptions(F,r);var n;var a=false;var s;var o;var l;var u;var c=0;var d=[];var f=0;var h={};var p={};var v=i.verbose?function(){var e;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}return(e=t.log).call.apply(e,[t,"seek-events:"].concat(i))}:function(){};var m=function e(){h.seek=this.seekEvents.last().seekEnd;a=false;v("event seekStart: ",this.seekEvents.last().seekStart);v("event seekEnd: ",this.seekEvents.last().seekEnd)};var g=function e(){v("stable");this.seekEvents.stable=true};var y=function e(){v("unstable");this.seekEvents.stable=false};var _=function e(t){h.seek=this.currentTime();h.clock=t.timeStamp||Date.now();p.seek=h.seek;p.clock=h.clock};var b=A.debounce(W,i.debounceTimeout);var T=function e(t){s=this.currentTime();o=t.timeStamp||+new Date;l=s-p.seek;if(o===p.clock||s===h.seek){return}u=Math.abs(l)/(Math.abs(o-p.clock)*.001);if(u>this.seekEvents.playbackRateTolerance){if(Math.abs(s-h.seek)>=this.seekEvents.minInterval){this.trigger("unstable");c=0;if(!a){f=Number(h.seek)}d.push({timeStamp:o,seekStart:f,seekEnd:s,seekInterval:s-f});if(d.length>i.maxSavedSeekEvents){d.shift()}a=true;b(this)}}else{c++;v(s+": "+c);if(c>=this.seekEvents.stableTimeUpdateCount&&!this.seekEvents.stable&&!a){this.trigger("stable")}h.seek=s}p.seek=s;p.clock=o};this.seekEvents={stableTimeUpdateCount:i.stableTimeUpdateCount,playbackRateTolerance:i.playbackRateTolerance,debounceTimeout:i.debounceTimeout,minInterval:i.minInterval,stable:false,enabled:function e(){return n},enable:t.bind(this,function(){if(n){return}n=true;h.seek=0;h.clock=Date.now();p.seek=0;p.clock=h.clock;this.on("seek",m);this.on("stable",g);this.on("unstable",y);this.on(["loadstart","playing","adplaying"],_);this.on(["timeupdate","adtimeupdate"],T)}),disable:t.bind(this,function(){if(!n){return}n=false;this.off("seek",m);this.off("stable",g);this.off("unstable",y);this.off(["loadstart","playing","adplaying"],_);this.off(["timeupdate","adtimeupdate"],T)}),last:function e(){return d[d.length-1]},all:function e(){return d}};this.seekEvents.enable()};var i=t.registerPlugin||t.plugin;r.VERSION=n;i("seekEvents",r)};var q="bc-style-vjs";var V="vjs-waiting-for-autoplay";function K(e,t,i){var n=e.classNames;if(!t&&!i&&t!==0&&i!==0){return}var a=r.querySelector("."+n.playerInstanceDimensions);if(!a){a=r.createElement("style");a.className=n.playerInstanceDimensions;var s=r.querySelector("."+n.playerStyle)||r.querySelector("."+q);if(s){s.parentNode.insertBefore(a,s.nextSibling)}else{r.head.appendChild(a)}}else if(a.innerText){if(!t&&t!==0){var o=/width:(\d+)px;/g.exec(a.innerText);if(o&&o[1]){t=parseInt(o[1],10)}}else if(!i&&i!==0){var l=/height:(\d+)px;/g.exec(a.innerText);if(l&&l[1]){i=parseInt(l[1],10)}}}var u="."+n.playerInstance+"{";if(t||t===0){u+="width:"+parseInt(t,10)+"px;"}if(i||i===0){u+="height:"+parseInt(i,10)+"px;"}u+="}";a.innerText=u}function z(e,t,r,i){var n=t.settings,a=t.environment;var s=n.embedId,o=n.playerId;var l=a.isInBcFrame,u=a.queryString,c=a.urlHash;var d="bc-player-"+o+"_"+s;var f=d+"-index-"+n.playerIndex;n.classNames={player:d,playerStyle:"bc-style-"+o+"-"+s,playerInstance:f,playerInstanceDimensions:f+"-video-dimensions"};n.embedState={muted:r.hasAttribute("muted"),playsinline:r.hasAttribute("playsinline"),poster:r.hasAttribute("poster"),sources:!!r.querySelector("source"),tracks:!!r.querySelector("track")};if(u.crossorigin!==undefined||n.media&&n.media.tracks&&e.browser.IS_ANY_SAFARI){n.crossorigin=true}if(n.crossorigin){r.setAttribute("crossorigin","anonymous")}var h=c.t||u.t||r.getAttribute("data-start-time");if(/^[\d]+$/.test(h)){n.startTime=Number(h)}else if(/^(\d+h)?(\d+m)?(\d+s)?$/.test(h)){n.startTime=h}var v=u.adConfigId;var m=r.getAttribute("data-ad-config-id");if(A.isNonEmptyStr(v)){n.adConfigId=v}else if(A.isNonEmptyStr(m)){n.adConfigId=m}if(typeof n.adConfigId==="string"){n.adConfigId=n.adConfigId.trim()}if(!A.isNonEmptyStr(n.adConfigId)){n.adConfigId=null}if(n.usingAdFailover&&!p.mightBe){n.adConfigId=null}var g=u.deliveryConfigId;var y=r.getAttribute("data-delivery-config-id");if(A.isNonEmptyStr(g)){n.deliveryConfigId=g}else if(A.isNonEmptyStr(y)){n.deliveryConfigId=y}if(typeof n.deliveryConfigId==="string"){n.deliveryConfigId=n.deliveryConfigId.trim()}if(!A.isNonEmptyStr(n.deliveryConfigId)){n.deliveryConfigId=null}n.applicationId=u.applicationId||r.getAttribute("data-application-id")||n.applicationId;var _=A.qs();if(r.hasAttribute("autoplay")){i.autoplay=true}else if(_.hash.hasOwnProperty("autoplay")||_.search.hasOwnProperty("autoplay")){i.autoplay=_.hash.autoplay||_.search.autoplay||true;if(!l){e.log.warn("DEPRECATION: Using the `autoplay` query parameter or URL hash value to request autoplay for advanced, in-page embeds is deprecated and will be removed in Brightcove Player 7. Please use the player configuration or Video.js option instead!")}}else if(!i.hasOwnProperty("autoplay")){i.autoplay=n.autoplay||false}if(i.autoplay){e.dom.addClass(r,V)}if(u.preload){i.preload=u.preload}else if(!i.hasOwnProperty("preload")&&n.preload){i.preload=n.preload}i.height=r.getAttribute("height")||undefined;i.width=r.getAttribute("width")||undefined;if(!l&&r&&(i.width||i.height)){K(n,i.width,i.height)}["loop","muted","playsinline"].forEach(function(e){if(u[e]!==undefined||n[e]||i[e]){i[e]=true}else{i[e]=false}});if(i.muted===true){r.setAttribute("muted","muted");r.muted=true}i.runtime_=t;return i}function G(e,t,r){var i=r.options_;var n=t.settings,a=t.environment;var s=n.accountId,o=n.applicationId,l=n.css,u=n.embedId,c=n.playerId;var d;r.mediainfo={accountId:s,account_id:s};r.bcinfo={accountId:s,applicationId:o,css:l,embedId:u,playerId:c,scriptUrl:a.scriptUrl,scriptBaseUrl:a.scriptBaseUrl};Object.defineProperty(r,"usingAdBlocker",{enumerable:true,value:p});p().then(function(e){if(e){r.trigger({type:"usage",name:"using-ad-blocker"})}});r.addClass(n.classNames.player);r.addClass(n.classNames.playerInstance);var f=e.bind(r,r.dimension);r.dimension=function(e,t){if(e==="width"){K(n,t,null)}else if(e==="height"){K(n,null,t)}return f(e,t)};r.ready(function(){if(!i.autoplay){return}function t(){r.removeClass(V)}function n(){if(!r.autoplay()){r.removeClass(V);return}var e=r.play();if(e===undefined){t()}else{e.then(t,t)}}var a=["canplay","error","durationchange"];function s(i){if(i.type==="error"){t();r.off(a,s);return}if(i.type==="durationchange"&&r.duration()===Infinity&&!e.browser.IS_ANY_SAFARI){n();r.off(a,s);return}if(i.type==="canplay"){n();r.off(a,s)}}if(!r.currentSrc()&&!d){t()}else if(r.readyState()===4){n()}else{r.one(a,s)}});var h=[{name:"proxyTracks",register:B},{name:"seekEvents",register:H},{name:"urlparams",register:I,opts:{iframe:a.isInBcFrame,time:n.startTime}}];h.forEach(function(t){var i=t.name,n=t.opts,a=t.register;if(!r.hasPlugin(i)){a(e)}if(!r.usingPlugin(i)){r[i](n)}});r.on("dispose",function(){i.runtime_=null})}function Y(e,t,r){var i=e.videojs;var n=-1;return function a(s){var o=i.getPlayer(s);if(o){o.trigger({type:"usage",name:"bc-used-as-getter"});return o}n++;var l=e.getRuntime({playerIndex:n});i.hookOnce("beforesetup",function(e,r){r=z(i,l,e,r);if(A.isFn(t)){return t(i,l,e,r)}return r});i.hookOnce("setup",function(e){G(i,l,e);if(A.isFn(r)){r(i,l,e)}});return i.apply(null,arguments)}}var X=function e(){};var $=function e(t,r){var i=t.extend(r,{constructor:function e(i){var n=this;r.call(this,i);var a=i.contentPlayer;var s=t.getComponent("Player");var o=[].concat(Object.getOwnPropertyNames(a)).concat(Object.getOwnPropertyNames(s.prototype));o.forEach(function(e){if(e in n||e in t.ima3.AdPlayer||e in t.ima3.AdPlayer.prototype){return}if(typeof a[e]==="function"){n[e]=X}else{Object.defineProperty(n,e,{get:function t(){return a[e]},set:X})}});["muted","volume"].forEach(function(e){Object.defineProperty(n,e,{configurable:true,set:function r(i){var s=function r(){if(!a.ima3||!a.ima3.adsManager){t.log.warn("Too early to set "+e+". IMA3 is not loaded");return}return i.apply(this,arguments)};Object.defineProperty(n,e,{value:s})},get:X})})}});i.patchOldIma3_=true;return i};var J=function e(t,r){var i=function e(r){if(r.patchOldIma3_){return}var i=$(t,r);Object.defineProperty(t.ima3,"AdPlayer",{get:function e(){return i},set:X})};var n=function e(r){if(!r){Object.defineProperty(t,"ima3",{configurable:true,get:X,set:function r(i){e(i);Object.defineProperty(t,"ima3",{value:i})}});return}if(!r.AdPlayer){Object.defineProperty(t.ima3,"AdPlayer",{configurable:true,get:X,set:i});return}i(r.AdPlayer)};if(t.ima3){n(t.ima3)}else{r.one("beforepluginsetup:ima3",function(){n(t.ima3)})}};var Q={accountId:"",adConfigId:"",applicationId:"",playsinline:false,loop:false,muted:false,autoplay:false,crossorigin:false,css:{},deliveryConfigId:"",embedId:"default",misconfiguredWithMultipleAdPlugins:false,playerId:"default",skin:"luna",usingAdFailover:false,version:"0.0.0"};var Z=function(){function e(t,r){if(t===void 0){t={}}if(r===void 0){r={}}var i=e.shared.videojs;if(!i){throw new Error("missing videojs")}this.runtime={environment:i.mergeOptions(r),settings:i.mergeOptions(Q,t)};if(this.runtime.settings.misconfiguredWithMultipleAdPlugins){i.log.warn('Brightcove Player "'+this.runtime.settings.playerId+'" is mis-configured with multiple ad plugins.')}this.videojs=i;this.util=A;i.bc_=A;this.detectRuntimeEnvironment();this.setupGlobalEnv();A.perf.mark("bcAdBlockDetectStart");p().then(function(e){A.perf.mark("bcAdBlockDetectEnd");A.perf.measure("bcAdBlockDetect","bcAdBlockDetectStart","bcAdBlockDetectEnd")})}var t=e.prototype;t.getRuntime=function e(t){return this.videojs.mergeOptions(this.runtime,{settings:t})};t.detectRuntimeEnvironment=function e(){var t=this.videojs.dom;var n=this.runtime.environment;var a=t.hasClass(r.documentElement,"bc-iframe");var s=A.qs();n.usingRequireJs=A.isFn(i.define)&&i.define.amd&&A.isFn(i.require&&i.require.toUrl);n.isInAnyFrame=t.isInFrame();n.isInBcFrame=a;n.queryString=a?s.search:{};n.urlHash=a?s.hash:{};this.setScriptUrl();this.setScriptBaseUrl()};t.setScriptUrl=function e(){var t=this.runtime.environment;if(t.isInBcFrame){t.scriptUrl=""}else if(t.usingRequireJs){t.scriptUrl=i.require.toUrl("bc")}else if(r.currentScript){t.scriptUrl=r.currentScript.src}else{var n=r.getElementsByTagName("script");t.scriptUrl=n.length&&n[n.length-1].src||""}};t.setScriptBaseUrl=function e(){var t=this.runtime.environment;if(t.scriptUrl){t.scriptBaseUrl=t.scriptUrl.split("/").slice(0,-1).join("/")}else{t.scriptBaseUrl="."}};t.safeSetGlobal=function e(t,r){if(!A.isNil(i[t])){return this.videojs.log.warn("setting window."+t+" would overwrite an existing global, skipping")}i[t]=r};t.setupGlobalEnv=function e(){var t=this;var r=this.videojs;var i=this.runtime.environment;var n=i.queryStringToWindow;if(!n||!i.isInBcFrame){return}var a=r.mergeOptions(i.queryString);if(n.target){this.safeSetGlobal(n.target,a)}if(Array.isArray(n.globals)){n.globals.forEach(function(e){t.safeSetGlobal(e,a[e])})}};t.createInitializer=function e(t,r){var n=this.videojs;var a=i.bc;var s=this.runtime.settings,o=s.embedId,l=s.playerId,u=s.skin,c=s.version;var d=Y(this,t,r);d.SKIN=u;d.VERSION=c;d.videojs=n;d[l+"_"+o]=d;if(a){Object.keys(a).forEach(function(e){var t=a[e];if(typeof t==="function"&&typeof t.videojs==="function"){d[e]=t;delete a[e]}})}Object.defineProperty(d,"usingAdBlocker",{enumerable:true,value:p});i.bc=d;return d};e.dedupeVideojs=function t(r,n){var a=r;e.shared.firstVideojs=n||r;if(n&&n.VERSION===r.VERSION){a=n}else if(i.bc){var s=Object.keys(i.bc);for(var o=0;o<s.length;o++){var l=s[o];var u=i.bc[l];if(typeof u==="function"&&typeof u.videojs==="function"){if(u.videojs.VERSION===r.VERSION){a=u.videojs;break}}}}i.videojs=a;e.shared.videojs=a;return a};e.restoreFirstVideojs=function t(){i.videojs=e.shared.firstVideojs};t.patchOldIma3=function e(t,r){J(t,r)};return e}();Z.defaultSettings=Q;Z.shared={};Z.VERSION=n;return Z}(t,e);(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("global/window"),require("global/document")):typeof r==="function"&&r.amd?r(["global/window","global/document"],t):(e=e||self,e.videojs=t(e.window,e.document))})(this,function(t,r){t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;var i="7.6.5";var n=[];var a=function e(r,i){return function(e,a,s){var o=i.levels[a];var l=new RegExp("^("+o+")$");if(e!=="log"){s.unshift(e.toUpperCase()+":")}s.unshift(r+":");if(n){n.push([].concat(s))}if(!t.console){return}var u=t.console[e];if(!u&&e==="debug"){u=t.console.info||t.console.log}if(!u||!o||!l.test(e)){return}u[Array.isArray(s)?"apply":"call"](t.console,s)}};function s(e){var t="info";var r;var i=function e(){for(var i=arguments.length,n=new Array(i),a=0;a<i;a++){n[a]=arguments[a]}r("log",t,n)};r=a(e,i);i.createLogger=function(t){return s(e+": "+t)};i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:t};i.level=function(e){if(typeof e==="string"){if(!i.levels.hasOwnProperty(e)){throw new Error('"'+e+'" in not a valid log level')}t=e}return t};i.history=function(){return n?[].concat(n):[]};i.history.filter=function(e){return(n||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})};i.history.clear=function(){if(n){n.length=0}};i.history.disable=function(){if(n!==null){n.length=0;n=null}};i.history.enable=function(){if(n===null){n=[]}};i.error=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}return r("error",t,i)};i.warn=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}return r("warn",t,i)};i.debug=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}return r("debug",t,i)};return i}var o=s("VIDEOJS");var l=o.createLogger;var u=Object.prototype.toString;var c=function e(t){return p(t)?Object.keys(t):[]};function d(e,t){c(e).forEach(function(r){return t(e[r],r)})}function f(e,t,r){if(r===void 0){r=0}return c(e).reduce(function(r,i){return t(r,e[i],i)},r)}function h(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++){r[i-1]=arguments[i]}if(Object.assign){return Object.assign.apply(Object,[e].concat(r))}r.forEach(function(t){if(!t){return}d(t,function(t,r){e[r]=t})});return e}function p(e){return!!e&&typeof e==="object"}function v(e){return p(e)&&u.call(e)==="[object Object]"&&e.constructor===Object}function m(e,r){if(!e||!r){return""}if(typeof t.getComputedStyle==="function"){var i=t.getComputedStyle(e);return i?i.getPropertyValue(r)||i[r]:""}return""}function g(e){return typeof e==="string"&&/\S/.test(e)}function y(e){if(/\s/.test(e)){throw new Error("class has illegal whitespace characters")}}function _(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function b(){return r===t.document}function T(e){return p(e)&&e.nodeType===1}function S(){try{return t.parent!==t.self}catch(e){return true}}function k(e){return function(t,i){if(!g(t)){return r[e](null)}if(g(i)){i=r.querySelector(i)}var n=T(i)?i:r;return n[e]&&n[e](t)}}function j(e,t,i,n){if(e===void 0){e="div"}if(t===void 0){t={}}if(i===void 0){i={}}var a=r.createElement(e);Object.getOwnPropertyNames(t).forEach(function(e){var r=t[e];if(e.indexOf("aria-")!==-1||e==="role"||e==="type"){o.warn("Setting attributes in the second argument of createEl()\n"+"has been deprecated. Use the third argument instead.\n"+("createEl(type, properties, attributes). Attempting to set "+e+" to "+r+"."));a.setAttribute(e,r)}else if(e==="textContent"){E(a,r)}else{a[e]=r}});Object.getOwnPropertyNames(i).forEach(function(e){a.setAttribute(e,i[e])});if(n){V(a,n)}return a}function E(e,t){if(typeof e.textContent==="undefined"){e.innerText=t}else{e.textContent=t}return e}function w(e,t){if(t.firstChild){t.insertBefore(e,t.firstChild)}else{t.appendChild(e)}}function C(e,t){y(t);if(e.classList){return e.classList.contains(t)}return _(t).test(e.className)}function A(e,t){if(e.classList){e.classList.add(t)}else if(!C(e,t)){e.className=(e.className+" "+t).trim()}return e}function I(e,t){if(e.classList){e.classList.remove(t)}else{y(t);e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")}return e}function x(e,t,r){var i=C(e,t);if(typeof r==="function"){r=r(e,t)}if(typeof r!=="boolean"){r=!i}if(r===i){return}if(r){A(e,t)}else{I(e,t)}return e}function P(e,t){Object.getOwnPropertyNames(t).forEach(function(r){var i=t[r];if(i===null||typeof i==="undefined"||i===false){e.removeAttribute(r)}else{e.setAttribute(r,i===true?"":i)}})}function O(e){var t={};var r=","+"autoplay,controls,playsinline,loop,muted,default,defaultMuted"+",";if(e&&e.attributes&&e.attributes.length>0){var i=e.attributes;for(var n=i.length-1;n>=0;n--){var a=i[n].name;var s=i[n].value;if(typeof e[a]==="boolean"||r.indexOf(","+a+",")!==-1){s=s!==null?true:false}t[a]=s}}return t}function D(e,t){return e.getAttribute(t)}function L(e,t,r){e.setAttribute(t,r)}function R(e,t){e.removeAttribute(t)}function U(){r.body.focus();r.onselectstart=function(){return false}}function N(){r.onselectstart=function(){return true}}function M(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect();var r={};["bottom","height","left","right","top","width"].forEach(function(e){if(t[e]!==undefined){r[e]=t[e]}});if(!r.height){r.height=parseFloat(m(e,"height"))}if(!r.width){r.width=parseFloat(m(e,"width"))}return r}}function B(e){var i;if(e.getBoundingClientRect&&e.parentNode){i=e.getBoundingClientRect()}if(!i){return{left:0,top:0}}var n=r.documentElement;var a=r.body;var s=n.clientLeft||a.clientLeft||0;var o=t.pageXOffset||a.scrollLeft;var l=i.left+o-s;var u=n.clientTop||a.clientTop||0;var c=t.pageYOffset||a.scrollTop;var d=i.top+c-u;return{left:Math.round(l),top:Math.round(d)}}function F(e,t){var r={};var i=B(e);var n=e.offsetWidth;var a=e.offsetHeight;var s=i.top;var o=i.left;var l=t.pageY;var u=t.pageX;if(t.changedTouches){u=t.changedTouches[0].pageX;l=t.changedTouches[0].pageY}r.y=Math.max(0,Math.min(1,(s-l+a)/a));r.x=Math.max(0,Math.min(1,(u-o)/n));return r}function W(e){return p(e)&&e.nodeType===3}function H(e){while(e.firstChild){e.removeChild(e.firstChild)}return e}function q(e){if(typeof e==="function"){e=e()}return(Array.isArray(e)?e:[e]).map(function(e){if(typeof e==="function"){e=e()}if(T(e)||W(e)){return e}if(typeof e==="string"&&/\S/.test(e)){return r.createTextNode(e)}}).filter(function(e){return e})}function V(e,t){q(t).forEach(function(t){return e.appendChild(t)});return e}function K(e,t){return V(H(e),t)}function z(e){if(e.button===undefined&&e.buttons===undefined){return true}if(e.button===0&&e.buttons===undefined){return true}if(e.type==="mouseup"&&e.button===0&&e.buttons===0){return true}if(e.button!==0||e.buttons!==1){return false}return true}var G=k("querySelector");var Y=k("querySelectorAll");var X=Object.freeze({isReal:b,isEl:T,isInFrame:S,createEl:j,textContent:E,prependTo:w,hasClass:C,addClass:A,removeClass:I,toggleClass:x,setAttributes:P,getAttributes:O,getAttribute:D,setAttribute:L,removeAttribute:R,blockTextSelection:U,unblockTextSelection:N,getBoundingClientRect:M,findPosition:B,getPointerPosition:F,isTextNode:W,emptyEl:H,normalizeContent:q,appendContent:V,insertContent:K,isSingleLeftClick:z,$:G,$$:Y});var $=false;var J;var Q=function e(){if(!b()||J.options.autoSetup===false){return}var t=Array.prototype.slice.call(r.getElementsByTagName("video"));var i=Array.prototype.slice.call(r.getElementsByTagName("audio"));var n=Array.prototype.slice.call(r.getElementsByTagName("video-js"));var a=t.concat(i,n);if(a&&a.length>0){for(var s=0,o=a.length;s<o;s++){var l=a[s];if(l&&l.getAttribute){if(l.player===undefined){var u=l.getAttribute("data-setup");if(u!==null){J(l)}}}else{Z(1);break}}}else if(!$){Z(1)}};function Z(e,r){if(r){J=r}t.setTimeout(Q,e)}function ee(){$=true;t.removeEventListener("load",ee)}if(b()){if(r.readyState==="complete"){ee()}else{t.addEventListener("load",ee)}}var te=function e(t){var i=r.createElement("style");i.className=t;return i};var re=function e(t,r){if(t.styleSheet){t.styleSheet.cssText=r}else{t.textContent=r}};var ie=new WeakMap;var ne=3;var ae=ne;function se(){return ae++}function oe(e,t){if(!ie.has(e)){return}var r=ie.get(e);if(r.handlers[t].length===0){delete r.handlers[t];if(e.removeEventListener){e.removeEventListener(t,r.dispatcher,false)}else if(e.detachEvent){e.detachEvent("on"+t,r.dispatcher)}}if(Object.getOwnPropertyNames(r.handlers).length<=0){delete r.handlers;delete r.dispatcher;delete r.disabled}if(Object.getOwnPropertyNames(r).length===0){ie["delete"](e)}}function le(e,t,r,i){r.forEach(function(r){e(t,r,i)})}function ue(e){function i(){return true}function n(){return false}if(!e||!e.isPropagationStopped){var a=e||t.event;e={};for(var s in a){if(s!=="layerX"&&s!=="layerY"&&s!=="keyLocation"&&s!=="webkitMovementX"&&s!=="webkitMovementY"){if(!(s==="returnValue"&&a.preventDefault)){e[s]=a[s]}}}if(!e.target){e.target=e.srcElement||r}if(!e.relatedTarget){e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement}e.preventDefault=function(){if(a.preventDefault){a.preventDefault()}e.returnValue=false;a.returnValue=false;e.defaultPrevented=true};e.defaultPrevented=false;e.stopPropagation=function(){if(a.stopPropagation){a.stopPropagation()}e.cancelBubble=true;a.cancelBubble=true;e.isPropagationStopped=i};e.isPropagationStopped=n;e.stopImmediatePropagation=function(){if(a.stopImmediatePropagation){a.stopImmediatePropagation()}e.isImmediatePropagationStopped=i;e.stopPropagation()};e.isImmediatePropagationStopped=n;if(e.clientX!==null&&e.clientX!==undefined){var o=r.documentElement;var l=r.body;e.pageX=e.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0);e.pageY=e.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.clientTop||0)}e.which=e.charCode||e.keyCode;if(e.button!==null&&e.button!==undefined){e.button=e.button&1?0:e.button&4?1:e.button&2?2:0}}return e}var ce=false;(function(){try{var e=Object.defineProperty({},"passive",{get:function e(){ce=true}});t.addEventListener("test",null,e);t.removeEventListener("test",null,e)}catch(e){}})();var de=["touchstart","touchmove"];function fe(e,t,r){if(Array.isArray(t)){return le(fe,e,t,r)}if(!ie.has(e)){ie.set(e,{})}var i=ie.get(e);if(!i.handlers){i.handlers={}}if(!i.handlers[t]){i.handlers[t]=[]}if(!r.guid){r.guid=se()}i.handlers[t].push(r);if(!i.dispatcher){i.disabled=false;i.dispatcher=function(t,r){if(i.disabled){return}t=ue(t);var n=i.handlers[t.type];if(n){var a=n.slice(0);for(var s=0,l=a.length;s<l;s++){if(t.isImmediatePropagationStopped()){break}else{try{a[s].call(e,t,r)}catch(e){o.error(e)}}}}}}if(i.handlers[t].length===1){if(e.addEventListener){var n=false;if(ce&&de.indexOf(t)>-1){n={passive:true}}e.addEventListener(t,i.dispatcher,n)}else if(e.attachEvent){e.attachEvent("on"+t,i.dispatcher)}}}function he(e,t,r){if(!ie.has(e)){return}var i=ie.get(e);if(!i.handlers){return}if(Array.isArray(t)){return le(he,e,t,r)}var n=function e(t,r){i.handlers[r]=[];oe(t,r)};if(t===undefined){for(var a in i.handlers){if(Object.prototype.hasOwnProperty.call(i.handlers||{},a)){n(e,a)}}return}var s=i.handlers[t];if(!s){return}if(!r){n(e,t);return}if(r.guid){for(var o=0;o<s.length;o++){if(s[o].guid===r.guid){s.splice(o--,1)}}}oe(e,t)}function pe(e,t,r){var i=ie.has(e)?ie.get(e):{};var n=e.parentNode||e.ownerDocument;if(typeof t==="string"){t={type:t,target:e}}else if(!t.target){t.target=e}t=ue(t);if(i.dispatcher){i.dispatcher.call(e,t,r)}if(n&&!t.isPropagationStopped()&&t.bubbles===true){pe.call(null,n,t,r)}else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){if(!ie.has(t.target)){ie.set(t.target,{})}var a=ie.get(t.target);if(t.target[t.type]){a.disabled=true;if(typeof t.target[t.type]==="function"){t.target[t.type]()}a.disabled=false}}return!t.defaultPrevented}function ve(e,t,r){if(Array.isArray(t)){return le(ve,e,t,r)}var i=function i(){he(e,t,i);r.apply(this,arguments)};i.guid=r.guid=r.guid||se();fe(e,t,i)}function me(e,t,r){var i=function i(){he(e,t,i);r.apply(this,arguments)};i.guid=r.guid=r.guid||se();fe(e,t,i)}var ge=Object.freeze({fixEvent:ue,on:fe,off:he,trigger:pe,one:ve,any:me});var ye=30;var _e=function e(t,r,i){if(!r.guid){r.guid=se()}var n=r.bind(t);n.guid=i?i+"_"+r.guid:r.guid;return n};var be=function e(r,i){var n=t.performance.now();var a=function e(){var a=t.performance.now();if(a-n>=i){r.apply(void 0,arguments);n=a}};return a};var Te=function e(r,i,n,a){if(a===void 0){a=t}var s;var o=function e(){a.clearTimeout(s);s=null};var l=function e(){var t=this;var o=arguments;var l=function e(){s=null;l=null;if(!n){r.apply(t,o)}};if(!s&&n){r.apply(t,o)}a.clearTimeout(s);s=a.setTimeout(l,i)};l.cancel=o;return l};var Se=function e(){};Se.prototype.allowedEvents_={};Se.prototype.on=function(e,t){var r=this.addEventListener;this.addEventListener=function(){};fe(this,e,t);this.addEventListener=r};Se.prototype.addEventListener=Se.prototype.on;Se.prototype.off=function(e,t){he(this,e,t)};Se.prototype.removeEventListener=Se.prototype.off;Se.prototype.one=function(e,t){var r=this.addEventListener;this.addEventListener=function(){};ve(this,e,t);this.addEventListener=r};Se.prototype.any=function(e,t){var r=this.addEventListener;this.addEventListener=function(){};me(this,e,t);this.addEventListener=r};Se.prototype.trigger=function(e){var t=e.type||e;if(typeof e==="string"){e={type:t}}e=ue(e);if(this.allowedEvents_[t]&&this["on"+t]){this["on"+t](e)}pe(this,e)};Se.prototype.dispatchEvent=Se.prototype.trigger;var ke;Se.prototype.queueTrigger=function(e){var r=this;if(!ke){ke=new Map}var i=e.type||e;var n=ke.get(this);if(!n){n=new Map;ke.set(this,n)}var a=n.get(i);n["delete"](i);t.clearTimeout(a);var s=t.setTimeout(function(){if(n.size===0){n=null;ke["delete"](r)}r.trigger(e)},0);n.set(i,s)};var je=function e(t){return t instanceof Se||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return typeof t[e]==="function"})};var Ee=function e(t,r){if(je(t)){r()}else{if(!t.eventedCallbacks){t.eventedCallbacks=[]}t.eventedCallbacks.push(r)}};var we=function e(t){return typeof t==="string"&&/\S/.test(t)||Array.isArray(t)&&!!t.length};var Ce=function e(t){if(!t.nodeName&&!je(t)){throw new Error("Invalid target; must be a DOM node or evented object.")}};var Ae=function e(t){if(!we(t)){throw new Error("Invalid event type; must be a non-empty string or array.")}};var Ie=function e(t){if(typeof t!=="function"){throw new Error("Invalid listener; must be a function.")}};var xe=function e(t,r){var i=r.length<3||r[0]===t||r[0]===t.eventBusEl_;var n;var a;var s;if(i){n=t.eventBusEl_;if(r.length>=3){r.shift()}a=r[0];s=r[1]}else{n=r[0];a=r[1];s=r[2]}Ce(n);Ae(a);Ie(s);s=_e(t,s);return{isTargetingSelf:i,target:n,type:a,listener:s}};var Pe=function e(t,r,i,n){Ce(t);if(t.nodeName){ge[r](t,i,n)}else{t[r](i,n)}};var Oe={on:function e(){var t=this;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}var a=xe(this,i),s=a.isTargetingSelf,o=a.target,l=a.type,u=a.listener;Pe(o,"on",l,u);if(!s){var c=function e(){return t.off(o,l,u)};c.guid=u.guid;var d=function e(){return t.off("dispose",c)};d.guid=u.guid;Pe(this,"on","dispose",c);Pe(o,"on","dispose",d)}},one:function e(){var t=this;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}var a=xe(this,i),s=a.isTargetingSelf,o=a.target,l=a.type,u=a.listener;if(s){Pe(o,"one",l,u)}else{var c=function e(){t.off(o,l,e);for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}u.apply(null,i)};c.guid=u.guid;Pe(o,"one",l,c)}},any:function e(){var t=this;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}var a=xe(this,i),s=a.isTargetingSelf,o=a.target,l=a.type,u=a.listener;if(s){Pe(o,"any",l,u)}else{var c=function e(){t.off(o,l,e);for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}u.apply(null,i)};c.guid=u.guid;Pe(o,"any",l,c)}},off:function e(t,r,i){if(!t||we(t)){he(this.eventBusEl_,t,r)}else{var n=t;var a=r;Ce(n);Ae(a);Ie(i);i=_e(this,i);this.off("dispose",i);if(n.nodeName){he(n,a,i);he(n,"dispose",i)}else if(je(n)){n.off(a,i);n.off("dispose",i)}}},trigger:function e(t,r){return pe(this.eventBusEl_,t,r)}};function De(e,r){if(r===void 0){r={}}var i=r,n=i.eventBusKey;if(n){if(!e[n].nodeName){throw new Error('The eventBusKey "'+n+'" does not refer to an element.')}e.eventBusEl_=e[n]}else{e.eventBusEl_=j("span",{className:"vjs-event-bus"})}h(e,Oe);if(e.eventedCallbacks){e.eventedCallbacks.forEach(function(e){e()})}e.on("dispose",function(){e.off();t.setTimeout(function(){e.eventBusEl_=null},0)});return e}var Le={state:{},setState:function e(t){var r=this;if(typeof t==="function"){t=t()}var i;d(t,function(e,t){if(r.state[t]!==e){i=i||{};i[t]={from:r.state[t],to:e}}r.state[t]=e});if(i&&je(this)){this.trigger({changes:i,type:"statechanged"})}return i}};function Re(e,t){h(e,Le);e.state=h({},e.state,t);if(typeof e.handleStateChanged==="function"&&je(e)){e.on("statechanged",e.handleStateChanged)}return e}var Ue=function e(t){if(typeof t!=="string"){return t}return t.replace(/./,function(e){return e.toLowerCase()})};var Ne=function e(t){if(typeof t!=="string"){return t}return t.replace(/./,function(e){return e.toUpperCase()})};var Me=function e(t,r){return Ne(t)===Ne(r)};function Be(){var e={};for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}r.forEach(function(t){if(!t){return}d(t,function(t,r){if(!v(t)){e[r]=t;return}if(!v(e[r])){e[r]={}}e[r]=Be(e[r],t)})});return e}var Fe=function(){function e(e,t,r){if(!e&&this.play){this.player_=e=this}else{this.player_=e}this.parentComponent_=null;this.options_=Be({},this.options_);t=this.options_=Be(this.options_,t);this.id_=t.id||t.el&&t.el.id;if(!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+se()}this.name_=t.name||null;if(t.el){this.el_=t.el}else if(t.createEl!==false){this.el_=this.createEl()}if(t.evented!==false){De(this,{eventBusKey:this.el_?"el_":null})}Re(this,this.constructor.defaultState);this.children_=[];this.childIndex_={};this.childNameIndex_={};this.setTimeoutIds_=new Set;this.setIntervalIds_=new Set;this.rafIds_=new Set;this.clearingTimersOnDispose_=false;if(t.initChildren!==false){this.initChildren()}this.ready(r);if(t.reportTouchActivity!==false){this.enableTouchActivity()}}var r=e.prototype;r.dispose=function e(){this.trigger({type:"dispose",bubbles:false});if(this.children_){for(var t=this.children_.length-1;t>=0;t--){if(this.children_[t].dispose){this.children_[t].dispose()}}}this.children_=null;this.childIndex_=null;this.childNameIndex_=null;this.parentComponent_=null;if(this.el_){if(this.el_.parentNode){this.el_.parentNode.removeChild(this.el_)}if(ie.has(this.el_)){ie["delete"](this.el_)}this.el_=null}this.player_=null};r.player=function e(){return this.player_};r.options=function e(t){if(!t){return this.options_}this.options_=Be(this.options_,t);return this.options_};r.el=function e(){return this.el_};r.createEl=function e(t,r,i){return j(t,r,i)};r.localize=function e(t,r,i){if(i===void 0){i=t}var n=this.player_.language&&this.player_.language();var a=this.player_.languages&&this.player_.languages();var s=a&&a[n];var o=n&&n.split("-")[0];var l=a&&a[o];var u=i;if(s&&s[t]){u=s[t]}else if(l&&l[t]){u=l[t]}if(r){u=u.replace(/\{(\d+)\}/g,function(e,t){var i=r[t-1];var n=i;if(typeof i==="undefined"){n=e}return n})}return u};r.contentEl=function e(){return this.contentEl_||this.el_};r.id=function e(){return this.id_};r.name=function e(){return this.name_};r.children=function e(){return this.children_};r.getChildById=function e(t){return this.childIndex_[t]};r.getChild=function e(t){if(!t){return}return this.childNameIndex_[t]};r.addChild=function t(r,i,n){if(i===void 0){i={}}if(n===void 0){n=this.children_.length}var a;var s;if(typeof r==="string"){s=Ne(r);var o=i.componentClass||s;i.name=s;var l=e.getComponent(o);if(!l){throw new Error("Component "+o+" does not exist")}if(typeof l!=="function"){return null}a=new l(this.player_||this,i)}else{a=r}if(a.parentComponent_){a.parentComponent_.removeChild(a)}this.children_.splice(n,0,a);a.parentComponent_=this;if(typeof a.id==="function"){this.childIndex_[a.id()]=a}s=s||a.name&&Ne(a.name());if(s){this.childNameIndex_[s]=a;this.childNameIndex_[Ue(s)]=a}if(typeof a.el==="function"&&a.el()){var u=this.contentEl().children;var c=u[n]||null;this.contentEl().insertBefore(a.el(),c)}return a};r.removeChild=function e(t){if(typeof t==="string"){t=this.getChild(t)}if(!t||!this.children_){return}var r=false;for(var i=this.children_.length-1;i>=0;i--){if(this.children_[i]===t){r=true;this.children_.splice(i,1);break}}if(!r){return}t.parentComponent_=null;this.childIndex_[t.id()]=null;this.childNameIndex_[Ne(t.name())]=null;this.childNameIndex_[Ue(t.name())]=null;var n=t.el();if(n&&n.parentNode===this.contentEl()){this.contentEl().removeChild(t.el())}};r.initChildren=function t(){var r=this;var i=this.options_.children;if(i){var n=this.options_;var a=function e(t){var i=t.name;var a=t.opts;if(n[i]!==undefined){a=n[i]}if(a===false){return}if(a===true){a={}}a.playerOptions=r.options_.playerOptions;var s=r.addChild(i,a);if(s){r[i]=s}};var s;var o=e.getComponent("Tech");if(Array.isArray(i)){s=i}else{s=Object.keys(i)}s.concat(Object.keys(this.options_).filter(function(e){return!s.some(function(t){if(typeof t==="string"){return e===t}return e===t.name})})).map(function(e){var t;var n;if(typeof e==="string"){t=e;n=i[t]||r.options_[t]||{}}else{t=e.name;n=e}return{name:t,opts:n}}).filter(function(t){var r=e.getComponent(t.opts.componentClass||Ne(t.name));return r&&!o.isTech(r)}).forEach(a)}};r.buildCSSClass=function e(){return""};r.ready=function e(t,r){if(r===void 0){r=false}if(!t){return}if(!this.isReady_){this.readyQueue_=this.readyQueue_||[];this.readyQueue_.push(t);return}if(r){t.call(this)}else{this.setTimeout(t,1)}};r.triggerReady=function e(){this.isReady_=true;this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[];if(e&&e.length>0){e.forEach(function(e){e.call(this)},this)}this.trigger("ready")},1)};r.$=function e(t,r){return G(t,r||this.contentEl())};r.$$=function e(t,r){return Y(t,r||this.contentEl())};r.hasClass=function e(t){return C(this.el_,t)};r.addClass=function e(t){A(this.el_,t)};r.removeClass=function e(t){I(this.el_,t)};r.toggleClass=function e(t,r){x(this.el_,t,r)};r.show=function e(){this.removeClass("vjs-hidden")};r.hide=function e(){this.addClass("vjs-hidden")};r.lockShowing=function e(){this.addClass("vjs-lock-showing")};r.unlockShowing=function e(){this.removeClass("vjs-lock-showing")};r.getAttribute=function e(t){return D(this.el_,t)};r.setAttribute=function e(t,r){L(this.el_,t,r)};r.removeAttribute=function e(t){R(this.el_,t)};r.width=function e(t,r){return this.dimension("width",t,r)};r.height=function e(t,r){return this.dimension("height",t,r)};r.dimensions=function e(t,r){this.width(t,true);this.height(r)};r.dimension=function e(t,r,i){if(r!==undefined){if(r===null||r!==r){r=0}if((""+r).indexOf("%")!==-1||(""+r).indexOf("px")!==-1){this.el_.style[t]=r}else if(r==="auto"){this.el_.style[t]=""}else{this.el_.style[t]=r+"px"}if(!i){this.trigger("componentresize")}return}if(!this.el_){return 0}var n=this.el_.style[t];var a=n.indexOf("px");if(a!==-1){return parseInt(n.slice(0,a),10)}return parseInt(this.el_["offset"+Ne(t)],10)};r.currentDimension=function e(t){var r=0;if(t!=="width"&&t!=="height"){throw new Error("currentDimension only accepts width or height value")}r=m(this.el_,t);r=parseFloat(r);if(r===0||isNaN(r)){var i="offset"+Ne(t);r=this.el_[i]}return r};r.currentDimensions=function e(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}};r.currentWidth=function e(){return this.currentDimension("width")};r.currentHeight=function e(){return this.currentDimension("height")};r.focus=function e(){this.el_.focus()};r.blur=function e(){this.el_.blur()};r.handleKeyDown=function e(t){if(this.player_){t.stopPropagation();this.player_.handleKeyDown(t)}};r.handleKeyPress=function e(t){this.handleKeyDown(t)};r.emitTapEvents=function e(){var r=0;var i=null;var n=10;var a=200;var s;this.on("touchstart",function(e){if(e.touches.length===1){i={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY};r=t.performance.now();s=true}});this.on("touchmove",function(e){if(e.touches.length>1){s=false}else if(i){var t=e.touches[0].pageX-i.pageX;var r=e.touches[0].pageY-i.pageY;var a=Math.sqrt(t*t+r*r);if(a>n){s=false}}});var o=function e(){s=false};this.on("touchleave",o);this.on("touchcancel",o);this.on("touchend",function(e){i=null;if(s===true){var n=t.performance.now()-r;if(n<a){e.preventDefault();this.trigger("tap")}}})};r.enableTouchActivity=function e(){if(!this.player()||!this.player().reportUserActivity){return}var t=_e(this.player(),this.player().reportUserActivity);var r;this.on("touchstart",function(){t();this.clearInterval(r);r=this.setInterval(t,250)});var i=function e(i){t();this.clearInterval(r)};this.on("touchmove",t);this.on("touchend",i);this.on("touchcancel",i)};r.setTimeout=function e(r,i){var n=this;var a;r=_e(this,r);this.clearTimersOnDispose_();a=t.setTimeout(function(){if(n.setTimeoutIds_.has(a)){n.setTimeoutIds_["delete"](a)}r()},i);this.setTimeoutIds_.add(a);return a};r.clearTimeout=function e(r){if(this.setTimeoutIds_.has(r)){this.setTimeoutIds_["delete"](r);t.clearTimeout(r)}return r};r.setInterval=function e(r,i){r=_e(this,r);this.clearTimersOnDispose_();var n=t.setInterval(r,i);this.setIntervalIds_.add(n);return n};r.clearInterval=function e(r){if(this.setIntervalIds_.has(r)){this.setIntervalIds_["delete"](r);t.clearInterval(r)}return r};r.requestAnimationFrame=function e(r){var i=this;if(!this.supportsRaf_){return this.setTimeout(r,1e3/60)}this.clearTimersOnDispose_();var n;r=_e(this,r);n=t.requestAnimationFrame(function(){if(i.rafIds_.has(n)){i.rafIds_["delete"](n)}r()});this.rafIds_.add(n);return n};r.cancelAnimationFrame=function e(r){if(!this.supportsRaf_){return this.clearTimeout(r)}if(this.rafIds_.has(r)){this.rafIds_["delete"](r);t.cancelAnimationFrame(r)}return r};r.clearTimersOnDispose_=function e(){var t=this;if(this.clearingTimersOnDispose_){return}this.clearingTimersOnDispose_=true;this.one("dispose",function(){[["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(e){var r=e[0],i=e[1];t[r].forEach(t[i],t)});t.clearingTimersOnDispose_=false})};e.registerComponent=function t(r,i){if(typeof r!=="string"||!r){throw new Error('Illegal component name, "'+r+'"; must be a non-empty string.')}var n=e.getComponent("Tech");var a=n&&n.isTech(i);var s=e===i||e.prototype.isPrototypeOf(i.prototype);if(a||!s){var o;if(a){o="techs must be registered using Tech.registerTech()"}else{o="must be a Component subclass"}throw new Error('Illegal component, "'+r+'"; '+o+".")}r=Ne(r);if(!e.components_){e.components_={}}var l=e.getComponent("Player");if(r==="Player"&&l&&l.players){var u=l.players;var c=Object.keys(u);if(u&&c.length>0&&c.map(function(e){return u[e]}).every(Boolean)){throw new Error("Can not register Player component after player has been created.")}}e.components_[r]=i;e.components_[Ue(r)]=i;return i};e.getComponent=function t(r){if(!r||!e.components_){return}return e.components_[r]};return e}();Fe.prototype.supportsRaf_=typeof t.requestAnimationFrame==="function"&&typeof t.cancelAnimationFrame==="function";Fe.registerComponent("Component",Fe);function We(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function He(e,t){He=Object.setPrototypeOf||function e(t,r){t.__proto__=r;return t};return He(e,t)}function qe(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}function Ve(e,t,r){if(qe()){Ve=Reflect.construct}else{Ve=function e(t,r,i){var n=[null];n.push.apply(n,r);var a=Function.bind.apply(t,n);var s=new a;if(i)He(s,i.prototype);return s}}return Ve.apply(null,arguments)}function Ke(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var ze=t.navigator&&t.navigator.userAgent||"";var Ge=/AppleWebKit\/([\d.]+)/i.exec(ze);var Ye=Ge?parseFloat(Ge.pop()):null;var Xe=/iPad/i.test(ze);var $e=/iPhone/i.test(ze)&&!Xe;var Je=/iPod/i.test(ze);var Qe=$e||Xe||Je;var Ze=function(){var e=ze.match(/OS (\d+)_/i);if(e&&e[1]){return e[1]}return null}();var et=/Android/i.test(ze);var tt=function(){var e=ze.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e){return null}var t=e[1]&&parseFloat(e[1]);var r=e[2]&&parseFloat(e[2]);if(t&&r){return parseFloat(e[1]+"."+e[2])}else if(t){return t}return null}();var rt=et&&tt<5&&Ye<537;var it=/Firefox/i.test(ze);var nt=/Edge/i.test(ze);var at=!nt&&(/Chrome/i.test(ze)||/CriOS/i.test(ze));var st=function(){var e=ze.match(/(Chrome|CriOS)\/(\d+)/);if(e&&e[2]){return parseFloat(e[2])}return null}();var ot=function(){var e=/MSIE\s(\d+)\.\d/.exec(ze);var t=e&&parseFloat(e[1]);if(!t&&/Trident\/7.0/i.test(ze)&&/rv:11.0/.test(ze)){t=11}return t}();var lt=/Safari/i.test(ze)&&!at&&!et&&!nt;var ut=(lt||Qe)&&!at;var ct=/Windows/i.test(ze);var dt=b()&&("ontouchstart"in t||t.navigator.maxTouchPoints||t.DocumentTouch&&t.document instanceof t.DocumentTouch);var ft=Object.freeze({IS_IPAD:Xe,IS_IPHONE:$e,IS_IPOD:Je,IS_IOS:Qe,IOS_VERSION:Ze,IS_ANDROID:et,ANDROID_VERSION:tt,IS_NATIVE_ANDROID:rt,IS_FIREFOX:it,IS_EDGE:nt,IS_CHROME:at,CHROME_VERSION:st,IE_VERSION:ot,IS_SAFARI:lt,IS_ANY_SAFARI:ut,IS_WINDOWS:ct,TOUCH_ENABLED:dt});function ht(e,t,r){if(typeof t!=="number"||t<0||t>r){throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+r+").")}}function pt(e,t,r,i){ht(e,i,r.length-1);return r[i][t]}function vt(e){if(e===undefined||e.length===0){return{length:0,start:function e(){throw new Error("This TimeRanges object is empty")},end:function e(){throw new Error("This TimeRanges object is empty")}}}return{length:e.length,start:pt.bind(null,"start",0,e),end:pt.bind(null,"end",1,e)}}function mt(e,t){if(Array.isArray(e)){return vt(e)}else if(e===undefined||t===undefined){return vt()}return vt([[e,t]])}function gt(e,t){var r=0;var i;var n;if(!t){return 0}if(!e||!e.length){e=mt(0,0)}for(var a=0;a<e.length;a++){i=e.start(a);n=e.end(a);if(n>t){n=t}r+=n-i}return r/t}var yt={prefixed:true};var _t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]];var bt=_t[0];var Tt;for(var St=0;St<_t.length;St++){if(_t[St][1]in r){Tt=_t[St];break}}if(Tt){for(var kt=0;kt<Tt.length;kt++){yt[bt[kt]]=Tt[kt]}yt.prefixed=Tt[0]!==bt[0]}function jt(e){if(e instanceof jt){return e}if(typeof e==="number"){this.code=e}else if(typeof e==="string"){this.message=e}else if(p(e)){if(typeof e.code==="number"){this.code=e.code}h(this,e)}if(!this.message){this.message=jt.defaultMessages[this.code]||""}}jt.prototype.code=0;jt.prototype.message="";jt.prototype.status=null;jt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];jt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Et=0;Et<jt.errorTypes.length;Et++){jt[jt.errorTypes[Et]]=Et;jt.prototype[jt.errorTypes[Et]]=Et}var wt=Ct;function Ct(e,t){var r;var i=null;try{r=JSON.parse(e,t)}catch(e){i=e}return[i,r]}function At(e){return e!==undefined&&e!==null&&typeof e.then==="function"}function It(e){if(At(e)){e.then(null,function(e){})}}var xt=function e(t){var r=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,r,i){if(t[r]){e[r]=t[r]}return e},{cues:t.cues&&Array.prototype.map.call(t.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})});return r};var Pt=function e(t){var r=t.$$("track");var i=Array.prototype.map.call(r,function(e){return e.track});var n=Array.prototype.map.call(r,function(e){var t=xt(e.track);if(e.src){t.src=e.src}return t});return n.concat(Array.prototype.filter.call(t.textTracks(),function(e){return i.indexOf(e)===-1}).map(xt))};var Ot=function e(t,r){t.forEach(function(e){var t=r.addRemoteTextTrack(e).track;if(!e.src&&e.cues){e.cues.forEach(function(e){return t.addCue(e)})}});return r.textTracks()};var Dt={textTracksToJson:Pt,jsonToTextTracks:Ot,trackToJson_:xt};function Lt(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Rt=Lt(function(e,t){function r(e){if(e&&"object"===typeof e){var t=e.which||e.keyCode||e.charCode;if(t)e=t}if("number"===typeof e)return s[e];var r=String(e);var a=i[r.toLowerCase()];if(a)return a;var a=n[r.toLowerCase()];if(a)return a;if(r.length===1)return r.charCodeAt(0);return undefined}r.isEventKey=function e(t,r){if(t&&"object"===typeof t){var a=t.which||t.keyCode||t.charCode;if(a===null||a===undefined){return false}if(typeof r==="string"){var s=i[r.toLowerCase()];if(s){return s===a}var s=n[r.toLowerCase()];if(s){return s===a}}else if(typeof r==="number"){return r===a}return false}};t=e.exports=r;var i=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};var n=t.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++){i[String.fromCharCode(a)]=a-32}for(var a=48;a<58;a++){i[a-48]=a}for(a=1;a<13;a++){i["f"+a]=a+111}for(a=0;a<10;a++){i["numpad "+a]=a+96}var s=t.names=t.title={};for(a in i){s[i[a]]=a}for(var o in n){i[o]=n[o]}});var Ut=Rt.code;var Nt=Rt.codes;var Mt=Rt.aliases;var Bt=Rt.names;var Ft=Rt.title;var Wt="vjs-modal-dialog";var Ht=function(e){We(i,e);function i(t,r){var i;i=e.call(this,t,r)||this;i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=false;i.closeable(!i.options_.uncloseable);i.content(i.options_.content);i.contentEl_=j("div",{className:Wt+"-content"},{role:"document"});i.descEl_=j("p",{className:Wt+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")});E(i.descEl_,i.description());i.el_.appendChild(i.descEl_);i.el_.appendChild(i.contentEl_);return i}var n=i.prototype;n.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})};n.dispose=function t(){this.contentEl_=null;this.descEl_=null;this.previouslyActiveEl_=null;e.prototype.dispose.call(this)};n.buildCSSClass=function t(){return Wt+" vjs-hidden "+e.prototype.buildCSSClass.call(this)};n.label=function e(){return this.localize(this.options_.label||"Modal Window")};n.description=function e(){var t=this.options_.description||this.localize("This is a modal window.");if(this.closeable()){t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")}return t};n.open=function e(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen");this.opened_=true;if(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_){this.fill()}this.wasPlaying_=!t.paused();if(this.options_.pauseOnOpen&&this.wasPlaying_){t.pause()}this.on("keydown",this.handleKeyDown);this.hadControls_=t.controls();t.controls(false);this.show();this.conditionalFocus_();this.el().setAttribute("aria-hidden","false");this.trigger("modalopen");this.hasBeenOpened_=true}};n.opened=function e(t){if(typeof t==="boolean"){this[t?"open":"close"]()}return this.opened_};n.close=function e(){if(!this.opened_){return}var t=this.player();this.trigger("beforemodalclose");this.opened_=false;if(this.wasPlaying_&&this.options_.pauseOnOpen){t.play()}this.off("keydown",this.handleKeyDown);if(this.hadControls_){t.controls(true)}this.hide();this.el().setAttribute("aria-hidden","true");this.trigger("modalclose");this.conditionalBlur_();if(this.options_.temporary){this.dispose()}};n.closeable=function e(t){if(typeof t==="boolean"){var e=this.closeable_=!!t;var r=this.getChild("closeButton");if(e&&!r){var i=this.contentEl_;this.contentEl_=this.el_;r=this.addChild("closeButton",{controlText:"Close Modal Dialog"});this.contentEl_=i;this.on(r,"close",this.close)}if(!e&&r){this.off(r,"close",this.close);this.removeChild(r);r.dispose()}}return this.closeable_};n.fill=function e(){this.fillWith(this.content())};n.fillWith=function e(t){var r=this.contentEl();var i=r.parentNode;var n=r.nextSibling;this.trigger("beforemodalfill");this.hasBeenFilled_=true;i.removeChild(r);this.empty();K(r,t);this.trigger("modalfill");if(n){i.insertBefore(r,n)}else{i.appendChild(r)}var a=this.getChild("closeButton");if(a){i.appendChild(a.el_)}};n.empty=function e(){this.trigger("beforemodalempty");H(this.contentEl());this.trigger("modalempty")};n.content=function e(t){if(typeof t!=="undefined"){this.content_=t}return this.content_};n.conditionalFocus_=function e(){var t=r.activeElement;var i=this.player_.el_;this.previouslyActiveEl_=null;if(i.contains(t)||i===t){this.previouslyActiveEl_=t;this.focus()}};n.conditionalBlur_=function e(){if(this.previouslyActiveEl_){this.previouslyActiveEl_.focus();this.previouslyActiveEl_=null}};n.handleKeyDown=function e(t){t.stopPropagation();if(Rt.isEventKey(t,"Escape")&&this.closeable()){t.preventDefault();this.close();return}if(!Rt.isEventKey(t,"Tab")){return}var i=this.focusableEls_();var n=this.el_.querySelector(":focus");var a;for(var s=0;s<i.length;s++){if(n===i[s]){a=s;break}}if(r.activeElement===this.el_){a=0}if(t.shiftKey&&a===0){i[i.length-1].focus();t.preventDefault()}else if(!t.shiftKey&&a===i.length-1){i[0].focus();t.preventDefault()}};n.focusableEls_=function e(){var r=this.el_.querySelectorAll("*");return Array.prototype.filter.call(r,function(e){return(e instanceof t.HTMLAnchorElement||e instanceof t.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof t.HTMLInputElement||e instanceof t.HTMLSelectElement||e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof t.HTMLIFrameElement||e instanceof t.HTMLObjectElement||e instanceof t.HTMLEmbedElement||e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!==-1||e.hasAttribute("contenteditable")})};return i}(Fe);Ht.prototype.options_={pauseOnOpen:true,temporary:true};Fe.registerComponent("ModalDialog",Ht);var qt=function(e){We(t,e);function t(t){var r;if(t===void 0){t=[]}r=e.call(this)||this;r.tracks_=[];Object.defineProperty(Ke(r),"length",{get:function e(){return this.tracks_.length}});for(var i=0;i<t.length;i++){r.addTrack(t[i])}return r}var r=t.prototype;r.addTrack=function e(t){var r=this.tracks_.length;if(!(""+r in this)){Object.defineProperty(this,r,{get:function e(){return this.tracks_[r]}})}if(this.tracks_.indexOf(t)===-1){this.tracks_.push(t);this.trigger({track:t,type:"addtrack",target:this})}};r.removeTrack=function e(t){var r;for(var i=0,n=this.length;i<n;i++){if(this[i]===t){r=this[i];if(r.off){r.off()}this.tracks_.splice(i,1);break}}if(!r){return}this.trigger({track:r,type:"removetrack",target:this})};r.getTrackById=function e(t){var r=null;for(var i=0,n=this.length;i<n;i++){var a=this[i];if(a.id===t){r=a;break}}return r};return t}(Se);qt.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var Vt in qt.prototype.allowedEvents_){qt.prototype["on"+Vt]=null}var Kt=function e(t,r){for(var i=0;i<t.length;i++){if(!Object.keys(t[i]).length||r.id===t[i].id){continue}t[i].enabled=false}};var zt=function(e){We(t,e);function t(t){var r;if(t===void 0){t=[]}for(var i=t.length-1;i>=0;i--){if(t[i].enabled){Kt(t,t[i]);break}}r=e.call(this,t)||this;r.changing_=false;return r}var r=t.prototype;r.addTrack=function t(r){var i=this;if(r.enabled){Kt(this,r)}e.prototype.addTrack.call(this,r);if(!r.addEventListener){return}r.enabledChange_=function(){if(i.changing_){return}i.changing_=true;Kt(i,r);i.changing_=false;i.trigger("change")};r.addEventListener("enabledchange",r.enabledChange_)};r.removeTrack=function t(r){e.prototype.removeTrack.call(this,r);if(r.removeEventListener&&r.enabledChange_){r.removeEventListener("enabledchange",r.enabledChange_);r.enabledChange_=null}};return t}(qt);var Gt=function e(t,r){for(var i=0;i<t.length;i++){if(!Object.keys(t[i]).length||r.id===t[i].id){continue}t[i].selected=false}};var Yt=function(e){We(t,e);function t(t){var r;if(t===void 0){t=[]}for(var i=t.length-1;i>=0;i--){if(t[i].selected){Gt(t,t[i]);break}}r=e.call(this,t)||this;r.changing_=false;Object.defineProperty(Ke(r),"selectedIndex",{get:function e(){for(var t=0;t<this.length;t++){if(this[t].selected){return t}}return-1},set:function e(){}});return r}var r=t.prototype;r.addTrack=function t(r){var i=this;if(r.selected){Gt(this,r)}e.prototype.addTrack.call(this,r);if(!r.addEventListener){return}r.selectedChange_=function(){if(i.changing_){return}i.changing_=true;Gt(i,r);i.changing_=false;i.trigger("change")};r.addEventListener("selectedchange",r.selectedChange_)};r.removeTrack=function t(r){e.prototype.removeTrack.call(this,r);if(r.removeEventListener&&r.selectedChange_){r.removeEventListener("selectedchange",r.selectedChange_);r.selectedChange_=null}};return t}(qt);var Xt=function(e){We(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.addTrack=function t(r){var i=this;e.prototype.addTrack.call(this,r);if(!this.queueChange_){this.queueChange_=function(){return i.queueTrigger("change")}}if(!this.triggerSelectedlanguagechange){this.triggerSelectedlanguagechange_=function(){return i.trigger("selectedlanguagechange")}}r.addEventListener("modechange",this.queueChange_);var n=["metadata","chapters"];if(n.indexOf(r.kind)===-1){r.addEventListener("modechange",this.triggerSelectedlanguagechange_)}};r.removeTrack=function t(r){e.prototype.removeTrack.call(this,r);if(r.removeEventListener){if(this.queueChange_){r.removeEventListener("modechange",this.queueChange_)}if(this.selectedlanguagechange_){r.removeEventListener("modechange",this.triggerSelectedlanguagechange_)}}};return t}(qt);var $t=function(){function e(e){if(e===void 0){e=[]}this.trackElements_=[];Object.defineProperty(this,"length",{get:function e(){return this.trackElements_.length}});for(var t=0,r=e.length;t<r;t++){this.addTrackElement_(e[t])}}var t=e.prototype;t.addTrackElement_=function e(t){var r=this.trackElements_.length;if(!(""+r in this)){Object.defineProperty(this,r,{get:function e(){return this.trackElements_[r]}})}if(this.trackElements_.indexOf(t)===-1){this.trackElements_.push(t)}};t.getTrackElementByTrack_=function e(t){var r;for(var i=0,n=this.trackElements_.length;i<n;i++){if(t===this.trackElements_[i].track){r=this.trackElements_[i];break}}return r};t.removeTrackElement_=function e(t){for(var r=0,i=this.trackElements_.length;r<i;r++){if(t===this.trackElements_[r]){if(this.trackElements_[r].track&&typeof this.trackElements_[r].track.off==="function"){this.trackElements_[r].track.off()}if(typeof this.trackElements_[r].off==="function"){this.trackElements_[r].off()}this.trackElements_.splice(r,1);break}}};return e}();var Jt=function(){function e(t){e.prototype.setCues_.call(this,t);Object.defineProperty(this,"length",{get:function e(){return this.length_}})}var t=e.prototype;t.setCues_=function e(t){var r=this.length||0;var i=0;var n=t.length;this.cues_=t;this.length_=t.length;var a=function e(t){if(!(""+t in this)){Object.defineProperty(this,""+t,{get:function e(){return this.cues_[t]}})}};if(r<n){i=r;for(;i<n;i++){a.call(this,i)}}};t.getCueById=function e(t){var r=null;for(var i=0,n=this.length;i<n;i++){var a=this[i];if(a.id===t){r=a;break}}return r};return e}();var Qt={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"};var Zt={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"};var er={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"};var tr={disabled:"disabled",hidden:"hidden",showing:"showing"};var rr=function(e){We(t,e);function t(t){var r;if(t===void 0){t={}}r=e.call(this)||this;var i={id:t.id||"vjs_track_"+se(),kind:t.kind||"",label:t.label||"",language:t.language||""};var n=function e(t){Object.defineProperty(Ke(r),t,{get:function e(){return i[t]},set:function e(){}})};for(var a in i){n(a)}return r}return t}(Se);var ir=function e(i){var n=["protocol","hostname","port","pathname","search","hash","host"];var a=r.createElement("a");a.href=i;var s=a.host===""&&a.protocol!=="file:";var o;if(s){o=r.createElement("div");o.innerHTML='<a href="'+i+'"></a>';a=o.firstChild;o.setAttribute("style","display:none; position:absolute;");r.body.appendChild(o)}var l={};for(var u=0;u<n.length;u++){l[n[u]]=a[n[u]]}if(l.protocol==="http:"){l.host=l.host.replace(/:80$/,"")}if(l.protocol==="https:"){l.host=l.host.replace(/:443$/,"")}if(!l.protocol){l.protocol=t.location.protocol}if(s){r.body.removeChild(o)}return l};var nr=function e(t){if(!t.match(/^https?:\/\//)){var i=r.createElement("div");i.innerHTML='<a href="'+t+'">x</a>';t=i.firstChild.href}return t};var ar=function e(t){if(typeof t==="string"){var r=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/;var i=r.exec(t);if(i){return i.pop().toLowerCase()}}return""};var sr=function e(r){var i=t.location;var n=ir(r);var a=n.protocol===":"?i.protocol:n.protocol;var s=a+n.host!==i.protocol+i.host;return s};var or=Object.freeze({parseUrl:ir,getAbsoluteURL:nr,getFileExtension:ar,isCrossOrigin:sr});var lr=cr;var ur=Object.prototype.toString;function cr(t){var r=ur.call(t);return r==="[object Function]"||typeof t==="function"&&r!=="[object RegExp]"||typeof e!=="undefined"&&(t===e.setTimeout||t===e.alert||t===e.confirm||t===e.prompt)}var dr="Function.prototype.bind called on incompatible ";var fr=Array.prototype.slice;var hr=Object.prototype.toString;var pr="[object Function]";var vr=function e(t){var r=this;if(typeof r!=="function"||hr.call(r)!==pr){throw new TypeError(dr+r)}var i=fr.call(arguments,1);var n;var a=function e(){if(this instanceof n){var a=r.apply(this,i.concat(fr.call(arguments)));if(Object(a)===a){return a}return this}else{return r.apply(t,i.concat(fr.call(arguments)))}};var s=Math.max(0,r.length-i.length);var o=[];for(var l=0;l<s;l++){o.push("$"+l)}n=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this,arguments); }")(a);if(r.prototype){var u=function e(){};u.prototype=r.prototype;n.prototype=new u;u.prototype=null}return n};var mr=Function.prototype.bind||vr;var gr=Object.prototype.toString;var yr=function e(t){var r=gr.call(t);var i=r==="[object Arguments]";if(!i){i=r!=="[object Array]"&&t!==null&&typeof t==="object"&&typeof t.length==="number"&&t.length>=0&&gr.call(t.callee)==="[object Function]"}return i};var _r;if(!Object.keys){var br=Object.prototype.hasOwnProperty;var Tr=Object.prototype.toString;var Sr=yr;var kr=Object.prototype.propertyIsEnumerable;var jr=!kr.call({toString:null},"toString");var Er=kr.call(function(){},"prototype");var wr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var Cr=function e(t){var r=t.constructor;return r&&r.prototype===t};var Ar={$applicationCache:true,$console:true,$external:true,$frame:true,$frameElement:true,$frames:true,$innerHeight:true,$innerWidth:true,$onmozfullscreenchange:true,$onmozfullscreenerror:true,$outerHeight:true,$outerWidth:true,$pageXOffset:true,$pageYOffset:true,$parent:true,$scrollLeft:true,$scrollTop:true,$scrollX:true,$scrollY:true,$self:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$window:true};var Ir=function(){if(typeof e==="undefined"){return false}for(var t in e){try{if(!Ar["$"+t]&&br.call(e,t)&&e[t]!==null&&typeof e[t]==="object"){try{Cr(e[t])}catch(e){return true}}}catch(e){return true}}return false}();var xr=function t(r){if(typeof e==="undefined"||!Ir){return Cr(r)}try{return Cr(r)}catch(e){return false}};_r=function e(t){var r=t!==null&&typeof t==="object";var i=Tr.call(t)==="[object Function]";var n=Sr(t);var a=r&&Tr.call(t)==="[object String]";var s=[];if(!r&&!i&&!n){throw new TypeError("Object.keys called on a non-object")}var o=Er&&i;if(a&&t.length>0&&!br.call(t,0)){for(var l=0;l<t.length;++l){s.push(String(l))}}if(n&&t.length>0){for(var u=0;u<t.length;++u){s.push(String(u))}}else{for(var c in t){if(!(o&&c==="prototype")&&br.call(t,c)){s.push(String(c))}}}if(jr){var d=xr(t);for(var f=0;f<wr.length;++f){if(!(d&&wr[f]==="constructor")&&br.call(t,wr[f])){s.push(wr[f])}}}return s}}var Pr=_r;var Or=Array.prototype.slice;var Dr=Object.keys;var Lr=Dr?function e(t){return Dr(t)}:Pr;var Rr=Object.keys;Lr.shim=function e(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);if(!t){Object.keys=function e(t){if(yr(t)){return Rr(Or.call(t))}return Rr(t)}}}else{Object.keys=Lr}return Object.keys||Lr};var Ur=Lr;var Nr=typeof Symbol==="function"&&typeof Symbol("foo")==="symbol";var Mr=Object.prototype.toString;var Br=Array.prototype.concat;var Fr=Object.defineProperty;var Wr=function e(t){return typeof t==="function"&&Mr.call(t)==="[object Function]"};var Hr=function e(){var t={};try{Fr(t,"x",{enumerable:false,value:t});for(var r in t){return false}return t.x===t}catch(e){return false}};var qr=Fr&&Hr();var Vr=function e(t,r,i,n){if(r in t&&(!Wr(n)||!n())){return}if(qr){Fr(t,r,{configurable:true,enumerable:false,value:i,writable:true})}else{t[r]=i}};var Kr=function e(t,r){var i=arguments.length>2?arguments[2]:{};var n=Ur(r);if(Nr){n=Br.call(n,Object.getOwnPropertySymbols(r))}for(var a=0;a<n.length;a+=1){Vr(t,n[a],r[n[a]],i[n[a]])}};Kr.supportsDescriptors=!!qr;var zr=Kr;var Gr;var Yr=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError};var Xr=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol";var $r=Object.getPrototypeOf||function(e){return e.__proto__};var Jr=Gr;var Qr=Gr;var Zr=Gr;var ei=typeof Uint8Array==="undefined"?Gr:$r(Uint8Array);var ti={"$ %Array%":Array,"$ %ArrayBuffer%":typeof ArrayBuffer==="undefined"?Gr:ArrayBuffer,"$ %ArrayBufferPrototype%":typeof ArrayBuffer==="undefined"?Gr:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Xr?$r([][Symbol.iterator]()):Gr,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Gr,"$ %AsyncFunction%":Qr,"$ %AsyncFunctionPrototype%":Gr,"$ %AsyncGenerator%":Gr,"$ %AsyncGeneratorFunction%":Zr,"$ %AsyncGeneratorPrototype%":Gr,"$ %AsyncIteratorPrototype%":Gr,"$ %Atomics%":typeof Atomics==="undefined"?Gr:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":typeof DataView==="undefined"?Gr:DataView,"$ %DataViewPrototype%":typeof DataView==="undefined"?Gr:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":typeof Float32Array==="undefined"?Gr:Float32Array,"$ %Float32ArrayPrototype%":typeof Float32Array==="undefined"?Gr:Float32Array.prototype,"$ %Float64Array%":typeof Float64Array==="undefined"?Gr:Float64Array,"$ %Float64ArrayPrototype%":typeof Float64Array==="undefined"?Gr:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Gr,"$ %GeneratorFunction%":Jr,"$ %GeneratorPrototype%":Gr,"$ %Int8Array%":typeof Int8Array==="undefined"?Gr:Int8Array,"$ %Int8ArrayPrototype%":typeof Int8Array==="undefined"?Gr:Int8Array.prototype,"$ %Int16Array%":typeof Int16Array==="undefined"?Gr:Int16Array,"$ %Int16ArrayPrototype%":typeof Int16Array==="undefined"?Gr:Int8Array.prototype,"$ %Int32Array%":typeof Int32Array==="undefined"?Gr:Int32Array,"$ %Int32ArrayPrototype%":typeof Int32Array==="undefined"?Gr:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":Xr?$r($r([][Symbol.iterator]())):Gr,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":typeof Map==="undefined"?Gr:Map,"$ %MapIteratorPrototype%":typeof Map==="undefined"||!Xr?Gr:$r((new Map)[Symbol.iterator]()),"$ %MapPrototype%":typeof Map==="undefined"?Gr:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":typeof Promise==="undefined"?Gr:Promise,"$ %PromisePrototype%":typeof Promise==="undefined"?Gr:Promise.prototype,"$ %PromiseProto_then%":typeof Promise==="undefined"?Gr:Promise.prototype.then,"$ %Promise_all%":typeof Promise==="undefined"?Gr:Promise.all,"$ %Promise_reject%":typeof Promise==="undefined"?Gr:Promise.reject,"$ %Promise_resolve%":typeof Promise==="undefined"?Gr:Promise.resolve,"$ %Proxy%":typeof Proxy==="undefined"?Gr:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":typeof Reflect==="undefined"?Gr:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":typeof Set==="undefined"?Gr:Set,"$ %SetIteratorPrototype%":typeof Set==="undefined"||!Xr?Gr:$r((new Set)[Symbol.iterator]()),"$ %SetPrototype%":typeof Set==="undefined"?Gr:Set.prototype,"$ %SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?Gr:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":typeof SharedArrayBuffer==="undefined"?Gr:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Xr?$r(""[Symbol.iterator]()):Gr,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Xr?Symbol:Gr,"$ %SymbolPrototype%":Xr?Symbol.prototype:Gr,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":Yr,"$ %TypedArray%":ei,"$ %TypedArrayPrototype%":ei?ei.prototype:Gr,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":typeof Uint8Array==="undefined"?Gr:Uint8Array,"$ %Uint8ArrayPrototype%":typeof Uint8Array==="undefined"?Gr:Uint8Array.prototype,"$ %Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?Gr:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":typeof Uint8ClampedArray==="undefined"?Gr:Uint8ClampedArray.prototype,"$ %Uint16Array%":typeof Uint16Array==="undefined"?Gr:Uint16Array,"$ %Uint16ArrayPrototype%":typeof Uint16Array==="undefined"?Gr:Uint16Array.prototype,"$ %Uint32Array%":typeof Uint32Array==="undefined"?Gr:Uint32Array,"$ %Uint32ArrayPrototype%":typeof Uint32Array==="undefined"?Gr:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":typeof WeakMap==="undefined"?Gr:WeakMap,"$ %WeakMapPrototype%":typeof WeakMap==="undefined"?Gr:WeakMap.prototype,"$ %WeakSet%":typeof WeakSet==="undefined"?Gr:WeakSet,"$ %WeakSetPrototype%":typeof WeakSet==="undefined"?Gr:WeakSet.prototype};var ri=function e(t,r){if(arguments.length>1&&typeof r!=="boolean"){throw new TypeError('"allowMissing" argument must be a boolean')}var i="$ "+t;if(!(i in ti)){throw new SyntaxError("intrinsic "+t+" does not exist!")}if(typeof ti[i]==="undefined"&&!r){throw new TypeError("intrinsic "+t+" exists, but is not available. Please file an issue!")}return ti[i]};var ii=mr.call(Function.call,Object.prototype.hasOwnProperty);var ni=ri("%TypeError%");var ai=ri("%SyntaxError%");var si={"Property Descriptor":function e(t,r){if(t.Type(r)!=="Object"){return false}var i={"[[Configurable]]":true,"[[Enumerable]]":true,"[[Get]]":true,"[[Set]]":true,"[[Value]]":true,"[[Writable]]":true};for(var n in r){if(ii(r,n)&&!i[n]){return false}}var a=ii(r,"[[Value]]");var s=ii(r,"[[Get]]")||ii(r,"[[Set]]");if(a&&s){throw new ni("Property Descriptors may not be both accessor and data descriptors")}return true}};var oi=function e(t,r,i,n){var a=si[r];if(typeof a!=="function"){throw new ai("unknown record type: "+r)}if(!a(t,n)){throw new ni(i+" must be a "+r)}console.log(a(t,n),n)};var li=Number.isNaN||function e(t){return t!==t};var ui=Number.isNaN||function(e){return e!==e};var ci=Number.isFinite||function(e){return typeof e==="number"&&!ui(e)&&e!==Infinity&&e!==-Infinity};var di=function e(t){return t>=0?1:-1};var fi=function e(t,r){var i=t%r;return Math.floor(i>=0?i:i+r)};var hi=Function.prototype.toString;var pi=/^\s*class\b/;var vi=function e(t){try{var r=hi.call(t);return pi.test(r)}catch(e){return false}};var mi=function e(t){try{if(vi(t)){return false}hi.call(t);return true}catch(e){return false}};var gi=Object.prototype.toString;var yi="[object Function]";var _i="[object GeneratorFunction]";var bi=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var Ti=function e(t){if(!t){return false}if(typeof t!=="function"&&typeof t!=="object"){return false}if(typeof t==="function"&&!t.prototype){return true}if(bi){return mi(t)}if(vi(t)){return false}var r=gi.call(t);return r===yi||r===_i};var Si=function e(t){return t===null||typeof t!=="function"&&typeof t!=="object"};var ki=Object.prototype.toString;var ji={"[[DefaultValue]]":function e(t){var r;if(arguments.length>1){r=arguments[1]}else{r=ki.call(t)==="[object Date]"?String:Number}if(r===String||r===Number){var i=r===String?["toString","valueOf"]:["valueOf","toString"];var n,a;for(a=0;a<i.length;++a){if(Ti(t[i[a]])){n=t[i[a]]();if(Si(n)){return n}}}throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")}};var Ei=function e(t){if(Si(t)){return t}if(arguments.length>1){return ji["[[DefaultValue]]"](t,arguments[1])}return ji["[[DefaultValue]]"](t)};var wi=ri("%Object%");var Ci=ri("%TypeError%");var Ai=ri("%String%");var Ii={ToPrimitive:Ei,ToBoolean:function e(t){return!!t},ToNumber:function e(t){return+t},ToInteger:function e(t){var r=this.ToNumber(t);if(li(r)){return 0}if(r===0||!ci(r)){return r}return di(r)*Math.floor(Math.abs(r))},ToInt32:function e(t){return this.ToNumber(t)>>0},ToUint32:function e(t){return this.ToNumber(t)>>>0},ToUint16:function e(t){var r=this.ToNumber(t);if(li(r)||r===0||!ci(r)){return 0}var i=di(r)*Math.floor(Math.abs(r));return fi(i,65536)},ToString:function e(t){return Ai(t)},ToObject:function e(t){this.CheckObjectCoercible(t);return wi(t)},CheckObjectCoercible:function e(t,r){if(t==null){throw new Ci(r||"Cannot call method on "+t)}return t},IsCallable:Ti,SameValue:function e(t,r){if(t===r){if(t===0){return 1/t===1/r}return true}return li(t)&&li(r)},Type:function e(t){if(t===null){return"Null"}if(typeof t==="undefined"){return"Undefined"}if(typeof t==="function"||typeof t==="object"){return"Object"}if(typeof t==="number"){return"Number"}if(typeof t==="boolean"){return"Boolean"}if(typeof t==="string"){return"String"}},IsPropertyDescriptor:function e(t){if(this.Type(t)!=="Object"){return false}var r={"[[Configurable]]":true,"[[Enumerable]]":true,"[[Get]]":true,"[[Set]]":true,"[[Value]]":true,"[[Writable]]":true};for(var i in t){if(ii(t,i)&&!r[i]){return false}}var n=ii(t,"[[Value]]");var a=ii(t,"[[Get]]")||ii(t,"[[Set]]");if(n&&a){throw new Ci("Property Descriptors may not be both accessor and data descriptors")}return true},IsAccessorDescriptor:function e(t){if(typeof t==="undefined"){return false}oi(this,"Property Descriptor","Desc",t);if(!ii(t,"[[Get]]")&&!ii(t,"[[Set]]")){return false}return true},IsDataDescriptor:function e(t){if(typeof t==="undefined"){return false}oi(this,"Property Descriptor","Desc",t);if(!ii(t,"[[Value]]")&&!ii(t,"[[Writable]]")){return false}return true},IsGenericDescriptor:function e(t){if(typeof t==="undefined"){return false}oi(this,"Property Descriptor","Desc",t);if(!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t)){return true}return false},FromPropertyDescriptor:function e(t){if(typeof t==="undefined"){return t}oi(this,"Property Descriptor","Desc",t);if(this.IsDataDescriptor(t)){return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]}}else if(this.IsAccessorDescriptor(t)){return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]}}else{throw new Ci("FromPropertyDescriptor must be called with a fully populated Property Descriptor")}},ToPropertyDescriptor:function e(t){if(this.Type(t)!=="Object"){throw new Ci("ToPropertyDescriptor requires an object")}var r={};if(ii(t,"enumerable")){r["[[Enumerable]]"]=this.ToBoolean(t.enumerable)}if(ii(t,"configurable")){r["[[Configurable]]"]=this.ToBoolean(t.configurable)}if(ii(t,"value")){r["[[Value]]"]=t.value}if(ii(t,"writable")){r["[[Writable]]"]=this.ToBoolean(t.writable)}if(ii(t,"get")){var i=t.get;if(typeof i!=="undefined"&&!this.IsCallable(i)){throw new TypeError("getter must be a function")}r["[[Get]]"]=i}if(ii(t,"set")){var n=t.set;if(typeof n!=="undefined"&&!this.IsCallable(n)){throw new Ci("setter must be a function")}r["[[Set]]"]=n}if((ii(r,"[[Get]]")||ii(r,"[[Set]]"))&&(ii(r,"[[Value]]")||ii(r,"[[Writable]]"))){throw new Ci("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute")}return r}};var xi=Ii;var Pi=mr.call(Function.call,String.prototype.replace);var Oi=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/;var Di=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;var Li=function e(){var t=xi.ToString(xi.CheckObjectCoercible(this));return Pi(Pi(t,Oi,""),Di,"")};var Ri="\u200b";var Ui=function e(){if(String.prototype.trim&&Ri.trim()===Ri){return String.prototype.trim}return Li};var Ni=function e(){var t=Ui();zr(String.prototype,{trim:t},{trim:function e(){return String.prototype.trim!==t}});return t};var Mi=mr.call(Function.call,Ui());zr(Mi,{getPolyfill:Ui,implementation:Li,shim:Ni});var Bi=Mi;var Fi=Object.prototype.toString;var Wi=Object.prototype.hasOwnProperty;var Hi=function e(t,r,i){for(var n=0,a=t.length;n<a;n++){if(Wi.call(t,n)){if(i==null){r(t[n],n,t)}else{r.call(i,t[n],n,t)}}}};var qi=function e(t,r,i){for(var n=0,a=t.length;n<a;n++){if(i==null){r(t.charAt(n),n,t)}else{r.call(i,t.charAt(n),n,t)}}};var Vi=function e(t,r,i){for(var n in t){if(Wi.call(t,n)){if(i==null){r(t[n],n,t)}else{r.call(i,t[n],n,t)}}}};var Ki=function e(t,r,i){if(!Ti(r)){throw new TypeError("iterator must be a function")}var n;if(arguments.length>=3){n=i}if(Fi.call(t)==="[object Array]"){Hi(t,r,n)}else if(typeof t==="string"){qi(t,r,n)}else{Vi(t,r,n)}};var zi=Ki;var Gi=function e(t){return Object.prototype.toString.call(t)==="[object Array]"};var Yi=function e(t){if(!t)return{};var r={};zi(Bi(t).split("\n"),function(e){var t=e.indexOf(":"),i=Bi(e.slice(0,t)).toLowerCase(),n=Bi(e.slice(t+1));if(typeof r[i]==="undefined"){r[i]=n}else if(Gi(r[i])){r[i].push(n)}else{r[i]=[r[i],n]}});return r};var Xi=Ji;var $i=Object.prototype.hasOwnProperty;function Ji(){var e={};for(var t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r){if($i.call(r,i)){e[i]=r[i]}}}return e}var Qi=rn;rn.XMLHttpRequest=t.XMLHttpRequest||sn;rn.XDomainRequest="withCredentials"in new rn.XMLHttpRequest?rn.XMLHttpRequest:t.XDomainRequest;Zi(["get","put","post","patch","head","delete"],function(e){rn[e==="delete"?"del":e]=function(t,r,i){r=tn(t,r,i);r.method=e.toUpperCase();return nn(r)}});function Zi(e,t){for(var r=0;r<e.length;r++){t(e[r])}}function en(e){for(var t in e){if(e.hasOwnProperty(t))return false}return true}function tn(e,t,r){var i=e;if(lr(t)){r=t;if(typeof e==="string"){i={uri:e}}}else{i=Xi(t,{uri:e})}i.callback=r;return i}function rn(e,t,r){t=tn(e,t,r);return nn(t)}function nn(e){if(typeof e.callback==="undefined"){throw new Error("callback argument missing")}var t=false;var r=function r(i,n,a){if(!t){t=true;e.callback(i,n,a)}};function i(){if(o.readyState===4){setTimeout(s,0)}}function n(){var e=undefined;if(o.response){e=o.response}else{e=o.responseText||an(o)}if(v){try{e=JSON.parse(e)}catch(e){}}return e}function a(e){clearTimeout(m);if(!(e instanceof Error)){e=new Error(""+(e||"Unknown XMLHttpRequest Error"))}e.statusCode=0;return r(e,g)}function s(){if(u)return;var t;clearTimeout(m);if(e.useXDR&&o.status===undefined){t=200}else{t=o.status===1223?204:o.status}var i=g;var a=null;if(t!==0){i={body:n(),statusCode:t,method:d,headers:{},url:c,rawRequest:o};if(o.getAllResponseHeaders){i.headers=Yi(o.getAllResponseHeaders())}}else{a=new Error("Internal XMLHttpRequest Error")}return r(a,i,i.body)}var o=e.xhr||null;if(!o){if(e.cors||e.useXDR){o=new rn.XDomainRequest}else{o=new rn.XMLHttpRequest}}var l;var u;var c=o.url=e.uri||e.url;var d=o.method=e.method||"GET";var f=e.body||e.data;var h=o.headers=e.headers||{};var p=!!e.sync;var v=false;var m;var g={body:undefined,headers:{},statusCode:0,method:d,url:c,rawRequest:o};if("json"in e&&e.json!==false){v=true;h["accept"]||h["Accept"]||(h["Accept"]="application/json");if(d!=="GET"&&d!=="HEAD"){h["content-type"]||h["Content-Type"]||(h["Content-Type"]="application/json");f=JSON.stringify(e.json===true?f:e.json)}}o.onreadystatechange=i;o.onload=s;o.onerror=a;o.onprogress=function(){};o.onabort=function(){u=true};o.ontimeout=a;o.open(d,c,!p,e.username,e.password);if(!p){o.withCredentials=!!e.withCredentials}if(!p&&e.timeout>0){m=setTimeout(function(){if(u)return;u=true;o.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT";a(e)},e.timeout)}if(o.setRequestHeader){for(l in h){if(h.hasOwnProperty(l)){o.setRequestHeader(l,h[l])}}}else if(e.headers&&!en(e.headers)){throw new Error("Headers cannot be set on an XDomainRequest object")}if("responseType"in e){o.responseType=e.responseType}if("beforeSend"in e&&typeof e.beforeSend==="function"){e.beforeSend(o)}o.send(f||null);return o}function an(e){if(e.responseType==="document"){return e.responseXML}var t=e.responseXML&&e.responseXML.documentElement.nodeName==="parsererror";if(e.responseType===""&&!t){return e.responseXML}return null}function sn(){}var on=function e(r,i){var n=new t.WebVTT.Parser(t,t.vttjs,t.WebVTT.StringDecoder());var a=[];n.oncue=function(e){i.addCue(e)};n.onparsingerror=function(e){a.push(e)};n.onflush=function(){i.trigger({type:"loadeddata",target:i})};n.parse(r);if(a.length>0){if(t.console&&t.console.groupCollapsed){t.console.groupCollapsed("Text Track parsing errors for "+i.src)}a.forEach(function(e){return o.error(e)});if(t.console&&t.console.groupEnd){t.console.groupEnd()}}n.flush()};var ln=function e(r,i){var n={uri:r};var a=sr(r);if(a){n.cors=a}Qi(n,_e(this,function(e,r,n){if(e){return o.error(e,r)}i.loaded_=true;if(typeof t.WebVTT!=="function"){if(i.tech_){i.tech_.any(["vttjsloaded","vttjserror"],function(e){if(e.type==="vttjserror"){o.error("vttjs failed to load, stopping trying to process "+i.src);return}return on(n,i)})}}else{on(n,i)}}))};var un=function(e){We(r,e);function r(t){var r;if(t===void 0){t={}}if(!t.tech){throw new Error("A tech was not provided.")}var i=Be(t,{kind:er[t.kind]||"subtitles",language:t.language||t.srclang||""});var n=tr[i.mode]||"disabled";var a=i["default"];if(i.kind==="metadata"||i.kind==="chapters"){n="hidden"}r=e.call(this,i)||this;r.tech_=i.tech;r.cues_=[];r.activeCues_=[];var s=new Jt(r.cues_);var o=new Jt(r.activeCues_);var l=false;var u=_e(Ke(r),function(){this.activeCues=this.activeCues;if(l){this.trigger("cuechange");l=false}});if(n!=="disabled"){r.tech_.ready(function(){r.tech_.on("timeupdate",u)},true)}Object.defineProperties(Ke(r),{default:{get:function e(){return a},set:function e(){}},mode:{get:function e(){return n},set:function e(t){var r=this;if(!tr[t]){return}n=t;if(n!=="disabled"){this.tech_.ready(function(){r.tech_.on("timeupdate",u)},true)}else{this.tech_.off("timeupdate",u)}this.trigger("modechange")}},cues:{get:function e(){if(!this.loaded_){return null}return s},set:function e(){}},activeCues:{get:function e(){if(!this.loaded_){return null}if(this.cues.length===0){return o}var t=this.tech_.currentTime();var r=[];for(var i=0,n=this.cues.length;i<n;i++){var a=this.cues[i];if(a.startTime<=t&&a.endTime>=t){r.push(a)}else if(a.startTime===a.endTime&&a.startTime<=t&&a.startTime+.5>=t){r.push(a)}}l=false;if(r.length!==this.activeCues_.length){l=true}else{for(var s=0;s<r.length;s++){if(this.activeCues_.indexOf(r[s])===-1){l=true}}}this.activeCues_=r;o.setCues_(this.activeCues_);return o},set:function e(){}}});if(i.src){r.src=i.src;ln(i.src,Ke(r))}else{r.loaded_=true}return r}var i=r.prototype;i.addCue=function e(r){var i=r;if(t.vttjs&&!(r instanceof t.vttjs.VTTCue)){i=new t.vttjs.VTTCue(r.startTime,r.endTime,r.text);for(var n in r){if(!(n in i)){i[n]=r[n]}}i.id=r.id;i.originalCue_=r}var a=this.tech_.textTracks();for(var s=0;s<a.length;s++){if(a[s]!==this){a[s].removeCue(i)}}this.cues_.push(i);this.cues.setCues_(this.cues_)};i.removeCue=function e(t){var r=this.cues_.length;while(r--){var i=this.cues_[r];if(i===t||i.originalCue_&&i.originalCue_===t){this.cues_.splice(r,1);this.cues.setCues_(this.cues_);break}}};return r}(rr);un.prototype.allowedEvents_={cuechange:"cuechange"};var cn=function(e){We(t,e);function t(t){var r;if(t===void 0){t={}}var i=Be(t,{kind:Zt[t.kind]||""});r=e.call(this,i)||this;var n=false;Object.defineProperty(Ke(r),"enabled",{get:function e(){return n},set:function e(t){if(typeof t!=="boolean"||t===n){return}n=t;this.trigger("enabledchange")}});if(i.enabled){r.enabled=i.enabled}r.loaded_=true;return r}return t}(rr);var dn=function(e){We(t,e);function t(t){var r;if(t===void 0){t={}}var i=Be(t,{kind:Qt[t.kind]||""});r=e.call(this,i)||this;var n=false;Object.defineProperty(Ke(r),"selected",{get:function e(){return n},set:function e(t){if(typeof t!=="boolean"||t===n){return}n=t;this.trigger("selectedchange")}});if(i.selected){r.selected=i.selected}return r}return t}(rr);var fn=0;var hn=1;var pn=2;var vn=3;var mn=function(e){We(t,e);function t(t){var r;if(t===void 0){t={}}r=e.call(this)||this;var i;var n=new un(t);r.kind=n.kind;r.src=n.src;r.srclang=n.language;r.label=n.label;r["default"]=n["default"];Object.defineProperties(Ke(r),{readyState:{get:function e(){return i}},track:{get:function e(){return n}}});i=fn;n.addEventListener("loadeddata",function(){i=pn;r.trigger({type:"load",target:Ke(r)})});return r}return t}(Se);mn.prototype.allowedEvents_={load:"load"};mn.NONE=fn;mn.LOADING=hn;mn.LOADED=pn;mn.ERROR=vn;var gn={audio:{ListClass:zt,TrackClass:cn,capitalName:"Audio"},video:{ListClass:Yt,TrackClass:dn,capitalName:"Video"},text:{ListClass:Xt,TrackClass:un,capitalName:"Text"}};Object.keys(gn).forEach(function(e){gn[e].getterName=e+"Tracks";gn[e].privateName=e+"Tracks_"});var yn={remoteText:{ListClass:Xt,TrackClass:un,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:$t,TrackClass:mn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}};var _n=Be(gn,yn);yn.names=Object.keys(yn);gn.names=Object.keys(gn);_n.names=[].concat(yn.names).concat(gn.names);var bn={};function Tn(e,t,r,i,n){if(n===void 0){n={}}var a=e.textTracks();n.kind=t;if(r){n.label=r}if(i){n.language=i}n.tech=e;var s=new _n.text.TrackClass(n);a.addTrack(s);return s}var Sn=function(e){We(i,e);function i(t,r){var i;if(t===void 0){t={}}if(r===void 0){r=function e(){}}t.reportTouchActivity=false;i=e.call(this,null,t,r)||this;i.hasStarted_=false;i.on("playing",function(){this.hasStarted_=true});i.on("loadstart",function(){this.hasStarted_=false});_n.names.forEach(function(e){var r=_n[e];if(t&&t[r.getterName]){i[r.privateName]=t[r.getterName]}});if(!i.featuresProgressEvents){i.manualProgressOn()}if(!i.featuresTimeupdateEvents){i.manualTimeUpdatesOn()}["Text","Audio","Video"].forEach(function(e){if(t["native"+e+"Tracks"]===false){i["featuresNative"+e+"Tracks"]=false}});if(t.nativeCaptions===false||t.nativeTextTracks===false){i.featuresNativeTextTracks=false}else if(t.nativeCaptions===true||t.nativeTextTracks===true){i.featuresNativeTextTracks=true}if(!i.featuresNativeTextTracks){i.emulateTextTracks()}i.autoRemoteTextTracks_=new _n.text.ListClass;i.initTrackListeners();if(!t.nativeControlsForTouch){i.emitTapEvents()}if(i.constructor){i.name_=i.constructor.name||"Unknown Tech"}return i}var n=i.prototype;n.triggerSourceset=function e(t){var r=this;if(!this.isReady_){this.one("ready",function(){return r.setTimeout(function(){return r.triggerSourceset(t)},1)})}this.trigger({src:t,type:"sourceset"})};n.manualProgressOn=function e(){this.on("durationchange",this.onDurationChange);this.manualProgress=true;this.one("ready",this.trackProgress)};n.manualProgressOff=function e(){this.manualProgress=false;this.stopTrackingProgress();this.off("durationchange",this.onDurationChange)};n.trackProgress=function e(t){this.stopTrackingProgress();this.progressInterval=this.setInterval(_e(this,function(){var e=this.bufferedPercent();if(this.bufferedPercent_!==e){this.trigger("progress")}this.bufferedPercent_=e;if(e===1){this.stopTrackingProgress()}}),500)};n.onDurationChange=function e(t){this.duration_=this.duration()};n.buffered=function e(){return mt(0,0)};n.bufferedPercent=function e(){return gt(this.buffered(),this.duration_)};n.stopTrackingProgress=function e(){this.clearInterval(this.progressInterval)};n.manualTimeUpdatesOn=function e(){this.manualTimeUpdates=true;this.on("play",this.trackCurrentTime);this.on("pause",this.stopTrackingCurrentTime)};n.manualTimeUpdatesOff=function e(){this.manualTimeUpdates=false;this.stopTrackingCurrentTime();this.off("play",this.trackCurrentTime);this.off("pause",this.stopTrackingCurrentTime)};n.trackCurrentTime=function e(){if(this.currentTimeInterval){this.stopTrackingCurrentTime()}this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})},250)};n.stopTrackingCurrentTime=function e(){this.clearInterval(this.currentTimeInterval);this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})};n.dispose=function t(){this.clearTracks(gn.names);if(this.manualProgress){this.manualProgressOff()}if(this.manualTimeUpdates){this.manualTimeUpdatesOff()}e.prototype.dispose.call(this)};n.clearTracks=function e(t){var r=this;t=[].concat(t);t.forEach(function(e){var t=r[e+"Tracks"]()||[];var i=t.length;while(i--){var n=t[i];if(e==="text"){r.removeRemoteTextTrack(n)}t.removeTrack(n)}})};n.cleanupAutoTextTracks=function e(){var t=this.autoRemoteTextTracks_||[];var r=t.length;while(r--){var i=t[r];this.removeRemoteTextTrack(i)}};n.reset=function e(){};n.error=function e(t){if(t!==undefined){this.error_=new jt(t);this.trigger("error")}return this.error_};n.played=function e(){if(this.hasStarted_){return mt(0,0)}return mt()};n.setCurrentTime=function e(){if(this.manualTimeUpdates){this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})}};n.initTrackListeners=function e(){var t=this;gn.names.forEach(function(e){var r=gn[e];var i=function r(){t.trigger(e+"trackchange")};var n=t[r.getterName]();n.addEventListener("removetrack",i);n.addEventListener("addtrack",i);t.on("dispose",function(){n.removeEventListener("removetrack",i);n.removeEventListener("addtrack",i)})})};n.addWebVttScript_=function e(){var i=this;if(t.WebVTT){return}if(r.body.contains(this.el())){if(!this.options_["vtt.js"]&&v(bn)&&Object.keys(bn).length>0){this.trigger("vttjsloaded");return}var n=r.createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js";n.onload=function(){i.trigger("vttjsloaded")};n.onerror=function(){i.trigger("vttjserror")};this.on("dispose",function(){n.onload=null;n.onerror=null});t.WebVTT=true;this.el().parentNode.appendChild(n)}else{this.ready(this.addWebVttScript_)}};n.emulateTextTracks=function e(){var t=this;var r=this.textTracks();var i=this.remoteTextTracks();var n=function e(t){return r.addTrack(t.track)};var a=function e(t){return r.removeTrack(t.track)};i.on("addtrack",n);i.on("removetrack",a);this.addWebVttScript_();var s=function e(){return t.trigger("texttrackchange")};var o=function e(){s();for(var t=0;t<r.length;t++){var i=r[t];i.removeEventListener("cuechange",s);if(i.mode==="showing"){i.addEventListener("cuechange",s)}}};o();r.addEventListener("change",o);r.addEventListener("addtrack",o);r.addEventListener("removetrack",o);this.on("dispose",function(){i.off("addtrack",n);i.off("removetrack",a);r.removeEventListener("change",o);r.removeEventListener("addtrack",o);r.removeEventListener("removetrack",o);for(var e=0;e<r.length;e++){var t=r[e];t.removeEventListener("cuechange",s)}})};n.addTextTrack=function e(t,r,i){if(!t){throw new Error("TextTrack kind is required but was not provided")}return Tn(this,t,r,i)};n.createRemoteTextTrack=function e(t){var r=Be(t,{tech:this});return new yn.remoteTextEl.TrackClass(r)};n.addRemoteTextTrack=function e(t,r){var i=this;if(t===void 0){t={}}var n=this.createRemoteTextTrack(t);if(r!==true&&r!==false){o.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js');r=true}this.remoteTextTrackEls().addTrackElement_(n);this.remoteTextTracks().addTrack(n.track);if(r!==true){this.ready(function(){return i.autoRemoteTextTracks_.addTrack(n.track)})}return n};n.removeRemoteTextTrack=function e(t){var r=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(r);this.remoteTextTracks().removeTrack(t);this.autoRemoteTextTracks_.removeTrack(t)};n.getVideoPlaybackQuality=function e(){return{}};n.requestPictureInPicture=function e(){var r=this.options_.Promise||t.Promise;if(r){return r.reject()}};n.setPoster=function e(){};n.playsinline=function e(){};n.setPlaysinline=function e(){};n.overrideNativeAudioTracks=function e(){};n.overrideNativeVideoTracks=function e(){};n.canPlayType=function e(){return""};i.canPlayType=function e(){return""};i.canPlaySource=function e(t,r){return i.canPlayType(t.type)};i.isTech=function e(t){return t.prototype instanceof i||t instanceof i||t===i};i.registerTech=function e(t,r){if(!i.techs_){i.techs_={}}if(!i.isTech(r)){throw new Error("Tech "+t+" must be a Tech")}if(!i.canPlayType){throw new Error("Techs must have a static canPlayType method on them")}if(!i.canPlaySource){throw new Error("Techs must have a static canPlaySource method on them")}t=Ne(t);i.techs_[t]=r;i.techs_[Ue(t)]=r;if(t!=="Tech"){i.defaultTechOrder_.push(t)}return r};i.getTech=function e(r){if(!r){return}if(i.techs_&&i.techs_[r]){return i.techs_[r]}r=Ne(r);if(t&&t.videojs&&t.videojs[r]){o.warn("The "+r+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)");return t.videojs[r]}};return i}(Fe);_n.names.forEach(function(e){var t=_n[e];Sn.prototype[t.getterName]=function(){this[t.privateName]=this[t.privateName]||new t.ListClass;return this[t.privateName]}});Sn.prototype.featuresVolumeControl=true;Sn.prototype.featuresMuteControl=true;Sn.prototype.featuresFullscreenResize=false;Sn.prototype.featuresPlaybackRate=false;Sn.prototype.featuresProgressEvents=false;Sn.prototype.featuresSourceset=false;Sn.prototype.featuresTimeupdateEvents=false;Sn.prototype.featuresNativeTextTracks=false;Sn.withSourceHandlers=function(e){e.registerSourceHandler=function(t,r){var i=e.sourceHandlers;if(!i){i=e.sourceHandlers=[]}if(r===undefined){r=i.length}i.splice(r,0,t)};e.canPlayType=function(t){var r=e.sourceHandlers||[];var i;for(var n=0;n<r.length;n++){i=r[n].canPlayType(t);if(i){return i}}return""};e.selectSourceHandler=function(t,r){var i=e.sourceHandlers||[];var n;for(var a=0;a<i.length;a++){n=i[a].canHandleSource(t,r);if(n){return i[a]}}return null};e.canPlaySource=function(t,r){var i=e.selectSourceHandler(t,r);if(i){return i.canHandleSource(t,r)}return""};var t=["seekable","seeking","duration"];t.forEach(function(e){var t=this[e];if(typeof t!=="function"){return}this[e]=function(){if(this.sourceHandler_&&this.sourceHandler_[e]){return this.sourceHandler_[e].apply(this.sourceHandler_,arguments)}return t.apply(this,arguments)}},e.prototype);e.prototype.setSource=function(t){var r=e.selectSourceHandler(t,this.options_);if(!r){if(e.nativeSourceHandler){r=e.nativeSourceHandler}else{o.error("No source handler found for the current source.")}}this.disposeSourceHandler();this.off("dispose",this.disposeSourceHandler);if(r!==e.nativeSourceHandler){this.currentSource_=t}this.sourceHandler_=r.handleSource(t,this,this.options_);this.one("dispose",this.disposeSourceHandler)};e.prototype.disposeSourceHandler=function(){if(this.currentSource_){this.clearTracks(["audio","video"]);this.currentSource_=null}this.cleanupAutoTextTracks();if(this.sourceHandler_){if(this.sourceHandler_.dispose){this.sourceHandler_.dispose()}this.sourceHandler_=null}}};Fe.registerComponent("Tech",Sn);Sn.registerTech("Tech",Sn);Sn.defaultTechOrder_=[];var kn={};var jn={};var En={};function wn(e,t){kn[e]=kn[e]||[];kn[e].push(t)}function Cn(e,t,r){e.setTimeout(function(){return Bn(t,kn[t.type],r,e)},1)}function An(e,t){e.forEach(function(e){return e.setTech&&e.setTech(t)})}function In(e,t,r){return e.reduceRight(Rn(r),t[r]())}function xn(e,t,r,i){return t[r](e.reduce(Rn(r),i))}function Pn(e,t,r,i){if(i===void 0){i=null}var n="call"+Ne(r);var a=e.reduce(Rn(n),i);var s=a===En;var o=s?null:t[r](a);Un(e,r,o,s);return o}var On={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1,volume:1};var Dn={setCurrentTime:1,setVolume:1};var Ln={play:1,pause:1};function Rn(e){return function(t,r){if(t===En){return En}if(r[e]){return r[e](t)}return t}}function Un(e,t,r,i){for(var n=e.length-1;n>=0;n--){var a=e[n];if(a[t]){a[t](i,r)}}}function Nn(e){jn[e.id()]=null}function Mn(e,t){var r=jn[e.id()];var i=null;if(r===undefined||r===null){i=t(e);jn[e.id()]=[[t,i]];return i}for(var n=0;n<r.length;n++){var a=r[n],s=a[0],o=a[1];if(s!==t){continue}i=o}if(i===null){i=t(e);r.push([t,i])}return i}function Bn(e,t,r,i,n,a){if(e===void 0){e={}}if(t===void 0){t=[]}if(n===void 0){n=[]}if(a===void 0){a=false}var s=t,o=s[0],l=s.slice(1);if(typeof o==="string"){Bn(e,kn[o],r,i,n,a)}else if(o){var u=Mn(i,o);if(!u.setSource){n.push(u);return Bn(e,l,r,i,n,a)}u.setSource(h({},e),function(t,s){if(t){return Bn(e,l,r,i,n,a)}n.push(u);Bn(s,e.type===s.type?l:kn[s.type],r,i,n,a)})}else if(l.length){Bn(e,l,r,i,n,a)}else if(a){r(e,n)}else{Bn(e,kn["*"],r,i,n,true)}}var Fn={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",oga:"audio/ogg",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"};var Wn=function e(t){if(t===void 0){t=""}var r=ar(t);var i=Fn[r.toLowerCase()];return i||""};var Hn=function e(t,r){if(!r){return""}if(t.cache_.source.src===r&&t.cache_.source.type){return t.cache_.source.type}var i=t.cache_.sources.filter(function(e){return e.src===r});if(i.length){return i[0].type}var n=t.$$("source");for(var a=0;a<n.length;a++){var s=n[a];if(s.type&&s.src&&s.src===r){return s.type}}return Wn(r)};var qn=function e(t){if(Array.isArray(t)){var r=[];t.forEach(function(t){t=e(t);if(Array.isArray(t)){r=r.concat(t)}else if(p(t)){r.push(t)}});t=r}else if(typeof t==="string"&&t.trim()){t=[Vn({src:t})]}else if(p(t)&&typeof t.src==="string"&&t.src&&t.src.trim()){t=[Vn(t)]}else{t=[]}return t};function Vn(e){if(!e.type){var t=Wn(e.src);if(t){e.type=t}}return e}var Kn=function(e){We(t,e);function t(t,r,i){var n;var a=Be({createEl:false},r);n=e.call(this,t,a,i)||this;if(!r.playerOptions.sources||r.playerOptions.sources.length===0){for(var s=0,o=r.playerOptions.techOrder;s<o.length;s++){var l=Ne(o[s]);var u=Sn.getTech(l);if(!l){u=Fe.getComponent(l)}if(u&&u.isSupported()){t.loadTech_(l);break}}}else{t.src(r.playerOptions.sources)}return n}return t}(Fe);Fe.registerComponent("MediaLoader",Kn);var zn=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.emitTapEvents();i.enable();return i}var r=t.prototype;r.createEl=function t(r,i,n){if(r===void 0){r="div"}if(i===void 0){i={}}if(n===void 0){n={}}i=h({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},i);if(r==="button"){o.error("Creating a ClickableComponent with an HTML element of "+r+" is not supported; use a Button instead.")}n=h({role:"button"},n);this.tabIndex_=i.tabIndex;var a=e.prototype.createEl.call(this,r,i,n);this.createControlTextEl(a);return a};r.dispose=function t(){this.controlTextEl_=null;e.prototype.dispose.call(this)};r.createControlTextEl=function e(t){this.controlTextEl_=j("span",{className:"vjs-control-text"},{"aria-live":"polite"});if(t){t.appendChild(this.controlTextEl_)}this.controlText(this.controlText_,t);return this.controlTextEl_};r.controlText=function e(t,r){if(r===void 0){r=this.el()}if(t===undefined){return this.controlText_||"Need Text"}var i=this.localize(t);this.controlText_=t;E(this.controlTextEl_,i);if(!this.nonIconControl){r.setAttribute("title",i)}};r.buildCSSClass=function t(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)};r.enable=function e(){if(!this.enabled_){this.enabled_=true;this.removeClass("vjs-disabled");this.el_.setAttribute("aria-disabled","false");if(typeof this.tabIndex_!=="undefined"){this.el_.setAttribute("tabIndex",this.tabIndex_)}this.on(["tap","click"],this.handleClick);this.on("keydown",this.handleKeyDown)}};r.disable=function e(){this.enabled_=false;this.addClass("vjs-disabled");this.el_.setAttribute("aria-disabled","true");if(typeof this.tabIndex_!=="undefined"){this.el_.removeAttribute("tabIndex")}this.off("mouseover",this.handleMouseOver);this.off("mouseout",this.handleMouseOut);this.off(["tap","click"],this.handleClick);this.off("keydown",this.handleKeyDown)};r.handleClick=function e(t){};r.handleKeyDown=function t(r){if(Rt.isEventKey(r,"Space")||Rt.isEventKey(r,"Enter")){r.preventDefault();r.stopPropagation();this.trigger("click")}else{e.prototype.handleKeyDown.call(this,r)}};return t}(Fe);Fe.registerComponent("ClickableComponent",zn);var Gn=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update();t.on("posterchange",_e(Ke(i),i.update));return i}var r=t.prototype;r.dispose=function t(){this.player().off("posterchange",this.update);e.prototype.dispose.call(this)};r.createEl=function e(){var t=j("div",{className:"vjs-poster",tabIndex:-1});return t};r.update=function e(t){var r=this.player().poster();this.setSrc(r);if(r){this.show()}else{this.hide()}};r.setSrc=function e(t){var r="";if(t){r='url("'+t+'")'}this.el_.style.backgroundImage=r};r.handleClick=function e(t){if(!this.player_.controls()){return}if(this.player_.tech(true)){this.player_.tech(true).focus()}if(this.player_.paused()){It(this.player_.play())}else{this.player_.pause()}};return t}(zn);Fe.registerComponent("PosterImage",Gn);var Yn="#222";var Xn="#ccc";var $n={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'};function Jn(e,t){var r;if(e.length===4){r=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]}else if(e.length===7){r=e.slice(1)}else{throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.")}return"rgba("+parseInt(r.slice(0,2),16)+","+parseInt(r.slice(2,4),16)+","+parseInt(r.slice(4,6),16)+","+t+")"}function Qn(e,t,r){try{e.style[t]=r}catch(e){return}}var Zn=function(e){We(r,e);function r(r,i,n){var a;a=e.call(this,r,i,n)||this;var s=_e(Ke(a),a.updateDisplay);r.on("loadstart",_e(Ke(a),a.toggleDisplay));r.on("texttrackchange",s);r.on("loadedmetadata",_e(Ke(a),a.preselectTrack));r.ready(_e(Ke(a),function(){if(r.tech_&&r.tech_.featuresNativeTextTracks){this.hide();return}r.on("fullscreenchange",s);r.on("playerresize",s);t.addEventListener("orientationchange",s);r.on("dispose",function(){return t.removeEventListener("orientationchange",s)});var e=this.options_.playerOptions.tracks||[];for(var i=0;i<e.length;i++){this.player_.addRemoteTextTrack(e[i],true)}this.preselectTrack()}));return a}var i=r.prototype;i.preselectTrack=function e(){var t={captions:1,subtitles:1};var r=this.player_.textTracks();var i=this.player_.cache_.selectedLanguage;var n;var a;var s;for(var o=0;o<r.length;o++){var l=r[o];if(i&&i.enabled&&i.language&&i.language===l.language&&l.kind in t){if(l.kind===i.kind){s=l}else if(!s){s=l}}else if(i&&!i.enabled){s=null;n=null;a=null}else if(l["default"]){if(l.kind==="descriptions"&&!n){n=l}else if(l.kind in t&&!a){a=l}}}if(s){s.mode="showing"}else if(a){a.mode="showing"}else if(n){n.mode="showing"}};i.toggleDisplay=function e(){if(this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks){this.hide()}else{this.show()}};i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})};i.clearDisplay=function e(){if(typeof t.WebVTT==="function"){t.WebVTT.processCues(t,[],this.el_)}};i.updateDisplay=function e(){var t=this.player_.textTracks();var r=this.options_.allowMultipleShowingTracks;this.clearDisplay();if(r){var i=[];for(var n=0;n<t.length;++n){var a=t[n];if(a.mode!=="showing"){continue}i.push(a)}this.updateForTrack(i);return}var s=null;var o=null;var l=t.length;while(l--){var u=t[l];if(u.mode==="showing"){if(u.kind==="descriptions"){s=u}else{o=u}}}if(o){if(this.getAttribute("aria-live")!=="off"){this.setAttribute("aria-live","off")}this.updateForTrack(o)}else if(s){if(this.getAttribute("aria-live")!=="assertive"){this.setAttribute("aria-live","assertive")}this.updateForTrack(s)}};i.updateDisplayState=function e(r){var i=this.player_.textTrackSettings.getValues();var n=r.activeCues;var a=n.length;while(a--){var s=n[a];if(!s){continue}var o=s.displayState;if(i.color){o.firstChild.style.color=i.color}if(i.textOpacity){Qn(o.firstChild,"color",Jn(i.color||"#fff",i.textOpacity))}if(i.backgroundColor){o.firstChild.style.backgroundColor=i.backgroundColor}if(i.backgroundOpacity){Qn(o.firstChild,"backgroundColor",Jn(i.backgroundColor||"#000",i.backgroundOpacity))}if(i.windowColor){if(i.windowOpacity){Qn(o,"backgroundColor",Jn(i.windowColor,i.windowOpacity))}else{o.style.backgroundColor=i.windowColor}}if(i.edgeStyle){if(i.edgeStyle==="dropshadow"){o.firstChild.style.textShadow="2px 2px 3px "+Yn+", 2px 2px 4px "+Yn+", 2px 2px 5px "+Yn}else if(i.edgeStyle==="raised"){o.firstChild.style.textShadow="1px 1px "+Yn+", 2px 2px "+Yn+", 3px 3px "+Yn}else if(i.edgeStyle==="depressed"){o.firstChild.style.textShadow="1px 1px "+Xn+", 0 1px "+Xn+", -1px -1px "+Yn+", 0 -1px "+Yn}else if(i.edgeStyle==="uniform"){o.firstChild.style.textShadow="0 0 4px "+Yn+", 0 0 4px "+Yn+", 0 0 4px "+Yn+", 0 0 4px "+Yn}}if(i.fontPercent&&i.fontPercent!==1){var l=t.parseFloat(o.style.fontSize);o.style.fontSize=l*i.fontPercent+"px";o.style.height="auto";o.style.top="auto";o.style.bottom="2px"}if(i.fontFamily&&i.fontFamily!=="default"){if(i.fontFamily==="small-caps"){o.firstChild.style.fontVariant="small-caps"}else{o.firstChild.style.fontFamily=$n[i.fontFamily]}}}};i.updateForTrack=function e(r){if(!Array.isArray(r)){r=[r]}if(typeof t.WebVTT!=="function"||r.every(function(e){return!e.activeCues})){return}var i=[];for(var n=0;n<r.length;++n){var a=r[n];for(var s=0;s<a.activeCues.length;++s){i.push(a.activeCues[s])}}t.WebVTT.processCues(t,i,this.el_);for(var o=0;o<r.length;++o){var l=r[o];for(var u=0;u<l.activeCues.length;++u){var c=l.activeCues[u].displayState;A(c,"vjs-text-track-cue");A(c,"vjs-text-track-cue-"+(l.language?l.language:o))}if(this.player_.textTrackSettings){this.updateDisplayState(l)}}};return r}(Fe);Fe.registerComponent("TextTrackDisplay",Zn);var ea=function(e){We(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){var r=this.player_.isAudio();var i=this.localize(r?"Audio Player":"Video Player");var n=j("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[i])});var a=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});a.appendChild(n);return a};return t}(Fe);Fe.registerComponent("LoadingSpinner",ea);var ta=function(e){We(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function e(t,r,i){if(r===void 0){r={}}if(i===void 0){i={}}t="button";r=h({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},r);i=h({type:"button"},i);var n=Fe.prototype.createEl.call(this,t,r,i);this.createControlTextEl(n);return n};r.addChild=function e(t,r){if(r===void 0){r={}}var i=this.constructor.name;o.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead.");return Fe.prototype.addChild.call(this,t,r)};r.enable=function t(){e.prototype.enable.call(this);this.el_.removeAttribute("disabled")};r.disable=function t(){e.prototype.disable.call(this);this.el_.setAttribute("disabled","disabled")};r.handleKeyDown=function t(r){if(Rt.isEventKey(r,"Space")||Rt.isEventKey(r,"Enter")){r.stopPropagation();return}e.prototype.handleKeyDown.call(this,r)};return t}(zn);Fe.registerComponent("Button",ta);var ra=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.mouseused_=false;i.on("mousedown",i.handleMouseDown);return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-big-play-button"};r.handleClick=function e(t){var r=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY){It(r);if(this.player_.tech(true)){this.player_.tech(true).focus()}return}var i=this.player_.getChild("controlBar");var n=i&&i.getChild("playToggle");if(!n){this.player_.tech(true).focus();return}var a=function e(){return n.focus()};if(At(r)){r.then(a,function(){})}else{this.setTimeout(a,1)}};r.handleKeyDown=function t(r){this.mouseused_=false;e.prototype.handleKeyDown.call(this,r)};r.handleMouseDown=function e(t){this.mouseused_=true};return t}(ta);ra.prototype.controlText_="Play Video";Fe.registerComponent("BigPlayButton",ra);var ia=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.controlText(r&&r.controlText||i.localize("Close"));return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)};r.handleClick=function e(t){this.trigger({type:"close",bubbles:false})};r.handleKeyDown=function t(r){if(Rt.isEventKey(r,"Esc")){r.preventDefault();r.stopPropagation();this.trigger("click")}else{e.prototype.handleKeyDown.call(this,r)}};return t}(ta);Fe.registerComponent("CloseButton",ia);var na=function(e){We(t,e);function t(t,r){var i;if(r===void 0){r={}}i=e.call(this,t,r)||this;r.replay=r.replay===undefined||r.replay;i.on(t,"play",i.handlePlay);i.on(t,"pause",i.handlePause);if(r.replay){i.on(t,"ended",i.handleEnded)}return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)};r.handleClick=function e(t){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};r.handleSeeked=function e(t){this.removeClass("vjs-ended");if(this.player_.paused()){this.handlePause(t)}else{this.handlePlay(t)}};r.handlePlay=function e(t){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.controlText("Pause")};r.handlePause=function e(t){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.controlText("Play")};r.handleEnded=function e(t){this.removeClass("vjs-playing");this.addClass("vjs-ended");this.controlText("Replay");this.one(this.player_,"seeked",this.handleSeeked)};return t}(ta);na.prototype.controlText_="Play";Fe.registerComponent("PlayToggle",na);var aa=function e(t,r){t=t<0?0:t;var i=Math.floor(t%60);var n=Math.floor(t/60%60);var a=Math.floor(t/3600);var s=Math.floor(r/60%60);var o=Math.floor(r/3600);if(isNaN(t)||t===Infinity){a=n=i="-"}a=a>0||o>0?a+":":"";n=((a||s>=10)&&n<10?"0"+n:n)+":";i=i<10?"0"+i:i;return a+n+i};var sa=aa;function oa(e){sa=e}function la(){sa=aa}function ua(e,t){if(t===void 0){t=e}return sa(e,t)}var ca=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.throttledUpdateContent=be(_e(Ke(i),i.updateContent),ye);i.on(t,"timeupdate",i.throttledUpdateContent);return i}var i=t.prototype;i.createEl=function t(){var r=this.buildCSSClass();var i=e.prototype.createEl.call(this,"div",{className:r+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+"\xa0</span>"});this.contentEl_=j("span",{className:r+"-display"},{"aria-live":"off",role:"presentation"});this.updateTextNode_();i.appendChild(this.contentEl_);return i};i.dispose=function t(){this.contentEl_=null;this.textNode_=null;e.prototype.dispose.call(this)};i.updateTextNode_=function e(){if(!this.contentEl_){return}while(this.contentEl_.firstChild){this.contentEl_.removeChild(this.contentEl_.firstChild)}this.textNode_=r.createTextNode(this.formattedTime_||this.formatTime_(0));this.contentEl_.appendChild(this.textNode_)};i.formatTime_=function e(t){return ua(t)};i.updateFormattedTime_=function e(t){var r=this.formatTime_(t);if(r===this.formattedTime_){return}this.formattedTime_=r;this.requestAnimationFrame(this.updateTextNode_)};i.updateContent=function e(t){};return t}(Fe);ca.prototype.labelText_="Time";ca.prototype.controlText_="Time";Fe.registerComponent("TimeDisplay",ca);var da=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on(t,"ended",i.handleEnded);return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-current-time"};r.updateContent=function e(t){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(r)};r.handleEnded=function e(t){if(!this.player_.duration()){return}this.updateFormattedTime_(this.player_.duration())};return t}(ca);da.prototype.labelText_="Current Time";da.prototype.controlText_="Current Time";Fe.registerComponent("CurrentTimeDisplay",da);var fa=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on(t,"durationchange",i.updateContent);i.on(t,"loadstart",i.updateContent);i.on(t,"loadedmetadata",i.throttledUpdateContent);return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-duration"};r.updateContent=function e(t){var r=this.player_.duration();if(this.duration_!==r){this.duration_=r;this.updateFormattedTime_(r)}};return t}(ca);fa.prototype.labelText_="Duration";fa.prototype.controlText_="Duration";Fe.registerComponent("DurationDisplay",fa);var ha=function(e){We(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":true})};return t}(Fe);Fe.registerComponent("TimeDivider",ha);var pa=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on(t,"durationchange",i.throttledUpdateContent);i.on(t,"ended",i.handleEnded);return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-remaining-time"};r.createEl=function t(){var r=e.prototype.createEl.call(this);r.insertBefore(j("span",{},{"aria-hidden":true},"-"),this.contentEl_);return r};r.updateContent=function e(t){if(typeof this.player_.duration()!=="number"){return}if(this.player_.remainingTimeDisplay){this.updateFormattedTime_(this.player_.remainingTimeDisplay())}else{this.updateFormattedTime_(this.player_.remainingTime())}};r.handleEnded=function e(t){if(!this.player_.duration()){return}this.updateFormattedTime_(0)};return t}(ca);pa.prototype.labelText_="Remaining Time";pa.prototype.controlText_="Remaining Time";Fe.registerComponent("RemainingTimeDisplay",pa);var va=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.updateShowing();i.on(i.player(),"durationchange",i.updateShowing);return i}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});this.contentEl_=j("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"\xa0</span>"+this.localize("LIVE")},{"aria-live":"off"});r.appendChild(this.contentEl_);return r};r.dispose=function t(){this.contentEl_=null;e.prototype.dispose.call(this)};r.updateShowing=function e(t){if(this.player().duration()===Infinity){this.show()}else{this.hide()}};return t}(Fe);Fe.registerComponent("LiveDisplay",va);var ma=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.updateLiveEdgeStatus();if(i.player_.liveTracker){i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatus)}return i}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});this.textEl_=j("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"});r.appendChild(this.textEl_);return r};r.updateLiveEdgeStatus=function e(t){if(!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()){this.setAttribute("aria-disabled",true);this.addClass("vjs-at-live-edge");this.controlText("Seek to live, currently playing live")}else{this.setAttribute("aria-disabled",false);this.removeClass("vjs-at-live-edge");this.controlText("Seek to live, currently behind live")}};r.handleClick=function e(){this.player_.liveTracker.seekToLiveEdge()};r.dispose=function t(){if(this.player_.liveTracker){this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus)}this.textEl_=null;e.prototype.dispose.call(this)};return t}(ta);ma.prototype.controlText_="Seek to live, currently playing live";Fe.registerComponent("SeekToLive",ma);var ga=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.bar=i.getChild(i.options_.barName);i.vertical(!!i.options_.vertical);i.enable();return i}var r=t.prototype;r.enabled=function e(){return this.enabled_};r.enable=function e(){if(this.enabled()){return}this.on("mousedown",this.handleMouseDown);this.on("touchstart",this.handleMouseDown);this.on("keydown",this.handleKeyDown);this.on("click",this.handleClick);this.on(this.player_,"controlsvisible",this.update);if(this.playerEvent){this.on(this.player_,this.playerEvent,this.update)}this.removeClass("disabled");this.setAttribute("tabindex",0);this.enabled_=true};r.disable=function e(){if(!this.enabled()){return}var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown);this.off("touchstart",this.handleMouseDown);this.off("keydown",this.handleKeyDown);this.off("click",this.handleClick);this.off(this.player_,"controlsvisible",this.update);this.off(t,"mousemove",this.handleMouseMove);this.off(t,"mouseup",this.handleMouseUp);this.off(t,"touchmove",this.handleMouseMove);this.off(t,"touchend",this.handleMouseUp);this.removeAttribute("tabindex");this.addClass("disabled");if(this.playerEvent){this.off(this.player_,this.playerEvent,this.update)}this.enabled_=false};r.createEl=function t(r,i,n){if(i===void 0){i={}}if(n===void 0){n={}}i.className=i.className+" vjs-slider";i=h({tabIndex:0},i);n=h({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n);return e.prototype.createEl.call(this,r,i,n)};r.handleMouseDown=function e(t){var r=this.bar.el_.ownerDocument;if(t.type==="mousedown"){t.preventDefault()}if(t.type==="touchstart"&&!at){t.preventDefault()}U();this.addClass("vjs-sliding");this.trigger("slideractive");this.on(r,"mousemove",this.handleMouseMove);this.on(r,"mouseup",this.handleMouseUp);this.on(r,"touchmove",this.handleMouseMove);this.on(r,"touchend",this.handleMouseUp);this.handleMouseMove(t)};r.handleMouseMove=function e(t){};r.handleMouseUp=function e(){var t=this.bar.el_.ownerDocument;N();this.removeClass("vjs-sliding");this.trigger("sliderinactive");this.off(t,"mousemove",this.handleMouseMove);this.off(t,"mouseup",this.handleMouseUp);this.off(t,"touchmove",this.handleMouseMove);this.off(t,"touchend",this.handleMouseUp);this.update()};r.update=function e(){if(!this.el_){return}var t=this.getPercent();var r=this.bar;if(!r){return}if(typeof t!=="number"||t!==t||t<0||t===Infinity){t=0}var i=(t*100).toFixed(2)+"%";var n=r.el().style;var a=this.vertical()?"height":"width";if(n[a]!==i){n[a]=i}return t};r.calculateDistance=function e(t){var r=F(this.el_,t);if(this.vertical()){return r.y}return r.x};r.handleKeyDown=function t(r){if(Rt.isEventKey(r,"Left")||Rt.isEventKey(r,"Down")){r.preventDefault();r.stopPropagation();this.stepBack()}else if(Rt.isEventKey(r,"Right")||Rt.isEventKey(r,"Up")){r.preventDefault();r.stopPropagation();this.stepForward()}else{e.prototype.handleKeyDown.call(this,r)}};r.handleClick=function e(t){t.stopPropagation();t.preventDefault()};r.vertical=function e(t){if(t===undefined){return this.vertical_||false}this.vertical_=!!t;if(this.vertical_){this.addClass("vjs-slider-vertical")}else{this.addClass("vjs-slider-horizontal")}};return t}(Fe);Fe.registerComponent("Slider",ga);var ya=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.partEls_=[];i.on(t,"progress",i.update);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+'</span>: <span class="vjs-control-text-loaded-percentage">0%</span></span>'})};r.dispose=function t(){this.partEls_=null;e.prototype.dispose.call(this)};r.update=function e(t){var r=this.player_.liveTracker;var i=this.player_.buffered();var n=r&&r.isLive()?r.seekableEnd():this.player_.duration();var a=this.player_.bufferedEnd();var s=this.partEls_;var o=this.$(".vjs-control-text-loaded-percentage");var l=function e(t,r,i){var n=t/r||0;n=(n>=1?1:n)*100;if(i){n=n.toFixed(2)}return n+"%"};this.el_.style.width=l(a,n);E(o,l(a,n,true));for(var u=0;u<i.length;u++){var c=i.start(u);var d=i.end(u);var f=s[u];if(!f){f=this.el_.appendChild(j());s[u]=f}f.style.left=l(c,a);f.style.width=l(d-c,a)}for(var h=s.length;h>i.length;h--){this.el_.removeChild(s[h-1])}s.length=i.length};return t}(Fe);Fe.registerComponent("LoadProgressBar",ya);var _a=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update=be(_e(Ke(i),i.update),ye);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})};r.update=function e(t,r,i){var n=M(this.el_);var a=M(this.player_.el());var s=t.width*r;if(!a||!n){return}var o=t.left-a.left+s;var l=t.width-s+(a.right-t.right);var u=n.width/2;if(o<u){u+=u-o}else if(l<u){u=l}if(u<0){u=0}else if(u>n.width){u=n.width}this.el_.style.right="-"+u+"px";this.write(i)};r.write=function e(t){E(this.el_,t)};r.updateTime=function e(t,r,i,n){var a=this;if(this.rafId_){this.cancelAnimationFrame(this.rafId_)}this.rafId_=this.requestAnimationFrame(function(){var e;var s=a.player_.duration();if(a.player_.liveTracker&&a.player_.liveTracker.isLive()){var o=a.player_.liveTracker.liveWindow();var l=o-r*o;e=(l<1?"":"-")+ua(l,o)}else{e=ua(i,s)}a.update(t,r,e);if(n){n()}})};return t}(Fe);Fe.registerComponent("TimeTooltip",_a);var ba=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update=be(_e(Ke(i),i.update),ye);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})};r.update=function e(t,r){var i=this.getChild("timeTooltip");if(!i){return}var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(t,r,n)};return t}(Fe);ba.prototype.options_={children:[]};if(!Qe&&!et){ba.prototype.options_.children.push("timeTooltip")}Fe.registerComponent("PlayProgressBar",ba);var Ta=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update=be(_e(Ke(i),i.update),ye);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})};r.update=function e(t,r){var i=this;var n=r*this.player_.duration();this.getChild("timeTooltip").updateTime(t,r,n,function(){i.el_.style.left=t.width*r+"px"})};return t}(Fe);Ta.prototype.options_={children:["timeTooltip"]};Fe.registerComponent("MouseTimeDisplay",Ta);var Sa=5;var ka=12;var ja=30;var Ea=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.setEventHandlers_();return i}var i=t.prototype;i.setEventHandlers_=function e(){this.update=be(_e(this,this.update),ja);this.on(this.player_,"timeupdate",this.update);this.on(this.player_,"ended",this.handleEnded);this.on(this.player_,"durationchange",this.update);if(this.player_.liveTracker){this.on(this.player_.liveTracker,"liveedgechange",this.update)}this.updateInterval=null;this.on(this.player_,["playing"],this.enableInterval_);this.on(this.player_,["ended","pause","waiting"],this.disableInterval_);if("hidden"in r&&"visibilityState"in r){this.on(r,"visibilitychange",this.toggleVisibility_)}};i.toggleVisibility_=function e(t){if(r.hidden){this.disableInterval_(t)}else{this.enableInterval_();this.requestAnimationFrame(this.update)}};i.enableInterval_=function e(){var t=this;this.clearInterval(this.updateInterval);this.updateInterval=this.setInterval(function(){t.requestAnimationFrame(t.update)},ja)};i.disableInterval_=function e(t){if(this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t.type!=="ended"){return}this.clearInterval(this.updateInterval)};i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})};i.update_=function e(t,r){var i=this.player_.liveTracker;var n=this.player_.duration();if(i&&i.isLive()){n=this.player_.liveTracker.liveCurrentTime()}this.el_.setAttribute("aria-valuenow",(r*100).toFixed(2));this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[ua(t,n),ua(n,n)],"{1} of {2}"));if(this.bar){this.bar.update(M(this.el_),r)}};i.update=function t(r){if(this.el().offsetParent===null){return}var i=e.prototype.update.call(this);this.update_(this.getCurrentTime_(),i);return i};i.getCurrentTime_=function e(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()};i.handleEnded=function e(t){this.update_(this.player_.duration(),1)};i.getPercent=function e(){var t=this.getCurrentTime_();var r;var i=this.player_.liveTracker;if(i&&i.isLive()){r=(t-i.seekableStart())/i.liveWindow();if(i.atLiveEdge()){r=1}}else{r=t/this.player_.duration()}return r>=1?1:r||0};i.handleMouseDown=function t(r){if(!z(r)){return}r.stopPropagation();this.player_.scrubbing(true);this.videoWasPlaying=!this.player_.paused();this.player_.pause();e.prototype.handleMouseDown.call(this,r)};i.handleMouseMove=function e(t){if(!z(t)){return}var r;var i=this.calculateDistance(t);var n=this.player_.liveTracker;if(!n||!n.isLive()){r=i*this.player_.duration();if(r===this.player_.duration()){r=r-.1}}else{var a=n.seekableStart();var s=n.liveCurrentTime();r=a+i*n.liveWindow();if(r>=s){r=s}if(r<=a){r=a+.1}if(r===Infinity){return}}this.player_.currentTime(r)};i.enable=function t(){e.prototype.enable.call(this);var r=this.getChild("mouseTimeDisplay");if(!r){return}r.show()};i.disable=function t(){e.prototype.disable.call(this);var r=this.getChild("mouseTimeDisplay");if(!r){return}r.hide()};i.handleMouseUp=function t(r){e.prototype.handleMouseUp.call(this,r);if(r){r.stopPropagation()}this.player_.scrubbing(false);this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:true});if(this.videoWasPlaying){It(this.player_.play())}};i.stepForward=function e(){this.player_.currentTime(this.player_.currentTime()+Sa)};i.stepBack=function e(){this.player_.currentTime(this.player_.currentTime()-Sa)};i.handleAction=function e(t){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};i.handleKeyDown=function t(r){if(Rt.isEventKey(r,"Space")||Rt.isEventKey(r,"Enter")){r.preventDefault();r.stopPropagation();this.handleAction(r)}else if(Rt.isEventKey(r,"Home")){r.preventDefault();r.stopPropagation();this.player_.currentTime(0)}else if(Rt.isEventKey(r,"End")){r.preventDefault();r.stopPropagation();this.player_.currentTime(this.player_.duration())}else if(/^[0-9]$/.test(Rt(r))){r.preventDefault();r.stopPropagation();var i=(Rt.codes[Rt(r)]-Rt.codes["0"])*10/100;this.player_.currentTime(this.player_.duration()*i)}else if(Rt.isEventKey(r,"PgDn")){r.preventDefault();r.stopPropagation();this.player_.currentTime(this.player_.currentTime()-Sa*ka)}else if(Rt.isEventKey(r,"PgUp")){r.preventDefault();r.stopPropagation();this.player_.currentTime(this.player_.currentTime()+Sa*ka)}else{e.prototype.handleKeyDown.call(this,r)}};return t}(ga);Ea.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};if(!Qe&&!et){Ea.prototype.options_.children.splice(1,0,"mouseTimeDisplay")}Fe.registerComponent("SeekBar",Ea);var wa=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.handleMouseMove=be(_e(Ke(i),i.handleMouseMove),ye);i.throttledHandleMouseSeek=be(_e(Ke(i),i.handleMouseSeek),ye);i.enable();return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})};r.handleMouseMove=function e(t){var r=this.getChild("seekBar");if(r){var i=r.getChild("mouseTimeDisplay");var n=r.el();var a=M(n);var s=F(n,t).x;if(s>1){s=1}else if(s<0){s=0}if(i){i.update(a,s)}}};r.handleMouseSeek=function e(t){var r=this.getChild("seekBar");if(r){r.handleMouseMove(t)}};r.enabled=function e(){return this.enabled_};r.disable=function e(){this.children().forEach(function(e){return e.disable&&e.disable()});if(!this.enabled()){return}this.off(["mousedown","touchstart"],this.handleMouseDown);this.off(this.el_,"mousemove",this.handleMouseMove);this.handleMouseUp();this.addClass("disabled");this.enabled_=false};r.enable=function e(){this.children().forEach(function(e){return e.enable&&e.enable()});if(this.enabled()){return}this.on(["mousedown","touchstart"],this.handleMouseDown);this.on(this.el_,"mousemove",this.handleMouseMove);this.removeClass("disabled");this.enabled_=true};r.handleMouseDown=function e(t){var r=this.el_.ownerDocument;var i=this.getChild("seekBar");if(i){i.handleMouseDown(t)}this.on(r,"mousemove",this.throttledHandleMouseSeek);this.on(r,"touchmove",this.throttledHandleMouseSeek);this.on(r,"mouseup",this.handleMouseUp);this.on(r,"touchend",this.handleMouseUp)};r.handleMouseUp=function e(t){var r=this.el_.ownerDocument;var i=this.getChild("seekBar");if(i){i.handleMouseUp(t)}this.off(r,"mousemove",this.throttledHandleMouseSeek);this.off(r,"touchmove",this.throttledHandleMouseSeek);this.off(r,"mouseup",this.handleMouseUp);this.off(r,"touchend",this.handleMouseUp)};return t}(Fe);wa.prototype.options_={children:["seekBar"]};Fe.registerComponent("ProgressControl",wa);var Ca=function(e){We(t,e);function t(t,i){var n;n=e.call(this,t,i)||this;n.on(t,["enterpictureinpicture","leavepictureinpicture"],n.handlePictureInPictureChange);if(!r.pictureInPictureEnabled){n.disable()}return n}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)};i.handlePictureInPictureChange=function e(t){if(this.player_.isInPictureInPicture()){this.controlText("Exit Picture-in-Picture")}else{this.controlText("Picture-in-Picture")}};i.handleClick=function e(t){if(!this.player_.isInPictureInPicture()){this.player_.requestPictureInPicture()}else{this.player_.exitPictureInPicture()}};return t}(ta);Ca.prototype.controlText_="Picture-in-Picture";Fe.registerComponent("PictureInPictureToggle",Ca);var Aa=function(e){We(t,e);function t(t,i){var n;n=e.call(this,t,i)||this;n.on(t,"fullscreenchange",n.handleFullscreenChange);if(r[t.fsApi_.fullscreenEnabled]===false){n.disable()}return n}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)};i.handleFullscreenChange=function e(t){if(this.player_.isFullscreen()){this.controlText("Non-Fullscreen")}else{this.controlText("Fullscreen")}};i.handleClick=function e(t){if(!this.player_.isFullscreen()){this.player_.requestFullscreen()}else{this.player_.exitFullscreen()}};return t}(ta);Aa.prototype.controlText_="Fullscreen";Fe.registerComponent("FullscreenToggle",Aa);var Ia=function e(t,r){if(r.tech_&&!r.tech_.featuresVolumeControl){t.addClass("vjs-hidden")}t.on(r,"loadstart",function(){if(!r.tech_.featuresVolumeControl){t.addClass("vjs-hidden")}else{t.removeClass("vjs-hidden")}})};var xa=function(e){We(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};return t}(Fe);Fe.registerComponent("VolumeLevel",xa);var Pa=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on("slideractive",i.updateLastVolume_);i.on(t,"volumechange",i.updateARIAAttributes);t.ready(function(){return i.updateARIAAttributes()});return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})};r.handleMouseDown=function t(r){if(!z(r)){return}e.prototype.handleMouseDown.call(this,r)};r.handleMouseMove=function e(t){if(!z(t)){return}this.checkMuted();this.player_.volume(this.calculateDistance(t))};r.checkMuted=function e(){if(this.player_.muted()){this.player_.muted(false)}};r.getPercent=function e(){if(this.player_.muted()){return 0}return this.player_.volume()};r.stepForward=function e(){this.checkMuted();this.player_.volume(this.player_.volume()+.1)};r.stepBack=function e(){this.checkMuted();this.player_.volume(this.player_.volume()-.1)};r.updateARIAAttributes=function e(t){var r=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",r);this.el_.setAttribute("aria-valuetext",r+"%")};r.volumeAsPercentage_=function e(){return Math.round(this.player_.volume()*100)};r.updateLastVolume_=function e(){var t=this;var r=this.player_.volume();this.one("sliderinactive",function(){if(t.player_.volume()===0){t.player_.lastVolume_(r)}})};return t}(ga);Pa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};Pa.prototype.playerEvent="volumechange";Fe.registerComponent("VolumeBar",Pa);var Oa=function(e){We(t,e);function t(t,r){var i;if(r===void 0){r={}}r.vertical=r.vertical||false;if(typeof r.volumeBar==="undefined"||v(r.volumeBar)){r.volumeBar=r.volumeBar||{};r.volumeBar.vertical=r.vertical}i=e.call(this,t,r)||this;Ia(Ke(i),t);i.throttledHandleMouseMove=be(_e(Ke(i),i.handleMouseMove),ye);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")});return i}var r=t.prototype;r.createEl=function t(){var r="vjs-volume-horizontal";if(this.options_.vertical){r="vjs-volume-vertical"}return e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+r})};r.handleMouseDown=function e(t){var r=this.el_.ownerDocument;this.on(r,"mousemove",this.throttledHandleMouseMove);this.on(r,"touchmove",this.throttledHandleMouseMove);this.on(r,"mouseup",this.handleMouseUp);this.on(r,"touchend",this.handleMouseUp)};r.handleMouseUp=function e(t){var r=this.el_.ownerDocument;this.off(r,"mousemove",this.throttledHandleMouseMove);this.off(r,"touchmove",this.throttledHandleMouseMove);this.off(r,"mouseup",this.handleMouseUp);this.off(r,"touchend",this.handleMouseUp)};r.handleMouseMove=function e(t){this.volumeBar.handleMouseMove(t)};return t}(Fe);Oa.prototype.options_={children:["volumeBar"]};Fe.registerComponent("VolumeControl",Oa);var Da=function e(t,r){if(r.tech_&&!r.tech_.featuresMuteControl){t.addClass("vjs-hidden")}t.on(r,"loadstart",function(){if(!r.tech_.featuresMuteControl){t.addClass("vjs-hidden")}else{t.removeClass("vjs-hidden")}})};var La=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;Da(Ke(i),t);i.on(t,["loadstart","volumechange"],i.update);return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)};r.handleClick=function e(t){var r=this.player_.volume();var i=this.player_.lastVolume_();if(r===0){var n=i<.1?.1:i;this.player_.volume(n);this.player_.muted(false)}else{this.player_.muted(this.player_.muted()?false:true)}};r.update=function e(t){this.updateIcon_();this.updateControlText_()};r.updateIcon_=function e(){var t=this.player_.volume();var r=3;if(Qe&&this.player_.tech_&&this.player_.tech_.el_){this.player_.muted(this.player_.tech_.el_.muted)}if(t===0||this.player_.muted()){r=0}else if(t<.33){r=1}else if(t<.67){r=2}for(var i=0;i<4;i++){I(this.el_,"vjs-vol-"+i)}A(this.el_,"vjs-vol-"+r)};r.updateControlText_=function e(){var t=this.player_.muted()||this.player_.volume()===0;var r=t?"Unmute":"Mute";if(this.controlText()!==r){this.controlText(r)}};return t}(ta);La.prototype.controlText_="Mute";Fe.registerComponent("MuteToggle",La);var Ra=function(e){We(t,e);function t(t,r){var i;if(r===void 0){r={}}if(typeof r.inline!=="undefined"){r.inline=r.inline}else{r.inline=true}if(typeof r.volumeControl==="undefined"||v(r.volumeControl)){r.volumeControl=r.volumeControl||{};r.volumeControl.vertical=!r.inline}i=e.call(this,t,r)||this;i.on(t,["loadstart"],i.volumePanelState_);i.on(i.muteToggle,"keyup",i.handleKeyPress);i.on(i.volumeControl,"keyup",i.handleVolumeControlKeyUp);i.on("keydown",i.handleKeyPress);i.on("mouseover",i.handleMouseOver);i.on("mouseout",i.handleMouseOut);i.on(i.volumeControl,["slideractive"],i.sliderActive_);i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_);return i}var i=t.prototype;i.sliderActive_=function e(){this.addClass("vjs-slider-active")};i.sliderInactive_=function e(){this.removeClass("vjs-slider-active")};i.volumePanelState_=function e(){if(this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")){this.addClass("vjs-hidden")}if(this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")){this.addClass("vjs-mute-toggle-only")}};i.createEl=function t(){var r="vjs-volume-panel-horizontal";if(!this.options_.inline){r="vjs-volume-panel-vertical"}return e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+r})};i.dispose=function t(){this.handleMouseOut();e.prototype.dispose.call(this)};i.handleVolumeControlKeyUp=function e(t){if(Rt.isEventKey(t,"Esc")){this.muteToggle.focus()}};i.handleMouseOver=function e(t){this.addClass("vjs-hover");fe(r,"keyup",_e(this,this.handleKeyPress))};i.handleMouseOut=function e(t){this.removeClass("vjs-hover");he(r,"keyup",_e(this,this.handleKeyPress))};i.handleKeyPress=function e(t){if(Rt.isEventKey(t,"Esc")){this.handleMouseOut()}};return t}(Fe);Ra.prototype.options_={children:["muteToggle","volumeControl"]};Fe.registerComponent("VolumePanel",Ra);var Ua=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;if(r){i.menuButton_=r.menuButton}i.focusedChild_=-1;i.on("keydown",i.handleKeyDown);i.boundHandleBlur_=_e(Ke(i),i.handleBlur);i.boundHandleTapClick_=_e(Ke(i),i.handleTapClick);return i}var i=t.prototype;i.addEventListenerForItem=function e(t){if(!(t instanceof Fe)){return}this.on(t,"blur",this.boundHandleBlur_);this.on(t,["tap","click"],this.boundHandleTapClick_)};i.removeEventListenerForItem=function e(t){if(!(t instanceof Fe)){return}this.off(t,"blur",this.boundHandleBlur_);this.off(t,["tap","click"],this.boundHandleTapClick_)};i.removeChild=function t(r){if(typeof r==="string"){r=this.getChild(r)}this.removeEventListenerForItem(r);e.prototype.removeChild.call(this,r)};i.addItem=function e(t){var r=this.addChild(t);if(r){this.addEventListenerForItem(r)}};i.createEl=function t(){var r=this.options_.contentElType||"ul";this.contentEl_=j(r,{className:"vjs-menu-content"});this.contentEl_.setAttribute("role","menu");var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});i.appendChild(this.contentEl_);fe(i,"click",function(e){e.preventDefault();e.stopImmediatePropagation()});return i};i.dispose=function t(){this.contentEl_=null;this.boundHandleBlur_=null;this.boundHandleTapClick_=null;e.prototype.dispose.call(this)};i.handleBlur=function e(t){var i=t.relatedTarget||r.activeElement;if(!this.children().some(function(e){return e.el()===i})){var n=this.menuButton_;if(n&&n.buttonPressed_&&i!==n.el().firstChild){n.unpressButton()}}};i.handleTapClick=function e(t){if(this.menuButton_){this.menuButton_.unpressButton();var r=this.children();if(!Array.isArray(r)){return}var i=r.filter(function(e){return e.el()===t.target})[0];if(!i){return}if(i.name()!=="CaptionSettingsMenuItem"){this.menuButton_.focus()}}};i.handleKeyDown=function e(t){if(Rt.isEventKey(t,"Left")||Rt.isEventKey(t,"Down")){t.preventDefault();t.stopPropagation();this.stepForward()}else if(Rt.isEventKey(t,"Right")||Rt.isEventKey(t,"Up")){t.preventDefault();t.stopPropagation();this.stepBack()}};i.stepForward=function e(){var t=0;if(this.focusedChild_!==undefined){t=this.focusedChild_+1}this.focus(t)};i.stepBack=function e(){var t=0;if(this.focusedChild_!==undefined){t=this.focusedChild_-1}this.focus(t)};i.focus=function e(t){if(t===void 0){t=0}var r=this.children().slice();var i=r.length&&r[0].className&&/vjs-menu-title/.test(r[0].className);if(i){r.shift()}if(r.length>0){if(t<0){t=0}else if(t>=r.length){t=r.length-1}this.focusedChild_=t;r[t].el_.focus()}};return t}(Fe);Fe.registerComponent("Menu",Ua);var Na=function(e){We(t,e);function t(t,i){var n;if(i===void 0){i={}}n=e.call(this,t,i)||this;n.menuButton_=new ta(t,i);n.menuButton_.controlText(n.controlText_);n.menuButton_.el_.setAttribute("aria-haspopup","true");var a=ta.prototype.buildCSSClass();n.menuButton_.el_.className=n.buildCSSClass()+" "+a;n.menuButton_.removeClass("vjs-control");n.addChild(n.menuButton_);n.update();n.enabled_=true;n.on(n.menuButton_,"tap",n.handleClick);n.on(n.menuButton_,"click",n.handleClick);n.on(n.menuButton_,"keydown",n.handleKeyDown);n.on(n.menuButton_,"mouseenter",function(){n.addClass("vjs-hover");n.menu.show();fe(r,"keyup",_e(Ke(n),n.handleMenuKeyUp))});n.on("mouseleave",n.handleMouseLeave);n.on("keydown",n.handleSubmenuKeyDown);return n}var i=t.prototype;i.update=function e(){var t=this.createMenu();if(this.menu){this.menu.dispose();this.removeChild(this.menu)}this.menu=t;this.addChild(t);this.buttonPressed_=false;this.menuButton_.el_.setAttribute("aria-expanded","false");if(this.items&&this.items.length<=this.hideThreshold_){this.hide()}else{this.show()}};i.createMenu=function e(){var t=new Ua(this.player_,{menuButton:this});this.hideThreshold_=0;if(this.options_.title){var r=j("li",{className:"vjs-menu-title",innerHTML:Ne(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var i=new Fe(this.player_,{el:r});t.addItem(i)}this.items=this.createItems();if(this.items){for(var n=0;n<this.items.length;n++){t.addItem(this.items[n])}}return t};i.createItems=function e(){};i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})};i.buildWrapperCSSClass=function t(){var r="vjs-menu-button";if(this.options_.inline===true){r+="-inline"}else{r+="-popup"}var i=ta.prototype.buildCSSClass();return"vjs-menu-button "+r+" "+i+" "+e.prototype.buildCSSClass.call(this)};i.buildCSSClass=function t(){var r="vjs-menu-button";if(this.options_.inline===true){r+="-inline"}else{r+="-popup"}return"vjs-menu-button "+r+" "+e.prototype.buildCSSClass.call(this)};i.controlText=function e(t,r){if(r===void 0){r=this.menuButton_.el()}return this.menuButton_.controlText(t,r)};i.dispose=function t(){this.handleMouseLeave();e.prototype.dispose.call(this)};i.handleClick=function e(t){if(this.buttonPressed_){this.unpressButton()}else{this.pressButton()}};i.handleMouseLeave=function e(t){this.removeClass("vjs-hover");he(r,"keyup",_e(this,this.handleMenuKeyUp))};i.focus=function e(){this.menuButton_.focus()};i.blur=function e(){this.menuButton_.blur()};i.handleKeyDown=function e(t){if(Rt.isEventKey(t,"Esc")||Rt.isEventKey(t,"Tab")){if(this.buttonPressed_){this.unpressButton()}if(!Rt.isEventKey(t,"Tab")){t.preventDefault();this.menuButton_.focus()}}else if(Rt.isEventKey(t,"Up")||Rt.isEventKey(t,"Down")){if(!this.buttonPressed_){t.preventDefault();this.pressButton()}}};i.handleMenuKeyUp=function e(t){if(Rt.isEventKey(t,"Esc")||Rt.isEventKey(t,"Tab")){this.removeClass("vjs-hover")}};i.handleSubmenuKeyPress=function e(t){this.handleSubmenuKeyDown(t)};i.handleSubmenuKeyDown=function e(t){if(Rt.isEventKey(t,"Esc")||Rt.isEventKey(t,"Tab")){if(this.buttonPressed_){this.unpressButton()}if(!Rt.isEventKey(t,"Tab")){t.preventDefault();this.menuButton_.focus()}}};i.pressButton=function e(){if(this.enabled_){this.buttonPressed_=true;this.menu.show();this.menu.lockShowing();this.menuButton_.el_.setAttribute("aria-expanded","true");if(Qe&&S()){return}this.menu.focus()}};i.unpressButton=function e(){if(this.enabled_){this.buttonPressed_=false;this.menu.unlockShowing();this.menu.hide();this.menuButton_.el_.setAttribute("aria-expanded","false")}};i.disable=function e(){this.unpressButton();this.enabled_=false;this.addClass("vjs-disabled");this.menuButton_.disable()};i.enable=function e(){this.enabled_=true;this.removeClass("vjs-disabled");this.menuButton_.enable()};return t}(Fe);Fe.registerComponent("MenuButton",Na);var Ma=function(e){We(t,e);function t(t,r){var i;var n=r.tracks;i=e.call(this,t,r)||this;if(i.items.length<=1){i.hide()}if(!n){return Ke(i)}var a=_e(Ke(i),i.update);n.addEventListener("removetrack",a);n.addEventListener("addtrack",a);i.player_.on("ready",a);i.player_.on("dispose",function(){n.removeEventListener("removetrack",a);n.removeEventListener("addtrack",a)});return i}return t}(Na);Fe.registerComponent("TrackButton",Ma);var Ba=["Tab","Esc","Up","Down","Right","Left"];var Fa=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.selectable=r.selectable;i.isSelected_=r.selected||false;i.multiSelectable=r.multiSelectable;i.selected(i.isSelected_);if(i.selectable){if(i.multiSelectable){i.el_.setAttribute("role","menuitemcheckbox")}else{i.el_.setAttribute("role","menuitemradio")}}else{i.el_.setAttribute("role","menuitem")}return i}var r=t.prototype;r.createEl=function t(r,i,n){this.nonIconControl=true;return e.prototype.createEl.call(this,"li",h({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},i),n)};r.handleKeyDown=function t(r){if(!Ba.some(function(e){return Rt.isEventKey(r,e)})){e.prototype.handleKeyDown.call(this,r)}};r.handleClick=function e(t){this.selected(true)};r.selected=function e(t){if(this.selectable){if(t){this.addClass("vjs-selected");this.el_.setAttribute("aria-checked","true");this.controlText(", selected");this.isSelected_=true}else{this.removeClass("vjs-selected");this.el_.setAttribute("aria-checked","false");this.controlText("");this.isSelected_=false}}};return t}(zn);Fe.registerComponent("MenuItem",Fa);var Wa=function(e){We(i,e);function i(i,n){var a;var s=n.track;var o=i.textTracks();n.label=s.label||s.language||"Unknown";n.selected=s.mode==="showing";a=e.call(this,i,n)||this;a.track=s;a.kinds=(n.kinds||[n.kind||a.track.kind]).filter(Boolean);var l=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}a.handleTracksChange.apply(Ke(a),r)};var u=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}a.handleSelectedLanguageChange.apply(Ke(a),r)};i.on(["loadstart","texttrackchange"],l);o.addEventListener("change",l);o.addEventListener("selectedlanguagechange",u);a.on("dispose",function(){i.off(["loadstart","texttrackchange"],l);o.removeEventListener("change",l);o.removeEventListener("selectedlanguagechange",u)});if(o.onchange===undefined){var c;a.on(["tap","click"],function(){if(typeof t.Event!=="object"){try{c=new t.Event("change")}catch(e){}}if(!c){c=r.createEvent("Event");c.initEvent("change",true,true)}o.dispatchEvent(c)})}a.handleTracksChange();return a}var n=i.prototype;n.handleClick=function t(r){var i=this.track;var n=this.player_.textTracks();e.prototype.handleClick.call(this,r);if(!n){return}for(var a=0;a<n.length;a++){var s=n[a];if(this.kinds.indexOf(s.kind)===-1){continue}if(s===i){if(s.mode!=="showing"){s.mode="showing"}}else if(s.mode!=="disabled"){s.mode="disabled"}}};n.handleTracksChange=function e(t){var r=this.track.mode==="showing";if(r!==this.isSelected_){this.selected(r)}};n.handleSelectedLanguageChange=function e(t){if(this.track.mode==="showing"){var r=this.player_.cache_.selectedLanguage;if(r&&r.enabled&&r.language===this.track.language&&r.kind!==this.track.kind){return}this.player_.cache_.selectedLanguage={enabled:true,language:this.track.language,kind:this.track.kind}}};n.dispose=function t(){this.track=null;e.prototype.dispose.call(this)};return i}(Fa);Fe.registerComponent("TextTrackMenuItem",Wa);var Ha=function(e){We(t,e);function t(t,r){r.track={player:t,kind:r.kind,kinds:r.kinds,default:false,mode:"disabled"};if(!r.kinds){r.kinds=[r.kind]}if(r.label){r.track.label=r.label}else{r.track.label=r.kinds.join(" and ")+" off"}r.selectable=true;r.multiSelectable=false;return e.call(this,t,r)||this}var r=t.prototype;r.handleTracksChange=function e(t){var r=this.player().textTracks();var i=true;for(var n=0,a=r.length;n<a;n++){var s=r[n];if(this.options_.kinds.indexOf(s.kind)>-1&&s.mode==="showing"){i=false;break}}if(i!==this.isSelected_){this.selected(i)}};r.handleSelectedLanguageChange=function e(t){var r=this.player().textTracks();var i=true;for(var n=0,a=r.length;n<a;n++){var s=r[n];if(["captions","descriptions","subtitles"].indexOf(s.kind)>-1&&s.mode==="showing"){i=false;break}}if(i){this.player_.cache_.selectedLanguage={enabled:false}}};return t}(Wa);Fe.registerComponent("OffTextTrackMenuItem",Ha);var qa=function(e){We(t,e);function t(t,r){if(r===void 0){r={}}r.tracks=t.textTracks();return e.call(this,t,r)||this}var r=t.prototype;r.createItems=function e(t,r){if(t===void 0){t=[]}if(r===void 0){r=Wa}var i;if(this.label_){i=this.label_+" off"}t.push(new Ha(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i}));this.hideThreshold_+=1;var n=this.player_.textTracks();if(!Array.isArray(this.kinds_)){this.kinds_=[this.kind_]}for(var a=0;a<n.length;a++){var s=n[a];if(this.kinds_.indexOf(s.kind)>-1){var o=new r(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:true,multiSelectable:false});o.addClass("vjs-"+s.kind+"-menu-item");t.push(o)}}return t};return t}(Ma);Fe.registerComponent("TextTrackButton",qa);var Va=function(e){We(t,e);function t(t,r){var i;var n=r.track;var a=r.cue;var s=t.currentTime();r.selectable=true;r.multiSelectable=false;r.label=a.text;r.selected=a.startTime<=s&&s<a.endTime;i=e.call(this,t,r)||this;i.track=n;i.cue=a;n.addEventListener("cuechange",_e(Ke(i),i.update));return i}var r=t.prototype;r.handleClick=function t(r){e.prototype.handleClick.call(this);this.player_.currentTime(this.cue.startTime);this.update(this.cue.startTime)};r.update=function e(t){var r=this.cue;var i=this.player_.currentTime();this.selected(r.startTime<=i&&i<r.endTime)};return t}(Fa);Fe.registerComponent("ChaptersTrackMenuItem",Va);var Ka=function(e){We(t,e);function t(t,r,i){return e.call(this,t,r,i)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)};r.update=function t(r){if(!this.track_||r&&(r.type==="addtrack"||r.type==="removetrack")){this.setTrack(this.findChaptersTrack())}e.prototype.update.call(this)};r.setTrack=function e(t){if(this.track_===t){return}if(!this.updateHandler_){this.updateHandler_=this.update.bind(this)}if(this.track_){var r=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);if(r){r.removeEventListener("load",this.updateHandler_)}this.track_=null}this.track_=t;if(this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);if(i){i.addEventListener("load",this.updateHandler_)}}};r.findChaptersTrack=function e(){var t=this.player_.textTracks()||[];for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.kind===this.kind_){return i}}};r.getMenuCaption=function e(){if(this.track_&&this.track_.label){return this.track_.label}return this.localize(Ne(this.kind_))};r.createMenu=function t(){this.options_.title=this.getMenuCaption();return e.prototype.createMenu.call(this)};r.createItems=function e(){var t=[];if(!this.track_){return t}var r=this.track_.cues;if(!r){return t}for(var i=0,n=r.length;i<n;i++){var a=r[i];var s=new Va(this.player_,{track:this.track_,cue:a});t.push(s)}return t};return t}(qa);Ka.prototype.kind_="chapters";Ka.prototype.controlText_="Chapters";Fe.registerComponent("ChaptersButton",Ka);var za=function(e){We(t,e);function t(t,r,i){var n;n=e.call(this,t,r,i)||this;var a=t.textTracks();var s=_e(Ke(n),n.handleTracksChange);a.addEventListener("change",s);n.on("dispose",function(){a.removeEventListener("change",s)});return n}var r=t.prototype;r.handleTracksChange=function e(t){var r=this.player().textTracks();var i=false;for(var n=0,a=r.length;n<a;n++){var s=r[n];if(s.kind!==this.kind_&&s.mode==="showing"){i=true;break}}if(i){this.disable()}else{this.enable()}};r.buildCSSClass=function t(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)};return t}(qa);za.prototype.kind_="descriptions";za.prototype.controlText_="Descriptions";Fe.registerComponent("DescriptionsButton",za);var Ga=function(e){We(t,e);function t(t,r,i){return e.call(this,t,r,i)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)};return t}(qa);Ga.prototype.kind_="subtitles";Ga.prototype.controlText_="Subtitles";Fe.registerComponent("SubtitlesButton",Ga);var Ya=function(e){We(t,e);function t(t,r){var i;r.track={player:t,kind:r.kind,label:r.kind+" settings",selectable:false,default:false,mode:"disabled"};r.selectable=false;r.name="CaptionSettingsMenuItem";i=e.call(this,t,r)||this;i.addClass("vjs-texttrack-settings");i.controlText(", opens "+r.kind+" settings dialog");return i}var r=t.prototype;r.handleClick=function e(t){this.player().getChild("textTrackSettings").open()};return t}(Wa);Fe.registerComponent("CaptionSettingsMenuItem",Ya);var Xa=function(e){We(t,e);function t(t,r,i){return e.call(this,t,r,i)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)};r.createItems=function t(){var r=[];if(!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")){r.push(new Ya(this.player_,{kind:this.kind_}));this.hideThreshold_+=1}return e.prototype.createItems.call(this,r)};return t}(qa);Xa.prototype.kind_="captions";Xa.prototype.controlText_="Captions";Fe.registerComponent("CaptionsButton",Xa);var $a=function(e){We(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(r,i,n){var a='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);if(this.options_.track.kind==="captions"){a+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n      "}a+="</span>";var s=e.prototype.createEl.call(this,r,h({innerHTML:a},i),n);return s};return t}(Wa);Fe.registerComponent("SubsCapsMenuItem",$a);var Ja=function(e){We(t,e);function t(t,r){var i;if(r===void 0){r={}}i=e.call(this,t,r)||this;i.label_="subtitles";if(["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1){i.label_="captions"}i.menuButton_.controlText(Ne(i.label_));return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)};r.createItems=function t(){var r=[];if(!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")){r.push(new Ya(this.player_,{kind:this.label_}));this.hideThreshold_+=1}r=e.prototype.createItems.call(this,r,$a);return r};return t}(qa);Ja.prototype.kinds_=["captions","subtitles"];Ja.prototype.controlText_="Subtitles";Fe.registerComponent("SubsCapsButton",Ja);var Qa=function(e){We(t,e);function t(t,r){var i;var n=r.track;var a=t.audioTracks();r.label=n.label||n.language||"Unknown";r.selected=n.enabled;i=e.call(this,t,r)||this;i.track=n;i.addClass("vjs-"+n.kind+"-menu-item");var s=function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}i.handleTracksChange.apply(Ke(i),r)};a.addEventListener("change",s);i.on("dispose",function(){a.removeEventListener("change",s)});return i}var r=t.prototype;r.createEl=function t(r,i,n){var a='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);if(this.options_.track.kind==="main-desc"){a+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n      "}a+="</span>";var s=e.prototype.createEl.call(this,r,h({innerHTML:a},i),n);return s};r.handleClick=function t(r){var i=this.player_.audioTracks();e.prototype.handleClick.call(this,r);for(var n=0;n<i.length;n++){var a=i[n];a.enabled=a===this.track}};r.handleTracksChange=function e(t){this.selected(this.track.enabled)};return t}(Fa);Fe.registerComponent("AudioTrackMenuItem",Qa);var Za=function(e){We(t,e);function t(t,r){if(r===void 0){r={}}r.tracks=t.audioTracks();return e.call(this,t,r)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)};r.createItems=function e(t){if(t===void 0){t=[]}this.hideThreshold_=1;var r=this.player_.audioTracks();for(var i=0;i<r.length;i++){var n=r[i];t.push(new Qa(this.player_,{track:n,selectable:true,multiSelectable:false}))}return t};return t}(Ma);Za.prototype.controlText_="Audio Track";Fe.registerComponent("AudioTrackButton",Za);var es=function(e){We(t,e);function t(t,r){var i;var n=r.rate;var a=parseFloat(n,10);r.label=n;r.selected=a===1;r.selectable=true;r.multiSelectable=false;i=e.call(this,t,r)||this;i.label=n;i.rate=a;i.on(t,"ratechange",i.update);return i}var r=t.prototype;r.handleClick=function t(r){e.prototype.handleClick.call(this);this.player().playbackRate(this.rate)};r.update=function e(t){this.selected(this.player().playbackRate()===this.rate)};return t}(Fa);es.prototype.contentElType="button";Fe.registerComponent("PlaybackRateMenuItem",es);var ts=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.updateVisibility();i.updateLabel();i.on(t,"loadstart",i.updateVisibility);i.on(t,"ratechange",i.updateLabel);return i}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this);this.labelEl_=j("div",{className:"vjs-playback-rate-value",innerHTML:"1x"});r.appendChild(this.labelEl_);return r};r.dispose=function t(){this.labelEl_=null;e.prototype.dispose.call(this)};r.buildCSSClass=function t(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)};r.createMenu=function e(){var t=new Ua(this.player());var r=this.playbackRates();if(r){for(var i=r.length-1;i>=0;i--){t.addChild(new es(this.player(),{rate:r[i]+"x"}))}}return t};r.updateARIAAttributes=function e(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())};r.handleClick=function e(t){var r=this.player().playbackRate();var i=this.playbackRates();var n=i[0];for(var a=0;a<i.length;a++){if(i[a]>r){n=i[a];break}}this.player().playbackRate(n)};r.playbackRates=function e(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates};r.playbackRateSupported=function e(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0};r.updateVisibility=function e(t){if(this.playbackRateSupported()){this.removeClass("vjs-hidden")}else{this.addClass("vjs-hidden")}};r.updateLabel=function e(t){if(this.playbackRateSupported()){this.labelEl_.innerHTML=this.player().playbackRate()+"x"}};return t}(Na);ts.prototype.controlText_="Playback Rate";Fe.registerComponent("PlaybackRateMenuButton",ts);var rs=function(e){We(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)};r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})};return t}(Fe);Fe.registerComponent("Spacer",rs);var is=function(e){We(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)};r.createEl=function t(){var r=e.prototype.createEl.call(this,{className:this.buildCSSClass()});r.innerHTML="\xa0";return r};return t}(rs);Fe.registerComponent("CustomControlSpacer",is);var ns=function(e){We(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})};return t}(Fe);ns.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]};if("exitPictureInPicture"in r){ns.prototype.options_.children.splice(ns.prototype.options_.children.length-1,0,"pictureInPictureToggle")}Fe.registerComponent("ControlBar",ns);var as=function(e){We(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on(t,"error",i.open);return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)};r.content=function e(){var t=this.player().error();return t?this.localize(t.message):""};return t}(Ht);as.prototype.options_=Be(Ht.prototype.options_,{pauseOnOpen:false,fillAlways:true,temporary:false,uncloseable:true});Fe.registerComponent("ErrorDisplay",as);var ss="vjs-text-track-settings";var os=["#000","Black"];var ls=["#00F","Blue"];var us=["#0FF","Cyan"];var cs=["#0F0","Green"];var ds=["#F0F","Magenta"];var fs=["#F00","Red"];var hs=["#FFF","White"];var ps=["#FF0","Yellow"];var vs=["1","Opaque"];var ms=["0.5","Semi-Transparent"];var gs=["0","Transparent"];var ys={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[os,hs,fs,cs,ls,ps,ds,us]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[vs,ms,gs]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[hs,os,fs,cs,ls,ps,ds,us]},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(t){return t==="1.00"?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[vs,ms]},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:[gs,ms,vs]}};ys.windowColor.options=ys.backgroundColor.options;function _s(e,t){if(t){e=t(e)}if(e&&e!=="none"){return e}}function bs(e,t){var r=e.options[e.options.selectedIndex].value;return _s(r,t)}function Ts(e,t,r){if(!t){return}for(var i=0;i<e.options.length;i++){if(_s(e.options[i].value,r)===t){e.selectedIndex=i;break}}}var Ss=function(e){We(r,e);function r(t,r){var i;r.temporary=false;i=e.call(this,t,r)||this;i.updateDisplay=_e(Ke(i),i.updateDisplay);i.fill();i.hasBeenOpened_=i.hasBeenFilled_=true;i.endDialog=j("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")});i.el().appendChild(i.endDialog);i.setDefaults();if(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()});d(ys,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)});if(i.options_.persistTextTrackSettings){i.restoreSettings()}return i}var i=r.prototype;i.dispose=function t(){this.endDialog=null;e.prototype.dispose.call(this)};i.createElSelect_=function e(t,r,i){var n=this;if(r===void 0){r=""}if(i===void 0){i="label"}var a=ys[t];var s=a.id.replace("%s",this.id_);var o=[r,s].join(" ").trim();return["<"+i+' id="'+s+'" class="'+(i==="label"?"vjs-label":"")+'">',this.localize(a.label),"</"+i+">",'<select aria-labelledby="'+o+'">'].concat(a.options.map(function(e){var t=s+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+o+" "+t+'">',n.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")};i.createElFgColor_=function e(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")};i.createElBgColor_=function e(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")};i.createElWinColor_=function e(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")};i.createElColors_=function e(){return j("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})};i.createElFont_=function e(){return j("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("")})};i.createElControls_=function e(){var t=this.localize("restore all settings to the default values");return j("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})};i.content=function e(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]};i.label=function e(){return this.localize("Caption Settings Dialog")};i.description=function e(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")};i.buildCSSClass=function t(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"};i.getValues=function e(){var t=this;return f(ys,function(e,r,i){var n=bs(t.$(r.selector),r.parser);if(n!==undefined){e[i]=n}return e},{})};i.setValues=function e(t){var r=this;d(ys,function(e,i){Ts(r.$(e.selector),t[i],e.parser)})};i.setDefaults=function e(){var t=this;d(ys,function(e){var r=e.hasOwnProperty("default")?e["default"]:0;t.$(e.selector).selectedIndex=r})};i.restoreSettings=function e(){var r;try{r=JSON.parse(t.localStorage.getItem(ss))}catch(e){o.warn(e)}if(r){this.setValues(r)}};i.saveSettings=function e(){if(!this.options_.persistTextTrackSettings){return}var r=this.getValues();try{if(Object.keys(r).length){t.localStorage.setItem(ss,JSON.stringify(r))}else{t.localStorage.removeItem(ss)}}catch(e){o.warn(e)}};i.updateDisplay=function e(){var t=this.player_.getChild("textTrackDisplay");if(t){t.updateDisplay()}};i.conditionalBlur_=function e(){this.previouslyActiveEl_=null;var t=this.player_.controlBar;var r=t&&t.subsCapsButton;var i=t&&t.captionsButton;if(r){r.focus()}else if(i){i.focus()}};return r}(Ht);Fe.registerComponent("TextTrackSettings",Ss);var ks=function(e){We(r,e);function r(r,i){var n;var a=i.ResizeObserver||t.ResizeObserver;if(i.ResizeObserver===null){a=false}var s=Be({createEl:!a,reportTouchActivity:false},i);n=e.call(this,r,s)||this;n.ResizeObserver=i.ResizeObserver||t.ResizeObserver;n.loadListener_=null;n.resizeObserver_=null;n.debouncedHandler_=Te(function(){n.resizeHandler()},100,false,Ke(n));if(a){n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_);n.resizeObserver_.observe(r.el())}else{n.loadListener_=function(){if(!n.el_||!n.el_.contentWindow){return}var e=n.debouncedHandler_;var t=n.unloadListener_=function(){he(this,"resize",e);he(this,"unload",t);t=null};fe(n.el_.contentWindow,"unload",t);fe(n.el_.contentWindow,"resize",e)};n.one("load",n.loadListener_)}return n}var i=r.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})};i.resizeHandler=function e(){if(!this.player_||!this.player_.trigger){return}this.player_.trigger("playerresize")};i.dispose=function t(){if(this.debouncedHandler_){this.debouncedHandler_.cancel()}if(this.resizeObserver_){if(this.player_.el()){this.resizeObserver_.unobserve(this.player_.el())}this.resizeObserver_.disconnect()}if(this.loadListener_){this.off("load",this.loadListener_)}if(this.el_&&this.el_.contentWindow&&this.unloadListener_){this.unloadListener_.call(this.el_.contentWindow)}this.ResizeObserver=null;this.resizeObserver=null;this.debouncedHandler_=null;this.loadListener_=null;e.prototype.dispose.call(this)};return r}(Fe);Fe.registerComponent("ResizeManager",ks);var js=function e(t){var r=Math.floor(t.length/2);var i=[].concat(t).sort(function(e,t){return e-t});return t.length%2!==0?i[r]:(i[r-1]+i[r])/2};var Es=function(e){We(t,e);function t(t,i){var n;var a=Be({createEl:false},i);n=e.call(this,t,a)||this;n.reset_();n.on(n.player_,"durationchange",n.handleDurationchange);if(ot&&"hidden"in r&&"visibilityState"in r){n.on(r,"visibilitychange",n.handleVisibilityChange)}return n}var i=t.prototype;i.handleVisibilityChange=function e(){if(this.player_.duration()!==Infinity){return}if(r.hidden){this.stopTracking()}else{this.startTracking()}};i.isBehind_=function e(){if(!this.timeupdateSeen_){return false}var t=this.liveCurrentTime();var r=this.player_.currentTime();var i=this.seekableIncrement_*2+.07;return t!==Infinity&&t-i>=r};i.trackLive_=function e(){this.pastSeekEnd_=this.pastSeekEnd_;var t=this.player_.seekable();if(!t||!t.length){return}var r=this.seekableEnd();if(r!==this.lastSeekEnd_){if(this.lastSeekEnd_){this.seekableIncrementList_=this.seekableIncrementList_.slice(-11);this.seekableIncrementList_.push(Math.abs(r-this.lastSeekEnd_));if(this.seekableIncrementList_.length>3){this.seekableIncrement_=js(this.seekableIncrementList_)}}this.pastSeekEnd_=0;this.lastSeekEnd_=r;this.trigger("seekableendchange")}this.pastSeekEnd_=this.pastSeekEnd()+.03;if(this.isBehind_()!==this.behindLiveEdge()){this.behindLiveEdge_=this.isBehind_();this.trigger("liveedgechange")}};i.handleDurationchange=function e(){if(this.player_.duration()===Infinity){this.startTracking()}else{this.stopTracking()}};i.startTracking=function e(){var t=this;if(this.isTracking()){return}if(!this.timeupdateSeen_){this.timeupdateSeen_=this.player_.hasStarted()}this.trackingInterval_=this.setInterval(this.trackLive_,30);this.trackLive_();this.on(this.player_,"play",this.trackLive_);this.on(this.player_,"pause",this.trackLive_);if(!this.timeupdateSeen_){this.one(this.player_,"play",this.handlePlay);this.handleTimeupdate=function(){t.timeupdateSeen_=true;t.handleTimeupdate=null};this.one(this.player_,"timeupdate",this.handleTimeupdate)}};i.handlePlay=function e(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)};i.reset_=function e(){this.pastSeekEnd_=0;this.lastSeekEnd_=null;this.behindLiveEdge_=null;this.timeupdateSeen_=false;this.clearInterval(this.trackingInterval_);this.trackingInterval_=null;this.seekableIncrement_=12;this.seekableIncrementList_=[];this.off(this.player_,"play",this.trackLive_);this.off(this.player_,"pause",this.trackLive_);this.off(this.player_,"play",this.handlePlay);this.off(this.player_,"timeupdate",this.seekToLiveEdge);if(this.handleTimeupdate){this.off(this.player_,"timeupdate",this.handleTimeupdate);this.handleTimeupdate=null}};i.stopTracking=function e(){if(!this.isTracking()){return}this.reset_()};i.seekableEnd=function e(){var t=this.player_.seekable();var r=[];var i=t?t.length:0;while(i--){r.push(t.end(i))}return r.length?r.sort()[r.length-1]:Infinity};i.seekableStart=function e(){var t=this.player_.seekable();var r=[];var i=t?t.length:0;while(i--){r.push(t.start(i))}return r.length?r.sort()[0]:0};i.liveWindow=function e(){var t=this.liveCurrentTime();if(t===Infinity){return Infinity}return t-this.seekableStart()};i.isLive=function e(){return this.isTracking()};i.atLiveEdge=function e(){return!this.behindLiveEdge()};i.liveCurrentTime=function e(){return this.pastSeekEnd()+this.seekableEnd()};i.pastSeekEnd=function e(){return this.pastSeekEnd_};i.behindLiveEdge=function e(){return this.behindLiveEdge_};i.isTracking=function e(){return typeof this.trackingInterval_==="number"};i.seekToLiveEdge=function e(){if(this.atLiveEdge()){return}this.player_.currentTime(this.liveCurrentTime());if(this.player_.paused()){this.player_.play()}};i.dispose=function t(){this.stopTracking();e.prototype.dispose.call(this)};return t}(Fe);Fe.registerComponent("LiveTracker",Es);var ws=function e(t){var r=t.el();if(r.hasAttribute("src")){t.triggerSourceset(r.src);return true}var i=t.$$("source");var n=[];var a="";if(!i.length){return false}for(var s=0;s<i.length;s++){var o=i[s].src;if(o&&n.indexOf(o)===-1){n.push(o)}}if(!n.length){return false}if(n.length===1){a=n[0]}t.triggerSourceset(a);return true};var Cs=Object.defineProperty({},"innerHTML",{get:function e(){return this.cloneNode(true).innerHTML},set:function e(i){var n=r.createElement(this.nodeName.toLowerCase());n.innerHTML=i;var a=r.createDocumentFragment();while(n.childNodes.length){a.appendChild(n.childNodes[0])}this.innerText="";t.Element.prototype.appendChild.call(this,a);return this.innerHTML}});var As=function e(t,r){var i={};for(var n=0;n<t.length;n++){i=Object.getOwnPropertyDescriptor(t[n],r);if(i&&i.set&&i.get){break}}i.enumerable=true;i.configurable=true;return i};var Is=function e(r){return As([r.el(),t.HTMLMediaElement.prototype,t.Element.prototype,Cs],"innerHTML")};var xs=function e(t){var r=t.el();if(r.resetSourceWatch_){return}var i={};var n=Is(t);var a=function e(i){return function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++){n[a]=arguments[a]}var s=i.apply(r,n);ws(t);return s}};["append","appendChild","insertAdjacentHTML"].forEach(function(e){if(!r[e]){return}i[e]=r[e];r[e]=a(i[e])});Object.defineProperty(r,"innerHTML",Be(n,{set:a(n.set)}));r.resetSourceWatch_=function(){r.resetSourceWatch_=null;Object.keys(i).forEach(function(e){r[e]=i[e]});Object.defineProperty(r,"innerHTML",n)};t.one("sourceset",r.resetSourceWatch_)};var Ps=Object.defineProperty({},"src",{get:function e(){if(this.hasAttribute("src")){return nr(t.Element.prototype.getAttribute.call(this,"src"))}return""},set:function e(r){t.Element.prototype.setAttribute.call(this,"src",r);return r}});var Os=function e(r){return As([r.el(),t.HTMLMediaElement.prototype,Ps],"src")};var Ds=function e(t){if(!t.featuresSourceset){return}var r=t.el();if(r.resetSourceset_){return}var i=Os(t);var n=r.setAttribute;var a=r.load;Object.defineProperty(r,"src",Be(i,{set:function e(n){var a=i.set.call(r,n);t.triggerSourceset(r.src);return a}}));r.setAttribute=function(e,i){var a=n.call(r,e,i);if(/src/i.test(e)){t.triggerSourceset(r.src)}return a};r.load=function(){var e=a.call(r);if(!ws(t)){t.triggerSourceset("");xs(t)}return e};if(r.currentSrc){t.triggerSourceset(r.currentSrc)}else if(!ws(t)){xs(t)}r.resetSourceset_=function(){r.resetSourceset_=null;r.load=a;r.setAttribute=n;Object.defineProperty(r,"src",i);if(r.resetSourceWatch_){r.resetSourceWatch_()}}};var Ls=function(e){We(i,e);function i(t,r){var i;i=e.call(this,t,r)||this;var n=t.source;var a=false;if(n&&(i.el_.currentSrc!==n.src||t.tag&&t.tag.initNetworkState_===3)){i.setSource(n)}else{i.handleLateInit_(i.el_)}if(t.enableSourceset){i.setupSourcesetHandling_()}if(i.el_.hasChildNodes()){var s=i.el_.childNodes;var l=s.length;var u=[];while(l--){var c=s[l];var d=c.nodeName.toLowerCase();if(d==="track"){if(!i.featuresNativeTextTracks){u.push(c)}else{i.remoteTextTrackEls().addTrackElement_(c);i.remoteTextTracks().addTrack(c.track);i.textTracks().addTrack(c.track);if(!a&&!i.el_.hasAttribute("crossorigin")&&sr(c.src)){a=true}}}}for(var f=0;f<u.length;f++){i.el_.removeChild(u[f])}}i.proxyNativeTracks_();if(i.featuresNativeTextTracks&&a){o.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n"+"This may prevent text tracks from loading.")}i.restoreMetadataTracksInIOSNativePlayer_();if((dt||$e||rt)&&t.nativeControlsForTouch===true){i.setControls(true)}i.proxyWebkitFullscreen_();i.triggerReady();return i}var n=i.prototype;n.dispose=function t(){if(this.el_&&this.el_.resetSourceset_){this.el_.resetSourceset_()}i.disposeMediaElement(this.el_);this.options_=null;e.prototype.dispose.call(this)};n.setupSourcesetHandling_=function e(){Ds(this)};n.restoreMetadataTracksInIOSNativePlayer_=function e(){var t=this.textTracks();var r;var i=function e(){r=[];for(var i=0;i<t.length;i++){var n=t[i];if(n.kind==="metadata"){r.push({track:n,storedMode:n.mode})}}};i();t.addEventListener("change",i);this.on("dispose",function(){return t.removeEventListener("change",i)});var n=function e(){for(var i=0;i<r.length;i++){var n=r[i];if(n.track.mode==="disabled"&&n.track.mode!==n.storedMode){n.track.mode=n.storedMode}}t.removeEventListener("change",e)};this.on("webkitbeginfullscreen",function(){t.removeEventListener("change",i);t.removeEventListener("change",n);t.addEventListener("change",n)});this.on("webkitendfullscreen",function(){t.removeEventListener("change",i);t.addEventListener("change",i);t.removeEventListener("change",n)})};n.overrideNative_=function e(t,r){var i=this;if(r!==this["featuresNative"+t+"Tracks"]){return}var n=t.toLowerCase();if(this[n+"TracksListeners_"]){Object.keys(this[n+"TracksListeners_"]).forEach(function(e){var t=i.el()[n+"Tracks"];t.removeEventListener(e,i[n+"TracksListeners_"][e])})}this["featuresNative"+t+"Tracks"]=!r;this[n+"TracksListeners_"]=null;this.proxyNativeTracksForType_(n)};n.overrideNativeAudioTracks=function e(t){this.overrideNative_("Audio",t)};n.overrideNativeVideoTracks=function e(t){this.overrideNative_("Video",t)};n.proxyNativeTracksForType_=function e(t){var r=this;var i=gn[t];var n=this.el()[i.getterName];var a=this[i.getterName]();if(!this["featuresNative"+i.capitalName+"Tracks"]||!n||!n.addEventListener){return}var s={change:function e(t){a.trigger({type:"change",target:a,currentTarget:a,srcElement:a})},addtrack:function e(t){a.addTrack(t.track)},removetrack:function e(t){a.removeTrack(t.track)}};var o=function e(){var t=[];for(var r=0;r<a.length;r++){var i=false;for(var s=0;s<n.length;s++){if(n[s]===a[r]){i=true;break}}if(!i){t.push(a[r])}}while(t.length){a.removeTrack(t.shift())}};this[i.getterName+"Listeners_"]=s;Object.keys(s).forEach(function(e){var t=s[e];n.addEventListener(e,t);r.on("dispose",function(r){return n.removeEventListener(e,t)})});this.on("loadstart",o);this.on("dispose",function(e){return r.off("loadstart",o)})};n.proxyNativeTracks_=function e(){var t=this;gn.names.forEach(function(e){t.proxyNativeTracksForType_(e)})};n.createEl=function e(){var t=this.options_.tag;if(!t||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(t){var n=t.cloneNode(true);if(t.parentNode){t.parentNode.insertBefore(n,t)}i.disposeMediaElement(t);t=n}else{t=r.createElement("video");var a=this.options_.tag&&O(this.options_.tag);var s=Be({},a);if(!dt||this.options_.nativeControlsForTouch!==true){delete s.controls}P(t,h(s,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}if(typeof this.options_.preload!=="undefined"){L(t,"preload",this.options_.preload)}var o=["loop","muted","playsinline","autoplay"];for(var l=0;l<o.length;l++){var u=o[l];var c=this.options_[u];if(typeof c!=="undefined"){if(c){L(t,u,u)}else{R(t,u)}t[u]=c}}return t};n.handleLateInit_=function e(t){if(t.networkState===0||t.networkState===3){return}if(t.readyState===0){var r=false;var i=function e(){r=true};this.on("loadstart",i);var n=function e(){if(!r){this.trigger("loadstart")}};this.on("loadedmetadata",n);this.ready(function(){this.off("loadstart",i);this.off("loadedmetadata",n);if(!r){this.trigger("loadstart")}});return}var a=["loadstart"];a.push("loadedmetadata");if(t.readyState>=2){a.push("loadeddata")}if(t.readyState>=3){a.push("canplay")}if(t.readyState>=4){a.push("canplaythrough")}this.ready(function(){a.forEach(function(e){this.trigger(e)},this)})};n.setCurrentTime=function e(t){try{this.el_.currentTime=t}catch(e){o(e,"Video is not ready. (Video.js)")}};n.duration=function e(){var t=this;if(this.el_.duration===Infinity&&et&&at&&this.el_.currentTime===0){var r=function e(){if(t.el_.currentTime>0){if(t.el_.duration===Infinity){t.trigger("durationchange")}t.off("timeupdate",e)}};this.on("timeupdate",r);return NaN}return this.el_.duration||NaN};n.width=function e(){return this.el_.offsetWidth};n.height=function e(){return this.el_.offsetHeight};n.proxyWebkitFullscreen_=function e(){var t=this;if(!("webkitDisplayingFullscreen"in this.el_)){return}var r=function e(){this.trigger("fullscreenchange",{isFullscreen:false})};var i=function e(){if("webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"){this.one("webkitendfullscreen",r);this.trigger("fullscreenchange",{isFullscreen:true})}};this.on("webkitbeginfullscreen",i);this.on("dispose",function(){t.off("webkitbeginfullscreen",i);t.off("webkitendfullscreen",r)})};n.supportsFullScreen=function e(){if(typeof this.el_.webkitEnterFullScreen==="function"){var r=t.navigator&&t.navigator.userAgent||"";if(/Android/.test(r)||!/Chrome|Mac OS X 10.5/.test(r)){return true}}return false};n.enterFullScreen=function e(){var t=this.el_;if(t.paused&&t.networkState<=t.HAVE_METADATA){this.el_.play();this.setTimeout(function(){t.pause();t.webkitEnterFullScreen()},0)}else{t.webkitEnterFullScreen()}};n.exitFullScreen=function e(){this.el_.webkitExitFullScreen()};n.requestPictureInPicture=function e(){return this.el_.requestPictureInPicture()};n.src=function e(t){if(t===undefined){return this.el_.src}this.setSrc(t)};n.reset=function e(){i.resetMediaElement(this.el_)};n.currentSrc=function e(){if(this.currentSource_){return this.currentSource_.src}return this.el_.currentSrc};n.setControls=function e(t){this.el_.controls=!!t};n.addTextTrack=function t(r,i,n){if(!this.featuresNativeTextTracks){return e.prototype.addTextTrack.call(this,r,i,n)}return this.el_.addTextTrack(r,i,n)};n.createRemoteTextTrack=function t(i){if(!this.featuresNativeTextTracks){return e.prototype.createRemoteTextTrack.call(this,i)}var n=r.createElement("track");if(i.kind){n.kind=i.kind}if(i.label){n.label=i.label}if(i.language||i.srclang){n.srclang=i.language||i.srclang}if(i["default"]){n["default"]=i["default"]}if(i.id){n.id=i.id}if(i.src){n.src=i.src}return n};n.addRemoteTextTrack=function t(r,i){var n=e.prototype.addRemoteTextTrack.call(this,r,i);if(this.featuresNativeTextTracks){this.el().appendChild(n)}return n};n.removeRemoteTextTrack=function t(r){e.prototype.removeRemoteTextTrack.call(this,r);if(this.featuresNativeTextTracks){var i=this.$$("track");var n=i.length;while(n--){if(r===i[n]||r===i[n].track){this.el().removeChild(i[n])}}}};n.getVideoPlaybackQuality=function e(){if(typeof this.el().getVideoPlaybackQuality==="function"){return this.el().getVideoPlaybackQuality()}var r={};if(typeof this.el().webkitDroppedFrameCount!=="undefined"&&typeof this.el().webkitDecodedFrameCount!=="undefined"){r.droppedVideoFrames=this.el().webkitDroppedFrameCount;r.totalVideoFrames=this.el().webkitDecodedFrameCount}if(t.performance&&typeof t.performance.now==="function"){r.creationTime=t.performance.now()}else if(t.performance&&t.performance.timing&&typeof t.performance.timing.navigationStart==="number"){r.creationTime=t.Date.now()-t.performance.timing.navigationStart}return r};return i}(Sn);if(b()){Ls.TEST_VID=r.createElement("video");var Rs=r.createElement("track");Rs.kind="captions";Rs.srclang="en";Rs.label="English";Ls.TEST_VID.appendChild(Rs)}Ls.isSupported=function(){try{Ls.TEST_VID.volume=.5}catch(e){return false}return!!(Ls.TEST_VID&&Ls.TEST_VID.canPlayType)};Ls.canPlayType=function(e){return Ls.TEST_VID.canPlayType(e)};Ls.canPlaySource=function(e,t){return Ls.canPlayType(e.type)};Ls.canControlVolume=function(){try{var e=Ls.TEST_VID.volume;Ls.TEST_VID.volume=e/2+.1;return e!==Ls.TEST_VID.volume}catch(e){return false}};Ls.canMuteVolume=function(){try{var e=Ls.TEST_VID.muted;Ls.TEST_VID.muted=!e;if(Ls.TEST_VID.muted){L(Ls.TEST_VID,"muted","muted")}else{R(Ls.TEST_VID,"muted","muted")}return e!==Ls.TEST_VID.muted}catch(e){return false}};Ls.canControlPlaybackRate=function(){if(et&&at&&st<58){return false}try{var e=Ls.TEST_VID.playbackRate;Ls.TEST_VID.playbackRate=e/2+.1;return e!==Ls.TEST_VID.playbackRate}catch(e){return false}};Ls.canOverrideAttributes=function(){try{var e=function e(){};Object.defineProperty(r.createElement("video"),"src",{get:e,set:e});Object.defineProperty(r.createElement("audio"),"src",{get:e,set:e});Object.defineProperty(r.createElement("video"),"innerHTML",{get:e,set:e});Object.defineProperty(r.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return false}return true};Ls.supportsNativeTextTracks=function(){return ut||Qe&&at};Ls.supportsNativeVideoTracks=function(){return!!(Ls.TEST_VID&&Ls.TEST_VID.videoTracks)};Ls.supportsNativeAudioTracks=function(){return!!(Ls.TEST_VID&&Ls.TEST_VID.audioTracks)};Ls.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];Ls.prototype.featuresVolumeControl=Ls.canControlVolume();Ls.prototype.featuresMuteControl=Ls.canMuteVolume();Ls.prototype.featuresPlaybackRate=Ls.canControlPlaybackRate();Ls.prototype.featuresSourceset=Ls.canOverrideAttributes();Ls.prototype.movingMediaElementInDOM=!Qe;Ls.prototype.featuresFullscreenResize=true;Ls.prototype.featuresProgressEvents=true;Ls.prototype.featuresTimeupdateEvents=true;Ls.prototype.featuresNativeTextTracks=Ls.supportsNativeTextTracks();Ls.prototype.featuresNativeVideoTracks=Ls.supportsNativeVideoTracks();Ls.prototype.featuresNativeAudioTracks=Ls.supportsNativeAudioTracks();var Us=Ls.TEST_VID&&Ls.TEST_VID.constructor.prototype.canPlayType;var Ns=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;Ls.patchCanPlayType=function(){if(tt>=4&&!it&&!at){Ls.TEST_VID.constructor.prototype.canPlayType=function(e){if(e&&Ns.test(e)){return"maybe"}return Us.call(this,e)}}};Ls.unpatchCanPlayType=function(){var e=Ls.TEST_VID.constructor.prototype.canPlayType;Ls.TEST_VID.constructor.prototype.canPlayType=Us;return e};Ls.patchCanPlayType();Ls.disposeMediaElement=function(e){if(!e){return}if(e.parentNode){e.parentNode.removeChild(e)}while(e.hasChildNodes()){e.removeChild(e.firstChild)}e.removeAttribute("src");if(typeof e.load==="function"){(function(){try{e.load()}catch(e){}})()}};Ls.resetMediaElement=function(e){if(!e){return}var t=e.querySelectorAll("source");var r=t.length;while(r--){e.removeChild(t[r])}e.removeAttribute("src");if(typeof e.load==="function"){(function(){try{e.load()}catch(e){}})()}};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){Ls.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){Ls.prototype["set"+Ne(e)]=function(t){this.el_[e]=t;if(t){this.el_.setAttribute(e,e)}else{this.el_.removeAttribute(e)}}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(e){Ls.prototype[e]=function(){return this.el_[e]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){Ls.prototype["set"+Ne(e)]=function(t){this.el_[e]=t}});["pause","load","play"].forEach(function(e){Ls.prototype[e]=function(){return this.el_[e]()}});Sn.withSourceHandlers(Ls);Ls.nativeSourceHandler={};Ls.nativeSourceHandler.canPlayType=function(e){try{return Ls.TEST_VID.canPlayType(e)}catch(e){return""}};Ls.nativeSourceHandler.canHandleSource=function(e,t){if(e.type){return Ls.nativeSourceHandler.canPlayType(e.type)}else if(e.src){var r=ar(e.src);return Ls.nativeSourceHandler.canPlayType("video/"+r)}return""};Ls.nativeSourceHandler.handleSource=function(e,t,r){t.setSrc(e.src)};Ls.nativeSourceHandler.dispose=function(){};Ls.registerSourceHandler(Ls.nativeSourceHandler);Sn.registerTech("Html5",Ls);var Ms=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"];var Bs={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"};var Fs=["tiny","xsmall","small","medium","large","xlarge","huge"];var Ws={};Fs.forEach(function(e){var t=e.charAt(0)==="x"?"x-"+e.substring(1):e;Ws[e]="vjs-layout-"+t});var Hs={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:Infinity};var qs=function(e){We(n,e);function n(t,r,a){var s;t.id=t.id||r.id||"vjs_video_"+se();r=h(n.getTagSettings(t),r);r.initChildren=false;r.createEl=false;r.evented=false;r.reportTouchActivity=false;if(!r.language){if(typeof t.closest==="function"){var o=t.closest("[lang]");if(o&&o.getAttribute){r.language=o.getAttribute("lang")}}else{var u=t;while(u&&u.nodeType===1){if(O(u).hasOwnProperty("lang")){r.language=u.getAttribute("lang");break}u=u.parentNode}}}s=e.call(this,null,r,a)||this;s.boundDocumentFullscreenChange_=_e(Ke(s),s.documentFullscreenChange_);s.boundFullWindowOnEscKey_=_e(Ke(s),s.fullWindowOnEscKey);s.log=l(s.id_);s.fsApi_=yt;s.isPosterFromTech_=false;s.queuedCallbacks_=[];s.isReady_=false;s.hasStarted_=false;s.userActive_=false;if(!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?")}s.tag=t;s.tagAttributes=t&&O(t);s.language(s.options_.language);if(r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach(function(e){c[e.toLowerCase()]=r.languages[e]});s.languages_=c}else{s.languages_=n.prototype.options_.languages}s.resetCache_();s.poster_=r.poster||"";s.controls_=!!r.controls;t.controls=false;t.removeAttribute("controls");s.changingSrc_=false;s.playCallbacks_=[];s.playTerminatedQueue_=[];if(t.hasAttribute("autoplay")){s.autoplay(true)}else{s.autoplay(s.options_.autoplay)}if(r.plugins){Object.keys(r.plugins).forEach(function(e){if(typeof s[e]!=="function"){throw new Error('plugin "'+e+'" does not exist')}})}s.scrubbing_=false;s.el_=s.createEl();De(Ke(s),{eventBusKey:"el_"});if(s.fluid_){s.on("playerreset",s.updateStyleEl_)}var d=Be(s.options_);if(r.plugins){Object.keys(r.plugins).forEach(function(e){s[e](r.plugins[e])})}s.options_.playerOptions=d;s.middleware_=[];s.initChildren();s.isAudio(t.nodeName.toLowerCase()==="audio");if(s.controls()){s.addClass("vjs-controls-enabled")}else{s.addClass("vjs-controls-disabled")}s.el_.setAttribute("role","region");if(s.isAudio()){s.el_.setAttribute("aria-label",s.localize("Audio Player"))}else{s.el_.setAttribute("aria-label",s.localize("Video Player"))}if(s.isAudio()){s.addClass("vjs-audio")}if(s.flexNotSupported_()){s.addClass("vjs-no-flex")}if(dt){s.addClass("vjs-touch-enabled")}if(!Qe){s.addClass("vjs-workinghover")}n.players[s.id_]=Ke(s);var f=i.split(".")[0];s.addClass("vjs-v"+f);s.userActive(true);s.reportUserActivity();s.one("play",s.listenForUserActivity_);s.on("stageclick",s.handleStageClick_);s.on("keydown",s.handleKeyDown);s.breakpoints(s.options_.breakpoints);s.responsive(s.options_.responsive);return s}var a=n.prototype;a.dispose=function t(){var i=this;this.trigger("dispose");this.off("dispose");he(r,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_);he(r,"keydown",this.boundFullWindowOnEscKey_);if(this.styleEl_&&this.styleEl_.parentNode){this.styleEl_.parentNode.removeChild(this.styleEl_);this.styleEl_=null}n.players[this.id_]=null;if(this.tag&&this.tag.player){this.tag.player=null}if(this.el_&&this.el_.player){this.el_.player=null}if(this.tech_){this.tech_.dispose();this.isPosterFromTech_=false;this.poster_=""}if(this.playerElIngest_){this.playerElIngest_=null}if(this.tag){this.tag=null}Nn(this);_n.names.forEach(function(e){var t=_n[e];var r=i[t.getterName]();if(r&&r.off){r.off()}});e.prototype.dispose.call(this)};a.createEl=function i(){var n=this.tag;var a;var s=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player");var o=this.tag.tagName.toLowerCase()==="video-js";if(s){a=this.el_=n.parentNode}else if(!o){a=this.el_=e.prototype.createEl.call(this,"div")}var l=O(n);if(o){a=this.el_=n;n=this.tag=r.createElement("video");while(a.children.length){n.appendChild(a.firstChild)}if(!C(a,"video-js")){A(a,"video-js")}a.appendChild(n);s=this.playerElIngest_=a;Object.keys(a).forEach(function(e){n[e]=a[e]})}n.setAttribute("tabindex","-1");l.tabindex="-1";if(ot||at&&ct){n.setAttribute("role","application");l.role="application"}n.removeAttribute("width");n.removeAttribute("height");if("width"in l){delete l.width}if("height"in l){delete l.height}Object.getOwnPropertyNames(l).forEach(function(e){if(!(o&&e==="class")){a.setAttribute(e,l[e])}if(o){n.setAttribute(e,l[e])}});n.playerId=n.id;n.id+="_html5_api";n.className="vjs-tech";n.player=a.player=this;this.addClass("vjs-paused");if(t.VIDEOJS_NO_DYNAMIC_STYLE!==true){this.styleEl_=te("vjs-styles-dimensions");var u=G(".vjs-styles-defaults");var c=G("head");c.insertBefore(this.styleEl_,u?u.nextSibling:c.firstChild)}this.fill_=false;this.fluid_=false;this.width(this.options_.width);this.height(this.options_.height);this.fill(this.options_.fill);this.fluid(this.options_.fluid);this.aspectRatio(this.options_.aspectRatio);var d=n.getElementsByTagName("a");for(var f=0;f<d.length;f++){var h=d.item(f);A(h,"vjs-hidden");h.setAttribute("hidden","hidden")}n.initNetworkState_=n.networkState;if(n.parentNode&&!s){n.parentNode.insertBefore(a,n)}w(n,a);this.children_.unshift(n);this.el_.setAttribute("lang",this.language_);this.el_=a;return a};a.width=function e(t){return this.dimension("width",t)};a.height=function e(t){return this.dimension("height",t)};a.dimension=function e(t,r){var i=t+"_";if(r===undefined){return this[i]||0}if(r===""){this[i]=undefined;this.updateStyleEl_();return}var n=parseFloat(r);if(isNaN(n)){o.error('Improper value "'+r+'" supplied for for '+t);return}this[i]=n;this.updateStyleEl_()};a.fluid=function e(t){if(t===undefined){return!!this.fluid_}this.fluid_=!!t;if(je(this)){this.off("playerreset",this.updateStyleEl_)}if(t){this.addClass("vjs-fluid");this.fill(false);Ee(function(){this.on("playerreset",this.updateStyleEl_)})}else{this.removeClass("vjs-fluid")}this.updateStyleEl_()};a.fill=function e(t){if(t===undefined){return!!this.fill_}this.fill_=!!t;if(t){this.addClass("vjs-fill");this.fluid(false)}else{this.removeClass("vjs-fill")}};a.aspectRatio=function e(t){if(t===undefined){return this.aspectRatio_}if(!/^\d+\:\d+$/.test(t)){throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.")}this.aspectRatio_=t;this.fluid(true);this.updateStyleEl_()};a.updateStyleEl_=function e(){if(t.VIDEOJS_NO_DYNAMIC_STYLE===true){var r=typeof this.width_==="number"?this.width_:this.options_.width;var i=typeof this.height_==="number"?this.height_:this.options_.height;var n=this.tech_&&this.tech_.el();if(n){if(r>=0){n.width=r}if(i>=0){n.height=i}}return}var a;var s;var o;var l;if(this.aspectRatio_!==undefined&&this.aspectRatio_!=="auto"){o=this.aspectRatio_}else if(this.videoWidth()>0){o=this.videoWidth()+":"+this.videoHeight()}else{o="16:9"}var u=o.split(":");var c=u[1]/u[0];if(this.width_!==undefined){a=this.width_}else if(this.height_!==undefined){a=this.height_/c}else{a=this.videoWidth()||300}if(this.height_!==undefined){s=this.height_}else{s=a*c}if(/^[^a-zA-Z]/.test(this.id())){l="dimensions-"+this.id()}else{l=this.id()+"-dimensions"}this.addClass(l);re(this.styleEl_,"\n      ."+l+" {\n        width: "+a+"px;\n        height: "+s+"px;\n      }\n\n      ."+l+".vjs-fluid {\n        padding-top: "+c*100+"%;\n      }\n    ")};a.loadTech_=function e(t,r){var i=this;if(this.tech_){this.unloadTech_()}var n=Ne(t);var a=t.charAt(0).toLowerCase()+t.slice(1);if(n!=="Html5"&&this.tag){Sn.getTech("Html5").disposeMediaElement(this.tag);this.tag.player=null;this.tag=null}this.techName_=n;this.isReady_=false;var s=typeof this.autoplay()==="string"?false:this.autoplay();var o={source:r,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+a+"_api",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_||false,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};_n.names.forEach(function(e){var t=_n[e];o[t.getterName]=i[t.privateName]});h(o,this.options_[n]);h(o,this.options_[a]);h(o,this.options_[t.toLowerCase()]);if(this.tag){o.tag=this.tag}if(r&&r.src===this.cache_.src&&this.cache_.currentTime>0){o.startTime=this.cache_.currentTime}var l=Sn.getTech(t);if(!l){throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'")}this.tech_=new l(o);this.tech_.ready(_e(this,this.handleTechReady_),true);Dt.jsonToTextTracks(this.textTracksJson_||[],this.tech_);Ms.forEach(function(e){i.on(i.tech_,e,i["handleTech"+Ne(e)+"_"])});Object.keys(Bs).forEach(function(e){i.on(i.tech_,e,function(t){if(i.tech_.playbackRate()===0&&i.tech_.seeking()){i.queuedCallbacks_.push({callback:i["handleTech"+Bs[e]+"_"].bind(i),event:t});return}i["handleTech"+Bs[e]+"_"](t)})});this.on(this.tech_,"loadstart",this.handleTechLoadStart_);this.on(this.tech_,"sourceset",this.handleTechSourceset_);this.on(this.tech_,"waiting",this.handleTechWaiting_);this.on(this.tech_,"ended",this.handleTechEnded_);this.on(this.tech_,"seeking",this.handleTechSeeking_);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_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_);this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_);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_,"ratechange",this.handleTechRateChange_);this.usingNativeControls(this.techGet_("controls"));if(this.controls()&&!this.usingNativeControls()){this.addTechControlsListeners_()}if(this.tech_.el().parentNode!==this.el()&&(n!=="Html5"||!this.tag)){w(this.tech_.el(),this.el())}if(this.tag){this.tag.player=null;this.tag=null}};a.unloadTech_=function e(){var t=this;_n.names.forEach(function(e){var r=_n[e];t[r.privateName]=t[r.getterName]()});this.textTracksJson_=Dt.textTracksToJson(this.tech_);this.isReady_=false;this.tech_.dispose();this.tech_=false;if(this.isPosterFromTech_){this.poster_="";this.trigger("posterchange")}this.isPosterFromTech_=false};a.tech=function e(t){if(t===undefined){o.warn("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")}return this.tech_};a.addTechControlsListeners_=function e(){this.removeTechControlsListeners_();this.on(this.tech_,"mouseup",this.handleTechClick_);this.on(this.tech_,"dblclick",this.handleTechDoubleClick_);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_)};a.removeTechControlsListeners_=function e(){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_,"mouseup",this.handleTechClick_);this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)};a.handleTechReady_=function e(){this.triggerReady();if(this.cache_.volume){this.techCall_("setVolume",this.cache_.volume)}this.handleTechPosterChange_();this.handleTechDurationChange_()};a.handleTechLoadStart_=function e(){this.removeClass("vjs-ended");this.removeClass("vjs-seeking");this.error(null);this.handleTechDurationChange_();if(!this.paused()){this.trigger("loadstart");this.trigger("firstplay")}else{this.hasStarted(false);this.trigger("loadstart")}this.manualAutoplay_(this.autoplay())};a.manualAutoplay_=function e(t){var r=this;if(!this.tech_||typeof t!=="string"){return}var i=function e(){var t=r.muted();r.muted(true);var i=function e(){r.muted(t)};r.playTerminatedQueue_.push(i);var n=r.play();if(!At(n)){return}return n["catch"](i)};var n;if(t==="any"&&this.muted()!==true){n=this.play();if(At(n)){n=n["catch"](i)}}else if(t==="muted"&&this.muted()!==true){n=i()}else{n=this.play()}if(!At(n)){return}return n.then(function(){r.trigger({type:"autoplay-success",autoplay:t})})["catch"](function(e){r.trigger({type:"autoplay-failure",autoplay:t})})};a.updateSourceCaches_=function e(t){if(t===void 0){t=""}var r=t;var i="";if(typeof r!=="string"){r=t.src;i=t.type}this.cache_.source=this.cache_.source||{};this.cache_.sources=this.cache_.sources||[];if(r&&!i){i=Hn(this,r)}this.cache_.source=Be({},t,{src:r,type:i});var n=this.cache_.sources.filter(function(e){return e.src&&e.src===r});var a=[];var s=this.$$("source");var o=[];for(var l=0;l<s.length;l++){var u=O(s[l]);a.push(u);if(u.src&&u.src===r){o.push(u.src)}}if(o.length&&!n.length){this.cache_.sources=a}else if(!n.length){this.cache_.sources=[this.cache_.source]}this.cache_.src=r};a.handleTechSourceset_=function e(t){var r=this;if(!this.changingSrc_){var i=function e(t){return r.updateSourceCaches_(t)};var n=this.currentSource().src;var a=t.src;if(n&&!/^blob:/.test(n)&&/^blob:/.test(a)){if(!this.lastSource_||this.lastSource_.tech!==a&&this.lastSource_.player!==n){i=function e(){}}}i(a);if(!t.src){this.tech_.any(["sourceset","loadstart"],function(e){if(e.type==="sourceset"){return}var t=r.techGet("currentSrc");r.lastSource_.tech=t;r.updateSourceCaches_(t)})}}this.lastSource_={player:this.currentSource().src,tech:t.src};this.trigger({src:t.src,type:"sourceset"})};a.hasStarted=function e(t){if(t===undefined){return this.hasStarted_}if(t===this.hasStarted_){return}this.hasStarted_=t;if(this.hasStarted_){this.addClass("vjs-has-started");this.trigger("firstplay")}else{this.removeClass("vjs-has-started")}};a.handleTechPlay_=function e(){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.hasStarted(true);this.trigger("play")};a.handleTechRateChange_=function e(){if(this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0){this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)});this.queuedCallbacks_=[]}this.cache_.lastPlaybackRate=this.tech_.playbackRate();this.trigger("ratechange")};a.handleTechWaiting_=function e(){var t=this;this.addClass("vjs-waiting");this.trigger("waiting");var r=this.currentTime();var i=function e(){if(r!==t.currentTime()){t.removeClass("vjs-waiting");t.off("timeupdate",e)}};this.on("timeupdate",i)};a.handleTechCanPlay_=function e(){this.removeClass("vjs-waiting");this.trigger("canplay")};a.handleTechCanPlayThrough_=function e(){this.removeClass("vjs-waiting");this.trigger("canplaythrough")};a.handleTechPlaying_=function e(){this.removeClass("vjs-waiting");this.trigger("playing")};a.handleTechSeeking_=function e(){this.addClass("vjs-seeking");this.trigger("seeking")};a.handleTechSeeked_=function e(){this.removeClass("vjs-seeking");this.removeClass("vjs-ended");this.trigger("seeked")};a.handleTechFirstPlay_=function e(){if(this.options_.starttime){o.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")};a.handleTechPause_=function e(){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.trigger("pause")};a.handleTechEnded_=function e(){this.addClass("vjs-ended");if(this.options_.loop){this.currentTime(0);this.play()}else if(!this.paused()){this.pause()}this.trigger("ended")};a.handleTechDurationChange_=function e(){this.duration(this.techGet_("duration"))};a.handleTechClick_=function e(t){if(!z(t)){return}if(!this.controls_){return}if(this.paused()){It(this.play())}else{this.pause()}};a.handleTechDoubleClick_=function e(t){if(!this.controls_){return}var r=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(e){return e.contains(t.target)});if(!r){if(this.options_===undefined||this.options_.userActions===undefined||this.options_.userActions.doubleClick===undefined||this.options_.userActions.doubleClick!==false){if(this.options_!==undefined&&this.options_.userActions!==undefined&&typeof this.options_.userActions.doubleClick==="function"){this.options_.userActions.doubleClick.call(this,t)}else if(this.isFullscreen()){this.exitFullscreen()}else{this.requestFullscreen()}}}};a.handleTechTap_=function e(){this.userActive(!this.userActive())};a.handleTechTouchStart_=function e(){this.userWasActive=this.userActive()};a.handleTechTouchMove_=function e(){if(this.userWasActive){this.reportUserActivity()}};a.handleTechTouchEnd_=function e(t){t.preventDefault()};a.handleStageClick_=function e(){this.reportUserActivity()};a.toggleFullscreenClass_=function e(){if(this.isFullscreen()){this.addClass("vjs-fullscreen")}else{this.removeClass("vjs-fullscreen")}};a.documentFullscreenChange_=function e(t){var i=this.el();var n=r[this.fsApi_.fullscreenElement]===i;if(!n&&i.matches){n=i.matches(":"+this.fsApi_.fullscreen)}else if(!n&&i.msMatchesSelector){n=i.msMatchesSelector(":"+this.fsApi_.fullscreen)}this.isFullscreen(n);if(this.isFullscreen()===false){he(r,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)}if(this.fsApi_.prefixed){this.trigger("fullscreenchange")}};a.handleTechFullscreenChange_=function e(t,r){if(r){this.isFullscreen(r.isFullscreen)}this.trigger("fullscreenchange")};a.togglePictureInPictureClass_=function e(){if(this.isInPictureInPicture()){this.addClass("vjs-picture-in-picture")}else{this.removeClass("vjs-picture-in-picture")}};a.handleTechEnterPictureInPicture_=function e(t){this.isInPictureInPicture(true)};a.handleTechLeavePictureInPicture_=function e(t){this.isInPictureInPicture(false)};a.handleTechError_=function e(){var t=this.tech_.error();this.error(t)};a.handleTechTextData_=function e(){var t=null;if(arguments.length>1){t=arguments[1]}this.trigger("textdata",t)};a.getCache=function e(){return this.cache_};a.resetCache_=function e(){this.cache_={currentTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}};a.techCall_=function e(t,r){this.ready(function(){if(t in Dn){return xn(this.middleware_,this.tech_,t,r)}else if(t in Ln){return Pn(this.middleware_,this.tech_,t,r)}try{if(this.tech_){this.tech_[t](r)}}catch(e){o(e);throw e}},true)};a.techGet_=function e(t){if(!this.tech_||!this.tech_.isReady_){return}if(t in On){return In(this.middleware_,this.tech_,t)}else if(t in Ln){return Pn(this.middleware_,this.tech_,t)}try{return this.tech_[t]()}catch(e){if(this.tech_[t]===undefined){o("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e);throw e}if(e.name==="TypeError"){o("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e);this.tech_.isReady_=false;throw e}o(e);throw e}};a.play=function e(){var r=this;var i=this.options_.Promise||t.Promise;if(i){return new i(function(e){r.play_(e)})}return this.play_()};a.play_=function e(t){var r=this;if(t===void 0){t=It}this.playCallbacks_.push(t);var i=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_){this.off(["ready","loadstart"],this.waitToPlay_);this.waitToPlay_=null}if(!this.isReady_||!i){this.waitToPlay_=function(e){r.play_()};this.one(["ready","loadstart"],this.waitToPlay_);if(!i&&(ut||Qe)){this.load()}return}var n=this.techGet_("play");if(n===null){this.runPlayTerminatedQueue_()}else{this.runPlayCallbacks_(n)}};a.runPlayTerminatedQueue_=function e(){var t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[];t.forEach(function(e){e()})};a.runPlayCallbacks_=function e(t){var r=this.playCallbacks_.slice(0);this.playCallbacks_=[];this.playTerminatedQueue_=[];r.forEach(function(e){e(t)})};a.pause=function e(){this.techCall_("pause")};a.paused=function e(){return this.techGet_("paused")===false?false:true};a.played=function e(){return this.techGet_("played")||mt(0,0)};a.scrubbing=function e(t){if(typeof t==="undefined"){return this.scrubbing_}this.scrubbing_=!!t;if(t){this.addClass("vjs-scrubbing")}else{this.removeClass("vjs-scrubbing")}};a.currentTime=function e(t){if(typeof t!=="undefined"){if(t<0){t=0}this.techCall_("setCurrentTime",t);return}this.cache_.currentTime=this.techGet_("currentTime")||0;return this.cache_.currentTime};a.duration=function e(t){if(t===undefined){return this.cache_.duration!==undefined?this.cache_.duration:NaN}t=parseFloat(t);if(t<0){t=Infinity}if(t!==this.cache_.duration){this.cache_.duration=t;if(t===Infinity){this.addClass("vjs-live");if(this.options_.liveui&&this.player_.liveTracker){this.addClass("vjs-liveui")}}else{this.removeClass("vjs-live");this.removeClass("vjs-liveui")}if(!isNaN(t)){this.trigger("durationchange")}}};a.remainingTime=function e(){return this.duration()-this.currentTime()};a.remainingTimeDisplay=function e(){return Math.floor(this.duration())-Math.floor(this.currentTime())};a.buffered=function e(){var e=this.techGet_("buffered");if(!e||!e.length){e=mt(0,0)}return e};a.bufferedPercent=function e(){return gt(this.buffered(),this.duration())};a.bufferedEnd=function e(){var t=this.buffered();var r=this.duration();var i=t.end(t.length-1);if(i>r){i=r}return i};a.volume=function e(t){var r;if(t!==undefined){r=Math.max(0,Math.min(1,parseFloat(t)));this.cache_.volume=r;this.techCall_("setVolume",r);if(r>0){this.lastVolume_(r)}return}r=parseFloat(this.techGet_("volume"));return isNaN(r)?1:r};a.muted=function e(t){if(t!==undefined){this.techCall_("setMuted",t);return}return this.techGet_("muted")||false};a.defaultMuted=function e(t){if(t!==undefined){return this.techCall_("setDefaultMuted",t)}return this.techGet_("defaultMuted")||false};a.lastVolume_=function e(t){if(t!==undefined&&t!==0){this.cache_.lastVolume=t;return}return this.cache_.lastVolume};a.supportsFullScreen=function e(){return this.techGet_("supportsFullScreen")||false};a.isFullscreen=function e(t){if(t!==undefined){this.isFullscreen_=!!t;this.toggleFullscreenClass_();return}return!!this.isFullscreen_};a.requestFullscreen=function e(t){var i;this.isFullscreen(true);if(this.fsApi_.requestFullscreen){fe(r,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_);if(!this.fsApi_.prefixed){i=this.options_.fullscreen&&this.options_.fullscreen.options||{};if(t!==undefined){i=t}}It(this.el_[this.fsApi_.requestFullscreen](i))}else if(this.tech_.supportsFullScreen()){this.techCall_("enterFullScreen")}else{this.enterFullWindow();this.trigger("fullscreenchange")}};a.exitFullscreen=function e(){this.isFullscreen(false);if(this.fsApi_.requestFullscreen){It(r[this.fsApi_.exitFullscreen]())}else if(this.tech_.supportsFullScreen()){this.techCall_("exitFullScreen")}else{this.exitFullWindow();this.trigger("fullscreenchange")}};a.enterFullWindow=function e(){this.isFullWindow=true;this.docOrigOverflow=r.documentElement.style.overflow;fe(r,"keydown",this.boundFullWindowOnEscKey_);r.documentElement.style.overflow="hidden";A(r.body,"vjs-full-window");this.trigger("enterFullWindow")};a.fullWindowOnEscKey=function e(t){if(Rt.isEventKey(t,"Esc")){if(this.isFullscreen()===true){this.exitFullscreen()}else{this.exitFullWindow()}}};a.exitFullWindow=function e(){this.isFullWindow=false;he(r,"keydown",this.boundFullWindowOnEscKey_);r.documentElement.style.overflow=this.docOrigOverflow;I(r.body,"vjs-full-window");this.trigger("exitFullWindow")};a.isInPictureInPicture=function e(t){if(t!==undefined){this.isInPictureInPicture_=!!t;this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_};a.requestPictureInPicture=function e(){if("pictureInPictureEnabled"in r){return this.techGet_("requestPictureInPicture")}};a.exitPictureInPicture=function e(){if("pictureInPictureEnabled"in r){return r.exitPictureInPicture()}};a.handleKeyDown=function e(t){var r=this.options_.userActions;if(!r||!r.hotkeys){return}var i=function e(t){var r=t.tagName.toLowerCase();if(t.isContentEditable){return true}var i=["button","checkbox","hidden","radio","reset","submit"];if(r==="input"){return i.indexOf(t.type)===-1}var n=["textarea"];return n.indexOf(r)!==-1};if(i(this.el_.ownerDocument.activeElement)){return}if(typeof r.hotkeys==="function"){r.hotkeys.call(this,t)}else{this.handleHotkeys(t)}};a.handleHotkeys=function e(t){var i=this.options_.userActions?this.options_.userActions.hotkeys:{};var n=i.fullscreenKey,a=n===void 0?function(e){return Rt.isEventKey(e,"f")}:n,s=i.muteKey,o=s===void 0?function(e){return Rt.isEventKey(e,"m")}:s,l=i.playPauseKey,u=l===void 0?function(e){return Rt.isEventKey(e,"k")||Rt.isEventKey(e,"Space")}:l;if(a.call(this,t)){t.preventDefault();t.stopPropagation();var c=Fe.getComponent("FullscreenToggle");if(r[this.fsApi_.fullscreenEnabled]!==false){c.prototype.handleClick.call(this,t)}}else if(o.call(this,t)){t.preventDefault();t.stopPropagation();var d=Fe.getComponent("MuteToggle");d.prototype.handleClick.call(this,t)}else if(u.call(this,t)){t.preventDefault();t.stopPropagation();var f=Fe.getComponent("PlayToggle");f.prototype.handleClick.call(this,t)}};a.canPlayType=function e(t){var r;for(var i=0,n=this.options_.techOrder;i<n.length;i++){var a=n[i];var s=Sn.getTech(a);if(!s){s=Fe.getComponent(a)}if(!s){o.error('The "'+a+'" tech is undefined. Skipped browser support check for that tech.');continue}if(s.isSupported()){r=s.canPlayType(t);if(r){return r}}}return""};a.selectSource=function e(t){var r=this;var i=this.options_.techOrder.map(function(e){return[e,Sn.getTech(e)]}).filter(function(e){var t=e[0],r=e[1];if(r){return r.isSupported()}o.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.');return false});var n=function e(t,r,i){var n;t.some(function(e){return r.some(function(t){n=i(e,t);if(n){return true}})});return n};var a;var s=function e(t){return function(e,r){return t(r,e)}};var l=function e(t,i){var n=t[0],a=t[1];if(a.canPlaySource(i,r.options_[n.toLowerCase()])){return{source:i,tech:n}}};if(this.options_.sourceOrder){a=n(t,i,s(l))}else{a=n(i,t,l)}return a||false};a.src=function e(t){var r=this;if(typeof t==="undefined"){return this.cache_.src||""}var i=qn(t);if(!i.length){this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);return}this.changingSrc_=true;this.cache_.sources=i;this.updateSourceCaches_(i[0]);Cn(this,i[0],function(e,t){r.middleware_=t;r.cache_.sources=i;r.updateSourceCaches_(e);var n=r.src_(e);if(n){if(i.length>1){return r.src(i.slice(1))}r.changingSrc_=false;r.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);r.triggerReady();return}An(t,r.tech_)})};a.src_=function e(t){var r=this;var i=this.selectSource([t]);if(!i){return true}if(!Me(i.tech,this.techName_)){this.changingSrc_=true;this.loadTech_(i.tech,i.source);this.tech_.ready(function(){r.changingSrc_=false});return false}this.ready(function(){if(this.tech_.constructor.prototype.hasOwnProperty("setSource")){this.techCall_("setSource",t)}else{this.techCall_("src",t.src)}this.changingSrc_=false},true);return false};a.load=function e(){this.techCall_("load")};a.reset=function e(){var r=this;var i=this.options_.Promise||t.Promise;if(this.paused()||!i){this.doReset_()}else{var n=this.play();It(n.then(function(){return r.doReset_()}))}};a.doReset_=function e(){if(this.tech_){this.tech_.clearTracks("text")}this.resetCache_();this.poster("");this.loadTech_(this.options_.techOrder[0],null);this.techCall_("reset");this.resetControlBarUI_();if(je(this)){this.trigger("playerreset")}};a.resetControlBarUI_=function e(){this.resetProgressBar_();this.resetPlaybackRate_();this.resetVolumeBar_()};a.resetProgressBar_=function e(){this.currentTime(0);var t=this.controlBar,r=t.durationDisplay,i=t.remainingTimeDisplay;if(r){r.updateContent()}if(i){i.updateContent()}};a.resetPlaybackRate_=function e(){this.playbackRate(this.defaultPlaybackRate());this.handleTechRateChange_()};a.resetVolumeBar_=function e(){this.volume(1);this.trigger("volumechange")};a.currentSources=function e(){var t=this.currentSource();var r=[];if(Object.keys(t).length!==0){r.push(t)}return this.cache_.sources||r};a.currentSource=function e(){return this.cache_.source||{}};a.currentSrc=function e(){return this.currentSource()&&this.currentSource().src||""};a.currentType=function e(){return this.currentSource()&&this.currentSource().type||""};a.preload=function e(t){if(t!==undefined){this.techCall_("setPreload",t);this.options_.preload=t;return}return this.techGet_("preload")};a.autoplay=function e(t){if(t===undefined){return this.options_.autoplay||false}var r;if(typeof t==="string"&&/(any|play|muted)/.test(t)){this.options_.autoplay=t;this.manualAutoplay_(t);r=false}else if(!t){this.options_.autoplay=false}else{this.options_.autoplay=true}r=typeof r==="undefined"?this.options_.autoplay:r;if(this.tech_){this.techCall_("setAutoplay",r)}};a.playsinline=function e(t){if(t!==undefined){this.techCall_("setPlaysinline",t);this.options_.playsinline=t;return this}return this.techGet_("playsinline")};a.loop=function e(t){if(t!==undefined){this.techCall_("setLoop",t);this.options_.loop=t;return}return this.techGet_("loop")};a.poster=function e(t){if(t===undefined){return this.poster_}if(!t){t=""}if(t===this.poster_){return}this.poster_=t;this.techCall_("setPoster",t);this.isPosterFromTech_=false;this.trigger("posterchange")};a.handleTechPosterChange_=function e(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";if(t!==this.poster_){this.poster_=t;this.isPosterFromTech_=true;this.trigger("posterchange")}}};a.controls=function e(t){if(t===undefined){return!!this.controls_}t=!!t;if(this.controls_===t){return}this.controls_=t;if(this.usingNativeControls()){this.techCall_("setControls",t)}if(this.controls_){this.removeClass("vjs-controls-disabled");this.addClass("vjs-controls-enabled");this.trigger("controlsenabled");if(!this.usingNativeControls()){this.addTechControlsListeners_()}}else{this.removeClass("vjs-controls-enabled");this.addClass("vjs-controls-disabled");this.trigger("controlsdisabled");if(!this.usingNativeControls()){this.removeTechControlsListeners_()}}};a.usingNativeControls=function e(t){if(t===undefined){return!!this.usingNativeControls_}t=!!t;if(this.usingNativeControls_===t){return}this.usingNativeControls_=t;if(this.usingNativeControls_){this.addClass("vjs-using-native-controls");this.trigger("usingnativecontrols")}else{this.removeClass("vjs-using-native-controls");this.trigger("usingcustomcontrols")}};a.error=function e(t){if(t===undefined){return this.error_||null}if(this.options_.suppressNotSupportedError&&t&&t.message&&t.message===this.localize(this.options_.notSupportedMessage)){var r=function e(){this.error(t)};this.options_.suppressNotSupportedError=false;this.any(["click","touchstart"],r);this.one("loadstart",function(){this.off(["click","touchstart"],r)});return}if(t===null){this.error_=t;this.removeClass("vjs-error");if(this.errorDisplay){this.errorDisplay.close()}return}this.error_=new jt(t);this.addClass("vjs-error");o.error("(CODE:"+this.error_.code+" "+jt.errorTypes[this.error_.code]+")",this.error_.message,this.error_);this.trigger("error");return};a.reportUserActivity=function e(t){this.userActivity_=true};a.userActive=function e(t){if(t===undefined){return this.userActive_}t=!!t;if(t===this.userActive_){return}this.userActive_=t;if(this.userActive_){this.userActivity_=true;this.removeClass("vjs-user-inactive");this.addClass("vjs-user-active");this.trigger("useractive");return}if(this.tech_){this.tech_.one("mousemove",function(e){e.stopPropagation();e.preventDefault()})}this.userActivity_=false;this.removeClass("vjs-user-active");this.addClass("vjs-user-inactive");this.trigger("userinactive")};a.listenForUserActivity_=function e(){var t;var r;var i;var n=_e(this,this.reportUserActivity);var a=function e(t){if(t.screenX!==r||t.screenY!==i){r=t.screenX;i=t.screenY;n()}};var s=function e(){n();this.clearInterval(t);t=this.setInterval(n,250)};var o=function e(r){n();this.clearInterval(t)};this.on("mousedown",s);this.on("mousemove",a);this.on("mouseup",o);var l=this.getChild("controlBar");if(l&&!Qe&&!et){l.on("mouseenter",function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout;this.player().options_.inactivityTimeout=0});l.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})}this.on("keydown",n);this.on("keyup",n);var u;this.setInterval(function(){if(!this.userActivity_){return}this.userActivity_=false;this.userActive(true);this.clearTimeout(u);var e=this.options_.inactivityTimeout;if(e<=0){return}u=this.setTimeout(function(){if(!this.userActivity_){this.userActive(false)}},e)},250)};a.playbackRate=function e(t){if(t!==undefined){this.techCall_("setPlaybackRate",t);return}if(this.tech_&&this.tech_.featuresPlaybackRate){return this.cache_.lastPlaybackRate||this.techGet_("playbackRate")}return 1};a.defaultPlaybackRate=function e(t){if(t!==undefined){return this.techCall_("setDefaultPlaybackRate",t)}if(this.tech_&&this.tech_.featuresPlaybackRate){return this.techGet_("defaultPlaybackRate")}return 1};a.isAudio=function e(t){if(t!==undefined){this.isAudio_=!!t;return}return!!this.isAudio_};a.addTextTrack=function e(t,r,i){if(this.tech_){return this.tech_.addTextTrack(t,r,i)}};a.addRemoteTextTrack=function e(t,r){if(this.tech_){return this.tech_.addRemoteTextTrack(t,r)}};a.removeRemoteTextTrack=function e(t){if(t===void 0){t={}}var r=t,i=r.track;if(!i){i=t}if(this.tech_){return this.tech_.removeRemoteTextTrack(i)}};a.getVideoPlaybackQuality=function e(){return this.techGet_("getVideoPlaybackQuality")};a.videoWidth=function e(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0};a.videoHeight=function e(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0};a.language=function e(t){if(t===undefined){return this.language_}this.language_=String(t).toLowerCase()};a.languages=function e(){return Be(n.prototype.options_.languages,this.languages_)};a.toJSON=function e(){var t=Be(this.options_);var r=t.tracks;t.tracks=[];for(var i=0;i<r.length;i++){var n=r[i];n=Be(n);n.player=undefined;t.tracks[i]=n}return t};a.createModal=function e(t,r){var i=this;r=r||{};r.content=t||"";var n=new Ht(this,r);this.addChild(n);n.on("dispose",function(){i.removeChild(n)});n.open();return n};a.updateCurrentBreakpoint_=function e(){if(!this.responsive()){return}var t=this.currentBreakpoint();var r=this.currentWidth();for(var i=0;i<Fs.length;i++){var n=Fs[i];var a=this.breakpoints_[n];if(r<=a){if(t===n){return}if(t){this.removeClass(Ws[t])}this.addClass(Ws[n]);this.breakpoint_=n;break}}};a.removeCurrentBreakpoint_=function e(){var t=this.currentBreakpointClass();this.breakpoint_="";if(t){this.removeClass(t)}};a.breakpoints=function e(t){if(t===undefined){return h(this.breakpoints_)}this.breakpoint_="";this.breakpoints_=h({},Hs,t);this.updateCurrentBreakpoint_();return h(this.breakpoints_)};a.responsive=function e(t){if(t===undefined){return this.responsive_}t=Boolean(t);var r=this.responsive_;if(t===r){return}this.responsive_=t;if(t){this.on("playerresize",this.updateCurrentBreakpoint_);this.updateCurrentBreakpoint_()}else{this.off("playerresize",this.updateCurrentBreakpoint_);this.removeCurrentBreakpoint_()}return t};a.currentBreakpoint=function e(){return this.breakpoint_};a.currentBreakpointClass=function e(){return Ws[this.breakpoint_]||""};a.loadMedia=function e(t,r){var i=this;if(!t||typeof t!=="object"){return}this.reset();this.cache_.media=Be(t);var n=this.cache_.media,a=n.artwork,s=n.poster,o=n.src,l=n.textTracks;if(!a&&s){this.cache_.media.artwork=[{src:s,type:Wn(s)}]}if(o){this.src(o)}if(s){this.poster(s)}if(Array.isArray(l)){l.forEach(function(e){return i.addRemoteTextTrack(e,false)})}this.ready(r)};a.getMedia=function e(){if(!this.cache_.media){var t=this.poster();var r=this.currentSources();var i=Array.prototype.map.call(this.remoteTextTracks(),function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}});var n={src:r,textTracks:i};if(t){n.poster=t;n.artwork=[{src:n.poster,type:Wn(n.poster)}]}return n}return Be(this.cache_.media)};n.getTagSettings=function e(t){var r={sources:[],tracks:[]};var i=O(t);var n=i["data-setup"];if(C(t,"vjs-fill")){i.fill=true}if(C(t,"vjs-fluid")){i.fluid=true}if(n!==null){var a=wt(n||"{}"),s=a[0],l=a[1];if(s){o.error(s)}h(i,l)}h(r,i);if(t.hasChildNodes()){var u=t.childNodes;for(var c=0,d=u.length;c<d;c++){var f=u[c];var p=f.nodeName.toLowerCase();if(p==="source"){r.sources.push(O(f))}else if(p==="track"){r.tracks.push(O(f))}}}return r};a.flexNotSupported_=function e(){var t=r.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)};return n}(Fe);_n.names.forEach(function(e){var t=_n[e];qs.prototype[t.getterName]=function(){if(this.tech_){return this.tech_[t.getterName]()}this[t.privateName]=this[t.privateName]||new t.ListClass;return this[t.privateName]}});qs.players={};var Vs=t.navigator;qs.prototype.options_={techOrder:Sn.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:false,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Vs&&(Vs.languages&&Vs.languages[0]||Vs.userLanguage||Vs.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:false};["ended","seeking","seekable","networkState","readyState"].forEach(function(e){qs.prototype[e]=function(){return this.techGet_(e)}});Ms.forEach(function(e){qs.prototype["handleTech"+Ne(e)+"_"]=function(){return this.trigger(e)}});Fe.registerComponent("Player",qs);var Ks="plugin";var zs="activePlugins_";var Gs={};var Ys=function e(t){return Gs.hasOwnProperty(t)};var Xs=function e(t){return Ys(t)?Gs[t]:undefined};var $s=function e(t,r){t[zs]=t[zs]||{};t[zs][r]=true};var Js=function e(t,r,i){var n=(i?"before":"")+"pluginsetup";t.trigger(n,r);t.trigger(n+":"+r.name,r)};var Qs=function e(t,r){var i=function e(){Js(this,{name:t,plugin:r,instance:null},true);var i=r.apply(this,arguments);$s(this,t);Js(this,{name:t,plugin:r,instance:i});return i};Object.keys(r).forEach(function(e){i[e]=r[e]});return i};var Zs=function e(t,r){r.prototype.name=t;return function(){Js(this,{name:t,plugin:r,instance:null},true);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}var a=Ve(r,[this].concat(i));this[t]=function(){return a};Js(this,a.getEventHash());return a}};var eo=function(){function e(t){if(this.constructor===e){throw new Error("Plugin must be sub-classed; not directly instantiated.")}this.player=t;De(this);delete this.trigger;Re(this,this.constructor.defaultState);$s(t,this.name);this.dispose=_e(this,this.dispose);t.on("dispose",this.dispose)}var t=e.prototype;t.version=function e(){return this.constructor.VERSION};t.getEventHash=function e(t){if(t===void 0){t={}}t.name=this.name;t.plugin=this.constructor;t.instance=this;return t};t.trigger=function e(t,r){if(r===void 0){r={}}return pe(this.eventBusEl_,t,this.getEventHash(r))};t.handleStateChanged=function e(t){};t.dispose=function e(){var t=this.name,r=this.player;this.trigger("dispose");this.off();r.off("dispose",this.dispose);r[zs][t]=false;this.player=this.state=null;r[t]=Zs(t,Gs[t])};e.isBasic=function t(r){var i=typeof r==="string"?Xs(r):r;return typeof i==="function"&&!e.prototype.isPrototypeOf(i.prototype)};e.registerPlugin=function t(r,i){if(typeof r!=="string"){throw new Error('Illegal plugin name, "'+r+'", must be a string, was '+typeof r+".")}if(Ys(r)){o.warn('A plugin named "'+r+'" already exists. You may want to avoid re-registering plugins!')}else if(qs.prototype.hasOwnProperty(r)){throw new Error('Illegal plugin name, "'+r+'", cannot share a name with an existing player method!')}if(typeof i!=="function"){throw new Error('Illegal plugin for "'+r+'", must be a function, was '+typeof i+".")}Gs[r]=i;if(r!==Ks){if(e.isBasic(i)){qs.prototype[r]=Qs(r,i)}else{qs.prototype[r]=Zs(r,i)}}return i};e.deregisterPlugin=function e(t){if(t===Ks){throw new Error("Cannot de-register base plugin.")}if(Ys(t)){delete Gs[t];delete qs.prototype[t]}};e.getPlugins=function e(t){if(t===void 0){t=Object.keys(Gs)}var r;t.forEach(function(e){var t=Xs(e);if(t){r=r||{};r[e]=t}});return r};e.getPluginVersion=function e(t){var r=Xs(t);return r&&r.VERSION||""};return e}();eo.getPlugin=Xs;eo.BASE_PLUGIN_NAME=Ks;eo.registerPlugin(Ks,eo);qs.prototype.usingPlugin=function(e){return!!this[zs]&&this[zs][e]===true};qs.prototype.hasPlugin=function(e){return!!Ys(e)};var to=function e(t,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(r){t.super_=r}};var ro=function e(t,r){if(r===void 0){r={}}var i=function e(){t.apply(this,arguments)};var n={};if(typeof r==="object"){if(r.constructor!==Object.prototype.constructor){i=r.constructor}n=r}else if(typeof r==="function"){i=r}to(i,t);for(var a in n){if(n.hasOwnProperty(a)){i.prototype[a]=n[a]}}return i};var io=function e(t){return t.indexOf("#")===0?t.slice(1):t};function no(e,t,r){var i=no.getPlayer(e);if(i){if(t){o.warn('Player "'+e+'" is already initialised. Options will not be applied.')}if(r){i.ready(r)}return i}var n=typeof e==="string"?G("#"+io(e)):e;if(!T(n)){throw new TypeError("The element or ID supplied is not valid. (videojs)")}if(!n.ownerDocument.defaultView||!n.ownerDocument.body.contains(n)){o.warn("The element supplied is not included in the DOM")}t=t||{};no.hooks("beforesetup").forEach(function(e){var r=e(n,Be(t));if(!p(r)||Array.isArray(r)){o.error("please return an object in beforesetup hooks");return}t=Be(t,r)});var a=Fe.getComponent("Player");i=new a(n,t,r);no.hooks("setup").forEach(function(e){return e(i)});return i}no.hooks_={};no.hooks=function(e,t){no.hooks_[e]=no.hooks_[e]||[];if(t){no.hooks_[e]=no.hooks_[e].concat(t)}return no.hooks_[e]};no.hook=function(e,t){no.hooks(e,t)};no.hookOnce=function(e,t){no.hooks(e,[].concat(t).map(function(t){var r=function r(){no.removeHook(e,r);return t.apply(void 0,arguments)};return r}))};no.removeHook=function(e,t){var r=no.hooks(e).indexOf(t);if(r<=-1){return false}no.hooks_[e]=no.hooks_[e].slice();no.hooks_[e].splice(r,1);return true};if(t.VIDEOJS_NO_DYNAMIC_STYLE!==true&&b()){var ao=G(".vjs-styles-defaults");if(!ao){ao=te("vjs-styles-defaults");var so=G("head");if(so){so.insertBefore(ao,so.firstChild)}re(ao,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}Z(1,no);no.VERSION=i;no.options=qs.prototype.options_;no.getPlayers=function(){return qs.players};no.getPlayer=function(e){var t=qs.players;var r;if(typeof e==="string"){var i=io(e);var n=t[i];if(n){return n}r=G("#"+i)}else{r=e}if(T(r)){var a=r,s=a.player,o=a.playerId;if(s||t[o]){return s||t[o]}}};no.getAllPlayers=function(){return Object.keys(qs.players).map(function(e){return qs.players[e]}).filter(Boolean)};no.players=qs.players;no.getComponent=Fe.getComponent;no.registerComponent=function(e,t){if(Sn.isTech(t)){o.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)")}Fe.registerComponent.call(Fe,e,t)};no.getTech=Sn.getTech;no.registerTech=Sn.registerTech;no.use=wn;Object.defineProperty(no,"middleware",{value:{},writeable:false,enumerable:true});Object.defineProperty(no.middleware,"TERMINATOR",{value:En,writeable:false,enumerable:true});no.browser=ft;no.TOUCH_ENABLED=dt;no.extend=ro;no.mergeOptions=Be;no.bind=_e;no.registerPlugin=eo.registerPlugin;no.deregisterPlugin=eo.deregisterPlugin;no.plugin=function(e,t){o.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead");return eo.registerPlugin(e,t)};no.getPlugins=eo.getPlugins;no.getPlugin=eo.getPlugin;no.getPluginVersion=eo.getPluginVersion;no.addLanguage=function(e,t){var r;e=(""+e).toLowerCase();no.options.languages=Be(no.options.languages,(r={},r[e]=t,r));return no.options.languages[e]};no.log=o;no.createLogger=l;no.createTimeRange=no.createTimeRanges=mt;no.formatTime=ua;no.setFormatTime=oa;no.resetFormatTime=la;no.parseUrl=ir;no.isCrossOrigin=sr;no.EventTarget=Se;no.on=fe;no.one=ve;no.off=he;no.trigger=pe;no.xhr=Qi;no.TextTrack=un;no.AudioTrack=cn;no.VideoTrack=dn;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){no[e]=function(){o.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead");return X[e].apply(null,arguments)}});no.computedStyle=m;no.dom=X;no.url=or;return no});var l=o.dedupeVideojs(e.videojs,s);var u=new o({accountId:"1330301241001",adConfigId:"",autoplay:false,css:{controlBarColor:"rgb(0, 0, 0)",controlColor:"#fff",progressColor:"rgb(168, 166, 160)"},embedId:"default",media:{poster:{}},playerId:"H1KarKWEW",preload:"auto",skin:"",version:"6.37.2"},{});var c=u.util;if(!l.getTech("flash")){(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsFlash=t(e.videojs)})(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;var r="5.4.1";var i="2.1.0";function n(e){e.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};e.streamFromParts=function(e,t){return e+"&"+t};e.streamToParts=function(e){var t={connection:"",stream:""};if(!e){return t}var r=e.search(/&(?!\w+=)/);var i=void 0;if(r!==-1){i=r+1}else{r=i=e.lastIndexOf("/")+1;if(r===0){r=i=e.length}}t.connection=e.substring(0,r);t.stream=e.substring(i,e.length);return t};e.isStreamingType=function(t){return t in e.streamingFormats};e.RTMP_RE=/^rtmp[set]?:\/\//i;e.isStreamingSrc=function(t){return e.RTMP_RE.test(t)};e.rtmpSourceHandler={};e.rtmpSourceHandler.canPlayType=function(t){if(e.isStreamingType(t)){return"maybe"}return""};e.rtmpSourceHandler.canHandleSource=function(t,r){var i=e.rtmpSourceHandler.canPlayType(t.type);if(i){return i}if(e.isStreamingSrc(t.src)){return"maybe"}return""};e.rtmpSourceHandler.handleSource=function(t,r,i){var n=e.streamToParts(t.src);r.setRtmpConnection(n.connection);r.setRtmpStream(n.stream)};e.registerSourceHandler(e.rtmpSourceHandler);return e}var a=typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var s;if(typeof e!=="undefined"){s=e}else if(typeof a!=="undefined"){s=a}else if(typeof self!=="undefined"){s=self}else{s={}}var o=s;var l=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var u=function(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t};var c=function(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e};var d=t.getComponent("Tech");var f=t.dom;var h=t.url;var p=t.createTimeRange;var v=t.mergeOptions;var m=o&&o.navigator||{};var g=function(e){u(t,e);function t(r,i){l(this,t);var n=c(this,e.call(this,r,i));if(r.source){n.ready(function(){this.setSource(r.source)},true)}if(r.startTime){n.ready(function(){this.load();this.play();this.currentTime(r.startTime)},true)}o.videojs=o.videojs||{};o.videojs.Flash=o.videojs.Flash||{};o.videojs.Flash.onReady=t.onReady;o.videojs.Flash.onEvent=t.onEvent;o.videojs.Flash.onError=t.onError;n.on("seeked",function(){this.lastSeekTarget_=undefined});return n}t.prototype.createEl=function e(){var i=this.options_;if(!i.swf){i.swf="https://vjs.zencdn.net/swf/"+r+"/video-js.swf"}var n=i.techId;var a=v({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:i.autoplay,preload:i.preload,loop:i.loop,muted:i.muted},i.flashVars);var s=v({wmode:"opaque",bgcolor:"#000000"},i.params);var o=v({id:n,name:n,class:"vjs-tech"},i.attributes);this.el_=t.embed(i.swf,a,s,o);this.el_.tech=this;return this.el_};t.prototype.play=function e(){if(this.ended()){this.setCurrentTime(0)}this.el_.vjs_play()};t.prototype.pause=function e(){this.el_.vjs_pause()};t.prototype.src=function e(t){if(t===undefined){return this.currentSrc()}return this.setSrc(t)};t.prototype.setSrc=function e(t){var r=this;t=h.getAbsoluteURL(t);this.el_.vjs_src(t);if(this.autoplay()){this.setTimeout(function(){return r.play()},0)}};t.prototype.seeking=function e(){return this.lastSeekTarget_!==undefined};t.prototype.setCurrentTime=function t(r){var i=this.seekable();if(i.length){r=r>i.start(0)?r:i.start(0);r=r<i.end(i.length-1)?r:i.end(i.length-1);this.lastSeekTarget_=r;this.trigger("seeking");this.el_.vjs_setProperty("currentTime",r);e.prototype.setCurrentTime.call(this)}};t.prototype.currentTime=function e(){if(this.seeking()){return this.lastSeekTarget_||0}return this.el_.vjs_getProperty("currentTime")};t.prototype.currentSrc=function e(){if(this.currentSource_){return this.currentSource_.src}return this.el_.vjs_getProperty("currentSrc")};t.prototype.duration=function e(){if(this.readyState()===0){return NaN}var e=this.el_.vjs_getProperty("duration");return e>=0?e:Infinity};t.prototype.load=function e(){this.el_.vjs_load()};t.prototype.poster=function e(){this.el_.vjs_getProperty("poster")};t.prototype.setPoster=function e(){};t.prototype.seekable=function e(){var t=this.duration();if(t===0){return p()}return p(0,t)};t.prototype.buffered=function e(){var t=this.el_.vjs_getProperty("buffered");if(t.length===0){return p()}return p(t[0][0],t[0][1])};t.prototype.supportsFullScreen=function e(){return false};t.prototype.enterFullScreen=function e(){return false};t.prototype.getVideoPlaybackQuality=function e(){var t=this.el_.vjs_getProperty("getVideoPlaybackQuality");if(o.performance&&typeof o.performance.now==="function"){t.creationTime=o.performance.now()}else if(o.performance&&o.performance.timing&&typeof o.performance.timing.navigationStart==="number"){t.creationTime=o.Date.now()-o.performance.timing.navigationStart}return t};return t}(d);var y=["rtmpConnection","rtmpStream","preload","defaultPlaybackRate","playbackRate","autoplay","loop","controls","volume","muted","defaultMuted"];var _=["networkState","readyState","initialTime","startOffsetTime","paused","ended","videoWidth","videoHeight"];var b=g.prototype;function T(e){var t=e.charAt(0).toUpperCase()+e.slice(1);b["set"+t]=function(t){return this.el_.vjs_setProperty(e,t)}}function S(e){b[e]=function(){return this.el_.vjs_getProperty(e)}}for(var k=0;k<y.length;k++){S(y[k]);T(y[k])}for(var j=0;j<_.length;j++){S(_[j])}g.isSupported=function(){if(t.browser.IS_CHROME&&!t.browser.IS_ANDROID||t.browser.IS_SAFARI&&!t.browser.IS_IOS){return true}return g.version()[0]>=10};d.withSourceHandlers(g);g.nativeSourceHandler={};g.nativeSourceHandler.canPlayType=function(e){if(e in g.formats){return"maybe"}return""};g.nativeSourceHandler.canHandleSource=function(e,t){var r=void 0;function i(e){var t=h.getFileExtension(e);if(t){return"video/"+t}return""}if(!e.type){r=i(e.src)}else{r=e.type.replace(/;.*/,"").toLowerCase()}return g.nativeSourceHandler.canPlayType(r)};g.nativeSourceHandler.handleSource=function(e,t,r){t.setSrc(e.src)};g.nativeSourceHandler.dispose=function(){};g.registerSourceHandler(g.nativeSourceHandler);g.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};g.onReady=function(e){var t=f.$("#"+e);var r=t&&t.tech;if(r&&r.el()){g.checkReady(r)}};g.checkReady=function(e){if(!e.el()){return}if(e.el().vjs_getProperty){e.triggerReady()}else{this.setTimeout(function(){g.checkReady(e)},50)}};g.onEvent=function(e,t){var r=f.$("#"+e).tech;var i=Array.prototype.slice.call(arguments,2);r.setTimeout(function(){r.trigger(t,i)},1)};g.onError=function(e,t){var r=f.$("#"+e).tech;if(t==="srcnotfound"){return r.error(4)}if(typeof t==="string"){r.error("FLASH: "+t)}else{t.origin="flash";r.error(t)}};g.version=function(){var e="0,0,0";try{e=new o.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{if(m.mimeTypes["application/x-shockwave-flash"].enabledPlugin){e=(m.plugins["Shockwave Flash 2.0"]||m.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(e){}}return e.split(",")};g.embed=function(e,t,r,i){var n=g.getEmbedCode(e,t,r,i);var a=f.createEl("div",{innerHTML:n}).childNodes[0];return a};g.getEmbedCode=function(e,t,r,i){var n='<object type="application/x-shockwave-flash" ';var a="";var s="";var o="";if(t){Object.getOwnPropertyNames(t).forEach(function(e){a+=e+"="+t[e]+"&"})}r=v({movie:e,flashvars:a,allowScriptAccess:"always",allowNetworking:"all"},r);Object.getOwnPropertyNames(r).forEach(function(e){s+='<param name="'+e+'" value="'+r[e]+'" />'});i=v({data:e,width:"100%",height:"100%"},i);Object.getOwnPropertyNames(i).forEach(function(e){o+=e+'="'+i[e]+'" '});return""+n+o+">"+s+"</object>"};n(g);if(d.getTech("Flash")){t.log.warn("Not using videojs-flash as it appears to already be registered");t.log.warn("videojs-flash should only be used with video.js@6 and above")}else{t.registerTech("Flash",g)}g.VERSION=i;return g})}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("global/window"),require("video.js")):typeof r==="function"&&r.amd?r(["exports","global/window","video.js"],t):t(e.videojsFlashlsSourceHandler={},e.window,e.videojs)})(this,function(e,t,r){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;var i=function(){this.init=function(){var e={};this.on=function(t,r){if(!e[t]){e[t]=[]}e[t]=e[t].concat(r)};this.off=function(t,r){var i;if(!e[t]){return false}i=e[t].indexOf(r);e[t]=e[t].slice();e[t].splice(i,1);return i>-1};this.trigger=function(t){var r,i,n,a;r=e[t];if(!r){return}if(arguments.length===2){n=r.length;for(i=0;i<n;++i){r[i].call(this,arguments[1])}}else{a=[];i=arguments.length;for(i=1;i<arguments.length;++i){a.push(arguments[i])}n=r.length;for(i=0;i<n;++i){r[i].apply(this,a)}}};this.dispose=function(){e={}}}};i.prototype.pipe=function(e){this.on("data",function(t){e.push(t)});this.on("done",function(t){e.flush(t)});return e};i.prototype.push=function(e){this.trigger("data",e)};i.prototype.flush=function(e){this.trigger("done",e)};var n=i;var a=4,s=128;var o=function(e){var t=0,r={payloadType:-1,payloadSize:0},i=0,n=0;while(t<e.byteLength){if(e[t]===s){break}while(e[t]===255){i+=255;t++}i+=e[t++];while(e[t]===255){n+=255;t++}n+=e[t++];if(!r.payload&&i===a){r.payloadType=i;r.payloadSize=n;r.payload=e.subarray(t,t+n);break}t+=n;i=0;n=0}return r};var l=function(e){if(e.payload[0]!==181){return null}if((e.payload[1]<<8|e.payload[2])!==49){return null}if(String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])!=="GA94"){return null}if(e.payload[7]!==3){return null}return e.payload.subarray(8,e.payload.length-1)};var u=function(e,t){var r=[],i,n,a,s;if(!(t[0]&64)){return r}n=t[0]&31;for(i=0;i<n;i++){a=i*3;s={type:t[a+2]&3,pts:e};if(t[a+2]&4){s.ccData=t[a+3]<<8|t[a+4];r.push(s)}}return r};var c=function(e){var t=e.byteLength,r=[],i=1,n,a;while(i<t-2){if(e[i]===0&&e[i+1]===0&&e[i+2]===3){r.push(i+2);i+=2}else{i++}}if(r.length===0){return e}n=t-r.length;a=new Uint8Array(n);var s=0;for(i=0;i<n;s++,i++){if(s===r[0]){s++;r.shift()}a[i]=e[s]}return a};var d={parseSei:o,parseUserData:l,parseCaptionPackets:u,discardEmulationPreventionBytes:c,USER_DATA_REGISTERED_ITU_T_T35:a};var f=function(){f.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new y(0,0),new y(0,1),new y(1,0),new y(1,1)];this.reset();this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data"));e.on("done",this.trigger.bind(this,"done"))},this)};f.prototype=new n;f.prototype.push=function(e){var t,r,i;if(e.nalUnitType!=="sei_rbsp"){return}t=d.parseSei(e.escapedRBSP);if(t.payloadType!==d.USER_DATA_REGISTERED_ITU_T_T35){return}r=d.parseUserData(t);if(!r){return}if(e.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return}else if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--;if(!this.numSameDts_){this.ignoreNextEqualDts_=false}return}i=d.parseCaptionPackets(e.pts,r);this.captionPackets_=this.captionPackets_.concat(i);if(this.latestDts_!==e.dts){this.numSameDts_=0}this.numSameDts_++;this.latestDts_=e.dts};f.prototype.flush=function(){if(!this.captionPackets_.length){this.ccStreams_.forEach(function(e){e.flush()},this);return}this.captionPackets_.forEach(function(e,t){e.presortIndex=t});this.captionPackets_.sort(function(e,t){if(e.pts===t.pts){return e.presortIndex-t.presortIndex}return e.pts-t.pts});this.captionPackets_.forEach(function(e){if(e.type<2){this.dispatchCea608Packet(e)}},this);this.captionPackets_.length=0;this.ccStreams_.forEach(function(e){e.flush()},this);return};f.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(e){e.reset()})};f.prototype.dispatchCea608Packet=function(e){if(this.setsChannel1Active(e)){this.activeCea608Channel_[e.type]=0}else if(this.setsChannel2Active(e)){this.activeCea608Channel_[e.type]=1}if(this.activeCea608Channel_[e.type]===null){return}this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)};f.prototype.setsChannel1Active=function(e){return(e.ccData&30720)===4096};f.prototype.setsChannel2Active=function(e){return(e.ccData&30720)===6144};var h={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496};var p=function(e){if(e===null){return""}e=h[e]||e;return String.fromCharCode(e)};var v=14;var m=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var g=function(){var e=[],t=v+1;while(t--){e.push("")}return e};var y=function(e,t){y.prototype.init.call(this);this.field_=e||0;this.dataChannel_=t||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(e){var t,r,i,n,a;t=e.ccData&32639;if(t===this.lastControlCode_){this.lastControlCode_=null;return}if((t&61440)===4096){this.lastControlCode_=t}else if(t!==this.PADDING_){this.lastControlCode_=null}i=t>>>8;n=t&255;if(t===this.PADDING_){return}else if(t===this.RESUME_CAPTION_LOADING_){this.mode_="popOn"}else if(t===this.END_OF_CAPTION_){this.mode_="popOn";this.clearFormatting(e.pts);this.flushDisplayed(e.pts);r=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=r;this.startPts_=e.pts}else if(t===this.ROLL_UP_2_ROWS_){this.rollUpRows_=2;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_3_ROWS_){this.rollUpRows_=3;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_4_ROWS_){this.rollUpRows_=4;this.setRollUp(e.pts)}else if(t===this.CARRIAGE_RETURN_){this.clearFormatting(e.pts);this.flushDisplayed(e.pts);this.shiftRowsUp_();this.startPts_=e.pts}else if(t===this.BACKSPACE_){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}}else if(t===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(e.pts);this.displayed_=g()}else if(t===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=g()}else if(t===this.RESUME_DIRECT_CAPTIONING_){if(this.mode_!=="paintOn"){this.flushDisplayed(e.pts);this.displayed_=g()}this.mode_="paintOn";this.startPts_=e.pts}else if(this.isSpecialCharacter(i,n)){i=(i&3)<<8;a=p(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(i,n)){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}i=(i&3)<<8;a=p(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(i,n)){this.clearFormatting(e.pts);this[this.mode_](e.pts," ");this.column_++;if((n&14)===14){this.addFormatting(e.pts,["i"])}if((n&1)===1){this.addFormatting(e.pts,["u"])}}else if(this.isOffsetControlCode(i,n)){this.column_+=n&3}else if(this.isPAC(i,n)){var s=m.indexOf(t&7968);if(this.mode_==="rollUp"){this.setRollUp(e.pts,s)}if(s!==this.row_){this.clearFormatting(e.pts);this.row_=s}if(n&1&&this.formatting_.indexOf("u")===-1){this.addFormatting(e.pts,["u"])}if((t&16)===16){this.column_=((t&14)>>1)*4}if(this.isColorPAC(n)){if((n&14)===14){this.addFormatting(e.pts,["i"])}}}else if(this.isNormalChar(i)){if(n===0){n=null}a=p(i);a+=p(n);this[this.mode_](e.pts,a);this.column_+=a.length}}};y.prototype=new n;y.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){return e.trim()}).join("\n").replace(/^\n+|\n+$/g,"");if(t.length){this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})}};y.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=g();this.nonDisplayed_=g();this.lastControlCode_=null;this.column_=0;this.row_=v;this.rollUpRows_=2;this.formatting_=[]};y.prototype.setConstants=function(){if(this.dataChannel_===0){this.BASE_=16;this.EXT_=17;this.CONTROL_=(20|this.field_)<<8;this.OFFSET_=23}else if(this.dataChannel_===1){this.BASE_=24;this.EXT_=25;this.CONTROL_=(28|this.field_)<<8;this.OFFSET_=31}this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};y.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63};y.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&(t>=32&&t<=63)};y.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&(t>=32&&t<=47)};y.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&(t>=33&&t<=35)};y.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&(t>=64&&t<=127)};y.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127};y.prototype.isNormalChar=function(e){return e>=32&&e<=127};y.prototype.setRollUp=function(e,t){if(this.mode_!=="rollUp"){this.row_=v;this.mode_="rollUp";this.flushDisplayed(e);this.nonDisplayed_=g();this.displayed_=g()}if(t!==undefined&&t!==this.row_){for(var r=0;r<this.rollUpRows_;r++){this.displayed_[t-r]=this.displayed_[this.row_-r];this.displayed_[this.row_-r]=""}}if(t===undefined){t=this.row_}this.topRow_=t-this.rollUpRows_+1};y.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var r=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,r)};y.prototype.clearFormatting=function(e){if(!this.formatting_.length){return}var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[];this[this.mode_](e,t)};y.prototype.popOn=function(e,t){var r=this.nonDisplayed_[this.row_];r+=t;this.nonDisplayed_[this.row_]=r};y.prototype.rollUp=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};y.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++){this.displayed_[e]=""}for(e=this.row_+1;e<v+1;e++){this.displayed_[e]=""}for(e=this.topRow_;e<this.row_;e++){this.displayed_[e]=this.displayed_[e+1]}this.displayed_[this.row_]=""};y.prototype.paintOn=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};var _={CaptionStream:f,Cea608Stream:y};var b=_.CaptionStream;var T={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};var S=function(e,t,r){var i,n="";for(i=t;i<r;i++){n+="%"+("00"+e[i].toString(16)).slice(-2)}return n},k=function(e,t,r){return decodeURIComponent(S(e,t,r))},j=function(e,t,r){return unescape(S(e,t,r))},E=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},w={TXXX:function(e){var t;if(e.data[0]!==3){return}for(t=1;t<e.data.length;t++){if(e.data[t]===0){e.description=k(e.data,1,t);e.value=k(e.data,t+1,e.data.length).replace(/\0*$/,"");break}}e.data=e.value},WXXX:function(e){var t;if(e.data[0]!==3){return}for(t=1;t<e.data.length;t++){if(e.data[t]===0){e.description=k(e.data,1,t);e.url=k(e.data,t+1,e.data.length);break}}},PRIV:function(e){var t;for(t=0;t<e.data.length;t++){if(e.data[t]===0){e.owner=j(e.data,0,t);break}}e.privateData=e.data.subarray(t+1);e.data=e.privateData}},C;C=function(e){var t={debug:!!(e&&e.debug),descriptor:e&&e.descriptor},r=0,i=[],n=0,a;C.prototype.init.call(this);this.dispatchType=T.METADATA_STREAM_TYPE.toString(16);if(t.descriptor){for(a=0;a<t.descriptor.length;a++){this.dispatchType+=("00"+t.descriptor[a].toString(16)).slice(-2)}}this.push=function(e){var a,s,o,l,u,c;if(e.type!=="timed-metadata"){return}if(e.dataAlignmentIndicator){n=0;i.length=0}if(i.length===0&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0))){if(t.debug){console.log("Skipping unrecognized metadata packet")}return}i.push(e);n+=e.data.byteLength;if(i.length===1){r=E(e.data.subarray(6,10));r+=10}if(n<r){return}a={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts};for(u=0;u<r;){a.data.set(i[0].data.subarray(0,r-u),u);u+=i[0].data.byteLength;n-=i[0].data.byteLength;i.shift()}s=10;if(a.data[5]&64){s+=4;s+=E(a.data.subarray(10,14));r-=E(a.data.subarray(16,20))}do{o=E(a.data.subarray(s+4,s+8));if(o<1){return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.")}c=String.fromCharCode(a.data[s],a.data[s+1],a.data[s+2],a.data[s+3]);l={id:c,data:a.data.subarray(s+10,s+o+10)};l.key=l.id;if(w[l.id]){w[l.id](l);if(l.owner==="com.apple.streaming.transportStreamTimestamp"){var d=l.data,f=(d[3]&1)<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;f*=4;f+=d[7]&3;l.timeStamp=f;if(a.pts===undefined&&a.dts===undefined){a.pts=l.timeStamp;a.dts=l.timeStamp}this.trigger("timestamp",l)}}a.frames.push(l);s+=10;s+=o}while(s<r);this.trigger("data",a)}};C.prototype=new n;var A=C;var I=function e(t,r){var i={id:r.index+"",width:r.width,height:r.height,bandwidth:r.bitrate,isEnabled_:true};i.enabled=function(e){if(typeof e==="undefined"){return i.isEnabled_}if(e===i.isEnabled_){return}if(e===true||e===false){i.isEnabled_=e;t()}};return i};var x=function e(t){var r=null;var i=function e(){var i=r.filter(function(e){return e.enabled()});if(i.length===r.length||i.length===0){t.el_.vjs_setProperty("autoLevelCapping",-1);t.el_.vjs_setProperty("level",-1);return}if(i.length===1){t.el_.vjs_setProperty("level",parseInt(i[0].id,10));t.el_.vjs_setProperty("autoLevelCapping",-1);return}var n=i[i.length-1].id;t.el_.vjs_setProperty("autoLevelCapping",parseInt(n,10));t.el_.vjs_setProperty("level",-1)};return function(){if(!r){var e=t.el_.vjs_getProperty("levels");r=e.filter(function(e){return!e.audio}).map(I.bind(null,i))}return r}};var P=function e(t){var r=t.el_.vjs_getProperty("audioTracks");var i=t.audioTracks();var n=null;for(var a=0;a<i.length;a++){if(i[a].enabled){n=i[a].id;break}}if(n===null){return}for(var s=0;s<r.length;s++){if(n===r[s].title){t.el_.vjs_setProperty("audioTrack",s);return}}};var O=function e(t){var i=t.el_.vjs_getProperty("altAudioTracks");var n=t.el_.vjs_getProperty("audioTracks");var a=t.el_.vjs_getProperty("audioTrack");n.forEach(function(e,n){var s=i[e.id];t.audioTracks().addTrack(new r.AudioTrack({id:s.name,enabled:a===n,language:s.lang,default:s.default_track,label:s.name}))})};var D="1.4.8";var L=function e(t){Object.defineProperties(t.frame,{id:{get:function e(){r.log.warn("cue.frame.id is deprecated. Use cue.value.key instead.");return t.value.key}},value:{get:function e(){r.log.warn("cue.frame.value is deprecated. Use cue.value.data instead.");return t.value.data}},privateData:{get:function e(){r.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead.");return t.value.data}}})};var R=function e(t,r,i){var n=t.remoteTextTracks()||[];for(var a=0;a<n.length;a++){var s=n[a];if(s.kind===r&&s.label===i){t.removeRemoteTextTrack(s)}}};var U=function e(t){var r=new Uint8Array(t.length);for(var i=0;i<t.length;i++){r[i]=t.charCodeAt(i)}return r};var N=function e(t,r,i){var n;var a;if(!i){return}if(!i.cues){return}n=i.cues.length;while(n--){a=i.cues[n];if(a.startTime<=r&&a.endTime>=t){i.removeCue(a)}}};var M=function e(t,r){if(t.length){N(0,t.start(0),r)}};var B=function e(t,r){var i=-1;for(var n=0;n<t.length;n++){if(t[n].id===r){i=n;break}}t.selectedIndex_=i;t.trigger({selectedIndex:i,type:"change"})};var F=1/30;var W=function e(t,i){var n=[];if(t&&t.length){for(var a=0;a<t.length;a++){if(i(t.start(a),t.end(a))){n.push([t.start(a),t.end(a)])}}}return r.createTimeRanges(n)};var H=function e(t,r){return W(t,function(e,t){return e-F<=r&&t+F>=r})};var q=function(){function e(e,t,i){var n=this;if(t.options_&&t.options_.playerId){var a=r(t.options_.playerId);if(!a.hasOwnProperty("hls")){Object.defineProperty(a,"hls",{get:function e(){r.log.warn("player.hls is deprecated. Use player.tech_.hls instead.");t.trigger({type:"usage",name:"flashls-player-access"});return n}})}}Object.defineProperties(this,{stats:{get:function e(){return this.tech_.el_.vjs_getProperty("stats")}},bandwidth:{get:function e(){return this.tech_.el_.vjs_getProperty("stats").bandwidth}}});this.tech_=t;this.metadataTrack_=null;this.inbandTextTracks_={};this.metadataStream_=new A;this.captionStream_=new b;this.offsetPts=null;this.offsetDts=null;this.onLoadedmetadata_=this.onLoadedmetadata_.bind(this);this.onSeeking_=this.onSeeking_.bind(this);this.onId3updated_=this.onId3updated_.bind(this);this.onCaptionData_=this.onCaptionData_.bind(this);this.onMetadataStreamData_=this.onMetadataStreamData_.bind(this);this.onCaptionStreamData_=this.onCaptionStreamData_.bind(this);this.onLevelSwitch_=this.onLevelSwitch_.bind(this);this.onLevelLoaded_=this.onLevelLoaded_.bind(this);this.onFragmentLoaded_=this.onFragmentLoaded_.bind(this);this.onAudioTrackChanged=this.onAudioTrackChanged.bind(this);this.onPlay_=this.onPlay_.bind(this);this.tech_.on("loadedmetadata",this.onLoadedmetadata_);this.tech_.on("seeking",this.onSeeking_);this.tech_.on("id3updated",this.onId3updated_);this.tech_.on("captiondata",this.onCaptionData_);this.tech_.on("levelswitch",this.onLevelSwitch_);this.tech_.on("levelloaded",this.onLevelLoaded_);this.tech_.on("fragmentloaded",this.onFragmentLoaded_);this.tech_.on("play",this.onPlay_);this.metadataStream_.on("data",this.onMetadataStreamData_);this.captionStream_.on("data",this.onCaptionStreamData_);this.playlists=new r.EventTarget;this.playlists.media=function(){return n.media_()}}var i=e.prototype;i.src=function e(t){if(!t){return}this.tech_.setSrc(t.src)};i.onPlay_=function e(){if(this.tech_.duration()===Infinity){var t=this.seekable();if(this.tech_.currentTime()<t.start(0)){return this.tech_.setCurrentTime(t.end(t.length-1))}}};i.seekable=function e(){var t=this.tech_.el_.vjs_getProperty("seekableStart");var i=this.tech_.el_.vjs_getProperty("seekableEnd");if(i===0){return r.createTimeRange()}return r.createTimeRange(t,i)};i.media_=function e(){var t=this.tech_.el_.vjs_getProperty("levels");var r=this.tech_.el_.vjs_getProperty("level");var i;if(t.length){i={resolvedUri:t[r].url,attributes:{BANDWIDTH:t[r].bitrate,RESOLUTION:{width:t[r].width,height:t[r].height}}}}return i};i.onLoadedmetadata_=function e(){var t=this;this.representations=x(this.tech_);var i=r.players[this.tech_.options_.playerId];if(i&&i.qualityLevels){this.qualityLevels_=i.qualityLevels();this.representations().forEach(function(e){t.qualityLevels_.addQualityLevel(e)});B(this.qualityLevels_,this.tech_.el_.vjs_getProperty("level")+"")}O(this.tech_);this.tech_.audioTracks().on("change",this.onAudioTrackChanged)};i.onAudioTrackChanged=function e(){P(this.tech_)};i.onLevelSwitch_=function e(t,r){if(this.qualityLevels_){B(this.qualityLevels_,r[0].levelIndex+"")}this.playlists.trigger("mediachange");this.tech_.trigger({type:"mediachange",bubbles:true})};i.onLevelLoaded_=function e(){this.playlists.trigger("loadedplaylist")};i.onFragmentLoaded_=function e(){this.tech_.trigger("bandwidthupdate");this.captionStream_.flush()};i.onSeeking_=function e(){var t=this;N(0,Infinity,this.metadataTrack_);var r=H(this.tech_.buffered(),this.tech_.currentTime());if(!r.length){Object.keys(this.inbandTextTracks_).forEach(function(e){N(0,Infinity,t.inbandTextTracks_[e])});this.captionStream_.reset()}};i.onId3updated_=function e(r,i){var n=t.atob(i[0]);var a=U(n);var s={type:"timed-metadata",dataAlignmentIndicator:true,data:a};this.metadataStream_.push(s)};i.onMetadataStreamData_=function e(r){var i=this;if(!this.metadataTrack_){this.metadataTrack_=this.tech_.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},false).track;this.metadataTrack_.inBandMetadataTrackDispatchType="15"}M(this.tech_.buffered(),this.metadataTrack_);var n=this.tech_.currentTime();r.frames.forEach(function(e){var r=new t.VTTCue(n,n+.1,e.value||e.url||e.data||"");r.frame=e;r.value=e;L(r);i.metadataTrack_.addCue(r)});if(this.metadataTrack_.cues&&this.metadataTrack_.cues.length){var a=this.metadataTrack_.cues;var s=[];var o=this.tech_.duration();if(isNaN(o)||Math.abs(o)===Infinity){o=Number.MAX_VALUE}for(var l=0;l<a.length;l++){s.push(a[l])}s.sort(function(e,t){return e.startTime-t.startTime});for(var u=0;u<s.length-1;u++){if(s[u].endTime!==s[u+1].startTime){s[u].endTime=s[u+1].startTime}}s[s.length-1].endTime=o}};i.onCaptionData_=function e(r,i){var n=this;i[0].forEach(function(e){if(!n.offsetPts){n.offsetPts=e.pos}if(!n.offsetDts){n.offsetDts=e.dts}n.captionStream_.push({pts:(e.pos-n.offsetPts)*9e4,dts:(e.dts-n.offsetDts)*9e4,escapedRBSP:U(t.atob(e.data)),nalUnitType:"sei_rbsp"})})};i.onCaptionStreamData_=function e(r){if(r){if(!this.inbandTextTracks_[r.stream]){R(this.tech_,"captions",r.stream);this.inbandTextTracks_[r.stream]=this.tech_.addRemoteTextTrack({kind:"captions",label:r.stream,id:r.stream},false).track}M(this.tech_.buffered(),this.inbandTextTracks_[r.stream]);this.inbandTextTracks_[r.stream].addCue(new t.VTTCue(r.startPts/9e4,r.endPts/9e4,r.text))}};i.dispose=function e(){this.tech_.off("loadedmetadata",this.onLoadedmetadata_);this.tech_.off("seeked",this.onSeeking_);this.tech_.off("id3updated",this.onId3updated_);this.tech_.off("captiondata",this.onCaptionData_);this.tech_.audioTracks().off("change",this.onAudioTrackChanged);this.tech_.off("levelswitch",this.onLevelSwitch_);this.tech_.off("levelloaded",this.onLevelLoaded_);this.tech_.off("fragmentloaded",this.onFragmentLoaded_);this.tech_.off("play",this.onPlay_);if(this.qualityLevels_){this.qualityLevels_.dispose()}};return e}();var V={};var K=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;V.canPlayType=function(e){return K.test(e)?"maybe":""};V.canHandleSource=function(e,t){return V.canPlayType(e.type)==="maybe"};V.handleSource=function(e,t,r){t.hls=new q(e,t,r);t.hls.src(e);return t.hls};r.getTech("Flash").registerSourceHandler(V,0);V.VERSION=D;e.FlashlsHandler=q;e.default=V;Object.defineProperty(e,"__esModule",{value:true})});(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("video.js")):typeof r==="function"&&r.amd?r(["exports","video.js"],t):t(e.videojsHttpStreaming={},e.videojs)})(this,function(r,i){"use strict";i=i&&i.hasOwnProperty("default")?i["default"]:i;var n=typeof globalThis!=="undefined"?globalThis:typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function a(e,t){return t={exports:{}},e(t,t.exports),t.exports}var s={};var o=typeof n!=="undefined"?n:typeof e!=="undefined"?e:{};var l;if(typeof t!=="undefined"){l=t}else{l=o["__GLOBAL_DOCUMENT_CACHE@4"];if(!l){l=o["__GLOBAL_DOCUMENT_CACHE@4"]=s}}var u=l;var c=a(function(e,t){(function(t){var r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/;var i=/^([^\/?#]*)(.*)$/;var n=/(?:\/|^)\.(?=\/)/g;var a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g;var s={buildAbsoluteURL:function e(t,r,n){n=n||{};t=t.trim();r=r.trim();if(!r){if(!n.alwaysNormalize){return t}var a=s.parseURL(t);if(!a){throw new Error("Error trying to parse base URL.")}a.path=s.normalizePath(a.path);return s.buildURLFromParts(a)}var o=s.parseURL(r);if(!o){throw new Error("Error trying to parse relative URL.")}if(o.scheme){if(!n.alwaysNormalize){return r}o.path=s.normalizePath(o.path);return s.buildURLFromParts(o)}var l=s.parseURL(t);if(!l){throw new Error("Error trying to parse base URL.")}if(!l.netLoc&&l.path&&l.path[0]!=="/"){var u=i.exec(l.path);l.netLoc=u[1];l.path=u[2]}if(l.netLoc&&!l.path){l.path="/"}var c={scheme:l.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc){c.netLoc=l.netLoc;if(o.path[0]!=="/"){if(!o.path){c.path=l.path;if(!o.params){c.params=l.params;if(!o.query){c.query=l.query}}}else{var d=l.path;var f=d.substring(0,d.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(f)}}}if(c.path===null){c.path=n.alwaysNormalize?s.normalizePath(o.path):o.path}return s.buildURLFromParts(c)},parseURL:function e(t){var i=r.exec(t);if(!i){return null}return{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}},normalizePath:function e(t){t=t.split("").reverse().join("").replace(n,"");while(t.length!==(t=t.replace(a,"")).length){}return t.split("").reverse().join("")},buildURLFromParts:function e(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};e.exports=s})(n)});var d;if(typeof e!=="undefined"){d=e}else if(typeof n!=="undefined"){d=n}else if(typeof self!=="undefined"){d=self}else{d={}}var f=d;var h=function e(t,r){if(/^[a-z]+:/i.test(r)){return r}if(!/\/\//i.test(t)){t=c.buildAbsoluteURL(f.location.href,t)}return c.buildAbsoluteURL(t,r)};var p=function e(t,r,i){if(t&&i.responseURL&&r!==i.responseURL){return i.responseURL}return r};function v(){v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){e[i]=r[i]}}}return e};return v.apply(this,arguments)}function m(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function g(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var y=function(){function e(){this.listeners={}}var t=e.prototype;t.on=function e(t,r){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(r)};t.off=function e(t,r){if(!this.listeners[t]){return false}var i=this.listeners[t].indexOf(r);this.listeners[t].splice(i,1);return i>-1};t.trigger=function e(t){var r=this.listeners[t];var i;var n;var a;if(!r){return}if(arguments.length===2){n=r.length;for(i=0;i<n;++i){r[i].call(this,arguments[1])}}else{a=Array.prototype.slice.call(arguments,1);n=r.length;for(i=0;i<n;++i){r[i].apply(this,a)}}};t.dispose=function e(){this.listeners={}};t.pipe=function e(t){this.on("data",function(e){t.push(e)})};return e}();var _=function(e){m(t,e);function t(){var t;t=e.call(this)||this;t.buffer="";return t}var r=t.prototype;r.push=function e(t){var r;this.buffer+=t;r=this.buffer.indexOf("\n");for(;r>-1;r=this.buffer.indexOf("\n")){this.trigger("data",this.buffer.substring(0,r));this.buffer=this.buffer.substring(r+1)}};return t}(y);var b=function e(){var t="[^=]*";var r='"[^"]*"|[^,]*';var i="(?:"+t+")=(?:"+r+")";return new RegExp("(?:^|,)("+i+")")};var T=function e(t){var r=t.split(b());var i={};var n=r.length;var a;while(n--){if(r[n]===""){continue}a=/([^=]*)=(.*)/.exec(r[n]).slice(1);a[0]=a[0].replace(/^\s+|\s+$/g,"");a[1]=a[1].replace(/^\s+|\s+$/g,"");a[1]=a[1].replace(/^['"](.*)['"]$/g,"$1");i[a[0]]=a[1]}return i};var S=function(e){m(t,e);function t(){var t;t=e.call(this)||this;t.customParsers=[];t.tagMappers=[];return t}var r=t.prototype;r.push=function e(t){var r=this;var i;var n;t=t.trim();if(t.length===0){return}if(t[0]!=="#"){this.trigger("data",{type:"uri",uri:t});return}var a=this.tagMappers.reduce(function(e,r){var i=r(t);if(i===t){return e}return e.concat([i])},[t]);a.forEach(function(e){for(var t=0;t<r.customParsers.length;t++){if(r.customParsers[t].call(r,e)){return}}if(e.indexOf("#EXT")!==0){r.trigger("data",{type:"comment",text:e.slice(1)});return}e=e.replace("\r","");i=/^#EXTM3U/.exec(e);if(i){r.trigger("data",{type:"tag",tagType:"m3u"});return}i=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"inf"};if(i[1]){n.duration=parseFloat(i[1])}if(i[2]){n.title=i[2]}r.trigger("data",n);return}i=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"targetduration"};if(i[1]){n.duration=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"totalduration"};if(i[1]){n.duration=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"version"};if(i[1]){n.version=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"media-sequence"};if(i[1]){n.number=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"discontinuity-sequence"};if(i[1]){n.number=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"playlist-type"};if(i[1]){n.playlistType=i[1]}r.trigger("data",n);return}i=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"byterange"};if(i[1]){n.length=parseInt(i[1],10)}if(i[2]){n.offset=parseInt(i[2],10)}r.trigger("data",n);return}i=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e);if(i){n={type:"tag",tagType:"allow-cache"};if(i[1]){n.allowed=!/NO/.test(i[1])}r.trigger("data",n);return}i=/^#EXT-X-MAP:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"map"};if(i[1]){var a=T(i[1]);if(a.URI){n.uri=a.URI}if(a.BYTERANGE){var s=a.BYTERANGE.split("@"),o=s[0],l=s[1];n.byterange={};if(o){n.byterange.length=parseInt(o,10)}if(l){n.byterange.offset=parseInt(l,10)}}}r.trigger("data",n);return}i=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"stream-inf"};if(i[1]){n.attributes=T(i[1]);if(n.attributes.RESOLUTION){var u=n.attributes.RESOLUTION.split("x");var c={};if(u[0]){c.width=parseInt(u[0],10)}if(u[1]){c.height=parseInt(u[1],10)}n.attributes.RESOLUTION=c}if(n.attributes.BANDWIDTH){n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)}if(n.attributes["PROGRAM-ID"]){n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10)}}r.trigger("data",n);return}i=/^#EXT-X-MEDIA:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"media"};if(i[1]){n.attributes=T(i[1])}r.trigger("data",n);return}i=/^#EXT-X-ENDLIST/.exec(e);if(i){r.trigger("data",{type:"tag",tagType:"endlist"});return}i=/^#EXT-X-DISCONTINUITY/.exec(e);if(i){r.trigger("data",{type:"tag",tagType:"discontinuity"});return}i=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"program-date-time"};if(i[1]){n.dateTimeString=i[1];n.dateTimeObject=new Date(i[1])}r.trigger("data",n);return}i=/^#EXT-X-KEY:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"key"};if(i[1]){n.attributes=T(i[1]);if(n.attributes.IV){if(n.attributes.IV.substring(0,2).toLowerCase()==="0x"){n.attributes.IV=n.attributes.IV.substring(2)}n.attributes.IV=n.attributes.IV.match(/.{8}/g);n.attributes.IV[0]=parseInt(n.attributes.IV[0],16);n.attributes.IV[1]=parseInt(n.attributes.IV[1],16);n.attributes.IV[2]=parseInt(n.attributes.IV[2],16);n.attributes.IV[3]=parseInt(n.attributes.IV[3],16);n.attributes.IV=new Uint32Array(n.attributes.IV)}}r.trigger("data",n);return}i=/^#EXT-X-START:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"start"};if(i[1]){n.attributes=T(i[1]);n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]);n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)}r.trigger("data",n);return}i=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"cue-out-cont"};if(i[1]){n.data=i[1]}else{n.data=""}r.trigger("data",n);return}i=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"cue-out"};if(i[1]){n.data=i[1]}else{n.data=""}r.trigger("data",n);return}i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"cue-in"};if(i[1]){n.data=i[1]}else{n.data=""}r.trigger("data",n);return}r.trigger("data",{type:"tag",data:e.slice(4)})})};r.addParser=function e(t){var r=this;var i=t.expression,n=t.customType,a=t.dataParser,s=t.segment;if(typeof a!=="function"){a=function e(t){return t}}this.customParsers.push(function(e){var t=i.exec(e);if(t){r.trigger("data",{type:"custom",data:a(e),customType:n,segment:s});return true}})};r.addTagMapper=function e(t){var r=t.expression,i=t.map;var n=function e(t){if(r.test(t)){return i(t)}return t};this.tagMappers.push(n)};return t}(y);function k(e){var t=f.atob(e||"");var r=new Uint8Array(t.length);for(var i=0;i<t.length;i++){r[i]=t.charCodeAt(i)}return r}var j=function(e){m(t,e);function t(){var t;t=e.call(this)||this;t.lineStream=new _;t.parseStream=new S;t.lineStream.pipe(t.parseStream);var r=g(t);var i=[];var n={};var a;var s;var o=function e(){};var l={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}};var u="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";var c=0;t.manifest={allowCache:true,discontinuityStarts:[],segments:[]};t.parseStream.on("data",function(e){var t;var d;({tag:function f(){(({"allow-cache":function t(){this.manifest.allowCache=e.allowed;if(!("allowed"in e)){this.trigger("info",{message:"defaulting allowCache to YES"});this.manifest.allowCache=true}},byterange:function t(){var t={};if("length"in e){n.byterange=t;t.length=e.length;if(!("offset"in e)){this.trigger("info",{message:"defaulting offset to zero"});e.offset=0}}if("offset"in e){n.byterange=t;t.offset=e.offset}},endlist:function e(){this.manifest.endList=true},inf:function t(){if(!("mediaSequence"in this.manifest)){this.manifest.mediaSequence=0;this.trigger("info",{message:"defaulting media sequence to zero"})}if(!("discontinuitySequence"in this.manifest)){this.manifest.discontinuitySequence=0;this.trigger("info",{message:"defaulting discontinuity sequence to zero"})}if(e.duration>0){n.duration=e.duration}if(e.duration===0){n.duration=.01;this.trigger("info",{message:"updating zero segment duration to a small value"})}this.manifest.segments=i},key:function t(){if(!e.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(e.attributes.METHOD==="NONE"){s=null;return}if(!e.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(e.attributes.KEYFORMAT===u){var r=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];if(r.indexOf(e.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(e.attributes.METHOD==="SAMPLE-AES-CENC"){this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"})}if(e.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(e.attributes.KEYID&&e.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:k(e.attributes.URI.split(",")[1])}};return}if(!e.attributes.METHOD){this.trigger("warn",{message:"defaulting key method to AES-128"})}s={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI};if(typeof e.attributes.IV!=="undefined"){s.iv=e.attributes.IV}},"media-sequence":function t(){if(!isFinite(e.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number});return}this.manifest.mediaSequence=e.number},"discontinuity-sequence":function t(){if(!isFinite(e.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number});return}this.manifest.discontinuitySequence=e.number;c=e.number},"playlist-type":function t(){if(!/VOD|EVENT/.test(e.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist});return}this.manifest.playlistType=e.playlistType},map:function t(){a={};if(e.uri){a.uri=e.uri}if(e.byterange){a.byterange=e.byterange}},"stream-inf":function t(){this.manifest.playlists=i;this.manifest.mediaGroups=this.manifest.mediaGroups||l;if(!e.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}if(!n.attributes){n.attributes={}}v(n.attributes,e.attributes)},media:function r(){this.manifest.mediaGroups=this.manifest.mediaGroups||l;if(!(e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var i=this.manifest.mediaGroups[e.attributes.TYPE];i[e.attributes["GROUP-ID"]]=i[e.attributes["GROUP-ID"]]||{};t=i[e.attributes["GROUP-ID"]];d={default:/yes/i.test(e.attributes.DEFAULT)};if(d.default){d.autoselect=true}else{d.autoselect=/yes/i.test(e.attributes.AUTOSELECT)}if(e.attributes.LANGUAGE){d.language=e.attributes.LANGUAGE}if(e.attributes.URI){d.uri=e.attributes.URI}if(e.attributes["INSTREAM-ID"]){d.instreamId=e.attributes["INSTREAM-ID"]}if(e.attributes.CHARACTERISTICS){d.characteristics=e.attributes.CHARACTERISTICS}if(e.attributes.FORCED){d.forced=/yes/i.test(e.attributes.FORCED)}t[e.attributes.NAME]=d},discontinuity:function e(){c+=1;n.discontinuity=true;this.manifest.discontinuityStarts.push(i.length)},"program-date-time":function t(){if(typeof this.manifest.dateTimeString==="undefined"){this.manifest.dateTimeString=e.dateTimeString;this.manifest.dateTimeObject=e.dateTimeObject}n.dateTimeString=e.dateTimeString;n.dateTimeObject=e.dateTimeObject},targetduration:function t(){if(!isFinite(e.duration)||e.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration});return}this.manifest.targetDuration=e.duration},totalduration:function t(){if(!isFinite(e.duration)||e.duration<0){this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration});return}this.manifest.totalDuration=e.duration},start:function t(){if(!e.attributes||isNaN(e.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}},"cue-out":function t(){n.cueOut=e.data},"cue-out-cont":function t(){n.cueOutCont=e.data},"cue-in":function t(){n.cueIn=e.data}})[e.tagType]||o).call(r)},uri:function t(){n.uri=e.uri;i.push(n);if(this.manifest.targetDuration&&!("duration"in n)){this.trigger("warn",{message:"defaulting segment duration to the target duration"});n.duration=this.manifest.targetDuration}if(s){n.key=s}n.timeline=c;if(a){n.map=a}n={}},comment:function e(){},custom:function t(){if(e.segment){n.custom=n.custom||{};n.custom[e.customType]=e.data}else{this.manifest.custom=this.manifest.custom||{};this.manifest.custom[e.customType]=e.data}}})[e.type].call(r)});return t}var r=t.prototype;r.push=function e(t){this.lineStream.push(t)};r.end=function e(){this.lineStream.push("\n")};r.addParser=function e(t){this.parseStream.addParser(t)};r.addTagMapper=function e(t){this.parseStream.addTagMapper(t)};return t}(y);var E=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var w=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(t,r,i){if(r)e(t.prototype,r);if(i)e(t,i);return t}}();var C=function e(t,r,i){if(t===null)t=Function.prototype;var n=Object.getOwnPropertyDescriptor(t,r);if(n===undefined){var a=Object.getPrototypeOf(t);if(a===null){return undefined}else{return e(a,r,i)}}else if("value"in n){return n.value}else{var s=n.get;if(s===undefined){return undefined}return s.call(i)}};var A=function(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t};var I=function(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e};var x=function(){function e(e,t){var r=[];var i=true;var n=false;var a=undefined;try{for(var s=e[Symbol.iterator](),o;!(i=(o=s.next()).done);i=true){r.push(o.value);if(t&&r.length===t)break}}catch(e){n=true;a=e}finally{try{if(!i&&s["return"])s["return"]()}finally{if(n)throw a}}return r}return function(t,r){if(Array.isArray(t)){return t}else if(Symbol.iterator in Object(t)){return e(t,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var P=i.mergeOptions,O=i.EventTarget,D=i.log;var L=function e(t,r){["AUDIO","SUBTITLES"].forEach(function(e){for(var i in t.mediaGroups[e]){for(var n in t.mediaGroups[e][i]){var a=t.mediaGroups[e][i][n];r(a,e,i,n)}}})};var R=function e(t,r,i){var n=r.slice();i=i||0;var a=Math.min(t.length,r.length+i);for(var s=i;s<a;s++){n[s-i]=P(t[s],n[s-i])}return n};var U=function e(t,r){if(!t.resolvedUri){t.resolvedUri=h(r,t.uri)}if(t.key&&!t.key.resolvedUri){t.key.resolvedUri=h(r,t.key.uri)}if(t.map&&!t.map.resolvedUri){t.map.resolvedUri=h(r,t.map.uri)}};var N=function e(t,r){var i=P(t,{});var n=i.playlists[r.uri];if(!n){return null}if(n.segments&&r.segments&&n.segments.length===r.segments.length&&n.endList===r.endList&&n.mediaSequence===r.mediaSequence){return null}var a=P(n,r);if(n.segments){a.segments=R(n.segments,r.segments,r.mediaSequence-n.mediaSequence)}a.segments.forEach(function(e){U(e,a.resolvedUri)});for(var s=0;s<i.playlists.length;s++){if(i.playlists[s].uri===r.uri){i.playlists[s]=a}}i.playlists[r.uri]=a;return i};var M=function e(t){var r=t.playlists.length;while(r--){var i=t.playlists[r];t.playlists[i.uri]=i;i.resolvedUri=h(t.uri,i.uri);i.id=r;if(!i.attributes){i.attributes={};D.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}};var B=function e(t){L(t,function(e){if(e.uri){e.resolvedUri=h(t.uri,e.uri)}})};var F=function e(t,r){var i=t.segments[t.segments.length-1];var n=void 0;if(r&&i&&i.duration){n=i.duration*1e3}else{n=(t.targetDuration||10)*500}return n};var W=function(e){A(t,e);function t(e,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};E(this,t);var n=I(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var a=i.withCredentials,s=a===undefined?false:a,o=i.handleManifestRedirects,l=o===undefined?false:o;n.srcUrl=e;n.hls_=r;n.withCredentials=s;n.handleManifestRedirects=l;var u=r.options_;n.customTagParsers=u&&u.customTagParsers||[];n.customTagMappers=u&&u.customTagMappers||[];if(!n.srcUrl){throw new Error("A non-empty playlist URL is required")}n.state="HAVE_NOTHING";n.on("mediaupdatetimeout",function(){if(n.state!=="HAVE_METADATA"){return}n.state="HAVE_CURRENT_METADATA";n.request=n.hls_.xhr({uri:h(n.master.uri,n.media().uri),withCredentials:n.withCredentials},function(e,t){if(!n.request){return}if(e){return n.playlistRequestError(n.request,n.media().uri,"HAVE_METADATA")}n.haveMetadata(n.request,n.media().uri)})});return n}w(t,[{key:"playlistRequestError",value:function e(t,r,i){this.request=null;if(i){this.state=i}this.error={playlist:this.master.playlists[r],status:t.status,message:"HLS playlist request error at URL: "+r+".",responseText:t.responseText,code:t.status>=500?4:2};this.trigger("error")}},{key:"haveMetadata",value:function e(t,r){var i=this;this.request=null;this.state="HAVE_METADATA";var n=new j;this.customTagParsers.forEach(function(e){return n.addParser(e)});this.customTagMappers.forEach(function(e){return n.addTagMapper(e)});n.push(t.responseText);n.end();n.manifest.uri=r;n.manifest.attributes=n.manifest.attributes||{};var a=N(this.master,n.manifest);this.targetDuration=n.manifest.targetDuration;if(a){this.master=a;this.media_=this.master.playlists[n.manifest.uri]}else{this.trigger("playlistunchanged")}if(!this.media().endList){f.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=f.setTimeout(function(){i.trigger("mediaupdatetimeout")},F(this.media(),!!a))}this.trigger("loadedplaylist")}},{key:"dispose",value:function e(){this.stopRequest();f.clearTimeout(this.mediaUpdateTimeout);f.clearTimeout(this.finalRenditionTimeout)}},{key:"stopRequest",value:function e(){if(this.request){var t=this.request;this.request=null;t.onreadystatechange=null;t.abort()}}},{key:"media",value:function e(t,r){var i=this;if(!t){return this.media_}if(this.state==="HAVE_NOTHING"){throw new Error("Cannot switch media playlist from "+this.state)}if(typeof t==="string"){if(!this.master.playlists[t]){throw new Error("Unknown playlist URI: "+t)}t=this.master.playlists[t]}f.clearTimeout(this.finalRenditionTimeout);if(r){var n=t.targetDuration/2*1e3||5*1e3;this.finalRenditionTimeout=f.setTimeout(this.media.bind(this,t,false),n);return}var a=this.state;var s=!this.media_||t.uri!==this.media_.uri;if(this.master.playlists[t.uri].endList){if(this.request){this.request.onreadystatechange=null;this.request.abort();this.request=null}this.state="HAVE_METADATA";this.media_=t;if(s){this.trigger("mediachanging");this.trigger("mediachange")}return}if(!s){return}this.state="SWITCHING_MEDIA";if(this.request){if(t.resolvedUri===this.request.url){return}this.request.onreadystatechange=null;this.request.abort();this.request=null}if(this.media_){this.trigger("mediachanging")}this.request=this.hls_.xhr({uri:t.resolvedUri,withCredentials:this.withCredentials},function(e,r){if(!i.request){return}t.resolvedUri=p(i.handleManifestRedirects,t.resolvedUri,r);if(e){return i.playlistRequestError(i.request,t.uri,a)}i.haveMetadata(r,t.uri);if(a==="HAVE_MASTER"){i.trigger("loadedmetadata")}else{i.trigger("mediachange")}})}},{key:"pause",value:function e(){this.stopRequest();f.clearTimeout(this.mediaUpdateTimeout);if(this.state==="HAVE_NOTHING"){this.started=false}if(this.state==="SWITCHING_MEDIA"){if(this.media_){this.state="HAVE_METADATA"}else{this.state="HAVE_MASTER"}}else if(this.state==="HAVE_CURRENT_METADATA"){this.state="HAVE_METADATA"}}},{key:"load",value:function e(t){var r=this;f.clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(t){var n=i?i.targetDuration/2*1e3:5*1e3;this.mediaUpdateTimeout=f.setTimeout(function(){return r.load()},n);return}if(!this.started){this.start();return}if(i&&!i.endList){this.trigger("mediaupdatetimeout")}else{this.trigger("loadedplaylist")}}},{key:"start",value:function e(){var t=this;this.started=true;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,r){if(!t.request){return}t.request=null;if(e){t.error={status:r.status,message:"HLS playlist request error at URL: "+t.srcUrl+".",responseText:r.responseText,code:2};if(t.state==="HAVE_NOTHING"){t.started=false}return t.trigger("error")}var i=new j;t.customTagParsers.forEach(function(e){return i.addParser(e)});t.customTagMappers.forEach(function(e){return i.addTagMapper(e)});i.push(r.responseText);i.end();t.state="HAVE_MASTER";t.srcUrl=p(t.handleManifestRedirects,t.srcUrl,r);i.manifest.uri=t.srcUrl;if(i.manifest.playlists){t.master=i.manifest;M(t.master);B(t.master);t.trigger("loadedplaylist");if(!t.request){t.media(i.manifest.playlists[0])}return}t.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:f.location.href,playlists:[{uri:t.srcUrl,id:0,resolvedUri:t.srcUrl,attributes:{}}]};t.master.playlists[t.srcUrl]=t.master.playlists[0];t.haveMetadata(r,t.srcUrl);return t.trigger("loadedmetadata")})}}]);return t}(O);var H=i.createTimeRange;var q=function e(t,r){var i=0;var n=r-t.mediaSequence;var a=t.segments[n];if(a){if(typeof a.start!=="undefined"){return{result:a.start,precise:true}}if(typeof a.end!=="undefined"){return{result:a.end-a.duration,precise:true}}}while(n--){a=t.segments[n];if(typeof a.end!=="undefined"){return{result:i+a.end,precise:true}}i+=a.duration;if(typeof a.start!=="undefined"){return{result:i+a.start,precise:true}}}return{result:i,precise:false}};var V=function e(t,r){var i=0;var n=void 0;var a=r-t.mediaSequence;for(;a<t.segments.length;a++){n=t.segments[a];if(typeof n.start!=="undefined"){return{result:n.start-i,precise:true}}i+=n.duration;if(typeof n.end!=="undefined"){return{result:n.end-i,precise:true}}}return{result:-1,precise:false}};var K=function e(t,r,i){var n=void 0;var a=void 0;if(typeof r==="undefined"){r=t.mediaSequence+t.segments.length}if(r<t.mediaSequence){return 0}n=q(t,r);if(n.precise){return n.result}a=V(t,r);if(a.precise){return a.result}return n.result+i};var z=function e(t,r,i){if(!t){return 0}if(typeof i!=="number"){i=0}if(typeof r==="undefined"){if(t.totalDuration){return t.totalDuration}if(!t.endList){return f.Infinity}}return K(t,r,i)};var G=function e(t,r,i){var n=0;if(r>i){var a=[i,r];r=a[0];i=a[1]}if(r<0){for(var s=r;s<Math.min(0,i);s++){n+=t.targetDuration}r=0}for(var o=r;o<i;o++){n+=t.segments[o].duration}return n};var Y=function e(t){if(!t.segments.length){return 0}var r=t.segments.length-1;var i=t.segments[r].duration||t.targetDuration;var n=i+t.targetDuration*2;while(r--){i+=t.segments[r].duration;if(i>=n){break}}return Math.max(0,r)};var X=function e(t,r,i){if(!t||!t.segments){return null}if(t.endList){return z(t)}if(r===null){return null}r=r||0;var n=i?Y(t):t.segments.length;return K(t,t.mediaSequence+n,r)};var $=function e(t,r){var i=true;var n=r||0;var a=X(t,r,i);if(a===null){return H()}return H(n,a)};var J=function e(t){return t-Math.floor(t)===0};var Q=function e(t,r){if(J(r)){return r+t*.1}var i=r.toString().split(".")[1].length;for(var n=1;n<=i;n++){var a=Math.pow(10,n);var s=r*a;if(J(s)||n===i){return(s+t)/a}}};var Z=Q.bind(null,1);var ee=Q.bind(null,-1);var te=function e(t,r,i,n){var a=void 0;var s=void 0;var o=t.segments.length;var l=r-n;if(l<0){if(i>0){for(a=i-1;a>=0;a--){s=t.segments[a];l+=ee(s.duration);if(l>0){return{mediaIndex:a,startTime:n-G(t,i,a)}}}}return{mediaIndex:0,startTime:r}}if(i<0){for(a=i;a<0;a++){l-=t.targetDuration;if(l<0){return{mediaIndex:0,startTime:r}}}i=0}for(a=i;a<o;a++){s=t.segments[a];l-=Z(s.duration);if(l<0){return{mediaIndex:a,startTime:n+G(t,i,a)}}}return{mediaIndex:o-1,startTime:r}};var re=function e(t){return t.excludeUntil&&t.excludeUntil>Date.now()};var ie=function e(t){return t.excludeUntil&&t.excludeUntil===Infinity};var ne=function e(t){var r=re(t);return!t.disabled&&!r};var ae=function e(t){return t.disabled};var se=function e(t){for(var r=0;r<t.segments.length;r++){if(t.segments[r].key){return true}}return false};var oe=function e(t){for(var r=0;r<t.segments.length;r++){if(t.segments[r].map){return true}}return false};var le=function e(t,r){return r.attributes&&r.attributes[t]};var ue=function e(t,r,i){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;if(!le("BANDWIDTH",i)){return NaN}var a=t*i.attributes.BANDWIDTH;return(a-n*8)/r};var ce=function e(t,r){if(t.playlists.length===1){return true}var i=r.attributes.BANDWIDTH||Number.MAX_VALUE;return t.playlists.filter(function(e){if(!ne(e)){return false}return(e.attributes.BANDWIDTH||0)<i}).length===0};var de={duration:z,seekable:$,safeLiveIndex:Y,getMediaInfoForTime:te,isEnabled:ne,isDisabled:ae,isBlacklisted:re,isIncompatible:ie,playlistEnd:X,isAes:se,isFmp4:oe,hasAttribute:le,estimateSegmentRequestTime:ue,isLowestEnabledRendition:ce};var fe=i.xhr,he=i.mergeOptions;var pe=function e(){var t=function e(t,r){t=he({timeout:45e3},t);var n=e.beforeRequest||i.Hls.xhr.beforeRequest;if(n&&typeof n==="function"){var a=n(t);if(a){t=a}}var s=fe(t,function(e,t){var i=s.response;if(!e&&i){s.responseTime=Date.now();s.roundTripTime=s.responseTime-s.requestTime;s.bytesReceived=i.byteLength||i.length;if(!s.bandwidth){s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3)}}if(t.headers){s.responseHeaders=t.headers}if(e&&e.code==="ETIMEDOUT"){s.timedout=true}if(!e&&!s.aborted&&t.statusCode!==200&&t.statusCode!==206&&t.statusCode!==0){e=new Error("XHR Failed with a response of: "+(s&&(i||s.responseText)))}r(e,s)});var o=s.abort;s.abort=function(){s.aborted=true;return o.apply(s,arguments)};s.uri=t.uri;s.requestTime=Date.now();return s};return t};var ve=function e(t){var r=void 0;var i=void 0;i=t.offset+t.length-1;r=t.offset;return"bytes="+r+"-"+i};var me=function e(t){var r={};if(t.byterange){r.Range=ve(t.byterange)}return r};function ge(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}var ye=function e(t,r){if(!(t instanceof r)){throw new TypeError("Cannot call a class as a function")}};var _e=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(t,r,i){if(r)e(t.prototype,r);if(i)e(t,i);return t}}();var be=function e(t,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(t,r):t.__proto__=r};var Te=function e(t,r){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:t};var Se=function e(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]];var r=t[0];var i=t[1];var n=r[4];var a=i[4];var s=void 0;var o=void 0;var l=void 0;var u=[];var c=[];var d=void 0;var f=void 0;var h=void 0;var p=void 0;var v=void 0;var m=void 0;for(s=0;s<256;s++){c[(u[s]=s<<1^(s>>7)*283)^s]=s}for(o=l=0;!n[o];o^=d||1,l=c[l]||1){p=l^l<<1^l<<2^l<<3^l<<4;p=p>>8^p&255^99;n[o]=p;a[p]=o;h=u[f=u[d=u[o]]];m=h*16843009^f*65537^d*257^o*16843008;v=u[p]*257^p*16843008;for(s=0;s<4;s++){r[s][o]=v=v<<24^v>>>8;i[s][p]=m=m<<24^m>>>8}}for(s=0;s<5;s++){r[s]=r[s].slice(0);i[s]=i[s].slice(0)}return t};var ke=null;var je=function(){function e(t){ye(this,e);if(!ke){ke=Se()}this._tables=[[ke[0][0].slice(),ke[0][1].slice(),ke[0][2].slice(),ke[0][3].slice(),ke[0][4].slice()],[ke[1][0].slice(),ke[1][1].slice(),ke[1][2].slice(),ke[1][3].slice(),ke[1][4].slice()]];var r=void 0;var i=void 0;var n=void 0;var a=void 0;var s=void 0;var o=this._tables[0][4];var l=this._tables[1];var u=t.length;var c=1;if(u!==4&&u!==6&&u!==8){throw new Error("Invalid aes key size")}a=t.slice(0);s=[];this._key=[a,s];for(r=u;r<4*u+28;r++){n=a[r-1];if(r%u===0||u===8&&r%u===4){n=o[n>>>24]<<24^o[n>>16&255]<<16^o[n>>8&255]<<8^o[n&255];if(r%u===0){n=n<<8^n>>>24^c<<24;c=c<<1^(c>>7)*283}}a[r]=a[r-u]^n}for(i=0;r;i++,r--){n=a[i&3?r:r-4];if(r<=4||i<4){s[i]=n}else{s[i]=l[0][o[n>>>24]]^l[1][o[n>>16&255]]^l[2][o[n>>8&255]]^l[3][o[n&255]]}}}e.prototype.decrypt=function e(t,r,i,n,a,s){var o=this._key[1];var l=t^o[0];var u=n^o[1];var c=i^o[2];var d=r^o[3];var f=void 0;var h=void 0;var p=void 0;var v=o.length/4-2;var m=void 0;var g=4;var y=this._tables[1];var _=y[0];var b=y[1];var T=y[2];var S=y[3];var k=y[4];for(m=0;m<v;m++){f=_[l>>>24]^b[u>>16&255]^T[c>>8&255]^S[d&255]^o[g];h=_[u>>>24]^b[c>>16&255]^T[d>>8&255]^S[l&255]^o[g+1];p=_[c>>>24]^b[d>>16&255]^T[l>>8&255]^S[u&255]^o[g+2];d=_[d>>>24]^b[l>>16&255]^T[u>>8&255]^S[c&255]^o[g+3];g+=4;l=f;u=h;c=p}for(m=0;m<4;m++){a[(3&-m)+s]=k[l>>>24]<<24^k[u>>16&255]<<16^k[c>>8&255]<<8^k[d&255]^o[g++];f=l;l=u;u=c;c=d;d=f}};return e}();var Ee=function(){function e(){ye(this,e);this.listeners={}}e.prototype.on=function e(t,r){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(r)};e.prototype.off=function e(t,r){if(!this.listeners[t]){return false}var i=this.listeners[t].indexOf(r);this.listeners[t].splice(i,1);return i>-1};e.prototype.trigger=function e(t){var r=this.listeners[t];if(!r){return}if(arguments.length===2){var i=r.length;for(var n=0;n<i;++n){r[n].call(this,arguments[1])}}else{var a=Array.prototype.slice.call(arguments,1);var s=r.length;for(var o=0;o<s;++o){r[o].apply(this,a)}}};e.prototype.dispose=function e(){this.listeners={}};e.prototype.pipe=function e(t){this.on("data",function(e){t.push(e)})};return e}();var we=function(e){be(t,e);function t(){ye(this,t);var r=Te(this,e.call(this,Ee));r.jobs=[];r.delay=1;r.timeout_=null;return r}t.prototype.processJob_=function e(){this.jobs.shift()();if(this.jobs.length){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}else{this.timeout_=null}};t.prototype.push=function e(t){this.jobs.push(t);if(!this.timeout_){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}};return t}(Ee);var Ce=function e(t){return t<<24|(t&65280)<<8|(t&16711680)>>8|t>>>24};var Ae=function e(t,r,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2);var a=new je(Array.prototype.slice.call(r));var s=new Uint8Array(t.byteLength);var o=new Int32Array(s.buffer);var l=void 0;var u=void 0;var c=void 0;var d=void 0;var f=void 0;var h=void 0;var p=void 0;var v=void 0;var m=void 0;l=i[0];u=i[1];c=i[2];d=i[3];for(m=0;m<n.length;m+=4){f=Ce(n[m]);h=Ce(n[m+1]);p=Ce(n[m+2]);v=Ce(n[m+3]);a.decrypt(f,h,p,v,o,m);o[m]=Ce(o[m]^l);o[m+1]=Ce(o[m+1]^u);o[m+2]=Ce(o[m+2]^c);o[m+3]=Ce(o[m+3]^d);l=f;u=h;c=p;d=v}return s};var Ie=function(){function e(t,r,i,n){ye(this,e);var a=e.STEP;var s=new Int32Array(t.buffer);var o=new Uint8Array(t.byteLength);var l=0;this.asyncStream_=new we;this.asyncStream_.push(this.decryptChunk_(s.subarray(l,l+a),r,i,o));for(l=a;l<s.length;l+=a){i=new Uint32Array([Ce(s[l-4]),Ce(s[l-3]),Ce(s[l-2]),Ce(s[l-1])]);this.asyncStream_.push(this.decryptChunk_(s.subarray(l,l+a),r,i,o))}this.asyncStream_.push(function(){n(null,ge(o))})}e.prototype.decryptChunk_=function e(t,r,i,n){return function(){var e=Ae(t,r,i);n.set(e,t.byteOffset)}};_e(e,null,[{key:"STEP",get:function e(){return 32e3}}]);return e}();var xe=function e(t,r){return t.start(r)+"-"+t.end(r)};var Pe=function e(t,r){var i=t.toString(16);return"00".substring(0,2-i.length)+i+(r%2?" ":"")};var Oe=function e(t){if(t>=32&&t<126){return String.fromCharCode(t)}return"."};var De=function e(t){var r={};Object.keys(t).forEach(function(e){var i=t[e];if(ArrayBuffer.isView(i)){r[e]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}}else{r[e]=i}});return r};var Le=function e(t){var r=t.byterange||{length:Infinity,offset:0};return[r.length,r.offset,t.resolvedUri].join(",")};var Re=function e(t){return t.resolvedUri};var Ue=function e(t){var r=Array.prototype.slice.call(t);var i=16;var n="";var a=void 0;var s=void 0;for(var o=0;o<r.length/i;o++){a=r.slice(o*i,o*i+i).map(Pe).join("");s=r.slice(o*i,o*i+i).map(Oe).join("");n+=a+" "+s+"\n"}return n};var Ne=function e(t){var r=t.bytes;return Ue(r)};var Me=function e(t){var r="";var i=void 0;for(i=0;i<t.length;i++){r+=xe(t,i)+" "}return r};var Be=Object.freeze({createTransferableMessage:De,initSegmentId:Le,segmentKeyId:Re,hexDump:Ue,tagDump:Ne,textRanges:Me});var Fe=.25;var We=function e(t,r){if(!r.dateTimeObject){return null}var i=r.videoTimingInfo.transmuxerPrependedSeconds;var n=r.videoTimingInfo.transmuxedPresentationStart;var a=n+i;var s=t-a;return new Date(r.dateTimeObject.getTime()+s*1e3)};var He=function e(t){return t.transmuxedPresentationEnd-t.transmuxedPresentationStart-t.transmuxerPrependedSeconds};var qe=function e(t,r){var i=void 0;try{i=new Date(t)}catch(e){return null}if(!r||!r.segments||r.segments.length===0){return null}var n=r.segments[0];if(i<n.dateTimeObject){return null}for(var a=0;a<r.segments.length-1;a++){n=r.segments[a];var s=r.segments[a+1].dateTimeObject;if(i<s){break}}var o=r.segments[r.segments.length-1];var l=o.dateTimeObject;var u=o.videoTimingInfo?He(o.videoTimingInfo):o.duration+o.duration*Fe;var c=new Date(l.getTime()+u*1e3);if(i>c){return null}if(i>l){n=o}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:de.duration(r,r.mediaSequence+r.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"}};var Ve=function e(t,r){if(!r||!r.segments||r.segments.length===0){return null}var i=0;var n=void 0;for(var a=0;a<r.segments.length;a++){n=r.segments[a];i=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration;if(t<=i){break}}var s=r.segments[r.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<t){return null}if(t>i){if(t>i+s.duration*Fe){return null}n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}};var Ke=function e(t,r){var i=void 0;var n=void 0;try{i=new Date(t);n=new Date(r)}catch(e){}var a=i.getTime();var s=n.getTime();return(s-a)/1e3};var ze=function e(t){if(!t.segments||t.segments.length===0){return false}for(var r=0;r<t.segments.length;r++){var i=t.segments[r];if(!i.dateTimeObject){return false}}return true};var Ge=function e(t){var r=t.playlist,i=t.time,n=i===undefined?undefined:i,a=t.callback;if(!a){throw new Error("getProgramTime: callback must be provided")}if(!r||n===undefined){return a({message:"getProgramTime: playlist and time must be provided"})}var s=Ve(n,r);if(!s){return a({message:"valid programTime was not found"})}if(s.type==="estimate"){return a({message:"Accurate programTime could not be determined."+" Please seek to e.seekTime and try again",seekTime:s.estimatedStart})}var o={mediaSeconds:n};var l=We(n,s.segment);if(l){o.programDateTime=l.toISOString()}return a(null,o)};var Ye=function e(t){var r=t.programTime,i=t.playlist,n=t.retryCount,a=n===undefined?2:n,s=t.seekTo,o=t.pauseAfterSeek,l=o===undefined?true:o,u=t.tech,c=t.callback;if(!c){throw new Error("seekToProgramTime: callback must be provided")}if(typeof r==="undefined"||!i||!s){return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"})}if(!i.endList&&!u.hasStarted_){return c({message:"player must be playing a live stream to start buffering"})}if(!ze(i)){return c({message:"programDateTime tags must be provided in the manifest "+i.resolvedUri})}var d=qe(r,i);if(!d){return c({message:r+" was not found in the stream"})}var f=d.segment;var h=Ke(f.dateTimeObject,r);if(d.type==="estimate"){if(a===0){return c({message:r+" is not buffered yet. Try again"})}s(d.estimatedStart+h);u.one("seeked",function(){e({programTime:r,playlist:i,retryCount:a-1,seekTo:s,pauseAfterSeek:l,tech:u,callback:c})});return}var p=f.start+h;var v=function e(){return c(null,u.currentTime())};u.one("seeked",v);if(l){u.pause()}s(p)};var Xe=1/30;var $e=Xe*3;var Je=function e(t,r){var n=[];var a=void 0;if(t&&t.length){for(a=0;a<t.length;a++){if(r(t.start(a),t.end(a))){n.push([t.start(a),t.end(a)])}}}return i.createTimeRanges(n)};var Qe=function e(t,r){return Je(t,function(e,t){return e-$e<=r&&t+$e>=r})};var Ze=function e(t,r){return Je(t,function(e){return e-Xe>=r})};var et=function e(t){if(t.length<2){return i.createTimeRanges()}var r=[];for(var n=1;n<t.length;n++){var a=t.end(n-1);var s=t.start(n);r.push([a,s])}return i.createTimeRanges(r)};var tt=function e(t){var r=[];if(!t||!t.length){return""}for(var i=0;i<t.length;i++){r.push(t.start(i)+" => "+t.end(i))}return r.join(", ")};var rt=function e(t,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var n=t.length?t.end(t.length-1):0;return(n-r)/i};var it=function e(t){var r=[];for(var i=0;i<t.length;i++){r.push({start:t.start(i),end:t.end(i)})}return r};var nt=function e(t,r,i){var n=r.player_;if(i.captions&&i.captions.length){if(!t.inbandTextTracks_){t.inbandTextTracks_={}}for(var a in i.captionStreams){if(!t.inbandTextTracks_[a]){n.tech_.trigger({type:"usage",name:"hls-608"});var s=n.textTracks().getTrackById(a);if(s){t.inbandTextTracks_[a]=s}else{t.inbandTextTracks_[a]=n.addRemoteTextTrack({kind:"captions",id:a,label:a},false).track}}}}if(i.metadata&&i.metadata.length&&!t.metadataTrack_){t.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},false).track;t.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType}};var at=function e(t,r,i){var n=void 0;var a=void 0;if(!i){return}if(!i.cues){return}n=i.cues.length;while(n--){a=i.cues[n];if(a.startTime<=r&&a.endTime>=t){i.removeCue(a)}}};var st=function e(t){Object.defineProperties(t.frame,{id:{get:function e(){i.log.warn("cue.frame.id is deprecated. Use cue.value.key instead.");return t.value.key}},value:{get:function e(){i.log.warn("cue.frame.value is deprecated. Use cue.value.data instead.");return t.value.data}},privateData:{get:function e(){i.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead.");return t.value.data}}})};var ot=function e(t){var r=void 0;if(isNaN(t)||Math.abs(t)===Infinity){r=Number.MAX_VALUE}else{r=t}return r};var lt=function e(t,r,i){var n=f.WebKitDataCue||f.VTTCue;if(r){r.forEach(function(e){var t=e.stream;this.inbandTextTracks_[t].addCue(new n(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))},t)}if(i){var a=ot(t.mediaSource_.duration);i.forEach(function(e){var t=e.cueTime+this.timestampOffset;if(typeof t!=="number"||f.isNaN(t)||t<0||!(t<Infinity)){return}e.frames.forEach(function(e){var r=new n(t,t,e.value||e.url||e.data||"");r.frame=e;r.value=e;st(r);this.metadataTrack_.addCue(r)},this)},t);if(t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length){var s=t.metadataTrack_.cues;var o=[];for(var l=0;l<s.length;l++){if(s[l]){o.push(s[l])}}var u=o.reduce(function(e,t){var r=e[t.startTime]||[];r.push(t);e[t.startTime]=r;return e},{});var c=Object.keys(u).sort(function(e,t){return Number(e)-Number(t)});c.forEach(function(e,t){var r=u[e];var i=Number(c[t+1])||a;r.forEach(function(e){e.endTime=i})})}}};var ut=typeof e!=="undefined"?e:{},ct=typeof Symbol==="undefined"?"__target":Symbol(),dt="application/javascript",ft=ut.BlobBuilder||ut.WebKitBlobBuilder||ut.MozBlobBuilder||ut.MSBlobBuilder,ht=ut.URL||ut.webkitURL||ht&&ht.msURL,pt=ut.Worker;function vt(e,t){return function r(i){var n=this;if(!t){return new pt(e)}else if(pt&&!i){var a=t.toString().replace(/^function.+?{/,"").slice(0,-1),s=_t(a);this[ct]=new pt(s);bt(this[ct],s);return this[ct]}else{var o={postMessage:function e(t){if(n.onmessage){setTimeout(function(){n.onmessage({data:t,target:o})})}}};t.call(o);this.postMessage=function(e){setTimeout(function(){o.onmessage({data:e,target:n})})};this.isThisThread=true}}}if(pt){var mt,gt=_t("self.onmessage = function () {}"),yt=new Uint8Array(1);try{mt=new pt(gt);mt.postMessage(yt,[yt.buffer])}catch(e){pt=null}finally{ht.revokeObjectURL(gt);if(mt){mt.terminate()}}}function _t(e){try{return ht.createObjectURL(new Blob([e],{type:dt}))}catch(r){var t=new ft;t.append(e);return ht.createObjectURL(t.getBlob(type))}}function bt(e,t){if(!e||!t)return;var r=e.terminate;e.objURL=t;e.terminate=function(){if(e.objURL)ht.revokeObjectURL(e.objURL);r.call(e)}}var Tt=new vt("./transmuxer-worker.worker.js",function(e,t){var r=this;var i=function(){var e=function e(){this.init=function(){var e={};this.on=function(t,r){if(!e[t]){e[t]=[]}e[t]=e[t].concat(r)};this.off=function(t,r){var i;if(!e[t]){return false}i=e[t].indexOf(r);e[t]=e[t].slice();e[t].splice(i,1);return i>-1};this.trigger=function(t){var r,i,n,a;r=e[t];if(!r){return}if(arguments.length===2){n=r.length;for(i=0;i<n;++i){r[i].call(this,arguments[1])}}else{a=[];i=arguments.length;for(i=1;i<arguments.length;++i){a.push(arguments[i])}n=r.length;for(i=0;i<n;++i){r[i].apply(this,a)}}};this.dispose=function(){e={}}}};e.prototype.pipe=function(e){this.on("data",function(t){e.push(t)});this.on("done",function(t){e.flush(t)});this.on("partialdone",function(t){e.partialFlush(t)});this.on("endedtimeline",function(t){e.endTimeline(t)});this.on("reset",function(t){e.reset(t)});return e};e.prototype.push=function(e){this.trigger("data",e)};e.prototype.flush=function(e){this.trigger("done",e)};e.prototype.partialFlush=function(e){this.trigger("partialdone",e)};e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)};e.prototype.reset=function(e){this.trigger("reset",e)};var t=e;var i=Math.pow(2,32)-1;var n,a,s,o,l,u,c,d,f,h,p,v,m,g,y,_,b,T,S,k,j,E,w,C,A,I,x,P,O,D,L,R,U,N,M,B;(function(){var e;w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]};if(typeof Uint8Array==="undefined"){return}for(e in w){if(w.hasOwnProperty(e)){w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]}}C=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]);I=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]);A=new Uint8Array([0,0,0,1]);x=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]);P=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);O={video:x,audio:P};R=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);L=new Uint8Array([0,0,0,0,0,0,0,0]);U=new Uint8Array([0,0,0,0,0,0,0,0]);N=U;M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);B=U;D=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])})();n=function e(t){var r=[],i=0,n,a,s;for(n=1;n<arguments.length;n++){r.push(arguments[n])}n=r.length;while(n--){i+=r[n].byteLength}a=new Uint8Array(i+8);s=new DataView(a.buffer,a.byteOffset,a.byteLength);s.setUint32(0,a.byteLength);a.set(t,4);for(n=0,i=8;n<r.length;n++){a.set(r[n],i);i+=r[n].byteLength}return a};a=function e(){return n(w.dinf,n(w.dref,R))};s=function e(t){return n(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))};o=function e(){return n(w.ftyp,C,A,C,I)};_=function e(t){return n(w.hdlr,O[t])};l=function e(t){return n(w.mdat,t)};y=function e(t){var r=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,t.duration&255,85,196,0,0]);if(t.samplerate){r[12]=t.samplerate>>>24&255;r[13]=t.samplerate>>>16&255;r[14]=t.samplerate>>>8&255;r[15]=t.samplerate&255}return n(w.mdhd,r)};g=function e(t){return n(w.mdia,y(t),_(t.type),c(t))};u=function e(t){return n(w.mfhd,new Uint8Array([0,0,0,0,(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255]))};c=function e(t){return n(w.minf,t.type==="video"?n(w.vmhd,D):n(w.smhd,L),a(),T(t))};d=function e(t,r){var i=[],a=r.length;while(a--){i[a]=k(r[a])}return n.apply(null,[w.moof,u(t)].concat(i))};f=function e(t){var r=t.length,i=[];while(r--){i[r]=v(t[r])}return n.apply(null,[w.moov,p(4294967295)].concat(i).concat(h(t)))};h=function e(t){var r=t.length,i=[];while(r--){i[r]=j(t[r])}return n.apply(null,[w.mvex].concat(i))};p=function e(t){var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n(w.mvhd,r)};b=function e(t){var r=t.samples||[],i=new Uint8Array(4+r.length),a,s;for(s=0;s<r.length;s++){a=r[s].flags;i[s+4]=a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return n(w.sdtp,i)};T=function e(t){return n(w.stbl,S(t),n(w.stts,B),n(w.stsc,N),n(w.stsz,M),n(w.stco,U))};(function(){var e,t;S=function r(i){return n(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),i.type==="video"?e(i):t(i))};e=function e(t){var r=t.sps||[],i=t.pps||[],a=[],s=[],o,l;for(o=0;o<r.length;o++){a.push((r[o].byteLength&65280)>>>8);a.push(r[o].byteLength&255);a=a.concat(Array.prototype.slice.call(r[o]))}for(o=0;o<i.length;o++){s.push((i[o].byteLength&65280)>>>8);s.push(i[o].byteLength&255);s=s.concat(Array.prototype.slice.call(i[o]))}l=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(t.width&65280)>>8,t.width&255,(t.height&65280)>>8,t.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n(w.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([r.length],a,[i.length],s))),n(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))];if(t.sarRatio){var u=t.sarRatio[0],c=t.sarRatio[1];l.push(n(w.pasp,new Uint8Array([(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255,(c&4278190080)>>24,(c&16711680)>>16,(c&65280)>>8,c&255])))}return n.apply(null,l)};t=function e(t){return n(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(t.channelcount&65280)>>8,t.channelcount&255,(t.samplesize&65280)>>8,t.samplesize&255,0,0,0,0,(t.samplerate&65280)>>8,t.samplerate&255,0,0]),s(t))}})();m=function e(t){var r=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(t.id&4278190080)>>24,(t.id&16711680)>>16,(t.id&65280)>>8,t.id&255,0,0,0,0,(t.duration&4278190080)>>24,(t.duration&16711680)>>16,(t.duration&65280)>>8,t.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(t.width&65280)>>8,t.width&255,0,0,(t.height&65280)>>8,t.height&255,0,0]);return n(w.tkhd,r)};k=function e(t){var r,a,s,o,l,u,c;r=n(w.tfhd,new Uint8Array([0,0,0,58,(t.id&4278190080)>>24,(t.id&16711680)>>16,(t.id&65280)>>8,t.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));u=Math.floor(t.baseMediaDecodeTime/(i+1));c=Math.floor(t.baseMediaDecodeTime%(i+1));a=n(w.tfdt,new Uint8Array([1,0,0,0,u>>>24&255,u>>>16&255,u>>>8&255,u&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255]));l=32+20+8+16+8+8;if(t.type==="audio"){s=E(t,l);return n(w.traf,r,a,s)}o=b(t);s=E(t,o.length+l);return n(w.traf,r,a,s,o)};v=function e(t){t.duration=t.duration||4294967295;return n(w.trak,m(t),g(t))};j=function e(t){var r=new Uint8Array([0,0,0,0,(t.id&4278190080)>>24,(t.id&16711680)>>16,(t.id&65280)>>8,t.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);if(t.type!=="video"){r[r.length-1]=0}return n(w.trex,r)};(function(){var e,t,r;r=function e(t,r){var i=0,n=0,a=0,s=0;if(t.length){if(t[0].duration!==undefined){i=1}if(t[0].size!==undefined){n=2}if(t[0].flags!==undefined){a=4}if(t[0].compositionTimeOffset!==undefined){s=8}}return[0,0,i|n|a|s,1,(t.length&4278190080)>>>24,(t.length&16711680)>>>16,(t.length&65280)>>>8,t.length&255,(r&4278190080)>>>24,(r&16711680)>>>16,(r&65280)>>>8,r&255]};t=function e(t,i){var a,s,o,l;s=t.samples||[];i+=8+12+16*s.length;a=r(s,i);for(l=0;l<s.length;l++){o=s[l];a=a.concat([(o.duration&4278190080)>>>24,(o.duration&16711680)>>>16,(o.duration&65280)>>>8,o.duration&255,(o.size&4278190080)>>>24,(o.size&16711680)>>>16,(o.size&65280)>>>8,o.size&255,o.flags.isLeading<<2|o.flags.dependsOn,o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,o.flags.degradationPriority&240<<8,o.flags.degradationPriority&15,(o.compositionTimeOffset&4278190080)>>>24,(o.compositionTimeOffset&16711680)>>>16,(o.compositionTimeOffset&65280)>>>8,o.compositionTimeOffset&255])}return n(w.trun,new Uint8Array(a))};e=function e(t,i){var a,s,o,l;s=t.samples||[];i+=8+12+8*s.length;a=r(s,i);for(l=0;l<s.length;l++){o=s[l];a=a.concat([(o.duration&4278190080)>>>24,(o.duration&16711680)>>>16,(o.duration&65280)>>>8,o.duration&255,(o.size&4278190080)>>>24,(o.size&16711680)>>>16,(o.size&65280)>>>8,o.size&255])}return n(w.trun,new Uint8Array(a))};E=function r(i,n){if(i.type==="audio"){return e(i,n)}return t(i,n)}})();var F={ftyp:o,mdat:l,moof:d,moov:f,initSegment:function e(t){var r=o(),i=f(t),n;n=new Uint8Array(r.byteLength+i.byteLength);n.set(r);n.set(i,r.byteLength);return n}};var W=function e(t){var r,i,n=[],a=[];a.byteLength=0;a.nalCount=0;a.duration=0;n.byteLength=0;for(r=0;r<t.length;r++){i=t[r];if(i.nalUnitType==="access_unit_delimiter_rbsp"){if(n.length){n.duration=i.dts-n.dts;a.byteLength+=n.byteLength;a.nalCount+=n.length;a.duration+=n.duration;a.push(n)}n=[i];n.byteLength=i.data.byteLength;n.pts=i.pts;n.dts=i.dts}else{if(i.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"){n.keyFrame=true}n.duration=i.dts-n.dts;n.byteLength+=i.data.byteLength;n.push(i)}}if(a.length&&(!n.duration||n.duration<=0)){n.duration=a[a.length-1].duration}a.byteLength+=n.byteLength;a.nalCount+=n.length;a.duration+=n.duration;a.push(n);return a};var H=function e(t){var r,i,n=[],a=[];n.byteLength=0;n.nalCount=0;n.duration=0;n.pts=t[0].pts;n.dts=t[0].dts;a.byteLength=0;a.nalCount=0;a.duration=0;a.pts=t[0].pts;a.dts=t[0].dts;for(r=0;r<t.length;r++){i=t[r];if(i.keyFrame){if(n.length){a.push(n);a.byteLength+=n.byteLength;a.nalCount+=n.nalCount;a.duration+=n.duration}n=[i];n.nalCount=i.length;n.byteLength=i.byteLength;n.pts=i.pts;n.dts=i.dts;n.duration=i.duration}else{n.duration+=i.duration;n.nalCount+=i.length;n.byteLength+=i.byteLength;n.push(i)}}if(a.length&&n.duration<=0){n.duration=a[a.length-1].duration}a.byteLength+=n.byteLength;a.nalCount+=n.nalCount;a.duration+=n.duration;a.push(n);return a};var q=function e(t){var r;if(!t[0][0].keyFrame&&t.length>1){r=t.shift();t.byteLength-=r.byteLength;t.nalCount-=r.nalCount;t[0][0].dts=r.dts;t[0][0].pts=r.pts;t[0][0].duration+=r.duration}return t};var V=function e(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}};var K=function e(t,r){var i=V();i.dataOffset=r;i.compositionTimeOffset=t.pts-t.dts;i.duration=t.duration;i.size=4*t.length;i.size+=t.byteLength;if(t.keyFrame){i.flags.dependsOn=2;i.flags.isNonSyncSample=0}return i};var z=function e(t,r){var i,n,a,s,o,l=r||0,u=[];for(i=0;i<t.length;i++){s=t[i];for(n=0;n<s.length;n++){o=s[n];a=K(o,l);l+=a.size;u.push(a)}}return u};var G=function e(t){var r,i,n,a,s,o,l=0,u=t.byteLength,c=t.nalCount,d=u+4*c,f=new Uint8Array(d),h=new DataView(f.buffer);for(r=0;r<t.length;r++){a=t[r];for(i=0;i<a.length;i++){s=a[i];for(n=0;n<s.length;n++){o=s[n];h.setUint32(l,o.data.byteLength);l+=4;f.set(o.data,l);l+=o.data.byteLength}}}return f};var Y=function e(t,r){var i,n=r||0,a=[];i=K(t,n);a.push(i);return a};var X=function e(t){var r,i,n=0,a=t.byteLength,s=t.length,o=a+4*s,l=new Uint8Array(o),u=new DataView(l.buffer);for(r=0;r<t.length;r++){i=t[r];u.setUint32(n,i.data.byteLength);n+=4;l.set(i.data,n);n+=i.data.byteLength}return l};var $={groupNalsIntoFrames:W,groupFramesIntoGops:H,extendFirstKeyFrame:q,generateSampleTable:z,concatenateNalData:G,generateSampleTableForFrame:Y,concatenateNalDataForFrame:X};var J=[33,16,5,32,164,27];var Q=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252];var Z=function e(t){var r=[];while(t--){r.push(0)}return r};var ee=function e(t){return Object.keys(t).reduce(function(e,r){e[r]=new Uint8Array(t[r].reduce(function(e,t){return e.concat(t)},[]));return e},{})};var te={96000:[J,[227,64],Z(154),[56]],88200:[J,[231],Z(170),[56]],64000:[J,[248,192],Z(240),[56]],48000:[J,[255,192],Z(268),[55,148,128],Z(54),[112]],44100:[J,[255,192],Z(268),[55,163,128],Z(84),[112]],32000:[J,[255,192],Z(268),[55,234],Z(226),[112]],24000:[J,[255,192],Z(268),[55,255,128],Z(268),[111,112],Z(126),[224]],16000:[J,[255,192],Z(268),[55,255,128],Z(268),[111,255],Z(269),[223,108],Z(195),[1,192]],12000:[Q,Z(268),[3,127,248],Z(268),[6,255,240],Z(268),[13,255,224],Z(268),[27,253,128],Z(259),[56]],11025:[Q,Z(268),[3,127,248],Z(268),[6,255,240],Z(268),[13,255,224],Z(268),[27,255,192],Z(268),[55,175,128],Z(108),[112]],8000:[Q,Z(268),[3,121,16],Z(47),[7]]};var re=ee(te);var ie=9e4,ne,ae,se,oe,le,ue,ce;ne=function e(t){return t*ie};ae=function e(t,r){return t*r};se=function e(t){return t/ie};oe=function e(t,r){return t/r};le=function e(t,r){return ne(oe(t,r))};ue=function e(t,r){return ae(se(t),r)};ce=function e(t,r,i){return se(i?t:t-r)};var de={ONE_SECOND_IN_TS:ie,secondsToVideoTs:ne,secondsToAudioTs:ae,videoTsToSeconds:se,audioTsToSeconds:oe,audioTsToVideoTs:le,videoTsToAudioTs:ue,metadataTsToSeconds:ce};var fe=function e(t){var r,i,n=0;for(r=0;r<t.length;r++){i=t[r];n+=i.data.byteLength}return n};var he=function e(t,r,i,n){var a,s=0,o=0,l=0,u=0,c,d,f;if(!r.length){return}a=de.audioTsToVideoTs(t.baseMediaDecodeTime,t.samplerate);s=Math.ceil(de.ONE_SECOND_IN_TS/(t.samplerate/1024));if(i&&n){o=a-Math.max(i,n);l=Math.floor(o/s);u=l*s}if(l<1||u>de.ONE_SECOND_IN_TS/2){return}c=re[t.samplerate];if(!c){c=r[0].data}for(d=0;d<l;d++){f=r[0];r.splice(0,0,{data:c,dts:f.dts-s,pts:f.pts-s})}t.baseMediaDecodeTime-=Math.floor(de.videoTsToAudioTs(u,t.samplerate))};var pe=function e(t,r,i){if(r.minSegmentDts>=i){return t}r.minSegmentDts=Infinity;return t.filter(function(e){if(e.dts>=i){r.minSegmentDts=Math.min(r.minSegmentDts,e.dts);r.minSegmentPts=r.minSegmentDts;return true}return false})};var ve=function e(t){var r,i,n=[];for(r=0;r<t.length;r++){i=t[r];n.push({size:i.data.byteLength,duration:1024})}return n};var me=function e(t){var r,i,n=0,a=new Uint8Array(fe(t));for(r=0;r<t.length;r++){i=t[r];a.set(i.data,n);n+=i.data.byteLength}return a};var ge={prefixWithSilence:he,trimAdtsFramesByEarliestDts:pe,generateSampleTable:ve,concatenateFrameData:me};var ye=de.ONE_SECOND_IN_TS;var _e=function e(t,r){if(typeof r.pts==="number"){if(t.timelineStartInfo.pts===undefined){t.timelineStartInfo.pts=r.pts}if(t.minSegmentPts===undefined){t.minSegmentPts=r.pts}else{t.minSegmentPts=Math.min(t.minSegmentPts,r.pts)}if(t.maxSegmentPts===undefined){t.maxSegmentPts=r.pts}else{t.maxSegmentPts=Math.max(t.maxSegmentPts,r.pts)}}if(typeof r.dts==="number"){if(t.timelineStartInfo.dts===undefined){t.timelineStartInfo.dts=r.dts}if(t.minSegmentDts===undefined){t.minSegmentDts=r.dts}else{t.minSegmentDts=Math.min(t.minSegmentDts,r.dts)}if(t.maxSegmentDts===undefined){t.maxSegmentDts=r.dts}else{t.maxSegmentDts=Math.max(t.maxSegmentDts,r.dts)}}};var be=function e(t){delete t.minSegmentDts;delete t.maxSegmentDts;delete t.minSegmentPts;delete t.maxSegmentPts};var Te=function e(t,r){var i,n,a=t.minSegmentDts;if(!r){a-=t.timelineStartInfo.dts}i=t.timelineStartInfo.baseMediaDecodeTime;i+=a;i=Math.max(0,i);if(t.type==="audio"){n=t.samplerate/ye;i*=n;i=Math.floor(i)}return i};var Se={clearDtsInfo:be,calculateTrackBaseMediaDecodeTime:Te,collectDtsInfo:_e};var ke=4,je=128;var Ee=function e(t){var r=0,i={payloadType:-1,payloadSize:0},n=0,a=0;while(r<t.byteLength){if(t[r]===je){break}while(t[r]===255){n+=255;r++}n+=t[r++];while(t[r]===255){a+=255;r++}a+=t[r++];if(!i.payload&&n===ke){i.payloadType=n;i.payloadSize=a;i.payload=t.subarray(r,r+a);break}r+=a;n=0;a=0}return i};var we=function e(t){if(t.payload[0]!==181){return null}if((t.payload[1]<<8|t.payload[2])!==49){return null}if(String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])!=="GA94"){return null}if(t.payload[7]!==3){return null}return t.payload.subarray(8,t.payload.length-1)};var Ce=function e(t,r){var i=[],n,a,s,o;if(!(r[0]&64)){return i}a=r[0]&31;for(n=0;n<a;n++){s=n*3;o={type:r[s+2]&3,pts:t};if(r[s+2]&4){o.ccData=r[s+3]<<8|r[s+4];i.push(o)}}return i};var Ae=function e(t){var r=t.byteLength,i=[],n=1,a,s;while(n<r-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){i.push(n+2);n+=2}else{n++}}if(i.length===0){return t}a=r-i.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===i[0]){o++;i.shift()}s[n]=t[o]}return s};var Ie={parseSei:Ee,parseUserData:we,parseCaptionPackets:Ce,discardEmulationPreventionBytes:Ae,USER_DATA_REGISTERED_ITU_T_T35:ke};var xe=function e(){e.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new Ue(0,0),new Ue(0,1),new Ue(1,0),new Ue(1,1)];this.reset();this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data"));e.on("partialdone",this.trigger.bind(this,"partialdone"));e.on("done",this.trigger.bind(this,"done"))},this)};xe.prototype=new t;xe.prototype.push=function(e){var t,r,i;if(e.nalUnitType!=="sei_rbsp"){return}t=Ie.parseSei(e.escapedRBSP);if(t.payloadType!==Ie.USER_DATA_REGISTERED_ITU_T_T35){return}r=Ie.parseUserData(t);if(!r){return}if(e.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return}else if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--;if(!this.numSameDts_){this.ignoreNextEqualDts_=false}return}i=Ie.parseCaptionPackets(e.pts,r);this.captionPackets_=this.captionPackets_.concat(i);if(this.latestDts_!==e.dts){this.numSameDts_=0}this.numSameDts_++;this.latestDts_=e.dts};xe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return e==="flush"?t.flush():t.partialFlush()},this)};xe.prototype.flushStream=function(e){if(!this.captionPackets_.length){this.flushCCStreams(e);return}this.captionPackets_.forEach(function(e,t){e.presortIndex=t});this.captionPackets_.sort(function(e,t){if(e.pts===t.pts){return e.presortIndex-t.presortIndex}return e.pts-t.pts});this.captionPackets_.forEach(function(e){if(e.type<2){this.dispatchCea608Packet(e)}},this);this.captionPackets_.length=0;this.flushCCStreams(e)};xe.prototype.flush=function(){return this.flushStream("flush")};xe.prototype.partialFlush=function(){return this.flushStream("partialFlush")};xe.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(e){e.reset()})};xe.prototype.dispatchCea608Packet=function(e){if(this.setsTextOrXDSActive(e)){this.activeCea608Channel_[e.type]=null}else if(this.setsChannel1Active(e)){this.activeCea608Channel_[e.type]=0}else if(this.setsChannel2Active(e)){this.activeCea608Channel_[e.type]=1}if(this.activeCea608Channel_[e.type]===null){return}this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)};xe.prototype.setsChannel1Active=function(e){return(e.ccData&30720)===4096};xe.prototype.setsChannel2Active=function(e){return(e.ccData&30720)===6144};xe.prototype.setsTextOrXDSActive=function(e){return(e.ccData&28928)===256||(e.ccData&30974)===4138||(e.ccData&30974)===6186};var Pe={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496};var Oe=function e(t){if(t===null){return""}t=Pe[t]||t;return String.fromCharCode(t)};var De=14;var Le=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var Re=function e(){var t=[],r=De+1;while(r--){t.push("")}return t};var Ue=function e(t,r){e.prototype.init.call(this);this.field_=t||0;this.dataChannel_=r||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(e){var t,r,i,n,a;t=e.ccData&32639;if(t===this.lastControlCode_){this.lastControlCode_=null;return}if((t&61440)===4096){this.lastControlCode_=t}else if(t!==this.PADDING_){this.lastControlCode_=null}i=t>>>8;n=t&255;if(t===this.PADDING_){return}else if(t===this.RESUME_CAPTION_LOADING_){this.mode_="popOn"}else if(t===this.END_OF_CAPTION_){this.mode_="popOn";this.clearFormatting(e.pts);this.flushDisplayed(e.pts);r=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=r;this.startPts_=e.pts}else if(t===this.ROLL_UP_2_ROWS_){this.rollUpRows_=2;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_3_ROWS_){this.rollUpRows_=3;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_4_ROWS_){this.rollUpRows_=4;this.setRollUp(e.pts)}else if(t===this.CARRIAGE_RETURN_){this.clearFormatting(e.pts);this.flushDisplayed(e.pts);this.shiftRowsUp_();this.startPts_=e.pts}else if(t===this.BACKSPACE_){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}}else if(t===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(e.pts);this.displayed_=Re()}else if(t===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=Re()}else if(t===this.RESUME_DIRECT_CAPTIONING_){if(this.mode_!=="paintOn"){this.flushDisplayed(e.pts);this.displayed_=Re()}this.mode_="paintOn";this.startPts_=e.pts}else if(this.isSpecialCharacter(i,n)){i=(i&3)<<8;a=Oe(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(i,n)){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}i=(i&3)<<8;a=Oe(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(i,n)){this.clearFormatting(e.pts);this[this.mode_](e.pts," ");this.column_++;if((n&14)===14){this.addFormatting(e.pts,["i"])}if((n&1)===1){this.addFormatting(e.pts,["u"])}}else if(this.isOffsetControlCode(i,n)){this.column_+=n&3}else if(this.isPAC(i,n)){var s=Le.indexOf(t&7968);if(this.mode_==="rollUp"){if(s-this.rollUpRows_+1<0){s=this.rollUpRows_-1}this.setRollUp(e.pts,s)}if(s!==this.row_){this.clearFormatting(e.pts);this.row_=s}if(n&1&&this.formatting_.indexOf("u")===-1){this.addFormatting(e.pts,["u"])}if((t&16)===16){this.column_=((t&14)>>1)*4}if(this.isColorPAC(n)){if((n&14)===14){this.addFormatting(e.pts,["i"])}}}else if(this.isNormalChar(i)){if(n===0){n=null}a=Oe(i);a+=Oe(n);this[this.mode_](e.pts,a);this.column_+=a.length}}};Ue.prototype=new t;Ue.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){console.error("Skipping malformed caption.");return""}}).join("\n").replace(/^\n+|\n+$/g,"");if(t.length){this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})}};Ue.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=Re();this.nonDisplayed_=Re();this.lastControlCode_=null;this.column_=0;this.row_=De;this.rollUpRows_=2;this.formatting_=[]};Ue.prototype.setConstants=function(){if(this.dataChannel_===0){this.BASE_=16;this.EXT_=17;this.CONTROL_=(20|this.field_)<<8;this.OFFSET_=23}else if(this.dataChannel_===1){this.BASE_=24;this.EXT_=25;this.CONTROL_=(28|this.field_)<<8;this.OFFSET_=31}this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};Ue.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63};Ue.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63};Ue.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47};Ue.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35};Ue.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127};Ue.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127};Ue.prototype.isNormalChar=function(e){return e>=32&&e<=127};Ue.prototype.setRollUp=function(e,t){if(this.mode_!=="rollUp"){this.row_=De;this.mode_="rollUp";this.flushDisplayed(e);this.nonDisplayed_=Re();this.displayed_=Re()}if(t!==undefined&&t!==this.row_){for(var r=0;r<this.rollUpRows_;r++){this.displayed_[t-r]=this.displayed_[this.row_-r];this.displayed_[this.row_-r]=""}}if(t===undefined){t=this.row_}this.topRow_=t-this.rollUpRows_+1};Ue.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var r=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,r)};Ue.prototype.clearFormatting=function(e){if(!this.formatting_.length){return}var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[];this[this.mode_](e,t)};Ue.prototype.popOn=function(e,t){var r=this.nonDisplayed_[this.row_];r+=t;this.nonDisplayed_[this.row_]=r};Ue.prototype.rollUp=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};Ue.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++){this.displayed_[e]=""}for(e=this.row_+1;e<De+1;e++){this.displayed_[e]=""}for(e=this.topRow_;e<this.row_;e++){this.displayed_[e]=this.displayed_[e+1]}this.displayed_[this.row_]=""};Ue.prototype.paintOn=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};var Ne={CaptionStream:xe,Cea608Stream:Ue};var Me={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};var Be=8589934592;var Fe=4294967296;var We="shared";var He=function e(t,r){var i=1;if(t>r){i=-1}while(Math.abs(r-t)>Fe){t+=i*Be}return t};var qe=function e(t){var r,i;e.prototype.init.call(this);this.type_=t||We;this.push=function(e){if(this.type_!==We&&e.type!==this.type_){return}if(i===undefined){i=e.dts}e.dts=He(e.dts,i);e.pts=He(e.pts,i);r=e.dts;this.trigger("data",e)};this.flush=function(){i=r;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.discontinuity=function(){i=void 0;r=void 0};this.reset=function(){this.discontinuity();this.trigger("reset")}};qe.prototype=new t;var Ve={TimestampRolloverStream:qe,handleRollover:He};var Ke=function e(t,r,i){var n,a="";for(n=r;n<i;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a},ze=function e(t,r,i){return decodeURIComponent(Ke(t,r,i))},Ge=function e(t,r,i){return unescape(Ke(t,r,i))},Ye=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},Xe={TXXX:function e(t){var r;if(t.data[0]!==3){return}for(r=1;r<t.data.length;r++){if(t.data[r]===0){t.description=ze(t.data,1,r);t.value=ze(t.data,r+1,t.data.length).replace(/\0*$/,"");break}}t.data=t.value},WXXX:function e(t){var r;if(t.data[0]!==3){return}for(r=1;r<t.data.length;r++){if(t.data[r]===0){t.description=ze(t.data,1,r);t.url=ze(t.data,r+1,t.data.length);break}}},PRIV:function e(t){var r;for(r=0;r<t.data.length;r++){if(t.data[r]===0){t.owner=Ge(t.data,0,r);break}}t.privateData=t.data.subarray(r+1);t.data=t.privateData}},$e;$e=function e(t){var r={debug:!!(t&&t.debug),descriptor:t&&t.descriptor},i=0,n=[],a=0,s;$e.prototype.init.call(this);this.dispatchType=Me.METADATA_STREAM_TYPE.toString(16);if(r.descriptor){for(s=0;s<r.descriptor.length;s++){this.dispatchType+=("00"+r.descriptor[s].toString(16)).slice(-2)}}this.push=function(e){var t,s,o,l,u,c;if(e.type!=="timed-metadata"){return}if(e.dataAlignmentIndicator){a=0;n.length=0}if(n.length===0&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0))){if(r.debug){console.log("Skipping unrecognized metadata packet")}return}n.push(e);a+=e.data.byteLength;if(n.length===1){i=Ye(e.data.subarray(6,10));i+=10}if(a<i){return}t={data:new Uint8Array(i),frames:[],pts:n[0].pts,dts:n[0].dts};for(u=0;u<i;){t.data.set(n[0].data.subarray(0,i-u),u);u+=n[0].data.byteLength;a-=n[0].data.byteLength;n.shift()}s=10;if(t.data[5]&64){s+=4;s+=Ye(t.data.subarray(10,14));i-=Ye(t.data.subarray(16,20))}do{o=Ye(t.data.subarray(s+4,s+8));if(o<1){return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.")}c=String.fromCharCode(t.data[s],t.data[s+1],t.data[s+2],t.data[s+3]);l={id:c,data:t.data.subarray(s+10,s+o+10)};l.key=l.id;if(Xe[l.id]){Xe[l.id](l);if(l.owner==="com.apple.streaming.transportStreamTimestamp"){var d=l.data,f=(d[3]&1)<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;f*=4;f+=d[7]&3;l.timeStamp=f;if(t.pts===undefined&&t.dts===undefined){t.pts=l.timeStamp;t.dts=l.timeStamp}this.trigger("timestamp",l)}}t.frames.push(l);s+=10;s+=o}while(s<i);this.trigger("data",t)}};$e.prototype=new t;var Je=$e;var Qe=Ve.TimestampRolloverStream;var Ze,et,tt;var rt=188,it=71;Ze=function e(){var t=new Uint8Array(rt),r=0;Ze.prototype.init.call(this);this.push=function(e){var i=0,n=rt,a;if(r){a=new Uint8Array(e.byteLength+r);a.set(t.subarray(0,r));a.set(e,r);r=0}else{a=e}while(n<a.byteLength){if(a[i]===it&&a[n]===it){this.trigger("data",a.subarray(i,n));i+=rt;n+=rt;continue}i++;n++}if(i<a.byteLength){t.set(a.subarray(i),0);r=a.byteLength-i}};this.flush=function(){if(r===rt&&t[0]===it){this.trigger("data",t);r=0}this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.reset=function(){r=0;this.trigger("reset")}};Ze.prototype=new t;et=function e(){var t,r,i,n;et.prototype.init.call(this);n=this;this.packetsWaitingForPmt=[];this.programMapTable=undefined;t=function e(t,n){var a=0;if(n.payloadUnitStartIndicator){a+=t[a]+1}if(n.type==="pat"){r(t.subarray(a),n)}else{i(t.subarray(a),n)}};r=function e(t,r){r.section_number=t[7];r.last_section_number=t[8];n.pmtPid=(t[10]&31)<<8|t[11];r.pmtPid=n.pmtPid};i=function e(t,r){var i,a,s,o;if(!(t[5]&1)){return}n.programMapTable={video:null,audio:null,"timed-metadata":{}};i=(t[1]&15)<<8|t[2];a=3+i-4;s=(t[10]&15)<<8|t[11];o=12+s;while(o<a){var l=t[o];var u=(t[o+1]&31)<<8|t[o+2];if(l===Me.H264_STREAM_TYPE&&n.programMapTable.video===null){n.programMapTable.video=u}else if(l===Me.ADTS_STREAM_TYPE&&n.programMapTable.audio===null){n.programMapTable.audio=u}else if(l===Me.METADATA_STREAM_TYPE){n.programMapTable["timed-metadata"][u]=l}o+=((t[o+3]&15)<<8|t[o+4])+5}r.programMapTable=n.programMapTable};this.push=function(e){var r={},i=4;r.payloadUnitStartIndicator=!!(e[1]&64);r.pid=e[1]&31;r.pid<<=8;r.pid|=e[2];if((e[3]&48)>>>4>1){i+=e[i]+1}if(r.pid===0){r.type="pat";t(e.subarray(i),r);this.trigger("data",r)}else if(r.pid===this.pmtPid){r.type="pmt";t(e.subarray(i),r);this.trigger("data",r);while(this.packetsWaitingForPmt.length){this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}}else if(this.programMapTable===undefined){this.packetsWaitingForPmt.push([e,i,r])}else{this.processPes_(e,i,r)}};this.processPes_=function(e,t,r){if(r.pid===this.programMapTable.video){r.streamType=Me.H264_STREAM_TYPE}else if(r.pid===this.programMapTable.audio){r.streamType=Me.ADTS_STREAM_TYPE}else{r.streamType=this.programMapTable["timed-metadata"][r.pid]}r.type="pes";r.data=e.subarray(t);this.trigger("data",r)}};et.prototype=new t;et.STREAM_TYPES={h264:27,adts:15};tt=function e(){var t=this,r={data:[],size:0},i={data:[],size:0},n={data:[],size:0},a,s=function e(t,r){var i;r.packetLength=6+(t[4]<<8|t[5]);r.dataAlignmentIndicator=(t[6]&4)!==0;i=t[7];if(i&192){r.pts=(t[9]&14)<<27|(t[10]&255)<<20|(t[11]&254)<<12|(t[12]&255)<<5|(t[13]&254)>>>3;r.pts*=4;r.pts+=(t[13]&6)>>>1;r.dts=r.pts;if(i&64){r.dts=(t[14]&14)<<27|(t[15]&255)<<20|(t[16]&254)<<12|(t[17]&255)<<5|(t[18]&254)>>>3;r.dts*=4;r.dts+=(t[18]&6)>>>1}}r.data=t.subarray(9+t[8])},o=function e(r,i,n){var a=new Uint8Array(r.size),o={type:i},l=0,u=0,c=false,d;if(!r.data.length||r.size<9){return}o.trackId=r.data[0].pid;for(l=0;l<r.data.length;l++){d=r.data[l];a.set(d.data,u);u+=d.data.byteLength}s(a,o);c=i==="video"||o.packetLength<=r.size;if(n||c){r.size=0;r.data.length=0}if(c){t.trigger("data",o)}};tt.prototype.init.call(this);this.push=function(e){({pat:function e(){},pes:function t(){var a,s;switch(e.streamType){case Me.H264_STREAM_TYPE:case Me.H264_STREAM_TYPE:a=r;s="video";break;case Me.ADTS_STREAM_TYPE:a=i;s="audio";break;case Me.METADATA_STREAM_TYPE:a=n;s="timed-metadata";break;default:return}if(e.payloadUnitStartIndicator){o(a,s,true)}a.data.push(e);a.size+=e.data.byteLength},pmt:function r(){var i={type:"metadata",tracks:[]};a=e.programMapTable;if(a.video!==null){i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+a.video,codec:"avc",type:"video"})}if(a.audio!==null){i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+a.audio,codec:"adts",type:"audio"})}t.trigger("data",i)}})[e.type]()};this.reset=function(){r.size=0;r.data.length=0;i.size=0;i.data.length=0;this.trigger("reset")};this.flushStreams_=function(){o(r,"video");o(i,"audio");o(n,"timed-metadata")};this.flush=function(){this.flushStreams_();this.trigger("done")}};tt.prototype=new t;var nt={PAT_PID:0,MP2T_PACKET_LENGTH:rt,TransportPacketStream:Ze,TransportParseStream:et,ElementaryStream:tt,TimestampRolloverStream:Qe,CaptionStream:Ne.CaptionStream,Cea608Stream:Ne.Cea608Stream,MetadataStream:Je};for(var at in Me){if(Me.hasOwnProperty(at)){nt[at]=Me[at]}}var st=nt;var ot=de.ONE_SECOND_IN_TS;var lt;var ut=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];lt=function e(t){var r,i=0;lt.prototype.init.call(this);this.push=function(e){var n=0,a,s,o,l,u,c;if(!t){i=0}if(e.type!=="audio"){return}if(r){l=r;r=new Uint8Array(l.byteLength+e.data.byteLength);r.set(l);r.set(e.data,l.byteLength)}else{r=e.data}while(n+5<r.length){if(r[n]!==255||(r[n+1]&246)!==240){n++;continue}s=(~r[n+1]&1)*2;a=(r[n+3]&3)<<11|r[n+4]<<3|(r[n+5]&224)>>5;u=((r[n+6]&3)+1)*1024;c=u*ot/ut[(r[n+2]&60)>>>2];o=n+a;if(r.byteLength<o){return}this.trigger("data",{pts:e.pts+i*c,dts:e.dts+i*c,sampleCount:u,audioobjecttype:(r[n+2]>>>6&3)+1,channelcount:(r[n+2]&1)<<2|(r[n+3]&192)>>>6,samplerate:ut[(r[n+2]&60)>>>2],samplingfrequencyindex:(r[n+2]&60)>>>2,samplesize:16,data:r.subarray(n+7+s,o)});i++;if(r.byteLength===o){r=undefined;return}r=r.subarray(o)}};this.flush=function(){i=0;this.trigger("done")};this.reset=function(){r=void 0;this.trigger("reset")};this.endTimeline=function(){r=void 0;this.trigger("endedtimeline")}};lt.prototype=new t;var ct=lt;var dt;dt=function e(t){var r=t.byteLength,i=0,n=0;this.length=function(){return 8*r};this.bitsAvailable=function(){return 8*r+n};this.loadWord=function(){var e=t.byteLength-r,a=new Uint8Array(4),s=Math.min(4,r);if(s===0){throw new Error("no bytes available")}a.set(t.subarray(e,e+s));i=new DataView(a.buffer).getUint32(0);n=s*8;r-=s};this.skipBits=function(e){var t;if(n>e){i<<=e;n-=e}else{e-=n;t=Math.floor(e/8);e-=t*8;r-=t;this.loadWord();i<<=e;n-=e}};this.readBits=function(e){var t=Math.min(n,e),a=i>>>32-t;n-=t;if(n>0){i<<=t}else if(r>0){this.loadWord()}t=e-t;if(t>0){return a<<t|this.readBits(t)}return a};this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e){if((i&2147483648>>>e)!==0){i<<=e;n-=e;return e}}this.loadWord();return e+this.skipLeadingZeros()};this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1};this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();if(1&e){return 1+e>>>1}return-1*(e>>>1)};this.readBoolean=function(){return this.readBits(1)===1};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()};var ft=dt;var ht,pt;var vt;pt=function e(){var t=0,r,i;pt.prototype.init.call(this);this.push=function(e){var n;if(!i){i=e.data}else{n=new Uint8Array(i.byteLength+e.data.byteLength);n.set(i);n.set(e.data,i.byteLength);i=n}var a=i.byteLength;for(;t<a-3;t++){if(i[t+2]===1){r=t+5;break}}while(r<a){switch(i[r]){case 0:if(i[r-1]!==0){r+=2;break}else if(i[r-2]!==0){r++;break}if(t+3!==r-2){this.trigger("data",i.subarray(t+3,r-2))}do{r++}while(i[r]!==1&&r<a);t=r-2;r+=3;break;case 1:if(i[r-1]!==0||i[r-2]!==0){r+=3;break}this.trigger("data",i.subarray(t+3,r-2));t=r-2;r+=3;break;default:r+=3;break}}i=i.subarray(t);r-=t;t=0};this.reset=function(){i=null;t=0;this.trigger("reset")};this.flush=function(){if(i&&i.byteLength>3){this.trigger("data",i.subarray(t+3))}i=null;t=0;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")}};pt.prototype=new t;vt={100:true,110:true,122:true,244:true,44:true,83:true,86:true,118:true,128:true,138:true,139:true,134:true};ht=function e(){var t=new pt,r,i,n,a,s,o,l;ht.prototype.init.call(this);r=this;this.push=function(e){if(e.type!=="video"){return}i=e.trackId;n=e.pts;a=e.dts;t.push(e)};t.on("data",function(e){var t={trackId:i,pts:n,dts:a,data:e};switch(e[0]&31){case 5:t.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:t.nalUnitType="sei_rbsp";t.escapedRBSP=s(e.subarray(1));break;case 7:t.nalUnitType="seq_parameter_set_rbsp";t.escapedRBSP=s(e.subarray(1));t.config=o(t.escapedRBSP);break;case 8:t.nalUnitType="pic_parameter_set_rbsp";break;case 9:t.nalUnitType="access_unit_delimiter_rbsp";break;default:break}r.trigger("data",t)});t.on("done",function(){r.trigger("done")});t.on("partialdone",function(){r.trigger("partialdone")});t.on("reset",function(){r.trigger("reset")});t.on("endedtimeline",function(){r.trigger("endedtimeline")});this.flush=function(){t.flush()};this.partialFlush=function(){t.partialFlush()};this.reset=function(){t.reset()};this.endTimeline=function(){t.endTimeline()};l=function e(t,r){var i=8,n=8,a,s;for(a=0;a<t;a++){if(n!==0){s=r.readExpGolomb();n=(i+s+256)%256}i=n===0?i:n}};s=function e(t){var r=t.byteLength,i=[],n=1,a,s;while(n<r-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){i.push(n+2);n+=2}else{n++}}if(i.length===0){return t}a=r-i.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===i[0]){o++;i.shift()}s[n]=t[o]}return s};o=function e(t){var r=0,i=0,n=0,a=0,s=1,o,u,c,d,f,h,p,v,m,g,y,_,b,T;o=new ft(t);u=o.readUnsignedByte();d=o.readUnsignedByte();c=o.readUnsignedByte();o.skipUnsignedExpGolomb();if(vt[u]){f=o.readUnsignedExpGolomb();if(f===3){o.skipBits(1)}o.skipUnsignedExpGolomb();o.skipUnsignedExpGolomb();o.skipBits(1);if(o.readBoolean()){y=f!==3?8:12;for(T=0;T<y;T++){if(o.readBoolean()){if(T<6){l(16,o)}else{l(64,o)}}}}}o.skipUnsignedExpGolomb();h=o.readUnsignedExpGolomb();if(h===0){o.readUnsignedExpGolomb()}else if(h===1){o.skipBits(1);o.skipExpGolomb();o.skipExpGolomb();p=o.readUnsignedExpGolomb();for(T=0;T<p;T++){o.skipExpGolomb()}}o.skipUnsignedExpGolomb();o.skipBits(1);v=o.readUnsignedExpGolomb();m=o.readUnsignedExpGolomb();g=o.readBits(1);if(g===0){o.skipBits(1)}o.skipBits(1);if(o.readBoolean()){r=o.readUnsignedExpGolomb();i=o.readUnsignedExpGolomb();n=o.readUnsignedExpGolomb();a=o.readUnsignedExpGolomb()}if(o.readBoolean()){if(o.readBoolean()){b=o.readUnsignedByte();switch(b){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:{_=[o.readUnsignedByte()<<8|o.readUnsignedByte(),o.readUnsignedByte()<<8|o.readUnsignedByte()];break}}if(_){s=_[0]/_[1]}}}return{profileIdc:u,levelIdc:c,profileCompatibility:d,width:Math.ceil(((v+1)*16-r*2-i*2)*s),height:(2-g)*(m+1)*16-n*2-a*2,sarRatio:_}}};ht.prototype=new t;var mt={H264Stream:ht,NalByteStream:pt};var gt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];var yt=function e(t){if(t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)){return true}return false};var _t=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]};var bt=function e(t,r,i){var n,a="";for(n=r;n<i;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a};var Tt=function e(t,r,i){return unescape(bt(t,r,i))};var St=function e(t,r){var i=t[r+6]<<21|t[r+7]<<14|t[r+8]<<7|t[r+9],n=t[r+5],a=(n&16)>>4;if(a){return i+20}return i+10};var kt=function e(t,r){var i=(t[r+5]&224)>>5,n=t[r+4]<<3,a=t[r+3]&3<<11;return a|n|i};var jt=function e(t,r){if(t[r]==="I".charCodeAt(0)&&t[r+1]==="D".charCodeAt(0)&&t[r+2]==="3".charCodeAt(0)){return"timed-metadata"}else if(t[r]&255===255&&(t[r+1]&240)===240){return"audio"}return null};var Et=function e(t){var r=0;while(r+5<t.length){if(t[r]!==255||(t[r+1]&246)!==240){r++;continue}return gt[(t[r+2]&60)>>>2]}return null};var wt=function e(t){var r,i,n,a;r=10;if(t[5]&64){r+=4;r+=_t(t.subarray(10,14))}do{i=_t(t.subarray(r+4,r+8));if(i<1){return null}a=String.fromCharCode(t[r],t[r+1],t[r+2],t[r+3]);if(a==="PRIV"){n=t.subarray(r+10,r+i+10);for(var s=0;s<n.byteLength;s++){if(n[s]===0){var o=Tt(n,0,s);if(o==="com.apple.streaming.transportStreamTimestamp"){var l=n.subarray(s+1);var u=(l[3]&1)<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;u*=4;u+=l[7]&3;return u}break}}}r+=10;r+=i}while(r<t.byteLength);return null};var Ct={isLikelyAacData:yt,parseId3TagSize:St,parseAdtsSize:kt,parseType:jt,parseSampleRate:Et,parseAacTimestamp:wt};var At;At=function e(){var t=new Uint8Array,r=0;At.prototype.init.call(this);this.setTimestamp=function(e){r=e};this.push=function(e){var i=0,n=0,a,s,o,l;if(t.length){l=t.length;t=new Uint8Array(e.byteLength+l);t.set(t.subarray(0,l));t.set(e,l)}else{t=e}while(t.length-n>=3){if(t[n]==="I".charCodeAt(0)&&t[n+1]==="D".charCodeAt(0)&&t[n+2]==="3".charCodeAt(0)){if(t.length-n<10){break}i=Ct.parseId3TagSize(t,n);if(n+i>t.length){break}s={type:"timed-metadata",data:t.subarray(n,n+i)};this.trigger("data",s);n+=i;continue}else if((t[n]&255)===255&&(t[n+1]&240)===240){if(t.length-n<7){break}i=Ct.parseAdtsSize(t,n);if(n+i>t.length){break}o={type:"audio",data:t.subarray(n,n+i),pts:r,dts:r};this.trigger("data",o);n+=i;continue}n++}a=t.length-n;if(a>0){t=t.subarray(n)}else{t=new Uint8Array}};this.reset=function(){t=new Uint8Array;this.trigger("reset")};this.endTimeline=function(){t=new Uint8Array;this.trigger("endedtimeline")}};At.prototype=new t;var It=At;var xt=mt.H264Stream;var Pt=Ct.isLikelyAacData;var Ot=de.ONE_SECOND_IN_TS;var Dt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"];var Lt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"];var Rt,Ut,Nt,Mt;var Bt=function e(t,r){var i;if(t.length!==r.length){return false}for(i=0;i<t.length;i++){if(t[i]!==r[i]){return false}}return true};var Ft=function e(t,r,i,n,a,s){var o=i-r,l=n-r,u=a-i;return{start:{dts:t,pts:t+o},end:{dts:t+l,pts:t+u},prependedContentDuration:s,baseMediaDecodeTime:t}};Ut=function e(t,r){var i=[],n=0,a=0,s=0,o=Infinity;r=r||{};Ut.prototype.init.call(this);this.push=function(e){Se.collectDtsInfo(t,e);if(t){Dt.forEach(function(r){t[r]=e[r]})}i.push(e)};this.setEarliestDts=function(e){a=e-t.timelineStartInfo.baseMediaDecodeTime};this.setVideoBaseMediaDecodeTime=function(e){o=e};this.setAudioAppendStart=function(e){s=e};this.flush=function(){var e,l,u,c,d;if(i.length===0){this.trigger("done","AudioSegmentStream");return}e=ge.trimAdtsFramesByEarliestDts(i,t,a);t.baseMediaDecodeTime=Se.calculateTrackBaseMediaDecodeTime(t,r.keepOriginalTimestamps);ge.prefixWithSilence(t,e,s,o);t.samples=ge.generateSampleTable(e);u=F.mdat(ge.concatenateFrameData(e));i=[];l=F.moof(n,[t]);c=new Uint8Array(l.byteLength+u.byteLength);n++;c.set(l);c.set(u,l.byteLength);Se.clearDtsInfo(t);d=Math.ceil(Ot*1024/t.samplerate);if(e.length){this.trigger("timingInfo",{start:e[0].dts,end:e[0].dts+e.length*d})}this.trigger("data",{track:t,boxes:c});this.trigger("done","AudioSegmentStream")};this.reset=function(){Se.clearDtsInfo(t);i=[];this.trigger("reset")}};Ut.prototype=new t;Rt=function e(t,r){var i=0,n=[],a=[],s,o;r=r||{};Rt.prototype.init.call(this);delete t.minPTS;this.gopCache_=[];this.push=function(e){Se.collectDtsInfo(t,e);if(e.nalUnitType==="seq_parameter_set_rbsp"&&!s){s=e.config;t.sps=[e.data];Lt.forEach(function(e){t[e]=s[e]},this)}if(e.nalUnitType==="pic_parameter_set_rbsp"&&!o){o=e.data;t.pps=[e.data]}n.push(e)};this.flush=function(){var e,s,o,l,u,c,d=0,f,h;while(n.length){if(n[0].nalUnitType==="access_unit_delimiter_rbsp"){break}n.shift()}if(n.length===0){this.resetStream_();this.trigger("done","VideoSegmentStream");return}e=$.groupNalsIntoFrames(n);o=$.groupFramesIntoGops(e);if(!o[0][0].keyFrame){s=this.getGopForFusion_(n[0],t);if(s){d=s.duration;o.unshift(s);o.byteLength+=s.byteLength;o.nalCount+=s.nalCount;o.pts=s.pts;o.dts=s.dts;o.duration+=s.duration}else{o=$.extendFirstKeyFrame(o)}}if(a.length){var p;if(r.alignGopsAtEnd){p=this.alignGopsAtEnd_(o)}else{p=this.alignGopsAtStart_(o)}if(!p){this.gopCache_.unshift({gop:o.pop(),pps:t.pps,sps:t.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);n=[];this.resetStream_();this.trigger("done","VideoSegmentStream");return}Se.clearDtsInfo(t);o=p}Se.collectDtsInfo(t,o);t.samples=$.generateSampleTable(o);u=F.mdat($.concatenateNalData(o));t.baseMediaDecodeTime=Se.calculateTrackBaseMediaDecodeTime(t,r.keepOriginalTimestamps);this.trigger("processedGopsInfo",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}));f=o[0];h=o[o.length-1];this.trigger("segmentTimingInfo",Ft(t.baseMediaDecodeTime,f.dts,f.pts,h.dts+h.duration,h.pts+h.duration,d));this.trigger("timingInfo",{start:o[0].dts,end:o[o.length-1].dts+o[o.length-1].duration});this.gopCache_.unshift({gop:o.pop(),pps:t.pps,sps:t.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);n=[];this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime);this.trigger("timelineStartInfo",t.timelineStartInfo);l=F.moof(i,[t]);c=new Uint8Array(l.byteLength+u.byteLength);i++;c.set(l);c.set(u,l.byteLength);this.trigger("data",{track:t,boxes:c});this.resetStream_();this.trigger("done","VideoSegmentStream")};this.reset=function(){this.resetStream_();n=[];this.gopCache_.length=0;a.length=0;this.trigger("reset")};this.resetStream_=function(){Se.clearDtsInfo(t);s=undefined;o=undefined};this.getGopForFusion_=function(e){var r=45e3,i=1e4,n=Infinity,a,s,o,l,u;for(u=0;u<this.gopCache_.length;u++){l=this.gopCache_[u];o=l.gop;if(!(t.pps&&Bt(t.pps[0],l.pps[0]))||!(t.sps&&Bt(t.sps[0],l.sps[0]))){continue}if(o.dts<t.timelineStartInfo.dts){continue}a=e.dts-o.dts-o.duration;if(a>=-i&&a<=r){if(!s||n>a){s=l;n=a}}}if(s){return s.gop}return null};this.alignGopsAtStart_=function(e){var t,r,i,n,s,o,l,u;s=e.byteLength;o=e.nalCount;l=e.duration;t=r=0;while(t<a.length&&r<e.length){i=a[t];n=e[r];if(i.pts===n.pts){break}if(n.pts>i.pts){t++;continue}r++;s-=n.byteLength;o-=n.nalCount;l-=n.duration}if(r===0){return e}if(r===e.length){return null}u=e.slice(r);u.byteLength=s;u.duration=l;u.nalCount=o;u.pts=u[0].pts;u.dts=u[0].dts;return u};this.alignGopsAtEnd_=function(e){var t,r,i,n,s,o;t=a.length-1;r=e.length-1;s=null;o=false;while(t>=0&&r>=0){i=a[t];n=e[r];if(i.pts===n.pts){o=true;break}if(i.pts>n.pts){t--;continue}if(t===a.length-1){s=r}r--}if(!o&&s===null){return null}var l;if(o){l=r}else{l=s}if(l===0){return e}var u=e.slice(l);var c=u.reduce(function(e,t){e.byteLength+=t.byteLength;e.duration+=t.duration;e.nalCount+=t.nalCount;return e},{byteLength:0,duration:0,nalCount:0});u.byteLength=c.byteLength;u.duration=c.duration;u.nalCount=c.nalCount;u.pts=u[0].pts;u.dts=u[0].dts;return u};this.alignGopsWith=function(e){a=e}};Rt.prototype=new t;Mt=function e(t,r){this.numberOfTracks=0;this.metadataStream=r;t=t||{};if(typeof t.remux!=="undefined"){this.remuxTracks=!!t.remux}else{this.remuxTracks=true}if(typeof t.keepOriginalTimestamps==="boolean"){this.keepOriginalTimestamps=t.keepOriginalTimestamps}else{this.keepOriginalTimestamps=false}this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;Mt.prototype.init.call(this);this.push=function(e){if(e.text){return this.pendingCaptions.push(e)}if(e.frames){return this.pendingMetadata.push(e)}this.pendingTracks.push(e.track);this.pendingBytes+=e.boxes.byteLength;if(e.track.type==="video"){this.videoTrack=e.track;this.pendingBoxes.push(e.boxes)}if(e.track.type==="audio"){this.audioTrack=e.track;this.pendingBoxes.unshift(e.boxes)}}};Mt.prototype=new t;Mt.prototype.flush=function(e){var t=0,r={captions:[],captionStreams:{},metadata:[],info:{}},i,n,a,s=0,o;if(this.pendingTracks.length<this.numberOfTracks){if(e!=="VideoSegmentStream"&&e!=="AudioSegmentStream"){return}else if(this.remuxTracks){return}else if(this.pendingTracks.length===0){this.emittedTracks++;if(this.emittedTracks>=this.numberOfTracks){this.trigger("done");this.emittedTracks=0}return}}if(this.videoTrack){s=this.videoTrack.timelineStartInfo.pts;Lt.forEach(function(e){r.info[e]=this.videoTrack[e]},this)}else if(this.audioTrack){s=this.audioTrack.timelineStartInfo.pts;Dt.forEach(function(e){r.info[e]=this.audioTrack[e]},this)}if(this.videoTrack||this.audioTrack){if(this.pendingTracks.length===1){r.type=this.pendingTracks[0].type}else{r.type="combined"}this.emittedTracks+=this.pendingTracks.length;a=F.initSegment(this.pendingTracks);r.initSegment=new Uint8Array(a.byteLength);r.initSegment.set(a);r.data=new Uint8Array(this.pendingBytes);for(o=0;o<this.pendingBoxes.length;o++){r.data.set(this.pendingBoxes[o],t);t+=this.pendingBoxes[o].byteLength}for(o=0;o<this.pendingCaptions.length;o++){i=this.pendingCaptions[o];i.startTime=de.metadataTsToSeconds(i.startPts,s,this.keepOriginalTimestamps);i.endTime=de.metadataTsToSeconds(i.endPts,s,this.keepOriginalTimestamps);r.captionStreams[i.stream]=true;r.captions.push(i)}for(o=0;o<this.pendingMetadata.length;o++){n=this.pendingMetadata[o];n.cueTime=de.metadataTsToSeconds(n.pts,s,this.keepOriginalTimestamps);r.metadata.push(n)}r.metadata.dispatchType=this.metadataStream.dispatchType;this.pendingTracks.length=0;this.videoTrack=null;this.pendingBoxes.length=0;this.pendingCaptions.length=0;this.pendingBytes=0;this.pendingMetadata.length=0;this.trigger("data",r);for(o=0;o<r.captions.length;o++){i=r.captions[o];this.trigger("caption",i)}for(o=0;o<r.metadata.length;o++){n=r.metadata[o];this.trigger("id3Frame",n)}}if(this.emittedTracks>=this.numberOfTracks){this.trigger("done");this.emittedTracks=0}};Mt.prototype.setRemux=function(e){this.remuxTracks=e};Nt=function e(t){var r=this,i=true,n,a;Nt.prototype.init.call(this);t=t||{};this.baseMediaDecodeTime=t.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var e={};this.transmuxPipeline_=e;e.type="aac";e.metadataStream=new st.MetadataStream;e.aacStream=new It;e.audioTimestampRolloverStream=new st.TimestampRolloverStream("audio");e.timedMetadataTimestampRolloverStream=new st.TimestampRolloverStream("timed-metadata");e.adtsStream=new ct;e.coalesceStream=new Mt(t,e.metadataStream);e.headOfPipeline=e.aacStream;e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream);e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream);e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)});e.aacStream.on("data",function(i){if(i.type==="timed-metadata"&&!e.audioSegmentStream){a=a||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"};e.coalesceStream.numberOfTracks++;e.audioSegmentStream=new Ut(a,t);e.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo"));e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream)}r.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!n})});e.coalesceStream.on("data",this.trigger.bind(this,"data"));e.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setupTsPipeline=function(){var e={};this.transmuxPipeline_=e;e.type="ts";e.metadataStream=new st.MetadataStream;e.packetStream=new st.TransportPacketStream;e.parseStream=new st.TransportParseStream;e.elementaryStream=new st.ElementaryStream;e.timestampRolloverStream=new st.TimestampRolloverStream;e.adtsStream=new ct;e.h264Stream=new xt;e.captionStream=new st.CaptionStream;e.coalesceStream=new Mt(t,e.metadataStream);e.headOfPipeline=e.packetStream;e.packetStream.pipe(e.parseStream).pipe(e.elementaryStream).pipe(e.timestampRolloverStream);e.timestampRolloverStream.pipe(e.h264Stream);e.timestampRolloverStream.pipe(e.adtsStream);e.timestampRolloverStream.pipe(e.metadataStream).pipe(e.coalesceStream);e.h264Stream.pipe(e.captionStream).pipe(e.coalesceStream);e.elementaryStream.on("data",function(i){var s;if(i.type==="metadata"){s=i.tracks.length;while(s--){if(!n&&i.tracks[s].type==="video"){n=i.tracks[s];n.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime}else if(!a&&i.tracks[s].type==="audio"){a=i.tracks[s];a.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime}}if(n&&!e.videoSegmentStream){e.coalesceStream.numberOfTracks++;e.videoSegmentStream=new Rt(n,t);e.videoSegmentStream.on("timelineStartInfo",function(t){if(a){a.timelineStartInfo=t;e.audioSegmentStream.setEarliestDts(t.dts)}});e.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo"));e.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo"));e.videoSegmentStream.on("baseMediaDecodeTime",function(t){if(a){e.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}});e.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo"));e.h264Stream.pipe(e.videoSegmentStream).pipe(e.coalesceStream)}if(a&&!e.audioSegmentStream){e.coalesceStream.numberOfTracks++;e.audioSegmentStream=new Ut(a,t);e.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo"));e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream)}r.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!n})}});e.coalesceStream.on("data",this.trigger.bind(this,"data"));e.coalesceStream.on("id3Frame",function(t){t.dispatchType=e.metadataStream.dispatchType;r.trigger("id3Frame",t)});e.coalesceStream.on("caption",this.trigger.bind(this,"caption"));e.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setBaseMediaDecodeTime=function(e){var r=this.transmuxPipeline_;if(!t.keepOriginalTimestamps){this.baseMediaDecodeTime=e}if(a){a.timelineStartInfo.dts=undefined;a.timelineStartInfo.pts=undefined;Se.clearDtsInfo(a);if(!t.keepOriginalTimestamps){a.timelineStartInfo.baseMediaDecodeTime=e}if(r.audioTimestampRolloverStream){r.audioTimestampRolloverStream.discontinuity()}}if(n){if(r.videoSegmentStream){r.videoSegmentStream.gopCache_=[]}n.timelineStartInfo.dts=undefined;n.timelineStartInfo.pts=undefined;Se.clearDtsInfo(n);r.captionStream.reset();if(!t.keepOriginalTimestamps){n.timelineStartInfo.baseMediaDecodeTime=e}}if(r.timestampRolloverStream){r.timestampRolloverStream.discontinuity()}};this.setAudioAppendStart=function(e){if(a){this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)}};this.setRemux=function(e){var r=this.transmuxPipeline_;t.remux=e;if(r&&r.coalesceStream){r.coalesceStream.setRemux(e)}};this.alignGopsWith=function(e){if(n&&this.transmuxPipeline_.videoSegmentStream){this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)}};this.push=function(e){if(i){var t=Pt(e);if(t&&this.transmuxPipeline_.type!=="aac"){this.setupAacPipeline()}else if(!t&&this.transmuxPipeline_.type!=="ts"){this.setupTsPipeline()}i=false}this.transmuxPipeline_.headOfPipeline.push(e)};this.flush=function(){i=true;this.transmuxPipeline_.headOfPipeline.flush()};this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()};this.reset=function(){if(this.transmuxPipeline_.headOfPipeline){this.transmuxPipeline_.headOfPipeline.reset()}};this.resetCaptions=function(){if(this.transmuxPipeline_.captionStream){this.transmuxPipeline_.captionStream.reset()}}};Nt.prototype=new t;var Wt={Transmuxer:Nt,VideoSegmentStream:Rt,AudioSegmentStream:Ut,AUDIO_PROPERTIES:Dt,VIDEO_PROPERTIES:Lt,generateVideoSegmentTimingInfo:Ft};var Ht=function e(t,r){if(!(t instanceof r)){throw new TypeError("Cannot call a class as a function")}};var qt=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(t,r,i){if(r)e(t.prototype,r);if(i)e(t,i);return t}}();var Vt=function e(t,r){r.on("data",function(e){var r=e.initSegment;e.initSegment={data:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength};var i=e.data;e.data=i.buffer;t.postMessage({action:"data",segment:e,byteOffset:i.byteOffset,byteLength:i.byteLength},[e.data])});if(r.captionStream){r.captionStream.on("data",function(e){t.postMessage({action:"caption",data:e})})}r.on("done",function(e){t.postMessage({action:"done"})});r.on("gopInfo",function(e){t.postMessage({action:"gopInfo",gopInfo:e})});r.on("videoSegmentTimingInfo",function(e){t.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:e})})};var Kt=function(){function e(t,r){Ht(this,e);this.options=r||{};this.self=t;this.init()}qt(e,[{key:"init",value:function e(){if(this.transmuxer){this.transmuxer.dispose()}this.transmuxer=new Wt.Transmuxer(this.options);Vt(this.self,this.transmuxer)}},{key:"push",value:function e(t){var r=new Uint8Array(t.data,t.byteOffset,t.byteLength);this.transmuxer.push(r)}},{key:"reset",value:function e(){this.init()}},{key:"setTimestampOffset",value:function e(t){var r=t.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(r*9e4))}},{key:"setAudioAppendStart",value:function e(t){this.transmuxer.setAudioAppendStart(Math.ceil(t.appendStart*9e4))}},{key:"flush",value:function e(t){this.transmuxer.flush()}},{key:"resetCaptions",value:function e(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function e(t){this.transmuxer.alignGopsWith(t.gopsToAlignWith.slice())}}]);return e}();var zt=function e(t){t.onmessage=function(e){if(e.data.action==="init"&&e.data.options){this.messageHandlers=new Kt(t,e.data.options);return}if(!this.messageHandlers){this.messageHandlers=new Kt(t)}if(e.data&&e.data.action&&e.data.action!=="init"){if(this.messageHandlers[e.data.action]){this.messageHandlers[e.data.action](e.data)}}}};var Gt=new zt(r);return Gt}()});var St={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"};var kt=function e(t){return t.map(function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,r){var i=("00"+Number(t).toString(16)).slice(-2);var n=("00"+Number(r).toString(16)).slice(-2);return"avc1."+i+"00"+n})})};var jt=function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";var r={codecCount:0};var i=void 0;r.codecCount=t.split(",").length;r.codecCount=r.codecCount||2;i=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(t);if(i){r.videoCodec=i[2];r.videoObjectTypeIndicator=i[3]}r.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(t);r.audioProfile=r.audioProfile&&r.audioProfile[2];return r};var Et=function e(t){return t.replace(/avc1\.(\d+)\.(\d+)/i,function(e){return kt([e])[0]})};var wt=function e(t,r,i){return t+"/"+r+'; codecs="'+i.filter(function(e){return!!e}).join(", ")+'"'};var Ct=function e(t){if(t.segments&&t.segments.length&&t.segments[0].map){return"mp4"}return"mp2t"};var At=function e(t){var r=t.attributes||{};if(r.CODECS){return jt(r.CODECS)}return St};var It=function e(t,r){if(!t.mediaGroups.AUDIO||!r){return null}var i=t.mediaGroups.AUDIO[r];if(!i){return null}for(var n in i){var a=i[n];if(a.default&&a.playlists){return jt(a.playlists[0].attributes.CODECS).audioProfile}}return null};var xt=function e(t,r){var n=Ct(r);var a=At(r);var s=r.attributes||{};var o=true;var l=false;if(!r){return[]}if(t.mediaGroups.AUDIO&&s.AUDIO){var u=t.mediaGroups.AUDIO[s.AUDIO];if(u){l=true;o=false;for(var c in u){if(!u[c].uri&&!u[c].playlists){o=true;break}}}}if(l&&!a.audioProfile){if(!o){a.audioProfile=It(t,s.AUDIO)}if(!a.audioProfile){i.log.warn("Multiple audio tracks present but no audio codec string is specified. "+"Attempting to use the default audio codec (mp4a.40.2)");a.audioProfile=St.audioProfile}}var d={};if(a.videoCodec){d.video=""+a.videoCodec+a.videoObjectTypeIndicator}if(a.audioProfile){d.audio="mp4a.40."+a.audioProfile}var f=wt("audio",n,[d.audio]);var h=wt("video",n,[d.video]);var p=wt("video",n,[d.video,d.audio]);if(l){if(!o&&d.video){return[h,f]}if(!o&&!d.video){return[f,f]}return[p,f]}if(!d.video){return[f]}return[p]};var Pt=function e(t){var r={type:"",parameters:{}};var i=t.trim().split(";");r.type=i.shift().trim();i.forEach(function(e){var t=e.trim().split("=");if(t.length>1){var i=t[0].replace(/"/g,"").trim();var n=t[1].replace(/"/g,"").trim();r.parameters[i]=n}});return r};var Ot=function e(t){return/mp4a\.\d+.\d+/i.test(t)};var Dt=function e(t){return/avc1\.[\da-f]+/i.test(t)};var Lt=function e(t,r,i){if(typeof r==="undefined"||r===null||!t.length){return[]}var n=Math.ceil((r-i+3)*9e4);var a=void 0;for(a=0;a<t.length;a++){if(t[a].pts>n){break}}return t.slice(a)};var Rt=function e(t,r,i){if(!r.length){return t}if(i){return r.slice()}var n=r[0].pts;var a=0;for(a;a<t.length;a++){if(t[a].pts>=n){break}}return t.slice(0,a).concat(r)};var Ut=function e(t,r,i,n){var a=Math.ceil((r-n)*9e4);var s=Math.ceil((i-n)*9e4);var o=t.slice();var l=t.length;while(l--){if(t[l].pts<=s){break}}if(l===-1){return o}var u=l+1;while(u--){if(t[u].pts<=a){break}}u=Math.max(u,0);o.splice(u,l-u+1);return o};var Nt=function e(t,r,n){var a=null;var s=null;var o=0;var l=[];var u=[];if(!t&&!r){return i.createTimeRange()}if(!t){return r.buffered}if(!r){return t.buffered}if(n){return t.buffered}if(t.buffered.length===0&&r.buffered.length===0){return i.createTimeRange()}var c=t.buffered;var d=r.buffered;var f=c.length;while(f--){l.push({time:c.start(f),type:"start"});l.push({time:c.end(f),type:"end"})}f=d.length;while(f--){l.push({time:d.start(f),type:"start"});l.push({time:d.end(f),type:"end"})}l.sort(function(e,t){return e.time-t.time});for(f=0;f<l.length;f++){if(l[f].type==="start"){o++;if(o===2){a=l[f].time}}else if(l[f].type==="end"){o--;if(o===1){s=l[f].time}}if(a!==null&&s!==null){u.push([a,s]);a=null;s=null}}return i.createTimeRanges(u)};var Mt=9e4;var Bt=function e(t,r){var i=t.addSourceBuffer(r);var n=Object.create(null);n.updating=false;n.realBuffer_=i;var a=function e(t){if(typeof i[t]==="function"){n[t]=function(){return i[t].apply(i,arguments)}}else if(typeof n[t]==="undefined"){Object.defineProperty(n,t,{get:function e(){return i[t]},set:function e(r){return i[t]=r}})}};for(var s in i){a(s)}return n};var Ft=function(e){A(t,e);function t(e,r){E(this,t);var n=I(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,i.EventTarget));n.timestampOffset_=0;n.pendingBuffers_=[];n.bufferUpdating_=false;n.mediaSource_=e;n.codecs_=r;n.audioCodec_=null;n.videoCodec_=null;n.audioDisabled_=false;n.appendAudioInitSegment_=true;n.gopBuffer_=[];n.timeMapping_=0;n.safeAppend_=i.browser.IE_VERSION>=11;var a={remux:false,alignGopsAtEnd:n.safeAppend_};n.codecs_.forEach(function(e){if(Ot(e)){n.audioCodec_=e}else if(Dt(e)){n.videoCodec_=e}});n.transmuxer_=new Tt;n.transmuxer_.postMessage({action:"init",options:a});n.transmuxer_.onmessage=function(e){if(e.data.action==="data"){return n.data_(e)}if(e.data.action==="done"){return n.done_(e)}if(e.data.action==="gopInfo"){return n.appendGopInfo_(e)}if(e.data.action==="videoSegmentTimingInfo"){return n.videoSegmentTimingInfo_(e.data.videoSegmentTimingInfo)}};Object.defineProperty(n,"timestampOffset",{get:function e(){return this.timestampOffset_},set:function e(t){if(typeof t==="number"&&t>=0){this.timestampOffset_=t;this.appendAudioInitSegment_=true;this.gopBuffer_.length=0;this.timeMapping_=0;this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t})}}});Object.defineProperty(n,"appendWindowStart",{get:function e(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function e(t){if(this.videoBuffer_){this.videoBuffer_.appendWindowStart=t}if(this.audioBuffer_){this.audioBuffer_.appendWindowStart=t}}});Object.defineProperty(n,"updating",{get:function e(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}});Object.defineProperty(n,"buffered",{get:function e(){return Nt(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}});return n}w(t,[{key:"data_",value:function e(t){var r=t.data.segment;r.data=new Uint8Array(r.data,t.data.byteOffset,t.data.byteLength);r.initSegment=new Uint8Array(r.initSegment.data,r.initSegment.byteOffset,r.initSegment.byteLength);nt(this,this.mediaSource_,r);this.pendingBuffers_.push(r);return}},{key:"done_",value:function e(t){if(this.mediaSource_.readyState==="closed"){this.pendingBuffers_.length=0;return}this.processPendingSegments_();return}},{key:"videoSegmentTimingInfo_",value:function e(t){var r={start:{decode:t.start.dts/Mt,presentation:t.start.pts/Mt},end:{decode:t.end.dts/Mt,presentation:t.end.pts/Mt},baseMediaDecodeTime:t.baseMediaDecodeTime/Mt};if(t.prependedContentDuration){r.prependedContentDuration=t.prependedContentDuration/Mt}this.trigger({type:"videoSegmentTimingInfo",videoSegmentTimingInfo:r})}},{key:"createRealSourceBuffers_",value:function e(){var t=this;var r=["audio","video"];r.forEach(function(e){if(!t[e+"Codec_"]){return}if(t[e+"Buffer_"]){return}var i=null;if(t.mediaSource_[e+"Buffer_"]){i=t.mediaSource_[e+"Buffer_"];i.updating=false}else{var n=e+"Codec_";var a=e+'/mp4;codecs="'+t[n]+'"';i=Bt(t.mediaSource_.nativeMediaSource_,a);t.mediaSource_[e+"Buffer_"]=i}t[e+"Buffer_"]=i;["update","updatestart","updateend"].forEach(function(n){i.addEventListener(n,function(){if(e==="audio"&&t.audioDisabled_){return}if(n==="updateend"){t[e+"Buffer_"].updating=false}var i=r.every(function(r){if(r==="audio"&&t.audioDisabled_){return true}if(e!==r&&t[r+"Buffer_"]&&t[r+"Buffer_"].updating){return false}return true});if(i){return t.trigger(n)}})})})}},{key:"appendBuffer",value:function e(t){this.bufferUpdating_=true;if(this.audioBuffer_&&this.audioBuffer_.buffered.length){var r=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:r.end(r.length-1)})}if(this.videoBuffer_){this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:Lt(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)})}this.transmuxer_.postMessage({action:"push",data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength},[t.buffer]);this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function e(t){this.gopBuffer_=Rt(this.gopBuffer_,t.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function e(t,r){if(this.videoBuffer_){this.videoBuffer_.updating=true;this.videoBuffer_.remove(t,r);this.gopBuffer_=Ut(this.gopBuffer_,t,r,this.timeMapping_)}if(!this.audioDisabled_&&this.audioBuffer_){this.audioBuffer_.updating=true;this.audioBuffer_.remove(t,r)}at(t,r,this.metadataTrack_);if(this.inbandTextTracks_){for(var i in this.inbandTextTracks_){at(t,r,this.inbandTextTracks_[i])}}}},{key:"processPendingSegments_",value:function e(){var t={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};if(!this.pendingBuffers_.length){this.trigger("updateend");this.bufferUpdating_=false;return}t=this.pendingBuffers_.reduce(function(e,t){var r=t.type;var i=t.data;var n=t.initSegment;e[r].segments.push(i);e[r].bytes+=i.byteLength;e[r].initSegment=n;if(t.captions){e.captions=e.captions.concat(t.captions)}if(t.info){e[r].info=t.info}if(t.metadata){e.metadata=e.metadata.concat(t.metadata)}return e},t);if(!this.videoBuffer_&&!this.audioBuffer_){if(t.video.bytes===0){this.videoCodec_=null}if(t.audio.bytes===0){this.audioCodec_=null}this.createRealSourceBuffers_()}if(t.audio.info){this.mediaSource_.trigger({type:"audioinfo",info:t.audio.info})}if(t.video.info){this.mediaSource_.trigger({type:"videoinfo",info:t.video.info})}if(this.appendAudioInitSegment_){if(!this.audioDisabled_&&this.audioBuffer_){t.audio.segments.unshift(t.audio.initSegment);t.audio.bytes+=t.audio.initSegment.byteLength}this.appendAudioInitSegment_=false}var r=false;if(this.videoBuffer_&&t.video.bytes){t.video.segments.unshift(t.video.initSegment);t.video.bytes+=t.video.initSegment.byteLength;this.concatAndAppendSegments_(t.video,this.videoBuffer_)}else if(this.videoBuffer_&&(this.audioDisabled_||!this.audioBuffer_)){r=true}lt(this,t.captions,t.metadata);if(!this.audioDisabled_&&this.audioBuffer_){this.concatAndAppendSegments_(t.audio,this.audioBuffer_)}this.pendingBuffers_.length=0;if(r){this.trigger("updateend")}this.bufferUpdating_=false}},{key:"concatAndAppendSegments_",value:function e(t,r){var i=0;var n=void 0;if(t.bytes){n=new Uint8Array(t.bytes);t.segments.forEach(function(e){n.set(e,i);i+=e.byteLength});try{r.updating=true;r.appendBuffer(n)}catch(e){if(this.mediaSource_.player_){this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:e.message,originalError:e})}}}}},{key:"abort",value:function e(){if(this.videoBuffer_){this.videoBuffer_.abort()}if(!this.audioDisabled_&&this.audioBuffer_){this.audioBuffer_.abort()}if(this.transmuxer_){this.transmuxer_.postMessage({action:"reset"})}this.pendingBuffers_.length=0;this.bufferUpdating_=false}}]);return t}(i.EventTarget);var Wt=function(e){A(t,e);function t(){E(this,t);var e=I(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var r=void 0;e.nativeMediaSource_=new f.MediaSource;for(r in e.nativeMediaSource_){if(!(r in t.prototype)&&typeof e.nativeMediaSource_[r]==="function"){e[r]=e.nativeMediaSource_[r].bind(e.nativeMediaSource_)}}e.duration_=NaN;Object.defineProperty(e,"duration",{get:function e(){if(this.duration_===Infinity){return this.duration_}return this.nativeMediaSource_.duration},set:function e(t){this.duration_=t;if(t!==Infinity){this.nativeMediaSource_.duration=t;return}}});Object.defineProperty(e,"seekable",{get:function e(){if(this.duration_===Infinity){return i.createTimeRanges([[0,this.nativeMediaSource_.duration]])}return this.nativeMediaSource_.seekable}});Object.defineProperty(e,"readyState",{get:function e(){return this.nativeMediaSource_.readyState}});Object.defineProperty(e,"activeSourceBuffers",{get:function e(){return this.activeSourceBuffers_}});e.sourceBuffers=[];e.activeSourceBuffers_=[];e.updateActiveSourceBuffers_=function(){e.activeSourceBuffers_.length=0;if(e.sourceBuffers.length===1){var t=e.sourceBuffers[0];t.appendAudioInitSegment_=true;t.audioDisabled_=!t.audioCodec_;e.activeSourceBuffers_.push(t);return}var r=false;var i=true;for(var n=0;n<e.player_.audioTracks().length;n++){var a=e.player_.audioTracks()[n];if(a.enabled&&a.kind!=="main"){r=true;i=false;break}}e.sourceBuffers.forEach(function(t,n){t.appendAudioInitSegment_=true;if(t.videoCodec_&&t.audioCodec_){t.audioDisabled_=r}else if(t.videoCodec_&&!t.audioCodec_){t.audioDisabled_=true;i=false}else if(!t.videoCodec_&&t.audioCodec_){t.audioDisabled_=n?i:!i;if(t.audioDisabled_){return}}e.activeSourceBuffers_.push(t)})};e.onPlayerMediachange_=function(){e.sourceBuffers.forEach(function(e){e.appendAudioInitSegment_=true})};e.onHlsReset_=function(){e.sourceBuffers.forEach(function(e){if(e.transmuxer_){e.transmuxer_.postMessage({action:"resetCaptions"})}})};e.onHlsSegmentTimeMapping_=function(t){e.sourceBuffers.forEach(function(e){return e.timeMapping_=t.mapping})};["sourceopen","sourceclose","sourceended"].forEach(function(e){this.nativeMediaSource_.addEventListener(e,this.trigger.bind(this))},e);e.on("sourceopen",function(t){var r=u.querySelector('[src="'+e.url_+'"]');if(!r){return}e.player_=i(r.parentNode);if(!e.player_){return}e.player_.tech_.on("hls-reset",e.onHlsReset_);e.player_.tech_.on("hls-segment-time-mapping",e.onHlsSegmentTimeMapping_);if(e.player_.audioTracks&&e.player_.audioTracks()){e.player_.audioTracks().on("change",e.updateActiveSourceBuffers_);e.player_.audioTracks().on("addtrack",e.updateActiveSourceBuffers_);e.player_.audioTracks().on("removetrack",e.updateActiveSourceBuffers_)}e.player_.on("mediachange",e.onPlayerMediachange_)});e.on("sourceended",function(t){var r=ot(e.duration);for(var i=0;i<e.sourceBuffers.length;i++){var n=e.sourceBuffers[i];var a=n.metadataTrack_&&n.metadataTrack_.cues;if(a&&a.length){a[a.length-1].endTime=r}}});e.on("sourceclose",function(e){this.sourceBuffers.forEach(function(e){if(e.transmuxer_){e.transmuxer_.terminate()}});this.sourceBuffers.length=0;if(!this.player_){return}if(this.player_.audioTracks&&this.player_.audioTracks()){this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_);this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_);this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)}if(this.player_.el_){this.player_.off("mediachange",this.onPlayerMediachange_)}if(this.player_.tech_&&this.player_.tech_.el_){this.player_.tech_.off("hls-reset",this.onHlsReset_);this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)}});return e}w(t,[{key:"addSeekableRange_",value:function e(t,r){var i=void 0;if(this.duration!==Infinity){i=new Error("MediaSource.addSeekableRange() can only be invoked "+"when the duration is Infinity");i.name="InvalidStateError";i.code=11;throw i}if(r>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration)){this.nativeMediaSource_.duration=r}}},{key:"addSourceBuffer",value:function e(t){var r=void 0;var i=Pt(t);if(/^(video|audio)\/mp2t$/i.test(i.type)){var n=[];if(i.parameters&&i.parameters.codecs){n=i.parameters.codecs.split(",");n=kt(n);n=n.filter(function(e){return Ot(e)||Dt(e)})}if(n.length===0){n=["avc1.4d400d","mp4a.40.2"]}r=new Ft(this,n);if(this.sourceBuffers.length!==0){this.sourceBuffers[0].createRealSourceBuffers_();r.createRealSourceBuffers_();this.sourceBuffers[0].audioDisabled_=true}}else{r=this.nativeMediaSource_.addSourceBuffer(t)}this.sourceBuffers.push(r);return r}}]);return t}(i.EventTarget);var Ht=0;i.mediaSources={};var qt=function e(t,r){var n=i.mediaSources[t];if(n){n.trigger({type:"sourceopen",swfId:r})}else{throw new Error("Media Source not found (Video.js)")}};var Vt=function e(){return!!f.MediaSource&&!!f.MediaSource.isTypeSupported&&f.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')};var Kt=function e(){this.MediaSource={open:qt,supportsNativeMediaSources:Vt};if(Vt()){return new Wt}throw new Error("Cannot use create a virtual MediaSource for this video")};Kt.open=qt;Kt.supportsNativeMediaSources=Vt;var zt={createObjectURL:function e(t){var r="blob:vjs-media-source/";var n=void 0;if(t instanceof Wt){n=f.URL.createObjectURL(t.nativeMediaSource_);t.url_=n;return n}if(!(t instanceof Wt)){n=f.URL.createObjectURL(t);t.url_=n;return n}n=r+Ht;Ht++;i.mediaSources[n]=t;return n}};i.MediaSource=Kt;i.URL=zt;var Gt=function e(t){return!!t&&typeof t==="object"};var Yt=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}return r.reduce(function(t,r){Object.keys(r).forEach(function(i){if(Array.isArray(t[i])&&Array.isArray(r[i])){t[i]=t[i].concat(r[i])}else if(Gt(t[i])&&Gt(r[i])){t[i]=e(t[i],r[i])}else{t[i]=r[i]}});return t},{})};var Xt=function e(t){return Object.keys(t).map(function(e){return t[e]})};var $t=function e(t,r){var i=[];for(var n=t;n<r;n++){i.push(n)}return i};var Jt=function e(t){return t.reduce(function(e,t){return e.concat(t)},[])};var Qt=function e(t){if(!t.length){return[]}var r=[];for(var i=0;i<t.length;i++){r.push(t[i])}return r};var Zt=function e(t,r){return t.reduce(function(e,t,i){if(t[r]){e.push(i)}return e},[])};var er={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};var tr=typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function rr(e,t){return t={exports:{}},e(t,t.exports),t.exports}var ir=rr(function(e,t){(function(t){var r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/;var i=/^([^\/?#]*)(.*)$/;var n=/(?:\/|^)\.(?=\/)/g;var a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g;var s={buildAbsoluteURL:function e(t,r,n){n=n||{};t=t.trim();r=r.trim();if(!r){if(!n.alwaysNormalize){return t}var a=s.parseURL(t);if(!a){throw new Error("Error trying to parse base URL.")}a.path=s.normalizePath(a.path);return s.buildURLFromParts(a)}var o=s.parseURL(r);if(!o){throw new Error("Error trying to parse relative URL.")}if(o.scheme){if(!n.alwaysNormalize){return r}o.path=s.normalizePath(o.path);return s.buildURLFromParts(o)}var l=s.parseURL(t);if(!l){throw new Error("Error trying to parse base URL.")}if(!l.netLoc&&l.path&&l.path[0]!=="/"){var u=i.exec(l.path);l.netLoc=u[1];l.path=u[2]}if(l.netLoc&&!l.path){l.path="/"}var c={scheme:l.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc){c.netLoc=l.netLoc;if(o.path[0]!=="/"){if(!o.path){c.path=l.path;if(!o.params){c.params=l.params;if(!o.query){c.query=l.query}}}else{var d=l.path;var f=d.substring(0,d.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(f)}}}if(c.path===null){c.path=n.alwaysNormalize?s.normalizePath(o.path):o.path}return s.buildURLFromParts(c)},parseURL:function e(t){var i=r.exec(t);if(!i){return null}return{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}},normalizePath:function e(t){t=t.split("").reverse().join("").replace(n,"");while(t.length!==(t=t.replace(a,"")).length){}return t.split("").reverse().join("")},buildURLFromParts:function e(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};e.exports=s})(tr)});var nr=function e(t,r){if(/^[a-z]+:/i.test(r)){return r}if(!/\/\//i.test(t)){t=ir.buildAbsoluteURL(f.location.href,t)}return ir.buildAbsoluteURL(t,r)};var ar=function e(t){var r=t.baseUrl,i=r===void 0?"":r,n=t.source,a=n===void 0?"":n,s=t.range,o=s===void 0?"":s,l=t.indexRange,u=l===void 0?"":l;var c={uri:a,resolvedUri:nr(i||"",a)};if(o||u){var d=o?o:u;var f=d.split("-");var h=parseInt(f[0],10);var p=parseInt(f[1],10);c.byterange={length:p-h+1,offset:h}}return c};var sr=function e(t){var r=t.offset+t.length-1;return t.offset+"-"+r};var or={static:function e(t){var r=t.duration,i=t.timescale,n=i===void 0?1:i,a=t.sourceDuration;return{start:0,end:Math.ceil(a/(r/n))}},dynamic:function e(t){var r=t.NOW,i=t.clientOffset,n=t.availabilityStartTime,a=t.timescale,s=a===void 0?1:a,o=t.duration,l=t.start,u=l===void 0?0:l,c=t.minimumUpdatePeriod,d=c===void 0?0:c,f=t.timeShiftBufferDepth,h=f===void 0?Infinity:f;var p=(r+i)/1e3;var v=n+u;var m=p+d;var g=m-v;var y=Math.ceil(g*s/o);var _=Math.floor((p-v-h)*s/o);var b=Math.floor((p-v)*s/o);return{start:Math.max(0,_),end:Math.min(y,b)}}};var lr=function e(t){return function(e,r){var i=t.duration,n=t.timescale,a=n===void 0?1:n,s=t.periodIndex,o=t.startNumber,l=o===void 0?1:o;return{number:l+e,duration:i/a,timeline:s,time:r*i}}};var ur=function e(t){var r=t.type,i=r===void 0?"static":r,n=t.duration,a=t.timescale,s=a===void 0?1:a,o=t.sourceDuration;var l=or[i](t),u=l.start,c=l.end;var d=$t(u,c).map(lr(t));if(i==="static"){var f=d.length-1;d[f].duration=o-n/s*f}return d};var cr=function e(t){var r=t.baseUrl,i=t.initialization,n=i===void 0?{}:i,a=t.sourceDuration,s=t.timescale,o=s===void 0?1:s,l=t.indexRange,u=l===void 0?"":l,c=t.duration;if(!r){throw new Error(er.NO_BASE_URL)}var d=ar({baseUrl:r,source:n.sourceURL,range:n.range});var f=ar({baseUrl:r,source:r,indexRange:u});f.map=d;if(c){var h=ur(t);if(h.length){f.duration=h[0].duration;f.timeline=h[0].timeline}}else if(a){f.duration=a/o;f.timeline=0}f.number=0;return[f]};var dr=function e(t,r,i){var n=t.sidx.map?t.sidx.map:null;var a=t.sidx.duration;var s=t.timeline||0;var o=t.sidx.byterange;var l=o.offset+o.length;var u=r.timescale;var c=r.references.filter(function(e){return e.referenceType!==1});var d=[];var f=l+r.firstOffset;for(var h=0;h<c.length;h++){var p=r.references[h];var v=p.referencedSize;var m=p.subsegmentDuration;var g=f+v-1;var y=f+"-"+g;var _={baseUrl:i,timescale:u,timeline:s,periodIndex:s,duration:m,sourceDuration:a,indexRange:y};var b=cr(_)[0];if(n){b.map=n}d.push(b);f+=v}t.segments=d;return t};var fr=function e(t){var r=Xt(t.reduce(function(e,t){var r=t.attributes.id+(t.attributes.lang||"");if(e[r]){var i;if(t.segments[0]){t.segments[0].discontinuity=true}(i=e[r].segments).push.apply(i,t.segments);if(t.attributes.contentProtection){e[r].attributes.contentProtection=t.attributes.contentProtection}}else{e[r]=t}return e},{}));return r.map(function(e){e.discontinuityStarts=Zt(e.segments,"discontinuity");return e})};var hr=function e(t,r){if(r===void 0){r={}}if(!Object.keys(r).length){return t}for(var i in t){var n=t[i];if(!n.sidx){continue}var a=n.sidx.uri+"-"+sr(n.sidx.byterange);var s=r[a]&&r[a].sidx;if(n.sidx&&s){dr(n,s,n.sidx.resolvedUri)}}return t};var pr=function e(t){var r;var i=t.attributes,n=t.segments,a=t.sidx;var s={attributes:(r={NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs},r["PROGRAM-ID"]=1,r),uri:"",endList:(i.type||"static")==="static",timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};if(i.contentProtection){s.contentProtection=i.contentProtection}if(a){s.sidx=a}return s};var vr=function e(t){var r;var i=t.attributes,n=t.segments;if(typeof n==="undefined"){n=[{uri:i.baseUrl,timeline:i.periodIndex,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}];i.duration=i.sourceDuration}return{attributes:(r={NAME:i.id,BANDWIDTH:i.bandwidth},r["PROGRAM-ID"]=1,r),uri:"",endList:(i.type||"static")==="static",timeline:i.periodIndex,resolvedUri:i.baseUrl||"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1}};var mr=function e(t,r){if(r===void 0){r={}}var i;var n=t.reduce(function(e,t){var n=t.attributes.role&&t.attributes.role.value||"";var a=t.attributes.lang||"";var s="main";if(a){var o=n?" ("+n+")":"";s=""+t.attributes.lang+o}if(e[s]&&e[s].playlists[0].attributes.BANDWIDTH>t.attributes.bandwidth){return e}e[s]={language:a,autoselect:true,default:n==="main",playlists:hr([pr(t)],r),uri:""};if(typeof i==="undefined"&&n==="main"){i=t;i.default=true}return e},{});if(!i){var a=Object.keys(n)[0];n[a].default=true}return n};var gr=function e(t,r){if(r===void 0){r={}}return t.reduce(function(e,t){var i=t.attributes.lang||"text";if(e[i]){return e}e[i]={language:i,default:false,autoselect:false,playlists:hr([vr(t)],r),uri:""};return e},{})};var yr=function e(t){var r;var i=t.attributes,n=t.segments,a=t.sidx;var s={attributes:(r={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},r["PROGRAM-ID"]=1,r),uri:"",endList:(i.type||"static")==="static",timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};if(i.contentProtection){s.contentProtection=i.contentProtection}if(a){s.sidx=a}return s};var _r=function e(t,r){var i;if(r===void 0){r={}}if(!t.length){return{}}var n=t[0].attributes,a=n.sourceDuration,s=n.minimumUpdatePeriod,o=s===void 0?0:s;var l=function e(t){var r=t.attributes;return r.mimeType==="video/mp4"||r.contentType==="video"};var u=function e(t){var r=t.attributes;return r.mimeType==="audio/mp4"||r.contentType==="audio"};var c=function e(t){var r=t.attributes;return r.mimeType==="text/vtt"||r.contentType==="text"};var d=fr(t.filter(l)).map(yr);var f=fr(t.filter(u));var h=t.filter(c);var p={allowCache:true,discontinuityStarts:[],segments:[],endList:true,mediaGroups:(i={AUDIO:{},VIDEO:{}},i["CLOSED-CAPTIONS"]={},i.SUBTITLES={},i),uri:"",duration:a,playlists:hr(d,r),minimumUpdatePeriod:o*1e3};if(f.length){p.mediaGroups.AUDIO.audio=mr(f,r)}if(h.length){p.mediaGroups.SUBTITLES.subs=gr(h,r)}return p};var br=function e(t,r,i){var n=t.NOW,a=t.clientOffset,s=t.availabilityStartTime,o=t.timescale,l=o===void 0?1:o,u=t.start,c=u===void 0?0:u,d=t.minimumUpdatePeriod,f=d===void 0?0:d;var h=(n+a)/1e3;var p=s+c;var v=h+f;var m=v-p;return Math.ceil((m*l-r)/i)};var Tr=function e(t,r){var i=t.type,n=i===void 0?"static":i,a=t.minimumUpdatePeriod,s=a===void 0?0:a,o=t.media,l=o===void 0?"":o,u=t.sourceDuration,c=t.timescale,d=c===void 0?1:c,f=t.startNumber,h=f===void 0?1:f,p=t.periodIndex;var v=[];var m=-1;for(var g=0;g<r.length;g++){var y=r[g];var _=y.d;var b=y.r||0;var T=y.t||0;if(m<0){m=T}if(T&&T>m){m=T}var S=void 0;if(b<0){var k=g+1;if(k===r.length){if(n==="dynamic"&&s>0&&l.indexOf("$Number$")>0){S=br(t,m,_)}else{S=(u*d-m)/_}}else{S=(r[k].t-m)/_}}else{S=b+1}var j=h+v.length+S;var E=h+v.length;while(E<j){v.push({number:E,duration:_/d,time:m,timeline:p});m+=_;E++}}return v};var Sr=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g;var kr=function e(t){return function(e,r,i,n){if(e==="$$"){return"$"}if(typeof t[r]==="undefined"){return e}var a=""+t[r];if(r==="RepresentationID"){return a}if(!i){n=1}else{n=parseInt(n,10)}if(a.length>=n){return a}return""+new Array(n-a.length+1).join("0")+a}};var jr=function e(t,r){return t.replace(Sr,kr(r))};var Er=function e(t,r){if(!t.duration&&!r){return[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]}if(t.duration){return ur(t)}return Tr(t,r)};var wr=function e(t,r){var i={RepresentationID:t.id,Bandwidth:t.bandwidth||0};var n=t.initialization,a=n===void 0?{sourceURL:"",range:""}:n;var s=ar({baseUrl:t.baseUrl,source:jr(a.sourceURL,i),range:a.range});var o=Er(t,r);return o.map(function(e){i.Number=e.number;i.Time=e.time;var r=jr(t.media||"",i);return{uri:r,timeline:e.timeline,duration:e.duration,resolvedUri:nr(t.baseUrl||"",r),map:s,number:e.number}})};var Cr=function e(t,r){var i=t.baseUrl,n=t.initialization,a=n===void 0?{}:n;var s=ar({baseUrl:i,source:a.sourceURL,range:a.range});var o=ar({baseUrl:i,source:r.media,range:r.mediaRange});o.map=s;return o};var Ar=function e(t,r){var i=t.duration,n=t.segmentUrls,a=n===void 0?[]:n;if(!i&&!r||i&&r){throw new Error(er.SEGMENT_TIME_UNSPECIFIED)}var s=a.map(function(e){return Cr(t,e)});var o;if(i){o=ur(t)}if(r){o=Tr(t,r)}var l=o.map(function(e,t){if(s[t]){var r=s[t];r.timeline=e.timeline;r.duration=e.duration;r.number=e.number;return r}}).filter(function(e){return e});return l};var Ir=function e(t){var r=t.attributes,i=t.segmentInfo;var n;var a;if(i.template){a=wr;n=Yt(r,i.template)}else if(i.base){a=cr;n=Yt(r,i.base)}else if(i.list){a=Ar;n=Yt(r,i.list)}var s={attributes:r};if(!a){return s}var o=a(n,i.timeline);if(n.duration){var l=n,u=l.duration,c=l.timescale,d=c===void 0?1:c;n.duration=u/d}else if(o.length){n.duration=o.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0)}else{n.duration=0}s.attributes=n;s.segments=o;if(i.base&&n.indexRange){s.sidx=o[0];s.segments=[]}return s};var xr=function e(t){return t.map(Ir)};var Pr=function e(t,r){return Qt(t.childNodes).filter(function(e){var t=e.tagName;return t===r})};var Or=function e(t){return t.textContent.trim()};var Dr=function e(t){var r=365*24*60*60;var i=30*24*60*60;var n=24*60*60;var a=60*60;var s=60;var o=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/;var l=o.exec(t);if(!l){return 0}var u=l.slice(1),c=u[0],d=u[1],f=u[2],h=u[3],p=u[4],v=u[5];return parseFloat(c||0)*r+parseFloat(d||0)*i+parseFloat(f||0)*n+parseFloat(h||0)*a+parseFloat(p||0)*s+parseFloat(v||0)};var Lr=function e(t){var r=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;if(r.test(t)){t+="Z"}return Date.parse(t)};var Rr={mediaPresentationDuration:function e(t){return Dr(t)},availabilityStartTime:function e(t){return Lr(t)/1e3},minimumUpdatePeriod:function e(t){return Dr(t)},timeShiftBufferDepth:function e(t){return Dr(t)},start:function e(t){return Dr(t)},width:function e(t){return parseInt(t,10)},height:function e(t){return parseInt(t,10)},bandwidth:function e(t){return parseInt(t,10)},startNumber:function e(t){return parseInt(t,10)},timescale:function e(t){return parseInt(t,10)},duration:function e(t){var r=parseInt(t,10);if(isNaN(r)){return Dr(t)}return r},d:function e(t){return parseInt(t,10)},t:function e(t){return parseInt(t,10)},r:function e(t){return parseInt(t,10)},DEFAULT:function e(t){return t}};var Ur=function e(t){if(!(t&&t.attributes)){return{}}return Qt(t.attributes).reduce(function(e,t){var r=Rr[t.name]||Rr.DEFAULT;e[t.name]=r(t.value);return e},{})};function Nr(e){var t=f.atob(e);var r=new Uint8Array(t.length);for(var i=0;i<t.length;i++){r[i]=t.charCodeAt(i)}return r}var Mr={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"};var Br=function e(t,r){if(!r.length){return t}return Jt(t.map(function(e){return r.map(function(t){return nr(e,Or(t))})}))};var Fr=function e(t){var r=Pr(t,"SegmentTemplate")[0];var i=Pr(t,"SegmentList")[0];var n=i&&Pr(i,"SegmentURL").map(function(e){return Yt({tag:"SegmentURL"},Ur(e))});var a=Pr(t,"SegmentBase")[0];var s=i||r;var o=s&&Pr(s,"SegmentTimeline")[0];var l=i||a||r;var u=l&&Pr(l,"Initialization")[0];var c=r&&Ur(r);if(c&&u){c.initialization=u&&Ur(u)}else if(c&&c.initialization){c.initialization={sourceURL:c.initialization}}var d={template:c,timeline:o&&Pr(o,"S").map(function(e){return Ur(e)}),list:i&&Yt(Ur(i),{segmentUrls:n,initialization:Ur(u)}),base:a&&Yt(Ur(a),{initialization:Ur(u)})};Object.keys(d).forEach(function(e){if(!d[e]){delete d[e]}});return d};var Wr=function e(t,r,i){return function(e){var n=Pr(e,"BaseURL");var a=Br(r,n);var s=Yt(t,Ur(e));var o=Fr(e);return a.map(function(e){return{segmentInfo:Yt(i,o),attributes:Yt(s,{baseUrl:e})}})}};var Hr=function e(t){return t.reduce(function(e,t){var r=Ur(t);var i=Mr[r.schemeIdUri];if(i){e[i]={attributes:r};var n=Pr(t,"cenc:pssh")[0];if(n){var a=Or(n);var s=a&&Nr(a);e[i].pssh=s}}return e},{})};var qr=function e(t,r,i){return function(e){var n=Ur(e);var a=Br(r,Pr(e,"BaseURL"));var s=Pr(e,"Role")[0];var o={role:Ur(s)};var l=Yt(t,n,o);var u=Hr(Pr(e,"ContentProtection"));if(Object.keys(u).length){l=Yt(l,{contentProtection:u})}var c=Fr(e);var d=Pr(e,"Representation");var f=Yt(i,c);return Jt(d.map(Wr(l,a,f)))}};var Vr=function e(t,r){return function(e,i){var n=Br(r,Pr(e,"BaseURL"));var a=Ur(e);var s=parseInt(a.id,10);var o=f.isNaN(s)?i:s;var l=Yt(t,{periodIndex:o});var u=Pr(e,"AdaptationSet");var c=Fr(e);return Jt(u.map(qr(l,n,c)))}};var Kr=function e(t,r){if(r===void 0){r={}}var i=r,n=i.manifestUri,a=n===void 0?"":n,s=i.NOW,o=s===void 0?Date.now():s,l=i.clientOffset,u=l===void 0?0:l;var c=Pr(t,"Period");if(!c.length){throw new Error(er.INVALID_NUMBER_OF_PERIOD)}var d=Ur(t);var f=Br([a],Pr(t,"BaseURL"));d.sourceDuration=d.mediaPresentationDuration||0;d.NOW=o;d.clientOffset=u;return Jt(c.map(Vr(d,f)))};var zr=function e(t){if(t===""){throw new Error(er.DASH_EMPTY_MANIFEST)}var r=new f.DOMParser;var i=r.parseFromString(t,"application/xml");var n=i&&i.documentElement.tagName==="MPD"?i.documentElement:null;if(!n||n&&n.getElementsByTagName("parsererror").length>0){throw new Error(er.DASH_INVALID_XML)}return n};var Gr=function e(t){var r=Pr(t,"UTCTiming")[0];if(!r){return null}var i=Ur(r);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT";i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(er.UNSUPPORTED_UTC_TIMING_SCHEME)}return i};var Yr=function e(t,r){if(r===void 0){r={}}return _r(xr(Kr(zr(t),r)),r.sidxMapping)};var Xr=function e(t){return Gr(zr(t))};var $r=function e(t){return t>>>0};var Jr=function e(t){return("00"+t.toString(16)).slice(-2)};var Qr={toUnsigned:$r,toHexString:Jr};var Zr,ei,ti=Qr.toUnsigned,ri=function e(t){return new Date(t*1e3-20828448e5)},ii=function e(t){return{isLeading:(t[0]&12)>>>2,dependsOn:t[0]&3,isDependedOn:(t[1]&192)>>>6,hasRedundancy:(t[1]&48)>>>4,paddingValue:(t[1]&14)>>>1,isNonSyncSample:t[1]&1,degradationPriority:t[2]<<8|t[3]}},ni=function e(t){var r="";r+=String.fromCharCode(t[0]);r+=String.fromCharCode(t[1]);r+=String.fromCharCode(t[2]);r+=String.fromCharCode(t[3]);return r},ai=function e(t,r){var i=[],n,a,s,o,l;if(!r.length){return null}for(n=0;n<t.byteLength;){a=ti(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]);s=ni(t.subarray(n+4,n+8));o=a>1?n+a:t.byteLength;if(s===r[0]){if(r.length===1){i.push(t.subarray(n+8,o))}else{l=e(t.subarray(n+8,o),r.slice(1));if(l.length){i=i.concat(l)}}}n=o}return i},si=function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=[],n,a;for(n=0;n+4<t.length;n+=a){a=r.getUint32(n);n+=4;if(a<=0){i.push("<span style='color:red;'>MALFORMED DATA</span>");continue}switch(t[n]&31){case 1:i.push("slice_layer_without_partitioning_rbsp");break;case 5:i.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:i.push("sei_rbsp");break;case 7:i.push("seq_parameter_set_rbsp");break;case 8:i.push("pic_parameter_set_rbsp");break;case 9:i.push("access_unit_delimiter_rbsp");break;default:i.push("UNKNOWN NAL - "+t[n]&31);break}}return i},oi={avc1:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:r.getUint16(6),width:r.getUint16(24),height:r.getUint16(26),horizresolution:r.getUint16(28)+r.getUint16(30)/16,vertresolution:r.getUint16(32)+r.getUint16(34)/16,frameCount:r.getUint16(40),depth:r.getUint16(74),config:Zr(t.subarray(78,t.byteLength))}},avcC:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:t[4]&3,sps:[],pps:[]},n=t[5]&31,a,s,o,l;o=6;for(l=0;l<n;l++){s=r.getUint16(o);o+=2;i.sps.push(new Uint8Array(t.subarray(o,o+s)));o+=s}a=t[o];o++;for(l=0;l<a;l++){s=r.getUint16(o);o+=2;i.pps.push(new Uint8Array(t.subarray(o,o+s)));o+=s}return i},btrt:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:r.getUint32(0),maxBitrate:r.getUint32(4),avgBitrate:r.getUint32(8)}},esds:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),esId:t[6]<<8|t[7],streamPriority:t[8]&31,decoderConfig:{objectProfileIndication:t[11],streamType:t[12]>>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(t[26]&7)<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={majorBrand:ni(t.subarray(0,4)),minorVersion:r.getUint32(4),compatibleBrands:[]},n=8;while(n<t.byteLength){i.compatibleBrands.push(ni(t.subarray(n,n+4)));n+=4}return i},dinf:function e(t){return{boxes:Zr(t)}},dref:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:Zr(t.subarray(8))}},hdlr:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:ni(t.subarray(8,12)),name:""},n=8;for(n=24;n<t.byteLength;n++){if(t[n]===0){n++;break}i.name+=String.fromCharCode(t[n])}i.name=decodeURIComponent(escape(i.name));return i},mdat:function e(t){return{byteLength:t.byteLength,nals:si(t)}},mdhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n,a={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};if(a.version===1){i+=4;a.creationTime=ri(r.getUint32(i));i+=8;a.modificationTime=ri(r.getUint32(i));i+=4;a.timescale=r.getUint32(i);i+=8;a.duration=r.getUint32(i)}else{a.creationTime=ri(r.getUint32(i));i+=4;a.modificationTime=ri(r.getUint32(i));i+=4;a.timescale=r.getUint32(i);i+=4;a.duration=r.getUint32(i)}i+=4;n=r.getUint16(i);a.language+=String.fromCharCode((n>>10)+96);a.language+=String.fromCharCode(((n&992)>>5)+96);a.language+=String.fromCharCode((n&31)+96);return a},mdia:function e(t){return{boxes:Zr(t)}},mfhd:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function e(t){return{boxes:Zr(t)}},mp4a:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={dataReferenceIndex:r.getUint16(6),channelcount:r.getUint16(16),samplesize:r.getUint16(18),samplerate:r.getUint16(24)+r.getUint16(26)/65536};if(t.byteLength>28){i.streamDescriptor=Zr(t.subarray(28))[0]}return i},moof:function e(t){return{boxes:Zr(t)}},moov:function e(t){return{boxes:Zr(t)}},mvex:function e(t){return{boxes:Zr(t)}},mvhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};if(n.version===1){i+=4;n.creationTime=ri(r.getUint32(i));i+=8;n.modificationTime=ri(r.getUint32(i));i+=4;n.timescale=r.getUint32(i);i+=8;n.duration=r.getUint32(i)}else{n.creationTime=ri(r.getUint32(i));i+=4;n.modificationTime=ri(r.getUint32(i));i+=4;n.timescale=r.getUint32(i);i+=4;n.duration=r.getUint32(i)}i+=4;n.rate=r.getUint16(i)+r.getUint16(i+2)/16;i+=4;n.volume=r.getUint8(i)+r.getUint8(i+1)/8;i+=2;i+=2;i+=2*4;n.matrix=new Uint32Array(t.subarray(i,i+9*4));i+=9*4;i+=6*4;n.nextTrackId=r.getUint32(i);return n},pdin:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:r.getUint32(4),initialDelay:r.getUint32(8)}},sdtp:function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},i;for(i=4;i<t.byteLength;i++){r.samples.push({dependsOn:(t[i]&48)>>4,isDependedOn:(t[i]&12)>>2,hasRedundancy:t[i]&3})}return r},sidx:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:r.getUint32(4),timescale:r.getUint32(8),earliestPresentationTime:r.getUint32(12),firstOffset:r.getUint32(16)},n=r.getUint16(22),a;for(a=24;n;a+=12,n--){i.references.push({referenceType:(t[a]&128)>>>7,referencedSize:r.getUint32(a)&2147483647,subsegmentDuration:r.getUint32(a+4),startsWithSap:!!(t[a+8]&128),sapType:(t[a+8]&112)>>>4,sapDeltaTime:r.getUint32(a+8)&268435455})}return i},smhd:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function e(t){return{boxes:Zr(t)}},stco:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},n=r.getUint32(4),a;for(a=8;n;a+=4,n--){i.chunkOffsets.push(r.getUint32(a))}return i},stsc:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=r.getUint32(4),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]},a;for(a=8;i;a+=12,i--){n.sampleToChunks.push({firstChunk:r.getUint32(a),samplesPerChunk:r.getUint32(a+4),sampleDescriptionIndex:r.getUint32(a+8)})}return n},stsd:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:Zr(t.subarray(8))}},stsz:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:r.getUint32(4),entries:[]},n;for(n=12;n<t.byteLength;n+=4){i.entries.push(r.getUint32(n))}return i},stts:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},n=r.getUint32(4),a;for(a=8;n;a+=8,n--){i.timeToSamples.push({sampleCount:r.getUint32(a),sampleDelta:r.getUint32(a+4)})}return i},styp:function e(t){return oi.ftyp(t)},tfdt:function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:ti(t[4]<<24|t[5]<<16|t[6]<<8|t[7])};if(r.version===1){r.baseMediaDecodeTime*=Math.pow(2,32);r.baseMediaDecodeTime+=ti(t[8]<<24|t[9]<<16|t[10]<<8|t[11])}return r},tfhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:r.getUint32(4)},n=i.flags[2]&1,a=i.flags[2]&2,s=i.flags[2]&8,o=i.flags[2]&16,l=i.flags[2]&32,u=i.flags[0]&65536,c=i.flags[0]&131072,d;d=8;if(n){d+=4;i.baseDataOffset=r.getUint32(12);d+=4}if(a){i.sampleDescriptionIndex=r.getUint32(d);d+=4}if(s){i.defaultSampleDuration=r.getUint32(d);d+=4}if(o){i.defaultSampleSize=r.getUint32(d);d+=4}if(l){i.defaultSampleFlags=r.getUint32(d)}if(u){i.durationIsEmpty=true}if(!n&&c){i.baseDataOffsetIsMoof=true}return i},tkhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};if(n.version===1){i+=4;n.creationTime=ri(r.getUint32(i));i+=8;n.modificationTime=ri(r.getUint32(i));i+=4;n.trackId=r.getUint32(i);i+=4;i+=8;n.duration=r.getUint32(i)}else{n.creationTime=ri(r.getUint32(i));i+=4;n.modificationTime=ri(r.getUint32(i));i+=4;n.trackId=r.getUint32(i);i+=4;i+=4;n.duration=r.getUint32(i)}i+=4;i+=2*4;n.layer=r.getUint16(i);i+=2;n.alternateGroup=r.getUint16(i);i+=2;n.volume=r.getUint8(i)+r.getUint8(i+1)/8;i+=2;i+=2;n.matrix=new Uint32Array(t.subarray(i,i+9*4));i+=9*4;n.width=r.getUint16(i)+r.getUint16(i+2)/16;i+=4;n.height=r.getUint16(i)+r.getUint16(i+2)/16;return n},traf:function e(t){return{boxes:Zr(t)}},trak:function e(t){return{boxes:Zr(t)}},trex:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:r.getUint32(4),defaultSampleDescriptionIndex:r.getUint32(8),defaultSampleDuration:r.getUint32(12),defaultSampleSize:r.getUint32(16),sampleDependsOn:t[20]&3,sampleIsDependedOn:(t[21]&192)>>6,sampleHasRedundancy:(t[21]&48)>>4,samplePaddingValue:(t[21]&14)>>1,sampleIsDifferenceSample:!!(t[21]&1),sampleDegradationPriority:r.getUint16(22)}},trun:function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=r.flags[2]&1,a=r.flags[2]&4,s=r.flags[1]&1,o=r.flags[1]&2,l=r.flags[1]&4,u=r.flags[1]&8,c=i.getUint32(4),d=8,f;if(n){r.dataOffset=i.getInt32(d);d+=4}if(a&&c){f={flags:ii(t.subarray(d,d+4))};d+=4;if(s){f.duration=i.getUint32(d);d+=4}if(o){f.size=i.getUint32(d);d+=4}if(u){f.compositionTimeOffset=i.getUint32(d);d+=4}r.samples.push(f);c--}while(c--){f={};if(s){f.duration=i.getUint32(d);d+=4}if(o){f.size=i.getUint32(d);d+=4}if(l){f.flags=ii(t.subarray(d,d+4));d+=4}if(u){f.compositionTimeOffset=i.getUint32(d);d+=4}r.samples.push(f)}return r},"url ":function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:r.getUint16(4),opcolor:new Uint16Array([r.getUint16(6),r.getUint16(8),r.getUint16(10)])}}};Zr=function e(t){var r=0,i=[],n,a,s,o,l;var u=new ArrayBuffer(t.length);var c=new Uint8Array(u);for(var d=0;d<t.length;++d){c[d]=t[d]}n=new DataView(u);while(r<t.byteLength){a=n.getUint32(r);s=ni(t.subarray(r+4,r+8));o=a>1?r+a:t.byteLength;l=(oi[s]||function(e){return{data:e}})(t.subarray(r+8,o));l.size=a;l.type=s;i.push(l);r=o}return i};ei=function e(t,r){var i;r=r||0;i=new Array(r*2+1).join(" ");return t.map(function(e,t){return i+e.type+"\n"+Object.keys(e).filter(function(e){return e!=="type"&&e!=="boxes"}).map(function(t){var r=i+"  "+t+": ",n=e[t];if(n instanceof Uint8Array||n instanceof Uint32Array){var a=Array.prototype.slice.call(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)).map(function(e){return" "+("00"+e.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);if(!a){return r+"<>"}if(a.length===1){return r+"<"+a.join("").slice(1)+">"}return r+"<\n"+a.map(function(e){return i+"  "+e}).join("\n")+"\n"+i+"  >"}return r+JSON.stringify(n,null,2).split("\n").map(function(e,t){if(t===0){return e}return i+"  "+e}).join("\n")}).join("\n")+(e.boxes?"\n"+ei(e.boxes,r+1):"")}).join("\n")};var li={inspect:Zr,textify:ei,parseType:ni,findBox:ai,parseTraf:oi.traf,parseTfdt:oi.tfdt,parseHdlr:oi.hdlr,parseTfhd:oi.tfhd,parseTrun:oi.trun,parseSidx:oi.sidx};var ui=i.EventTarget,ci=i.mergeOptions;var di=function e(t,r){var i=void 0;var n=ci(t,{duration:r.duration,minimumUpdatePeriod:r.minimumUpdatePeriod});for(var a=0;a<r.playlists.length;a++){var s=N(n,r.playlists[a]);if(s){n=s}else{i=true}}L(r,function(e,t,r,a){if(e.playlists&&e.playlists.length){var s=e.playlists[0].uri;var o=N(n,e.playlists[0]);if(o){n=o;n.mediaGroups[t][r][a].playlists[0]=n.playlists[s];i=false}}});if(i){return null}return n};var fi=function e(t){var r=t.byterange.offset+t.byterange.length-1;return t.uri+"-"+t.byterange.offset+"-"+r};var hi=function e(t,r){var i=Boolean(!t.map&&!r.map);var n=i||Boolean(t.map&&r.map&&t.map.byterange.offset===r.map.byterange.offset&&t.map.byterange.length===r.map.byterange.length);return n&&t.uri===r.uri&&t.byterange.offset===r.byterange.offset&&t.byterange.length===r.byterange.length};var pi=function e(t,r){var i={};for(var n in t){var a=t[n];var s=a.sidx;if(s){var o=fi(s);if(!r[o]){break}var l=r[o].sidxInfo;if(hi(l,s)){i[o]=r[o]}}}return i};var vi=function e(t,r,i,n){var a=Yr(t,{manifestUri:r,clientOffset:i});var s=pi(a.playlists,n);var o=s;L(a,function(e,t,r,i){if(e.playlists&&e.playlists.length){var a=e.playlists;o=ci(o,pi(a,n))}});return o};var mi=function e(t,r,n,a,s){var o={uri:p(a.handleManifestRedirects,t.resolvedUri),byterange:t.byterange,playlist:r};var l=i.mergeOptions(o,{responseType:"arraybuffer",headers:me(o)});return n(l,s)};var gi=function(e){A(t,e);function t(e,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var n=arguments[3];E(this,t);var a=I(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var s=i.withCredentials,o=s===undefined?false:s,l=i.handleManifestRedirects,u=l===undefined?false:l;a.hls_=r;a.withCredentials=o;a.handleManifestRedirects=u;if(!e){throw new Error("A non-empty playlist URL or playlist is required")}a.on("minimumUpdatePeriod",function(){a.refreshXml_()});a.on("mediaupdatetimeout",function(){a.refreshMedia_(a.media().uri)});a.state="HAVE_NOTHING";a.loadedPlaylists_={};if(typeof e==="string"){a.srcUrl=e;a.sidxMapping_={};return I(a)}a.setupChildLoader(n,e);return a}w(t,[{key:"setupChildLoader",value:function e(t,r){this.masterPlaylistLoader_=t;this.childPlaylist_=r}},{key:"dispose",value:function e(){this.stopRequest();this.loadedPlaylists_={};f.clearTimeout(this.minimumUpdatePeriodTimeout_);f.clearTimeout(this.mediaRequest_);f.clearTimeout(this.mediaUpdateTimeout)}},{key:"hasPendingRequest",value:function e(){return this.request||this.mediaRequest_}},{key:"stopRequest",value:function e(){if(this.request){var t=this.request;this.request=null;t.onreadystatechange=null;t.abort()}}},{key:"sidxRequestFinished_",value:function e(t,r,i,n){var a=this;return function(e,s){if(!a.request){return}a.request=null;if(e){a.error={status:s.status,message:"DASH playlist request error at URL: "+t.uri,response:s.response,code:2};if(i){a.state=i}a.trigger("error");return n(r,null)}var o=new Uint8Array(s.response);var l=li.parseSidx(o.subarray(8));return n(r,l)}}},{key:"media",value:function e(t){var r=this;if(!t){return this.media_}if(this.state==="HAVE_NOTHING"){throw new Error("Cannot switch media playlist from "+this.state)}var i=this.state;if(typeof t==="string"){if(!this.master.playlists[t]){throw new Error("Unknown playlist URI: "+t)}t=this.master.playlists[t]}var n=!this.media_||t.uri!==this.media_.uri;if(n&&this.loadedPlaylists_[t.uri]&&this.loadedPlaylists_[t.uri].endList){this.state="HAVE_METADATA";this.media_=t;if(n){this.trigger("mediachanging");this.trigger("mediachange")}return}if(!n){return}if(this.media_){this.trigger("mediachanging")}if(!t.sidx){this.mediaRequest_=f.setTimeout(this.haveMetadata.bind(this,{startingState:i,playlist:t}),0);return}var a=void 0;var s=void 0;if(this.masterPlaylistLoader_){a=this.masterPlaylistLoader_.master;s=this.masterPlaylistLoader_.sidxMapping_}else{a=this.master;s=this.sidxMapping_}var o=fi(t.sidx);s[o]={sidxInfo:t.sidx};this.request=mi(t.sidx,t,this.hls_.xhr,{handleManifestRedirects:this.handleManifestRedirects},this.sidxRequestFinished_(t,a,i,function(e,n){if(!e||!n){throw new Error("failed to request sidx")}s[o].sidx=n;r.haveMetadata({startingState:i,playlist:e.playlists[t.uri]})}))}},{key:"haveMetadata",value:function e(t){var r=t.startingState,i=t.playlist;this.state="HAVE_METADATA";this.loadedPlaylists_[i.uri]=i;this.mediaRequest_=null;this.refreshMedia_(i.uri);if(r==="HAVE_MASTER"){this.trigger("loadedmetadata")}else{this.trigger("mediachange")}}},{key:"pause",value:function e(){this.stopRequest();f.clearTimeout(this.mediaUpdateTimeout);f.clearTimeout(this.minimumUpdatePeriodTimeout_);if(this.state==="HAVE_NOTHING"){this.started=false}}},{key:"load",value:function e(t){var r=this;f.clearTimeout(this.mediaUpdateTimeout);f.clearTimeout(this.minimumUpdatePeriodTimeout_);var i=this.media();if(t){var n=i?i.targetDuration/2*1e3:5*1e3;this.mediaUpdateTimeout=f.setTimeout(function(){return r.load()},n);return}if(!this.started){this.start();return}this.trigger("loadedplaylist")}},{key:"parseMasterXml",value:function e(){var t=Yr(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_,sidxMapping:this.sidxMapping_});t.uri=this.srcUrl;for(var r=0;r<t.playlists.length;r++){var i="placeholder-uri-"+r;t.playlists[r].uri=i;t.playlists[i]=t.playlists[r]}L(t,function(e,r,i,n){if(e.playlists&&e.playlists.length){var a="placeholder-uri-"+r+"-"+i+"-"+n;e.playlists[0].uri=a;t.playlists[a]=e.playlists[0]}});M(t);B(t);return t}},{key:"start",value:function e(){var t=this;this.started=true;if(this.masterPlaylistLoader_){this.mediaRequest_=f.setTimeout(this.haveMaster_.bind(this),0);return}this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,r){if(!t.request){return}t.request=null;if(e){t.error={status:r.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:r.responseText,code:2};if(t.state==="HAVE_NOTHING"){t.started=false}return t.trigger("error")}t.masterXml_=r.responseText;if(r.responseHeaders&&r.responseHeaders.date){t.masterLoaded_=Date.parse(r.responseHeaders.date)}else{t.masterLoaded_=Date.now()}t.srcUrl=p(t.handleManifestRedirects,t.srcUrl,r);t.syncClientServerClock_(t.onClientServerClockSync_.bind(t))})}},{key:"syncClientServerClock_",value:function e(t){var r=this;var i=Xr(this.masterXml_);if(i===null){this.clientOffset_=this.masterLoaded_-Date.now();return t()}if(i.method==="DIRECT"){this.clientOffset_=i.value-Date.now();return t()}this.request=this.hls_.xhr({uri:h(this.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials},function(e,n){if(!r.request){return}if(e){r.clientOffset_=r.masterLoaded_-Date.now();return t()}var a=void 0;if(i.method==="HEAD"){if(!n.responseHeaders||!n.responseHeaders.date){a=r.masterLoaded_}else{a=Date.parse(n.responseHeaders.date)}}else{a=Date.parse(n.responseText)}r.clientOffset_=a-Date.now();t()})}},{key:"haveMaster_",value:function e(){this.state="HAVE_MASTER";this.mediaRequest_=null;if(!this.masterPlaylistLoader_){this.master=this.parseMasterXml();this.trigger("loadedplaylist")}else if(!this.media_){this.media(this.childPlaylist_)}}},{key:"onClientServerClockSync_",value:function e(){var t=this;this.haveMaster_();if(!this.hasPendingRequest()&&!this.media_){this.media(this.master.playlists[0])}if(this.master&&this.master.minimumUpdatePeriod){this.minimumUpdatePeriodTimeout_=f.setTimeout(function(){t.trigger("minimumUpdatePeriod")},this.master.minimumUpdatePeriod)}}},{key:"refreshXml_",value:function e(){var t=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,r){if(!t.request){return}t.request=null;if(e){t.error={status:r.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:r.responseText,code:2};if(t.state==="HAVE_NOTHING"){t.started=false}return t.trigger("error")}t.masterXml_=r.responseText;t.sidxMapping_=vi(t.masterXml_,t.srcUrl,t.clientOffset_,t.sidxMapping_);var i=t.parseMasterXml();var n=di(t.master,i);var a=t.media().sidx;if(n){if(a){var s=fi(a);if(!t.sidxMapping_[s]){var o=t.media();t.request=mi(o.sidx,o,t.hls_.xhr,{handleManifestRedirects:t.handleManifestRedirects},t.sidxRequestFinished_(o,i,t.state,function(e,r){if(!e||!r){throw new Error("failed to request sidx on minimumUpdatePeriod")}t.sidxMapping_[s].sidx=r;t.minimumUpdatePeriodTimeout_=f.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod);t.refreshMedia_(t.media().uri);return}))}}else{t.master=n}}t.minimumUpdatePeriodTimeout_=f.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod)})}},{key:"refreshMedia_",value:function e(t){var r=this;if(!t){throw new Error("refreshMedia_ must take a media uri")}var i=void 0;var n=void 0;if(this.masterPlaylistLoader_){i=this.masterPlaylistLoader_.master;n=this.masterPlaylistLoader_.parseMasterXml()}else{i=this.master;n=this.parseMasterXml()}var a=di(i,n);if(a){if(this.masterPlaylistLoader_){this.masterPlaylistLoader_.master=a}else{this.master=a}this.media_=a.playlists[t]}else{this.media_=n.playlists[t];this.trigger("playlistunchanged")}if(!this.media().endList){this.mediaUpdateTimeout=f.setTimeout(function(){r.trigger("mediaupdatetimeout")},F(this.media(),!!a))}this.trigger("loadedplaylist")}}]);return t}(ui);var yi=function e(t){if(i.log.debug){return i.log.debug.bind(i,"VHS:",t+" >")}return function(){}};function _i(){}var bi=function(){function e(t,r,i,n){E(this,e);this.callbacks_=[];this.pendingCallback_=null;this.timestampOffset_=0;this.mediaSource=t;this.processedAppend_=false;this.type_=i;this.mimeType_=r;this.logger_=yi("SourceUpdater["+i+"]["+r+"]");if(t.readyState==="closed"){t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,r,n))}else{this.createSourceBuffer_(r,n)}}w(e,[{key:"createSourceBuffer_",value:function e(t,r){var i=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(t);this.logger_("created SourceBuffer");if(r){r.trigger("sourcebufferadded");if(this.mediaSource.sourceBuffers.length<2){r.on("sourcebufferadded",function(){i.start_()});return}}this.start_()}},{key:"start_",value:function e(){var t=this;this.started_=true;this.onUpdateendCallback_=function(){var e=t.pendingCallback_;t.pendingCallback_=null;t.sourceBuffer_.removing=false;t.logger_("buffered ["+tt(t.buffered())+"]");if(e){e()}t.runCallback_()};this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_);this.runCallback_()}},{key:"abort",value:function e(t){var r=this;if(this.processedAppend_){this.queueCallback_(function(){r.sourceBuffer_.abort()},t)}}},{key:"appendBuffer",value:function e(t,r){var i=this;this.processedAppend_=true;this.queueCallback_(function(){if(t.videoSegmentTimingInfoCallback){i.sourceBuffer_.addEventListener("videoSegmentTimingInfo",t.videoSegmentTimingInfoCallback)}i.sourceBuffer_.appendBuffer(t.bytes)},function(){if(t.videoSegmentTimingInfoCallback){i.sourceBuffer_.removeEventListener("videoSegmentTimingInfo",t.videoSegmentTimingInfoCallback)}r()})}},{key:"buffered",value:function e(){if(!this.sourceBuffer_){return i.createTimeRanges()}return this.sourceBuffer_.buffered}},{key:"remove",value:function e(t,r){var i=this;var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:_i;if(this.processedAppend_){this.queueCallback_(function(){i.logger_("remove ["+t+" => "+r+"]");i.sourceBuffer_.removing=true;i.sourceBuffer_.remove(t,r)},n)}}},{key:"updating",value:function e(){return!this.sourceBuffer_||this.sourceBuffer_.updating||!!this.pendingCallback_&&this.pendingCallback_!==_i}},{key:"timestampOffset",value:function e(t){var r=this;if(typeof t!=="undefined"){this.queueCallback_(function(){r.sourceBuffer_.timestampOffset=t;r.runCallback_()});this.timestampOffset_=t}return this.timestampOffset_}},{key:"queueCallback_",value:function e(t,r){this.callbacks_.push([t.bind(this),r]);this.runCallback_()}},{key:"runCallback_",value:function e(){var t=void 0;if(!this.updating()&&this.callbacks_.length&&this.started_){t=this.callbacks_.shift();this.pendingCallback_=t[1];t[0]()}}},{key:"dispose",value:function e(){var t=this;var r=function e(){if(t.sourceBuffer_&&t.mediaSource.readyState==="open"){t.sourceBuffer_.abort()}t.sourceBuffer_.removeEventListener("updateend",e)};this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_);if(this.sourceBuffer_.removing){this.sourceBuffer_.addEventListener("updateend",r)}else{r()}}}]);return e}();var Ti={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1};var Si=Qr.toUnsigned;var ki=Qr.toHexString;var ji,Ei,wi,Ci,Ai;ji=function e(t){var r={},i=li.findBox(t,["moov","trak"]);return i.reduce(function(e,t){var r,i,n,a,s;r=li.findBox(t,["tkhd"])[0];if(!r){return null}i=r[0];n=i===0?12:20;a=Si(r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3]);s=li.findBox(t,["mdia","mdhd"])[0];if(!s){return null}i=s[0];n=i===0?12:20;e[a]=Si(s[n]<<24|s[n+1]<<16|s[n+2]<<8|s[n+3]);return e},r)};Ei=function e(t,r){var i,n,a;i=li.findBox(r,["moof","traf"]);n=[].concat.apply([],i.map(function(e){return li.findBox(e,["tfhd"]).map(function(r){var i,n,a;i=Si(r[4]<<24|r[5]<<16|r[6]<<8|r[7]);n=t[i]||9e4;a=li.findBox(e,["tfdt"]).map(function(e){var t,r;t=e[0];r=Si(e[4]<<24|e[5]<<16|e[6]<<8|e[7]);if(t===1){r*=Math.pow(2,32);r+=Si(e[8]<<24|e[9]<<16|e[10]<<8|e[11])}return r})[0];a=a||Infinity;return a/n})}));a=Math.min.apply(null,n);return isFinite(a)?a:0};wi=function e(t,r){var i=li.findBox(r,["moof","traf"]);var n=0;var a=0;var s;if(i&&i.length){var o=li.parseTraf(i[0]);for(var l=0;l<o.boxes.length;l++){if(o.boxes[l].type==="tfhd"){s=o.boxes[l].trackId}else if(o.boxes[l].type==="tfdt"){n=o.boxes[l].baseMediaDecodeTime}else if(o.boxes[l].type==="trun"&&o.boxes[l].samples.length){a=o.boxes[l].samples[0].compositionTimeOffset||0}}}var u=t[s]||9e4;return(n+a)/u};Ci=function e(t){var r=li.findBox(t,["moov","trak"]);var i=[];r.forEach(function(e){var t=li.findBox(e,["mdia","hdlr"]);var r=li.findBox(e,["tkhd"]);t.forEach(function(e,t){var n=li.parseType(e.subarray(8,12));var a=r[t];var s;var o;var l;if(n==="vide"){s=new DataView(a.buffer,a.byteOffset,a.byteLength);o=s.getUint8(0);l=o===0?s.getUint32(12):s.getUint32(20);i.push(l)}})});return i};Ai=function e(t){var r=li.findBox(t,["moov","trak"]);var i=[];r.forEach(function(e){var t={};var r=li.findBox(e,["tkhd"])[0];var n,a;if(r){n=new DataView(r.buffer,r.byteOffset,r.byteLength);a=n.getUint8(0);t.id=a===0?n.getUint32(12):n.getUint32(20)}var s=li.findBox(e,["mdia","hdlr"])[0];if(s){var o=li.parseType(s.subarray(8,12));if(o==="vide"){t.type="video"}else if(o==="soun"){t.type="audio"}else{t.type=o}}var l=li.findBox(e,["mdia","minf","stbl","stsd"])[0];if(l){var u=l.subarray(8);t.codec=li.parseType(u.subarray(4,8));var c=li.findBox(u,[t.codec])[0];var d,f;if(c){if(/^[a-z]vc[1-9]$/i.test(t.codec)){d=c.subarray(78);f=li.parseType(d.subarray(4,8));if(f==="avcC"&&d.length>11){t.codec+=".";t.codec+=ki(d[9]);t.codec+=ki(d[10]);t.codec+=ki(d[11])}else{t.codec="avc1.4d400d"}}else if(/^mp4[a,v]$/i.test(t.codec)){d=c.subarray(28);f=li.parseType(d.subarray(4,8));if(f==="esds"&&d.length>20&&d[19]!==0){t.codec+="."+ki(d[19]);t.codec+="."+ki(d[20]>>>2&63).replace(/^0/,"")}else{t.codec="mp4a.40.2"}}else{}}}var h=li.findBox(e,["mdia","mdhd"])[0];if(h&&r){var p=a===0?12:20;t.timescale=Si(h[p]<<24|h[p+1]<<16|h[p+2]<<8|h[p+3])}i.push(t)});return i};var Ii={findBox:li.findBox,parseType:li.parseType,timescale:ji,startTime:Ei,compositionStartTime:wi,videoTrackIds:Ci,tracks:Ai};var xi={FAILURE:2,TIMEOUT:-101,ABORTED:-102};var Pi=function e(t){t.forEach(function(e){e.abort()})};var Oi=function e(t){return{bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}};var Di=function e(t){var r=t.target;var i=Date.now()-r.requestTime;var n={bandwidth:Infinity,bytesReceived:0,roundTripTime:i||0};n.bytesReceived=t.loaded;n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3);return n};var Li=function e(t,r){if(r.timedout){return{status:r.status,message:"HLS request timed-out at URL: "+r.uri,code:xi.TIMEOUT,xhr:r}}if(r.aborted){return{status:r.status,message:"HLS request aborted at URL: "+r.uri,code:xi.ABORTED,xhr:r}}if(t){return{status:r.status,message:"HLS request errored at URL: "+r.uri,code:xi.FAILURE,xhr:r}}return null};var Ri=function e(t,r){return function(e,i){var n=i.response;var a=Li(e,i);if(a){return r(a,t)}if(n.byteLength!==16){return r({status:i.status,message:"Invalid HLS key at URL: "+i.uri,code:xi.FAILURE,xhr:i},t)}var s=new DataView(n);t.key.bytes=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]);return r(null,t)}};var Ui=function e(t,r,i){return function(e,n){var a=n.response;var s=Li(e,n);if(s){return i(s,t)}if(a.byteLength===0){return i({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:xi.FAILURE,xhr:n},t)}t.map.bytes=new Uint8Array(n.response);if(r&&!r.isInitialized()){r.init()}t.map.timescales=Ii.timescale(t.map.bytes);t.map.videoTrackIds=Ii.videoTrackIds(t.map.bytes);return i(null,t)}};var Ni=function e(t,r,i){return function(e,n){var a=n.response;var s=Li(e,n);var o=void 0;if(s){return i(s,t)}if(a.byteLength===0){return i({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:xi.FAILURE,xhr:n},t)}t.stats=Oi(n);if(t.key){t.encryptedBytes=new Uint8Array(n.response)}else{t.bytes=new Uint8Array(n.response)}if(r&&t.map&&t.map.bytes){if(!r.isInitialized()){r.init()}o=r.parse(t.bytes,t.map.videoTrackIds,t.map.timescales);if(o&&o.captions){t.captionStreams=o.captionStreams;t.fmp4Captions=o.captions}}return i(null,t)}};var Mi=function e(t,r,i){var n=function e(n){if(n.data.source===r.requestId){t.removeEventListener("message",e);var a=n.data.decrypted;r.bytes=new Uint8Array(a.bytes,a.byteOffset,a.byteLength);return i(null,r)}};t.addEventListener("message",n);var a=void 0;if(r.key.bytes.slice){a=r.key.bytes.slice()}else{a=new Uint32Array(Array.prototype.slice.call(r.key.bytes))}t.postMessage(De({source:r.requestId,encrypted:r.encryptedBytes,key:a,iv:r.key.iv}),[r.encryptedBytes.buffer,a.buffer])};var Bi=function e(t,r,i){var n=0;var a=false;return function(e,s){if(a){return}if(e){a=true;Pi(t);return i(e,s)}n+=1;if(n===t.length){s.endOfAllRequests=Date.now();if(s.encryptedBytes){return Mi(r,s,i)}return i(null,s)}}};var Fi=function e(t,r){return function(e){t.stats=i.mergeOptions(t.stats,Di(e));if(!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived){t.stats.firstBytesReceivedAt=Date.now()}return r(e,t)}};var Wi=function e(t,r,n,a,s,o,l){var u=[];var c=Bi(u,n,l);if(s.key&&!s.key.bytes){var d=i.mergeOptions(r,{uri:s.key.resolvedUri,responseType:"arraybuffer"});var f=Ri(s,c);var h=t(d,f);u.push(h)}if(s.map&&!s.map.bytes){var p=i.mergeOptions(r,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:me(s.map)});var v=Ui(s,a,c);var m=t(p,v);u.push(m)}var g=i.mergeOptions(r,{uri:s.resolvedUri,responseType:"arraybuffer",headers:me(s)});var y=Ni(s,a,c);var _=t(g,y);_.addEventListener("progress",Fi(s,o));u.push(_);return function(){return Pi(u)}};var Hi=function e(t,r){var i=void 0;if(!t){return""}i=f.getComputedStyle(t);if(!i){return""}return i[r]};var qi=function e(t,r){var i=t.slice();t.sort(function(e,t){var n=r(e,t);if(n===0){return i.indexOf(e)-i.indexOf(t)}return n})};var Vi=function e(t,r){var i=void 0;var n=void 0;if(t.attributes.BANDWIDTH){i=t.attributes.BANDWIDTH}i=i||f.Number.MAX_VALUE;if(r.attributes.BANDWIDTH){n=r.attributes.BANDWIDTH}n=n||f.Number.MAX_VALUE;return i-n};var Ki=function e(t,r){var i=void 0;var n=void 0;if(t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width){i=t.attributes.RESOLUTION.width}i=i||f.Number.MAX_VALUE;if(r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width){n=r.attributes.RESOLUTION.width}n=n||f.Number.MAX_VALUE;if(i===n&&t.attributes.BANDWIDTH&&r.attributes.BANDWIDTH){return t.attributes.BANDWIDTH-r.attributes.BANDWIDTH}return i-n};var zi=function e(t,r,i,n,a){var s=t.playlists.map(function(e){var t=void 0;var r=void 0;var i=void 0;t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width;r=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;i=e.attributes.BANDWIDTH;i=i||f.Number.MAX_VALUE;return{bandwidth:i,width:t,height:r,playlist:e}});qi(s,function(e,t){return e.bandwidth-t.bandwidth});s=s.filter(function(e){return!de.isIncompatible(e.playlist)});var o=s.filter(function(e){return de.isEnabled(e.playlist)});if(!o.length){o=s.filter(function(e){return!de.isDisabled(e.playlist)})}var l=o.filter(function(e){return e.bandwidth*Ti.BANDWIDTH_VARIANCE<r});var u=l[l.length-1];var c=l.filter(function(e){return e.bandwidth===u.bandwidth})[0];if(a===false){var d=c||o[0]||s[0];return d?d.playlist:null}var h=l.filter(function(e){return e.width&&e.height});qi(h,function(e,t){return e.width-t.width});var p=h.filter(function(e){return e.width===i&&e.height===n});u=p[p.length-1];var v=p.filter(function(e){return e.bandwidth===u.bandwidth})[0];var m=void 0;var g=void 0;var y=void 0;if(!v){m=h.filter(function(e){return e.width>i||e.height>n});g=m.filter(function(e){return e.width===m[0].width&&e.height===m[0].height});u=g[g.length-1];y=g.filter(function(e){return e.bandwidth===u.bandwidth})[0]}var _=y||v||c||o[0]||s[0];return _?_.playlist:null};var Gi=function e(){return zi(this.playlists.master,this.systemBandwidth,parseInt(Hi(this.tech_.el(),"width"),10),parseInt(Hi(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)};var Yi=function e(t){var r=t.master,i=t.currentTime,n=t.bandwidth,a=t.duration,s=t.segmentDuration,o=t.timeUntilRebuffer,l=t.currentTimeline,u=t.syncController;var c=r.playlists.filter(function(e){return!de.isIncompatible(e)});var d=c.filter(de.isEnabled);if(!d.length){d=c.filter(function(e){return!de.isDisabled(e)})}var f=d.filter(de.hasAttribute.bind(null,"BANDWIDTH"));var h=f.map(function(e){var t=u.getSyncPoint(e,a,l,i);var r=t?1:2;var c=de.estimateSegmentRequestTime(s,n,e);var d=c*r-o;return{playlist:e,rebufferingImpact:d}});var p=h.filter(function(e){return e.rebufferingImpact<=0});qi(p,function(e,t){return Vi(t.playlist,e.playlist)});if(p.length){return p[0]}qi(h,function(e,t){return e.rebufferingImpact-t.rebufferingImpact});return h[0]||null};var Xi=function e(){var t=this.playlists.master.playlists.filter(de.isEnabled);qi(t,function(e,t){return Vi(e,t)});var r=t.filter(function(e){return jt(e.attributes.CODECS).videoCodec});return r[0]||null};var $i=function e(t,r,i){for(var n in i){if(!t[n]){r.trigger({type:"usage",name:"hls-608"});var a=r.textTracks().getTrackById(n);if(a){t[n]=a}else{t[n]=r.addRemoteTextTrack({kind:"captions",id:n,label:n},false).track}}}};var Ji=function t(r){var i=r.inbandTextTracks,n=r.captionArray,a=r.timestampOffset;if(!n){return}var s=e.WebKitDataCue||e.VTTCue;n.forEach(function(e){var t=e.stream;var r=e.startTime;var n=e.endTime;if(!i[t]){return}r+=a;n+=a;i[t].addCue(new s(r,n,e.text))})};var Qi=4,Zi=128;var en=function e(t){var r=0,i={payloadType:-1,payloadSize:0},n=0,a=0;while(r<t.byteLength){if(t[r]===Zi){break}while(t[r]===255){n+=255;r++}n+=t[r++];while(t[r]===255){a+=255;r++}a+=t[r++];if(!i.payload&&n===Qi){i.payloadType=n;i.payloadSize=a;i.payload=t.subarray(r,r+a);break}r+=a;n=0;a=0}return i};var tn=function e(t){if(t.payload[0]!==181){return null}if((t.payload[1]<<8|t.payload[2])!==49){return null}if(String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])!=="GA94"){return null}if(t.payload[7]!==3){return null}return t.payload.subarray(8,t.payload.length-1)};var rn=function e(t,r){var i=[],n,a,s,o;if(!(r[0]&64)){return i}a=r[0]&31;for(n=0;n<a;n++){s=n*3;o={type:r[s+2]&3,pts:t};if(r[s+2]&4){o.ccData=r[s+3]<<8|r[s+4];i.push(o)}}return i};var nn=function e(t){var r=t.byteLength,i=[],n=1,a,s;while(n<r-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){i.push(n+2);n+=2}else{n++}}if(i.length===0){return t}a=r-i.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===i[0]){o++;i.shift()}s[n]=t[o]}return s};var an={parseSei:en,parseUserData:tn,parseCaptionPackets:rn,discardEmulationPreventionBytes:nn,USER_DATA_REGISTERED_ITU_T_T35:Qi};var sn=function e(){this.init=function(){var e={};this.on=function(t,r){if(!e[t]){e[t]=[]}e[t]=e[t].concat(r)};this.off=function(t,r){var i;if(!e[t]){return false}i=e[t].indexOf(r);e[t]=e[t].slice();e[t].splice(i,1);return i>-1};this.trigger=function(t){var r,i,n,a;r=e[t];if(!r){return}if(arguments.length===2){n=r.length;for(i=0;i<n;++i){r[i].call(this,arguments[1])}}else{a=[];i=arguments.length;for(i=1;i<arguments.length;++i){a.push(arguments[i])}n=r.length;for(i=0;i<n;++i){r[i].apply(this,a)}}};this.dispose=function(){e={}}}};sn.prototype.pipe=function(e){this.on("data",function(t){e.push(t)});this.on("done",function(t){e.flush(t)});this.on("partialdone",function(t){e.partialFlush(t)});this.on("endedtimeline",function(t){e.endTimeline(t)});this.on("reset",function(t){e.reset(t)});return e};sn.prototype.push=function(e){this.trigger("data",e)};sn.prototype.flush=function(e){this.trigger("done",e)};sn.prototype.partialFlush=function(e){this.trigger("partialdone",e)};sn.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)};sn.prototype.reset=function(e){this.trigger("reset",e)};var on=sn;var ln=function e(){e.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new pn(0,0),new pn(0,1),new pn(1,0),new pn(1,1)];this.reset();this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data"));e.on("partialdone",this.trigger.bind(this,"partialdone"));e.on("done",this.trigger.bind(this,"done"))},this)};ln.prototype=new on;ln.prototype.push=function(e){var t,r,i;if(e.nalUnitType!=="sei_rbsp"){return}t=an.parseSei(e.escapedRBSP);if(t.payloadType!==an.USER_DATA_REGISTERED_ITU_T_T35){return}r=an.parseUserData(t);if(!r){return}if(e.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return}else if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--;if(!this.numSameDts_){this.ignoreNextEqualDts_=false}return}i=an.parseCaptionPackets(e.pts,r);this.captionPackets_=this.captionPackets_.concat(i);if(this.latestDts_!==e.dts){this.numSameDts_=0}this.numSameDts_++;this.latestDts_=e.dts};ln.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return e==="flush"?t.flush():t.partialFlush()},this)};ln.prototype.flushStream=function(e){if(!this.captionPackets_.length){this.flushCCStreams(e);return}this.captionPackets_.forEach(function(e,t){e.presortIndex=t});this.captionPackets_.sort(function(e,t){if(e.pts===t.pts){return e.presortIndex-t.presortIndex}return e.pts-t.pts});this.captionPackets_.forEach(function(e){if(e.type<2){this.dispatchCea608Packet(e)}},this);this.captionPackets_.length=0;this.flushCCStreams(e)};ln.prototype.flush=function(){return this.flushStream("flush")};ln.prototype.partialFlush=function(){return this.flushStream("partialFlush")};ln.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(e){e.reset()})};ln.prototype.dispatchCea608Packet=function(e){if(this.setsTextOrXDSActive(e)){this.activeCea608Channel_[e.type]=null}else if(this.setsChannel1Active(e)){this.activeCea608Channel_[e.type]=0}else if(this.setsChannel2Active(e)){this.activeCea608Channel_[e.type]=1}if(this.activeCea608Channel_[e.type]===null){return}this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)};ln.prototype.setsChannel1Active=function(e){return(e.ccData&30720)===4096};ln.prototype.setsChannel2Active=function(e){return(e.ccData&30720)===6144};ln.prototype.setsTextOrXDSActive=function(e){return(e.ccData&28928)===256||(e.ccData&30974)===4138||(e.ccData&30974)===6186};var un={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496};var cn=function e(t){if(t===null){return""}t=un[t]||t;return String.fromCharCode(t)};var dn=14;var fn=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var hn=function e(){var t=[],r=dn+1;while(r--){t.push("")}return t};var pn=function e(t,r){e.prototype.init.call(this);this.field_=t||0;this.dataChannel_=r||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(e){var t,r,i,n,a;t=e.ccData&32639;if(t===this.lastControlCode_){this.lastControlCode_=null;return}if((t&61440)===4096){this.lastControlCode_=t}else if(t!==this.PADDING_){this.lastControlCode_=null}i=t>>>8;n=t&255;if(t===this.PADDING_){return}else if(t===this.RESUME_CAPTION_LOADING_){this.mode_="popOn"}else if(t===this.END_OF_CAPTION_){this.mode_="popOn";this.clearFormatting(e.pts);this.flushDisplayed(e.pts);r=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=r;this.startPts_=e.pts}else if(t===this.ROLL_UP_2_ROWS_){this.rollUpRows_=2;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_3_ROWS_){this.rollUpRows_=3;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_4_ROWS_){this.rollUpRows_=4;this.setRollUp(e.pts)}else if(t===this.CARRIAGE_RETURN_){this.clearFormatting(e.pts);this.flushDisplayed(e.pts);this.shiftRowsUp_();this.startPts_=e.pts}else if(t===this.BACKSPACE_){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}}else if(t===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(e.pts);this.displayed_=hn()}else if(t===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=hn()}else if(t===this.RESUME_DIRECT_CAPTIONING_){if(this.mode_!=="paintOn"){this.flushDisplayed(e.pts);this.displayed_=hn()}this.mode_="paintOn";this.startPts_=e.pts}else if(this.isSpecialCharacter(i,n)){i=(i&3)<<8;a=cn(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(i,n)){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}i=(i&3)<<8;a=cn(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(i,n)){this.clearFormatting(e.pts);this[this.mode_](e.pts," ");this.column_++;if((n&14)===14){this.addFormatting(e.pts,["i"])}if((n&1)===1){this.addFormatting(e.pts,["u"])}}else if(this.isOffsetControlCode(i,n)){this.column_+=n&3}else if(this.isPAC(i,n)){var s=fn.indexOf(t&7968);if(this.mode_==="rollUp"){if(s-this.rollUpRows_+1<0){s=this.rollUpRows_-1}this.setRollUp(e.pts,s)}if(s!==this.row_){this.clearFormatting(e.pts);this.row_=s}if(n&1&&this.formatting_.indexOf("u")===-1){this.addFormatting(e.pts,["u"])}if((t&16)===16){this.column_=((t&14)>>1)*4}if(this.isColorPAC(n)){if((n&14)===14){this.addFormatting(e.pts,["i"])}}}else if(this.isNormalChar(i)){if(n===0){n=null}a=cn(i);a+=cn(n);this[this.mode_](e.pts,a);this.column_+=a.length}}};pn.prototype=new on;pn.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){console.error("Skipping malformed caption.");return""}}).join("\n").replace(/^\n+|\n+$/g,"");if(t.length){this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})}};pn.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=hn();this.nonDisplayed_=hn();this.lastControlCode_=null;this.column_=0;this.row_=dn;this.rollUpRows_=2;this.formatting_=[]};pn.prototype.setConstants=function(){if(this.dataChannel_===0){this.BASE_=16;this.EXT_=17;this.CONTROL_=(20|this.field_)<<8;this.OFFSET_=23}else if(this.dataChannel_===1){this.BASE_=24;this.EXT_=25;this.CONTROL_=(28|this.field_)<<8;this.OFFSET_=31}this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};pn.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63};pn.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63};pn.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47};pn.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35};pn.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127};pn.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127};pn.prototype.isNormalChar=function(e){return e>=32&&e<=127};pn.prototype.setRollUp=function(e,t){if(this.mode_!=="rollUp"){this.row_=dn;this.mode_="rollUp";this.flushDisplayed(e);this.nonDisplayed_=hn();this.displayed_=hn()}if(t!==undefined&&t!==this.row_){for(var r=0;r<this.rollUpRows_;r++){this.displayed_[t-r]=this.displayed_[this.row_-r];this.displayed_[this.row_-r]=""}}if(t===undefined){t=this.row_}this.topRow_=t-this.rollUpRows_+1};pn.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var r=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,r)};pn.prototype.clearFormatting=function(e){if(!this.formatting_.length){return}var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[];this[this.mode_](e,t)};pn.prototype.popOn=function(e,t){var r=this.nonDisplayed_[this.row_];r+=t;this.nonDisplayed_[this.row_]=r};pn.prototype.rollUp=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};pn.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++){this.displayed_[e]=""}for(e=this.row_+1;e<dn+1;e++){this.displayed_[e]=""}for(e=this.topRow_;e<this.row_;e++){this.displayed_[e]=this.displayed_[e+1]}this.displayed_[this.row_]=""};pn.prototype.paintOn=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};var vn={CaptionStream:ln,Cea608Stream:pn};var mn=an.discardEmulationPreventionBytes;var gn=vn.CaptionStream;var yn=function e(t,r){var i=t;for(var n=0;n<r.length;n++){var a=r[n];if(i<a.size){return a}i-=a.size}return null};var _n=function e(t,r,i){var n=new DataView(t.buffer,t.byteOffset,t.byteLength),a=[],s,o,l,u;for(o=0;o+4<t.length;o+=l){l=n.getUint32(o);o+=4;if(l<=0){continue}switch(t[o]&31){case 6:var c=t.subarray(o+1,o+1+l);var d=yn(o,r);s={nalUnitType:"sei_rbsp",size:l,data:c,escapedRBSP:mn(c),trackId:i};if(d){s.pts=d.pts;s.dts=d.dts;u=d}else{s.pts=u.pts;s.dts=u.dts}a.push(s);break;default:break}}return a};var bn=function e(t,r,i){var n=r;var a=i.defaultSampleDuration||0;var s=i.defaultSampleSize||0;var o=i.trackId;var l=[];t.forEach(function(e){var t=li.parseTrun(e);var r=t.samples;r.forEach(function(e){if(e.duration===undefined){e.duration=a}if(e.size===undefined){e.size=s}e.trackId=o;e.dts=n;if(e.compositionTimeOffset===undefined){e.compositionTimeOffset=0}e.pts=n+e.compositionTimeOffset;n+=e.duration});l=l.concat(r)});return l};var Tn=function e(t,r){var i=Ii.findBox(t,["moof","traf"]);var n=Ii.findBox(t,["mdat"]);var a={};var s=[];n.forEach(function(e,t){var r=i[t];s.push({mdat:e,traf:r})});s.forEach(function(e){var t=e.mdat;var i=e.traf;var n=Ii.findBox(i,["tfhd"]);var s=li.parseTfhd(n[0]);var o=s.trackId;var l=Ii.findBox(i,["tfdt"]);var u=l.length>0?li.parseTfdt(l[0]).baseMediaDecodeTime:0;var c=Ii.findBox(i,["trun"]);var d;var f;if(r===o&&c.length>0){d=bn(c,u,s);f=_n(t,d,o);if(!a[o]){a[o]=[]}a[o]=a[o].concat(f)}});return a};var Sn=function e(t,r,i){var n;if(r===null){return null}n=Tn(t,r);return{seiNals:n[r],timescale:i}};var kn=function e(){var t=false;var r;var i;var n;var a;var s;var o;this.isInitialized=function(){return t};this.init=function(e){r=new gn;t=true;o=e?e.isPartial:false;r.on("data",function(e){e.startTime=e.startPts/a;e.endTime=e.endPts/a;s.captions.push(e);s.captionStreams[e.stream]=true})};this.isNewInit=function(e,t){if(e&&e.length===0||t&&typeof t==="object"&&Object.keys(t).length===0){return false}return n!==e[0]||a!==t[n]};this.parse=function(e,t,r){var o;if(!this.isInitialized()){return null}else if(!t||!r){return null}else if(this.isNewInit(t,r)){n=t[0];a=r[n]}else if(n===null||!a){i.push(e);return null}while(i.length>0){var l=i.shift();this.parse(l,t,r)}o=Sn(e,n,a);if(o===null||!o.seiNals){return null}this.pushNals(o.seiNals);this.flushStream();return s};this.pushNals=function(e){if(!this.isInitialized()||!e||e.length===0){return null}e.forEach(function(e){r.push(e)})};this.flushStream=function(){if(!this.isInitialized()){return null}if(!o){r.flush()}else{r.partialFlush()}};this.clearParsedCaptions=function(){s.captions=[];s.captionStreams={}};this.resetCaptionStream=function(){if(!this.isInitialized()){return null}r.reset()};this.clearAllCaptions=function(){this.clearParsedCaptions();this.resetCaptionStream()};this.reset=function(){i=[];n=null;a=null;if(!s){s={captions:[],captionStreams:{}}}else{this.clearParsedCaptions()}this.resetCaptionStream()};this.reset()};var jn=kn;var En=500;var wn=function e(t,r,i){if(!t||!r){return false}var n=t.segments;var a=i===n.length;return t.endList&&r.readyState==="open"&&a};var Cn=function e(t){return typeof t==="number"&&isFinite(t)};var An=function e(t,r,i){if(t!=="main"||!r||!i){return null}if(!i.containsAudio&&!i.containsVideo){return"Neither audio nor video found in segment."}if(r.containsVideo&&!i.containsVideo){return"Only audio found in segment when we expected video."+" We can't switch to audio only from a stream that had video."+" To get rid of this message, please add codec information to the manifest."}if(!r.containsVideo&&i.containsVideo){return"Video found in segment when we expected only audio."+" We can't switch to a stream with video from an audio only stream."+" To get rid of this message, please add codec information to the manifest."}return null};var In=function e(t,r,i){var n=void 0;if(t.length&&t.start(0)>0&&t.start(0)<r){n=t.start(0)}else{n=r-30}return Math.min(n,r-i)};var xn=function e(t){var r=t.segment,i=r.start,n=r.end,a=t.playlist,s=a.mediaSequence,o=a.id,l=a.segments,u=l===undefined?[]:l,c=t.mediaIndex,d=t.timeline;return["appending ["+c+"] of ["+s+", "+(s+u.length)+"] from playlist ["+o+"]","["+i+" => "+n+"] in timeline ["+d+"]"].join(" ")};var Pn=function(e){A(t,e);function t(e){E(this,t);var r=I(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(!e){throw new TypeError("Initialization settings are required")}if(typeof e.currentTime!=="function"){throw new TypeError("No currentTime getter specified")}if(!e.mediaSource){throw new TypeError("No MediaSource specified")}r.bandwidth=e.bandwidth;r.throughput={rate:0,count:0};r.roundTrip=NaN;r.resetStats_();r.mediaIndex=null;r.hasPlayed_=e.hasPlayed;r.currentTime_=e.currentTime;r.seekable_=e.seekable;r.seeking_=e.seeking;r.duration_=e.duration;r.mediaSource_=e.mediaSource;r.hls_=e.hls;r.loaderType_=e.loaderType;r.startingMedia_=void 0;r.segmentMetadataTrack_=e.segmentMetadataTrack;r.goalBufferLength_=e.goalBufferLength;r.sourceType_=e.sourceType;r.inbandTextTracks_=e.inbandTextTracks;r.state_="INIT";r.checkBufferTimeout_=null;r.error_=void 0;r.currentTimeline_=-1;r.pendingSegment_=null;r.mimeType_=null;r.sourceUpdater_=null;r.xhrOptions_=null;r.activeInitSegmentId_=null;r.initSegments_={};r.cacheEncryptionKeys_=e.cacheEncryptionKeys;r.keyCache_={};if(r.loaderType_==="main"){r.captionParser_=new jn}else{r.captionParser_=null}r.decrypter_=e.decrypter;r.syncController_=e.syncController;r.syncPoint_={segmentIndex:0,time:0};r.syncController_.on("syncinfoupdate",function(){return r.trigger("syncinfoupdate")});r.mediaSource_.addEventListener("sourceopen",function(){return r.ended_=false});r.fetchAtBuffer_=false;r.logger_=yi("SegmentLoader["+r.loaderType_+"]");Object.defineProperty(r,"state",{get:function e(){return this.state_},set:function e(t){if(t!==this.state_){this.logger_(this.state_+" -> "+t);this.state_=t}}});return r}w(t,[{key:"resetStats_",value:function e(){this.mediaBytesTransferred=0;this.mediaRequests=0;this.mediaRequestsAborted=0;this.mediaRequestsTimedout=0;this.mediaRequestsErrored=0;this.mediaTransferDuration=0;this.mediaSecondsLoaded=0}},{key:"dispose",value:function e(){this.state="DISPOSED";this.pause();this.abort_();if(this.sourceUpdater_){this.sourceUpdater_.dispose()}this.resetStats_();if(this.captionParser_){this.captionParser_.reset()}}},{key:"abort",value:function e(){if(this.state!=="WAITING"){if(this.pendingSegment_){this.pendingSegment_=null}return}this.abort_();this.state="READY";if(!this.paused()){this.monitorBuffer_()}}},{key:"abort_",value:function e(){if(this.pendingSegment_){this.pendingSegment_.abortRequests()}this.pendingSegment_=null}},{key:"error",value:function e(t){if(typeof t!=="undefined"){this.error_=t}this.pendingSegment_=null;return this.error_}},{key:"endOfStream",value:function e(){this.ended_=true;this.pause();this.trigger("ended")}},{key:"buffered_",value:function e(){if(!this.sourceUpdater_){return i.createTimeRanges()}return this.sourceUpdater_.buffered()}},{key:"initSegment",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!t){return null}var i=Le(t);var n=this.initSegments_[i];if(r&&!n&&t.bytes){this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,timescales:t.timescales,videoTrackIds:t.videoTrackIds}}return n||t}},{key:"segmentKey",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!t){return null}var i=Re(t);var n=this.keyCache_[i];if(this.cacheEncryptionKeys_&&r&&!n&&t.bytes){this.keyCache_[i]=n={resolvedUri:t.resolvedUri,bytes:t.bytes}}var a={resolvedUri:(n||t).resolvedUri};if(n){a.bytes=n.bytes}return a}},{key:"couldBeginLoading_",value:function e(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&this.state==="INIT")&&!this.paused()}},{key:"load",value:function e(){this.monitorBuffer_();if(!this.playlist_){return}this.syncController_.setDateTimeMapping(this.playlist_);if(this.state==="INIT"&&this.couldBeginLoading_()){return this.init_()}if(!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"){return}this.state="READY"}},{key:"init_",value:function e(){this.state="READY";this.sourceUpdater_=new bi(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_);this.resetEverything();return this.monitorBuffer_()}},{key:"playlist",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!t){return}var i=this.playlist_;var n=this.pendingSegment_;this.playlist_=t;this.xhrOptions_=r;if(!this.hasPlayed_()){t.syncInfo={mediaSequence:t.mediaSequence,time:0}}var a=null;if(i){if(i.id){a=i.id}else if(i.uri){a=i.uri}}this.logger_("playlist update ["+a+" => "+(t.id||t.uri)+"]");this.trigger("syncinfoupdate");if(this.state==="INIT"&&this.couldBeginLoading_()){return this.init_()}if(!i||i.uri!==t.uri){if(this.mediaIndex!==null){this.resyncLoader()}return}var s=t.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+s+"]");if(this.mediaIndex!==null){this.mediaIndex-=s}if(n){n.mediaIndex-=s;if(n.mediaIndex>=0){n.segment=t.segments[n.mediaIndex]}}this.syncController_.saveExpiredSegmentInfo(i,t)}},{key:"pause",value:function e(){if(this.checkBufferTimeout_){f.clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=null}}},{key:"paused",value:function e(){return this.checkBufferTimeout_===null}},{key:"mimeType",value:function e(t,r){if(this.mimeType_){return}this.mimeType_=t;this.sourceBufferEmitter_=r;if(this.state==="INIT"&&this.couldBeginLoading_()){this.init_()}}},{key:"resetEverything",value:function e(t){this.ended_=false;this.resetLoader();this.remove(0,this.duration_(),t);if(this.captionParser_){this.captionParser_.clearAllCaptions()}this.trigger("reseteverything")}},{key:"resetLoader",value:function e(){this.fetchAtBuffer_=false;this.resyncLoader()}},{key:"resyncLoader",value:function e(){this.mediaIndex=null;this.syncPoint_=null;this.abort()}},{key:"remove",value:function e(t,r,i){if(this.sourceUpdater_){this.sourceUpdater_.remove(t,r,i)}at(t,r,this.segmentMetadataTrack_);if(this.inbandTextTracks_){for(var n in this.inbandTextTracks_){at(t,r,this.inbandTextTracks_[n])}}}},{key:"monitorBuffer_",value:function e(){if(this.checkBufferTimeout_){f.clearTimeout(this.checkBufferTimeout_)}this.checkBufferTimeout_=f.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function e(){if(this.state==="READY"){this.fillBuffer_()}if(this.checkBufferTimeout_){f.clearTimeout(this.checkBufferTimeout_)}this.checkBufferTimeout_=f.setTimeout(this.monitorBufferTick_.bind(this),En)}},{key:"fillBuffer_",value:function e(){if(this.sourceUpdater_.updating()){return}if(!this.syncPoint_){this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())}var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(!t){return}if(this.isEndOfStream_(t.mediaIndex)){this.endOfStream();return}if(t.mediaIndex===this.playlist_.segments.length-1&&this.mediaSource_.readyState==="ended"&&!this.seeking_()){return}if(t.timeline!==this.currentTimeline_){this.syncController_.reset();t.timestampOffset=t.startOfSegment;if(this.captionParser_){this.captionParser_.clearAllCaptions()}}this.loadSegment_(t)}},{key:"isEndOfStream_",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.playlist_;return wn(r,this.mediaSource_,t)&&!this.sourceUpdater_.updating()}},{key:"checkBuffer_",value:function e(t,r,i,n,a,s){var o=0;var l=void 0;if(t.length){o=t.end(t.length-1)}var u=Math.max(0,o-a);if(!r.segments.length){return null}if(u>=this.goalBufferLength_()){return null}if(!n&&u>=1){return null}if(s===null){i=this.getSyncSegmentCandidate_(r);return this.generateSegmentInfo_(r,i,null,true)}if(i!==null){var c=r.segments[i];l=o;return this.generateSegmentInfo_(r,i+1,l,false)}if(this.fetchAtBuffer_){var d=de.getMediaInfoForTime(r,o,s.segmentIndex,s.time);i=d.mediaIndex;l=d.startTime}else{var f=de.getMediaInfoForTime(r,a,s.segmentIndex,s.time);i=f.mediaIndex;l=f.startTime}return this.generateSegmentInfo_(r,i,l,false)}},{key:"getSyncSegmentCandidate_",value:function e(t){var r=this;if(this.currentTimeline_===-1){return 0}var i=t.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===r.currentTimeline_});if(i.length){return i[Math.min(i.length-1,1)].segmentIndex}return Math.max(t.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function e(t,r,i,n){if(r<0||r>=t.segments.length){return null}var a=t.segments[r];return{requestId:"segment-loader-"+Math.random(),uri:a.resolvedUri,mediaIndex:r,isSyncRequest:n,startOfSegment:i,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:a.timeline,duration:a.duration,segment:a}}},{key:"abortRequestEarly_",value:function e(t){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH){return false}if(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3){return false}var r=this.currentTime_();var i=t.bandwidth;var n=this.pendingSegment_.duration;var a=de.estimateSegmentRequestTime(n,i,this.playlist_,t.bytesReceived);var s=rt(this.buffered_(),r,this.hls_.tech_.playbackRate())-1;if(a<=s){return false}var o=Yi({master:this.hls_.playlists.master,currentTime:r,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!o){return}var l=a-s;var u=l-o.rebufferingImpact;var c=.5;if(s<=Xe){c=1}if(!o.playlist||o.playlist.uri===this.playlist_.uri||u<c){return false}this.bandwidth=o.playlist.attributes.BANDWIDTH*Ti.BANDWIDTH_VARIANCE+1;this.abort();this.trigger("earlyabort");return true}},{key:"handleProgress_",value:function e(t,r){if(!this.pendingSegment_||r.requestId!==this.pendingSegment_.requestId||this.abortRequestEarly_(r.stats)){return}this.trigger("progress")}},{key:"loadSegment_",value:function e(t){this.state="WAITING";this.pendingSegment_=t;this.trimBackBuffer_(t);t.abortRequests=Wi(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.captionParser_,this.createSimplifiedSegmentObj_(t),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function e(t){var r=In(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);if(r>0){this.remove(0,r)}}},{key:"createSimplifiedSegmentObj_",value:function e(t){var r=t.segment;var i={resolvedUri:r.resolvedUri,byterange:r.byterange,requestId:t.requestId};if(r.key){var n=r.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);i.key=this.segmentKey(r.key);i.key.iv=n}if(r.map){i.map=this.initSegment(r.map)}return i}},{key:"segmentRequestFinished_",value:function e(t,r){this.mediaRequests+=1;if(r.stats){this.mediaBytesTransferred+=r.stats.bytesReceived;this.mediaTransferDuration+=r.stats.roundTripTime}if(!this.pendingSegment_){this.mediaRequestsAborted+=1;return}if(r.requestId!==this.pendingSegment_.requestId){return}if(t){this.pendingSegment_=null;this.state="READY";if(t.code===xi.ABORTED){this.mediaRequestsAborted+=1;return}this.pause();if(t.code===xi.TIMEOUT){this.mediaRequestsTimedout+=1;this.bandwidth=1;this.roundTrip=NaN;this.trigger("bandwidthupdate");return}this.mediaRequestsErrored+=1;this.error(t);this.trigger("error");return}this.bandwidth=r.stats.bandwidth;this.roundTrip=r.stats.roundTripTime;if(r.map){r.map=this.initSegment(r.map,true)}if(r.key){this.segmentKey(r.key,true)}this.processSegmentResponse_(r)}},{key:"processSegmentResponse_",value:function e(t){var r=this.pendingSegment_;r.bytes=t.bytes;if(t.map){r.segment.map.bytes=t.map.bytes}r.endOfAllRequests=t.endOfAllRequests;if(t.fmp4Captions){$i(this.inbandTextTracks_,this.hls_.tech_,t.captionStreams);Ji({inbandTextTracks:this.inbandTextTracks_,captionArray:t.fmp4Captions,timestampOffset:0});if(this.captionParser_){this.captionParser_.clearParsedCaptions()}}this.handleSegment_()}},{key:"handleSegment_",value:function e(){var t=this;if(!this.pendingSegment_){this.state="READY";return}var r=this.pendingSegment_;var i=r.segment;var n=this.syncController_.probeSegmentInfo(r);if(typeof this.startingMedia_==="undefined"&&n&&(n.containsAudio||n.containsVideo)){this.startingMedia_={containsAudio:n.containsAudio,containsVideo:n.containsVideo}}var a=An(this.loaderType_,this.startingMedia_,n);if(a){this.error({message:a,blacklistDuration:Infinity});this.trigger("error");return}if(r.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}if(r.timestampOffset!==null&&r.timestampOffset!==this.sourceUpdater_.timestampOffset()){if(n&&n.segmentTimestampInfo){var s=n.segmentTimestampInfo[0].ptsTime;var o=n.segmentTimestampInfo[0].dtsTime;r.timestampOffset-=s-o}this.sourceUpdater_.timestampOffset(r.timestampOffset);this.trigger("timestampoffset")}var l=this.syncController_.mappingForTimeline(r.timeline);if(l!==null){this.trigger({type:"segmenttimemapping",mapping:l})}this.state="APPENDING";if(i.map){var u=Le(i.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==u){var c=this.initSegment(i.map);this.sourceUpdater_.appendBuffer({bytes:c.bytes},function(){t.activeInitSegmentId_=u})}}r.byteLength=r.bytes.byteLength;if(typeof i.start==="number"&&typeof i.end==="number"){this.mediaSecondsLoaded+=i.end-i.start}else{this.mediaSecondsLoaded+=i.duration}this.logger_(xn(r));this.sourceUpdater_.appendBuffer({bytes:r.bytes,videoSegmentTimingInfoCallback:this.handleVideoSegmentTimingInfo_.bind(this,r.requestId)},this.handleUpdateEnd_.bind(this))}},{key:"handleVideoSegmentTimingInfo_",value:function e(t,r){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId){return}var i=this.pendingSegment_.segment;if(!i.videoTimingInfo){i.videoTimingInfo={}}i.videoTimingInfo.transmuxerPrependedSeconds=r.videoSegmentTimingInfo.prependedContentDuration||0;i.videoTimingInfo.transmuxedPresentationStart=r.videoSegmentTimingInfo.start.presentation;i.videoTimingInfo.transmuxedPresentationEnd=r.videoSegmentTimingInfo.end.presentation;i.videoTimingInfo.baseMediaDecodeTime=r.videoSegmentTimingInfo.baseMediaDecodeTime}},{key:"handleUpdateEnd_",value:function e(){if(!this.pendingSegment_){this.state="READY";if(!this.paused()){this.monitorBuffer_()}return}var t=this.pendingSegment_;var r=t.segment;var i=this.mediaIndex!==null;this.pendingSegment_=null;this.recordThroughput_(t);this.addSegmentMetadataCue_(t);this.state="READY";this.mediaIndex=t.mediaIndex;this.fetchAtBuffer_=true;this.currentTimeline_=t.timeline;this.trigger("syncinfoupdate");if(r.end&&this.currentTime_()-r.end>t.playlist.targetDuration*3){this.resetEverything();return}if(i){this.trigger("bandwidthupdate")}this.trigger("progress");if(this.isEndOfStream_(t.mediaIndex+1,t.playlist)){this.endOfStream()}if(!this.paused()){this.monitorBuffer_()}}},{key:"recordThroughput_",value:function e(t){var r=this.throughput.rate;var i=Date.now()-t.endOfAllRequests+1;var n=Math.floor(t.byteLength/i*8*1e3);this.throughput.rate+=(n-r)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function e(t){if(!this.segmentMetadataTrack_){return}var r=t.segment;var i=r.start;var n=r.end;if(!Cn(i)||!Cn(n)){return}at(i,n,this.segmentMetadataTrack_);var a=f.WebKitDataCue||f.VTTCue;var s={custom:r.custom,dateTimeObject:r.dateTimeObject,dateTimeString:r.dateTimeString,bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.uri,start:i,end:n};var o=JSON.stringify(s);var l=new a(i,n,o);l.value=s;this.segmentMetadataTrack_.addCue(l)}}]);return t}(i.EventTarget);var On=function e(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))};var Dn=new Uint8Array("\n\n".split("").map(function(e){return e.charCodeAt(0)}));var Ln=function(e){A(t,e);function t(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};E(this,t);var i=I(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));i.mediaSource_=null;i.subtitlesTrack_=null;return i}w(t,[{key:"buffered_",value:function e(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length){return i.createTimeRanges()}var t=this.subtitlesTrack_.cues;var r=t[0].startTime;var n=t[t.length-1].startTime;return i.createTimeRanges([[r,n]])}},{key:"initSegment",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!t){return null}var i=Le(t);var n=this.initSegments_[i];if(r&&!n&&t.bytes){var a=Dn.byteLength+t.bytes.byteLength;var s=new Uint8Array(a);s.set(t.bytes);s.set(Dn,t.bytes.byteLength);this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:s}}return n||t}},{key:"couldBeginLoading_",value:function e(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function e(){this.state="READY";this.resetEverything();return this.monitorBuffer_()}},{key:"track",value:function e(t){if(typeof t==="undefined"){return this.subtitlesTrack_}this.subtitlesTrack_=t;if(this.state==="INIT"&&this.couldBeginLoading_()){this.init_()}return this.subtitlesTrack_}},{key:"remove",value:function e(t,r){at(t,r,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function e(){var t=this;if(!this.syncPoint_){this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())}var r=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);r=this.skipEmptySegments_(r);if(!r){return}if(this.syncController_.timestampOffsetForTimeline(r.timeline)===null){var i=function e(){t.state="READY";if(!t.paused()){t.monitorBuffer_()}};this.syncController_.one("timestampoffset",i);this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(r)}},{key:"skipEmptySegments_",value:function e(t){while(t&&t.segment.empty){t=this.generateSegmentInfo_(t.playlist,t.mediaIndex+1,t.startOfSegment+t.duration,t.isSyncRequest)}return t}},{key:"handleSegment_",value:function e(){var t=this;if(!this.pendingSegment_||!this.subtitlesTrack_){this.state="READY";return}this.state="APPENDING";var r=this.pendingSegment_;var i=r.segment;if(typeof f.WebVTT!=="function"&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var n=void 0;var a=function e(){t.subtitlesTrack_.tech_.off("vttjsloaded",n);t.error({message:"Error loading vtt.js"});t.state="READY";t.pause();t.trigger("error")};n=function e(){t.subtitlesTrack_.tech_.off("vttjserror",a);t.handleSegment_()};this.state="WAITING_ON_VTTJS";this.subtitlesTrack_.tech_.one("vttjsloaded",n);this.subtitlesTrack_.tech_.one("vttjserror",a);return}i.requested=true;try{this.parseVTTCues_(r)}catch(e){this.error({message:e.message});this.state="READY";this.pause();return this.trigger("error")}this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_);if(r.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}r.byteLength=r.bytes.byteLength;this.mediaSecondsLoaded+=i.duration;if(r.cues.length){this.remove(r.cues[0].endTime,r.cues[r.cues.length-1].endTime)}r.cues.forEach(function(e){t.subtitlesTrack_.addCue(e)});this.handleUpdateEnd_()}},{key:"parseVTTCues_",value:function e(t){var r=void 0;var n=false;if(typeof f.TextDecoder==="function"){r=new f.TextDecoder("utf8")}else{r=f.WebVTT.StringDecoder();n=true}var a=new f.WebVTT.Parser(f,f.vttjs,r);t.cues=[];t.timestampmap={MPEGTS:0,LOCAL:0};a.oncue=t.cues.push.bind(t.cues);a.ontimestampmap=function(e){return t.timestampmap=e};a.onparsingerror=function(e){i.log.warn("Error encountered when parsing cues: "+e.message)};if(t.segment.map){var s=t.segment.map.bytes;if(n){s=On(s)}a.parse(s)}var o=t.bytes;if(n){o=On(o)}a.parse(o);a.flush()}},{key:"updateTimeMapping_",value:function e(t,r,i){var n=t.segment;if(!r){return}if(!t.cues.length){n.empty=true;return}var a=t.timestampmap;var s=a.MPEGTS/9e4-a.LOCAL+r.mapping;t.cues.forEach(function(e){e.startTime+=s;e.endTime+=s});if(!i.syncInfo){var o=t.cues[0].startTime;var l=t.cues[t.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:Math.min(o,l-n.duration)}}}}]);return t}(Pn);var Rn=function e(t,r){var i=t.cues;for(var n=0;n<i.length;n++){var a=i[n];if(r>=a.adStartTime&&r<=a.adEndTime){return a}}return null};var Un=function e(t,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;if(!t.segments){return}var n=i;var a=void 0;for(var s=0;s<t.segments.length;s++){var o=t.segments[s];if(!a){a=Rn(r,n+o.duration/2)}if(a){if("cueIn"in o){a.endTime=n;a.adEndTime=n;n+=o.duration;a=null;continue}if(n<a.endTime){n+=o.duration;continue}a.endTime+=o.duration}else{if("cueOut"in o){a=new f.VTTCue(n,n+o.duration,o.cueOut);a.adStartTime=n;a.adEndTime=n+parseFloat(o.cueOut);r.addCue(a)}if("cueOutCont"in o){var l=void 0;var u=void 0;var c=o.cueOutCont.split("/").map(parseFloat);var d=x(c,2);l=d[0];u=d[1];a=new f.VTTCue(n,n+o.duration,"");a.adStartTime=n-l;a.adEndTime=a.adStartTime+u;r.addCue(a)}}n+=o.duration}};var Nn={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};var Mn=8589934592;var Bn=4294967296;var Fn="shared";var Wn=function e(t,r){var i=1;if(t>r){i=-1}while(Math.abs(r-t)>Bn){t+=i*Mn}return t};var Hn=function e(t){var r,i;e.prototype.init.call(this);this.type_=t||Fn;this.push=function(e){if(this.type_!==Fn&&e.type!==this.type_){return}if(i===undefined){i=e.dts}e.dts=Wn(e.dts,i);e.pts=Wn(e.pts,i);r=e.dts;this.trigger("data",e)};this.flush=function(){i=r;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.discontinuity=function(){i=void 0;r=void 0};this.reset=function(){this.discontinuity();this.trigger("reset")}};Hn.prototype=new on;var qn={TimestampRolloverStream:Hn,handleRollover:Wn};var Vn=function e(t){var r=t[1]&31;r<<=8;r|=t[2];return r};var Kn=function e(t){return!!(t[1]&64)};var zn=function e(t){var r=0;if((t[3]&48)>>>4>1){r+=t[4]+1}return r};var Gn=function e(t,r){var i=Vn(t);if(i===0){return"pat"}else if(i===r){return"pmt"}else if(r){return"pes"}return null};var Yn=function e(t){var r=Kn(t);var i=4+zn(t);if(r){i+=t[i]+1}return(t[i+10]&31)<<8|t[i+11]};var Xn=function e(t){var r={};var i=Kn(t);var n=4+zn(t);if(i){n+=t[n]+1}if(!(t[n+5]&1)){return}var a,s,o;a=(t[n+1]&15)<<8|t[n+2];s=3+a-4;o=(t[n+10]&15)<<8|t[n+11];var l=12+o;while(l<s){var u=n+l;r[(t[u+1]&31)<<8|t[u+2]]=t[u];l+=((t[u+3]&15)<<8|t[u+4])+5}return r};var $n=function e(t,r){var i=Vn(t);var n=r[i];switch(n){case Nn.H264_STREAM_TYPE:return"video";case Nn.ADTS_STREAM_TYPE:return"audio";case Nn.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}};var Jn=function e(t){var r=Kn(t);if(!r){return null}var i=4+zn(t);if(i>=t.byteLength){return null}var n=null;var a;a=t[i+7];if(a&192){n={};n.pts=(t[i+9]&14)<<27|(t[i+10]&255)<<20|(t[i+11]&254)<<12|(t[i+12]&255)<<5|(t[i+13]&254)>>>3;n.pts*=4;n.pts+=(t[i+13]&6)>>>1;n.dts=n.pts;if(a&64){n.dts=(t[i+14]&14)<<27|(t[i+15]&255)<<20|(t[i+16]&254)<<12|(t[i+17]&255)<<5|(t[i+18]&254)>>>3;n.dts*=4;n.dts+=(t[i+18]&6)>>>1}}return n};var Qn=function e(t){switch(t){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};var Zn=function e(t){var r=4+zn(t);var i=t.subarray(r);var n=0;var a=0;var s=false;var o;for(;a<i.byteLength-3;a++){if(i[a+2]===1){n=a+5;break}}while(n<i.byteLength){switch(i[n]){case 0:if(i[n-1]!==0){n+=2;break}else if(i[n-2]!==0){n++;break}if(a+3!==n-2){o=Qn(i[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}}do{n++}while(i[n]!==1&&n<i.length);a=n-2;n+=3;break;case 1:if(i[n-1]!==0||i[n-2]!==0){n+=3;break}o=Qn(i[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}a=n-2;n+=3;break;default:n+=3;break}}i=i.subarray(a);n-=a;a=0;if(i&&i.byteLength>3){o=Qn(i[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}}return s};var ea={parseType:Gn,parsePat:Yn,parsePmt:Xn,parsePayloadUnitStartIndicator:Kn,parsePesType:$n,parsePesTime:Jn,videoPacketContainsKeyFrame:Zn};var ta=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];var ra=function e(t){if(t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)){return true}return false};var ia=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]};var na=function e(t,r,i){var n,a="";for(n=r;n<i;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a};var aa=function e(t,r,i){return unescape(na(t,r,i))};var sa=function e(t,r){var i=t[r+6]<<21|t[r+7]<<14|t[r+8]<<7|t[r+9],n=t[r+5],a=(n&16)>>4;if(a){return i+20}return i+10};var oa=function e(t,r){var i=(t[r+5]&224)>>5,n=t[r+4]<<3,a=t[r+3]&3<<11;return a|n|i};var la=function e(t,r){if(t[r]==="I".charCodeAt(0)&&t[r+1]==="D".charCodeAt(0)&&t[r+2]==="3".charCodeAt(0)){return"timed-metadata"}else if(t[r]&255===255&&(t[r+1]&240)===240){return"audio"}return null};var ua=function e(t){var r=0;while(r+5<t.length){if(t[r]!==255||(t[r+1]&246)!==240){r++;continue}return ta[(t[r+2]&60)>>>2]}return null};var ca=function e(t){var r,i,n,a;r=10;if(t[5]&64){r+=4;r+=ia(t.subarray(10,14))}do{i=ia(t.subarray(r+4,r+8));if(i<1){return null}a=String.fromCharCode(t[r],t[r+1],t[r+2],t[r+3]);if(a==="PRIV"){n=t.subarray(r+10,r+i+10);for(var s=0;s<n.byteLength;s++){if(n[s]===0){var o=aa(n,0,s);if(o==="com.apple.streaming.transportStreamTimestamp"){var l=n.subarray(s+1);var u=(l[3]&1)<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;u*=4;u+=l[7]&3;return u}break}}}r+=10;r+=i}while(r<t.byteLength);return null};var da={isLikelyAacData:ra,parseId3TagSize:sa,parseAdtsSize:oa,parseType:la,parseSampleRate:ua,parseAacTimestamp:ca};var fa=9e4,ha,pa,va,ma,ga,ya,_a;ha=function e(t){return t*fa};pa=function e(t,r){return t*r};va=function e(t){return t/fa};ma=function e(t,r){return t/r};ga=function e(t,r){return ha(ma(t,r))};ya=function e(t,r){return pa(va(t),r)};_a=function e(t,r,i){return va(i?t:t-r)};var ba={ONE_SECOND_IN_TS:fa,secondsToVideoTs:ha,secondsToAudioTs:pa,videoTsToSeconds:va,audioTsToSeconds:ma,audioTsToVideoTs:ga,videoTsToAudioTs:ya,metadataTsToSeconds:_a};var Ta=qn.handleRollover;var Sa={};Sa.ts=ea;Sa.aac=da;var ka=ba.ONE_SECOND_IN_TS;var ja=188,Ea=71;var wa=function e(t,r){var i=0,n=ja,a,s;while(n<t.byteLength){if(t[i]===Ea&&t[n]===Ea){a=t.subarray(i,n);s=Sa.ts.parseType(a,r.pid);switch(s){case"pat":if(!r.pid){r.pid=Sa.ts.parsePat(a)}break;case"pmt":if(!r.table){r.table=Sa.ts.parsePmt(a)}break;default:break}if(r.pid&&r.table){return}i+=ja;n+=ja;continue}i++;n++}};var Ca=function e(t,r,i){var n=0,a=ja,s,o,l,u,c;var d=false;while(a<=t.byteLength){if(t[n]===Ea&&(t[a]===Ea||a===t.byteLength)){s=t.subarray(n,a);o=Sa.ts.parseType(s,r.pid);switch(o){case"pes":l=Sa.ts.parsePesType(s,r.table);u=Sa.ts.parsePayloadUnitStartIndicator(s);if(l==="audio"&&u){c=Sa.ts.parsePesTime(s);if(c){c.type="audio";i.audio.push(c);d=true}}break;default:break}if(d){break}n+=ja;a+=ja;continue}n++;a++}a=t.byteLength;n=a-ja;d=false;while(n>=0){if(t[n]===Ea&&(t[a]===Ea||a===t.byteLength)){s=t.subarray(n,a);o=Sa.ts.parseType(s,r.pid);switch(o){case"pes":l=Sa.ts.parsePesType(s,r.table);u=Sa.ts.parsePayloadUnitStartIndicator(s);if(l==="audio"&&u){c=Sa.ts.parsePesTime(s);if(c){c.type="audio";i.audio.push(c);d=true}}break;default:break}if(d){break}n-=ja;a-=ja;continue}n--;a--}};var Aa=function e(t,r,i){var n=0,a=ja,s,o,l,u,c,d,f,h;var p=false;var v={data:[],size:0};while(a<t.byteLength){if(t[n]===Ea&&t[a]===Ea){s=t.subarray(n,a);o=Sa.ts.parseType(s,r.pid);switch(o){case"pes":l=Sa.ts.parsePesType(s,r.table);u=Sa.ts.parsePayloadUnitStartIndicator(s);if(l==="video"){if(u&&!p){c=Sa.ts.parsePesTime(s);if(c){c.type="video";i.video.push(c);p=true}}if(!i.firstKeyFrame){if(u){if(v.size!==0){d=new Uint8Array(v.size);f=0;while(v.data.length){h=v.data.shift();d.set(h,f);f+=h.byteLength}if(Sa.ts.videoPacketContainsKeyFrame(d)){var m=Sa.ts.parsePesTime(d);if(m){i.firstKeyFrame=m;i.firstKeyFrame.type="video"}else{console.warn("Failed to extract PTS/DTS from PES at first keyframe. "+"This could be an unusual TS segment, or else mux.js did not "+"parse your TS segment correctly. If you know your TS "+"segments do contain PTS/DTS on keyframes please file a bug "+"report! You can try ffprobe to double check for yourself.")}}v.size=0}}v.data.push(s);v.size+=s.byteLength}}break;default:break}if(p&&i.firstKeyFrame){break}n+=ja;a+=ja;continue}n++;a++}a=t.byteLength;n=a-ja;p=false;while(n>=0){if(t[n]===Ea&&t[a]===Ea){s=t.subarray(n,a);o=Sa.ts.parseType(s,r.pid);switch(o){case"pes":l=Sa.ts.parsePesType(s,r.table);u=Sa.ts.parsePayloadUnitStartIndicator(s);if(l==="video"&&u){c=Sa.ts.parsePesTime(s);if(c){c.type="video";i.video.push(c);p=true}}break;default:break}if(p){break}n-=ja;a-=ja;continue}n--;a--}};var Ia=function e(t,r){if(t.audio&&t.audio.length){var i=r;if(typeof i==="undefined"){i=t.audio[0].dts}t.audio.forEach(function(e){e.dts=Ta(e.dts,i);e.pts=Ta(e.pts,i);e.dtsTime=e.dts/ka;e.ptsTime=e.pts/ka})}if(t.video&&t.video.length){var n=r;if(typeof n==="undefined"){n=t.video[0].dts}t.video.forEach(function(e){e.dts=Ta(e.dts,n);e.pts=Ta(e.pts,n);e.dtsTime=e.dts/ka;e.ptsTime=e.pts/ka});if(t.firstKeyFrame){var a=t.firstKeyFrame;a.dts=Ta(a.dts,n);a.pts=Ta(a.pts,n);a.dtsTime=a.dts/ka;a.ptsTime=a.dts/ka}}};var xa=function e(t){var r=false,i=0,n=null,a=null,s=0,o=0,l;while(t.length-o>=3){var u=Sa.aac.parseType(t,o);switch(u){case"timed-metadata":if(t.length-o<10){r=true;break}s=Sa.aac.parseId3TagSize(t,o);if(s>t.length){r=true;break}if(a===null){l=t.subarray(o,o+s);a=Sa.aac.parseAacTimestamp(l)}o+=s;break;case"audio":if(t.length-o<7){r=true;break}s=Sa.aac.parseAdtsSize(t,o);if(s>t.length){r=true;break}if(n===null){l=t.subarray(o,o+s);n=Sa.aac.parseSampleRate(l)}i++;o+=s;break;default:o++;break}if(r){return null}}if(n===null||a===null){return null}var c=ka/n;var d={audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+i*1024*c,pts:a+i*1024*c}]};return d};var Pa=function e(t){var r={pid:null,table:null};var i={};wa(t,r);for(var n in r.table){if(r.table.hasOwnProperty(n)){var a=r.table[n];switch(a){case Nn.H264_STREAM_TYPE:i.video=[];Aa(t,r,i);if(i.video.length===0){delete i.video}break;case Nn.ADTS_STREAM_TYPE:i.audio=[];Ca(t,r,i);if(i.audio.length===0){delete i.audio}break;default:break}}}return i};var Oa=function e(t,r){var i=Sa.aac.isLikelyAacData(t);var n;if(i){n=xa(t)}else{n=Pa(t)}if(!n||!n.audio&&!n.video){return null}Ia(n,r);return n};var Da={inspect:Oa,parseAudioPes_:Ca};var La=Da.inspect;var Ra=[{name:"VOD",run:function e(t,r,i,n,a){if(i!==Infinity){var s={time:0,segmentIndex:0};return s}return null}},{name:"ProgramDateTime",run:function e(t,r,i,n,a){if(!t.datetimeToDisplayTime){return null}var s=r.segments||[];var o=null;var l=null;a=a||0;for(var u=0;u<s.length;u++){var c=s[u];if(c.dateTimeObject){var d=c.dateTimeObject.getTime()/1e3;var f=d+t.datetimeToDisplayTime;var h=Math.abs(a-f);if(l!==null&&(h===0||l<h)){break}l=h;o={time:f,segmentIndex:u}}}return o}},{name:"Segment",run:function e(t,r,i,n,a){var s=r.segments||[];var o=null;var l=null;a=a||0;for(var u=0;u<s.length;u++){var c=s[u];if(c.timeline===n&&typeof c.start!=="undefined"){var d=Math.abs(a-c.start);if(l!==null&&l<d){break}if(!o||l===null||l>=d){l=d;o={time:c.start,segmentIndex:u}}}}return o}},{name:"Discontinuity",run:function e(t,r,i,n,a){var s=null;a=a||0;if(r.discontinuityStarts&&r.discontinuityStarts.length){var o=null;for(var l=0;l<r.discontinuityStarts.length;l++){var u=r.discontinuityStarts[l];var c=r.discontinuitySequence+l+1;var d=t.discontinuities[c];if(d){var f=Math.abs(a-d.time);if(o!==null&&o<f){break}if(!s||o===null||o>=f){o=f;s={time:d.time,segmentIndex:u}}}}}return s}},{name:"Playlist",run:function e(t,r,i,n,a){if(r.syncInfo){var s={time:r.syncInfo.time,segmentIndex:r.syncInfo.mediaSequence-r.mediaSequence};return s}return null}}];var Ua=function(e){A(t,e);function t(){E(this,t);var e=I(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.inspectCache_=undefined;e.timelines=[];e.discontinuities=[];e.datetimeToDisplayTime=null;e.logger_=yi("SyncController");return e}w(t,[{key:"getSyncPoint",value:function e(t,r,i,n){var a=this.runStrategies_(t,r,i,n);if(!a.length){return null}return this.selectSyncPoint_(a,{key:"time",value:n})}},{key:"getExpiredTime",value:function e(t,r){if(!t||!t.segments){return null}var i=this.runStrategies_(t,r,t.discontinuitySequence,0);if(!i.length){return null}var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});if(n.segmentIndex>0){n.time*=-1}return Math.abs(n.time+G(t,n.segmentIndex,0))}},{key:"runStrategies_",value:function e(t,r,i,n){var a=[];for(var s=0;s<Ra.length;s++){var o=Ra[s];var l=o.run(this,t,r,i,n);if(l){l.strategy=o.name;a.push({strategy:o.name,syncPoint:l})}}return a}},{key:"selectSyncPoint_",value:function e(t,r){var i=t[0].syncPoint;var n=Math.abs(t[0].syncPoint[r.key]-r.value);var a=t[0].strategy;for(var s=1;s<t.length;s++){var o=Math.abs(t[s].syncPoint[r.key]-r.value);if(o<n){n=o;i=t[s].syncPoint;a=t[s].strategy}}this.logger_("syncPoint for ["+r.key+": "+r.value+"] chosen with strategy"+(" ["+a+"]: [time:"+i.time+",")+(" segmentIndex:"+i.segmentIndex+"]"));return i}},{key:"saveExpiredSegmentInfo",value:function e(t,r){var i=r.mediaSequence-t.mediaSequence;for(var n=i-1;n>=0;n--){var a=t.segments[n];if(a&&typeof a.start!=="undefined"){r.syncInfo={mediaSequence:t.mediaSequence+n,time:a.start};this.logger_("playlist refresh sync: [time:"+r.syncInfo.time+","+(" mediaSequence: "+r.syncInfo.mediaSequence+"]"));this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function e(t){if(!this.datetimeToDisplayTime&&t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var r=t.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-r}}},{key:"reset",value:function e(){this.inspectCache_=undefined}},{key:"probeSegmentInfo",value:function e(t){var r=t.segment;var i=t.playlist;var n=void 0;if(r.map){n=this.probeMp4Segment_(t)}else{n=this.probeTsSegment_(t)}if(n){if(this.calculateSegmentTimeMapping_(t,n)){this.saveDiscontinuitySyncInfo_(t);if(!i.syncInfo){i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:r.start}}}}return n}},{key:"probeMp4Segment_",value:function e(t){var r=t.segment;var i=Ii.timescale(r.map.bytes);var n=Ii.compositionStartTime(i,t.bytes);if(t.timestampOffset!==null){t.timestampOffset-=n}return{start:n,end:n+r.duration}}},{key:"probeTsSegment_",value:function e(t){var r=La(t.bytes,this.inspectCache_);var i=void 0;var n=void 0;var a=void 0;if(!r){return null}if(r.video&&r.video.length===2){this.inspectCache_=r.video[1].dts;i=r.video[0].dtsTime;n=r.video[1].dtsTime;a=r.video}else if(r.audio&&r.audio.length===2){this.inspectCache_=r.audio[1].dts;i=r.audio[0].dtsTime;n=r.audio[1].dtsTime;a=r.audio}var s={segmentTimestampInfo:a,start:i,end:n,containsVideo:r.video&&r.video.length===2,containsAudio:r.audio&&r.audio.length===2};return s}},{key:"timestampOffsetForTimeline",value:function e(t){if(typeof this.timelines[t]==="undefined"){return null}return this.timelines[t].time}},{key:"mappingForTimeline",value:function e(t){if(typeof this.timelines[t]==="undefined"){return null}return this.timelines[t].mapping}},{key:"calculateSegmentTimeMapping_",value:function e(t,r){var i=t.segment;var n=this.timelines[t.timeline];if(t.timestampOffset!==null){n={time:t.startOfSegment,mapping:t.startOfSegment-r.start};this.timelines[t.timeline]=n;this.trigger("timestampoffset");this.logger_("time mapping for timeline "+t.timeline+": "+("[time: "+n.time+"] [mapping: "+n.mapping+"]"));i.start=t.startOfSegment;i.end=r.end+n.mapping}else if(n){i.start=r.start+n.mapping;i.end=r.end+n.mapping}else{return false}return true}},{key:"saveDiscontinuitySyncInfo_",value:function e(t){var r=t.playlist;var i=t.segment;if(i.discontinuity){this.discontinuities[i.timeline]={time:i.start,accuracy:0}}else if(r.discontinuityStarts&&r.discontinuityStarts.length){for(var n=0;n<r.discontinuityStarts.length;n++){var a=r.discontinuityStarts[n];var s=r.discontinuitySequence+n+1;var o=a-t.mediaIndex;var l=Math.abs(o);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>l){var u=void 0;if(o<0){u=i.start-G(r,t.mediaIndex,a)}else{u=i.end+G(r,t.mediaIndex+1,a)}this.discontinuities[s]={time:u,accuracy:l}}}}}}]);return t}(i.EventTarget);var Na=new vt("./decrypter-worker.worker.js",function(e,t){var r=this;var i=function(){function e(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}var t=function e(t,r){if(!(t instanceof r)){throw new TypeError("Cannot call a class as a function")}};var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(t,r,i){if(r)e(t.prototype,r);if(i)e(t,i);return t}}();var n=function e(t,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(t,r):t.__proto__=r};var a=function e(t,r){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:t};var s=function e(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]];var r=t[0];var i=t[1];var n=r[4];var a=i[4];var s=void 0;var o=void 0;var l=void 0;var u=[];var c=[];var d=void 0;var f=void 0;var h=void 0;var p=void 0;var v=void 0;var m=void 0;for(s=0;s<256;s++){c[(u[s]=s<<1^(s>>7)*283)^s]=s}for(o=l=0;!n[o];o^=d||1,l=c[l]||1){p=l^l<<1^l<<2^l<<3^l<<4;p=p>>8^p&255^99;n[o]=p;a[p]=o;h=u[f=u[d=u[o]]];m=h*16843009^f*65537^d*257^o*16843008;v=u[p]*257^p*16843008;for(s=0;s<4;s++){r[s][o]=v=v<<24^v>>>8;i[s][p]=m=m<<24^m>>>8}}for(s=0;s<5;s++){r[s]=r[s].slice(0);i[s]=i[s].slice(0)}return t};var o=null;var l=function(){function e(r){t(this,e);if(!o){o=s()}this._tables=[[o[0][0].slice(),o[0][1].slice(),o[0][2].slice(),o[0][3].slice(),o[0][4].slice()],[o[1][0].slice(),o[1][1].slice(),o[1][2].slice(),o[1][3].slice(),o[1][4].slice()]];var i=void 0;var n=void 0;var a=void 0;var l=void 0;var u=void 0;var c=this._tables[0][4];var d=this._tables[1];var f=r.length;var h=1;if(f!==4&&f!==6&&f!==8){throw new Error("Invalid aes key size")}l=r.slice(0);u=[];this._key=[l,u];for(i=f;i<4*f+28;i++){a=l[i-1];if(i%f===0||f===8&&i%f===4){a=c[a>>>24]<<24^c[a>>16&255]<<16^c[a>>8&255]<<8^c[a&255];if(i%f===0){a=a<<8^a>>>24^h<<24;h=h<<1^(h>>7)*283}}l[i]=l[i-f]^a}for(n=0;i;n++,i--){a=l[n&3?i:i-4];if(i<=4||n<4){u[n]=a}else{u[n]=d[0][c[a>>>24]]^d[1][c[a>>16&255]]^d[2][c[a>>8&255]]^d[3][c[a&255]]}}}e.prototype.decrypt=function e(t,r,i,n,a,s){var o=this._key[1];var l=t^o[0];var u=n^o[1];var c=i^o[2];var d=r^o[3];var f=void 0;var h=void 0;var p=void 0;var v=o.length/4-2;var m=void 0;var g=4;var y=this._tables[1];var _=y[0];var b=y[1];var T=y[2];var S=y[3];var k=y[4];for(m=0;m<v;m++){f=_[l>>>24]^b[u>>16&255]^T[c>>8&255]^S[d&255]^o[g];h=_[u>>>24]^b[c>>16&255]^T[d>>8&255]^S[l&255]^o[g+1];p=_[c>>>24]^b[d>>16&255]^T[l>>8&255]^S[u&255]^o[g+2];d=_[d>>>24]^b[l>>16&255]^T[u>>8&255]^S[c&255]^o[g+3];g+=4;l=f;u=h;c=p}for(m=0;m<4;m++){a[(3&-m)+s]=k[l>>>24]<<24^k[u>>16&255]<<16^k[c>>8&255]<<8^k[d&255]^o[g++];f=l;l=u;u=c;c=d;d=f}};return e}();var u=function(){function e(){t(this,e);this.listeners={}}e.prototype.on=function e(t,r){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(r)};e.prototype.off=function e(t,r){if(!this.listeners[t]){return false}var i=this.listeners[t].indexOf(r);this.listeners[t].splice(i,1);return i>-1};e.prototype.trigger=function e(t){var r=this.listeners[t];if(!r){return}if(arguments.length===2){var i=r.length;for(var n=0;n<i;++n){r[n].call(this,arguments[1])}}else{var a=Array.prototype.slice.call(arguments,1);var s=r.length;for(var o=0;o<s;++o){r[o].apply(this,a)}}};e.prototype.dispose=function e(){this.listeners={}};e.prototype.pipe=function e(t){this.on("data",function(e){t.push(e)})};return e}();var c=function(e){n(r,e);function r(){t(this,r);var i=a(this,e.call(this,u));i.jobs=[];i.delay=1;i.timeout_=null;return i}r.prototype.processJob_=function e(){this.jobs.shift()();if(this.jobs.length){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}else{this.timeout_=null}};r.prototype.push=function e(t){this.jobs.push(t);if(!this.timeout_){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}};return r}(u);var d=function e(t){return t<<24|(t&65280)<<8|(t&16711680)>>8|t>>>24};var f=function e(t,r,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2);var a=new l(Array.prototype.slice.call(r));var s=new Uint8Array(t.byteLength);var o=new Int32Array(s.buffer);var u=void 0;var c=void 0;var f=void 0;var h=void 0;var p=void 0;var v=void 0;var m=void 0;var g=void 0;var y=void 0;u=i[0];c=i[1];f=i[2];h=i[3];for(y=0;y<n.length;y+=4){p=d(n[y]);v=d(n[y+1]);m=d(n[y+2]);g=d(n[y+3]);a.decrypt(p,v,m,g,o,y);o[y]=d(o[y]^u);o[y+1]=d(o[y+1]^c);o[y+2]=d(o[y+2]^f);o[y+3]=d(o[y+3]^h);u=p;c=v;f=m;h=g}return s};var h=function(){function r(i,n,a,s){t(this,r);var o=r.STEP;var l=new Int32Array(i.buffer);var u=new Uint8Array(i.byteLength);var f=0;this.asyncStream_=new c;this.asyncStream_.push(this.decryptChunk_(l.subarray(f,f+o),n,a,u));for(f=o;f<l.length;f+=o){a=new Uint32Array([d(l[f-4]),d(l[f-3]),d(l[f-2]),d(l[f-1])]);this.asyncStream_.push(this.decryptChunk_(l.subarray(f,f+o),n,a,u))}this.asyncStream_.push(function(){s(null,e(u))})}r.prototype.decryptChunk_=function e(t,r,i,n){return function(){var e=f(t,r,i);n.set(e,t.byteOffset)}};i(r,null,[{key:"STEP",get:function e(){return 32e3}}]);return r}();var p=function e(t){var r={};Object.keys(t).forEach(function(e){var i=t[e];if(ArrayBuffer.isView(i)){r[e]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}}else{r[e]=i}});return r};var v=function e(t){t.onmessage=function(e){var r=e.data;var i=new Uint8Array(r.encrypted.bytes,r.encrypted.byteOffset,r.encrypted.byteLength);var n=new Uint32Array(r.key.bytes,r.key.byteOffset,r.key.byteLength/4);var a=new Uint32Array(r.iv.bytes,r.iv.byteOffset,r.iv.byteLength/4);new h(i,n,a,function(e,i){t.postMessage(p({source:r.source,decrypted:i}),[i.buffer])})}};var m=new v(r);return m}()});var Ma=function e(t){var r=t.default?"main":"alternative";if(t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0){r="main-desc"}return r};var Ba=function e(t,r){t.abort();t.pause();if(r&&r.activePlaylistLoader){r.activePlaylistLoader.pause();r.activePlaylistLoader=null}};var Fa=function e(t,r){r.activePlaylistLoader=t;t.load()};var Wa=function e(t,r){return function(){var e=r.segmentLoaders,i=e[t],n=e.main,a=r.mediaTypes[t];var s=a.activeTrack();var o=a.activeGroup(s);var l=a.activePlaylistLoader;Ba(i,a);if(!o){return}if(!o.playlistLoader){if(l){n.resetEverything()}return}i.resyncLoader();Fa(o.playlistLoader,a)}};var Ha=function e(t,r){return function(){var e=r.segmentLoaders,i=e[t],n=e.main,a=r.mediaTypes[t];var s=a.activeTrack();var o=a.activeGroup(s);var l=a.activePlaylistLoader;Ba(i,a);if(!o){return}if(!o.playlistLoader){n.resetEverything();return}if(l===o.playlistLoader){Fa(o.playlistLoader,a);return}if(i.track){i.track(s)}i.resetEverything();Fa(o.playlistLoader,a)}};var qa={AUDIO:function e(t,r){return function(){var e=r.segmentLoaders[t],n=r.mediaTypes[t],a=r.blacklistCurrentPlaylist;Ba(e,n);var s=n.activeTrack();var o=n.activeGroup();var l=(o.filter(function(e){return e.default})[0]||o[0]).id;var u=n.tracks[l];if(s===u){a({message:"Problem encountered loading the default audio track."});return}i.log.warn("Problem encountered loading the alternate audio track."+"Switching back to default.");for(var c in n.tracks){n.tracks[c].enabled=n.tracks[c]===u}n.onTrackChanged()}},SUBTITLES:function e(t,r){return function(){var e=r.segmentLoaders[t],n=r.mediaTypes[t];i.log.warn("Problem encountered loading the subtitle track."+"Disabling subtitle track.");Ba(e,n);var a=n.activeTrack();if(a){a.mode="disabled"}n.onTrackChanged()}}};var Va={AUDIO:function e(t,r,i){if(!r){return}var n=i.tech,a=i.requestOptions,s=i.segmentLoaders[t];r.on("loadedmetadata",function(){var e=r.media();s.playlist(e,a);if(!n.paused()||e.endList&&n.preload()!=="none"){s.load()}});r.on("loadedplaylist",function(){s.playlist(r.media(),a);if(!n.paused()){s.load()}});r.on("error",qa[t](t,i))},SUBTITLES:function e(t,r,i){var n=i.tech,a=i.requestOptions,s=i.segmentLoaders[t],o=i.mediaTypes[t];r.on("loadedmetadata",function(){var e=r.media();s.playlist(e,a);s.track(o.activeTrack());if(!n.paused()||e.endList&&n.preload()!=="none"){s.load()}});r.on("loadedplaylist",function(){s.playlist(r.media(),a);if(!n.paused()){s.load()}});r.on("error",qa[t](t,i))}};var Ka={AUDIO:function e(t,r){var n=r.hls,a=r.sourceType,s=r.segmentLoaders[t],o=r.requestOptions,l=r.master.mediaGroups,u=r.mediaTypes[t],c=u.groups,d=u.tracks,f=r.masterPlaylistLoader;if(!l[t]||Object.keys(l[t]).length===0){l[t]={main:{default:{default:true}}}}for(var h in l[t]){if(!c[h]){c[h]=[]}for(var p in l[t][h]){var v=l[t][h][p];var m=void 0;if(v.resolvedUri){m=new W(v.resolvedUri,n,o)}else if(v.playlists&&a==="dash"){m=new gi(v.playlists[0],n,o,f)}else{m=null}v=i.mergeOptions({id:p,playlistLoader:m},v);Va[t](t,v.playlistLoader,r);c[h].push(v);if(typeof d[p]==="undefined"){var g=new i.AudioTrack({id:p,kind:Ma(v),enabled:false,language:v.language,default:v.default,label:p});d[p]=g}}}s.on("error",qa[t](t,r))},SUBTITLES:function e(t,r){var n=r.tech,a=r.hls,s=r.sourceType,o=r.segmentLoaders[t],l=r.requestOptions,u=r.master.mediaGroups,c=r.mediaTypes[t],d=c.groups,f=c.tracks,h=r.masterPlaylistLoader;for(var p in u[t]){if(!d[p]){d[p]=[]}for(var v in u[t][p]){if(u[t][p][v].forced){continue}var m=u[t][p][v];var g=void 0;if(s==="hls"){g=new W(m.resolvedUri,a,l)}else if(s==="dash"){g=new gi(m.playlists[0],a,l,h)}m=i.mergeOptions({id:v,playlistLoader:g},m);Va[t](t,m.playlistLoader,r);d[p].push(m);if(typeof f[v]==="undefined"){var y=n.addRemoteTextTrack({id:v,kind:"subtitles",default:m.default&&m.autoselect,language:m.language,label:v},false).track;f[v]=y}}}o.on("error",qa[t](t,r))},"CLOSED-CAPTIONS":function e(t,r){var n=r.tech,a=r.master.mediaGroups,s=r.mediaTypes[t],o=s.groups,l=s.tracks;for(var u in a[t]){if(!o[u]){o[u]=[]}for(var c in a[t][u]){var d=a[t][u][c];if(!d.instreamId.match(/CC\d/)){continue}o[u].push(i.mergeOptions({id:c},d));if(typeof l[c]==="undefined"){var f=n.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default&&d.autoselect,language:d.language,label:c},false).track;l[c]=f}}}}};var za=function e(t,r){return function(e){var i=r.masterPlaylistLoader,n=r.mediaTypes[t].groups;var a=i.media();if(!a){return null}var s=null;if(a.attributes[t]){s=n[a.attributes[t]]}s=s||n.main;if(typeof e==="undefined"){return s}if(e===null){return null}return s.filter(function(t){return t.id===e.id})[0]||null}};var Ga={AUDIO:function e(t,r){return function(){var e=r.mediaTypes[t].tracks;for(var i in e){if(e[i].enabled){return e[i]}}return null}},SUBTITLES:function e(t,r){return function(){var e=r.mediaTypes[t].tracks;for(var i in e){if(e[i].mode==="showing"){return e[i]}}return null}}};var Ya=function e(t){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){Ka[e](e,t)});var r=t.mediaTypes,i=t.masterPlaylistLoader,n=t.tech,a=t.hls;["AUDIO","SUBTITLES"].forEach(function(e){r[e].activeGroup=za(e,t);r[e].activeTrack=Ga[e](e,t);r[e].onGroupChanged=Wa(e,t);r[e].onTrackChanged=Ha(e,t)});var s=r.AUDIO.activeGroup();var o=(s.filter(function(e){return e.default})[0]||s[0]).id;r.AUDIO.tracks[o].enabled=true;r.AUDIO.onTrackChanged();i.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return r[e].onGroupChanged()})});var l=function e(){r.AUDIO.onTrackChanged();n.trigger({type:"usage",name:"hls-audio-change"})};n.audioTracks().addEventListener("change",l);n.remoteTextTracks().addEventListener("change",r.SUBTITLES.onTrackChanged);a.on("dispose",function(){n.audioTracks().removeEventListener("change",l);n.remoteTextTracks().removeEventListener("change",r.SUBTITLES.onTrackChanged)});n.clearTracks("audio");for(var u in r.AUDIO.tracks){n.audioTracks().addTrack(r.AUDIO.tracks[u])}};var Xa=function e(){var t={};["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:_i,activeTrack:_i,onGroupChanged:_i,onTrackChanged:_i}});return t};var $a=60*2;var Ja=void 0;var Qa=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"];var Za=function e(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]};var es=function(e){A(t,e);function t(e){E(this,t);var r=I(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var n=e.url,a=e.handleManifestRedirects,s=e.withCredentials,o=e.tech,l=e.bandwidth,u=e.externHls,c=e.useCueTags,d=e.blacklistDuration,f=e.enableLowInitialPlaylist,h=e.sourceType,p=e.seekTo,v=e.cacheEncryptionKeys;if(!n){throw new Error("A non-empty playlist URL is required")}Ja=u;r.withCredentials=s;r.tech_=o;r.hls_=o.hls;r.seekTo_=p;r.sourceType_=h;r.useCueTags_=c;r.blacklistDuration=d;r.enableLowInitialPlaylist=f;if(r.useCueTags_){r.cueTagsTrack_=r.tech_.addTextTrack("metadata","ad-cues");r.cueTagsTrack_.inBandMetadataTrackDispatchType=""}r.requestOptions_={withCredentials:s,handleManifestRedirects:a,timeout:null};r.mediaTypes_=Xa();r.mediaSource=new i.MediaSource;r.mediaSource.addEventListener("sourceopen",r.handleSourceOpen_.bind(r));r.seekable_=i.createTimeRanges();r.hasPlayed_=function(){return false};r.syncController_=new Ua(e);r.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},false).track;r.decrypter_=new Na;r.inbandTextTracks_={};var m={hls:r.hls_,mediaSource:r.mediaSource,currentTime:r.tech_.currentTime.bind(r.tech_),seekable:function e(){return r.seekable()},seeking:function e(){return r.tech_.seeking()},duration:function e(){return r.mediaSource.duration},hasPlayed:function e(){return r.hasPlayed_()},goalBufferLength:function e(){return r.goalBufferLength()},bandwidth:l,syncController:r.syncController_,decrypter:r.decrypter_,sourceType:r.sourceType_,inbandTextTracks:r.inbandTextTracks_,cacheEncryptionKeys:v};r.masterPlaylistLoader_=r.sourceType_==="dash"?new gi(n,r.hls_,r.requestOptions_):new W(n,r.hls_,r.requestOptions_);r.setupMasterPlaylistLoaderListeners_();r.mainSegmentLoader_=new Pn(i.mergeOptions(m,{segmentMetadataTrack:r.segmentMetadataTrack_,loaderType:"main"}),e);r.audioSegmentLoader_=new Pn(i.mergeOptions(m,{loaderType:"audio"}),e);r.subtitleSegmentLoader_=new Ln(i.mergeOptions(m,{loaderType:"vtt"}),e);r.setupSegmentLoaderListeners_();Qa.forEach(function(e){r[e+"_"]=Za.bind(r,e)});r.logger_=yi("MPC");r.masterPlaylistLoader_.load();return r}w(t,[{key:"setupMasterPlaylistLoaderListeners_",value:function e(){var t=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var e=t.masterPlaylistLoader_.media();var r=e.targetDuration*1.5*1e3;if(ce(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())){t.requestOptions_.timeout=0}else{t.requestOptions_.timeout=r}if(e.endList&&t.tech_.preload()!=="none"){t.mainSegmentLoader_.playlist(e,t.requestOptions_);t.mainSegmentLoader_.load()}Ya({sourceType:t.sourceType_,segmentLoaders:{AUDIO:t.audioSegmentLoader_,SUBTITLES:t.subtitleSegmentLoader_,main:t.mainSegmentLoader_},tech:t.tech_,requestOptions:t.requestOptions_,masterPlaylistLoader:t.masterPlaylistLoader_,hls:t.hls_,master:t.master(),mediaTypes:t.mediaTypes_,blacklistCurrentPlaylist:t.blacklistCurrentPlaylist.bind(t)});t.triggerPresenceUsage_(t.master(),e);try{t.setupSourceBuffers_()}catch(e){i.log.warn("Failed to create SourceBuffers",e);return t.mediaSource.endOfStream("decode")}t.setupFirstPlay();if(!t.mediaTypes_.AUDIO.activePlaylistLoader||t.mediaTypes_.AUDIO.activePlaylistLoader.media()){t.trigger("selectedinitialmedia")}else{t.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){t.trigger("selectedinitialmedia")})}});this.masterPlaylistLoader_.on("loadedplaylist",function(){var e=t.masterPlaylistLoader_.media();if(!e){t.excludeUnsupportedVariants_();var r=void 0;if(t.enableLowInitialPlaylist){r=t.selectInitialPlaylist()}if(!r){r=t.selectPlaylist()}t.initialMedia_=r;t.masterPlaylistLoader_.media(t.initialMedia_);return}if(t.useCueTags_){t.updateAdCues_(e)}t.mainSegmentLoader_.playlist(e,t.requestOptions_);t.updateDuration();if(!t.tech_.paused()){t.mainSegmentLoader_.load();if(t.audioSegmentLoader_){t.audioSegmentLoader_.load()}}if(!e.endList){var i=function e(){var r=t.seekable();if(r.length!==0){t.mediaSource.addSeekableRange_(r.start(0),r.end(0))}};if(t.duration()!==Infinity){var n=function e(){if(t.duration()===Infinity){i()}else{t.tech_.one("durationchange",e)}};t.tech_.one("durationchange",n)}else{i()}}});this.masterPlaylistLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.masterPlaylistLoader_.error)});this.masterPlaylistLoader_.on("mediachanging",function(){t.mainSegmentLoader_.abort();t.mainSegmentLoader_.pause()});this.masterPlaylistLoader_.on("mediachange",function(){var e=t.masterPlaylistLoader_.media();var r=e.targetDuration*1.5*1e3;if(ce(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())){t.requestOptions_.timeout=0}else{t.requestOptions_.timeout=r}t.mainSegmentLoader_.playlist(e,t.requestOptions_);t.mainSegmentLoader_.load();t.tech_.trigger({type:"mediachange",bubbles:true})});this.masterPlaylistLoader_.on("playlistunchanged",function(){var e=t.masterPlaylistLoader_.media();var r=t.stuckAtPlaylistEnd_(e);if(r){t.blacklistCurrentPlaylist({message:"Playlist no longer updating."});t.tech_.trigger("playliststuck")}});this.masterPlaylistLoader_.on("renditiondisabled",function(){t.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})});this.masterPlaylistLoader_.on("renditionenabled",function(){t.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})}},{key:"triggerPresenceUsage_",value:function e(t,r){var i=t.mediaGroups||{};var n=true;var a=Object.keys(i.AUDIO);for(var s in i.AUDIO){for(var o in i.AUDIO[s]){var l=i.AUDIO[s][o];if(!l.uri){n=false}}}if(n){this.tech_.trigger({type:"usage",name:"hls-demuxed"})}if(Object.keys(i.SUBTITLES).length){this.tech_.trigger({type:"usage",name:"hls-webvtt"})}if(Ja.Playlist.isAes(r)){this.tech_.trigger({type:"usage",name:"hls-aes"})}if(Ja.Playlist.isFmp4(r)){this.tech_.trigger({type:"usage",name:"hls-fmp4"})}if(a.length&&Object.keys(i.AUDIO[a[0]]).length>1){this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})}if(this.useCueTags_){this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}}},{key:"setupSegmentLoaderListeners_",value:function e(){var t=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var e=t.selectPlaylist();var r=t.masterPlaylistLoader_.media();var i=t.tech_.buffered();var n=i.length?i.end(i.length-1)-t.tech_.currentTime():0;var a=t.bufferLowWaterLine();if(!r.endList||t.duration()<Ti.MAX_BUFFER_LOW_WATER_LINE||e.attributes.BANDWIDTH<r.attributes.BANDWIDTH||n>=a){t.masterPlaylistLoader_.media(e)}t.tech_.trigger("bandwidthupdate")});this.mainSegmentLoader_.on("progress",function(){t.trigger("progress")});this.mainSegmentLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())});this.mainSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()});this.mainSegmentLoader_.on("timestampoffset",function(){t.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})});this.audioSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()});this.mainSegmentLoader_.on("ended",function(){t.onEndOfStream()});this.mainSegmentLoader_.on("earlyabort",function(){t.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the "+"request without rebuffering."},$a)});this.mainSegmentLoader_.on("reseteverything",function(){t.tech_.trigger("hls-reset")});this.mainSegmentLoader_.on("segmenttimemapping",function(e){t.tech_.trigger({type:"hls-segment-time-mapping",mapping:e.mapping})});this.audioSegmentLoader_.on("ended",function(){t.onEndOfStream()})}},{key:"mediaSecondsLoaded_",value:function e(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function e(){this.mainSegmentLoader_.load();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.load()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.load()}}},{key:"smoothQualityChange_",value:function e(){var t=this.selectPlaylist();if(t!==this.masterPlaylistLoader_.media()){this.masterPlaylistLoader_.media(t);this.mainSegmentLoader_.resetLoader()}}},{key:"fastQualityChange_",value:function e(){var t=this;var r=this.selectPlaylist();if(r===this.masterPlaylistLoader_.media()){return}this.masterPlaylistLoader_.media(r);this.mainSegmentLoader_.resetEverything(function(){if(i.browser.IE_VERSION||i.browser.IS_EDGE){t.tech_.setCurrentTime(t.tech_.currentTime()+.04)}else{t.tech_.setCurrentTime(t.tech_.currentTime())}})}},{key:"play",value:function e(){if(this.setupFirstPlay()){return}if(this.tech_.ended()){this.seekTo_(0)}if(this.hasPlayed_()){this.load()}var t=this.tech_.seekable();if(this.tech_.duration()===Infinity){if(this.tech_.currentTime()<t.start(0)){return this.seekTo_(t.end(t.length-1))}}}},{key:"setupFirstPlay",value:function e(){var t=this;var r=this.masterPlaylistLoader_.media();if(!r||this.tech_.paused()||this.hasPlayed_()){return false}if(!r.endList){var n=this.seekable();if(!n.length){return false}if(i.browser.IE_VERSION&&this.tech_.readyState()===0){this.tech_.one("loadedmetadata",function(){t.trigger("firstplay");t.seekTo_(n.end(0));t.hasPlayed_=function(){return true}});return false}this.trigger("firstplay");this.seekTo_(n.end(0))}this.hasPlayed_=function(){return true};this.load();return true}},{key:"handleSourceOpen_",value:function e(){try{this.setupSourceBuffers_()}catch(e){i.log.warn("Failed to create Source Buffers",e);return this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var t=this.tech_.play();if(typeof t!=="undefined"&&typeof t.then==="function"){t.then(null,function(e){})}}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function e(){var t=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo){t=t&&this.audioSegmentLoader_.ended_}else{t=this.audioSegmentLoader_.ended_}}if(!t){return}this.logger_("calling mediaSource.endOfStream()");try{this.mediaSource.endOfStream()}catch(e){i.log.warn("Failed to call media source endOfStream",e)}}},{key:"stuckAtPlaylistEnd_",value:function e(t){var r=this.seekable();if(!r.length){return false}var i=this.syncController_.getExpiredTime(t,this.mediaSource.duration);if(i===null){return false}var n=Ja.Playlist.playlistEnd(t,i);var a=this.tech_.currentTime();var s=this.tech_.buffered();if(!s.length){return n-a<=$e}var o=s.end(s.length-1);return o-a<=$e&&n-o<=$e}},{key:"blacklistCurrentPlaylist",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=arguments[1];var n=void 0;var a=void 0;n=t.playlist||this.masterPlaylistLoader_.media();r=r||t.blacklistDuration||this.blacklistDuration;if(!n){this.error=t;try{return this.mediaSource.endOfStream("network")}catch(e){return this.trigger("error")}}var s=this.masterPlaylistLoader_.master.playlists.filter(ne).length===1;var o=this.masterPlaylistLoader_.master.playlists;if(o.length===1){i.log.warn("Problem encountered with the current "+"HLS playlist. Trying again since it is the only playlist.");this.tech_.trigger("retryplaylist");return this.masterPlaylistLoader_.load(s)}if(s){i.log.warn("Removing all playlists from the blacklist because the last "+"rendition is about to be blacklisted.");o.forEach(function(e){if(e.excludeUntil!==Infinity){delete e.excludeUntil}});this.tech_.trigger("retryplaylist")}n.excludeUntil=Date.now()+r*1e3;this.tech_.trigger("blacklistplaylist");this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});a=this.selectPlaylist();i.log.warn("Problem encountered with the current HLS playlist."+(t.message?" "+t.message:"")+" Switching to another playlist.");return this.masterPlaylistLoader_.media(a,s)}},{key:"pauseLoading",value:function e(){this.mainSegmentLoader_.pause();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.pause()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.pause()}}},{key:"setCurrentTime",value:function e(t){var r=Qe(this.tech_.buffered(),t);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())){return 0}if(!this.masterPlaylistLoader_.media().segments){return 0}if(r&&r.length){return t}this.mainSegmentLoader_.resetEverything();this.mainSegmentLoader_.abort();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.resetEverything();this.audioSegmentLoader_.abort()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.resetEverything();this.subtitleSegmentLoader_.abort()}this.load()}},{key:"duration",value:function e(){if(!this.masterPlaylistLoader_){return 0}if(this.mediaSource){return this.mediaSource.duration}return Ja.Playlist.duration(this.masterPlaylistLoader_.media())}},{key:"seekable",value:function e(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function e(){var t=void 0;var r=void 0;if(!this.masterPlaylistLoader_){return}var n=this.masterPlaylistLoader_.media();if(!n){return}var a=this.syncController_.getExpiredTime(n,this.mediaSource.duration);if(a===null){return}t=Ja.Playlist.seekable(n,a);if(t.length===0){return}if(this.mediaTypes_.AUDIO.activePlaylistLoader){n=this.mediaTypes_.AUDIO.activePlaylistLoader.media();a=this.syncController_.getExpiredTime(n,this.mediaSource.duration);if(a===null){return}r=Ja.Playlist.seekable(n,a);if(r.length===0){return}}var s=void 0;var o=void 0;if(this.seekable_&&this.seekable_.length){s=this.seekable_.end(0);o=this.seekable_.start(0)}if(!r){this.seekable_=t}else if(r.start(0)>t.end(0)||t.start(0)>r.end(0)){this.seekable_=t}else{this.seekable_=i.createTimeRanges([[r.start(0)>t.start(0)?r.start(0):t.start(0),r.end(0)<t.end(0)?r.end(0):t.end(0)]])}if(this.seekable_&&this.seekable_.length){if(this.seekable_.end(0)===s&&this.seekable_.start(0)===o){return}}this.logger_("seekable updated ["+tt(this.seekable_)+"]");this.tech_.trigger("seekablechanged")}},{key:"updateDuration",value:function e(){var t=this;var r=this.mediaSource.duration;var n=Ja.Playlist.duration(this.masterPlaylistLoader_.media());var a=this.tech_.buffered();var s=function e(){t.logger_("Setting duration from "+t.mediaSource.duration+" => "+n);try{t.mediaSource.duration=n}catch(e){i.log.warn("Failed to set media source duration",e)}t.tech_.trigger("durationchange");t.mediaSource.removeEventListener("sourceopen",e)};if(a.length>0){n=Math.max(n,a.end(a.length-1))}if(r!==n){if(this.mediaSource.readyState!=="open"){this.mediaSource.addEventListener("sourceopen",s)}else{s()}}}},{key:"dispose",value:function e(){var t=this;this.decrypter_.terminate();this.masterPlaylistLoader_.dispose();this.mainSegmentLoader_.dispose();["AUDIO","SUBTITLES"].forEach(function(e){var r=t.mediaTypes_[e].groups;for(var i in r){r[i].forEach(function(e){if(e.playlistLoader){e.playlistLoader.dispose()}})}});this.audioSegmentLoader_.dispose();this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function e(){return this.masterPlaylistLoader_.master}},{key:"media",value:function e(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function e(){var t=this.masterPlaylistLoader_.media();var r=void 0;if(!t||this.mediaSource.readyState!=="open"){return}r=xt(this.masterPlaylistLoader_.master,t);if(r.length<1){this.error="No compatible SourceBuffer configuration for the variant stream:"+t.resolvedUri;return this.mediaSource.endOfStream("decode")}this.configureLoaderMimeTypes_(r);this.excludeIncompatibleVariants_(t)}},{key:"configureLoaderMimeTypes_",value:function e(t){var r=t.length>1&&t[0].indexOf(",")===-1&&t[0]!==t[1]?new i.EventTarget:null;this.mainSegmentLoader_.mimeType(t[0],r);if(t[1]){this.audioSegmentLoader_.mimeType(t[1],r)}}},{key:"excludeUnsupportedVariants_",value:function e(){this.master().playlists.forEach(function(e){if(e.attributes.CODECS&&f.MediaSource&&f.MediaSource.isTypeSupported&&!f.MediaSource.isTypeSupported('video/mp4; codecs="'+Et(e.attributes.CODECS)+'"')){e.excludeUntil=Infinity}})}},{key:"excludeIncompatibleVariants_",value:function e(t){var r=2;var i=null;var n=void 0;if(t.attributes.CODECS){n=jt(t.attributes.CODECS);i=n.videoCodec;r=n.codecCount}this.master().playlists.forEach(function(e){var t={codecCount:2,videoCodec:null};if(e.attributes.CODECS){t=jt(e.attributes.CODECS)}if(t.codecCount!==r){e.excludeUntil=Infinity}if(t.videoCodec!==i){e.excludeUntil=Infinity}})}},{key:"updateAdCues_",value:function e(t){var r=0;var i=this.seekable();if(i.length){r=i.start(0)}Un(t,this.cueTagsTrack_,r)}},{key:"goalBufferLength",value:function e(){var t=this.tech_.currentTime();var r=Ti.GOAL_BUFFER_LENGTH;var i=Ti.GOAL_BUFFER_LENGTH_RATE;var n=Math.max(r,Ti.MAX_GOAL_BUFFER_LENGTH);return Math.min(r+t*i,n)}},{key:"bufferLowWaterLine",value:function e(){var t=this.tech_.currentTime();var r=Ti.BUFFER_LOW_WATER_LINE;var i=Ti.BUFFER_LOW_WATER_LINE_RATE;var n=Math.max(r,Ti.MAX_BUFFER_LOW_WATER_LINE);return Math.min(r+t*i,n)}}]);return t}(i.EventTarget);var ts=function e(t,r,i){return function(e){var n=t.master.playlists[r];var a=ie(n);var s=ne(n);if(typeof e==="undefined"){return s}if(e){delete n.disabled}else{n.disabled=true}if(e!==s&&!a){i();if(e){t.trigger("renditionenabled")}else{t.trigger("renditiondisabled")}}return e}};var rs=function e(t,r,i){E(this,e);var n=t.masterPlaylistController_,a=t.options_.smoothQualityChange;var s=a?"smooth":"fast";var o=n[s+"QualityChange_"].bind(n);if(r.attributes.RESOLUTION){var l=r.attributes.RESOLUTION;this.width=l.width;this.height=l.height}this.bandwidth=r.attributes.BANDWIDTH;this.id=i;this.enabled=ts(t.playlists,r.uri,o)};var is=function e(t){var r=t.playlists;t.representations=function(){return r.master.playlists.filter(function(e){return!ie(e)}).map(function(e,r){return new rs(t,e,e.uri)})}};var ns=["seeking","seeked","pause","playing","error"];var as=function(){function e(t){var r=this;E(this,e);this.tech_=t.tech;this.seekable=t.seekable;this.seekTo=t.seekTo;this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow;this.media=t.media;this.consecutiveUpdates=0;this.lastRecordedTime=null;this.timer_=null;this.checkCurrentTimeTimeout_=null;this.logger_=yi("PlaybackWatcher");this.logger_("initialize");var i=function e(){return r.monitorCurrentTime_()};var n=function e(){return r.techWaiting_()};var a=function e(){return r.cancelTimer_()};var s=function e(){return r.fixesBadSeeks_()};this.tech_.on("seekablechanged",s);this.tech_.on("waiting",n);this.tech_.on(ns,a);this.tech_.on("canplay",i);this.dispose=function(){r.logger_("dispose");r.tech_.off("seekablechanged",s);r.tech_.off("waiting",n);r.tech_.off(ns,a);r.tech_.off("canplay",i);if(r.checkCurrentTimeTimeout_){f.clearTimeout(r.checkCurrentTimeTimeout_)}r.cancelTimer_()}}w(e,[{key:"monitorCurrentTime_",value:function e(){this.checkCurrentTime_();if(this.checkCurrentTimeTimeout_){f.clearTimeout(this.checkCurrentTimeTimeout_)}this.checkCurrentTimeTimeout_=f.setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function e(){if(this.tech_.seeking()&&this.fixesBadSeeks_()){this.consecutiveUpdates=0;this.lastRecordedTime=this.tech_.currentTime();return}if(this.tech_.paused()||this.tech_.seeking()){return}var t=this.tech_.currentTime();var r=this.tech_.buffered();if(this.lastRecordedTime===t&&(!r.length||t+$e>=r.end(r.length-1))){return this.techWaiting_()}if(this.consecutiveUpdates>=5&&t===this.lastRecordedTime){this.consecutiveUpdates++;this.waiting_()}else if(t===this.lastRecordedTime){this.consecutiveUpdates++}else{this.consecutiveUpdates=0;this.lastRecordedTime=t}}},{key:"cancelTimer_",value:function e(){this.consecutiveUpdates=0;if(this.timer_){this.logger_("cancelTimer_");clearTimeout(this.timer_)}this.timer_=null}},{key:"fixesBadSeeks_",value:function e(){var t=this.tech_.seeking();if(!t){return false}var r=this.seekable();var i=this.tech_.currentTime();var n=this.afterSeekableWindow_(r,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);var a=void 0;if(n){var s=r.end(r.length-1);a=s}if(this.beforeSeekableWindow_(r,i)){var o=r.start(0);a=o+$e}if(typeof a!=="undefined"){this.logger_("Trying to seek outside of seekable at time "+i+" with "+("seekable range "+tt(r)+". Seeking to ")+(a+"."));this.seekTo(a);return true}return false}},{key:"waiting_",value:function e(){if(this.techWaiting_()){return}var t=this.tech_.currentTime();var r=this.tech_.buffered();var i=Qe(r,t);if(i.length&&t+3<=i.end(0)){this.cancelTimer_();this.seekTo(t);this.logger_("Stopped at "+t+" while inside a buffered region "+("["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume ")+"playback by seeking to the current time.");this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"});return}}},{key:"techWaiting_",value:function e(){var t=this.seekable();var r=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_()){return true}if(this.tech_.seeking()||this.timer_!==null){return true}if(this.beforeSeekableWindow_(t,r)){var i=t.end(t.length-1);this.logger_("Fell out of live window at time "+r+". Seeking to "+("live point (seekable end) "+i));this.cancelTimer_();this.seekTo(i);this.tech_.trigger({type:"usage",name:"hls-live-resync"});return true}var n=this.tech_.buffered();var a=Ze(n,r);if(this.videoUnderflow_(a,n,r)){this.cancelTimer_();this.seekTo(r);this.tech_.trigger({type:"usage",name:"hls-video-underflow"});return true}if(a.length>0){var s=a.start(0)-r;this.logger_("Stopped at "+r+", setting timer for "+s+", seeking "+("to "+a.start(0)));this.timer_=setTimeout(this.skipTheGap_.bind(this),s*1e3,r);return true}return false}},{key:"afterSeekableWindow_",value:function e(t,r,i){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;if(!t.length){return false}var a=t.end(t.length-1)+$e;var s=!i.endList;if(s&&n){a=t.end(t.length-1)+i.targetDuration*3}if(r>a){return true}return false}},{key:"beforeSeekableWindow_",value:function e(t,r){if(t.length&&t.start(0)>0&&r<t.start(0)-$e){return true}return false}},{key:"videoUnderflow_",value:function e(t,r,i){if(t.length===0){var n=this.gapFromVideoUnderflow_(r,i);if(n){this.logger_("Encountered a gap in video from "+n.start+" to "+n.end+". "+("Seeking to current time "+i));return true}}return false}},{key:"skipTheGap_",value:function e(t){var r=this.tech_.buffered();var i=this.tech_.currentTime();var n=Ze(r,i);this.cancelTimer_();if(n.length===0||i!==t){return}this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",t,"nextRange start:",n.start(0));this.seekTo(n.start(0)+Xe);this.tech_.trigger({type:"usage",name:"hls-gap-skip"})}},{key:"gapFromVideoUnderflow_",value:function e(t,r){var i=et(t);for(var n=0;n<i.length;n++){var a=i.start(n);var s=i.end(n);if(r-a<4&&r-a>2){return{start:a,end:s}}}return null}}]);return e}();var ss={errorInterval:30,getSource:function e(t){var r=this.tech({IWillNotUseThisInPlugins:true});var i=r.currentSource_;return t(i)}};var os=function e(t,r){var n=0;var a=0;var s=i.mergeOptions(ss,r);t.ready(function(){t.trigger({type:"usage",name:"hls-error-reload-initialized"})});var o=function e(){if(a){t.currentTime(a)}};var l=function e(r){if(r===null||r===undefined){return}a=t.duration()!==Infinity&&t.currentTime()||0;t.one("loadedmetadata",o);t.src(r);t.trigger({type:"usage",name:"hls-error-reload"});t.play()};var u=function e(){if(Date.now()-n<s.errorInterval*1e3){t.trigger({type:"usage",name:"hls-error-reload-canceled"});return}if(!s.getSource||typeof s.getSource!=="function"){i.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}n=Date.now();return s.getSource.call(t,l)};var c=function e(){t.off("loadedmetadata",o);t.off("error",u);t.off("dispose",e)};var d=function r(i){c();e(t,i)};t.on("error",u);t.on("dispose",c);t.reloadSourceOnError=d};var ls=function e(t){os(this,t)};var us="1.11.1";i.use("*",function(e){return{setSource:function e(t,r){r(null,t)},setCurrentTime:function t(r){if(e.vhs&&e.currentSource().src===e.vhs.source_.src){e.vhs.setCurrentTime(r)}return r},play:function t(){if(e.vhs&&e.currentSource().src===e.vhs.source_.src){e.vhs.setCurrentTime(e.tech_.currentTime())}}}});var cs={PlaylistLoader:W,Playlist:de,Decrypter:Ie,AsyncStream:we,decrypt:Ae,utils:Be,STANDARD_PLAYLIST_SELECTOR:Gi,INITIAL_PLAYLIST_SELECTOR:Xi,comparePlaylistBandwidth:Vi,comparePlaylistResolution:Ki,xhr:pe()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach(function(e){Object.defineProperty(cs,e,{get:function t(){i.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing");return Ti[e]},set:function t(r){i.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing");if(typeof r!=="number"||r<0){i.log.warn("value of Hls."+e+" must be greater than or equal to 0");return}Ti[e]=r}})});var ds="videojs-vhs";var fs=function e(t){var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;if(r.test(t)){return"hls"}var i=/^application\/dash\+xml/i;if(i.test(t)){return"dash"}return null};var hs=function e(t,r){var i=r.media();var n=-1;for(var a=0;a<t.length;a++){if(t[a].id===i.uri){n=a;break}}t.selectedIndex_=n;t.trigger({selectedIndex:n,type:"change"})};var ps=function e(t,r){r.representations().forEach(function(e){t.addQualityLevel(e)});hs(t,r.playlists)};cs.canPlaySource=function(){return i.log.warn("HLS is no longer a tech. Please remove it from "+"your player's techOrder.")};var vs=function e(t,r,n){if(!t){return t}var a=void 0;var s=void 0;if(n.mimeType_){a=r.mimeType_;s=n.mimeType_}else{var o=Pt(r.mimeType_);var l=o.parameters.codecs.split(",");var u=void 0;var c=void 0;l.forEach(function(e){e=e.trim();if(Ot(e)){u=e}else if(Dt(e)){c=e}});a=o.type+'; codecs="'+c+'"';s=o.type.replace("video","audio")+'; codecs="'+u+'"'}var d={};var f=r.playlist_;for(var h in t){d[h]={audioContentType:s,videoContentType:a};if(f.contentProtection&&f.contentProtection[h]&&f.contentProtection[h].pssh){d[h].pssh=f.contentProtection[h].pssh}if(typeof t[h]==="string"){d[h].url=t[h]}}return i.mergeOptions(t,d)};var ms=function e(t){var r=t.masterPlaylistController_.mainSegmentLoader_;var n=t.masterPlaylistController_.audioSegmentLoader_;var a=i.players[t.tech_.options_.playerId];if(a.eme){var s=vs(t.source_.keySystems,r,n);if(s){a.currentSource().keySystems=s;if(a.eme.initializeMediaKeys){a.eme.initializeMediaKeys()}}}};var gs=function t(){if(!e.localStorage){return null}var r=e.localStorage.getItem(ds);if(!r){return null}try{return JSON.parse(r)}catch(e){return null}};var ys=function t(r){if(!e.localStorage){return false}var n=gs();n=n?i.mergeOptions(n,r):r;try{e.localStorage.setItem(ds,JSON.stringify(n))}catch(e){return false}return n};cs.supportsNativeHls=function(){var e=u.createElement("video");if(!i.getTech("Html5").isSupported()){return false}var t=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return t.some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}();cs.supportsNativeDash=function(){if(!i.getTech("Html5").isSupported()){return false}return/maybe|probably/i.test(u.createElement("video").canPlayType("application/dash+xml"))}();cs.supportsTypeNatively=function(e){if(e==="hls"){return cs.supportsNativeHls}if(e==="dash"){return cs.supportsNativeDash}return false};cs.isSupported=function(){return i.log.warn("HLS is no longer a tech. Please remove it from "+"your player's techOrder.")};var _s=i.getComponent("Component");var bs=function(e){A(t,e);function t(e,r,n){E(this,t);var a=I(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,n.hls));if(r.options_&&r.options_.playerId){var s=i(r.options_.playerId);if(!s.hasOwnProperty("hls")){Object.defineProperty(s,"hls",{get:function e(){i.log.warn("player.hls is deprecated. Use player.tech().hls instead.");r.trigger({type:"usage",name:"hls-player-access"});return a},configurable:true})}s.vhs=a;s.dash=a;a.player_=s}a.tech_=r;a.source_=e;a.stats={};a.setOptions_();if(a.options_.overrideNative&&r.overrideNativeAudioTracks&&r.overrideNativeVideoTracks){r.overrideNativeAudioTracks(true);r.overrideNativeVideoTracks(true)}else if(a.options_.overrideNative&&(r.featuresNativeVideoTracks||r.featuresNativeAudioTracks)){throw new Error("Overriding native HLS requires emulated tracks. "+"See https://git.io/vMpjB")}a.on(u,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var t=u.fullscreenElement||u.webkitFullscreenElement||u.mozFullScreenElement||u.msFullscreenElement;if(t&&t.contains(a.tech_.el())){a.masterPlaylistController_.smoothQualityChange_()}});a.on(a.tech_,"seeking",function(){if(this.tech_.currentTime()===0&&this.tech_.player_.loop()){this.setCurrentTime(0)}});a.on(a.tech_,"error",function(){if(this.masterPlaylistController_){this.masterPlaylistController_.pauseLoading()}});a.on(a.tech_,"play",a.play);return a}w(t,[{key:"setOptions_",value:function e(){var t=this;this.options_.withCredentials=this.options_.withCredentials||false;this.options_.handleManifestRedirects=this.options_.handleManifestRedirects||false;this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions===false?false:true;this.options_.smoothQualityChange=this.options_.smoothQualityChange||false;this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage!=="undefined"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||false;this.options_.customTagParsers=this.options_.customTagParsers||[];this.options_.customTagMappers=this.options_.customTagMappers||[];this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||false;if(typeof this.options_.blacklistDuration!=="number"){this.options_.blacklistDuration=5*60}if(typeof this.options_.bandwidth!=="number"){if(this.options_.useBandwidthFromLocalStorage){var r=gs();if(r&&r.bandwidth){this.options_.bandwidth=r.bandwidth;this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})}if(r&&r.throughput){this.options_.throughput=r.throughput;this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"})}}}if(typeof this.options_.bandwidth!=="number"){this.options_.bandwidth=Ti.INITIAL_BANDWIDTH}this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Ti.INITIAL_BANDWIDTH;["withCredentials","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys"].forEach(function(e){if(typeof t.source_[e]!=="undefined"){t.options_[e]=t.source_[e]}});this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions}},{key:"src",value:function e(t,r){var n=this;if(!t){return}this.setOptions_();this.options_.url=this.source_.src;this.options_.tech=this.tech_;this.options_.externHls=cs;this.options_.sourceType=fs(r);this.options_.seekTo=function(e){n.tech_.setCurrentTime(e);n.setCurrentTime(e)};this.masterPlaylistController_=new es(this.options_);this.playbackWatcher_=new as(i.mergeOptions(this.options_,{seekable:function e(){return n.seekable()},media:function e(){return n.masterPlaylistController_.media()}}));this.masterPlaylistController_.on("error",function(){var e=i.players[n.tech_.options_.playerId];e.error(n.masterPlaylistController_.error)});this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):cs.STANDARD_PLAYLIST_SELECTOR.bind(this);this.masterPlaylistController_.selectInitialPlaylist=cs.INITIAL_PLAYLIST_SELECTOR.bind(this);this.playlists=this.masterPlaylistController_.masterPlaylistLoader_;this.mediaSource=this.masterPlaylistController_.mediaSource;Object.defineProperties(this,{selectPlaylist:{get:function e(){return this.masterPlaylistController_.selectPlaylist},set:function e(t){this.masterPlaylistController_.selectPlaylist=t.bind(this)}},throughput:{get:function e(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function e(t){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=t;this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function e(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function e(t){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=t;this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function e(){var t=1/(this.bandwidth||1);var r=void 0;if(this.throughput>0){r=1/this.throughput}else{r=0}var i=Math.floor(1/(t+r));return i},set:function e(){i.log.error('The "systemBandwidth" property is read-only')}}});if(this.options_.bandwidth){this.bandwidth=this.options_.bandwidth}if(this.options_.throughput){this.throughput=this.options_.throughput}Object.defineProperties(this.stats,{bandwidth:{get:function e(){return n.bandwidth||0},enumerable:true},mediaRequests:{get:function e(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:true},mediaRequestsAborted:{get:function e(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:true},mediaRequestsTimedout:{get:function e(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:true},mediaRequestsErrored:{get:function e(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:true},mediaTransferDuration:{get:function e(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:true},mediaBytesTransferred:{get:function e(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:true},mediaSecondsLoaded:{get:function e(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:true},buffered:{get:function e(){return it(n.tech_.buffered())},enumerable:true},currentTime:{get:function e(){return n.tech_.currentTime()},enumerable:true},currentSource:{get:function e(){return n.tech_.currentSource_},enumerable:true},currentTech:{get:function e(){return n.tech_.name_},enumerable:true},duration:{get:function e(){return n.tech_.duration()},enumerable:true},master:{get:function e(){return n.playlists.master},enumerable:true},playerDimensions:{get:function e(){return n.tech_.currentDimensions()},enumerable:true},seekable:{get:function e(){return it(n.tech_.seekable())},enumerable:true},timestamp:{get:function e(){return Date.now()},enumerable:true},videoPlaybackQuality:{get:function e(){return n.tech_.getVideoPlaybackQuality()},enumerable:true}});this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_));this.tech_.on("bandwidthupdate",function(){if(n.options_.useBandwidthFromLocalStorage){ys({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})}});this.masterPlaylistController_.on("selectedinitialmedia",function(){is(n);ms(n)});this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")});this.tech_.ready(function(){return n.setupQualityLevels_()});if(!this.tech_.el()){return}this.tech_.src(i.URL.createObjectURL(this.masterPlaylistController_.mediaSource))}},{key:"setupQualityLevels_",value:function e(){var t=this;var r=i.players[this.tech_.options_.playerId];if(r&&r.qualityLevels){this.qualityLevels_=r.qualityLevels();this.masterPlaylistController_.on("selectedinitialmedia",function(){ps(t.qualityLevels_,t)});this.playlists.on("mediachange",function(){hs(t.qualityLevels_,t.playlists)})}}},{key:"play",value:function e(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function e(t){this.masterPlaylistController_.setCurrentTime(t)}},{key:"duration",value:function e(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function e(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function e(){if(this.playbackWatcher_){this.playbackWatcher_.dispose()}if(this.masterPlaylistController_){this.masterPlaylistController_.dispose()}if(this.qualityLevels_){this.qualityLevels_.dispose()}if(this.player_){delete this.player_.vhs;delete this.player_.dash;delete this.player_.hls}if(this.tech_&&this.tech_.hls){delete this.tech_.hls}C(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}},{key:"convertToProgramTime",value:function e(t,r){return Ge({playlist:this.masterPlaylistController_.media(),time:t,callback:r})}},{key:"seekToProgramTime",value:function e(t,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:2;return Ye({programTime:t,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:r})}}]);return t}(_s);var Ts={name:"videojs-http-streaming",VERSION:us,canHandleSource:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=i.mergeOptions(i.options,r);return Ts.canPlayType(t.type,n)},handleSource:function e(t,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var a=i.mergeOptions(i.options,n);r.hls=new bs(t,r,a);r.hls.xhr=pe();r.hls.src(t.src,t.type);return r.hls},canPlayType:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=i.mergeOptions(i.options,r),a=n.hls.overrideNative;var s=fs(t);var o=s&&(!cs.supportsTypeNatively(s)||a);return o?"maybe":""}};if(typeof i.MediaSource==="undefined"||typeof i.URL==="undefined"){i.MediaSource=Kt;i.URL=zt}if(Kt.supportsNativeMediaSources()){i.getTech("Html5").registerSourceHandler(Ts,0)}i.HlsHandler=bs;i.HlsSourceHandler=Ts;i.Hls=cs;if(!i.use){i.registerComponent("Hls",cs)}i.options.hls=i.options.hls||{};if(i.registerPlugin){i.registerPlugin("reloadSourceOnError",ls)}else{i.plugin("reloadSourceOnError",ls)}r.LOCAL_STORAGE_KEY=ds;r.Hls=cs;r.HlsHandler=bs;r.HlsSourceHandler=Ts;r.emeKeySystems=vs;r.simpleTypeFromSourceType=fs;Object.defineProperty(r,"__esModule",{value:true})});(function(){if(l.getPlugin("perSourceBehaviors")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsPerSourceBehaviors=t(e.videojs)})(typeof self!=="undefined"?self:this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t="2.1.0";var r=e.getTech("Html5");var i=e.registerPlugin||e.plugin;var n=["abort","emptied","loadstart","play"];var a=["abort","emptied"];var s=["ad-playback","ads-ready?","postroll?","preroll?"];var o=function e(t){return s.indexOf(t)>-1};var l=function e(t){return t.usingPlugin("ads")&&typeof t.ads.inAdBreak==="function"};var u=function e(t,r){if(!t.usingPlugin("ads")){return false}if(l(t)){return t.ads.isInAdMode()&&r.type!=="loadstart"}return o(t.ads.state)};var c=function i(){var s=this;var o=[];var l;var c=false;var d;var f=true;var h=function t(r){return function(t,i){var n=this;if(this.perSourceBehaviors.disabled()){return}var a=arguments.length===2;var s=this.currentSrc();var l=[t];var u=e.bind(a?this:t,arguments[arguments.length-1]);var c=function e(){var t=n.currentSrc()!==s;if(n.perSourceBehaviors.disabled()){return}if(t||r){n.off.apply(n,l)}if(!t){u.apply(void 0,arguments)}};c.guid=u.guid;if(!a){l.push(i)}l.push(c);o.push(l);return this.on.apply(this,l)}};this.perSourceBehaviors={disable:e.bind(this,function e(){this.clearTimeout(d);d=null;c=true;return c}),disabled:function e(){return c},enable:function e(){c=false;return c},enabled:function e(){return!c},isSrcStable:function e(){return f},VERSION:t};this.onPerSrc=h();this.onePerSrc=h(true);this.on("dispose",function(){o.length=0});this.on(n,function(e){if(s.perSourceBehaviors.disabled()||d||u(s,e)){return}if(f&&a.indexOf(e.type)>-1){f=false;s.trigger("sourceunstable")}var t=[];var i=function e(r){return t.push({time:Date.now(),event:r})};i(e);s.on(r.Events,i);d=s.setTimeout(function(){var e=s.currentSrc();f=true;d=null;s.off(r.Events,i);if(e&&e!==l){o.forEach(function(e){return s.off.apply(s,e)});o.length=0;s.trigger("sourcechanged",{interimEvents:t,from:l,to:e});l=e}},1)})};c.VERSION=t;i("perSourceBehaviors",c);return c})})();(function(){if(l.getPlugin("contextmenu")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsContextmenu=t(e.videojs)})(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t="2.0.2";var r=e.registerPlugin||e.plugin;var i={cancel:true,sensitivity:10,wait:500,disabled:false};var n="vjs-contextmenu";function a(e,t){if(e.contextmenu.options.disabled){return e}var r={target:e,type:n};["clientX","clientY","pageX","pageY","screenX","screenY"].forEach(function(e){r[e]=t[e]});return e.trigger(r)}function s(e){var t=this.contextmenu.current;if(!t){return}var r=this.contextmenu.options.wait;if(e.type==="touchend"&&Number(new Date)-t.time>=r){a(this,e)}this.contextmenu.current=null}function o(e){var t=this.contextmenu.current;if(!t){return}var r=e.touches[0];var i=this.contextmenu.options.sensitivity;if(r.screenX-t.screenX>i||r.screenY-t.screenY>i){this.contextmenu.current=null}}function l(e){if(this.contextmenu.current){return}var t=e.touches[0];this.contextmenu.current={screenX:t.screenX,screenY:t.screenY,time:Number(new Date)}}function u(e){if(this.contextmenu.options.cancel&&!this.contextmenu.options.disabled){e.preventDefault()}a(this,e);this.off(["touchcancel","touchend"],s);this.off("touchmove",o);this.off("touchstart",l)}function c(t){var r=this;this.contextmenu.options=e.mergeOptions(i,t);this.contextmenu.VERSION="__VERSION__";this.on("contextmenu",u);this.on(["touchcancel","touchend"],s);this.on("touchmove",o);this.on("touchstart",l);this.ready(function(){return r.addClass(n)})}r("contextmenu",c);c.VERSION=t;return c})})();(function(){if(l.getPlugin("contextmenuUI")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js"),require("global/document"),require("global/window")):typeof r==="function"&&r.amd?r(["video.js","global/document","global/window"],t):e.videojsContextmenuUi=t(e.videojs,e.document,e.window)})(this,function(e,t,r){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;function i(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var a=e.getComponent("MenuItem");var s=function(e){i(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;n.handleClick=function t(i){var n=this;e.prototype.handleClick.call(this);this.options_.listener();r.setTimeout(function(){n.player().contextmenuUI.menu.dispose()},1)};return t}(a);var o=e.getComponent("Menu");var l=e.dom||e;var u=function(t){i(a,t);function a(i,a){var o;o=t.call(this,i,a)||this;o.dispose=e.bind(n(o),o.dispose);a.content.forEach(function(t){var n=function e(){};if(typeof t.listener==="function"){n=t.listener}else if(typeof t.href==="string"){n=function e(){return r.open(t.href)}}o.addItem(new s(i,{label:t.label,listener:e.bind(i,n)}))});return o}var o=a.prototype;o.createEl=function e(){var r=t.prototype.createEl.call(this);l.addClass(r,"vjs-contextmenu-ui-menu");r.style.left=this.options_.position.left+"px";r.style.top=this.options_.position.top+"px";return r};return a}(o);function c(e){var i;if(e.getBoundingClientRect&&e.parentNode){i=e.getBoundingClientRect()}if(!i){return{left:0,top:0}}var n=t.documentElement;var a=t.body;var s=n.clientLeft||a.clientLeft||0;var o=r.pageXOffset||a.scrollLeft;var l=i.left+o-s;var u=n.clientTop||a.clientTop||0;var c=r.pageYOffset||a.scrollTop;var d=i.top+c-u;return{left:Math.round(l),top:Math.round(d)}}function d(e,t){var r={};var i=c(e);var n=e.offsetWidth;var a=e.offsetHeight;var s=i.top;var o=i.left;var l=t.pageY;var u=t.pageX;if(t.changedTouches){u=t.changedTouches[0].pageX;l=t.changedTouches[0].pageY}r.y=Math.max(0,Math.min(1,(s-l+a)/a));r.x=Math.max(0,Math.min(1,(u-o)/n));return r}var f="5.2.0";function h(e){return e.hasOwnProperty("contextmenuUI")&&e.contextmenuUI.hasOwnProperty("menu")&&e.contextmenuUI.menu.el()}function p(e){var t=e.tagName.toLowerCase();return t==="input"||t==="textarea"}function v(e,t){return{left:Math.round(t.width*e.x),top:Math.round(t.height-t.height*e.y)}}function m(r){var i=this;if(h(this)){this.contextmenuUI.menu.dispose();return}if(this.contextmenuUI.options_.excludeElements(r.target)){return}var n=d(this.el(),r);var a=this.el().getBoundingClientRect();var s=v(n,a);var o=e.browser.IS_FIREFOX?t.documentElement:t;r.preventDefault();var l=this.contextmenuUI.menu=new u(this,{content:this.contextmenuUI.content,position:s});this.contextmenuUI.closeMenu=function(){e.log.warn("player.contextmenuUI.closeMenu() is deprecated, please use player.contextmenuUI.menu.dispose() instead!");l.dispose()};l.on("dispose",function(){e.off(o,["click","tap"],l.dispose);i.removeChild(l);delete i.contextmenuUI.menu});this.addChild(l);var c=l.el_.getBoundingClientRect();var f=t.body.getBoundingClientRect();if(this.contextmenuUI.keepInside||c.right>f.width||c.bottom>f.height){l.el_.style.left=Math.floor(Math.min(s.left,this.player_.currentWidth()-l.currentWidth()))+"px";l.el_.style.top=Math.floor(Math.min(s.top,this.player_.currentHeight()-l.currentHeight()))+"px"}e.on(o,["click","tap"],l.dispose)}function g(t){var r=this;var i={keepInside:true,excludeElements:p};t=e.mergeOptions(i,t);if(!Array.isArray(t.content)){throw new Error('"content" required')}if(h(this)){this.contextmenuUI.menu.dispose();this.off("contextmenu",this.contextmenuUI.onContextMenu);delete this.contextmenuUI}var n=this.contextmenuUI=function(){g.apply(this,arguments)};n.onContextMenu=e.bind(this,m);n.content=t.content;n.keepInside=t.keepInside;n.options_=t;n.VERSION=f;this.on("contextmenu",n.onContextMenu);this.ready(function(){return r.addClass("vjs-contextmenu-ui")})}e.registerPlugin("contextmenuUI",g);g.VERSION=f;return g})})();(function(){if(l.getPlugin("playerInfo")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsPlayerInfo=t(e.videojs)})(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;var r="1.3.0";var i=typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var n;if(typeof e!=="undefined"){n=e}else if(typeof i!=="undefined"){n=i}else if(typeof self!=="undefined"){n=self}else{n={}}var a=n;var s=function(){function e(e){this.value=e}function t(t){var r,i;function n(e,t){return new Promise(function(n,s){var o={key:e,arg:t,resolve:n,reject:s,next:null};if(i){i=i.next=o}else{r=i=o;a(e,t)}})}function a(r,i){try{var n=t[r](i);var o=n.value;if(o instanceof e){Promise.resolve(o.value).then(function(e){a("next",e)},function(e){a("throw",e)})}else{s(n.done?"return":"normal",n.value)}}catch(e){s("throw",e)}}function s(e,t){switch(e){case"return":r.resolve({value:t,done:true});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:false});break}r=r.next;if(r){a(r.key,r.arg)}else{i=null}}this._invoke=n;if(typeof t.return!=="function"){this.return=undefined}}if(typeof Symbol==="function"&&Symbol.asyncIterator){t.prototype[Symbol.asyncIterator]=function(){return this}}t.prototype.next=function(e){return this._invoke("next",e)};t.prototype.throw=function(e){return this._invoke("throw",e)};t.prototype.return=function(e){return this._invoke("return",e)};return{wrap:function(e){return function(){return new t(e.apply(this,arguments))}},await:function(t){return new e(t)}}}();var o=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var l=function(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t};var u=function(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e};var c="unknown";var d=t.getComponent("ModalDialog");var f=t.getComponent("Player");var h=t.dom||t;function p(e,t,r){var i=e;var n=t.split(".");if(!i){return r}for(var a=0;a<n.length;a++){var s=n[a];if(i[s]===undefined){return r}if(a+1<n.length){i=i[s]}else{return i[s]}}}var v={adonly:"Ad-Only",bcPlaylistUi:"Brightcove Playlist UI",chromecastReceiver:"Chromecast Receiver",customEndscreen:"Custom Endscreen",dash:"DASH",eme:"DRM",dvrux:"Live DVRUX",FreeWheelPlugin:"FreeWheel",ima3:"IMA3",onceux:"OnceUX",pip:"Picture-in-Picture",qualityMenu:"Quality Menu",social:"Social",ssai:"SSAI",vr:"VR"};var m=function e(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++){r[i]=arguments[i]}return"<tr>"+r.map(function(e){return"<td>"+e+"</td>"}).join("")+"</tr>"};var g=function(e){l(r,e);function r(){o(this,r);return u(this,e.apply(this,arguments))}r.prototype.buildCSSClass=function t(){return"vjs-player-info-modal "+e.prototype.buildCSSClass.call(this)};r.prototype.dataForPlugins_=function e(){var r=this;return Object.keys(v).filter(function(e){return t.getPlugin?t.getPlugin(e):typeof f.prototype[e]==="function"}).map(function(e){var i=r.player();return{active:i.usingPlugin?i.usingPlugin(e):c,displayName:v[e]||e,version:t.getPluginVersion?t.getPluginVersion(e):p(i,e+".VERSION",c)}})};r.prototype.dataForSource_=function e(){var t=this.player();var r=t.tech_.hls,i=t.mediainfo;var n=p(r,"playlists",{media:function e(){}});var a=n.media();return{mediainfo:i,hls:{bandwidth:p(r,"stats.bandwidth",c),mediaBytesTransferred:p(r,"stats.mediaBytesTransferred",c),mediaTransferDuration:p(r,"stats.mediaTransferDuration",c),mediaRequests:p(r,"stats.mediaRequests",c),rendition:a&&{height:p(a,"attributes.RESOLUTION.height",c),width:p(a,"attributes.RESOLUTION.width",c)}},tech:t.techName_,type:t.currentType()}};r.prototype.data=function e(){var t=this.player();var r=h.getAttributes(t.el());var i=p(t,"bcinfo.accountId",p(r,"data-account",c));var n=p(t,"bcinfo.playerId",p(r,"data-player",c));var s=p(t,"bcinfo.embedId",p(r,"data-embed",c));var o=p(t,"bcinfo.applicationId",p(r,"data-application-id",""));var l=p(a,"bc."+n+"_"+s+".VERSION",p(a,"bc.VERSION",c));var u=p(a,"bc."+n+"_"+s+".videojs.VERSION",p(a,"videojs.VERSION",c));return{player:{accountId:i,playerId:n,embedId:s,applicationId:o,playerVersion:l,videojsVersion:u},plugins:this.dataForPlugins_(),source:this.dataForSource_()}};r.prototype.contentForPlugins_=function e(t){var r=this;var i=('\n      <tr>\n        <td colspan="3">'+this.localize("No plugins available.")+"</td>\n      </tr>\n    ").trim();if(t.plugins.length){i=t.plugins.map(function(e){return m(e.displayName,e.version,e.active?r.localize("yes"):r.localize("no"))}).join("")}return("\n      <table>\n        <thead>\n          <tr>\n            <th>"+this.localize("Name")+"</th>\n            <th>"+this.localize("Version")+"</th>\n            <th>"+this.localize("Active")+"</th>\n          </tr>\n        </thead>\n        <tbody>"+i+"</tbody>\n      </table>\n    ").trim()};r.prototype.contentForSource_=function e(t){var r=["<table><tbody>",m(this.localize("Current Playback Tech"),t.source.tech),m(this.localize("Current Media Type"),t.source.type)];if(t.source.mediainfo){r.push(m(this.localize("Video Name"),t.source.mediainfo.name),m(this.localize("Video ID"),t.source.mediainfo.id))}if(t.source.hls){r.push(m(this.localize("Current Bandwidth"),t.source.hls.bandwidth),m(this.localize("Media Bytes Transferred"),t.source.hls.mediaBytesTransferred),m(this.localize("Media Requests"),t.source.hls.mediaRequests),m(this.localize("Media Transfer Duration"),t.source.hls.mediaTransferDuration));if(t.source.hls.rendition){r.push(m(this.localize("Rendition Width"),t.source.hls.rendition.width),m(this.localize("Rendition Height"),t.source.hls.rendition.height))}}return r.concat("</tbody></table>").join("")};r.prototype.content=function e(){var t=this.data();return[h.createEl("h1",{innerHTML:this.localize("Player Information")}),h.createEl("div",{className:"vjs-pi-section vjs-pi-section--player",innerHTML:["<h2>"+this.localize("General")+"</h2>","<table><tbody>",m(this.localize("Brightcove Player Version"),t.player.playerVersion),m(this.localize("Video.js Version"),t.player.videojsVersion),m(this.localize("Account ID"),t.player.accountId),m(this.localize("Player ID"),t.player.playerId),m(this.localize("Embed ID"),t.player.embedId),m(this.localize("Application ID"),t.player.applicationId),"</tbody></table>"].join("")}),h.createEl("div",{className:"vjs-pi-section vjs-pi-section--plugins",innerHTML:["<h2>"+this.localize("Plugins")+"</h2>",this.contentForPlugins_(t)].join("")}),h.createEl("div",{className:"vjs-pi-section vjs-pi-section--source",innerHTML:["<h2>"+this.localize("Source")+"</h2>",this.contentForSource_(t)].join("")})]};return r}(d);t.registerComponent("PlayerInfoModal",g);var y=t.registerPlugin||t.plugin;function _(){var e=this;if(this.playerInfo.modal){this.playerInfo.modal.dispose()}this.playerInfo=function(){_.apply(this,arguments)};this.ready(function(){e.addClass("vjs-player-info");e.playerInfo.modal=e.addChild("playerInfoModal",{fillAlways:true,label:e.localize("Player Information Dialog"),temporary:false});e.playerInfo.modal.on("dispose",function(){delete e.playerInfo})})}y("playerInfo",_);_.VERSION=r;return _})})();(function(){if(l.getPlugin("bcAnalytics")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("global/window"),require("global/document"),require("video.js"),require("@brightcove/loscore")):typeof r==="function"&&r.amd?r(["global/window","global/document","video.js","@brightcove/loscore"],t):(e=e||self,e.videojsBcAnalytics=t(e.window,e.document,e.videojs,e.videojs.bc_))})(this,function(e,t,r,i){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;i=i&&i.hasOwnProperty("default")?i["default"]:i;var n=function(e,t,r){if(r===void 0){r={}}t.forEach(function(t){if(e[t]!==undefined){r[t]=e[t]}});return r};var a=function e(t,n){if(n===void 0){n=[]}var a={};Object.keys(t).forEach(function(s){var o=t[s];n.push(s);if(i.isObj(o)){a=r.mergeOptions(a,e(o,n))}else{a[n.join(".")]=o}n.pop()});return a};var s=function e(t){return t.charAt(0).toUpperCase()+t.slice(1)};var o=function e(t,r){return t+"x"+r};var l={memory:["jsHeapSizeLimit","usedJSHeapSize","totalJSHeapSize"],navigation:["redirectCount","type","directedMigration"],timing:["loadEventEnd","loadEventStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","responseEnd","responseStart","requestStart","secureConnectionStart","connectEnd","connectStart","domainLookupEnd","domainLookupStart","fetchStart","redirectEnd","redirectStart","unloadEventEnd","unloadEventStart","navigationStart"]};var u={bitrate:"bitrates",event:"events"};var c=function(){function t(){this.data_={bitrates:{bitrates:[],playlists:[],rendered:[],throughput:[]},events:[],mr:0,performance:{},content:{},player:{dimensions:[],pixelratio:[],screendimensions:[]},frames:{}}}var c=t.prototype;c.keys=function e(){return Object.keys(this.data_)};c.append=function e(t){t=u.hasOwnProperty(t)?u[t]:t;if(!this.data_.hasOwnProperty(t)){throw new Error('"'+t+'" is not a known QosBuffer key')}for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++){i[n-1]=arguments[n]}this["append"+s(t)+"_"].apply(this,i)};c.flush=function e(){var t=this;for(var n=arguments.length,a=new Array(n),o=0;o<n;o++){a[o]=arguments[o]}if(!a.length){a=this.keys()}for(var l=0;l<a.length;l++){if(!this.data_.hasOwnProperty(a[l])){throw new Error('"'+a[l]+'" is not a known QosBuffer key')}}var u=a.map(function(e){return t["flush"+s(e)+"_"]()});var c=r.mergeOptions.apply(r,u);var d=i.qs().stringify(c).length;if(d>3e3&&c["qos.bitrates"]){c["qos.bitrates"]=JSON.stringify({bitrates:[],playlists:[],rendered:[],throughput:[]})}return c};c.appendBitrates_=function e(t){var r=this;if(typeof t.playlists!=="undefined"){this.data_.bitrates.playlists.push([Date.now(),t.bitrates,t.playlists]);delete t.bitrates;delete t.playlists}Object.keys(t).forEach(function(e){r.data_.bitrates[e].push([Date.now(),t[e]])})};c.appendMr_=function e(t){this.data_.mr=t?1:null};c.appendPerformance_=function t(r){var a=this;var s=e.performance;if(i.isNil(s)){return}Object.keys(l).forEach(function(e){if(!i.isNil(s[e])){a.data_.performance[e]=n(s[e],l[e])}});if(i.isFn(s.measure)){["bcParse","bcInit"].forEach(function(e){s.getEntriesByName(e,"measure").forEach(function(t){a.data_.performance[e]=t.duration})})}if(this.data_.performance.navigation){this.data_.performance.navigation.directedMigration=r?i.qs().parse(r).directedMigration==="true":false}};c.appendFrames_=function e(t){this.data_.frames={dropped:t.droppedVideoFrames,corrupted:t.corruptedVideoFrames,total:t.totalVideoFrames}};c.appendPlayer_=function t(r,i){if(i===void 0){i=Date.now()}this.data_.player.dimensions.push([i,o(r.width,r.height),o(r.computedWidth,r.computedHeight)]);this.data_.player.pixelratio.push([i,e.devicePixelRatio]);this.data_.player.screendimensions.push([i,o(e.screen.width,e.screen.height)])};c.appendEvents_=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}this.data_.events.push({type:r.join("."),time:Date.now()})};c.appendContent_=function e(t){this.data_.content={sourceMimeType:t.sourceMimeType}};c.flushBitrates_=function e(){var t=this.data_.bitrates;var r={};if(t.bitrates.length||t.playlists.length||t.rendered.length||t.throughput.length){r["qos.bitrates"]=JSON.stringify(t)}t.bitrates.length=0;t.playlists.length=0;t.rendered.length=0;t.throughput.length=0;return r};c.flushEvents_=function e(){var t=this.data_.events;var r={};t.forEach(function(e){var t=e.time,i=e.type;var n="qos.events."+i;if(Array.isArray(r[n])){r[n].push(t)}else if(r.hasOwnProperty(n)){r[n]=[r[n],t]}else{r[n]=t}});Object.keys(r).forEach(function(e){if(Array.isArray(r[e])){r[e]=JSON.stringify(r[e])}});t.length=0;return r};c.flushMr_=function e(){return{"qos.mr":this.data_.mr}};c.flushFrames_=function e(){var t=a(this.data_.frames,["qos","frames"]);this.data_.frames={};return t};c.flushPerformance_=function e(){return a(this.data_.performance,["qos","performance"])};c.flushPlayer_=function e(){var t=this.data_.player;var r={};Object.keys(t).forEach(function(e){var i=t[e];if(i.length){r["qos.player."+e]=JSON.stringify(i);i.length=0}});return r};c.flushContent_=function e(){return a(this.data_.content,["qos","content"])};return t}();var d=["ad-playback","ads-ready?","postroll?","preroll?"];var f=function e(t){return t.usingPlugin("ads")?t.ads.state:undefined};var h=function e(t){return t.usingPlugin("ads")&&!!t.adonly};var p=function e(t){return d.indexOf(t)>-1};var v=function e(t){return t.usingPlugin("ads")&&i.isFn(t.ads.inAdBreak)};var m=function e(t){if(!t.usingPlugin("ads")){return false}if(h(t)){return true}if(v(t)){return t.ads.isInAdMode()}return p(t.ads.state)};var g=function e(t,r){if(v(r)&&t&&t.type==="loadstart"){return true}return!m(r)};var y=function e(t){var r={};if(t.ima3){var a=t.ima3.currentAdEventInfo;r.plugin="ima3";if(i.isFn(t.ima3)){return r}r.pluginVersion=t.ima3.VERSION||t.ima3.version;r.adTech=t.ima3.adTech;r.requestMode=t.ima3.settings.requestMode;r.timeout=t.ima3.settings.timeout;if(a){n(a,["adType","adPodLength","adPodId","creativeFormat","creativeLength","creativeId","creativeIndex","creativeUrl","advertiserName","wrapperCreativeIds","dealId","surveyUrl","adId","adTitle","adSystem","adIsciId","creativeAdId"],r);var s=a.creativeIndex;if(s&&s.length){r.firstPlayedAdIndex=s[0]}r.startedInAdPod=a.started;r.completedInAdPod=a.completed}}else if(t.FreeWheelPlugin){r.plugin="freewheel";if(i.isFn(t.FreeWheelPlugin)){return r}r.pluginVersion=t.FreeWheelPlugin.VERSION||t.FreeWheelPlugin.getVersion()}return r};var _=function e(t){t.adBreakIndex=null;t.hasAdBreakStarted=false;t["ads-request"]=null;t["ads-response-received"]=null;t["ads-loading"]=[];t["ads-ad-started"]=[];t["ads-ad-ended"]=[]};var b=function e(){var t={};_(t);return t};var T=function e(t,r,i){var n=t.currentAdSequence_;var a=["ads-loading","ads-ad-started","ads-ad-ended"];if(r==="ads-request"){_(n)}else if(r==="adstart"||r==="ads-loading"){if(!n.hasAdBreakStarted){if(n.adBreakIndex===null){n.adBreakIndex=0}else{n.adBreakIndex++}n.hasAdBreakStarted=true;a.forEach(function(e){n[e].push([])})}}else if(r==="adend"){n.hasAdBreakStarted=false}if(a.indexOf(r)>-1){n[r][n.adBreakIndex].push(i)}else if(r==="ads-request"||r==="ads-response-received"){n[r]=i}};var S="sendBeacon"in e.navigator;var k=e.Set;var j="lbu";var E=4e3;var w=new k;["account","domain","event","player"].forEach(function(e){return w.add(e)});var C=new k;["account","catalog_url","destination","domain","dropped_frames","error_code","event","file_size_bytes","forward_buffer_seconds","load_time_ms","measured_bps","platform","platform_version","player","player_height","player_name","player_width","range","rebuffering_count","rebuffering_seconds","rendition_height","rendition_indicated_bps","rendition_mime_type","rendition_url","rendition_width","response_time_ms","session","start_time_ms","source","time","video","video_duration","video_name","video_seconds_viewed"].forEach(function(e){return C.add(e)});var A=function e(t,r){return Math.floor(t)+".."+(Math.floor(r)-1)};var I=function e(t){var r=2166136261;var i=r;for(var n=0;n<t.length;++n){i^=t.charCodeAt(n);i*=16777619}return i>>>0};var x=function e(t,r){var n=i.qs();Object.keys(r).forEach(function(e){if(i.isNil(r[e])){delete r[e]}});var a=t+"?"+n.stringify(r);if(a.length<=E){return a}Object.keys(r).forEach(function(e){if(!C.has(e)){delete r[e]}});r.usage=j;return t+"?"+n.stringify(r)};var P=function e(t,r,i,n,a){var s=r-t;if(a!==undefined&&a<r){s-=a-t}else if(i!==undefined&&n!==undefined){if(i<t){i=t}if(n>r){n=r}s-=n-i}return s};var O=function e(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++){n[a-1]=arguments[a]}var s=r.mergeOptions.apply(r,[t.params||{}].concat(n));delete t.params;return s};var D=function e(t,r){var n=t.mediainfo;var a=n&&n.duration||t.duration();if(n){if(r.video===undefined){r.video=n.id}if(r.video_name===undefined){r.video_name=n.name}}if(i.isNum(a)&&r.video_duration===undefined){r.video_duration=Math.floor(a);if(r.video_duration<1||r.video_duration===Infinity){r.video_duration=null}}return r};var L=function e(t,r){var i=t.preload();if(typeof i!=="string"){i=t.el().getAttribute("preload")}if(typeof i==="string"&&i.length===0){i="auto"}if(i){r.preload=i}};var R=function(){function a(e,t,r,i){if(i===void 0){i={}}this.baseUrl_=r;this.logger_=i.logger;this.history_=t;this.currentAdSequence_=b();this.player_=e;this.metrics_=[];this.eventCount_=0;this.streamCount_=-1;this.user(i.user||null);this.defaultParams_={domain:"videocloud",platform:"video-js",session:""};for(var n=0;n<3;n++){this.defaultParams_.session+=(Math.random()*4294967295>>>0).toString(16)}this.qos=new c(this);this.resetTimesOf()}var s=a.prototype;s.logger=function e(){if(this.logger_);};s.metrics=function e(){return this.metrics_.map(r.mergeOptions)};s.resetTimesOf=function e(){this.timeOfImpression=null;this.timeOfView=null};s.defaultParams=function e(t){if(t){t=i.isFn(t)?t():t;this.defaultParams_=r.mergeOptions(this.defaultParams_,t)}return this.defaultParams_};s.getSession=function e(){return this.defaultParams_.session};s.user=function e(t){if(t===null||i.isNonEmptyStr(t)||i.isNum(t)){this.user_=t}return this.user_};s.send=function n(a,s){var o;if(a===void 0){a={}}if(s===void 0){s={}}if(this.user()){a.user=I(this.user())}if(i.isNil(a.time)){a.time=Date.now()}s.qos=Array.isArray(s.qos)?s.qos:[];s.qos.push("mr");a=r.mergeOptions(this.defaultParams_,a,(o=this.qos).flush.apply(o,s.qos));a.seq=""+this.eventCount_;this.eventCount_++;if("streamCount"in s){a.seq+="_"+s.streamCount}w.forEach(function(e){if(i.isNil(a[e])){throw new Error('the "'+e+'" param is required')}});var l=x(this.baseUrl_,a);if(s.useSendBeaconOnly){if(S){e.navigator.sendBeacon(l)}else{return null}}else{var u=t.createElement("img");u.src=l}this.metrics_.push(a);this.player_.trigger({params:a,type:"analytics_request"});this.player_.trigger({params:a,type:"analytics_request_"+a.event});return{params:a,url:l}};s.sendCatalog_=function e(t,r){if(r===void 0){r={}}var i=r,n=i.error,a=i.xhr;if(a){var s=["BCOV-Debug-Cache-Stats","BCOV-instance","X-Cache","Via","X-Amz-Cf-Id"];s.forEach(function(e){t[e]=a.getResponseHeader(e)});if(n){n.status=a.status}}if(n){t.error=JSON.stringify(n)}return this.send(t,r)};s.sendVideoImpression=function e(t){if(t===void 0){t={}}var n=O(t,{event:"video_impression"});var a=y(this.player_);if(Object.keys(a).length>0){n.web_ad_info=JSON.stringify(a)}var s=i.isNonEmptyStr(this.player_.currentSrc());if(!s||this.timeOfImpression){return null}if(r.bc_.isNonEmptyStr(this.player_.currentType())){this.qos.append("content",{sourceMimeType:this.player_.currentType()});t.qos=t.qos||["content"]}this.streamCount_++;t.streamCount=this.streamCount_;D(this.player_,n);n.autoplay=this.player_.autoplay();L(this.player_,n);var o=this.send(n,t);if(o){this.timeOfImpression=Number(o.params.time)}return o};s.sendVideoView=function e(t){if(t===void 0){t={}}var r=O(t,{event:"video_view"});var n=i.isNonEmptyStr(this.player_.currentSrc());if(!n||this.timeOfView||!this.timeOfImpression){return null}var a=this.history_;var s=a.first("canplay");var o=a.first("loadstart");var l=a.first("play");if(s){r.load_time_ms=s-this.timeOfImpression}r.start_time_ms=P(l||o,r.time,a.first("adstart",true),a.first("adend",true),a.first("adtimeout",true));D(this.player_,r);t.streamCount=this.streamCount_;var u=this.send(r,t);if(u){this.timeOfView=Number(u.params.time)}return u};s.sendVideoEngagement=function e(t,r,n){if(n===void 0){n={}}var a=O(n,{event:"video_engagement"});var s=r.buffered,o=r.duration,l=r.playbackEndTime,u=r.height,c=r.mediainfo,d=r.playbackRate,f=r.rebufferingCount,h=r.rendition,p=r.playbackStartTime,v=r.rangeStart,m=r.rangeEnd,g=r.stats,y=r.width;var _=l-p;n.qos=n.qos||["bitrates","events","player","frames"];t.length=t.end-t.start;a.player_height=u;a.player_width=y;a.video_duration=o;if(c){a.video=c.id;a.video_name=c.name}if(h){a.rendition_url=h.url;a.rendition_indicated_bps=h.indicatedBPS;a.rendition_mime_type=h.mimeType;a.rendition_height=h.height;a.rendition_width=h.width}if(g){if(!i.isNil(g.mediaRequests)){a.media_requests=g.mediaRequests}if(!i.isNil(g.mediaTransferDuration)){a.media_transfer_duration=g.mediaTransferDuration}if(!i.isNil(g.mediaBytesTransferred)){a.media_bytes_transferred=g.mediaBytesTransferred}if(!i.isNil(g.bandwidth)){a.measured_bps=g.bandwidth}}var b=_/d*1e3;var T=t.end-t.start;var S=100;var k=Math.floor((T-b)/S)*S/1e3;if(f>0){a.rebuffering_count=f}if(k>0){a.rebuffering_seconds=k}if(s){var j=0;for(var E=0;E<s.length;E++){var w=s.start(E);var C=s.end(E);if(l>=w&&l<=C){j=C-l;break}}a.forward_buffer_seconds=j}if(_<1&&!a.rebuffering_seconds){return null}var I=this.history_.filter(function(e){return e.name==="licenserequestattempted"&&e.time>=t.start&&e.time<t.end});if(I.length){a.license_request_attempts=I.length}D(this.player_,a);n.streamCount=this.streamCount_;if(a.video_duration===Infinity){a.video_seconds_viewed=Math.round(_);delete a.video_duration}else if(_>=1){a["qos.derived_range"]=A(p,l);a.range=v+".."+m}return this.send(a,n)};s.sendVideoComplete=function e(t){if(t===void 0){t={}}var r=O(t,{event:"video_complete"});D(this.player_,r);t.streamCount=this.streamCount_;return this.send(r,t)};s.sendError=function e(t){if(t===void 0){t={}}var r=this.player_.error();if(!r){return null}var n=O(t,{event:"error"});var a=i.isFn(this.player_.errors)&&i.isFn(this.player_.errors.getAll)&&this.player_.errors.getAll()||{unknown:{type:"MEDIA_ERR_UNKNOWN"}};if(r&&a.hasOwnProperty(String(r.code))){n.error_code=a[String(r.code)].type}else if(r.type!==undefined){n.error_code=r.type}else{n.error_code=a.unknown.type}D(this.player_,n);t.streamCount=this.streamCount_;return this.send(n,t)};s.sendCatalogRequest=function e(t,r){if(r===void 0){r={}}var i=O(r,{event:"catalog_request",url:t});return this.sendCatalog_(i,r)};s.sendCatalogRequestError=function e(t,r){if(r===void 0){r={}}var i=O(r,{event:"catalog_request_error",url:t});if(r.error){r.error=n(r.error,["code","message","type"])}return this.sendCatalog_(i,r)};s.sendCatalogResponse=function e(t,r){if(r===void 0){r={}}var i=O(r,{event:"catalog_response",url:t});i.time=Date.now();i.response_time_ms=i.time-this.history_.last("catalog_request");return this.sendCatalog_(i,r)};s.sendAdEnd=function e(t){if(t===void 0){t={}}var r=y(this.player_);var i=this.currentAdSequence_["ads-ad-started"];var n=this.currentAdSequence_.adBreakIndex;if(r.plugin!==undefined){if(r.adType==="preroll"&&i.length>0&&i[0].length>0){var a=this.history_.first("play",true);r.prerollDelay=i[0][0]-a;r.firstPlayInSession=a}r.adsRequest=this.currentAdSequence_["ads-request"];r.adsResponseReceived=this.currentAdSequence_["ads-response-received"];r.adsLoading=this.currentAdSequence_["ads-loading"][n];r.adsAdStarted=this.currentAdSequence_["ads-ad-started"][n];r.adsAdEnded=this.currentAdSequence_["ads-ad-ended"][n]}else{r.plugin="unknown"}var s={event:"ad_end",web_ad_info:JSON.stringify(r)};t.streamCount=this.streamCount_;return this.send(D(this.player_,O(t,s)),t)};s.sendAdHardTimeout=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(D(this.player_,O(t,{event:"ad_hard_timeout"})),t)};s.sendAdStart=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(D(this.player_,O(t,{event:"ad_start"})),t)};s.sendAdTimeout=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(D(this.player_,O(t,{event:"ad_timeout"})),t)};s.sendPlayRequest=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(D(this.player_,O(t,{event:"play_request"})),t)};s.sendPlayerInit=function e(t){if(t===void 0){t={}}return this.send(O(t,{event:"player_init"}),t)};s.sendPlayerLoad=function e(t){if(t===void 0){t={}}return this.send(O(t,{event:"player_load"}),t)};return a}();var U=function(e){var t=e.bcAnalyticsLogger&&e.bcAnalyticsLogger();var r=function e(){return t&&t.add.apply(t,arguments)};return r};function N(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var M=function e(t){return typeof t==="number"&&!isNaN(t)&&t>=0&&t<Infinity};var B=function e(t){return t.map(function(e){return Math.floor(e)}).reduce(function(e,t){var r=e[e.length-1];if(t!==r){e.push(t)}return e},[])};var F=function e(t){return t.reduce(function(e,t){var r=e[e.length-1];if(r){if(r.end+1===t){r.end=t}else{e.push({start:t,end:t})}}else{e.push({start:t,end:t})}return e},[])};var W=function e(t){return t.map(function(e){var t=e.start,r=e.end;var i=r-t;if(i>0){return{start:t,end:r-1,remainder:r}}return{start:t,end:r,remainder:r}})};var H=function e(t){var r=[];var i=t.shift()||{},n=i.start,a=i.end,s=i.remainder;while(M(n)&&M(a)&&M(s)&&n===a&&n===s){var o=t.shift()||{};n=o.start;a=o.end;s=o.remainder}if(t.length===0){r.push(s)}for(var l=0;l<t.length;l++){var u=t[l],c=u.start,d=u.end,f=u.remainder;for(var h=c;h<=(f||d);h++){r.push(h)}}return{start:n,end:a,remainders:r,ranges:t.length}};var q=function e(t){return H(W(F(B(t))))};var V=1;function K(){return V++}var z=[];var G=function e(t,r,i,n,a){if(a===void 0){a=true}var s=[].concat(i).sort();if(r!=="removeEventListener"){t.off(s,n)}else{s.forEach(function(e){t.removeEventListener(e,n)})}if(!a){return}var o=z.length;var l=function e(){var r=z[o];if(r.context===t&&(r.fn.guid===n.guid||r.fn===n)&&s.every(function(e,t){return r.events[t]})){z.splice(o,1);return"break"}};while(o--){var u=l();if(u==="break")break}};var Y=function e(){var t=z.length;while(t--){var r=z.shift(),i=r.context,n=r.mode,a=r.events,s=r.fn;var o="off";if(n==="addEventListener"){o="removeEventListener"}G(i,o,a,s,false)}};var X=function e(t,r,i,n){var a=[].concat(i).sort();var s={events:a,fn:n,mode:r,context:t};if(r==="one"||r==="onePerSrc"){s.fn=function(){var e="off";if(s.mode==="addEventListener"){e="removeEventListener"}G(s.context,e,s.events,s.fn);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}return n.apply(this,r)};if(!n.guid){n.guid=K()}s.fn.guid=n.guid}z.push(s);if(r==="addEventListener"){s.events.forEach(function(e){s.context.addEventListener(e,s.fn)})}else{s.context[s.mode](s.events,s.fn)}};var $=function e(){var t=z.slice(0);Y();t.forEach(function(e){var t=e.context,r=e.mode,i=e.events,n=e.fn;X(t,r,i,n)})};var J=1e4;var Q=function e(t){return Boolean(t.onceux&&t.onceux.currentTime&&t.onceux.timeline)};var Z=function(e){N(t,e);function t(t,r){var i;i=e.call(this)||this;i.player_=t;i.logger_=r;i.stateBySrc_={};i.lastStateRecord_=0;i.disposed_=false;return i}var i=t.prototype;i.logger=function e(){};i.stateBySrc=function e(t){if(t===void 0){t=this.player_.currentSrc()}if(!this.stateBySrc_.hasOwnProperty(t)){this.stateBySrc_[t]={buffered:null,duration:0,end:0,height:0,mediainfo:null,playbackRate:1,rebufferingCount:0,src:t,start:0,width:0,playbackStartTime:0,playbackEndTime:0,stats:null,rendition:null,videoPlaybackQuality:null,times:[]}}var r=this.player_.tech_&&this.player_.tech_.hls;this.stateBySrc_[t].stats=r&&r.stats||null;return this.stateBySrc_[t]};i.clearStateBySrc=function e(t){if(t===void 0){t=this.player_.currentSrc()}delete this.stateBySrc_[t]};i.recordState=function e(){var t=this.player_;var r=this.stateBySrc();r.mediainfo=t.mediainfo;r.playbackEndTime=t.currentTime();r.times.push(r.playbackEndTime);if(Q(t)){r.duration=t.onceux.timeline.contentDuration}else{r.duration=t.duration()}r.buffered=t.buffered();r.playbackRate=t.playbackRate()};i.isTracking=function e(){return!!this.timerId_};i.start=function e(t){var r=this;if(t===void 0){t={}}if(this.disposed_){return}var i=t,n=i.reason,a=i.src;if(!a){a=this.player_.currentSrc()}var s=this.stateBySrc(a);s.playbackStartTime=s.playbackEndTime=this.player_.currentTime();if(Q(this.player_)){s.duration=this.player_.onceux.timeline.contentDuration}else{s.duration=this.player_.duration()}s.rebufferingCount=0;this.player_.clearTimeout(this.timerId_);this.timerCreatedAt_=Date.now();this.timerId_=this.player_.setTimeout(function(){return r.stop({src:a,reason:"engagement timer fired"})},J);return this};i.prepareState_=function e(t){var i=this.player_;var n=this.stateBySrc(t);n.height=Math.round(i.currentHeight());n.width=Math.round(i.currentWidth());var a=i.tech_&&i.tech_.hls;if(a&&a.playlists&&a.playlists.media()){var s=a.playlists.media();var o=n.rendition={url:s.resolvedUri,mimeType:i.currentType()};if(s.attributes){o.indicatedBPS=s.attributes.BANDWIDTH;if(s.attributes.RESOLUTION){o.height=s.attributes.RESOLUTION.height;o.width=s.attributes.RESOLUTION.width}}}n.videoPlaybackQuality=i.getVideoPlaybackQuality();if(n.mediainfo){var l={};Object.keys(n.mediainfo).forEach(function(e){if(!/_/.test(e)){l[e]=n.mediainfo[e]}});n.mediainfo=l}n.times.push(i.currentTime());var u=q(n.times),c=u.start,d=u.end,f=u.remainders,h=u.ranges;n.times=f;return r.mergeOptions({rangeExtras:h,rangeStart:c,rangeEnd:d},n)};i.stop=function e(t){var r=this;if(t===void 0){t={}}if(!t.src){t.src=this.player_.currentSrc()}if(this.isTracking()){this.player_.clearTimeout(this.timerId_);this.timerId_=null;var i=this.stateBySrc(t.src);var n=(i.duration-i.playbackEndTime)*1e3;if(!this.player_.ended()&&n<1500){this.timerId_=true;X(this.player_,"one","ended",function(){r.recordState();r.stop({reason:"content ended after we delayed the engager"})});return this}t.state=this.prepareState_(t.src);t.period=t.period||{};t.period.start=t.period.start||this.timerCreatedAt_;t.period.end=t.period.end||Date.now();this.trigger({type:"engagement",engagement:t})}return this};i.dispose=function e(){this.disposed_=true;this.stop({ignoreAdState:true,reason:"player disposed"});this.off();return this};return t}(r.EventTarget);var ee=["progress","seeking","suspend","timeupdate"];var te=["seek","stable","unstable"];var re=["adend","adscanceled","adserror","adskip","adsready","adstart","adtimeout","contentplayback","contentupdate","nopostroll","nopreroll","readyforpreroll"];var ie=[].concat(r.getTech("Html5").Events);var ne=ie.filter(function(e){return ee.indexOf(e)===-1});var ae=["ads-request","ads-response-received","adstart","ads-loading","ads-ad-started","ads-ad-ended","adend"];var se=["NETWORK_EMPTY","NETWORK_IDLE","NETWORK_LOADING","NETWORK_NO_SOURCE"];var oe=["HAVE_NOTHING","HAVE_METADATA","HAVE_CURRENT_DATA","HAVE_FUTURE_DATA","HAVE_ENOUGH_DATA"];var le=function(){function e(e){this.logger_=e;this.events_=[]}var t=e.prototype;t.add=function e(t,i,n){if(i===void 0){i=Date.now()}var a=r.mergeOptions(n,{name:t,time:i});this.events_.push(a);return i};t.record=function e(t,r){var i=Date.now();this.add(t,i,{adState:f(r),isInAdState:m(r),networkState:se[r.networkState()],readyState:oe[r.readyState()]});return i};t.reset=function e(){this.events_.length=0};t.filter=function e(t){if(!i.isFn(t)){return this.events_.filter(function(e){return e.name===t})}return this.events_.filter(t)};t.map=function e(t){return this.events_.map(t)};t.names=function e(){return this.map(function(e){return e.name})};t.first=function e(t,r){for(var i=0;i<this.events_.length;i++){var n=this.events_[i];if(!r&&n.isInAdState){continue}if(n.name===t){return n.time}}};t.last=function e(t,r){var i=this.events_.length;while(i--){var n=this.events_[i];if(!r&&n.isInAdState){continue}if(n.name===t){return n.time}}};return e}();var ue=function(){function e(){this.log_={}}var t=e.prototype;t.put=function e(t){this.log_[t]=true};t.peek=function e(){return Object.keys(this.log_)};t.flush=function e(){var t=Object.keys(this.log_);this.log_={};return t};return e}();var ce="3.8.8";var de={production:"https://metrics.brightcove.com/v2/tracker",staging:"http://metrics.aws-qa.rnatest.brightcove.com/v2/tracker"};var fe=function e(t,r,n){Object.keys(n).forEach(function(e){r[e]=String(r[e]||"");if(e==="accountId"&&!i.isNonEmptyStr(r[e])){r[e]=String(r.account||"")}if(!i.isNonEmptyStr(r[e])){r[e]=t.getAttribute("data-"+n[e])||""}});return r};var he=function t(r,n){var a=fe(r.el(),n,{accountId:"account",applicationId:"application-id",embedId:"embed",playerId:"player",playerName:"name",usage:"usage"}),s=a.accountId,o=a.applicationId,l=a.embedId,u=a.playerId;if(!i.isNonEmptyStr(n.player)){if(e.location.hostname==="players.api.brightcove.com"){n.player="players.api.brightcove.com/"+u+"_"+l;return}n.player="players.brightcove.com/"+s+"/"+u+"_"+l;if(o){n.player+="/"+o}}if(o){if(i.isNonEmptyStr(n.playerName)){n.playerName+=" - "+o}else{n.playerName=o}}};var pe=function e(t){return{computedHeight:t.currentHeight(),computedWidth:t.currentWidth(),height:t.height(),width:t.width()}};var ve=function t(i){if(typeof i==="boolean"){r.log.warn("The __iframe__ option should only be used in tests!");return i}try{return e.parent!==e.self}catch(e){return true}};var me=function n(a){var s=this;if(a===void 0){a={}}var o=false;var l=false;var u={};a=r.mergeOptions(a);a.env=de.hasOwnProperty(a.env)?a.env:"production";he(this,a);var c=U(this);var d=new Z(this,c);var p=new le(c);var y=new ue;var _=i.isNonEmptyStr(a.usage)?a.usage.split(","):[];_.forEach(function(e){y.put(e)});var b=new R(this,p,i.isNonEmptyStr(a.analyticsUrl)?a.analyticsUrl:de[a.env],{logger:c,user:a.user});b.defaultParams(function(){var r={account:a.accountId||null,destination:e.location.href,platform_version:a.platformVersion,player:a.player,player_name:a.playerName,source:t.referrer};if(ve(a.__iframe__)){r.destination=t.referrer;if(i.isNonEmptyStr(a.referrer)){r.source=a.referrer}else{try{r.source=e.parent.document.referrer}catch(e){r.source=null}}}return r});X(this,"on","pluginsetup:ads",$);this.bcAnalytics={client:b,engager:d,history:p,settings:a,VERSION:ce};X(this,"on","usage",function(e){if(!e.name){return r.log.warn("Ignored usage event without a `name` parameter")}y.put(e.name)});var S=function e(){y.put("unload");d.stop({fromUnload:true,ignoreAdState:true,reason:"unload called"})};X(e,"addEventListener","unload",S);var k=function e(t){if(!g(t,s)){return}var r=p.first("loadstart",v(s));var i=p.first("play");var n=p.last("playing");if((i||n)&&!d.isTracking()&&!s.paused()){d.start({period:{start:i||n},reason:"workflow detected that it is playing"})}if(b.timeOfImpression&&b.timeOfView){return}u.workflow=u.workflow||s.setTimeout(function(){u.workflow=null;r=p.first("loadstart",v(s));i=p.first("play");n=p.last("playing");if((r||i)&&!b.timeOfImpression){b.sendVideoImpression({params:{time:Math.min(r||Infinity,i||Infinity)}})}if(r&&n&&!b.timeOfView){b.sendVideoView({params:{time:n}})}},1)};d.on("engagement",function(t){var r=t.engagement,i=r.fromUnload,n=r.ignoreAdState,a=r.period,o=r.state;var l=m(s);var u={useSendBeaconOnly:i,params:{time:a.end}};if(o.rangeExtras>=2){y.put("disco-engmnt")}var c=y.peek();if(c&&c.length){u.params.usage=c.map(e.encodeURIComponent).sort().join(",")}if(!l||n){b.qos.append("frames",o.videoPlaybackQuality);if(b.sendVideoEngagement(a,o,u)&&!s.paused()){if(l){return}y.flush();d.start({reason:"sent engagement and still playing"})}}});X(this,"on","dispose",function(){Y();y.put("disposed");d.dispose()});X(this,"on",ne.concat(re,te).concat("sourceunstable"),function(e){p.record(e.type,s)});X(this,"on",ne.concat("ads-ad-started"),function(e){b.qos.append("event",m(s)?"ad":"content",e.type)});X(this,"on",["loadedmetadata","resize"],function(){b.qos.append("player",pe(s))});X(this,"on","fullscreenchange",function(){var e=Date.now();u.fullscreen=s.setTimeout(function(){u.fullscreen=null;b.qos.append("player",pe(s),e)},500)});X(this,"on","mediachange",function(){if(s.tech_.hls){var e=s.tech_.hls.playlists.media();b.qos.append("bitrate",{bitrates:s.tech_.hls.bandwidth,playlists:e&&e.attributes&&e.attributes.BANDWIDTH})}});X(this,"on","ready",function(){X(s.tech_,"on","usage",function(e){if(!e.name){return r.log.warn("Ignored usage event without a `name` parameter")}y.put(e.name)});X(s.tech_,"on","bandwidthupdate",function(){b.qos.append("bitrate",{bitrates:s.tech_.hls.bandwidth,throughput:Math.round(s.tech_.hls.throughput)})});X(s.tech_,"on","liveresync",function(){s.trigger({type:"usage",name:"hls-live-resync"})});X(s.tech_,"on","videounderflow",function(){s.trigger({type:"usage",name:"hls-video-underflow"})});X(s.tech_,"on","licenserequestattempted",function(){p.add("licenserequestattempted")});X(s,"on","loadedmetadata",function(){var e=s.textTracks();for(var t=0;t<e.length;t++){if(e[t].label==="segment-metadata"){(function(){var r=e[t];var i=void 0;X(r,"addEventListener","cuechange",function(){var e=r.activeCues[0];if(e){var t=s.tech_.hls.playlists.master.playlists[e.value.playlist];if(i!==t.uri){i=t.uri;if(t.attributes&&t.attributes.BANDWIDTH){b.qos.append("bitrate",{rendered:t.attributes.BANDWIDTH})}}}})})()}}})});X(this,"on","waiting",function(e){if(!l&&!m(s)){d.stateBySrc().rebufferingCount++}});X(this,"on","sourcechanged",function(e,t){var r=t.interimEvents;var i=r[0].event;var n=function e(){if(!l&&!m(s)){d.recordState()}};if(t.from){d.stop({reason:"changing sources",period:{end:r[0].time},ignoreAdState:true,src:t.from});d.clearStateBySrc(t.from)}o=false;l=false;b.resetTimesOf();p.reset();r.forEach(function(e){return p.add(e.event.type,e.time)});k();X(s,"onPerSrc","timeupdate",n);X(s,"onePerSrc","sourceunstable",function(){if(f(s)==="content-resuming"){return}var e=s.currentSrc();d.stop({ignoreAdState:true,reason:"sourceunstable",src:e});if(!m(s)){G(s,"off","timeupdate",n)}});X(s,"onPerSrc",["loadstart","play","playing"],k);X(s,"onPerSrc",["pause","ratechange"],function(e){if(!l&&!m(s)&&!s.ended()){d.stop({reason:'saw "'+e.type+'"'});if(s.paused()){X(s,"onePerSrc","playing",function(){d.start({reason:"playback began after a pause"})})}else if(e.type==="ratechange"){u.ratechange=s.setTimeout(function(){u.ratechange=null;d.start({reason:"the playback rate changed"})},1)}}});X(s,"onPerSrc","unstable",function(){if(!l&&!m(s)){l=true;d.stop({reason:"seeking"})}});X(s,"onPerSrc","seek",function(){if(l&&!m(s)){l=false;d.start({reason:"stopped seeking"})}});X(s,"onePerSrc","adstart",function(){if(!h(s)){b.sendVideoImpression({params:{time:p.last("adstart",true)-100}})}});X(s,"onPerSrc","adstart",function(){o=s.ended();d.stop({ignoreAdState:true,period:{end:p.last("adstart",true)},reason:"saw adstart"})});X(s,"onePerSrc","adend",function(){if(!s.paused()&&!s.ended()){k()}});X(s,"onPerSrc","adend",function(){if(!o){d.start({reason:'saw "adend"'})}});X(s,"onePerSrc","ended",function(){d.stop({reason:"end of content"});b.sendVideoComplete()})});X(this,"on","catalog_request",function(e){p.record(e.type,s);b.sendCatalogRequest(e.url)});X(this,"on","catalog_request_error",function(e){p.record(e.type,s);b.sendCatalogRequestError(e.url,{error:e.error,xhr:e.response})});X(this,"on","catalog_response",function(e){p.record(e.type,s);b.sendCatalogResponse(e.url,{xhr:e.response})});X(this,"on","play",function(e){if(m(s)){return}var t={params:{time:Date.now()}};if(s.perSourceBehaviors.isSrcStable()){b.sendPlayRequest(t)}else{X(s,"one","sourcechanged",function(){b.sendPlayRequest(t)})}});X(this,"on","error",function(){if(!m(s)){b.sendError()}});X(this,"on","adstart",function(e){b.sendAdStart();u.perSrcDisable=s.setTimeout(function(){u.perSrcDisable=null;s.perSourceBehaviors.disable()},1)});X(this,"on","adend",function(e){b.sendAdEnd();if(u.perSrcDisable){s.clearTimeout(u.perSrcDisable)}else{s.perSourceBehaviors.enable()}});X(this,"on","adtimeout",function(){b.sendAdTimeout()});X(this,"on","ad-hard-timeout",function(){b.sendAdHardTimeout()});X(this,"on",ae,function(e){T(b,e.type,Date.now())});b.qos.append("mr",a.mr);b.sendPlayerInit();b.sendError();X(this,"on","ready",function(){b.defaultParams({feature:h(s)?"adonly":null});b.qos.append("performance",(e.location.href||"").split("?")[1]);b.qos.append("player",pe(s));if("hidden"in t&&"visibilityState"in t){if(t.hidden){s.trigger({type:"usage",name:"document-hidden"})}var r=function e(){s.trigger({type:"usage",name:"document-"+t.visibilityState})};X(t,"addEventListener","visibilitychange",r)}if(t.querySelector(".bc-iframe")){s.trigger({type:"usage",name:"iframe-embed"})}else{s.trigger({type:"usage",name:"inpage-embed"})}b.sendPlayerLoad({qos:b.qos.keys(),params:{usage:y.flush()}})})};me.VERSION=ce;if(r.registerPlugin){r.registerPlugin("bcAnalytics",me)}else{r.plugin("bcAnalytics",me)}return me})})();(function(){if(l.getPlugin("errors")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js"),require("global/document")):typeof r==="function"&&r.amd?r(["video.js","global/document"],t):e.videojsErrors=t(e.videojs,e.document)})(this,function(e,t){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;var r="4.2.0";var i=e.getComponent("Flash");var n=!e.browser.IS_IPHONE;var a=e.registerPlugin||e.plugin;var s={header:"",code:"",message:"",timeout:45*1e3,dismiss:n,errors:{1:{type:"MEDIA_ERR_ABORTED",headline:"The video download was cancelled"},2:{type:"MEDIA_ERR_NETWORK",headline:"The video connection was lost, please confirm you are "+"connected to the internet"},3:{type:"MEDIA_ERR_DECODE",headline:"The video is bad or in a format that cannot be played on your browser"},4:{type:"MEDIA_ERR_SRC_NOT_SUPPORTED",headline:"This video is either unavailable or not supported in this browser"},5:{type:"MEDIA_ERR_ENCRYPTED",headline:"The video you are trying to watch is encrypted and we do not know how "+"to decrypt it"},unknown:{type:"MEDIA_ERR_UNKNOWN",headline:"An unanticipated problem was encountered, check back soon and try again"},"-1":{type:"PLAYER_ERR_NO_SRC",headline:"No video has been loaded"},"-2":{type:"PLAYER_ERR_TIMEOUT",headline:"Could not download the video"},PLAYER_ERR_DOMAIN_RESTRICTED:{headline:"This video is restricted from playing on your current domain"},PLAYER_ERR_IP_RESTRICTED:{headline:"This video is restricted at your current IP address"},PLAYER_ERR_GEO_RESTRICTED:{headline:"This video is restricted from playing in your current geographic region"},FLASHLS_ERR_CROSS_DOMAIN:{headline:"The video could not be loaded: crossdomain access denied."}}};var o=function n(a,o){var l;var u;var c;var d=[];var f=function t(r){o.errors=e.mergeOptions(o.errors,r);Object.keys(o.errors).forEach(function(e){var t=o.errors[e];if(!t.type){t.type=e}})};f();var h=function e(){a.clearTimeout(u);if(c){c=false;a.removeClass("vjs-waiting")}u=a.setTimeout(function(){if(a.error()||a.paused()||a.ended()){return}c=true;a.addClass("vjs-waiting")},1e3);a.clearTimeout(l);l=a.setTimeout(function(){if(a.error()||a.paused()||a.ended()){return}a.error({code:-2,type:"PLAYER_ERR_TIMEOUT"})},o.timeout);if(a.error()&&a.error().code===-2){a.error(null)}};var p=function e(){var t;while(d.length){t=d.shift();a.off(t[0],t[1])}a.clearTimeout(l);a.clearTimeout(u)};var v=function e(t,r){var i=function e(){if(!a.error()){var t=a.$(".vjs-tech");if(t&&t.type==="application/x-shockwave-flash"&&!t.vjs_getProperty){a.error({code:-2,type:"PLAYER_ERR_TIMEOUT"});return}if(a.paused()){return h()}if(a.ended()){return h()}}r.call(this)};a.on(t,i);d.push([t,i])};var m=function e(){var t=0;p();h();v(["timeupdate","adtimeupdate"],function(){var e=a.currentTime();if(e!==t){t=e;h()}})};var g=function e(){if(!a.currentSrc()){a.error({code:-1,type:"PLAYER_ERR_NO_SRC"})}};var y=function r(){var n="";var s=a.error();var l=t.createElement("div");var u="";if(!s){return}s=e.mergeOptions(s,o.errors[s.code||s.type||0]);if(s.message){n='<div class="vjs-errors-details">'+a.localize("Technical details")+'\n        : <div class="vjs-errors-message">'+a.localize(s.message)+"</div>\n        </div>"}if(s.code===4&&i&&!i.isSupported()){var c=a.localize("If you are using an older browser please try upgrading or installing Flash.");n+='<span class="vjs-errors-flashmessage">'+c+"</span>"}var d=a.getChild("errorDisplay");l.className="vjs-errors-dialog";l.id="vjs-errors-dialog";u='<div class="vjs-errors-content-container">\n      <h2 class="vjs-errors-headline">'+this.localize(s.headline)+"</h2>\n        <div><b>"+this.localize("Error Code")+"</b>: "+(s.type||s.code)+"</div>\n        "+n+"\n      </div>";var f=d.closeable(!("dismiss"in s)||s.dismiss);if(f){u+='<div class="vjs-errors-ok-button-container">\n          <button class="vjs-errors-ok-button">'+this.localize("OK")+"</button>\n        </div>";l.innerHTML=u;d.fillWith(l);d.contentEl().firstChild.appendChild(d.getChild("closeButton").el());var h=d.el().querySelector(".vjs-errors-ok-button");a.on(h,"click",function(){d.close()})}else{l.innerHTML=u;d.fillWith(l)}if(a.currentWidth()<=600||a.currentHeight()<=250){d.addClass("vjs-xs")}d.one("modalclose",function(){return a.error(null)})};var _=function e(){p();a.removeClass("vjs-errors");a.off("play",m);a.off("play",g);a.off("dispose",e);a.off(["aderror","error"],y)};var b=function t(r){_();n(a,e.mergeOptions(s,r))};b.extend=function(e){return f(e)};b.getAll=function(){return e.mergeOptions(o.errors)};b.timeout=function(e){if(typeof e==="undefined"){return o.timeout}if(e!==o.timeout){o.timeout=e;if(!a.paused()){m()}}};b.disableProgress=function(){};a.on("play",m);a.on("play",g);a.on("dispose",_);a.on(["aderror","error"],y);a.ready(function(){a.addClass("vjs-errors")});if(!a.paused()){m()}b.VERSION=r;a.errors=b};var l=function t(r){o(this,e.mergeOptions(s,r))};["extend","getAll"].forEach(function(t){l[t]=function(){e.log.warn("The errors."+t+"() method is not available until the plugin has been initialized!")}});l.VERSION=r;a("errors",l);return l})})();(function(){if(l.getPlugin("catalog")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js"),require("@brightcove/loscore"),require("global/window"),require("global/document")):typeof r==="function"&&r.amd?r(["video.js","@brightcove/loscore","global/window","global/document"],t):e.videojsBcCatalog=t(e.videojs,e.videojs.bc_,e.window,e.document)})(this,function(e,t,r,i){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;i=i&&i.hasOwnProperty("default")?i["default"]:i;var n="3.30.0";var a="video";var s="playlist";var o="search";var l="lazySequence";var u="related";var c=[{attr:"data-video-id",query:"videoId",config:"videoId",type:a},{attr:"data-playlist-id",query:"playlistId",config:"playlistId",type:s},{attr:"data-catalog-search",query:"catalogSearch",config:"search",type:o},{attr:"data-catalog-sequence",query:"catalogSequence",config:"sequence",type:l}];var d=function e(t,r,i){for(var n=0;n<c.length;n++){var a=c[n];var o=a[t];if(r[o]){var l={id:r[o],type:a.type};if(l.type===s){l.playlistVideoId=i}return l}}};var f=function r(i,n,a){var s=n.options_;var u=Boolean(n.el().ownerDocument.querySelector(".bc-iframe"));var f=t.qs();a=a?f.parse(a):f.search;c.concat({query:"playlistVideoId"}).forEach(function(e){var t=e.query;if(Array.isArray(a[t])){a[t]=a[t].pop()}});if(c.filter(function(e){return!!i[e.config]}).length>1||c.filter(function(e){return!!s[e.attr]}).length>1){n.error({headline:"Bad Request: Multiple catalog media queries provided. Please only provide one",type:"PLAYER_ERR_CONFLICTING_DATA",code:-3,message:"Too many catalog media parameters were provided in this player. "+"Please use only one of the following: videoId, playlistId, catalogSequence, or catalogSearch."});return}var h=u&&d("query",a,a.playlistVideoId)||d("attr",s,s["data-playlist-video-id"]||a.playlistVideoId)||d("config",i,a.playlistVideoId||i.playlistVideoId);if(!h){return}if(typeof h.id==="string"&&(h.type===o||h.type===l)){var p=h.id;try{h.id=JSON.parse(p)}catch(t){if(h.type===l){e.log.error("sequence must be valid JSON or an object",t);return}}if(!t.isObj(h.id)&&!Array.isArray(h.id)){h.id=p}}["adConfigId","deliveryConfigId"].forEach(function(e){var r=i[e];if(!t.isNonEmptyStr(r)){return}if(t.isObj(h.id)){h.id[e]=r}else if(Array.isArray(h.id)){h.id.forEach(function(t){t[e]=r})}else{h[e]=i[e]}});return h};var h=function e(r){if(!t.isFn(r.errors)||!t.isFn(r.errors.extend)){return}r.errors.extend({VIDEO_CLOUD_ERR_ACCOUNT_NOT_FOUND:{headline:"The Video Cloud account was not found."},VIDEO_CLOUD_ERR_RESOURCE_NOT_FOUND:{headline:"The Video Cloud resource was not found."},VIDEO_CLOUD_ERR_VIDEO_NOT_FOUND:{headline:"The Video Cloud video was not found."},VIDEO_CLOUD_ERR_NOT_PLAYABLE:{headline:"The Video Cloud video is not playable."},VIDEO_CLOUD_ERR_AD_CONFIG_ID_NOT_FOUND:{headline:"The Video Cloud SSAI ad config id was not found."}})};var p={403:{ACCESS_DENIED:{DOMAIN:"PLAYER_ERR_DOMAIN_RESTRICTED",CLIENT_IP:"PLAYER_ERR_IP_RESTRICTED",CLIENT_GEO:"PLAYER_ERR_GEO_RESTRICTED"},VIDEO_NOT_PLAYABLE:"VIDEO_CLOUD_ERR_NOT_PLAYABLE"},404:{ACCOUNT_NOT_FOUND:"VIDEO_CLOUD_ERR_ACCOUNT_NOT_FOUND",RESOURCE_NOT_FOUND:"VIDEO_CLOUD_ERR_RESOURCE_NOT_FOUND",VIDEO_NOT_FOUND:"VIDEO_CLOUD_ERR_VIDEO_NOT_FOUND"},400:{AD_CONFIG_NOT_FOUND:"VIDEO_CLOUD_ERR_AD_CONFIG_ID_NOT_FOUND"}};var v=function e(r,i){var n=i.shift();if(t.isNonEmptyStr(r[n])){return r[n]}if(!n||!r[n]){return"unknown"}return e(r[n],i)};var m=function e(t,r){r=Array.isArray(r)?r[0]:r||{};return{code:v(p,[t,r.error_code,r.error_subcode])}};var g=function t(r,i,n){if(n.embedHasPoster){r.poster=i.options_.poster}if(n.embedHasSources){r.sources=i.options_.sources}if(n.embedHasTracks){r.textTracks=i.options_.tracks}if(r.textTracks&&r.textTracks.length>0&&e.browser.IS_ANY_SAFARI){i.$(".vjs-tech").setAttribute("crossorigin","anonymous")}return r};var y=function e(t,r){return function(e,i){if(e){e.data=i;t.catalog.error=e;t.error(m(e.status,i));return t.trigger("bc-catalog-error")}t.ready(function(){return t.catalog.load(r(i))})}};var _=function t(r,i,n){if(r===a){return y(i,function(e){return g(e,i,n)})}return y(i,function(t){var a=g({},i,n);if(Array.isArray(t.videos)){var o=t.videos[0]||{};t.videos[0]=e.mergeOptions(o,a,{rawItem:o})}else{t.videos=[a]}if(n.playlistVideoId&&r===s){for(var l=0;l<t.length;l++){if(t[l].id===n.playlistVideoId||"ref:"+t[l].referenceId===n.playlistVideoId){t.startingIndex=l;break}}}return t})};var b=function e(){return Number.MAX_SAFE_INTEGER||Math.pow(2,53)-2};var T=function e(t,r){var i=t.cuePoints;var n=i[r];var a;for(r++;r<i.length;r++){if(i[r].time>n.time){a=i[r];break}}var s=isFinite(t.duration)?t.duration:b();n.startTime=n.time;if(a&&a.time<s){n.endTime=a.time}else{n.endTime=s}return n};var S=function e(t){var r=t.remoteTextTracks();if(r){var i=r.length;while(i--){t.removeRemoteTextTrack(r[i])}}var n=t.textTracks();if(n){var a=n.length;while(a--){var s=n[a];if(s.kind==="metadata"&&s.cues){var o=s.cues.length;while(o--){s.removeCue(s.cues[o])}}s.mode="disabled"}}};var k=function e(t,i){S(t);if(!i.cuePoints){return}var n=t.mediaCuePointsTrack();var a=r.VTTCue||r.vttjs&&r.vttjs.VTTCue||r.TextTrackCue;for(var s=0;s<i.cuePoints.length;s++){var o=i.cuePoints[s];var l=new a(o.startTime,o.endTime,o.type);l.originalCuePoint=o;n.addCue(l)}n.mode="hidden"};var j=function e(t,r,i){var n=0;for(;n<t.length;n++){if(r(t[n])){return t[n]}}return i};function E(e){var t=E.windowLocationProtocol();var r=function e(r){return r.src&&r.src.indexOf(t)===0};if(e&&e.length&&e.length>0){return j(e,r,e[0]).src}}E.windowLocationProtocol=function(){return r.location.protocol};var w=function e(t){return r.encodeURIComponent(t)};var C=function e(r){var i={ad_config_id:"adConfigId",config_id:"deliveryConfigId"};var n=["ad_config_id","config_id","tveToken"];if(r.type!==a){n.push("limit");n.push("offset")}if(r.type===o){n.push("q");n.push("sort")}var s={};n.forEach(function(e){var t=i[e]||e;if(r[t]){s[e]=r[t]}});var l=t.qs().stringify(s);return l?"?"+l:""};var A=function e(t){var r=t.accountId,i=t.baseUrl,n=i===void 0?"https://edge.api.brightcove.com/playback/v1":i,a=t.type;if(n.slice(-1)==="/"){n=n.slice(0,-1)}var l;l=n+"/accounts/"+w(r)+"/"+(a===s?"playlists":"videos");if(a!==o){l+="/"+w(t.id)}if(a===u){l+="/related"}l+=C(t);return l};var I=function r(i,n,l){if(l===void 0){l=function e(){}}var c=n.accountId,d=n.deliveryConfigId,f=n.adConfigId,h=n.id,p=n.policyKey,v=n.q,m=n.type;if(!c||!p||!m){return l(new Error("accountId, policyKey, and type are required"))}if(m===o&&!v){return l(new Error("q is required when performing a search"))}else if(m!==o&&!h){return l(new Error("id is required when getting a video or playlist"))}var g=A(n);var y=function e(r,n){i.trigger(t.assign({type:"catalog_"+r,accountId:c,deliveryConfigId:d,adConfigId:f,playlistId:m===s?h:undefined,related:m===u?h:undefined,search:m===o?v:undefined,url:g,videoId:m===a?h:undefined},n))};var _=function e(t,r,i){return y("request_error",{error:t,response:r,body:i})};y("request");var b={Accept:"application/json;pk="+p};var T=e.xhr({headers:b,json:true,url:g},function(e,t,r){if(e){_(e,T,r);return l(e,r)}if(T.status>=400){_(new Error("Request Failed"),T,r);return l(T,r)}y("response",{response:T});l(null,r)});var S=T.onabort.bind(T);T.onabort=function(){var e=new Error("Request Aborted");S();_(e,T,null);return l(e,null)};return T};var x=function e(){var t=r.GestureEvent;return!!(t&&r.WebKitMediaKeys&&r.WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4"))};var P=function t(){return r.navigator.requestMediaKeySystemAccess&&!e.browser.IS_IOS&&(e.browser.IS_FIREFOX||e.browser.IS_CHROME)};var O=function e(t){return t==="application/vnd.apple.mpegurl"||t==="application/x-mpegURL"};var D=function t(r){var i=e.parseUrl(r);return i.hostname.indexOf("boltdns.net")!==-1&&i.pathname.indexOf("/aes128/")!==-1};var L=function e(t){return t.isSecureContext||!/^http:/.test(t.location.href)};var R={isSafariWithFairplaySupport:x,isBrowserWithWidevineSupport:P,isHlsType:O,isBoltEncryptedHls:D,preferHttps:L};var U="https://fps.brightcove.com/v1/application_certificate";var N="com.apple.fps.1_0";var M=function e(t){return r.btoa(String.fromCharCode.apply(null,t))};var B=function e(t){return String.fromCharCode.apply(null,new Uint16Array(t.buffer))};var F=function e(t){var r=t.source,i=t.publisherId,n=t.applicationId;var a=r.key_systems[N].certificate_url;if(a){return a}if(n&&i){return U+"/"+i+"/"+n}return null};var W=function t(r,i){var n=F({source:r.source,publisherId:r.publisherId,applicationId:r.applicationId});e.xhr({uri:n,responseType:"arraybuffer"},function(e,t,r){if(e){i(e);return}i(null,new Uint8Array(r))})};var H=function e(t,r){return B(r).split("//")[1]};var q=function t(r){return function(t,i,n,a){var s={"Content-Type":"application/json",Accept:"application/octet-stream"};if(t.emeHeaders&&t.emeHeaders["BCOV-Auth"]){s["BCOV-Auth"]=t.emeHeaders["BCOV-Auth"]}e.xhr({uri:r,method:"POST",responseType:"arraybuffer",json:{publisher_id:t.publisherId,application_id:t.applicationId,key_id:i.split("/")[3],server_playback_context:M(n)},headers:s},function(e,t,r){if(e){a(e);return}a(null,r)})}};var V={getCertificateUri:F,getCertificate:W,getContentId:H,createGetLicenseFunc:q,base64EncodeUint8Array:M,FAIRPLAY_KEY_SYSTEM:N};var K=function e(t){if(t===void 0){t=[]}return t.filter(function(e){return e.keySystems&&e.keySystems[V.FAIRPLAY_KEY_SYSTEM]})};var z=function e(t,r,i){var n=K(r);if(!n.length||!t.eme){i();return}var a=t.eme.options||{};var s=0;var o=[];var l={};var u=function e(t){var r=n[t];var u=V.getCertificateUri({source:r,publisherId:a.publisherId,applicationId:a.applicationId});if(!u){return"continue"}if(l[u]){l[u].push(r);return"continue"}s++;l[u]=[r];r.keySystems[V.FAIRPLAY_KEY_SYSTEM].getCertificate({source:r,publisherId:a.publisherId,applicationId:a.applicationId},function(e,t){if(e){o.push({message:"Unable to resolve FairPlay certificate",error:e})}else{var r=l[u];for(var n=0;n<r.length;n++){var a=r[n];a.keySystems[V.FAIRPLAY_KEY_SYSTEM].getCertificate=function(e,r){r(null,t)}}}s--;if(!s){if(o.length){i(o);return}i()}})};for(var c=0;c<n.length;c++){var d=u(c);if(d==="continue")continue}};var G=function e(t){if(!R.isHlsType(t.type)||!t.key_systems||!t.key_systems[V.FAIRPLAY_KEY_SYSTEM]){return null}var r=t.key_systems[V.FAIRPLAY_KEY_SYSTEM];var i=r.key_request_url;var n={};n[V.FAIRPLAY_KEY_SYSTEM]={getCertificate:V.getCertificate,getLicense:V.createGetLicenseFunc(i),getContentId:V.getContentId};return n};var Y=function e(t){return G(t)};var X={getKeySystemOptions:Y,getFairPlaySources:K,resolveFairPlayCertificates:z};var $=function e(t,r){r=r||t&&t.mediainfo||{};return t&&t.hasPlugin&&t.hasPlugin("vr")&&r&&r.projection};var J=50*1024*1024;var Q=3*1024*1024;var Z=.5*1024*1024;var ee={http:{nativeHls:{http:{"application/vnd.apple.mpegurl":1,"video/mp4":5,"application/dash+xml":3},https:{"application/vnd.apple.mpegurl":2,"video/mp4":6,"application/dash+xml":4}},noNativeHls:{http:{"application/vnd.apple.mpegurl":1,"video/mp4":5,"application/dash+xml":3},https:{"application/vnd.apple.mpegurl":2,"video/mp4":6,"application/dash+xml":4}},preferMp4:{http:{"application/vnd.apple.mpegurl":3,"video/mp4":1,"application/dash+xml":5},https:{"application/vnd.apple.mpegurl":4,"video/mp4":2,"application/dash+xml":6}}},https:{nativeHls:{http:{"application/vnd.apple.mpegurl":2,"video/mp4":6,"application/dash+xml":5},https:{"application/vnd.apple.mpegurl":1,"video/mp4":4,"application/dash+xml":3}},noNativeHls:{http:{"application/vnd.apple.mpegurl":5,"video/mp4":4,"application/dash+xml":6},https:{"application/vnd.apple.mpegurl":1,"video/mp4":3,"application/dash+xml":2}},preferMp4:{http:{"application/vnd.apple.mpegurl":5,"video/mp4":4,"application/dash+xml":6},https:{"application/vnd.apple.mpegurl":2,"video/mp4":1,"application/dash+xml":3}}}};var te={1:3,2:3.2,3:4.2,4:5,5:6,6:7,7:8};var re=function e(t,r){return r.type==="application/vnd.apple.mpegurl"&&r.key_systems&&R.isSafariWithFairplaySupport()&&t.eme&&t.eme.options};var ie=function e(t,r){return r.type==="application/vnd.apple.mpegurl"&&r.key_systems&&R.isBrowserWithWidevineSupport()&&t.eme&&t.eme.options};var ne=function t(r,i,n){if(!i.src){return 9999}if(i.type==="application/vnd.apple.mpegurl"&&i.key_systems&&(i.key_systems["com.apple.fps.1_0"]&&!re(n,i)||i.key_systems["com.widevine.alpha"]&&!ie(n,i))){return 9999}if(i.profiles&&i.profiles.match(/hbbtv/i)){return 9999}if(e.browser.IS_IOS&&i.type==="application/vnd.apple.mpegurl"&&te[i.ext_x_version]>parseFloat(e.browser.IOS_VERSION)){return 9999}r=r[/^[^:]*/.exec(i.src)];if(!r){return 9999}return r[i.type]||9999};var ae=function t(r,i,n,a){var s=se.preferHttps()?ee.https:ee.http;var o;var l;if($(r,i)){o=J}else if(e.browser.IS_IOS||e.browser.IS_ANDROID){o=Z}else{o=Q}if(se.preferMp4(r,i)){s=s.preferMp4}else if(se.supportsNativeHls()){s=s.nativeHls}else{s=s.noNativeHls}l=ne(s,n,r)-ne(s,a,r);if(l){return l}if(n.type==="video/mp4"&&a.type==="video/mp4"){if(n.avg_bitrate&&a.avg_bitrate){return Math.abs(n.avg_bitrate-o)-Math.abs(a.avg_bitrate-o)}if(n.avg_bitrate||a.avg_bitrate){l=n.avg_bitrate?-1:1}}if(n.type==="application/vnd.apple.mpegurl"&&a.type==="application/vnd.apple.mpegurl"){if(n.ext_x_version&&a.ext_x_version){return a.ext_x_version-n.ext_x_version}if(n.ext_x_version||a.ext_x_version){l=n.ext_x_version?-1:1}}return l};function se(r,i,n){if(n===void 0){n={}}var a=i.sources||[];var s=[];var o=n,l=o.bcovAuthToken;if(l&&!t.isNonEmptyStr(l)){e.log.error("The bcovAuthToken catalog property must be a string");l=null}for(var u=0;u<a.length;u++){var c=a[u];if(l&&c.key_systems){c.emeHeaders={"BCOV-Auth":l}}if(c.src&&c.container==="MP4"){c.type="video/mp4"}else if(c.src&&(c.container==="M2TS"||R.isHlsType(c.type))){c.type="application/vnd.apple.mpegurl";if(re(r,c)){c.keySystems=X.getKeySystemOptions(c)}if(R.isBoltEncryptedHls(c.src)&&l){if(c.vmap&&r.hasPlugin("ssai")){c.bcovAuthToken=l}else{var d=e.parseUrl(c.src);var f="bcov_auth="+l;if(!d.search){f="?"+f}else if(!(d.search[d.search.length-1]==="&")){f="&"+f}c.src+=f}}}s.push(c)}return s.sort(ae.bind(null,r,i))}se.supportsNativeHls=function(){var t=i.createElement("video");var r=e.options.hls&&e.options.hls.overrideNative;if(t&&t.canPlayType){return!r&&/probably|maybe/i.test(t.canPlayType("application/vnd.apple.mpegurl"))}return false};se.preferHttps=function(){return R.preferHttps(r)};se.preferMp4=function(t,r){return e.browser.IS_ANDROID&&e.browser.ANDROID_VERSION<5||$(t,r)};var oe={};var le=function e(r,i,n){var a=t.assign({},oe);if(r&&!t.isObj(r)){a.id=r}else{t.assign(a,r);if(t.isObj(r.id)){t.assign(a,r.id);if(!r.id.hasOwnProperty("id")){delete a.id}}}if(typeof i==="string"){a.type=i}if(a.type===o){if(!a.q){a.q=a.id}delete a.id}if(typeof r.deliveryConfigId==="string"){a.deliveryConfigId=r.deliveryConfigId}if(typeof n==="string"){a.adConfigId=n}if((a.type===s||a.type===o)&&a.limit===undefined){a.limit="100"}return a};var ue=function e(r){if(r===null){oe={}}else{t.assign(oe,r)}};var ce=/([A-Za-z0-9])_([A-Za-z0-9])/g;var de=function e(t){return t.replace(ce,function(e,t,r){return t+r.toUpperCase()})};var fe=function t(r){var i=e.mergeOptions(r);Object.keys(i).filter(function(e){return e.match(ce)}).forEach(function(e){i[de(e)]=i[e]});return i};var he=function e(t,r){if(!r){return}t.mediainfo=fe(r);var n=Boolean(t.el().ownerDocument.querySelector(".bc-iframe"));var a=t.mediainfo.name;if(n&&a){i.title=a}};var pe=function e(t,r){if(!r){return}t.playlistinfo=fe(r);delete t.playlistinfo.videos};var ve=function e(t,r){return(t.type==="application/vnd.apple.mpegurl"||t.type==="application/dash+xml")&&r.toLowerCase()==="html5"};function me(r){var i=this;var n=t.assign({accountId:i.options_["data-account"],policyKey:i.options_["data-policy-key"]},r);var u=["accountId","baseUrl","policyKey"].reduce(function(e,t){if(n[t]){e[t]=n[t]}return e},{});ue(u);h(i);i.on("loadstart",function(){if(!t.isFn(i.playlist)||!i.playlist()||!i.playlist().length){return}he(i,i.playlist()[i.playlist.indexOf(i.currentSrc())])});i.on("dispose",function(){return S(i)});var c=function t(r,n){var a=X.getFairPlaySources(r);if(!a.length){n();return}X.resolveFairPlayCertificates(i,a,function(t){if(t){e.log("Unable to resolve FairPlay certificates",t)}n()})};var d=function t(r){if(!i.hasPlugin||!i.hasPlugin("ssai")||!r){return r}return r.map(function(t){if(t.vmap){t.type=e.getPlugin("ssai").MIME_TYPE;t.originalHlsSource=t.src;t.src=t.vmap}return t})};var p=function e(t){var r=function e(){var r=false;he(i,t);if($(i)){var n=i.el().querySelector("video");n.setAttribute("crossorigin","anonymous")}i.el().setAttribute("data-video-id",t.id);i.poster(t.poster);if(t.sources){for(var a=0;a<t.sources.length;a++){if(t.sources[a].vmap!==undefined){r=true;break}}}if(r&&i.onceux!==undefined){i.onceux.loadSourcesFromCatalog(t.sources)}else{if(r){t.sources=d(t.sources)}i.src(t.sources)}k(i,t);if(t.textTracks){for(var s=0;s<t.textTracks.length;s++){i.addRemoteTextTrack(t.textTracks[s])}}};c(t.sources,r)};var v=function e(t){var r=function e(){i.on("beforeplaylistitem",function(e,t){return k(i,t)});for(var r=0;r<t.length;r++){t[r].sources=d(t[r].sources)}var n=t.startingIndex||0;he(i,t[n]);pe(i,i.catalog.data);if($(i)){var a=i.el().querySelector("video");a.setAttribute("crossorigin","anonymous")}i.playlist(t,n)};var n=t.filter(function(e){return e.sources}).reduce(function(e,t){return e.concat(t.sources)},[]);c(n,r)};var g=function e(t,n){var a;var s=fe(t);if(s.sources){s.rawSources_=s.sources;s.sources=(r.getSources||se)(i,s,n);a=i.selectSource(s.sources)}if(s.posterSources){s.poster=E(s.posterSources)}if(s.thumbnailSources){s.thumbnail=E(s.thumbnailSources)}if(s.textTracks){var o=a&&ve(a.source,a.tech);s.textTracks=s.textTracks.filter(function(e){return!(o&&e.in_band_metadata_track_dispatch_type!==undefined)}).map(function(e){if(e.sources){e.src=E(e.sources)}return e})}if(s.duration){s.duration=s.duration*.001}if(s.cuePoints){for(var l=0;l<s.cuePoints.length;l++){T(s,l)}}return s};i.catalog={transformCatalogError:m,transformVideoResponse:g,mediaCuePointsTrack:function t(){if(!i.catalog.mediaCuePointsTrack.hasWarned_){e.log.warn("player.catalog.mediaCuePointsTrack() is deprecated, please use player.mediaCuePointsTrack() instead!");i.catalog.mediaCuePointsTrack.hasWarned_=true}return i.mediaCuePointsTrack()},get:function e(r,n){r=le(r);if(i.catalog.tveToken){r.tveToken=i.catalog.tveToken}i.catalog.loading++;var s;var l=new t.Promise(function(e,t){s=I(i,r,function(n,s){i.catalog.loading--;if(r.type===o&&s&&(!s.videos||!s.videos.length)){n=new Error("No videos returned from search")}if(n){n.data=s;i.catalog.error=n;return t(n)}if(!s){return e(null)}i.catalog.data=s;var l={};if(r.bcovAuthToken){l.bcovAuthToken=r.bcovAuthToken}if(r.type===a){i.catalog.sources=s.sources;i.catalog.poster=s.poster;return e(g(s,l))}return e(s.videos.map(function(e){return g(e,l)}))})});if(!t.isFn(n)){return l}l.then(function(e){n(null,e)}).catch(function(e){n(e,e.data)});return s},getVideo:function e(t,r,i){if(r===void 0){r=function e(){}}return this.get(le(t,a,i),r)},getSequence:function t(r,n,a){var s=this;if(n===void 0){n=function e(){}}if(!Array.isArray(r)){r=[r]}r=r.filter(function(t){if(!/^(search|video|playlist)$/i.test(t.type)){e.log.error("invalid sequence type, please use search, video, or playlist. for:",t);return false}return true});if(!r.length){n(new Error("No valid sequences"),null);return}var o=r.length;var l=new Array(r.length);return r.map(function(t,u){return s.get(le(t,t.type,a),function(a,s){o--;if(a){e.log.error("failed to request sequence",t);e.log.error("with error",a)}else if(s){if(!Array.isArray(s)){s=[s]}l[u]=s}if(o===0){i.catalog.data=l;var c=l.reduce(function(e,t){return t&&e.concat(t)},[]);if(!c.length){n(new Error("No data was loaded for the sequence "+JSON.stringify(r),null))}else{n(null,c)}}},a)})},getLazySequence:function e(t,r,n){var a=this;if(r===void 0){r=function e(){}}if(!Array.isArray(t)){t=[t]}var s=function e(r){return a.getSequence(t.shift(),function(i,n){if((i||!n)&&t&&t.length){return e(r)}r(i,n)},n)};var o=function e(){if(!t.length){i.off("playlistitem",e);return}var r=i.playlist;var n=r.currentIndex&&r.currentIndex()||r.currentItem&&r.currentItem()||0;var a=r.lastIndex&&r.lastIndex()||r().length-1||0;if(n!==a){return}s(function(e,t){if(e||!t){return}i.playlist(i.playlist().concat(t),n)})};i.on("playlistitem",o);return s(r)},getSearch:function e(t,r,i){if(r===void 0){r=function e(){}}return this.get(le(t,o,i),r)},getPlaylist:function e(t,r,i){if(r===void 0){r=function e(){}}return this.get(le(t,s,i),r)},load:function e(t){if(Array.isArray(t)){v(t)}else{p(t)}},autoFindAndLoadMedia:function e(t){var r=f(t,i);if(!r){return}t.playlistVideoId=r.playlistVideoId;var n=_(r.type,i,t);if(r.type===l){this.getLazySequence(r.id,n)}else{this.get(le(r),n)}return r},loading:0}}e.registerPlugin("catalog",me);me.VERSION=n;return me})})();(function(){if(l.getPlugin("touchActive")){return}(function(e,t){var r=l.registerPlugin||l.plugin;r("touchActive",function(){if(!l.browser.TOUCH_ENABLED){return}var e=this,t=false,r=function(){if(!t){e.userActive(false)}};e.one("play",function(){var i=e.options_.inactivityTimeout>0?e.options_.inactivityTimeout:5e3;e.el().className+=" vjs-user-active";e.one(["click","tap"],function(){t=true});e.setTimeout(r,i)})})})(e,t)})();(function(){if(l.getPlugin("playlist")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):(e=e||self,e.videojsPlaylist=t(e.videojs))})(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t=function e(t){return typeof t==="number"&&!isNaN(t)&&t>=0&&t<Infinity};var r=function e(t){var r=t.playlist.autoadvance_;if(r.timeout){t.clearTimeout(r.timeout)}if(r.trigger){t.off("ended",r.trigger)}r.timeout=null;r.trigger=null};var i=function e(i,n){r(i);if(!t(n)){i.playlist.autoadvance_.delay=null;return}i.playlist.autoadvance_.delay=n;i.playlist.autoadvance_.trigger=function(){var t=function t(){return e(i,n)};i.one("play",t);i.playlist.autoadvance_.timeout=i.setTimeout(function(){r(i);i.off("play",t);i.playlist.next()},n*1e3)};i.one("ended",i.playlist.autoadvance_.trigger)};var n=function e(t){var r=t.remoteTextTracks();var i=r&&r.length||0;while(i--){t.removeRemoteTextTrack(r[i])}};var a=function e(t,r){var a=!t.paused()||t.ended();t.trigger("beforeplaylistitem",r.originalValue||r);if(r.playlistItemId_){t.playlist.currentPlaylistItemId_=r.playlistItemId_}t.poster(r.poster||"");t.src(r.sources);n(t);t.ready(function(){(r.textTracks||[]).forEach(t.addRemoteTextTrack.bind(t));t.trigger("playlistitem",r.originalValue||r);if(a){var e=t.play();if(typeof e!=="undefined"&&typeof e.then==="function"){e.then(null,function(e){})}}i(t,t.playlist.autoadvance_.delay)});return t};var s=function e(t){return!!t&&typeof t==="object"};var o=function e(t){var r=[];var i;t.forEach(function(e){if(!s(e)){i=Object(e);i.originalValue=e}else{i=e}r.push(i)});return r};var l=function e(t){var r=1;t.forEach(function(e){e.playlistItemId_=r++})};var u=function e(t,r){for(var i=0;i<t.length;i++){if(t[i].playlistItemId_===r){return i}}return-1};var c=function e(t,r){var i=t;var n=r;if(typeof t==="object"){i=t.src}if(typeof r==="object"){n=r.src}if(/^\/\//.test(i)){n=n.slice(n.indexOf("//"))}if(/^\/\//.test(n)){i=i.slice(i.indexOf("//"))}return i===n};var d=function e(t,r){for(var i=0;i<t.length;i++){var n=t[i].sources;if(Array.isArray(n)){for(var a=0;a<n.length;a++){var s=n[a];if(s&&c(s,r)){return i}}}}return-1};var f=function e(t){var r=-1;var i=t.length-1;while(++r<t.length){var n=r+Math.floor(Math.random()*(i-r+1));var a=t[n];t[n]=t[r];t[r]=a}return t};function h(t,n,c){if(c===void 0){c=0}var h=null;var p=false;var v=t.playlist=function(e,r){if(r===void 0){r=0}if(p){throw new Error("do not call playlist() during a playlist change")}if(Array.isArray(e)){var i=Array.isArray(h)?h.slice():null;var n=e.slice();h=n.slice();if(h.filter(function(e){return s(e)}).length!==h.length){h=o(h)}l(h);p=true;t.trigger({type:"duringplaylistchange",nextIndex:r,nextPlaylist:n,previousIndex:v.currentIndex_,previousPlaylist:i||[]});p=false;if(r!==-1){v.currentItem(r)}if(i){t.setTimeout(function(){t.trigger("playlistchange")},0)}}return h.map(function(e){return e.originalValue||e}).slice()};t.on("loadstart",function(){if(v.currentItem()===-1){r(t)}});v.currentIndex_=-1;v.player_=t;v.autoadvance_={};v.repeat_=false;v.currentPlaylistItemId_=null;v.currentItem=function(e){if(p){return v.currentIndex_}if(typeof e==="number"&&v.currentIndex_!==e&&e>=0&&e<h.length){v.currentIndex_=e;a(v.player_,h[v.currentIndex_]);return v.currentIndex_}var t=v.player_.currentSrc()||"";if(v.currentPlaylistItemId_){var r=u(h,v.currentPlaylistItemId_);var i=h[r];if(i&&Array.isArray(i.sources)&&d([i],t)>-1){v.currentIndex_=r;return v.currentIndex_}v.currentPlaylistItemId_=null}v.currentIndex_=v.indexOf(t);return v.currentIndex_};v.contains=function(e){return v.indexOf(e)!==-1};v.indexOf=function(e){if(typeof e==="string"){return d(h,e)}var t=Array.isArray(e)?e:e.sources;for(var r=0;r<t.length;r++){var i=t[r];if(typeof i==="string"){return d(h,i)}else if(i.src){return d(h,i.src)}}return-1};v.currentIndex=function(){return v.currentItem()};v.lastIndex=function(){return h.length-1};v.nextIndex=function(){var e=v.currentItem();if(e===-1){return-1}var t=v.lastIndex();if(v.repeat_&&e===t){return 0}return Math.min(e+1,t)};v.previousIndex=function(){var e=v.currentItem();if(e===-1){return-1}if(v.repeat_&&e===0){return v.lastIndex()}return Math.max(e-1,0)};v.first=function(){if(p){return}var e=v.currentItem(0);if(h.length){return h[e].originalValue||h[e]}v.currentIndex_=-1};v.last=function(){if(p){return}var e=v.currentItem(v.lastIndex());if(h.length){return h[e].originalValue||h[e]}v.currentIndex_=-1};v.next=function(){if(p){return}var e=v.nextIndex();if(e!==v.currentIndex_){var t=v.currentItem(e);return h[t].originalValue||h[t]}};v.previous=function(){if(p){return}var e=v.previousIndex();if(e!==v.currentIndex_){var t=v.currentItem(e);return h[t].originalValue||h[t]}};v.autoadvance=function(e){i(v.player_,e)};v.repeat=function(t){if(t===undefined){return v.repeat_}if(typeof t!=="boolean"){e.log.error("videojs-playlist: Invalid value for repeat",t);return}v.repeat_=!!t;return v.repeat_};v.sort=function(e){if(!h.length){return}h.sort(e);if(p){return}t.trigger("playlistsorted")};v.reverse=function(){if(!h.length){return}h.reverse();if(p){return}t.trigger("playlistsorted")};v.shuffle=function(e){var r=e===void 0?{}:e,i=r.rest;var n=0;var a=h;if(i){n=v.currentIndex_+1;a=h.slice(n)}if(a.length<=1){return}f(a);if(i){var s;(s=h).splice.apply(s,[n,a.length].concat(a))}if(p){return}t.trigger("playlistsorted")};if(Array.isArray(n)){v(n.slice(),c)}else{h=[]}return v}var p="4.3.1";var v=e.registerPlugin||e.plugin;var m=function e(t,r){h(this,t,r)};v("playlist",m);m.VERSION=p;return m})})();var d=function(){"use strict";var t=this,r,i=[],n,a=[];if(s()!==false){t.one("loadstart",function(){a=t.mediainfo.sources;r=a.length;for(var e=0;e<r;e++){if(a[e].container==="MP4"&&a[e].hasOwnProperty("src")){i.push(a[e])}}i.sort(function(e,t){return t.size-e.size});n=i[0].src;t.src(n)})}function s(){var t=e.navigator.userAgent;var r=t.indexOf("MSIE ");if(r>0){return parseInt(t.substring(r+5,t.indexOf(".",r)),10)}var i=t.indexOf("Trident/");if(i>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var a=t.indexOf("Edge/");if(a>0){return parseInt(t.substring(a+5,t.indexOf(".",a)),10)}return false}};var f=l.registerPlugin||l.plugin;f("forceMP4IE",d);var h=function(e,t,r,i){var n=t.environment;var s=n.queryString;var o=n.isInBcFrame;c.perf.mark("bcInitStart");i=i||{};if(!(e.browser.IS_ANY_SAFARI||e.browser.IS_IOS)){i.html5=i.html5||{};i.html5.nativeCaptions=false}i.inactivityTimeout=5e3;if(e.browser.TOUCH_ENABLED){i.inactivityTimeout=0}i=e.mergeOptions(i,{nativeControlsForTouch:a(),controls:o?true:r.hasAttribute("controls"),persistTextTrackSettings:true,responsive:true,"vtt.js":i["vttjs"]||"https://vjs.zencdn.net/vttjs/0.12.5/vtt.global.min.js",liveui:true,sourceOrder:true,controlBar:{},userActions:{hotkeys:{}}});if(s.language){i.language=s.language}if(s.playsinline!==undefined){r.setAttribute("playsinline","playsinline")}if(s.loop!==undefined){i.loop=true}embedVttjs=r.getAttribute("data-vttjs")||s.vttjs;if(embedVttjs&&c.isNonEmptyStr(embedVttjs)){i["vtt.js"]=embedVttjs}if(!i.flash){i.flash={}}if(!i.flash.swf){i.flash.swf="//players.brightcove.net/videojs-flashls-source-handler/1.4.8/video-js.swf"}if(typeof e.options.hls!=="object"){e.options.hls={}}if(e.browser.IS_ANDROID&&e.options.hls.enableLowInitialPlaylist===undefined){e.options.hls.enableLowInitialPlaylist=true}if(e.options.hls.overrideNative===undefined&&!e.browser.IS_ANY_SAFARI){e.options.hls.overrideNative=true}return i};var p=function(r,i,a){var s=a.options_;var o=i.settings;var l=i.environment;var u=l.queryString;var d=l.isInBcFrame;var f;a.one("beforepluginsetup:ads",function(){a.controlBar.removeChild("pictureInPictureToggle");r.getComponent("Component").prototype.fsApi_=a.fsApi_});if(!r.browser.TOUCH_ENABLED){a.addClass("vjs-mouse");if(d){r.dom.addClass(t.documentElement,"vjs-mouse")}}else if(r.browser.IS_IPHONE){a.addClass("vjs-native")}a.on("dispose",function(){a=s=null;n=[];v.videojs.log.history.clear()});if(r.browser.IS_IPHONE){a.on("fullscreenchange",function(){var e=a.$(".vjs-tech");if(e.hasAttribute("controls")){e.removeAttribute("controls")}});if(o.embedState.playsinline&&o.embedState.muted){a.addClass("vjs-iphone")}}if(r.browser.IS_IOS&&o.embedState.muted){a.addClass("vjs-ios")}if(a.controls()){a.one("play",function(){if(!a.controlBar){return}var e=a.controlBar.children();if(!e||!e.length){return}var t=["Enter","ArrowDown","ArrowUp","Up","Down"," ","Spacebar"];for(var r=0;r<e.length;r++){if(e[r].hasClass("vjs-menu-button-popup")&&!e[r].hasClass("vjs-hidden")){e[r].on("keyup",function(e){if(t.indexOf(e.key)>=0){a.controlBar.addClass("vjs-control-bar-visible")}})}}});if(a.controlBar){var h=a.controlBar.el(),p,m=function(){var e=t.activeElement;if(p!==e){p=e;a.controlBar.toggleClass("vjs-focus-within",h.contains(e))}},g=function(){h.removeEventListener("focus",m,true);h.removeEventListener("blur",m,true)};h.addEventListener("focus",m,true);h.addEventListener("blur",m,true);a.on("dispose",g);a.controlBar.on("dispose",g)}}var y=function(){return(new Date).toISOString().split("T")[0]+":"+a.bcAnalytics.client.getSession()};a.ready(function(){c.perf.mark("bcInitEnd");c.perf.measure("bcInit","bcInitStart","bcInitEnd")});var _={bcAnalytics:{applicationId:o.applicationId,mr:Boolean(e.bc_isManagedRelease),referrer:u.referrer,usage:u.usage},contextmenuUI:{content:[{label:a.localize("Player Information"),listener:function(){a.playerInfo.modal.open()}},{href:"https://www.brightcove.com/en/why-brightcove?utm_type=player",label:"About Brightcove"}]}};var b=["eme","chromecastReceiver","vr","pip","qualityMenu","ima3","FreeWheelPlugin","ssai","bcPlaylistUi","bcGa","bcAa","bcTealium","bcGtm"];function T(e,t){var i=_[e]||{};if(!a.hasPlugin(e)){r.log.error('Plugin "'+e+'" is missing. Please check your player configuration.');return}if(a.usingPlugin(e)){return}var s=r.mergeOptions(i,t);if(b.indexOf(e)!==-1){n.push(e);if(e==="bcPlaylistUi"){n.push(e+(s.horizontal?"-horz":"-vert"));if(s.repeat){n.push(e+"-repeat")}if(s.shuffle){n.push(e+"-shuffle")}}}try{a[e](s)}catch(t){r.log.error('Unable to initialize "'+e+'" plugin:',t)}}T("perSourceBehaviors");T("contextmenu");T("contextmenuUI");T("playerInfo");T("bcAnalytics",{accountId:"1330301241001",embedId:"default",platformVersion:"6.37.2",playerId:"H1KarKWEW",playerName:"TE Player - HTML5 Chromeless"});T("errors",{});T("catalog",{accountId:"1330301241001",policyKey:"BCpkADawqM37PeGlT72DEPlP6xuu_mOvkGXvB3bcIp7MMr2Nt5ofXsEBdXfYPELYVAFzspG7824Ob7suDfQulUTA4CH2Xgi6OYC6QwVlfc7lZvEu0rK7AV60VxwzKxC9dyT_SKybH9x_1mAj"});T("touchActive");T("forceMP4IE",{forceMP4IEURL:"https://www.te.com/etc/designs/te/js/vendor/forceMP4IE.js"});a.on("vjs-contextmenu",function(){if(a.playerInfo.modal){a.playerInfo.modal.close()}});a.ready(function(){a.playerInfo.modal.on("modalfill",function(){var e=y();var r=a.playerInfo.modal.$(".vjs-pi-section--player tbody");if(!e||!r){return}var i=t.createElement("tr");var n=t.createElement("tr");i.innerHTML="<td>"+a.localize("Session ID")+"</td> <td>"+e+"</td>";r.appendChild(i);n.innerHTML="<td>"+a.localize("Player Element ID")+"</td> <td>"+a.id()+"</td>";r.appendChild(n)})});a.errorDisplay.on("modalfill",function(){var e=y();var t=a.errorDisplay.$(".vjs-errors-content-container");if(!e||!t){return}t.appendChild(r.dom.createEl("div",{className:"vjs-errors-ref-id",innerHTML:"<b>"+a.localize("Session ID:")+"</b> "+e+" "+"<b>"+a.localize("Player Element ID:")+"</b> "+a.id()}))});var S={embedHasPoster:o.embedState.poster,embedHasSources:o.embedState.sources,embedHasTracks:o.embedState.tracks,adConfigId:o.adConfigId,deliveryConfigId:o.deliveryConfigId};f=a.catalog.autoFindAndLoadMedia(S);if(f&&f.type==="video"){if(/^[\d]+$/.test(f.id)){a.mediainfo.id=f.id}else{a.mediainfo.referenceId=a.mediainfo.reference_id=f.id}}(function(){var e,t=parseInt(null,10),r=false;a.playlist();if(t===t&&isFinite(t)&&t>=0){a.playlist.autoadvance(t)}})();if(typeof bcShimDestripeTime!=="undefined"){if(bcShimDestripeTime>1){n.push("sdt-"+(Math.log(bcShimDestripeTime)/Math.LN10).toFixed(1))}else{n.push("sdt-0.0")}}a.requestAnimationFrame(function(){var e=t.querySelector(".bc-wrap");a.addClass("vjs-plugins-ready");if(e){e.style.opacity=0}});a.on(["mouseenter","ended","touchend"],function(){a.removeClass("not-hover")});a.on("mouseleave",function(){a.addClass("not-hover");if(!a.controlBar||!a.controlBar.el()){return}if(a.controlBar.hasClass("vjs-control-bar-visible")){a.controlBar.removeClass("vjs-control-bar-visible")}});n.forEach(function(e){a.trigger({type:"usage",name:e})});a.ready(function(){if(a.bcinfo&&a.bcinfo.PLAYER_LOADER||e.brightcovePlayerLoader){a.trigger({type:"usage",name:"player-loader"})}if(a.bcinfo&&a.bcinfo.REACT_PLAYER_LOADER||e.BrightcoveReactPlayerLoader){a.trigger({type:"usage",name:"react-player-loader"})}})};var v=u.createInitializer(h,p);o.restoreFirstVideojs();return v}(window,document);if(typeof t!=="undefined"){s=document.querySelector("#"+a);if(s){(function(){var e=function(e){return(e||"0.0.0").split(".").map(function(e){return Number(e)})};var t=e(s.getAttribute("data-vjs-version"));var r=e(o.videojs.VERSION);if(r[0]>t[0]||r[0]===t[0]&&r[1]>t[1]||r[0]===t[0]&&r[1]===t[1]&&r[2]>t[2]){s.parentNode.removeChild(s);s=null;d=c.firstChild}})()}if(!s){s=f(t,d);s.id=a;s.setAttribute("data-vjs-version",o.videojs.VERSION)}d=s.nextSibling}if(typeof r!=="undefined"){n=document.querySelector("."+i);if(!n){n=f(r,d);n.className=i}}function h(){var e=[].concat(Array.prototype.slice.call(document.querySelectorAll("video")),Array.prototype.slice.call(document.querySelectorAll("video-js")));for(u=0;u<e.length;u++){l=e[u];if(l.getAttribute("data-player")==="H1KarKWEW"&&l.getAttribute("data-embed")==="default"){if(o.videojs.getPlayer(l)){o.videojs.log("Ignoring already initialized player");continue}o(l)}}}h();return o});