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.
Files changed (339) hide show
  1. package/LICENSE +397 -0
  2. package/README.md +435 -0
  3. package/dist/lib/237.js +34 -0
  4. package/dist/lib/274.js +103 -0
  5. package/dist/lib/2a7d8bfaf2d43f53bd71.mjs +21 -0
  6. package/dist/lib/3683cfffdcbd73685ff2.svg +8 -0
  7. package/dist/lib/42e4e1954f25f8c7b965.svg +6 -0
  8. package/dist/lib/492.js +34 -0
  9. package/dist/lib/59fe962b3e6bd8bfdda7.svg +3 -0
  10. package/dist/lib/5ea0869845becef03a06.svg +4 -0
  11. package/dist/lib/671.js +34 -0
  12. package/dist/lib/76692c54994797ddfb04.svg +3 -0
  13. package/dist/lib/815.js +34 -0
  14. package/dist/lib/8475f8e672ed83e24520.svg +6 -0
  15. package/dist/lib/88.css +23 -0
  16. package/dist/lib/9fb032a1799ca2a1c751.svg +3 -0
  17. package/dist/lib/assets/loading_ghost.gif +0 -0
  18. package/dist/lib/bb72d81b39be40898db2.svg +3 -0
  19. package/dist/lib/cmaps/78-EUC-H.bcmap +0 -0
  20. package/dist/lib/cmaps/78-EUC-V.bcmap +0 -0
  21. package/dist/lib/cmaps/78-H.bcmap +0 -0
  22. package/dist/lib/cmaps/78-RKSJ-H.bcmap +0 -0
  23. package/dist/lib/cmaps/78-RKSJ-V.bcmap +0 -0
  24. package/dist/lib/cmaps/78-V.bcmap +0 -0
  25. package/dist/lib/cmaps/78ms-RKSJ-H.bcmap +0 -0
  26. package/dist/lib/cmaps/78ms-RKSJ-V.bcmap +0 -0
  27. package/dist/lib/cmaps/83pv-RKSJ-H.bcmap +0 -0
  28. package/dist/lib/cmaps/90ms-RKSJ-H.bcmap +0 -0
  29. package/dist/lib/cmaps/90ms-RKSJ-V.bcmap +0 -0
  30. package/dist/lib/cmaps/90msp-RKSJ-H.bcmap +0 -0
  31. package/dist/lib/cmaps/90msp-RKSJ-V.bcmap +0 -0
  32. package/dist/lib/cmaps/90pv-RKSJ-H.bcmap +0 -0
  33. package/dist/lib/cmaps/90pv-RKSJ-V.bcmap +0 -0
  34. package/dist/lib/cmaps/Add-H.bcmap +0 -0
  35. package/dist/lib/cmaps/Add-RKSJ-H.bcmap +0 -0
  36. package/dist/lib/cmaps/Add-RKSJ-V.bcmap +0 -0
  37. package/dist/lib/cmaps/Add-V.bcmap +0 -0
  38. package/dist/lib/cmaps/Adobe-CNS1-0.bcmap +0 -0
  39. package/dist/lib/cmaps/Adobe-CNS1-1.bcmap +0 -0
  40. package/dist/lib/cmaps/Adobe-CNS1-2.bcmap +0 -0
  41. package/dist/lib/cmaps/Adobe-CNS1-3.bcmap +0 -0
  42. package/dist/lib/cmaps/Adobe-CNS1-4.bcmap +0 -0
  43. package/dist/lib/cmaps/Adobe-CNS1-5.bcmap +0 -0
  44. package/dist/lib/cmaps/Adobe-CNS1-6.bcmap +0 -0
  45. package/dist/lib/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  46. package/dist/lib/cmaps/Adobe-GB1-0.bcmap +0 -0
  47. package/dist/lib/cmaps/Adobe-GB1-1.bcmap +0 -0
  48. package/dist/lib/cmaps/Adobe-GB1-2.bcmap +0 -0
  49. package/dist/lib/cmaps/Adobe-GB1-3.bcmap +0 -0
  50. package/dist/lib/cmaps/Adobe-GB1-4.bcmap +0 -0
  51. package/dist/lib/cmaps/Adobe-GB1-5.bcmap +0 -0
  52. package/dist/lib/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  53. package/dist/lib/cmaps/Adobe-Japan1-0.bcmap +0 -0
  54. package/dist/lib/cmaps/Adobe-Japan1-1.bcmap +0 -0
  55. package/dist/lib/cmaps/Adobe-Japan1-2.bcmap +0 -0
  56. package/dist/lib/cmaps/Adobe-Japan1-3.bcmap +0 -0
  57. package/dist/lib/cmaps/Adobe-Japan1-4.bcmap +0 -0
  58. package/dist/lib/cmaps/Adobe-Japan1-5.bcmap +0 -0
  59. package/dist/lib/cmaps/Adobe-Japan1-6.bcmap +0 -0
  60. package/dist/lib/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  61. package/dist/lib/cmaps/Adobe-Korea1-0.bcmap +0 -0
  62. package/dist/lib/cmaps/Adobe-Korea1-1.bcmap +0 -0
  63. package/dist/lib/cmaps/Adobe-Korea1-2.bcmap +0 -0
  64. package/dist/lib/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  65. package/dist/lib/cmaps/B5-H.bcmap +0 -0
  66. package/dist/lib/cmaps/B5-V.bcmap +0 -0
  67. package/dist/lib/cmaps/B5pc-H.bcmap +0 -0
  68. package/dist/lib/cmaps/B5pc-V.bcmap +0 -0
  69. package/dist/lib/cmaps/CNS-EUC-H.bcmap +0 -0
  70. package/dist/lib/cmaps/CNS-EUC-V.bcmap +0 -0
  71. package/dist/lib/cmaps/CNS1-H.bcmap +0 -0
  72. package/dist/lib/cmaps/CNS1-V.bcmap +0 -0
  73. package/dist/lib/cmaps/CNS2-H.bcmap +0 -0
  74. package/dist/lib/cmaps/CNS2-V.bcmap +3 -0
  75. package/dist/lib/cmaps/ETHK-B5-H.bcmap +0 -0
  76. package/dist/lib/cmaps/ETHK-B5-V.bcmap +0 -0
  77. package/dist/lib/cmaps/ETen-B5-H.bcmap +0 -0
  78. package/dist/lib/cmaps/ETen-B5-V.bcmap +0 -0
  79. package/dist/lib/cmaps/ETenms-B5-H.bcmap +3 -0
  80. package/dist/lib/cmaps/ETenms-B5-V.bcmap +0 -0
  81. package/dist/lib/cmaps/EUC-H.bcmap +0 -0
  82. package/dist/lib/cmaps/EUC-V.bcmap +0 -0
  83. package/dist/lib/cmaps/Ext-H.bcmap +0 -0
  84. package/dist/lib/cmaps/Ext-RKSJ-H.bcmap +0 -0
  85. package/dist/lib/cmaps/Ext-RKSJ-V.bcmap +0 -0
  86. package/dist/lib/cmaps/Ext-V.bcmap +0 -0
  87. package/dist/lib/cmaps/GB-EUC-H.bcmap +0 -0
  88. package/dist/lib/cmaps/GB-EUC-V.bcmap +0 -0
  89. package/dist/lib/cmaps/GB-H.bcmap +4 -0
  90. package/dist/lib/cmaps/GB-V.bcmap +0 -0
  91. package/dist/lib/cmaps/GBK-EUC-H.bcmap +0 -0
  92. package/dist/lib/cmaps/GBK-EUC-V.bcmap +0 -0
  93. package/dist/lib/cmaps/GBK2K-H.bcmap +0 -0
  94. package/dist/lib/cmaps/GBK2K-V.bcmap +0 -0
  95. package/dist/lib/cmaps/GBKp-EUC-H.bcmap +0 -0
  96. package/dist/lib/cmaps/GBKp-EUC-V.bcmap +0 -0
  97. package/dist/lib/cmaps/GBT-EUC-H.bcmap +0 -0
  98. package/dist/lib/cmaps/GBT-EUC-V.bcmap +0 -0
  99. package/dist/lib/cmaps/GBT-H.bcmap +0 -0
  100. package/dist/lib/cmaps/GBT-V.bcmap +0 -0
  101. package/dist/lib/cmaps/GBTpc-EUC-H.bcmap +0 -0
  102. package/dist/lib/cmaps/GBTpc-EUC-V.bcmap +0 -0
  103. package/dist/lib/cmaps/GBpc-EUC-H.bcmap +0 -0
  104. package/dist/lib/cmaps/GBpc-EUC-V.bcmap +0 -0
  105. package/dist/lib/cmaps/H.bcmap +0 -0
  106. package/dist/lib/cmaps/HKdla-B5-H.bcmap +0 -0
  107. package/dist/lib/cmaps/HKdla-B5-V.bcmap +0 -0
  108. package/dist/lib/cmaps/HKdlb-B5-H.bcmap +0 -0
  109. package/dist/lib/cmaps/HKdlb-B5-V.bcmap +0 -0
  110. package/dist/lib/cmaps/HKgccs-B5-H.bcmap +0 -0
  111. package/dist/lib/cmaps/HKgccs-B5-V.bcmap +0 -0
  112. package/dist/lib/cmaps/HKm314-B5-H.bcmap +0 -0
  113. package/dist/lib/cmaps/HKm314-B5-V.bcmap +0 -0
  114. package/dist/lib/cmaps/HKm471-B5-H.bcmap +0 -0
  115. package/dist/lib/cmaps/HKm471-B5-V.bcmap +0 -0
  116. package/dist/lib/cmaps/HKscs-B5-H.bcmap +0 -0
  117. package/dist/lib/cmaps/HKscs-B5-V.bcmap +0 -0
  118. package/dist/lib/cmaps/Hankaku.bcmap +0 -0
  119. package/dist/lib/cmaps/Hiragana.bcmap +0 -0
  120. package/dist/lib/cmaps/KSC-EUC-H.bcmap +0 -0
  121. package/dist/lib/cmaps/KSC-EUC-V.bcmap +0 -0
  122. package/dist/lib/cmaps/KSC-H.bcmap +0 -0
  123. package/dist/lib/cmaps/KSC-Johab-H.bcmap +0 -0
  124. package/dist/lib/cmaps/KSC-Johab-V.bcmap +0 -0
  125. package/dist/lib/cmaps/KSC-V.bcmap +0 -0
  126. package/dist/lib/cmaps/KSCms-UHC-H.bcmap +0 -0
  127. package/dist/lib/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  128. package/dist/lib/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  129. package/dist/lib/cmaps/KSCms-UHC-V.bcmap +0 -0
  130. package/dist/lib/cmaps/KSCpc-EUC-H.bcmap +0 -0
  131. package/dist/lib/cmaps/KSCpc-EUC-V.bcmap +0 -0
  132. package/dist/lib/cmaps/Katakana.bcmap +0 -0
  133. package/dist/lib/cmaps/LICENSE +36 -0
  134. package/dist/lib/cmaps/NWP-H.bcmap +0 -0
  135. package/dist/lib/cmaps/NWP-V.bcmap +0 -0
  136. package/dist/lib/cmaps/RKSJ-H.bcmap +0 -0
  137. package/dist/lib/cmaps/RKSJ-V.bcmap +0 -0
  138. package/dist/lib/cmaps/Roman.bcmap +0 -0
  139. package/dist/lib/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  140. package/dist/lib/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  141. package/dist/lib/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  142. package/dist/lib/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  143. package/dist/lib/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  144. package/dist/lib/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  145. package/dist/lib/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  146. package/dist/lib/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  147. package/dist/lib/cmaps/UniGB-UCS2-H.bcmap +0 -0
  148. package/dist/lib/cmaps/UniGB-UCS2-V.bcmap +0 -0
  149. package/dist/lib/cmaps/UniGB-UTF16-H.bcmap +0 -0
  150. package/dist/lib/cmaps/UniGB-UTF16-V.bcmap +0 -0
  151. package/dist/lib/cmaps/UniGB-UTF32-H.bcmap +0 -0
  152. package/dist/lib/cmaps/UniGB-UTF32-V.bcmap +0 -0
  153. package/dist/lib/cmaps/UniGB-UTF8-H.bcmap +0 -0
  154. package/dist/lib/cmaps/UniGB-UTF8-V.bcmap +0 -0
  155. package/dist/lib/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  156. package/dist/lib/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  157. package/dist/lib/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  158. package/dist/lib/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  159. package/dist/lib/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  160. package/dist/lib/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  161. package/dist/lib/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  162. package/dist/lib/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  163. package/dist/lib/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  164. package/dist/lib/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  165. package/dist/lib/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  166. package/dist/lib/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  167. package/dist/lib/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  168. package/dist/lib/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  169. package/dist/lib/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  170. package/dist/lib/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  171. package/dist/lib/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  172. package/dist/lib/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  173. package/dist/lib/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  174. package/dist/lib/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  175. package/dist/lib/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  176. package/dist/lib/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  177. package/dist/lib/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  178. package/dist/lib/cmaps/UniKS-UCS2-H.bcmap +0 -0
  179. package/dist/lib/cmaps/UniKS-UCS2-V.bcmap +0 -0
  180. package/dist/lib/cmaps/UniKS-UTF16-H.bcmap +0 -0
  181. package/dist/lib/cmaps/UniKS-UTF16-V.bcmap +0 -0
  182. package/dist/lib/cmaps/UniKS-UTF32-H.bcmap +0 -0
  183. package/dist/lib/cmaps/UniKS-UTF32-V.bcmap +0 -0
  184. package/dist/lib/cmaps/UniKS-UTF8-H.bcmap +0 -0
  185. package/dist/lib/cmaps/UniKS-UTF8-V.bcmap +0 -0
  186. package/dist/lib/cmaps/V.bcmap +0 -0
  187. package/dist/lib/cmaps/WP-Symbol.bcmap +0 -0
  188. package/dist/lib/exif/exif-reader.min.js +8 -0
  189. package/dist/lib/exif/exif.js +822 -0
  190. package/dist/lib/exif/exif.min.js +21 -0
  191. package/dist/lib/fde82a50e6de20239861.svg +5 -0
  192. package/dist/lib/ff2dfa442d903d9d5e30.gif +0 -0
  193. package/dist/lib/index.css +84 -0
  194. package/dist/lib/index.d.ts +147 -0
  195. package/dist/lib/index.js +41639 -0
  196. package/dist/lib/pdfjs-lib.js +46 -0
  197. package/dist/lib/pdfjs-viewer-css.js +36 -0
  198. package/dist/lib/pdfjs-viewer.js +8118 -0
  199. package/dist/lib/third-party/media/0.127.0/shaka-player.compiled.js +371 -0
  200. package/dist/lib/third-party/media/1.30.0/shaka-player.compiled.js +438 -0
  201. package/dist/lib/third-party/media/1.33.0/shaka-player.compiled.js +438 -0
  202. package/dist/lib/third-party/media/1.8.0/shaka-player.compiled.js +376 -0
  203. package/dist/lib/third-party/media/2.14.0/shaka-player.compiled.js +609 -0
  204. package/dist/lib/third-party/media/2.66.0/manifest.json +8 -0
  205. package/dist/lib/third-party/media/2.66.0/shaka-player.compiled.js +752 -0
  206. package/dist/lib/third-party/media/2.93.0/manifest.json +8 -0
  207. package/dist/lib/third-party/media/2.93.0/shaka-player.compiled.js +975 -0
  208. package/dist/lib/third-party/media/3.25.0/manifest.json +8 -0
  209. package/dist/lib/third-party/media/3.25.0/shaka-player.compiled.js +1780 -0
  210. package/dist/lib/third-party/model3d/1.10.1/WebVR/VRConfig.js +49 -0
  211. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  212. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  213. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  214. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  215. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  216. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/entities.json +322 -0
  217. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/entities.json +755 -0
  218. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
  219. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/entities.json +746 -0
  220. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/geometry.bin +0 -0
  221. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/entities.json +1811 -0
  222. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/geometry.bin +0 -0
  223. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/1.png +0 -0
  224. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/2.jpg +0 -0
  225. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/3.jpg +0 -0
  226. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/1.png +0 -0
  227. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/2.jpg +0 -0
  228. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/3.jpg +0 -0
  229. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/4.png +0 -0
  230. package/dist/lib/third-party/model3d/1.10.1/box3d-player.json +1 -0
  231. package/dist/lib/third-party/model3d/1.10.1/box3d-runtime.min.js +2 -0
  232. package/dist/lib/third-party/model3d/1.10.1/boxsdk.min.js +2 -0
  233. package/dist/lib/third-party/model3d/1.10.1/matcap.png +0 -0
  234. package/dist/lib/third-party/model3d/1.10.1/three.min.js +882 -0
  235. package/dist/lib/third-party/model3d/1.10.1/webvr-polyfill.js +6341 -0
  236. package/dist/lib/third-party/model3d/1.12.0/WebVR/VRConfig.js +49 -0
  237. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  238. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  239. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  240. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  241. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  242. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/entities.json +322 -0
  243. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/entities.json +755 -0
  244. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/geometry.bin +0 -0
  245. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/entities.json +746 -0
  246. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/geometry.bin +0 -0
  247. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/entities.json +1811 -0
  248. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/geometry.bin +0 -0
  249. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/1.png +0 -0
  250. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/2.jpg +0 -0
  251. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/3.jpg +0 -0
  252. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/1.png +0 -0
  253. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/2.jpg +0 -0
  254. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/3.jpg +0 -0
  255. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/4.png +0 -0
  256. package/dist/lib/third-party/model3d/1.12.0/box3d-player.json +1 -0
  257. package/dist/lib/third-party/model3d/1.12.0/box3d-runtime.min.js +2 -0
  258. package/dist/lib/third-party/model3d/1.12.0/boxsdk.min.js +2 -0
  259. package/dist/lib/third-party/model3d/1.12.0/matcap.png +0 -0
  260. package/dist/lib/third-party/model3d/1.12.0/three.min.js +882 -0
  261. package/dist/lib/third-party/model3d/1.12.0/webvr-polyfill.js +6341 -0
  262. package/dist/lib/third-party/model3d/1.6.1/WebVR/VRConfig.js +49 -0
  263. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  264. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  265. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  266. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  267. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  268. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/entities.json +439 -0
  269. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/entities.json +755 -0
  270. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
  271. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/entities.json +746 -0
  272. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/geometry.bin +0 -0
  273. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/entities.json +1869 -0
  274. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/geometry.bin +0 -0
  275. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/1.png +0 -0
  276. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/2.jpg +0 -0
  277. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/3.jpg +0 -0
  278. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/1.png +0 -0
  279. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/2.jpg +0 -0
  280. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/3.jpg +0 -0
  281. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/4.png +0 -0
  282. package/dist/lib/third-party/model3d/1.6.1/box3d-player.json +1 -0
  283. package/dist/lib/third-party/model3d/1.6.1/box3d-runtime.min.js +2 -0
  284. package/dist/lib/third-party/model3d/1.6.1/boxsdk.min.js +2 -0
  285. package/dist/lib/third-party/model3d/1.6.1/matcap.png +0 -0
  286. package/dist/lib/third-party/model3d/1.6.1/three.min.js +43300 -0
  287. package/dist/lib/third-party/model3d/1.6.1/webvr-polyfill.js +6341 -0
  288. package/dist/lib/third-party/model3d/1.9.1/WebVR/VRConfig.js +49 -0
  289. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  290. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  291. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  292. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  293. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  294. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/entities.json +439 -0
  295. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/entities.json +755 -0
  296. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
  297. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/entities.json +746 -0
  298. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/geometry.bin +0 -0
  299. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/entities.json +1869 -0
  300. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/geometry.bin +0 -0
  301. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/1.png +0 -0
  302. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/2.jpg +0 -0
  303. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/3.jpg +0 -0
  304. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/1.png +0 -0
  305. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/2.jpg +0 -0
  306. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/3.jpg +0 -0
  307. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/4.png +0 -0
  308. package/dist/lib/third-party/model3d/1.9.1/box3d-player.json +1 -0
  309. package/dist/lib/third-party/model3d/1.9.1/box3d-runtime.min.js +2 -0
  310. package/dist/lib/third-party/model3d/1.9.1/boxsdk.min.js +2 -0
  311. package/dist/lib/third-party/model3d/1.9.1/matcap.png +0 -0
  312. package/dist/lib/third-party/model3d/1.9.1/three.min.js +882 -0
  313. package/dist/lib/third-party/model3d/1.9.1/webvr-polyfill.js +6341 -0
  314. package/dist/lib/third-party/swf/0.112.0/swfobject.js +6 -0
  315. package/dist/lib/third-party/text/0.112.0/github-markdown.css +681 -0
  316. package/dist/lib/third-party/text/0.112.0/github.css +123 -0
  317. package/dist/lib/third-party/text/0.112.0/highlight.min.js +3 -0
  318. package/dist/lib/third-party/text/0.112.0/papaparse.js +1457 -0
  319. package/dist/lib/third-party/text/0.112.0/papaparse.min.js +34 -0
  320. package/dist/lib/third-party/text/0.112.0/remarkable.min.js +4 -0
  321. package/dist/lib/third-party/text/0.114.0/github-markdown.css +681 -0
  322. package/dist/lib/third-party/text/0.114.0/github-markdown.min.css +1 -0
  323. package/dist/lib/third-party/text/0.114.0/github.css +123 -0
  324. package/dist/lib/third-party/text/0.114.0/github.min.css +1 -0
  325. package/dist/lib/third-party/text/0.114.0/highlight.min.js +3 -0
  326. package/dist/lib/third-party/text/0.114.0/manifest.json +10 -0
  327. package/dist/lib/third-party/text/0.114.0/papaparse.js +1457 -0
  328. package/dist/lib/third-party/text/0.114.0/papaparse.min.js +34 -0
  329. package/dist/lib/third-party/text/0.114.0/remarkable.min.js +4 -0
  330. package/dist/lib/third-party/text/2.65.0/github-markdown.css +681 -0
  331. package/dist/lib/third-party/text/2.65.0/github-markdown.min.css +1 -0
  332. package/dist/lib/third-party/text/2.65.0/github.css +99 -0
  333. package/dist/lib/third-party/text/2.65.0/github.min.css +1 -0
  334. package/dist/lib/third-party/text/2.65.0/highlight.min.js +2 -0
  335. package/dist/lib/third-party/text/2.65.0/manifest.json +10 -0
  336. package/dist/lib/third-party/text/2.65.0/papaparse.js +1897 -0
  337. package/dist/lib/third-party/text/2.65.0/papaparse.min.js +7 -0
  338. package/dist/lib/third-party/text/2.65.0/remarkable.min.js +1 -0
  339. package/package.json +198 -0
@@ -0,0 +1,371 @@
1
+ (function(){var g={};
2
+ (function(window){var k,aa=this;aa.ue=!0;function m(a,b){var c=a.split("."),d=aa;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}function ba(a){var b=p;function c(){}c.prototype=b.prototype;a.ze=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.we=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}};/*
3
+
4
+ Copyright 2016 Google Inc.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ */
18
+ function ca(a){this.c=Math.exp(Math.log(.5)/a);this.b=this.a=0}function da(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 ea(a){return a.a/(1-Math.pow(a.c,a.b))};function fa(){this.c=new ca(2);this.f=new ca(5);this.a=0;this.b=5E5}fa.prototype.setDefaultEstimate=function(a){this.b=a};fa.prototype.getBandwidthEstimate=function(){return 128E3>this.a?this.b:Math.min(ea(this.c),ea(this.f))};function ga(){};function t(a,b,c,d){this.severity=a;this.category=b;this.code=c;this.data=Array.prototype.slice.call(arguments,3)}m("shaka.util.Error",t);t.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};t.Severity={RECOVERABLE:1,CRITICAL:2};t.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
19
+ t.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,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,MP4_SIDX_INVALID_TIMESCALE:3005,
20
+ 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,DASH_EMPTY_ADAPTATION_SET:4003,
21
+ 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,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,
22
+ HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,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,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,
23
+ 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,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007};var ha=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function ia(a){var b;a instanceof ia?(ja(this,a.aa),this.Aa=a.Aa,this.ca=a.ca,ka(this,a.Ia),this.W=a.W,la(this,ma(a.a)),this.ta=a.ta):a&&(b=String(a).match(ha))?(ja(this,b[1]||"",!0),this.Aa=na(b[2]||""),this.ca=na(b[3]||"",!0),ka(this,b[4]),this.W=na(b[5]||"",!0),la(this,b[6]||"",!0),this.ta=na(b[7]||"")):this.a=new pa(null)}k=ia.prototype;k.aa="";k.Aa="";k.ca="";k.Ia=null;k.W="";k.ta="";
24
+ k.toString=function(){var a=[],b=this.aa;b&&a.push(qa(b,ra,!0),":");if(b=this.ca){a.push("//");var c=this.Aa;c&&a.push(qa(c,ra,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ia;null!=b&&a.push(":",String(b))}if(b=this.W)this.ca&&"/"!=b.charAt(0)&&a.push("/"),a.push(qa(b,"/"==b.charAt(0)?sa:ta,!0));(b=this.a.toString())&&a.push("?",b);(b=this.ta)&&a.push("#",qa(b,ua));return a.join("")};
25
+ k.resolve=function(a){var b=new ia(this);"data"===b.aa&&(b=new ia);var c=!!a.aa;c?ja(b,a.aa):c=!!a.Aa;c?b.Aa=a.Aa:c=!!a.ca;c?b.ca=a.ca:c=null!=a.Ia;var d=a.W;if(c)ka(b,a.Ia);else if(c=!!a.W){if("/"!=d.charAt(0))if(this.ca&&!this.W)d="/"+d;else{var e=b.W.lastIndexOf("/");-1!=e&&(d=b.W.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){for(var e=!d.lastIndexOf("/",0),d=d.split("/"),f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==h?((1<
26
+ 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.W=d:c=""!==a.a.toString();c?la(b,ma(a.a)):c=!!a.ta;c&&(b.ta=a.ta);return b};function ja(a,b,c){a.aa=c?na(b,!0):b;a.aa&&(a.aa=a.aa.replace(/:$/,""))}function ka(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ia=b}else a.Ia=null}function la(a,b,c){b instanceof pa?a.a=b:(c||(b=qa(b,va)),a.a=new pa(b))}
27
+ function na(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function qa(a,b,c){return"string"==typeof a?(a=encodeURI(a).replace(b,wa),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function wa(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ra=/[#\/\?@]/g,ta=/[\#\?:]/g,sa=/[\#\?]/g,va=/[\#\?@]/g,ua=/#/g;function pa(a){this.b=a||null}pa.prototype.a=null;pa.prototype.c=null;
28
+ pa.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 ma(a){var b=new pa;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 xa(a,b){return a.reduce(function(a,b,e){return b["catch"](a.bind(null,e))}.bind(null,b),Promise.reject())}function x(a,b){return a.concat(b)}function y(){}function ya(a){return null!=a}function za(a){return function(b){return b!=a}}function Aa(a,b,c){return c.indexOf(a)==b};function z(a,b){if(!b.length)return a;var c=b.map(function(a){return new ia(a)});return a.map(function(a){return new ia(a)}).map(function(a){return c.map(a.resolve.bind(a))}).reduce(x,[]).map(function(a){return a.toString()})}function Ba(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:b||[],keyIds:[]}};function Ca(a,b,c,d,e){var f=e in d,g;for(g in b){var h=e+"."+g,l=f?d[e]:c[g],n=!!{".abr.manager":!0}[h]||!!{serverCertificate:!0}[g];if(f||g in a)void 0===b[g]?void 0===l||f?delete a[g]:a[g]=l:n?a[g]=b[g]:"object"==typeof a[g]&&"object"==typeof b[g]?Ca(a[g],b[g],l,d,h):typeof b[g]==typeof l&&(a[g]=b[g])}}function Da(a){return JSON.parse(JSON.stringify(a))};function A(){var a,b,c=new Promise(function(c,e){a=c;b=e});c.resolve=a;c.reject=b;return c};function B(a){this.f=!1;this.a=[];this.b=[];this.c=[];this.h=a||null}m("shaka.net.NetworkingEngine",B);B.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3};var Ea={};B.registerScheme=function(a,b){Ea[a]=b};B.unregisterScheme=function(a){delete Ea[a]};B.prototype.Jd=function(a){this.b.push(a)};B.prototype.registerRequestFilter=B.prototype.Jd;B.prototype.me=function(a){var b=this.b;a=b.indexOf(a);0<=a&&b.splice(a,1)};B.prototype.unregisterRequestFilter=B.prototype.me;
29
+ B.prototype.Gc=function(){this.b=[]};B.prototype.clearAllRequestFilters=B.prototype.Gc;B.prototype.Kd=function(a){this.c.push(a)};B.prototype.registerResponseFilter=B.prototype.Kd;B.prototype.ne=function(a){var b=this.c;a=b.indexOf(a);0<=a&&b.splice(a,1)};B.prototype.unregisterResponseFilter=B.prototype.ne;B.prototype.Hc=function(){this.c=[]};B.prototype.clearAllResponseFilters=B.prototype.Hc;function Fa(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}}
30
+ function C(a,b){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b}}B.prototype.m=function(){this.f=!0;this.b=[];this.c=[];for(var a=[],b=0;b<this.a.length;++b)a.push(this.a[b]["catch"](y));return Promise.all(a)};B.prototype.destroy=B.prototype.m;
31
+ B.prototype.request=function(a,b){if(this.f)return Promise.reject();b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Da(b.retryParameters):Fa();b.uris=Da(b.uris);var c=Date.now(),d=Promise.resolve();this.b.forEach(function(c){d=d.then(c.bind(null,a,b))});d=d["catch"](function(a){throw new t(2,1,1006,a);});d=d.then(function(){for(var d=Date.now()-c,f=b.retryParameters||{},g=f.maxAttempts||1,h=f.backoffFactor||2,f=null==f.baseDelay?1E3:f.baseDelay,l=this.g(a,b,0,
32
+ d),n=1;n<g;n++)l=l["catch"](function(c,e,f){if(f&&1==f.severity){f=new A;var g=b.retryParameters||{};window.setTimeout(f.resolve,c*(1+(2*Math.random()-1)*(null==g.fuzzFactor?.5:g.fuzzFactor)));return f.then(this.g.bind(this,a,b,e,d))}throw f;}.bind(this,f,n%b.uris.length)),f*=h;return l}.bind(this));this.a.push(d);return d.then(function(b){0<=this.a.indexOf(d)&&this.a.splice(this.a.indexOf(d),1);this.h&&!b.fromCache&&1==a&&this.h(b.timeMs,b.data.byteLength);return b}.bind(this))["catch"](function(a){a&&
33
+ (a.severity=2);0<=this.a.indexOf(d)&&this.a.splice(this.a.indexOf(d),1);return Promise.reject(a)}.bind(this))};B.prototype.request=B.prototype.request;
34
+ B.prototype.g=function(a,b,c,d){if(this.f)return Promise.reject();var e=new ia(b.uris[c]),f=e.aa;f||(f=location.protocol,f=f.slice(0,-1),ja(e,f),b.uris[c]=e.toString());f=Ea[f];if(!f)return Promise.reject(new t(2,1,1E3,e));var g=Date.now();return f(b.uris[c],b,a).then(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-g);var c=Date.now(),e=Promise.resolve();this.c.forEach(function(c){e=e.then(function(){return Promise.resolve(c(a,b))}.bind(this))});e=e["catch"](function(a){var b=2;a instanceof t&&
35
+ (b=a.severity);throw new t(b,1,1007,a);});return e.then(function(){b.timeMs+=Date.now()-c;b.timeMs+=d;return b})}.bind(this))};function Ga(a,b,c){for(var d=0;d<a.length;++d)if(c(a[d],b))return d;return-1};function Ha(){this.a={}}Ha.prototype.push=function(a,b){this.a.hasOwnProperty(a)?this.a[a].push(b):this.a[a]=[b]};Ha.prototype.get=function(a){return(a=this.a[a])?a.slice():null};Ha.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 D(){this.a=new Ha}D.prototype.m=function(){Ia(this);this.a=null;return Promise.resolve()};function E(a,b,c,d){a.a&&(b=new Ja(b,c,d),a.a.push(c,b))}function Ka(a,b,c,d){E(a,b,c,function(a){this.ha(b,c);d(a)}.bind(a))}D.prototype.ha=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.ha(),this.a.remove(b,e))}};function Ia(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].ha();a.a.a={}}}
36
+ function Ja(a,b,c){this.target=a;this.type=b;this.a=c;this.target.addEventListener(b,c,!1)}Ja.prototype.ha=function(){this.target.removeEventListener(this.type,this.a,!1);this.a=this.target=null};function La(a){return!a||!Object.keys(a).length}function Ma(a){return Object.keys(a).map(function(b){return a[b]})}function Na(a,b){return Object.keys(a).reduce(function(c,d){c[d]=b(a[d],d);return c},{})}function Oa(a,b){return Object.keys(a).every(function(c){return b(c,a[c])})};function F(a){if(!a)return"";a=new Uint8Array(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=escape(Pa(a));try{return decodeURIComponent(a)}catch(b){throw new t(2,2,2004);}}m("shaka.util.StringUtils.fromUTF8",F);
37
+ function Qa(a,b){if(!a)return"";if(a.byteLength%2)throw new t(2,2,2004);if(a instanceof ArrayBuffer)var c=a;else{var d=new Uint8Array(a.byteLength);d.set(new Uint8Array(a));c=d.buffer}var d=a.byteLength/2,e=new Uint16Array(d);c=new DataView(c);for(var f=0;f<d;f++)e[f]=c.getUint16(2*f,b);return Pa(e)}m("shaka.util.StringUtils.fromUTF16",Qa);
38
+ function Ra(a){var b=new Uint8Array(a);if(239==b[0]&&187==b[1]&&191==b[2])return F(b);if(254==b[0]&&255==b[1])return Qa(b.subarray(2),!1);if(255==b[0]&&254==b[1])return Qa(b.subarray(2),!0);var c=function(a,b){return a.byteLength<=b||32<=a[b]&&126>=a[b]}.bind(null,b);if(b[0]||b[2]){if(!b[1]&&!b[3])return Qa(a,!0);if(c(0)&&c(1)&&c(2)&&c(3))return F(a)}else return Qa(a,!1);throw new t(2,2,2003);}m("shaka.util.StringUtils.fromBytesAutoDetect",Ra);
39
+ function Sa(a){a=unescape(encodeURIComponent(a));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b.buffer}m("shaka.util.StringUtils.toUTF8",Sa);function Pa(a){for(var b="",c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};function Ta(a){this.a=null;this.b=function(){this.a=null;a()}.bind(this)}Ta.prototype.cancel=function(){null!=this.a&&(clearTimeout(this.a),this.a=null)};function Ua(a){a.cancel();a.a=setTimeout(a.b,500)};function Va(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(/=*$/,"")}m("shaka.util.Uint8ArrayUtils.toBase64",Va);function Wa(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}m("shaka.util.Uint8ArrayUtils.fromBase64",Wa);
40
+ function Xa(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}m("shaka.util.Uint8ArrayUtils.fromHex",Xa);function Ya(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}m("shaka.util.Uint8ArrayUtils.toHex",Ya);function Za(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}m("shaka.util.Uint8ArrayUtils.equal",Za);
41
+ m("shaka.util.Uint8ArrayUtils.concat",function(a){for(var b=0,c=0;c<arguments.length;++c)b+=arguments[c].length;for(var b=new Uint8Array(b),d=0,c=0;c<arguments.length;++c)b.set(arguments[c],d),d+=arguments[c].length;return b});function $a(a,b,c,d){this.j=this.i=this.v=null;this.J=!1;this.b=null;this.f=new D;this.a=[];this.o=[];this.l=new A;this.ka=a;this.h=null;this.g=function(a){this.l.reject(a);b(a)}.bind(this);this.A={};this.Ba=c;this.la=d;this.B=new Ta(this.Id.bind(this));this.ja=this.c=!1;this.G=[];this.ia=!1;this.P=setInterval(this.Hd.bind(this),1E3);this.l["catch"](function(){})}k=$a.prototype;
42
+ k.m=function(){this.c=!0;var a=this.a.map(function(a){return(a.ba.close()||Promise.resolve())["catch"](y)});this.l.reject();this.f&&a.push(this.f.m());this.j&&a.push(this.j.setMediaKeys(null)["catch"](y));this.P&&(clearInterval(this.P),this.P=null);this.B&&this.B.cancel();this.f=this.j=this.i=this.v=this.b=this.B=null;this.a=[];this.o=[];this.la=this.g=this.h=this.ka=null;return Promise.all(a)};k.configure=function(a){this.h=a};
43
+ k.init=function(a,b){var c={},d=[];this.ja=b;this.o=a.offlineSessionIds;ab(this,a,b||0<a.offlineSessionIds.length,c,d);return d.length?bb(this,c,d):(this.J=!0,Promise.resolve())};
44
+ function cb(a,b){if(!a.i)return Ka(a.f,b,"encrypted",function(){this.g(new t(2,6,6010))}.bind(a)),Promise.resolve();a.j=b;Ka(a.f,a.j,"play",a.od.bind(a));var c=a.j.setMediaKeys(a.i),c=c["catch"](function(a){return Promise.reject(new t(2,6,6003,a.message))}),d=null;a.b.serverCertificate&&(d=a.i.setServerCertificate(a.b.serverCertificate).then(function(){})["catch"](function(a){return Promise.reject(new t(2,6,6004,a.message))}));return Promise.all([c,d]).then(function(){if(this.c)return Promise.reject();
45
+ db(this);this.b.initData.length||this.o.length||E(this.f,this.j,"encrypted",this.dd.bind(this))}.bind(a))["catch"](function(a){return this.c?Promise.resolve():Promise.reject(a)}.bind(a))}function eb(a,b){return Promise.all(b.map(function(a){return fb(this,a).then(function(a){if(a){for(var b=new A,c=0;c<this.a.length;c++)if(this.a[c].ba==a){this.a[c].ib=b;break}return Promise.all([a.remove(),b])}}.bind(this))}.bind(a)))}
46
+ function db(a){var b=a.b?a.b.initData:[];b.forEach(function(a){gb(this,a.initDataType,a.initData)}.bind(a));a.o.forEach(function(a){fb(this,a)}.bind(a));b.length||a.o.length||a.l.resolve();return a.l}k.keySystem=function(){return this.b?this.b.keySystem:""};function hb(a){return a.a.map(function(a){return a.ba.sessionId})}k.ab=function(){var a=this.a.map(function(a){a=a.ba.expiration;return isNaN(a)?Infinity:a});return Math.min.apply(Math,a)};
47
+ function ab(a,b,c,d,e){var f=ib(a);b.periods.forEach(function(a){a.variants.forEach(function(a){f&&(a.drmInfos=[f]);a.drmInfos.forEach(function(b){jb(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,drmInfos:[]},
48
+ 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){var c="video"==a.type?f.videoCapabilities:f.audioCapabilities,d=("video"==a.type?b.videoRobustness:b.audioRobustness)||"",e=a.mimeType;a.codecs&&(e+='; codecs="'+a.codecs+'"');c.push({robustness:d,contentType:e})}.bind(this))}.bind(this))}.bind(this))}.bind(a))}
49
+ function bb(a,b,c){if(1==c.length&&""==c[0])return Promise.reject(new t(2,6,6E3));var d=new A,e=d;[!0,!1].forEach(function(a){c.forEach(function(c){var d=b[c];d.drmInfos.some(function(a){return!!a.licenseServerUri})==a&&(d.audioCapabilities.length||delete d.audioCapabilities,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 t(2,
50
+ 6,6001))});e=e.then(function(a){if(this.c)return Promise.reject();var c=0<=navigator.userAgent.indexOf("Edge/"),d=a.getConfiguration();this.v=(d.audioCapabilities||[]).concat(d.videoCapabilities||[]).map(function(a){return a.contentType});c&&(this.v=null);c=b[a.keySystem];kb(this,a.keySystem,c,c.drmInfos);return this.b.licenseServerUri?a.createMediaKeys():Promise.reject(new t(2,6,6012))}.bind(a)).then(function(a){if(this.c)return Promise.reject();this.i=a;this.J=!0}.bind(a))["catch"](function(a){if(this.c)return Promise.resolve();
51
+ this.v=this.b=null;return a instanceof t?Promise.reject(a):Promise.reject(new t(2,6,6002,a.message))}.bind(a));d.reject();return e}
52
+ function jb(a,b){var c=b.keySystem;if(c){if(!b.licenseServerUri){var d=a.h.servers[c];d&&(b.licenseServerUri=d)}b.keyIds||(b.keyIds=[]);if(c=a.h.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)}}
53
+ function ib(a){if(La(a.h.clearKeys))return null;var b=[],c=[],d;for(d in a.h.clearKeys){var e=a.h.clearKeys[d],f=Xa(d),e=Xa(e),f={kty:"oct",kid:Va(f,!1),k:Va(e,!1)};b.push(f);c.push(f.kid)}a=JSON.stringify({keys:b});c=JSON.stringify({kids:c});c=[{initData:new Uint8Array(Sa(c)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
54
+ initData:c,keyIds:[]}}function kb(a,b,c,d){var e=[],f=[],g=[],h=[];lb(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}}
55
+ function lb(a,b,c,d,e){function f(a,b){return a.keyId&&a.keyId==b.keyId?!0:a.initDataType==b.initDataType&&Za(a.initData,b.initData)}a.forEach(function(a){-1==b.indexOf(a.licenseServerUri)&&b.push(a.licenseServerUri);a.serverCertificate&&-1==Ga(c,a.serverCertificate,Za)&&c.push(a.serverCertificate);a.initData&&a.initData.forEach(function(a){-1==Ga(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])})}
56
+ k.dd=function(a){for(var b=new Uint8Array(a.initData),c=0;c<this.a.length;++c)if(Za(b,this.a[c].initData))return;gb(this,a.initDataType,b)};
57
+ function fb(a,b){try{var c=a.i.createSession("persistent-license")}catch(f){var d=new t(2,6,6005,f.message);a.g(d);return Promise.reject(d)}E(a.f,c,"message",a.ic.bind(a));E(a.f,c,"keystatuseschange",a.cc.bind(a));var e={initData:null,ba:c,loaded:!1,xb:Infinity,ib: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.l.resolve(),c;this.a.splice(this.a.indexOf(e),1);this.g(new t(2,6,6013))}}.bind(a),function(a){this.c||
58
+ (this.a.splice(this.a.indexOf(e),1),this.g(new t(2,6,6005,a.message)))}.bind(a))}
59
+ function gb(a,b,c){try{var d=a.ja?a.i.createSession("persistent-license"):a.i.createSession()}catch(e){a.g(new t(2,6,6005,e.message));return}E(a.f,d,"message",a.ic.bind(a));E(a.f,d,"keystatuseschange",a.cc.bind(a));a.a.push({initData:c,ba:d,loaded:!1,xb:Infinity,ib: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].ba==d){this.a.splice(b,1);break}this.g(new t(2,6,6006,a.message))}}.bind(a))}
60
+ k.ic=function(a){this.h.delayLicenseRequestUntilPlayed&&this.j.paused&&!this.ia?this.G.push(a):mb(this,a)};
61
+ function mb(a,b){for(var c=b.target,d,e=0;e<a.a.length;e++)if(a.a[e].ba==c){d=a.a[e].ib;break}e=C([a.b.licenseServerUri],a.h.retryParameters);e.body=b.message;e.method="POST";"com.microsoft.playready"==a.b.keySystem&&nb(e);a.ka.request(2,e).then(function(a){return this.c?Promise.reject():c.update(a.data).then(function(){d&&d.resolve()})}.bind(a),function(a){if(this.c)return Promise.resolve();a=new t(2,6,6007,a);this.g(a);d&&d.reject(a)}.bind(a))["catch"](function(a){if(this.c)return Promise.resolve();
62
+ a=new t(2,6,6008,a.message);this.g(a);d&&d.reject(a)}.bind(a))}
63
+ function nb(a){var b=String.fromCharCode.apply(null,new Uint8Array(a.body));if(b.indexOf("<PlayReadyKeyMessage"))a.headers["Content-Type"]="text/xml; charset=utf-8";else{for(var b=Qa(a.body,!0),b=(new DOMParser).parseFromString(b,"application/xml"),c=b.getElementsByTagName("HttpHeader"),d=0;d<c.length;++d)a.headers[c[d].querySelector("name").textContent]=c[d].querySelector("value").textContent;a.body=Wa(b.querySelector("Challenge").textContent).buffer}}
64
+ k.cc=function(a){a=a.target;var b;for(b=0;b<this.a.length&&this.a[b].ba!=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){var e=new DataView(d),f=e.getUint32(0,!0),l=e.getUint16(4,!0),n=e.getUint16(6,!0);e.setUint32(0,f,!1);e.setUint16(4,l,!1);e.setUint16(6,n,!1)}"com.microsoft.playready"==this.b.keySystem&&"status-pending"==a&&(a="usable");"status-pending"!=a&&(this.a[b].loaded=
65
+ !0,this.a.every(function(a){return a.loaded})&&this.l.resolve());"expired"==a&&(c=!0);e=Ya(new Uint8Array(d));this.A[e]=a}.bind(this));var d=a.expiration-Date.now();(0>d||c&&1E3>d)&&!this.a[b].ib&&(this.a.splice(b,1),a.close());Ua(this.B)}};k.Id=function(){function a(a,c){return"expired"==c}!La(this.A)&&Oa(this.A,a)&&this.g(new t(2,6,6014));this.Ba(this.A)};
66
+ function ob(){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;d[b]=
67
+ {persistentState:c?0<=c.indexOf("persistent-license"):!1};return a.createMediaKeys()})["catch"](function(){d[b]=null});a.push(e)});return Promise.all(a).then(function(){return d})}k.od=function(){for(var a=0;a<this.G.length;a++)mb(this,this.G[a]);this.ia=!0;this.G=[]};function pb(a,b){var c=a.keySystem();return!b.drmInfos.length||b.drmInfos.some(function(a){return a.keySystem==c})}
68
+ function qb(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],g=[],g=g.concat(f.initData||[]),g=g.concat(e.initData||[]),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||
69
+ e.persistentStateRequired,videoRobustness:f.videoRobustness||e.videoRobustness,audioRobustness:f.audioRobustness||e.audioRobustness,serverCertificate:f.serverCertificate||e.serverCertificate,initData:g,keyIds:h});break}return c}k.Hd=function(){this.a.forEach(function(a){var b=a.xb,c=a.ba.expiration;isNaN(c)&&(c=Infinity);c!=b&&(this.la(a.ba.sessionId,c),a.xb=c)}.bind(this))};function rb(a){this.f=null;this.c=a;this.h=0;this.g=Infinity;this.a=this.b=null}var sb={};function tb(a,b){sb[a]=b.length?ub.bind(null,b):b}m("shaka.media.TextEngine.registerParser",tb);m("shaka.media.TextEngine.unregisterParser",function(a){delete sb[a]});function vb(a,b,c){return a>=b?null:new VTTCue(a,b,c)}m("shaka.media.TextEngine.makeCue",vb);rb.prototype.m=function(){this.c&&wb(this,function(){return!0});this.c=this.f=null;return Promise.resolve()};
70
+ function xb(a,b,c,d){return Promise.resolve().then(function(){if(this.c)if(null==c||null==d)this.f.parseInit(b);else{for(var a=this.f.parseMedia(b,{periodStart:this.h,segmentStart:c,segmentEnd:d}),f=0;f<a.length&&!(a[f].startTime>=this.g);++f)this.c.addCue(a[f]);null==this.b&&(this.b=c);this.a=Math.min(d,this.g)}}.bind(a))}
71
+ rb.prototype.remove=function(a,b){return Promise.resolve().then(function(){this.c&&(wb(this,function(c){return c.startTime>=b||c.endTime<=a?!1:!0}),null==this.b||b<=this.b||a>=this.a||(a<=this.b&&b>=this.a?this.b=this.a=null:a<=this.b&&b<this.a?this.b=b:a>this.b&&b>=this.a&&(this.a=a)))}.bind(this))};function wb(a,b){for(var c=a.c.cues,d=[],e=0;e<c.length;++e)b(c[e])&&d.push(c[e]);for(e=0;e<d.length;++e)a.c.removeCue(d[e])}function ub(a){this.Na=a}
72
+ ub.prototype.parseInit=function(a){this.Na(a,0,null,null)};ub.prototype.parseMedia=function(a,b){return this.Na(a,b.periodStart,b.segmentStart,b.segmentEnd)};function yb(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function zb(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 Ab(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 Bb(a,b,c){this.f=a;this.N=b;this.i=c;this.c={};this.a=null;this.b={};this.g=new D;this.h=!1}
73
+ function Cb(){var a={};'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hvc1.1.6.L93.90",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",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",video/mp2t; codecs="mp4a.40.2",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").forEach(function(b){a[b]=!!sb[b]||
74
+ MediaSource.isTypeSupported(b);var c=b.split(";")[0];a[c]=a[c]||a[b]});return a}k=Bb.prototype;k.m=function(){this.h=!0;var a=[],b;for(b in this.b){var c=this.b[b],d=c[0];this.b[b]=c.slice(0,1);d&&a.push(d.p["catch"](y));for(d=1;d<c.length;++d)c[d].p["catch"](y),c[d].p.reject()}this.a&&a.push(this.a.m());return Promise.all(a).then(function(){this.g.m();this.a=this.i=this.N=this.f=this.g=null;this.c={};this.b={}}.bind(this))};
75
+ k.init=function(a){for(var b in a){var c=a[b];"text"==b?Db(this,c):(c=this.N.addSourceBuffer(c),E(this.g,c,"error",this.he.bind(this,b)),E(this.g,c,"updateend",this.Ha.bind(this,b)),this.c[b]=c,this.b[b]=[])}};function Db(a,b){a.a||(a.a=new rb(a.i));a.a.f=new sb[b]}function Eb(a,b){if("text"==b)var c=a.a.b;else c=Fb(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}function Fb(a,b){try{return a.c[b].buffered}catch(c){return null}}
76
+ function Gb(a,b,c,d,e){return"text"==b?xb(a.a,c,d,e):Ib(a,b,a.ge.bind(a,b,c))}k.remove=function(a,b,c){return"text"==a?this.a.remove(b,c):Ib(this,a,this.oc.bind(this,a,b,c))};function Jb(a,b){return"text"==b?a.a.remove(0,Infinity):Ib(a,b,a.oc.bind(a,b,0,a.N.duration))}function Kb(a,b,c,d){if("text"==b)return a.a.h=c,null!=d&&(a.a.g=d),Promise.resolve();null==d&&(d=Infinity);return Promise.all([Ib(a,b,a.Cc.bind(a,b)),Ib(a,b,a.Xd.bind(a,b,c)),Ib(a,b,a.Vd.bind(a,b,d))])}
77
+ k.endOfStream=function(a){return Lb(this,function(){a?this.N.endOfStream(a):this.N.endOfStream()}.bind(this))};k.pa=function(a){return Lb(this,function(){this.N.duration=a}.bind(this))};k.Y=function(){return this.N.duration};k.ge=function(a,b){this.c[a].appendBuffer(b)};k.oc=function(a,b,c){c<=b?this.Ha(a):this.c[a].remove(b,c)};k.Cc=function(a){var b=this.c[a].appendWindowEnd;this.c[a].abort();this.c[a].appendWindowEnd=b;this.Ha(a)};k.Mc=function(a){this.f.currentTime-=.001;this.Ha(a)};
78
+ k.Xd=function(a,b){this.c[a].timestampOffset=b;this.Ha(a)};k.Vd=function(a,b){this.c[a].appendWindowEnd=b+.04;this.Ha(a)};k.he=function(a){this.b[a][0].p.reject(new t(2,3,3014,this.f.error?this.f.error.code:0))};k.Ha=function(a){var b=this.b[a][0];b&&(b.p.resolve(),Mb(this,a))};
79
+ function Ib(a,b,c){if(a.h)return Promise.reject();c={start:c,p:new A};a.b[b].push(c);if(1==a.b[b].length)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new t(2,3,3017,b)):c.p.reject(new t(2,3,3015,d)),Mb(a,b)}return c.p}
80
+ function Lb(a,b){if(a.h)return Promise.reject();var c=[],d;for(d in a.c){var e=new A,f={start:function(a){a.resolve()}.bind(null,e),p:e};a.b[d].push(f);c.push(e);1==a.b[d].length&&f.start()}return Promise.all(c).then(function(){var a;try{b()}catch(l){var c=Promise.reject(new t(2,3,3015,l))}for(a in this.c)Mb(this,a);return c}.bind(a),function(){return Promise.reject()}.bind(a))}function Mb(a,b){a.b[b].shift();var c=a.b[b][0];if(c)try{c.start()}catch(d){c.p.reject(new t(2,3,3015,d)),Mb(a,b)}};function Nb(a,b,c){return c==b||a>=Ob&&c==b.split("-")[0]||a>=Pb&&c.split("-")[0]==b.split("-")[0]?!0:!1}var Ob=1,Pb=2;function Qb(a){a=a.toLowerCase().split("-");var b=Rb[a[0]];b&&(a[0]=b);return a.join("-")}
81
+ var Rb={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",
82
+ 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",
83
+ 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",
84
+ 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 Sb(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 Tb(a,b,c){var d=!1;a.variants.forEach(function(a){var e=a.allowedByApplication;a.allowedByApplication=Sb(a,b,c);e!=a.allowedByApplication&&(d=!0)});return d}
85
+ function Ub(a,b,c){var d=b.video,e=b.audio;for(b=0;b<c.variants.length;++b){var f=c.variants[b],g=a,h=e,l=d;(g&&g.J&&!pb(g,f)?0:Vb(f.audio,g,h)&&Vb(f.video,g,l))||(c.variants.splice(b,1),--b)}for(b=0;b<c.textStreams.length;++b)a=c.textStreams[b],sb[Wb(a.mimeType,a.codecs)]||(c.textStreams.splice(b,1),--b)}
86
+ function Vb(a,b,c){if(!a)return!0;var d=null;b&&b.J&&(d=b.v);b=Wb(a.mimeType,a.codecs);return!sb[b]&&!MediaSource.isTypeSupported(b)||d&&a.encrypted&&0>d.indexOf(b)||c&&(a.mimeType!=c.mimeType||a.codecs.split(".")[0]!=c.codecs.split(".")[0])?!1:!0}
87
+ function Xb(a,b,c){return Yb(a.variants).map(function(a){var d;a.video&&a.audio?d=c==a.video.id&&b==a.audio.id:d=a.video&&c==a.video.id||a.audio&&b==a.audio.id;var f="";a.video&&(f+=a.video.codecs);a.audio&&(""!=f&&(f+=", "),f+=a.audio.codecs);var g=a.audio?a.audio.codecs:null,h=a.video?a.video.codecs:null,l=null;a.video?l=a.video.mimeType:a.audio&&(l=a.audio.mimeType);var n=null;a.audio?n=a.audio.kind:a.video&&(n=a.video.kind);return{id:a.id,active:d,type:"variant",bandwidth:a.bandwidth,language:a.language,
88
+ kind:n||null,width:a.video?a.video.width:null,height:a.video?a.video.height:null,frameRate:a.video?a.video.frameRate:void 0,mimeType:l,codecs:f,audioCodec:g,videoCodec:h,primary:a.primary}})}function Zb(a,b){return a.textStreams.map(function(a){return{id:a.id,active:b==a.id,type:"text",language:a.language,kind:a.kind,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary}})}
89
+ function $b(a,b){for(var c=0;c<a.variants.length;c++)if(a.variants[c].id==b.id)return a.variants[c];return null}function ac(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 Yb(a){return a.filter(function(a){return a.allowedByApplication&&a.allowedByKeySystem})}
90
+ function bc(a,b,c){var d=Yb(a.variants),e=d.filter(function(a){return a.language==d[0].language});a=d.filter(function(a){return a.primary});a.length&&(e=a);if(b){var f=Qb(b);[Pb,Ob,0].forEach(function(a){var b=!1;d.forEach(function(d){f=Qb(f);var g=Qb(d.language);Nb(a,f,g)&&(b?e.push(d):(e=[d],b=!0),c&&(c.audio=!0))})})}return e}
91
+ function cc(a,b,c){var d=a.textStreams,e=d;a=d.filter(function(a){return a.primary});a.length&&(e=a);if(b){var f=Qb(b);[Pb,Ob,0].forEach(function(a){var b=!1;d.forEach(function(d){var g=Qb(d.language);Nb(a,f,g)&&(b?e.push(d):(e=[d],b=!0),c&&(c.text=!0))})})}return e}function dc(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}
92
+ function ec(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}function Wb(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function fc(a,b){for(var c=a.periods.length-1;0<c;--c)if(b>=a.periods[c].startTime)return c;return 0}
93
+ function gc(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 G(){this.f=null;this.b=!1;this.a=new fa;this.h=[];this.g=[];this.j=!1;this.c=null;this.i={minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}}m("shaka.abr.SimpleAbrManager",G);G.prototype.stop=function(){this.f=null;this.b=!1;this.h=[];this.g=[];this.c=null};G.prototype.stop=G.prototype.stop;G.prototype.init=function(a){this.f=a};G.prototype.init=G.prototype.init;
94
+ G.prototype.chooseStreams=function(a){var b={};if(-1<a.indexOf("audio")||-1<a.indexOf("video")){var c=this.h;var d=hc(this.i,c);var e=this.a.getBandwidthEstimate();if(c.length&&!d.length)throw new t(2,4,4012);for(var c=d[0],f=0;f<d.length;++f){var g=d[f],h=(d[f+1]||{bandwidth:Infinity}).bandwidth/.85;e>=g.bandwidth/.95&&e<=h&&(c=g)}(d=c)&&d.video&&(b.video=d.video);d&&d.audio&&(b.audio=d.audio)}-1<a.indexOf("text")&&(b.text=this.g[0]);this.c=Date.now();return b};G.prototype.chooseStreams=G.prototype.chooseStreams;
95
+ G.prototype.enable=function(){this.b=!0};G.prototype.enable=G.prototype.enable;G.prototype.disable=function(){this.b=!1};G.prototype.disable=G.prototype.disable;G.prototype.segmentDownloaded=function(a,b){var c=this.a;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.a+=b;da(c.c,e,d);da(c.f,e,d)}if(null!=this.c&&this.b)a:{if(!this.j){if(!(128E3<=this.a.a))break a;this.j=!0}else if(8E3>Date.now()-this.c)break a;c=this.chooseStreams(["audio","video"]);this.a.getBandwidthEstimate();this.f(c)}};
96
+ G.prototype.segmentDownloaded=G.prototype.segmentDownloaded;G.prototype.getBandwidthEstimate=function(){return this.a.getBandwidthEstimate()};G.prototype.getBandwidthEstimate=G.prototype.getBandwidthEstimate;G.prototype.setDefaultEstimate=function(a){this.a.setDefaultEstimate(a)};G.prototype.setDefaultEstimate=G.prototype.setDefaultEstimate;G.prototype.setRestrictions=function(a){this.i=a};G.prototype.setRestrictions=G.prototype.setRestrictions;G.prototype.setVariants=function(a){this.h=a};
97
+ G.prototype.setVariants=G.prototype.setVariants;G.prototype.setTextStreams=function(a){this.g=a};G.prototype.setTextStreams=G.prototype.setTextStreams;function hc(a,b){return b.filter(function(b){return Sb(b,a,{width:Infinity,height:Infinity})}).sort(function(a,b){return a.bandwidth-b.bandwidth})};function H(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}H.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};H.prototype.stopImmediatePropagation=function(){this.a=!0};H.prototype.stopPropagation=function(){};var ic="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),jc="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),kc=["loop","playbackRate"],lc=["pause","play"],mc="adaptation buffering emsg error loading unloading texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged".split(" "),nc="drmInfo getAudioLanguages getConfiguration getExpiration getManifestUri getPlaybackRate getPlayheadTimeAsDate getTextLanguages getTextTracks getTracks getStats getVariantTracks isBuffering isInProgress isLive isTextTrackVisible keySystem seekRange".split(" "),
98
+ oc=[["getConfiguration","configure"]],pc=[["isTextTrackVisible","setTextTrackVisibility"]],qc="addTextTrack cancelTrickPlay configure resetConfiguration selectAudioLanguage selectTextLanguage selectTextTrack selectTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),rc=["load","unload"];
99
+ function sc(a){return JSON.stringify(a,function(a,c){if("manager"!=a&&"function"!=typeof c){if(c instanceof Event||c instanceof H){var b={},e;for(e in c){var f=c[e];f&&"object"==typeof 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}})}
100
+ function tc(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__?uc(c):c})}function uc(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}};function vc(a,b,c,d,e){this.J=a;this.l=b;this.B=c;this.G=d;this.v=e;this.c=this.j=this.h=!1;this.A="";this.a=this.i=null;this.b={video:{},player:{}};this.o=0;this.f={};this.g=null}k=vc.prototype;k.m=function(){wc(this);this.a&&(this.a.leave(function(){},function(){}),this.a=null);this.G=this.B=this.l=null;this.c=this.j=this.h=!1;this.g=this.f=this.b=this.i=null;return Promise.resolve()};k.V=function(){return this.c};k.Db=function(){return this.A};
101
+ k.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.l();var a=new chrome.cast.SessionRequest(this.J),a=new chrome.cast.ApiConfig(a,this.ed.bind(this),this.qd.bind(this),"origin_scoped");chrome.cast.initialize(a,function(){},function(){})}else window.__onGCastApiAvailable=function(a){a&&this.init()}.bind(this)};k.Gb=function(a){this.i=a;this.c&&xc(this,{type:"appData",appData:this.i})};
102
+ k.cast=function(a){if(!this.h)return Promise.reject(new t(1,8,8E3));if(!this.j)return Promise.reject(new t(1,8,8001));if(this.c)return Promise.reject(new t(1,8,8002));this.g=new A;chrome.cast.requestSession(this.zb.bind(this,a),this.ac.bind(this));return this.g};k.$a=function(){this.c&&(wc(this),this.a&&(this.a.stop(function(){},function(){}),this.a=null))};
103
+ k.get=function(a,b){if("video"==a){if(0<=lc.indexOf(b))return this.nc.bind(this,a,b)}else if("player"==a){if(0<=qc.indexOf(b))return this.nc.bind(this,a,b);if(0<=rc.indexOf(b))return this.Md.bind(this,a,b);if(0<=nc.indexOf(b))return this.jc.bind(this,a,b)}return this.jc(a,b)};k.set=function(a,b,c){this.b[a][b]=c;xc(this,{type:"set",targetName:a,property:b,value:c})};
104
+ k.zb=function(a,b){this.a=b;this.a.addUpdateListener(this.bc.bind(this));this.a.addMessageListener("urn:x-cast:com.google.shaka.v2",this.kd.bind(this));this.bc();xc(this,{type:"init",initState:a,appData:this.i});this.g.resolve()};k.ac=function(a){var b=8003;switch(a.code){case "cancel":b=8004;break;case "timeout":b=8005;break;case "receiver_unavailable":b=8006}this.g.reject(new t(2,8,b,a))};k.jc=function(a,b){return this.b[a][b]};
105
+ k.nc=function(a,b){xc(this,{type:"call",targetName:a,methodName:b,args:Array.prototype.slice.call(arguments,2)})};k.Md=function(a,b){var c=Array.prototype.slice.call(arguments,2),d=new A,e=this.o.toString();this.o++;this.f[e]=d;xc(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e});return d};k.ed=function(a){var b=this.v();this.g=new A;this.zb(b,a)};k.qd=function(a){this.j="available"==a;this.l()};
106
+ k.bc=function(){var a=this.a?"connected"==this.a.status:!1;if(this.c&&!a){this.G();for(var b in this.b)this.b[b]={};wc(this)}this.A=(this.c=a)?this.a.receiver.friendlyName:"";this.l()};function wc(a){for(var b in a.f){var c=a.f[b];delete a.f[b];c.reject(new t(1,7,7E3))}}
107
+ k.kd=function(a,b){var c=tc(b);switch(c.type){case "event":var d=c.targetName,e=c.event;this.B(d,new H(e.type,e));break;case "update":e=c.update;for(d in e){var c=this.b[d]||{};for(f in e[d])c[f]=e[d][f]}break;case "asyncComplete":d=c.id;var f=c.error;c=this.f[d];delete this.f[d];if(c)if(f){d=new t(f.severity,f.category,f.code);for(e in f)d[e]=f[e];c.reject(d)}else c.resolve()}};function xc(a,b){var c=sc(b);a.a.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},ga)};function p(){this.lb=new Ha;this.Ta=this}p.prototype.addEventListener=function(a,b){this.lb.push(a,b)};p.prototype.removeEventListener=function(a,b){this.lb.remove(a,b)};p.prototype.dispatchEvent=function(a){for(var b=this.lb.get(a.type)||[],c=0;c<b.length;++c){a.target=this.Ta;a.currentTarget=this.Ta;var d=b[c];try{d.handleEvent?d.handleEvent(a):d.call(this,a)}catch(e){}if(a.a)break}return a.defaultPrevented};function I(a,b,c){p.call(this);this.c=a;this.b=b;this.h=this.f=this.g=this.i=this.j=null;this.a=new vc(c,this.ce.bind(this),this.de.bind(this),this.ee.bind(this),this.Tb.bind(this));yc(this)}ba(I);m("shaka.cast.CastProxy",I);I.prototype.m=function(a){a&&this.a&&this.a.$a();a=[this.h?this.h.m():null,this.b?this.b.m():null,this.a?this.a.m():null];this.a=this.h=this.i=this.j=this.b=this.c=null;return Promise.all(a)};I.prototype.destroy=I.prototype.m;I.prototype.Xc=function(){return this.j};
108
+ I.prototype.getVideo=I.prototype.Xc;I.prototype.Rc=function(){return this.i};I.prototype.getPlayer=I.prototype.Rc;I.prototype.Dc=function(){return this.a?this.a.h&&this.a.j:!1};I.prototype.canCast=I.prototype.Dc;I.prototype.V=function(){return this.a?this.a.V():!1};I.prototype.isCasting=I.prototype.V;I.prototype.Db=function(){return this.a?this.a.Db():""};I.prototype.receiverName=I.prototype.Db;I.prototype.cast=function(){var a=this.Tb();return this.a.cast(a).then(function(){return this.b.hb()}.bind(this))};
109
+ I.prototype.cast=I.prototype.cast;I.prototype.Gb=function(a){this.a.Gb(a)};I.prototype.setAppData=I.prototype.Gb;I.prototype.ke=function(){var a=this.a;if(a.c){var b=a.v();chrome.cast.requestSession(a.zb.bind(a,b),a.ac.bind(a))}};I.prototype.suggestDisconnect=I.prototype.ke;I.prototype.$a=function(){this.a.$a()};I.prototype.forceDisconnect=I.prototype.$a;
110
+ function yc(a){a.a.init();a.h=new D;ic.forEach(function(a){E(this.h,this.c,a,this.re.bind(this))}.bind(a));mc.forEach(function(a){E(this.h,this.b,a,this.Gd.bind(this))}.bind(a));a.j={};for(var b in a.c)Object.defineProperty(a.j,b,{configurable:!1,enumerable:!0,get:a.qe.bind(a,b),set:a.se.bind(a,b)});a.i={};for(b in a.b)Object.defineProperty(a.i,b,{configurable:!1,enumerable:!0,get:a.Fd.bind(a,b)});a.g=new p;a.g.Ta=a.j;a.f=new p;a.f.Ta=a.i}k=I.prototype;
111
+ k.Tb=function(){var a={video:{},player:{},playerAfterLoad:{},manifest:this.b.Ya,startTime:null};this.c.pause();kc.forEach(function(b){a.video[b]=this.c[b]}.bind(this));this.c.ended||(a.startTime=this.c.currentTime);oc.forEach(function(b){var c=b[1];b=this.b[b[0]]();a.player[c]=b}.bind(this));pc.forEach(function(b){var c=b[1];b=this.b[b[0]]();a.playerAfterLoad[c]=b}.bind(this));return a};k.ce=function(){this.dispatchEvent(new H("caststatuschanged"))};
112
+ k.ee=function(){oc.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 H("error",{detail:a}))}.bind(this)));var f={};kc.forEach(function(a){f[a]=this.a.get("video",a)}.bind(this));c.then(function(){kc.forEach(function(a){this.c[a]=
113
+ f[a]}.bind(this));pc.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))};
114
+ k.qe=function(a){if("addEventListener"==a)return this.g.addEventListener.bind(this.g);if("removeEventListener"==a)return this.g.removeEventListener.bind(this.g);if(this.a.V()&&!Object.keys(this.a.b.video).length){var b=this.c[a];if("function"!=typeof b)return b}return this.a.V()?this.a.get("video",a):(b=this.c[a],"function"==typeof b&&(b=b.bind(this.c)),b)};k.se=function(a,b){this.a.V()?this.a.set("video",a,b):this.c[a]=b};k.re=function(a){this.a.V()||this.g.dispatchEvent(new H(a.type,a))};
115
+ k.Fd=function(a){return"addEventListener"==a?this.f.addEventListener.bind(this.f):"removeEventListener"==a?this.f.removeEventListener.bind(this.f):"getNetworkingEngine"==a?this.b.Ub.bind(this.b):this.a.V()&&!Object.keys(this.a.b.video).length&&0<=nc.indexOf(a)||!this.a.V()?(a=this.b[a],a.bind(this.b)):this.a.get("player",a)};k.Gd=function(a){this.a.V()||this.f.dispatchEvent(a)};k.de=function(a,b){this.a.V()&&("video"==a?this.g.dispatchEvent(b):"player"==a&&this.f.dispatchEvent(b))};function J(a,b,c,d){p.call(this);this.a=a;this.b=b;this.j={video:a,player:b};this.l=c||function(){};this.o=d||function(a){return a};this.i=!1;this.f=!0;this.h=this.g=this.c=null;zc(this)}ba(J);m("shaka.cast.CastReceiver",J);J.prototype.isConnected=function(){return this.i};J.prototype.isConnected=J.prototype.isConnected;J.prototype.Zc=function(){return this.f};J.prototype.isIdle=J.prototype.Zc;
116
+ J.prototype.m=function(){var a=this.b?this.b.m():Promise.resolve();null!=this.h&&window.clearTimeout(this.h);this.l=this.j=this.b=this.a=null;this.i=!1;this.f=!0;this.h=this.g=this.c=null;return a.then(function(){cast.receiver.CastReceiverManager.getInstance().stop()})};J.prototype.destroy=J.prototype.m;
117
+ function zc(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=a.hc.bind(a);b.onSenderDisconnected=a.hc.bind(a);b.onSystemVolumeChanged=a.Kc.bind(a);a.g=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.g.onMessage=a.fd.bind(a);a.c=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.c.onMessage=a.td.bind(a);b.start();ic.forEach(function(a){this.a.addEventListener(a,this.kc.bind(this,"video"))}.bind(a));mc.forEach(function(a){this.b.addEventListener(a,this.kc.bind(this,
118
+ "player"))}.bind(a));cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.b.Hb(3840,2160):a.b.Hb(1920,1080);a.b.addEventListener("loading",function(){this.f=!1;Ac(this)}.bind(a));a.a.addEventListener("playing",function(){this.f=!1;Ac(this)}.bind(a));a.a.addEventListener("pause",function(){Ac(this)}.bind(a));a.b.addEventListener("unloading",function(){this.f=!0;Ac(this)}.bind(a));a.a.addEventListener("ended",function(){window.setTimeout(function(){this.a&&
119
+ this.a.ended&&(this.f=!0,Ac(this))}.bind(this),5E3)}.bind(a))}k=J.prototype;k.hc=function(){this.i=!!cast.receiver.CastReceiverManager.getInstance().getSenders().length;Ac(this)};function Ac(a){Promise.resolve().then(function(){this.dispatchEvent(new H("caststatuschanged"));L(this,0)}.bind(a))}
120
+ function Bc(a,b,c){for(var d in b.player)a.b[d](b.player[d]);a.l(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 H("error",{detail:a}))}.bind(a)));c.then(function(){var a;for(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(),L(this,0))}.bind(a))}
121
+ k.kc=function(a,b){this.Ab();Cc(this,{type:"event",targetName:a,event:b},this.c)};k.Ab=function(){null!=this.h&&window.clearTimeout(this.h);this.h=window.setTimeout(this.Ab.bind(this),500);var a={video:{},player:{}};jc.forEach(function(b){a.video[b]=this.a[b]}.bind(this));nc.forEach(function(b){a.player[b]=this.b[b]()}.bind(this));var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&(a.video.volume=b.level,a.video.muted=b.muted);Cc(this,{type:"update",update:a},this.c)};
122
+ k.Kc=function(){var a=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();a&&Cc(this,{type:"update",update:{video:{volume:a.level,muted:a.muted}}},this.c);Cc(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.c)};
123
+ k.td=function(a){var b=tc(a.data);switch(b.type){case "init":Bc(this,b.initState,b.appData);this.Ab();break;case "appData":this.l(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.j[c][d]=e;break;case "call":c=b.targetName;d=b.methodName;e=b.args;c=this.j[c];c[d].apply(c,e);break;case "asyncCall":c=b.targetName,
124
+ d=b.methodName,e=b.args,b=b.id,a=a.senderId,c=this.j[c],c[d].apply(c,e).then(this.tc.bind(this,a,b,null),this.tc.bind(this,a,b))}};
125
+ k.fd=function(a){var b=tc(a.data);switch(b.type){case "PLAY":this.a.play();L(this,0);break;case "PAUSE":this.a.pause();L(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(),L(this,0)):c&&"PLAYBACK_PAUSE"==c&&(this.a.pause(),L(this,0));break;case "STOP":this.b.hb().then(function(){L(this,0)}.bind(this));break;case "GET_STATUS":L(this,Number(b.requestId));break;case "VOLUME":c=b.volume;a=c.level;var c=c.muted,d=
126
+ 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||L(this,0);break;case "LOAD":c=b.media.contentId;a=b.currentTime;var f=this.o(c);this.a.autoplay=!0;this.b.load(f,a).then(function(){L(this,0,{contentId:f,streamType:this.b.$()?"LIVE":"BUFFERED",contentType:""})}.bind(this))["catch"](function(a){var c="LOAD_FAILED";7==a.category&&7E3==a.code&&(c="LOAD_CANCELLED");Cc(this,{requestId:Number(b.requestId),type:c},this.g)}.bind(this));
127
+ break;default:Cc(this,{requestId:Number(b.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.g)}};k.tc=function(a,b,c){Cc(this,{type:"asyncComplete",id:b,error:c},this.c,a)};function Cc(a,b,c,d){a.i&&(a=sc(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}
128
+ function L(a,b,c){var d=Dc,d={mediaSessionId:0,playbackRate:a.a.playbackRate,playerState:a.f?d.IDLE:a.b.ka?d.yc:a.a.paused?d.zc:d.Ac,currentTime:a.a.currentTime,supportedMediaCommands:15,volume:{level:a.a.volume,muted:a.a.muted}};c&&(d.media=c);Cc(a,{requestId:b,type:"MEDIA_STATUS",status:[d]},a.g)}var Dc={IDLE:"IDLE",Ac:"PLAYING",yc:"BUFFERING",zc:"PAUSED"};function Ec(a,b){var c=M(a,b);return 1!=c.length?null:c[0]}function M(a,b){return Array.prototype.filter.call(a.childNodes,function(a){return a.tagName==b})}function Fc(a){var b=a.firstChild;return b&&b.nodeType==Node.TEXT_NODE?a.textContent.trim():null}function N(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 Gc(a){if(!a)return null;a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
129
+ function Hc(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 Ic(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}
130
+ function Jc(a){a=Number(a);return a%1?null:a}function Kc(a){a=Number(a);return!(a%1)&&0<a?a:null}function Lc(a){a=Number(a);return!(a%1)&&0<=a?a:null}function Mc(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1]/b[2]):Number(a);return isNaN(a)?null:a};var Nc={"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"};
131
+ function Oc(a,b,c){a=Pc(a);var d=null,e=null,f=[],g=[],h=a.map(function(a){return a.keyId}).filter(ya);if(0<h.length&&(e=h[0],h.some(za(e))))throw new t(2,4,4010);c||(g=a.filter(function(a){return"urn:mpeg:dash:mp4protection:2011"==a.qc?(d=a.init||d,!1):!0}),0<g.length&&(f=Qc(d,b,g),f.length||(f=[Ba("",d)])));0<a.length&&(c||!g.length)&&(f=Ma(Nc).map(function(a){return Ba(a,d)}));e&&f.forEach(function(a){a.initData.forEach(function(a){a.keyId=e})});return{Qb:e,xe:d,drmInfos:f,Sb:!0}}
132
+ function Rc(a,b,c,d){var e=Oc(a,b,d);if(c.Sb){a=1==c.drmInfos.length&&!c.drmInfos[0].keySystem;b=!e.drmInfos.length;if(!c.drmInfos.length||a&&!b)c.drmInfos=e.drmInfos;c.Sb=!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})}),!c.drmInfos.length))throw new t(2,4,4008);return e.Qb||c.Qb}function Qc(a,b,c){return c.map(function(c){var d=Nc[c.qc];return d?[Ba(d,c.init||a)]:b(c.node)||[]}).reduce(x,[])}
133
+ function Pc(a){return a.map(function(a){var b=a.getAttribute("schemeIdUri"),d=a.getAttribute("cenc:default_KID"),e=M(a,"cenc:pssh").map(Fc);if(!b)return null;b=b.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),0<=d.indexOf(" ")))throw new t(2,4,4009);var f=[];try{f=e.map(function(a){return{initDataType:"cenc",initData:Wa(a),keyId:null}})}catch(g){throw new t(2,4,4007);}return{node:a,qc:b,keyId:d,init:0<f.length?f:null}}).filter(ya)};function Sc(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})}
134
+ function Tc(a,b){var c=Uc(a,b,"timescale"),d=1;c&&(d=Kc(c)||1);c=Uc(a,b,"duration");(c=Kc(c||""))&&(c/=d);var e=Uc(a,b,"startNumber"),f=Uc(a,b,"presentationTimeOffset"),g=Lc(e||"");if(null==e||null==g)g=1;var h=Vc(a,b,"SegmentTimeline"),e=null;if(h){for(var e=d,l=Number(f),n=a.R.duration||Infinity,h=M(h,"S"),q=[],r=0,v=0;v<h.length;++v){var u=h[v],w=N(u,"t",Lc),K=N(u,"d",Lc),u=N(u,"r",Jc);null!=w&&(w-=l);if(!K)break;w=null!=w?w:r;u=u||0;if(0>u)if(v+1<h.length){u=N(h[v+1],"t",Lc);if(null==u)break;
135
+ else if(w>=u)break;u=Math.ceil((u-w)/K)-1}else{if(Infinity==n)break;else if(w/e>=n)break;u=Math.ceil((n*e-w)/K)-1}0<q.length&&w!=r&&(q[q.length-1].end=w/e);for(var oa=0;oa<=u;++oa)r=w+K,q.push({start:w/e,end:r/e,oe:w}),w=r}e=q}return{timescale:d,O:c,ya:g,presentationTimeOffset:Number(f)/d||0,Nb:Number(f),F:e}}function Uc(a,b,c){return[b(a.w),b(a.S),b(a.T)].filter(ya).map(function(a){return a.getAttribute(c)}).reduce(function(a,b){return a||b})}
136
+ function Vc(a,b,c){return[b(a.w),b(a.S),b(a.T)].filter(ya).map(function(a){return Ec(a,c)}).reduce(function(a,b){return a||b})};function Wc(a,b,c){this.a=a;this.X=b;this.M=c}m("shaka.media.InitSegmentReference",Wc);function O(a,b,c,d,e,f){this.position=a;this.startTime=b;this.endTime=c;this.a=d;this.X=e;this.M=f}m("shaka.media.SegmentReference",O);function P(a,b){this.H=a;this.a=b==Xc;this.u=0}m("shaka.util.DataViewReader",P);var Xc=1;P.Endianness={te:0,ve:Xc};P.prototype.Z=function(){return this.u<this.H.byteLength};P.prototype.hasMoreData=P.prototype.Z;P.prototype.Tc=function(){return this.u};P.prototype.getPosition=P.prototype.Tc;P.prototype.Oc=function(){return this.H.byteLength};P.prototype.getLength=P.prototype.Oc;P.prototype.Cb=function(){try{var a=this.H.getUint8(this.u)}catch(b){Yc()}this.u+=1;return a};P.prototype.readUint8=P.prototype.Cb;
137
+ P.prototype.mc=function(){try{var a=this.H.getUint16(this.u,this.a)}catch(b){Yc()}this.u+=2;return a};P.prototype.readUint16=P.prototype.mc;P.prototype.D=function(){try{var a=this.H.getUint32(this.u,this.a)}catch(b){Yc()}this.u+=4;return a};P.prototype.readUint32=P.prototype.D;P.prototype.lc=function(){try{var a=this.H.getInt32(this.u,this.a)}catch(b){Yc()}this.u+=4;return a};P.prototype.readInt32=P.prototype.lc;
138
+ P.prototype.Pa=function(){try{if(this.a){var a=this.H.getUint32(this.u,!0);var b=this.H.getUint32(this.u+4,!0)}else b=this.H.getUint32(this.u,!1),a=this.H.getUint32(this.u+4,!1)}catch(c){Yc()}if(2097151<b)throw new t(2,3,3001);this.u+=8;return b*Math.pow(2,32)+a};P.prototype.readUint64=P.prototype.Pa;P.prototype.Ja=function(a){this.u+a>this.H.byteLength&&Yc();var b=this.H.buffer.slice(this.u,this.u+a);this.u+=a;return new Uint8Array(b)};P.prototype.readBytes=P.prototype.Ja;
139
+ P.prototype.I=function(a){this.u+a>this.H.byteLength&&Yc();this.u+=a};P.prototype.skip=P.prototype.I;P.prototype.Bb=function(){for(var a=this.u;this.Z()&&this.H.getUint8(this.u);)this.u+=1;a=this.H.buffer.slice(a,this.u);this.u+=1;return F(a)};P.prototype.readTerminatedString=P.prototype.Bb;function Yc(){throw new t(2,3,3E3);};function Q(){this.b=[];this.a=[]}m("shaka.util.Mp4Parser",Q);Q.prototype.C=function(a,b){var c=Zc(a);this.b[c]=0;this.a[c]=b;return this};Q.prototype.box=Q.prototype.C;Q.prototype.da=function(a,b){var c=Zc(a);this.b[c]=1;this.a[c]=b;return this};Q.prototype.fullBox=Q.prototype.da;Q.prototype.parse=function(a){for(a=new P(new DataView(a),0);a.Z();)this.eb(0,a)};Q.prototype.parse=Q.prototype.parse;
140
+ Q.prototype.eb=function(a,b){var c=b.u,d=b.D(),e=b.D();switch(d){case 0:d=b.H.byteLength-c;break;case 1:d=b.Pa()}var f=this.a[e];if(f){var g=null,h=null;1==this.b[e]&&(h=b.D(),g=h>>>24,h&=16777215);e=c+d-b.u;e=0<e?b.Ja(e).buffer:new ArrayBuffer(0);e=new P(new DataView(e),0);f({Na:this,version:g,Lc:h,s:e,size:d,start:c+a})}else b.I(c+d-b.u)};Q.prototype.parseNext=Q.prototype.eb;function R(a){for(;a.s.Z();)a.Na.eb(a.start,a.s)}Q.children=R;
141
+ function $c(a){for(var b=a.s.D();0<b;--b)a.Na.eb(a.start,a.s)}Q.sampleDescription=$c;function ad(a){return function(b){a(b.s.Ja(b.s.H.byteLength-b.s.u))}}Q.allData=ad;function Zc(a){for(var b=0,c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};function bd(a,b,c,d){var e,f=(new Q).da("sidx",function(a){e=cd(b,d,c,a)});a&&f.parse(a);if(e)return e;throw new t(2,3,3004);}
142
+ function cd(a,b,c,d){var e=[];d.s.I(4);var f=d.s.D();if(!f)throw new t(2,3,3005);if(d.version){var g=d.s.Pa();var h=d.s.Pa()}else g=d.s.D(),h=d.s.D();d.s.I(2);var l=d.s.mc();b=g-b;a=a+d.size+h;for(h=0;h<l;h++){var n=d.s.D();g=(n&2147483648)>>>31;var n=n&2147483647,q=d.s.D();d.s.I(4);if(1==g)throw new t(2,3,3006);e.push(new O(e.length,b/f,(b+q)/f,function(){return c},a,a+n-1));b+=q;a+=n}return e};function S(a){this.a=a}m("shaka.media.SegmentIndex",S);S.prototype.m=function(){this.a=null;return Promise.resolve()};S.prototype.destroy=S.prototype.m;S.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};S.prototype.find=S.prototype.find;S.prototype.get=function(a){if(!this.a.length)return null;a-=this.a[0].position;return 0>a||a>=this.a.length?null:this.a[a]};
143
+ S.prototype.get=S.prototype.get;S.prototype.vb=function(a){for(var b,c,d=[],e=c=0;c<this.a.length&&e<a.length;){var f=this.a[c];b=a[e];f.startTime<b.startTime?(d.push(f),c++):(f.startTime>b.startTime||(.1<Math.abs(f.endTime-b.endTime)?d.push(b):d.push(f),c++),e++)}for(;c<this.a.length;)d.push(this.a[c++]);if(d.length)for(c=d[d.length-1].position+1;e<a.length;)b=a[e++],b=new O(c++,b.startTime,b.endTime,b.a,b.X,b.M),d.push(b);else d=a;this.a=d};S.prototype.merge=S.prototype.vb;
144
+ S.prototype.ob=function(a){for(var b=0;b<this.a.length&&!(this.a[b].endTime>a);++b);this.a.splice(0,b)};S.prototype.evict=S.prototype.ob;function dd(a,b){if(a.a.length){var c=a.a[a.a.length-1];c.startTime>b||(a.a[a.a.length-1]=new O(c.position,c.startTime,b,c.a,c.X,c.M))}};function ed(a){this.b=a;this.a=new P(a,0);fd||(fd=[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 fd;ed.prototype.Z=function(){return this.a.Z()};
145
+ function gd(a){var b=hd(a);if(7<b.length)throw new t(2,3,3002);for(var c=0,d=0;d<b.length;d++)c=256*c+b[d];b=c;c=hd(a);a:{for(d=0;d<fd.length;d++)if(Za(c,fd[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 t(2,3,3001);for(var d=c[0]&(1<<8-c.length)-1,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.I(c);return new id(b,d)}
146
+ function hd(a){var b=a.a.Cb(),c;for(c=1;8>=c&&!(b&1<<8-c);c++);if(8<c)throw new t(2,3,3002);var d=new Uint8Array(c);d[0]=b;for(b=1;b<c;b++)d[b]=a.a.Cb();return d}function id(a,b){this.id=a;this.a=b}function jd(a){if(8<a.a.byteLength)throw new t(2,3,3002);if(8==a.a.byteLength&&a.a.getUint8(0)&224)throw new t(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 kd(){}
147
+ kd.prototype.parse=function(a,b,c,d){var e;b=new ed(new DataView(b));if(440786851!=gd(b).id)throw new t(2,3,3008);var f=gd(b);if(408125543!=f.id)throw new t(2,3,3009);b=f.a.byteOffset;f=new ed(f.a);for(e=null;f.Z();){var g=gd(f);if(357149030==g.id){e=g;break}}if(!e)throw new t(2,3,3010);f=new ed(e.a);e=1E6;for(g=null;f.Z();){var h=gd(f);if(2807729==h.id)e=jd(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 t(2,3,3003);
148
+ }if(null==g)throw new t(2,3,3011);f=e/1E9;e=g*f;a=gd(new ed(new DataView(a)));if(475249515!=a.id)throw new t(2,3,3007);return ld(a,b,f,e,c,d)};function ld(a,b,c,d,e,f){function g(){return e}var h=[];a=new ed(a.a);for(var l=-1,n=-1;a.Z();){var q=gd(a);if(187==q.id){var r=md(q);r&&(q=c*(r.pe-f),r=b+r.Ld,0<=l&&h.push(new O(h.length,l,q,g,n,r-1)),l=q,n=r)}}0<=l&&h.push(new O(h.length,l,d,g,n,null));return h}
149
+ function md(a){var b=new ed(a.a);a=gd(b);if(179!=a.id)throw new t(2,3,3013);a=jd(a);b=gd(b);if(183!=b.id)throw new t(2,3,3012);for(var b=new ed(b.a),c=0;b.Z();){var d=gd(b);if(241==d.id){c=jd(d);break}}return{pe:a,Ld:c}};function nd(a,b){var c=Vc(a,b,"Initialization");if(!c)return null;var d=a.w.U,e=c.getAttribute("sourceURL");e&&(d=z(a.w.U,[e]));var e=0,f=null;if(c=N(c,"range",Ic))e=c.start,f=c.end;return new Wc(function(){return d},e,f)}
150
+ function od(a,b){var c=Uc(a,pd,"presentationTimeOffset"),d=nd(a,pd);var e=Number(c);var f=a.w.contentType,g=a.w.mimeType.split("/")[1];if("text"!=f&&"mp4"!=g&&"webm"!=g)throw new t(2,4,4006);if("webm"==g&&!d)throw new t(2,4,4005);var f=Vc(a,pd,"RepresentationIndex"),h=Uc(a,pd,"indexRange"),l=a.w.U,h=Ic(h||"");if(f){var n=f.getAttribute("sourceURL");n&&(l=z(a.w.U,[n]));h=N(f,"range",Ic,h)}if(!h)throw new t(2,4,4002);e=qd(a,b,d,l,h.start,h.end,g,e);return{createSegmentIndex:e.createSegmentIndex,findSegmentPosition:e.findSegmentPosition,
151
+ getSegmentReference:e.getSegmentReference,initSegmentReference:d,presentationTimeOffset:Number(c)||0}}
152
+ function qd(a,b,c,d,e,f,g,h){var l=a.presentationTimeline,n=!a.Ca||!a.R.sb,q=a.R.duration,r=b,v=null;return{createSegmentIndex:function(){var a=[r(d,e,f),"webm"==g?r(c.a(),c.X,c.M):null];r=null;return Promise.all(a).then(function(a){var b=a[0];a=a[1]||null;b="mp4"==g?bd(b,e,d,h):(new kd).parse(b,a,d,h);l.Ga(0,b);v=new S(b);n&&dd(v,q)})},findSegmentPosition:function(a){return v.find(a)},getSegmentReference:function(a){return v.get(a)}}}function pd(a){return a.Qa};function rd(a,b){var c=nd(a,sd);var d=td(a);var e=Tc(a,sd),f=e.ya;f||(f=1);var g=0;e.O?g=e.O*(f-1):e.F&&0<e.F.length&&(g=e.F[0].start);d={O:e.O,startTime:g,ya:f,presentationTimeOffset:e.presentationTimeOffset,F:e.F,Fa:d};if(!d.O&&!d.F&&1<d.Fa.length)throw new t(2,4,4002);if(!d.O&&!a.R.duration&&!d.F&&1==d.Fa.length)throw new t(2,4,4002);if(d.F&&!d.F.length)throw new t(2,4,4002);f=e=null;a.T.id&&a.w.id&&(f=a.T.id+","+a.w.id,e=b[f]);g=ud(a.R.duration,d.ya,a.w.U,d);e?(e.vb(g),e.ob(a.presentationTimeline.ma()-
153
+ a.R.start)):(a.presentationTimeline.Ga(0,g),e=new S(g),f&&a.Ca&&(b[f]=e));a.Ca&&a.R.sb||dd(e,a.R.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:e.find.bind(e),getSegmentReference:e.get.bind(e),initSegmentReference:c,presentationTimeOffset:d.presentationTimeOffset}}function sd(a){return a.oa}
154
+ function ud(a,b,c,d){var e=d.Fa.length;d.F&&d.F.length!=d.Fa.length&&(e=Math.min(d.F.length,d.Fa.length));for(var f=[],g=d.startTime,h=0;h<e;h++){var l=d.Fa[h],n=z(c,[l.ad]);var q=null!=d.O?g+d.O:d.F?d.F[h].end:g+a;f.push(new O(h+b,g,q,function(a){return a}.bind(null,n),l.start,l.end));g=q}return f}
155
+ function td(a){return[a.w.oa,a.S.oa,a.T.oa].filter(ya).map(function(a){return M(a,"SegmentURL")}).reduce(function(a,c){return 0<a.length?a:c}).map(function(b){b.getAttribute("indexRange")&&!a.Yb&&(a.Yb=!0);var c=b.getAttribute("media");b=N(b,"mediaRange",Ic,{start:0,end:null});return{ad:c,start:b.start,end:b.end}})};function vd(a,b,c,d){var e=wd(a);var f=Tc(a,xd);var g=Uc(a,xd,"media"),h=Uc(a,xd,"index");f={O:f.O,timescale:f.timescale,ya:f.ya,presentationTimeOffset:f.presentationTimeOffset,Nb:f.Nb,F:f.F,ub:g,La:h};g=0+(f.La?1:0);g+=f.F?1:0;g+=f.O?1:0;if(!g)throw new t(2,4,4002);1!=g&&(f.La&&(f.F=null),f.O=null);if(!f.La&&!f.ub)throw new t(2,4,4002);if(f.La){c=a.w.mimeType.split("/")[1];if("mp4"!=c&&"webm"!=c)throw new t(2,4,4006);if("webm"==c&&!e)throw new t(2,4,4005);d=Sc(f.La,a.w.id,null,a.bandwidth||null,
156
+ null);d=z(a.w.U,[d]);a=qd(a,b,e,d,0,null,c,f.presentationTimeOffset)}else f.O?(d||a.presentationTimeline.wb(f.O),a=yd(a,f)):(d=b=null,a.T.id&&a.w.id&&(d=a.T.id+","+a.w.id,b=c[d]),g=zd(a,f),b?(b.vb(g),b.ob(a.presentationTimeline.ma()-a.R.start)):(a.presentationTimeline.Ga(0,g),b=new S(g),d&&a.Ca&&(c[d]=b)),a.Ca&&a.R.sb||dd(b,a.R.duration),a={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:b.find.bind(b),getSegmentReference:b.get.bind(b)});return{createSegmentIndex:a.createSegmentIndex,
157
+ findSegmentPosition:a.findSegmentPosition,getSegmentReference:a.getSegmentReference,initSegmentReference:e,presentationTimeOffset:f.presentationTimeOffset}}function xd(a){return a.Ra}
158
+ function yd(a,b){var c=a.R.duration,d=b.O,e=b.ya,f=b.timescale,g=b.ub,h=a.bandwidth||null,l=a.w.id,n=a.w.U;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(a){return 0>a||c&&a>=c?null:Math.floor(a/d)},getSegmentReference:function(a){var b=a*d;return 0>b||c&&b>=c?null:new O(a,b,b+d,function(){var c=Sc(g,l,a+e,h,b*f);return z(n,[c])},0,null)}}}
159
+ function zd(a,b){for(var c=[],d=0;d<b.F.length;d++){var e=d+b.ya;c.push(new O(e,b.F[d].start,b.F[d].end,function(a,b,c,d,e,q){a=Sc(a,b,e,c,q);return z(d,[a]).map(function(a){return a.toString()})}.bind(null,b.ub,a.w.id,a.bandwidth||null,a.w.U,e,b.F[d].oe+b.Nb),0,null))}return c}function wd(a){var b=Uc(a,xd,"initialization");if(!b)return null;var c=a.w.id,d=a.bandwidth||null,e=a.w.U;return new Wc(function(){var a=Sc(b,c,null,d,null);return z(e,[a])},0,null)};var Ad={},Bd={};m("shaka.media.ManifestParser.registerParserByExtension",function(a,b){Bd[a]=b});m("shaka.media.ManifestParser.registerParserByMime",function(a,b){Ad[a]=b});function Cd(){var a={},b;for(b in Ad)a[b]=!0;for(b in Bd)a[b]=!0;["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(b){a[b]=!!Ad[b]});["mpd","m3u8","ism"].forEach(function(b){a[b]=!!Bd[b]});return a}
160
+ function Dd(a,b,c,d){var e=d;e||(d=(new ia(a)).W.split("/").pop().split("."),1<d.length&&(d=d.pop().toLowerCase(),e=Bd[d]));if(e)return Promise.resolve(e);c=C([a],c);c.method="HEAD";return b.request(0,c).then(function(b){(b=b.headers["content-type"])&&(b=b.toLowerCase());return(e=Ad[b])?e:Promise.reject(new t(2,4,4E3,a))},function(a){a.severity=2;return Promise.reject(a)})};function T(a,b){this.f=a;this.i=b;this.c=this.a=Infinity;this.b=1;this.h=0;this.g=!0}m("shaka.media.PresentationTimeline",T);T.prototype.Y=function(){return this.a};T.prototype.getDuration=T.prototype.Y;T.prototype.pa=function(a){this.a=a};T.prototype.setDuration=T.prototype.pa;T.prototype.Uc=function(){return this.f};T.prototype.getPresentationStartTime=T.prototype.Uc;T.prototype.uc=function(a){this.h=a};T.prototype.setClockOffset=T.prototype.uc;T.prototype.wc=function(a){this.g=a};
161
+ T.prototype.setStatic=T.prototype.wc;T.prototype.Vc=function(){return this.c};T.prototype.getSegmentAvailabilityDuration=T.prototype.Vc;T.prototype.vc=function(a){this.c=a};T.prototype.setSegmentAvailabilityDuration=T.prototype.vc;T.prototype.Ga=function(a,b){b.length&&(this.b=b.reduce(function(a,b){return Math.max(a,b.endTime-b.startTime)},this.b))};T.prototype.notifySegments=T.prototype.Ga;T.prototype.wb=function(a){this.b=Math.max(this.b,a)};T.prototype.notifyMaxSegmentDuration=T.prototype.wb;
162
+ T.prototype.$=function(){return Infinity==this.a&&!this.g};T.prototype.isLive=T.prototype.$;T.prototype.va=function(){return Infinity!=this.a&&!this.g};T.prototype.isInProgress=T.prototype.va;T.prototype.ma=function(){return this.Da(0)};T.prototype.getSegmentAvailabilityStart=T.prototype.ma;T.prototype.Da=function(a){if(Infinity==this.c)return 0;var b=this.ua();return Math.max(0,Math.min(b-this.c+a,b))};T.prototype.getSafeAvailabilityStart=T.prototype.Da;
163
+ T.prototype.ua=function(){return this.$()||this.va()?Math.min(Math.max(0,(Date.now()+this.h)/1E3-this.b-this.f),this.a):this.a};T.prototype.getSegmentAvailabilityEnd=T.prototype.ua;T.prototype.bb=function(){return Math.max(0,this.ua()-(this.$()||this.va()?this.i:0))};T.prototype.getSeekRangeEnd=T.prototype.bb;function Ed(){this.a=this.b=null;this.g=[];this.c=null;this.i=[];this.h=1;this.j={};this.l=0;this.f=null}m("shaka.dash.DashParser",Ed);k=Ed.prototype;k.configure=function(a){this.b=a};k.start=function(a,b){this.g=[a];this.a=b;return Fd(this).then(function(){this.a&&Gd(this,0);return this.c}.bind(this))};k.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()};k.update=function(){Fd(this)["catch"](function(a){if(this.a)this.a.onError(a)}.bind(this))};
164
+ k.onExpirationUpdated=function(){};function Fd(a){return a.a.networkingEngine.request(0,C(a.g,a.b.retryParameters)).then(function(a){if(this.a)return Hd(this,a.data,a.uri)}.bind(a))}
165
+ function Hd(a,b,c){var d=F(b),e=new DOMParser,f=null;b=null;try{f=e.parseFromString(d,"text/xml")}catch(v){}f&&"MPD"==f.documentElement.tagName&&(b=f.documentElement);b&&0<b.getElementsByTagName("parsererror").length&&(b=null);if(!b)throw new t(2,4,4001);c=[c];d=M(b,"Location").map(Fc).filter(ya);0<d.length&&(c=a.g=d);d=M(b,"BaseURL").map(Fc);c=z(c,d);var g=N(b,"minBufferTime",Hc);a.l=N(b,"minimumUpdatePeriod",Hc,-1);var h=N(b,"availabilityStartTime",Gc),d=N(b,"timeShiftBufferDepth",Hc),l=N(b,"suggestedPresentationDelay",
166
+ Hc),e=N(b,"maxSegmentDuration",Hc),f=b.getAttribute("type")||"static";if(a.c)var n=a.c.presentationTimeline;else{var q=Math.max(10,1.5*g);n=new T(h,null!=l?l:q)}var h=Id(a,{Ca:"static"!=f,presentationTimeline:n,T:null,R:null,S:null,w:null,bandwidth:void 0,Yb:!1},c,b),l=h.duration,r=h.periods;n.wc("static"==f);n.pa(l||Infinity);n.vc(null!=d?d:Infinity);n.wb(e||1);if(a.c)return Promise.resolve();b=M(b,"UTCTiming");return Jd(a,c,b,n.$()).then(function(a){this.a&&(n.uc(a),this.c={presentationTimeline:n,
167
+ periods:r,offlineSessionIds:[],minBufferTime:g||0})}.bind(a))}
168
+ function Id(a,b,c,d){var e=N(d,"mediaPresentationDuration",Hc),f=[],g=0;d=M(d,"Period");for(var h=0;h<d.length;h++){var l=d[h],g=N(l,"start",Hc,g),n=N(l,"duration",Hc),q=null;if(h!=d.length-1){var r=N(d[h+1],"start",Hc);null!=r&&(q=r-g)}else null!=e&&(q=e-g);null==q&&(q=n);l=Kd(a,b,c,{start:g,duration:q,node:l,sb:null==q||h==d.length-1});f.push(l);n=b.T.id;a.i.every(za(n))&&(a.a.filterPeriod(l),a.i.push(n),a.c&&a.c.periods.push(l));if(null==q){g=null;break}g+=q}return null!=e?{periods:f,duration:e}:
169
+ {periods:f,duration:g}}
170
+ function Kd(a,b,c,d){b.T=Ld(d.node,null,c);b.R=d;b.T.id||(b.T.id="__shaka_period_"+d.start);M(d.node,"EventStream").forEach(a.Dd.bind(a,d.start,d.duration));c=M(d.node,"AdaptationSet").map(a.Bd.bind(a,b)).filter(ya);var e=c.map(function(a){return a.Nd}).reduce(x,[]),f=e.filter(Aa);if(b.Ca&&e.length!=f.length)throw new t(2,4,4018);var g=c.filter(function(a){return!a.Mb});c.filter(function(a){return a.Mb}).forEach(function(a){var b=a.streams[0],c=a.Mb;g.forEach(function(a){a.id==c&&a.streams.forEach(function(a){a.trickModeVideo=
171
+ b})})});e=Md(g,"video");f=Md(g,"audio");if(!e.length&&!f.length)throw new t(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++)Nd(a,f[c],e[h],b);a=Md(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 Md(a,b){return a.filter(function(a){return a.contentType==b})}
172
+ function Nd(a,b,c,d){if(b||c)if(b&&c){var e=b.drmInfos;var f=c.drmInfos;if(e.length&&f.length?0<qb(e,f).length:1)for(var g=qb(b.drmInfos,c.drmInfos),e=0;e<b.streams.length;e++)for(var h=0;h<c.streams.length;h++)f=c.streams[h].bandwidth+b.streams[e].bandwidth,f={id:a.h++,language:b.language,primary:b.tb||c.tb,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,f={id:a.h++,
173
+ language:g.language||"und",primary:g.tb,audio:b?g.streams[e]:null,video:c?g.streams[e]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},d.push(f)}
174
+ k.Bd=function(a,b){a.S=Ld(b,a.T,null);var c=!1,d=M(b,"Role"),e=void 0;"text"==a.S.contentType&&(e="subtitle");for(var f=0;f<d.length;f++){var g=d[f].getAttribute("schemeIdUri");if(null==g||"urn:mpeg:dash:role:2011"==g)switch(g=d[f].getAttribute("value"),g){case "main":c=!0;break;case "caption":case "subtitle":e=g}}var h=null,l=!1;M(b,"EssentialProperty").forEach(function(a){"http://dashif.org/guidelines/trickmode"==a.getAttribute("schemeIdUri")?h=a.getAttribute("value"):l=!0});if(l)return null;var d=
175
+ M(b,"ContentProtection"),n=Oc(d,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo),d=Qb(b.getAttribute("lang")||"und"),f=M(b,"Representation"),e=f.map(this.Ed.bind(this,a,n,e,d,c)).filter(function(a){return!!a});if(!e.length)throw new t(2,4,4003);a.S.contentType||(a.S.contentType=Od(e[0].mimeType,e[0].codecs),e.forEach(function(b){b.type=a.S.contentType}));e.forEach(function(a){n.drmInfos.forEach(function(b){a.keyId&&b.keyIds.push(a.keyId)})});f=f.map(function(a){return a.getAttribute("id")}).filter(ya);
176
+ return{id:a.S.id||"__fake__"+this.h++,contentType:a.S.contentType,language:d,tb:c,streams:e,drmInfos:n.drmInfos,Mb:h,Nd:f}};
177
+ k.Ed=function(a,b,c,d,e,f){a.w=Ld(f,a.S,null);if(!Pd(a.w))return null;a.bandwidth=N(f,"bandwidth",Kc)||void 0;var g=this.Od.bind(this);if(a.w.Qa)g=od(a,g);else if(a.w.oa)g=rd(a,this.j);else if(a.w.Ra)g=vd(a,g,this.j,!!this.c);else{var h=a.w.U,l=a.R.duration||0;g={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(a){return 0<=a&&a<l?1:null},getSegmentReference:function(a){return 1!=a?null:new O(1,0,l,function(){return h},0,null)},initSegmentReference:null,presentationTimeOffset:0}}f=
178
+ M(f,"ContentProtection");f=Rc(f,this.b.dash.customScheme,b,this.b.dash.ignoreDrmInfo);return{id:this.h++,createSegmentIndex:g.createSegmentIndex,findSegmentPosition:g.findSegmentPosition,getSegmentReference:g.getSegmentReference,initSegmentReference:g.initSegmentReference,presentationTimeOffset:g.presentationTimeOffset,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:f,language:d,type:a.S.contentType,
179
+ primary:e,trickModeVideo:null,containsEmsgBoxes:a.w.containsEmsgBoxes}};k.fe=function(){this.f=null;var a=Date.now();Fd(this).then(function(){this.a&&Gd(this,(Date.now()-a)/1E3)}.bind(this))["catch"](function(a){this.a&&(a.severity=1,this.a.onError(a),Gd(this,0))}.bind(this))};function Gd(a,b){0>a.l||(a.f=window.setTimeout(a.fe.bind(a),1E3*Math.max(Math.max(3,a.l)-b,0)))}
180
+ function Ld(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",containsEmsgBoxes:!1,frameRate:void 0};c=c||b.U;var d=M(a,"BaseURL").map(Fc),e=a.getAttribute("contentType")||b.contentType,f=a.getAttribute("mimeType")||b.mimeType,g=a.getAttribute("codecs")||b.codecs,h=N(a,"frameRate",Mc)||b.frameRate,l=!!M(a,"InbandEventStream").length;e||(e=Od(f,g));return{U:z(c,d),Qa:Ec(a,"SegmentBase")||b.Qa,oa:Ec(a,"SegmentList")||b.oa,Ra:Ec(a,"SegmentTemplate")||b.Ra,width:N(a,"width",Lc)||b.width,height:N(a,"height",
181
+ Lc)||b.height,contentType:e,mimeType:f,codecs:g,frameRate:h,containsEmsgBoxes:l||b.containsEmsgBoxes,id:a.getAttribute("id")}}function Pd(a){var b=0+(a.Qa?1:0);b+=a.oa?1:0;b+=a.Ra?1:0;if(!b)return"text"==a.contentType||"application"==a.contentType?!0:!1;1!=b&&(a.Qa&&(a.oa=null),a.Ra=null);return!0}
182
+ function Qd(a,b,c,d){b=z(b,[c]);b=C(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=F(a.data);a=Date.parse(a);return isNaN(a)?0:a-Date.now()})}
183
+ function Jd(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 xa(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 Qd(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 Qd(this,
184
+ 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})}
185
+ k.Dd=function(a,b,c){var d=c.getAttribute("schemeIdUri")||"",e=c.getAttribute("value")||"",f=N(c,"timescale",Lc)||1;M(c,"Event").forEach(function(c){var g=N(c,"presentationTime",Lc)||0,l=N(c,"duration",Lc)||0,g=g/f+a,l=g+l/f;null!=b&&(g=Math.min(g,a+b),l=Math.min(l,a+b));c={schemeIdUri:d,value:e,startTime:g,endTime:l,id:c.getAttribute("id")||"",eventElement:c};this.a.onTimelineRegionAdded(c)}.bind(this))};
186
+ k.Od=function(a,b,c){a=C(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 Od(a,b){return sb[Wb(a,b)]?"text":a.split("/")[0]}Bd.mpd=Ed;Ad["application/dash+xml"]=Ed;function Rd(a,b,c,d){this.uri=a;this.type=b;this.ga=c;this.segments=d||null}function Sd(a,b,c,d){this.id=a;this.name=b;this.a=c;this.value=d||null}Sd.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 Td(a,b){this.name=a;this.value=b}Sd.prototype.getAttribute=function(a){var b=this.a.filter(function(b){return b.name==a});return b.length?b[0]:null};
187
+ function Ud(a,b,c){c=c||null;return(a=a.getAttribute(b))?a.value:c}function Vd(a,b){this.ga=b;this.uri=a};function Wd(a,b){return a.filter(function(a){return a.name==b})}function Xd(a,b){var c=Wd(a,b);return c.length?c[0]:null}function Yd(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 Zd(a){this.b=a;this.a=0}function $d(a,b){b.lastIndex=a.a;var c=(c=b.exec(a.b))?{position:c.index,length:c[0].length,Qd:c}:null;if(a.a==a.b.length||!c||c.position!=a.a)return null;a.a+=c.length;return c.Qd}function ae(a){return a.a==a.b.length?null:(a=$d(a,/[^ \t\n]*/gm))?a[0]:null};function be(){this.a=0}
188
+ function ce(a,b,c){b=F(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 t(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=de(a.a++,g);if(0<=ee.indexOf(g.name))b=1;else if(0<=fe.indexOf(g.name)){if(1!=b)throw new t(2,4,4017);d=d.splice(f,d.length-f);a=ge(a,d);return new Rd(c,b,e,a)}e.push(g);f+=1;"EXT-X-STREAM-INF"==g.name&&(g.a.push(new Td("URI",d[f])),f+=1)}return new Rd(c,b,e)}
189
+ function ge(a,b){var c=[],d=[];b.forEach(function(a){/^(#EXT)/.test(a)?(a=de(this.a++,a),d.push(a)):/^#(?!EXT)/m.test(a)||(c.push(new Vd(a.trim(),d)),d=[])}.bind(a));return c}function de(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new t(2,4,4016);var d=c[1],e=c[2],c=[];if(e&&0<=e.indexOf("="))for(var e=new Zd(e),f,g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=$d(e,g);)c.push(new Td(f[1],f[2]||f[3]));else if(e)return new Sd(a,d,c,e);return new Sd(a,d,c)}
190
+ var ee="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY".split(" "),fe="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function he(a){return new Promise(function(b){var c=he.parse(a);b({uri:a,data:c.data,headers:{"content-type":c.contentType}})})}m("shaka.net.DataUriPlugin",he);
191
+ he.parse=function(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new t(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new t(2,1,1004,a);var c=b[0],b=window.decodeURIComponent(b.slice(1).join(",")),c=c.split(";"),d=null;1<c.length&&(d=c[1]);if("base64"==d)a=Wa(b).buffer;else{if(d)throw new t(2,1,1005,a);a=Sa(b)}return{data:a,contentType:c[0]}};Ea.data=he;function ie(){this.b=this.c=null;this.i=1;this.g={};this.f={};this.a=null;this.j="";this.h=new be}m("shaka.hls.HlsParser",ie);k=ie.prototype;k.configure=function(a){this.b=a};k.start=function(a,b){this.c=b;this.j=a;return this.c.networkingEngine.request(0,C([a],this.b.retryParameters)).then(function(b){return je(this,b.data,a)}.bind(this))};k.stop=function(){this.b=this.c=null;this.g={};return Promise.resolve()};k.update=function(){};k.onExpirationUpdated=function(){};
192
+ function je(a,b,c){b=ce(a.h,b,c);if(0!=b.type)throw new t(2,4,4022);a.a=new T(null,0);return le(a,b).then(function(a){this.c.filterPeriod(a);return{presentationTimeline:this.a,periods:[a],offlineSessionIds:[],minBufferTime:0}}.bind(a))}
193
+ function le(a,b){var c=Wd(b.ga,"EXT-X-STREAM-INF").map(function(a){return me(this,a,b)}.bind(a)),d=Wd(b.ga,"EXT-X-MEDIA").filter(function(a){return"SUBTITLES"==U(a,"TYPE")}.bind(a)).map(function(a){return ne(this,a,b)}.bind(a));return Promise.all(c).then(function(a){return Promise.all(d).then(function(b){var c=a.reduce(x,[]);oe(this,c);return{startTime:0,variants:c,textStreams:b}}.bind(this))}.bind(a))}
194
+ function me(a,b,c){var d=Number(U(b,"BANDWIDTH")),e=Ud(b,"CODECS","avc1.42E01E,mp4a.40.2").split(","),f=b.getAttribute("RESOLUTION"),g=null,h=null,l=Ud(b,"FRAME-RATE");if(f)var n=f.value.split("x"),g=n[0],h=n[1];var q=pe(a,c);c=Wd(c.ga,"EXT-X-MEDIA");var r=Ud(b,"AUDIO"),v=Ud(b,"VIDEO");r?c=Yd(c,"AUDIO",r):v&&(c=Yd(c,"VIDEO",v));c=c.map(function(a){return qe(this,a,e,q)}.bind(a));var u=[],w=[];return Promise.all(c).then(function(a){r?u=a:v&&(w=a);if(u.length||w.length)var c=u.length?"video":"audio";
195
+ else 1==e.length?c=f||l?"video":"audio":(c="video",e=[e.join(",")]);a=e;var d=U(b,"URI");return re(this,d,a,c,q,"und",!1)}.bind(a)).then(function(a){"audio"==a.stream.type?u=[a]:w=[a];return se(this,u,w,d,g,h,l)}.bind(a))}
196
+ function se(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=[],l=0;l<b.length;l++)for(var n=0;n<c.length;n++){var q=b[l]?b[l].stream:null,r=c[n]?c[n].stream:null,v=b[l]?b[l].drmInfos:null,u=c[n]?c[n].drmInfos:null;if(q&&r)if(v.length&&u.length?0<qb(v,u).length:1)var w=qb(v,u);else continue;else q?w=v:r&&(w=u);h.push(te(a,q,r,d,w))}return h}
197
+ function te(a,b,c,d,e){return{id:a.i++,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 ne(a,b,c){U(b,"TYPE");c=pe(a,c);return qe(a,b,[],c).then(function(a){return a.stream})}
198
+ function qe(a,b,c,d){if(a.g[b.id])return Promise.resolve().then(function(){return this.g[b.id]}.bind(a));var e=U(b,"TYPE").toLowerCase();"subtitles"==e&&(e="text");var f=Qb(Ud(b,"LANGUAGE","und")),g=b.getAttribute("DEFAULT"),h=b.getAttribute("AUTOSELECT"),l=U(b,"URI");return re(a,l,c,e,d,f,!!g||!!h).then(function(a){return this.g[b.id]=a}.bind(a))}
199
+ function re(a,b,c,d,e,f,g){b=z([a.j],[b])[0];return a.c.networkingEngine.request(0,C([b],a.b.retryParameters)).then(function(a){a=ce(this.h,a.data,a.uri);if(1!=a.type)throw new t(2,4,4017);e=pe(this,a)||e;var b=null;"text"!=d&&(b=ve(a));var h=Xd(a.ga,"EXT-X-MEDIA-SEQUENCE"),h=we(this,a,h?Number(h.value):0);this.a.Ga(0,h);var q=h[h.length-1].endTime-h[0].startTime,r=this.a.Y();(Infinity==r||r<q)&&this.a.pa(q);var v=xe(d,c),u=void 0;"text"==d&&(u="subtitle");var w=new S(h),K=[];a.segments.forEach(function(a){a=
200
+ Wd(a.ga,"EXT-X-KEY");K.push.apply(K,a)});var oa=!1,Hb=[],ke=null;K.forEach(function(a){if("NONE"!=U(a,"METHOD")){oa=!0;var b=U(a,"KEYFORMAT");if(a=(b=ye[b])?b(a):null)a.keyIds.length&&(ke=a.keyIds[0]),Hb.push(a)}});if(oa&&!Hb.length)throw new t(2,4,4026);return ze(this,d,h[0].a()[0]).then(function(a){a={id:this.i++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:w.find.bind(w),getSegmentReference:w.get.bind(w),initSegmentReference:b,presentationTimeOffset:e||0,mimeType:a,codecs:v,
201
+ kind:u,encrypted:oa,keyId:ke,language:f,type:d,primary:g,trickModeVideo:null,containsEmsgBoxes:!1,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0};this.f[a.id]=w;return{stream:a,ye:w,drmInfos:Hb}}.bind(this))}.bind(a))}
202
+ function ve(a){var b=Wd(a.ga,"EXT-X-MAP");if(!b.length)return null;if(1<b.length)throw new t(2,4,4020);var b=b[0],c=U(b,"URI"),d=z([a.uri],[c])[0];a=0;c=null;if(b=Ud(b,"BYTERANGE"))a=b.split("@"),b=Number(a[0]),a=Number(a[1]),c=a+b-1;return new Wc(function(){return[d]},a,c)}
203
+ function we(a,b,c){var d=b.segments,e=[];d.forEach(function(a){var f=a.ga,h=z([b.uri],[a.uri])[0],l=Ae(f).value.split(","),l=Number(l[0]),n;(a=d.indexOf(a))?n=e[a-1].endTime:n=0;var l=n+l,q=0,r=null;if(f=Xd(f,"EXT-X-BYTERANGE"))f=f.value.split("@"),r=Number(f[0]),f[1]?q=Number(f[1]):q=e[a-1].M,r=q+r-1,a==d.length-1&&(r=null);e.push(new O(c+a,n,l,function(){return[h]},q,r))}.bind(a));return e}
204
+ function oe(a,b){b.forEach(function(a){var b=this.a.Y(),c=a.video;a=a.audio;c&&this.f[c.id]&&dd(this.f[c.id],b);a&&this.f[a.id]&&dd(this.f[a.id],b)}.bind(a))}function xe(a,b){if(1==b.length)return b[0];if("text"==a)return"";var c=Be;"audio"==a&&(c=Ce);for(var 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();throw new t(2,4,4025,b);}
205
+ function ze(a,b,c){var d=c.split("."),e=d[d.length-1];if("text"==b)return Promise.resolve("text/vtt");d=De;"video"==b&&(d=Ee);if(b=d[e])return Promise.resolve(b);c=C([c],a.b.retryParameters);c.method="HEAD";return a.c.networkingEngine.request(1,c).then(function(a){a=a.headers["content-type"];if(!a)throw new t(2,4,4021,e);return a})}function pe(a,b){var c=Xd(b.ga,"EXT-X-START");return c?Number(U(c,"TIME-OFFSET")):a.b.hls.defaultTimeOffset}
206
+ function U(a,b){var c=a.getAttribute(b);if(!c)throw new t(2,4,4023,b);return c.value}function Ae(a){a=Xd(a,"EXTINF");if(!a)throw new t(2,4,4024,"EXTINF");return a}
207
+ var Be=[/^(avc)/,/^(hvc)/,/^(vp[8-9])$/,/^(av1)$/,/^(mp4v)/],Ce=[/^(vorbis)/,/^(opus)/,/^(mp4a)/,/^(ac-3)$/,/^(ec-3)$/],De={mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},Ee={mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},ye={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){if("SAMPLE-AES-CENC"!=U(a,"METHOD"))return null;var b=U(a,"URI"),b=he.parse(b),b=new Uint8Array(b.data),b=Ba("com.widevine.alpha",[{initDataType:"cenc",
208
+ initData:b}]);if(a=Ud(a,"KEYID"))b.keyIds=[a.substr(2).toLowerCase()];return b}};Bd.m3u8=ie;Ad["application/x-mpegurl"]=ie;Ad["application/vnd.apple.mpegurl"]=ie;function Fe(){}Fe.prototype.parseInit=function(){};
209
+ Fe.prototype.parseMedia=function(a,b){var c=F(a),d=[],e=new DOMParser,f=null;try{f=e.parseFromString(c,"text/xml")}catch(Hb){throw new t(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 l=g.getAttribute("ttp:tickRate");c=g.getAttribute("xml:space")||"default"}else throw new t(2,2,2005);if("default"!=c&&"preserve"!=c)throw new t(2,2,2005);c="default"==c;e=new Ge(e,
210
+ f,h,l);f=He(g.getElementsByTagName("styling")[0]);h=He(g.getElementsByTagName("layout")[0]);g=He(g.getElementsByTagName("body")[0]);for(l=0;l<g.length;l++){var n=g[l],q=b.periodStart,r=e;var v=f;var u=h,w=c;if(n.hasAttribute("begin")||n.hasAttribute("end")||!/^\s*$/.test(n.textContent)){Ie(n,w);var w=Je(n.getAttribute("begin"),r),K=Je(n.getAttribute("end"),r),r=Je(n.getAttribute("dur"),r),oa=n.textContent;null==K&&null!=r&&(K=w+r);if(null==w||null==K)throw new t(2,2,2001);if(q=vb(w+q,K+q,oa)){w=Ke(n,
211
+ "region",u);u=q;if(K=Le(n,w,v,"tts:extent"))if(r=Me.exec(K))u.size=Number(r[1]);r=Le(n,w,v,"tts:writingMode");K=!0;"tb"==r||"tblr"==r?u.vertical="lr":"tbrl"==r?u.vertical="rl":K=!1;if(r=Le(n,w,v,"tts:origin"))if(r=Me.exec(r))K?(u.position=Number(r[2]),u.line=Number(r[1])):(u.position=Number(r[1]),u.line=Number(r[2])),u.snapToLines=!1;if(v=Le(n,w,v,"tts:textAlign"))u.align=v,"center"==v&&("center"!=u.align&&(u.align="middle"),u.position="auto"),u.positionAlign=Ne[v],u.lineAlign=Oe[v];v=q}else v=null}else v=
212
+ null;v&&d.push(v)}}return d};var Pe=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Qe=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Re=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Se=/^(\d*\.?\d*)f$/,Te=/^(\d*\.?\d*)t$/,Ue=/^(?:(\d*\.?\d*)h)?(?:(\d*\.?\d*)m)?(?:(\d*\.?\d*)s)?(?:(\d*\.?\d*)ms)?$/,Me=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,Oe={left:"start",center:"center",right:"end",start:"start",end:"end"},Ne={left:"line-left",center:"center",right:"line-right"};
213
+ function He(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=He(c[d]),b=b.concat(e))}b.length||b.push(a);return b}function Ie(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)Ie(c[d],b);else if(b){var e=c[d].textContent.trim(),e=e.replace(/\s+/g," ");c[d].textContent=e}}
214
+ function Le(a,b,c,d){for(var e=He(b),f=0;f<e.length;f++){var g=e[f].getAttribute(d);if(g)return g}e=Ke;return(a=e(b,"style",c)||e(a,"style",c))?a.getAttribute(d):null}function Ke(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}
215
+ function Je(a,b){var c=null;if(Pe.test(a))var c=Pe.exec(a),d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]),g=g+(Number(c[5])||0)/b.b,f=f+g/b.frameRate,c=f+60*e+3600*d;else Qe.test(a)?c=Ve(Qe,a):Re.test(a)?c=Ve(Re,a):Se.test(a)?(c=Se.exec(a),c=Number(c[1])/b.frameRate):Te.test(a)?(c=Te.exec(a),c=Number(c[1])/b.a):Ue.test(a)&&(c=Ve(Ue,a));return c}
216
+ function Ve(a,b){var c=a.exec(b);return c&&""!=c[0]?(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0):null}function Ge(a,b,c,d){this.frameRate=Number(a)||30;this.b=Number(b)||1;this.a=Number(d);this.a||(this.a=a?this.frameRate*this.b:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=a[1]/a[2])}tb("application/ttml+xml",Fe);function We(){this.a=new Fe}We.prototype.parseInit=function(a){var b=!1;(new Q).C("moov",R).C("trak",R).C("mdia",R).C("minf",R).C("stbl",R).da("stsd",$c).C("stpp",function(){b=!0}).parse(a);if(!b)throw new t(2,2,2007);};We.prototype.parseMedia=function(a,b){var c=!1,d=[];(new Q).C("mdat",ad(function(a){c=!0;d=this.a.parseMedia(a.buffer,b)}.bind(this))).parse(a);if(!c)throw new t(2,2,2007);return d};tb('application/mp4; codecs="stpp"',We);function Xe(){}Xe.prototype.parseInit=function(){};
217
+ Xe.prototype.parseMedia=function(a,b){var c=F(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 t(2,2,2E3);var d=b.segmentStart;if(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=Ye(new Zd(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]))var l=
218
+ null;else{l=null;0>g[0].indexOf("--\x3e")&&(l=g[0],g.splice(0,1));var n=new Zd(g[0]),q=Ye(n),r=$d(n,/[ \t]+--\x3e[ \t]+/g),v=Ye(n);if(null==q||!r||null==v)throw new t(2,2,2001);if(g=vb(q+h,v+h,g.slice(1).join("\n").trim())){$d(n,/[ \t]+/gm);for(h=ae(n);h;)Ze(g,h),$d(n,/[ \t]+/gm),h=ae(n);null!=l&&(g.id=l);l=g}else l=null}l&&f.push(l)}return f};
219
+ function Ze(a,b){var c;if(c=/^align:(start|middle|center|end|left|right)$/.exec(b))a.align=c[1],"center"==c[1]&&"center"!=a.align&&(a.position="auto",a.align="middle");else if(c=/^vertical:(lr|rl)$/.exec(b))a.vertical=c[1];else if(c=/^size:(\d{1,2}|100)%$/.exec(b))a.size=Number(c[1]);else if(c=/^position:(\d{1,2}|100)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(c[1]),c[2]&&(a.positionAlign=c[2]);else if(c=/^line:(\d{1,2}|100)%(?:,(start|end|center))?$/.exec(b))a.snapToLines=
220
+ !1,a.line=Number(c[1]),c[2]&&(a.lineAlign=c[2]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.snapToLines=!0,a.line=Number(c[1]),c[2]&&(a.lineAlign=c[2])}function Ye(a){a=$d(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(!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)}tb("text/vtt",Xe);tb('text/vtt; codecs="vtt"',Xe);function $e(){this.a=null}$e.prototype.parseInit=function(a){var b=!1;(new Q).C("moov",R).C("trak",R).C("mdia",R).da("mdhd",function(a){0==a.version?(a.s.I(4),a.s.I(4),this.a=a.s.D(),a.s.I(4)):(a.s.I(8),a.s.I(8),this.a=a.s.D(),a.s.I(8));a.s.I(4)}.bind(this)).C("minf",R).C("stbl",R).da("stsd",$c).C("wvtt",function(){b=!0}).parse(a);if(!this.a)throw new t(2,2,2008);if(!b)throw new t(2,2,2008);};
221
+ $e.prototype.parseMedia=function(a,b){var c=0,d=[],e=[],f=[],g=!1,h=!1,l=!1;(new Q).C("moof",R).C("traf",R).da("tfdt",function(a){g=!0;c=a.version?a.s.Pa():a.s.D()}).da("trun",function(a){h=!0;var b=a.version,c=a.Lc;a=a.s;var e=a.D();c&1&&a.I(4);c&4&&a.I(4);for(var f=[],g=0;g<e;g++){var l={duration:null,Lb:null};c&256&&(l.duration=a.D());c&512&&a.I(4);c&1024&&a.I(4);c&2048&&(l.Lb=b?a.lc():a.D());f.push(l)}d=f}).C("vtte",function(){e.push(null)}).C("vttc",ad(function(a){e.push(a.buffer)})).C("mdat",
222
+ function(a){l=!0;R(a)}).parse(a);if(!l&&!g&&!h)throw new t(2,2,2008);for(var n=c,q=0;q<d.length;q++){var r=d[q],v=e[q];if(r.duration){var u=r.Lb?c+r.Lb:n,n=u+r.duration;v&&f.push(af(v,b.periodStart+u/this.a,b.periodStart+n/this.a))}}return f};function af(a,b,c){var d,e,f;(new Q).C("payl",ad(function(a){d=F(a)})).C("iden",ad(function(a){e=F(a)})).C("sttg",ad(function(a){f=F(a)})).parse(a);return d?bf(d,e,f,b,c):null}
223
+ function bf(a,b,c,d,e){(a=vb(d,e,a))&&b&&(a.id=b);if(a&&c)for(b=new Zd(c),c=ae(b);c;)Ze(a,c),$d(b,/[ \t]+/gm),c=ae(b);return a}tb('application/mp4; codecs="wvtt"',$e);function cf(a,b,c,d,e,f){this.a=a;this.c=b;this.l=c;this.A=d;this.J=e;this.G=f;this.b=new D;this.h=!1;this.g=1;this.j=this.f=null;this.B=a.readyState;this.i=!1;this.P=this.v=-1;this.o=!1;0<a.readyState?this.dc():Ka(this.b,a,"loadedmetadata",this.dc.bind(this));b=this.fc.bind(this);E(this.b,a,"ratechange",this.pd.bind(this));E(this.b,a,"waiting",b);this.j=setInterval(b,250)}k=cf.prototype;
224
+ k.m=function(){var a=this.b.m();this.b=null;null!=this.f&&(window.clearInterval(this.f),this.f=null);null!=this.j&&(window.clearInterval(this.j),this.j=null);this.G=this.J=this.l=this.c=this.a=null;return a};function df(a,b){0<a.a.readyState?a.a.currentTime=ef(a,b):a.A=b}function ff(a){return 0<a.a.readyState?ef(a,a.a.currentTime):gf(a)}function gf(a){if(a.A)return ef(a,a.A);a=a.c.presentationTimeline;return Infinity>a.Y()?a.ma():a.bb()}k.pb=function(){return this.g};
225
+ function hf(a,b){null!=a.f&&(window.clearInterval(a.f),a.f=null);a.g=b;a.a.playbackRate=a.h||0>b?0:b;!a.h&&0>b&&(a.f=window.setInterval(function(){this.a.currentTime+=b/4}.bind(a),250))}k.yb=function(){this.o=!0;this.fc()};k.pd=function(){this.a.playbackRate!=(this.h||0>this.g?0:this.g)&&hf(this,this.a.playbackRate)};
226
+ k.dc=function(){var a=gf(this);.001>Math.abs(this.a.currentTime-a)?(E(this.b,this.a,"seeking",this.gc.bind(this)),E(this.b,this.a,"playing",this.ec.bind(this))):(Ka(this.b,this.a,"seeking",this.rd.bind(this)),this.a.currentTime=a)};k.rd=function(){E(this.b,this.a,"seeking",this.gc.bind(this));E(this.b,this.a,"playing",this.ec.bind(this))};
227
+ k.fc=function(){if(this.a.readyState){this.a.readyState!=this.B&&(this.i=!1,this.B=this.a.readyState);var a=this.l.smallGapLimit,b=this.a.currentTime,c=this.a.buffered;a:{if(c&&c.length&&!(1==c.length&&1E-6>c.end(0)-c.start(0))){var d=.1;/(Edge|Trident)\//.test(navigator.userAgent)&&(d=.5);for(var e=0;e<c.length;e++)if(c.start(e)>b&&(!e||c.end(e-1)-b<=d)){d=e;break a}}d=null}if(null==d){if(3>this.a.readyState&&0<this.a.playbackRate)if(this.P!=b)this.P=b,this.v=Date.now();else if(this.v<Date.now()-
228
+ 1E3)for(this.v=Date.now()+5E3,d=0;d<c.length;d++)if(b>=c.start(d)&&b<c.end(d)-.5){this.a.currentTime=this.a.currentTime;break}}else if(d||this.o)if(e=c.start(d),!(e>=this.c.presentationTimeline.bb())){var f=e-b,a=f<=a,g=!1;a||this.i||(this.i=!0,f=new H("largegap",{currentTime:b,gapSize:f}),f.cancelable=!0,this.G(f),this.l.jumpLargeGaps&&!f.defaultPrevented&&(g=!0));if(a||g)d&&c.end(d-1),jf(this,b,e)}}};
229
+ k.gc=function(){this.o=!1;var a=this.a.currentTime,b=kf(this,a);.001<Math.abs(b-a)?jf(this,a,b):(this.i=!1,this.J())};k.ec=function(){var a=this.a.currentTime,b=kf(this,a);.001<Math.abs(b-a)&&jf(this,a,b)};function kf(a,b){var c=zb.bind(null,a.a.buffered),d=1*Math.max(a.c.minBufferTime||0,a.l.rebufferingGoal),e=a.c.presentationTimeline,f=e.ua(),g=e.Da(d),h=e.Da(5),d=e.Da(d+5);return b>f?f:b<e.Da(0)?c(h)?h:d:b>=g||c(b)?b:d}
230
+ function jf(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)}function ef(a,b){var c=a.c.presentationTimeline.ma();if(b<c)return c;c=a.c.presentationTimeline.ua();return b>c?c:b};function lf(a,b,c,d,e,f){this.a=a;this.g=b;this.A=c;this.l=d;this.h=e;this.B=f;this.c=[];this.j=new D;this.b=!1;this.i=-1;this.f=null;mf(this)}lf.prototype.m=function(){var a=this.j?this.j.m():Promise.resolve();this.j=null;nf(this);this.B=this.h=this.l=this.A=this.g=this.a=null;this.c=[];return a};
231
+ lf.prototype.v=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 H("timelineregionadded",{detail:of(a)});this.h(c);this.o(!0,b)}};function of(a){var b=Da(a);b.eventElement=a.eventElement;return b}
232
+ lf.prototype.o=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 H("timelineregionenter",{detail:of(b.info)})),e||this.h(new H("timelineregionexit",{detail:of(b.info)}));b.status=c}};function mf(a){nf(a);a.f=window.setTimeout(a.G.bind(a),250)}function nf(a){a.f&&(window.clearTimeout(a.f),a.f=null)}
233
+ lf.prototype.G=function(){this.f=null;mf(this);var a=fc(this.g,this.a.currentTime);a!=this.i&&(-1!=this.i&&this.B(),this.i=a);var a=Ab(this.a.buffered,this.a.currentTime),b=yb(this.a.buffered)>=this.g.presentationTimeline.ua()-.1||this.a.ended;if(this.b){var c=1*Math.max(this.g.minBufferTime||0,this.A.rebufferingGoal);(b||a>=c)&&0!=this.b&&(this.b=!1,this.l(!1))}else!b&&.5>a&&1!=this.b&&(this.b=!0,this.l(!0));this.c.forEach(this.o.bind(this,!1))};function pf(a,b){this.a=b;this.b=a;this.g=null;this.i=1;this.o=Promise.resolve();this.h=[];this.j={};this.c={};this.f=this.l=this.v=!1}k=pf.prototype;k.m=function(){for(var a in this.c)qf(this.c[a]);this.g=this.c=this.j=this.h=this.o=this.b=this.a=null;this.f=!0;return Promise.resolve()};k.configure=function(a){this.g=a};k.init=function(){var a=this.a.$b(this.b.periods[fc(this.b,ff(this.a.Oa))]);return La(a)?Promise.reject(new t(2,5,5005)):rf(this,a).then(function(){this.a&&this.a.gd&&this.a.gd()}.bind(this))};
234
+ function V(a){return a.b.periods[fc(a.b,ff(a.a.Oa))]}function sf(a){return Na(a.c,function(a){return a.na||a.stream})}function tf(a,b){var c={};c.text=b;return rf(a,c)}function uf(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.na;f||(vf(a,"video",e,!1),c.na=d)}}else if(f=c.na)c.na=null,vf(a,"video",f,!0)}}
235
+ function vf(a,b,c,d){var e=a.c[b];!e&&"text"==b&&a.g.ignoreTextStreamFailures?tf(a,c):e&&(e.na&&(c.trickModeVideo?(e.na=c,c=c.trickModeVideo):e.na=null),"text"==b&&Db(a.a.K,Wb(c.mimeType,c.codecs)),(b=a.h[gc(a.b,c)])&&b.Ka&&(b=a.j[c.id])&&b.Ka&&e.stream!=c&&(e.stream=c,e.cb=!0,d&&(e.sa?e.kb=!0:e.wa?(e.ra=!0,e.kb=!0):(qf(e),wf(a,e,!0)))))}
236
+ function xf(a){var b=ff(a.a.Oa);if(!Object.keys(a.c).every(function(a){var c=this.a.K;"text"==a?(a=c.a,a=b>=a.b&&b<a.a):(a=Fb(c,a),a=zb(a,b));return a}.bind(a)))for(var c in a.c){var d=a.c[c];d.sa||d.ra||(d.wa?d.ra=!0:null==Eb(a.a.K,c)?null==d.qa&&yf(a,d,0):(qf(d),wf(a,d,!1)))}}
237
+ function rf(a,b,c){var d=fc(a.b,ff(a.a.Oa)),e=Na(b,function(a){return Wb(a.mimeType,a.codecs)});a.a.K.init(e);zf(a);e=Ma(b);return Af(a,e).then(function(){if(!this.f)for(var a in b){var e=b[a];this.c[a]||(this.c[a]={stream:e,type:a,Ea:null,ea:null,na:null,cb:!0,Ma:d,endOfStream:!1,wa:!1,qa:null,ra:!1,kb:!1,sa:!1,Eb:!1,rb:!1,pc:c||0},yf(this,this.c[a],0))}}.bind(a))}
238
+ function Bf(a,b){var c=a.h[b];if(c)return c.L;c={L:new A,Ka:!1};a.h[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(x,[]).filter(Aa);d.push.apply(d,a.b.periods[b].textStreams);a.o=a.o.then(function(){if(!this.f)return Af(this,d)}.bind(a)).then(function(){this.f||(this.h[b].L.resolve(),this.h[b].Ka=!0)}.bind(a))["catch"](function(a){this.f||(this.h[b].L.reject(),
239
+ delete this.h[b],this.a.onError(a))}.bind(a));return c.L}
240
+ function Af(a,b){b.map(function(a){return a.id}).filter(Aa);for(var c=[],d=0;d<b.length;++d){var e=b[d];var f=a.j[e.id];f?c.push(f.L):(a.j[e.id]={L:new A,Ka:!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.Ka||(c.L.resolve(),c.Ka=!0)}}.bind(a))["catch"](function(a){if(!this.f)return this.j[e.id].L.reject(),delete this.j[e.id],Promise.reject(a)}.bind(a))}
241
+ function zf(a){var b=a.b.presentationTimeline.Y();Infinity>b?a.a.K.pa(b):a.a.K.pa(Math.pow(2,32))}k.ie=function(a){if(!this.f&&!a.wa&&null!=a.qa&&!a.sa)if(a.qa=null,a.ra)wf(this,a,a.kb);else{try{var b=Cf(this,a);null!=b&&(yf(this,a,b),a.rb=!1)}catch(c){this.a.onError(c);return}b=Ma(this.c);Df(this,a);b.every(function(a){return a.endOfStream})&&this.a.K.endOfStream().then(function(){this.b.presentationTimeline.pa(this.a.K.Y())}.bind(this))}};
242
+ function Cf(a,b){var c=ff(a.a.Oa),d=b.Ea&&b.ea?a.b.periods[gc(a.b,b.Ea)].startTime+b.ea.endTime:Math.max(c,b.pc);b.pc=0;var e=gc(a.b,b.stream),f=fc(a.b,d);var g=a.a.K;var h=b.type;"text"==h?(g=g.a,g=null==g.a||g.a<c?0:g.a-Math.max(c,g.b)):(g=Fb(g,h),g=Ab(g,c));h=Math.max(a.i*Math.max(a.b.minBufferTime||0,a.g.rebufferingGoal),a.i*a.g.bufferingGoal);if(d>=a.b.presentationTimeline.Y())return b.endOfStream=!0,null;b.endOfStream=!1;b.Ma=f;if(f!=e)return null;if(g>=h)return.5;d=a.a.K;f=b.type;d="text"==
243
+ f?d.a.a:yb(Fb(d,f));b.ea&&b.stream==b.Ea?(f=b.ea.position+1,d=Ef(a,b,e,f)):(f=b.ea?b.stream.findSegmentPosition(Math.max(0,a.b.periods[gc(a.b,b.Ea)].startTime+b.ea.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=Ef(a,b,e,Math.max(0,f-1))),d=g||Ef(a,b,e,f)));if(!d)return 1;Ff(a,b,c,e,d);return null}
244
+ function Ef(a,b,c,d){c=a.b.periods[c];b=b.stream.getSegmentReference(d);if(!b)return null;a=a.b.presentationTimeline;d=a.ua();return c.startTime+b.endTime<a.ma()||c.startTime+b.startTime>d?null:b}
245
+ function Ff(a,b,c,d,e){var f=a.b.periods[d],g=b.stream,h=a.b.periods[d+1],l=null,l=h?h.startTime:a.b.presentationTimeline.Y();d=Gf(a,b,d,l);b.wa=!0;b.cb=!1;h=Hf(a,e);Promise.all([d,h]).then(function(a){if(!this.f&&!this.l)return If(this,b,c,f,g,e,a[1])}.bind(a)).then(function(){this.f||this.l||(b.wa=!1,b.Eb=!1,b.ra||this.a.yb(),yf(this,b,0),Jf(this,g))}.bind(a))["catch"](function(a){this.f||this.l||(b.wa=!1,this.b.presentationTimeline.$()&&this.g.infiniteRetriesForLiveStreams&&(1001==a.code||1002==
246
+ a.code||1003==a.code)?"text"==b.type&&this.g.ignoreTextStreamFailures&&1001==a.code?delete this.c.text:(a.severity=1,this.a.onError(a),yf(this,b,4)):3017==a.code?Kf(this,b,a):"text"==b.type&&this.g.ignoreTextStreamFailures?delete this.c.text:(b.rb=!0,a.severity=2,this.a.onError(a)))}.bind(a))}function Kf(a,b,c){if(!Ma(a.c).some(function(a){return a!=b&&a.Eb})){var d=Math.round(100*a.i);if(20<d)a.i-=.2;else if(4<d)a.i-=.04;else{b.rb=!0;a.l=!0;a.a.onError(c);return}b.Eb=!0}yf(a,b,4)}
247
+ function Gf(a,b,c,d){if(!b.cb)return Promise.resolve();c=Kb(a.a.K,b.type,a.b.periods[c].startTime-b.stream.presentationTimeOffset,d);if(!b.stream.initSegmentReference)return c;a=Hf(a,b.stream.initSegmentReference).then(function(a){if(!this.f)return Gb(this.a.K,b.type,a,null,null)}.bind(a))["catch"](function(a){b.cb=!0;return Promise.reject(a)});return Promise.all([c,a])}
248
+ function If(a,b,c,d,e,f,g){e.containsEmsgBoxes&&(new Q).da("emsg",a.Cd.bind(a,d,f)).parse(g);return Lf(a,b,c).then(function(){if(!this.f)return Gb(this.a.K,b.type,g,f.startTime+d.startTime,f.endTime+d.startTime)}.bind(a)).then(function(){if(!this.f)return b.Ea=e,b.ea=f,Promise.resolve()}.bind(a))}
249
+ k.Cd=function(a,b,c){var d=c.s.Bb(),e=c.s.Bb(),f=c.s.D(),g=c.s.D(),h=c.s.D(),l=c.s.D();c=c.s.Ja(c.s.H.byteLength-c.s.u);a=a.startTime+b.startTime+g/f;if("urn:mpeg:dash:event:2012"==d)this.a.hd();else this.a.onEvent(new H("emsg",{detail:{startTime:a,endTime:a+h/f,schemeIdUri:d,value:e,timescale:f,presentationTimeDelta:g,eventDuration:h,id:l,messageData:c}}))};
250
+ function Lf(a,b,c){var d=Eb(a.a.K,b.type);if(null==d)return Promise.resolve();c=c-d-a.g.bufferBehind;return 0>=c?Promise.resolve():a.a.K.remove(b.type,d,d+c).then(function(){}.bind(a))}function Jf(a,b){if(!a.v&&(a.v=Ma(a.c).every(function(a){return"text"==a.type?!0:!a.ra&&!a.sa&&a.ea}),a.v)){var c=gc(a.b,b);a.h[c]||Bf(a,c).then(function(){this.a.Zb()}.bind(a))["catch"](y);for(c=0;c<a.b.periods.length;++c)Bf(a,c)["catch"](y);a.a.ud&&a.a.ud()}}
251
+ function Df(a,b){if(b.Ma!=gc(a.b,b.stream)){var c=b.Ma,d=Ma(a.c);d.every(function(a){return a.Ma==c})&&d.every(Mf)&&Bf(a,c).then(function(){if(!this.f&&d.every(function(a){var b=gc(this.b,a.stream);return Mf(a)&&a.Ma==c&&b!=c}.bind(this))){var a=this.b.periods[c],b=this.a.$b(a),g;for(g in this.c)if(!b[g]&&"text"!=g){this.a.onError(new t(2,5,5005));return}for(g in b)if(!this.c[g])if("text"==g)rf(this,{text:b.text},a.startTime),delete b[g];else{this.a.onError(new t(2,5,5005));return}for(g in this.c)(a=
252
+ b[g])?(vf(this,g,a,!1),yf(this,this.c[g],0)):delete this.c[g];this.a.Zb()}}.bind(a))["catch"](y)}}function Mf(a){return!a.wa&&null==a.qa&&!a.ra&&!a.sa}function Hf(a,b){var c=C(b.a(),a.g.retryParameters);if(b.X||null!=b.M){var d="bytes="+b.X+"-";null!=b.M&&(d+=b.M);c.headers.Range=d}return a.a.bd.request(1,c).then(function(a){return a.data})}
253
+ function wf(a,b,c){b.ra=!1;b.kb=!1;b.sa=!0;Jb(a.a.K,b.type).then(function(){if(!this.f&&c){var a=this.a.K,e=b.type;return"text"==e?Promise.resolve():Ib(a,e,a.Mc.bind(a,e))}}.bind(a)).then(function(){this.f||(b.Ea=null,b.ea=null,b.sa=!1,b.endOfStream=!1,yf(this,b,0))}.bind(a))}function yf(a,b,c){b.qa=window.setTimeout(a.ie.bind(a,b),1E3*c)}function qf(a){null!=a.qa&&(window.clearTimeout(a.qa),a.qa=null)};function Nf(a,b){return new Promise(function(c,d){var e=new XMLHttpRequest;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().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"]});
254
+ else{var f=null;try{f=Ra(b.response)}catch(n){}d(new t(401==b.status||403==b.status?2:1,1,1001,a,b.status,f,e))}};e.onerror=function(){d(new t(1,1,1002,a))};e.ontimeout=function(){d(new t(1,1,1003,a))};for(var f in b.headers)e.setRequestHeader(f,b.headers[f]);e.send(b.body)})}m("shaka.net.HttpPlugin",Nf);Ea.http=Nf;Ea.https=Nf;function Of(){this.a=null;this.b=[];this.c={}}k=Of.prototype;k.init=function(a,b){return Pf(this,a,b).then(function(){var b=Object.keys(a);return Promise.all(b.map(function(a){return Qf(this,a).then(function(b){this.c[a]=b}.bind(this))}.bind(this)))}.bind(this))};k.m=function(){return Promise.all(this.b.map(function(a){try{a.transaction.abort()}catch(b){}return a.L["catch"](y)})).then(function(){this.a&&(this.a.close(),this.a=null)}.bind(this))};
255
+ k.get=function(a,b){var c;return Rf(this,a,"readonly",function(a){c=a.get(b)}).then(function(){return c.result})};k.forEach=function(a,b){return Rf(this,a,"readonly",function(a){a.openCursor().onsuccess=function(a){if(a=a.target.result)b(a.value),a["continue"]()}})};function Sf(a,b,c){return Rf(a,b,"readwrite",function(a){a.put(c)})}k.remove=function(a,b){return Rf(this,a,"readwrite",function(a){a["delete"](b)})};
256
+ function Tf(a,b,c){return Rf(a,"segment","readwrite",function(a){for(var d=0;d<b.length;d++)a["delete"](b[d]).onsuccess=c||function(){}})}function Qf(a,b){var c=0;return Rf(a,b,"readonly",function(a){a.openCursor(null,"prev").onsuccess=function(a){(a=a.target.result)&&(c=a.key+1)}}).then(function(){return c})}
257
+ function Rf(a,b,c,d){var e={transaction:a.a.transaction([b],c),L:new A};e.transaction.oncomplete=function(){this.b.splice(this.b.indexOf(e),1);e.L.resolve()}.bind(a);e.transaction.onabort=function(a){this.b.splice(this.b.indexOf(e),1);Uf(e.transaction,e.L,a)}.bind(a);e.transaction.onerror=function(a){a.preventDefault()}.bind(a);b=e.transaction.objectStore(b);d(b);a.b.push(e);return e.L}
258
+ function Pf(a,b,c){var d=window.indexedDB.open("shaka_offline_db",1),e=!1,f=new A;d.onupgradeneeded=function(a){e=!0;a=a.target.result;for(var c in b)a.createObjectStore(c,{keyPath:b[c]})};d.onsuccess=function(a){c&&!e?(a.target.result.close(),setTimeout(function(){Pf(this,b,c-1).then(f.resolve,f.reject)}.bind(this),1E3)):(this.a=a.target.result,f.resolve())}.bind(a);d.onerror=Uf.bind(null,d,f);return f}
259
+ function Uf(a,b,c){a.error?b.reject(new t(2,9,9001,a.error)):b.reject(new t(2,9,9002));c.preventDefault()};var Vf={manifest:"key",segment:"key"};function Wf(a){var b=Xf(a.periods[0],[],new T(null,0)),c=Xb(b,null,null),b=Zb(b,null);c.push.apply(c,b);return{offlineUri:"offline:"+a.key,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:void 0==a.expiration?Infinity:a.expiration,tracks:c,appMetadata:a.appMetadata}}
260
+ function Xf(a,b,c){var d=a.streams.filter(function(a){return"text"==a.contentType}),e=a.streams.filter(function(a){return"audio"==a.contentType}),f=a.streams.filter(function(a){return"video"==a.contentType});b=Yf(e,f,b);d=d.map(Zf);a.streams.forEach(function(a){a=$f(a);c.Ga(0,a)});return{startTime:a.startTime,variants:b,textStreams:d}}function $f(a){return a.segments.map(function(a,c){return new O(c,a.startTime,a.endTime,function(){return[a.uri]},0,null)})}
261
+ function Yf(a,b,c){var d=[];if(!a.length&&!b.length)return d;a.length?b.length||(b=[null]):a=[null];for(var e=0,f=0;f<a.length;f++)for(var g=0;g<b.length;g++)if(ag(a[f],b[g])){var h=a[f];var l=b[g],n=c;h={id:e++,language:h?h.language:"",primary:!!h&&h.primary||!!l&&l.primary,audio:Zf(h),video:Zf(l),bandwidth:0,drmInfos:n,allowedByApplication:!0,allowedByKeySystem:!0};d.push(h)}return d}
262
+ function ag(a,b){if(!(a&&b&&a.variantIds&&b.variantIds))return!0;for(var c=0;c<a.variantIds.length;c++)if(b.variantIds.some(function(b){return b==a.variantIds[c]}))return!0;return!1}
263
+ function Zf(a){if(!a)return null;var b=$f(a),b=new S(b);return{id:a.id,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:b.find.bind(b),getSegmentReference:b.get.bind(b),initSegmentReference:a.initSegmentUri?new Wc(function(){return[a.initSegmentUri]},0,null):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,
264
+ type:a.contentType,primary:a.primary,trickModeVideo:null,containsEmsgBoxes:!1}}function bg(){return window.indexedDB?new Of:null};function cg(a,b,c,d){this.b={};this.l=[];this.o=d;this.j=a;this.v=b;this.A=c;this.i=this.a=null;this.f=this.g=this.h=this.c=0}cg.prototype.m=function(){var a=this.j,b=this.l,c=this.i||Promise.resolve(),c=c.then(function(){return Tf(a,b)});this.b={};this.l=[];this.i=this.a=this.A=this.v=this.j=this.o=null;return c};function dg(a,b,c,d,e){a.b[b]=a.b[b]||[];a.b[b].push({uris:c.a(),X:c.X,M:c.M,Pb:d,Fb:e})}
265
+ function eg(a,b){a.c=0;a.h=0;a.g=0;a.f=0;Ma(a.b).forEach(function(a){a.forEach(function(a){null!=a.M?this.c+=a.M-a.X+1:this.g+=a.Pb}.bind(this))}.bind(a));a.a=b;a.a.size=a.c;var c=Ma(a.b).map(function(a){var b=0,c=function(){if(!this.o)return Promise.reject(new t(2,9,9002));if(b>=a.length)return Promise.resolve();var d=a[b++];return fg(this,d).then(c)}.bind(this);return c()}.bind(a));a.b={};a.i=Promise.all(c).then(function(){return Sf(this.j,"manifest",b)}.bind(a)).then(function(){this.l=[]}.bind(a));
266
+ return a.i}
267
+ function fg(a,b){var c=C(b.uris,a.A);if(b.X||null!=b.M)c.headers.Range="bytes="+b.X+"-"+(null==b.M?"":b.M);var d;return a.v.request(1,c).then(function(a){if(!this.a)return Promise.reject(new t(2,9,9002));d=a.data.byteLength;this.l.push(b.Fb.key);b.Fb.data=a.data;return Sf(this.j,"segment",b.Fb)}.bind(a)).then(function(){if(!this.a)return Promise.reject(new t(2,9,9002));null==b.M?(this.a.size+=d,this.f+=b.Pb):this.h+=d;var a=(this.h+this.f)/(this.c+this.g),c=Wf(this.a);this.o.progressCallback(c,a)}.bind(a))}
268
+ ;function gg(){this.a=-1}k=gg.prototype;k.configure=function(){};k.start=function(a){var b=/^offline:([0-9]+)$/.exec(a);if(!b)return Promise.reject(new t(2,1,9004,a));var c=Number(b[1]),d=bg();this.a=c;return d?d.init(Vf).then(function(){return d.get("manifest",c)}).then(function(a){if(!a)throw new t(2,9,9003,c);return hg(a)}).then(function(a){return d.m().then(function(){return a})},function(a){return d.m().then(function(){throw a;})}):Promise.reject(new t(2,9,9E3))};k.stop=function(){return Promise.resolve()};
269
+ k.update=function(){};k.onExpirationUpdated=function(a,b){var c=bg();c.init(Vf).then(function(){return c.get("manifest",this.a)}.bind(this)).then(function(d){if(d&&!(0>d.sessionIds.indexOf(a))&&(void 0==d.expiration||d.expiration>b))return d.expiration=b,Sf(c,"manifest",d)})["catch"](function(){}).then(function(){return c.m()})};
270
+ function hg(a){var b=new T(null,0);b.pa(a.duration);var c=a.drmInfo?[a.drmInfo]:[];return{presentationTimeline:b,minBufferTime:10,offlineSessionIds:a.sessionIds,periods:a.periods.map(function(a){return Xf(a,c,b)})}}Ad["application/x-offline-manifest"]=gg;function ig(a){if(/^offline:([0-9]+)$/.exec(a)){var b={uri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Promise.resolve(b)}if(b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a)){var c=Number(b[1]),d=bg();return d?d.init(Vf).then(function(){return d.get("segment",c)}).then(function(b){return d.m().then(function(){if(!b)throw new t(2,9,9003,c);return{uri:a,data:b.data,headers:{}}})}):Promise.reject(new t(2,9,9E3))}return Promise.reject(new t(2,1,9004,a))}
271
+ m("shaka.offline.OfflineScheme",ig);Ea.offline=ig;function jg(){this.a=Promise.resolve();this.c=this.b=this.f=!1;this.g=new Promise(function(a){this.h=a}.bind(this))}jg.prototype.then=function(a){this.a=this.a.then(a).then(function(a){return this.c?(this.h(),Promise.reject(this.i)):Promise.resolve(a)}.bind(this));return this};function kg(a){a.f||(a.a=a.a.then(function(a){this.b=!0;return Promise.resolve(a)}.bind(a),function(a){this.b=!0;return Promise.reject(a)}.bind(a)));a.f=!0;return a.a}
272
+ jg.prototype.cancel=function(a){if(this.b)return Promise.resolve();this.c=!0;this.i=a;return this.g};function W(a,b){p.call(this);this.J=!1;this.f=a;this.A=null;this.l=new D;this.Ob=new G;this.Ya=this.c=this.h=this.a=this.v=this.g=this.Wa=this.ja=this.N=this.j=this.o=null;this.Bc=1E9;this.Va=[];this.ka=!1;this.Za=!0;this.la=this.G=null;this.B={};this.Xa=[];this.P={};this.b=lg(this);this.mb={width:Infinity,height:Infinity};this.i=mg();this.Ua=0;this.ia=this.b.preferredAudioLanguage;this.Ba=this.b.preferredTextLanguage;b&&b(this);this.o=new B(this.be.bind(this));this.Wa=ng(this);for(var c=0;c<this.f.textTracks.length;++c){var d=
273
+ this.f.textTracks[c];d.mode="disabled";"Shaka Player TextTrack"==d.label&&(this.A=d)}this.A||(this.A=this.f.addTextTrack("subtitles","Shaka Player TextTrack"));this.A.mode="hidden";E(this.l,this.f,"error",this.wd.bind(this))}ba(W);m("shaka.Player",W);
274
+ W.prototype.m=function(){this.J=!0;var a=Promise.resolve();this.G&&(a=this.G.cancel(new t(2,7,7E3)));return a.then(function(){var a=Promise.all([this.la,og(this),this.l?this.l.m():null,this.o?this.o.m():null]);this.b=this.o=this.Ob=this.l=this.A=this.f=null;return a}.bind(this))};W.prototype.destroy=W.prototype.m;W.version="v2.1.2-1-g19f8600";var pg={};W.registerSupportPlugin=function(a,b){pg[a]=b};
275
+ W.isBrowserSupported=function(){return!!window.Promise&&!!window.Uint8Array&&!!Array.prototype.forEach&&!!window.MediaSource&&!!window.MediaSource.isTypeSupported&&!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration};W.probeSupport=function(){return ob().then(function(a){var b=Cd(),c=Cb();a={manifest:b,media:c,drm:a};for(var d in pg)a[d]=pg[d]();return a})};
276
+ W.prototype.load=function(a,b,c){var d=this.hb(),e=new jg;this.G=e;this.dispatchEvent(new H("loading"));var f=Date.now();return kg(e.then(function(){return d}).then(function(){this.i=mg();E(this.l,this.f,"playing",this.Sa.bind(this));E(this.l,this.f,"pause",this.Sa.bind(this));E(this.l,this.f,"ended",this.Sa.bind(this));return Dd(a,this.o,this.b.manifest.retryParameters,c)}.bind(this)).then(function(b){this.h=new b;this.h.configure(this.b.manifest);b={networkingEngine:this.o,filterPeriod:this.fb.bind(this),
277
+ onTimelineRegionAdded:this.vd.bind(this),onEvent:this.gb.bind(this),onError:this.xa.bind(this)};return 2<this.h.start.length?this.h.start(a,this.o,b.filterPeriod,b.onError,b.onEvent):this.h.start(a,b)}.bind(this)).then(function(b){if(0==b.periods.length)throw new t(2,4,4014);this.c=b;this.Ya=a;this.j=new $a(this.o,this.xa.bind(this),this.$d.bind(this),this.Zd.bind(this));this.j.configure(this.b.drm);return this.j.init(b,!1)}.bind(this)).then(function(){this.c.periods.forEach(this.fb.bind(this));this.Ua=
278
+ Date.now()/1E3;this.ia=this.b.preferredAudioLanguage;this.Ba=this.b.preferredTextLanguage;return Promise.all([cb(this.j,this.f),this.Wa])}.bind(this)).then(function(){this.b.abr.manager.init(this.Jb.bind(this));this.g=new cf(this.f,this.c,this.b.streaming,b||null,this.ae.bind(this),this.gb.bind(this));this.v=new lf(this.f,this.c,this.b.streaming,this.xc.bind(this),this.gb.bind(this),this.Yd.bind(this));this.ja=new Bb(this.f,this.N,this.A);this.a=new pf(this.c,{Oa:this.g,K:this.ja,bd:this.o,$b:this.cd.bind(this),
279
+ Zb:this.Ec.bind(this),onError:this.xa.bind(this),onEvent:this.gb.bind(this),hd:this.jd.bind(this),yb:this.sd.bind(this)});this.a.configure(this.b.streaming);return this.a.init()}.bind(this)).then(function(){if(this.b.streaming.startAtSegmentBoundary){var a=qg(this,ff(this.g));df(this.g,a)}this.c.periods.forEach(this.fb.bind(this));rg(this);sg(this);var a=V(this.a),b=bc(a,this.ia);this.b.abr.manager.setVariants(b);a.variants.some(function(a){return a.primary});this.Xa.forEach(this.v.v.bind(this.v));
280
+ this.Xa=[];Ka(this.l,this.f,"loadeddata",function(){this.i.loadLatency=(Date.now()-f)/1E3}.bind(this));this.G=null}.bind(this)))["catch"](function(a){this.G==e&&(this.G=null,this.dispatchEvent(new H("unloading")));return Promise.reject(a)}.bind(this))};W.prototype.load=W.prototype.load;function ng(a){a.N=new MediaSource;var b=new A;E(a.l,a.N,"sourceopen",b.resolve);a.f.src=window.URL.createObjectURL(a.N);return b}
281
+ W.prototype.configure=function(a){a.abr&&a.abr.manager&&a.abr.manager!=this.b.abr.manager&&(this.b.abr.manager.stop(),a.abr.manager.init(this.Jb.bind(this)));Ca(this.b,a,lg(this),tg(),"");ug(this)};W.prototype.configure=W.prototype.configure;
282
+ function ug(a){a.h&&a.h.configure(a.b.manifest);a.j&&a.j.configure(a.b.drm);if(a.a){a.a.configure(a.b.streaming);try{a.c.periods.forEach(a.fb.bind(a))}catch(b){a.xa(b)}vg(a,V(a.a))}a.b.abr.enabled&&!a.Za?a.b.abr.manager.enable():a.b.abr.manager.disable();a.b.abr.manager.setDefaultEstimate(a.b.abr.defaultBandwidthEstimate);a.b.abr.manager.setRestrictions(a.b.abr.restrictions)}W.prototype.getConfiguration=function(){var a=lg(this);Ca(a,this.b,lg(this),tg(),"");return a};
283
+ W.prototype.getConfiguration=W.prototype.getConfiguration;W.prototype.Pd=function(){var a=lg(this);a.abr&&a.abr.manager&&a.abr.manager!=this.b.abr.manager&&(this.b.abr.manager.stop(),a.abr.manager.init(this.Jb.bind(this)));this.b=lg(this);ug(this)};W.prototype.resetConfiguration=W.prototype.Pd;W.prototype.Qc=function(){return this.f};W.prototype.getMediaElement=W.prototype.Qc;W.prototype.Ub=function(){return this.o};W.prototype.getNetworkingEngine=W.prototype.Ub;W.prototype.Pc=function(){return this.Ya};
284
+ W.prototype.getManifestUri=W.prototype.Pc;W.prototype.$=function(){return this.c?this.c.presentationTimeline.$():!1};W.prototype.isLive=W.prototype.$;W.prototype.va=function(){return this.c?this.c.presentationTimeline.va():!1};W.prototype.isInProgress=W.prototype.va;W.prototype.Rd=function(){var a=0,b=0;this.c&&(b=this.c.presentationTimeline,a=b.ma(),b=b.bb());return{start:a,end:b}};W.prototype.seekRange=W.prototype.Rd;W.prototype.keySystem=function(){return this.j?this.j.keySystem():""};
285
+ W.prototype.keySystem=W.prototype.keySystem;W.prototype.drmInfo=function(){return this.j?this.j.b:null};W.prototype.drmInfo=W.prototype.drmInfo;W.prototype.ab=function(){return this.j?this.j.ab():Infinity};W.prototype.getExpiration=W.prototype.ab;W.prototype.Yc=function(){return this.ka};W.prototype.isBuffering=W.prototype.Yc;
286
+ W.prototype.hb=function(){if(this.J)return Promise.resolve();this.dispatchEvent(new H("unloading"));var a=Promise.resolve();this.G&&(a=this.G.cancel(new t(2,7,7E3)));return a.then(function(){this.la||(this.la=wg(this).then(function(){this.la=null}.bind(this)));return this.la}.bind(this))};W.prototype.unload=W.prototype.hb;W.prototype.pb=function(){return this.g?this.g.pb():0};W.prototype.getPlaybackRate=W.prototype.pb;W.prototype.le=function(a){this.g&&hf(this.g,a);this.a&&uf(this.a,1!=a)};
287
+ W.prototype.trickPlay=W.prototype.le;W.prototype.Fc=function(){this.g&&hf(this.g,1);this.a&&uf(this.a,!1)};W.prototype.cancelTrickPlay=W.prototype.Fc;W.prototype.getTracks=function(){return this.Wb().concat(this.Vb())};W.prototype.getTracks=W.prototype.getTracks;W.prototype.Ud=function(a,b){"text"==a.type?this.rc(a):(this.configure({abr:{enabled:!1}}),this.sc(a,b))};W.prototype.selectTrack=W.prototype.Ud;
288
+ W.prototype.Wb=function(){if(!this.c)return[];var a=fc(this.c,ff(this.g)),b=this.P[a]||{};return Xb(this.c.periods[a],b.audio,b.video)};W.prototype.getVariantTracks=W.prototype.Wb;W.prototype.Vb=function(){if(!this.c)return[];var a=fc(this.c,ff(this.g));return Zb(this.c.periods[a],(this.P[a]||{}).text).filter(function(a){return 0>this.Va.indexOf(a.id)}.bind(this))};W.prototype.getTextTracks=W.prototype.Vb;
289
+ W.prototype.rc=function(a){if(this.a&&(a=ac(V(this.a),a))){xg(this,a,!1);var b={};b.text=a;yg(this,b,!0)}};W.prototype.selectTextTrack=W.prototype.rc;
290
+ W.prototype.sc=function(a,b){if(this.a){var c={},d=$b(V(this.a),a),e=sf(this.a);if(d){if(!d.allowedByApplication||!d.allowedByKeySystem)return;d.audio&&(zg(this,d.audio),d.audio!=e.audio&&(c.audio=d.audio));d.video&&(zg(this,d.video),d.video!=e.video&&(c.video=d.video))}Ma(c).forEach(function(a){xg(this,a,!1)}.bind(this));(d=e.text)&&(c.text=d);yg(this,c,b)}};W.prototype.selectVariantTrack=W.prototype.sc;
291
+ W.prototype.Nc=function(){return this.a?Yb(V(this.a).variants).map(function(a){return a.language}).filter(Aa):[]};W.prototype.getAudioLanguages=W.prototype.Nc;W.prototype.Wc=function(){return this.a?V(this.a).textStreams.map(function(a){return a.language}).filter(Aa):[]};W.prototype.getTextLanguages=W.prototype.Wc;W.prototype.Sd=function(a){if(this.a){var b=V(this.a);this.ia=a;vg(this,b)}};W.prototype.selectAudioLanguage=W.prototype.Sd;
292
+ W.prototype.Td=function(a){if(this.a){var b=V(this.a);this.Ba=a;vg(this,b)}};W.prototype.selectTextLanguage=W.prototype.Td;W.prototype.$c=function(){return"showing"==this.A.mode};W.prototype.isTextTrackVisible=W.prototype.$c;W.prototype.Wd=function(a){this.A.mode=a?"showing":"hidden";Ag(this)};W.prototype.setTextTrackVisibility=W.prototype.Wd;W.prototype.Sc=function(){return this.c?new Date(1E3*this.c.presentationTimeline.f+1E3*this.f.currentTime):null};W.prototype.getPlayheadTimeAsDate=W.prototype.Sc;
293
+ W.prototype.getStats=function(){Bg(this);this.Sa();var a=null,b=null,c=this.f&&this.f.getVideoPlaybackQuality?this.f.getVideoPlaybackQuality():{};this.g&&this.c&&(a=fc(this.c,ff(this.g)),b=this.P[a],b=ec(b.audio,b.video,this.c.periods[a].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.b.abr.manager.getBandwidthEstimate(),
294
+ loadLatency:this.i.loadLatency,playTime:this.i.playTime,bufferingTime:this.i.bufferingTime,switchHistory:Da(this.i.switchHistory),stateHistory:Da(this.i.stateHistory)}};W.prototype.getStats=W.prototype.getStats;
295
+ W.prototype.addTextTrack=function(a,b,c,d,e){if(!this.a)return Promise.reject();for(var f=V(this.a),g,h=0;h<this.c.periods.length;h++)if(this.c.periods[h]==f){if(h==this.c.periods.length-1){if(g=this.c.presentationTimeline.Y()-f.startTime,Infinity==g)return Promise.reject()}else g=this.c.periods[h+1].startTime-f.startTime;break}var l={id:this.Bc++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1!=b?null:new O(1,0,g,
296
+ function(){return[a]},0,null)},initSegmentReference:null,presentationTimeOffset:0,mimeType:d,codecs:e||"",kind:c,encrypted:!1,keyId:null,language:b,type:"text",primary:!1,trickModeVideo:null,containsEmsgBoxes:!1};this.Va.push(l.id);f.textStreams.push(l);return tf(this.a,l).then(function(){if(!this.J)return this.Va.splice(this.Va.indexOf(l.id),1),vg(this,f),rg(this),{id:l.id,active:!1,type:"text",bandwidth:0,language:b,kind:c,width:null,height:null}}.bind(this))};W.prototype.addTextTrack=W.prototype.addTextTrack;
297
+ W.prototype.Hb=function(a,b){this.mb.width=a;this.mb.height=b};W.prototype.setMaxHardwareResolution=W.prototype.Hb;function xg(a,b,c){a.i.switchHistory.push({timestamp:Date.now()/1E3,id:b.id,type:b.type,fromAdaptation:c});zg(a,b)}function zg(a,b){var c=gc(a.c,b);a.P[c]||(a.P[c]={});a.P[c][b.type]=b.id}
298
+ function og(a){a.l&&(a.l.ha(a.N,"sourceopen"),a.l.ha(a.f,"loadeddata"),a.l.ha(a.f,"playing"),a.l.ha(a.f,"pause"),a.l.ha(a.f,"ended"));a.f&&(a.f.removeAttribute("src"),a.f.load());var b=Promise.all([a.b?a.b.abr.manager.stop():null,a.j?a.j.m():null,a.ja?a.ja.m():null,a.g?a.g.m():null,a.v?a.v.m():null,a.a?a.a.m():null,a.h?a.h.stop():null]);a.j=null;a.ja=null;a.g=null;a.v=null;a.a=null;a.h=null;a.c=null;a.Ya=null;a.Wa=null;a.N=null;a.Xa=[];a.P={};a.B={};a.i=mg();return b}
299
+ function wg(a){return a.h?og(a).then(function(){this.J||(this.xc(!1),this.Wa=ng(this))}.bind(a)):Promise.resolve()}function tg(){return{".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:null}}}
300
+ function lg(a){return{drm:{retryParameters:Fa(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},manifest:{retryParameters:Fa(),dash:{customScheme:function(a){if(a)return null},clockSyncUri:"",ignoreDrmInfo:!1},hls:{defaultTimeOffset:0}},streaming:{retryParameters:Fa(),infiniteRetriesForLiveStreams:!0,rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1},abr:{manager:a.Ob,enabled:!0,defaultBandwidthEstimate:5E5,
301
+ restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}}}
302
+ function mg(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:0,bufferingTime:0,switchHistory:[],stateHistory:[]}}k=W.prototype;k.fb=function(a){var b=this.a?sf(this.a):{};Ub(this.j,b,a);b=0<Yb(a.variants).length;Tb(a,this.b.restrictions,this.mb)&&this.a&&V(this.a)==a&&rg(this);a=1>Yb(a.variants).length;if(!b)throw new t(2,4,4011);if(a)throw new t(2,4,4012);};
303
+ function yg(a,b,c){for(var d in b){var e=b[d],f=c||!1;"text"==d&&(f=!0);a.Za?a.B[d]={stream:e,Ic:f}:vf(a.a,d,e,f)}}function Bg(a){if(a.c){var b=Date.now()/1E3;a.ka?a.i.bufferingTime+=b-a.Ua:a.i.playTime+=b-a.Ua;a.Ua=b}}
304
+ function qg(a,b){function c(a,b){if(!a)return null;var c=a.findSegmentPosition(b-e.startTime);return null==c?null:(c=a.getSegmentReference(c))?c.startTime+e.startTime:null}var d=sf(a.a),e=V(a.a),f=c(d.video,b),d=c(d.audio,b);return null!=f&&null!=d?Math.max(f,d):null!=f?f:null!=d?d:b}k.be=function(a,b){this.b.abr.manager.segmentDownloaded(a,b)};k.xc=function(a){Bg(this);this.ka=a;this.Sa();if(this.g){var b=this.g;a!=b.h&&(b.h=a,hf(b,b.g))}this.dispatchEvent(new H("buffering",{buffering:a}))};
305
+ k.Yd=function(){rg(this)};k.Sa=function(){if(!this.J){var a=this.ka?"buffering":this.f.ended?"ended":this.f.paused?"paused":"playing";var b=Date.now()/1E3;if(this.i.stateHistory.length){var c=this.i.stateHistory[this.i.stateHistory.length-1];c.duration=b-c.timestamp;if(a==c.state)return}this.i.stateHistory.push({timestamp:b,state:a,duration:0})}};k.ae=function(){if(this.v){var a=this.v;a.c.forEach(a.o.bind(a,!0))}this.a&&xf(this.a)};
306
+ function Cg(a,b,c,d,e){if(!c||1>c.length)return a.xa(new t(2,4,4012)),{};a.b.abr.manager.setVariants(c);a.b.abr.manager.setTextStreams(d);var f=[];e&&(f=["video","audio"],b.textStreams.length&&f.push("text"));e=sf(a.a);if(b=dc(e.audio,e.video,b.variants)){b.allowedByApplication&&b.allowedByKeySystem||(f.push("audio"),f.push("video"));for(var g in e)b=e[g],"audio"==b.type&&b.language!=c[0].language?f.push(g):"text"==b.type&&0<d.length&&b.language!=d[0].language&&f.push(g)}f=f.filter(Aa);if(0<f.length){c=
307
+ {};try{c=a.b.abr.manager.chooseStreams(f)}catch(h){a.xa(h)}return c}return{}}function vg(a,b){var c={audio:!1,text:!1},d=bc(b,a.ia,c),e=cc(b,a.Ba,c),d=Cg(a,b,d,e),f;for(f in d)xg(a,d[f],!0);yg(a,d,!0);sg(a);d.text&&d.audio&&c.text&&d.text.language!=d.audio.language&&(a.A.mode="showing",Ag(a))}k.cd=function(a){this.Za=!0;this.b.abr.manager.disable();var b=bc(a,this.ia),c=cc(a,this.Ba);a=Cg(this,a,b,c,!0);for(var d in this.B)a[d]=this.B[d].stream;this.B={};for(d in a)xg(this,a[d],!0);return a};
308
+ k.Ec=function(){this.Za=!1;this.b.abr.enabled&&this.b.abr.manager.enable();for(var a in this.B){var b=this.B[a];vf(this.a,a,b.stream,b.Ic)}this.B={}};k.jd=function(){this.h&&this.h.update&&this.h.update()};k.sd=function(){this.g&&this.g.yb()};k.Jb=function(a,b){var c=sf(this.a),d;for(d in a){var e=a[d];c[d]!=e?xg(this,e,!0):delete a[d]}if(!La(a)&&this.a){for(d in a)vf(this.a,d,a[d],b||!1);sg(this)}};
309
+ function sg(a){Promise.resolve().then(function(){this.J||this.dispatchEvent(new H("adaptation"))}.bind(a))}function rg(a){Promise.resolve().then(function(){this.J||this.dispatchEvent(new H("trackschanged"))}.bind(a))}function Ag(a){a.dispatchEvent(new H("texttrackvisibility"))}k.xa=function(a){this.J||this.dispatchEvent(new H("error",{detail:a}))};k.vd=function(a){this.v?this.v.v(a):this.Xa.push(a)};k.gb=function(a){this.dispatchEvent(a)};
310
+ k.wd=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.xa(new t(2,3,3016,a,b))}}};
311
+ k.$d=function(a){var b=["output-restricted","internal-error"],c=V(this.a),d=!1;c.variants.forEach(function(c){var e=[];c.audio&&e.push(c.audio);c.video&&e.push(c.video);e.forEach(function(e){var f=c.allowedByKeySystem;e.keyId&&(e=a[e.keyId],c.allowedByKeySystem=!!e&&0>b.indexOf(e));f!=c.allowedByKeySystem&&(d=!0)})});var e=sf(this.a);(e=dc(e.audio,e.video,c.variants))&&!e.allowedByKeySystem&&vg(this,c);d&&rg(this)};
312
+ k.Zd=function(a,b){if(this.h&&this.h.onExpirationUpdated)this.h.onExpirationUpdated(a,b);this.dispatchEvent(new H("expirationupdated"))};function X(a){this.a=bg();this.f=a;this.i=Dg(this);this.b=null;this.v=!1;this.j=null;this.g=-1;this.l=0;this.c=null;this.h=new cg(this.a,a.o,a.getConfiguration().streaming.retryParameters,this.i)}m("shaka.offline.Storage",X);function Eg(){return!!window.indexedDB}X.support=Eg;X.prototype.m=function(){var a=this.a,b=this.h?this.h.m()["catch"](function(){}).then(function(){if(a)return a.m()}):Promise.resolve();this.i=this.f=this.h=this.a=null;return b};X.prototype.destroy=X.prototype.m;
313
+ X.prototype.configure=function(a){Ca(this.i,a,Dg(this),{},"")};X.prototype.configure=X.prototype.configure;
314
+ X.prototype.je=function(a,b,c){function d(a){f=a}if(this.v)return Promise.reject(new t(2,9,9006));this.v=!0;var e,f=null;return Fg(this).then(function(){Y(this);return Gg(this,a,d,c)}.bind(this)).then(function(c){Y(this);this.c=c.manifest;this.b=c.Jc;if(this.c.presentationTimeline.$()||this.c.presentationTimeline.va())throw new t(2,9,9005,a);this.c.periods.forEach(this.o.bind(this));this.g=this.a.c.manifest++;this.l=0;c=this.c.periods.map(this.B.bind(this));var d=this.b.b,f=hb(this.b);if(d){if(!f.length)throw new t(2,
315
+ 9,9007,a);d.initData=[]}e={key:this.g,originalManifestUri:a,duration:this.l,size:0,expiration:this.b.ab(),periods:c,sessionIds:f,drmInfo:d,appMetadata:b};return eg(this.h,e)}.bind(this)).then(function(){Y(this);if(f)throw f;return Hg(this)}.bind(this)).then(function(){return Wf(e)}.bind(this))["catch"](function(a){return Hg(this)["catch"](y).then(function(){throw a;})}.bind(this))};X.prototype.store=X.prototype.je;
316
+ X.prototype.remove=function(a){function b(a){6013!=a.code&&(e=a)}var c=a.offlineUri,d=/^offline:([0-9]+)$/.exec(c);if(!d)return Promise.reject(new t(2,9,9004,c));var e=null,f,g,h=Number(d[1]);return Fg(this).then(function(){Y(this);return this.a.get("manifest",h)}.bind(this)).then(function(a){Y(this);if(!a)throw new t(2,9,9003,c);f=a;a=hg(f);g=new $a(this.f.o,b,function(){},function(){});g.configure(this.f.getConfiguration().drm);return g.init(a,!0)}.bind(this)).then(function(){return eb(g,f.sessionIds)}.bind(this)).then(function(){return g.m()}.bind(this)).then(function(){Y(this);
317
+ if(e)throw e;var b=f.periods.map(function(a){return a.streams.map(function(a){var b=a.segments.map(function(a){a=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a.uri);return Number(a[1])});a.initSegmentUri&&(a=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a.initSegmentUri),b.push(Number(a[1])));return b}).reduce(x,[])}).reduce(x,[]),c=0,d=b.length,g=this.i.progressCallback;return Tf(this.a,b,function(){c++;g(a,c/d)})}.bind(this)).then(function(){Y(this);this.i.progressCallback(a,1);return this.a.remove("manifest",
318
+ h)}.bind(this))};X.prototype.remove=X.prototype.remove;X.prototype.list=function(){var a=[];return Fg(this).then(function(){Y(this);return this.a.forEach("manifest",function(b){a.push(Wf(b))})}.bind(this)).then(function(){return a})};X.prototype.list=X.prototype.list;
319
+ function Gg(a,b,c,d){function e(){}var f=a.f.o,g=a.f.getConfiguration(),h,l,n;return Dd(b,f,g.manifest.retryParameters,d).then(function(a){Y(this);n=new a;n.configure(g.manifest);return n.start(b,{networkingEngine:f,filterPeriod:this.o.bind(this),onTimelineRegionAdded:function(){},onEvent:function(){},onError:c})}.bind(a)).then(function(a){Y(this);h=a;l=new $a(f,c,e,function(){});l.configure(g.drm);return l.init(h,!0)}.bind(a)).then(function(){Y(this);return Ig(h)}.bind(a)).then(function(){Y(this);
320
+ return db(l)}.bind(a)).then(function(){Y(this);return n.stop()}.bind(a)).then(function(){Y(this);return{manifest:h,Jc:l}}.bind(a))["catch"](function(a){if(n)return n.stop().then(function(){throw a;});throw a;})}
321
+ X.prototype.A=function(a){for(var b=[],c=Qb(this.f.getConfiguration().preferredAudioLanguage),d=[0,Ob,Pb],e=a.filter(function(a){return"variant"==a.type}),d=d.map(function(a){return e.filter(function(b){b=Qb(b.language);return Nb(a,c,b)})}),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(Aa));var h=f.filter(function(a){return a.height&&480>=a.height});h.length&&(h.sort(function(a,
322
+ 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 Dg(a){return{trackSelectionCallback:a.A.bind(a),progressCallback:function(a,c){if(a||c)return null}}}function Fg(a){return a.a?a.a.a?Promise.resolve():a.a.init(Vf):Promise.reject(new t(2,9,9E3))}
323
+ X.prototype.o=function(a){var b={};if(this.j){var c=this.j.filter(function(a){return"variant"==a.type}),d=null;c.length&&(d=$b(a,c[0]));d&&(d.video&&(b.video=d.video),d.audio&&(b.audio=d.audio))}Ub(this.b,b,a);Tb(a,this.f.getConfiguration().restrictions,{width:Infinity,height:Infinity})};function Hg(a){var b=a.b?a.b.m():Promise.resolve();a.b=null;a.c=null;a.v=!1;a.j=null;a.g=-1;return b}
324
+ function Ig(a){var b=a.periods.map(function(a){return a.variants}).reduce(x,[]).map(function(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}).reduce(x,[]).filter(Aa);a=a.periods.map(function(a){return a.textStreams}).reduce(x,[]);b.push.apply(b,a);return Promise.all(b.map(function(a){return a.createSegmentIndex()}))}
325
+ X.prototype.B=function(a){var b,c,d=Xb(a,null,null),e=Zb(a,null),d=this.i.trackSelectionCallback(d.concat(e));this.j||(this.j=d,this.c.periods.forEach(this.o.bind(this)));for(e=d.length-1;0<e;--e){var f=!1;for(c=e-1;0<=c;--c)if(d[e].type==d[c].type&&d[e].kind==d[c].kind&&d[e].language==d[c].language){f=!0;break}if(f)break}f=[];for(e=0;e<d.length;e++)(b=$b(a,d[e]))?(b.audio&&((c=f.filter(function(a){return a.id==b.audio.id})[0])?c.variantIds.push(b.id):(c=b.video?b.bandwidth/2:b.bandwidth,f.push(Jg(this,
326
+ a,b.audio,c,b.id)))),b.video&&((c=f.filter(function(a){return a.id==b.video.id})[0])?c.variantIds.push(b.id):(c=b.audio?b.bandwidth/2:b.bandwidth,f.push(Jg(this,a,b.video,c,b.id))))):f.push(Jg(this,a,ac(a,d[e]),0));return{startTime:a.startTime,streams:f}};
327
+ function Jg(a,b,c,d,e){var f=[],g=a.c.presentationTimeline.ma();var h=g;for(var l=c.findSegmentPosition(g),n=null!=l?c.getSegmentReference(l):null;n;)h=a.a.c.segment++,dg(a.h,c.type,n,(n.endTime-n.startTime)*d/8,{key:h,data:null,manifestKey:a.g,streamNumber:c.id,segmentNumber:h}),f.push({startTime:n.startTime,endTime:n.endTime,uri:"offline:"+a.g+"/"+c.id+"/"+h}),h=n.endTime+b.startTime,n=c.getSegmentReference(++l);a.l=Math.max(a.l,h-g);b=null;c.initSegmentReference&&(h=a.a.c.segment++,b="offline:"+
328
+ a.g+"/"+c.id+"/"+h,dg(a.h,c.contentType,c.initSegmentReference,0,{key:h,data:null,manifestKey:a.g,streamNumber:c.id,segmentNumber:-1}));a=[];null!=e&&a.push(e);return{id:c.id,primary:c.primary,presentationTimeOffset:c.presentationTimeOffset||0,contentType:c.type,mimeType:c.mimeType,codecs:c.codecs,frameRate:c.frameRate,kind:c.kind,language:c.language,width:c.width||null,height:c.height||null,initSegmentUri:b,encrypted:c.encrypted,keyId:c.keyId,segments:f,variantIds:a}}
329
+ function Y(a){if(!a.f)throw new t(2,9,9002);}pg.offline=Eg;m("shaka.polyfill.installAll",function(){for(var a=0;a<Kg.length;++a)Kg[a]()});var Kg=[];function Lg(a){Kg.push(a)}m("shaka.polyfill.register",Lg);function Mg(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)}
330
+ Lg(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,
331
+ "fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Mg);document.addEventListener("webkitfullscreenerror",Mg);document.addEventListener("mozfullscreenchange",Mg);document.addEventListener("mozfullscreenerror",Mg);document.addEventListener("MSFullscreenChange",Mg);document.addEventListener("MSFullscreenError",Mg)}});Lg(function(){var a=navigator.userAgent;a&&0<=a.indexOf("CrKey")&&delete window.indexedDB});function Ng(a){this.f=[];this.b=[];this.a=[];(new Q).da("pssh",this.c.bind(this)).parse(a.buffer)}Ng.prototype.c=function(a){if(!(1<a.version)){var b=Ya(a.s.Ja(16)),c=[];if(0<a.version)for(var d=a.s.D(),e=0;e<d;++e){var f=Ya(a.s.Ja(16));c.push(f)}d=a.s.D();a.s.I(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 Og(a,b){try{var c=new Pg(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
332
+ function Pg(a,b){this.keySystem=a;for(var c=!1,d=0;d<b.length;++d){var e=b[d];var 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 l=e.audioCapabilities[h];if(l.contentType){g=!0;var n=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,n)&&(f.audioCapabilities.push(l),c=!0)}}if(e.videoCapabilities)for(h=
333
+ 0;h<e.videoCapabilities.length;++h)l=e.videoCapabilities[h],l.contentType&&(g=!0,n=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,n)&&(f.videoCapabilities.push(l),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(f.persistentState="required",f.sessionTypes=["persistent-license"]);if(c){this.a=f;return}}e=Error("Unsupported keySystem");e.name="NotSupportedError";e.code=DOMException.NOT_SUPPORTED_ERR;throw e;}
334
+ Pg.prototype.createMediaKeys=function(){var a=new Qg(this.keySystem);return Promise.resolve(a)};Pg.prototype.getConfiguration=function(){return this.a};function Rg(a){var b=this.mediaKeys;b&&b!=a&&Sg(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Sg(a,this):Promise.resolve()}function Qg(a){this.a=new MSMediaKeys(a);this.b=new D}Qg.prototype.createSession=function(a){if("temporary"!=(a||"temporary"))throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Tg(this.a)};
335
+ Qg.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Sg(a,b){function c(){b.msSetMediaKeys(d.a);b.removeEventListener("loadedmetadata",c)}Ia(a.b);if(!b)return Promise.resolve();E(a.b,b,"msneedkey",Ug);var d=a;try{return 1<=b.readyState?b.msSetMediaKeys(a.a):b.addEventListener("loadedmetadata",c),Promise.resolve()}catch(e){return Promise.reject(e)}}
336
+ function Tg(a){p.call(this);this.c=null;this.g=a;this.b=this.a=null;this.f=new D;this.sessionId="";this.expiration=NaN;this.closed=new A;this.keyStatuses=new Vg}ba(Tg);k=Tg.prototype;k.generateRequest=function(a,b){this.a=new A;try{this.c=this.g.createSession("video/mp4",new Uint8Array(b),null),E(this.f,this.c,"mskeymessage",this.nd.bind(this)),E(this.f,this.c,"mskeyadded",this.ld.bind(this)),E(this.f,this.c,"mskeyerror",this.md.bind(this)),Wg(this,"status-pending")}catch(c){this.a.reject(c)}return this.a};
337
+ k.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};k.update=function(a){this.b=new A;try{this.c.update(new Uint8Array(a))}catch(b){this.b.reject(b)}return this.b};k.close=function(){try{this.c.close(),this.closed.resolve(),Ia(this.f)}catch(a){this.closed.reject(a)}return this.closed};k.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
338
+ function Ug(a){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="cenc";if(a=a.initData){var c=new Ng(a);if(!(1>=c.a.length)){for(var d=[],e=0;e<c.a.length;e++)d.push(a.subarray(c.a[e].start,c.a[e].end+1));e=Xg;a=[];for(c=0;c<d.length;++c){for(var f=!1,g=0;g<a.length&&!(f=e?e(d[c],a[g]):d[c]===a[g]);++g);f||a.push(d[c])}for(e=d=0;e<a.length;e++)d+=a[e].length;d=new Uint8Array(d);for(e=c=0;e<a.length;e++)d.set(a[e],c),c+=a[e].length;a=d}}b.initData=
339
+ a;this.dispatchEvent(b)}function Xg(a,b){return Za(a,b)}k.nd=function(a){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new H("message",{messageType:void 0==this.keyStatuses.qb()?"licenserequest":"licenserenewal",message:a.message.buffer}))};k.ld=function(){this.a?(Wg(this,"usable"),this.a.resolve(),this.a=null):this.b&&(Wg(this,"usable"),this.b.resolve(),this.b=null)};
340
+ k.md=function(){var a=Error("EME PatchedMediaKeysMs key error");a.errorCode=this.c.error;if(this.a)this.a.reject(a),this.a=null;else if(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:Wg(this,"output-not-allowed");default:Wg(this,"internal-error")}};function Wg(a,b){a.keyStatuses.Ib(b);a.dispatchEvent(new H("keystatuseschange"))}function Vg(){this.size=0;this.a=void 0}var Yg;k=Vg.prototype;
341
+ k.Ib=function(a){this.size=void 0==a?0:1;this.a=a};k.qb=function(){return this.a};k.forEach=function(a){this.a&&a(this.a,Yg)};k.get=function(a){if(this.has(a))return this.a};k.has=function(a){var b=Yg;return this.a&&Za(new Uint8Array(a),new Uint8Array(b))?!0:!1};k.entries=function(){};k.keys=function(){};k.values=function(){};function Zg(){return Promise.reject(Error("The key system specified is not supported."))}function $g(a){return a?Promise.reject(Error("MediaKeys not supported.")):Promise.resolve()}function ah(){throw new TypeError("Illegal constructor.");}ah.prototype.createSession=function(){};ah.prototype.setServerCertificate=function(){};function bh(){throw new TypeError("Illegal constructor.");}bh.prototype.getConfiguration=function(){};bh.prototype.createMediaKeys=function(){};var ch="";function dh(a){ch=a;eh=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=fh;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=gh;window.MediaKeys=hh;window.MediaKeySystemAccess=ih}function jh(a){var b=ch;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function fh(a,b){try{var c=new ih(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
342
+ function gh(a){var b=this.mediaKeys;b&&b!=a&&kh(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&kh(a,this);return Promise.resolve()}
343
+ function ih(a,b){this.a=this.keySystem=a;var c=!0;"org.w3.clearkey"==a&&(this.a="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");var f=e.length?e[0]:document.createElement("video");for(var g=0;g<b.length;++g){e=b[g];var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},l=!1;if(e.audioCapabilities)for(var n=0;n<e.audioCapabilities.length;++n){var q=
344
+ e.audioCapabilities[n];if(q.contentType){var l=!0,r=q.contentType.split(";")[0];f.canPlayType(r,this.a)&&(h.audioCapabilities.push(q),d=!0)}}if(e.videoCapabilities)for(n=0;n<e.videoCapabilities.length;++n)q=e.videoCapabilities[n],q.contentType&&(l=!0,f.canPlayType(q.contentType,this.a)&&(h.videoCapabilities.push(q),d=!0));l||(d=f.canPlayType("video/mp4",this.a)||f.canPlayType("video/webm",this.a));"required"==e.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
345
+ 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;}ih.prototype.createMediaKeys=function(){var a=new hh(this.a);return Promise.resolve(a)};ih.prototype.getConfiguration=function(){return this.b};function hh(a){this.g=a;this.b=null;this.a=new D;this.c=[];this.f={}}
346
+ function kh(a,b){a.b=b;Ia(a.a);var c=ch;b&&(E(a.a,b,c+"needkey",a.Ad.bind(a)),E(a.a,b,c+"keymessage",a.zd.bind(a)),E(a.a,b,c+"keyadded",a.xd.bind(a)),E(a.a,b,c+"keyerror",a.yd.bind(a)))}k=hh.prototype;k.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 lh(a,this.g,b);this.c.push(b);return b};
347
+ k.setServerCertificate=function(){return Promise.resolve(!1)};k.Ad=function(a){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="webm";b.initData=a.initData;this.b.dispatchEvent(b)};k.zd=function(a){var b=mh(this,a.sessionId);b&&(a=new H("message",{messageType:void 0==b.keyStatuses.qb()?"licenserequest":"licenserenewal",message:a.message}),b.b&&(b.b.resolve(),b.b=null),b.dispatchEvent(a))};
348
+ k.xd=function(a){if(a=mh(this,a.sessionId))nh(a,"usable"),a.a&&a.a.resolve(),a.a=null};
349
+ k.yd=function(a){var b=mh(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?nh(b,"output-restricted"):1==c?nh(b,"expired"):nh(b,"internal-error"))}};
350
+ function mh(a,b){var c=a.f[b];return c?c:(c=a.c.shift())?(c.sessionId=b,a.f[b]=c):null}function lh(a,b,c){p.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 A;this.keyStatuses=new oh}ba(lh);
351
+ function ph(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(Sa("LOAD_SESSION|"+c));else{var e=Sa("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 A;var g=jh("generateKeyRequest");try{a.f[g](a.c,d)}catch(h){if("InvalidStateError"!=h.name)return a.b=null,Promise.reject(h);
352
+ setTimeout(function(){try{this.f[g](this.c,d)}catch(l){this.b.reject(l),this.b=null}}.bind(a),10)}return a.b}k=lh.prototype;
353
+ k.Kb=function(a,b){if(this.a)this.a.then(this.Kb.bind(this,a,b))["catch"](this.Kb.bind(this,a,b));else{this.a=a;if("webkit-org.w3.clearkey"==this.c){var c=F(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=Wa(d.keys[0].k);d=Wa(d.keys[0].kid)}else c=new Uint8Array(b),d=null;var e=jh("addKey");try{this.f[e](this.c,c,d,this.sessionId)}catch(f){this.a.reject(f),this.a=null}}};
354
+ function nh(a,b){a.keyStatuses.Ib(b);a.dispatchEvent(new H("keystatuseschange"))}k.generateRequest=function(a,b){return ph(this,b,null)};k.load=function(a){return"persistent-license"==this.g?ph(this,null,a):Promise.reject(Error("Not a persistent session."))};k.update=function(a){var b=new A;this.Kb(b,a);return b};
355
+ k.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=jh("cancelKeyRequest");try{this.f[a](this.c,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};k.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function oh(){this.size=0;this.a=void 0}var eh;k=oh.prototype;k.Ib=function(a){this.size=void 0==a?0:1;this.a=a};
356
+ k.qb=function(){return this.a};k.forEach=function(a){this.a&&a(this.a,eh)};k.get=function(a){if(this.has(a))return this.a};k.has=function(a){var b=eh;return this.a&&Za(new Uint8Array(a),new Uint8Array(b))?!0:!1};k.entries=function(){};k.keys=function(){};k.values=function(){};Lg(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(HTMLMediaElement.prototype.webkitGenerateKeyRequest?dh("webkit"):HTMLMediaElement.prototype.generateKeyRequest?dh(""):window.MSMediaKeys?(Yg=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Rg,window.MediaKeys=Qg,window.MediaKeySystemAccess=Pg,navigator.requestMediaKeySystemAccess=
357
+ Og):(navigator.requestMediaKeySystemAccess=Zg,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=$g,window.MediaKeys=ah,window.MediaKeySystemAccess=bh))});function qh(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,arguments);b.abort=function(){};return b}}
358
+ function rh(){var a=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(){for(var b,d=0,e=0;e<this.sourceBuffers.length;++e)b=this.sourceBuffers[e],b=b.buffered.end(b.buffered.length-1),d=Math.max(d,b);if(!isNaN(this.duration)&&d<this.duration)for(this.Xb=!0,e=0;e<this.sourceBuffers.length;++e)b=this.sourceBuffers[e],b.Rb=!1;return a.apply(this,arguments)};var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var a=b.apply(this,arguments);
359
+ a.N=this;a.addEventListener("updateend",sh,!1);this.a||(this.addEventListener("sourceclose",th,!1),this.a=!0);return a}}function sh(a){var b=a.target,c=b.N;if(c.Xb){a.preventDefault();a.stopPropagation();a.stopImmediatePropagation();b.Rb=!0;for(a=0;a<c.sourceBuffers.length;++a)if(0==c.sourceBuffers[a].Rb)return;c.Xb=!1}}function th(a){a=a.target;for(var b=0;b<a.sourceBuffers.length;++b)a.sourceBuffers[b].removeEventListener("updateend",sh,!1);a.removeEventListener("sourceclose",th,!1)}
360
+ Lg(function(){if(window.MediaSource){var a=navigator.vendor,b=navigator.appVersion;!a||!b||0>a.indexOf("Apple")||(0<=b.indexOf("Version/8")?window.MediaSource=null:0<=b.indexOf("Version/9")?qh():0<=b.indexOf("Version/10")&&(qh(),rh()))}});function Z(a){this.c=[];this.b=[];this.za=uh;if(a)try{a(this.fa.bind(this),this.a.bind(this))}catch(b){this.a(b)}}var uh=0;function vh(a){var b=new Z;b.fa(void 0);return b.then(function(){return a})}function wh(a){var b=new Z;b.a(a);return b}function xh(a){function b(a,b,c){a.za==uh&&(e[b]=c,d++,d==e.length&&a.fa(e))}var c=new Z;if(!a.length)return c.fa([]),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}
361
+ function yh(a){for(var b=new Z,c=b.fa.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}Z.prototype.then=function(a,b){var c=new Z;switch(this.za){case 1:zh(this,c,a);break;case 2:zh(this,c,b);break;case uh:this.c.push({L:c,nb:a}),this.b.push({L:c,nb:b})}return c};Z.prototype["catch"]=function(a){return this.then(void 0,a)};
362
+ Z.prototype.fa=function(a){if(this.za==uh){this.jb=a;this.za=1;for(a=0;a<this.c.length;++a)zh(this,this.c[a].L,this.c[a].nb);this.c=[];this.b=[]}};Z.prototype.a=function(a){if(this.za==uh){this.jb=a;this.za=2;for(a=0;a<this.b.length;++a)zh(this,this.b[a].L,this.b[a].nb);this.c=[];this.b=[]}};
363
+ function zh(a,b,c){Ah.push(function(){if(c&&"function"==typeof c){try{var a=c(this.jb)}catch(f){b.a(f);return}try{var e=a&&a.then}catch(f){b.a(f);return}a instanceof Z?a==b?b.a(new TypeError("Chaining cycle detected")):a.then(b.fa.bind(b),b.a.bind(b)):e?Bh(a,e,b):b.fa(a)}else 1==this.za?b.fa(this.jb):b.a(this.jb)}.bind(a));null==Ch&&(Ch=Dh(Eh))}
364
+ function Bh(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?Bh(a,b,c):c.fa(a)}},c.a.bind(c))}catch(e){c.a(e)}}function Eh(){for(;Ah.length;){null!=Ch&&(Fh(Ch),Ch=null);var a=Ah;Ah=[];for(var b=0;b<a.length;++b)a[b]()}}function Dh(){return 0}function Fh(){}var Ch=null,Ah=[];
365
+ Lg(function(a){window.setImmediate?(Dh=function(a){return window.setImmediate(a)},Fh=function(a){return window.clearImmediate(a)}):(Dh=function(a){return window.setTimeout(a,0)},Fh=function(a){return window.clearTimeout(a)});if(!window.Promise||a)window.Promise=Z,window.Promise.resolve=vh,window.Promise.reject=wh,window.Promise.all=xh,window.Promise.race=yh,window.Promise.prototype.then=Z.prototype.then,window.Promise.prototype["catch"]=Z.prototype["catch"]});function Gh(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Lg(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Gh)}});function Hh(a,b,c){return new window.TextTrackCue(a,b,c)}function Ih(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Lg(function(){if(!window.VTTCue&&window.TextTrackCue){var a=TextTrackCue.length;if(3==a)window.VTTCue=Hh;else if(6==a)window.VTTCue=Ih;else{try{var b=!!Hh(1,2,"")}catch(c){b=!1}b&&(window.VTTCue=Hh)}}});}.call(g,this));
366
+ if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka;
367
+ else if (typeof(define)!="undefined" && define.amd)define(function(){return g.shaka});
368
+ else this.shaka=g.shaka;
369
+ })();
370
+
371
+ //# sourceMappingURL=shaka-player.compiled.map