box-content-preview 3.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +397 -0
- package/README.md +435 -0
- package/dist/lib/237.js +34 -0
- package/dist/lib/274.js +103 -0
- package/dist/lib/2a7d8bfaf2d43f53bd71.mjs +21 -0
- package/dist/lib/3683cfffdcbd73685ff2.svg +8 -0
- package/dist/lib/42e4e1954f25f8c7b965.svg +6 -0
- package/dist/lib/492.js +34 -0
- package/dist/lib/59fe962b3e6bd8bfdda7.svg +3 -0
- package/dist/lib/5ea0869845becef03a06.svg +4 -0
- package/dist/lib/671.js +34 -0
- package/dist/lib/76692c54994797ddfb04.svg +3 -0
- package/dist/lib/815.js +34 -0
- package/dist/lib/8475f8e672ed83e24520.svg +6 -0
- package/dist/lib/88.css +23 -0
- package/dist/lib/9fb032a1799ca2a1c751.svg +3 -0
- package/dist/lib/assets/loading_ghost.gif +0 -0
- package/dist/lib/bb72d81b39be40898db2.svg +3 -0
- package/dist/lib/cmaps/78-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/78-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/78-H.bcmap +0 -0
- package/dist/lib/cmaps/78-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/78-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/78-V.bcmap +0 -0
- package/dist/lib/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Add-H.bcmap +0 -0
- package/dist/lib/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Add-V.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/B5-H.bcmap +0 -0
- package/dist/lib/cmaps/B5-V.bcmap +0 -0
- package/dist/lib/cmaps/B5pc-H.bcmap +0 -0
- package/dist/lib/cmaps/B5pc-V.bcmap +0 -0
- package/dist/lib/cmaps/CNS-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/CNS-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/CNS1-H.bcmap +0 -0
- package/dist/lib/cmaps/CNS1-V.bcmap +0 -0
- package/dist/lib/cmaps/CNS2-H.bcmap +0 -0
- package/dist/lib/cmaps/CNS2-V.bcmap +3 -0
- package/dist/lib/cmaps/ETHK-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/ETHK-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/ETen-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/ETen-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/ETenms-B5-H.bcmap +3 -0
- package/dist/lib/cmaps/ETenms-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/Ext-H.bcmap +0 -0
- package/dist/lib/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Ext-V.bcmap +0 -0
- package/dist/lib/cmaps/GB-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GB-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GB-H.bcmap +4 -0
- package/dist/lib/cmaps/GB-V.bcmap +0 -0
- package/dist/lib/cmaps/GBK-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBK-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBK2K-H.bcmap +0 -0
- package/dist/lib/cmaps/GBK2K-V.bcmap +0 -0
- package/dist/lib/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBT-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBT-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBT-H.bcmap +0 -0
- package/dist/lib/cmaps/GBT-V.bcmap +0 -0
- package/dist/lib/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/H.bcmap +0 -0
- package/dist/lib/cmaps/HKdla-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKdla-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKm314-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKm314-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKm471-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKm471-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKscs-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKscs-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/Hankaku.bcmap +0 -0
- package/dist/lib/cmaps/Hiragana.bcmap +0 -0
- package/dist/lib/cmaps/KSC-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSC-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/KSC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSC-Johab-H.bcmap +0 -0
- package/dist/lib/cmaps/KSC-Johab-V.bcmap +0 -0
- package/dist/lib/cmaps/KSC-V.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/dist/lib/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/Katakana.bcmap +0 -0
- package/dist/lib/cmaps/LICENSE +36 -0
- package/dist/lib/cmaps/NWP-H.bcmap +0 -0
- package/dist/lib/cmaps/NWP-V.bcmap +0 -0
- package/dist/lib/cmaps/RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Roman.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/V.bcmap +0 -0
- package/dist/lib/cmaps/WP-Symbol.bcmap +0 -0
- package/dist/lib/exif/exif-reader.min.js +8 -0
- package/dist/lib/exif/exif.js +822 -0
- package/dist/lib/exif/exif.min.js +21 -0
- package/dist/lib/fde82a50e6de20239861.svg +5 -0
- package/dist/lib/ff2dfa442d903d9d5e30.gif +0 -0
- package/dist/lib/index.css +84 -0
- package/dist/lib/index.d.ts +147 -0
- package/dist/lib/index.js +41639 -0
- package/dist/lib/pdfjs-lib.js +46 -0
- package/dist/lib/pdfjs-viewer-css.js +36 -0
- package/dist/lib/pdfjs-viewer.js +8118 -0
- package/dist/lib/third-party/media/0.127.0/shaka-player.compiled.js +371 -0
- package/dist/lib/third-party/media/1.30.0/shaka-player.compiled.js +438 -0
- package/dist/lib/third-party/media/1.33.0/shaka-player.compiled.js +438 -0
- package/dist/lib/third-party/media/1.8.0/shaka-player.compiled.js +376 -0
- package/dist/lib/third-party/media/2.14.0/shaka-player.compiled.js +609 -0
- package/dist/lib/third-party/media/2.66.0/manifest.json +8 -0
- package/dist/lib/third-party/media/2.66.0/shaka-player.compiled.js +752 -0
- package/dist/lib/third-party/media/2.93.0/manifest.json +8 -0
- package/dist/lib/third-party/media/2.93.0/shaka-player.compiled.js +975 -0
- package/dist/lib/third-party/media/3.25.0/manifest.json +8 -0
- package/dist/lib/third-party/media/3.25.0/shaka-player.compiled.js +1780 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/entities.json +322 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/entities.json +1811 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.10.1/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.10.1/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.10.1/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/three.min.js +882 -0
- package/dist/lib/third-party/model3d/1.10.1/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/entities.json +322 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/entities.json +1811 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.12.0/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.12.0/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.12.0/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/three.min.js +882 -0
- package/dist/lib/third-party/model3d/1.12.0/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/entities.json +439 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/entities.json +1869 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.6.1/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.6.1/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.6.1/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/three.min.js +43300 -0
- package/dist/lib/third-party/model3d/1.6.1/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/entities.json +439 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/entities.json +1869 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.9.1/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.9.1/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.9.1/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/three.min.js +882 -0
- package/dist/lib/third-party/model3d/1.9.1/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/swf/0.112.0/swfobject.js +6 -0
- package/dist/lib/third-party/text/0.112.0/github-markdown.css +681 -0
- package/dist/lib/third-party/text/0.112.0/github.css +123 -0
- package/dist/lib/third-party/text/0.112.0/highlight.min.js +3 -0
- package/dist/lib/third-party/text/0.112.0/papaparse.js +1457 -0
- package/dist/lib/third-party/text/0.112.0/papaparse.min.js +34 -0
- package/dist/lib/third-party/text/0.112.0/remarkable.min.js +4 -0
- package/dist/lib/third-party/text/0.114.0/github-markdown.css +681 -0
- package/dist/lib/third-party/text/0.114.0/github-markdown.min.css +1 -0
- package/dist/lib/third-party/text/0.114.0/github.css +123 -0
- package/dist/lib/third-party/text/0.114.0/github.min.css +1 -0
- package/dist/lib/third-party/text/0.114.0/highlight.min.js +3 -0
- package/dist/lib/third-party/text/0.114.0/manifest.json +10 -0
- package/dist/lib/third-party/text/0.114.0/papaparse.js +1457 -0
- package/dist/lib/third-party/text/0.114.0/papaparse.min.js +34 -0
- package/dist/lib/third-party/text/0.114.0/remarkable.min.js +4 -0
- package/dist/lib/third-party/text/2.65.0/github-markdown.css +681 -0
- package/dist/lib/third-party/text/2.65.0/github-markdown.min.css +1 -0
- package/dist/lib/third-party/text/2.65.0/github.css +99 -0
- package/dist/lib/third-party/text/2.65.0/github.min.css +1 -0
- package/dist/lib/third-party/text/2.65.0/highlight.min.js +2 -0
- package/dist/lib/third-party/text/2.65.0/manifest.json +10 -0
- package/dist/lib/third-party/text/2.65.0/papaparse.js +1897 -0
- package/dist/lib/third-party/text/2.65.0/papaparse.min.js +7 -0
- package/dist/lib/third-party/text/2.65.0/remarkable.min.js +1 -0
- package/package.json +198 -0
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
(function(){var g={};
|
|
2
|
+
(function(window){var m,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ca(){ca=function(){};ba.Symbol||(ba.Symbol=da)}var da=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}();
|
|
3
|
+
function ea(){ca();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(this)}});ea=function(){}}function fa(a){var b=0;return ha(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function ha(a){ea();a={next:a};a[ba.Symbol.iterator]=function(){return this};return a}function ia(a){ea();var b=a[Symbol.iterator];return b?b.call(a):fa(a)}
|
|
4
|
+
function ja(a,b){if(b){for(var c=ba,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];f in c||(c[f]={});c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&aa(c,d,{configurable:!0,writable:!0,value:f})}}
|
|
5
|
+
ja("Promise",function(a){function b(a){this.W=0;this.f=void 0;this.a=[];var b=this.c();try{a(b.resolve,b.reject)}catch(k){b.reject(k)}}function c(){this.a=null}function d(a){return a instanceof b?a:new b(function(b){b(a)})}if(a)return a;c.prototype.b=function(a){null==this.a&&(this.a=[],this.f());this.a.push(a)};c.prototype.f=function(){var a=this;this.c(function(){a.h()})};var e=ba.setTimeout;c.prototype.c=function(a){e(a,0)};c.prototype.h=function(){for(;this.a&&this.a.length;){var a=this.a;this.a=
|
|
6
|
+
[];for(var b=0;b<a.length;++b){var c=a[b];delete a[b];try{c()}catch(l){this.g(l)}}}this.a=null};c.prototype.g=function(a){this.c(function(){throw a;})};b.prototype.c=function(){function a(a){return function(d){c||(c=!0,a.call(b,d))}}var b=this,c=!1;return{resolve:a(this.l),reject:a(this.b)}};b.prototype.l=function(a){if(a===this)this.b(new TypeError("A Promise cannot resolve to itself"));else if(a instanceof b)this.m(a);else{a:switch(typeof a){case "object":var c=null!=a;break a;case "function":c=
|
|
7
|
+
!0;break a;default:c=!1}c?this.j(a):this.g(a)}};b.prototype.j=function(a){var b=void 0;try{b=a.then}catch(k){this.b(k);return}"function"==typeof b?this.o(b,a):this.g(a)};b.prototype.b=function(a){this.h(2,a)};b.prototype.g=function(a){this.h(1,a)};b.prototype.h=function(a,b){if(0!=this.W)throw Error("Cannot settle("+a+", "+b|"): Promise already settled in state"+this.W);this.W=a;this.f=b;this.i()};b.prototype.i=function(){if(null!=this.a){for(var a=this.a,b=0;b<a.length;++b)a[b].call(),a[b]=null;
|
|
8
|
+
this.a=null}};var f=new c;b.prototype.m=function(a){var b=this.c();a.nb(b.resolve,b.reject)};b.prototype.o=function(a,b){var c=this.c();try{a.call(b,c.resolve,c.reject)}catch(l){c.reject(l)}};b.prototype.then=function(a,c){function d(a,b){return"function"==typeof a?function(b){try{e(a(b))}catch(w){f(w)}}:b}var e,f,g=new b(function(a,b){e=a;f=b});this.nb(d(a,e),d(c,f));return g};b.prototype["catch"]=function(a){return this.then(void 0,a)};b.prototype.nb=function(a,b){function c(){switch(d.W){case 1:a(d.f);
|
|
9
|
+
break;case 2:b(d.f);break;default:throw Error("Unexpected state: "+d.W);}}var d=this;null==this.a?f.b(c):this.a.push(function(){f.b(c)})};b.resolve=d;b.reject=function(a){return new b(function(b,c){c(a)})};b.race=function(a){return new b(function(b,c){for(var e=ia(a),f=e.next();!f.done;f=e.next())d(f.value).nb(b,c)})};b.all=function(a){var c=ia(a),e=c.next();return e.done?d([]):new b(function(a,b){function f(b){return function(c){g[b]=c;h--;0==h&&a(g)}}var g=[],h=0;do g.push(void 0),h++,d(e.value).nb(f(g.length-
|
|
10
|
+
1),b),e=c.next();while(!e.done)})};return b});ja("Array.prototype.find",function(a){return a?a:function(a,c){a:{var b=this;b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(a.call(c,g,f,b)){b=g;break a}}b=void 0}return b}});var ka=this;ka.Ze=!0;function n(a,b){var c=a.split("."),d=ka;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]?d=d[e]:d=d[e]={}:d[e]=b}
|
|
11
|
+
function la(a,b){function c(){}c.prototype=b.prototype;a.ef=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.cf=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}};/*
|
|
12
|
+
|
|
13
|
+
Copyright 2016 Google Inc.
|
|
14
|
+
|
|
15
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
you may not use this file except in compliance with the License.
|
|
17
|
+
You may obtain a copy of the License at
|
|
18
|
+
|
|
19
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
+
|
|
21
|
+
Unless required by applicable law or agreed to in writing, software
|
|
22
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
23
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
24
|
+
See the License for the specific language governing permissions and
|
|
25
|
+
limitations under the License.
|
|
26
|
+
*/
|
|
27
|
+
function ma(a){this.c=Math.exp(Math.log(.5)/a);this.b=this.a=0}function na(a,b,c){var d=Math.pow(a.c,b);c=c*(1-d)+d*a.a;isNaN(c)||(a.a=c,a.b+=b)}function oa(a){return a.a/(1-Math.pow(a.c,a.b))};function pa(){this.b=new ma(2);this.c=new ma(5);this.a=0}pa.prototype.getBandwidthEstimate=function(a){return 128E3>this.a?a:Math.min(oa(this.b),oa(this.c))};function qa(){}function ra(){}window.console&&window.console.log.bind&&(qa=console.warn.bind(console));function p(a,b,c,d){this.severity=a;this.category=b;this.code=c;this.data=Array.prototype.slice.call(arguments,3);this.handled=!1}n("shaka.util.Error",p);p.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};p.Severity={RECOVERABLE:1,CRITICAL:2};p.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
|
|
28
|
+
p.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,
|
|
29
|
+
MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,
|
|
30
|
+
DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,
|
|
31
|
+
HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,
|
|
32
|
+
LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7E3,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,
|
|
33
|
+
CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,CONTENT_UNSUPPORTED_BY_BROWSER:9009,UNSUPPORTED_UPGRADE_REQUEST:9010};var sa=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function ta(a){var b;a instanceof ta?(ua(this,a.fa),this.Ba=a.Ba,this.ja=a.ja,va(this,a.Ka),this.aa=a.aa,wa(this,xa(a.a)),this.va=a.va):a&&(b=String(a).match(sa))?(ua(this,b[1]||"",!0),this.Ba=ya(b[2]||""),this.ja=ya(b[3]||"",!0),va(this,b[4]),this.aa=ya(b[5]||"",!0),wa(this,b[6]||"",!0),this.va=ya(b[7]||"")):this.a=new za(null)}m=ta.prototype;m.fa="";m.Ba="";m.ja="";m.Ka=null;m.aa="";m.va="";
|
|
34
|
+
m.toString=function(){var a=[],b=this.fa;b&&a.push(Aa(b,Ba,!0),":");if(b=this.ja){a.push("//");var c=this.Ba;c&&a.push(Aa(c,Ba,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ka;null!=b&&a.push(":",String(b))}if(b=this.aa)this.ja&&"/"!=b.charAt(0)&&a.push("/"),a.push(Aa(b,"/"==b.charAt(0)?Ca:Da,!0));(b=this.a.toString())&&a.push("?",b);(b=this.va)&&a.push("#",Aa(b,Ea));return a.join("")};
|
|
35
|
+
m.resolve=function(a){var b=new ta(this);"data"===b.fa&&(b=new ta);var c=!!a.fa;c?ua(b,a.fa):c=!!a.Ba;c?b.Ba=a.Ba:c=!!a.ja;c?b.ja=a.ja:c=null!=a.Ka;var d=a.aa;if(c)va(b,a.Ka);else if(c=!!a.aa){if("/"!=d.charAt(0))if(this.ja&&!this.aa)d="/"+d;else{var e=b.aa.lastIndexOf("/");-1!=e&&(d=b.aa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
36
|
+
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.aa=d:c=""!==a.a.toString();c?wa(b,xa(a.a)):c=!!a.va;c&&(b.va=a.va);return b};function ua(a,b,c){a.fa=c?ya(b,!0):b;a.fa&&(a.fa=a.fa.replace(/:$/,""))}function va(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ka=b}else a.Ka=null}function wa(a,b,c){b instanceof za?a.a=b:(c||(b=Aa(b,Fa)),a.a=new za(b))}
|
|
37
|
+
function ya(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Aa(a,b,c){return"string"==typeof a?(a=encodeURI(a).replace(b,Ga),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ga(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ba=/[#\/\?@]/g,Da=/[#\?:]/g,Ca=/[#\?]/g,Fa=/[#\?@]/g,Ea=/#/g;function za(a){this.b=a||null}za.prototype.a=null;za.prototype.c=null;
|
|
38
|
+
za.prototype.add=function(a,b){if(!this.a&&(this.a={},this.c=0,this.b))for(var c=this.b.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.b=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);this.c++;return this};
|
|
39
|
+
za.prototype.toString=function(){if(this.b)return this.b;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.b=a.join("&")};function xa(a){var b=new za;b.b=a.b;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.c=a.c}return b};function u(){var a,b,c=new Promise(function(c,e){a=c;b=e});c.resolve=a;c.reject=b;return c}u.prototype.resolve=function(){};u.prototype.reject=function(){};function Ha(a,b,c){var d=Ia();this.j=null==a.maxAttempts?d.maxAttempts:a.maxAttempts;this.f=null==a.baseDelay?d.baseDelay:a.baseDelay;this.i=null==a.fuzzFactor?d.fuzzFactor:a.fuzzFactor;this.h=null==a.backoffFactor?d.backoffFactor:a.backoffFactor;this.a=0;this.b=this.f;this.c=b||!1;this.g=c||null;this.c&&(this.a=1)}function Ja(a){if(a.a>=a.j)if(a.c)a.a=1,a.b=a.f;else return Promise.reject();var b=new u;a.a?(Ka(a,b.resolve,a.b*(1+(2*Math.random()-1)*a.i)),a.b*=a.h):b.resolve();a.a++;return b}
|
|
40
|
+
function Ia(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}}function Ka(a,b,c){if(a.g)if(a.g()||0==c)b();else{var d=Math.min(200,c);La(function(){Ka(this,b,c-d)}.bind(a),d)}else La(b,c)}function La(a,b){window.setTimeout(a,b)};function Ma(a,b,c,d,e){var f=e in d,g;for(g in b){var h=e+"."+g,k=f?d[e]:c[g];if(f||g in a)void 0===b[g]?void 0===k||f?delete a[g]:a[g]=k:k.constructor==Object&&b[g]&&b[g].constructor==Object?(a[g]||(a[g]=k),Ma(a[g],b[g],k,d,h)):typeof b[g]==typeof k&&null!=b[g]&&b[g].constructor==k.constructor&&(a[g]=b[g])}}
|
|
41
|
+
function Na(a){function b(a){switch(typeof a){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return a;default:if(!a)return a;if(0<=c.indexOf(a))return null;var d=a.constructor==Array;if(a.constructor!=Object&&!d)return null;c.push(a);var f=d?[]:{},g;for(g in a)f[g]=b(a[g]);d&&(f.length=a.length);return f}}var c=[];return b(a)};function Oa(a,b){return a.reduce(function(a,b,e){return b["catch"](a.bind(null,e))}.bind(null,b),Promise.reject())}function Pa(a,b){return a.concat(b)}function Qa(){}function Ra(a){return null!=a}function Sa(a,b,c){return c.indexOf(a)==b};function x(a){this.f=!1;this.a=[];this.b=[];this.c=[];this.g=a||null}n("shaka.net.NetworkingEngine",x);x.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3};x.PluginPriority={$e:1,bf:2,Xe:3};var Ta={};function Ua(a,b,c){c=c||3;var d=Ta[a];if(!d||c>=d.ke)Ta[a]={ke:c,ie:b}}x.registerScheme=Ua;x.unregisterScheme=function(a){delete Ta[a]};x.prototype.me=function(a){this.b.push(a)};x.prototype.registerRequestFilter=x.prototype.me;x.prototype.Qe=function(a){var b=this.b;a=b.indexOf(a);0<=a&&b.splice(a,1)};
|
|
42
|
+
x.prototype.unregisterRequestFilter=x.prototype.Qe;x.prototype.cd=function(){this.b=[]};x.prototype.clearAllRequestFilters=x.prototype.cd;x.prototype.ne=function(a){this.c.push(a)};x.prototype.registerResponseFilter=x.prototype.ne;x.prototype.Re=function(a){var b=this.c;a=b.indexOf(a);0<=a&&b.splice(a,1)};x.prototype.unregisterResponseFilter=x.prototype.Re;x.prototype.dd=function(){this.c=[]};x.prototype.clearAllResponseFilters=x.prototype.dd;
|
|
43
|
+
function Va(a,b){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b}}x.prototype.destroy=function(){this.f=!0;this.b=[];this.c=[];for(var a=[],b=0;b<this.a.length;++b)a.push(this.a[b]["catch"](Qa));return Promise.all(a)};x.prototype.destroy=x.prototype.destroy;
|
|
44
|
+
x.prototype.request=function(a,b,c){var d=c||function(){return!1};if(this.f)return Promise.reject();b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Na(b.retryParameters):Ia();b.uris=Na(b.uris);var e=Date.now(),f=Promise.resolve();this.b.forEach(function(c){f=f.then(c.bind(null,a,b))});f=f["catch"](function(a){throw new p(2,1,1006,a);});f=f.then(function(){var f=Date.now()-e,h=new Ha(b.retryParameters,!1,c);return Ja(h).then(function(){return Wa(this,a,b,h,0,f,
|
|
45
|
+
d)}.bind(this))}.bind(this));this.a.push(f);return f.then(function(b){0<=this.a.indexOf(f)&&this.a.splice(this.a.indexOf(f),1);this.g&&!b.fromCache&&1==a&&this.g(b.timeMs,b.data.byteLength);return b}.bind(this))["catch"](function(a){a&&(a.severity=2);0<=this.a.indexOf(f)&&this.a.splice(this.a.indexOf(f),1);return Promise.reject(a)}.bind(this))};x.prototype.request=x.prototype.request;
|
|
46
|
+
function Wa(a,b,c,d,e,f,g){if(a.f||g())return Promise.reject();var h=new ta(c.uris[e]),k=h.fa;k||(k=location.protocol,k=k.slice(0,-1),ua(h,k),c.uris[e]=h.toString());k=(k=Ta[k])?k.ie:null;if(!k)return Promise.reject(new p(2,1,1E3,h));var l=Date.now();return k(c.uris[e],c,b).then(function(a){void 0==a.timeMs&&(a.timeMs=Date.now()-l);var c=Date.now(),d=Promise.resolve();this.c.forEach(function(c){d=d.then(function(){return Promise.resolve(c(b,a))}.bind(this))}.bind(this));d=d["catch"](function(a){var b=
|
|
47
|
+
2;a instanceof p&&(b=a.severity);throw new p(b,1,1007,a);});return d.then(function(){a.timeMs+=Date.now()-c;a.timeMs+=f;return a})}.bind(a))["catch"](function(a){if(a&&1==a.severity)return e=(e+1)%c.uris.length,g()?Promise.reject():Ja(d).then(function(){return Wa(this,b,c,d,e,f,g)}.bind(this),function(){throw a;});throw a;}.bind(a))};function Xa(a,b){for(var c=[],d=0;d<a.length;++d){for(var e=!1,f=0;f<c.length&&!(e=b?b(a[d],c[f]):a[d]===c[f]);++f);e||c.push(a[d])}return c}function Ya(a,b,c){for(var d=0;d<a.length;++d)if(c(a[d],b))return d;return-1}function Za(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function $a(a,b){var c=0;a.forEach(function(a){c+=b(a)?1:0});return c};function ab(){this.a={}}ab.prototype.push=function(a,b){this.a.hasOwnProperty(a)?this.a[a].push(b):this.a[a]=[b]};ab.prototype.get=function(a){return(a=this.a[a])?a.slice():null};ab.prototype.remove=function(a,b){var c=this.a[a];if(c)for(var d=0;d<c.length;++d)c[d]==b&&(c.splice(d,1),--d)};function bb(){this.a=new ab}bb.prototype.destroy=function(){cb(this);this.a=null;return Promise.resolve()};function z(a,b,c,d){a.a&&(b=new db(b,c,d),a.a.push(c,b))}function eb(a,b,c,d){z(a,b,c,function(a){this.ia(b,c);d(a)}.bind(a))}bb.prototype.ia=function(a,b){if(this.a)for(var c=this.a.get(b)||[],d=0;d<c.length;++d){var e=c[d];e.target==a&&(e.ia(),this.a.remove(b,e))}};function cb(a){if(a.a){var b=a.a,c=[],d;for(d in b.a)c.push.apply(c,b.a[d]);for(b=0;b<c.length;++b)c[b].ia();a.a.a={}}}
|
|
48
|
+
function db(a,b,c){this.target=a;this.type=b;this.a=c;this.target.addEventListener(b,c,!1)}db.prototype.ia=function(){this.target.removeEventListener(this.type,this.a,!1);this.a=this.target=null};function A(a,b){var c=b||{},d;for(d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}A.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};A.prototype.stopImmediatePropagation=function(){this.a=!0};A.prototype.stopPropagation=function(){};function B(a,b){if(0==b.length)return a;var c=b.map(function(a){return new ta(a)});return a.map(function(a){return new ta(a)}).map(function(a){return c.map(a.resolve.bind(a))}).reduce(Pa,[]).map(function(a){return a.toString()})}function fb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:b||[],keyIds:[]}}var gb=1/15;function hb(a){return!a||0==Object.keys(a).length}function ib(a){return Object.keys(a).map(function(b){return a[b]})}function jb(a,b){return Object.keys(a).every(function(c){return b(c,a[c])})}function kb(a,b){Object.keys(a).forEach(function(c){b(c,a[c])})};function lb(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}var mb={codecs:"codecs",frameRate:"framerate",bandwidth:"bitrate",width:"width",height:"height",channelsCount:"channels"};function C(a){if(!a)return"";a=new Uint8Array(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=escape(nb(a));try{return decodeURIComponent(a)}catch(b){throw new p(2,2,2004);}}n("shaka.util.StringUtils.fromUTF8",C);
|
|
49
|
+
function ob(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new p(2,2,2004);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(new Uint8Array(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(var e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return nb(c)}n("shaka.util.StringUtils.fromUTF16",ob);
|
|
50
|
+
function pb(a){var b=new Uint8Array(a);if(239==b[0]&&187==b[1]&&191==b[2])return C(b);if(254==b[0]&&255==b[1])return ob(b.subarray(2),!1);if(255==b[0]&&254==b[1])return ob(b.subarray(2),!0);var c=function(a,b){return a.byteLength<=b||32<=a[b]&&126>=a[b]}.bind(null,b);if(0==b[0]&&0==b[2])return ob(a,!1);if(0==b[1]&&0==b[3])return ob(a,!0);if(c(0)&&c(1)&&c(2)&&c(3))return C(a);throw new p(2,2,2003);}n("shaka.util.StringUtils.fromBytesAutoDetect",pb);
|
|
51
|
+
function qb(a){a=encodeURIComponent(a);a=unescape(a);for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b.buffer}n("shaka.util.StringUtils.toUTF8",qb);function nb(a){for(var b="",c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};function rb(a){this.a=null;this.b=function(){this.a=null;a()}.bind(this)}rb.prototype.cancel=function(){null!=this.a&&(clearTimeout(this.a),this.a=null)};function sb(a,b){a.cancel();a.a=setTimeout(a.b,1E3*b)}function tb(a,b){a.cancel();var c=function(){this.b();this.a=setTimeout(c,1E3*b)}.bind(a);a.a=setTimeout(c,1E3*b)};function ub(a,b){var c=void 0==b?!0:b,d=window.btoa(String.fromCharCode.apply(null,a)).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}n("shaka.util.Uint8ArrayUtils.toBase64",ub);function vb(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}n("shaka.util.Uint8ArrayUtils.fromBase64",vb);
|
|
52
|
+
function wb(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b}n("shaka.util.Uint8ArrayUtils.fromHex",wb);function xb(a){for(var b="",c=0;c<a.length;++c){var d=a[c].toString(16);1==d.length&&(d="0"+d);b+=d}return b}n("shaka.util.Uint8ArrayUtils.toHex",xb);function yb(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(var c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0}n("shaka.util.Uint8ArrayUtils.equal",yb);
|
|
53
|
+
function zb(a){for(var b=0,c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(b);var d=0;for(c=0;c<arguments.length;++c)b.set(arguments[c],d),d+=arguments[c].length;return b}n("shaka.util.Uint8ArrayUtils.concat",zb);function Ab(a){this.o=a;this.l=this.j=this.u=null;this.K=!1;this.b=null;this.g=new bb;this.a=[];this.m=[];this.i=new u;this.f=null;this.h=function(b){this.i.reject(b);a.onError(b)}.bind(this);this.A={};this.D=new rb(this.le.bind(this));this.Y=this.c=!1;this.J=[];this.X=!1;this.v=new rb(this.je.bind(this));tb(this.v,1);this.i["catch"](function(){})}m=Ab.prototype;
|
|
54
|
+
m.destroy=function(){this.c=!0;var a=[];this.a.forEach(function(b){b=b.ga.close()["catch"](Qa);var c=new Promise(function(a){setTimeout(a,1E3)});a.push(Promise.race([b,c]))});this.i.reject();this.g&&a.push(this.g.destroy());this.l&&a.push(this.l.setMediaKeys(null)["catch"](Qa));this.v&&(this.v.cancel(),this.v=null);this.D&&(this.D.cancel(),this.D=null);this.g=this.l=this.j=this.u=this.b=null;this.a=[];this.m=[];this.o=this.h=this.f=null;return Promise.all(a)};m.configure=function(a){this.f=a};
|
|
55
|
+
m.init=function(a,b){var c={},d=[];this.Y=b;this.m=a.offlineSessionIds;Bb(this,a,b||0<a.offlineSessionIds.length,c,d);return d.length?Cb(this,c,d):(this.K=!0,Promise.resolve())};
|
|
56
|
+
function Db(a,b){if(!a.j)return eb(a.g,b,"encrypted",function(){this.h(new p(2,6,6010))}.bind(a)),Promise.resolve();a.l=b;eb(a.g,a.l,"play",a.Pd.bind(a));var c=a.l.setMediaKeys(a.j);c=c["catch"](function(a){return Promise.reject(new p(2,6,6003,a.message))});var d=null;a.b.serverCertificate&&a.b.serverCertificate.length&&(d=a.j.setServerCertificate(a.b.serverCertificate).then(function(){})["catch"](function(a){return Promise.reject(new p(2,6,6004,a.message))}));return Promise.all([c,d]).then(function(){if(this.c)return Promise.reject();
|
|
57
|
+
Eb(this);this.b.initData.length||this.m.length||z(this.g,this.l,"encrypted",this.Ed.bind(this))}.bind(a))["catch"](function(a){return this.c?Promise.resolve():Promise.reject(a)}.bind(a))}function Fb(a,b){return Promise.all(b.map(function(a){return Gb(this,a).then(function(a){if(a){for(var b=new u,c=0;c<this.a.length;c++)if(this.a[c].ga==a){this.a[c].oa=b;break}return Promise.all([a.remove(),b])}}.bind(this))}.bind(a)))}
|
|
58
|
+
function Eb(a){var b=a.b?a.b.initData:[];b.forEach(function(a){Hb(this,a.initDataType,a.initData)}.bind(a));a.m.forEach(function(a){Gb(this,a)}.bind(a));b.length||a.m.length||a.i.resolve();return a.i}m.keySystem=function(){return this.b?this.b.keySystem:""};function Ib(a){return a.a.map(function(a){return a.ga.sessionId})}m.qb=function(){var a=this.a.map(function(a){a=a.ga.expiration;return isNaN(a)?Infinity:a});return Math.min.apply(Math,a)};
|
|
59
|
+
function Bb(a,b,c,d,e){var f=Jb(a),g=Kb(a,b);b.periods.forEach(function(a){a.variants.forEach(function(a){f&&(a.drmInfos=[f]);g&&(a.drmInfos=g);a.drmInfos.forEach(function(b){Lb(this,b);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready");var f=d[b.keySystem];f||(f={audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:c?"required":"optional",sessionTypes:[c?"persistent-license":"temporary"],label:b.keySystem,
|
|
60
|
+
drmInfos:[]},d[b.keySystem]=f,e.push(b.keySystem));f.drmInfos.push(b);b.distinctiveIdentifierRequired&&(f.distinctiveIdentifier="required");b.persistentStateRequired&&(f.persistentState="required");var g=[];a.video&&g.push(a.video);a.audio&&g.push(a.audio);g.forEach(function(a){("video"==a.type?f.videoCapabilities:f.audioCapabilities).push({robustness:("video"==a.type?b.videoRobustness:b.audioRobustness)||"",contentType:lb(a.mimeType,a.codecs)})}.bind(this))}.bind(this))}.bind(this))}.bind(a))}
|
|
61
|
+
function Cb(a,b,c){if(1==c.length&&""==c[0])return Promise.reject(new p(2,6,6E3));var d=new u,e=d;[!0,!1].forEach(function(a){c.forEach(function(c){var d=b[c];d.drmInfos.some(function(a){return!!a.licenseServerUri})==a&&(0==d.audioCapabilities.length&&delete d.audioCapabilities,0==d.videoCapabilities.length&&delete d.videoCapabilities,e=e["catch"](function(){return this.c?Promise.reject():navigator.requestMediaKeySystemAccess(c,[d])}.bind(this)))}.bind(this))}.bind(a));e=e["catch"](function(){return Promise.reject(new p(2,
|
|
62
|
+
6,6001))});e=e.then(function(a){if(this.c)return Promise.reject();var c=0<=navigator.userAgent.indexOf("Edge/"),d=a.getConfiguration();this.u=(d.audioCapabilities||[]).concat(d.videoCapabilities||[]).map(function(a){return a.contentType});c&&(this.u=null);c=b[a.keySystem];Mb(this,a.keySystem,c,c.drmInfos);return this.b.licenseServerUri?a.createMediaKeys():Promise.reject(new p(2,6,6012))}.bind(a)).then(function(a){if(this.c)return Promise.reject();this.j=a;this.K=!0}.bind(a))["catch"](function(a){if(this.c)return Promise.resolve();
|
|
63
|
+
this.u=this.b=null;return a instanceof p?Promise.reject(a):Promise.reject(new p(2,6,6002,a.message))}.bind(a));d.reject();return e}
|
|
64
|
+
function Lb(a,b){var c=b.keySystem;if(c){if(!b.licenseServerUri){var d=a.f.servers[c];d&&(b.licenseServerUri=d)}b.keyIds||(b.keyIds=[]);if(c=a.f.advanced[c])b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=c.persistentStateRequired),b.videoRobustness||(b.videoRobustness=c.videoRobustness),b.audioRobustness||(b.audioRobustness=c.audioRobustness),b.serverCertificate||(b.serverCertificate=c.serverCertificate)}}
|
|
65
|
+
function Jb(a){if(hb(a.f.clearKeys))return null;var b=[],c=[],d;for(d in a.f.clearKeys){var e=a.f.clearKeys[d],f=wb(d);e=wb(e);f={kty:"oct",kid:ub(f,!1),k:ub(e,!1)};b.push(f);c.push(f.kid)}a=JSON.stringify({keys:b});c=JSON.stringify({kids:c});c=[{initData:new Uint8Array(qb(c)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
66
|
+
initData:c,keyIds:[]}}function Kb(a,b){var c=a.f,d=Object.keys(c.servers);return!d.length||b.periods.some(function(a){return a.variants.some(function(a){return a.drmInfos.length})})?null:d.map(function(a){return{keySystem:a,licenseServerUri:c.servers[a],distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]}})}
|
|
67
|
+
function Mb(a,b,c,d){var e=[],f=[],g=[],h=[];Nb(d,e,f,g,h);a.b={keySystem:b,licenseServerUri:e[0],distinctiveIdentifierRequired:"required"==c.distinctiveIdentifier,persistentStateRequired:"required"==c.persistentState,audioRobustness:c.audioCapabilities?c.audioCapabilities[0].robustness:"",videoRobustness:c.videoCapabilities?c.videoCapabilities[0].robustness:"",serverCertificate:f[0],initData:g,keyIds:h}}
|
|
68
|
+
function Nb(a,b,c,d,e){function f(a,b){return a.keyId&&a.keyId==b.keyId?!0:a.initDataType==b.initDataType&&yb(a.initData,b.initData)}a.forEach(function(a){-1==b.indexOf(a.licenseServerUri)&&b.push(a.licenseServerUri);a.serverCertificate&&-1==Ya(c,a.serverCertificate,yb)&&c.push(a.serverCertificate);a.initData&&a.initData.forEach(function(a){-1==Ya(d,a,f)&&d.push(a)});if(a.keyIds)for(var g=0;g<a.keyIds.length;++g)-1==e.indexOf(a.keyIds[g])&&e.push(a.keyIds[g])})}
|
|
69
|
+
m.Ed=function(a){for(var b=new Uint8Array(a.initData),c=0;c<this.a.length;++c)if(yb(b,this.a[c].initData))return;Hb(this,a.initDataType,b)};
|
|
70
|
+
function Gb(a,b){try{var c=a.j.createSession("persistent-license")}catch(f){var d=new p(2,6,6005,f.message);a.h(d);return Promise.reject(d)}z(a.g,c,"message",a.Dc.bind(a));z(a.g,c,"keystatuseschange",a.xc.bind(a));var e={initData:null,ga:c,loaded:!1,Qb:Infinity,oa:null};a.a.push(e);return c.load(b).then(function(a){if(!this.c){if(a)return e.loaded=!0,this.a.every(function(a){return a.loaded})&&this.i.resolve(),c;this.a.splice(this.a.indexOf(e),1);this.h(new p(2,6,6013))}}.bind(a),function(a){this.c||
|
|
71
|
+
(this.a.splice(this.a.indexOf(e),1),this.h(new p(2,6,6005,a.message)))}.bind(a))}
|
|
72
|
+
function Hb(a,b,c){try{var d=a.Y?a.j.createSession("persistent-license"):a.j.createSession()}catch(e){a.h(new p(2,6,6005,e.message));return}z(a.g,d,"message",a.Dc.bind(a));z(a.g,d,"keystatuseschange",a.xc.bind(a));a.a.push({initData:c,ga:d,loaded:!1,Qb:Infinity,oa:null});d.generateRequest(b,c.buffer)["catch"](function(a){if(!this.c){for(var b=0;b<this.a.length;++b)if(this.a[b].ga==d){this.a.splice(b,1);break}this.h(new p(2,6,6006,a.message))}}.bind(a))}
|
|
73
|
+
m.Dc=function(a){this.f.delayLicenseRequestUntilPlayed&&this.l.paused&&!this.X?this.J.push(a):Ob(this,a)};
|
|
74
|
+
function Ob(a,b){for(var c=b.target,d,e=0;e<a.a.length;e++)if(a.a[e].ga==c){d=a.a[e];break}e=Va([a.b.licenseServerUri],a.f.retryParameters);e.body=b.message;e.method="POST";"com.microsoft.playready"!=a.b.keySystem&&"com.chromecast.playready"!=a.b.keySystem||Pb(e);a.o.Va.request(2,e).then(function(a){return this.c?Promise.reject():c.update(a.data).then(function(){this.o.onEvent(new A("drmsessionupdate"));d&&(d.oa&&d.oa.resolve(),setTimeout(function(){d.loaded=!0;this.a.every(function(a){return a.loaded})&&
|
|
75
|
+
this.i.resolve()}.bind(this),5E3))}.bind(this))}.bind(a),function(a){if(this.c)return Promise.resolve();a=new p(2,6,6007,a);this.h(a);d&&d.oa&&d.oa.reject(a)}.bind(a))["catch"](function(a){if(this.c)return Promise.resolve();a=new p(2,6,6008,a.message);this.h(a);d&&d.oa&&d.oa.reject(a)}.bind(a))}
|
|
76
|
+
function Pb(a){var b=ob(a.body,!0,!0);if(-1==b.indexOf("PlayReadyKeyMessage"))a.headers["Content-Type"]="text/xml; charset=utf-8";else{b=(new DOMParser).parseFromString(b,"application/xml");for(var c=b.getElementsByTagName("HttpHeader"),d=0;d<c.length;++d)a.headers[c[d].querySelector("name").textContent]=c[d].querySelector("value").textContent;a.body=vb(b.querySelector("Challenge").textContent).buffer}}
|
|
77
|
+
m.xc=function(a){a=a.target;var b;for(b=0;b<this.a.length&&this.a[b].ga!=a;++b);if(b!=this.a.length){var c=!1;a.keyStatuses.forEach(function(a,d){if("string"==typeof d){var e=d;d=a;a=e}if("com.microsoft.playready"==this.b.keySystem&&16==d.byteLength){e=new DataView(d);var f=e.getUint32(0,!0),k=e.getUint16(4,!0),l=e.getUint16(6,!0);e.setUint32(0,f,!1);e.setUint16(4,k,!1);e.setUint16(6,l,!1)}"com.microsoft.playready"==this.b.keySystem&&"status-pending"==a&&(a="usable");"status-pending"!=a&&(this.a[b].loaded=
|
|
78
|
+
!0,this.a.every(function(a){return a.loaded})&&this.i.resolve());"expired"==a&&(c=!0);e=xb(new Uint8Array(d));this.A[e]=a}.bind(this));var d=a.expiration-Date.now();(0>d||c&&1E3>d)&&!this.a[b].oa&&(this.a.splice(b,1),a.close());sb(this.D,.5)}};m.le=function(){function a(a,c){return"expired"==c}!hb(this.A)&&jb(this.A,a)&&this.h(new p(2,6,6014));this.o.Rb(this.A)};
|
|
79
|
+
function Qb(){var a=[],b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c=[{videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:b}],d={};"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").forEach(function(b){var e=navigator.requestMediaKeySystemAccess(b,c).then(function(a){var c=a.getConfiguration().sessionTypes;c=
|
|
80
|
+
c?0<=c.indexOf("persistent-license"):!1;0<=navigator.userAgent.indexOf("Tizen 3")&&(c=!1);d[b]={persistentState:c};return a.createMediaKeys()})["catch"](function(){d[b]=null});a.push(e)});return Promise.all(a).then(function(){return d})}m.Pd=function(){for(var a=0;a<this.J.length;a++)Ob(this,this.J[a]);this.X=!0;this.J=[]};function Rb(a,b){var c=a.keySystem();return 0==b.drmInfos.length||b.drmInfos.some(function(a){return a.keySystem==c})}
|
|
81
|
+
function Sb(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=0;d<a.length;d++)for(var e=0;e<b.length;e++)if(a[d].keySystem==b[e].keySystem){var f=a[d];e=b[e];var g=[];g=g.concat(f.initData||[]);g=g.concat(e.initData||[]);var h=[];h=h.concat(f.keyIds);h=h.concat(e.keyIds);c.push({keySystem:f.keySystem,licenseServerUri:f.licenseServerUri||e.licenseServerUri,distinctiveIdentifierRequired:f.distinctiveIdentifierRequired||e.distinctiveIdentifierRequired,persistentStateRequired:f.persistentStateRequired||
|
|
82
|
+
e.persistentStateRequired,videoRobustness:f.videoRobustness||e.videoRobustness,audioRobustness:f.audioRobustness||e.audioRobustness,serverCertificate:f.serverCertificate||e.serverCertificate,initData:g,keyIds:h});break}return c}m.je=function(){this.a.forEach(function(a){var b=a.Qb,c=a.ga.expiration;isNaN(c)&&(c=Infinity);c!=b&&(this.o.onExpirationUpdated(a.ga.sessionId,c),a.Qb=c)}.bind(this))};function Tb(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ub(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)?!1:b>=a.start(0)&&b<=a.end(a.length-1)}function Vb(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=a.length-1;0<=d&&a.end(d)>b;--d)c+=a.end(d)-Math.max(a.start(d),b);return c}function Wb(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Xb(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.c=[];this.a.on("data",this.g.bind(this));this.a.on("done",this.f.bind(this))}Xb.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};
|
|
83
|
+
function Yb(a,b){var c=b.replace("mp2t","mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Zb(a,b){a.b=new u;a.c=[];var c=new Uint8Array(b);a.a.push(c);a.a.flush();return a.b}
|
|
84
|
+
Xb.prototype.g=function(a){var b=new Uint8Array(a.data.byteLength+a.initSegment.byteLength);b.set(a.initSegment,0);b.set(a.data,a.initSegment.byteLength);this.c.push(b)};Xb.prototype.f=function(){var a=zb.apply(null,this.c);this.b.resolve(a)};function $b(a){this.c=null;this.f=a;this.h=this.i=0;this.g=Infinity;this.b=this.a=null}var D={};n("shaka.text.TextEngine.registerParser",function(a,b){D[a]=b});n("shaka.text.TextEngine.unregisterParser",function(a){delete D[a]});$b.prototype.destroy=function(){this.f=this.c=null;return Promise.resolve()};$b.prototype.Ae=function(a){this.f=a};$b.prototype.setDisplayer=$b.prototype.Ae;
|
|
85
|
+
$b.prototype.Ib=function(a){var b={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.c.parseMedia(new Uint8Array(a),b)[0].startTime}catch(c){throw new p(2,2,2009,c);}};
|
|
86
|
+
function ac(a,b,c,d){return Promise.resolve().then(function(){if(this.c&&this.f)if(null==c||null==d)this.c.parseInit(new Uint8Array(b));else{var a={periodStart:this.i,segmentStart:c,segmentEnd:d};a=this.c.parseMedia(new Uint8Array(b),a).filter(function(a){return a.startTime>=this.h&&a.startTime<this.g}.bind(this));this.f.append(a);null==this.a&&(this.a=Math.max(c,this.h));this.b=Math.min(d,this.g)}}.bind(a))}
|
|
87
|
+
$b.prototype.remove=function(a,b){return Promise.resolve().then(function(){!this.f||!this.f.remove(a,b)||null==this.a||b<=this.a||a>=this.b||(a<=this.a&&b>=this.b?this.a=this.b=null:a<=this.a&&b<this.b?this.a=b:a>this.a&&b>=this.b&&(this.b=a))}.bind(this))};function bc(a,b,c){this.g=a;this.f=b;this.l=c;this.b={};this.a=null;this.c={};this.i=new bb;this.j=!1;this.h={}}
|
|
88
|
+
function cc(){var a={};'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="av1",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").forEach(function(b){a[b]=!!D[b]||
|
|
89
|
+
MediaSource.isTypeSupported(b);var c=b.split(";")[0];a[c]=a[c]||a[b]});return a}m=bc.prototype;m.destroy=function(){this.j=!0;var a=[],b;for(b in this.c){var c=this.c[b],d=c[0];this.c[b]=c.slice(0,1);d&&a.push(d.p["catch"](Qa));for(d=1;d<c.length;++d)c[d].p["catch"](Qa),c[d].p.reject()}this.a&&a.push(this.a.destroy());for(b in this.h)a.push(this.h[b].destroy());return Promise.all(a).then(function(){this.i.destroy();this.l=this.a=this.f=this.g=this.i=null;this.b={};this.h={};this.c={}}.bind(this))};
|
|
90
|
+
m.init=function(a){for(var b in a){var c=a[b];c=lb(c.mimeType,c.codecs);"text"==b?dc(this,c):(!MediaSource.isTypeSupported(c)&&window.muxjs&&"mp2t"==c.split(";")[0].split("/")[1]&&MediaSource.isTypeSupported(Yb(b,c))&&(this.h[b]=new Xb,c=Yb(b,c)),c=this.f.addSourceBuffer(c),z(this.i,c,"error",this.Me.bind(this,b)),z(this.i,c,"updateend",this.Ia.bind(this,b)),this.b[b]=c,this.c[b]=[])}};function dc(a,b){a.a||(a.a=new $b(a.l));a.a.c=new D[b]}
|
|
91
|
+
function ec(a,b){if("text"==b)var c=a.a.a;else c=fc(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}m.Db=function(){var a=this.a&&null!=this.a.a?[{start:this.a.a,end:this.a.b}]:[];return{total:Wb(this.g.buffered),audio:Wb(fc(this,"audio")),video:Wb(fc(this,"video")),text:a}};function fc(a,b){try{return a.b[b].buffered}catch(c){return null}}
|
|
92
|
+
function gc(a,b,c,d,e){return"text"==b?ac(a.a,c,d,e):a.h[b]?Zb(a.h[b],c).then(function(a){return hc(this,b,this.Sc.bind(this,b,a.buffer))}.bind(a)):hc(a,b,a.Sc.bind(a,b,c))}m.remove=function(a,b,c){return"text"==a?this.a.remove(b,c):hc(this,a,this.Tc.bind(this,a,b,c))};function ic(a,b){return"text"==b?a.a.remove(0,Infinity):hc(a,b,a.Tc.bind(a,b,0,a.f.duration))}
|
|
93
|
+
function jc(a,b,c,d,e){return"text"==b?(a.a.i=c,a=a.a,a.h=d,a.g=e,Promise.resolve()):Promise.all([hc(a,b,a.Zc.bind(a,b)),hc(a,b,a.Ce.bind(a,b,c)),hc(a,b,a.ze.bind(a,b,d,e))])}m.endOfStream=function(a){return kc(this,function(){a?this.f.endOfStream(a):this.f.endOfStream()}.bind(this))};m.ha=function(a){return kc(this,function(){this.f.duration=a}.bind(this))};m.T=function(){return this.f.duration};m.Sc=function(a,b){this.b[a].appendBuffer(b)};
|
|
94
|
+
m.Tc=function(a,b,c){c<=b?this.Ia(a):this.b[a].remove(b,c)};m.Zc=function(a){var b=this.b[a].appendWindowStart,c=this.b[a].appendWindowEnd;this.b[a].abort();this.b[a].appendWindowStart=b;this.b[a].appendWindowEnd=c;this.Ia(a)};m.hd=function(a){this.g.currentTime-=.001;this.Ia(a)};m.Ce=function(a,b){this.b[a].timestampOffset=b;this.Ia(a)};m.ze=function(a,b,c){this.b[a].appendWindowStart=0;this.b[a].appendWindowEnd=c;this.b[a].appendWindowStart=b;this.Ia(a)};
|
|
95
|
+
m.Me=function(a){this.c[a][0].p.reject(new p(2,3,3014,this.g.error?this.g.error.code:0))};m.Ia=function(a){var b=this.c[a][0];b&&(b.p.resolve(),lc(this,a))};function hc(a,b,c){if(a.j)return Promise.reject();c={start:c,p:new u};a.c[b].push(c);if(1==a.c[b].length)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new p(2,3,3017,b)):c.p.reject(new p(2,3,3015,d)),lc(a,b)}return c.p}
|
|
96
|
+
function kc(a,b){if(a.j)return Promise.reject();var c=[],d;for(d in a.b){var e=new u,f={start:function(a){a.resolve()}.bind(null,e),p:e};a.c[d].push(f);c.push(e);1==a.c[d].length&&f.start()}return Promise.all(c).then(function(){var a;try{b()}catch(k){var c=Promise.reject(new p(2,3,3015,k))}for(a in this.b)lc(this,a);return c}.bind(a),function(){return Promise.reject()}.bind(a))}function lc(a,b){a.c[b].shift();var c=a.c[b][0];if(c)try{c.start()}catch(d){c.p.reject(new p(2,3,3015,d)),lc(a,b)}};function mc(a,b,c){return c==b||a>=nc&&c==b.split("-")[0]||a>=oc&&c.split("-")[0]==b.split("-")[0]?!0:!1}var nc=1,oc=2;function pc(a){a=a.toLowerCase().split("-");var b=qc[a[0]];b&&(a[0]=b);return a.join("-")}
|
|
97
|
+
var qc={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",
|
|
98
|
+
fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",
|
|
99
|
+
lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",
|
|
100
|
+
srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};function rc(a,b,c){var d=a.video;return d&&(d.width<b.minWidth||d.width>b.maxWidth||d.width>c.width||d.height<b.minHeight||d.height>b.maxHeight||d.height>c.height||d.width*d.height<b.minPixels||d.width*d.height>b.maxPixels)||a.bandwidth<b.minBandwidth||a.bandwidth>b.maxBandwidth?!1:!0}function sc(a,b,c){var d=!1;a.variants.forEach(function(a){var e=a.allowedByApplication;a.allowedByApplication=rc(a,b,c);e!=a.allowedByApplication&&(d=!0)});return d}
|
|
101
|
+
function tc(a,b,c,d){d.variants=d.variants.filter(function(d){return a&&a.K&&!Rb(a,d)?!1:uc(d.audio,a,b)&&uc(d.video,a,c)});d.textStreams=d.textStreams.filter(function(a){return!!D[lb(a.mimeType,a.codecs)]})}
|
|
102
|
+
function uc(a,b,c){if(!a)return!0;var d=null;b&&b.K&&(d=b.u);b=lb(a.mimeType,a.codecs);var e=lb(a.mimeType,a.codecs),f=a.mimeType,g;for(g in mb){var h=a[g],k=mb[g];h&&(f+="; "+k+'="'+h+'"')}return!(D[e]||MediaSource.isTypeSupported(f)||window.muxjs&&"mp2t"==e.split(";")[0].split("/")[1]&&MediaSource.isTypeSupported(Yb(a.type,e)))||d&&a.encrypted&&0>d.indexOf(b)||c&&(a.mimeType!=c.mimeType||a.codecs.split(".")[0]!=c.codecs.split(".")[0])?!1:!0}
|
|
103
|
+
function vc(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=[];b&&k.push.apply(k,b.roles);c&&k.push.apply(k,c.roles);k=Xa(k);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,frameRate:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,
|
|
104
|
+
roles:k,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null};c&&(a.videoId=c.id,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.channelsCount=b.channelsCount,a.audioBandwidth=b.bandwidth||null,a.label=b.label);return a}
|
|
105
|
+
function wc(a){return{id:a.id,active:!1,type:"text",bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null}}function xc(a){var b=[],c=yc(a.variants);a=a.textStreams;c.forEach(function(a){b.push(vc(a))});a.forEach(function(a){b.push(wc(a))});return b}
|
|
106
|
+
function zc(a,b,c){return yc(a.variants).map(function(a){var d=vc(a);a.video&&a.audio?d.active=c==a.video.id&&b==a.audio.id:a.video?d.active=c==a.video.id:a.audio&&(d.active=b==a.audio.id);return d})}function Ac(a,b){return a.textStreams.map(function(a){var c=wc(a);c.active=b==a.id;return c})}function Bc(a,b){for(var c=0;c<a.variants.length;c++)if(a.variants[c].id==b.id)return a.variants[c];return null}
|
|
107
|
+
function Cc(a,b){for(var c=0;c<a.textStreams.length;c++)if(a.textStreams[c].id==b.id)return a.textStreams[c];return null}function Dc(a){return a.allowedByApplication&&a.allowedByKeySystem}function yc(a){return a.filter(function(a){return Dc(a)})}
|
|
108
|
+
function Ec(a,b,c,d){var e=yc(a),f=e;a=e.filter(function(a){return a.primary});a.length&&(f=a);var g=f.length?f[0].language:"";f=f.filter(function(a){return a.language==g});if(b){var h=pc(b);[oc,nc,0].forEach(function(a){var b=!1;e.forEach(function(c){h=pc(h);var e=pc(c.language);mc(a,h,e)&&(b?f.push(c):(f=[c],b=!0),d&&(d.audio=!0))})})}if(c&&(b=Fc(f,c),b.length))return b;b=f.map(function(a){return(a.audio?a.audio.roles:[]).concat(a.video?a.video.roles:[])}).reduce(Pa,[]);return b.length?Fc(f,b[0]):
|
|
109
|
+
f}function Gc(a,b,c,d){var e=a,f=a.filter(function(a){return a.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(a){return a.language==g});if(b){var h=pc(b);[oc,nc,0].forEach(function(b){var c=!1;a.forEach(function(a){var f=pc(a.language);mc(b,h,f)&&(c?e.push(a):(e=[a],c=!0),d&&(d.text=!0))})})}b=c?Hc(e,c):e.filter(function(a){return 0==a.roles.length});if(b.length)return b;b=e.map(function(a){return a.roles}).reduce(Pa,[]);return b.length?Hc(e,b[0]):e}
|
|
110
|
+
function Fc(a,b){return a.filter(function(a){return a.audio&&0<=a.audio.roles.indexOf(b)||a.video&&0<=a.video.roles.indexOf(b)})}function Hc(a,b){return a.filter(function(a){return 0<=a.roles.indexOf(b)})}function Ic(a,b,c){for(var d=0;d<c.length;d++)if(c[d].audio==a&&c[d].video==b)return c[d];return null}function Jc(a,b,c){function d(a,b){return null==a?null==b:b.id==a}for(var e=0;e<c.length;e++)if(d(a,c[e].audio)&&d(b,c[e].video))return c[e];return null}
|
|
111
|
+
function Kc(a,b){for(var c=a.periods.length-1;0<c;--c)if(b+gb>=a.periods[c].startTime)return c;return 0}function Lc(a,b){for(var c=0;c<a.periods.length;++c){var d=a.periods[c];if("text"==b.type)for(var e=0;e<d.textStreams.length;++e){if(d.textStreams[e]==b)return c}else for(e=0;e<d.variants.length;++e){var f=d.variants[e];if(f.audio==b||f.video==b||f.video&&f.video.trickModeVideo==b)return c}}return-1};function E(){this.h=null;this.c=!1;this.b=new pa;this.g=[];this.i=!1;this.a=this.f=null}n("shaka.abr.SimpleAbrManager",E);E.prototype.stop=function(){this.h=null;this.c=!1;this.g=[];this.f=null};E.prototype.stop=E.prototype.stop;E.prototype.init=function(a){this.h=a};E.prototype.init=E.prototype.init;
|
|
112
|
+
E.prototype.chooseVariant=function(){var a=Mc(this.a.restrictions,this.g),b=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);if(this.g.length&&!a.length)throw new p(2,4,4012);for(var c=a[0]||null,d=0;d<a.length;++d){var e=a[d],f=(a[d+1]||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;b>=e.bandwidth/this.a.bandwidthDowngradeTarget&&b<=f&&(c=e)}this.f=Date.now();return c};E.prototype.chooseVariant=E.prototype.chooseVariant;E.prototype.enable=function(){this.c=!0};
|
|
113
|
+
E.prototype.enable=E.prototype.enable;E.prototype.disable=function(){this.c=!1};E.prototype.disable=E.prototype.disable;E.prototype.segmentDownloaded=function(a,b){var c=this.b;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.a+=b;na(c.b,e,d);na(c.c,e,d)}if(null!=this.f&&this.c)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.f<1E3*this.a.switchInterval)break a;c=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(c)}};
|
|
114
|
+
E.prototype.segmentDownloaded=E.prototype.segmentDownloaded;E.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};E.prototype.getBandwidthEstimate=E.prototype.getBandwidthEstimate;E.prototype.setVariants=function(a){this.g=a};E.prototype.setVariants=E.prototype.setVariants;E.prototype.configure=function(a){this.a=a};E.prototype.configure=E.prototype.configure;
|
|
115
|
+
function Mc(a,b){return b.filter(function(b){return rc(b,a,{width:Infinity,height:Infinity})}).sort(function(a,b){return a.bandwidth-b.bandwidth})};var Nc="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Oc="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Pc=["loop","playbackRate"],Qc=["pause","play"],Rc="adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading".split(" "),Sc={drmInfo:20,getAudioLanguages:2,getAudioLanguagesAndRoles:2,
|
|
116
|
+
getBufferedInfo:2,getConfiguration:2,getExpiration:2,getManifestUri:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1},Tc={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Uc=[["getConfiguration","configure"]],Vc=[["isTextTrackVisible","setTextTrackVisibility"]],$c="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),
|
|
117
|
+
ad=["load","unload"];function bd(a){return JSON.stringify(a,function(a,c){if("function"!=typeof c){if(c instanceof Event||c instanceof A){var b={},e;for(e in c){var f=c[e];f&&"object"==typeof f?"detail"==e&&(b[e]=f):e in Event||(b[e]=f)}return b}if(c instanceof TimeRanges)for(b={__type__:"TimeRanges",length:c.length,start:[],end:[]},e=0;e<c.length;++e)b.start.push(c.start(e)),b.end.push(c.end(e));else b="number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return b}})}
|
|
118
|
+
function cd(a){return JSON.parse(a,function(a,c){return"NaN"==c?NaN:"-Infinity"==c?-Infinity:"Infinity"==c?Infinity:c&&"object"==typeof c&&"TimeRanges"==c.__type__?dd(c):c})}function dd(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}};function ed(a,b,c,d,e,f){this.J=a;this.g=b;this.K=c;this.j=!1;this.A=d;this.D=e;this.u=f;this.b=this.h=!1;this.v="";this.i=null;this.l=this.vc.bind(this);this.m=this.Ld.bind(this);this.a={video:{},player:{}};this.o=0;this.c={};this.f=null}var fd=!1,F=null;m=ed.prototype;m.destroy=function(){gd(this);F&&hd(this);this.D=this.A=this.g=null;this.b=this.h=!1;this.m=this.l=this.f=this.c=this.a=this.i=null;return Promise.resolve()};m.$=function(){return this.b};m.Wb=function(){return this.v};
|
|
119
|
+
m.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.g();var a=new chrome.cast.SessionRequest(this.J);a=new chrome.cast.ApiConfig(a,this.wc.bind(this),this.Rd.bind(this),"origin_scoped");chrome.cast.initialize(a,function(){},function(){});fd&&setTimeout(this.g.bind(this),20);(a=F)&&a.status!=chrome.cast.SessionStatus.STOPPED?this.wc(a):F=null}else window.__onGCastApiAvailable=function(a){a&&this.init()}.bind(this)};
|
|
120
|
+
m.Zb=function(a){this.i=a;this.b&&id({type:"appData",appData:this.i})};m.cast=function(a){if(!this.h)return Promise.reject(new p(1,8,8E3));if(!fd)return Promise.reject(new p(1,8,8001));if(this.b)return Promise.reject(new p(1,8,8002));this.f=new u;chrome.cast.requestSession(this.Tb.bind(this,a),this.uc.bind(this));return this.f};m.pb=function(){this.b&&(gd(this),F&&(hd(this),F.stop(function(){},function(){}),F=null))};
|
|
121
|
+
m.get=function(a,b){if("video"==a){if(0<=Qc.indexOf(b))return this.Ic.bind(this,a,b)}else if("player"==a){if(Tc[b]&&!this.get("player","isLive")())return function(){};if(0<=$c.indexOf(b))return this.Ic.bind(this,a,b);if(0<=ad.indexOf(b))return this.pe.bind(this,a,b);if(Sc[b])return this.Fc.bind(this,a,b)}return this.Fc(a,b)};m.set=function(a,b,c){this.a[a][b]=c;id({type:"set",targetName:a,property:b,value:c})};
|
|
122
|
+
m.Tb=function(a,b){F=b;b.addUpdateListener(this.l);b.addMessageListener("urn:x-cast:com.google.shaka.v2",this.m);this.vc();id({type:"init",initState:a,appData:this.i});this.f.resolve()};m.uc=function(a){var b=8003;switch(a.code){case "cancel":b=8004;break;case "timeout":b=8005;break;case "receiver_unavailable":b=8006}this.f.reject(new p(2,8,b,a))};m.Fc=function(a,b){return this.a[a][b]};m.Ic=function(a,b){id({type:"call",targetName:a,methodName:b,args:Array.prototype.slice.call(arguments,2)})};
|
|
123
|
+
m.pe=function(a,b){var c=Array.prototype.slice.call(arguments,2),d=new u,e=this.o.toString();this.o++;this.c[e]=d;id({type:"asyncCall",targetName:a,methodName:b,args:c,id:e});return d};m.wc=function(a){var b=this.u();this.f=new u;this.j=!0;this.Tb(b,a)};m.Rd=function(a){fd="available"==a;this.g()};function hd(a){var b=F;b.removeUpdateListener(a.l);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.m)}
|
|
124
|
+
m.vc=function(){var a=F?"connected"==F.status:!1;if(this.b&&!a){this.D();for(var b in this.a)this.a[b]={};gd(this)}this.v=(this.b=a)?F.receiver.friendlyName:"";this.g()};function gd(a){for(var b in a.c){var c=a.c[b];delete a.c[b];c.reject(new p(1,7,7E3))}}
|
|
125
|
+
m.Ld=function(a,b){var c=cd(b);switch(c.type){case "event":var d=c.targetName,e=c.event;this.A(d,new A(e.type,e));break;case "update":e=c.update;for(d in e){c=this.a[d]||{};for(var f in e[d])c[f]=e[d][f]}this.j&&(this.K(),this.j=!1);break;case "asyncComplete":if(d=c.id,f=c.error,c=this.c[d],delete this.c[d],c)if(f){d=new p(f.severity,f.category,f.code);for(e in f)d[e]=f[e];c.reject(d)}else c.resolve()}};function id(a){a=bd(a);F.sendMessage("urn:x-cast:com.google.shaka.v2",a,function(){},ra)};function G(){this.yb=new ab;this.fb=this}G.prototype.addEventListener=function(a,b){this.yb.push(a,b)};G.prototype.removeEventListener=function(a,b){this.yb.remove(a,b)};G.prototype.dispatchEvent=function(a){for(var b=this.yb.get(a.type)||[],c=0;c<b.length;++c){a.target=this.fb;a.currentTarget=this.fb;var d=b[c];try{d.handleEvent?d.handleEvent(a):d.call(this,a)}catch(e){}if(a.a)break}return a.defaultPrevented};function H(a,b,c){G.call(this);this.c=a;this.b=b;this.i=this.g=this.f=this.j=this.h=null;this.a=new ed(c,this.He.bind(this),this.Ie.bind(this),this.Je.bind(this),this.Ke.bind(this),this.nc.bind(this));jd(this)}la(H,G);n("shaka.cast.CastProxy",H);H.prototype.destroy=function(a){a&&this.a&&this.a.pb();a=[this.i?this.i.destroy():null,this.b?this.b.destroy():null,this.a?this.a.destroy():null];this.a=this.i=this.j=this.h=this.b=this.c=null;return Promise.all(a)};H.prototype.destroy=H.prototype.destroy;
|
|
126
|
+
H.prototype.xd=function(){return this.h};H.prototype.getVideo=H.prototype.xd;H.prototype.od=function(){return this.j};H.prototype.getPlayer=H.prototype.od;H.prototype.$c=function(){return this.a?this.a.h&&fd:!1};H.prototype.canCast=H.prototype.$c;H.prototype.$=function(){return this.a?this.a.$():!1};H.prototype.isCasting=H.prototype.$;H.prototype.Wb=function(){return this.a?this.a.Wb():""};H.prototype.receiverName=H.prototype.Wb;H.prototype.cast=function(){var a=this.nc();return this.a.cast(a).then(function(){return this.b.wb()}.bind(this))};
|
|
127
|
+
H.prototype.cast=H.prototype.cast;H.prototype.Zb=function(a){this.a.Zb(a)};H.prototype.setAppData=H.prototype.Zb;H.prototype.Oe=function(){var a=this.a;if(a.b){var b=a.u();chrome.cast.requestSession(a.Tb.bind(a,b),a.uc.bind(a))}};H.prototype.suggestDisconnect=H.prototype.Oe;H.prototype.pb=function(){this.a.pb()};H.prototype.forceDisconnect=H.prototype.pb;
|
|
128
|
+
function jd(a){a.a.init();a.i=new bb;Nc.forEach(function(a){z(this.i,this.c,a,this.Ve.bind(this))}.bind(a));Rc.forEach(function(a){z(this.i,this.b,a,this.he.bind(this))}.bind(a));a.h={};for(var b in a.c)Object.defineProperty(a.h,b,{configurable:!1,enumerable:!0,get:a.Ue.bind(a,b),set:a.We.bind(a,b)});a.j={};for(b in a.b)Object.defineProperty(a.j,b,{configurable:!1,enumerable:!0,get:a.ge.bind(a,b)});a.f=new G;a.f.fb=a.h;a.g=new G;a.g.fb=a.j}m=H.prototype;
|
|
129
|
+
m.nc=function(){var a={video:{},player:{},playerAfterLoad:{},manifest:this.b.Fb(),startTime:null};this.c.pause();Pc.forEach(function(b){a.video[b]=this.c[b]}.bind(this));this.c.ended||(a.startTime=this.c.currentTime);Uc.forEach(function(b){var c=b[1];b=this.b[b[0]]();a.player[c]=b}.bind(this));Vc.forEach(function(b){var c=b[1];b=this.b[b[0]]();a.playerAfterLoad[c]=b}.bind(this));return a};m.He=function(){this.dispatchEvent(new A("caststatuschanged"))};
|
|
130
|
+
m.Ie=function(){this.f.dispatchEvent(new A(this.h.paused?"pause":"play"))};
|
|
131
|
+
m.Ke=function(){Uc.forEach(function(a){var b=a[1];a=this.a.get("player",a[0])();this.b[b](a)}.bind(this));var a=this.a.get("player","getManifestUri")(),b=this.a.get("video","ended"),c=Promise.resolve(),d=this.c.autoplay,e=null;b||(e=this.a.get("video","currentTime"));a&&(this.c.autoplay=!1,c=this.b.load(a,e),c["catch"](function(a){this.b.dispatchEvent(new A("error",{detail:a}))}.bind(this)));var f={};Pc.forEach(function(a){f[a]=this.a.get("video",a)}.bind(this));c.then(function(){Pc.forEach(function(a){this.c[a]=
|
|
132
|
+
f[a]}.bind(this));Vc.forEach(function(a){var b=a[1];a=this.a.get("player",a[0])();this.b[b](a)}.bind(this));this.c.autoplay=d;a&&this.c.play()}.bind(this))};
|
|
133
|
+
m.Ue=function(a){if("addEventListener"==a)return this.f.addEventListener.bind(this.f);if("removeEventListener"==a)return this.f.removeEventListener.bind(this.f);if(this.a.$()&&0==Object.keys(this.a.a.video).length){var b=this.c[a];if("function"!=typeof b)return b}return this.a.$()?this.a.get("video",a):(b=this.c[a],"function"==typeof b&&(b=b.bind(this.c)),b)};m.We=function(a,b){this.a.$()?this.a.set("video",a,b):this.c[a]=b};m.Ve=function(a){this.a.$()||this.f.dispatchEvent(new A(a.type,a))};
|
|
134
|
+
m.ge=function(a){return"addEventListener"==a?this.g.addEventListener.bind(this.g):"removeEventListener"==a?this.g.removeEventListener.bind(this.g):"getMediaElement"==a?function(){return this.h}.bind(this):"getNetworkingEngine"==a?this.b.oc.bind(this.b):"getManifest"==a?this.a.$()?function(){return null}:this.b.Ea.bind(this.b):this.a.$()&&0==Object.keys(this.a.a.video).length&&Sc[a]||!this.a.$()?(a=this.b[a],a.bind(this.b)):this.a.get("player",a)};m.he=function(a){this.a.$()||this.g.dispatchEvent(a)};
|
|
135
|
+
m.Je=function(a,b){this.a.$()&&("video"==a?this.f.dispatchEvent(b):"player"==a&&this.g.dispatchEvent(b))};function I(a,b,c,d){G.call(this);this.a=a;this.b=b;this.o={video:a,player:b};this.u=c||function(){};this.v=d||function(a){return a};this.m=!1;this.g=!0;this.f=0;this.l=!1;this.i=!0;this.j=this.h=this.c=null;kd(this)}la(I,G);n("shaka.cast.CastReceiver",I);I.prototype.isConnected=function(){return this.m};I.prototype.isConnected=I.prototype.isConnected;I.prototype.zd=function(){return this.g};I.prototype.isIdle=I.prototype.zd;
|
|
136
|
+
I.prototype.destroy=function(){var a=this.b?this.b.destroy():Promise.resolve();null!=this.j&&window.clearTimeout(this.j);this.u=this.o=this.b=this.a=null;this.m=!1;this.g=!0;this.j=this.h=this.c=null;return a.then(function(){cast.receiver.CastReceiverManager.getInstance().stop()})};I.prototype.destroy=I.prototype.destroy;
|
|
137
|
+
function kd(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=a.Cc.bind(a);b.onSenderDisconnected=a.Cc.bind(a);b.onSystemVolumeChanged=a.gd.bind(a);a.h=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.h.onMessage=a.Gd.bind(a);a.c=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.c.onMessage=a.Ud.bind(a);b.start();Nc.forEach(function(a){this.a.addEventListener(a,this.Gc.bind(this,"video"))}.bind(a));Rc.forEach(function(a){this.b.addEventListener(a,this.Gc.bind(this,
|
|
138
|
+
"player"))}.bind(a));cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.b.$b(3840,2160):a.b.$b(1920,1080);a.a.addEventListener("loadeddata",function(){this.l=!0}.bind(a));a.b.addEventListener("loading",function(){this.g=!1;ld(this)}.bind(a));a.a.addEventListener("playing",function(){this.g=!1;ld(this)}.bind(a));a.a.addEventListener("pause",function(){ld(this)}.bind(a));a.b.addEventListener("unloading",function(){this.g=!0;ld(this)}.bind(a));
|
|
139
|
+
a.a.addEventListener("ended",function(){window.setTimeout(function(){this.a&&this.a.ended&&(this.g=!0,ld(this))}.bind(this),5E3)}.bind(a))}m=I.prototype;m.Cc=function(){this.f=0;this.i=!0;this.m=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ld(this)};function ld(a){Promise.resolve().then(function(){this.dispatchEvent(new A("caststatuschanged"));md(this)||nd(this,0)}.bind(a))}
|
|
140
|
+
function od(a,b,c){for(var d in b.player)a.b[d](b.player[d]);a.u(c);c=Promise.resolve();var e=a.a.autoplay;b.manifest&&(a.a.autoplay=!1,c=a.b.load(b.manifest,b.startTime),c["catch"](function(a){this.b.dispatchEvent(new A("error",{detail:a}))}.bind(a)));c.then(function(){for(var a in b.video){var c=b.video[a];this.a[a]=c}for(a in b.playerAfterLoad)c=b.playerAfterLoad[a],this.b[a](c);this.a.autoplay=e;b.manifest&&(this.a.play(),nd(this,0))}.bind(a))}
|
|
141
|
+
m.Gc=function(a,b){this.b&&(this.Ub(),pd(this,{type:"event",targetName:a,event:b},this.c))};
|
|
142
|
+
m.Ub=function(){null!=this.j&&window.clearTimeout(this.j);this.j=window.setTimeout(this.Ub.bind(this),500);var a={video:{},player:{}};Oc.forEach(function(b){a.video[b]=this.a[b]}.bind(this));if(this.b.P())for(var b in Tc){var c=Tc[b];0==this.f%c&&(a.player[b]=this.b[b]())}for(b in Sc)c=Sc[b],0==this.f%c&&(a.player[b]=this.b[b]());if(b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())a.video.volume=b.level,a.video.muted=b.muted;this.l&&(this.f+=1);pd(this,{type:"update",update:a},
|
|
143
|
+
this.c);md(this)};function md(a){return a.i&&(a.a.duration||a.b.P())?(qd(a),a.i=!1,!0):!1}function qd(a){var b={contentId:a.b.Fb(),streamType:a.b.P()?"LIVE":"BUFFERED",duration:a.a.duration,contentType:""};nd(a,0,b)}m.gd=function(){var a=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();a&&pd(this,{type:"update",update:{video:{volume:a.level,muted:a.muted}}},this.c);pd(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.c)};
|
|
144
|
+
m.Ud=function(a){var b=cd(a.data);switch(b.type){case "init":this.f=0;this.l=!1;this.i=!0;od(this,b.initState,b.appData);this.Ub();break;case "appData":this.u(b.appData);break;case "set":var c=b.targetName,d=b.property,e=b.value;if("video"==c)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==d){b.setSystemVolumeLevel(e);break}else if("muted"==d){b.setSystemVolumeMuted(e);break}this.o[c][d]=e;break;case "call":c=b.targetName;d=b.methodName;e=b.args;var f=this.o[c];f[d].apply(f,e);break;
|
|
145
|
+
case "asyncCall":c=b.targetName,d=b.methodName,"player"==c&&"load"==d&&(this.f=0,this.l=!1),e=b.args,b=b.id,a=a.senderId,f=this.o[c],e=f[d].apply(f,e),"player"==c&&"load"==d&&(e=e.then(function(){this.i=!0}.bind(this))),e.then(this.Nc.bind(this,a,b,null),this.Nc.bind(this,a,b))}};
|
|
146
|
+
m.Gd=function(a){var b=cd(a.data);switch(b.type){case "PLAY":this.a.play();nd(this,0);break;case "PAUSE":this.a.pause();nd(this,0);break;case "SEEK":a=b.currentTime;var c=b.resumeState;null!=a&&(this.a.currentTime=Number(a));c&&"PLAYBACK_START"==c?(this.a.play(),nd(this,0)):c&&"PLAYBACK_PAUSE"==c&&(this.a.pause(),nd(this,0));break;case "STOP":this.b.wb().then(function(){nd(this,0)}.bind(this));break;case "GET_STATUS":nd(this,Number(b.requestId));break;case "VOLUME":c=b.volume;a=c.level;c=c.muted;
|
|
147
|
+
var d=this.a.volume,e=this.a.muted;null!=a&&(this.a.volume=Number(a));null!=c&&(this.a.muted=c);d==this.a.volume&&e==this.a.muted||nd(this,0);break;case "LOAD":this.f=0;this.i=this.l=!1;c=b.media.contentId;a=b.currentTime;c=this.v(c);this.a.autoplay=!0;this.b.load(c,a).then(function(){qd(this)}.bind(this))["catch"](function(a){var c="LOAD_FAILED";7==a.category&&7E3==a.code&&(c="LOAD_CANCELLED");pd(this,{requestId:Number(b.requestId),type:c},this.h)}.bind(this));break;default:pd(this,{requestId:Number(b.requestId),
|
|
148
|
+
type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.h)}};m.Nc=function(a,b,c){pd(this,{type:"asyncComplete",id:b,error:c},this.c,a)};function pd(a,b,c,d){a.m&&(a=bd(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}
|
|
149
|
+
function nd(a,b,c){var d=a.a.playbackRate;var e=rd;e=a.g?e.IDLE:a.b.rc()?e.Uc:a.a.paused?e.Wc:e.Xc;d={mediaSessionId:0,playbackRate:d,playerState:e,currentTime:a.a.currentTime,supportedMediaCommands:15,volume:{level:a.a.volume,muted:a.a.muted}};c&&(d.media=c);pd(a,{requestId:b,type:"MEDIA_STATUS",status:[d]},a.h)}var rd={IDLE:"IDLE",Xc:"PLAYING",Uc:"BUFFERING",Wc:"PAUSED"};function sd(a,b){var c=J(a,b);return 1!=c.length?null:c[0]}function J(a,b){return Array.prototype.filter.call(a.childNodes,function(a){return a.tagName==b})}function td(a){var b=a.firstChild;return b&&b.nodeType==Node.TEXT_NODE?a.textContent.trim():null}function K(a,b,c,d){var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?void 0!=d?d:null:e}function ud(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
|
|
150
|
+
function vd(a){if(!a)return null;a=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}function wd(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}
|
|
151
|
+
function xd(a){a=Number(a);return 0===a%1?a:null}function yd(a){a=Number(a);return 0===a%1&&0<a?a:null}function zd(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Ad(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1]/b[2]):Number(a);return isNaN(a)?null:a};var Bd={"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"};
|
|
152
|
+
function Cd(a,b,c){a=Dd(a);var d=null,e=[],f=[],g=a.map(function(a){return a.keyId}).filter(Ra);if(g.length&&1<g.filter(Sa).length)throw new p(2,4,4010);c||(f=a.filter(function(a){return"urn:mpeg:dash:mp4protection:2011"==a.Mc?(d=a.init||d,!1):!0}),f.length&&(e=Ed(d,b,f),0==e.length&&(e=[fb("",d)])));!a.length||!c&&f.length||(e=ib(Bd).map(function(a){return fb(a,d)}));var h=g[0]||null;h&&e.forEach(function(a){a.initData.forEach(function(a){a.keyId=h})});return{jc:h,df:d,drmInfos:e,mc:!0}}
|
|
153
|
+
function Fd(a,b,c,d){var e=Cd(a,b,d);if(c.mc){a=1==c.drmInfos.length&&!c.drmInfos[0].keySystem;b=0==e.drmInfos.length;if(0==c.drmInfos.length||a&&!b)c.drmInfos=e.drmInfos;c.mc=!1}else if(0<e.drmInfos.length&&(c.drmInfos=c.drmInfos.filter(function(a){return e.drmInfos.some(function(b){return b.keySystem==a.keySystem})}),0==c.drmInfos.length))throw new p(2,4,4008);return e.jc||c.jc}function Ed(a,b,c){return c.map(function(c){var d=Bd[c.Mc];return d?[fb(d,c.init||a)]:b(c.node)||[]}).reduce(Pa,[])}
|
|
154
|
+
function Dd(a){return a.map(function(a){var b=a.getAttribute("schemeIdUri"),d=a.getAttribute("cenc:default_KID"),e=J(a,"cenc:pssh").map(td);if(!b)return null;b=b.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),0<=d.indexOf(" ")))throw new p(2,4,4009);var f=[];try{f=e.map(function(a){return{initDataType:"cenc",initData:vb(a),keyId:null}})}catch(g){throw new p(2,4,4007);}return{node:a,Mc:b,keyId:d,init:0<f.length?f:null}}).filter(Ra)};function Gd(a,b,c,d,e){null!=e&&(e=Math.round(e));var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)d)?\$/g,function(a,b,c){if("$$"==a)return"$";var d=f[b];if(null==d)return a;"RepresentationID"==b&&c&&(c=void 0);a=d.toString();c=window.parseInt(c,10)||1;return Array(Math.max(0,c-a.length)+1).join("0")+a})}
|
|
155
|
+
function Hd(a,b){var c=Id(a,b,"timescale"),d=1;c&&(d=yd(c)||1);c=Id(a,b,"duration");(c=yd(c||""))&&(c/=d);var e=Id(a,b,"startNumber"),f=Number(Id(a,b,"presentationTimeOffset"))||0,g=zd(e||"");if(null==e||null==g)g=1;var h=Jd(a,b,"SegmentTimeline");e=null;if(h){e=d;var k=a.M.duration||Infinity;h=J(h,"S");for(var l=[],q=0,v=0;v<h.length;++v){var r=h[v],t=K(r,"t",zd),y=K(r,"d",zd);r=K(r,"r",xd);null!=t&&(t-=f);if(!y)break;t=null!=t?t:q;r=r||0;if(0>r)if(v+1<h.length){r=K(h[v+1],"t",zd);if(null==r)break;
|
|
156
|
+
else if(t>=r)break;r=Math.ceil((r-t)/y)-1}else{if(Infinity==k)break;else if(t/e>=k)break;r=Math.ceil((k*e-t)/y)-1}0<l.length&&t!=q&&(l[l.length-1].end=t/e);for(var w=0;w<=r;++w)q=t+y,l.push({start:t/e,end:q/e,Se:t}),t=q}e=l}return{timescale:d,R:c,Aa:g,V:f/d||0,fc:f,I:e}}function Id(a,b,c){return[b(a.w),b(a.S),b(a.ba)].filter(Ra).map(function(a){return a.getAttribute(c)}).reduce(function(a,b){return a||b})}
|
|
157
|
+
function Jd(a,b,c){return[b(a.w),b(a.S),b(a.ba)].filter(Ra).map(function(a){return sd(a,c)}).reduce(function(a,b){return a||b})}function Kd(a,b){var c=new DOMParser;try{var d=C(a);var e=c.parseFromString(d,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==b)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f}
|
|
158
|
+
function Ld(a,b,c,d,e,f){for(var g=a.getAttribute("xlink:href"),h=a.getAttribute("xlink:actuate")||"onRequest",k=0;k<a.attributes.length;k++){var l=a.attributes[k].nodeName;-1!=l.indexOf("xlink:")&&(a.removeAttribute(l),--k)}if(5<=f)return Promise.reject(new p(2,4,4028));if("onLoad"!=h)return Promise.reject(new p(2,4,4027));var q=B([d],[g]);return e.request(0,Va(q,b)).then(function(d){d=Kd(d.data,a.tagName);if(!d)return Promise.reject(new p(2,4,4001,g));for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);
|
|
159
|
+
for(;d.childNodes.length;){var h=d.childNodes[0];d.removeChild(h);a.appendChild(h)}for(h=0;h<d.attributes.length;h++){var k=d.attributes[h].nodeName,l=d.getAttribute(k);a.setAttribute(k,l)}return Md(a,b,c,q[0],e,f+1)}.bind(a))}
|
|
160
|
+
function Md(a,b,c,d,e,f){f=f||0;if(a.getAttribute("xlink:href")){var g=Ld(a,b,c,d,e,f);c&&(g=g["catch"](function(){return Md(a,b,c,d,e,f)}));return g}for(g=0;g<a.childNodes.length;g++){var h=a.childNodes[g];h instanceof Element&&"urn:mpeg:dash:resolve-to-zero:2013"==h.getAttribute("xlink:href")&&(a.removeChild(h),--g)}var k=[];for(g=0;g<a.childNodes.length;g++)h=a.childNodes[g],h.nodeType==Node.ELEMENT_NODE&&(h=Md(h,b,c,d,e,f),k.push(h));return Promise.all(k).then(function(){return a})};function L(a,b,c){this.a=a;this.O=b;this.F=c}n("shaka.media.InitSegmentReference",L);L.prototype.Bb=function(){return this.a()};L.prototype.createUris=L.prototype.Bb;L.prototype.Hb=function(){return this.O};L.prototype.getStartByte=L.prototype.Hb;L.prototype.Eb=function(){return this.F};L.prototype.getEndByte=L.prototype.Eb;function M(a,b,c,d,e,f){this.position=a;this.startTime=b;this.endTime=c;this.a=d;this.O=e;this.F=f}n("shaka.media.SegmentReference",M);M.prototype.U=function(){return this.position};
|
|
161
|
+
M.prototype.getPosition=M.prototype.U;M.prototype.Ib=function(){return this.startTime};M.prototype.getStartTime=M.prototype.Ib;M.prototype.ld=function(){return this.endTime};M.prototype.getEndTime=M.prototype.ld;M.prototype.Bb=function(){return this.a()};M.prototype.createUris=M.prototype.Bb;M.prototype.Hb=function(){return this.O};M.prototype.getStartByte=M.prototype.Hb;M.prototype.Eb=function(){return this.F};M.prototype.getEndByte=M.prototype.Eb;function N(a,b){this.H=a;this.b=b==Nd;this.a=0}n("shaka.util.DataViewReader",N);var Nd=1;N.Endianness={Ye:0,af:Nd};N.prototype.ea=function(){return this.a<this.H.byteLength};N.prototype.hasMoreData=N.prototype.ea;N.prototype.U=function(){return this.a};N.prototype.getPosition=N.prototype.U;N.prototype.md=function(){return this.H.byteLength};N.prototype.getLength=N.prototype.md;N.prototype.ca=function(){try{var a=this.H.getUint8(this.a)}catch(b){Od()}this.a+=1;return a};N.prototype.readUint8=N.prototype.ca;
|
|
162
|
+
N.prototype.Xa=function(){try{var a=this.H.getUint16(this.a,this.b)}catch(b){Od()}this.a+=2;return a};N.prototype.readUint16=N.prototype.Xa;N.prototype.C=function(){try{var a=this.H.getUint32(this.a,this.b)}catch(b){Od()}this.a+=4;return a};N.prototype.readUint32=N.prototype.C;N.prototype.Hc=function(){try{var a=this.H.getInt32(this.a,this.b)}catch(b){Od()}this.a+=4;return a};N.prototype.readInt32=N.prototype.Hc;
|
|
163
|
+
N.prototype.Ma=function(){try{if(this.b){var a=this.H.getUint32(this.a,!0);var b=this.H.getUint32(this.a+4,!0)}else b=this.H.getUint32(this.a,!1),a=this.H.getUint32(this.a+4,!1)}catch(c){Od()}if(2097151<b)throw new p(2,3,3001);this.a+=8;return b*Math.pow(2,32)+a};N.prototype.readUint64=N.prototype.Ma;N.prototype.La=function(a){this.a+a>this.H.byteLength&&Od();var b=new Uint8Array(this.H.buffer,this.H.byteOffset+this.a,a);this.a+=a;return new Uint8Array(b)};N.prototype.readBytes=N.prototype.La;
|
|
164
|
+
N.prototype.G=function(a){this.a+a>this.H.byteLength&&Od();this.a+=a};N.prototype.skip=N.prototype.G;N.prototype.Lc=function(a){this.a<a&&Od();this.a-=a};N.prototype.rewind=N.prototype.Lc;N.prototype.seek=function(a){(0>a||a>this.H.byteLength)&&Od();this.a=a};N.prototype.seek=N.prototype.seek;N.prototype.Vb=function(){for(var a=this.a;this.ea()&&0!=this.H.getUint8(this.a);)this.a+=1;a=new Uint8Array(this.H.buffer,this.H.byteOffset+a,this.a-a);this.a+=1;return C(a)};
|
|
165
|
+
N.prototype.readTerminatedString=N.prototype.Vb;function Od(){throw new p(2,3,3E3);};function O(){this.c=[];this.b=[];this.a=!1}n("shaka.util.Mp4Parser",O);O.prototype.B=function(a,b){var c=Pd(a);this.c[c]=0;this.b[c]=b;return this};O.prototype.box=O.prototype.B;O.prototype.Z=function(a,b){var c=Pd(a);this.c[c]=1;this.b[c]=b;return this};O.prototype.fullBox=O.prototype.Z;O.prototype.stop=function(){this.a=!0};O.prototype.stop=O.prototype.stop;
|
|
166
|
+
O.prototype.parse=function(a,b){var c=new Uint8Array(a);c=new N(new DataView(c.buffer,c.byteOffset,c.byteLength),0);for(this.a=!1;c.ea()&&!this.a;)this.ub(0,c,b)};O.prototype.parse=O.prototype.parse;
|
|
167
|
+
O.prototype.ub=function(a,b,c){var d=b.U(),e=b.C(),f=b.C();switch(e){case 0:e=b.H.byteLength-d;break;case 1:e=b.Ma()}var g=this.b[f];if(g){var h=null,k=null;1==this.c[f]&&(k=b.C(),h=k>>>24,k&=16777215);f=d+e;c&&f>b.H.byteLength&&(f=b.H.byteLength);f-=b.U();b=0<f?b.La(f):new Uint8Array(0);b=new N(new DataView(b.buffer,b.byteOffset,b.byteLength),0);g({ma:this,Ec:c||!1,version:h,flags:k,s:b,size:e,start:d+a})}else b.G(d+e-b.U())};O.prototype.parseNext=O.prototype.ub;
|
|
168
|
+
function P(a){for(;a.s.ea()&&!a.ma.a;)a.ma.ub(a.start,a.s,a.Ec)}O.children=P;function Qd(a){for(var b=a.s.C();0<b&&!a.ma.a;--b)a.ma.ub(a.start,a.s,a.Ec)}O.sampleDescription=Qd;function Rd(a){return function(b){a(b.s.La(b.s.H.byteLength-b.s.U()))}}O.allData=Rd;function Pd(a){for(var b=0,c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};function Sd(a,b,c,d){var e,f=(new O).Z("sidx",function(a){e=Td(b,d,c,a)});a&&f.parse(a);if(e)return e;throw new p(2,3,3004);}
|
|
169
|
+
function Td(a,b,c,d){var e=[];d.s.G(4);var f=d.s.C();if(0==f)throw new p(2,3,3005);if(0==d.version){var g=d.s.C();var h=d.s.C()}else g=d.s.Ma(),h=d.s.Ma();d.s.G(2);var k=d.s.Xa();a=a+d.size+h;for(h=0;h<k;h++){var l=d.s.C(),q=(l&2147483648)>>>31;l&=2147483647;var v=d.s.C();d.s.G(4);if(1==q)throw new p(2,3,3006);e.push(new M(e.length,g/f-b,(g+v)/f-b,function(){return c},a,a+l-1));g+=v;a+=l}d.ma.stop();return e};function Q(a){this.a=a}n("shaka.media.SegmentIndex",Q);Q.prototype.destroy=function(){this.a=null;return Promise.resolve()};Q.prototype.destroy=Q.prototype.destroy;Q.prototype.find=function(a){for(var b=this.a.length-1;0<=b;--b){var c=this.a[b];if(a>=c.startTime&&a<c.endTime)return c.position}return this.a.length&&a<this.a[0].startTime?this.a[0].position:null};Q.prototype.find=Q.prototype.find;
|
|
170
|
+
Q.prototype.get=function(a){if(0==this.a.length)return null;a-=this.a[0].position;return 0>a||a>=this.a.length?null:this.a[a]};Q.prototype.get=Q.prototype.get;Q.prototype.offset=function(a){for(var b=0;b<this.a.length;++b)this.a[b].startTime+=a,this.a[b].endTime+=a};Q.prototype.offset=Q.prototype.offset;
|
|
171
|
+
Q.prototype.Nb=function(a){for(var b=[],c=0,d=0;c<this.a.length&&d<a.length;){var e=this.a[c],f=a[d];e.startTime<f.startTime?(b.push(e),c++):(e.startTime>f.startTime?0==c&&b.push(f):(.1<Math.abs(e.endTime-f.endTime)?(f=new M(e.position,f.startTime,f.endTime,f.a,f.O,f.F),b.push(f)):b.push(e),c++),d++)}for(;c<this.a.length;)b.push(this.a[c++]);if(b.length)for(c=b[b.length-1].position+1;d<a.length;)f=a[d++],f=new M(c++,f.startTime,f.endTime,f.a,f.O,f.F),b.push(f);else b=a;this.a=b};
|
|
172
|
+
Q.prototype.merge=Q.prototype.Nb;Q.prototype.Cb=function(a){for(var b=0;b<this.a.length&&!(this.a[b].endTime>a);++b);this.a.splice(0,b)};Q.prototype.evict=Q.prototype.Cb;
|
|
173
|
+
function Ud(a,b){for(;a.a.length;){var c=a.a[a.a.length-1];if(c.startTime>=b)a.a.pop();else break}for(;a.a.length;)if(c=a.a[0],0>=c.endTime)a.a.shift();else break;0!=a.a.length&&(c=a.a[0],c.startTime<gb&&(a.a[0]=new M(c.position,0,c.endTime,c.a,c.O,c.F)),c=a.a[a.a.length-1],a.a[a.a.length-1]=new M(c.position,c.startTime,b,c.a,c.O,c.F))};function Vd(a){this.b=a;this.a=new N(a,0);Wd||(Wd=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Wd;Vd.prototype.ea=function(){return this.a.ea()};
|
|
174
|
+
function Xd(a){var b=Yd(a);if(7<b.length)throw new p(2,3,3002);for(var c=0,d=0;d<b.length;d++)c=256*c+b[d];b=c;c=Yd(a);a:{for(d=0;d<Wd.length;d++)if(yb(c,Wd[d])){d=!0;break a}d=!1}if(d)c=a.b.byteLength-a.a.U();else{if(8==c.length&&c[1]&224)throw new p(2,3,3001);d=c[0]&(1<<8-c.length)-1;for(var e=1;e<c.length;e++)d=256*d+c[e];c=d}c=a.a.U()+c<=a.b.byteLength?c:a.b.byteLength-a.a.U();d=new DataView(a.b.buffer,a.b.byteOffset+a.a.U(),c);a.a.G(c);return new Zd(b,d)}
|
|
175
|
+
function Yd(a){var b=a.a.ca(),c;for(c=1;8>=c&&!(b&1<<8-c);c++);if(8<c)throw new p(2,3,3002);var d=new Uint8Array(c);d[0]=b;for(b=1;b<c;b++)d[b]=a.a.ca();return d}function Zd(a,b){this.id=a;this.a=b}function $d(a){if(8<a.a.byteLength)throw new p(2,3,3002);if(8==a.a.byteLength&&a.a.getUint8(0)&224)throw new p(2,3,3001);for(var b=0,c=0;c<a.a.byteLength;c++){var d=a.a.getUint8(c);b=256*b+d}return b};function ae(){}
|
|
176
|
+
ae.prototype.parse=function(a,b,c,d){var e;b=new Vd(new DataView(b));if(440786851!=Xd(b).id)throw new p(2,3,3008);var f=Xd(b);if(408125543!=f.id)throw new p(2,3,3009);b=f.a.byteOffset;f=new Vd(f.a);for(e=null;f.ea();){var g=Xd(f);if(357149030==g.id){e=g;break}}if(!e)throw new p(2,3,3010);f=new Vd(e.a);e=1E6;for(g=null;f.ea();){var h=Xd(f);if(2807729==h.id)e=$d(h);else if(17545==h.id)if(g=h,4==g.a.byteLength)g=g.a.getFloat32(0);else if(8==g.a.byteLength)g=g.a.getFloat64(0);else throw new p(2,3,3003);
|
|
177
|
+
}if(null==g)throw new p(2,3,3011);f=e/1E9;e=g*f;a=Xd(new Vd(new DataView(a)));if(475249515!=a.id)throw new p(2,3,3007);return be(a,b,f,e,c,d)};function be(a,b,c,d,e,f){function g(){return e}var h=[];a=new Vd(a.a);for(var k=null,l=null;a.ea();){var q=Xd(a);if(187==q.id){var v=ce(q);v&&(q=c*v.Te,v=b+v.oe,null!=k&&h.push(new M(h.length,k-f,q-f,g,l,v-1)),k=q,l=v)}}null!=k&&h.push(new M(h.length,k-f,d-f,g,l,null));return h}
|
|
178
|
+
function ce(a){var b=new Vd(a.a);a=Xd(b);if(179!=a.id)throw new p(2,3,3013);a=$d(a);b=Xd(b);if(183!=b.id)throw new p(2,3,3012);b=new Vd(b.a);for(var c=0;b.ea();){var d=Xd(b);if(241==d.id){c=$d(d);break}}return{Te:a,oe:c}};function de(a,b){var c=Jd(a,b,"Initialization");if(!c)return null;var d=a.w.da,e=c.getAttribute("sourceURL");e&&(d=B(a.w.da,[e]));e=0;var f=null;if(c=K(c,"range",wd))e=c.start,f=c.end;return new L(function(){return d},e,f)}
|
|
179
|
+
function ee(a,b){var c=Number(Id(a,fe,"presentationTimeOffset"))||0,d=Id(a,fe,"timescale"),e=1;d&&(e=yd(d)||1);c=c/e||0;d=de(a,fe);var f=a.w.contentType;e=a.w.mimeType.split("/")[1];if("text"!=f&&"mp4"!=e&&"webm"!=e)throw new p(2,4,4006);if("webm"==e&&!d)throw new p(2,4,4005);f=Jd(a,fe,"RepresentationIndex");var g=Id(a,fe,"indexRange"),h=a.w.da;g=wd(g||"");if(f){var k=f.getAttribute("sourceURL");k&&(h=B(a.w.da,[k]));g=K(f,"range",wd,g)}if(!g)throw new p(2,4,4002);e=ge(a,b,d,h,g.start,g.end,e,c);return{createSegmentIndex:e.createSegmentIndex,
|
|
180
|
+
findSegmentPosition:e.findSegmentPosition,getSegmentReference:e.getSegmentReference,initSegmentReference:d,V:c}}
|
|
181
|
+
function ge(a,b,c,d,e,f,g,h){var k=a.presentationTimeline,l=!a.Da||!a.M.Jb,q=a.M.start,v=a.M.duration,r=b,t=null;return{createSegmentIndex:function(){var a=[r(d,e,f),"webm"==g?r(c.a(),c.O,c.F):null];r=null;return Promise.all(a).then(function(a){var b=a[0];a=a[1]||null;b="mp4"==g?Sd(b,e,d,h):(new ae).parse(b,a,d,h);k.Wa(q,b);t=new Q(b);l&&Ud(t,v)})},findSegmentPosition:function(a){return t.find(a)},getSegmentReference:function(a){return t.get(a)}}}function fe(a){return a.Ya};function he(a,b){var c=de(a,ie);var d=je(a);var e=Hd(a,ie),f=e.Aa;0==f&&(f=1);var g=0;e.R?g=e.R*(f-1):e.I&&0<e.I.length&&(g=e.I[0].start);d={R:e.R,startTime:g,Aa:f,V:e.V,I:e.I,Ha:d};if(!d.R&&!d.I&&1<d.Ha.length)throw new p(2,4,4002);if(!d.R&&!a.M.duration&&!d.I&&1==d.Ha.length)throw new p(2,4,4002);if(d.I&&0==d.I.length)throw new p(2,4,4002);f=e=null;a.ba.id&&a.w.id&&(f=a.ba.id+","+a.w.id,e=b[f]);g=ke(a.M.duration,d.Aa,a.w.da,d);e?(e.Nb(g),f=a.presentationTimeline.ka(),e.Cb(f-a.M.start)):(a.presentationTimeline.Wa(a.M.start,
|
|
182
|
+
g),e=new Q(g),f&&a.Da&&(b[f]=e));a.Da&&a.M.Jb||Ud(e,a.M.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:e.find.bind(e),getSegmentReference:e.get.bind(e),initSegmentReference:c,V:d.V}}function ie(a){return a.ra}
|
|
183
|
+
function ke(a,b,c,d){var e=d.Ha.length;d.I&&d.I.length!=d.Ha.length&&(e=Math.min(d.I.length,d.Ha.length));for(var f=[],g=d.startTime,h=0;h<e;h++){var k=d.Ha[h],l=B(c,[k.Bd]);var q=null!=d.R?g+d.R:d.I?d.I[h].end:g+a;f.push(new M(h+b,g,q,function(a){return a}.bind(null,l),k.start,k.end));g=q}return f}
|
|
184
|
+
function je(a){return[a.w.ra,a.S.ra,a.ba.ra].filter(Ra).map(function(a){return J(a,"SegmentURL")}).reduce(function(a,c){return 0<a.length?a:c}).map(function(b){b.getAttribute("indexRange")&&!a.qc&&(a.qc=!0);var c=b.getAttribute("media");b=K(b,"mediaRange",wd,{start:0,end:null});return{Bd:c,start:b.start,end:b.end}})};function le(a,b,c,d){var e=me(a);var f=Hd(a,ne);var g=Id(a,ne,"media"),h=Id(a,ne,"index");f={R:f.R,timescale:f.timescale,Aa:f.Aa,V:f.V,fc:f.fc,I:f.I,Mb:g,Ua:h};g=0+(f.Ua?1:0);g+=f.I?1:0;g+=f.R?1:0;if(0==g)throw new p(2,4,4002);1!=g&&(f.Ua&&(f.I=null),f.R=null);if(!f.Ua&&!f.Mb)throw new p(2,4,4002);if(f.Ua){c=a.w.mimeType.split("/")[1];if("mp4"!=c&&"webm"!=c)throw new p(2,4,4006);if("webm"==c&&!e)throw new p(2,4,4005);d=Gd(f.Ua,a.w.id,null,a.bandwidth||null,null);d=B(a.w.da,[d]);a=ge(a,b,e,d,0,null,
|
|
185
|
+
c,f.V)}else f.R?(d||a.presentationTimeline.tb(f.R),a=oe(a,f)):(d=b=null,a.ba.id&&a.w.id&&(d=a.ba.id+","+a.w.id,b=c[d]),g=pe(a,f),b?(b.Nb(g),c=a.presentationTimeline.ka(),b.Cb(c-a.M.start)):(a.presentationTimeline.Wa(a.M.start,g),b=new Q(g),d&&a.Da&&(c[d]=b)),a.Da&&a.M.Jb||Ud(b,a.M.duration),a={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:b.find.bind(b),getSegmentReference:b.get.bind(b)});return{createSegmentIndex:a.createSegmentIndex,findSegmentPosition:a.findSegmentPosition,
|
|
186
|
+
getSegmentReference:a.getSegmentReference,initSegmentReference:e,V:f.V}}function ne(a){return a.$a}
|
|
187
|
+
function oe(a,b){var c=a.M.duration,d=b.R,e=b.Aa,f=b.timescale,g=b.V,h=b.Mb,k=a.bandwidth||null,l=a.w.id,q=a.w.da;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(a){return 0>a||c&&a>=c?null:Math.floor((a+g)/d)},getSegmentReference:function(a){var b=a*d-g,v=b+d;c&&(v=Math.min(v,c));return 0>v||c&&b>=c?null:new M(a,b,v,function(){var c=Gd(h,l,a+e,k,b*f);return B(q,[c])},0,null)}}}
|
|
188
|
+
function pe(a,b){for(var c=[],d=0;d<b.I.length;d++){var e=d+b.Aa;c.push(new M(e,b.I[d].start,b.I[d].end,function(a,b,c,d,e,q){a=Gd(a,b,e,c,q);return B(d,[a]).map(function(a){return a.toString()})}.bind(null,b.Mb,a.w.id,a.bandwidth||null,a.w.da,e,b.I[d].Se+b.fc),0,null))}return c}function me(a){var b=Id(a,ne,"initialization");if(!b)return null;var c=a.w.id,d=a.bandwidth||null,e=a.w.da;return new L(function(){var a=Gd(b,c,null,d,null);return B(e,[a])},0,null)};var qe={},re={};n("shaka.media.ManifestParser.registerParserByExtension",function(a,b){re[a]=b});n("shaka.media.ManifestParser.registerParserByMime",function(a,b){qe[a]=b});function se(){var a={},b;for(b in qe)a[b]=!0;for(b in re)a[b]=!0;["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(b){a[b]=!!qe[b]});["mpd","m3u8","ism"].forEach(function(b){a[b]=!!re[b]});return a}
|
|
189
|
+
function te(a,b,c,d){var e=d;e||(d=(new ta(a)).aa.split("/").pop().split("."),1<d.length&&(d=d.pop().toLowerCase(),e=re[d]));if(e)return Promise.resolve(e);c=Va([a],c);c.method="HEAD";return b.request(0,c).then(function(b){(b=b.headers["content-type"])&&(b=b.toLowerCase());return(e=qe[b])?e:Promise.reject(new p(2,4,4E3,a))},function(a){a.severity=2;return Promise.reject(a)})};function R(a,b){this.c=a;this.j=b;this.f=this.a=Infinity;this.b=1;this.i=0;this.h=!0;this.g=0}n("shaka.media.PresentationTimeline",R);R.prototype.T=function(){return this.a};R.prototype.getDuration=R.prototype.T;R.prototype.ha=function(a){this.a=a};R.prototype.setDuration=R.prototype.ha;R.prototype.qd=function(){return this.c};R.prototype.getPresentationStartTime=R.prototype.qd;R.prototype.Pc=function(a){this.i=a};R.prototype.setClockOffset=R.prototype.Pc;R.prototype.vb=function(a){this.h=a};
|
|
190
|
+
R.prototype.setStatic=R.prototype.vb;R.prototype.sd=function(){return this.f};R.prototype.getSegmentAvailabilityDuration=R.prototype.sd;R.prototype.ac=function(a){this.f=a};R.prototype.setSegmentAvailabilityDuration=R.prototype.ac;R.prototype.Qc=function(a){this.j=a};R.prototype.setDelay=R.prototype.Qc;R.prototype.Wa=function(a,b){0!=b.length&&(this.b=b.reduce(function(a,b){return Math.max(a,b.endTime-b.startTime)},this.b))};R.prototype.notifySegments=R.prototype.Wa;
|
|
191
|
+
R.prototype.tb=function(a){this.b=Math.max(this.b,a)};R.prototype.notifyMaxSegmentDuration=R.prototype.tb;R.prototype.P=function(){return Infinity==this.a&&!this.h};R.prototype.isLive=R.prototype.P;R.prototype.xa=function(){return Infinity!=this.a&&!this.h};R.prototype.isInProgress=R.prototype.xa;R.prototype.ka=function(){return this.Fa(0)};R.prototype.getSegmentAvailabilityStart=R.prototype.ka;
|
|
192
|
+
R.prototype.Fa=function(a){if(Infinity==this.f)return this.g;var b=this.wa();return Math.max(this.g,Math.min(b-this.f+a,b))};R.prototype.getSafeAvailabilityStart=R.prototype.Fa;R.prototype.Oc=function(a){this.g=a};R.prototype.setAvailabilityStart=R.prototype.Oc;R.prototype.wa=function(){return this.P()||this.xa()?Math.min(Math.max(0,(Date.now()+this.i)/1E3-this.b-this.c),this.a):this.a};R.prototype.getSegmentAvailabilityEnd=R.prototype.wa;
|
|
193
|
+
R.prototype.rb=function(){var a=this.P()||this.xa()?this.j:0;return Math.max(0,this.wa()-a)};R.prototype.getSeekRangeEnd=R.prototype.rb;function ue(){this.a=this.b=null;this.g=[];this.c=null;this.i=[];this.h=1;this.j={};this.l=0;this.f=null}n("shaka.dash.DashParser",ue);m=ue.prototype;m.configure=function(a){this.b=a};m.start=function(a,b){this.g=[a];this.a=b;return ve(this).then(function(){this.a&&we(this,0);return this.c}.bind(this))};m.stop=function(){this.b=this.a=null;this.g=[];this.c=null;this.i=[];this.j={};null!=this.f&&(window.clearTimeout(this.f),this.f=null);return Promise.resolve()};m.update=function(){ve(this)["catch"](function(a){if(this.a)this.a.onError(a)}.bind(this))};
|
|
194
|
+
m.onExpirationUpdated=function(){};function ve(a){return a.a.networkingEngine.request(0,Va(a.g,a.b.retryParameters),function(){return!this.a}.bind(a)).then(function(a){if(this.a)return xe(this,a.data,a.uri)}.bind(a))}function xe(a,b,c){b=Kd(b,"MPD");if(!b)throw new p(2,4,4001,c);return Md(b,a.b.retryParameters,a.b.dash.xlinkFailGracefully,c,a.a.networkingEngine).then(function(a){return ye(this,a,c)}.bind(a))}
|
|
195
|
+
function ye(a,b,c){c=[c];var d=J(b,"Location").map(td).filter(Ra);0<d.length&&(c=a.g=d);d=J(b,"BaseURL").map(td);c=B(c,d);var e=K(b,"minBufferTime",vd);a.l=K(b,"minimumUpdatePeriod",vd,-1);var f=K(b,"availabilityStartTime",ud);d=K(b,"timeShiftBufferDepth",vd);var g=K(b,"suggestedPresentationDelay",vd),h=K(b,"maxSegmentDuration",vd),k=b.getAttribute("type")||"static";if(a.c)var l=a.c.presentationTimeline;else{var q=Math.max(a.b.dash.defaultPresentationDelay,1.5*e);l=new R(f,null!=g?g:q)}f=ze(a,{Da:"static"!=
|
|
196
|
+
k,presentationTimeline:l,ba:null,M:null,S:null,w:null,bandwidth:0,qc:!1},c,b);g=f.duration;var v=f.periods;l.vb("static"==k);"static"!=k&&f.kc||l.ha(g||Infinity);l.ac(null!=d?d:Infinity);l.tb(h||1);if(a.c)return Promise.resolve();b=J(b,"UTCTiming");d=l.P();return Ae(a,c,b,d).then(function(a){this.a&&(l.Pc(a),this.c={presentationTimeline:l,periods:v,offlineSessionIds:[],minBufferTime:e||0})}.bind(a))}
|
|
197
|
+
function ze(a,b,c,d){var e=K(d,"mediaPresentationDuration",vd),f=[],g=0;d=J(d,"Period");for(var h=0;h<d.length;h++){var k=d[h];g=K(k,"start",vd,g);var l=K(k,"duration",vd),q=null;if(h!=d.length-1){var v=K(d[h+1],"start",vd);null!=v&&(q=v-g)}else null!=e&&(q=e-g);null==q&&(q=l);k=Be(a,b,c,{start:g,duration:q,node:k,Jb:null==q||h==d.length-1});f.push(k);l=b.ba.id;-1==a.i.indexOf(l)&&(a.i.push(l),a.c&&(a.a.filterNewPeriod(k),a.c.periods.push(k)));if(null==q){g=null;break}g+=q}null==a.c&&a.a.filterAllPeriods(f);
|
|
198
|
+
return null!=e?{periods:f,duration:e,kc:!1}:{periods:f,duration:g,kc:!0}}
|
|
199
|
+
function Be(a,b,c,d){b.ba=Ce(d.node,null,c);b.M=d;b.ba.id||(b.ba.id="__shaka_period_"+d.start);J(d.node,"EventStream").forEach(a.ee.bind(a,d.start,d.duration));c=J(d.node,"AdaptationSet").map(a.ce.bind(a,b)).filter(Ra);var e=c.map(function(a){return a.qe}).reduce(Pa,[]),f=e.filter(Sa);if(b.Da&&e.length!=f.length)throw new p(2,4,4018);var g=c.filter(function(a){return!a.ec});c.filter(function(a){return a.ec}).forEach(function(a){var b=a.streams[0],c=a.ec;g.forEach(function(a){a.id==c&&a.streams.forEach(function(a){a.trickModeVideo=
|
|
200
|
+
b})})});e=De(g,"video");f=De(g,"audio");if(!e.length&&!f.length)throw new p(2,4,4004);f.length||(f=[null]);e.length||(e=[null]);b=[];for(c=0;c<f.length;c++)for(var h=0;h<e.length;h++)Ee(a,f[c],e[h],b);a=De(g,"text");e=[];for(c=0;c<a.length;c++)e.push.apply(e,a[c].streams);return{startTime:d.start,textStreams:e,variants:b}}function De(a,b){return a.filter(function(a){return a.contentType==b})}
|
|
201
|
+
function Ee(a,b,c,d){if(b||c)if(b&&c){var e=b.drmInfos;var f=c.drmInfos;if(e.length&&f.length?0<Sb(e,f).length:1){var g=Sb(b.drmInfos,c.drmInfos);for(e=0;e<b.streams.length;e++)for(var h=0;h<c.streams.length;h++)f=(c.streams[h].bandwidth||0)+(b.streams[e].bandwidth||0),f={id:a.h++,language:b.language,primary:b.Lb||c.Lb,audio:b.streams[e],video:c.streams[h],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},d.push(f)}}else for(g=b||c,e=0;e<g.streams.length;e++)f=g.streams[e].bandwidth||
|
|
202
|
+
0,f={id:a.h++,language:g.language||"und",primary:g.Lb,audio:b?g.streams[e]:null,video:c?g.streams[e]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},d.push(f)}
|
|
203
|
+
m.ce=function(a,b){a.S=Ce(b,a.ba,null);var c=!1,d=J(b,"Role"),e=d.map(function(a){return a.getAttribute("value")}).filter(Ra),f=void 0;"text"==a.S.contentType&&(f="subtitle");for(var g=0;g<d.length;g++){var h=d[g].getAttribute("schemeIdUri");if(null==h||"urn:mpeg:dash:role:2011"==h)switch(h=d[g].getAttribute("value"),h){case "main":c=!0;break;case "caption":case "subtitle":f=h}}var k=null,l=!1;J(b,"EssentialProperty").forEach(function(a){"http://dashif.org/guidelines/trickmode"==a.getAttribute("schemeIdUri")?
|
|
204
|
+
k=a.getAttribute("value"):l=!0});if(l)return null;d=J(b,"ContentProtection");var q=Cd(d,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);d=pc(b.getAttribute("lang")||"und");h=b.getAttribute("label");g=J(b,"Representation");e=g.map(this.fe.bind(this,a,q,f,d,h,c,e)).filter(function(a){return!!a});if(0==e.length)throw new p(2,4,4003);a.S.contentType&&"application"!=a.S.contentType||(a.S.contentType=Fe(e[0].mimeType,e[0].codecs),e.forEach(function(b){b.type=a.S.contentType}));e.forEach(function(a){q.drmInfos.forEach(function(b){a.keyId&&
|
|
205
|
+
b.keyIds.push(a.keyId)})});f=g.map(function(a){return a.getAttribute("id")}).filter(Ra);return{id:a.S.id||"__fake__"+this.h++,contentType:a.S.contentType,language:d,Lb:c,streams:e,drmInfos:q.drmInfos,ec:k,qe:f}};
|
|
206
|
+
m.fe=function(a,b,c,d,e,f,g,h){a.w=Ce(h,a.S,null);if(!Ge(a.w))return null;a.bandwidth=K(h,"bandwidth",yd)||0;var k=this.re.bind(this);if(a.w.Ya)k=ee(a,k);else if(a.w.ra)k=he(a,this.j);else if(a.w.$a)k=le(a,k,this.j,!!this.c);else{var l=a.w.da,q=a.M.duration||0;k={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(a){return 0<=a&&a<q?1:null},getSegmentReference:function(a){return 1!=a?null:new M(1,0,q,function(){return l},0,null)},initSegmentReference:null,V:0}}h=J(h,"ContentProtection");
|
|
207
|
+
h=Fd(h,this.b.dash.customScheme,b,this.b.dash.ignoreDrmInfo);return{id:this.h++,createSegmentIndex:k.createSegmentIndex,findSegmentPosition:k.findSegmentPosition,getSegmentReference:k.getSegmentReference,initSegmentReference:k.initSegmentReference,presentationTimeOffset:k.V,mimeType:a.w.mimeType,codecs:a.w.codecs,frameRate:a.w.frameRate,bandwidth:a.bandwidth,width:a.w.width,height:a.w.height,kind:c,encrypted:0<b.drmInfos.length,keyId:h,language:d,label:e,type:a.S.contentType,primary:f,trickModeVideo:null,
|
|
208
|
+
containsEmsgBoxes:a.w.containsEmsgBoxes,roles:g,channelsCount:a.w.Pb}};m.Le=function(){this.f=null;var a=Date.now();ve(this).then(function(){this.a&&we(this,(Date.now()-a)/1E3)}.bind(this))["catch"](function(a){this.a&&(a.severity=1,this.a.onError(a),we(this,0))}.bind(this))};function we(a,b){0>a.l||(a.f=window.setTimeout(a.Le.bind(a),1E3*Math.max(Math.max(3,a.l)-b,0)))}
|
|
209
|
+
function Ce(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",containsEmsgBoxes:!1,frameRate:void 0,Pb:null};c=c||b.da;var d=J(a,"BaseURL").map(td),e=a.getAttribute("contentType")||b.contentType,f=a.getAttribute("mimeType")||b.mimeType,g=a.getAttribute("codecs")||b.codecs,h=K(a,"frameRate",Ad)||b.frameRate,k=!!J(a,"InbandEventStream").length,l=J(a,"AudioChannelConfiguration");l=He(l)||b.Pb;e||(e=Fe(f,g));return{da:B(c,d),Ya:sd(a,"SegmentBase")||b.Ya,ra:sd(a,"SegmentList")||b.ra,$a:sd(a,"SegmentTemplate")||
|
|
210
|
+
b.$a,width:K(a,"width",zd)||b.width,height:K(a,"height",zd)||b.height,contentType:e,mimeType:f,codecs:g,frameRate:h,containsEmsgBoxes:k||b.containsEmsgBoxes,id:a.getAttribute("id"),Pb:l}}
|
|
211
|
+
function He(a){for(var b=0;b<a.length;++b){var c=a[b],d=c.getAttribute("schemeIdUri");if(d&&(c=c.getAttribute("value")))switch(d){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":d=parseInt(c,10);if(!d)continue;return d;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(d=parseInt(c,
|
|
212
|
+
16)){for(a=0;d;)d&1&&++a,d>>=1;return a}}}return null}function Ge(a){var b=0+(a.Ya?1:0);b+=a.ra?1:0;b+=a.$a?1:0;if(0==b)return"text"==a.contentType||"application"==a.contentType?!0:!1;1!=b&&(a.Ya&&(a.ra=null),a.$a=null);return!0}function Ie(a,b,c,d){b=B(b,[c]);b=Va(b,a.b.retryParameters);b.method=d;return a.a.networkingEngine.request(0,b).then(function(a){if("HEAD"==d){if(!a.headers||!a.headers.date)return 0;a=a.headers.date}else a=C(a.data);a=Date.parse(a);return isNaN(a)?0:a-Date.now()})}
|
|
213
|
+
function Ae(a,b,c,d){c=c.map(function(a){return{scheme:a.getAttribute("schemeIdUri"),value:a.getAttribute("value")}});var e=a.b.dash.clockSyncUri;d&&!c.length&&e&&c.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return Oa(c,function(a){var c=a.value;switch(a.scheme){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Ie(this,b,c,"HEAD");case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return Ie(this,
|
|
214
|
+
b,c,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return a=Date.parse(c),isNaN(a)?0:a-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return Promise.reject();default:return Promise.reject()}}.bind(a))["catch"](function(){return 0})}
|
|
215
|
+
m.ee=function(a,b,c){var d=c.getAttribute("schemeIdUri")||"",e=c.getAttribute("value")||"",f=K(c,"timescale",zd)||1;J(c,"Event").forEach(function(c){var g=K(c,"presentationTime",zd)||0,k=K(c,"duration",zd)||0;g=g/f+a;k=g+k/f;null!=b&&(g=Math.min(g,a+b),k=Math.min(k,a+b));c={schemeIdUri:d,value:e,startTime:g,endTime:k,id:c.getAttribute("id")||"",eventElement:c};this.a.onTimelineRegionAdded(c)}.bind(this))};
|
|
216
|
+
m.re=function(a,b,c){a=Va(a,this.b.retryParameters);null!=b&&(a.headers.Range="bytes="+b+"-"+(null!=c?c:""));return this.a.networkingEngine.request(1,a).then(function(a){return a.data})};function Fe(a,b){return D[lb(a,b)]?"text":a.split("/")[0]}re.mpd=ue;qe["application/dash+xml"]=ue;function Je(a,b,c,d){this.uri=a;this.type=b;this.a=c;this.segments=d||null}function Ke(a,b,c,d){this.id=a;this.name=b;this.a=c;this.value=d||null}Ke.prototype.toString=function(){function a(a){return a.name+'="'+a.value+'"'}return this.value?"#"+this.name+":"+this.value:0<this.a.length?"#"+this.name+":"+this.a.map(a).join(","):"#"+this.name};function Le(a,b){this.name=a;this.value=b}Ke.prototype.getAttribute=function(a){var b=this.a.filter(function(b){return b.name==a});return b.length?b[0]:null};
|
|
217
|
+
function Me(a,b,c){c=c||null;return(a=a.getAttribute(b))?a.value:c}function Ne(a,b){this.a=b;this.uri=a};function Oe(a,b){return a.filter(function(a){return a.name==b})}function Pe(a,b){var c=Oe(a,b);return c.length?c[0]:null}function Qe(a,b,c){return a.filter(function(a){var d=a.getAttribute("TYPE");a=a.getAttribute("GROUP-ID");return d.value==b&&a.value==c})}function Re(a,b){return B([a],[b])[0]};function Se(a){this.b=a;this.a=0}function Te(a,b){b.lastIndex=a.a;var c=b.exec(a.b);c=null==c?null:{position:c.index,length:c[0].length,te:c};if(a.a==a.b.length||null==c||c.position!=a.a)return null;a.a+=c.length;return c.te}function Ue(a){return a.a==a.b.length?null:(a=Te(a,/[^ \t\n]*/gm))?a[0]:null};function Ve(){this.a=0}
|
|
218
|
+
function We(a,b,c){b=C(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new p(2,4,4015);b=0;for(var e=[],f=1;f<d.length;)if(/^#(?!EXT)/m.test(d[f]))f+=1;else{var g=d[f];g=Xe(a.a++,g);if(0<=Ye.indexOf(g.name))b=1;else if(0<=$e.indexOf(g.name)){if(1!=b)throw new p(2,4,4017);d=d.splice(f,d.length-f);a=af(a,d,e);return new Je(c,b,e,a)}e.push(g);f+=1;"EXT-X-STREAM-INF"==g.name&&(g.a.push(new Le("URI",d[f])),f+=1)}return new Je(c,b,e)}
|
|
219
|
+
function af(a,b,c){var d=[],e=[];b.forEach(function(a){if(/^(#EXT)/.test(a))a=Xe(this.a++,a),0<=Ye.indexOf(a.name)?c.push(a):e.push(a);else{if(/^#(?!EXT)/m.test(a))return[];d.push(new Ne(a.trim(),e));e=[]}}.bind(a));return d}
|
|
220
|
+
function Xe(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new p(2,4,4016);var d=c[1],e=c[2];c=[];if(e&&0<=e.indexOf("=")){e=new Se(e);for(var f,g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Te(e,g);)c.push(new Le(f[1],f[2]||f[3]))}else if(e)return new Ke(a,d,c,e);return new Ke(a,d,c)}var Ye="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),$e="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function bf(a){return new Promise(function(b){var c=bf.parse(a);b({uri:a,data:c.data,headers:{"content-type":c.contentType}})})}n("shaka.net.DataUriPlugin",bf);
|
|
221
|
+
bf.parse=function(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new p(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new p(2,1,1004,a);var c=b[0];b=window.decodeURIComponent(b.slice(1).join(","));c=c.split(";");var d=null;1<c.length&&(d=c[1]);if("base64"==d)a=vb(b).buffer;else{if(d)throw new p(2,1,1005,a);a=qb(b)}return{data:a,contentType:c[0]}};Ua("data",bf);function cf(){this.h=this.c=null;this.D=1;this.u={};this.A={};this.K={};this.a={};this.b=null;this.l="";this.o=new Ve;this.j=this.i=null;this.f=df;this.m=null;this.g=0;this.v=Infinity}n("shaka.hls.HlsParser",cf);m=cf.prototype;m.configure=function(a){this.h=a};m.start=function(a,b){this.c=b;this.l=a;return ef(this,a).then(function(b){return ff(this,b.data,a).then(function(){gf(this,this.i);return this.m}.bind(this))}.bind(this))};
|
|
222
|
+
m.stop=function(){this.h=this.c=null;this.u={};this.A={};this.m=null;return Promise.resolve()};m.update=function(){if(this.f!=hf.pa){var a=[],b;for(b in this.a)a.push(jf(this,this.a[b],b));return Promise.all(a)}};
|
|
223
|
+
function jf(a,b,c){ef(a,c).then(function(a){var d=hf,f=We(this.o,a.data,c);if(1!=f.type)throw new p(2,4,4017);a=Pe(f.a,"EXT-X-MEDIA-SEQUENCE");var g=b.stream;kf(this,f,a?Number(a.value):0,g.mimeType,g.codecs).then(function(a){b.Za.a=a;a=a[a.length-1];Pe(f.a,"EXT-X-ENDLIST")&&(lf(this,d.pa),this.b.ha(a.endTime))}.bind(this))}.bind(a))}m.onExpirationUpdated=function(){};
|
|
224
|
+
function ff(a,b,c){b=We(a.o,b,c);if(0!=b.type)throw new p(2,4,4022);return mf(a,b).then(function(a){this.c.filterAllPeriods([a]);var b=Infinity,c=0,d=0,h=Infinity,k;for(k in this.a){var l=this.a[k];b=Math.min(b,l.Ob);c=Math.max(c,l.Ob);d=Math.max(d,l.Ad);h=Math.min(h,l.duration)}l=null;var q=0;this.f!=hf.pa&&(l=Date.now()/1E3-d,q=3*this.g);this.b=new R(l,q);this.b.vb(this.f==hf.pa);this.b.tb(this.g);if(this.f!=hf.pa){b=3*this.g;this.b.Qc(b);this.i=this.v;this.f==hf.gc&&this.b.ac(b);for(b=0;95443.7176888889<=
|
|
225
|
+
c;)b+=95443.7176888889,c-=95443.7176888889;if(b)for(k in this.a)l=this.a[k],95443.7176888889>l.Ob&&(l.stream.presentationTimeOffset=-b,l.Za.offset(b))}else for(k in this.b.ha(h),this.a)l=this.a[k],l.stream.presentationTimeOffset=b,l.Za.offset(-b),Ud(l.Za,h);this.m={presentationTimeline:this.b,periods:[a],offlineSessionIds:[],minBufferTime:0}}.bind(a))}
|
|
226
|
+
function mf(a,b){var c=b.a,d=Oe(b.a,"EXT-X-MEDIA").filter(function(a){return"SUBTITLES"==nf(a,"TYPE")}.bind(a)).map(function(a){return of(this,a)}.bind(a));return Promise.all(d).then(function(a){var d=Oe(c,"EXT-X-STREAM-INF").map(function(a){return pf(this,a,b)}.bind(this));return Promise.all(d).then(function(b){return{startTime:0,variants:b.reduce(Pa,[]),textStreams:a}}.bind(this))}.bind(a))}
|
|
227
|
+
function pf(a,b,c){var d=Me(b,"CODECS","avc1.42E01E,mp4a.40.2").split(","),e=b.getAttribute("RESOLUTION"),f=null,g=null,h=Me(b,"FRAME-RATE"),k=Number(nf(b,"BANDWIDTH"));if(e){var l=e.value.split("x");f=l[0];g=l[1]}c=Oe(c.a,"EXT-X-MEDIA");var q=Me(b,"AUDIO"),v=Me(b,"VIDEO");q?c=Qe(c,"AUDIO",q):v&&(c=Qe(c,"VIDEO",v));if(l=qf("text",d)){var r=Me(b,"SUBTITLES");r&&(r=Qe(c,"SUBTITLES",r),r.length&&(a.u[r[0].id].stream.codecs=l));d.splice(d.indexOf(l),1)}c=c.map(function(a){return rf(this,a,d)}.bind(a));
|
|
228
|
+
var t=[],y=[];return Promise.all(c).then(function(a){q?t=a:v&&(y=a);if(t.length||y.length)t.length?nf(b,"URI")==t[0].Yb?(a="audio",c=!0):a="video":a="audio";else{var c=!1;1==d.length?(a=qf("video",d),a=e||h||a?"video":"audio"):(a="video",d=[d.join(",")])}return c?Promise.resolve():sf(this,b,d,a)}.bind(a)).then(function(a){a&&("audio"==a.stream.type?t=[a]:y=[a]);y&&tf(y);t&&tf(t);return uf(this,t,y,k,f,g,h)}.bind(a))}
|
|
229
|
+
function tf(a){a.forEach(function(a){var b=a.stream.codecs.split(",");b=b.filter(function(a){return"mp4a.40.34"!=a});a.stream.codecs=b.join(",")})}
|
|
230
|
+
function uf(a,b,c,d,e,f,g){c.forEach(function(a){if(a=a.stream)a.width=Number(e)||void 0,a.height=Number(f)||void 0,a.frameRate=Number(g)||void 0}.bind(a));b.length||(b=[null]);c.length||(c=[null]);for(var h=[],k=0;k<b.length;k++)for(var l=0;l<c.length;l++){var q=b[k]?b[k].stream:null,v=c[l]?c[l].stream:null,r=b[k]?b[k].drmInfos:null,t=c[l]?c[l].drmInfos:null;if(q&&v)if(r.length&&t.length?0<Sb(r,t).length:1)var y=Sb(r,t);else continue;else q?y=r:v&&(y=t);r=(c[k]?c[k].Yb:"")+" - "+(b[k]?b[k].Yb:"");
|
|
231
|
+
a.A[r]||(q=vf(a,q,v,d,y),h.push(q),a.A[r]=q)}return h}function vf(a,b,c,d,e){return{id:a.D++,language:b?b.language:"und",primary:!!b&&b.primary||!!c&&c.primary,audio:b,video:c,bandwidth:d,drmInfos:e,allowedByApplication:!0,allowedByKeySystem:!0}}function of(a,b){nf(b,"TYPE");return rf(a,b,[]).then(function(a){return a.stream})}
|
|
232
|
+
function rf(a,b,c){var d=nf(b,"URI");d=Re(a.l,d);if(a.a[d])return Promise.resolve(a.a[d]);var e=nf(b,"TYPE").toLowerCase();"subtitles"==e&&(e="text");var f=pc(Me(b,"LANGUAGE","und")),g=Me(b,"NAME"),h=b.getAttribute("DEFAULT"),k=b.getAttribute("AUTOSELECT"),l=Me(b,"CHANNELS");return wf(a,d,c,e,f,!!h||!!k,g,"audio"==e?xf(l):null).then(function(a){if(this.a[d])return this.a[d];this.u[b.id]=a;return this.a[d]=a}.bind(a))}function xf(a){if(!a)return null;a=a.split("/")[0];return parseInt(a,10)}
|
|
233
|
+
function sf(a,b,c,d){var e=nf(b,"URI");e=Re(a.l,e);return a.a[e]?Promise.resolve(a.a[e]):wf(a,e,c,d,"und",!1,null,null).then(function(a){return this.a[e]?this.a[e]:this.a[e]=a}.bind(a))}
|
|
234
|
+
function wf(a,b,c,d,e,f,g,h){var k=b;b=Re(a.l,b);var l,q="",v;return ef(a,b).then(function(a){l=We(this.o,a.data,b);if(1!=l.type)throw new p(2,4,4017);a=l;var e=hf,f=Pe(a.a,"EXT-X-PLAYLIST-TYPE"),g=Pe(a.a,"EXT-X-ENDLIST");g=f&&"VOD"==f.value||g;f=f&&"EVENT"==f.value&&!g;f=!g&&!f;g?lf(this,e.pa):(f?lf(this,e.gc):lf(this,e.Vc),a=zf(a.a,"EXT-X-TARGETDURATION"),a=Number(a.value),this.g=Math.max(a,this.g),this.v=Math.min(a,this.v));if(1==c.length)q=c[0];else if(a=qf(d,c),null!=a)q=a;else throw new p(2,
|
|
235
|
+
4,4025,c);return Af(this,d,q,l)}.bind(a)).then(function(a){v=a;a=Pe(l.a,"EXT-X-MEDIA-SEQUENCE");return kf(this,l,a?Number(a.value):0,v,q)}.bind(a)).then(function(a){var b=a[0].startTime,c=a[a.length-1].endTime,w=c-b;a=new Q(a);var r=null;"text"!=d&&(r=Bf(l));var Wc=void 0;"text"==d&&(Wc="subtitle");var Xc=[];l.segments.forEach(function(a){a=Oe(a.a,"EXT-X-KEY");Xc.push.apply(Xc,a)});var Yc=!1,Zc=[],yf=null;Xc.forEach(function(a){if("NONE"!=nf(a,"METHOD")){Yc=!0;var b=nf(a,"KEYFORMAT");if(a=(b=Cf[b])?
|
|
236
|
+
b(a):null)a.keyIds.length&&(yf=a.keyIds[0]),Zc.push(a)}});if(Yc&&!Zc.length)throw new p(2,4,4026);r={id:this.D++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:a.find.bind(a),getSegmentReference:a.get.bind(a),initSegmentReference:r,presentationTimeOffset:0,mimeType:v,codecs:q,kind:Wc,encrypted:Yc,keyId:yf,language:e,label:g||null,type:d,primary:f,trickModeVideo:null,containsEmsgBoxes:!1,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:h};this.K[r.id]=
|
|
237
|
+
a;return{stream:r,Za:a,drmInfos:Zc,Yb:k,Ob:b,Ad:c,duration:w}}.bind(a))}function Bf(a){var b=Oe(a.a,"EXT-X-MAP");if(!b.length)return null;if(1<b.length)throw new p(2,4,4020);b=b[0];var c=nf(b,"URI"),d=Re(a.uri,c);a=0;c=null;if(b=Me(b,"BYTERANGE"))a=b.split("@"),b=Number(a[0]),a=Number(a[1]),c=a+b-1;return new L(function(){return[d]},a,c)}
|
|
238
|
+
function Df(a,b,c,d,e){var f=c.a,g=Re(a.uri,c.uri);a=zf(f,"EXTINF").value.split(",");a=e+Number(a[0]);c=0;var h=null;if(f=Pe(f,"EXT-X-BYTERANGE"))c=f.value.split("@"),f=Number(c[0]),c=c[1]?Number(c[1]):b.F+1,h=c+f-1;return new M(d,e,a,function(){return[g]},c,h)}
|
|
239
|
+
function kf(a,b,c,d,e){var f=b.segments,g=[],h=Re(b.uri,f[0].uri),k=Df(b,null,f[0],c,0),l=Bf(b);return Ef(a,b.uri,l,k,d,e).then(function(a){h.split("/").pop();for(var d=0;d<f.length;++d){var e=g[g.length-1];e=Df(b,e,f[d],c+d,0==d?a:e.endTime);g.push(e)}return g}.bind(a))}
|
|
240
|
+
function Ff(a,b){var c=a.c.networkingEngine,d=Va(b.a(),a.h.retryParameters),e={},f=b.O;e.Range="bytes="+f+"-"+(f+2048-1);var g={};if(0!=f||null!=b.F)f="bytes="+f+"-",null!=b.F&&(f+=b.F),g.Range=f;d.headers=e;return c.request(1,d)["catch"](function(){qa("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",d.uris[0]);d.headers=g;return c.request(1,d)})}
|
|
241
|
+
function Ef(a,b,c,d,e,f){if(a.m&&(b=a.a[b].Za.get(d.position)))return Promise.resolve(b.startTime);d=[Ff(a,d)];if("video/mp4"==e||"audio/mp4"==e)c?d.push(Ff(a,c)):d.push(d[0]);return Promise.all(d).then(function(a){if("video/mp4"==e||"audio/mp4"==e)return Gf(a[0].data,a[1].data);if("audio/mpeg"==e)return 0;if("video/mp2t"==e)return Hf(a[0].data);if("application/mp4"==e||0==e.indexOf("text/")){a=a[0].data;var b=lb(e,f);if(D[b]){var c=new $b(null);c.c=new D[b];a=c.Ib(a)}else a=0;return a}throw new p(2,
|
|
242
|
+
4,4030);}.bind(a))}function Gf(a,b){var c=0;(new O).B("moov",P).B("trak",P).B("mdia",P).Z("mdhd",function(a){a.s.G(0==a.version?8:16);c=a.s.C();a.ma.stop()}).parse(b,!0);if(!c)throw new p(2,4,4030);var d=0,e=!1;(new O).B("moof",P).B("traf",P).Z("tfdt",function(a){d=(0==a.version?a.s.C():a.s.Ma())/c;e=!0;a.ma.stop()}).parse(a,!0);if(!e)throw new p(2,4,4030);return d}
|
|
243
|
+
function Hf(a){function b(){throw new p(2,4,4030);}a=new N(new DataView(a),0);for(var c=0;;){c=a.U();var d=a.ca();71!=d&&b();a.Xa()&16384||b();d=(a.ca()&48)>>4;0!=d&&2!=d||b();3==d&&(d=a.ca(),a.G(d));if(1!=a.C()>>8)a.seek(c+188),d=a.ca(),71!=d&&(a.seek(c+192),d=a.ca()),71!=d&&(a.seek(c+204),d=a.ca()),71!=d&&b(),a.Lc(1);else return a.G(3),c=a.ca()>>6,0!=c&&1!=c||b(),0==a.ca()&&b(),c=a.ca(),d=a.Xa(),a=a.Xa(),(1073741824*((c&14)>>1)+((d&65534)<<14|(a&65534)>>1))/9E4}}
|
|
244
|
+
function qf(a,b){for(var c=If[a],d=0;d<c.length;d++)for(var e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return"text"==a?"":null}
|
|
245
|
+
function Af(a,b,c,d){d=Re(d.uri,d.segments[0].uri);var e=(new ta(d)).aa.split(".").pop(),f=Jf[b][e];if(f)return Promise.resolve(f);if("text"==b)return c&&"vtt"!=c?Promise.resolve("application/mp4"):Promise.resolve("text/vtt");b=Va([d],a.h.retryParameters);b.method="HEAD";return a.c.networkingEngine.request(1,b).then(function(a){a=a.headers["content-type"];if(!a)throw new p(2,4,4021,e);return a.split(";")[0]})}function nf(a,b){var c=a.getAttribute(b);if(!c)throw new p(2,4,4023,b);return c.value}
|
|
246
|
+
function zf(a,b){var c=Pe(a,b);if(!c)throw new p(2,4,4024,b);return c}function ef(a,b){return a.c.networkingEngine.request(0,Va([b],a.h.retryParameters),function(){return!this.c}.bind(a))}
|
|
247
|
+
var If={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Jf={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};
|
|
248
|
+
cf.prototype.J=function(){this.c&&(this.j=null,this.update().then(function(){gf(this,this.i)}.bind(this))["catch"](function(a){this.c&&(a.severity=1,this.c.onError(a),gf(this,0))}.bind(this)))};function gf(a,b){null!=a.i&&null!=b&&(a.j=window.setTimeout(a.J.bind(a),1E3*b))}function lf(a,b){a.f=b;a.b&&a.b.vb(a.f==hf.pa);a.f==hf.pa&&null!=a.j&&(window.clearTimeout(a.j),a.j=null,a.i=null)}
|
|
249
|
+
var Cf={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=nf(a,"METHOD");if("SAMPLE-AES-CENC"!=b&&"SAMPLE-AES-CTR"!=b)return null;b=nf(a,"URI");b=bf.parse(b);b=new Uint8Array(b.data);b=fb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Me(a,"KEYID"))b.keyIds=[a.substr(2).toLowerCase()];return b}},df="VOD",hf={pa:df,Vc:"EVENT",gc:"LIVE"};re.m3u8=cf;qe["application/x-mpegurl"]=cf;qe["application/vnd.apple.mpegurl"]=cf;function Kf(a,b,c,d,e,f){this.a=a;this.c=b;this.l=c;this.m=null==d?null:Lf(this,d);this.X=e;this.K=f;this.b=new bb;this.j=!1;this.i=1;this.h=this.f=null;this.v=!1;this.g=new rb(this.Dd.bind(this));this.J=a.readyState;this.o=!1;this.D=this.Y=-1;this.u=this.A=!1;0<a.readyState?this.yc():(eb(this.b,a,"loadedmetadata",this.yc.bind(this)),z(this.b,a,"timeupdate",function(){sb(this.g,.1)}.bind(this)));b=this.Ac.bind(this);z(this.b,a,"ratechange",this.Qd.bind(this));z(this.b,a,"waiting",b);this.h=new rb(b);
|
|
250
|
+
tb(this.h,.25)}m=Kf.prototype;m.destroy=function(){var a=this.b.destroy();this.b=null;null!=this.f&&(this.f.cancel(),this.f=null);null!=this.h&&(this.h.cancel(),this.h=null);null!=this.g&&(this.g.cancel(),this.g=null);this.K=this.X=this.l=this.c=this.a=null;return a};function Mf(a,b){0<a.a.readyState?a.a.currentTime=Nf(a,b):a.m=b}function Lf(a,b){var c=a.c.presentationTimeline.T();return b>=c?c-a.l.durationBackoff:b}
|
|
251
|
+
function Of(a){return 0<a.a.readyState?a.a.paused?a.a.currentTime:Nf(a,a.a.currentTime):Pf(a)}function Pf(a){if(null!=a.m)return Nf(a,a.m);var b=a.c.presentationTimeline;b=Infinity>b.T()?b.ka():b.rb();a.m=Lf(a,b);return b}m.Gb=function(){return this.i};function Qf(a,b){null!=a.f&&(a.f.cancel(),a.f=null);a.i=b;a.a.playbackRate=a.j||0>b?0:b;!a.j&&0>b&&(a.f=new rb(function(){this.a.currentTime+=b/4}.bind(a)),tb(a.f,.25))}m.Sb=function(){this.u=!0;this.Ac()};
|
|
252
|
+
m.Qd=function(){var a=this.j||0>this.i?0:this.i;this.a.playbackRate&&this.a.playbackRate!=a&&Qf(this,this.a.playbackRate)};m.yc=function(){var a=Pf(this);this.b.ia(this.a,"timeupdate");this.g.cancel();.001>Math.abs(this.a.currentTime-a)?(z(this.b,this.a,"seeking",this.Bc.bind(this)),z(this.b,this.a,"playing",this.zc.bind(this))):(eb(this.b,this.a,"seeking",this.Sd.bind(this)),this.a.currentTime=a)};m.Sd=function(){z(this.b,this.a,"seeking",this.Bc.bind(this));z(this.b,this.a,"playing",this.zc.bind(this))};
|
|
253
|
+
m.Ac=function(){if(0!=this.a.readyState){if(this.a.seeking){if(!this.v)return}else this.v=!1;if(!this.a.paused){this.a.readyState!=this.J&&(this.o=!1,this.J=this.a.readyState);var a=this.l.smallGapLimit,b=this.a.currentTime,c=this.a.buffered,d=this.c.presentationTimeline.ka();if(b<d)c=Rf(this,b),Sf(this,b,c);else{a:{if(c&&c.length&&!(1==c.length&&1E-6>c.end(0)-c.start(0))){d=.1;/(Edge\/|Trident\/|Tizen)/.test(navigator.userAgent)&&(d=.5);for(var e=0;e<c.length;e++)if(c.start(e)>b&&(0==e||c.end(e-
|
|
254
|
+
1)-b<=d)){d=e;break a}}d=null}if(null==d){if(3>this.a.readyState&&0<this.a.playbackRate)if(this.D!=b)this.D=b,this.Y=Date.now(),this.A=!1;else if(!this.A&&this.Y<Date.now()-1E3)for(a=0;a<c.length;a++)if(b>=c.start(a)&&b<c.end(a)-.5){this.a.currentTime+=.1;this.D=this.a.currentTime;this.A=!0;break}}else if(0!=d||this.u){e=c.start(d);var f=this.c.presentationTimeline.rb();if(!(e>=f)){f=e-b;a=f<=a;var g=!1;a||this.o||(this.o=!0,f=new A("largegap",{currentTime:b,gapSize:f}),f.cancelable=!0,this.K(f),
|
|
255
|
+
this.l.jumpLargeGaps&&!f.defaultPrevented&&(g=!0));if(a||g)0!=d&&c.end(d-1),Sf(this,b,e)}}}}}};m.Dd=function(){this.m=Rf(this,this.a.currentTime)};m.Bc=function(){this.v=!0;this.u=!1;var a=this.a.currentTime,b=Rf(this,a);.001<Math.abs(b-a)?Sf(this,a,b):(this.o=!1,this.X())};m.zc=function(){var a=this.a.currentTime,b=Rf(this,a);.001<Math.abs(b-a)&&Sf(this,a,b)};
|
|
256
|
+
function Rf(a,b){var c=Ub.bind(null,a.a.buffered),d=1*Math.max(a.c.minBufferTime||0,a.l.rebufferingGoal),e=a.c.presentationTimeline,f=e.Fa(0),g=e.wa(),h=e.T(),k=e.Fa(d),l=e.Fa(5);d=e.Fa(d+5);return b>=h?Lf(a,b):b>g?g:b<f?c(l)?l:d:b>=k||c(b)?b:d}function Sf(a,b,c){a.a.currentTime=c;var d=0,e=function(){!this.a||10<=d++||this.a.currentTime!=b||(this.a.currentTime=c,setTimeout(e,100))}.bind(a);setTimeout(e,100)}
|
|
257
|
+
function Nf(a,b){var c=a.c.presentationTimeline.ka();if(b<c)return c;c=a.c.presentationTimeline.wa();return b>c?c:b};function Tf(a,b,c,d,e,f,g){this.a=a;this.v=b;this.g=c;this.u=d;this.l=e;this.h=f;this.A=g;this.c=[];this.j=new bb;this.b=!1;this.i=-1;this.f=null;Uf(this)}Tf.prototype.destroy=function(){var a=this.j?this.j.destroy():Promise.resolve();this.j=null;Vf(this);this.A=this.h=this.l=this.u=this.g=this.v=this.a=null;this.c=[];return a};
|
|
258
|
+
Tf.prototype.o=function(a){if(!this.c.some(function(b){return b.info.schemeIdUri==a.schemeIdUri&&b.info.startTime==a.startTime&&b.info.endTime==a.endTime})){var b={info:a,status:1};this.c.push(b);var c=new A("timelineregionadded",{detail:Wf(a)});this.h(c);this.m(!0,b)}};function Wf(a){var b=Na(a);b.eventElement=a.eventElement;return b}
|
|
259
|
+
Tf.prototype.m=function(a,b){var c=b.info.startTime>this.a.currentTime?1:b.info.endTime<this.a.currentTime?3:2,d=2==b.status,e=2==c;if(c!=b.status){if(!a||d||e)d||this.h(new A("timelineregionenter",{detail:Wf(b.info)})),e||this.h(new A("timelineregionexit",{detail:Wf(b.info)}));b.status=c}};function Uf(a){Vf(a);a.f=window.setTimeout(a.D.bind(a),250)}function Vf(a){a.f&&(window.clearTimeout(a.f),a.f=null)}
|
|
260
|
+
Tf.prototype.D=function(){this.f=null;Uf(this);var a=Kc(this.g,this.a.currentTime);a!=this.i&&(-1!=this.i&&this.A(),this.i=a);a=Vb(this.a.buffered,this.a.currentTime);var b=Tb(this.a.buffered),c=this.g.presentationTimeline,d=c.wa();b=c.P()&&b>=d;c="ended"==this.v.readyState;b=b||this.a.ended||c;this.b?(c=1*Math.max(this.g.minBufferTime||0,this.u.rebufferingGoal),(b||a>=c)&&0!=this.b&&(this.b=!1,this.l(!1))):!b&&.5>a&&1!=this.b&&(this.b=!0,this.l(!0));this.c.forEach(this.m.bind(this,!1))};function Xf(a,b){this.a=b;this.b=a;this.h=null;this.i=1;this.m=Promise.resolve();this.g=[];this.j={};this.c={};this.o=!1;this.A=null;this.v=this.f=this.l=!1;this.u=0}m=Xf.prototype;m.destroy=function(){for(var a in this.c)Yf(this.c[a]);this.h=this.c=this.j=this.g=this.m=this.b=this.a=null;this.f=!0;return Promise.resolve()};
|
|
261
|
+
m.configure=function(a){this.h=a;this.A=new Ha({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0},!0)};m.init=function(){var a=Of(this.a.Ja);a=this.a.tc(this.b.periods[Kc(this.b,a)]);return a.variant||a.text?Zf(this,a).then(function(){this.a&&this.a.Hd&&this.a.Hd()}.bind(this)):Promise.reject(new p(2,5,5005))};
|
|
262
|
+
function S(a){var b=Of(a.a.Ja);return a.b.periods[Kc(a.b,b)]}function $f(a){var b=a.c.video||a.c.audio;return b?a.b.periods[b.ya]:null}function ag(a){return bg(a,"audio")}function cg(a){return bg(a,"video")}function bg(a,b){var c=a.c[b];return c?c.qa||c.stream:null}function dg(a,b){a.u++;a.v=!1;var c=a.u;a.a.L.init({text:b});return eg(a,[b]).then(function(){if(this.u==c&&!this.c.text&&!this.v){var a=Of(this.a.Ja);this.c.text=fg(b,Kc(this.b,a));gg(this,this.c.text,0)}}.bind(a))}
|
|
263
|
+
function hg(a,b){var c=a.c.video;if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;if(e){var f=c.qa;f||(ig(a,e,!1),c.qa=d)}}else if(f=c.qa)c.qa=null,ig(a,f,!0)}}function jg(a,b,c){b.video&&ig(a,b.video,c);b.audio&&ig(a,b.audio,c)}
|
|
264
|
+
function ig(a,b,c){var d=a.c[b.type];if(!d&&"text"==b.type&&a.h.ignoreTextStreamFailures)dg(a,b);else if(d){var e=Lc(a.b,b);c&&e!=d.ya?kg(a):(d.qa&&(b.trickModeVideo?(d.qa=b,b=b.trickModeVideo):d.qa=null),(e=a.g[e])&&e.Na&&(e=a.j[b.id])&&e.Na&&d.stream!=b&&("text"==b.type&&dc(a.a.L,lb(b.mimeType,b.codecs)),d.stream=b,d.sb=!0,c&&(d.ua?d.xb=!0:d.za?(d.ta=!0,d.xb=!0):(Yf(d),lg(a,d,!0)))))}}
|
|
265
|
+
function mg(a){var b=Of(a.a.Ja);Object.keys(a.c).every(function(a){var c=this.a.L;"text"==a?(a=c.a,a=b>=a.a&&b<a.b):(a=fc(c,a),a=Ub(a,b));return a}.bind(a))||kg(a)}function kg(a){for(var b in a.c){var c=a.c[b];c.ua||c.ta||(c.za?c.ta=!0:null==ec(a.a.L,b)?null==c.sa&&gg(a,c,0):(Yf(c),lg(a,c,!1)))}}
|
|
266
|
+
function Zf(a,b,c){var d=Of(a.a.Ja),e=Kc(a.b,d),f={};d=[];b.variant&&b.variant.audio&&(f.audio=b.variant.audio,d.push(b.variant.audio));b.variant&&b.variant.video&&(f.video=b.variant.video,d.push(b.variant.video));b.text&&(f.text=b.text,d.push(b.text));a.a.L.init(f);ng(a);return eg(a,d).then(function(){if(!this.f)for(var a in f){var b=f[a];this.c[a]||(this.c[a]=fg(b,e,c),gg(this,this.c[a],0))}}.bind(a))}
|
|
267
|
+
function fg(a,b,c){return{stream:a,type:a.type,Ga:null,la:null,qa:null,sb:!0,ya:b,endOfStream:!1,za:!1,sa:null,ta:!1,xb:!1,ua:!1,Xb:!1,Ta:!1,Jc:c||0}}
|
|
268
|
+
function og(a,b){var c=a.g[b];if(c)return c.N;c={N:new u,Na:!1};a.g[b]=c;var d=a.b.periods[b].variants.map(function(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);a.video&&a.video.trickModeVideo&&b.push(a.video.trickModeVideo);return b}).reduce(Pa,[]).filter(Sa);d.push.apply(d,a.b.periods[b].textStreams);a.m=a.m.then(function(){if(!this.f)return eg(this,d)}.bind(a)).then(function(){this.f||(this.g[b].N.resolve(),this.g[b].Na=!0)}.bind(a))["catch"](function(a){this.f||(this.g[b].N.reject(),
|
|
269
|
+
delete this.g[b],this.a.onError(a))}.bind(a));return c.N}function eg(a,b){b.map(function(a){return a.id}).filter(Sa);for(var c=[],d=0;d<b.length;++d){var e=b[d],f=a.j[e.id];f?c.push(f.N):(a.j[e.id]={N:new u,Na:!1},c.push(e.createSegmentIndex()))}return Promise.all(c).then(function(){if(!this.f)for(var a=0;a<b.length;++a){var c=this.j[b[a].id];c.Na||(c.N.resolve(),c.Na=!0)}}.bind(a))["catch"](function(a){if(!this.f)return this.j[e.id].N.reject(),delete this.j[e.id],Promise.reject(a)}.bind(a))}
|
|
270
|
+
function ng(a){var b=a.b.presentationTimeline.T();Infinity>b?a.a.L.ha(b):a.a.L.ha(Math.pow(2,32))}m.Ne=function(a){if(!this.f&&!a.za&&null!=a.sa&&!a.ua)if(a.sa=null,a.ta)lg(this,a,a.xb);else{try{var b=pg(this,a);null!=b&&(gg(this,a,b),a.Ta=!1)}catch(c){qg(this,c);return}b=ib(this.c);rg(this,a);b.every(function(a){return a.endOfStream})&&this.a.L.endOfStream().then(function(){this.b.presentationTimeline.ha(this.a.L.T())}.bind(this))}};
|
|
271
|
+
function pg(a,b){var c=Of(a.a.Ja),d=b.Ga&&b.la?a.b.periods[Lc(a.b,b.Ga)].startTime+b.la.endTime:Math.max(c,b.Jc),e=Lc(a.b,b.stream),f=Kc(a.b,d);var g=a.a.L;var h=b.type;"text"==h?(g=g.a,g=null==g.b||g.b<c?0:g.b-Math.max(c,g.a)):(g=fc(g,h),g=Vb(g,c));h=Math.max(a.i*Math.max(a.b.minBufferTime||0,a.h.rebufferingGoal),a.i*a.h.bufferingGoal);if(d>=a.b.presentationTimeline.T())return b.endOfStream=!0,null;b.endOfStream=!1;b.ya=f;if(f!=e)return null;if(g>=h)return.5;d=a.a.L;f=b.type;d="text"==f?d.a.b:Tb(fc(d,
|
|
272
|
+
f));b.la&&b.stream==b.Ga?(f=b.la.position+1,d=sg(a,b,e,f)):(f=b.la?b.stream.findSegmentPosition(Math.max(0,a.b.periods[Lc(a.b,b.Ga)].startTime+b.la.endTime-a.b.periods[e].startTime)):b.stream.findSegmentPosition(Math.max(0,(d||c)-a.b.periods[e].startTime)),null==f?d=null:(g=null,null==d&&(g=sg(a,b,e,Math.max(0,f-1))),d=g||sg(a,b,e,f)));if(!d)return 1;b.Jc=0;tg(a,b,c,e,d);return null}
|
|
273
|
+
function sg(a,b,c,d){c=a.b.periods[c];b=b.stream.getSegmentReference(d);if(!b)return null;d=a.b.presentationTimeline;a=d.ka();d=d.wa();return c.startTime+b.endTime<a||c.startTime+b.startTime>d?null:b}
|
|
274
|
+
function tg(a,b,c,d,e){var f=a.b.periods[d],g=b.stream,h=a.b.presentationTimeline.T(),k=a.b.periods[d+1];d=ug(a,b,d,Math.max(0,f.startTime-1E-5),k?k.startTime:h);b.za=!0;b.sb=!1;h=vg(a,e);Promise.all([d,h]).then(function(a){if(!this.f&&!this.l)return wg(this,b,c,f,g,e,a[1])}.bind(a)).then(function(){this.f||this.l||(b.za=!1,b.Xb=!1,b.ta||this.a.Sb(),gg(this,b,0),xg(this,g))}.bind(a))["catch"](function(a){this.f||this.l||(b.za=!1,"text"==b.type&&this.h.ignoreTextStreamFailures?delete this.c.text:3017==
|
|
275
|
+
a.code?yg(this,b,a):(b.Ta=!0,a.severity=2,qg(this,a)))}.bind(a))}function yg(a,b,c){if(!ib(a.c).some(function(a){return a!=b&&a.Xb})){var d=Math.round(100*a.i);if(20<d)a.i-=.2;else if(4<d)a.i-=.04;else{b.Ta=!0;a.l=!0;a.a.onError(c);return}b.Xb=!0}gg(a,b,4)}
|
|
276
|
+
function ug(a,b,c,d,e){if(!b.sb)return Promise.resolve();c=jc(a.a.L,b.type,a.b.periods[c].startTime-b.stream.presentationTimeOffset,d,e);if(!b.stream.initSegmentReference)return c;a=vg(a,b.stream.initSegmentReference).then(function(a){if(!this.f)return gc(this.a.L,b.type,a,null,null)}.bind(a))["catch"](function(a){b.sb=!0;return Promise.reject(a)});return Promise.all([c,a])}
|
|
277
|
+
function wg(a,b,c,d,e,f,g){e.containsEmsgBoxes&&(new O).Z("emsg",a.de.bind(a,d,f)).parse(g);return zg(a,b,c).then(function(){if(!this.f)return gc(this.a.L,b.type,g,f.startTime+d.startTime,f.endTime+d.startTime)}.bind(a)).then(function(){if(!this.f)return b.Ga=e,b.la=f,Promise.resolve()}.bind(a))}
|
|
278
|
+
m.de=function(a,b,c){var d=c.s.Vb(),e=c.s.Vb(),f=c.s.C(),g=c.s.C(),h=c.s.C(),k=c.s.C(),l=c.s.La(c.s.H.byteLength-c.s.U());a=a.startTime+b.startTime+g/f;if("urn:mpeg:dash:event:2012"==d)this.a.Jd();else this.a.onEvent(new A("emsg",{detail:{startTime:a,endTime:a+h/f,schemeIdUri:d,value:e,timescale:f,presentationTimeDelta:g,eventDuration:h,id:k,messageData:l}}));c.ma.stop()};
|
|
279
|
+
function zg(a,b,c){var d=Math.max(a.h.bufferBehind,a.b.presentationTimeline.b),e=ec(a.a.L,b.type);if(null==e)return Promise.resolve();c=c-e-d;return 0>=c?Promise.resolve():a.a.L.remove(b.type,e,e+c).then(function(){}.bind(a))}function xg(a,b){if(!a.o&&(a.o=ib(a.c).every(function(a){return"text"==a.type?!0:!a.ta&&!a.ua&&a.la}),a.o)){var c=Lc(a.b,b);a.g[c]||og(a,c).then(function(){this.a.sc()}.bind(a))["catch"](Qa);for(c=0;c<a.b.periods.length;++c)og(a,c)["catch"](Qa);a.a.Vd&&a.a.Vd()}}
|
|
280
|
+
function rg(a,b){if(b.ya!=Lc(a.b,b.stream)){var c=b.ya,d=ib(a.c);d.every(function(a){return a.ya==c})&&d.every(Ag)&&og(a,c).then(function(){if(!this.f&&d.every(function(a){var b=Lc(this.b,a.stream);return Ag(a)&&a.ya==c&&b!=c}.bind(this))){var a=this.b.periods[c],b=this.a.tc(a),g={};b.variant&&b.variant.video&&(g.video=b.variant.video);b.variant&&b.variant.audio&&(g.audio=b.variant.audio);b.text&&(g.text=b.text);for(var h in this.c)if(!g[h]&&"text"!=h){this.a.onError(new p(2,5,5005));return}for(h in g)if(!this.c[h])if("text"==
|
|
281
|
+
h)Zf(this,{text:g.text},a.startTime),delete g[h];else{this.a.onError(new p(2,5,5005));return}for(h in this.c)(a=g[h])?(ig(this,a,!1),gg(this,this.c[h],0)):delete this.c[h];this.a.sc()}}.bind(a))["catch"](Qa)}}function Ag(a){return!a.za&&null==a.sa&&!a.ta&&!a.ua}function vg(a,b){var c=Va(b.a(),a.h.retryParameters);if(0!=b.O||null!=b.F){var d="bytes="+b.O+"-";null!=b.F&&(d+=b.F);c.headers.Range=d}return a.a.Va.request(1,c).then(function(a){return a.data})}
|
|
282
|
+
function lg(a,b,c){b.ta=!1;b.xb=!1;b.ua=!0;ic(a.a.L,b.type).then(function(){if(!this.f&&c){var a=this.a.L,e=b.type;return"text"==e?Promise.resolve():hc(a,e,a.hd.bind(a,e))}}.bind(a)).then(function(){this.f||(b.Ga=null,b.la=null,b.ua=!1,b.endOfStream=!1,gg(this,b,0))}.bind(a))}function gg(a,b,c){b.sa=window.setTimeout(a.Ne.bind(a,b),1E3*c)}function Yf(a){null!=a.sa&&(window.clearTimeout(a.sa),a.sa=null)}
|
|
283
|
+
function qg(a,b){Ja(a.A).then(function(){this.a.onError(b);b.handled||this.h.failureCallback(b)}.bind(a))};function Bg(a,b){return new Promise(function(c,d){var e=new Bg.c;e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onload=function(b){b=b.target;var e=b.getAllResponseHeaders().trim().split("\r\n").reduce(function(a,b){var c=b.split(": ");a[c[0].toLowerCase()]=c.slice(1).join(": ");return a},{});if(200<=b.status&&299>=b.status&&202!=b.status)b.responseURL&&(a=b.responseURL),c({uri:a,data:b.response,headers:e,fromCache:!!e["x-shaka-from-cache"]});
|
|
284
|
+
else{var f=null;try{f=pb(b.response)}catch(l){}d(new p(401==b.status||403==b.status?2:1,1,1001,a,b.status,f,e))}};e.onerror=function(){d(new p(1,1,1002,a))};e.ontimeout=function(){d(new p(1,1,1003,a))};for(var f in b.headers)e.setRequestHeader(f,b.headers[f]);e.send(b.body)})}n("shaka.net.HttpPlugin",Bg);Bg.c=window.XMLHttpRequest;Ua("http",Bg,1);Ua("https",Bg,1);function Cg(){this.b=null;this.a=[]}function Dg(){if(!window.indexedDB)return Promise.resolve();var a=window.indexedDB.deleteDatabase("shaka_offline_db"),b=new u;a.onsuccess=function(){b.resolve()};a.onerror=Eg.bind(null,a,b);return b}Cg.prototype.init=function(a){return Fg(a).then(function(a){this.b=a}.bind(this))};
|
|
285
|
+
Cg.prototype.destroy=function(){return Promise.all(this.a.map(function(a){try{a.transaction.abort()}catch(b){}return a.N["catch"](Qa)})).then(function(){this.b&&(this.b.close(),this.b=null)}.bind(this))};Cg.prototype.Ea=function(a){return Gg(this,"manifest-v3",a)};function Hg(a,b){return Ig(a,b)}function Gg(a,b,c){var d;return Jg(a,b,"readonly",function(a){d=a.get(c)}).then(function(){return d.result})}
|
|
286
|
+
function Ig(a,b){return Jg(a,"manifest-v3","readonly",function(a){a.openCursor().onsuccess=function(a){if(a=a.target.result)b(a.key,a.value),a["continue"]()}})}function Kg(a,b,c){return Jg(a,"manifest-v3","readwrite",function(a){a.put(c,b)})}function Lg(a,b,c){var d;return Jg(a,b,"readwrite",function(a){a.add(c).onsuccess=function(a){d=a.target.result}}).then(function(){return d})}
|
|
287
|
+
function Mg(a,b,c,d){return Jg(a,b,"readwrite",function(a){c.forEach(function(b){a["delete"](b).onsuccess=function(){d&&d(b)}})})}function Jg(a,b,c,d){var e={transaction:a.b.transaction([b],c),N:new u};e.transaction.oncomplete=function(){a.a.splice(a.a.indexOf(e),1);e.N.resolve()};e.transaction.onabort=function(b){a.a.splice(a.a.indexOf(e),1);Eg(e.transaction,e.N,b)};e.transaction.onerror=Ng();b=e.transaction.objectStore(b);d(b);a.a.push(e);return e.N}
|
|
288
|
+
function Og(a,b,c){function d(){var b=f.pop();b?e(b,d):(a.reject(new p(1,9,9010,g)),c.abort())}function e(a,b){c.objectStore(a).openCursor().onsuccess=function(a){(a=a.target.result)?(g.push(a.value.originalManifestUri),a["continue"]()):b()}}var f=["manifest","manifest-v2"].filter(function(a){return b.objectStoreNames.contains(a)}),g=[];d()}function Eg(a,b,c){b.reject(a.error?new p(2,9,9001,a.error):new p(2,9,9002));c.preventDefault()}
|
|
289
|
+
function Fg(a){function b(){return new Promise(function(a){setTimeout(a,1E3)})}var c=a||0,d=0<c;a=Pg(d);for(var e=0;e<c;e++)a=a.then(function(a){return a?a:b().then(function(){return Pg(d)})});return a.then(function(a){return a?a:Promise.reject(new p(2,9,9001,"Failed to issue upgrade after "+c+" retries"))})}
|
|
290
|
+
function Pg(a){var b=new u,c=!1,d=window.indexedDB.open("shaka_offline_db",3);d.onupgradeneeded=function(a){var d=a.target.transaction,e=d.db,h={autoIncrement:!0};0==a.oldVersion?(e.createObjectStore("manifest-v3",h),e.createObjectStore("segment-v3",h)):Og(b,e,d);c=!0};d.onsuccess=function(d){d=d.target.result;a&&!c?(d.close(),b.resolve(null)):b.resolve(d)};d.onerror=Ng(function(){b.reject(new p(2,9,9001,"Failed to open IndexedDB Connection",d.error.message))});return b}
|
|
291
|
+
function Ng(a){return function(b){b.preventDefault();a&&a(b)}};function Qg(a,b,c){this.b={};this.i=[];this.h=a;this.j=b;this.m=c;this.g=this.a=null;this.f=this.c=0;this.l=[]}function Rg(a,b){a.l.push(b)}Qg.prototype.destroy=function(){var a=this.h,b=this.i,c=this.g||Promise.resolve();b.length&&(c=c.then(function(){return Mg(a,"segment-v3",b,null)}));this.b={};this.i=[];this.g=this.a=this.m=this.j=this.h=null;return c};function Sg(a,b,c,d,e){a.b[b]=a.b[b]||[];a.b[b].push({uris:c.a(),O:c.O,F:c.F,ic:d,Wd:e})}
|
|
292
|
+
function Tg(a,b){a.c=0;a.f=0;ib(a.b).forEach(function(a){a.forEach(this.o.bind(this))}.bind(a));a.a=b;var c=ib(a.b).map(function(a){var b=0,c=function(){if(!this.a)return Promise.reject(new p(2,9,9002));if(b>=a.length)return Promise.resolve();var d=a[b++];return Ug(this,d).then(c)}.bind(this);return c()}.bind(a));a.b={};a.g=Promise.all(c).then(function(){return Lg(this.h,"manifest-v3",b)}.bind(a)).then(function(a){this.i=[];return a}.bind(a));return a.g}
|
|
293
|
+
function Ug(a,b){var c=Va(b.uris,a.m);if(0!=b.O||null!=b.F)c.headers.Range="bytes="+b.O+"-"+(null==b.F?"":b.F);var d;return a.j.request(1,c).then(function(a){if(!this.a)return Promise.reject(new p(2,9,9002));d=a.data.byteLength;return Lg(this.h,"segment-v3",{data:a.data})}.bind(a)).then(function(a){if(!this.a)return Promise.reject(new p(2,9,9002));this.a.size+=d;this.f+=null==b.F?b.ic:b.F-b.O+1;this.i.push(a);b.Wd(a);Vg(this)}.bind(a))}Qg.prototype.o=function(a){this.c+=null==a.F?a.ic:a.F-a.O+1};
|
|
294
|
+
function Vg(a){var b=0==a.c?0:a.f/a.c,c=a.a.size;a.l.forEach(function(a){a(b,c)})};function Wg(a){return(a=/^offline:manifest\/([0-9]+)$/.exec(a))?Number(a[1]):null};function Xg(a,b,c){var d=void 0==b.expiration?Infinity:b.expiration,e=b.presentationTimeline.T();b=xc(b.periods[0]);return{offlineUri:null,originalManifestUri:a,duration:e,size:0,expiration:d,tracks:b,appMetadata:c}}function Yg(a,b){var c=Zg(b.periods[0],[],new R(null,0)),d=b.appMetadata||{};c=xc(c);return{offlineUri:a,originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
|
|
295
|
+
function Zg(a,b,c){var d=a.streams.filter($g),e=a.streams.filter(ah);b=bh(d,e,b);d=a.streams.filter(ch).map(dh);a.streams.forEach(function(b){b=b.segments.map(function(a,b){return eh(b,a)});c.Wa(a.startTime,b)});return{startTime:a.startTime,variants:b,textStreams:d}}function eh(a,b){var c="offline:segment/"+b.dataKey;return new M(a,b.startTime,b.endTime,function(){return[c]},0,null)}
|
|
296
|
+
function bh(a,b,c){var d={},e=[];e.push.apply(e,a);e.push.apply(e,b);e.forEach(function(a){a.variantIds.forEach(function(a){d[a]||(d[a]={id:a,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:c,allowedByApplication:!0,allowedByKeySystem:!0})})});a.forEach(function(a){var b=dh(a);a.variantIds.forEach(function(a){a=d[a];a.language=b.language;a.primary=a.primary||b.primary;a.audio=b})});b.forEach(function(a){var b=dh(a);a.variantIds.forEach(function(a){a=d[a];a.primary=a.primary||b.primary;
|
|
297
|
+
a.video=b})});return ib(d)}
|
|
298
|
+
function dh(a){var b=a.segments.map(function(a,b){return eh(b,a)});b=new Q(b);b={id:a.id,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:b.find.bind(b),getSegmentReference:b.get.bind(b),initSegmentReference:null,presentationTimeOffset:a.presentationTimeOffset,mimeType:a.mimeType,codecs:a.codecs,width:a.width||void 0,height:a.height||void 0,frameRate:a.frameRate||void 0,kind:a.kind,encrypted:a.encrypted,keyId:a.keyId,language:a.language,label:a.label||null,type:a.contentType,primary:a.primary,
|
|
299
|
+
trickModeVideo:null,containsEmsgBoxes:!1,roles:[],channelsCount:null};null!=a.initSegmentKey&&(b.initSegmentReference=fh(a.initSegmentKey));return b}function fh(a){var b="offline:segment/"+a;return new L(function(){return[b]},0,null)}function $g(a){return"audio"==a.contentType}function ah(a){return"video"==a.contentType}function ch(a){return"text"==a.contentType};function gh(){return hh().then(function(){var a=new Cg;return a.init().then(function(){return a})})}function ih(){return hh().then(function(){return Dg()})}function hh(){return null!=window.indexedDB?Promise.resolve():Promise.reject(new p(2,9,9E3))};function jh(){this.a=-1}m=jh.prototype;m.configure=function(){};m.start=function(a){var b=Wg(a);if(null==b)return Promise.reject(new p(2,1,9004,a));this.a=b;var c;return gh().then(function(a){c=a;return c.Ea(b)}.bind(this)).then(function(a){if(!a)throw new p(2,9,9003,b);return kh(a)}).then(function(a){return c.destroy().then(function(){return a})},function(a){return c.destroy().then(function(){throw a;})})};m.stop=function(){return Promise.resolve()};m.update=function(){};
|
|
300
|
+
m.onExpirationUpdated=function(a,b){var c=this.a,d;gh().then(function(a){d=a;return d.Ea(c)}).then(function(e){if(e&&!(0>e.sessionIds.indexOf(a))&&(void 0==e.expiration||e.expiration>b))return e.expiration=b,Kg(d,c,e)})["catch"](function(){}).then(function(){return d.destroy()})};function kh(a){var b=new R(null,0);b.ha(a.duration);var c=a.drmInfo?[a.drmInfo]:[];return{presentationTimeline:b,minBufferTime:2,offlineSessionIds:a.sessionIds,periods:a.periods.map(function(a){return Zg(a,c,b)})}}
|
|
301
|
+
qe["application/x-offline-manifest"]=jh;function lh(a){if(null!=Wg(a))return lh.a(a);var b=(b=/^offline:segment\/([0-9]+)$/.exec(a))?Number(b[1]):null;return null!=b?lh.b(b,a):Promise.reject(new p(2,1,9004,a))}n("shaka.offline.OfflineScheme",lh);lh.a=function(a){a={uri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Promise.resolve(a)};
|
|
302
|
+
lh.b=function(a,b){var c,d;return gh().then(function(b){c=b;return Gg(c,"segment-v3",a)}).then(function(a){d=a;return c.destroy()}).then(function(){if(!d)throw new p(2,9,9003,a);return{uri:b,data:d.data,headers:{}}})};Ua("offline",lh);function T(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region={x:0,y:0,width:100,height:100};this.position=null;this.positionAlign=mh;this.size=100;this.textAlign=nh;this.writingDirection=oh;this.lineInterpretation=ph;this.line=null;this.lineHeight="";this.lineAlign=qh;this.displayAlign=rh;this.fontSize=this.backgroundColor=this.color="";this.fontWeight=sh;this.fontStyle=th;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}n("shaka.text.Cue",T);var mh="auto";
|
|
303
|
+
T.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:mh};var nh="center",uh={LEFT:"left",RIGHT:"right",CENTER:nh,START:"start",END:"end"};T.textAlign=uh;var rh="before",vh={BEFORE:rh,CENTER:"center",AFTER:"after"};T.displayAlign=vh;var oh=0;T.writingDirection={HORIZONTAL_LEFT_TO_RIGHT:oh,HORIZONTAL_RIGHT_TO_LEFT:1,VERTICAL_LEFT_TO_RIGHT:2,VERTICAL_RIGHT_TO_LEFT:3};var ph=0;T.lineInterpretation={LINE_NUMBER:ph,PERCENTAGE:1};var qh="center",wh={CENTER:qh,START:"start",END:"end"};
|
|
304
|
+
T.lineAlign=wh;var sh=400;T.fontWeight={NORMAL:sh,BOLD:700};var th="normal",xh={NORMAL:th,ITALIC:"italic",OBLIQUE:"oblique"};T.fontStyle=xh;T.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function U(a){this.a=null;for(var b=0;b<a.textTracks.length;++b){var c=a.textTracks[b];c.mode="disabled";"Shaka Player TextTrack"==c.label&&(this.a=c)}this.a||(this.a=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden";this.b=this.a.cues}n("shaka.text.SimpleTextDisplayer",U);U.prototype.remove=function(a,b){if(!this.a)return!1;yh(this,function(c){return c.startTime>=b||c.endTime<=a?!1:!0});return!0};U.prototype.remove=U.prototype.remove;
|
|
305
|
+
U.prototype.append=function(a){for(var b=[],c=0;c<a.length;c++){var d=zh(a[c]);d&&b.push(d)}b.slice().sort(function(a,c){return a.startTime!=c.startTime?a.startTime-c.startTime:a.endTime!=c.endTime?a.endTime-c.startTime:b.indexOf(c)-b.indexOf(a)}).forEach(function(a){this.a.addCue(a)}.bind(this))};U.prototype.append=U.prototype.append;U.prototype.destroy=function(){this.a&&yh(this,function(){return!0});this.a=null;return Promise.resolve()};U.prototype.destroy=U.prototype.destroy;
|
|
306
|
+
U.prototype.isTextVisible=function(){return"showing"==this.a.mode};U.prototype.isTextVisible=U.prototype.isTextVisible;U.prototype.setTextVisibility=function(a){this.a.mode=a?"showing":"hidden"};U.prototype.setTextVisibility=U.prototype.setTextVisibility;
|
|
307
|
+
function zh(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;b.size=a.size;try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");2==a.writingDirection?b.vertical="lr":3==a.writingDirection&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
308
|
+
function yh(a,b){for(var c=a.b,d=[],e=0;e<c.length;++e)b(c[e])&&d.push(c[e]);for(e=0;e<d.length;++e)a.a.removeCue(d[e])};function Ah(){this.a=Promise.resolve();this.b=this.c=this.f=!1;this.i=new Promise(function(a){this.g=a}.bind(this));this.l=[];this.j=[]}Ah.prototype.then=function(a){this.a=this.a.then(a).then(function(a){return this.b?(this.g(),Promise.reject(this.h)):Promise.resolve(a)}.bind(this));return this};
|
|
309
|
+
function Bh(a){a.f||(a.a=a.a.then(function(a){this.c=!0;this.l.forEach(function(a){a()});return Promise.resolve(a)}.bind(a),function(a){this.c=!0;return this.b?(this.g(),Promise.reject(this.h)):Promise.reject(a)}.bind(a)));a.f=!0;return a.a}Ah.prototype.cancel=function(a){if(this.c)return Promise.resolve();this.b=!0;this.h=a;this.j.forEach(function(a){a()});return this.i};function V(a,b){G.call(this);this.D=!1;this.f=a;this.mb=!1;this.u=null;this.m=new bb;this.h=this.zb=this.b=this.i=this.a=this.v=this.g=this.jb=this.J=this.K=this.l=this.o=null;this.Yc=1E9;this.hb=[];this.lb=!1;this.Ca=!0;this.Ra=this.Sa=this.Y=null;this.hc=!1;this.X=null;this.kb=[];this.A={};this.c=Ch(this);this.ib={width:Infinity,height:Infinity};this.j=Dh();this.gb=0;this.Pa=this.c.preferredAudioLanguage;this.Qa=this.c.preferredTextLanguage;this.cb=this.eb="";b&&b(this);this.o=new x(this.Fe.bind(this));
|
|
310
|
+
this.jb=Eh(this);z(this.m,this.f,"error",this.Yd.bind(this))}la(V,G);n("shaka.Player",V);function Fh(a){if(!a.Y)return Promise.resolve();var b=Promise.resolve();a.i&&(b=a.i.stop(),a.i=null);a=a.Y.cancel(new p(2,7,7E3));return Promise.all([b,a])}V.prototype.destroy=function(){this.D=!0;return Fh(this).then(function(){var a=Promise.all([this.Sa,Gh(this),this.m?this.m.destroy():null,this.o?this.o.destroy():null]);this.f=null;this.mb=!1;this.c=this.o=this.h=this.m=null;return a}.bind(this))};
|
|
311
|
+
V.prototype.destroy=V.prototype.destroy;V.version="v2.3.2";var Hh={};V.registerSupportPlugin=function(a,b){Hh[a]=b};V.isBrowserSupported=function(){return!!window.Promise&&!!window.Uint8Array&&!!Array.prototype.forEach&&!!window.MediaSource&&!!MediaSource.isTypeSupported&&!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration};
|
|
312
|
+
V.probeSupport=function(){return Qb().then(function(a){var b=se(),c=cc();a={manifest:b,media:c,drm:a};for(var d in Hh)a[d]=Hh[d]();return a})};
|
|
313
|
+
V.prototype.load=function(a,b,c){var d=this.wb(),e=new Ah;this.Y=e;this.dispatchEvent(new A("loading"));var f=Date.now();return Bh(e.then(function(){return d}).then(function(){this.j=Dh();z(this.m,this.f,"playing",this.bb.bind(this));z(this.m,this.f,"pause",this.bb.bind(this));z(this.m,this.f,"ended",this.bb.bind(this));this.h=new this.c.abrFactory;this.h.configure(this.c.abr);this.u=new this.c.textDisplayFactory;this.u.setTextVisibility(this.mb);return te(a,this.o,this.c.manifest.retryParameters,
|
|
314
|
+
c)}.bind(this)).then(function(b){this.i=new b;this.i.configure(this.c.manifest);return this.i.start(a,{networkingEngine:this.o,filterNewPeriod:this.ob.bind(this),filterAllPeriods:this.bc.bind(this),onTimelineRegionAdded:this.Xd.bind(this),onEvent:this.ab.bind(this),onError:this.Oa.bind(this)})}.bind(this)).then(function(b){b.periods.some(function(a){return a.variants.some(function(a){return a.video&&a.audio})})&&b.periods.forEach(function(a){a.variants=a.variants.filter(function(a){return a.video&&
|
|
315
|
+
a.audio})});if(0==b.periods.length)throw new p(2,4,4014);this.b=b;this.zb=a;this.l=new Ab({Va:this.o,onError:this.Oa.bind(this),Rb:this.Id.bind(this),onExpirationUpdated:this.Fd.bind(this),onEvent:this.ab.bind(this)});this.l.configure(this.c.drm);return this.l.init(b,!1)}.bind(this)).then(function(){this.bc(this.b.periods);this.gb=Date.now()/1E3;this.Pa=this.c.preferredAudioLanguage;this.Qa=this.c.preferredTextLanguage;var a=this.b.presentationTimeline.T(),b=this.c.playRangeEnd,c=this.c.playRangeStart;
|
|
316
|
+
0<c&&(this.P()||this.b.presentationTimeline.Oc(c));b<a&&(this.P()||this.b.presentationTimeline.ha(b));return Promise.all([Db(this.l,this.f),this.jb])}.bind(this)).then(function(){this.h.init(this.Ge.bind(this));this.g=new Kf(this.f,this.b,this.c.streaming,void 0==b?null:b,this.Ee.bind(this),this.ab.bind(this));this.v=new Tf(this.f,this.K,this.b,this.c.streaming,this.Rc.bind(this),this.ab.bind(this),this.De.bind(this));this.J=new bc(this.f,this.K,this.u);this.a=new Xf(this.b,{Ja:this.g,L:this.J,Va:this.o,
|
|
317
|
+
tc:this.Cd.bind(this),sc:this.ad.bind(this),onError:this.Oa.bind(this),onEvent:this.ab.bind(this),Jd:this.Kd.bind(this),Sb:this.Td.bind(this),filterNewPeriod:this.ob.bind(this),filterAllPeriods:this.bc.bind(this)});this.a.configure(this.c.streaming);this.dispatchEvent(new A("streaming"));Ih(this);return this.a.init()}.bind(this)).then(function(){if(this.c.streaming.startAtSegmentBoundary){var a=Jh(this,Of(this.g));Mf(this.g,a)}this.b.periods.forEach(this.ob.bind(this));Kh(this);Lh(this);a=S(this.a);
|
|
318
|
+
var b=Ec(a.variants,this.Pa,this.eb);this.h.setVariants(b);a.variants.some(function(a){return a.primary});this.kb.forEach(this.v.o.bind(this.v));this.kb=[];eb(this.m,this.f,"loadeddata",function(){this.j.loadLatency=(Date.now()-f)/1E3}.bind(this));this.Y=null}.bind(this)))["catch"](function(a){this.Y==e&&(this.Y=null,this.dispatchEvent(new A("unloading")));return Promise.reject(a)}.bind(this))};V.prototype.load=V.prototype.load;
|
|
319
|
+
function Ih(a){function b(a){return(a.video?a.video.codecs.split(".")[0]:"")+"-"+(a.audio?a.audio.codecs.split(".")[0]:"")}var c={};a.b.periods.forEach(function(a){a.variants.forEach(function(a){var d=b(a);d in c||(c[d]=[]);c[d].push(a)})});var d=null,e=Infinity;kb(c,function(a,b){var c=0,f=0;b.forEach(function(a){c+=a.bandwidth||0;++f});var g=c/f;g<e&&(d=a,e=g)});a.b.periods.forEach(function(a){a.variants=a.variants.filter(function(a){return b(a)==d?!0:!1})})}
|
|
320
|
+
function Eh(a){a.K=new MediaSource;var b=new u;z(a.m,a.K,"sourceopen",b.resolve);a.f.src=window.URL.createObjectURL(a.K);return b}V.prototype.configure=function(a){Ma(this.c,a,Ch(this),Mh(),"");Nh(this)};V.prototype.configure=V.prototype.configure;
|
|
321
|
+
function Nh(a){a.i&&a.i.configure(a.c.manifest);a.l&&a.l.configure(a.c.drm);if(a.a){a.a.configure(a.c.streaming);try{a.b.periods.forEach(a.ob.bind(a))}catch(e){a.Oa(e)}var b=ag(a.a),c=cg(a.a),d=S(a.a);(b=Ic(b,c,d.variants))&&b.allowedByApplication&&b.allowedByKeySystem||Oh(a,d)}a.h&&(a.h.configure(a.c.abr),a.c.abr.enabled&&!a.Ca?a.h.enable():a.h.disable())}V.prototype.getConfiguration=function(){var a=Ch(this);Ma(a,this.c,Ch(this),Mh(),"");return a};V.prototype.getConfiguration=V.prototype.getConfiguration;
|
|
322
|
+
V.prototype.se=function(){this.c=Ch(this);Nh(this)};V.prototype.resetConfiguration=V.prototype.se;V.prototype.nd=function(){return this.f};V.prototype.getMediaElement=V.prototype.nd;V.prototype.oc=function(){return this.o};V.prototype.getNetworkingEngine=V.prototype.oc;V.prototype.Fb=function(){return this.zb};V.prototype.getManifestUri=V.prototype.Fb;V.prototype.P=function(){return this.b?this.b.presentationTimeline.P():!1};V.prototype.isLive=V.prototype.P;
|
|
323
|
+
V.prototype.xa=function(){return this.b?this.b.presentationTimeline.xa():!1};V.prototype.isInProgress=V.prototype.xa;V.prototype.yd=function(){if(!this.b||!this.b.periods.length)return!1;var a=this.b.periods[0].variants;return a.length?!a[0].video:!1};V.prototype.isAudioOnly=V.prototype.yd;V.prototype.ue=function(){var a=0,b=0;this.b&&(b=this.b.presentationTimeline,a=b.ka(),b=b.rb());return{start:a,end:b}};V.prototype.seekRange=V.prototype.ue;
|
|
324
|
+
V.prototype.keySystem=function(){return this.l?this.l.keySystem():""};V.prototype.keySystem=V.prototype.keySystem;V.prototype.drmInfo=function(){return this.l?this.l.b:null};V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.qb=function(){return this.l?this.l.qb():Infinity};V.prototype.getExpiration=V.prototype.qb;V.prototype.rc=function(){return this.lb};V.prototype.isBuffering=V.prototype.rc;
|
|
325
|
+
V.prototype.wb=function(){if(this.D)return Promise.resolve();this.dispatchEvent(new A("unloading"));return Fh(this).then(function(){this.Sa||(this.Sa=Ph(this).then(function(){this.Sa=null}.bind(this)));return this.Sa}.bind(this))};V.prototype.unload=V.prototype.wb;V.prototype.Gb=function(){return this.g?this.g.Gb():0};V.prototype.getPlaybackRate=V.prototype.Gb;V.prototype.Pe=function(a){this.g&&Qf(this.g,a);this.a&&hg(this.a,1!=a)};V.prototype.trickPlay=V.prototype.Pe;
|
|
326
|
+
V.prototype.bd=function(){this.g&&Qf(this.g,1);this.a&&hg(this.a,!1)};V.prototype.cancelTrickPlay=V.prototype.bd;V.prototype.wd=function(){if(!this.b||!this.g)return[];var a=Kc(this.b,Of(this.g)),b=this.A[a]||{};return zc(this.b.periods[a],b.audio,b.video)};V.prototype.getVariantTracks=V.prototype.wd;V.prototype.vd=function(){if(!this.b||!this.g)return[];var a=Kc(this.b,Of(this.g));return Ac(this.b.periods[a],(this.A[a]||{}).text).filter(function(a){return 0>this.hb.indexOf(a.id)}.bind(this))};
|
|
327
|
+
V.prototype.getTextTracks=V.prototype.vd;V.prototype.xe=function(a){if(this.a){var b=S(this.a);if(a=Cc(b,a))Qh(this,a,!1),this.Ca?this.X=a:ig(this.a,a,!0)}};V.prototype.selectTextTrack=V.prototype.xe;V.prototype.ye=function(a,b){if(this.a){this.c.abr.enabled&&qa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var c=S(this.a);(c=Bc(c,a))&&Dc(c)&&(Rh(this,c,!1),Sh(this,c,b))}};
|
|
328
|
+
V.prototype.selectVariantTrack=V.prototype.ye;V.prototype.kd=function(){if(!this.a)return[];var a=S(this.a);a=yc(a.variants).map(function(a){return a.audio}).filter(Sa);return Th(a)};V.prototype.getAudioLanguagesAndRoles=V.prototype.kd;V.prototype.ud=function(){if(!this.a)return[];var a=S(this.a);return Th(a.textStreams)};V.prototype.getTextLanguagesAndRoles=V.prototype.ud;V.prototype.jd=function(){if(!this.a)return[];var a=S(this.a);return yc(a.variants).map(function(a){return a.language}).filter(Sa)};
|
|
329
|
+
V.prototype.getAudioLanguages=V.prototype.jd;V.prototype.td=function(){return this.a?S(this.a).textStreams.map(function(a){return a.language}).filter(Sa):[]};V.prototype.getTextLanguages=V.prototype.td;function Th(a){var b=[];a.forEach(function(a){if(a){var c=a.language;a.roles.length?a.roles.forEach(function(a){b.push({language:c,role:a})}):b.push({language:c,role:""})}else b.push({language:"und",role:""})});return Xa(b,function(a,b){return a.language==b.language&&a.role==b.role})}
|
|
330
|
+
V.prototype.ve=function(a,b){if(this.a){var c=S(this.a);this.Pa=a;this.eb=b||"";Oh(this,c)}};V.prototype.selectAudioLanguage=V.prototype.ve;V.prototype.we=function(a,b){if(this.a){var c=S(this.a);this.Qa=a;this.cb=b||"";Oh(this,c)}};V.prototype.selectTextLanguage=V.prototype.we;V.prototype.Kb=function(){return this.u?this.u.isTextVisible():this.mb};V.prototype.isTextTrackVisible=V.prototype.Kb;
|
|
331
|
+
V.prototype.Be=function(a){this.u&&this.u.setTextVisibility(a);this.mb=a;Uh(this);this.a&&(a?(a=S(this.a),a=Gc(a.textStreams,this.Qa,this.cb)[0],dg(this.a,a)):(a=this.a,a.v=!0,a.c.text&&(Yf(a.c.text),delete a.c.text)))};V.prototype.setTextTrackVisibility=V.prototype.Be;V.prototype.pd=function(){return this.b?new Date(1E3*this.b.presentationTimeline.c+1E3*this.f.currentTime):null};V.prototype.getPlayheadTimeAsDate=V.prototype.pd;
|
|
332
|
+
V.prototype.rd=function(){return this.b?new Date(1E3*this.b.presentationTimeline.c):null};V.prototype.getPresentationStartTimeAsDate=V.prototype.rd;V.prototype.Db=function(){return this.J?this.J.Db():{total:[],audio:[],video:[],text:[]}};V.prototype.getBufferedInfo=V.prototype.Db;
|
|
333
|
+
V.prototype.getStats=function(){Wh(this);this.bb();var a=null,b=null,c=this.f;c=c&&c.getVideoPlaybackQuality?c.getVideoPlaybackQuality():{};if(this.g&&this.b){var d=Kc(this.b,Of(this.g)),e=this.b.periods[d];if(d=this.A[d])b=Jc(d.audio,d.video,e.variants),a=b.video||{}}a||(a={});b||(b={});return{width:a.width||0,height:a.height||0,streamBandwidth:b.bandwidth||0,decodedFrames:Number(c.totalVideoFrames),droppedFrames:Number(c.droppedVideoFrames),estimatedBandwidth:this.h?this.h.getBandwidthEstimate():
|
|
334
|
+
NaN,loadLatency:this.j.loadLatency,playTime:this.j.playTime,bufferingTime:this.j.bufferingTime,switchHistory:Na(this.j.switchHistory),stateHistory:Na(this.j.stateHistory)}};V.prototype.getStats=V.prototype.getStats;
|
|
335
|
+
V.prototype.addTextTrack=function(a,b,c,d,e,f){if(!this.a)return Promise.reject();for(var g=S(this.a),h,k=0;k<this.b.periods.length;k++)if(this.b.periods[k]==g){if(k==this.b.periods.length-1){if(h=this.b.presentationTimeline.T()-g.startTime,Infinity==h)return Promise.reject()}else h=this.b.periods[k+1].startTime-g.startTime;break}var l={id:this.Yc++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1!=b?null:new M(1,0,
|
|
336
|
+
h,function(){return[a]},0,null)},initSegmentReference:null,presentationTimeOffset:0,mimeType:d,codecs:e||"",kind:c,encrypted:!1,keyId:null,language:b,label:f||null,type:"text",primary:!1,trickModeVideo:null,containsEmsgBoxes:!1,roles:[],channelsCount:null};this.hb.push(l.id);g.textStreams.push(l);return dg(this.a,l).then(function(){if(!this.D){var a=this.b.periods.indexOf(g),d=bg(this.a,"text");d&&(this.A[a].text=d.id);this.hb.splice(this.hb.indexOf(l.id),1);Oh(this,g);Kh(this);return{id:l.id,active:!1,
|
|
337
|
+
type:"text",bandwidth:0,language:b,label:f||null,kind:c,width:null,height:null}}}.bind(this))};V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.$b=function(a,b){this.ib.width=a;this.ib.height=b};V.prototype.setMaxHardwareResolution=V.prototype.$b;V.prototype.Kc=function(){if(this.a){var a=this.a;if(a.f)a=!1;else if(a.l)a=!1;else{for(var b in a.c){var c=a.c[b];c.Ta&&(c.Ta=!1,gg(a,c,.1))}a=!0}}else a=!1;return a};V.prototype.retryStreaming=V.prototype.Kc;V.prototype.Ea=function(){return this.b};
|
|
338
|
+
V.prototype.getManifest=V.prototype.Ea;function Rh(a,b,c){b.video&&Xh(a,b.video);b.audio&&Xh(a,b.audio);var d=$f(a.a);b!=Ic(ag(a.a),cg(a.a),d?d.variants:[])&&a.j.switchHistory.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth})}function Qh(a,b,c){Xh(a,b);a.j.switchHistory.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null})}function Xh(a,b){var c=Lc(a.b,b);a.A[c]||(a.A[c]={});a.A[c][b.type]=b.id}
|
|
339
|
+
function Gh(a){a.m&&(a.m.ia(a.K,"sourceopen"),a.m.ia(a.f,"loadeddata"),a.m.ia(a.f,"playing"),a.m.ia(a.f,"pause"),a.m.ia(a.f,"ended"));a.f&&(a.f.removeAttribute("src"),a.f.load());var b=Promise.all([a.h?a.h.stop():null,a.l?a.l.destroy():null,a.J?a.J.destroy():null,a.g?a.g.destroy():null,a.v?a.v.destroy():null,a.a?a.a.destroy():null,a.i?a.i.stop():null,a.u?a.u.destroy():null]);a.l=null;a.J=null;a.g=null;a.v=null;a.a=null;a.i=null;a.u=null;a.b=null;a.zb=null;a.jb=null;a.K=null;a.kb=[];a.A={};a.j=Dh();
|
|
340
|
+
return b}function Ph(a){return a.i?Gh(a).then(function(){this.D||(this.Rc(!1),this.jb=Eh(this))}.bind(a)):Promise.resolve()}function Mh(){return{".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0)}}}
|
|
341
|
+
function Ch(a){var b=5E5;navigator.connection&&navigator.connection.type&&(b=1E6*navigator.connection.downlink);return{drm:{retryParameters:Ia(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},manifest:{retryParameters:Ia(),dash:{customScheme:function(a){if(a)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10}},streaming:{retryParameters:Ia(),failureCallback:a.ed.bind(a),rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,
|
|
342
|
+
startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1},abrFactory:E,textDisplayFactory:function(a){return new U(a)}.bind(null,a.f),abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",restrictions:{minWidth:0,maxWidth:Infinity,
|
|
343
|
+
minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity}}m=V.prototype;m.ed=function(a){var b=[1001,1002,1003];this.P()&&0<=b.indexOf(a.code)&&(a.severity=1,this.Kc())};function Dh(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:0,bufferingTime:0,switchHistory:[],stateHistory:[]}}
|
|
344
|
+
m.bc=function(a){a.forEach(tc.bind(null,this.l,this.a?ag(this.a):null,this.a?cg(this.a):null));var b=$a(a,function(a){return a.variants.some(Dc)});if(0==b)throw new p(2,4,9009);if(b<a.length)throw new p(2,4,4011);a.forEach(function(a){sc(a,this.c.restrictions,this.ib)&&this.a&&S(this.a)==a&&Kh(this);if(!a.variants.some(Dc))throw new p(2,4,4012);}.bind(this))};
|
|
345
|
+
m.ob=function(a){tc(this.l,this.a?ag(this.a):null,this.a?cg(this.a):null,a);var b=a.variants,c=b.some(Dc);sc(a,this.c.restrictions,this.ib)&&this.a&&S(this.a)==a&&Kh(this);a=b.some(Dc);if(!c)throw new p(2,4,4011);if(!a)throw new p(2,4,4012);};function Sh(a,b,c){a.Ca?(a.Ra=b,a.hc=c||!1):jg(a.a,b,c||!1)}function Wh(a){if(a.b){var b=Date.now()/1E3;a.lb?a.j.bufferingTime+=b-a.gb:a.j.playTime+=b-a.gb;a.gb=b}}
|
|
346
|
+
function Jh(a,b){function c(a,b){if(!a)return null;var c=a.findSegmentPosition(b-f.startTime);return null==c?null:(c=a.getSegmentReference(c))?c.startTime+f.startTime:null}var d=ag(a.a),e=cg(a.a),f=S(a.a);d=c(d,b);e=c(e,b);return null!=e&&null!=d?Math.max(e,d):null!=e?e:null!=d?d:b}m.Fe=function(a,b){this.h&&this.h.segmentDownloaded(a,b)};m.Rc=function(a){Wh(this);this.lb=a;this.bb();if(this.g){var b=this.g;a!=b.j&&(b.j=a,Qf(b,b.i))}this.dispatchEvent(new A("buffering",{buffering:a}))};m.De=function(){Kh(this)};
|
|
347
|
+
m.bb=function(){if(!this.D){var a=this.lb?"buffering":this.f.ended?"ended":this.f.paused?"paused":"playing";var b=Date.now()/1E3;if(this.j.stateHistory.length){var c=this.j.stateHistory[this.j.stateHistory.length-1];c.duration=b-c.timestamp;if(a==c.state)return}this.j.stateHistory.push({timestamp:b,state:a,duration:0})}};m.Ee=function(){if(this.v){var a=this.v;a.c.forEach(a.m.bind(a,!0))}this.a&&mg(this.a)};
|
|
348
|
+
function Yh(a,b){if(!b||!b.length)return a.Oa(new p(2,4,4012)),null;a.h.setVariants(b);return a.h.chooseVariant()}function Oh(a,b){var c=Ec(b.variants,a.Pa,a.eb),d=Gc(b.textStreams,a.Qa,a.cb);if(c=Yh(a,c))Rh(a,c,!0),Sh(a,c,!0);(d=d[0])&&a.Kb()&&(Qh(a,d,!0),a.Ca?a.X=d:ig(a.a,d,!0));Lh(a)}
|
|
349
|
+
m.Cd=function(a){this.Ca=!0;this.h.disable();var b={audio:!1,text:!1},c=Ec(a.variants,this.Pa,this.eb,b);a=Gc(a.textStreams,this.Qa,this.cb,b);c=Yh(this,c);a=a[0]||null;this.X=this.Ra=null;c&&Rh(this,c,!0);a&&(Qh(this,a,!0),!$f(this.a)&&c&&c.audio&&b.text&&a.language!=c.audio.language&&(this.u.setTextVisibility(!0),Uh(this)));return this.Kb()?{variant:c,text:a}:{variant:c,text:null}};
|
|
350
|
+
m.ad=function(){this.Ca=!1;this.c.abr.enabled&&this.h.enable();this.Ra&&(jg(this.a,this.Ra,this.hc),this.Ra=null);this.X&&(ig(this.a,this.X,!0),this.X=null)};m.Kd=function(){this.i&&this.i.update&&this.i.update()};m.Td=function(){this.g&&this.g.Sb()};m.Ge=function(a,b){Rh(this,a,!0);this.a&&(jg(this.a,a,b||!1),Lh(this))};function Lh(a){Promise.resolve().then(function(){this.D||this.dispatchEvent(new A("adaptation"))}.bind(a))}
|
|
351
|
+
function Kh(a){Promise.resolve().then(function(){this.D||this.dispatchEvent(new A("trackschanged"))}.bind(a))}function Uh(a){a.dispatchEvent(new A("texttrackvisibility"))}m.Oa=function(a){if(!this.D){var b=new A("error",{detail:a});this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)}};m.Xd=function(a){this.v?this.v.o(a):this.kb.push(a)};m.ab=function(a){this.dispatchEvent(a)};
|
|
352
|
+
m.Yd=function(){if(this.f.error){var a=this.f.error.code;if(1!=a){var b=this.f.error.msExtendedCode;b&&(0>b&&(b+=Math.pow(2,32)),b=b.toString(16));this.Oa(new p(2,3,3016,a,b,this.f.error.message))}}};
|
|
353
|
+
m.Id=function(a){var b=["output-restricted","internal-error"],c=S(this.a),d=!1,e=Object.keys(a),f=1==e.length&&"00"==e[0];e.length&&c.variants.forEach(function(c){var e=[];c.audio&&e.push(c.audio);c.video&&e.push(c.video);e.forEach(function(e){var g=c.allowedByKeySystem;e.keyId&&(e=a[f?"00":e.keyId],c.allowedByKeySystem=!!e&&0>b.indexOf(e));g!=c.allowedByKeySystem&&(d=!0)})});(e=Ic(ag(this.a),cg(this.a),c.variants))&&!e.allowedByKeySystem&&Oh(this,c);d&&Kh(this)};
|
|
354
|
+
m.Fd=function(a,b){if(this.i&&this.i.onExpirationUpdated)this.i.onExpirationUpdated(a,b);this.dispatchEvent(new A("expirationupdated"))};function W(a){if(!a||a.constructor!=V)throw new p(2,9,9008);this.g=null;this.a=a;this.b=Zh(this);this.f=null;this.l=!1;this.c=this.o=this.h=this.i=null}n("shaka.offline.Storage",W);function $h(){return null!=window.indexedDB}W.support=$h;W.prototype.destroy=function(){var a=this.g,b=this.c?this.c.destroy()["catch"](function(){}).then(function(){if(a)return a.destroy()}):Promise.resolve();this.b=this.a=this.c=this.g=null;return b};W.prototype.destroy=W.prototype.destroy;
|
|
355
|
+
W.prototype.configure=function(a){Ma(this.b,a,Zh(this),{},"")};W.prototype.configure=W.prototype.configure;
|
|
356
|
+
W.prototype.store=function(a,b,c){function d(a){f=a}if(this.l)return Promise.reject(new p(2,9,9006));this.l=!0;var e=b||{},f=null;return ai(this).then(function(){X(this);return bi(this,a,d,c)}.bind(this)).then(function(b){X(this);if(f)throw f;return ci(this,a,b.manifest,e,b.fd)}.bind(this)).then(function(a){X(this);return di(this).then(function(){return a})}.bind(this))["catch"](function(a){f=f||a;return di(this).then(function(){throw f;})}.bind(this))};W.prototype.store=W.prototype.store;
|
|
357
|
+
function ci(a,b,c,d,e){if(c.presentationTimeline.P()||c.presentationTimeline.xa())throw new p(2,9,9005,b);a.h=c;a.f=e;a.j(c.periods);a.o=Xg(b,c,d);var f=ei(a,b,d);return Tg(a.c,f).then(function(a){return Yg("offline:manifest/"+a,f)})}W.prototype.remove=function(a){return a.offlineUri?(qa("Removing downloaded content using shakaExtern.StoredContent is deprecated. Please remove using the offline uri."),fi(this,a.offlineUri)):fi(this,a)};W.prototype.remove=W.prototype.remove;
|
|
358
|
+
function fi(a,b){function c(a){6013!=a.code&&(e=a)}var d=Wg(b);if(null==d)return Promise.reject(new p(2,9,9004,b));var e=null,f,g;return ai(a).then(function(){X(this);return this.g.Ea(d)}.bind(a)).then(function(a){X(this);if(!a)throw new p(2,9,9003,b);f=a;a=kh(f);g=new Ab({Va:this.a.o,onError:c,Rb:function(){},onExpirationUpdated:function(){},onEvent:function(){}});g.configure(this.a.getConfiguration().drm);return g.init(a,this.b.usePersistentLicense||!1)}.bind(a)).then(function(){return Fb(g,f.sessionIds)}.bind(a)).then(function(){return g.destroy()}.bind(a)).then(function(){X(this);
|
|
359
|
+
if(e)throw e;return gi(this,b,d,f)}.bind(a))}function gi(a,b,c,d){function e(){k++;f(g,k/l)}var f=a.b.progressCallback,g=Yg(b,d),h=hi(d),k=0,l=h.length+1;return Promise.resolve().then(function(){X(this);return Mg(this.g,"segment-v3",h,e)}.bind(a)).then(function(){X(this);return Mg(this.g,"manifest-v3",[c],e)}.bind(a))}W.prototype.list=function(){var a=[];return ai(this).then(function(){X(this);return Hg(this.g,function(b,c){var d=Yg("offline:manifest/"+b,c);a.push(d)})}.bind(this)).then(function(){return a})};
|
|
360
|
+
W.prototype.list=W.prototype.list;
|
|
361
|
+
function bi(a,b,c,d){function e(){}var f=a.a.o,g=a.a.getConfiguration(),h,k,l;return te(b,f,g.manifest.retryParameters,d).then(function(a){X(this);l=new a;l.configure(g.manifest);return l.start(b,{networkingEngine:f,filterAllPeriods:this.j.bind(this),filterNewPeriod:this.m.bind(this),onTimelineRegionAdded:function(){},onEvent:function(){},onError:c})}.bind(a)).then(function(a){X(this);h=a;k=new Ab({Va:f,onError:c,Rb:e,onExpirationUpdated:function(){},onEvent:function(){}});k.configure(g.drm);return k.init(h,
|
|
362
|
+
this.b.usePersistentLicense||!1)}.bind(a)).then(function(){X(this);return ii(h)}.bind(a)).then(function(){X(this);return Eb(k)}.bind(a)).then(function(){X(this);return l.stop()}.bind(a)).then(function(){X(this);return{manifest:h,fd:k}}.bind(a))["catch"](function(a){if(l)return l.stop().then(function(){throw a;});throw a;})}
|
|
363
|
+
W.prototype.u=function(a){var b=[],c=pc(this.a.getConfiguration().preferredAudioLanguage),d=[0,nc,oc],e=a.filter(function(a){return"variant"==a.type});d=d.map(function(a){return e.filter(function(b){b=pc(b.language);return mc(a,c,b)})});for(var f,g=0;g<d.length;g++)if(d[g].length){f=d[g];break}f||(d=e.filter(function(a){return a.primary}),d.length&&(f=d));f||(f=e,e.map(function(a){return a.language}).filter(Sa));var h=f.filter(function(a){return a.height&&480>=a.height});h.length&&(h.sort(function(a,
|
|
364
|
+
b){return b.height-a.height}),f=h.filter(function(a){return a.height==h[0].height}));f.sort(function(a,b){return a.bandwidth-b.bandwidth});f.length&&b.push(f[Math.floor(f.length/2)]);b.push.apply(b,a.filter(function(a){return"text"==a.type}));return b};function Zh(a){return{trackSelectionCallback:a.u.bind(a),progressCallback:function(a,c){if(a||c)return null},usePersistentLicense:!0}}
|
|
365
|
+
function ai(a){if(null==window.indexedDB)return Promise.reject(new p(2,9,9E3));if(a.g)return Promise.resolve();var b=a.a.o,c=a.a.getConfiguration().streaming.retryParameters;return gh().then(function(a){this.g=a;this.c=new Qg(a,b,c);Rg(this.c,function(a,b){var c=this.o;c.size=b;this.b.progressCallback(c,a)}.bind(this))}.bind(a))}W.prototype.j=function(a){a.forEach(this.m.bind(this))};
|
|
366
|
+
W.prototype.m=function(a){var b=null;if(this.i){var c=this.i.filter(function(a){return"variant"==a.type})[0];c&&(b=Bc(a,c))}var d=c=null;b&&(b.audio&&(c=b.audio),b.video&&(d=b.video));tc(this.f,c,d,a);sc(a,this.a.getConfiguration().restrictions,{width:Infinity,height:Infinity})};function di(a){var b=a.f?a.f.destroy():Promise.resolve();a.f=null;a.h=null;a.l=!1;a.i=null;return b}
|
|
367
|
+
function ii(a){var b=a.periods.map(function(a){return a.variants}).reduce(Pa,[]).map(function(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}).reduce(Pa,[]).filter(Sa);a=a.periods.map(function(a){return a.textStreams}).reduce(Pa,[]);b.push.apply(b,a);return Promise.all(b.map(function(a){return a.createSegmentIndex()}))}
|
|
368
|
+
function ei(a,b,c){var d=a.h.periods.map(a.v.bind(a)),e=a.f.b,f=Ib(a.f);if(e&&a.b.usePersistentLicense){if(!f.length)throw new p(2,9,9007,b);e.initData=[]}return{originalManifestUri:b,duration:a.h.presentationTimeline.T(),size:0,expiration:a.f.qb(),periods:d,sessionIds:a.b.usePersistentLicense?f:[],drmInfo:e,appMetadata:c}}
|
|
369
|
+
W.prototype.v=function(a){var b=zc(a,null,null),c=Ac(a,null);b=this.b.trackSelectionCallback(b.concat(c));null==this.i&&(this.i=b,this.j(this.h.periods));for(c=b.length-1;0<c;--c){for(var d=!1,e=c-1;0<=e;--e)if(b[c].type==b[e].type&&b[c].kind==b[e].kind&&b[c].language==b[e].language){d=!0;break}if(d)break}d=[];for(c=0;c<b.length;c++){var f=Bc(a,b[c]);f?(f.audio&&((e=d.filter(function(a){return a.id==f.audio.id})[0])?e.variantIds.push(f.id):(e=f.video?f.bandwidth/2:f.bandwidth,d.push(ji(this,f.audio,
|
|
370
|
+
e,f.id)))),f.video&&((e=d.filter(function(a){return a.id==f.video.id})[0])?e.variantIds.push(f.id):(e=f.audio?f.bandwidth/2:f.bandwidth,d.push(ji(this,f.video,e,f.id))))):d.push(ji(this,Cc(a,b[c]),0))}return{startTime:a.startTime,streams:d}};
|
|
371
|
+
function ji(a,b,c,d){var e={id:b.id,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset||0,contentType:b.type,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,kind:b.kind,language:b.language,label:b.label,width:b.width||null,height:b.height||null,initSegmentKey:null,encrypted:b.encrypted,keyId:b.keyId,segments:[],variantIds:[]};null!=d&&e.variantIds.push(d);d=a.h.presentationTimeline.ka();ki(b,d,function(a){var d=a.startTime,f=a.endTime;Sg(this.c,b.type,a,(f-d)*c/8,function(a){e.segments.push({startTime:d,
|
|
372
|
+
endTime:f,dataKey:a})})}.bind(a));(d=b.initSegmentReference)&&Sg(a.c,b.contentType,d,0,function(a){e.initSegmentKey=a});return e}function ki(a,b,c){b=a.findSegmentPosition(b);for(var d=null==b?null:a.getSegmentReference(b);d;)c(d),d=a.getSegmentReference(++b)}function X(a){if(!a.a)throw new p(2,9,9002);}
|
|
373
|
+
function hi(a){var b=[];a.periods.forEach(function(a){a.streams.forEach(function(a){null!=a.initSegmentKey&&b.push(a.initSegmentKey);a.segments.forEach(function(a){b.push(a.dataKey)})})});return b}W.deleteAll=function(){return ih()};Hh.offline=$h;n("shaka.polyfill.installAll",function(){for(var a=0;a<li.length;++a)li[a]()});var li=[];function mi(a){li.push(a)}n("shaka.polyfill.register",mi);function ni(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}
|
|
374
|
+
mi(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
|
|
375
|
+
"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ni);document.addEventListener("webkitfullscreenerror",ni);document.addEventListener("mozfullscreenchange",ni);document.addEventListener("mozfullscreenerror",ni);document.addEventListener("MSFullscreenChange",ni);document.addEventListener("MSFullscreenError",ni)}});mi(function(){var a=navigator.userAgent;a&&0<=a.indexOf("CrKey")&&delete window.indexedDB});var oi;function pi(a,b,c){if("input"==a)switch(this.type){case "range":a="change"}oi.call(this,a,b,c)}mi(function(){0>navigator.userAgent.indexOf("Trident/")||HTMLInputElement.prototype.addEventListener==pi||(oi=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=pi)});mi(function(){if(4503599627370497!=Math.round(4503599627370497)){var a=Math.round;Math.round=function(b){var c=b;4503599627370496>=b&&(c=a(b));return c}}});function qi(a){this.f=[];this.b=[];this.a=[];(new O).Z("pssh",this.c.bind(this)).parse(a.buffer)}qi.prototype.c=function(a){if(!(1<a.version)){var b=xb(a.s.La(16)),c=[];if(0<a.version)for(var d=a.s.C(),e=0;e<d;++e){var f=xb(a.s.La(16));c.push(f)}d=a.s.C();a.s.G(d);this.b.push.apply(this.b,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1})}};function ri(a,b){try{var c=new si(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
376
|
+
function si(a,b){this.keySystem=a;for(var c=!1,d=0;d<b.length;++d){var e=b[d],f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=0;h<e.audioCapabilities.length;++h){var k=e.audioCapabilities[h];if(k.contentType){g=!0;var l=k.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,l)&&(f.audioCapabilities.push(k),c=!0)}}if(e.videoCapabilities)for(h=
|
|
377
|
+
0;h<e.videoCapabilities.length;++h)k=e.videoCapabilities[h],k.contentType&&(g=!0,l=k.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,l)&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.a=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}si.prototype.createMediaKeys=function(){var a=new ti(this.keySystem);return Promise.resolve(a)};
|
|
378
|
+
si.prototype.getConfiguration=function(){return this.a};function ui(a){var b=this.mediaKeys;b&&b!=a&&vi(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?vi(a,this):Promise.resolve()}function ti(a){this.a=new MSMediaKeys(a);this.b=new bb}ti.prototype.createSession=function(a){var b=a||"temporary";if("temporary"!=b)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new wi(this.a,b)};ti.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
379
|
+
function vi(a,b){function c(){b.msSetMediaKeys(d.a);b.removeEventListener("loadedmetadata",c)}cb(a.b);if(!b)return Promise.resolve();z(a.b,b,"msneedkey",xi);var d=a;try{return 1<=b.readyState?b.msSetMediaKeys(a.a):b.addEventListener("loadedmetadata",c),Promise.resolve()}catch(e){return Promise.reject(e)}}function wi(a){G.call(this);this.c=null;this.g=a;this.b=this.a=null;this.f=new bb;this.sessionId="";this.expiration=NaN;this.closed=new u;this.keyStatuses=new yi}la(wi,G);m=wi.prototype;
|
|
380
|
+
m.generateRequest=function(a,b){this.a=new u;try{this.c=this.g.createSession("video/mp4",new Uint8Array(b),null),z(this.f,this.c,"mskeymessage",this.Od.bind(this)),z(this.f,this.c,"mskeyadded",this.Md.bind(this)),z(this.f,this.c,"mskeyerror",this.Nd.bind(this)),zi(this,"status-pending")}catch(c){this.a.reject(c)}return this.a};m.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};m.update=function(a){this.b=new u;try{this.c.update(new Uint8Array(a))}catch(b){this.b.reject(b)}return this.b};
|
|
381
|
+
m.close=function(){try{this.c.close(),this.closed.resolve(),cb(this.f)}catch(a){this.closed.reject(a)}return this.closed};m.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
|
|
382
|
+
function xi(a){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="cenc";var c=a.initData;if(c){var d=new qi(c);if(1>=d.a.length)a=c;else{var e=[];for(a=0;a<d.a.length;a++)e.push(c.subarray(d.a[a].start,d.a[a].end+1));c=Xa(e,Ai);for(a=d=0;a<c.length;a++)d+=c[a].length;d=new Uint8Array(d);for(a=e=0;a<c.length;a++)d.set(c[a],e),e+=c[a].length;a=d}}else a=c;b.initData=a;this.dispatchEvent(b)}function Ai(a,b){return yb(a,b)}
|
|
383
|
+
m.Od=function(a){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new A("message",{messageType:void 0==this.keyStatuses.a?"licenserequest":"licenserenewal",message:a.message.buffer}))};m.Md=function(){this.a?(zi(this,"usable"),this.a.resolve(),this.a=null):this.b&&(zi(this,"usable"),this.b.resolve(),this.b=null)};
|
|
384
|
+
m.Nd=function(){var a=Error("EME PatchedMediaKeysMs key error");a.errorCode=this.c.error;if(null!=this.a)this.a.reject(a),this.a=null;else if(null!=this.b)this.b.reject(a),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:zi(this,"output-not-allowed");break;default:zi(this,"internal-error")}};function zi(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;a.dispatchEvent(new A("keystatuseschange"))}
|
|
385
|
+
function yi(){this.size=0;this.a=void 0}var Bi;m=yi.prototype;m.forEach=function(a){this.a&&a(this.a,Bi)};m.get=function(a){if(this.has(a))return this.a};m.has=function(a){var b=Bi;return this.a&&yb(new Uint8Array(a),new Uint8Array(b))?!0:!1};m.entries=function(){};m.keys=function(){};m.values=function(){};function Ci(){return Promise.reject(Error("The key system specified is not supported."))}function Di(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Ei(){throw new TypeError("Illegal constructor.");}Ei.prototype.createSession=function(){};Ei.prototype.setServerCertificate=function(){};function Fi(){throw new TypeError("Illegal constructor.");}Fi.prototype.getConfiguration=function(){};Fi.prototype.createMediaKeys=function(){};var Gi="";function Hi(a){Gi=a;Ii=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=Ji;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ki;window.MediaKeys=Li;window.MediaKeySystemAccess=Mi}function Ni(a){var b=Gi;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Ji(a,b){try{var c=new Mi(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
386
|
+
function Ki(a){var b=this.mediaKeys;b&&b!=a&&Oi(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Oi(a,this);return Promise.resolve()}
|
|
387
|
+
function Mi(a,b){this.a=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.a="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=0;f<b.length;++f){var g=b[f],h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=0;l<g.audioCapabilities.length;++l){var q=
|
|
388
|
+
g.audioCapabilities[l];if(q.contentType){k=!0;var v=q.contentType.split(";")[0];e.canPlayType(v,this.a)&&(h.audioCapabilities.push(q),d=!0)}}if(g.videoCapabilities)for(l=0;l<g.videoCapabilities.length;++l)q=g.videoCapabilities[l],q.contentType&&(k=!0,e.canPlayType(q.contentType,this.a)&&(h.videoCapabilities.push(q),d=!0));k||(d=e.canPlayType("video/mp4",this.a)||e.canPlayType("video/webm",this.a));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
|
|
389
|
+
d=!1);if(d){this.b=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Mi.prototype.createMediaKeys=function(){var a=new Li(this.a);return Promise.resolve(a)};Mi.prototype.getConfiguration=function(){return this.b};function Li(a){this.g=a;this.b=null;this.a=new bb;this.c=[];this.f={}}
|
|
390
|
+
function Oi(a,b){a.b=b;cb(a.a);var c=Gi;b&&(z(a.a,b,c+"needkey",a.be.bind(a)),z(a.a,b,c+"keymessage",a.ae.bind(a)),z(a.a,b,c+"keyadded",a.Zd.bind(a)),z(a.a,b,c+"keyerror",a.$d.bind(a)))}m=Li.prototype;m.createSession=function(a){var b=a||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+a+" is unsupported on this platform.");a=this.b||document.createElement("video");a.src||(a.src="about:blank");b=new Pi(a,this.g,b);this.c.push(b);return b};
|
|
391
|
+
m.setServerCertificate=function(){return Promise.resolve(!1)};m.be=function(a){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="webm";b.initData=a.initData;this.b.dispatchEvent(b)};m.ae=function(a){var b=Qi(this,a.sessionId);b&&(a=new A("message",{messageType:void 0==b.keyStatuses.a?"licenserequest":"licenserenewal",message:a.message}),b.b&&(b.b.resolve(),b.b=null),b.dispatchEvent(a))};
|
|
392
|
+
m.Zd=function(a){if(a=Qi(this,a.sessionId))Ri(a,"usable"),a.a&&a.a.resolve(),a.a=null};
|
|
393
|
+
m.$d=function(a){var b=Qi(this,a.sessionId);if(b){var c=Error("EME v0.1b key error");c.errorCode=a.errorCode;c.errorCode.systemCode=a.systemCode;!a.sessionId&&b.b?(c.method="generateRequest",45==a.systemCode&&(c.message="Unsupported session type."),b.b.reject(c),b.b=null):a.sessionId&&b.a?(c.method="update",b.a.reject(c),b.a=null):(c=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Ri(b,"output-restricted"):1==c?Ri(b,"expired"):Ri(b,"internal-error"))}};
|
|
394
|
+
function Qi(a,b){var c=a.f[b];return c?c:(c=a.c.shift())?(c.sessionId=b,a.f[b]=c):null}function Pi(a,b,c){G.call(this);this.f=a;this.h=!1;this.a=this.b=null;this.c=b;this.g=c;this.sessionId="";this.expiration=NaN;this.closed=new u;this.keyStatuses=new Si}la(Pi,G);
|
|
395
|
+
function Ti(a,b,c){if(a.h)return Promise.reject(Error("The session is already initialized."));a.h=!0;try{if("persistent-license"==a.g)if(c)var d=new Uint8Array(qb("LOAD_SESSION|"+c));else{var e=qb("PERSISTENT|"),f=new Uint8Array(e.byteLength+b.byteLength);f.set(new Uint8Array(e),0);f.set(new Uint8Array(b),e.byteLength);d=f}else d=new Uint8Array(b)}catch(h){return Promise.reject(h)}a.b=new u;var g=Ni("generateKeyRequest");try{a.f[g](a.c,d)}catch(h){if("InvalidStateError"!=h.name)return a.b=null,Promise.reject(h);
|
|
396
|
+
setTimeout(function(){try{this.f[g](this.c,d)}catch(k){this.b.reject(k),this.b=null}}.bind(a),10)}return a.b}m=Pi.prototype;
|
|
397
|
+
m.cc=function(a,b){if(this.a)this.a.then(this.cc.bind(this,a,b))["catch"](this.cc.bind(this,a,b));else{this.a=a;if("webkit-org.w3.clearkey"==this.c){var c=C(b);var d=JSON.parse(c);"oct"!=d.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);c=vb(d.keys[0].k);d=vb(d.keys[0].kid)}else c=new Uint8Array(b),d=null;var e=Ni("addKey");try{this.f[e](this.c,c,d,this.sessionId)}catch(f){this.a.reject(f),this.a=null}}};
|
|
398
|
+
function Ri(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;a.dispatchEvent(new A("keystatuseschange"))}m.generateRequest=function(a,b){return Ti(this,b,null)};m.load=function(a){return"persistent-license"==this.g?Ti(this,null,a):Promise.reject(Error("Not a persistent session."))};m.update=function(a){var b=new u;this.cc(b,a);return b};
|
|
399
|
+
m.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Ni("cancelKeyRequest");try{this.f[a](this.c,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};m.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Si(){this.size=0;this.a=void 0}var Ii;m=Si.prototype;m.forEach=function(a){this.a&&a(this.a,Ii)};m.get=function(a){if(this.has(a))return this.a};
|
|
400
|
+
m.has=function(a){var b=Ii;return this.a&&yb(new Uint8Array(a),new Uint8Array(b))?!0:!1};m.entries=function(){};m.keys=function(){};m.values=function(){};mi(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(HTMLMediaElement.prototype.webkitGenerateKeyRequest?Hi("webkit"):HTMLMediaElement.prototype.generateKeyRequest?Hi(""):window.MSMediaKeys?(Bi=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ui,window.MediaKeys=ti,window.MediaKeySystemAccess=si,navigator.requestMediaKeySystemAccess=
|
|
401
|
+
ri):(navigator.requestMediaKeySystemAccess=Ci,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Di,window.MediaKeys=Ei,window.MediaKeySystemAccess=Fi))});function Ui(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,arguments);b.abort=function(){};return b}}function Vi(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
402
|
+
function Wi(){var a=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(){for(var b=0,c=0;c<this.sourceBuffers.length;++c){var f=this.sourceBuffers[c];f=f.buffered.end(f.buffered.length-1);b=Math.max(b,f)}if(!isNaN(this.duration)&&b<this.duration)for(this.pc=!0,c=0;c<this.sourceBuffers.length;++c)f=this.sourceBuffers[c],f.lc=!1;return a.apply(this,arguments)};var b=!1,c=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var a=c.apply(this,
|
|
403
|
+
arguments);a.mediaSource_=this;a.addEventListener("updateend",Xi,!1);b||(this.addEventListener("sourceclose",Yi,!1),b=!0);return a}}function Xi(a){var b=a.target,c=b.mediaSource_;if(c.pc){a.preventDefault();a.stopPropagation();a.stopImmediatePropagation();b.lc=!0;for(a=0;a<c.sourceBuffers.length;++a)if(0==c.sourceBuffers[a].lc)return;c.pc=!1}}
|
|
404
|
+
function Yi(a){a=a.target;for(var b=0;b<a.sourceBuffers.length;++b)a.sourceBuffers[b].removeEventListener("updateend",Xi,!1);a.removeEventListener("sourceclose",Yi,!1)}function Zi(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1]?!1:a(b)}}
|
|
405
|
+
function $i(){var a=MediaSource.isTypeSupported,b=/^dv(?:he|av)\./;MediaSource.isTypeSupported=function(c){for(var d=c.split(/ *; */),e=d[0],f={},g=1;g<d.length;++g){var h=d[g].split("="),k=h[0];h=h[1].replace(/"(.*)"/,"$1");f[k]=h}d=f.codecs;if(!d)return a(c);var l=!1,q=!1;c=d.split(",").filter(function(a){if(b.test(a))return q=!0,!1;/^(hev|hvc)1\.2/.test(a)&&(l=!0);return!0});q&&(l=!1);f.codecs=c.join(",");l&&(f.eotf="smpte2084");for(k in f)h=f[k],e+="; "+k+'="'+h+'"';return cast.__platform__.canDisplayType(e)}}
|
|
406
|
+
mi(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)$i();else if(navigator.vendor&&0<=navigator.vendor.indexOf("Apple")){var a=navigator.appVersion;Zi();0<=a.indexOf("Version/8")?window.MediaSource=null:0<=a.indexOf("Version/9")?Ui():0<=a.indexOf("Version/10")?(Ui(),Wi()):0<=a.indexOf("Version/11")&&(Ui(),Vi())}});function Y(a){this.c=[];this.b=[];this.W=aj;if(a)try{a(this.na.bind(this),this.a.bind(this))}catch(b){this.a(b)}}var aj=0;function bj(a){var b=new Y;b.na(void 0);return b.then(function(){return a})}function cj(a){var b=new Y;b.a(a);return b}function dj(a){function b(a,b,c){a.W==aj&&(e[b]=c,d++,d==e.length&&a.na(e))}var c=new Y;if(!a.length)return c.na([]),c;for(var d=0,e=Array(a.length),f=c.a.bind(c),g=0;g<a.length;++g)a[g]&&a[g].then?a[g].then(b.bind(null,c,g),f):b(c,g,a[g]);return c}
|
|
407
|
+
function ej(a){for(var b=new Y,c=b.na.bind(b),d=b.a.bind(b),e=0;e<a.length;++e)a[e]&&a[e].then?a[e].then(c,d):c(a[e]);return b}Y.prototype.then=function(a,b){var c=new Y;switch(this.W){case 1:fj(this,c,a);break;case 2:fj(this,c,b);break;case aj:this.c.push({N:c,Ab:a}),this.b.push({N:c,Ab:b})}return c};Y.prototype["catch"]=function(a){return this.then(void 0,a)};
|
|
408
|
+
Y.prototype.na=function(a){if(this.W==aj){this.f=a;this.W=1;for(a=0;a<this.c.length;++a)fj(this,this.c[a].N,this.c[a].Ab);this.c=[];this.b=[]}};Y.prototype.a=function(a){if(this.W==aj){this.f=a;this.W=2;for(a=0;a<this.b.length;++a)fj(this,this.b[a].N,this.b[a].Ab);this.c=[];this.b=[]}};
|
|
409
|
+
function fj(a,b,c){gj.push(function(){if(c&&"function"==typeof c){try{var a=c(this.f)}catch(f){b.a(f);return}try{var e=a&&a.then}catch(f){b.a(f);return}a instanceof Y?a==b?b.a(new TypeError("Chaining cycle detected")):a.then(b.na.bind(b),b.a.bind(b)):e?hj(a,e,b):b.na(a)}else 1==this.W?b.na(this.f):b.a(this.f)}.bind(a));null==ij&&(ij=jj(kj))}
|
|
410
|
+
function hj(a,b,c){try{var d=!1;b.call(a,function(a){if(!d){d=!0;try{var b=a&&a.then}catch(g){c.a(g);return}b?hj(a,b,c):c.na(a)}},c.a.bind(c))}catch(e){c.a(e)}}function kj(){for(;gj.length;){null!=ij&&(lj(ij),ij=null);var a=gj;gj=[];for(var b=0;b<a.length;++b)a[b]()}}function jj(){return 0}function lj(){}var ij=null,gj=[];
|
|
411
|
+
mi(function(a){window.setImmediate?(jj=function(a){return window.setImmediate(a)},lj=function(a){window.clearImmediate(a)}):(jj=function(a){return window.setTimeout(a,0)},lj=function(a){window.clearTimeout(a)});if(!window.Promise||a)window.Promise=Y,window.Promise.resolve=bj,window.Promise.reject=cj,window.Promise.all=dj,window.Promise.race=ej,window.Promise.prototype.then=Y.prototype.then,window.Promise.prototype["catch"]=Y.prototype["catch"]});mi(function(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this,arguments);b&&b["catch"](function(){});return b}}});function mj(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}mi(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=mj)}});function nj(a,b,c){return new window.TextTrackCue(a,b,c)}function oj(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}mi(function(){if(!window.VTTCue&&window.TextTrackCue){var a=TextTrackCue.length;if(3==a)window.VTTCue=nj;else if(6==a)window.VTTCue=oj;else{try{var b=!!nj(1,2,"")}catch(c){b=!1}b&&(window.VTTCue=nj)}}});function pj(){}pj.prototype.parseInit=function(){};
|
|
412
|
+
pj.prototype.parseMedia=function(a,b){var c=C(a),d=[],e=new DOMParser,f=null;try{f=e.parseFromString(c,"text/xml")}catch(Wc){throw new p(2,2,2005);}if(f){var g=f.getElementsByTagName("tt")[0];if(g){e=g.getAttribute("ttp:frameRate");f=g.getAttribute("ttp:subFrameRate");var h=g.getAttribute("ttp:frameRateMultiplier");var k=g.getAttribute("ttp:tickRate");c=g.getAttribute("xml:space")||"default"}else throw new p(2,2,2005);if("default"!=c&&"preserve"!=c)throw new p(2,2,2005);c="default"==c;e=new qj(e,
|
|
413
|
+
f,h,k);f=rj(g.getElementsByTagName("styling")[0]);h=rj(g.getElementsByTagName("layout")[0]);g=rj(g.getElementsByTagName("body")[0]);for(k=0;k<g.length;k++){var l=g[k];var q=b.periodStart;var v=e,r=f,t=h,y=c;if(l.hasAttribute("begin")||l.hasAttribute("end")||!/^\s*$/.test(l.textContent)){sj(l,y);y=tj(l.getAttribute("begin"),v);var w=tj(l.getAttribute("end"),v);v=tj(l.getAttribute("dur"),v);var Vh=l.textContent;null==w&&null!=v&&(w=y+v);if(null==y||null==w)throw new p(2,2,2001);q=new T(y+q,w+q,Vh);
|
|
414
|
+
y=uj(l,"region",t);t=q;"rtl"==Z(l,y,r,"tts:direction")&&(t.writingDirection=1);w=Z(l,y,r,"tts:writingMode");"tb"==w||"tblr"==w?t.writingDirection=2:"tbrl"==w?t.writingDirection=3:"rltb"==w||"rl"==w?t.writingDirection=1:w&&(t.writingDirection=oh);if(w=Z(l,y,r,"tts:origin"))w=vj.exec(w),null!=w&&(t.region.x=Number(w[1]),t.region.y=Number(w[2]));if(w=Z(l,y,r,"tts:extent"))w=vj.exec(w),null!=w&&(t.region.width=Number(w[1]),t.region.height=Number(w[2]));if(w=Z(l,y,r,"tts:textAlign"))t.positionAlign=wj[w],
|
|
415
|
+
t.lineAlign=xj[w],t.textAlign=uh[w.toUpperCase()];if(w=Z(l,y,r,"tts:displayAlign"))t.displayAlign=vh[w.toUpperCase()];if(w=Z(l,y,r,"tts:color"))t.color=w;if(w=Z(l,y,r,"tts:backgroundColor"))t.backgroundColor=w;if(w=Z(l,y,r,"tts:fontFamily"))t.fontFamily=w;(w=Z(l,y,r,"tts:fontWeight"))&&"bold"==w&&(t.fontWeight=700);(w=Z(l,y,r,"tts:wrapOption"))&&"noWrap"==w&&(t.wrapLine=!1);(w=Z(l,y,r,"tts:lineHeight"))&&w.match(yj)&&(t.lineHeight=w);(w=Z(l,y,r,"tts:fontSize"))&&w.match(yj)&&(t.fontSize=w);if(w=Z(l,
|
|
416
|
+
y,r,"tts:fontStyle"))t.fontStyle=xh[w.toUpperCase()];(y=zj(y,r,"tts:textDecoration"))&&Aj(t,y);(l=Bj(l,r,"tts:textDecoration"))&&Aj(t,l)}else q=null;q&&d.push(q)}}return d};
|
|
417
|
+
var Cj=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Dj=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Ej=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Fj=/^(\d*\.?\d*)f$/,Gj=/^(\d*\.?\d*)t$/,Hj=/^(?:(\d*\.?\d*)h)?(?:(\d*\.?\d*)m)?(?:(\d*\.?\d*)s)?(?:(\d*\.?\d*)ms)?$/,vj=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,yj=/^(\d+px|\d+em)$/,xj={left:"start",center:qh,right:"end",start:"start",end:"end"},wj={left:"line-left",center:"center",right:"line-right"};
|
|
418
|
+
function rj(a){var b=[];if(!a)return b;for(var c=a.childNodes,d=0;d<c.length;d++){var e="span"==c[d].nodeName&&"p"==a.nodeName;c[d].nodeType!=Node.ELEMENT_NODE||"br"==c[d].nodeName||e||(e=rj(c[d]),b=b.concat(e))}b.length||b.push(a);return b}function sj(a,b){for(var c=a.childNodes,d=0;d<c.length;d++)if("br"==c[d].nodeName&&0<d)c[d-1].textContent+="\n";else if(0<c[d].childNodes.length)sj(c[d],b);else if(b){var e=c[d].textContent.trim();e=e.replace(/\s+/g," ");c[d].textContent=e}}
|
|
419
|
+
function Aj(a,b){for(var c=b.split(" "),d=0;d<c.length;d++)switch(c[d]){case "underline":0>a.textDecoration.indexOf("underline")&&a.textDecoration.push("underline");break;case "noUnderline":0<=a.textDecoration.indexOf("underline")&&Za(a.textDecoration,"underline");break;case "lineThrough":0>a.textDecoration.indexOf("lineThrough")&&a.textDecoration.push("lineThrough");break;case "noLineThrough":0<=a.textDecoration.indexOf("lineThrough")&&Za(a.textDecoration,"lineThrough");break;case "overline":0>a.textDecoration.indexOf("overline")&&
|
|
420
|
+
a.textDecoration.push("overline");break;case "noOverline":0<=a.textDecoration.indexOf("overline")&&Za(a.textDecoration,"overline")}}function Z(a,b,c,d){return(a=Bj(a,c,d))?a:zj(b,c,d)}function zj(a,b,c){for(var d=rj(a),e=0;e<d.length;e++){var f=d[e].getAttribute(c);if(f)return f}return(a=uj(a,"style",b))?a.getAttribute(c):null}function Bj(a,b,c){return(a=uj(a,"style",b))?a.getAttribute(c):null}
|
|
421
|
+
function uj(a,b,c){if(!a||1>c.length)return null;var d=null,e=a;for(a=null;e&&!(a=e.getAttribute(b))&&(e=e.parentNode,e instanceof Element););if(b=a)for(a=0;a<c.length;a++)if(c[a].getAttribute("xml:id")==b){d=c[a];break}return d}
|
|
422
|
+
function tj(a,b){var c=null;if(Cj.test(a)){c=Cj.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.b;f+=g/b.frameRate;c=f+60*e+3600*d}else Dj.test(a)?c=Ij(Dj,a):Ej.test(a)?c=Ij(Ej,a):Fj.test(a)?(c=Fj.exec(a),c=Number(c[1])/b.frameRate):Gj.test(a)?(c=Gj.exec(a),c=Number(c[1])/b.a):Hj.test(a)&&(c=Ij(Hj,a));return c}
|
|
423
|
+
function Ij(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}function qj(a,b,c,d){this.frameRate=Number(a)||30;this.b=Number(b)||1;this.a=Number(d);0==this.a&&(this.a=a?this.frameRate*this.b:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=a[1]/a[2])}D["application/ttml+xml"]=pj;function Jj(){this.a=new pj}Jj.prototype.parseInit=function(a){var b=!1;(new O).B("moov",P).B("trak",P).B("mdia",P).B("minf",P).B("stbl",P).Z("stsd",Qd).B("stpp",function(a){b=!0;a.ma.stop()}).parse(a);if(!b)throw new p(2,2,2007);};Jj.prototype.parseMedia=function(a,b){var c=!1,d=[];(new O).B("mdat",Rd(function(a){c=!0;d=d.concat(this.a.parseMedia(a,b))}.bind(this))).parse(a);if(!c)throw new p(2,2,2007);return d};D['application/mp4; codecs="stpp"']=Jj;
|
|
424
|
+
D['application/mp4; codecs="stpp.TTML.im1t"']=Jj;function Kj(){}Kj.prototype.parseInit=function(){};
|
|
425
|
+
Kj.prototype.parseMedia=function(a,b){var c=C(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");c=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new p(2,2,2E3);var d=b.segmentStart;if(null==d&&(d=0,0<=c[0].indexOf("X-TIMESTAMP-MAP"))){var e=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=c[0].match(/MPEGTS:(\d+)/m);e&&f&&(d=Lj(new Se(e[1])),d=b.periodStart+(Number(f[1])/9E4-d))}f=[];for(e=1;e<c.length;e++){var g=c[e].split("\n"),h=d;if(1==g.length&&!g[0]||/^NOTE($|[ \t])/.test(g[0])||
|
|
426
|
+
"STYLE"==g[0])var k=null;else{k=null;0>g[0].indexOf("--\x3e")&&(k=g[0],g.splice(0,1));var l=new Se(g[0]),q=Lj(l),v=Te(l,/[ \t]+--\x3e[ \t]+/g),r=Lj(l);if(null==q||null==v||null==r)throw new p(2,2,2001);g=new T(q+h,r+h,g.slice(1).join("\n").trim());Te(l,/[ \t]+/gm);for(h=Ue(l);h;)Mj(g,h),Te(l,/[ \t]+/gm),h=Ue(l);null!=k&&(g.id=k);k=g}k&&f.push(k)}return f};
|
|
427
|
+
function Mj(a,b){var c;if(c=/^align:(start|middle|center|end|left|right)$/.exec(b))c=c[1],"middle"==c?a.textAlign=nh:a.textAlign=uh[c.toUpperCase()];else if(c=/^vertical:(lr|rl)$/.exec(b))a.writingDirection="lr"==c[1]?2:3;else if(c=/^size:([\d.]+)%$/.exec(b))a.size=Number(c[1]);else if(c=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(c[1]),c[2]&&(c=c[2],a.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==c?"line-right":"center");
|
|
428
|
+
else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wh[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ph,a.line=Number(c[1]),c[2]&&(a.lineAlign=wh[c[2].toUpperCase()])}function Lj(a){a=Te(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}D["text/vtt"]=Kj;
|
|
429
|
+
D['text/vtt; codecs="vtt"']=Kj;function Nj(){this.a=null}Nj.prototype.parseInit=function(a){var b=!1;(new O).B("moov",P).B("trak",P).B("mdia",P).Z("mdhd",function(a){0==a.version?(a.s.G(4),a.s.G(4),this.a=a.s.C(),a.s.G(4)):(a.s.G(8),a.s.G(8),this.a=a.s.C(),a.s.G(8));a.s.G(4)}.bind(this)).B("minf",P).B("stbl",P).Z("stsd",Qd).B("wvtt",function(){b=!0}).parse(a);if(!this.a)throw new p(2,2,2008);if(!b)throw new p(2,2,2008);};
|
|
430
|
+
Nj.prototype.parseMedia=function(a,b){if(!this.a)throw new p(2,2,2008);var c=0,d=[],e=[],f=[],g=!1,h=!1,k=!1,l=null;(new O).B("moof",P).B("traf",P).Z("tfdt",function(a){g=!0;c=0==a.version?a.s.C():a.s.Ma()}).Z("tfhd",function(a){var b=a.flags;a=a.s;a.G(4);b&1&&a.G(8);b&2&&a.G(4);l=b&8?a.C():null}).Z("trun",function(a){h=!0;var b=a.version,c=a.flags;a=a.s;var e=a.C();c&1&&a.G(4);c&4&&a.G(4);for(var f=[],g=0;g<e;g++){var k={duration:null,dc:null};c&256&&(k.duration=a.C());c&512&&a.G(4);c&1024&&a.G(4);
|
|
431
|
+
c&2048&&(k.dc=0==b?a.C():a.Hc());f.push(k)}d=f}).B("vtte",function(){e.push(null)}).B("vttc",Rd(function(a){e.push(a)})).B("mdat",function(a){k=!0;P(a)}).parse(a);if(!k&&!g&&!h)throw new p(2,2,2008);for(var q=c,v=0;v<d.length;v++){var r=d[v],t=e[v],y=r.duration||l;y&&(r=r.dc?c+r.dc:q,q=r+y,t&&f.push(Oj(t,b.periodStart+r/this.a,b.periodStart+q/this.a)))}return f.filter(Ra)};
|
|
432
|
+
function Oj(a,b,c){var d,e,f;(new O).B("payl",Rd(function(a){d=C(a)})).B("iden",Rd(function(a){e=C(a)})).B("sttg",Rd(function(a){f=C(a)})).parse(a);return d?Pj(d,e,f,b,c):null}function Pj(a,b,c,d,e){a=new T(d,e,a);b&&(a.id=b);if(c)for(b=new Se(c),c=Ue(b);c;)Mj(a,c),Te(b,/[ \t]+/gm),c=Ue(b);return a}D['application/mp4; codecs="wvtt"']=Nj;}.call(g,this));
|
|
433
|
+
if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka;
|
|
434
|
+
else if (typeof(define)!="undefined" && define.amd)define(function(){return g.shaka});
|
|
435
|
+
else this.shaka=g.shaka;
|
|
436
|
+
})();
|
|
437
|
+
|
|
438
|
+
//# sourceMappingURL=shaka-player.compiled.map
|