@openlist-frontend/openlist-frontend 4.1.2 → 4.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/dist/VERSION +1 -1
  2. package/dist/assets/{2fa-CCFlqx2T.js → 2fa-MPgWo9W_.js} +1 -1
  3. package/dist/assets/2fa-legacy-CDrXBcgT.js +1 -0
  4. package/dist/{lite/assets/About-BHhRbjVD.js → assets/About-gmZhmLDK.js} +1 -1
  5. package/dist/{lite/assets/About-legacy-BjZ9a-D4.js → assets/About-legacy-DegyyFdr.js} +1 -1
  6. package/dist/assets/{AddOrEdit-_zz799sr.js → AddOrEdit-BobWy7Hl.js} +1 -1
  7. package/dist/assets/{AddOrEdit-CLMCuixr.js → AddOrEdit-ClDZs9Gh.js} +1 -1
  8. package/dist/assets/AddOrEdit-YlZx1qqY.js +1 -0
  9. package/dist/{lite/assets/AddOrEdit-legacy-C0H8ZQZM.js → assets/AddOrEdit-legacy-5LdMVFrL.js} +1 -1
  10. package/dist/assets/AddOrEdit-legacy-D9IfjQvf.js +1 -0
  11. package/dist/assets/{AddOrEdit-legacy-XB-LJ3hG.js → AddOrEdit-legacy-Qy2JZe59.js} +1 -1
  12. package/dist/assets/{AddOrEdit-legacy-DOGScAkh.js → AddOrEdit-legacy-THtLJwjH.js} +1 -1
  13. package/dist/assets/{AddOrEdit-BmuPXl2I.js → AddOrEdit-wA7fnPTI.js} +1 -1
  14. package/dist/assets/Common-BuBvMCMi.js +1 -0
  15. package/dist/assets/{Common-legacy-BSf879V4.js → Common-legacy-bSL3GW_M.js} +1 -1
  16. package/dist/assets/{Copy-CkR5VhSS.js → Copy-ClQyMgrb.js} +1 -1
  17. package/dist/assets/{Copy-legacy-B9gU0-IV.js → Copy-legacy-BOzeXg7c.js} +1 -1
  18. package/dist/assets/Decompress-B1i0J0Wj.js +1 -0
  19. package/dist/assets/{Decompress-legacy-KOaj0s6C.js → Decompress-legacy-AEk_srr0.js} +1 -1
  20. package/dist/assets/{DeletePopover-GJ24w0i7.js → DeletePopover-4ysUXh3B.js} +1 -1
  21. package/dist/assets/{DeletePopover-legacy-TcFZ4pFU.js → DeletePopover-legacy-Csf-6V7h.js} +1 -1
  22. package/dist/assets/File-Calaq_Yl.js +2 -0
  23. package/dist/assets/{File-legacy-4hdOG1WO.js → File-legacy-DcL_XfRy.js} +1 -1
  24. package/dist/assets/Folder-BAk1Wm3F.js +115 -0
  25. package/dist/{lite/assets/Folder-legacy-BNVnRmPi.js → assets/Folder-legacy-BBz8q6vH.js} +2 -2
  26. package/dist/assets/{FolderTree-DPYLfXD8.js → FolderTree-C7ixGeNd.js} +1 -1
  27. package/dist/assets/{FolderTree-legacy-hFoXXqpY.js → FolderTree-legacy-BtP457mV.js} +1 -1
  28. package/dist/assets/Grid-B9N1lK77.js +1 -0
  29. package/dist/assets/Grid-legacy-DdgU3rUD.js +1 -0
  30. package/dist/assets/{GridItem-Df9Qe69_.js → GridItem-C-z3N-xp.js} +1 -1
  31. package/dist/assets/{GridItem-legacy-BNRTqRBe.js → GridItem-legacy-BKwZyzaf.js} +1 -1
  32. package/dist/assets/{ImageWithError-TZXLWR4X.js → ImageWithError-CLp4z8jl.js} +1 -1
  33. package/dist/assets/{ImageWithError-legacy-BvWTPQ7s.js → ImageWithError-legacy-ByIifoJ_.js} +1 -1
  34. package/dist/{lite/assets/Images-Dxj1VqWp.js → assets/Images-CGtIvgHa.js} +1 -1
  35. package/dist/assets/{Images-legacy-CgvISL4n.js → Images-legacy-CnbH91Sb.js} +1 -1
  36. package/dist/assets/Layout-DU30Mvuh.js +6 -0
  37. package/dist/assets/Layout-legacy-CxoncQdH.js +6 -0
  38. package/dist/assets/List-CYeqfOmD.js +1 -0
  39. package/dist/assets/List-legacy-BmcDzyTn.js +1 -0
  40. package/dist/assets/Messenger-BwvjCwX-.js +1 -0
  41. package/dist/assets/Messenger-legacy-CO-yoy6j.js +1 -0
  42. package/dist/assets/{Metas-D8Thi3Oi.js → Metas-DwM24bP-.js} +1 -1
  43. package/dist/assets/{Metas-legacy-VSkPA-vT.js → Metas-legacy-CkkOEw2q.js} +1 -1
  44. package/dist/assets/{Move-e8lzufO5.js → Move-BngKCQuI.js} +1 -1
  45. package/dist/assets/{Move-legacy-C9tciy-p.js → Move-legacy-BRxoOior.js} +1 -1
  46. package/dist/assets/{Other-CgXa7VVq.js → Other-DPfLdvXh.js} +1 -1
  47. package/dist/{lite/assets/Other-legacy-C_RALd5X.js → assets/Other-legacy-D0jsNqIV.js} +1 -1
  48. package/dist/assets/PackageDownload--uaHVzQo.js +1 -0
  49. package/dist/{lite/assets/PackageDownload-legacy-B5w3oqun.js → assets/PackageDownload-legacy-CpeaoO1g.js} +1 -1
  50. package/dist/assets/{Paginator-C8h2lwF7.js → Paginator-C54JhlYe.js} +1 -1
  51. package/dist/assets/{Paginator-legacy-COW84j64.js → Paginator-legacy-D_4wDqx5.js} +1 -1
  52. package/dist/assets/{Password-DEewIi5a.js → Password-CWvJeOiV.js} +1 -1
  53. package/dist/assets/{Password-legacy-V_8yAgHH.js → Password-legacy-CdFdyh7o.js} +1 -1
  54. package/dist/{lite/assets/Profile-DYghWMGT.js → assets/Profile-8HEofLfP.js} +1 -1
  55. package/dist/{lite/assets/Profile-legacy-DPNTXJSe.js → assets/Profile-legacy-D0UFy5xg.js} +1 -1
  56. package/dist/{lite/assets/PublicKeys-BfcRZzQs.js → assets/PublicKeys-Bie7Qp6M.js} +1 -1
  57. package/dist/assets/{PublicKeys-legacy-BOKi27PF.js → PublicKeys-legacy-BY3rcj-K.js} +1 -1
  58. package/dist/assets/{ResponsiveGrid-C5alewH_.js → ResponsiveGrid-BykSwb_j.js} +1 -1
  59. package/dist/assets/{ResponsiveGrid-legacy-rLzPeoz6.js → ResponsiveGrid-legacy-EuQbkIIN.js} +1 -1
  60. package/dist/assets/{S3-DqtoY2K6.js → S3-C7yQFSX0.js} +1 -1
  61. package/dist/{lite/assets/S3-legacy-CQNViT40.js → assets/S3-legacy-BY24Gd6Z.js} +1 -1
  62. package/dist/assets/{SettingItem-Cr17_PCr.js → SettingItem-ZfXk9TXC.js} +1 -1
  63. package/dist/assets/{SettingItem-legacy-Um-MX_L3.js → SettingItem-legacy-SQTK5BL5.js} +1 -1
  64. package/dist/assets/Shares-CE3gOYSL.js +1 -0
  65. package/dist/assets/Shares-legacy-D2f6zOVL.js +1 -0
  66. package/dist/assets/Storages-PM5QQYwI.js +1 -0
  67. package/dist/assets/Storages-legacy-ChDkNwbd.js +1 -0
  68. package/dist/{lite/assets/Upload-CPukUUlD.js → assets/Upload-DBhdWkNn.js} +1 -1
  69. package/dist/assets/{Upload-BRjvT-2w.js → Upload-DPicEiWj.js} +1 -1
  70. package/dist/assets/{Upload-legacy-BVn4wm_0.js → Upload-legacy-BdzG-Rqk.js} +1 -1
  71. package/dist/assets/{Upload-legacy-D53whrOo.js → Upload-legacy-VhaBhBM-.js} +1 -1
  72. package/dist/assets/Users-C8FlUcPm.js +1 -0
  73. package/dist/assets/{Users-legacy-DqI1uzdG.js → Users-legacy-BvpUDdwv.js} +1 -1
  74. package/dist/assets/{Wether-CFiD0-tm.js → Wether-DQJKqKO1.js} +1 -1
  75. package/dist/assets/{Wether-legacy-DNtog8xq.js → Wether-legacy-D3X-nyzl.js} +1 -1
  76. package/dist/assets/aliyun_video-legacy-CfcxNo2d.js +1 -0
  77. package/dist/assets/aliyun_video-nMhjQCP8.js +1 -0
  78. package/dist/assets/archive-bQX99ULF.js +1 -0
  79. package/dist/assets/archive-legacy-CjVZ4qfk.js +1 -0
  80. package/dist/assets/artplayer-BR-yr-oe.js +6 -0
  81. package/dist/assets/artplayer-hJ0Nm-8k.css +1 -0
  82. package/dist/assets/artplayer-legacy-zvFU_rxQ.js +1 -0
  83. package/dist/{lite/assets/asciinema-BFctz1w1.js → assets/asciinema-0A1-_qGr.js} +1 -1
  84. package/dist/{lite/assets/asciinema-legacy-ri3UmtC0.js → assets/asciinema-legacy-BYAUa-kP.js} +1 -1
  85. package/dist/{lite/assets/audio-legacy-Dp7z-JdK.js → assets/audio-legacy-CJzwlnQD.js} +1 -1
  86. package/dist/assets/audio-tA9tGFJU.js +1 -0
  87. package/dist/{lite/assets/backup-restore-KcvZd3J3.js → assets/backup-restore-Btk42qDj.js} +1 -1
  88. package/dist/{lite/assets/backup-restore-legacy-BCfuAkwO.js → assets/backup-restore-legacy-HRodQMvJ.js} +1 -1
  89. package/dist/assets/entry-CQHbbmfz.js +1 -0
  90. package/dist/assets/entry-DNrH647C.js +1 -0
  91. package/dist/assets/entry-legacy-B-kSvqSM.js +1 -0
  92. package/dist/assets/entry-legacy-CvjIonQ4.js +1 -0
  93. package/dist/assets/{flash-Bbtu3KV4.js → flash-DZyx3C-0.js} +1 -1
  94. package/dist/assets/{flash-legacy-C-To8MhN.js → flash-legacy-BIlG-8wc.js} +1 -1
  95. package/dist/assets/{heic-CODmZLqE.js → heic-Bf1JHcrk.js} +1 -1
  96. package/dist/assets/{heic-legacy-DkeETeGc.js → heic-legacy-BPw9au8B.js} +1 -1
  97. package/dist/assets/{helper-DQ6i1N_z.js → helper-B6U9pCyh.js} +1 -1
  98. package/dist/assets/helper-b8qm2EJc.js +1 -0
  99. package/dist/assets/helper-legacy-CMhIu_HL.js +1 -0
  100. package/dist/{lite/assets/helper-legacy-B8loq6km.js → assets/helper-legacy-WpYYwNUo.js} +1 -1
  101. package/dist/assets/{html-Bv2vfjW6.js → html-COhBaQw3.js} +1 -1
  102. package/dist/assets/{html-legacy-Dox3i3gp.js → html-legacy-BJVmQUG0.js} +1 -1
  103. package/dist/{lite/assets/icon-DHjoKQ07.js → assets/icon-DrO_4BG6.js} +1 -1
  104. package/dist/assets/{icon-legacy-CE7Ss-Ia.js → icon-legacy-BR_-ACI1.js} +1 -1
  105. package/dist/assets/{image-Di2ob8ur.js → image-D1f596SZ.js} +1 -1
  106. package/dist/assets/image-legacy-BsyDel7x.js +1 -0
  107. package/dist/assets/index-B0tNcUjJ.js +21 -0
  108. package/dist/assets/index-B5iypTJp.js +1 -0
  109. package/dist/assets/index-BvYgQ7iF.js +14 -0
  110. package/dist/{lite/assets/index-7skNrC4W.js → assets/index-By4HMKfG.js} +1 -1
  111. package/dist/{lite/assets/index-Dyl9mACL.js → assets/index-ClfQ1K7A.js} +1 -1
  112. package/dist/assets/{index-BAx3cJXa.js → index-DJ5441tf.js} +1 -1
  113. package/dist/{lite/assets/index-DIyzNT5-.js → assets/index-DK9UI-hM.js} +1 -1
  114. package/dist/assets/index-DKOsdH_t.js +2 -0
  115. package/dist/assets/{index-D1UgPq5q.js → index-DVKLP7fN.js} +1 -1
  116. package/dist/assets/{index-BeQW3ZI3.js → index-ZTntABz9.js} +1 -1
  117. package/dist/assets/{index-legacy-B-rFd7c6.js → index-legacy-1ocYP5Qo.js} +1 -1
  118. package/dist/{lite/assets/index-legacy-BzDCaMfF.js → assets/index-legacy-BPYQBBdN.js} +1 -1
  119. package/dist/assets/index-legacy-BUop_2pr.js +1 -0
  120. package/dist/{lite/assets/index-legacy-C8YlOf7v.js → assets/index-legacy-BWInRj-5.js} +1 -1
  121. package/dist/assets/index-legacy-CS9X6zvl.js +18 -0
  122. package/dist/assets/{index-legacy-B4yRbF0f.js → index-legacy-CoOpRRMD.js} +4 -4
  123. package/dist/assets/index-legacy-D8V8zGXo.js +1 -0
  124. package/dist/{lite/assets/index-legacy-DFD2MRpv.js → assets/index-legacy-DFvfSXPA.js} +1 -1
  125. package/dist/assets/{index-legacy-Dd27nSW1.js → index-legacy-DoPUsE8Q.js} +1 -1
  126. package/dist/{lite/assets/index-legacy-BCi4TNou.js → assets/index-legacy-SIkVkvCk.js} +1 -1
  127. package/dist/{lite/assets/indexes-BB1FITux.js → assets/indexes-D7m_s7dj.js} +1 -1
  128. package/dist/assets/{indexes-legacy-Deu5jDN_.js → indexes-legacy-C5lh6zLy.js} +1 -1
  129. package/dist/assets/{ipa-Budcp4XX.js → ipa-iZfc5ny_.js} +1 -1
  130. package/dist/assets/{ipa-legacy-CeHInztF.js → ipa-legacy-v-g-4SPo.js} +1 -1
  131. package/dist/assets/item_type-CyD6qwPS.js +1 -0
  132. package/dist/assets/{item_type-legacy-NfhfVKtF.js → item_type-legacy-BFH7Oxl9.js} +1 -1
  133. package/dist/assets/{markdown-Ds7Y4Rtw.js → markdown-BOrQcm-y.js} +1 -1
  134. package/dist/assets/markdown-legacy-3p8qxq4z.js +1 -0
  135. package/dist/assets/markdown_with_word_wrap-CahOHjvd.js +1 -0
  136. package/dist/assets/markdown_with_word_wrap-legacy-BmLd9pEP.js +1 -0
  137. package/dist/assets/{offline_download-legacy-Isda71Y-.js → offline_download-legacy-Bf3euZLf.js} +1 -1
  138. package/dist/assets/offline_download-oMg4a0C3.js +1 -0
  139. package/dist/assets/{pdf-legacy-CLjXYdW0.js → pdf-legacy-MMwEmj0t.js} +1 -1
  140. package/dist/assets/pdf-unezGBT4.js +1 -0
  141. package/dist/assets/plist-legacy-sli62gSc.js +1 -0
  142. package/dist/assets/plist-ts9bst_R.js +1 -0
  143. package/dist/assets/share-Wfl1CA3s.js +1 -0
  144. package/dist/assets/share-legacy-Cx-fbxkH.js +1 -0
  145. package/dist/assets/storage-D_MY-bv8.js +1 -0
  146. package/dist/assets/storage-legacy-Dj_KTUH1.js +1 -0
  147. package/dist/{lite/assets/style-B7bXIJsw.js → assets/style-CLimno2e.js} +1 -1
  148. package/dist/assets/{style-legacy-D7boJcKk.js → style-legacy-Qw_NuL2z.js} +1 -1
  149. package/dist/assets/{text-editor-5TlMuOsE.js → text-editor-835YdI16.js} +1 -1
  150. package/dist/{lite/assets/text-editor-legacy-D9zllqsE.js → assets/text-editor-legacy-MXGybM1L.js} +1 -1
  151. package/dist/assets/{url-DGRkhi-d.js → url-BMjGkiT9.js} +1 -1
  152. package/dist/assets/url-legacy-CBsQYltk.js +1 -0
  153. package/dist/assets/{useTitle-legacy-ChUcA9IA.js → useTitle-legacy-CCBAA_c8.js} +1 -1
  154. package/dist/assets/{useTitle-BxtUm_0q.js → useTitle-v8G69LwI.js} +1 -1
  155. package/dist/assets/video-BCb4MKbs.js +7 -0
  156. package/dist/assets/video-legacy-CUKpJmwn.js +9 -0
  157. package/dist/assets/video360-ClQMqCaO.js +14 -0
  158. package/dist/assets/{video360-legacy-BdeGQa07.js → video360-legacy-B9h5Ttkj.js} +1 -1
  159. package/dist/assets/video_box-B0CZUIHx.js +6 -0
  160. package/dist/assets/video_box-legacy-BhztJ1q2.js +1 -0
  161. package/dist/i18n.tar.gz +0 -0
  162. package/dist/index.html +2 -2
  163. package/dist/lite/VERSION +1 -1
  164. package/dist/lite/assets/{2fa-B4n3iRBP.js → 2fa-BmBEiSRR.js} +1 -1
  165. package/dist/lite/assets/2fa-legacy-wGVQ6LRQ.js +1 -0
  166. package/dist/{assets/About-DV0hpLCc.js → lite/assets/About-CyvwxCH0.js} +1 -1
  167. package/dist/{assets/About-legacy-HfdMKJgK.js → lite/assets/About-legacy-DuBrDxzH.js} +1 -1
  168. package/dist/lite/assets/{AddOrEdit-BasDVecN.js → AddOrEdit-C3i-Vuj3.js} +1 -1
  169. package/dist/lite/assets/{AddOrEdit-DhYONn_j.js → AddOrEdit-C4XMiND9.js} +1 -1
  170. package/dist/lite/assets/AddOrEdit-CVhCuKJB.js +1 -0
  171. package/dist/lite/assets/AddOrEdit-legacy-D00_z8Ga.js +1 -0
  172. package/dist/lite/assets/{AddOrEdit-legacy-D6qm5_c2.js → AddOrEdit-legacy-DGA6bK1N.js} +1 -1
  173. package/dist/lite/assets/{AddOrEdit-legacy-HZnf7Kal.js → AddOrEdit-legacy-HkyA089d.js} +1 -1
  174. package/dist/{assets/AddOrEdit-legacy-Cg-OCHgE.js → lite/assets/AddOrEdit-legacy-ISUkxfZ-.js} +1 -1
  175. package/dist/lite/assets/{AddOrEdit-BCNI2VjN.js → AddOrEdit-vqRen1Bw.js} +1 -1
  176. package/dist/lite/assets/Common-DGmkJwav.js +1 -0
  177. package/dist/lite/assets/{Common-legacy-CYvJpufV.js → Common-legacy-CkQHmt1l.js} +1 -1
  178. package/dist/lite/assets/{Copy-JID2_Td8.js → Copy-BbJLPx_6.js} +1 -1
  179. package/dist/lite/assets/{Copy-legacy-Pbuk6D31.js → Copy-legacy-B1E9Y375.js} +1 -1
  180. package/dist/lite/assets/Decompress-DrprJy9c.js +1 -0
  181. package/dist/lite/assets/{Decompress-legacy--HjmgGbI.js → Decompress-legacy-BoQFH_LG.js} +1 -1
  182. package/dist/lite/assets/{DeletePopover-BJaYEjR-.js → DeletePopover-D42apEN8.js} +1 -1
  183. package/dist/lite/assets/{DeletePopover-legacy-BDnF5xDY.js → DeletePopover-legacy-3-H7HjF3.js} +1 -1
  184. package/dist/lite/assets/File-Kold2EZA.js +2 -0
  185. package/dist/lite/assets/{File-legacy-DQx9EZEG.js → File-legacy-BDBS8JJW.js} +1 -1
  186. package/dist/lite/assets/Folder-C1ZBm1No.js +115 -0
  187. package/dist/{assets/Folder-legacy-Cs8Bp6PW.js → lite/assets/Folder-legacy-Dr6X1E-q.js} +2 -2
  188. package/dist/lite/assets/{FolderTree-CYeej_v3.js → FolderTree-CTh3_qOS.js} +1 -1
  189. package/dist/lite/assets/{FolderTree-legacy-Be6l5hdj.js → FolderTree-legacy-DAN7i0-E.js} +1 -1
  190. package/dist/lite/assets/Grid-BdDsv98y.js +1 -0
  191. package/dist/lite/assets/Grid-legacy-DsbOUNzM.js +1 -0
  192. package/dist/lite/assets/{GridItem-DnYpST4w.js → GridItem-CFKmo0Sw.js} +1 -1
  193. package/dist/lite/assets/{GridItem-legacy-ymOiepIZ.js → GridItem-legacy-DHlY1Xxd.js} +1 -1
  194. package/dist/lite/assets/{ImageWithError-CH_zPc6U.js → ImageWithError-BqB24ruv.js} +1 -1
  195. package/dist/lite/assets/{ImageWithError-legacy-nX9fnKWZ.js → ImageWithError-legacy-y8dqCaBH.js} +1 -1
  196. package/dist/{assets/Images-C6AcZbFh.js → lite/assets/Images-CnHcHWFe.js} +1 -1
  197. package/dist/lite/assets/{Images-legacy-DuWCwG4V.js → Images-legacy-CttGgF3X.js} +1 -1
  198. package/dist/lite/assets/Layout-CjSD56n-.js +6 -0
  199. package/dist/lite/assets/Layout-legacy-BpAjKXAb.js +6 -0
  200. package/dist/lite/assets/List-BAvJG6dz.js +1 -0
  201. package/dist/lite/assets/List-legacy-B4FmRG-Z.js +1 -0
  202. package/dist/lite/assets/Messenger-DBhjR6T3.js +1 -0
  203. package/dist/lite/assets/Messenger-legacy-BnpqMYOq.js +1 -0
  204. package/dist/lite/assets/{Metas-BgvlP2sp.js → Metas-CBJ_ShAD.js} +1 -1
  205. package/dist/lite/assets/{Metas-legacy-BbUm71qS.js → Metas-legacy-BeqdCcC8.js} +1 -1
  206. package/dist/lite/assets/{Move-BRtPNJy7.js → Move-iYI042CY.js} +1 -1
  207. package/dist/lite/assets/{Move-legacy-D_29YFjE.js → Move-legacy-CXLW2h8E.js} +1 -1
  208. package/dist/lite/assets/{Other-hPXGbR_N.js → Other-BTo5lP3X.js} +1 -1
  209. package/dist/{assets/Other-legacy-DcW5JtXX.js → lite/assets/Other-legacy-DJpgWEZu.js} +1 -1
  210. package/dist/lite/assets/PackageDownload-BLCc2kgF.js +1 -0
  211. package/dist/{assets/PackageDownload-legacy-Cb6O_fnj.js → lite/assets/PackageDownload-legacy-B_Qfnhq0.js} +1 -1
  212. package/dist/lite/assets/{Paginator-Dept2TLt.js → Paginator-B-OvlJcl.js} +1 -1
  213. package/dist/lite/assets/{Paginator-legacy-o94VgWBO.js → Paginator-legacy-Brr0o-1E.js} +1 -1
  214. package/dist/lite/assets/{Password-esenZoCw.js → Password-e5jgnibX.js} +1 -1
  215. package/dist/lite/assets/{Password-legacy-DnFsxOn8.js → Password-legacy-BrmrYkpQ.js} +1 -1
  216. package/dist/{assets/Profile-B3l5xd0i.js → lite/assets/Profile-Dxw9HCop.js} +1 -1
  217. package/dist/{assets/Profile-legacy-CmRxhRGj.js → lite/assets/Profile-legacy-DQrqdbeO.js} +1 -1
  218. package/dist/{assets/PublicKeys-DX8ybApa.js → lite/assets/PublicKeys-T_ouY8oQ.js} +1 -1
  219. package/dist/lite/assets/{PublicKeys-legacy-BYZl4tZs.js → PublicKeys-legacy-Bs1vMOWk.js} +1 -1
  220. package/dist/lite/assets/{ResponsiveGrid-D1j1qCSi.js → ResponsiveGrid-VTNos9Q3.js} +1 -1
  221. package/dist/lite/assets/{ResponsiveGrid-legacy-B8XSyY6D.js → ResponsiveGrid-legacy-B3XB4KcT.js} +1 -1
  222. package/dist/lite/assets/{S3-FPjsiRYd.js → S3-Ecoo2800.js} +1 -1
  223. package/dist/{assets/S3-legacy-CaK87Mzi.js → lite/assets/S3-legacy-Bp1LTHZR.js} +1 -1
  224. package/dist/lite/assets/{SettingItem-D422kS-B.js → SettingItem-EdBZszST.js} +1 -1
  225. package/dist/lite/assets/{SettingItem-legacy-8p207Kai.js → SettingItem-legacy-DcuCPY8O.js} +1 -1
  226. package/dist/lite/assets/Shares-DJ4dwZHD.js +1 -0
  227. package/dist/lite/assets/Shares-legacy-BNeuFsql.js +1 -0
  228. package/dist/lite/assets/Storages-Xwt1x9AT.js +1 -0
  229. package/dist/lite/assets/Storages-legacy-DmZm8uvm.js +1 -0
  230. package/dist/{assets/Upload-8LkMnbyy.js → lite/assets/Upload-B-2NJ_9D.js} +1 -1
  231. package/dist/lite/assets/{Upload-Cj9EJioJ.js → Upload-Cl6_9Ugt.js} +1 -1
  232. package/dist/lite/assets/{Upload-legacy-CWqWvwM8.js → Upload-legacy-BeitKlNL.js} +1 -1
  233. package/dist/lite/assets/{Upload-legacy-DwngiWPp.js → Upload-legacy-CEzjNxY-.js} +1 -1
  234. package/dist/lite/assets/Users-D5veWkwg.js +1 -0
  235. package/dist/lite/assets/{Users-legacy-TmQpPKBf.js → Users-legacy-BiefIOlS.js} +1 -1
  236. package/dist/lite/assets/{Wether-u3K9PAb2.js → Wether-DITzMbFL.js} +1 -1
  237. package/dist/lite/assets/{Wether-legacy-BUinTlZ_.js → Wether-legacy-CbG7auAA.js} +1 -1
  238. package/dist/lite/assets/aliyun_video-CYyWa90F.js +1 -0
  239. package/dist/lite/assets/aliyun_video-legacy-78vtSluh.js +1 -0
  240. package/dist/lite/assets/archive-GghKG2_F.js +1 -0
  241. package/dist/lite/assets/archive-legacy-Q8Q7XROJ.js +1 -0
  242. package/dist/lite/assets/artplayer-Dg3pv1G8.js +6 -0
  243. package/dist/lite/assets/artplayer-hJ0Nm-8k.css +1 -0
  244. package/dist/lite/assets/artplayer-legacy-JU1lbWOE.js +1 -0
  245. package/dist/{assets/asciinema-legacy-2mOQg0U6.js → lite/assets/asciinema-legacy-45DKdJmu.js} +1 -1
  246. package/dist/{assets/asciinema-DvdgH2WA.js → lite/assets/asciinema-yWwGBqqp.js} +1 -1
  247. package/dist/lite/assets/audio-CoHN33Nq.js +1 -0
  248. package/dist/{assets/audio-legacy-l_Xm65sg.js → lite/assets/audio-legacy-D8kZVa0z.js} +1 -1
  249. package/dist/{assets/backup-restore-DUS-kT8G.js → lite/assets/backup-restore-cXYIE1MJ.js} +1 -1
  250. package/dist/{assets/backup-restore-legacy-CSCFKDh3.js → lite/assets/backup-restore-legacy-E4EGb8wt.js} +1 -1
  251. package/dist/lite/assets/entry-62x9OPjI.js +1 -0
  252. package/dist/lite/assets/entry-YpX1scD8.js +1 -0
  253. package/dist/lite/assets/entry-legacy-BfC-MLD9.js +1 -0
  254. package/dist/lite/assets/entry-legacy-C1NyxG4d.js +1 -0
  255. package/dist/lite/assets/{flash-14bT4xwK.js → flash-Bl79kQiw.js} +1 -1
  256. package/dist/lite/assets/{flash-legacy-ez6m065e.js → flash-legacy-CqTb95L0.js} +1 -1
  257. package/dist/lite/assets/{heic-B1nh04EG.js → heic-C7qtoKzI.js} +1 -1
  258. package/dist/lite/assets/{heic-legacy-BYtoSGaZ.js → heic-legacy-DLchEF2N.js} +1 -1
  259. package/dist/lite/assets/{helper-BW6klSDw.js → helper-Dlk8y7oL.js} +1 -1
  260. package/dist/lite/assets/helper-QAlD0cXo.js +1 -0
  261. package/dist/lite/assets/helper-legacy-BpXPy3aZ.js +1 -0
  262. package/dist/{assets/helper-legacy-DFSSPEwd.js → lite/assets/helper-legacy-Dnduz_aE.js} +1 -1
  263. package/dist/lite/assets/{html-BdcePskP.js → html-CkWxU417.js} +1 -1
  264. package/dist/lite/assets/{html-legacy-Dqjq3KHQ.js → html-legacy-CaXjiIuM.js} +1 -1
  265. package/dist/{assets/icon-B43O8tOH.js → lite/assets/icon-BZFY9fuK.js} +1 -1
  266. package/dist/lite/assets/{icon-legacy-DmRfBtUq.js → icon-legacy-fy54up3n.js} +1 -1
  267. package/dist/lite/assets/{image-BVe350ay.js → image-Dp0-7yIW.js} +1 -1
  268. package/dist/lite/assets/image-legacy-BTDI9QnK.js +1 -0
  269. package/dist/lite/assets/index-3N2OqIV6.js +2 -0
  270. package/dist/{assets/index-BrTsUzIw.js → lite/assets/index-B-NmelxC.js} +1 -1
  271. package/dist/{assets/index-CEW8OeWP.js → lite/assets/index-BAfmrY7N.js} +1 -1
  272. package/dist/{assets/index-CyZVpRx7.js → lite/assets/index-BCWlQ1xm.js} +1 -1
  273. package/dist/lite/assets/{index-CBVGXYte.js → index-C2RHIHtc.js} +1 -1
  274. package/dist/lite/assets/index-CNZMR1GT.js +21 -0
  275. package/dist/lite/assets/{index-Pq7HU_X9.js → index-DUl6hczb.js} +1 -1
  276. package/dist/lite/assets/index-DsSWFirV.js +1 -0
  277. package/dist/lite/assets/index-DvQYEsdd.js +14 -0
  278. package/dist/lite/assets/{index-legacy-CiMdb3v0.js → index-legacy-BGUFxny_.js} +4 -4
  279. package/dist/{assets/index-legacy-DdwhF1y-.js → lite/assets/index-legacy-BVQ2Muq9.js} +1 -1
  280. package/dist/{assets/index-legacy-n9W7xTEF.js → lite/assets/index-legacy-BbfMcMsh.js} +1 -1
  281. package/dist/lite/assets/{index-legacy-GVW8cXlt.js → index-legacy-CH9QEyQP.js} +1 -1
  282. package/dist/{assets/index-legacy-PWFHfG_f.js → lite/assets/index-legacy-CXYN-DZC.js} +1 -1
  283. package/dist/lite/assets/index-legacy-CwkvHJvM.js +1 -0
  284. package/dist/{assets/index-legacy-pIG9W8ie.js → lite/assets/index-legacy-DVBgQjo3.js} +1 -1
  285. package/dist/lite/assets/index-legacy-DgbbakiJ.js +18 -0
  286. package/dist/lite/assets/{index-legacy-D6EiN71D.js → index-legacy-DpAMCNat.js} +1 -1
  287. package/dist/lite/assets/index-legacy-qD49SIrt.js +1 -0
  288. package/dist/lite/assets/{index-BdusgsNY.js → index-xphpXrTh.js} +1 -1
  289. package/dist/{assets/indexes-D5RI4hok.js → lite/assets/indexes-C2QGQEmM.js} +1 -1
  290. package/dist/lite/assets/{indexes-legacy-ZlZzSh5d.js → indexes-legacy-B2z54ovo.js} +1 -1
  291. package/dist/lite/assets/{ipa-DogAlOBe.js → ipa-CnPKZFr6.js} +1 -1
  292. package/dist/lite/assets/{ipa-legacy-DI5DrPcy.js → ipa-legacy-BlDuCd2E.js} +1 -1
  293. package/dist/lite/assets/item_type-CyD6qwPS.js +1 -0
  294. package/dist/lite/assets/{item_type-legacy-NfhfVKtF.js → item_type-legacy-BFH7Oxl9.js} +1 -1
  295. package/dist/lite/assets/{markdown-CuFWSNkh.js → markdown-DxDjLtUN.js} +1 -1
  296. package/dist/lite/assets/markdown-legacy-CYi971Lb.js +1 -0
  297. package/dist/lite/assets/markdown_with_word_wrap-CB62OhjT.js +1 -0
  298. package/dist/lite/assets/markdown_with_word_wrap-legacy-C0_4CoEM.js +1 -0
  299. package/dist/lite/assets/offline_download-C_linla8.js +1 -0
  300. package/dist/lite/assets/{offline_download-legacy-CJN8rTR6.js → offline_download-legacy-DSbsfaZb.js} +1 -1
  301. package/dist/lite/assets/pdf-D6QoLlhP.js +1 -0
  302. package/dist/lite/assets/{pdf-legacy-BrqWSaWw.js → pdf-legacy-CjwHF0EY.js} +1 -1
  303. package/dist/lite/assets/plist-CRAxeKkR.js +1 -0
  304. package/dist/lite/assets/plist-legacy-CNhq75xq.js +1 -0
  305. package/dist/lite/assets/share-BRMiJJnc.js +1 -0
  306. package/dist/lite/assets/share-legacy-CrDD6m--.js +1 -0
  307. package/dist/lite/assets/storage-D_MY-bv8.js +1 -0
  308. package/dist/lite/assets/storage-legacy-Dj_KTUH1.js +1 -0
  309. package/dist/{assets/style-CUQUg6i1.js → lite/assets/style-Cn-hRd7R.js} +1 -1
  310. package/dist/lite/assets/{style-legacy-DoSk2tIF.js → style-legacy-Dq2e2uFG.js} +1 -1
  311. package/dist/lite/assets/{text-editor-CoiGG4PX.js → text-editor-CR6F0GfX.js} +1 -1
  312. package/dist/{assets/text-editor-legacy-Xf4PhAUE.js → lite/assets/text-editor-legacy-BBFHTJOG.js} +1 -1
  313. package/dist/lite/assets/{url-Dcl3gyG3.js → url-B3NbGwyf.js} +1 -1
  314. package/dist/lite/assets/url-legacy-DUCG7ifk.js +1 -0
  315. package/dist/lite/assets/{useTitle-Dta1n-65.js → useTitle-BClow7LS.js} +1 -1
  316. package/dist/lite/assets/{useTitle-legacy-INEQvCzU.js → useTitle-legacy-Ck1as0cr.js} +1 -1
  317. package/dist/lite/assets/video-iFR4ftvJ.js +7 -0
  318. package/dist/lite/assets/video-legacy-BM-JOgVh.js +9 -0
  319. package/dist/lite/assets/video360-i_8Dd5B7.js +14 -0
  320. package/dist/lite/assets/{video360-legacy-COkcF2xI.js → video360-legacy-Cee-gJAm.js} +1 -1
  321. package/dist/lite/assets/video_box-3TB8GlFk.js +6 -0
  322. package/dist/lite/assets/video_box-legacy-PmY7yzTM.js +1 -0
  323. package/dist/lite/i18n.tar.gz +0 -0
  324. package/dist/lite/index.html +2 -2
  325. package/package.json +1 -1
  326. package/dist/assets/2fa-legacy-Codxb6mv.js +0 -1
  327. package/dist/assets/AddOrEdit-BmtF6PL2.js +0 -1
  328. package/dist/assets/AddOrEdit-legacy-B1LNvb98.js +0 -1
  329. package/dist/assets/Common-CoWHGwOd.js +0 -1
  330. package/dist/assets/Decompress-DIMOZlAV.js +0 -1
  331. package/dist/assets/File-D7Un6PzF.js +0 -2
  332. package/dist/assets/Folder-Bfc7FItx.js +0 -115
  333. package/dist/assets/Grid-DUzWkp7c.js +0 -1
  334. package/dist/assets/Grid-legacy-2vmmMwKU.js +0 -1
  335. package/dist/assets/Layout-D3_tmKhh.js +0 -6
  336. package/dist/assets/Layout-legacy-_VGTtuc0.js +0 -6
  337. package/dist/assets/List-BQTlAH9J.js +0 -1
  338. package/dist/assets/List-legacy-CPauUJZ3.js +0 -1
  339. package/dist/assets/Messenger-C-fsew5o.js +0 -1
  340. package/dist/assets/Messenger-legacy-B2er_D6Z.js +0 -1
  341. package/dist/assets/PackageDownload-BVM2WWTF.js +0 -1
  342. package/dist/assets/Shares-DEQRJFZT.js +0 -1
  343. package/dist/assets/Shares-legacy-Bx7jXay8.js +0 -1
  344. package/dist/assets/Storages-eajll2GJ.js +0 -1
  345. package/dist/assets/Storages-legacy-BiRv83My.js +0 -1
  346. package/dist/assets/Users-DOQiYPle.js +0 -1
  347. package/dist/assets/aliyun_video-I2Lv9JIj.js +0 -1
  348. package/dist/assets/aliyun_video-legacy-4WrChe7I.js +0 -1
  349. package/dist/assets/archive-Dlm5WmV0.js +0 -1
  350. package/dist/assets/archive-legacy-DRm3kPmC.js +0 -1
  351. package/dist/assets/audio-DFG1ZG35.js +0 -1
  352. package/dist/assets/entry-8Wf3uEEB.js +0 -1
  353. package/dist/assets/entry-HsLBgWQ7.js +0 -1
  354. package/dist/assets/entry-legacy-Dj_dIAWX.js +0 -1
  355. package/dist/assets/entry-legacy-Dm6T527V.js +0 -1
  356. package/dist/assets/helper-legacy-0n_zKfVx.js +0 -1
  357. package/dist/assets/helper-pBRUfh2v.js +0 -1
  358. package/dist/assets/hls-DSXk01mU.js +0 -6
  359. package/dist/assets/hls-legacy-ZfJSMWjs.js +0 -8
  360. package/dist/assets/image-legacy-Bm8gmdQ0.js +0 -1
  361. package/dist/assets/index-BIqS3B56.js +0 -1
  362. package/dist/assets/index-C2tuPJaA.js +0 -21
  363. package/dist/assets/index-D8gw5_F6.js +0 -2
  364. package/dist/assets/index-dHzUJZqv.js +0 -14
  365. package/dist/assets/index-legacy-C1hZQoSn.js +0 -18
  366. package/dist/assets/index-legacy-DbY3jwuO.js +0 -1
  367. package/dist/assets/index-legacy-DrRldDss.js +0 -1
  368. package/dist/assets/item_type-CV3e5W3l.js +0 -1
  369. package/dist/assets/markdown-legacy-CgDYCJGT.js +0 -1
  370. package/dist/assets/markdown_with_word_wrap-CrcJpycH.js +0 -1
  371. package/dist/assets/markdown_with_word_wrap-legacy-Dihj0Yer.js +0 -1
  372. package/dist/assets/offline_download-DxpJvSO1.js +0 -1
  373. package/dist/assets/pdf-CfMOFvAk.js +0 -1
  374. package/dist/assets/plist-B2ey-UbE.js +0 -1
  375. package/dist/assets/plist-legacy-nNU188nf.js +0 -1
  376. package/dist/assets/share-DNtGrOny.js +0 -1
  377. package/dist/assets/share-legacy-CByhnUP5.js +0 -1
  378. package/dist/assets/url-legacy-zjBnPvq3.js +0 -1
  379. package/dist/assets/video-D8UBexeA.js +0 -7
  380. package/dist/assets/video-legacy-7ZBagWGT.js +0 -9
  381. package/dist/assets/video360-S9N_wRGU.js +0 -14
  382. package/dist/assets/video_box-DeH7KD70.js +0 -6
  383. package/dist/assets/video_box-legacy-Mw_-05cz.js +0 -8
  384. package/dist/lite/assets/2fa-legacy-Dj5_dvuI.js +0 -1
  385. package/dist/lite/assets/AddOrEdit-legacy-D0TWlHkD.js +0 -1
  386. package/dist/lite/assets/AddOrEdit-sm6uaDIy.js +0 -1
  387. package/dist/lite/assets/Common-BPK93nYo.js +0 -1
  388. package/dist/lite/assets/Decompress-C2Lk2JAD.js +0 -1
  389. package/dist/lite/assets/File-nLFXqvpn.js +0 -2
  390. package/dist/lite/assets/Folder-B9wfcsQn.js +0 -115
  391. package/dist/lite/assets/Grid-CJA599oi.js +0 -1
  392. package/dist/lite/assets/Grid-legacy-NuLJQxTX.js +0 -1
  393. package/dist/lite/assets/Layout-BCeH3ISX.js +0 -6
  394. package/dist/lite/assets/Layout-legacy-D-U-qCBj.js +0 -6
  395. package/dist/lite/assets/List-DWohtCjP.js +0 -1
  396. package/dist/lite/assets/List-legacy-7wU0oS5r.js +0 -1
  397. package/dist/lite/assets/Messenger-CsEswEQt.js +0 -1
  398. package/dist/lite/assets/Messenger-legacy-DrU2G55m.js +0 -1
  399. package/dist/lite/assets/PackageDownload-wVyvOPV1.js +0 -1
  400. package/dist/lite/assets/Shares-CNToMiBY.js +0 -1
  401. package/dist/lite/assets/Shares-legacy-CL4XTLn7.js +0 -1
  402. package/dist/lite/assets/Storages-DFKh9x2s.js +0 -1
  403. package/dist/lite/assets/Storages-legacy-DicEAOiz.js +0 -1
  404. package/dist/lite/assets/Users-BPxeaGf7.js +0 -1
  405. package/dist/lite/assets/aliyun_video-CW4BMFha.js +0 -1
  406. package/dist/lite/assets/aliyun_video-legacy-DH_5cfpn.js +0 -1
  407. package/dist/lite/assets/archive-BFanLdHk.js +0 -1
  408. package/dist/lite/assets/archive-legacy-CjwJABWB.js +0 -1
  409. package/dist/lite/assets/audio-Bz0HeFhq.js +0 -1
  410. package/dist/lite/assets/entry-B9dcANPh.js +0 -1
  411. package/dist/lite/assets/entry-C3ZspzL4.js +0 -1
  412. package/dist/lite/assets/entry-legacy-R7kMTo3V.js +0 -1
  413. package/dist/lite/assets/entry-legacy-eP5WFPw1.js +0 -1
  414. package/dist/lite/assets/helper-C_i2CKoc.js +0 -1
  415. package/dist/lite/assets/helper-legacy-Bt9qsJiz.js +0 -1
  416. package/dist/lite/assets/hls-B55FPkB1.js +0 -6
  417. package/dist/lite/assets/hls-legacy-Dyv4hjlJ.js +0 -8
  418. package/dist/lite/assets/image-legacy-CwUFPK2J.js +0 -1
  419. package/dist/lite/assets/index-B0k0lAAD.js +0 -21
  420. package/dist/lite/assets/index-CL47_I4K.js +0 -2
  421. package/dist/lite/assets/index-Dxmkyyam.js +0 -14
  422. package/dist/lite/assets/index-NPNVo9tx.js +0 -1
  423. package/dist/lite/assets/index-legacy-BhkNsIf-.js +0 -1
  424. package/dist/lite/assets/index-legacy-CiHQsOG2.js +0 -1
  425. package/dist/lite/assets/index-legacy-DG1n7Toc.js +0 -18
  426. package/dist/lite/assets/item_type-CV3e5W3l.js +0 -1
  427. package/dist/lite/assets/markdown-legacy-wqCwdPoE.js +0 -1
  428. package/dist/lite/assets/markdown_with_word_wrap-BbnhIxcj.js +0 -1
  429. package/dist/lite/assets/markdown_with_word_wrap-legacy-q_qBpxCP.js +0 -1
  430. package/dist/lite/assets/offline_download-gt_gfzRS.js +0 -1
  431. package/dist/lite/assets/pdf-BwR8x2Su.js +0 -1
  432. package/dist/lite/assets/plist-legacy-DysEcNae.js +0 -1
  433. package/dist/lite/assets/plist-zHbV8bKN.js +0 -1
  434. package/dist/lite/assets/share-B5zf6Y3e.js +0 -1
  435. package/dist/lite/assets/share-legacy-DH6yCSyI.js +0 -1
  436. package/dist/lite/assets/url-legacy-CKEaRjH-.js +0 -1
  437. package/dist/lite/assets/video-ayusCe4g.js +0 -7
  438. package/dist/lite/assets/video-legacy-C2hYIYr9.js +0 -9
  439. package/dist/lite/assets/video360-fBTGc__C.js +0 -14
  440. package/dist/lite/assets/video_box-DgIi5cnu.js +0 -6
  441. package/dist/lite/assets/video_box-legacy-DuUpHJiA.js +0 -8
@@ -1,7 +0,0 @@
1
- import{cJ as ii,j as ai,aj as ni,d$ as ri,a8 as Ge,e0 as At,cW as Je,aE as si,av as oi,aZ as di,co as _i,cp as li,as as ci,N as ui,B as hi,D as Et,al as fi,ao as pi,z as Rt,e1 as Tt}from"./index-B0k0lAAD.js";import{O as mi,A as gi}from"./icon-DHjoKQ07.js";import{A as yi,V as vi,a as Si}from"./video_box-DgIi5cnu.js";import{a as bi,b as Ai,H as Ei}from"./hls-B55FPkB1.js";import"./index-NPNVo9tx.js";import"./Layout-BCeH3ISX.js";import"./useTitle-Dta1n-65.js";import"./FolderTree-CYeej_v3.js";import"./index-DIyzNT5-.js";import"./index-Dxmkyyam.js";import"./share-B5zf6Y3e.js";import"./index-Pq7HU_X9.js";var st={exports:{}},kt;function Ri(){return kt||(kt=1,function($e,ot){(function(me,te){$e.exports=te()})(window,function(){return function(me){var te={};function O(F){if(te[F])return te[F].exports;var M=te[F]={i:F,l:!1,exports:{}};return me[F].call(M.exports,M,M.exports,O),M.l=!0,M.exports}return O.m=me,O.c=te,O.d=function(F,M,f){O.o(F,M)||Object.defineProperty(F,M,{enumerable:!0,get:f})},O.r=function(F){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(F,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(F,"__esModule",{value:!0})},O.t=function(F,M){if(1&M&&(F=O(F)),8&M||4&M&&typeof F=="object"&&F&&F.__esModule)return F;var f=Object.create(null);if(O.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:F}),2&M&&typeof F!="string")for(var y in F)O.d(f,y,(function(v){return F[v]}).bind(null,y));return f},O.n=function(F){var M=F&&F.__esModule?function(){return F.default}:function(){return F};return O.d(M,"a",M),M},O.o=function(F,M){return Object.prototype.hasOwnProperty.call(F,M)},O.p="",O(O.s=20)}([function(me,te,O){var F=O(9),M=O.n(F),f=function(){function y(){}return y.e=function(v,g){v&&!y.FORCE_GLOBAL_TAG||(v=y.GLOBAL_TAG);var T="[".concat(v,"] > ").concat(g);y.ENABLE_CALLBACK&&y.emitter.emit("log","error",T),y.ENABLE_ERROR&&(console.error?console.error(T):console.warn?console.warn(T):console.log(T))},y.i=function(v,g){v&&!y.FORCE_GLOBAL_TAG||(v=y.GLOBAL_TAG);var T="[".concat(v,"] > ").concat(g);y.ENABLE_CALLBACK&&y.emitter.emit("log","info",T),y.ENABLE_INFO&&(console.info?console.info(T):console.log(T))},y.w=function(v,g){v&&!y.FORCE_GLOBAL_TAG||(v=y.GLOBAL_TAG);var T="[".concat(v,"] > ").concat(g);y.ENABLE_CALLBACK&&y.emitter.emit("log","warn",T),y.ENABLE_WARN&&(console.warn?console.warn(T):console.log(T))},y.d=function(v,g){v&&!y.FORCE_GLOBAL_TAG||(v=y.GLOBAL_TAG);var T="[".concat(v,"] > ").concat(g);y.ENABLE_CALLBACK&&y.emitter.emit("log","debug",T),y.ENABLE_DEBUG&&(console.debug?console.debug(T):console.log(T))},y.v=function(v,g){v&&!y.FORCE_GLOBAL_TAG||(v=y.GLOBAL_TAG);var T="[".concat(v,"] > ").concat(g);y.ENABLE_CALLBACK&&y.emitter.emit("log","verbose",T),y.ENABLE_VERBOSE&&console.log(T)},y}();f.GLOBAL_TAG="mpegts.js",f.FORCE_GLOBAL_TAG=!1,f.ENABLE_ERROR=!0,f.ENABLE_INFO=!0,f.ENABLE_WARN=!0,f.ENABLE_DEBUG=!0,f.ENABLE_VERBOSE=!0,f.ENABLE_CALLBACK=!1,f.emitter=new M.a,te.a=f},function(me,te,O){var F;(function(M){M.IO_ERROR="io_error",M.DEMUX_ERROR="demux_error",M.INIT_SEGMENT="init_segment",M.MEDIA_SEGMENT="media_segment",M.LOADING_COMPLETE="loading_complete",M.RECOVERED_EARLY_EOF="recovered_early_eof",M.MEDIA_INFO="media_info",M.METADATA_ARRIVED="metadata_arrived",M.SCRIPTDATA_ARRIVED="scriptdata_arrived",M.TIMED_ID3_METADATA_ARRIVED="timed_id3_metadata_arrived",M.SYNCHRONOUS_KLV_METADATA_ARRIVED="synchronous_klv_metadata_arrived",M.ASYNCHRONOUS_KLV_METADATA_ARRIVED="asynchronous_klv_metadata_arrived",M.SMPTE2038_METADATA_ARRIVED="smpte2038_metadata_arrived",M.SCTE35_METADATA_ARRIVED="scte35_metadata_arrived",M.PES_PRIVATE_DATA_DESCRIPTOR="pes_private_data_descriptor",M.PES_PRIVATE_DATA_ARRIVED="pes_private_data_arrived",M.STATISTICS_INFO="statistics_info",M.RECOMMEND_SEEKPOINT="recommend_seekpoint"})(F||(F={})),te.a=F},function(me,te,O){O.d(te,"c",function(){return M}),O.d(te,"b",function(){return f}),O.d(te,"a",function(){return y});var F=O(3),M={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},f={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},y=function(){function v(g){this._type=g||"undefined",this._status=M.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return v.prototype.destroy=function(){this._status=M.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},v.prototype.isWorking=function(){return this._status===M.kConnecting||this._status===M.kBuffering},Object.defineProperty(v.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(g){this._onContentLengthKnown=g},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(g){this._onURLRedirect=g},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(g){this._onDataArrival=g},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onError",{get:function(){return this._onError},set:function(g){this._onError=g},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onComplete",{get:function(){return this._onComplete},set:function(g){this._onComplete=g},enumerable:!1,configurable:!0}),v.prototype.open=function(g,T){throw new F.c("Unimplemented abstract function!")},v.prototype.abort=function(){throw new F.c("Unimplemented abstract function!")},v}()},function(me,te,O){O.d(te,"d",function(){return f}),O.d(te,"a",function(){return y}),O.d(te,"b",function(){return v}),O.d(te,"c",function(){return g});var F,M=(F=function(T,E){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,I){L.__proto__=I}||function(L,I){for(var w in I)Object.prototype.hasOwnProperty.call(I,w)&&(L[w]=I[w])})(T,E)},function(T,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function L(){this.constructor=T}F(T,E),T.prototype=E===null?Object.create(E):(L.prototype=E.prototype,new L)}),f=function(){function T(E){this._message=E}return Object.defineProperty(T.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),T.prototype.toString=function(){return this.name+": "+this.message},T}(),y=function(T){function E(L){return T.call(this,L)||this}return M(E,T),Object.defineProperty(E.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),E}(f),v=function(T){function E(L){return T.call(this,L)||this}return M(E,T),Object.defineProperty(E.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),E}(f),g=function(T){function E(L){return T.call(this,L)||this}return M(E,T),Object.defineProperty(E.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),E}(f)},function(me,te,O){var F;(function(M){M.ERROR="error",M.LOADING_COMPLETE="loading_complete",M.RECOVERED_EARLY_EOF="recovered_early_eof",M.MEDIA_INFO="media_info",M.METADATA_ARRIVED="metadata_arrived",M.SCRIPTDATA_ARRIVED="scriptdata_arrived",M.TIMED_ID3_METADATA_ARRIVED="timed_id3_metadata_arrived",M.SYNCHRONOUS_KLV_METADATA_ARRIVED="synchronous_klv_metadata_arrived",M.ASYNCHRONOUS_KLV_METADATA_ARRIVED="asynchronous_klv_metadata_arrived",M.SMPTE2038_METADATA_ARRIVED="smpte2038_metadata_arrived",M.SCTE35_METADATA_ARRIVED="scte35_metadata_arrived",M.PES_PRIVATE_DATA_DESCRIPTOR="pes_private_data_descriptor",M.PES_PRIVATE_DATA_ARRIVED="pes_private_data_arrived",M.STATISTICS_INFO="statistics_info",M.DESTROYING="destroying"})(F||(F={})),te.a=F},function(me,te,O){var F={};(function(){var M=self.navigator.userAgent.toLowerCase(),f=/(edge)\/([\w.]+)/.exec(M)||/(opr)[\/]([\w.]+)/.exec(M)||/(chrome)[ \/]([\w.]+)/.exec(M)||/(iemobile)[\/]([\w.]+)/.exec(M)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(M)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(M)||/(webkit)[ \/]([\w.]+)/.exec(M)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(M)||/(msie) ([\w.]+)/.exec(M)||M.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(M)||M.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(M)||[],y=/(ipad)/.exec(M)||/(ipod)/.exec(M)||/(windows phone)/.exec(M)||/(iphone)/.exec(M)||/(kindle)/.exec(M)||/(android)/.exec(M)||/(windows)/.exec(M)||/(mac)/.exec(M)||/(linux)/.exec(M)||/(cros)/.exec(M)||[],v={browser:f[5]||f[3]||f[1]||"",version:f[2]||f[4]||"0",majorVersion:f[4]||f[2]||"0",platform:y[0]||""},g={};if(v.browser){g[v.browser]=!0;var T=v.majorVersion.split(".");g.version={major:parseInt(v.majorVersion,10),string:v.version},T.length>1&&(g.version.minor=parseInt(T[1],10)),T.length>2&&(g.version.build=parseInt(T[2],10))}v.platform&&(g[v.platform]=!0),(g.chrome||g.opr||g.safari)&&(g.webkit=!0),(g.rv||g.iemobile)&&(g.rv&&delete g.rv,v.browser="msie",g.msie=!0),g.edge&&(delete g.edge,v.browser="msedge",g.msedge=!0),g.opr&&(v.browser="opera",g.opera=!0),g.safari&&g.android&&(v.browser="android",g.android=!0);for(var E in g.name=v.browser,g.platform=v.platform,F)F.hasOwnProperty(E)&&delete F[E];Object.assign(F,g)})(),te.a=F},function(me,te,O){te.a={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},function(me,te,O){var F;(function(M){M.ERROR="error",M.SOURCE_OPEN="source_open",M.UPDATE_END="update_end",M.BUFFER_FULL="buffer_full",M.START_STREAMING="start_streaming",M.END_STREAMING="end_streaming"})(F||(F={})),te.a=F},function(me,te,O){var F=O(9),M=O.n(F),f=O(0),y=function(){function v(){}return Object.defineProperty(v,"forceGlobalTag",{get:function(){return f.a.FORCE_GLOBAL_TAG},set:function(g){f.a.FORCE_GLOBAL_TAG=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"globalTag",{get:function(){return f.a.GLOBAL_TAG},set:function(g){f.a.GLOBAL_TAG=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableAll",{get:function(){return f.a.ENABLE_VERBOSE&&f.a.ENABLE_DEBUG&&f.a.ENABLE_INFO&&f.a.ENABLE_WARN&&f.a.ENABLE_ERROR},set:function(g){f.a.ENABLE_VERBOSE=g,f.a.ENABLE_DEBUG=g,f.a.ENABLE_INFO=g,f.a.ENABLE_WARN=g,f.a.ENABLE_ERROR=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableDebug",{get:function(){return f.a.ENABLE_DEBUG},set:function(g){f.a.ENABLE_DEBUG=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableVerbose",{get:function(){return f.a.ENABLE_VERBOSE},set:function(g){f.a.ENABLE_VERBOSE=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableInfo",{get:function(){return f.a.ENABLE_INFO},set:function(g){f.a.ENABLE_INFO=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableWarn",{get:function(){return f.a.ENABLE_WARN},set:function(g){f.a.ENABLE_WARN=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableError",{get:function(){return f.a.ENABLE_ERROR},set:function(g){f.a.ENABLE_ERROR=g,v._notifyChange()},enumerable:!1,configurable:!0}),v.getConfig=function(){return{globalTag:f.a.GLOBAL_TAG,forceGlobalTag:f.a.FORCE_GLOBAL_TAG,enableVerbose:f.a.ENABLE_VERBOSE,enableDebug:f.a.ENABLE_DEBUG,enableInfo:f.a.ENABLE_INFO,enableWarn:f.a.ENABLE_WARN,enableError:f.a.ENABLE_ERROR,enableCallback:f.a.ENABLE_CALLBACK}},v.applyConfig=function(g){f.a.GLOBAL_TAG=g.globalTag,f.a.FORCE_GLOBAL_TAG=g.forceGlobalTag,f.a.ENABLE_VERBOSE=g.enableVerbose,f.a.ENABLE_DEBUG=g.enableDebug,f.a.ENABLE_INFO=g.enableInfo,f.a.ENABLE_WARN=g.enableWarn,f.a.ENABLE_ERROR=g.enableError,f.a.ENABLE_CALLBACK=g.enableCallback},v._notifyChange=function(){var g=v.emitter;if(g.listenerCount("change")>0){var T=v.getConfig();g.emit("change",T)}},v.registerListener=function(g){v.emitter.addListener("change",g)},v.removeListener=function(g){v.emitter.removeListener("change",g)},v.addLogListener=function(g){f.a.emitter.addListener("log",g),f.a.emitter.listenerCount("log")>0&&(f.a.ENABLE_CALLBACK=!0,v._notifyChange())},v.removeLogListener=function(g){f.a.emitter.removeListener("log",g),f.a.emitter.listenerCount("log")===0&&(f.a.ENABLE_CALLBACK=!1,v._notifyChange())},v}();y.emitter=new M.a,te.a=y},function(me,te,O){var F,M=typeof Reflect=="object"?Reflect:null,f=M&&typeof M.apply=="function"?M.apply:function(k,q,W){return Function.prototype.apply.call(k,q,W)};F=M&&typeof M.ownKeys=="function"?M.ownKeys:Object.getOwnPropertySymbols?function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:function(k){return Object.getOwnPropertyNames(k)};var y=Number.isNaN||function(k){return k!=k};function v(){v.init.call(this)}me.exports=v,me.exports.once=function(k,q){return new Promise(function(W,D){function l(d){k.removeListener(q,_),D(d)}function _(){typeof k.removeListener=="function"&&k.removeListener("error",l),W([].slice.call(arguments))}K(k,q,_,{once:!0}),q!=="error"&&function(d,p,V){typeof d.on=="function"&&K(d,"error",p,V)}(k,l,{once:!0})})},v.EventEmitter=v,v.prototype._events=void 0,v.prototype._eventsCount=0,v.prototype._maxListeners=void 0;var g=10;function T(k){if(typeof k!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}function E(k){return k._maxListeners===void 0?v.defaultMaxListeners:k._maxListeners}function L(k,q,W,D){var l,_,d,p;if(T(W),(_=k._events)===void 0?(_=k._events=Object.create(null),k._eventsCount=0):(_.newListener!==void 0&&(k.emit("newListener",q,W.listener?W.listener:W),_=k._events),d=_[q]),d===void 0)d=_[q]=W,++k._eventsCount;else if(typeof d=="function"?d=_[q]=D?[W,d]:[d,W]:D?d.unshift(W):d.push(W),(l=E(k))>0&&d.length>l&&!d.warned){d.warned=!0;var V=new Error("Possible EventEmitter memory leak detected. "+d.length+" "+String(q)+" listeners added. Use emitter.setMaxListeners() to increase limit");V.name="MaxListenersExceededWarning",V.emitter=k,V.type=q,V.count=d.length,p=V,console&&console.warn&&console.warn(p)}return k}function I(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function w(k,q,W){var D={fired:!1,wrapFn:void 0,target:k,type:q,listener:W},l=I.bind(D);return l.listener=W,D.wrapFn=l,l}function x(k,q,W){var D=k._events;if(D===void 0)return[];var l=D[q];return l===void 0?[]:typeof l=="function"?W?[l.listener||l]:[l]:W?function(_){for(var d=new Array(_.length),p=0;p<d.length;++p)d[p]=_[p].listener||_[p];return d}(l):B(l,l.length)}function U(k){var q=this._events;if(q!==void 0){var W=q[k];if(typeof W=="function")return 1;if(W!==void 0)return W.length}return 0}function B(k,q){for(var W=new Array(q),D=0;D<q;++D)W[D]=k[D];return W}function K(k,q,W,D){if(typeof k.on=="function")D.once?k.once(q,W):k.on(q,W);else{if(typeof k.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof k);k.addEventListener(q,function l(_){D.once&&k.removeEventListener(q,l),W(_)})}}Object.defineProperty(v,"defaultMaxListeners",{enumerable:!0,get:function(){return g},set:function(k){if(typeof k!="number"||k<0||y(k))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+k+".");g=k}}),v.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},v.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||y(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this},v.prototype.getMaxListeners=function(){return E(this)},v.prototype.emit=function(k){for(var q=[],W=1;W<arguments.length;W++)q.push(arguments[W]);var D=k==="error",l=this._events;if(l!==void 0)D=D&&l.error===void 0;else if(!D)return!1;if(D){var _;if(q.length>0&&(_=q[0]),_ instanceof Error)throw _;var d=new Error("Unhandled error."+(_?" ("+_.message+")":""));throw d.context=_,d}var p=l[k];if(p===void 0)return!1;if(typeof p=="function")f(p,this,q);else{var V=p.length,J=B(p,V);for(W=0;W<V;++W)f(J[W],this,q)}return!0},v.prototype.addListener=function(k,q){return L(this,k,q,!1)},v.prototype.on=v.prototype.addListener,v.prototype.prependListener=function(k,q){return L(this,k,q,!0)},v.prototype.once=function(k,q){return T(q),this.on(k,w(this,k,q)),this},v.prototype.prependOnceListener=function(k,q){return T(q),this.prependListener(k,w(this,k,q)),this},v.prototype.removeListener=function(k,q){var W,D,l,_,d;if(T(q),(D=this._events)===void 0)return this;if((W=D[k])===void 0)return this;if(W===q||W.listener===q)--this._eventsCount==0?this._events=Object.create(null):(delete D[k],D.removeListener&&this.emit("removeListener",k,W.listener||q));else if(typeof W!="function"){for(l=-1,_=W.length-1;_>=0;_--)if(W[_]===q||W[_].listener===q){d=W[_].listener,l=_;break}if(l<0)return this;l===0?W.shift():function(p,V){for(;V+1<p.length;V++)p[V]=p[V+1];p.pop()}(W,l),W.length===1&&(D[k]=W[0]),D.removeListener!==void 0&&this.emit("removeListener",k,d||q)}return this},v.prototype.off=v.prototype.removeListener,v.prototype.removeAllListeners=function(k){var q,W,D;if((W=this._events)===void 0)return this;if(W.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):W[k]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete W[k]),this;if(arguments.length===0){var l,_=Object.keys(W);for(D=0;D<_.length;++D)(l=_[D])!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(q=W[k])=="function")this.removeListener(k,q);else if(q!==void 0)for(D=q.length-1;D>=0;D--)this.removeListener(k,q[D]);return this},v.prototype.listeners=function(k){return x(this,k,!0)},v.prototype.rawListeners=function(k){return x(this,k,!1)},v.listenerCount=function(k,q){return typeof k.listenerCount=="function"?k.listenerCount(q):U.call(k,q)},v.prototype.listenerCount=U,v.prototype.eventNames=function(){return this._eventsCount>0?F(this._events):[]}},function(me,te,O){O.d(te,"b",function(){return f}),O.d(te,"a",function(){return y});var F=O(2),M=O(6),f={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},y={NETWORK_EXCEPTION:F.b.EXCEPTION,NETWORK_STATUS_CODE_INVALID:F.b.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:F.b.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:F.b.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:M.a.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:M.a.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:M.a.CODEC_UNSUPPORTED}},function(me,te,O){O.d(te,"d",function(){return F}),O.d(te,"b",function(){return M}),O.d(te,"a",function(){return f}),O.d(te,"c",function(){return y});var F=function(v,g,T,E,L){this.dts=v,this.pts=g,this.duration=T,this.originalDts=E,this.isSyncPoint=L,this.fileposition=null},M=function(){function v(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return v.prototype.appendSyncPoint=function(g){g.isSyncPoint=!0,this.syncPoints.push(g)},v}(),f=function(){function v(){this._list=[]}return v.prototype.clear=function(){this._list=[]},v.prototype.appendArray=function(g){var T=this._list;g.length!==0&&(T.length>0&&g[0].originalDts<T[T.length-1].originalDts&&this.clear(),Array.prototype.push.apply(T,g))},v.prototype.getLastSyncPointBeforeDts=function(g){if(this._list.length==0)return null;var T=this._list,E=0,L=T.length-1,I=0,w=0,x=L;for(g<T[0].dts&&(E=0,w=x+1);w<=x;){if((I=w+Math.floor((x-w)/2))===L||g>=T[I].dts&&g<T[I+1].dts){E=I;break}T[I].dts<g?w=I+1:x=I-1}return this._list[E]},v}(),y=function(){function v(g){this._type=g,this._list=[],this._lastAppendLocation=-1}return Object.defineProperty(v.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),v.prototype.isEmpty=function(){return this._list.length===0},v.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},v.prototype._searchNearestSegmentBefore=function(g){var T=this._list;if(T.length===0)return-2;var E=T.length-1,L=0,I=0,w=E,x=0;if(g<T[0].originalBeginDts)return x=-1;for(;I<=w;){if((L=I+Math.floor((w-I)/2))===E||g>T[L].lastSample.originalDts&&g<T[L+1].originalBeginDts){x=L;break}T[L].originalBeginDts<g?I=L+1:w=L-1}return x},v.prototype._searchNearestSegmentAfter=function(g){return this._searchNearestSegmentBefore(g)+1},v.prototype.append=function(g){var T=this._list,E=g,L=this._lastAppendLocation,I=0;L!==-1&&L<T.length&&E.originalBeginDts>=T[L].lastSample.originalDts&&(L===T.length-1||L<T.length-1&&E.originalBeginDts<T[L+1].originalBeginDts)?I=L+1:T.length>0&&(I=this._searchNearestSegmentBefore(E.originalBeginDts)+1),this._lastAppendLocation=I,this._list.splice(I,0,E)},v.prototype.getLastSegmentBefore=function(g){var T=this._searchNearestSegmentBefore(g);return T>=0?this._list[T]:null},v.prototype.getLastSampleBefore=function(g){var T=this.getLastSegmentBefore(g);return T!=null?T.lastSample:null},v.prototype.getLastSyncPointBefore=function(g){for(var T=this._searchNearestSegmentBefore(g),E=this._list[T].syncPoints;E.length===0&&T>0;)T--,E=this._list[T].syncPoints;return E.length>0?E[E.length-1]:null},v}()},function(me,te,O){var F=function(){function M(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return M.prototype.isComplete=function(){var f=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,y=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&f&&y},M.prototype.isSeekable=function(){return this.hasKeyframesIndex===!0},M.prototype.getNearestKeyframe=function(f){if(this.keyframesIndex==null)return null;var y=this.keyframesIndex,v=this._search(y.times,f);return{index:v,milliseconds:y.times[v],fileposition:y.filepositions[v]}},M.prototype._search=function(f,y){var v=0,g=f.length-1,T=0,E=0,L=g;for(y<f[0]&&(v=0,E=L+1);E<=L;){if((T=E+Math.floor((L-E)/2))===g||y>=f[T]&&y<f[T+1]){v=T;break}f[T]<y?E=T+1:L=T-1}return v},M}();te.a=F},function(me,te,O){var F=O(9),M=O.n(F),f=O(0),y=O(5),v=O(12);function g(a,i,t){var e=a;if(i+t<e.length){for(;t--;)if((192&e[++i])!=128)return!1;return!0}return!1}var T,E=function(a){for(var i=[],t=a,e=0,n=a.length;e<n;)if(t[e]<128)i.push(String.fromCharCode(t[e])),++e;else{if(!(t[e]<192)){if(t[e]<224){if(g(t,e,1)&&(s=(31&t[e])<<6|63&t[e+1])>=128){i.push(String.fromCharCode(65535&s)),e+=2;continue}}else if(t[e]<240){if(g(t,e,2)&&(s=(15&t[e])<<12|(63&t[e+1])<<6|63&t[e+2])>=2048&&(63488&s)!=55296){i.push(String.fromCharCode(65535&s)),e+=3;continue}}else if(t[e]<248){var s;if(g(t,e,3)&&(s=(7&t[e])<<18|(63&t[e+1])<<12|(63&t[e+2])<<6|63&t[e+3])>65536&&s<1114112){s-=65536,i.push(String.fromCharCode(s>>>10|55296)),i.push(String.fromCharCode(1023&s|56320)),e+=4;continue}}}i.push("�"),++e}return i.join("")},L=O(3),I=(T=new ArrayBuffer(2),new DataView(T).setInt16(0,256,!0),new Int16Array(T)[0]===256),w=function(){function a(){}return a.parseScriptData=function(i,t,e){var n={};try{var s=a.parseValue(i,t,e),r=a.parseValue(i,t+s.size,e-s.size);n[s.data]=r.data}catch(o){f.a.e("AMF",o.toString())}return n},a.parseObject=function(i,t,e){if(e<3)throw new L.a("Data not enough when parse ScriptDataObject");var n=a.parseString(i,t,e),s=a.parseValue(i,t+n.size,e-n.size),r=s.objectEnd;return{data:{name:n.data,value:s.data},size:n.size+s.size,objectEnd:r}},a.parseVariable=function(i,t,e){return a.parseObject(i,t,e)},a.parseString=function(i,t,e){if(e<2)throw new L.a("Data not enough when parse String");var n=new DataView(i,t,e).getUint16(0,!I);return{data:n>0?E(new Uint8Array(i,t+2,n)):"",size:2+n}},a.parseLongString=function(i,t,e){if(e<4)throw new L.a("Data not enough when parse LongString");var n=new DataView(i,t,e).getUint32(0,!I);return{data:n>0?E(new Uint8Array(i,t+4,n)):"",size:4+n}},a.parseDate=function(i,t,e){if(e<10)throw new L.a("Data size invalid when parse Date");var n=new DataView(i,t,e),s=n.getFloat64(0,!I),r=n.getInt16(8,!I);return{data:new Date(s+=60*r*1e3),size:10}},a.parseValue=function(i,t,e){if(e<1)throw new L.a("Data not enough when parse Value");var n,s=new DataView(i,t,e),r=1,o=s.getUint8(0),h=!1;try{switch(o){case 0:n=s.getFloat64(1,!I),r+=8;break;case 1:n=!!s.getUint8(1),r+=1;break;case 2:var u=a.parseString(i,t+1,e-1);n=u.data,r+=u.size;break;case 3:n={};var m=0;for((16777215&s.getUint32(e-4,!I))==9&&(m=3);r<e-4;){var A=a.parseObject(i,t+r,e-r-m);if(A.objectEnd)break;n[A.data.name]=A.data.value,r+=A.size}r<=e-3&&(16777215&s.getUint32(r-1,!I))===9&&(r+=3);break;case 8:for(n={},r+=4,m=0,(16777215&s.getUint32(e-4,!I))==9&&(m=3);r<e-8;){var S=a.parseVariable(i,t+r,e-r-m);if(S.objectEnd)break;n[S.data.name]=S.data.value,r+=S.size}r<=e-3&&(16777215&s.getUint32(r-1,!I))===9&&(r+=3);break;case 9:n=void 0,r=1,h=!0;break;case 10:n=[];var R=s.getUint32(1,!I);r+=4;for(var P=0;P<R;P++){var H=a.parseValue(i,t+r,e-r);n.push(H.data),r+=H.size}break;case 11:var N=a.parseDate(i,t+1,e-1);n=N.data,r+=N.size;break;case 12:var ee=a.parseString(i,t+1,e-1);n=ee.data,r+=ee.size;break;default:r=e,f.a.w("AMF","Unsupported AMF value type "+o)}}catch($){f.a.e("AMF",$.toString())}return{data:n,size:r,objectEnd:h}},a}(),x=function(){function a(i){this.TAG="ExpGolomb",this._buffer=i,this._buffer_index=0,this._total_bytes=i.byteLength,this._total_bits=8*i.byteLength,this._current_word=0,this._current_word_bits_left=0}return a.prototype.destroy=function(){this._buffer=null},a.prototype._fillCurrentWord=function(){var i=this._total_bytes-this._buffer_index;if(i<=0)throw new L.a("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,i),e=new Uint8Array(4);e.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(e.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t},a.prototype.readBits=function(i){if(i>32)throw new L.b("ExpGolomb: readBits() bits exceeded max 32bits!");if(i<=this._current_word_bits_left){var t=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,t}var e=this._current_word_bits_left?this._current_word:0;e>>>=32-this._current_word_bits_left;var n=i-this._current_word_bits_left;this._fillCurrentWord();var s=Math.min(n,this._current_word_bits_left),r=this._current_word>>>32-s;return this._current_word<<=s,this._current_word_bits_left-=s,e=e<<s|r},a.prototype.readBool=function(){return this.readBits(1)===1},a.prototype.readByte=function(){return this.readBits(8)},a.prototype._skipLeadingZero=function(){var i;for(i=0;i<this._current_word_bits_left;i++)if((this._current_word&2147483648>>>i)!=0)return this._current_word<<=i,this._current_word_bits_left-=i,i;return this._fillCurrentWord(),i+this._skipLeadingZero()},a.prototype.readUEG=function(){var i=this._skipLeadingZero();return this.readBits(i+1)-1},a.prototype.readSEG=function(){var i=this.readUEG();return 1&i?i+1>>>1:-1*(i>>>1)},a}(),U=function(){function a(){}return a._ebsp2rbsp=function(i){for(var t=i,e=t.byteLength,n=new Uint8Array(e),s=0,r=0;r<e;r++)r>=2&&t[r]===3&&t[r-1]===0&&t[r-2]===0||(n[s]=t[r],s++);return new Uint8Array(n.buffer,0,s)},a.parseSPS=function(i){for(var t=i.subarray(1,4),e="avc1.",n=0;n<3;n++){var s=t[n].toString(16);s.length<2&&(s="0"+s),e+=s}var r=a._ebsp2rbsp(i),o=new x(r);o.readByte();var h=o.readByte();o.readByte();var u=o.readByte();o.readUEG();var m=a.getProfileString(h),A=a.getLevelString(u),S=1,R=420,P=8,H=8;if((h===100||h===110||h===122||h===244||h===44||h===83||h===86||h===118||h===128||h===138||h===144)&&((S=o.readUEG())===3&&o.readBits(1),S<=3&&(R=[0,420,422,444][S]),P=o.readUEG()+8,H=o.readUEG()+8,o.readBits(1),o.readBool()))for(var N=S!==3?8:12,ee=0;ee<N;ee++)o.readBool()&&(ee<6?a._skipScalingList(o,16):a._skipScalingList(o,64));o.readUEG();var $=o.readUEG();if($===0)o.readUEG();else if($===1){o.readBits(1),o.readSEG(),o.readSEG();var Q=o.readUEG();for(ee=0;ee<Q;ee++)o.readSEG()}var re=o.readUEG();o.readBits(1);var fe=o.readUEG(),Z=o.readUEG(),ae=o.readBits(1);ae===0&&o.readBits(1),o.readBits(1);var pe=0,se=0,ue=0,Se=0;o.readBool()&&(pe=o.readUEG(),se=o.readUEG(),ue=o.readUEG(),Se=o.readUEG());var Ae=1,he=1,ge=0,Re=!0,Le=0,xe=0;if(o.readBool()){if(o.readBool()){var De=o.readByte();De>0&&De<16?(Ae=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][De-1],he=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][De-1]):De===255&&(Ae=o.readByte()<<8|o.readByte(),he=o.readByte()<<8|o.readByte())}if(o.readBool()&&o.readBool(),o.readBool()&&(o.readBits(4),o.readBool()&&o.readBits(24)),o.readBool()&&(o.readUEG(),o.readUEG()),o.readBool()){var Pe=o.readBits(32),Be=o.readBits(32);Re=o.readBool(),ge=(Le=Be)/(xe=2*Pe)}}var Oe=1;Ae===1&&he===1||(Oe=Ae/he);var Ie=0,be=0;S===0?(Ie=1,be=2-ae):(Ie=S===3?1:2,be=(S===1?2:1)*(2-ae));var Ve=16*(fe+1),Fe=16*(Z+1)*(2-ae);Ve-=(pe+se)*Ie,Fe-=(ue+Se)*be;var Xe=Math.ceil(Ve*Oe);return o.destroy(),o=null,{codec_mimetype:e,profile_idc:h,level_idc:u,profile_string:m,level_string:A,chroma_format_idc:S,bit_depth:P,bit_depth_luma:P,bit_depth_chroma:H,ref_frames:re,chroma_format:R,chroma_format_string:a.getChromaFormatString(R),frame_rate:{fixed:Re,fps:ge,fps_den:xe,fps_num:Le},sar_ratio:{width:Ae,height:he},codec_size:{width:Ve,height:Fe},present_size:{width:Xe,height:Fe}}},a._skipScalingList=function(i,t){for(var e=8,n=8,s=0;s<t;s++)n!==0&&(n=(e+i.readSEG()+256)%256),e=n===0?e:n},a.getProfileString=function(i){switch(i){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}},a.getLevelString=function(i){return(i/10).toFixed(1)},a.getChromaFormatString=function(i){switch(i){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},a}(),B=O(6),K=function(){function a(){}return a._ebsp2rbsp=function(i){for(var t=i,e=t.byteLength,n=new Uint8Array(e),s=0,r=0;r<e;r++)r>=2&&t[r]===3&&t[r-1]===0&&t[r-2]===0||(n[s]=t[r],s++);return new Uint8Array(n.buffer,0,s)},a.parseVPS=function(i){var t=a._ebsp2rbsp(i),e=new x(t);return e.readByte(),e.readByte(),e.readBits(4),e.readBits(2),e.readBits(6),{num_temporal_layers:e.readBits(3)+1,temporal_id_nested:e.readBool()}},a.parseSPS=function(i){var t=a._ebsp2rbsp(i),e=new x(t);e.readByte(),e.readByte();for(var n=0,s=0,r=0,o=0,h=(e.readBits(4),e.readBits(3)),u=(e.readBool(),e.readBits(2)),m=e.readBool(),A=e.readBits(5),S=e.readByte(),R=e.readByte(),P=e.readByte(),H=e.readByte(),N=e.readByte(),ee=e.readByte(),$=e.readByte(),Q=e.readByte(),re=e.readByte(),fe=e.readByte(),Z=e.readByte(),ae=[],pe=[],se=0;se<h;se++)ae.push(e.readBool()),pe.push(e.readBool());if(h>0)for(se=h;se<8;se++)e.readBits(2);for(se=0;se<h;se++)ae[se]&&(e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte()),pe[se]&&e.readByte();e.readUEG();var ue=e.readUEG();ue==3&&e.readBits(1);var Se=e.readUEG(),Ae=e.readUEG();e.readBool()&&(n+=e.readUEG(),s+=e.readUEG(),r+=e.readUEG(),o+=e.readUEG());var he=e.readUEG(),ge=e.readUEG(),Re=e.readUEG();for(se=e.readBool()?0:h;se<=h;se++)e.readUEG(),e.readUEG(),e.readUEG();if(e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readBool()&&e.readBool())for(var Le=0;Le<4;Le++)for(var xe=0;xe<(Le===3?2:6);xe++)if(e.readBool()){var De=Math.min(64,1<<4+(Le<<1));for(Le>1&&e.readSEG(),se=0;se<De;se++)e.readSEG()}else e.readUEG();e.readBool(),e.readBool(),e.readBool()&&(e.readByte(),e.readUEG(),e.readUEG(),e.readBool());var Pe=e.readUEG(),Be=0;for(se=0;se<Pe;se++){var Oe=!1;if(se!==0&&(Oe=e.readBool()),Oe){se===Pe&&e.readUEG(),e.readBool(),e.readUEG();for(var Ie=0,be=0;be<=Be;be++){var Ve=e.readBool(),Fe=!1;Ve||(Fe=e.readBool()),(Ve||Fe)&&Ie++}Be=Ie}else{var Xe=e.readUEG(),ht=e.readUEG();for(Be=Xe+ht,be=0;be<Xe;be++)e.readUEG(),e.readBool();for(be=0;be<ht;be++)e.readUEG(),e.readBool()}}if(e.readBool()){var ei=e.readUEG();for(se=0;se<ei;se++){for(be=0;be<Re+4;be++)e.readBits(1);e.readBits(1)}}var ft=0,qe=1,Ke=1,pt=!1,tt=1,it=1;if(e.readBool(),e.readBool(),e.readBool()){if(e.readBool()){var We=e.readByte();We>0&&We<=16?(qe=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][We-1],Ke=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][We-1]):We===255&&(qe=e.readBits(16),Ke=e.readBits(16))}if(e.readBool()&&e.readBool(),e.readBool()&&(e.readBits(3),e.readBool(),e.readBool()&&(e.readByte(),e.readByte(),e.readByte())),e.readBool()&&(e.readUEG(),e.readUEG()),e.readBool(),e.readBool(),e.readBool(),e.readBool()&&(e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG()),e.readBool()&&(tt=e.readBits(32),it=e.readBits(32),e.readBool()&&e.readUEG(),e.readBool())){var at=!1,nt=!1,Qe=!1;for(at=e.readBool(),nt=e.readBool(),(at||nt)&&((Qe=e.readBool())&&(e.readByte(),e.readBits(5),e.readBool(),e.readBits(5)),e.readBits(4),e.readBits(4),Qe&&e.readBits(4),e.readBits(5),e.readBits(5),e.readBits(5)),se=0;se<=h;se++){var mt=e.readBool();pt=mt;var gt=!0,rt=1;mt||(gt=e.readBool());var yt=!1;if(gt?e.readUEG():yt=e.readBool(),yt||(rt=e.readUEG()+1),at){for(be=0;be<rt;be++)e.readUEG(),e.readUEG(),Qe&&(e.readUEG(),e.readUEG());e.readBool()}if(nt){for(be=0;be<rt;be++)e.readUEG(),e.readUEG(),Qe&&(e.readUEG(),e.readUEG());e.readBool()}}}e.readBool()&&(e.readBool(),e.readBool(),e.readBool(),ft=e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG())}e.readBool();var ti="hvc1.".concat(A,".1.L").concat(Z,".B0"),vt=Se-(n+s)*(ue===1||ue===2?2:1),St=Ae-(r+o)*(ue===1?2:1),bt=1;return qe!==1&&Ke!==1&&(bt=qe/Ke),e.destroy(),e=null,{codec_mimetype:ti,profile_string:a.getProfileString(A),level_string:a.getLevelString(Z),profile_idc:A,bit_depth:he+8,ref_frames:1,chroma_format:ue,chroma_format_string:a.getChromaFormatString(ue),general_level_idc:Z,general_profile_space:u,general_tier_flag:m,general_profile_idc:A,general_profile_compatibility_flags_1:S,general_profile_compatibility_flags_2:R,general_profile_compatibility_flags_3:P,general_profile_compatibility_flags_4:H,general_constraint_indicator_flags_1:N,general_constraint_indicator_flags_2:ee,general_constraint_indicator_flags_3:$,general_constraint_indicator_flags_4:Q,general_constraint_indicator_flags_5:re,general_constraint_indicator_flags_6:fe,min_spatial_segmentation_idc:ft,constant_frame_rate:0,chroma_format_idc:ue,bit_depth_luma_minus8:he,bit_depth_chroma_minus8:ge,frame_rate:{fixed:pt,fps:it/tt,fps_den:tt,fps_num:it},sar_ratio:{width:qe,height:Ke},codec_size:{width:vt,height:St},present_size:{width:vt*bt,height:St}}},a.parsePPS=function(i){var t=a._ebsp2rbsp(i),e=new x(t);e.readByte(),e.readByte(),e.readUEG(),e.readUEG(),e.readBool(),e.readBool(),e.readBits(3),e.readBool(),e.readBool(),e.readUEG(),e.readUEG(),e.readSEG(),e.readBool(),e.readBool(),e.readBool()&&e.readUEG(),e.readSEG(),e.readSEG(),e.readBool(),e.readBool(),e.readBool(),e.readBool();var n=e.readBool(),s=e.readBool(),r=1;return s&&n?r=0:s?r=3:n&&(r=2),{parallelismType:r}},a.getChromaFormatString=function(i){switch(i){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}},a.getProfileString=function(i){switch(i){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}},a.getLevelString=function(i){return(i/30).toFixed(1)},a}();function k(a){return a.byteOffset%2==0&&a.byteLength%2==0}function q(a){return a.byteOffset%4==0&&a.byteLength%4==0}function W(a,i){for(var t=0;t<a.length;t++)if(a[t]!==i[t])return!1;return!0}var D=function(a,i){return a.byteLength===i.byteLength&&(q(a)&&q(i)?function(t,e){return W(new Uint32Array(t.buffer,t.byteOffset,t.byteLength/4),new Uint32Array(e.buffer,e.byteOffset,e.byteLength/4))}(a,i):k(a)&&k(i)?function(t,e){return W(new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2))}(a,i):function(t,e){return W(t,e)}(a,i))},l=function(){return(l=Object.assign||function(a){for(var i,t=1,e=arguments.length;t<e;t++)for(var n in i=arguments[t])Object.prototype.hasOwnProperty.call(i,n)&&(a[n]=i[n]);return a}).apply(this,arguments)},_=function(){function a(){}return a.parseOBUs=function(i,t){for(var e=0;e<i.byteLength;){var n=e,s=(i[e],(120&i[e])>>3),r=(4&i[e])!=0,o=(2&i[e])!=0;i[e],e+=1,r&&(e+=1);var h=Number.POSITIVE_INFINITY;if(o){h=0;for(var u=0;;u++){var m=i[e++];if(h|=(127&m)<<7*u,(128&m)==0)break}}console.log(s),s===1?t=l(l({},a.parseSeuqneceHeader(i.subarray(e,e+h))),{sequence_header_data:i.subarray(n,e+h)}):(s==3&&t||s==6&&t)&&(t=a.parseOBUFrameHeader(i.subarray(e,e+h),0,0,t)),e+=h}return t},a.parseSeuqneceHeader=function(i){var t=new x(i),e=t.readBits(3),n=(t.readBool(),t.readBool()),s=!0,r=0,o=1,h=void 0,u=[];if(n)u.push({operating_point_idc:0,level:t.readBits(5),tier:0});else{if(t.readBool()){var m=t.readBits(32),A=t.readBits(32),S=t.readBool();if(S){for(var R=0;t.readBits(1)===0;)R+=1;R>=32||(1<<R)-1+t.readBits(R)}(r=A)/(o=m),s=S,t.readBool()&&(t.readBits(5),t.readBits(32),h=t.readBits(5),t.readBits(5))}for(var P=t.readBool(),H=t.readBits(5),N=0;N<=H;N++){var ee=t.readBits(12),$=t.readBits(5),Q=$>7?t.readBits(1):0;u.push({operating_point_idc:ee,level:$,tier:Q}),P&&t.readBool()&&t.readBits(4)}}var re=u[0],fe=re.level,Z=re.tier,ae=t.readBits(4),pe=t.readBits(4),se=t.readBits(ae+1)+1,ue=t.readBits(pe+1)+1,Se=!1;n||(Se=t.readBool()),Se&&(t.readBits(4),t.readBits(4)),t.readBool(),t.readBool(),t.readBool();var Ae=!1,he=2,ge=2,Re=0;n||(t.readBool(),t.readBool(),t.readBool(),t.readBool(),(Ae=t.readBool())&&(t.readBool(),t.readBool()),(he=t.readBool()?2:t.readBits(1))?ge=t.readBool()?2:t.readBits(1):ge=2,Ae?Re=t.readBits(3)+1:Re=0);var Le=t.readBool(),xe=(t.readBool(),t.readBool(),t.readBool()),De=8;e===2&&xe?De=t.readBool()?12:10:De=xe?10:8;var Pe=!1;e!==1&&(Pe=t.readBool()),t.readBool()&&(t.readBits(8),t.readBits(8),t.readBits(8));var Be=1,Oe=1;return Pe?(t.readBits(1),Be=1,Oe=1):(t.readBits(1),e==0?(Be=1,Oe=1):e==1?(Be=0,Oe=0):De==12?t.readBits(1)&&t.readBits(1):(Be=1,Oe=0),Be&&Oe&&t.readBits(2),t.readBits(1)),t.readBool(),t.destroy(),t=null,{codec_mimetype:"av01.".concat(e,".").concat(a.getLevelString(fe,Z),".").concat(De.toString(10).padStart(2,"0")),level:fe,tier:Z,level_string:a.getLevelString(fe,Z),profile_idc:e,profile_string:"".concat(e),bit_depth:De,ref_frames:1,chroma_format:a.getChromaFormat(Pe,Be,Oe),chroma_format_string:a.getChromaFormatString(Pe,Be,Oe),sequence_header:{frame_id_numbers_present_flag:Se,additional_frame_id_length_minus_1:void 0,delta_frame_id_length_minus_2:void 0,reduced_still_picture_header:n,decoder_model_info_present_flag:!1,operating_points:u,buffer_removal_time_length_minus_1:h,equal_picture_interval:s,seq_force_screen_content_tools:he,seq_force_integer_mv:ge,enable_order_hint:Ae,order_hint_bits:Re,enable_superres:Le,frame_width_bit:ae+1,frame_height_bit:pe+1,max_frame_width:se,max_frame_height:ue},keyframe:void 0,frame_rate:{fixed:s,fps:r/o,fps_den:o,fps_num:r}}},a.parseOBUFrameHeader=function(i,t,e,n){var s=n.sequence_header,r=new x(i),o=(s.max_frame_width,s.max_frame_height,0);s.frame_id_numbers_present_flag&&(o=s.additional_frame_id_length_minus_1+s.delta_frame_id_length_minus_2+3);var h=0,u=!0,m=!0,A=!1;if(!s.reduced_still_picture_header){if(r.readBool())return n;u=(h=r.readBits(2))===2||h===0,(m=r.readBool())&&s.decoder_model_info_present_flag&&s.equal_picture_interval,m&&r.readBool(),A=!!(h===3||h===0&&m)||r.readBool()}n.keyframe=u,r.readBool();var S=s.seq_force_screen_content_tools;s.seq_force_screen_content_tools===2&&(S=r.readBits(1)),S&&(s.seq_force_integer_mv,s.seq_force_integer_mv==2&&r.readBits(1)),s.frame_id_numbers_present_flag&&r.readBits(o);var R=!1;if(R=h==3||!s.reduced_still_picture_header&&r.readBool(),r.readBits(s.order_hint_bits),u||A||r.readBits(3),s.decoder_model_info_present_flag&&r.readBool()){for(var P=0;P<=s.operating_points_cnt_minus_1;P++)if(s.operating_points[P].decoder_model_present_for_this_op[P]){var H=s.operating_points[P].operating_point_idc;(H===0||H>>t&1&&H>>e+8&1)&&r.readBits(s.buffer_removal_time_length_minus_1+1)}}var N=255;if(h===3||h==0&&m||(N=r.readBits(8)),(u||N!==255)&&A&&s.enable_order_hint)for(var ee=0;ee<8;ee++)r.readBits(s.order_hint_bits);if(u){var $=a.frameSizeAndRenderSize(r,R,s);n.codec_size={width:$.FrameWidth,height:$.FrameHeight},n.present_size={width:$.RenderWidth,height:$.RenderHeight},n.sar_ratio={width:$.RenderWidth/$.FrameWidth,height:$.RenderHeight/$.FrameHeight}}return r.destroy(),r=null,n},a.frameSizeAndRenderSize=function(i,t,e){var n=e.max_frame_width,s=e.max_frame_height;t&&(n=i.readBits(e.frame_width_bit)+1,s=i.readBits(e.frame_height_bit)+1);var r=!1;e.enable_superres&&(r=i.readBool());var o=8;r&&(o=i.readBits(3)+9);var h=n;n=Math.floor((8*h+o/2)/o);var u=h,m=s;if(i.readBool()){var A=i.readBits(16)+1,S=i.readBits(16)+1;u=i.readBits(A)+1,m=i.readBits(S)+1}return{UpscaledWidth:h,FrameWidth:n,FrameHeight:s,RenderWidth:u,RenderHeight:m}},a.getLevelString=function(i,t){return"".concat(i.toString(10).padStart(2,"0")).concat(t===0?"M":"H")},a.getChromaFormat=function(i,t,e){return i?0:t===0&&e===0?3:t===1&&e===0?2:t===1&&e===1?1:Number.NaN},a.getChromaFormatString=function(i,t,e){return i?"4:0:0":t===0&&e===0?"4:4:4":t===1&&e===0?"4:2:2":t===1&&e===1?"4:2:0":"Unknown"},a}(),d,p=function(){function a(i,t){this.TAG="FLVDemuxer",this._config=t,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=i.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=i.hasAudioTrack,this._hasVideo=i.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new v.a,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256}()}return a.prototype.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},a.probe=function(i){var t=new Uint8Array(i);if(t.byteLength<9)return{needMoreData:!0};var e={match:!1};if(t[0]!==70||t[1]!==76||t[2]!==86||t[3]!==1)return e;var n,s,r=(4&t[4])>>>2!=0,o=(1&t[4])!=0,h=(n=t)[s=5]<<24|n[s+1]<<16|n[s+2]<<8|n[s+3];return h<9?e:{match:!0,consumed:h,dataOffset:h,hasAudioTrack:r,hasVideoTrack:o}},a.prototype.bindDataSource=function(i){return i.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(a.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(i){this._onTrackMetadata=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(i){this._onMediaInfo=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(i){this._onMetaDataArrived=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(i){this._onScriptDataArrived=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onError",{get:function(){return this._onError},set:function(i){this._onError=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(i){this._onDataAvailable=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(i){this._timestampBase=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"overridedDuration",{get:function(){return this._duration},set:function(i){this._durationOverrided=!0,this._duration=i,this._mediaInfo.duration=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"overridedHasAudio",{set:function(i){this._hasAudioFlagOverrided=!0,this._hasAudio=i,this._mediaInfo.hasAudio=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"overridedHasVideo",{set:function(i){this._hasVideoFlagOverrided=!0,this._hasVideo=i,this._mediaInfo.hasVideo=i},enumerable:!1,configurable:!0}),a.prototype.resetMediaInfo=function(){this._mediaInfo=new v.a},a.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},a.prototype.parseChunks=function(i,t){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new L.a("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var e=0,n=this._littleEndian;if(t===0){if(!(i.byteLength>13))return 0;e=a.probe(i).dataOffset}for(this._firstParse&&(this._firstParse=!1,t+e!==this._dataOffset&&f.a.w(this.TAG,"First time parsing but chunk byteStart invalid!"),(s=new DataView(i,e)).getUint32(0,!n)!==0&&f.a.w(this.TAG,"PrevTagSize0 !== 0 !!!"),e+=4);e<i.byteLength;){this._dispatch=!0;var s=new DataView(i,e);if(e+11+4>i.byteLength)break;var r=s.getUint8(0),o=16777215&s.getUint32(0,!n);if(e+11+o+4>i.byteLength)break;if(r===8||r===9||r===18){var h=s.getUint8(4),u=s.getUint8(5),m=s.getUint8(6)|u<<8|h<<16|s.getUint8(7)<<24;(16777215&s.getUint32(7,!n))!==0&&f.a.w(this.TAG,"Meet tag which has StreamID != 0!");var A=e+11;switch(r){case 8:this._parseAudioData(i,A,o,m);break;case 9:this._parseVideoData(i,A,o,m,t+e);break;case 18:this._parseScriptData(i,A,o)}var S=s.getUint32(11+o,!n);S!==11+o&&f.a.w(this.TAG,"Invalid PrevTagSize ".concat(S)),e+=11+o+4}else f.a.w(this.TAG,"Unsupported tag type ".concat(r,", skipped")),e+=11+o+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),e},a.prototype._parseScriptData=function(i,t,e){var n=w.parseScriptData(i,t,e);if(n.hasOwnProperty("onMetaData")){if(n.onMetaData==null||typeof n.onMetaData!="object")return void f.a.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&f.a.w(this.TAG,"Found another onMetaData tag!"),this._metadata=n;var s=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},s)),typeof s.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=s.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof s.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=s.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof s.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=s.audiodatarate),typeof s.videodatarate=="number"&&(this._mediaInfo.videoDataRate=s.videodatarate),typeof s.width=="number"&&(this._mediaInfo.width=s.width),typeof s.height=="number"&&(this._mediaInfo.height=s.height),typeof s.duration=="number"){if(!this._durationOverrided){var r=Math.floor(s.duration*this._timescale);this._duration=r,this._mediaInfo.duration=r}}else this._mediaInfo.duration=0;if(typeof s.framerate=="number"){var o=Math.floor(1e3*s.framerate);if(o>0){var h=o/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=h,this._referenceFrameRate.fps_num=o,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=h}}if(typeof s.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var u=s.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(u),s.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=s,f.a.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(n).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},n))},a.prototype._parseKeyframesIndex=function(i){for(var t=[],e=[],n=1;n<i.times.length;n++){var s=this._timestampBase+Math.floor(1e3*i.times[n]);t.push(s),e.push(i.filepositions[n])}return{times:t,filepositions:e}},a.prototype._parseAudioData=function(i,t,e,n){if(e<=1)f.a.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(this._hasAudioFlagOverrided!==!0||this._hasAudio!==!1){this._littleEndian;var s=new DataView(i,t,e).getUint8(0),r=s>>>4;if(r!==9)if(r===2||r===10){var o=0,h=(12&s)>>>2;if(h>=0&&h<=4){o=this._flvSoundRateTable[h];var u=1&s,m=this._audioMetadata,A=this._audioTrack;if(m||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(m=this._audioMetadata={}).type="audio",m.id=A.id,m.timescale=this._timescale,m.duration=this._duration,m.audioSampleRate=o,m.channelCount=u===0?1:2),r===10){var S=this._parseAACAudioData(i,t+1,e-1);if(S==null)return;if(S.packetType===0){if(m.config){if(D(S.data.config,m.config))return;f.a.w(this.TAG,"AudioSpecificConfig has been changed, re-generate initialization segment")}var R=S.data;m.audioSampleRate=R.samplingRate,m.channelCount=R.channelCount,m.codec=R.codec,m.originalCodec=R.originalCodec,m.config=R.config,m.refSampleDuration=1024/m.audioSampleRate*m.timescale,f.a.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",m),(N=this._mediaInfo).audioCodec=m.originalCodec,N.audioSampleRate=m.audioSampleRate,N.audioChannelCount=m.channelCount,N.hasVideo?N.videoCodec!=null&&(N.mimeType='video/x-flv; codecs="'+N.videoCodec+","+N.audioCodec+'"'):N.mimeType='video/x-flv; codecs="'+N.audioCodec+'"',N.isComplete()&&this._onMediaInfo(N)}else if(S.packetType===1){var P=this._timestampBase+n,H={unit:S.data,length:S.data.byteLength,dts:P,pts:P};A.samples.push(H),A.length+=S.data.length}else f.a.e(this.TAG,"Flv: Unsupported AAC data type ".concat(S.packetType))}else if(r===2){if(!m.codec){var N;if((R=this._parseMP3AudioData(i,t+1,e-1,!0))==null)return;m.audioSampleRate=R.samplingRate,m.channelCount=R.channelCount,m.codec=R.codec,m.originalCodec=R.originalCodec,m.refSampleDuration=1152/m.audioSampleRate*m.timescale,f.a.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",m),(N=this._mediaInfo).audioCodec=m.codec,N.audioSampleRate=m.audioSampleRate,N.audioChannelCount=m.channelCount,N.audioDataRate=R.bitRate,N.hasVideo?N.videoCodec!=null&&(N.mimeType='video/x-flv; codecs="'+N.videoCodec+","+N.audioCodec+'"'):N.mimeType='video/x-flv; codecs="'+N.audioCodec+'"',N.isComplete()&&this._onMediaInfo(N)}var ee=this._parseMP3AudioData(i,t+1,e-1,!1);if(ee==null)return;P=this._timestampBase+n;var $={unit:ee,length:ee.byteLength,dts:P,pts:P};A.samples.push($),A.length+=ee.length}}else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+h)}else this._onError(B.a.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+r);else{if(e<=5)return void f.a.w(this.TAG,"Flv: Invalid audio packet, missing AudioFourCC in Ehnanced FLV payload!");var Q=15&s,re=String.fromCharCode.apply(String,new Uint8Array(i,t,e).slice(1,5));switch(re){case"Opus":this._parseOpusAudioPacket(i,t+5,e-5,n,Q);break;case"fLaC":this._parseFlacAudioPacket(i,t+5,e-5,n,Q);break;default:this._onError(B.a.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec: "+re)}}}},a.prototype._parseAACAudioData=function(i,t,e){if(!(e<=1)){var n={},s=new Uint8Array(i,t,e);return n.packetType=s[0],s[0]===0?n.data=this._parseAACAudioSpecificConfig(i,t+1,e-1):n.data=s.subarray(1),n}f.a.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},a.prototype._parseAACAudioSpecificConfig=function(i,t,e){var n,s,r=new Uint8Array(i,t,e),o=null,h=0,u=null;if(h=n=r[0]>>>3,(s=(7&r[0])<<1|r[1]>>>7)<0||s>=this._mpegSamplingRates.length)this._onError(B.a.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var m=this._mpegSamplingRates[s],A=(120&r[1])>>>3;if(!(A<0||A>=8)){h===5&&(u=(7&r[1])<<1|r[2]>>>7,(124&r[2])>>>2);var S=self.navigator.userAgent.toLowerCase();return S.indexOf("firefox")!==-1?s>=6?(h=5,o=new Array(4),u=s-3):(h=2,o=new Array(2),u=s):S.indexOf("android")!==-1?(h=2,o=new Array(2),u=s):(h=5,u=s,o=new Array(4),s>=6?u=s-3:A===1&&(h=2,o=new Array(2),u=s)),o[0]=h<<3,o[0]|=(15&s)>>>1,o[1]=(15&s)<<7,o[1]|=(15&A)<<3,h===5&&(o[1]|=(15&u)>>>1,o[2]=(1&u)<<7,o[2]|=8,o[3]=0),{config:o,samplingRate:m,channelCount:A,codec:"mp4a.40."+h,originalCodec:"mp4a.40."+n}}this._onError(B.a.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},a.prototype._parseMP3AudioData=function(i,t,e,n){if(!(e<4)){this._littleEndian;var s=new Uint8Array(i,t,e),r=null;if(n){if(s[0]!==255)return;var o=s[1]>>>3&3,h=(6&s[1])>>1,u=(240&s[2])>>>4,m=(12&s[2])>>>2,A=(s[3]>>>6&3)!==3?2:1,S=0,R=0;switch(o){case 0:S=this._mpegAudioV25SampleRateTable[m];break;case 2:S=this._mpegAudioV20SampleRateTable[m];break;case 3:S=this._mpegAudioV10SampleRateTable[m]}switch(h){case 1:u<this._mpegAudioL3BitRateTable.length&&(R=this._mpegAudioL3BitRateTable[u]);break;case 2:u<this._mpegAudioL2BitRateTable.length&&(R=this._mpegAudioL2BitRateTable[u]);break;case 3:u<this._mpegAudioL1BitRateTable.length&&(R=this._mpegAudioL1BitRateTable[u])}r={bitRate:R,samplingRate:S,channelCount:A,codec:"mp3",originalCodec:"mp3"}}else r=s;return r}f.a.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")},a.prototype._parseOpusAudioPacket=function(i,t,e,n,s){if(s===0)this._parseOpusSequenceHeader(i,t,e);else if(s===1)this._parseOpusAudioData(i,t,e,n);else if(s!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(s))},a.prototype._parseOpusSequenceHeader=function(i,t,e){if(e<=16)f.a.w(this.TAG,"Flv: Invalid OpusSequenceHeader, lack of data!");else{var n=this._audioMetadata,s=this._audioTrack;n||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(n=this._audioMetadata={}).type="audio",n.id=s.id,n.timescale=this._timescale,n.duration=this._duration);var r=new DataView(i,t,e);r.setUint8(8,0);var o=r.getUint8(9);r.setUint16(10,r.getUint16(10,!0),!1);var h=r.getUint32(12,!0);r.setUint32(12,r.getUint32(12,!0),!1);var u={config:new Uint8Array(i,t+8,e-8),channelCount:o,samplingFrequence:h,codec:"opus",originalCodec:"opus"};if(n.config){if(D(u.config,n.config))return;f.a.w(this.TAG,"OpusSequenceHeader has been changed, re-generate initialization segment")}n.audioSampleRate=u.samplingFrequence,n.channelCount=u.channelCount,n.codec=u.codec,n.originalCodec=u.originalCodec,n.config=u.config,n.refSampleDuration=20,f.a.v(this.TAG,"Parsed OpusSequenceHeader"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",n);var m=this._mediaInfo;m.audioCodec=n.originalCodec,m.audioSampleRate=n.audioSampleRate,m.audioChannelCount=n.channelCount,m.hasVideo?m.videoCodec!=null&&(m.mimeType='video/x-flv; codecs="'+m.videoCodec+","+m.audioCodec+'"'):m.mimeType='video/x-flv; codecs="'+m.audioCodec+'"',m.isComplete()&&this._onMediaInfo(m)}},a.prototype._parseOpusAudioData=function(i,t,e,n){var s=this._audioTrack,r=new Uint8Array(i,t,e),o=this._timestampBase+n,h={unit:r,length:r.byteLength,dts:o,pts:o};s.samples.push(h),s.length+=r.length},a.prototype._parseFlacAudioPacket=function(i,t,e,n,s){if(s===0)this._parseFlacSequenceHeader(i,t,e);else if(s===1)this._parseFlacAudioData(i,t,e,n);else if(s!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid Flac audio packet type ".concat(s))},a.prototype._parseFlacSequenceHeader=function(i,t,e){var n=this._audioMetadata,s=this._audioTrack;n||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(n=this._audioMetadata={}).type="audio",n.id=s.id,n.timescale=this._timescale,n.duration=this._duration);var r=new Uint8Array(i,t+4,e-4),o=new x(r),h=o.readBits(16),u=o.readBits(16),m=u===h?u:null;o.readBits(24),o.readBits(24);var A=o.readBits(20),S=o.readBits(3)+1,R=o.readBits(5)+1;o.destroy();var P=new Uint8Array(r.byteLength+4);P.set(r,4),P[0]=128,P[1]=r.byteLength>>>16&255,P[2]=r.byteLength>>>8&255,P[3]=r.byteLength>>>0&255;var H={config:P,channelCount:S,samplingFrequence:A,sampleSize:R,codec:"flac",originalCodec:"flac"};if(n.config){if(D(H.config,n.config))return;f.a.w(this.TAG,"FlacSequenceHeader has been changed, re-generate initialization segment")}n.audioSampleRate=H.samplingFrequence,n.channelCount=H.channelCount,n.sampleSize=H.sampleSize,n.codec=H.codec,n.originalCodec=H.originalCodec,n.config=H.config,n.refSampleDuration=m!=null?1e3*m/H.samplingFrequence:null,f.a.v(this.TAG,"Parsed FlacSequenceHeader"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",n);var N=this._mediaInfo;N.audioCodec=n.originalCodec,N.audioSampleRate=n.audioSampleRate,N.audioChannelCount=n.channelCount,N.hasVideo?N.videoCodec!=null&&(N.mimeType='video/x-flv; codecs="'+N.videoCodec+","+N.audioCodec+'"'):N.mimeType='video/x-flv; codecs="'+N.audioCodec+'"',N.isComplete()&&this._onMediaInfo(N)},a.prototype._parseFlacAudioData=function(i,t,e,n){var s=this._audioTrack,r=new Uint8Array(i,t,e),o=this._timestampBase+n,h={unit:r,length:r.byteLength,dts:o,pts:o};s.samples.push(h),s.length+=r.length},a.prototype._parseVideoData=function(i,t,e,n,s){if(e<=1)f.a.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(this._hasVideoFlagOverrided!==!0||this._hasVideo!==!1){var r=new Uint8Array(i,t,e)[0],o=(112&r)>>>4;if((128&r)!=0){var h=15&r,u=String.fromCharCode.apply(String,new Uint8Array(i,t,e).slice(1,5));if(u==="hvc1")this._parseEnhancedHEVCVideoPacket(i,t+5,e-5,n,s,o,h);else{if(u!=="av01")return void this._onError(B.a.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(u));this._parseEnhancedAV1VideoPacket(i,t+5,e-5,n,s,o,h)}}else{var m=15&r;if(m===7)this._parseAVCVideoPacket(i,t+1,e-1,n,s,o);else{if(m!==12)return void this._onError(B.a.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(m));this._parseHEVCVideoPacket(i,t+1,e-1,n,s,o)}}}},a.prototype._parseAVCVideoPacket=function(i,t,e,n,s,r){if(e<4)f.a.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var o=this._littleEndian,h=new DataView(i,t,e),u=h.getUint8(0),m=(16777215&h.getUint32(0,!o))<<8>>8;if(u===0)this._parseAVCDecoderConfigurationRecord(i,t+4,e-4);else if(u===1)this._parseAVCVideoData(i,t+4,e-4,n,s,r,m);else if(u!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(u))}},a.prototype._parseHEVCVideoPacket=function(i,t,e,n,s,r){if(e<4)f.a.w(this.TAG,"Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");else{var o=this._littleEndian,h=new DataView(i,t,e),u=h.getUint8(0),m=(16777215&h.getUint32(0,!o))<<8>>8;if(u===0)this._parseHEVCDecoderConfigurationRecord(i,t+4,e-4);else if(u===1)this._parseHEVCVideoData(i,t+4,e-4,n,s,r,m);else if(u!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(u))}},a.prototype._parseEnhancedHEVCVideoPacket=function(i,t,e,n,s,r,o){var h=this._littleEndian,u=new DataView(i,t,e);if(o===0)this._parseHEVCDecoderConfigurationRecord(i,t,e);else if(o===1){var m=(4294967040&u.getUint32(0,!h))>>8;this._parseHEVCVideoData(i,t+3,e-3,n,s,r,m)}else if(o===3)this._parseHEVCVideoData(i,t,e,n,s,r,0);else if(o!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(o))},a.prototype._parseEnhancedAV1VideoPacket=function(i,t,e,n,s,r,o){if(this._littleEndian,o===0)this._parseAV1CodecConfigurationRecord(i,t,e);else if(o===1)this._parseAV1VideoData(i,t,e,n,s,r,0);else{if(o===5)return void this._onError(B.a.FORMAT_ERROR,"Flv: Not Supported MP2T AV1 video packet type ".concat(o));if(o!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(o))}},a.prototype._parseAVCDecoderConfigurationRecord=function(i,t,e){if(e<7)f.a.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,s=this._videoTrack,r=this._littleEndian,o=new DataView(i,t,e);if(n){if(n.avcc!==void 0){var h=new Uint8Array(i,t,e);if(D(h,n.avcc))return;f.a.w(this.TAG,"AVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=s.id,n.timescale=this._timescale,n.duration=this._duration;var u=o.getUint8(0),m=o.getUint8(1);if(o.getUint8(2),o.getUint8(3),u===1&&m!==0)if(this._naluLengthSize=1+(3&o.getUint8(4)),this._naluLengthSize===3||this._naluLengthSize===4){var A=31&o.getUint8(5);if(A!==0){A>1&&f.a.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(A));for(var S=6,R=0;R<A;R++){var P=o.getUint16(S,!r);if(S+=2,P!==0){var H=new Uint8Array(i,t+S,P);S+=P;var N=U.parseSPS(H);if(R===0){n.codecWidth=N.codec_size.width,n.codecHeight=N.codec_size.height,n.presentWidth=N.present_size.width,n.presentHeight=N.present_size.height,n.profile=N.profile_string,n.level=N.level_string,n.bitDepth=N.bit_depth,n.chromaFormat=N.chroma_format,n.sarRatio=N.sar_ratio,n.frameRate=N.frame_rate,N.frame_rate.fixed!==!1&&N.frame_rate.fps_num!==0&&N.frame_rate.fps_den!==0||(n.frameRate=this._referenceFrameRate);var ee=n.frameRate.fps_den,$=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(ee/$);for(var Q=H.subarray(1,4),re="avc1.",fe=0;fe<3;fe++){var Z=Q[fe].toString(16);Z.length<2&&(Z="0"+Z),re+=Z}n.codec=re;var ae=this._mediaInfo;ae.width=n.codecWidth,ae.height=n.codecHeight,ae.fps=n.frameRate.fps,ae.profile=n.profile,ae.level=n.level,ae.refFrames=N.ref_frames,ae.chromaFormat=N.chroma_format_string,ae.sarNum=n.sarRatio.width,ae.sarDen=n.sarRatio.height,ae.videoCodec=re,ae.hasAudio?ae.audioCodec!=null&&(ae.mimeType='video/x-flv; codecs="'+ae.videoCodec+","+ae.audioCodec+'"'):ae.mimeType='video/x-flv; codecs="'+ae.videoCodec+'"',ae.isComplete()&&this._onMediaInfo(ae)}}}var pe=o.getUint8(S);if(pe!==0){for(pe>1&&f.a.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(pe)),S++,R=0;R<pe;R++)P=o.getUint16(S,!r),S+=2,P!==0&&(S+=P);n.avcc=new Uint8Array(e),n.avcc.set(new Uint8Array(i,t,e),0),f.a.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",n)}else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(B.a.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}},a.prototype._parseHEVCDecoderConfigurationRecord=function(i,t,e){if(e<22)f.a.w(this.TAG,"Flv: Invalid HEVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,s=this._videoTrack,r=this._littleEndian,o=new DataView(i,t,e);if(n){if(n.hvcc!==void 0){var h=new Uint8Array(i,t,e);if(D(h,n.hvcc))return;f.a.w(this.TAG,"HEVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=s.id,n.timescale=this._timescale,n.duration=this._duration;var u=o.getUint8(0),m=31&o.getUint8(1);if(u!==0&&u!==1||m===0)this._onError(B.a.FORMAT_ERROR,"Flv: Invalid HEVCDecoderConfigurationRecord");else if(this._naluLengthSize=1+(3&o.getUint8(21)),this._naluLengthSize===3||this._naluLengthSize===4){for(var A=o.getUint8(22),S=0,R=23;S<A;S++){var P=63&o.getUint8(R+0),H=o.getUint16(R+1,!r);R+=3;for(var N=0;N<H;N++){var ee=o.getUint16(R+0,!r);if(N===0)if(P===33){R+=2;var $=new Uint8Array(i,t+R,ee),Q=K.parseSPS($);n.codecWidth=Q.codec_size.width,n.codecHeight=Q.codec_size.height,n.presentWidth=Q.present_size.width,n.presentHeight=Q.present_size.height,n.profile=Q.profile_string,n.level=Q.level_string,n.bitDepth=Q.bit_depth,n.chromaFormat=Q.chroma_format,n.sarRatio=Q.sar_ratio,n.frameRate=Q.frame_rate,Q.frame_rate.fixed!==!1&&Q.frame_rate.fps_num!==0&&Q.frame_rate.fps_den!==0||(n.frameRate=this._referenceFrameRate);var re=n.frameRate.fps_den,fe=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(re/fe),n.codec=Q.codec_mimetype;var Z=this._mediaInfo;Z.width=n.codecWidth,Z.height=n.codecHeight,Z.fps=n.frameRate.fps,Z.profile=n.profile,Z.level=n.level,Z.refFrames=Q.ref_frames,Z.chromaFormat=Q.chroma_format_string,Z.sarNum=n.sarRatio.width,Z.sarDen=n.sarRatio.height,Z.videoCodec=Q.codec_mimetype,Z.hasAudio?Z.audioCodec!=null&&(Z.mimeType='video/x-flv; codecs="'+Z.videoCodec+","+Z.audioCodec+'"'):Z.mimeType='video/x-flv; codecs="'+Z.videoCodec+'"',Z.isComplete()&&this._onMediaInfo(Z),R+=ee}else R+=2+ee;else R+=2+ee}}n.hvcc=new Uint8Array(e),n.hvcc.set(new Uint8Array(i,t,e),0),f.a.v(this.TAG,"Parsed HEVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",n)}else this._onError(B.a.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1))}},a.prototype._parseAV1CodecConfigurationRecord=function(i,t,e){if(e<4)f.a.w(this.TAG,"Flv: Invalid AV1CodecConfigurationRecord, lack of data!");else{var n=this._videoMetadata,s=this._videoTrack,r=(this._littleEndian,new DataView(i,t,e));n?n.av1c!==void 0&&f.a.w(this.TAG,"Found another AV1CodecConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=s.id,n.timescale=this._timescale,n.duration=this._duration);var o=127&r.getUint8(0);if(r.getUint8(1),r.getUint8(1),r.getUint8(2),o===1){var h=_.parseOBUs(new Uint8Array(i,t+4,e-4));if(h!=null){n.profile=h.profile_string,n.level=h.level_string,n.bitDepth=h.bit_depth,n.chromaFormat=h.chroma_format,n.frameRate=h.frame_rate,h.frame_rate.fixed!==!1&&h.frame_rate.fps_num!==0&&h.frame_rate.fps_den!==0||(n.frameRate=this._referenceFrameRate);var u=n.frameRate.fps_den,m=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(u/m),n.codec=h.codec_mimetype,n.extra=h;var A=this._mediaInfo;A.fps=n.frameRate.fps,A.profile=n.profile,A.level=n.level,A.refFrames=h.ref_frames,A.chromaFormat=h.chroma_format_string,A.videoCodec=h.codec_mimetype,A.hasAudio?A.audioCodec!=null&&(A.mimeType='video/x-flv; codecs="'+A.videoCodec+","+A.audioCodec+'"'):A.mimeType='video/x-flv; codecs="'+A.videoCodec+'"',A.isComplete()&&this._onMediaInfo(A),n.av1c=new Uint8Array(e),n.av1c.set(new Uint8Array(i,t,e),0),f.a.v(this.TAG,"Preparing AV1CodecConfigurationRecord")}else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AV1CodecConfigurationRecord")}else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AV1CodecConfigurationRecord")}},a.prototype._parseAVCVideoData=function(i,t,e,n,s,r,o){for(var h=this._littleEndian,u=new DataView(i,t,e),m=[],A=0,S=0,R=this._naluLengthSize,P=this._timestampBase+n,H=r===1;S<e;){if(S+4>=e){f.a.w(this.TAG,"Malformed Nalu near timestamp ".concat(P,", offset = ").concat(S,", dataSize = ").concat(e));break}var N=u.getUint32(S,!h);if(R===3&&(N>>>=8),N>e-R)return void f.a.w(this.TAG,"Malformed Nalus near timestamp ".concat(P,", NaluSize > DataSize!"));var ee=31&u.getUint8(S+R);ee===5&&(H=!0);var $=new Uint8Array(i,t+S,R+N),Q={type:ee,data:$};m.push(Q),A+=$.byteLength,S+=R+N}if(m.length){var re=this._videoTrack,fe={units:m,length:A,isKeyframe:H,dts:P,cts:o,pts:P+o};H&&(fe.fileposition=s),re.samples.push(fe),re.length+=A}},a.prototype._parseHEVCVideoData=function(i,t,e,n,s,r,o){for(var h=this._littleEndian,u=new DataView(i,t,e),m=[],A=0,S=0,R=this._naluLengthSize,P=this._timestampBase+n,H=r===1;S<e;){if(S+4>=e){f.a.w(this.TAG,"Malformed Nalu near timestamp ".concat(P,", offset = ").concat(S,", dataSize = ").concat(e));break}var N=u.getUint32(S,!h);if(R===3&&(N>>>=8),N>e-R)return void f.a.w(this.TAG,"Malformed Nalus near timestamp ".concat(P,", NaluSize > DataSize!"));var ee=u.getUint8(S+R)>>1&63;ee!==19&&ee!==20&&ee!==21||(H=!0);var $=new Uint8Array(i,t+S,R+N),Q={type:ee,data:$};m.push(Q),A+=$.byteLength,S+=R+N}if(m.length){var re=this._videoTrack,fe={units:m,length:A,isKeyframe:H,dts:P,cts:o,pts:P+o};H&&(fe.fileposition=s),re.samples.push(fe),re.length+=A}},a.prototype._parseAV1VideoData=function(i,t,e,n,s,r,o){this._littleEndian;var h,u=[],m=this._timestampBase+n,A=r===1;if(A){var S=this._videoMetadata,R=_.parseOBUs(new Uint8Array(i,t,e),S.extra);if(R==null)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AV1 VideoData");console.log(R),S.codecWidth=R.codec_size.width,S.codecHeight=R.codec_size.height,S.presentWidth=R.present_size.width,S.presentHeight=R.present_size.height,S.sarRatio=R.sar_ratio;var P=this._mediaInfo;P.width=S.codecWidth,P.height=S.codecHeight,P.sarNum=S.sarRatio.width,P.sarDen=S.sarRatio.height,f.a.v(this.TAG,"Parsed AV1DecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",S)}if(h=e,u.push({unitType:0,data:new Uint8Array(i,t+0,e)}),u.length){var H=this._videoTrack,N={units:u,length:h,isKeyframe:A,dts:m,cts:o,pts:m+o};A&&(N.fileposition=s),H.samples.push(N),H.length+=h}},a}(),V=function(){function a(){}return a.prototype.destroy=function(){this.onError=null,this.onMediaInfo=null,this.onMetaDataArrived=null,this.onTrackMetadata=null,this.onDataAvailable=null,this.onTimedID3Metadata=null,this.onSynchronousKLVMetadata=null,this.onAsynchronousKLVMetadata=null,this.onSMPTE2038Metadata=null,this.onSCTE35Metadata=null,this.onPESPrivateData=null,this.onPESPrivateDataDescriptor=null},a}(),J=function(){this.program_pmt_pid={}};(function(a){a[a.kMPEG1Audio=3]="kMPEG1Audio",a[a.kMPEG2Audio=4]="kMPEG2Audio",a[a.kPESPrivateData=6]="kPESPrivateData",a[a.kADTSAAC=15]="kADTSAAC",a[a.kLOASAAC=17]="kLOASAAC",a[a.kAC3=129]="kAC3",a[a.kEAC3=135]="kEAC3",a[a.kMetadata=21]="kMetadata",a[a.kSCTE35=134]="kSCTE35",a[a.kH264=27]="kH264",a[a.kH265=36]="kH265"})(d||(d={}));var G,Y=function(){this.pid_stream_type={},this.common_pids={h264:void 0,h265:void 0,av1:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0},this.pes_private_data_pids={},this.timed_id3_pids={},this.synchronous_klv_pids={},this.asynchronous_klv_pids={},this.scte_35_pids={},this.smpte2038_pids={}},oe=function(){},Ee=function(){},_e=function(){this.slices=[],this.total_length=0,this.expected_length=0,this.file_position=0};(function(a){a[a.kUnspecified=0]="kUnspecified",a[a.kSliceNonIDR=1]="kSliceNonIDR",a[a.kSliceDPA=2]="kSliceDPA",a[a.kSliceDPB=3]="kSliceDPB",a[a.kSliceDPC=4]="kSliceDPC",a[a.kSliceIDR=5]="kSliceIDR",a[a.kSliceSEI=6]="kSliceSEI",a[a.kSliceSPS=7]="kSliceSPS",a[a.kSlicePPS=8]="kSlicePPS",a[a.kSliceAUD=9]="kSliceAUD",a[a.kEndOfSequence=10]="kEndOfSequence",a[a.kEndOfStream=11]="kEndOfStream",a[a.kFiller=12]="kFiller",a[a.kSPSExt=13]="kSPSExt",a[a.kReserved0=14]="kReserved0"})(G||(G={}));var b,c,C=function(){},z=function(a){var i=a.data.byteLength;this.type=a.type,this.data=new Uint8Array(4+i),new DataView(this.data.buffer).setUint32(0,i),this.data.set(a.data,4)},ne=function(){function a(i){this.TAG="H264AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=i,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not find H264 startcode until payload end!")}return a.prototype.findNextStartCodeOffset=function(i){for(var t=i,e=this.data_;;){if(t+3>=e.byteLength)return this.eof_flag_=!0,e.byteLength;var n=e[t+0]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],s=e[t+0]<<16|e[t+1]<<8|e[t+2];if(n===1||s===1)return t;t++}},a.prototype.readNextNaluPayload=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_startcode_offset_,n=31&i[e+=(i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3])===1?4:3],s=(128&i[e])>>>7,r=this.findNextStartCodeOffset(e);if(this.current_startcode_offset_=r,!(n>=G.kReserved0)&&s===0){var o=i.subarray(e,r);(t=new C).type=n,t.data=o}}return t},a}(),de=function(){function a(i,t,e){var n=8+i.byteLength+1+2+t.byteLength,s=!1;i[3]!==66&&i[3]!==77&&i[3]!==88&&(s=!0,n+=4);var r=this.data=new Uint8Array(n);r[0]=1,r[1]=i[1],r[2]=i[2],r[3]=i[3],r[4]=255,r[5]=225;var o=i.byteLength;r[6]=o>>>8,r[7]=255&o;var h=8;r.set(i,8),r[h+=o]=1;var u=t.byteLength;r[h+1]=u>>>8,r[h+2]=255&u,r.set(t,h+3),h+=3+u,s&&(r[h]=252|e.chroma_format_idc,r[h+1]=248|e.bit_depth_luma-8,r[h+2]=248|e.bit_depth_chroma-8,r[h+3]=0,h+=4)}return a.prototype.getData=function(){return this.data},a}();(function(a){a[a.kNull=0]="kNull",a[a.kAACMain=1]="kAACMain",a[a.kAAC_LC=2]="kAAC_LC",a[a.kAAC_SSR=3]="kAAC_SSR",a[a.kAAC_LTP=4]="kAAC_LTP",a[a.kAAC_SBR=5]="kAAC_SBR",a[a.kAAC_Scalable=6]="kAAC_Scalable",a[a.kLayer1=32]="kLayer1",a[a.kLayer2=33]="kLayer2",a[a.kLayer3=34]="kLayer3"})(b||(b={})),function(a){a[a.k96000Hz=0]="k96000Hz",a[a.k88200Hz=1]="k88200Hz",a[a.k64000Hz=2]="k64000Hz",a[a.k48000Hz=3]="k48000Hz",a[a.k44100Hz=4]="k44100Hz",a[a.k32000Hz=5]="k32000Hz",a[a.k24000Hz=6]="k24000Hz",a[a.k22050Hz=7]="k22050Hz",a[a.k16000Hz=8]="k16000Hz",a[a.k12000Hz=9]="k12000Hz",a[a.k11025Hz=10]="k11025Hz",a[a.k8000Hz=11]="k8000Hz",a[a.k7350Hz=12]="k7350Hz"}(c||(c={}));var Te,ye,j=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],X=(Te=function(a,i){return(Te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(a,i)},function(a,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function t(){this.constructor=a}Te(a,i),a.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}),ie=function(){},le=function(a){function i(){return a!==null&&a.apply(this,arguments)||this}return X(i,a),i}(ie),ce=function(){function a(i){this.TAG="AACADTSParser",this.data_=i,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not found ADTS syncword until payload end")}return a.prototype.findNextSyncwordOffset=function(i){for(var t=i,e=this.data_;;){if(t+7>=e.byteLength)return this.eof_flag_=!0,e.byteLength;if((e[t+0]<<8|e[t+1])>>>4===4095)return t;t++}},a.prototype.readNextAACFrame=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_syncword_offset_,n=(8&i[e+1])>>>3,s=(6&i[e+1])>>>1,r=1&i[e+1],o=(192&i[e+2])>>>6,h=(60&i[e+2])>>>2,u=(1&i[e+2])<<2|(192&i[e+3])>>>6,m=(3&i[e+3])<<11|i[e+4]<<3|(224&i[e+5])>>>5;if(i[e+6],e+m>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var A=r===1?7:9,S=m-A;e+=A;var R=this.findNextSyncwordOffset(e+S);if(this.current_syncword_offset_=R,(n===0||n===1)&&s===0){var P=i.subarray(e,e+S);(t=new ie).audio_object_type=o+1,t.sampling_freq_index=h,t.sampling_frequency=j[h],t.channel_config=u,t.data=P}}return t},a.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},a.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},a}(),ve=function(){function a(i){this.TAG="AACLOASParser",this.data_=i,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not found LOAS syncword until payload end")}return a.prototype.findNextSyncwordOffset=function(i){for(var t=i,e=this.data_;;){if(t+1>=e.byteLength)return this.eof_flag_=!0,e.byteLength;if((e[t+0]<<3|e[t+1]>>>5)===695)return t;t++}},a.prototype.getLATMValue=function(i){for(var t=i.readBits(2),e=0,n=0;n<=t;n++)e<<=8,e|=i.readByte();return e},a.prototype.readNextAACFrame=function(i){for(var t=this.data_,e=null;e==null&&!this.eof_flag_;){var n=this.current_syncword_offset_,s=(31&t[n+1])<<8|t[n+2];if(n+3+s>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var r=new x(t.subarray(n+3,n+3+s)),o=null;if(r.readBool()){if(i==null){f.a.w(this.TAG,"StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(n+3+s),r.destroy();continue}o=i}else{var h=r.readBool();if(h&&r.readBool()){f.a.e(this.TAG,"audioMuxVersionA is Not Supported"),r.destroy();break}if(h&&this.getLATMValue(r),!r.readBool()){f.a.e(this.TAG,"allStreamsSameTimeFraming zero is Not Supported"),r.destroy();break}if(r.readBits(6)!==0){f.a.e(this.TAG,"more than 2 numSubFrames Not Supported"),r.destroy();break}if(r.readBits(4)!==0){f.a.e(this.TAG,"more than 2 numProgram Not Supported"),r.destroy();break}if(r.readBits(3)!==0){f.a.e(this.TAG,"more than 2 numLayer Not Supported"),r.destroy();break}var u=h?this.getLATMValue(r):0,m=r.readBits(5);u-=5;var A=r.readBits(4);u-=4;var S=r.readBits(4);u-=4,r.readBits(3),(u-=3)>0&&r.readBits(u);var R=r.readBits(3);if(R!==0){f.a.e(this.TAG,"frameLengthType = ".concat(R,". Only frameLengthType = 0 Supported")),r.destroy();break}r.readByte();var P=r.readBool();if(P)if(h)this.getLATMValue(r);else{for(var H=0;;){H<<=8;var N=r.readBool();if(H+=r.readByte(),!N)break}console.log(H)}r.readBool()&&r.readByte(),(o=new le).audio_object_type=m,o.sampling_freq_index=A,o.sampling_frequency=j[o.sampling_freq_index],o.channel_config=S,o.other_data_present=P}for(var ee=0;;){var $=r.readByte();if(ee+=$,$!==255)break}for(var Q=new Uint8Array(ee),re=0;re<ee;re++)Q[re]=r.readByte();(e=new le).audio_object_type=o.audio_object_type,e.sampling_freq_index=o.sampling_freq_index,e.sampling_frequency=j[o.sampling_freq_index],e.channel_config=o.channel_config,e.other_data_present=o.other_data_present,e.data=Q,this.current_syncword_offset_=this.findNextSyncwordOffset(n+3+s)}return e},a.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},a.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},a}(),Me=function(a){var i=null,t=a.audio_object_type,e=a.audio_object_type,n=a.sampling_freq_index,s=a.channel_config,r=0,o=navigator.userAgent.toLowerCase();o.indexOf("firefox")!==-1?n>=6?(e=5,i=new Array(4),r=n-3):(e=2,i=new Array(2),r=n):o.indexOf("android")!==-1?(e=2,i=new Array(2),r=n):(e=5,r=n,i=new Array(4),n>=6?r=n-3:s===1&&(e=2,i=new Array(2),r=n)),i[0]=e<<3,i[0]|=(15&n)>>>1,i[1]=(15&n)<<7,i[1]|=(15&s)<<3,e===5&&(i[1]|=(15&r)>>>1,i[2]=(1&r)<<7,i[2]|=8,i[3]=0),this.config=i,this.sampling_rate=j[n],this.channel_count=s,this.codec_mimetype="mp4a.40."+e,this.original_codec_mimetype="mp4a.40."+t},Ce=function(){},Ue=function(){};(function(a){a[a.kSpliceNull=0]="kSpliceNull",a[a.kSpliceSchedule=4]="kSpliceSchedule",a[a.kSpliceInsert=5]="kSpliceInsert",a[a.kTimeSignal=6]="kTimeSignal",a[a.kBandwidthReservation=7]="kBandwidthReservation",a[a.kPrivateCommand=255]="kPrivateCommand"})(ye||(ye={}));var ke,He=function(a){var i=a.readBool();return i?(a.readBits(6),{time_specified_flag:i,pts_time:4*a.readBits(31)+a.readBits(2)}):(a.readBits(7),{time_specified_flag:i})},Ye=function(a){var i=a.readBool();return a.readBits(6),{auto_return:i,duration:4*a.readBits(31)+a.readBits(2)}},Ze=function(a,i){var t=i.readBits(8);return a?{component_tag:t}:{component_tag:t,splice_time:He(i)}},et=function(a){return{component_tag:a.readBits(8),utc_splice_time:a.readBits(32)}},Lt=function(a){var i=a.readBits(32),t=a.readBool();a.readBits(7);var e={splice_event_id:i,splice_event_cancel_indicator:t};if(t)return e;if(e.out_of_network_indicator=a.readBool(),e.program_splice_flag=a.readBool(),e.duration_flag=a.readBool(),a.readBits(5),e.program_splice_flag)e.utc_splice_time=a.readBits(32);else{e.component_count=a.readBits(8),e.components=[];for(var n=0;n<e.component_count;n++)e.components.push(et(a))}return e.duration_flag&&(e.break_duration=Ye(a)),e.unique_program_id=a.readBits(16),e.avail_num=a.readBits(8),e.avails_expected=a.readBits(8),e},wt=function(a,i,t,e){return{descriptor_tag:a,descriptor_length:i,identifier:t,provider_avail_id:e.readBits(32)}},Mt=function(a,i,t,e){var n=e.readBits(8),s=e.readBits(3);e.readBits(5);for(var r="",o=0;o<s;o++)r+=String.fromCharCode(e.readBits(8));return{descriptor_tag:a,descriptor_length:i,identifier:t,preroll:n,dtmf_count:s,DTMF_char:r}},Ct=function(a){var i=a.readBits(8);return a.readBits(7),{component_tag:i,pts_offset:4*a.readBits(31)+a.readBits(2)}},Dt=function(a,i,t,e){var n=e.readBits(32),s=e.readBool();e.readBits(7);var r={descriptor_tag:a,descriptor_length:i,identifier:t,segmentation_event_id:n,segmentation_event_cancel_indicator:s};if(s)return r;if(r.program_segmentation_flag=e.readBool(),r.segmentation_duration_flag=e.readBool(),r.delivery_not_restricted_flag=e.readBool(),r.delivery_not_restricted_flag?e.readBits(5):(r.web_delivery_allowed_flag=e.readBool(),r.no_regional_blackout_flag=e.readBool(),r.archive_allowed_flag=e.readBool(),r.device_restrictions=e.readBits(2)),!r.program_segmentation_flag){r.component_count=e.readBits(8),r.components=[];for(var o=0;o<r.component_count;o++)r.components.push(Ct(e))}r.segmentation_duration_flag&&(r.segmentation_duration=e.readBits(40)),r.segmentation_upid_type=e.readBits(8),r.segmentation_upid_length=e.readBits(8);var h=new Uint8Array(r.segmentation_upid_length);for(o=0;o<r.segmentation_upid_length;o++)h[o]=e.readBits(8);return r.segmentation_upid=h.buffer,r.segmentation_type_id=e.readBits(8),r.segment_num=e.readBits(8),r.segments_expected=e.readBits(8),r.segmentation_type_id!==52&&r.segmentation_type_id!==54&&r.segmentation_type_id!==56&&r.segmentation_type_id!==58||(r.sub_segment_num=e.readBits(8),r.sub_segments_expected=e.readBits(8)),r},Ot=function(a,i,t,e){return{descriptor_tag:a,descriptor_length:i,identifier:t,TAI_seconds:e.readBits(48),TAI_ns:e.readBits(32),UTC_offset:e.readBits(16)}},Bt=function(a){return{component_tag:a.readBits(8),ISO_code:String.fromCharCode(a.readBits(8),a.readBits(8),a.readBits(8)),Bit_Stream_Mode:a.readBits(3),Num_Channels:a.readBits(4),Full_Srvc_Audio:a.readBool()}},It=function(a,i,t,e){for(var n=e.readBits(4),s=[],r=0;r<n;r++)s.push(Bt(e));return{descriptor_tag:a,descriptor_length:i,identifier:t,audio_count:n,components:s}},Pt=function(a){var i=new x(a),t=i.readBits(8),e=i.readBool(),n=i.readBool();i.readBits(2);var s=i.readBits(12),r=i.readBits(8),o=i.readBool(),h=i.readBits(6),u=4*i.readBits(31)+i.readBits(2),m=i.readBits(8),A=i.readBits(12),S=i.readBits(12),R=i.readBits(8),P=null;R===ye.kSpliceNull?P={}:R===ye.kSpliceSchedule?P=function(ue){for(var Se=ue.readBits(8),Ae=[],he=0;he<Se;he++)Ae.push(Lt(ue));return{splice_count:Se,events:Ae}}(i):R===ye.kSpliceInsert?P=function(ue){var Se=ue.readBits(32),Ae=ue.readBool();ue.readBits(7);var he={splice_event_id:Se,splice_event_cancel_indicator:Ae};if(Ae)return he;if(he.out_of_network_indicator=ue.readBool(),he.program_splice_flag=ue.readBool(),he.duration_flag=ue.readBool(),he.splice_immediate_flag=ue.readBool(),ue.readBits(4),he.program_splice_flag&&!he.splice_immediate_flag&&(he.splice_time=He(ue)),!he.program_splice_flag){he.component_count=ue.readBits(8),he.components=[];for(var ge=0;ge<he.component_count;ge++)he.components.push(Ze(he.splice_immediate_flag,ue))}return he.duration_flag&&(he.break_duration=Ye(ue)),he.unique_program_id=ue.readBits(16),he.avail_num=ue.readBits(8),he.avails_expected=ue.readBits(8),he}(i):R===ye.kTimeSignal?P=function(ue){return{splice_time:He(ue)}}(i):R===ye.kBandwidthReservation?P={}:R===ye.kPrivateCommand?P=function(ue,Se){for(var Ae=String.fromCharCode(Se.readBits(8),Se.readBits(8),Se.readBits(8),Se.readBits(8)),he=new Uint8Array(ue-4),ge=0;ge<ue-4;ge++)he[ge]=Se.readBits(8);return{identifier:Ae,private_data:he.buffer}}(S,i):i.readBits(8*S);for(var H=[],N=i.readBits(16),ee=0;ee<N;){var $=i.readBits(8),Q=i.readBits(8),re=String.fromCharCode(i.readBits(8),i.readBits(8),i.readBits(8),i.readBits(8));$===0?H.push(wt($,Q,re,i)):$===1?H.push(Mt($,Q,re,i)):$===2?H.push(Dt($,Q,re,i)):$===3?H.push(Ot($,Q,re,i)):$===4?H.push(It($,Q,re,i)):i.readBits(8*(Q-4)),ee+=2+Q}var fe={table_id:t,section_syntax_indicator:e,private_indicator:n,section_length:s,protocol_version:r,encrypted_packet:o,encryption_algorithm:h,pts_adjustment:u,cw_index:m,tier:A,splice_command_length:S,splice_command_type:R,splice_command:P,descriptor_loop_length:N,splice_descriptors:H,E_CRC32:o?i.readBits(32):void 0,CRC32:i.readBits(32)};if(R===ye.kSpliceInsert){var Z=P;if(Z.splice_event_cancel_indicator)return{splice_command_type:R,detail:fe,data:a};if(Z.program_splice_flag&&!Z.splice_immediate_flag){var ae=Z.duration_flag?Z.break_duration.auto_return:void 0,pe=Z.duration_flag?Z.break_duration.duration/90:void 0;return Z.splice_time.time_specified_flag?{splice_command_type:R,pts:(u+Z.splice_time.pts_time)%Math.pow(2,33),auto_return:ae,duraiton:pe,detail:fe,data:a}:{splice_command_type:R,auto_return:ae,duraiton:pe,detail:fe,data:a}}return{splice_command_type:R,auto_return:ae=Z.duration_flag?Z.break_duration.auto_return:void 0,duraiton:pe=Z.duration_flag?Z.break_duration.duration/90:void 0,detail:fe,data:a}}if(R===ye.kTimeSignal){var se=P;return se.splice_time.time_specified_flag?{splice_command_type:R,pts:(u+se.splice_time.pts_time)%Math.pow(2,33),detail:fe,data:a}:{splice_command_type:R,detail:fe,data:a}}return{splice_command_type:R,detail:fe,data:a}};(function(a){a[a.kSliceIDR_W_RADL=19]="kSliceIDR_W_RADL",a[a.kSliceIDR_N_LP=20]="kSliceIDR_N_LP",a[a.kSliceCRA_NUT=21]="kSliceCRA_NUT",a[a.kSliceVPS=32]="kSliceVPS",a[a.kSliceSPS=33]="kSliceSPS",a[a.kSlicePPS=34]="kSlicePPS",a[a.kSliceAUD=35]="kSliceAUD"})(ke||(ke={}));var xt=function(){},Ut=function(a){var i=a.data.byteLength;this.type=a.type,this.data=new Uint8Array(4+i),new DataView(this.data.buffer).setUint32(0,i),this.data.set(a.data,4)},Nt=function(){function a(i){this.TAG="H265AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=i,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not find H265 startcode until payload end!")}return a.prototype.findNextStartCodeOffset=function(i){for(var t=i,e=this.data_;;){if(t+3>=e.byteLength)return this.eof_flag_=!0,e.byteLength;var n=e[t+0]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],s=e[t+0]<<16|e[t+1]<<8|e[t+2];if(n===1||s===1)return t;t++}},a.prototype.readNextNaluPayload=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_startcode_offset_,n=i[e+=(i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3])===1?4:3]>>1&63,s=(128&i[e])>>>7,r=this.findNextStartCodeOffset(e);if(this.current_startcode_offset_=r,s===0){var o=i.subarray(e,r);(t=new xt).type=n,t.data=o}}return t},a}(),Vt=function(){function a(i,t,e,n){var s=23+(5+i.byteLength)+(5+t.byteLength)+(5+e.byteLength),r=this.data=new Uint8Array(s);r[0]=1,r[1]=(3&n.general_profile_space)<<6|(n.general_tier_flag?1:0)<<5|31&n.general_profile_idc,r[2]=n.general_profile_compatibility_flags_1,r[3]=n.general_profile_compatibility_flags_2,r[4]=n.general_profile_compatibility_flags_3,r[5]=n.general_profile_compatibility_flags_4,r[6]=n.general_constraint_indicator_flags_1,r[7]=n.general_constraint_indicator_flags_2,r[8]=n.general_constraint_indicator_flags_3,r[9]=n.general_constraint_indicator_flags_4,r[10]=n.general_constraint_indicator_flags_5,r[11]=n.general_constraint_indicator_flags_6,r[12]=n.general_level_idc,r[13]=240|(3840&n.min_spatial_segmentation_idc)>>8,r[14]=255&n.min_spatial_segmentation_idc,r[15]=252|3&n.parallelismType,r[16]=252|3&n.chroma_format_idc,r[17]=248|7&n.bit_depth_luma_minus8,r[18]=248|7&n.bit_depth_chroma_minus8,r[19]=0,r[20]=0,r[21]=(3&n.constant_frame_rate)<<6|(7&n.num_temporal_layers)<<3|(n.temporal_id_nested?1:0)<<2|3,r[22]=3,r[23]=128|ke.kSliceVPS,r[24]=0,r[25]=1,r[26]=(65280&i.byteLength)>>8,r[27]=(255&i.byteLength)>>0,r.set(i,28),r[23+(5+i.byteLength)+0]=128|ke.kSliceSPS,r[23+(5+i.byteLength)+1]=0,r[23+(5+i.byteLength)+2]=1,r[23+(5+i.byteLength)+3]=(65280&t.byteLength)>>8,r[23+(5+i.byteLength)+4]=(255&t.byteLength)>>0,r.set(t,23+(5+i.byteLength)+5),r[23+(5+i.byteLength+5+t.byteLength)+0]=128|ke.kSlicePPS,r[23+(5+i.byteLength+5+t.byteLength)+1]=0,r[23+(5+i.byteLength+5+t.byteLength)+2]=1,r[23+(5+i.byteLength+5+t.byteLength)+3]=(65280&e.byteLength)>>8,r[23+(5+i.byteLength+5+t.byteLength)+4]=(255&e.byteLength)>>0,r.set(e,23+(5+i.byteLength+5+t.byteLength)+5)}return a.prototype.getData=function(){return this.data},a}(),Ft=function(){},Gt=function(){},jt=function(){},zt=[[64,64,80,80,96,96,112,112,128,128,160,160,192,192,224,224,256,256,320,320,384,384,448,448,512,512,640,640,768,768,896,896,1024,1024,1152,1152,1280,1280],[69,70,87,88,104,105,121,122,139,140,174,175,208,209,243,244,278,279,348,349,417,418,487,488,557,558,696,697,835,836,975,976,1114,1115,1253,1254,1393,1394],[96,96,120,120,144,144,168,168,192,192,240,240,288,288,336,336,384,384,480,480,576,576,672,672,768,768,960,960,1152,1152,1344,1344,1536,1536,1728,1728,1920,1920]],Ht=function(){function a(i){this.TAG="AC3Parser",this.data_=i,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not found AC3 syncword until payload end")}return a.prototype.findNextSyncwordOffset=function(i){for(var t=i,e=this.data_;;){if(t+7>=e.byteLength)return this.eof_flag_=!0,e.byteLength;if((e[t+0]<<8|e[t+1]<<0)===2935)return t;t++}},a.prototype.readNextAC3Frame=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_syncword_offset_,n=i[e+4]>>6,s=[48e3,44200,33e3][n],r=63&i[e+4],o=2*zt[n][r];if(isNaN(o)||e+o>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var h=this.findNextSyncwordOffset(e+o);this.current_syncword_offset_=h;var u=i[e+5]>>3,m=7&i[e+5],A=i[e+6]>>5,S=0;(1&A)!=0&&A!==1&&(S+=2),(4&A)!=0&&(S+=2),A===2&&(S+=2);var R=(i[e+6]<<8|i[e+7]<<0)>>12-S&1,P=[2,1,2,3,3,4,4,5][A]+R;(t=new jt).sampling_frequency=s,t.channel_count=P,t.channel_mode=A,t.bit_stream_identification=u,t.low_frequency_effects_channel_on=R,t.bit_stream_mode=m,t.frame_size_code=r,t.data=i.subarray(e,e+o)}return t},a.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},a.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},a}(),qt=function(a){var i;i=[a.sampling_rate_code<<6|a.bit_stream_identification<<1|a.bit_stream_mode>>2,(3&a.bit_stream_mode)<<6|a.channel_mode<<3|a.low_frequency_effects_channel_on<<2|a.frame_size_code>>4,a.frame_size_code<<4&224],this.config=i,this.sampling_rate=a.sampling_frequency,this.bit_stream_identification=a.bit_stream_identification,this.bit_stream_mode=a.bit_stream_mode,this.low_frequency_effects_channel_on=a.low_frequency_effects_channel_on,this.channel_count=a.channel_count,this.channel_mode=a.channel_mode,this.codec_mimetype="ac-3",this.original_codec_mimetype="ac-3"},Kt=function(){},Wt=function(){function a(i){this.TAG="EAC3Parser",this.data_=i,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not found AC3 syncword until payload end")}return a.prototype.findNextSyncwordOffset=function(i){for(var t=i,e=this.data_;;){if(t+7>=e.byteLength)return this.eof_flag_=!0,e.byteLength;if((e[t+0]<<8|e[t+1]<<0)===2935)return t;t++}},a.prototype.readNextEAC3Frame=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_syncword_offset_,n=new x(i.subarray(e+2)),s=(n.readBits(2),n.readBits(3),n.readBits(11)+1<<1),r=n.readBits(2),o=null,h=null;r===3?(o=[24e3,22060,16e3][r=n.readBits(2)],h=3):(o=[48e3,44100,32e3][r],h=n.readBits(2));var u=n.readBits(3),m=n.readBits(1),A=n.readBits(5);if(e+s>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var S=this.findNextSyncwordOffset(e+s);this.current_syncword_offset_=S;var R=[2,1,2,3,3,4,4,5][u]+m;n.destroy(),(t=new Kt).sampling_frequency=o,t.channel_count=R,t.channel_mode=u,t.bit_stream_identification=A,t.low_frequency_effects_channel_on=m,t.frame_size=s,t.num_blks=[1,2,3,6][h],t.data=i.subarray(e,e+s)}return t},a.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},a.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},a}(),Yt=function(a){var i,t=Math.floor(a.frame_size*a.sampling_frequency/(16*a.num_blks));i=[255&t,248&t,a.sampling_rate_code<<6|a.bit_stream_identification<<1|0,0|a.channel_mode<<1|a.low_frequency_effects_channel_on<<0,0],this.config=i,this.sampling_rate=a.sampling_frequency,this.bit_stream_identification=a.bit_stream_identification,this.num_blks=a.num_blks,this.low_frequency_effects_channel_on=a.low_frequency_effects_channel_on,this.channel_count=a.channel_count,this.channel_mode=a.channel_mode,this.codec_mimetype="ec-3",this.original_codec_mimetype="ec-3"},Xt=function(){},Qt=function(){function a(i){this.TAG="AV1OBUInMpegTsParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=i,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not find AV1 startcode until payload end!")}return a._ebsp2rbsp=function(i){for(var t=i,e=t.byteLength,n=new Uint8Array(e),s=0,r=0;r<e;r++)r>=2&&t[r]===3&&t[r-1]===0&&t[r-2]===0||(n[s]=t[r],s++);return new Uint8Array(n.buffer,0,s)},a.prototype.findNextStartCodeOffset=function(i){for(var t=i,e=this.data_;;){if(t+2>=e.byteLength)return this.eof_flag_=!0,e.byteLength;if((e[t+0]<<16|e[t+1]<<8|e[t+2])===1)return t;t++}},a.prototype.readNextOBUPayload=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_startcode_offset_+3,n=this.findNextStartCodeOffset(e);this.current_startcode_offset_=n,t=a._ebsp2rbsp(i.subarray(e,n))}return t},a}(),Jt=function(){var a=function(i,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])})(i,t)};return function(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=i}a(i,t),i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),je=function(){return(je=Object.assign||function(a){for(var i,t=1,e=arguments.length;t<e;t++)for(var n in i=arguments[t])Object.prototype.hasOwnProperty.call(i,n)&&(a[n]=i[n]);return a}).apply(this,arguments)},dt=function(a){function i(t,e){var n=a.call(this)||this;return n.TAG="TSDemuxer",n.first_parse_=!0,n.media_info_=new v.a,n.timescale_=90,n.duration_=0,n.current_pmt_pid_=-1,n.program_pmt_map_={},n.pes_slice_queues_={},n.section_slice_queues_={},n.video_metadata_={vps:void 0,sps:void 0,pps:void 0,av1c:void 0,details:void 0},n.audio_metadata_={codec:void 0,audio_object_type:void 0,sampling_freq_index:void 0,sampling_frequency:void 0,channel_config:void 0},n.last_pcr_base_=NaN,n.timestamp_offset_=0,n.audio_last_sample_pts_=void 0,n.aac_last_incomplete_data_=null,n.has_video_=!1,n.has_audio_=!1,n.video_init_segment_dispatched_=!1,n.audio_init_segment_dispatched_=!1,n.video_metadata_changed_=!1,n.audio_metadata_changed_=!1,n.loas_previous_frame=null,n.video_track_={type:"video",id:1,sequenceNumber:0,samples:[],length:0},n.audio_track_={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},n.ts_packet_size_=t.ts_packet_size,n.sync_offset_=t.sync_offset,n.config_=e,n}return Jt(i,a),i.prototype.destroy=function(){this.media_info_=null,this.pes_slice_queues_=null,this.section_slice_queues_=null,this.video_metadata_=null,this.audio_metadata_=null,this.aac_last_incomplete_data_=null,this.video_track_=null,this.audio_track_=null,a.prototype.destroy.call(this)},i.probe=function(t){var e=new Uint8Array(t),n=-1,s=188;if(e.byteLength<=3*s)return{needMoreData:!0};for(;n===-1;){for(var r=Math.min(1e3,e.byteLength-3*s),o=0;o<r;){if(e[o]===71&&e[o+s]===71&&e[o+2*s]===71){n=o;break}o++}if(n===-1)if(s===188)s=192;else{if(s!==192)break;s=204}}return n===-1?{match:!1}:(s===192&&n>=4?(f.a.v("TSDemuxer","ts_packet_size = 192, m2ts mode"),n-=4):s===204&&f.a.v("TSDemuxer","ts_packet_size = 204, RS encoded MPEG2-TS stream"),{match:!0,consumed:0,ts_packet_size:s,sync_offset:n})},i.prototype.bindDataSource=function(t){return t.onDataArrival=this.parseChunks.bind(this),this},i.prototype.resetMediaInfo=function(){this.media_info_=new v.a},i.prototype.parseChunks=function(t,e){if(!(this.onError&&this.onMediaInfo&&this.onTrackMetadata&&this.onDataAvailable))throw new L.a("onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var n=0;for(this.first_parse_&&(this.first_parse_=!1,n=this.sync_offset_);n+this.ts_packet_size_<=t.byteLength;){var s=e+n;this.ts_packet_size_===192&&(n+=4);var r=new Uint8Array(t,n,188),o=r[0];if(o!==71){f.a.e(this.TAG,"sync_byte = ".concat(o,", not 0x47"));break}var h=(64&r[1])>>>6,u=(r[1],(31&r[1])<<8|r[2]),m=(48&r[3])>>>4,A=15&r[3],S=!(!this.pmt_||this.pmt_.pcr_pid!==u),R={},P=4;if(m==2||m==3){var H=r[4];if(H>0&&(S||m==3)&&(R.discontinuity_indicator=(128&r[5])>>>7,R.random_access_indicator=(64&r[5])>>>6,R.elementary_stream_priority_indicator=(32&r[5])>>>5,(16&r[5])>>>4)){var N=300*this.getPcrBase(r)+((1&r[10])<<8|r[11]);this.last_pcr_=N}if(m==2||5+H===188){n+=188,this.ts_packet_size_===204&&(n+=16);continue}P=5+H}if(m==1||m==3){if(u===0||u===this.current_pmt_pid_||this.pmt_!=null&&this.pmt_.pid_stream_type[u]===d.kSCTE35){var ee=188-P;this.handleSectionSlice(t,n+P,ee,{pid:u,file_position:s,payload_unit_start_indicator:h,continuity_conunter:A,random_access_indicator:R.random_access_indicator})}else if(this.pmt_!=null&&this.pmt_.pid_stream_type[u]!=null){ee=188-P;var $=this.pmt_.pid_stream_type[u];u!==this.pmt_.common_pids.h264&&u!==this.pmt_.common_pids.h265&&u!==this.pmt_.common_pids.av1&&u!==this.pmt_.common_pids.adts_aac&&u!==this.pmt_.common_pids.loas_aac&&u!==this.pmt_.common_pids.ac3&&u!==this.pmt_.common_pids.eac3&&u!==this.pmt_.common_pids.opus&&u!==this.pmt_.common_pids.mp3&&this.pmt_.pes_private_data_pids[u]!==!0&&this.pmt_.timed_id3_pids[u]!==!0&&this.pmt_.synchronous_klv_pids[u]!==!0&&this.pmt_.asynchronous_klv_pids[u]!==!0||this.handlePESSlice(t,n+P,ee,{pid:u,stream_type:$,file_position:s,payload_unit_start_indicator:h,continuity_conunter:A,random_access_indicator:R.random_access_indicator})}}n+=188,this.ts_packet_size_===204&&(n+=16)}return this.dispatchAudioVideoMediaSegment(),n},i.prototype.handleSectionSlice=function(t,e,n,s){var r=new Uint8Array(t,e,n),o=this.section_slice_queues_[s.pid];if(s.payload_unit_start_indicator){var h=r[0];if(o!=null&&o.total_length!==0){var u=new Uint8Array(t,e+1,Math.min(n,h));o.slices.push(u),o.total_length+=u.byteLength,o.total_length===o.expected_length?this.emitSectionSlices(o,s):this.clearSlices(o,s)}for(var m=1+h;m<r.byteLength&&r[m+0]!==255;){var A=(15&r[m+1])<<8|r[m+2];this.section_slice_queues_[s.pid]=new _e,(o=this.section_slice_queues_[s.pid]).expected_length=A+3,o.file_position=s.file_position,o.random_access_indicator=s.random_access_indicator,u=new Uint8Array(t,e+m,Math.min(n-m,o.expected_length-o.total_length)),o.slices.push(u),o.total_length+=u.byteLength,o.total_length===o.expected_length?this.emitSectionSlices(o,s):o.total_length>=o.expected_length&&this.clearSlices(o,s),m+=u.byteLength}}else o!=null&&o.total_length!==0&&(u=new Uint8Array(t,e,Math.min(n,o.expected_length-o.total_length)),o.slices.push(u),o.total_length+=u.byteLength,o.total_length===o.expected_length?this.emitSectionSlices(o,s):o.total_length>=o.expected_length&&this.clearSlices(o,s))},i.prototype.handlePESSlice=function(t,e,n,s){var r=new Uint8Array(t,e,n),o=r[0]<<16|r[1]<<8|r[2],h=(r[3],r[4]<<8|r[5]);if(s.payload_unit_start_indicator){if(o!==1)return void f.a.e(this.TAG,"handlePESSlice: packet_start_code_prefix should be 1 but with value ".concat(o));var u=this.pes_slice_queues_[s.pid];u&&(u.expected_length===0||u.expected_length===u.total_length?this.emitPESSlices(u,s):this.clearSlices(u,s)),this.pes_slice_queues_[s.pid]=new _e,this.pes_slice_queues_[s.pid].file_position=s.file_position,this.pes_slice_queues_[s.pid].random_access_indicator=s.random_access_indicator}if(this.pes_slice_queues_[s.pid]!=null){var m=this.pes_slice_queues_[s.pid];m.slices.push(r),s.payload_unit_start_indicator&&(m.expected_length=h===0?0:h+6),m.total_length+=r.byteLength,m.expected_length>0&&m.expected_length===m.total_length?this.emitPESSlices(m,s):m.expected_length>0&&m.expected_length<m.total_length&&this.clearSlices(m,s)}},i.prototype.emitSectionSlices=function(t,e){for(var n=new Uint8Array(t.total_length),s=0,r=0;s<t.slices.length;s++){var o=t.slices[s];n.set(o,r),r+=o.byteLength}t.slices=[],t.expected_length=-1,t.total_length=0;var h=new Ee;h.pid=e.pid,h.data=n,h.file_position=t.file_position,h.random_access_indicator=t.random_access_indicator,this.parseSection(h)},i.prototype.emitPESSlices=function(t,e){for(var n=new Uint8Array(t.total_length),s=0,r=0;s<t.slices.length;s++){var o=t.slices[s];n.set(o,r),r+=o.byteLength}t.slices=[],t.expected_length=-1,t.total_length=0;var h=new oe;h.pid=e.pid,h.data=n,h.stream_type=e.stream_type,h.file_position=t.file_position,h.random_access_indicator=t.random_access_indicator,this.parsePES(h)},i.prototype.clearSlices=function(t,e){t.slices=[],t.expected_length=-1,t.total_length=0},i.prototype.parseSection=function(t){var e=t.data,n=t.pid;n===0?this.parsePAT(e):n===this.current_pmt_pid_?this.parsePMT(e):this.pmt_!=null&&this.pmt_.scte_35_pids[n]&&this.parseSCTE35(e)},i.prototype.parsePES=function(t){var e=t.data,n=e[0]<<16|e[1]<<8|e[2],s=e[3],r=e[4]<<8|e[5];if(n===1)if(s!==188&&s!==190&&s!==191&&s!==240&&s!==241&&s!==255&&s!==242&&s!==248){e[6];var o=(192&e[7])>>>6,h=e[8],u=void 0,m=void 0;o!==2&&o!==3||(u=this.getTimestamp(e,9),m=o===3?this.getTimestamp(e,14):u);var A=9+h,S=void 0;if(r!==0){if(r<3+h)return void f.a.v(this.TAG,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");S=r-3-h}else S=e.byteLength-A;var R=e.subarray(A,A+S);switch(t.stream_type){case d.kMPEG1Audio:case d.kMPEG2Audio:this.parseMP3Payload(R,u);break;case d.kPESPrivateData:this.pmt_.common_pids.av1===t.pid?this.parseAV1Payload(R,u,m,t.file_position,t.random_access_indicator):this.pmt_.common_pids.opus===t.pid?this.parseOpusPayload(R,u):this.pmt_.common_pids.ac3===t.pid?this.parseAC3Payload(R,u):this.pmt_.common_pids.eac3===t.pid?this.parseEAC3Payload(R,u):this.pmt_.asynchronous_klv_pids[t.pid]?this.parseAsynchronousKLVMetadataPayload(R,t.pid,s):this.pmt_.smpte2038_pids[t.pid]?this.parseSMPTE2038MetadataPayload(R,u,m,t.pid,s):this.parsePESPrivateDataPayload(R,u,m,t.pid,s);break;case d.kADTSAAC:this.parseADTSAACPayload(R,u);break;case d.kLOASAAC:this.parseLOASAACPayload(R,u);break;case d.kAC3:this.parseAC3Payload(R,u);break;case d.kEAC3:this.parseEAC3Payload(R,u);break;case d.kMetadata:this.pmt_.timed_id3_pids[t.pid]?this.parseTimedID3MetadataPayload(R,u,m,t.pid,s):this.pmt_.synchronous_klv_pids[t.pid]&&this.parseSynchronousKLVMetadataPayload(R,u,m,t.pid,s);break;case d.kH264:this.parseH264Payload(R,u,m,t.file_position,t.random_access_indicator);break;case d.kH265:this.parseH265Payload(R,u,m,t.file_position,t.random_access_indicator)}}else(s===188||s===191||s===240||s===241||s===255||s===242||s===248)&&t.stream_type===d.kPESPrivateData&&(A=6,S=void 0,S=r!==0?r:e.byteLength-A,R=e.subarray(A,A+S),this.parsePESPrivateDataPayload(R,void 0,void 0,t.pid,s));else f.a.e(this.TAG,"parsePES: packet_start_code_prefix should be 1 but with value ".concat(n))},i.prototype.parsePAT=function(t){var e=t[0];if(e===0){var n=(15&t[1])<<8|t[2],s=(t[3],t[4],(62&t[5])>>>1),r=1&t[5],o=t[6],h=(t[7],null);if(r===1&&o===0)(h=new J).version_number=s;else if((h=this.pat_)==null)return;for(var u=n-5-4,m=-1,A=-1,S=8;S<8+u;S+=4){var R=t[S]<<8|t[S+1],P=(31&t[S+2])<<8|t[S+3];R===0?h.network_pid=P:(h.program_pmt_pid[R]=P,m===-1&&(m=R),A===-1&&(A=P))}r===1&&o===0&&(this.pat_==null&&f.a.v(this.TAG,"Parsed first PAT: ".concat(JSON.stringify(h))),this.pat_=h,this.current_program_=m,this.current_pmt_pid_=A)}else f.a.e(this.TAG,"parsePAT: table_id ".concat(e," is not corresponded to PAT!"))},i.prototype.parsePMT=function(t){var e=t[0];if(e===2){var n=(15&t[1])<<8|t[2],s=t[3]<<8|t[4],r=(62&t[5])>>>1,o=1&t[5],h=t[6],u=(t[7],null);if(o===1&&h===0)(u=new Y).program_number=s,u.version_number=r,this.program_pmt_map_[s]=u;else if((u=this.program_pmt_map_[s])==null)return;u.pcr_pid=(31&t[8])<<8|t[9];for(var m=(15&t[10])<<8|t[11],A=12+m,S=n-9-m-4,R=A;R<A+S;){var P=t[R],H=(31&t[R+1])<<8|t[R+2],N=(15&t[R+3])<<8|t[R+4];u.pid_stream_type[H]=P;var ee=u.common_pids.h264||u.common_pids.h265,$=u.common_pids.adts_aac||u.common_pids.loas_aac||u.common_pids.ac3||u.common_pids.eac3||u.common_pids.opus||u.common_pids.mp3;if(P!==d.kH264||ee)if(P!==d.kH265||ee)if(P!==d.kADTSAAC||$)if(P!==d.kLOASAAC||$)if(P!==d.kAC3||$)if(P!==d.kEAC3||$)if(P!==d.kMPEG1Audio&&P!==d.kMPEG2Audio||$)if(P===d.kPESPrivateData){if(u.pes_private_data_pids[H]=!0,N>0){for(var Q=R+5;Q<R+5+N;){var re=t[Q+0],fe=t[Q+1];if(re===5){var Z=String.fromCharCode.apply(String,Array.from(t.subarray(Q+2,Q+2+fe)));Z==="VANC"?u.smpte2038_pids[H]=!0:Z==="AV01"?u.common_pids.av1=H:Z==="Opus"?u.common_pids.opus=H:Z==="KLVA"&&(u.asynchronous_klv_pids[H]=!0)}else if(re===127){if(H===u.common_pids.opus){var ae=null;if(t[Q+2]===128&&(ae=t[Q+3]),ae==null){f.a.e(this.TAG,"Not Supported Opus channel count.");continue}var pe={codec:"opus",channel_count:(15&ae)==0?2:15&ae,channel_config_code:ae,sample_rate:48e3},se={codec:"opus",meta:pe};this.audio_init_segment_dispatched_==0?(this.audio_metadata_=pe,this.dispatchAudioInitSegment(se)):this.detectAudioMetadataChange(se)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(se))}}else re===128&&H===u.common_pids.av1&&(this.video_metadata_.av1c=t.subarray(Q+2,Q+2+fe));Q+=2+fe}var ue=t.subarray(R+5,R+5+N);this.dispatchPESPrivateDataDescriptor(H,P,ue)}}else if(P===d.kMetadata){if(N>0)for(Q=R+5;Q<R+5+N;){re=t[Q+0];var Se=t[Q+1];if(re===38){var Ae=t[Q+2]<<8|t[Q+3]<<0,he=null;Ae===65535&&(he=String.fromCharCode.apply(String,Array.from(t.subarray(Q+4,Q+4+4))));var ge=null;if(t[Q+4+(Ae===65535?4:0)]===255){var Re=4+(Ae===65535?4:0)+1;ge=String.fromCharCode.apply(String,Array.from(t.subarray(Q+Re,Q+Re+4)))}he==="ID3 "&&ge==="ID3 "?u.timed_id3_pids[H]=!0:ge==="KLVA"&&(u.synchronous_klv_pids[H]=!0)}Q+=2+Se}}else P===d.kSCTE35&&(u.scte_35_pids[H]=!0);else u.common_pids.mp3=H;else u.common_pids.eac3=H;else u.common_pids.ac3=H;else u.common_pids.loas_aac=H;else u.common_pids.adts_aac=H;else u.common_pids.h265=H;else u.common_pids.h264=H;R+=5+N}s===this.current_program_&&(this.pmt_==null&&f.a.v(this.TAG,"Parsed first PMT: ".concat(JSON.stringify(u))),this.pmt_=u,(u.common_pids.h264||u.common_pids.h265||u.common_pids.av1)&&(this.has_video_=!0),(u.common_pids.adts_aac||u.common_pids.loas_aac||u.common_pids.ac3||u.common_pids.opus||u.common_pids.mp3)&&(this.has_audio_=!0))}else f.a.e(this.TAG,"parsePMT: table_id ".concat(e," is not corresponded to PMT!"))},i.prototype.parseSCTE35=function(t){var e=Pt(t);if(e.pts!=null){var n=Math.floor(e.pts/this.timescale_);e.pts=n}else e.nearest_pts=this.getNearestTimestampMilliseconds();this.onSCTE35Metadata&&this.onSCTE35Metadata(e)},i.prototype.parseAV1Payload=function(t,e,n,s,r){for(var o=new Qt(t),h=null,u=[],m=0,A=!1,S=null;(h=o.readNextOBUPayload())!=null;){if((S=_.parseOBUs(h,this.video_metadata_.details))&&S.keyframe===!0)if(this.video_init_segment_dispatched_){if(this.detectVideoMetadataChange(null,S)===!0){var R;this.video_metadata_changed_=!0,this.dispatchVideoMediaSegment(),(R=new Uint8Array(new ArrayBuffer(this.video_metadata_.av1c.byteLength+S.sequence_header_data.byteLength))).set(this.video_metadata_.av1c,0),R.set(S.sequence_header_data,this.video_metadata_.av1c.byteLength),S.av1c=R,this.dispatchVideoInitSegment()}}else(R=new Uint8Array(new ArrayBuffer(this.video_metadata_.av1c.byteLength+S.sequence_header_data.byteLength))).set(this.video_metadata_.av1c,0),R.set(S.sequence_header_data,this.video_metadata_.av1c.byteLength),S.av1c=R,this.video_metadata_.details=S,this.dispatchVideoInitSegment();this.video_metadata_.details=S,A||(A=S.keyframe),u.push({data:h}),m+=h.byteLength}var P=Math.floor(e/this.timescale_),H=Math.floor(n/this.timescale_);if(u.length){var N=this.video_track_,ee={units:u,length:m,isKeyframe:A,dts:H,pts:P,cts:P-H,file_position:s};N.samples.push(ee),N.length+=m}},i.prototype.parseH264Payload=function(t,e,n,s,r){for(var o=new ne(t),h=null,u=[],m=0,A=!1;(h=o.readNextNaluPayload())!=null;){var S=new z(h);if(S.type===G.kSliceSPS){var R=U.parseSPS(h.data);this.video_init_segment_dispatched_?this.detectVideoMetadataChange(S,R)===!0&&(f.a.v(this.TAG,"H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:S,pps:void 0,av1c:void 0,details:R}):(this.video_metadata_.sps=S,this.video_metadata_.details=R)}else S.type===G.kSlicePPS?this.video_init_segment_dispatched_&&!this.video_metadata_changed_||(this.video_metadata_.pps=S,this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):(S.type===G.kSliceIDR||S.type===G.kSliceNonIDR&&r===1)&&(A=!0);this.video_init_segment_dispatched_&&(u.push(S),m+=S.data.byteLength)}var P=Math.floor(e/this.timescale_),H=Math.floor(n/this.timescale_);if(u.length){var N=this.video_track_,ee={units:u,length:m,isKeyframe:A,dts:H,pts:P,cts:P-H,file_position:s};N.samples.push(ee),N.length+=m}},i.prototype.parseH265Payload=function(t,e,n,s,r){for(var o=new Nt(t),h=null,u=[],m=0,A=!1;(h=o.readNextNaluPayload())!=null;){var S=new Ut(h);if(S.type===ke.kSliceVPS){if(!this.video_init_segment_dispatched_){var R=K.parseVPS(h.data);this.video_metadata_.vps=S,this.video_metadata_.details=je(je({},this.video_metadata_.details),R)}}else S.type===ke.kSliceSPS?(R=K.parseSPS(h.data),this.video_init_segment_dispatched_?this.detectVideoMetadataChange(S,R)===!0&&(f.a.v(this.TAG,"H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:S,pps:void 0,av1c:void 0,details:R}):(this.video_metadata_.sps=S,this.video_metadata_.details=je(je({},this.video_metadata_.details),R))):S.type===ke.kSlicePPS?(!this.video_init_segment_dispatched_||this.video_metadata_changed_)&&(R=K.parsePPS(h.data),this.video_metadata_.pps=S,this.video_metadata_.details=je(je({},this.video_metadata_.details),R),this.video_metadata_.vps&&this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):S.type!==ke.kSliceIDR_W_RADL&&S.type!==ke.kSliceIDR_N_LP&&S.type!==ke.kSliceCRA_NUT||(A=!0);this.video_init_segment_dispatched_&&(u.push(S),m+=S.data.byteLength)}var P=Math.floor(e/this.timescale_),H=Math.floor(n/this.timescale_);if(u.length){var N=this.video_track_,ee={units:u,length:m,isKeyframe:A,dts:H,pts:P,cts:P-H,file_position:s};N.samples.push(ee),N.length+=m}},i.prototype.detectVideoMetadataChange=function(t,e){if(e.codec_mimetype!==this.video_metadata_.details.codec_mimetype)return f.a.v(this.TAG,"Video: Codec mimeType changed from "+"".concat(this.video_metadata_.details.codec_mimetype," to ").concat(e.codec_mimetype)),!0;if(e.codec_size.width!==this.video_metadata_.details.codec_size.width||e.codec_size.height!==this.video_metadata_.details.codec_size.height){var n=this.video_metadata_.details.codec_size,s=e.codec_size;return f.a.v(this.TAG,"Video: Coded Resolution changed from "+"".concat(n.width,"x").concat(n.height," to ").concat(s.width,"x").concat(s.height)),!0}return e.present_size.width!==this.video_metadata_.details.present_size.width&&(f.a.v(this.TAG,"Video: Present resolution width changed from "+"".concat(this.video_metadata_.details.present_size.width," to ").concat(e.present_size.width)),!0)},i.prototype.isInitSegmentDispatched=function(){return this.has_video_&&this.has_audio_?this.video_init_segment_dispatched_&&this.audio_init_segment_dispatched_:this.has_video_&&!this.has_audio_?this.video_init_segment_dispatched_:!(this.has_video_||!this.has_audio_)&&this.audio_init_segment_dispatched_},i.prototype.dispatchVideoInitSegment=function(){var t=this.video_metadata_.details,e={type:"video"};e.id=this.video_track_.id,e.timescale=1e3,e.duration=this.duration_,e.codecWidth=t.codec_size.width,e.codecHeight=t.codec_size.height,e.presentWidth=t.present_size.width,e.presentHeight=t.present_size.height,e.profile=t.profile_string,e.level=t.level_string,e.bitDepth=t.bit_depth,e.chromaFormat=t.chroma_format,e.sarRatio=t.sar_ratio,e.frameRate=t.frame_rate;var n=e.frameRate.fps_den,s=e.frameRate.fps_num;if(e.refSampleDuration=n/s*1e3,e.codec=t.codec_mimetype,this.video_metadata_.av1c)e.av1c=this.video_metadata_.av1c,this.video_init_segment_dispatched_==0&&f.a.v(this.TAG,"Generated first AV1 for mimeType: ".concat(e.codec));else if(this.video_metadata_.vps){var r=this.video_metadata_.vps.data.subarray(4),o=this.video_metadata_.sps.data.subarray(4),h=this.video_metadata_.pps.data.subarray(4),u=new Vt(r,o,h,t);e.hvcc=u.getData(),this.video_init_segment_dispatched_==0&&f.a.v(this.TAG,"Generated first HEVCDecoderConfigurationRecord for mimeType: ".concat(e.codec))}else{o=this.video_metadata_.sps.data.subarray(4),h=this.video_metadata_.pps.data.subarray(4);var m=new de(o,h,t);e.avcc=m.getData(),this.video_init_segment_dispatched_==0&&f.a.v(this.TAG,"Generated first AVCDecoderConfigurationRecord for mimeType: ".concat(e.codec))}this.onTrackMetadata("video",e),this.video_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;var A=this.media_info_;A.hasVideo=!0,A.width=e.codecWidth,A.height=e.codecHeight,A.fps=e.frameRate.fps,A.profile=e.profile,A.level=e.level,A.refFrames=t.ref_frames,A.chromaFormat=t.chroma_format_string,A.sarNum=e.sarRatio.width,A.sarDen=e.sarRatio.height,A.videoCodec=e.codec,A.hasAudio&&A.audioCodec?A.mimeType='video/mp2t; codecs="'.concat(A.videoCodec,",").concat(A.audioCodec,'"'):A.mimeType='video/mp2t; codecs="'.concat(A.videoCodec,'"'),A.isComplete()&&this.onMediaInfo(A)},i.prototype.dispatchVideoMediaSegment=function(){this.isInitSegmentDispatched()&&this.video_track_.length&&this.onDataAvailable(null,this.video_track_)},i.prototype.dispatchAudioMediaSegment=function(){this.isInitSegmentDispatched()&&this.audio_track_.length&&this.onDataAvailable(this.audio_track_,null)},i.prototype.dispatchAudioVideoMediaSegment=function(){this.isInitSegmentDispatched()&&(this.audio_track_.length||this.video_track_.length)&&this.onDataAvailable(this.audio_track_,this.video_track_)},i.prototype.parseADTSAACPayload=function(t,e){if(!this.has_video_||this.video_init_segment_dispatched_){if(this.aac_last_incomplete_data_){var n=new Uint8Array(t.byteLength+this.aac_last_incomplete_data_.byteLength);n.set(this.aac_last_incomplete_data_,0),n.set(t,this.aac_last_incomplete_data_.byteLength),t=n}var s,r;if(e!=null&&(r=e/this.timescale_),this.audio_metadata_.codec==="aac"){if(e==null&&this.audio_last_sample_pts_!=null)s=1024/this.audio_metadata_.sampling_frequency*1e3,r=this.audio_last_sample_pts_+s;else if(e==null)return void f.a.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.audio_last_sample_pts_){s=1024/this.audio_metadata_.sampling_frequency*1e3;var o=this.audio_last_sample_pts_+s;Math.abs(o-r)>1&&(f.a.w(this.TAG,"AAC: Detected pts overlapped, "+"expected: ".concat(o,"ms, PES pts: ").concat(r,"ms")),r=o)}}for(var h,u=new ce(t),m=null,A=r;(m=u.readNextAACFrame())!=null;){s=1024/m.sampling_frequency*1e3;var S={codec:"aac",data:m};this.audio_init_segment_dispatched_==0?(this.audio_metadata_={codec:"aac",audio_object_type:m.audio_object_type,sampling_freq_index:m.sampling_freq_index,sampling_frequency:m.sampling_frequency,channel_config:m.channel_config},this.dispatchAudioInitSegment(S)):this.detectAudioMetadataChange(S)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(S)),h=A;var R=Math.floor(A),P={unit:m.data,length:m.data.byteLength,pts:R,dts:R};this.audio_track_.samples.push(P),this.audio_track_.length+=m.data.byteLength,A+=s}u.hasIncompleteData()&&(this.aac_last_incomplete_data_=u.getIncompleteData()),h&&(this.audio_last_sample_pts_=h)}},i.prototype.parseLOASAACPayload=function(t,e){var n;if(!this.has_video_||this.video_init_segment_dispatched_){if(this.aac_last_incomplete_data_){var s=new Uint8Array(t.byteLength+this.aac_last_incomplete_data_.byteLength);s.set(this.aac_last_incomplete_data_,0),s.set(t,this.aac_last_incomplete_data_.byteLength),t=s}var r,o;if(e!=null&&(o=e/this.timescale_),this.audio_metadata_.codec==="aac"){if(e==null&&this.audio_last_sample_pts_!=null)r=1024/this.audio_metadata_.sampling_frequency*1e3,o=this.audio_last_sample_pts_+r;else if(e==null)return void f.a.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.audio_last_sample_pts_){r=1024/this.audio_metadata_.sampling_frequency*1e3;var h=this.audio_last_sample_pts_+r;Math.abs(h-o)>1&&(f.a.w(this.TAG,"AAC: Detected pts overlapped, "+"expected: ".concat(h,"ms, PES pts: ").concat(o,"ms")),o=h)}}for(var u,m=new ve(t),A=null,S=o;(A=m.readNextAACFrame((n=this.loas_previous_frame)!==null&&n!==void 0?n:void 0))!=null;){this.loas_previous_frame=A,r=1024/A.sampling_frequency*1e3;var R={codec:"aac",data:A};this.audio_init_segment_dispatched_==0?(this.audio_metadata_={codec:"aac",audio_object_type:A.audio_object_type,sampling_freq_index:A.sampling_freq_index,sampling_frequency:A.sampling_frequency,channel_config:A.channel_config},this.dispatchAudioInitSegment(R)):this.detectAudioMetadataChange(R)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(R)),u=S;var P=Math.floor(S),H={unit:A.data,length:A.data.byteLength,pts:P,dts:P};this.audio_track_.samples.push(H),this.audio_track_.length+=A.data.byteLength,S+=r}m.hasIncompleteData()&&(this.aac_last_incomplete_data_=m.getIncompleteData()),u&&(this.audio_last_sample_pts_=u)}},i.prototype.parseAC3Payload=function(t,e){if(!this.has_video_||this.video_init_segment_dispatched_){var n,s;if(e!=null&&(s=e/this.timescale_),this.audio_metadata_.codec==="ac-3"){if(e==null&&this.audio_last_sample_pts_!=null)n=1536/this.audio_metadata_.sampling_frequency*1e3,s=this.audio_last_sample_pts_+n;else if(e==null)return void f.a.w(this.TAG,"AC3: Unknown pts")}for(var r,o=new Ht(t),h=null,u=s;(h=o.readNextAC3Frame())!=null;){n=1536/h.sampling_frequency*1e3;var m={codec:"ac-3",data:h};this.audio_init_segment_dispatched_==0?(this.audio_metadata_={codec:"ac-3",sampling_frequency:h.sampling_frequency,bit_stream_identification:h.bit_stream_identification,bit_stream_mode:h.bit_stream_mode,low_frequency_effects_channel_on:h.low_frequency_effects_channel_on,channel_mode:h.channel_mode},this.dispatchAudioInitSegment(m)):this.detectAudioMetadataChange(m)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(m)),r=u;var A=Math.floor(u),S={unit:h.data,length:h.data.byteLength,pts:A,dts:A};this.audio_track_.samples.push(S),this.audio_track_.length+=h.data.byteLength,u+=n}r&&(this.audio_last_sample_pts_=r)}},i.prototype.parseEAC3Payload=function(t,e){if(!this.has_video_||this.video_init_segment_dispatched_){var n,s;if(e!=null&&(s=e/this.timescale_),this.audio_metadata_.codec==="ec-3"){if(e==null&&this.audio_last_sample_pts_!=null)n=256*this.audio_metadata_.num_blks/this.audio_metadata_.sampling_frequency*1e3,s=this.audio_last_sample_pts_+n;else if(e==null)return void f.a.w(this.TAG,"EAC3: Unknown pts")}for(var r,o=new Wt(t),h=null,u=s;(h=o.readNextEAC3Frame())!=null;){n=1536/h.sampling_frequency*1e3;var m={codec:"ec-3",data:h};this.audio_init_segment_dispatched_==0?(this.audio_metadata_={codec:"ec-3",sampling_frequency:h.sampling_frequency,bit_stream_identification:h.bit_stream_identification,low_frequency_effects_channel_on:h.low_frequency_effects_channel_on,num_blks:h.num_blks,channel_mode:h.channel_mode},this.dispatchAudioInitSegment(m)):this.detectAudioMetadataChange(m)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(m)),r=u;var A=Math.floor(u),S={unit:h.data,length:h.data.byteLength,pts:A,dts:A};this.audio_track_.samples.push(S),this.audio_track_.length+=h.data.byteLength,u+=n}r&&(this.audio_last_sample_pts_=r)}},i.prototype.parseOpusPayload=function(t,e){if(!this.has_video_||this.video_init_segment_dispatched_){var n,s;if(e!=null&&(s=e/this.timescale_),this.audio_metadata_.codec==="opus"){if(e==null&&this.audio_last_sample_pts_!=null)n=20,s=this.audio_last_sample_pts_+n;else if(e==null)return void f.a.w(this.TAG,"Opus: Unknown pts")}for(var r,o=s,h=0;h<t.length;){n=20;for(var u=(16&t[h+1])!=0,m=(8&t[h+1])!=0,A=h+2,S=0;t[A]===255;)S+=255,A+=1;S+=t[A],A+=1,A+=u?2:0,A+=m?2:0,r=o;var R=Math.floor(o),P=t.slice(A,A+S),H={unit:P,length:P.byteLength,pts:R,dts:R};this.audio_track_.samples.push(H),this.audio_track_.length+=P.byteLength,o+=n,h=A+S}r&&(this.audio_last_sample_pts_=r)}},i.prototype.parseMP3Payload=function(t,e){if(!this.has_video_||this.video_init_segment_dispatched_){var n=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],s=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],r=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],o=t[1]>>>3&3,h=(6&t[1])>>1,u=(240&t[2])>>>4,m=(12&t[2])>>>2,A=(t[3]>>>6&3)!==3?2:1,S=0,R=34;switch(o){case 0:S=[11025,12e3,8e3,0][m];break;case 2:S=[22050,24e3,16e3,0][m];break;case 3:S=[44100,48e3,32e3,0][m]}switch(h){case 1:R=34,u<r.length&&r[u];break;case 2:R=33,u<s.length&&s[u];break;case 3:R=32,u<n.length&&n[u]}var P=new Gt;P.object_type=R,P.sample_rate=S,P.channel_count=A,P.data=t;var H={codec:"mp3",data:P};this.audio_init_segment_dispatched_==0?(this.audio_metadata_={codec:"mp3",object_type:R,sample_rate:S,channel_count:A},this.dispatchAudioInitSegment(H)):this.detectAudioMetadataChange(H)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(H));var N={unit:t,length:t.byteLength,pts:e/this.timescale_,dts:e/this.timescale_};this.audio_track_.samples.push(N),this.audio_track_.length+=t.byteLength}},i.prototype.detectAudioMetadataChange=function(t){if(t.codec!==this.audio_metadata_.codec)return f.a.v(this.TAG,"Audio: Audio Codecs changed from "+"".concat(this.audio_metadata_.codec," to ").concat(t.codec)),!0;if(t.codec==="aac"&&this.audio_metadata_.codec==="aac"){if((e=t.data).audio_object_type!==this.audio_metadata_.audio_object_type)return f.a.v(this.TAG,"AAC: AudioObjectType changed from "+"".concat(this.audio_metadata_.audio_object_type," to ").concat(e.audio_object_type)),!0;if(e.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return f.a.v(this.TAG,"AAC: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sampling_freq_index," to ").concat(e.sampling_freq_index)),!0;if(e.channel_config!==this.audio_metadata_.channel_config)return f.a.v(this.TAG,"AAC: Channel configuration changed from "+"".concat(this.audio_metadata_.channel_config," to ").concat(e.channel_config)),!0}else if(t.codec==="ac-3"&&this.audio_metadata_.codec==="ac-3"){var e;if((e=t.data).sampling_frequency!==this.audio_metadata_.sampling_frequency)return f.a.v(this.TAG,"AC3: Sampling Frequency changed from "+"".concat(this.audio_metadata_.sampling_frequency," to ").concat(e.sampling_frequency)),!0;if(e.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return f.a.v(this.TAG,"AC3: Bit Stream Identification changed from "+"".concat(this.audio_metadata_.bit_stream_identification," to ").concat(e.bit_stream_identification)),!0;if(e.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return f.a.v(this.TAG,"AC3: BitStream Mode changed from "+"".concat(this.audio_metadata_.bit_stream_mode," to ").concat(e.bit_stream_mode)),!0;if(e.channel_mode!==this.audio_metadata_.channel_mode)return f.a.v(this.TAG,"AC3: Channel Mode changed from "+"".concat(this.audio_metadata_.channel_mode," to ").concat(e.channel_mode)),!0;if(e.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return f.a.v(this.TAG,"AC3: Low Frequency Effects Channel On changed from "+"".concat(this.audio_metadata_.low_frequency_effects_channel_on," to ").concat(e.low_frequency_effects_channel_on)),!0}else if(t.codec==="opus"&&this.audio_metadata_.codec==="opus"){if((n=t.meta).sample_rate!==this.audio_metadata_.sample_rate)return f.a.v(this.TAG,"Opus: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sample_rate," to ").concat(n.sample_rate)),!0;if(n.channel_count!==this.audio_metadata_.channel_count)return f.a.v(this.TAG,"Opus: Channel count changed from "+"".concat(this.audio_metadata_.channel_count," to ").concat(n.channel_count)),!0}else if(t.codec==="mp3"&&this.audio_metadata_.codec==="mp3"){var n;if((n=t.data).object_type!==this.audio_metadata_.object_type)return f.a.v(this.TAG,"MP3: AudioObjectType changed from "+"".concat(this.audio_metadata_.object_type," to ").concat(n.object_type)),!0;if(n.sample_rate!==this.audio_metadata_.sample_rate)return f.a.v(this.TAG,"MP3: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sample_rate," to ").concat(n.sample_rate)),!0;if(n.channel_count!==this.audio_metadata_.channel_count)return f.a.v(this.TAG,"MP3: Channel count changed from "+"".concat(this.audio_metadata_.channel_count," to ").concat(n.channel_count)),!0}return!1},i.prototype.dispatchAudioInitSegment=function(t){var e={type:"audio"};if(e.id=this.audio_track_.id,e.timescale=1e3,e.duration=this.duration_,this.audio_metadata_.codec==="aac"){var n=t.codec==="aac"?t.data:null,s=new Me(n);e.audioSampleRate=s.sampling_rate,e.channelCount=s.channel_count,e.codec=s.codec_mimetype,e.originalCodec=s.original_codec_mimetype,e.config=s.config,e.refSampleDuration=1024/e.audioSampleRate*e.timescale}else if(this.audio_metadata_.codec==="ac-3"){var r=t.codec==="ac-3"?t.data:null,o=new qt(r);e.audioSampleRate=o.sampling_rate,e.channelCount=o.channel_count,e.codec=o.codec_mimetype,e.originalCodec=o.original_codec_mimetype,e.config=o.config,e.refSampleDuration=1536/e.audioSampleRate*e.timescale}else if(this.audio_metadata_.codec==="ec-3"){var h=t.codec==="ec-3"?t.data:null,u=new Yt(h);e.audioSampleRate=u.sampling_rate,e.channelCount=u.channel_count,e.codec=u.codec_mimetype,e.originalCodec=u.original_codec_mimetype,e.config=u.config,e.refSampleDuration=256*u.num_blks/e.audioSampleRate*e.timescale}else this.audio_metadata_.codec==="opus"?(e.audioSampleRate=this.audio_metadata_.sample_rate,e.channelCount=this.audio_metadata_.channel_count,e.channelConfigCode=this.audio_metadata_.channel_config_code,e.codec="opus",e.originalCodec="opus",e.config=void 0,e.refSampleDuration=20):this.audio_metadata_.codec==="mp3"&&(e.audioSampleRate=this.audio_metadata_.sample_rate,e.channelCount=this.audio_metadata_.channel_count,e.codec="mp3",e.originalCodec="mp3",e.config=void 0);this.audio_init_segment_dispatched_==0&&f.a.v(this.TAG,"Generated first AudioSpecificConfig for mimeType: ".concat(e.codec)),this.onTrackMetadata("audio",e),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;var m=this.media_info_;m.hasAudio=!0,m.audioCodec=e.originalCodec,m.audioSampleRate=e.audioSampleRate,m.audioChannelCount=e.channelCount,m.hasVideo&&m.videoCodec?m.mimeType='video/mp2t; codecs="'.concat(m.videoCodec,",").concat(m.audioCodec,'"'):m.mimeType='video/mp2t; codecs="'.concat(m.audioCodec,'"'),m.isComplete()&&this.onMediaInfo(m)},i.prototype.dispatchPESPrivateDataDescriptor=function(t,e,n){var s=new Ue;s.pid=t,s.stream_type=e,s.descriptor=n,this.onPESPrivateDataDescriptor&&this.onPESPrivateDataDescriptor(s)},i.prototype.parsePESPrivateDataPayload=function(t,e,n,s,r){var o=new Ce;if(o.pid=s,o.stream_id=r,o.len=t.byteLength,o.data=t,e!=null){var h=Math.floor(e/this.timescale_);o.pts=h}else o.nearest_pts=this.getNearestTimestampMilliseconds();if(n!=null){var u=Math.floor(n/this.timescale_);o.dts=u}this.onPESPrivateData&&this.onPESPrivateData(o)},i.prototype.parseTimedID3MetadataPayload=function(t,e,n,s,r){var o=new Ce;if(o.pid=s,o.stream_id=r,o.len=t.byteLength,o.data=t,e!=null){var h=Math.floor(e/this.timescale_);o.pts=h}if(n!=null){var u=Math.floor(n/this.timescale_);o.dts=u}this.onTimedID3Metadata&&this.onTimedID3Metadata(o)},i.prototype.parseSynchronousKLVMetadataPayload=function(t,e,n,s,r){var o=new Xt;if(o.pid=s,o.stream_id=r,o.len=t.byteLength,o.data=t,e!=null){var h=Math.floor(e/this.timescale_);o.pts=h}if(n!=null){var u=Math.floor(n/this.timescale_);o.dts=u}o.access_units=function(m){for(var A=[],S=0;S+5<m.byteLength;){var R=m[S+0],P=m[S+1],H=m[S+2],N=m[S+3]<<8|m[S+4]<<0,ee=m.slice(S+5,S+5+N);A.push({service_id:R,sequence_number:P,flags:H,data:ee}),S+=5+N}return A}(t),this.onSynchronousKLVMetadata&&this.onSynchronousKLVMetadata(o)},i.prototype.parseAsynchronousKLVMetadataPayload=function(t,e,n){var s=new Ce;s.pid=e,s.stream_id=n,s.len=t.byteLength,s.data=t,this.onAsynchronousKLVMetadata&&this.onAsynchronousKLVMetadata(s)},i.prototype.parseSMPTE2038MetadataPayload=function(t,e,n,s,r){var o=new Ft;if(o.pid=s,o.stream_id=r,o.len=t.byteLength,o.data=t,e!=null){var h=Math.floor(e/this.timescale_);o.pts=h}if(o.nearest_pts=this.getNearestTimestampMilliseconds(),n!=null){var u=Math.floor(n/this.timescale_);o.dts=u}o.ancillaries=function(m){for(var A=new x(m),S=0,R=[];S+=6,A.readBits(6)===0;){var P=A.readBool();S+=1;var H=A.readBits(11);S+=11;var N=A.readBits(12);S+=12;var ee=255&A.readBits(10);S+=10;var $=255&A.readBits(10);S+=10;var Q=255&A.readBits(10);S+=10;for(var re=new Uint8Array(Q),fe=0;fe<Q;fe++){var Z=255&A.readBits(10);S+=10,re[fe]=Z}A.readBits(10),S+=10;var ae="User Defined";ee===65?$===7&&(ae="SCTE-104"):ee===95?$===220?ae="ARIB STD-B37 (1SEG)":$===221?ae="ARIB STD-B37 (ANALOG)":$===222?ae="ARIB STD-B37 (SD)":$===223&&(ae="ARIB STD-B37 (HD)"):ee===97&&($===1?ae="EIA-708":$===2&&(ae="EIA-608")),R.push({yc_indicator:P,line_number:H,horizontal_offset:N,did:ee,sdid:$,user_data:re,description:ae,information:{}}),A.readBits(8-(S-Math.floor(S/8))%8),S+=(8-(S-Math.floor(S/8)))%8}return A.destroy(),A=null,R}(t),this.onSMPTE2038Metadata&&this.onSMPTE2038Metadata(o)},i.prototype.getNearestTimestampMilliseconds=function(){return this.audio_last_sample_pts_!=null?Math.floor(this.audio_last_sample_pts_):this.last_pcr_!=null?Math.floor(this.last_pcr_/300/this.timescale_):void 0},i.prototype.getPcrBase=function(t){var e=33554432*t[6]+131072*t[7]+512*t[8]+2*t[9]+(128&t[10])/128+this.timestamp_offset_;return e+4294967296<this.last_pcr_base_&&(e+=8589934592,this.timestamp_offset_+=8589934592),this.last_pcr_base_=e,e},i.prototype.getTimestamp=function(t,e){var n=536870912*(14&t[e])+4194304*(255&t[e+1])+16384*(254&t[e+2])+128*(255&t[e+3])+(254&t[e+4])/2+this.timestamp_offset_;return n+4294967296<this.last_pcr_base_&&(n+=8589934592),n},i}(V),_t=function(a,i,t){for(var e,n=0,s=i.length;n<s;n++)!e&&n in i||(e||(e=Array.prototype.slice.call(i,0,n)),e[n]=i[n]);return a.concat(e||Array.prototype.slice.call(i))},lt=function(){function a(){}return a.init=function(){for(var i in a.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],hvc1:[],hvcC:[],av01:[],av1C:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[],fLaC:[],dfLa:[]},a.types)a.types.hasOwnProperty(i)&&(a.types[i]=[i.charCodeAt(0),i.charCodeAt(1),i.charCodeAt(2),i.charCodeAt(3)]);var t=a.constants={};t.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),t.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSC=t.STCO=t.STTS,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),t.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),t.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},a.box=function(i){for(var t=8,e=null,n=Array.prototype.slice.call(arguments,1),s=n.length,r=0;r<s;r++)t+=n[r].byteLength;(e=new Uint8Array(t))[0]=t>>>24&255,e[1]=t>>>16&255,e[2]=t>>>8&255,e[3]=255&t,e.set(i,4);var o=8;for(r=0;r<s;r++)e.set(n[r],o),o+=n[r].byteLength;return e},a.generateInitSegment=function(i){var t=a.box(a.types.ftyp,a.constants.FTYP),e=a.moov(i),n=new Uint8Array(t.byteLength+e.byteLength);return n.set(t,0),n.set(e,t.byteLength),n},a.moov=function(i){var t=a.mvhd(i.timescale,i.duration),e=a.trak(i),n=a.mvex(i);return a.box(a.types.moov,t,e,n)},a.mvhd=function(i,t){return a.box(a.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))},a.trak=function(i){return a.box(a.types.trak,a.tkhd(i),a.mdia(i))},a.tkhd=function(i){var t=i.id,e=i.duration,n=i.presentWidth,s=i.presentHeight;return a.box(a.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>>8&255,255&n,0,0,s>>>8&255,255&s,0,0]))},a.mdia=function(i){return a.box(a.types.mdia,a.mdhd(i),a.hdlr(i),a.minf(i))},a.mdhd=function(i){var t=i.timescale,e=i.duration;return a.box(a.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e,85,196,0,0]))},a.hdlr=function(i){var t=null;return t=i.type==="audio"?a.constants.HDLR_AUDIO:a.constants.HDLR_VIDEO,a.box(a.types.hdlr,t)},a.minf=function(i){var t=null;return t=i.type==="audio"?a.box(a.types.smhd,a.constants.SMHD):a.box(a.types.vmhd,a.constants.VMHD),a.box(a.types.minf,t,a.dinf(),a.stbl(i))},a.dinf=function(){return a.box(a.types.dinf,a.box(a.types.dref,a.constants.DREF))},a.stbl=function(i){return a.box(a.types.stbl,a.stsd(i),a.box(a.types.stts,a.constants.STTS),a.box(a.types.stsc,a.constants.STSC),a.box(a.types.stsz,a.constants.STSZ),a.box(a.types.stco,a.constants.STCO))},a.stsd=function(i){return i.type==="audio"?i.codec==="mp3"?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.mp3(i)):i.codec==="ac-3"?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.ac3(i)):i.codec==="ec-3"?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.ec3(i)):i.codec==="opus"?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.Opus(i)):i.codec=="flac"?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.fLaC(i)):a.box(a.types.stsd,a.constants.STSD_PREFIX,a.mp4a(i)):i.type==="video"&&i.codec.startsWith("hvc1")?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.hvc1(i)):i.type==="video"&&i.codec.startsWith("av01")?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.av01(i)):a.box(a.types.stsd,a.constants.STSD_PREFIX,a.avc1(i))},a.mp3=function(i){var t=i.channelCount,e=i.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types[".mp3"],n)},a.mp4a=function(i){var t=i.channelCount,e=i.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types.mp4a,n,a.esds(i))},a.ac3=function(i){var t=i.channelCount,e=i.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types["ac-3"],n,a.box(a.types.dac3,new Uint8Array(i.config)))},a.ec3=function(i){var t=i.channelCount,e=i.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types["ec-3"],n,a.box(a.types.dec3,new Uint8Array(i.config)))},a.esds=function(i){var t=i.config||[],e=t.length,n=new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t).concat([6,1,2]));return a.box(a.types.esds,n)},a.Opus=function(i){var t=i.channelCount,e=i.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types.Opus,n,a.dOps(i))},a.dOps=function(i){var t=i.channelCount,e=i.channelConfigCode,n=i.audioSampleRate;if(i.config)return a.box(a.types.dOps,i.config);var s=[];switch(e){case 1:case 2:s=[0];break;case 0:s=[255,1,1,0,1];break;case 128:s=[255,2,0,0,1];break;case 3:s=[1,2,1,0,2,1];break;case 4:s=[1,2,2,0,1,2,3];break;case 5:s=[1,3,2,0,4,1,2,3];break;case 6:s=[1,4,2,0,4,1,2,3,5];break;case 7:s=[1,4,2,0,4,1,2,3,5,6];break;case 8:s=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:s=[1,1,2,0,1];break;case 131:s=[1,1,3,0,1,2];break;case 132:s=[1,1,4,0,1,2,3];break;case 133:s=[1,1,5,0,1,2,3,4];break;case 134:s=[1,1,6,0,1,2,3,4,5];break;case 135:s=[1,1,7,0,1,2,3,4,5,6];break;case 136:s=[1,1,8,0,1,2,3,4,5,6,7]}var r=new Uint8Array(_t([0,t,0,0,n>>>24&255,n>>>17&255,n>>>8&255,n>>>0&255,0,0],s));return a.box(a.types.dOps,r)},a.fLaC=function(i){var t=i.channelCount,e=Math.min(i.audioSampleRate,65535),n=i.sampleSize,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,n,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types.fLaC,s,a.dfLa(i))},a.dfLa=function(i){var t=new Uint8Array(_t([0,0,0,0],i.config));return a.box(a.types.dfLa,t)},a.avc1=function(i){var t=i.avcc,e=i.codecWidth,n=i.codecHeight,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e>>>8&255,255&e,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return a.box(a.types.avc1,s,a.box(a.types.avcC,t))},a.hvc1=function(i){var t=i.hvcc,e=i.codecWidth,n=i.codecHeight,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e>>>8&255,255&e,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return a.box(a.types.hvc1,s,a.box(a.types.hvcC,t))},a.av01=function(i){var t=i.av1c,e=i.codecWidth||192,n=i.codecHeight||108,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e>>>8&255,255&e,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return a.box(a.types.av01,s,a.box(a.types.av1C,t))},a.mvex=function(i){return a.box(a.types.mvex,a.trex(i))},a.trex=function(i){var t=i.id,e=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return a.box(a.types.trex,e)},a.moof=function(i,t){return a.box(a.types.moof,a.mfhd(i.sequenceNumber),a.traf(i,t))},a.mfhd=function(i){var t=new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i]);return a.box(a.types.mfhd,t)},a.traf=function(i,t){var e=i.id,n=a.box(a.types.tfhd,new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])),s=a.box(a.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),r=a.sdtp(i),o=a.trun(i,r.byteLength+16+16+8+16+8+8);return a.box(a.types.traf,n,s,o,r)},a.sdtp=function(i){for(var t=i.samples||[],e=t.length,n=new Uint8Array(4+e),s=0;s<e;s++){var r=t[s].flags;n[s+4]=r.isLeading<<6|r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy}return a.box(a.types.sdtp,n)},a.trun=function(i,t){var e=i.samples||[],n=e.length,s=12+16*n,r=new Uint8Array(s);t+=8+s,r.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(var o=0;o<n;o++){var h=e[o].duration,u=e[o].size,m=e[o].flags,A=e[o].cts;r.set([h>>>24&255,h>>>16&255,h>>>8&255,255&h,u>>>24&255,u>>>16&255,u>>>8&255,255&u,m.isLeading<<2|m.dependsOn,m.isDependedOn<<6|m.hasRedundancy<<4|m.isNonSync,0,0,A>>>24&255,A>>>16&255,A>>>8&255,255&A],12+16*o)}return a.box(a.types.trun,r)},a.mdat=function(i){return a.box(a.types.mdat,i)},a}();lt.init();var ze=lt,ct=function(){function a(){}return a.getSilentFrame=function(i,t){if(i==="mp4a.40.2"){if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},a}(),Ne=O(11),ut=function(){function a(i){this.TAG="MP4Remuxer",this._config=i,this._isLive=i.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Ne.c("audio"),this._videoSegmentInfoList=new Ne.c("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!y.a.chrome||!(y.a.version.major<50||y.a.version.major===50&&y.a.version.build<2661)),this._fillSilentAfterSeek=y.a.msedge||y.a.msie,this._mp3UseMpegAudio=!y.a.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return a.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},a.prototype.bindDataSource=function(i){return i.onDataAvailable=this.remux.bind(this),i.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(a.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(i){this._onInitSegment=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(i){this._onMediaSegment=i},enumerable:!1,configurable:!0}),a.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},a.prototype.seek=function(i){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},a.prototype.remux=function(i,t){if(!this._onMediaSegment)throw new L.a("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(i,t),t&&this._remuxVideo(t),i&&this._remuxAudio(i)},a.prototype._onTrackMetadataReceived=function(i,t){var e=null,n="mp4",s=t.codec;if(i==="audio")this._audioMeta=t,t.codec==="mp3"&&this._mp3UseMpegAudio?(n="mpeg",s="",e=new Uint8Array):e=ze.generateInitSegment(t);else{if(i!=="video")return;this._videoMeta=t,e=ze.generateInitSegment(t)}if(!this._onInitSegment)throw new L.a("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(i,{type:i,data:e.buffer,codec:s,container:"".concat(i,"/").concat(n),mediaDuration:t.duration})},a.prototype._calculateDtsBase=function(i,t){this._dtsBaseInited||(i&&i.samples&&i.samples.length&&(this._audioDtsBase=i.samples[0].dts),t&&t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},a.prototype.getTimestampBase=function(){if(this._dtsBaseInited)return this._dtsBase},a.prototype.flushStashedSamples=function(){var i=this._videoStashedLastSample,t=this._audioStashedLastSample,e={type:"video",id:1,sequenceNumber:0,samples:[],length:0};i!=null&&(e.samples.push(i),e.length=i.length);var n={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};t!=null&&(n.samples.push(t),n.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(e,!0),this._remuxAudio(n,!0)},a.prototype._remuxAudio=function(i,t){if(this._audioMeta!=null){var e,n=i,s=n.samples,r=void 0,o=-1,h=this._audioMeta.refSampleDuration,u=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,m=this._dtsBaseInited&&this._audioNextDts===void 0,A=!1;if(s&&s.length!==0&&(s.length!==1||t)){var S=0,R=null,P=0;u?(S=0,P=n.length):(S=8,P=8+n.length);var H=null;if(s.length>1&&(P-=(H=s.pop()).length),this._audioStashedLastSample!=null){var N=this._audioStashedLastSample;this._audioStashedLastSample=null,s.unshift(N),P+=N.length}H!=null&&(this._audioStashedLastSample=H);var ee=s[0].dts-this._dtsBase;if(this._audioNextDts)r=ee-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())r=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(A=!0);else{var $=this._audioSegmentInfoList.getLastSampleBefore(ee);if($!=null){var Q=ee-($.originalDts+$.duration);Q<=3&&(Q=0),r=ee-($.dts+$.duration+Q)}else r=0}if(A){var re=ee-r,fe=this._videoSegmentInfoList.getLastSegmentBefore(ee);if(fe!=null&&fe.beginDts<re){if(Le=ct.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount)){var Z=fe.beginDts,ae=re-fe.beginDts;f.a.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(Z,", duration: ").concat(ae)),s.unshift({unit:Le,dts:Z,pts:Z}),P+=Le.byteLength}}else A=!1}for(var pe=[],se=0;se<s.length;se++){var ue=(N=s[se]).unit,Se=N.dts-this._dtsBase,Ae=(Z=Se,!1),he=null,ge=0;if(!(Se<-.001)){if(this._audioMeta.codec!=="mp3"&&h!=null){var Re=Se;if(this._audioNextDts&&(Re=this._audioNextDts),(r=Se-Re)<=-3*h){f.a.w(this.TAG,"Dropping 1 audio frame (originalDts: ".concat(Se," ms ,curRefDts: ").concat(Re," ms) due to dtsCorrection: ").concat(r," ms overlap."));continue}if(r>=3*h&&this._fillAudioTimestampGap&&!y.a.safari){Ae=!0;var Le,xe=Math.floor(r/h);f.a.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\n"+"originalDts: ".concat(Se," ms, curRefDts: ").concat(Re," ms, ")+"dtsCorrection: ".concat(Math.round(r)," ms, generate: ").concat(xe," frames")),Z=Math.floor(Re),ge=Math.floor(Re+h)-Z,(Le=ct.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount))==null&&(f.a.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Le=ue),he=[];for(var De=0;De<xe;De++){Re+=h;var Pe=Math.floor(Re),Be=Math.floor(Re+h)-Pe,Oe={dts:Pe,pts:Pe,cts:0,unit:Le,size:Le.byteLength,duration:Be,originalDts:Se,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};he.push(Oe),P+=Oe.size}this._audioNextDts=Re+h}else Z=Math.floor(Re),ge=Math.floor(Re+h)-Z,this._audioNextDts=Re+h}else Z=Se-r,se!==s.length-1?ge=s[se+1].dts-this._dtsBase-r-Z:H!=null?ge=H.dts-this._dtsBase-r-Z:ge=pe.length>=1?pe[pe.length-1].duration:Math.floor(h),this._audioNextDts=Z+ge;o===-1&&(o=Z),pe.push({dts:Z,pts:Z,cts:0,unit:N.unit,size:N.unit.byteLength,duration:ge,originalDts:Se,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Ae&&pe.push.apply(pe,he)}}if(pe.length===0)return n.samples=[],void(n.length=0);for(u?R=new Uint8Array(P):((R=new Uint8Array(P))[0]=P>>>24&255,R[1]=P>>>16&255,R[2]=P>>>8&255,R[3]=255&P,R.set(ze.types.mdat,4)),se=0;se<pe.length;se++)ue=pe[se].unit,R.set(ue,S),S+=ue.byteLength;var Ie=pe[pe.length-1];e=Ie.dts+Ie.duration;var be=new Ne.b;be.beginDts=o,be.endDts=e,be.beginPts=o,be.endPts=e,be.originalBeginDts=pe[0].originalDts,be.originalEndDts=Ie.originalDts+Ie.duration,be.firstSample=new Ne.d(pe[0].dts,pe[0].pts,pe[0].duration,pe[0].originalDts,!1),be.lastSample=new Ne.d(Ie.dts,Ie.pts,Ie.duration,Ie.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(be),n.samples=pe,n.sequenceNumber++;var Ve=null;Ve=u?new Uint8Array:ze.moof(n,o),n.samples=[],n.length=0;var Fe={type:"audio",data:this._mergeBoxes(Ve,R).buffer,sampleCount:pe.length,info:be};u&&m&&(Fe.timestampOffset=o),this._onMediaSegment("audio",Fe)}}},a.prototype._remuxVideo=function(i,t){if(this._videoMeta!=null){var e,n,s=i,r=s.samples,o=void 0,h=-1,u=-1;if(r&&r.length!==0&&(r.length!==1||t)){var m=8,A=null,S=8+i.length,R=null;if(r.length>1&&(S-=(R=r.pop()).length),this._videoStashedLastSample!=null){var P=this._videoStashedLastSample;this._videoStashedLastSample=null,r.unshift(P),S+=P.length}R!=null&&(this._videoStashedLastSample=R);var H=r[0].dts-this._dtsBase;if(this._videoNextDts)o=H-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())o=0;else{var N=this._videoSegmentInfoList.getLastSampleBefore(H);if(N!=null){var ee=H-(N.originalDts+N.duration);ee<=3&&(ee=0),o=H-(N.dts+N.duration+ee)}else o=0}for(var $=new Ne.b,Q=[],re=0;re<r.length;re++){var fe=(P=r[re]).dts-this._dtsBase,Z=P.isKeyframe,ae=fe-o,pe=P.cts,se=ae+pe;h===-1&&(h=ae,u=se);var ue=0;if(re!==r.length-1?ue=r[re+1].dts-this._dtsBase-o-ae:R!=null?ue=R.dts-this._dtsBase-o-ae:ue=Q.length>=1?Q[Q.length-1].duration:Math.floor(this._videoMeta.refSampleDuration),Z){var Se=new Ne.d(ae,se,ue,P.dts,!0);Se.fileposition=P.fileposition,$.appendSyncPoint(Se)}Q.push({dts:ae,pts:se,cts:pe,units:P.units,size:P.length,isKeyframe:Z,duration:ue,originalDts:fe,flags:{isLeading:0,dependsOn:Z?2:1,isDependedOn:Z?1:0,hasRedundancy:0,isNonSync:Z?0:1}})}for((A=new Uint8Array(S))[0]=S>>>24&255,A[1]=S>>>16&255,A[2]=S>>>8&255,A[3]=255&S,A.set(ze.types.mdat,4),re=0;re<Q.length;re++)for(var Ae=Q[re].units;Ae.length;){var he=Ae.shift().data;A.set(he,m),m+=he.byteLength}var ge=Q[Q.length-1];if(e=ge.dts+ge.duration,n=ge.pts+ge.duration,this._videoNextDts=e,$.beginDts=h,$.endDts=e,$.beginPts=u,$.endPts=n,$.originalBeginDts=Q[0].originalDts,$.originalEndDts=ge.originalDts+ge.duration,$.firstSample=new Ne.d(Q[0].dts,Q[0].pts,Q[0].duration,Q[0].originalDts,Q[0].isKeyframe),$.lastSample=new Ne.d(ge.dts,ge.pts,ge.duration,ge.originalDts,ge.isKeyframe),this._isLive||this._videoSegmentInfoList.append($),s.samples=Q,s.sequenceNumber++,this._forceFirstIDR){var Re=Q[0].flags;Re.dependsOn=2,Re.isNonSync=0}var Le=ze.moof(s,h);s.samples=[],s.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Le,A).buffer,sampleCount:Q.length,info:$})}}},a.prototype._mergeBoxes=function(i,t){var e=new Uint8Array(i.byteLength+t.byteLength);return e.set(i,0),e.set(t,i.byteLength),e},a}(),$t=O(14),we=O(1),Zt=(O(2),function(){function a(i,t){this.TAG="TransmuxingController",this._emitter=new M.a,this._config=t,i.segments||(i.segments=[{duration:i.duration,filesize:i.filesize,url:i.url}]),typeof i.cors!="boolean"&&(i.cors=!0),typeof i.withCredentials!="boolean"&&(i.withCredentials=!1),this._mediaDataSource=i,this._currentSegmentIndex=0;var e=0;this._mediaDataSource.segments.forEach(function(n){n.timestampBase=e,e+=n.duration,n.cors=i.cors,n.withCredentials=i.withCredentials,t.referrerPolicy&&(n.referrerPolicy=t.referrerPolicy)}),isNaN(e)||this._mediaDataSource.duration===e||(this._mediaDataSource.duration=e),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return a.prototype.destroy=function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null},a.prototype.on=function(i,t){this._emitter.addListener(i,t)},a.prototype.off=function(i,t){this._emitter.removeListener(i,t)},a.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},a.prototype._loadSegment=function(i,t){this._currentSegmentIndex=i;var e=this._mediaDataSource.segments[i],n=this._ioctl=new $t.a(e,this._config,i);n.onError=this._onIOException.bind(this),n.onSeeked=this._onIOSeeked.bind(this),n.onComplete=this._onIOComplete.bind(this),n.onRedirect=this._onIORedirect.bind(this),n.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):n.onDataArrival=this._onInitChunkArrival.bind(this),n.open(t)},a.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},a.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},a.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},a.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},a.prototype.seek=function(i){if(this._mediaInfo!=null&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(i);if(t===this._currentSegmentIndex){var e=this._mediaInfo.segments[t];if(e==null)this._pendingSeekTime=i;else{var n=e.getNearestKeyframe(i);this._remuxer.seek(n.milliseconds),this._ioctl.seek(n.fileposition),this._pendingResolveSeekPoint=n.milliseconds}}else{var s=this._mediaInfo.segments[t];s==null?(this._pendingSeekTime=i,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t)):(n=s.getNearestKeyframe(i),this._internalAbort(),this._remuxer.seek(i),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,n.fileposition),this._pendingResolveSeekPoint=n.milliseconds,this._reportSegmentMediaInfo(t))}this._enableStatisticsReporter()}},a.prototype._searchSegmentIndexContains=function(i){for(var t=this._mediaDataSource.segments,e=t.length-1,n=0;n<t.length;n++)if(i<t[n].timestampBase){e=n-1;break}return e},a.prototype._onInitChunkArrival=function(i,t){var e=this,n=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,n=this._demuxer.parseChunks(i,t);else{var s=null;(s=p.probe(i)).match&&(this._setupFLVDemuxerRemuxer(s),n=this._demuxer.parseChunks(i,t)),s.match||s.needMoreData||(s=dt.probe(i)).match&&(this._setupTSDemuxerRemuxer(s),n=this._demuxer.parseChunks(i,t)),s.match||s.needMoreData||(s=null,f.a.e(this.TAG,"Non MPEG-TS/FLV, Unsupported media type!"),Promise.resolve().then(function(){e._internalAbort()}),this._emitter.emit(we.a.DEMUX_ERROR,B.a.FORMAT_UNSUPPORTED,"Non MPEG-TS/FLV, Unsupported media type!"))}return n},a.prototype._setupFLVDemuxerRemuxer=function(i){this._demuxer=new p(i,this._config),this._remuxer||(this._remuxer=new ut(this._config));var t=this._mediaDataSource;t.duration==null||isNaN(t.duration)||(this._demuxer.overridedDuration=t.duration),typeof t.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=t.hasAudio),typeof t.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=t.hasVideo),this._demuxer.timestampBase=t.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)},a.prototype._setupTSDemuxerRemuxer=function(i){var t=this._demuxer=new dt(i,this._config);this._remuxer||(this._remuxer=new ut(this._config)),t.onError=this._onDemuxException.bind(this),t.onMediaInfo=this._onMediaInfo.bind(this),t.onMetaDataArrived=this._onMetaDataArrived.bind(this),t.onTimedID3Metadata=this._onTimedID3Metadata.bind(this),t.onSynchronousKLVMetadata=this._onSynchronousKLVMetadata.bind(this),t.onAsynchronousKLVMetadata=this._onAsynchronousKLVMetadata.bind(this),t.onSMPTE2038Metadata=this._onSMPTE2038Metadata.bind(this),t.onSCTE35Metadata=this._onSCTE35Metadata.bind(this),t.onPESPrivateDataDescriptor=this._onPESPrivateDataDescriptor.bind(this),t.onPESPrivateData=this._onPESPrivateData.bind(this),this._remuxer.bindDataSource(this._demuxer),this._demuxer.bindDataSource(this._ioctl),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)},a.prototype._onMediaInfo=function(i){var t=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},i),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,v.a.prototype));var e=Object.assign({},i);Object.setPrototypeOf(e,v.a.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=e,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var n=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(n)})},a.prototype._onMetaDataArrived=function(i){this._emitter.emit(we.a.METADATA_ARRIVED,i)},a.prototype._onScriptDataArrived=function(i){this._emitter.emit(we.a.SCRIPTDATA_ARRIVED,i)},a.prototype._onTimedID3Metadata=function(i){var t=this._remuxer.getTimestampBase();t!=null&&(i.pts!=null&&(i.pts-=t),i.dts!=null&&(i.dts-=t),this._emitter.emit(we.a.TIMED_ID3_METADATA_ARRIVED,i))},a.prototype._onSynchronousKLVMetadata=function(i){var t=this._remuxer.getTimestampBase();t!=null&&(i.pts!=null&&(i.pts-=t),i.dts!=null&&(i.dts-=t),this._emitter.emit(we.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,i))},a.prototype._onAsynchronousKLVMetadata=function(i){this._emitter.emit(we.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,i)},a.prototype._onSMPTE2038Metadata=function(i){var t=this._remuxer.getTimestampBase();t!=null&&(i.pts!=null&&(i.pts-=t),i.dts!=null&&(i.dts-=t),i.nearest_pts!=null&&(i.nearest_pts-=t),this._emitter.emit(we.a.SMPTE2038_METADATA_ARRIVED,i))},a.prototype._onSCTE35Metadata=function(i){var t=this._remuxer.getTimestampBase();t!=null&&(i.pts!=null&&(i.pts-=t),i.nearest_pts!=null&&(i.nearest_pts-=t),this._emitter.emit(we.a.SCTE35_METADATA_ARRIVED,i))},a.prototype._onPESPrivateDataDescriptor=function(i){this._emitter.emit(we.a.PES_PRIVATE_DATA_DESCRIPTOR,i)},a.prototype._onPESPrivateData=function(i){var t=this._remuxer.getTimestampBase();t!=null&&(i.pts!=null&&(i.pts-=t),i.nearest_pts!=null&&(i.nearest_pts-=t),i.dts!=null&&(i.dts-=t),this._emitter.emit(we.a.PES_PRIVATE_DATA_ARRIVED,i))},a.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},a.prototype._onIOComplete=function(i){var t=i+1;t<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer&&this._remuxer.flushStashedSamples(),this._loadSegment(t)):(this._remuxer&&this._remuxer.flushStashedSamples(),this._emitter.emit(we.a.LOADING_COMPLETE),this._disableStatisticsReporter())},a.prototype._onIORedirect=function(i){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=i},a.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(we.a.RECOVERED_EARLY_EOF)},a.prototype._onIOException=function(i,t){f.a.e(this.TAG,"IOException: type = ".concat(i,", code = ").concat(t.code,", msg = ").concat(t.msg)),this._emitter.emit(we.a.IO_ERROR,i,t),this._disableStatisticsReporter()},a.prototype._onDemuxException=function(i,t){f.a.e(this.TAG,"DemuxException: type = ".concat(i,", info = ").concat(t)),this._emitter.emit(we.a.DEMUX_ERROR,i,t)},a.prototype._onRemuxerInitSegmentArrival=function(i,t){this._emitter.emit(we.a.INIT_SEGMENT,i,t)},a.prototype._onRemuxerMediaSegmentArrival=function(i,t){if(this._pendingSeekTime==null&&(this._emitter.emit(we.a.MEDIA_SEGMENT,i,t),this._pendingResolveSeekPoint!=null&&i==="video")){var e=t.info.syncPoints,n=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,y.a.safari&&e.length>0&&e[0].originalDts===n&&(n=e[0].pts),this._emitter.emit(we.a.RECOMMEND_SEEKPOINT,n)}},a.prototype._enableStatisticsReporter=function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},a.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},a.prototype._reportSegmentMediaInfo=function(i){var t=this._mediaInfo.segments[i],e=Object.assign({},t);e.duration=this._mediaInfo.duration,e.segmentCount=this._mediaInfo.segmentCount,delete e.segments,delete e.keyframesIndex,this._emitter.emit(we.a.MEDIA_INFO,e)},a.prototype._reportStatisticsInfo=function(){var i={};i.url=this._ioctl.currentURL,i.hasRedirect=this._ioctl.hasRedirect,i.hasRedirect&&(i.redirectedURL=this._ioctl.currentRedirectedURL),i.speed=this._ioctl.currentSpeed,i.loaderType=this._ioctl.loaderType,i.currentSegmentIndex=this._currentSegmentIndex,i.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(we.a.STATISTICS_INFO,i)},a}());te.a=Zt},function(me,te,O){var F,M=O(0),f=function(){function D(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return D.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},D.prototype.addBytes=function(l){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=l,this._totalBytes+=l):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=l,this._totalBytes+=l):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=l,this._totalBytes+=l,this._lastCheckpoint=this._now())},Object.defineProperty(D.prototype,"currentKBps",{get:function(){this.addBytes(0);var l=(this._now()-this._lastCheckpoint)/1e3;return l==0&&(l=1),this._intervalBytes/l/1024},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"averageKBps",{get:function(){var l=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/l/1024},enumerable:!1,configurable:!0}),D}(),y=O(2),v=O(5),g=O(3),T=(F=function(D,l){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,d){_.__proto__=d}||function(_,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(_[p]=d[p])})(D,l)},function(D,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function _(){this.constructor=D}F(D,l),D.prototype=l===null?Object.create(l):(_.prototype=l.prototype,new _)}),E=function(D){function l(_,d){var p=D.call(this,"fetch-stream-loader")||this;return p.TAG="FetchStreamLoader",p._seekHandler=_,p._config=d,p._needStash=!0,p._requestAbort=!1,p._abortController=null,p._contentLength=null,p._receivedLength=0,p}return T(l,D),l.isSupported=function(){try{var _=v.a.msedge&&v.a.version.minor>=15048,d=!v.a.msedge||_;return self.fetch&&self.ReadableStream&&d}catch(p){return!1}},l.prototype.destroy=function(){this.isWorking()&&this.abort(),D.prototype.destroy.call(this)},l.prototype.open=function(_,d){var p=this;this._dataSource=_,this._range=d;var V=_.url;this._config.reuseRedirectedURL&&_.redirectedURL!=null&&(V=_.redirectedURL);var J=this._seekHandler.getConfig(V,d),G=new self.Headers;if(typeof J.headers=="object"){var Y=J.headers;for(var oe in Y)Y.hasOwnProperty(oe)&&G.append(oe,Y[oe])}var Ee={method:"GET",headers:G,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var oe in this._config.headers)G.append(oe,this._config.headers[oe]);_.cors===!1&&(Ee.mode="same-origin"),_.withCredentials&&(Ee.credentials="include"),_.referrerPolicy&&(Ee.referrerPolicy=_.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,Ee.signal=this._abortController.signal),this._status=y.c.kConnecting,self.fetch(J.url,Ee).then(function(_e){if(p._requestAbort)return p._status=y.c.kIdle,void _e.body.cancel();if(_e.ok&&_e.status>=200&&_e.status<=299){if(_e.url!==J.url&&p._onURLRedirect){var b=p._seekHandler.removeURLParameters(_e.url);p._onURLRedirect(b)}var c=_e.headers.get("Content-Length");return c!=null&&(p._contentLength=parseInt(c),p._contentLength!==0&&p._onContentLengthKnown&&p._onContentLengthKnown(p._contentLength)),p._pump.call(p,_e.body.getReader())}if(p._status=y.c.kError,!p._onError)throw new g.d("FetchStreamLoader: Http code invalid, "+_e.status+" "+_e.statusText);p._onError(y.b.HTTP_STATUS_CODE_INVALID,{code:_e.status,msg:_e.statusText})}).catch(function(_e){if(!p._abortController||!p._abortController.signal.aborted){if(p._status=y.c.kError,!p._onError)throw _e;p._onError(y.b.EXCEPTION,{code:-1,msg:_e.message})}})},l.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==y.c.kBuffering||!v.a.chrome)&&this._abortController)try{this._abortController.abort()}catch(_){}},l.prototype._pump=function(_){var d=this;return _.read().then(function(p){if(p.done)if(d._contentLength!==null&&d._receivedLength<d._contentLength){d._status=y.c.kError;var V=y.b.EARLY_EOF,J={code:-1,msg:"Fetch stream meet Early-EOF"};if(!d._onError)throw new g.d(J.msg);d._onError(V,J)}else d._status=y.c.kComplete,d._onComplete&&d._onComplete(d._range.from,d._range.from+d._receivedLength-1);else{if(d._abortController&&d._abortController.signal.aborted)return void(d._status=y.c.kComplete);if(d._requestAbort===!0)return d._status=y.c.kComplete,_.cancel();d._status=y.c.kBuffering;var G=p.value.buffer,Y=d._range.from+d._receivedLength;d._receivedLength+=G.byteLength,d._onDataArrival&&d._onDataArrival(G,Y,d._receivedLength),d._pump(_)}}).catch(function(p){if(d._abortController&&d._abortController.signal.aborted)d._status=y.c.kComplete;else if(p.code!==11||!v.a.msedge){d._status=y.c.kError;var V=0,J=null;if(p.code!==19&&p.message!=="network error"||!(d._contentLength===null||d._contentLength!==null&&d._receivedLength<d._contentLength)?(V=y.b.EXCEPTION,J={code:p.code,msg:p.message}):(V=y.b.EARLY_EOF,J={code:p.code,msg:"Fetch stream meet Early-EOF"}),!d._onError)throw new g.d(J.msg);d._onError(V,J)}})},l}(y.a),L=function(){var D=function(l,_){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var V in p)Object.prototype.hasOwnProperty.call(p,V)&&(d[V]=p[V])})(l,_)};return function(l,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function d(){this.constructor=l}D(l,_),l.prototype=_===null?Object.create(_):(d.prototype=_.prototype,new d)}}(),I=function(D){function l(_,d){var p=D.call(this,"xhr-moz-chunked-loader")||this;return p.TAG="MozChunkedLoader",p._seekHandler=_,p._config=d,p._needStash=!0,p._xhr=null,p._requestAbort=!1,p._contentLength=null,p._receivedLength=0,p}return L(l,D),l.isSupported=function(){try{var _=new XMLHttpRequest;return _.open("GET","https://example.com",!0),_.responseType="moz-chunked-arraybuffer",_.responseType==="moz-chunked-arraybuffer"}catch(d){return M.a.w("MozChunkedLoader",d.message),!1}},l.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),D.prototype.destroy.call(this)},l.prototype.open=function(_,d){this._dataSource=_,this._range=d;var p=_.url;this._config.reuseRedirectedURL&&_.redirectedURL!=null&&(p=_.redirectedURL);var V=this._seekHandler.getConfig(p,d);this._requestURL=V.url;var J=this._xhr=new XMLHttpRequest;if(J.open("GET",V.url,!0),J.responseType="moz-chunked-arraybuffer",J.onreadystatechange=this._onReadyStateChange.bind(this),J.onprogress=this._onProgress.bind(this),J.onloadend=this._onLoadEnd.bind(this),J.onerror=this._onXhrError.bind(this),_.withCredentials&&(J.withCredentials=!0),typeof V.headers=="object"){var G=V.headers;for(var Y in G)G.hasOwnProperty(Y)&&J.setRequestHeader(Y,G[Y])}if(typeof this._config.headers=="object"){G=this._config.headers;for(var Y in G)G.hasOwnProperty(Y)&&J.setRequestHeader(Y,G[Y])}this._status=y.c.kConnecting,J.send()},l.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=y.c.kComplete},l.prototype._onReadyStateChange=function(_){var d=_.target;if(d.readyState===2){if(d.responseURL!=null&&d.responseURL!==this._requestURL&&this._onURLRedirect){var p=this._seekHandler.removeURLParameters(d.responseURL);this._onURLRedirect(p)}if(d.status!==0&&(d.status<200||d.status>299)){if(this._status=y.c.kError,!this._onError)throw new g.d("MozChunkedLoader: Http code invalid, "+d.status+" "+d.statusText);this._onError(y.b.HTTP_STATUS_CODE_INVALID,{code:d.status,msg:d.statusText})}else this._status=y.c.kBuffering}},l.prototype._onProgress=function(_){if(this._status!==y.c.kError){this._contentLength===null&&_.total!==null&&_.total!==0&&(this._contentLength=_.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var d=_.target.response,p=this._range.from+this._receivedLength;this._receivedLength+=d.byteLength,this._onDataArrival&&this._onDataArrival(d,p,this._receivedLength)}},l.prototype._onLoadEnd=function(_){this._requestAbort!==!0?this._status!==y.c.kError&&(this._status=y.c.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1},l.prototype._onXhrError=function(_){this._status=y.c.kError;var d=0,p=null;if(this._contentLength&&_.loaded<this._contentLength?(d=y.b.EARLY_EOF,p={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(d=y.b.EXCEPTION,p={code:-1,msg:_.constructor.name+" "+_.type}),!this._onError)throw new g.d(p.msg);this._onError(d,p)},l}(y.a),w=function(){var D=function(l,_){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var V in p)Object.prototype.hasOwnProperty.call(p,V)&&(d[V]=p[V])})(l,_)};return function(l,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function d(){this.constructor=l}D(l,_),l.prototype=_===null?Object.create(_):(d.prototype=_.prototype,new d)}}(),x=(function(D){function l(_,d){var p=D.call(this,"xhr-msstream-loader")||this;return p.TAG="MSStreamLoader",p._seekHandler=_,p._config=d,p._needStash=!0,p._xhr=null,p._reader=null,p._totalRange=null,p._currentRange=null,p._currentRequestURL=null,p._currentRedirectedURL=null,p._contentLength=null,p._receivedLength=0,p._bufferLimit=16777216,p._lastTimeBufferSize=0,p._isReconnecting=!1,p}w(l,D),l.isSupported=function(){try{if(self.MSStream===void 0||self.MSStreamReader===void 0)return!1;var _=new XMLHttpRequest;return _.open("GET","https://example.com",!0),_.responseType="ms-stream",_.responseType==="ms-stream"}catch(d){return M.a.w("MSStreamLoader",d.message),!1}},l.prototype.destroy=function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),D.prototype.destroy.call(this)},l.prototype.open=function(_,d){this._internalOpen(_,d,!1)},l.prototype._internalOpen=function(_,d,p){this._dataSource=_,p?this._currentRange=d:this._totalRange=d;var V=_.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?V=this._currentRedirectedURL:_.redirectedURL!=null&&(V=_.redirectedURL));var J=this._seekHandler.getConfig(V,d);this._currentRequestURL=J.url;var G=this._reader=new self.MSStreamReader;G.onprogress=this._msrOnProgress.bind(this),G.onload=this._msrOnLoad.bind(this),G.onerror=this._msrOnError.bind(this);var Y=this._xhr=new XMLHttpRequest;if(Y.open("GET",J.url,!0),Y.responseType="ms-stream",Y.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Y.onerror=this._xhrOnError.bind(this),_.withCredentials&&(Y.withCredentials=!0),typeof J.headers=="object"){var oe=J.headers;for(var Ee in oe)oe.hasOwnProperty(Ee)&&Y.setRequestHeader(Ee,oe[Ee])}if(typeof this._config.headers=="object"){oe=this._config.headers;for(var Ee in oe)oe.hasOwnProperty(Ee)&&Y.setRequestHeader(Ee,oe[Ee])}this._isReconnecting?this._isReconnecting=!1:this._status=y.c.kConnecting,Y.send()},l.prototype.abort=function(){this._internalAbort(),this._status=y.c.kComplete},l.prototype._internalAbort=function(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)},l.prototype._xhrOnReadyStateChange=function(_){var d=_.target;if(d.readyState===2)if(d.status>=200&&d.status<=299){if(this._status=y.c.kBuffering,d.responseURL!=null){var p=this._seekHandler.removeURLParameters(d.responseURL);d.responseURL!==this._currentRequestURL&&p!==this._currentRedirectedURL&&(this._currentRedirectedURL=p,this._onURLRedirect&&this._onURLRedirect(p))}var V=d.getResponseHeader("Content-Length");if(V!=null&&this._contentLength==null){var J=parseInt(V);J>0&&(this._contentLength=J,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else{if(this._status=y.c.kError,!this._onError)throw new g.d("MSStreamLoader: Http code invalid, "+d.status+" "+d.statusText);this._onError(y.b.HTTP_STATUS_CODE_INVALID,{code:d.status,msg:d.statusText})}else if(d.readyState===3&&d.status>=200&&d.status<=299){this._status=y.c.kBuffering;var G=d.response;this._reader.readAsArrayBuffer(G)}},l.prototype._xhrOnError=function(_){this._status=y.c.kError;var d=y.b.EXCEPTION,p={code:-1,msg:_.constructor.name+" "+_.type};if(!this._onError)throw new g.d(p.msg);this._onError(d,p)},l.prototype._msrOnProgress=function(_){var d=_.target.result;if(d!=null){var p=d.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=d.byteLength;var V=this._totalRange.from+this._receivedLength;this._receivedLength+=p.byteLength,this._onDataArrival&&this._onDataArrival(p,V,this._receivedLength),d.byteLength>=this._bufferLimit&&(M.a.v(this.TAG,"MSStream buffer exceeded max size near ".concat(V+p.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}else this._doReconnectIfNeeded()},l.prototype._doReconnectIfNeeded=function(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var _={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,_,!0)}},l.prototype._msrOnLoad=function(_){this._status=y.c.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)},l.prototype._msrOnError=function(_){this._status=y.c.kError;var d=0,p=null;if(this._contentLength&&this._receivedLength<this._contentLength?(d=y.b.EARLY_EOF,p={code:-1,msg:"MSStream meet Early-Eof"}):(d=y.b.EARLY_EOF,p={code:-1,msg:_.constructor.name+" "+_.type}),!this._onError)throw new g.d(p.msg);this._onError(d,p)}}(y.a),function(){var D=function(l,_){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var V in p)Object.prototype.hasOwnProperty.call(p,V)&&(d[V]=p[V])})(l,_)};return function(l,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function d(){this.constructor=l}D(l,_),l.prototype=_===null?Object.create(_):(d.prototype=_.prototype,new d)}}()),U=function(D){function l(_,d){var p=D.call(this,"xhr-range-loader")||this;return p.TAG="RangeLoader",p._seekHandler=_,p._config=d,p._needStash=!1,p._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],p._currentChunkSizeKB=384,p._currentSpeedNormalized=0,p._zeroSpeedChunkCount=0,p._xhr=null,p._speedSampler=new f,p._requestAbort=!1,p._waitForTotalLength=!1,p._totalLengthReceived=!1,p._currentRequestURL=null,p._currentRedirectedURL=null,p._currentRequestRange=null,p._totalLength=null,p._contentLength=null,p._receivedLength=0,p._lastTimeLoaded=0,p}return x(l,D),l.isSupported=function(){try{var _=new XMLHttpRequest;return _.open("GET","https://example.com",!0),_.responseType="arraybuffer",_.responseType==="arraybuffer"}catch(d){return M.a.w("RangeLoader",d.message),!1}},l.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),D.prototype.destroy.call(this)},Object.defineProperty(l.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),l.prototype.open=function(_,d){this._dataSource=_,this._range=d,this._status=y.c.kConnecting;var p=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(p=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||p?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))},l.prototype._openSubRange=function(){var _=1024*this._currentChunkSizeKB,d=this._range.from+this._receivedLength,p=d+_;this._contentLength!=null&&p-this._range.from>=this._contentLength&&(p=this._range.from+this._contentLength-1),this._currentRequestRange={from:d,to:p},this._internalOpen(this._dataSource,this._currentRequestRange)},l.prototype._internalOpen=function(_,d){this._lastTimeLoaded=0;var p=_.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?p=this._currentRedirectedURL:_.redirectedURL!=null&&(p=_.redirectedURL));var V=this._seekHandler.getConfig(p,d);this._currentRequestURL=V.url;var J=this._xhr=new XMLHttpRequest;if(J.open("GET",V.url,!0),J.responseType="arraybuffer",J.onreadystatechange=this._onReadyStateChange.bind(this),J.onprogress=this._onProgress.bind(this),J.onload=this._onLoad.bind(this),J.onerror=this._onXhrError.bind(this),_.withCredentials&&(J.withCredentials=!0),typeof V.headers=="object"){var G=V.headers;for(var Y in G)G.hasOwnProperty(Y)&&J.setRequestHeader(Y,G[Y])}if(typeof this._config.headers=="object"){G=this._config.headers;for(var Y in G)G.hasOwnProperty(Y)&&J.setRequestHeader(Y,G[Y])}J.send()},l.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=y.c.kComplete},l.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},l.prototype._onReadyStateChange=function(_){var d=_.target;if(d.readyState===2){if(d.responseURL!=null){var p=this._seekHandler.removeURLParameters(d.responseURL);d.responseURL!==this._currentRequestURL&&p!==this._currentRedirectedURL&&(this._currentRedirectedURL=p,this._onURLRedirect&&this._onURLRedirect(p))}if(d.status>=200&&d.status<=299){if(this._waitForTotalLength)return;this._status=y.c.kBuffering}else{if(this._status=y.c.kError,!this._onError)throw new g.d("RangeLoader: Http code invalid, "+d.status+" "+d.statusText);this._onError(y.b.HTTP_STATUS_CODE_INVALID,{code:d.status,msg:d.statusText})}}},l.prototype._onProgress=function(_){if(this._status!==y.c.kError){if(this._contentLength===null){var d=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,d=!0;var p=_.total;this._internalAbort(),p!=null&p!==0&&(this._totalLength=p)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,d)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var V=_.loaded-this._lastTimeLoaded;this._lastTimeLoaded=_.loaded,this._speedSampler.addBytes(V)}},l.prototype._normalizeSpeed=function(_){var d=this._chunkSizeKBList,p=d.length-1,V=0,J=0,G=p;if(_<d[0])return d[0];for(;J<=G;){if((V=J+Math.floor((G-J)/2))===p||_>=d[V]&&_<d[V+1])return d[V];d[V]<_?J=V+1:G=V-1}},l.prototype._onLoad=function(_){if(this._status!==y.c.kError)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var d=this._speedSampler.lastSecondKBps;if(d===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(d=this._speedSampler.currentKBps)),d!==0){var p=this._normalizeSpeed(d);this._currentSpeedNormalized!==p&&(this._currentSpeedNormalized=p,this._currentChunkSizeKB=p)}var V=_.target.response,J=this._range.from+this._receivedLength;this._receivedLength+=V.byteLength;var G=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():G=!0,this._onDataArrival&&this._onDataArrival(V,J,this._receivedLength),G&&(this._status=y.c.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},l.prototype._onXhrError=function(_){this._status=y.c.kError;var d=0,p=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(d=y.b.EARLY_EOF,p={code:-1,msg:"RangeLoader meet Early-Eof"}):(d=y.b.EXCEPTION,p={code:-1,msg:_.constructor.name+" "+_.type}),!this._onError)throw new g.d(p.msg);this._onError(d,p)},l}(y.a),B=function(){var D=function(l,_){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var V in p)Object.prototype.hasOwnProperty.call(p,V)&&(d[V]=p[V])})(l,_)};return function(l,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function d(){this.constructor=l}D(l,_),l.prototype=_===null?Object.create(_):(d.prototype=_.prototype,new d)}}(),K=function(D){function l(){var _=D.call(this,"websocket-loader")||this;return _.TAG="WebSocketLoader",_._needStash=!0,_._ws=null,_._requestAbort=!1,_._receivedLength=0,_}return B(l,D),l.isSupported=function(){try{return self.WebSocket!==void 0}catch(_){return!1}},l.prototype.destroy=function(){this._ws&&this.abort(),D.prototype.destroy.call(this)},l.prototype.open=function(_){try{var d=this._ws=new self.WebSocket(_.url);d.binaryType="arraybuffer",d.onopen=this._onWebSocketOpen.bind(this),d.onclose=this._onWebSocketClose.bind(this),d.onmessage=this._onWebSocketMessage.bind(this),d.onerror=this._onWebSocketError.bind(this),this._status=y.c.kConnecting}catch(V){this._status=y.c.kError;var p={code:V.code,msg:V.message};if(!this._onError)throw new g.d(p.msg);this._onError(y.b.EXCEPTION,p)}},l.prototype.abort=function(){var _=this._ws;!_||_.readyState!==0&&_.readyState!==1||(this._requestAbort=!0,_.close()),this._ws=null,this._status=y.c.kComplete},l.prototype._onWebSocketOpen=function(_){this._status=y.c.kBuffering},l.prototype._onWebSocketClose=function(_){this._requestAbort!==!0?(this._status=y.c.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1},l.prototype._onWebSocketMessage=function(_){var d=this;if(_.data instanceof ArrayBuffer)this._dispatchArrayBuffer(_.data);else if(_.data instanceof Blob){var p=new FileReader;p.onload=function(){d._dispatchArrayBuffer(p.result)},p.readAsArrayBuffer(_.data)}else{this._status=y.c.kError;var V={code:-1,msg:"Unsupported WebSocket message type: "+_.data.constructor.name};if(!this._onError)throw new g.d(V.msg);this._onError(y.b.EXCEPTION,V)}},l.prototype._dispatchArrayBuffer=function(_){var d=_,p=this._receivedLength;this._receivedLength+=d.byteLength,this._onDataArrival&&this._onDataArrival(d,p,this._receivedLength)},l.prototype._onWebSocketError=function(_){this._status=y.c.kError;var d={code:_.code,msg:_.message};if(!this._onError)throw new g.d(d.msg);this._onError(y.b.EXCEPTION,d)},l}(y.a),k=function(){function D(l){this._zeroStart=l||!1}return D.prototype.getConfig=function(l,_){var d={};if(_.from!==0||_.to!==-1){var p=void 0;p=_.to!==-1?"bytes=".concat(_.from.toString(),"-").concat(_.to.toString()):"bytes=".concat(_.from.toString(),"-"),d.Range=p}else this._zeroStart&&(d.Range="bytes=0-");return{url:l,headers:d}},D.prototype.removeURLParameters=function(l){return l},D}(),q=function(){function D(l,_){this._startName=l,this._endName=_}return D.prototype.getConfig=function(l,_){var d=l;if(_.from!==0||_.to!==-1){var p=!0;d.indexOf("?")===-1&&(d+="?",p=!1),p&&(d+="&"),d+="".concat(this._startName,"=").concat(_.from.toString()),_.to!==-1&&(d+="&".concat(this._endName,"=").concat(_.to.toString()))}return{url:d,headers:{}}},D.prototype.removeURLParameters=function(l){var _=l.split("?")[0],d=void 0,p=l.indexOf("?");p!==-1&&(d=l.substring(p+1));var V="";if(d!=null&&d.length>0)for(var J=d.split("&"),G=0;G<J.length;G++){var Y=J[G].split("="),oe=G>0;Y[0]!==this._startName&&Y[0]!==this._endName&&(oe&&(V+="&"),V+=J[G])}return V.length===0?_:_+"?"+V},D}(),W=function(){function D(l,_,d){this.TAG="IOController",this._config=_,this._extraData=d,this._stashInitialSize=65536,_.stashInitialSize!=null&&_.stashInitialSize>0&&(this._stashInitialSize=_.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=Math.max(this._stashSize,3145728),this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,_.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=l,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(l.url),this._refTotalLength=l.filesize?l.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new f,this._speedNormalizeList=[32,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return D.prototype.destroy=function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},D.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},D.prototype.isPaused=function(){return this._paused},Object.defineProperty(D.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"extraData",{get:function(){return this._extraData},set:function(l){this._extraData=l},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(l){this._onDataArrival=l},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(l){this._onSeeked=l},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onError",{get:function(){return this._onError},set:function(l){this._onError=l},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onComplete",{get:function(){return this._onComplete},set:function(l){this._onComplete=l},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(l){this._onRedirect=l},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(l){this._onRecoveredEarlyEof=l},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"hasRedirect",{get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"currentSpeed",{get:function(){return this._loaderClass===U?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),D.prototype._selectSeekHandler=function(){var l=this._config;if(l.seekType==="range")this._seekHandler=new k(this._config.rangeLoadZeroStart);else if(l.seekType==="param"){var _=l.seekParamStart||"bstart",d=l.seekParamEnd||"bend";this._seekHandler=new q(_,d)}else{if(l.seekType!=="custom")throw new g.b("Invalid seekType in config: ".concat(l.seekType));if(typeof l.customSeekHandler!="function")throw new g.b("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new l.customSeekHandler}},D.prototype._selectLoader=function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=K;else if(E.isSupported())this._loaderClass=E;else if(I.isSupported())this._loaderClass=I;else{if(!U.isSupported())throw new g.d("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=U}},D.prototype._createLoader=function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)},D.prototype.open=function(l){this._currentRange={from:0,to:-1},l&&(this._currentRange.from=l),this._speedSampler.reset(),l||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))},D.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},D.prototype.pause=function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},D.prototype.resume=function(){if(this._paused){this._paused=!1;var l=this._resumeFrom;this._resumeFrom=0,this._internalSeek(l,!0)}},D.prototype.seek=function(l){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(l,!0)},D.prototype._internalSeek=function(l,_){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(_),this._loader.destroy(),this._loader=null;var d={from:l,to:-1};this._currentRange={from:d.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,d),this._onSeeked&&this._onSeeked()},D.prototype.updateUrl=function(l){if(!l||typeof l!="string"||l.length===0)throw new g.b("Url must be a non-empty string!");this._dataSource.url=l},D.prototype._expandBuffer=function(l){for(var _=this._stashSize;_+1048576<l;)_*=2;if((_+=1048576)!==this._bufferSize){var d=new ArrayBuffer(_);if(this._stashUsed>0){var p=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(d,0,_).set(p,0)}this._stashBuffer=d,this._bufferSize=_}},D.prototype._normalizeSpeed=function(l){var _=this._speedNormalizeList,d=_.length-1,p=0,V=0,J=d;if(l<_[0])return _[0];for(;V<=J;){if((p=V+Math.floor((J-V)/2))===d||l>=_[p]&&l<_[p+1])return _[p];_[p]<l?V=p+1:J=p-1}},D.prototype._adjustStashSize=function(l){var _=0;(_=this._config.isLive?l/8:l<512?l:l>=512&&l<=1024?Math.floor(1.5*l):2*l)>8192&&(_=8192);var d=1024*_+1048576;this._bufferSize<d&&this._expandBuffer(d),this._stashSize=1024*_},D.prototype._dispatchChunks=function(l,_){return this._currentRange.to=_+l.byteLength-1,this._onDataArrival(l,_)},D.prototype._onURLRedirect=function(l){this._redirectedURL=l,this._onRedirect&&this._onRedirect(l)},D.prototype._onContentLengthKnown=function(l){l&&this._fullRequestFlag&&(this._totalLength=l,this._fullRequestFlag=!1)},D.prototype._onLoaderChunkArrival=function(l,_,d){if(!this._onDataArrival)throw new g.a("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(l.byteLength);var p=this._speedSampler.lastSecondKBps;if(p!==0){var V=this._normalizeSpeed(p);this._speedNormalized!==V&&(this._speedNormalized=V,this._adjustStashSize(V))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=_),this._stashUsed+l.byteLength<=this._stashSize)(Y=new Uint8Array(this._stashBuffer,0,this._stashSize)).set(new Uint8Array(l),this._stashUsed),this._stashUsed+=l.byteLength;else if(Y=new Uint8Array(this._stashBuffer,0,this._bufferSize),this._stashUsed>0){var J=this._stashBuffer.slice(0,this._stashUsed);(oe=this._dispatchChunks(J,this._stashByteStart))<J.byteLength?oe>0&&(Ee=new Uint8Array(J,oe),Y.set(Ee,0),this._stashUsed=Ee.byteLength,this._stashByteStart+=oe):(this._stashUsed=0,this._stashByteStart+=oe),this._stashUsed+l.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+l.byteLength),Y=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Y.set(new Uint8Array(l),this._stashUsed),this._stashUsed+=l.byteLength}else(oe=this._dispatchChunks(l,_))<l.byteLength&&((G=l.byteLength-oe)>this._bufferSize&&(this._expandBuffer(G),Y=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Y.set(new Uint8Array(l,oe),0),this._stashUsed+=G,this._stashByteStart=_+oe);else if(this._stashUsed===0){var G;(oe=this._dispatchChunks(l,_))<l.byteLength&&((G=l.byteLength-oe)>this._bufferSize&&this._expandBuffer(G),(Y=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(l,oe),0),this._stashUsed+=G,this._stashByteStart=_+oe)}else{var Y,oe;if(this._stashUsed+l.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+l.byteLength),(Y=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(l),this._stashUsed),this._stashUsed+=l.byteLength,(oe=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))<this._stashUsed&&oe>0){var Ee=new Uint8Array(this._stashBuffer,oe);Y.set(Ee,0)}this._stashUsed-=oe,this._stashByteStart+=oe}}},D.prototype._flushStashBuffer=function(l){if(this._stashUsed>0){var _=this._stashBuffer.slice(0,this._stashUsed),d=this._dispatchChunks(_,this._stashByteStart),p=_.byteLength-d;if(d<_.byteLength){if(!l){if(d>0){var V=new Uint8Array(this._stashBuffer,0,this._bufferSize),J=new Uint8Array(_,d);V.set(J,0),this._stashUsed=J.byteLength,this._stashByteStart+=d}return 0}M.a.w(this.TAG,"".concat(p," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,p}return 0},D.prototype._onLoaderComplete=function(l,_){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},D.prototype._onLoaderError=function(l,_){switch(M.a.e(this.TAG,"Loader error, code = ".concat(_.code,", msg = ").concat(_.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,l=y.b.UNRECOVERABLE_EARLY_EOF),l){case y.b.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var d=this._currentRange.to+1;return void(d<this._totalLength&&(M.a.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(d,!1)))}l=y.b.UNRECOVERABLE_EARLY_EOF;break;case y.b.UNRECOVERABLE_EARLY_EOF:case y.b.CONNECTING_TIMEOUT:case y.b.HTTP_STATUS_CODE_INVALID:case y.b.EXCEPTION:}if(!this._onError)throw new g.d("IOException: "+_.msg);this._onError(l,_)},D}();te.a=W},function(me,te,O){var F=function(){function M(){}return M.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(f,y){return f.__proto__=y,f},Object.assign=Object.assign||function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object(f),v=1;v<arguments.length;v++){var g=arguments[v];if(g!=null)for(var T in g)g.hasOwnProperty(T)&&(y[T]=g[T])}return y},String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(f,y){var v=y>0?0|y:0;return this.substring(v,v+f.length)===f}}),typeof self.Promise!="function"&&O(21).polyfill()},M}();F.install(),te.a=F},function(me,te,O){var F=O(9),M=O.n(F),f=O(0),y=O(5),v=O(7),g=O(3),T=function(){function E(L){this.TAG="MSEController",this._config=L,this._emitter=new M.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onStartStreaming:this._onStartStreaming.bind(this),onEndStreaming:this._onEndStreaming.bind(this),onQualityChange:this._onQualityChange.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._useManagedMediaSource="ManagedMediaSource"in self&&!("MediaSource"in self),this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElementProxy=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]}}return E.prototype.destroy=function(){this._mediaSource&&this.shutdown(),this._mediaSourceObjectURL&&this.revokeObjectURL(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},E.prototype.on=function(L,I){this._emitter.addListener(L,I)},E.prototype.off=function(L,I){this._emitter.removeListener(L,I)},E.prototype.initialize=function(L){if(this._mediaSource)throw new g.a("MediaSource has been attached to an HTMLMediaElement!");this._useManagedMediaSource&&f.a.v(this.TAG,"Using ManagedMediaSource");var I=this._mediaSource=this._useManagedMediaSource?new self.ManagedMediaSource:new self.MediaSource;I.addEventListener("sourceopen",this.e.onSourceOpen),I.addEventListener("sourceended",this.e.onSourceEnded),I.addEventListener("sourceclose",this.e.onSourceClose),this._useManagedMediaSource&&(I.addEventListener("startstreaming",this.e.onStartStreaming),I.addEventListener("endstreaming",this.e.onEndStreaming),I.addEventListener("qualitychange",this.e.onQualityChange)),this._mediaElementProxy=L},E.prototype.shutdown=function(){if(this._mediaSource){var L=this._mediaSource;for(var I in this._sourceBuffers){var w=this._pendingSegments[I];w.splice(0,w.length),this._pendingSegments[I]=null,this._pendingRemoveRanges[I]=null,this._lastInitSegments[I]=null;var x=this._sourceBuffers[I];if(x){if(L.readyState!=="closed"){try{L.removeSourceBuffer(x)}catch(U){f.a.e(this.TAG,U.message)}x.removeEventListener("error",this.e.onSourceBufferError),x.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[I]=null,this._sourceBuffers[I]=null}}if(L.readyState==="open")try{L.endOfStream()}catch(U){f.a.e(this.TAG,U.message)}this._mediaElementProxy=null,L.removeEventListener("sourceopen",this.e.onSourceOpen),L.removeEventListener("sourceended",this.e.onSourceEnded),L.removeEventListener("sourceclose",this.e.onSourceClose),this._useManagedMediaSource&&(L.removeEventListener("startstreaming",this.e.onStartStreaming),L.removeEventListener("endstreaming",this.e.onEndStreaming),L.removeEventListener("qualitychange",this.e.onQualityChange)),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._mediaSource=null}},E.prototype.isManagedMediaSource=function(){return this._useManagedMediaSource},E.prototype.getObject=function(){if(!this._mediaSource)throw new g.a("MediaSource has not been initialized yet!");return this._mediaSource},E.prototype.getHandle=function(){if(!this._mediaSource)throw new g.a("MediaSource has not been initialized yet!");return this._mediaSource.handle},E.prototype.getObjectURL=function(){if(!this._mediaSource)throw new g.a("MediaSource has not been initialized yet!");return this._mediaSourceObjectURL==null&&(this._mediaSourceObjectURL=URL.createObjectURL(this._mediaSource)),this._mediaSourceObjectURL},E.prototype.revokeObjectURL=function(){this._mediaSourceObjectURL&&(URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},E.prototype.appendInitSegment=function(L,I){if(I===void 0&&(I=void 0),!this._mediaSource||this._mediaSource.readyState!=="open"||this._mediaSource.streaming===!1)return this._pendingSourceBufferInit.push(L),void this._pendingSegments[L.type].push(L);var w=L,x="".concat(w.container);w.codec&&w.codec.length>0&&(w.codec==="opus"&&y.a.safari&&(w.codec="Opus"),x+=";codecs=".concat(w.codec));var U=!1;if(f.a.v(this.TAG,"Received Initialization Segment, mimeType: "+x),this._lastInitSegments[w.type]=w,x!==this._mimeTypes[w.type]){if(this._mimeTypes[w.type])f.a.v(this.TAG,"Notice: ".concat(w.type," mimeType changed, origin: ").concat(this._mimeTypes[w.type],", target: ").concat(x));else{U=!0;try{var B=this._sourceBuffers[w.type]=this._mediaSource.addSourceBuffer(x);B.addEventListener("error",this.e.onSourceBufferError),B.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(K){return f.a.e(this.TAG,K.message),void this._emitter.emit(v.a.ERROR,{code:K.code,msg:K.message})}}this._mimeTypes[w.type]=x}I||this._pendingSegments[w.type].push(w),U||this._sourceBuffers[w.type]&&!this._sourceBuffers[w.type].updating&&this._doAppendSegments(),y.a.safari&&w.container==="audio/mpeg"&&w.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=w.mediaDuration/1e3,this._updateMediaSourceDuration())},E.prototype.appendMediaSegment=function(L){var I=L;this._pendingSegments[I.type].push(I),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var w=this._sourceBuffers[I.type];!w||w.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},E.prototype.flush=function(){for(var L in this._sourceBuffers)if(this._sourceBuffers[L]){var I=this._sourceBuffers[L];if(this._mediaSource.readyState==="open")try{I.abort()}catch(k){f.a.e(this.TAG,k.message)}var w=this._pendingSegments[L];if(w.splice(0,w.length),this._mediaSource.readyState!=="closed"){for(var x=0;x<I.buffered.length;x++){var U=I.buffered.start(x),B=I.buffered.end(x);this._pendingRemoveRanges[L].push({start:U,end:B})}if(I.updating||this._doRemoveRanges(),y.a.safari){var K=this._lastInitSegments[L];K&&(this._pendingSegments[L].push(K),I.updating||this._doAppendSegments())}}}},E.prototype.endOfStream=function(){var L=this._mediaSource,I=this._sourceBuffers;L&&L.readyState==="open"?I.video&&I.video.updating||I.audio&&I.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,L.endOfStream()):L&&L.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0)},E.prototype._needCleanupSourceBuffer=function(){if(!this._config.autoCleanupSourceBuffer)return!1;var L=this._mediaElementProxy.getCurrentTime();for(var I in this._sourceBuffers){var w=this._sourceBuffers[I];if(w){var x=w.buffered;if(x.length>=1&&L-x.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},E.prototype._doCleanupSourceBuffer=function(){var L=this._mediaElementProxy.getCurrentTime();for(var I in this._sourceBuffers){var w=this._sourceBuffers[I];if(w){for(var x=w.buffered,U=!1,B=0;B<x.length;B++){var K=x.start(B),k=x.end(B);if(K<=L&&L<k+3){if(L-K>=this._config.autoCleanupMaxBackwardDuration){U=!0;var q=L-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[I].push({start:K,end:q})}}else k<L&&(U=!0,this._pendingRemoveRanges[I].push({start:K,end:k}))}U&&!w.updating&&this._doRemoveRanges()}}},E.prototype._updateMediaSourceDuration=function(){var L=this._sourceBuffers;if(this._mediaElementProxy.getReadyState()!==0&&this._mediaSource.readyState==="open"&&!(L.video&&L.video.updating||L.audio&&L.audio.updating)){var I=this._mediaSource.duration,w=this._pendingMediaDuration;w>0&&(isNaN(I)||w>I)&&(f.a.v(this.TAG,"Update MediaSource duration from ".concat(I," to ").concat(w)),this._mediaSource.duration=w),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},E.prototype._doRemoveRanges=function(){for(var L in this._pendingRemoveRanges)if(this._sourceBuffers[L]&&!this._sourceBuffers[L].updating)for(var I=this._sourceBuffers[L],w=this._pendingRemoveRanges[L];w.length&&!I.updating;){var x=w.shift();I.remove(x.start,x.end)}},E.prototype._doAppendSegments=function(){var L=this._pendingSegments;for(var I in L)if(this._sourceBuffers[I]&&!this._sourceBuffers[I].updating&&this._mediaSource.streaming!==!1&&L[I].length>0){var w=L[I].shift();if(typeof w.timestampOffset=="number"&&isFinite(w.timestampOffset)){var x=this._sourceBuffers[I].timestampOffset,U=w.timestampOffset/1e3;Math.abs(x-U)>.1&&(f.a.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(x," to ").concat(U)),this._sourceBuffers[I].timestampOffset=U),delete w.timestampOffset}if(!w.data||w.data.byteLength===0)continue;try{this._sourceBuffers[I].appendBuffer(w.data),this._isBufferFull=!1}catch(B){this._pendingSegments[I].unshift(w),B.code===22?(this._isBufferFull||this._emitter.emit(v.a.BUFFER_FULL),this._isBufferFull=!0):(f.a.e(this.TAG,B.message),this._emitter.emit(v.a.ERROR,{code:B.code,msg:B.message}))}}},E.prototype._onSourceOpen=function(){if(f.a.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var L=this._pendingSourceBufferInit;L.length;){var I=L.shift();this.appendInitSegment(I,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(v.a.SOURCE_OPEN)},E.prototype._onStartStreaming=function(){f.a.v(this.TAG,"ManagedMediaSource onStartStreaming"),this._emitter.emit(v.a.START_STREAMING)},E.prototype._onEndStreaming=function(){f.a.v(this.TAG,"ManagedMediaSource onEndStreaming"),this._emitter.emit(v.a.END_STREAMING)},E.prototype._onQualityChange=function(){f.a.v(this.TAG,"ManagedMediaSource onQualityChange")},E.prototype._onSourceEnded=function(){f.a.v(this.TAG,"MediaSource onSourceEnded")},E.prototype._onSourceClose=function(){f.a.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose),this._useManagedMediaSource&&(this._mediaSource.removeEventListener("startstreaming",this.e.onStartStreaming),this._mediaSource.removeEventListener("endstreaming",this.e.onEndStreaming),this._mediaSource.removeEventListener("qualitychange",this.e.onQualityChange)))},E.prototype._hasPendingSegments=function(){var L=this._pendingSegments;return L.video.length>0||L.audio.length>0},E.prototype._hasPendingRemoveRanges=function(){var L=this._pendingRemoveRanges;return L.video.length>0||L.audio.length>0},E.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(v.a.UPDATE_END)},E.prototype._onSourceBufferError=function(L){f.a.e(this.TAG,"SourceBuffer Error: ".concat(L))},E}();te.a=T},function(me,te,O){var F=O(9),M=O.n(F),f=O(18),y=O.n(f),v=O(0),g=O(8),T=O(13),E=O(1),L=(O(19),O(12)),I=function(){function w(x,U){if(this.TAG="Transmuxer",this._emitter=new M.a,U.enableWorker&&typeof Worker<"u")try{this._worker=y()(19),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[x,U]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},g.a.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:g.a.getConfig()})}catch(K){v.a.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new T.a(x,U)}else this._controller=new T.a(x,U);if(this._controller){var B=this._controller;B.on(E.a.IO_ERROR,this._onIOError.bind(this)),B.on(E.a.DEMUX_ERROR,this._onDemuxError.bind(this)),B.on(E.a.INIT_SEGMENT,this._onInitSegment.bind(this)),B.on(E.a.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),B.on(E.a.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),B.on(E.a.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),B.on(E.a.MEDIA_INFO,this._onMediaInfo.bind(this)),B.on(E.a.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),B.on(E.a.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),B.on(E.a.TIMED_ID3_METADATA_ARRIVED,this._onTimedID3MetadataArrived.bind(this)),B.on(E.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,this._onSynchronousKLVMetadataArrived.bind(this)),B.on(E.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,this._onAsynchronousKLVMetadataArrived.bind(this)),B.on(E.a.SMPTE2038_METADATA_ARRIVED,this._onSMPTE2038MetadataArrived.bind(this)),B.on(E.a.SCTE35_METADATA_ARRIVED,this._onSCTE35MetadataArrived.bind(this)),B.on(E.a.PES_PRIVATE_DATA_DESCRIPTOR,this._onPESPrivateDataDescriptor.bind(this)),B.on(E.a.PES_PRIVATE_DATA_ARRIVED,this._onPESPrivateDataArrived.bind(this)),B.on(E.a.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),B.on(E.a.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return w.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),g.a.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},w.prototype.on=function(x,U){this._emitter.addListener(x,U)},w.prototype.off=function(x,U){this._emitter.removeListener(x,U)},w.prototype.hasWorker=function(){return this._worker!=null},w.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},w.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},w.prototype.seek=function(x){this._worker?this._worker.postMessage({cmd:"seek",param:x}):this._controller.seek(x)},w.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},w.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},w.prototype._onInitSegment=function(x,U){var B=this;Promise.resolve().then(function(){B._emitter.emit(E.a.INIT_SEGMENT,x,U)})},w.prototype._onMediaSegment=function(x,U){var B=this;Promise.resolve().then(function(){B._emitter.emit(E.a.MEDIA_SEGMENT,x,U)})},w.prototype._onLoadingComplete=function(){var x=this;Promise.resolve().then(function(){x._emitter.emit(E.a.LOADING_COMPLETE)})},w.prototype._onRecoveredEarlyEof=function(){var x=this;Promise.resolve().then(function(){x._emitter.emit(E.a.RECOVERED_EARLY_EOF)})},w.prototype._onMediaInfo=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.MEDIA_INFO,x)})},w.prototype._onMetaDataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.METADATA_ARRIVED,x)})},w.prototype._onScriptDataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.SCRIPTDATA_ARRIVED,x)})},w.prototype._onTimedID3MetadataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.TIMED_ID3_METADATA_ARRIVED,x)})},w.prototype._onSynchronousKLVMetadataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,x)})},w.prototype._onAsynchronousKLVMetadataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,x)})},w.prototype._onSMPTE2038MetadataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.SMPTE2038_METADATA_ARRIVED,x)})},w.prototype._onSCTE35MetadataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.SCTE35_METADATA_ARRIVED,x)})},w.prototype._onPESPrivateDataDescriptor=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.PES_PRIVATE_DATA_DESCRIPTOR,x)})},w.prototype._onPESPrivateDataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.PES_PRIVATE_DATA_ARRIVED,x)})},w.prototype._onStatisticsInfo=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.STATISTICS_INFO,x)})},w.prototype._onIOError=function(x,U){var B=this;Promise.resolve().then(function(){B._emitter.emit(E.a.IO_ERROR,x,U)})},w.prototype._onDemuxError=function(x,U){var B=this;Promise.resolve().then(function(){B._emitter.emit(E.a.DEMUX_ERROR,x,U)})},w.prototype._onRecommendSeekpoint=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.RECOMMEND_SEEKPOINT,x)})},w.prototype._onLoggingConfigChanged=function(x){this._worker&&this._worker.postMessage({cmd:"logging_config",param:x})},w.prototype._onWorkerMessage=function(x){var U=x.data,B=U.data;if(U.msg==="destroyed"||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(U.msg){case E.a.INIT_SEGMENT:case E.a.MEDIA_SEGMENT:this._emitter.emit(U.msg,B.type,B.data);break;case E.a.LOADING_COMPLETE:case E.a.RECOVERED_EARLY_EOF:this._emitter.emit(U.msg);break;case E.a.MEDIA_INFO:Object.setPrototypeOf(B,L.a.prototype),this._emitter.emit(U.msg,B);break;case E.a.METADATA_ARRIVED:case E.a.SCRIPTDATA_ARRIVED:case E.a.TIMED_ID3_METADATA_ARRIVED:case E.a.SYNCHRONOUS_KLV_METADATA_ARRIVED:case E.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED:case E.a.SMPTE2038_METADATA_ARRIVED:case E.a.SCTE35_METADATA_ARRIVED:case E.a.PES_PRIVATE_DATA_DESCRIPTOR:case E.a.PES_PRIVATE_DATA_ARRIVED:case E.a.STATISTICS_INFO:this._emitter.emit(U.msg,B);break;case E.a.IO_ERROR:case E.a.DEMUX_ERROR:this._emitter.emit(U.msg,B.type,B.info);break;case E.a.RECOMMEND_SEEKPOINT:this._emitter.emit(U.msg,B);break;case"logcat_callback":v.a.emitter.emit("log",B.type,B.logcat)}},w}();te.a=I},function(me,te,O){function F(v){var g={};function T(L){if(g[L])return g[L].exports;var I=g[L]={i:L,l:!1,exports:{}};return v[L].call(I.exports,I,I.exports,T),I.l=!0,I.exports}T.m=v,T.c=g,T.i=function(L){return L},T.d=function(L,I,w){T.o(L,I)||Object.defineProperty(L,I,{configurable:!1,enumerable:!0,get:w})},T.r=function(L){Object.defineProperty(L,"__esModule",{value:!0})},T.n=function(L){var I=L&&L.__esModule?function(){return L.default}:function(){return L};return T.d(I,"a",I),I},T.o=function(L,I){return Object.prototype.hasOwnProperty.call(L,I)},T.p="/",T.oe=function(L){throw console.error(L),L};var E=T(T.s=ENTRY_MODULE);return E.default||E}function M(v){return(v+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function f(v,g,T){var E={};E[T]=[];var L=g.toString(),I=L.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!I)return E;for(var w,x=I[1],U=new RegExp("(\\\\n|\\W)"+M(x)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");w=U.exec(L);)w[3]!=="dll-reference"&&E[T].push(w[3]);for(U=new RegExp("\\("+M(x)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");w=U.exec(L);)v[w[2]]||(E[T].push(w[1]),v[w[2]]=O(w[1]).m),E[w[2]]=E[w[2]]||[],E[w[2]].push(w[4]);for(var B,K=Object.keys(E),k=0;k<K.length;k++)for(var q=0;q<E[K[k]].length;q++)B=E[K[k]][q],isNaN(1*B)||(E[K[k]][q]=1*E[K[k]][q]);return E}function y(v){return Object.keys(v).reduce(function(g,T){return g||v[T].length>0},!1)}me.exports=function(v,g){g=g||{};var T={main:O.m},E=g.all?{main:Object.keys(T.main)}:function(U,B){for(var K={main:[B]},k={main:[]},q={main:{}};y(K);)for(var W=Object.keys(K),D=0;D<W.length;D++){var l=W[D],_=K[l].pop();if(q[l]=q[l]||{},!q[l][_]&&U[l][_]){q[l][_]=!0,k[l]=k[l]||[],k[l].push(_);for(var d=f(U,U[l][_],l),p=Object.keys(d),V=0;V<p.length;V++)K[p[V]]=K[p[V]]||[],K[p[V]]=K[p[V]].concat(d[p[V]])}}return k}(T,v),L="";Object.keys(E).filter(function(U){return U!=="main"}).forEach(function(U){for(var B=0;E[U][B];)B++;E[U].push(B),T[U][B]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",L=L+"var "+U+" = ("+F.toString().replace("ENTRY_MODULE",JSON.stringify(B))+")({"+E[U].map(function(K){return JSON.stringify(K)+": "+T[U][K].toString()}).join(",")+"});\n"}),L=L+"new (("+F.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+E.main.map(function(U){return JSON.stringify(U)+": "+T.main[U].toString()}).join(",")+"}))(self);";var I=new self.Blob([L],{type:"text/javascript"});if(g.bare)return I;var w=(self.URL||self.webkitURL||self.mozURL||self.msURL).createObjectURL(I),x=new self.Worker(w);return x.objectURL=w,x}},function(me,te,O){O.r(te),O(0);var F=O(8),M=O(15),f=O(13),y=O(1);te.default=function(v){var g=null,T=(function(G,Y){v.postMessage({msg:"logcat_callback",data:{type:G,logcat:Y}})}).bind(this);function E(G,Y){var oe={msg:y.a.INIT_SEGMENT,data:{type:G,data:Y}};v.postMessage(oe,[Y.data])}function L(G,Y){var oe={msg:y.a.MEDIA_SEGMENT,data:{type:G,data:Y}};v.postMessage(oe,[Y.data])}function I(){var G={msg:y.a.LOADING_COMPLETE};v.postMessage(G)}function w(){var G={msg:y.a.RECOVERED_EARLY_EOF};v.postMessage(G)}function x(G){var Y={msg:y.a.MEDIA_INFO,data:G};v.postMessage(Y)}function U(G){var Y={msg:y.a.METADATA_ARRIVED,data:G};v.postMessage(Y)}function B(G){var Y={msg:y.a.SCRIPTDATA_ARRIVED,data:G};v.postMessage(Y)}function K(G){var Y={msg:y.a.TIMED_ID3_METADATA_ARRIVED,data:G};v.postMessage(Y)}function k(G){var Y={msg:y.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,data:G};v.postMessage(Y)}function q(G){var Y={msg:y.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,data:G};v.postMessage(Y)}function W(G){var Y={msg:y.a.SMPTE2038_METADATA_ARRIVED,data:G};v.postMessage(Y)}function D(G){var Y={msg:y.a.SCTE35_METADATA_ARRIVED,data:G};v.postMessage(Y)}function l(G){var Y={msg:y.a.PES_PRIVATE_DATA_DESCRIPTOR,data:G};v.postMessage(Y)}function _(G){var Y={msg:y.a.PES_PRIVATE_DATA_ARRIVED,data:G};v.postMessage(Y)}function d(G){var Y={msg:y.a.STATISTICS_INFO,data:G};v.postMessage(Y)}function p(G,Y){v.postMessage({msg:y.a.IO_ERROR,data:{type:G,info:Y}})}function V(G,Y){v.postMessage({msg:y.a.DEMUX_ERROR,data:{type:G,info:Y}})}function J(G){v.postMessage({msg:y.a.RECOMMEND_SEEKPOINT,data:G})}M.a.install(),v.addEventListener("message",function(G){switch(G.data.cmd){case"init":(g=new f.a(G.data.param[0],G.data.param[1])).on(y.a.IO_ERROR,p.bind(this)),g.on(y.a.DEMUX_ERROR,V.bind(this)),g.on(y.a.INIT_SEGMENT,E.bind(this)),g.on(y.a.MEDIA_SEGMENT,L.bind(this)),g.on(y.a.LOADING_COMPLETE,I.bind(this)),g.on(y.a.RECOVERED_EARLY_EOF,w.bind(this)),g.on(y.a.MEDIA_INFO,x.bind(this)),g.on(y.a.METADATA_ARRIVED,U.bind(this)),g.on(y.a.SCRIPTDATA_ARRIVED,B.bind(this)),g.on(y.a.TIMED_ID3_METADATA_ARRIVED,K.bind(this)),g.on(y.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,k.bind(this)),g.on(y.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,q.bind(this)),g.on(y.a.SMPTE2038_METADATA_ARRIVED,W.bind(this)),g.on(y.a.SCTE35_METADATA_ARRIVED,D.bind(this)),g.on(y.a.PES_PRIVATE_DATA_DESCRIPTOR,l.bind(this)),g.on(y.a.PES_PRIVATE_DATA_ARRIVED,_.bind(this)),g.on(y.a.STATISTICS_INFO,d.bind(this)),g.on(y.a.RECOMMEND_SEEKPOINT,J.bind(this));break;case"destroy":g&&(g.destroy(),g=null),v.postMessage({msg:"destroyed"});break;case"start":g.start();break;case"stop":g.stop();break;case"seek":g.seek(G.data.param);break;case"pause":g.pause();break;case"resume":g.resume();break;case"logging_config":var Y=G.data.param;F.a.applyConfig(Y),Y.enableCallback===!0?F.a.addLogListener(T):F.a.removeLogListener(T)}})}},function(me,te,O){me.exports=O(25).default},function(me,te,O){(function(F,M){/*!
2
- * @overview es6-promise - a tiny implementation of Promises/A+.
3
- * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
4
- * @license Licensed under MIT license
5
- * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
6
- * @version v4.2.8+1e68dce6
7
- */var f;f=function(){function y(j){return typeof j=="function"}var v=Array.isArray?Array.isArray:function(j){return Object.prototype.toString.call(j)==="[object Array]"},g=0,T=void 0,E=void 0,L=function(j,X){k[g]=j,k[g+1]=X,(g+=2)===2&&(E?E(q):d())},I=typeof window<"u"?window:void 0,w=I||{},x=w.MutationObserver||w.WebKitMutationObserver,U=typeof self>"u"&&F!==void 0&&{}.toString.call(F)==="[object process]",B=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function K(){var j=setTimeout;return function(){return j(q,1)}}var k=new Array(1e3);function q(){for(var j=0;j<g;j+=2)(0,k[j])(k[j+1]),k[j]=void 0,k[j+1]=void 0;g=0}var W,D,l,_,d=void 0;function p(j,X){var ie=this,le=new this.constructor(G);le[J]===void 0&&de(le);var ce=ie._state;if(ce){var ve=arguments[ce-1];L(function(){return z(ce,le,ve,ie._result)})}else c(ie,le,j,X);return le}function V(j){if(j&&typeof j=="object"&&j.constructor===this)return j;var X=new this(G);return oe(X,j),X}U?d=function(){return F.nextTick(q)}:x?(D=0,l=new x(q),_=document.createTextNode(""),l.observe(_,{characterData:!0}),d=function(){_.data=D=++D%2}):B?((W=new MessageChannel).port1.onmessage=q,d=function(){return W.port2.postMessage(0)}):d=I===void 0?function(){try{var j=Function("return this")().require("vertx");return(T=j.runOnLoop||j.runOnContext)!==void 0?function(){T(q)}:K()}catch(X){return K()}}():K();var J=Math.random().toString(36).substring(2);function G(){}function Y(j,X,ie){X.constructor===j.constructor&&ie===p&&X.constructor.resolve===V?function(le,ce){ce._state===1?_e(le,ce._result):ce._state===2?b(le,ce._result):c(ce,void 0,function(ve){return oe(le,ve)},function(ve){return b(le,ve)})}(j,X):ie===void 0?_e(j,X):y(ie)?function(le,ce,ve){L(function(Me){var Ce=!1,Ue=function(ke,He,Ye,Ze){try{ke.call(He,Ye,Ze)}catch(et){return et}}(ve,ce,function(ke){Ce||(Ce=!0,ce!==ke?oe(Me,ke):_e(Me,ke))},function(ke){Ce||(Ce=!0,b(Me,ke))},Me._label);!Ce&&Ue&&(Ce=!0,b(Me,Ue))},le)}(j,X,ie):_e(j,X)}function oe(j,X){if(j===X)b(j,new TypeError("You cannot resolve a promise with itself"));else if(ce=typeof(le=X),le===null||ce!=="object"&&ce!=="function")_e(j,X);else{var ie=void 0;try{ie=X.then}catch(ve){return void b(j,ve)}Y(j,X,ie)}var le,ce}function Ee(j){j._onerror&&j._onerror(j._result),C(j)}function _e(j,X){j._state===void 0&&(j._result=X,j._state=1,j._subscribers.length!==0&&L(C,j))}function b(j,X){j._state===void 0&&(j._state=2,j._result=X,L(Ee,j))}function c(j,X,ie,le){var ce=j._subscribers,ve=ce.length;j._onerror=null,ce[ve]=X,ce[ve+1]=ie,ce[ve+2]=le,ve===0&&j._state&&L(C,j)}function C(j){var X=j._subscribers,ie=j._state;if(X.length!==0){for(var le=void 0,ce=void 0,ve=j._result,Me=0;Me<X.length;Me+=3)le=X[Me],ce=X[Me+ie],le?z(ie,le,ce,ve):ce(ve);j._subscribers.length=0}}function z(j,X,ie,le){var ce=y(ie),ve=void 0,Me=void 0,Ce=!0;if(ce){try{ve=ie(le)}catch(Ue){Ce=!1,Me=Ue}if(X===ve)return void b(X,new TypeError("A promises callback cannot return that same promise."))}else ve=le;X._state!==void 0||(ce&&Ce?oe(X,ve):Ce===!1?b(X,Me):j===1?_e(X,ve):j===2&&b(X,ve))}var ne=0;function de(j){j[J]=ne++,j._state=void 0,j._result=void 0,j._subscribers=[]}var Te=function(){function j(X,ie){this._instanceConstructor=X,this.promise=new X(G),this.promise[J]||de(this.promise),v(ie)?(this.length=ie.length,this._remaining=ie.length,this._result=new Array(this.length),this.length===0?_e(this.promise,this._result):(this.length=this.length||0,this._enumerate(ie),this._remaining===0&&_e(this.promise,this._result))):b(this.promise,new Error("Array Methods must be provided an Array"))}return j.prototype._enumerate=function(X){for(var ie=0;this._state===void 0&&ie<X.length;ie++)this._eachEntry(X[ie],ie)},j.prototype._eachEntry=function(X,ie){var le=this._instanceConstructor,ce=le.resolve;if(ce===V){var ve=void 0,Me=void 0,Ce=!1;try{ve=X.then}catch(ke){Ce=!0,Me=ke}if(ve===p&&X._state!==void 0)this._settledAt(X._state,ie,X._result);else if(typeof ve!="function")this._remaining--,this._result[ie]=X;else if(le===ye){var Ue=new le(G);Ce?b(Ue,Me):Y(Ue,X,ve),this._willSettleAt(Ue,ie)}else this._willSettleAt(new le(function(ke){return ke(X)}),ie)}else this._willSettleAt(ce(X),ie)},j.prototype._settledAt=function(X,ie,le){var ce=this.promise;ce._state===void 0&&(this._remaining--,X===2?b(ce,le):this._result[ie]=le),this._remaining===0&&_e(ce,this._result)},j.prototype._willSettleAt=function(X,ie){var le=this;c(X,void 0,function(ce){return le._settledAt(1,ie,ce)},function(ce){return le._settledAt(2,ie,ce)})},j}(),ye=function(){function j(X){this[J]=ne++,this._result=this._state=void 0,this._subscribers=[],G!==X&&(typeof X!="function"&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof j?function(ie,le){try{le(function(ce){oe(ie,ce)},function(ce){b(ie,ce)})}catch(ce){b(ie,ce)}}(this,X):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return j.prototype.catch=function(X){return this.then(null,X)},j.prototype.finally=function(X){var ie=this.constructor;return y(X)?this.then(function(le){return ie.resolve(X()).then(function(){return le})},function(le){return ie.resolve(X()).then(function(){throw le})}):this.then(X,X)},j}();return ye.prototype.then=p,ye.all=function(j){return new Te(this,j).promise},ye.race=function(j){var X=this;return v(j)?new X(function(ie,le){for(var ce=j.length,ve=0;ve<ce;ve++)X.resolve(j[ve]).then(ie,le)}):new X(function(ie,le){return le(new TypeError("You must pass an array to race."))})},ye.resolve=V,ye.reject=function(j){var X=new this(G);return b(X,j),X},ye._setScheduler=function(j){E=j},ye._setAsap=function(j){L=j},ye._asap=L,ye.polyfill=function(){var j=void 0;if(M!==void 0)j=M;else if(typeof self<"u")j=self;else try{j=Function("return this")()}catch(le){throw new Error("polyfill failed because global object is unavailable in this environment")}var X=j.Promise;if(X){var ie=null;try{ie=Object.prototype.toString.call(X.resolve())}catch(le){}if(ie==="[object Promise]"&&!X.cast)return}j.Promise=ye},ye.Promise=ye,ye},me.exports=f()}).call(this,O(22),O(23))},function(me,te){var O,F,M=me.exports={};function f(){throw new Error("setTimeout has not been defined")}function y(){throw new Error("clearTimeout has not been defined")}function v(B){if(O===setTimeout)return setTimeout(B,0);if((O===f||!O)&&setTimeout)return O=setTimeout,setTimeout(B,0);try{return O(B,0)}catch(K){try{return O.call(null,B,0)}catch(k){return O.call(this,B,0)}}}(function(){try{O=typeof setTimeout=="function"?setTimeout:f}catch(B){O=f}try{F=typeof clearTimeout=="function"?clearTimeout:y}catch(B){F=y}})();var g,T=[],E=!1,L=-1;function I(){E&&g&&(E=!1,g.length?T=g.concat(T):L=-1,T.length&&w())}function w(){if(!E){var B=v(I);E=!0;for(var K=T.length;K;){for(g=T,T=[];++L<K;)g&&g[L].run();L=-1,K=T.length}g=null,E=!1,function(k){if(F===clearTimeout)return clearTimeout(k);if((F===y||!F)&&clearTimeout)return F=clearTimeout,clearTimeout(k);try{F(k)}catch(q){try{return F.call(null,k)}catch(W){return F.call(this,k)}}}(B)}}function x(B,K){this.fun=B,this.array=K}function U(){}M.nextTick=function(B){var K=new Array(arguments.length-1);if(arguments.length>1)for(var k=1;k<arguments.length;k++)K[k-1]=arguments[k];T.push(new x(B,K)),T.length!==1||E||v(w)},x.prototype.run=function(){this.fun.apply(null,this.array)},M.title="browser",M.browser=!0,M.env={},M.argv=[],M.version="",M.versions={},M.on=U,M.addListener=U,M.once=U,M.off=U,M.removeListener=U,M.removeAllListeners=U,M.emit=U,M.prependListener=U,M.prependOnceListener=U,M.listeners=function(B){return[]},M.binding=function(B){throw new Error("process.binding is not supported")},M.cwd=function(){return"/"},M.chdir=function(B){throw new Error("process.chdir is not supported")},M.umask=function(){return 0}},function(me,te){var O;O=function(){return this}();try{O=O||new Function("return this")()}catch(F){typeof window=="object"&&(O=window)}me.exports=O},function(me,te,O){O.r(te);var F=O(0),M=O(8),f=O(3),y=O(7),v=O(16),g=O(17),T=O(1),E=O(4),L=O(10);te.default=function(I){var w="PlayerEngineWorker",x=(function(b,c){I.postMessage({msg:"logcat_callback",type:b,logcat:c})}).bind(void 0),U=null,B=null,K=null,k=null,q=!1,W=!1,D=0,l=0,_=!1;function d(){K&&(K.shutdown(),K.destroy(),K=null)}function p(){if(U==null||B==null)throw new f.a("Worker not initialized");if(k)throw new f.a("Transmuxer has been initialized");W||(!B.deferLoadAfterSourceOpen||q?((k=new g.a(U,B)).on(T.a.INIT_SEGMENT,function(b,c){K.appendInitSegment(c)}),k.on(T.a.MEDIA_SEGMENT,function(b,c){K.appendMediaSegment(c),I.postMessage({msg:"buffered_position_changed",buffered_position_milliseconds:c.info.endDts})}),k.on(T.a.LOADING_COMPLETE,function(){K.endOfStream(),I.postMessage({msg:"player_event",event:E.a.LOADING_COMPLETE})}),k.on(T.a.RECOVERED_EARLY_EOF,function(){I.postMessage({msg:"player_event",event:E.a.RECOVERED_EARLY_EOF})}),k.on(T.a.IO_ERROR,function(b,c){I.postMessage({msg:"player_event",event:E.a.ERROR,error_type:L.b.NETWORK_ERROR,error_detail:b,info:c})}),k.on(T.a.DEMUX_ERROR,function(b,c){I.postMessage({msg:"player_event",event:E.a.ERROR,error_type:L.b.MEDIA_ERROR,error_detail:b,info:c})}),k.on(T.a.MEDIA_INFO,function(b){Ee(T.a.MEDIA_INFO,b)}),k.on(T.a.STATISTICS_INFO,function(b){Ee(T.a.STATISTICS_INFO,b)}),k.on(T.a.RECOMMEND_SEEKPOINT,function(b){(function(c){I.postMessage({msg:"transmuxing_event",event:T.a.RECOMMEND_SEEKPOINT,milliseconds:c})})(b)}),k.on(T.a.METADATA_ARRIVED,function(b){_e(E.a.METADATA_ARRIVED,b)}),k.on(T.a.SCRIPTDATA_ARRIVED,function(b){_e(E.a.SCRIPTDATA_ARRIVED,b)}),k.on(T.a.TIMED_ID3_METADATA_ARRIVED,function(b){_e(E.a.TIMED_ID3_METADATA_ARRIVED,b)}),k.on(T.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,function(b){_e(E.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,b)}),k.on(T.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,function(b){_e(E.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,b)}),k.on(T.a.SMPTE2038_METADATA_ARRIVED,function(b){_e(E.a.SMPTE2038_METADATA_ARRIVED,b)}),k.on(T.a.SCTE35_METADATA_ARRIVED,function(b){_e(E.a.SCTE35_METADATA_ARRIVED,b)}),k.on(T.a.PES_PRIVATE_DATA_DESCRIPTOR,function(b){_e(E.a.PES_PRIVATE_DATA_DESCRIPTOR,b)}),k.on(T.a.PES_PRIVATE_DATA_ARRIVED,function(b){_e(E.a.PES_PRIVATE_DATA_ARRIVED,b)}),k.open()):W=!0)}function V(){K&&K.flush(),k&&(k.close(),k.destroy(),k=null)}function J(){q=!0,W&&(W=!1,p())}function G(){I.postMessage({msg:"mse_event",event:y.a.UPDATE_END})}function Y(){F.a.v(w,"MSE SourceBuffer is full, report to main thread"),I.postMessage({msg:"mse_event",event:y.a.BUFFER_FULL})}function oe(b){I.postMessage({msg:"player_event",event:E.a.ERROR,error_type:L.b.MEDIA_ERROR,error_detail:L.b.MEDIA_MSE_ERROR,info:b})}function Ee(b,c){I.postMessage({msg:"transmuxing_event",event:b,info:c})}function _e(b,c){I.postMessage({msg:"player_event",event:b,extraData:c})}I.addEventListener("message",function(b){if(!_){var c=b.data;switch(c.cmd){case"logging_config":var C=c;M.a.applyConfig(C.logging_config),C.logging_config.enableCallback===!0?M.a.addLogListener(x):M.a.removeLogListener(x);break;case"init":U=(C=c).media_data_source,B=C.config;break;case"destroy":(function(){k&&V(),K&&d(),_=!0,I.postMessage({msg:"destroyed"})})();break;case"initialize_mse":(function(){F.a.v(w,"Initializing MediaSource in DedicatedWorker"),(K=new v.a(B)).on(y.a.SOURCE_OPEN,J.bind(this)),K.on(y.a.UPDATE_END,G.bind(this)),K.on(y.a.BUFFER_FULL,Y.bind(this)),K.on(y.a.ERROR,oe.bind(this)),K.initialize({getCurrentTime:function(){return D},getReadyState:function(){return l}});var z=K.getHandle();I.postMessage({msg:"mse_init",handle:z},[z])})();break;case"shutdown_mse":d();break;case"load":p();break;case"unload":V();break;case"unbuffered_seek":C=c,K.flush(),k.seek(C.milliseconds);break;case"timeupdate":D=(C=c).current_time;break;case"readystatechange":l=(C=c).ready_state;break;case"pause_transmuxer":k.pause();break;case"resume_transmuxer":k.resume()}}})}},function(me,te,O){O.r(te);var F=O(15),M=O(14),f={enableWorker:!1,enableWorkerForMSE:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,liveBufferLatencyChasing:!1,liveBufferLatencyChasingOnPaused:!1,liveBufferLatencyMaxLatency:1.5,liveBufferLatencyMinRemain:.5,liveSync:!1,liveSyncMaxLatency:1.2,liveSyncTargetLatency:.8,liveSyncPlaybackRate:1.2,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function y(){return Object.assign({},f)}var v=function(){function b(){}return b.supportMSEH264Playback=function(){var c=self.MediaSource&&self.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),C=self.ManagedMediaSource&&self.ManagedMediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"');return c||C},b.supportMSEH265Playback=function(){var c=self.MediaSource&&self.MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"'),C=self.ManagedMediaSource&&self.ManagedMediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"');return c||C},b.supportNetworkStreamIO=function(){var c=new M.a({},y()),C=c.loaderType;return c.destroy(),C=="fetch-stream-loader"||C=="xhr-moz-chunked-loader"},b.getNetworkLoaderTypeName=function(){var c=new M.a({},y()),C=c.loaderType;return c.destroy(),C},b.supportNativeMediaPlayback=function(c){b.videoElement==null&&(b.videoElement=window.document.createElement("video"));var C=b.videoElement.canPlayType(c);return C==="probably"||C=="maybe"},b.getFeatureList=function(){var c={msePlayback:!1,mseLivePlayback:!1,mseH265Playback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeMP4H265Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return c.msePlayback=b.supportMSEH264Playback(),c.networkStreamIO=b.supportNetworkStreamIO(),c.networkLoaderName=b.getNetworkLoaderTypeName(),c.mseLivePlayback=c.msePlayback&&c.networkStreamIO,c.mseH265Playback=b.supportMSEH265Playback(),c.nativeMP4H264Playback=b.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),c.nativeMP4H265Playback=b.supportNativeMediaPlayback('video/mp4; codecs="hvc1.1.6.L93.B0"'),c.nativeWebmVP8Playback=b.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),c.nativeWebmVP9Playback=b.supportNativeMediaPlayback('video/webm; codecs="vp9"'),c},b}(),g=O(2),T=O(0),E=O(9),L=O.n(E),I=O(16),w=O(4),x=O(17),U=O(7),B=O(10),K=O(3),k=O(1),q=O(5),W=O(11),D=function(){function b(c,C,z){this.TAG="SeekingHandler",this._config=null,this._media_element=null,this._always_seek_keyframe=!1,this._on_unbuffered_seek=null,this._request_set_current_time=!1,this._seek_request_record_clocktime=null,this._idr_sample_list=new W.a,this.e=null,this._config=c,this._media_element=C,this._on_unbuffered_seek=z,this.e={onMediaSeeking:this._onMediaSeeking.bind(this)};var ne=q.a.chrome&&(q.a.version.major<50||q.a.version.major===50&&q.a.version.build<2661);this._always_seek_keyframe=!!(ne||q.a.msedge||q.a.msie),this._always_seek_keyframe&&(this._config.accurateSeek=!1),this._media_element.addEventListener("seeking",this.e.onMediaSeeking)}return b.prototype.destroy=function(){this._idr_sample_list.clear(),this._idr_sample_list=null,this._media_element.removeEventListener("seeking",this.e.onMediaSeeking),this._media_element=null,this._on_unbuffered_seek=null},b.prototype.seek=function(c){var C=this._isPositionBuffered(c),z=!1;if(c<1&&this._media_element.buffered.length>0){var ne=this._media_element.buffered.start(0);(ne<1&&c<ne||q.a.safari)&&(z=!0,c=q.a.safari?.1:ne)}if(z)this.directSeek(c);else if(C)if(this._always_seek_keyframe){var de=this._getNearestKeyframe(Math.floor(1e3*c));de!=null&&(c=de.dts/1e3),this.directSeek(c)}else this.directSeek(c);else this._idr_sample_list.clear(),this._on_unbuffered_seek(Math.floor(1e3*c)),this._config.accurateSeek&&this.directSeek(c)},b.prototype.directSeek=function(c){this._request_set_current_time=!0,this._media_element.currentTime=c},b.prototype.appendSyncPoints=function(c){this._idr_sample_list.appendArray(c)},b.prototype._onMediaSeeking=function(c){if(this._request_set_current_time)this._request_set_current_time=!1;else{var C=this._media_element.currentTime,z=this._media_element.buffered;if(C<1&&z.length>0){var ne=z.start(0);if(ne<1&&C<ne||q.a.safari){var de=q.a.safari?.1:ne;return void this.directSeek(de)}}if(this._isPositionBuffered(C)){if(this._always_seek_keyframe){var Te=this._getNearestKeyframe(Math.floor(1e3*C));Te!=null&&(C=Te.dts/1e3,this.directSeek(C))}}else this._seek_request_record_clocktime=b._getClockTime(),window.setTimeout(this._pollAndApplyUnbufferedSeek.bind(this),50)}},b.prototype._pollAndApplyUnbufferedSeek=function(){if(this._seek_request_record_clocktime!=null)if(this._seek_request_record_clocktime<=b._getClockTime()-100){var c=this._media_element.currentTime;this._seek_request_record_clocktime=null,this._isPositionBuffered(c)||(this._idr_sample_list.clear(),this._on_unbuffered_seek(Math.floor(1e3*c)),this._config.accurateSeek&&this.directSeek(c))}else window.setTimeout(this._pollAndApplyUnbufferedSeek.bind(this),50)},b.prototype._isPositionBuffered=function(c){for(var C=this._media_element.buffered,z=0;z<C.length;z++){var ne=C.start(z),de=C.end(z);if(c>=ne&&c<de)return!0}return!1},b.prototype._getNearestKeyframe=function(c){return this._idr_sample_list.getLastSyncPointBeforeDts(c)},b._getClockTime=function(){return self.performance&&self.performance.now?self.performance.now():Date.now()},b}(),l=function(){function b(c,C,z,ne){this.TAG="LoadingController",this._config=null,this._media_element=null,this._on_pause_transmuxer=null,this._on_resume_transmuxer=null,this._paused=!1,this.e=null,this._config=c,this._media_element=C,this._on_pause_transmuxer=z,this._on_resume_transmuxer=ne,this.e={onMediaTimeUpdate:this._onMediaTimeUpdate.bind(this)}}return b.prototype.destroy=function(){this._media_element.removeEventListener("timeupdate",this.e.onMediaTimeUpdate),this.e=null,this._media_element=null,this._config=null,this._on_pause_transmuxer=null,this._on_resume_transmuxer=null},b.prototype.notifyBufferedPositionChanged=function(c){!this._config.isLive&&this._config.lazyLoad&&(c==null?this._suspendTransmuxerIfNeeded():this._suspendTransmuxerIfBufferedPositionExceeded(c))},b.prototype._onMediaTimeUpdate=function(c){this._paused&&this._resumeTransmuxerIfNeeded()},b.prototype._suspendTransmuxerIfNeeded=function(){for(var c=this._media_element.buffered,C=this._media_element.currentTime,z=0,ne=0;ne<c.length;ne++){var de=c.start(ne),Te=c.end(ne);if(de<=C&&C<Te){z=Te;break}}z>0&&this._suspendTransmuxerIfBufferedPositionExceeded(z)},b.prototype._suspendTransmuxerIfBufferedPositionExceeded=function(c){c>=this._media_element.currentTime+this._config.lazyLoadMaxDuration&&!this._paused&&(T.a.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this.suspendTransmuxer(),this._media_element.addEventListener("timeupdate",this.e.onMediaTimeUpdate))},b.prototype.suspendTransmuxer=function(){this._paused=!0,this._on_pause_transmuxer()},b.prototype._resumeTransmuxerIfNeeded=function(){for(var c=this._media_element.buffered,C=this._media_element.currentTime,z=this._config.lazyLoadRecoverDuration,ne=!1,de=0;de<c.length;de++){var Te=c.start(de),ye=c.end(de);if(C>=Te&&C<ye){C>=ye-z&&(ne=!0);break}}ne&&(T.a.v(this.TAG,"Continue loading from paused position"),this.resumeTransmuxer(),this._media_element.removeEventListener("timeupdate",this.e.onMediaTimeUpdate))},b.prototype.resumeTransmuxer=function(){this._paused=!1,this._on_resume_transmuxer()},b}(),_=function(){function b(c,C){this.TAG="StartupStallJumper",this._media_element=null,this._on_direct_seek=null,this._canplay_received=!1,this.e=null,this._media_element=c,this._on_direct_seek=C,this.e={onMediaCanPlay:this._onMediaCanPlay.bind(this),onMediaStalled:this._onMediaStalled.bind(this),onMediaProgress:this._onMediaProgress.bind(this)},this._media_element.addEventListener("canplay",this.e.onMediaCanPlay),this._media_element.addEventListener("stalled",this.e.onMediaStalled),this._media_element.addEventListener("progress",this.e.onMediaProgress)}return b.prototype.destroy=function(){this._media_element.removeEventListener("canplay",this.e.onMediaCanPlay),this._media_element.removeEventListener("stalled",this.e.onMediaStalled),this._media_element.removeEventListener("progress",this.e.onMediaProgress),this._media_element=null,this._on_direct_seek=null},b.prototype._onMediaCanPlay=function(c){this._canplay_received=!0,this._media_element.removeEventListener("canplay",this.e.onMediaCanPlay)},b.prototype._onMediaStalled=function(c){this._detectAndFixStuckPlayback(!0)},b.prototype._onMediaProgress=function(c){this._detectAndFixStuckPlayback()},b.prototype._detectAndFixStuckPlayback=function(c){var C=this._media_element,z=C.buffered;c||!this._canplay_received||C.readyState<2?z.length>0&&C.currentTime<z.start(0)&&(T.a.w(this.TAG,"Playback seems stuck at ".concat(C.currentTime,", seek to ").concat(z.start(0))),this._on_direct_seek(z.start(0)),this._media_element.removeEventListener("progress",this.e.onMediaProgress)):this._media_element.removeEventListener("progress",this.e.onMediaProgress)},b}(),d=function(){function b(c,C,z){this._config=null,this._media_element=null,this._on_direct_seek=null,this._config=c,this._media_element=C,this._on_direct_seek=z}return b.prototype.destroy=function(){this._on_direct_seek=null,this._media_element=null,this._config=null},b.prototype.notifyBufferedRangeUpdate=function(){this._chaseLiveLatency()},b.prototype._chaseLiveLatency=function(){var c=this._media_element.buffered,C=this._media_element.currentTime,z=this._media_element.paused;if(this._config.isLive&&this._config.liveBufferLatencyChasing&&c.length!=0&&(this._config.liveBufferLatencyChasingOnPaused||!z)){var ne=c.end(c.length-1);if(ne>this._config.liveBufferLatencyMaxLatency&&ne-C>this._config.liveBufferLatencyMaxLatency){var de=ne-this._config.liveBufferLatencyMinRemain;this._on_direct_seek(de)}}},b}(),p=function(){function b(c,C){this._config=null,this._media_element=null,this.e=null,this._config=c,this._media_element=C,this.e={onMediaTimeUpdate:this._onMediaTimeUpdate.bind(this)},this._media_element.addEventListener("timeupdate",this.e.onMediaTimeUpdate)}return b.prototype.destroy=function(){this._media_element.removeEventListener("timeupdate",this.e.onMediaTimeUpdate),this._media_element=null,this._config=null},b.prototype._onMediaTimeUpdate=function(c){if(this._config.isLive&&this._config.liveSync){var C=this._getCurrentLatency();if(C>this._config.liveSyncMaxLatency){var z=Math.min(2,Math.max(1,this._config.liveSyncPlaybackRate));this._media_element.playbackRate=z}else C>this._config.liveSyncTargetLatency||this._media_element.playbackRate!==1&&this._media_element.playbackRate!==0&&(this._media_element.playbackRate=1)}},b.prototype._getCurrentLatency=function(){if(!this._media_element)return 0;var c=this._media_element.buffered,C=this._media_element.currentTime;return c.length==0?0:c.end(c.length-1)-C},b}(),V=function(){function b(c,C){this.TAG="PlayerEngineMainThread",this._emitter=new E,this._media_element=null,this._mse_controller=null,this._transmuxer=null,this._pending_seek_time=null,this._seeking_handler=null,this._loading_controller=null,this._startup_stall_jumper=null,this._live_latency_chaser=null,this._live_latency_synchronizer=null,this._mse_source_opened=!1,this._has_pending_load=!1,this._loaded_metadata_received=!1,this._media_info=null,this._statistics_info=null,this.e=null,this._media_data_source=c,this._config=y(),typeof C=="object"&&Object.assign(this._config,C),c.isLive===!0&&(this._config.isLive=!0),this.e={onMediaLoadedMetadata:this._onMediaLoadedMetadata.bind(this)}}return b.prototype.destroy=function(){this._emitter.emit(w.a.DESTROYING),this._transmuxer&&this.unload(),this._media_element&&this.detachMediaElement(),this.e=null,this._media_data_source=null,this._emitter.removeAllListeners(),this._emitter=null},b.prototype.on=function(c,C){var z=this;this._emitter.addListener(c,C),c===w.a.MEDIA_INFO&&this._media_info?Promise.resolve().then(function(){return z._emitter.emit(w.a.MEDIA_INFO,z.mediaInfo)}):c==w.a.STATISTICS_INFO&&this._statistics_info&&Promise.resolve().then(function(){return z._emitter.emit(w.a.STATISTICS_INFO,z.statisticsInfo)})},b.prototype.off=function(c,C){this._emitter.removeListener(c,C)},b.prototype.attachMediaElement=function(c){var C=this;this._media_element=c,c.src="",c.removeAttribute("src"),c.srcObject=null,c.load(),c.addEventListener("loadedmetadata",this.e.onMediaLoadedMetadata),this._mse_controller=new I.a(this._config),this._mse_controller.on(U.a.UPDATE_END,this._onMSEUpdateEnd.bind(this)),this._mse_controller.on(U.a.BUFFER_FULL,this._onMSEBufferFull.bind(this)),this._mse_controller.on(U.a.SOURCE_OPEN,this._onMSESourceOpen.bind(this)),this._mse_controller.on(U.a.ERROR,this._onMSEError.bind(this)),this._mse_controller.on(U.a.START_STREAMING,this._onMSEStartStreaming.bind(this)),this._mse_controller.on(U.a.END_STREAMING,this._onMSEEndStreaming.bind(this)),this._mse_controller.initialize({getCurrentTime:function(){return C._media_element.currentTime},getReadyState:function(){return C._media_element.readyState}}),this._mse_controller.isManagedMediaSource()?(c.disableRemotePlayback=!0,c.srcObject=this._mse_controller.getObject()):c.src=this._mse_controller.getObjectURL()},b.prototype.detachMediaElement=function(){this._media_element&&(this._mse_controller.shutdown(),this._media_element.removeEventListener("loadedmetadata",this.e.onMediaLoadedMetadata),this._media_element.src="",this._media_element.removeAttribute("src"),this._media_element.srcObject=null,this._media_element.load(),this._media_element=null,this._mse_controller.revokeObjectURL()),this._mse_controller&&(this._mse_controller.destroy(),this._mse_controller=null)},b.prototype.load=function(){var c=this;if(!this._media_element)throw new K.a("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new K.a("load() has been called, please call unload() first!");this._has_pending_load||(!this._config.deferLoadAfterSourceOpen||this._mse_source_opened?(this._transmuxer=new x.a(this._media_data_source,this._config),this._transmuxer.on(k.a.INIT_SEGMENT,function(C,z){c._mse_controller.appendInitSegment(z)}),this._transmuxer.on(k.a.MEDIA_SEGMENT,function(C,z){c._mse_controller.appendMediaSegment(z),!c._config.isLive&&C==="video"&&z.data&&z.data.byteLength>0&&"info"in z&&c._seeking_handler.appendSyncPoints(z.info.syncPoints),c._loading_controller.notifyBufferedPositionChanged(z.info.endDts/1e3)}),this._transmuxer.on(k.a.LOADING_COMPLETE,function(){c._mse_controller.endOfStream(),c._emitter.emit(w.a.LOADING_COMPLETE)}),this._transmuxer.on(k.a.RECOVERED_EARLY_EOF,function(){c._emitter.emit(w.a.RECOVERED_EARLY_EOF)}),this._transmuxer.on(k.a.IO_ERROR,function(C,z){c._emitter.emit(w.a.ERROR,B.b.NETWORK_ERROR,C,z)}),this._transmuxer.on(k.a.DEMUX_ERROR,function(C,z){c._emitter.emit(w.a.ERROR,B.b.MEDIA_ERROR,C,z)}),this._transmuxer.on(k.a.MEDIA_INFO,function(C){c._media_info=C,c._emitter.emit(w.a.MEDIA_INFO,Object.assign({},C))}),this._transmuxer.on(k.a.STATISTICS_INFO,function(C){c._statistics_info=c._fillStatisticsInfo(C),c._emitter.emit(w.a.STATISTICS_INFO,Object.assign({},C))}),this._transmuxer.on(k.a.RECOMMEND_SEEKPOINT,function(C){c._media_element&&!c._config.accurateSeek&&c._seeking_handler.directSeek(C/1e3)}),this._transmuxer.on(k.a.METADATA_ARRIVED,function(C){c._emitter.emit(w.a.METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.SCRIPTDATA_ARRIVED,function(C){c._emitter.emit(w.a.SCRIPTDATA_ARRIVED,C)}),this._transmuxer.on(k.a.TIMED_ID3_METADATA_ARRIVED,function(C){c._emitter.emit(w.a.TIMED_ID3_METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,function(C){c._emitter.emit(w.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,function(C){c._emitter.emit(w.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.SMPTE2038_METADATA_ARRIVED,function(C){c._emitter.emit(w.a.SMPTE2038_METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.SCTE35_METADATA_ARRIVED,function(C){c._emitter.emit(w.a.SCTE35_METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.PES_PRIVATE_DATA_DESCRIPTOR,function(C){c._emitter.emit(w.a.PES_PRIVATE_DATA_DESCRIPTOR,C)}),this._transmuxer.on(k.a.PES_PRIVATE_DATA_ARRIVED,function(C){c._emitter.emit(w.a.PES_PRIVATE_DATA_ARRIVED,C)}),this._seeking_handler=new D(this._config,this._media_element,this._onRequiredUnbufferedSeek.bind(this)),this._loading_controller=new l(this._config,this._media_element,this._onRequestPauseTransmuxer.bind(this),this._onRequestResumeTransmuxer.bind(this)),this._startup_stall_jumper=new _(this._media_element,this._onRequestDirectSeek.bind(this)),this._config.isLive&&this._config.liveBufferLatencyChasing&&(this._live_latency_chaser=new d(this._config,this._media_element,this._onRequestDirectSeek.bind(this))),this._config.isLive&&this._config.liveSync&&(this._live_latency_synchronizer=new p(this._config,this._media_element)),this._media_element.readyState>0&&this._seeking_handler.directSeek(0),this._transmuxer.open()):this._has_pending_load=!0)},b.prototype.unload=function(){var c,C,z,ne,de,Te,ye,j,X;(c=this._media_element)===null||c===void 0||c.pause(),(C=this._live_latency_synchronizer)===null||C===void 0||C.destroy(),this._live_latency_synchronizer=null,(z=this._live_latency_chaser)===null||z===void 0||z.destroy(),this._live_latency_chaser=null,(ne=this._startup_stall_jumper)===null||ne===void 0||ne.destroy(),this._startup_stall_jumper=null,(de=this._loading_controller)===null||de===void 0||de.destroy(),this._loading_controller=null,(Te=this._seeking_handler)===null||Te===void 0||Te.destroy(),this._seeking_handler=null,(ye=this._mse_controller)===null||ye===void 0||ye.flush(),(j=this._transmuxer)===null||j===void 0||j.close(),(X=this._transmuxer)===null||X===void 0||X.destroy(),this._transmuxer=null},b.prototype.play=function(){return this._media_element.play()},b.prototype.pause=function(){this._media_element.pause()},b.prototype.seek=function(c){this._media_element&&this._seeking_handler?this._seeking_handler.seek(c):this._pending_seek_time=c},Object.defineProperty(b.prototype,"mediaInfo",{get:function(){return Object.assign({},this._media_info)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"statisticsInfo",{get:function(){return Object.assign({},this._statistics_info)},enumerable:!1,configurable:!0}),b.prototype._onMSESourceOpen=function(){this._mse_source_opened=!0,this._has_pending_load&&(this._has_pending_load=!1,this.load())},b.prototype._onMSEUpdateEnd=function(){this._config.isLive&&this._config.liveBufferLatencyChasing&&this._live_latency_chaser&&this._live_latency_chaser.notifyBufferedRangeUpdate(),this._loading_controller.notifyBufferedPositionChanged()},b.prototype._onMSEBufferFull=function(){T.a.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._loading_controller.suspendTransmuxer()},b.prototype._onMSEError=function(c){this._emitter.emit(w.a.ERROR,B.b.MEDIA_ERROR,B.a.MEDIA_MSE_ERROR,c)},b.prototype._onMSEStartStreaming=function(){this._loaded_metadata_received&&(this._config.isLive||(T.a.v(this.TAG,"Resume transmuxing task due to ManagedMediaSource onStartStreaming"),this._loading_controller.resumeTransmuxer()))},b.prototype._onMSEEndStreaming=function(){this._config.isLive||(T.a.v(this.TAG,"Suspend transmuxing task due to ManagedMediaSource onEndStreaming"),this._loading_controller.suspendTransmuxer())},b.prototype._onMediaLoadedMetadata=function(c){this._loaded_metadata_received=!0,this._pending_seek_time!=null&&(this._seeking_handler.seek(this._pending_seek_time),this._pending_seek_time=null)},b.prototype._onRequestDirectSeek=function(c){this._seeking_handler.directSeek(c)},b.prototype._onRequiredUnbufferedSeek=function(c){this._mse_controller.flush(),this._transmuxer.seek(c)},b.prototype._onRequestPauseTransmuxer=function(){this._transmuxer.pause()},b.prototype._onRequestResumeTransmuxer=function(){this._transmuxer.resume()},b.prototype._fillStatisticsInfo=function(c){if(c.playerType="MSEPlayer",!(this._media_element instanceof HTMLVideoElement))return c;var C=!0,z=0,ne=0;if(this._media_element.getVideoPlaybackQuality){var de=this._media_element.getVideoPlaybackQuality();z=de.totalVideoFrames,ne=de.droppedVideoFrames}else this._media_element.webkitDecodedFrameCount!=null?(z=this._media_element.webkitDecodedFrameCount,ne=this._media_element.webkitDroppedFrameCount):C=!1;return C&&(c.decodedFrames=z,c.droppedFrames=ne),c},b}(),J=O(18),G=O(8),Y=function(){function b(c,C){this.TAG="PlayerEngineDedicatedThread",this._emitter=new E,this._media_element=null,this._worker_destroying=!1,this._seeking_handler=null,this._loading_controller=null,this._startup_stall_jumper=null,this._live_latency_chaser=null,this._live_latency_synchronizer=null,this._pending_seek_time=null,this._media_info=null,this._statistics_info=null,this.e=null,this._media_data_source=c,this._config=y(),typeof C=="object"&&Object.assign(this._config,C),c.isLive===!0&&(this._config.isLive=!0),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this),onMediaLoadedMetadata:this._onMediaLoadedMetadata.bind(this),onMediaTimeUpdate:this._onMediaTimeUpdate.bind(this),onMediaReadyStateChanged:this._onMediaReadyStateChange.bind(this)},G.a.registerListener(this.e.onLoggingConfigChanged),this._worker=J(24,{all:!0}),this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",media_data_source:this._media_data_source,config:this._config}),this._worker.postMessage({cmd:"logging_config",logging_config:G.a.getConfig()})}return b.isSupported=function(){return!!self.Worker&&(!(!self.MediaSource||!("canConstructInDedicatedWorker"in self.MediaSource)||self.MediaSource.canConstructInDedicatedWorker!==!0)||!(!self.ManagedMediaSource||!("canConstructInDedicatedWorker"in self.ManagedMediaSource)||self.ManagedMediaSource.canConstructInDedicatedWorker!==!0))},b.prototype.destroy=function(){this._emitter.emit(w.a.DESTROYING),this.unload(),this.detachMediaElement(),this._worker_destroying=!0,this._worker.postMessage({cmd:"destroy"}),G.a.removeListener(this.e.onLoggingConfigChanged),this.e=null,this._media_data_source=null,this._emitter.removeAllListeners(),this._emitter=null},b.prototype.on=function(c,C){var z=this;this._emitter.addListener(c,C),c===w.a.MEDIA_INFO&&this._media_info?Promise.resolve().then(function(){return z._emitter.emit(w.a.MEDIA_INFO,z.mediaInfo)}):c==w.a.STATISTICS_INFO&&this._statistics_info&&Promise.resolve().then(function(){return z._emitter.emit(w.a.STATISTICS_INFO,z.statisticsInfo)})},b.prototype.off=function(c,C){this._emitter.removeListener(c,C)},b.prototype.attachMediaElement=function(c){this._media_element=c,this._media_element.src="",this._media_element.removeAttribute("src"),this._media_element.srcObject=null,this._media_element.load(),this._media_element.addEventListener("loadedmetadata",this.e.onMediaLoadedMetadata),this._media_element.addEventListener("timeupdate",this.e.onMediaTimeUpdate),this._media_element.addEventListener("readystatechange",this.e.onMediaReadyStateChanged),this._worker.postMessage({cmd:"initialize_mse"})},b.prototype.detachMediaElement=function(){this._worker.postMessage({cmd:"shutdown_mse"}),this._media_element&&(this._media_element.removeEventListener("loadedmetadata",this.e.onMediaLoadedMetadata),this._media_element.removeEventListener("timeupdate",this.e.onMediaTimeUpdate),this._media_element.removeEventListener("readystatechange",this.e.onMediaReadyStateChanged),this._media_element.src="",this._media_element.removeAttribute("src"),this._media_element.srcObject=null,this._media_element.load(),this._media_element=null)},b.prototype.load=function(){this._worker.postMessage({cmd:"load"}),this._seeking_handler=new D(this._config,this._media_element,this._onRequiredUnbufferedSeek.bind(this)),this._loading_controller=new l(this._config,this._media_element,this._onRequestPauseTransmuxer.bind(this),this._onRequestResumeTransmuxer.bind(this)),this._startup_stall_jumper=new _(this._media_element,this._onRequestDirectSeek.bind(this)),this._config.isLive&&this._config.liveBufferLatencyChasing&&(this._live_latency_chaser=new d(this._config,this._media_element,this._onRequestDirectSeek.bind(this))),this._config.isLive&&this._config.liveSync&&(this._live_latency_synchronizer=new p(this._config,this._media_element)),this._media_element.readyState>0&&this._seeking_handler.directSeek(0)},b.prototype.unload=function(){var c,C,z,ne,de,Te;(c=this._media_element)===null||c===void 0||c.pause(),this._worker.postMessage({cmd:"unload"}),(C=this._live_latency_synchronizer)===null||C===void 0||C.destroy(),this._live_latency_synchronizer=null,(z=this._live_latency_chaser)===null||z===void 0||z.destroy(),this._live_latency_chaser=null,(ne=this._startup_stall_jumper)===null||ne===void 0||ne.destroy(),this._startup_stall_jumper=null,(de=this._loading_controller)===null||de===void 0||de.destroy(),this._loading_controller=null,(Te=this._seeking_handler)===null||Te===void 0||Te.destroy(),this._seeking_handler=null},b.prototype.play=function(){return this._media_element.play()},b.prototype.pause=function(){this._media_element.pause()},b.prototype.seek=function(c){this._media_element&&this._seeking_handler?this._seeking_handler.seek(c):this._pending_seek_time=c},Object.defineProperty(b.prototype,"mediaInfo",{get:function(){return Object.assign({},this._media_info)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"statisticsInfo",{get:function(){return Object.assign({},this._statistics_info)},enumerable:!1,configurable:!0}),b.prototype._onLoggingConfigChanged=function(c){var C;(C=this._worker)===null||C===void 0||C.postMessage({cmd:"logging_config",logging_config:c})},b.prototype._onMSEUpdateEnd=function(){this._config.isLive&&this._config.liveBufferLatencyChasing&&this._live_latency_chaser&&this._live_latency_chaser.notifyBufferedRangeUpdate(),this._loading_controller.notifyBufferedPositionChanged()},b.prototype._onMSEBufferFull=function(){T.a.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._loading_controller.suspendTransmuxer()},b.prototype._onMediaLoadedMetadata=function(c){this._pending_seek_time!=null&&(this._seeking_handler.seek(this._pending_seek_time),this._pending_seek_time=null)},b.prototype._onRequestDirectSeek=function(c){this._seeking_handler.directSeek(c)},b.prototype._onRequiredUnbufferedSeek=function(c){this._worker.postMessage({cmd:"unbuffered_seek",milliseconds:c})},b.prototype._onRequestPauseTransmuxer=function(){this._worker.postMessage({cmd:"pause_transmuxer"})},b.prototype._onRequestResumeTransmuxer=function(){this._worker.postMessage({cmd:"resume_transmuxer"})},b.prototype._onMediaTimeUpdate=function(c){this._worker.postMessage({cmd:"timeupdate",current_time:c.target.currentTime})},b.prototype._onMediaReadyStateChange=function(c){this._worker.postMessage({cmd:"readystatechange",ready_state:c.target.readyState})},b.prototype._onWorkerMessage=function(c){var C,z=c.data,ne=z.msg;if(ne=="destroyed"||this._worker_destroying)return this._worker_destroying=!1,(C=this._worker)===null||C===void 0||C.terminate(),void(this._worker=null);switch(ne){case"mse_init":var de=z;"ManagedMediaSource"in self&&!("MediaSource"in self)&&(this._media_element.disableRemotePlayback=!0),this._media_element.srcObject=de.handle;break;case"mse_event":(de=z).event==U.a.UPDATE_END?this._onMSEUpdateEnd():de.event==U.a.BUFFER_FULL&&this._onMSEBufferFull();break;case"transmuxing_event":if((de=z).event==k.a.MEDIA_INFO){var Te=z;this._media_info=Te.info,this._emitter.emit(w.a.MEDIA_INFO,Object.assign({},Te.info))}else if(de.event==k.a.STATISTICS_INFO){var ye=z;this._statistics_info=this._fillStatisticsInfo(ye.info),this._emitter.emit(w.a.STATISTICS_INFO,Object.assign({},ye.info))}else if(de.event==k.a.RECOMMEND_SEEKPOINT){var j=z;this._media_element&&!this._config.accurateSeek&&this._seeking_handler.directSeek(j.milliseconds/1e3)}break;case"player_event":if((de=z).event==w.a.ERROR){var X=z;this._emitter.emit(w.a.ERROR,X.error_type,X.error_detail,X.info)}else if("extraData"in de){var ie=z;this._emitter.emit(ie.event,ie.extraData)}break;case"logcat_callback":de=z,T.a.emitter.emit("log",de.type,de.logcat);break;case"buffered_position_changed":de=z,this._loading_controller.notifyBufferedPositionChanged(de.buffered_position_milliseconds/1e3)}},b.prototype._fillStatisticsInfo=function(c){if(c.playerType="MSEPlayer",!(this._media_element instanceof HTMLVideoElement))return c;var C=!0,z=0,ne=0;if(this._media_element.getVideoPlaybackQuality){var de=this._media_element.getVideoPlaybackQuality();z=de.totalVideoFrames,ne=de.droppedVideoFrames}else this._media_element.webkitDecodedFrameCount!=null?(z=this._media_element.webkitDecodedFrameCount,ne=this._media_element.webkitDroppedFrameCount):C=!1;return C&&(c.decodedFrames=z,c.droppedFrames=ne),c},b}(),oe=function(){function b(c,C){this.TAG="MSEPlayer",this._type="MSEPlayer",this._media_element=null,this._player_engine=null;var z=c.type.toLowerCase();if(z!=="mse"&&z!=="mpegts"&&z!=="m2ts"&&z!=="flv")throw new K.b("MSEPlayer requires an mpegts/m2ts/flv MediaDataSource input!");if(C&&C.enableWorkerForMSE&&Y.isSupported())try{this._player_engine=new Y(c,C)}catch(ne){T.a.e(this.TAG,"Error while initializing PlayerEngineDedicatedThread, fallback to PlayerEngineMainThread"),this._player_engine=new V(c,C)}else this._player_engine=new V(c,C)}return b.prototype.destroy=function(){this._player_engine.destroy(),this._player_engine=null,this._media_element=null},b.prototype.on=function(c,C){this._player_engine.on(c,C)},b.prototype.off=function(c,C){this._player_engine.off(c,C)},b.prototype.attachMediaElement=function(c){this._media_element=c,this._player_engine.attachMediaElement(c)},b.prototype.detachMediaElement=function(){this._media_element=null,this._player_engine.detachMediaElement()},b.prototype.load=function(){this._player_engine.load()},b.prototype.unload=function(){this._player_engine.unload()},b.prototype.play=function(){return this._player_engine.play()},b.prototype.pause=function(){this._player_engine.pause()},Object.defineProperty(b.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"buffered",{get:function(){return this._media_element.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"duration",{get:function(){return this._media_element.duration},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"volume",{get:function(){return this._media_element.volume},set:function(c){this._media_element.volume=c},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"muted",{get:function(){return this._media_element.muted},set:function(c){this._media_element.muted=c},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"currentTime",{get:function(){return this._media_element?this._media_element.currentTime:0},set:function(c){this._player_engine.seek(c)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"mediaInfo",{get:function(){return this._player_engine.mediaInfo},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"statisticsInfo",{get:function(){return this._player_engine.statisticsInfo},enumerable:!1,configurable:!0}),b}(),Ee=function(){function b(c,C){this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new L.a,this._config=y(),typeof C=="object"&&Object.assign(this._config,C);var z=c.type.toLowerCase();if(z==="mse"||z==="mpegts"||z==="m2ts"||z==="flv")throw new K.b("NativePlayer does't support mse/mpegts/m2ts/flv MediaDataSource input!");if(c.hasOwnProperty("segments"))throw new K.b("NativePlayer(".concat(c.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=c,this._mediaElement=null}return b.prototype.destroy=function(){this._emitter.emit(w.a.DESTROYING),this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},b.prototype.on=function(c,C){var z=this;c===w.a.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){z._emitter.emit(w.a.MEDIA_INFO,z.mediaInfo)}):c===w.a.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){z._emitter.emit(w.a.STATISTICS_INFO,z.statisticsInfo)}),this._emitter.addListener(c,C)},b.prototype.off=function(c,C){this._emitter.removeListener(c,C)},b.prototype.attachMediaElement=function(c){if(this._mediaElement=c,c.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{c.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(C){}},b.prototype.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},b.prototype.load=function(){if(!this._mediaElement)throw new K.a("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},b.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},b.prototype.play=function(){return this._mediaElement.play()},b.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(b.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(c){this._mediaElement.volume=c},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(c){this._mediaElement.muted=c},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(c){this._mediaElement?this._mediaElement.currentTime=c:this._pendingSeekTime=c},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"mediaInfo",{get:function(){var c={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(c.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(c.width=this._mediaElement.videoWidth,c.height=this._mediaElement.videoHeight)),c},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"statisticsInfo",{get:function(){var c={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return c;var C=!0,z=0,ne=0;if(this._mediaElement.getVideoPlaybackQuality){var de=this._mediaElement.getVideoPlaybackQuality();z=de.totalVideoFrames,ne=de.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(z=this._mediaElement.webkitDecodedFrameCount,ne=this._mediaElement.webkitDroppedFrameCount):C=!1;return C&&(c.decodedFrames=z,c.droppedFrames=ne),c},enumerable:!1,configurable:!0}),b.prototype._onvLoadedMetadata=function(c){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(w.a.MEDIA_INFO,this.mediaInfo)},b.prototype._reportStatisticsInfo=function(){this._emitter.emit(w.a.STATISTICS_INFO,this.statisticsInfo)},b}();F.a.install();var _e={createPlayer:function(b,c){var C=b;if(C==null||typeof C!="object")throw new K.b("MediaDataSource must be an javascript object!");if(!C.hasOwnProperty("type"))throw new K.b("MediaDataSource must has type field to indicate video file type!");switch(C.type){case"mse":case"mpegts":case"m2ts":case"flv":return new oe(C,c);default:return new Ee(C,c)}},isSupported:function(){return v.supportMSEH264Playback()},getFeatureList:function(){return v.getFeatureList()}};_e.BaseLoader=g.a,_e.LoaderStatus=g.c,_e.LoaderErrors=g.b,_e.Events=w.a,_e.ErrorTypes=B.b,_e.ErrorDetails=B.a,_e.MSEPlayer=oe,_e.NativePlayer=Ee,_e.LoggingControl=G.a,Object.defineProperty(_e,"version",{enumerable:!0,get:function(){return"1.8.0"}}),te.default=_e}])})}(st)),st.exports}var Ti=Ri();const ki=ii(Ti);var Li=oi("<span>");const Fi=()=>{var w,x,U;const{pathname:$e,searchParams:ot}=ai(),{proxyLink:me}=ni(),te=ri();let O=Ge.objs.filter(B=>B.type===mi.VIDEO);O.length===0&&(O=[Ge.obj]);const F=()=>{const B=O.findIndex(K=>K.name===Ge.obj.name);B<O.length-1&&te(Rt(Tt(location.pathname),O[B+1].name)+"?auto_fullscreen="+f.fullscreen)},M=()=>{const B=O.findIndex(K=>K.name===Ge.obj.name);B>0&&te(Rt(Tt(location.pathname),O[B-1].name)+"?auto_fullscreen="+f.fullscreen)};let f,y,v,g={id:$e(),container:"#video-player",url:Ge.raw_url,title:Ge.obj.name,volume:.5,autoplay:pi("video_autoplay"),autoSize:!1,autoMini:!0,loop:!1,flip:!0,playbackRate:!0,aspectRatio:!0,screenshot:!0,setting:!0,hotkey:!0,pip:!0,mutex:!0,fullscreen:!0,fullscreenWeb:!0,subtitleOffset:!0,miniProgressBar:!1,playsInline:!0,theme:si(),controls:[{name:"previous-button",index:10,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-prev-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path><path d="M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Previous",click:function(){M()}},{name:"next-button",index:11,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-next-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M2 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path><path d="M13 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Next",click:function(){F()}}],quality:[],plugins:[yi],whitelist:[],settings:[],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0,crossOrigin:"anonymous"},type:Je(Ge.obj.name),customType:{flv:function(B,K){y=ki.createPlayer({type:"flv",url:K},{referrerPolicy:"same-origin"}),y.attachMediaElement(B),y.load()},m3u8:function(B,K){v=new Ei,v.loadSource(K),v.attachMedia(B),B.src||(B.src=K)}},lang:["en","zh-cn","zh-tw"].includes(At().toLowerCase())?At().toLowerCase():"en",lock:!0,fastForward:!0,autoPlayback:!0,autoOrientation:!0,airplay:!0};const T=Ge.related.filter(B=>{for(const K of[".srt",".ass",".vtt"])if(B.name.endsWith(K))return!0;return!1}),E=Ge.related.find(B=>{for(const K of[".xml"])if(B.name.endsWith(K))return!0;return!1});if(T.length!=0){let B=function(W){switch(K?"ass":"webvtt"){case"ass":f.subtitle.show=!1,f.emit("artplayer-plugin-ass:visible",W);break;case"webvtt":default:f.subtitle.show=W,f.emit("artplayer-plugin-ass:visible",!1);break}},K=!1;const k=T[0];Je(k.name).toLowerCase()==="ass"?(K=!0,(w=g.plugins)==null||w.push(bi({subUrl:me(k,!0)}))):g.subtitle={url:me(k,!0),type:Je(k.name),escape:!1};const q=[{id:"setting_subtitle_display",html:"Display",tooltip:"Show",switch:!0,onSwitch:function(W){var l;W.tooltip=W.switch?"Hide":"Show",B(!W.switch);const D=(l=g.settings)==null?void 0:l.find(_=>_.id==="setting_subtitle");return D&&(D.tooltip=W.tooltip),!W.switch}}];T.forEach((W,D)=>{q.push({default:D===0,html:(()=>{var l=Li();return l.style.setProperty("max-width","200px"),l.style.setProperty("overflow","hidden"),l.style.setProperty("text-overflow","ellipsis"),l.style.setProperty("word-break","break-all"),l.style.setProperty("white-space","normal"),l.style.setProperty("display","-webkit-box"),l.style.setProperty("-webkit-line-clamp","2"),l.style.setProperty("-webkit-box-orient","vertical"),l.style.setProperty("font-size","12px"),di(l,()=>W.name),_i(()=>li(l,"title",W.name)),l})(),name:W.name,url:me(W,!0)})}),(x=g.settings)==null||x.push({id:"setting_subtitle",html:"Subtitle",tooltip:"Show",icon:gi({size:24}),selector:q,onSelect:function(W){var l,_;Je(W.name).toLowerCase()==="ass"?(K=!0,this.emit("artplayer-plugin-ass:switch",W.url),B(!0)):(K=!1,this.subtitle.switch(W.url,{name:W.name}),this.once("subtitleLoad",B.bind(this,!0)));const D=q.find(d=>d.id==="setting_subtitle_display");return D&&!D.switch&&((_=(l=D.$html)==null?void 0:l.click)==null||_.call(l)),D==null?void 0:D.tooltip}})}E&&((U=g.plugins)==null||U.push(Ai({danmuku:me(E,!0),speed:5,opacity:1,fontSize:25,color:"#FFFFFF",mode:0,margin:[0,"0%"],antiOverlap:!1,synchronousPlayback:!1,lockTime:5,maxLength:100,theme:"dark",heatmap:!0}))),ci(()=>{f=new Si(g);let B;switch(ot.auto_fullscreen){case"true":B=!0;case"false":B=!1;default:B=!1}f.on("ready",()=>{f.fullscreen=B}),f.on("video:ended",()=>{L()&&F()}),f.on("error",()=>{f.video.crossOrigin&&(console.log("Error detected. Trying to remove Cross-Origin attribute. Screenshot may not be available."),f.video.crossOrigin=null)})}),ui(()=>{f&&f.video&&(f.video.src=""),f==null||f.destroy(),y==null||y.destroy(),v==null||v.destroy()});const[L,I]=hi();return Et(vi,{onAutoNextChange:I,get children(){return Et(fi,{w:"$full",h:"60vh",id:"video-player"})}})};export{Fi as default};