mixdashboards 1.0.77 → 1.0.78

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 (331) hide show
  1. package/dist/{BaseComponent-DtvXBQYf.js → BaseComponent-Dwhb9Mde.js} +3 -3
  2. package/dist/{BaseComponent-B5ivgb3E.cjs → BaseComponent-bzb58Hhs.cjs} +1 -1
  3. package/dist/{EChartComponentBase-c7NzErOu.js → EChartComponentBase-BmS2KONN.js} +2 -2
  4. package/dist/{EChartComponentBase-ChoVZ7wg.cjs → EChartComponentBase-CMN_pOMr.cjs} +1 -1
  5. package/dist/{EmergencyPlanPanel-DG23L1EJ.cjs → EmergencyPlanPanel-CVusdpDo.cjs} +1 -1
  6. package/dist/{EmergencyPlanPanel-COfHeuTK.js → EmergencyPlanPanel-FtvC-aXY.js} +1 -1
  7. package/dist/{HistoryPlanDialog-d5ocUKAB.cjs → HistoryPlanDialog-CrYylrTC.cjs} +1 -1
  8. package/dist/{HistoryPlanDialog-CItsTCsk.js → HistoryPlanDialog-DliuSi0p.js} +1 -1
  9. package/dist/{MonitoringMap-H5AOAU8m.cjs → MonitoringMap-CBnv001f.cjs} +1 -1
  10. package/dist/{MonitoringMap-CGdqpp4N.js → MonitoringMap-DB3R5nAJ.js} +2 -2
  11. package/dist/{UniverSheet-tSAkLkuy.js → UniverSheet-DFyIjurx.js} +2 -2
  12. package/dist/{UniverSheet-BAwHvLEU.cjs → UniverSheet-jy9kOyPN.cjs} +1 -1
  13. package/dist/{accelerationChart-D69FGgF0.cjs → accelerationChart-Ceo371ch.cjs} +1 -1
  14. package/dist/{accelerationChart-4RM-T97n.js → accelerationChart-Q_Q_QlU7.js} +2 -2
  15. package/dist/{actionItem-XXesGERk.js → actionItem-BzMI_4-S.js} +2 -2
  16. package/dist/{actionItem-nkkG4T8t.cjs → actionItem-DB74CPi2.cjs} +1 -1
  17. package/dist/{alarmLevelChart-Cg4-8uhy.js → alarmLevelChart-Bp3SLCMe.js} +2 -2
  18. package/dist/{alarmLevelChart-DtzJLIO8.cjs → alarmLevelChart-CxmiBIKh.cjs} +1 -1
  19. package/dist/{alertTable-cpTXAjVG.cjs → alertTable-B1w_i0VB.cjs} +1 -1
  20. package/dist/{alertTable-_7uxXdg1.js → alertTable-DXzTm7mA.js} +2 -2
  21. package/dist/{aliasObjectSelectorDemo-COnsSHH1.cjs → aliasObjectSelectorDemo-CRuq8zju.cjs} +1 -1
  22. package/dist/{aliasObjectSelectorDemo-bgchdBQ0.js → aliasObjectSelectorDemo-Dfanalux.js} +1 -1
  23. package/dist/{annualRainfallChart-D5byp5kM.js → annualRainfallChart-D4Rhc84p.js} +2 -2
  24. package/dist/{annualRainfallChart-BRRuAOLJ.cjs → annualRainfallChart-DEeyac7q.cjs} +1 -1
  25. package/dist/{aqi-BkNZxokM.js → aqi-BzCTxj0q.js} +36 -28
  26. package/dist/{aqi-CbM96i-K.cjs → aqi-CBknBfTF.cjs} +2 -2
  27. package/dist/{aqiIndass-CC_FnBlK.js → aqiIndass-BJGsJsmz.js} +2 -2
  28. package/dist/{aqiIndass-UP1Ez_qA.cjs → aqiIndass-CUs24FxP.cjs} +1 -1
  29. package/dist/{areaDeformCurve-97gwWmiv.cjs → areaDeformCurve-B8VGdoKK.cjs} +1 -1
  30. package/dist/{areaDeformCurve-CoTcTIJx.js → areaDeformCurve-bSAkB3Pt.js} +2 -2
  31. package/dist/{arrayCard-lwGyTUyK.js → arrayCard-BkD5sytz.js} +2 -2
  32. package/dist/{arrayCard-CDs0w_2C.cjs → arrayCard-kh5WRweD.cjs} +1 -1
  33. package/dist/{audio-DwzGVHhN.js → audio-BTrvZwCy.js} +2 -2
  34. package/dist/{audio-DcGRfoFl.cjs → audio-DwJN2gca.cjs} +1 -1
  35. package/dist/{bar-DA7TDioF.js → bar-DYIb4143.js} +2 -2
  36. package/dist/{bar-Bh4Zupfj.cjs → bar-DsyyzcxB.cjs} +1 -1
  37. package/dist/{bmp-D7P6JPZ3.cjs → bmp-DbEyuBZw.cjs} +1 -1
  38. package/dist/{bmp-C-7PJc-e.js → bmp-Dt3mSkAr.js} +2 -2
  39. package/dist/{box-EScim_8s.cjs → box--u3HQFj9.cjs} +1 -1
  40. package/dist/{box-CabcDxmT.js → box-D7RsK5Qp.js} +2 -2
  41. package/dist/{chartConfigPanel-BOTXJEgB.js → chartConfigPanel-CD-csrX-.js} +1 -1
  42. package/dist/{chartConfigPanel-CGM3JLv0.cjs → chartConfigPanel-DybQRqg6.cjs} +1 -1
  43. package/dist/{circleBar-okrH5S9i.js → circleBar-4md65KCX.js} +2 -2
  44. package/dist/{circleBar-C3LcD2GM.cjs → circleBar-DJY37bwB.cjs} +1 -1
  45. package/dist/{clock-_0PzxcIr.js → clock-Cj0HsizY.js} +2 -2
  46. package/dist/{clock-B-MpqirO.cjs → clock-Dc9jgxHT.cjs} +1 -1
  47. package/dist/{clt-CmMR6xrj.cjs → clt-CBbtQxMc.cjs} +1 -1
  48. package/dist/{clt-B7Ro2RZ9.js → clt-uJT1jgHk.js} +2 -2
  49. package/dist/{cmc-CFz43gP5.cjs → cmc-CeTCKLBx.cjs} +1 -1
  50. package/dist/{cmc-UjkMrdkf.js → cmc-JJ6eTxB3.js} +2 -2
  51. package/dist/{cmp-B99dBC5D.cjs → cmp-CGZ_2BdE.cjs} +1 -1
  52. package/dist/{cmp-DAoGjmUK.js → cmp-D9qlHJoW.js} +2 -2
  53. package/dist/{conclusionCard-DfGfQa2i.js → conclusionCard-BsLeh3yq.js} +2 -2
  54. package/dist/{conclusionCard-BH6PfBmm.cjs → conclusionCard-CwLwj3zj.cjs} +1 -1
  55. package/dist/{controlList-Ch22lz5j.js → controlList-CYNS0ArB.js} +2 -2
  56. package/dist/{controlList-UzBZAUg8.cjs → controlList-l2ZYM6m5.cjs} +1 -1
  57. package/dist/{controlRecordList-DqVkxlxI.js → controlRecordList-BZmCvISO.js} +2 -2
  58. package/dist/{controlRecordList-CjaRe3iR.cjs → controlRecordList-N79_cTON.cjs} +1 -1
  59. package/dist/{controlRecordListAPP-DO9oXKbz.cjs → controlRecordListAPP-DOzMDV4x.cjs} +1 -1
  60. package/dist/{controlRecordListAPP-B4Agwftc.js → controlRecordListAPP-aDj520mp.js} +2 -2
  61. package/dist/{crd-Bf8jZALT.cjs → crd-CV4kMUTB.cjs} +1 -1
  62. package/dist/{crd-9hr2CpXs.js → crd-bm_BHuoV.js} +2 -2
  63. package/dist/{ctrBtn-DrNeLQd9.cjs → ctrBtn-Cs6ZmfyJ.cjs} +1 -1
  64. package/dist/{ctrBtn-Yfbw4Pt6.js → ctrBtn-DYceHTAq.js} +3 -3
  65. package/dist/{ctrSet-BI4qrXOp.js → ctrSet-B6PlTSBE.js} +3 -3
  66. package/dist/{ctrSet-Cw82MzYN.cjs → ctrSet-XqnGgYPn.cjs} +1 -1
  67. package/dist/{ctrSwitch-CyIBxuP0.cjs → ctrSwitch-B9lHJgQn.cjs} +1 -1
  68. package/dist/{ctrSwitch-CbrB82jp.js → ctrSwitch-E0FM_4f2.js} +3 -3
  69. package/dist/{dataManagement-8jLHO5b6.js → dataManagement-BAHa-OHl.js} +2 -2
  70. package/dist/{dataManagement-BANzNRgt.cjs → dataManagement-bKmkV2VY.cjs} +1 -1
  71. package/dist/{dataReport-BTY2YPkp.js → dataReport-B60Rb4sb.js} +2 -2
  72. package/dist/{dataReport-C6rqooz1.cjs → dataReport-JcrjpK_j.cjs} +1 -1
  73. package/dist/{dataTable-CT7O3vOj.js → dataTable-BmvewFlr.js} +1 -1
  74. package/dist/{dataTable-DK1bXW7L.cjs → dataTable-CX6uktOu.cjs} +1 -1
  75. package/dist/{datetime-Gc1JB409.cjs → datetime-BPM_lGiY.cjs} +1 -1
  76. package/dist/{datetime-BfpmpRWw.js → datetime-DARBbZJx.js} +2 -2
  77. package/dist/{deepClusterSlipSurface-CuPVV8T2.js → deepClusterSlipSurface-BF77Vp7G.js} +2 -2
  78. package/dist/{deepClusterSlipSurface-Do0cuafE.cjs → deepClusterSlipSurface-IywdiDlA.cjs} +1 -1
  79. package/dist/{deepDataMatrix-B2h-jr0-.js → deepDataMatrix--zgQoWer.js} +2 -2
  80. package/dist/{deepDataMatrix-eYmIiIMu.cjs → deepDataMatrix-sRXkGqdm.cjs} +1 -1
  81. package/dist/{deepDisplacement3D-Cc8f_nFC.cjs → deepDisplacement3D-BET8Ftuc.cjs} +1 -1
  82. package/dist/{deepDisplacement3D-DyF7L9GI.js → deepDisplacement3D-BYt49pzj.js} +2 -2
  83. package/dist/{deepDisplacementChart-BkgOiG2W.js → deepDisplacementChart-B2zPpsk6.js} +2 -2
  84. package/dist/{deepDisplacementChart-BUPlTFCA.js → deepDisplacementChart-BGBhipUx.js} +3 -3
  85. package/dist/{deepDisplacementChart-DVscdSYa.cjs → deepDisplacementChart-BuuM485C.cjs} +1 -1
  86. package/dist/{deepDisplacementChart-De935Ifi.cjs → deepDisplacementChart-D7loYUI5.cjs} +1 -1
  87. package/dist/{deepDisplacementView-C9P1cqRH.js → deepDisplacementView-Bwk9p_Qc.js} +1 -1
  88. package/dist/{deepDisplacementView-C3qEJa9Q.cjs → deepDisplacementView-CTBH3IxP.cjs} +1 -1
  89. package/dist/{deepNodeTemperatureChart-DePoeTnV.js → deepNodeTemperatureChart-BqTigCTs.js} +2 -2
  90. package/dist/{deepNodeTemperatureChart-DLzI-lAv.cjs → deepNodeTemperatureChart-CTLHLf0w.cjs} +1 -1
  91. package/dist/{deepTangentAngleChart-D2SQkZEz.js → deepTangentAngleChart-5oxzMpMF.js} +2 -2
  92. package/dist/{deepTangentAngleChart-ClBLpr_-.cjs → deepTangentAngleChart-CHxB8OFL.cjs} +1 -1
  93. package/dist/{deepTemperatureField-B_rWuVyI.js → deepTemperatureField-Bhk89D3D.js} +3 -3
  94. package/dist/{deepTemperatureField-CUGWy_vS.cjs → deepTemperatureField-Cr6YbuR_.cjs} +1 -1
  95. package/dist/{deepTrendChart-C_e7Dgjz.js → deepTrendChart-CAbdVR8d.js} +2 -2
  96. package/dist/{deepTrendChart-BcrJBFqD.cjs → deepTrendChart-Ch94j4W9.cjs} +1 -1
  97. package/dist/{deviceOnlineStatus-C0SqKqjc.js → deviceOnlineStatus-C5ODwFsY.js} +2 -2
  98. package/dist/{deviceOnlineStatus-BZxCnz-5.cjs → deviceOnlineStatus-DxsTb4Vb.cjs} +1 -1
  99. package/dist/{deviceStatus-DClMreZ3.cjs → deviceStatus-CjFTpCaU.cjs} +1 -1
  100. package/dist/{deviceStatus-BPglOIKN.js → deviceStatus-DPfOQCSX.js} +2 -2
  101. package/dist/{displacementDataTable-C5172BMT.cjs → displacementDataTable-BIqBEkul.cjs} +1 -1
  102. package/dist/{displacementDataTable-9WH9Y3-l.js → displacementDataTable-DG36VWok.js} +2 -2
  103. package/dist/{displacementTrajectoryChart-DWGKAbMq.js → displacementTrajectoryChart-Cpmj24Jn.js} +2 -2
  104. package/dist/{displacementTrajectoryChart-C-pchT8b.cjs → displacementTrajectoryChart-DRltcPfa.cjs} +1 -1
  105. package/dist/{displacementTrendChart-D4keOUDg.js → displacementTrendChart-D1yfRFQb.js} +2 -2
  106. package/dist/{displacementTrendChart-B8Em-Apt.cjs → displacementTrendChart-DpD79zii.cjs} +1 -1
  107. package/dist/{dxf-CRFblr-a.cjs → dxf-C_9cH0WU.cjs} +1 -1
  108. package/dist/{dxf-BV56d_m8.js → dxf-zbCakRgh.js} +2 -2
  109. package/dist/dzc-CejqHneE.cjs +2 -0
  110. package/dist/{dzc-FZBGaYTk.js → dzc-CfPVaIgj.js} +46 -38
  111. package/dist/{emergencyPlan-CbFUPUf9.js → emergencyPlan-LbeRH-P9.js} +3 -3
  112. package/dist/{emergencyPlan-D5YlhQNC.cjs → emergencyPlan-dEwML5xC.cjs} +1 -1
  113. package/dist/{evn-ty-ACnv0.cjs → evn-BvgQ3o3T.cjs} +1 -1
  114. package/dist/{evn-DMrhD8U9.js → evn-DsD_MKQd.js} +2 -2
  115. package/dist/{evolutionChart-Cg3jN_vy.js → evolutionChart-B4C9qB3I.js} +3 -3
  116. package/dist/{evolutionChart-C6E2yiqG.cjs → evolutionChart-Dt5-xRsy.cjs} +1 -1
  117. package/dist/{fileViewer-D3UlJjIK.js → fileViewer-B0LdLy2P.js} +2 -2
  118. package/dist/{fileViewer-BqlO8FED.cjs → fileViewer-DZIREgL0.cjs} +1 -1
  119. package/dist/{filterBar-BWqpT6Ft.js → filterBar-Bt6w4_xK.js} +2 -2
  120. package/dist/{filterBar-x-zvXO4x.cjs → filterBar-D_jcuqwP.cjs} +1 -1
  121. package/dist/{fireCombustionCurve-CCsxFlpG.js → fireCombustionCurve-C2rWY89D.js} +3 -3
  122. package/dist/{fireCombustionCurve-BzvhUF4h.cjs → fireCombustionCurve-CHRd1nSv.cjs} +1 -1
  123. package/dist/{fireFilterBar-KU0l3oMk.js → fireFilterBar-CpwHRisZ.js} +2 -2
  124. package/dist/{fireFilterBar-BtMlwSl0.cjs → fireFilterBar-DX8qH1rr.cjs} +1 -1
  125. package/dist/{fireHistoryTable-GYC28vg2.cjs → fireHistoryTable-B38M6w5w.cjs} +1 -1
  126. package/dist/{fireHistoryTable-BqxPj5bh.js → fireHistoryTable-DcSgHt5q.js} +2 -2
  127. package/dist/{gag-CEsV2Rsa.js → gag-BErw_nsf.js} +2 -2
  128. package/dist/{gag-DnaEi2qS.cjs → gag-qDNPdFJu.cjs} +1 -1
  129. package/dist/{gasStationList-enI_qbTZ.js → gasStationList-BREZbC_k.js} +2 -2
  130. package/dist/{gasStationList-CSmyS9tt.cjs → gasStationList-NhJa4GO6.cjs} +1 -1
  131. package/dist/{geo3dViewer-Bi2I8qrS.cjs → geo3dViewer-D9uSt0up.cjs} +1 -1
  132. package/dist/{geo3dViewer-D3ZEH_sW.js → geo3dViewer-zAN1eIza.js} +3 -3
  133. package/dist/{glbModel-BcrfDRGx.cjs → glbModel-C4FiDMM5.cjs} +1 -1
  134. package/dist/{glbModel-Dz32VGsg.js → glbModel-i6HvK0m8.js} +2 -2
  135. package/dist/{globalObjectSelector-DPm_eXg_.js → globalObjectSelector-BrVwJEgp.js} +1 -1
  136. package/dist/{globalObjectSelector-CJrFL8ag.cjs → globalObjectSelector-CR74psMa.cjs} +1 -1
  137. package/dist/{gnssFilterBar-klba1QZm.js → gnssFilterBar-BEHXIIKI.js} +2 -2
  138. package/dist/{gnssFilterBar-DzHsXBPj.cjs → gnssFilterBar-BkfBQWXF.cjs} +1 -1
  139. package/dist/{gnssHistoryTable-BmWSzo4U.cjs → gnssHistoryTable-CQ-7ESYj.cjs} +1 -1
  140. package/dist/{gnssHistoryTable-Cp3pIekL.js → gnssHistoryTable-DDWGE_ge.js} +2 -2
  141. package/dist/{gnssMapView-BV9rsiDD.js → gnssMapView-C9iRAzym.js} +4 -4
  142. package/dist/{gnssMapView-BaZlzP_f.cjs → gnssMapView-P6ed3l_W.cjs} +2 -2
  143. package/dist/{gnssSectionProfile-CArri0j5.js → gnssSectionProfile-BIqyABEf.js} +2 -2
  144. package/dist/{gnssSectionProfile-D02MfJcd.cjs → gnssSectionProfile-CIZnF7VA.cjs} +1 -1
  145. package/dist/{gnssTimeSeriesChart-fZYtdBrL.cjs → gnssTimeSeriesChart-BgIM5U-H.cjs} +1 -1
  146. package/dist/{gnssTimeSeriesChart-C3VtICJV.js → gnssTimeSeriesChart-DqH9JFBF.js} +2 -2
  147. package/dist/{gnssXYTrajectory-ClbZljGY.js → gnssXYTrajectory-BviUjxG9.js} +2 -2
  148. package/dist/{gnssXYTrajectory-glpzGLHH.cjs → gnssXYTrajectory-CH8864n6.cjs} +1 -1
  149. package/dist/{grd-DAPxN3Yv.cjs → grd-BhpBxrpa.cjs} +1 -1
  150. package/dist/{grd-DFbgrJiz.js → grd-DfkGlcW6.js} +2 -2
  151. package/dist/{grdIndass-CdReMrRF.js → grdIndass-ByznFwzc.js} +2 -2
  152. package/dist/{grdIndass-CRYPP8ap.cjs → grdIndass-DhMfHz31.cjs} +1 -1
  153. package/dist/{grg-BuxeFXkW.js → grg-CVBoetQY.js} +2 -2
  154. package/dist/{grg-DBj_IXUS.cjs → grg-uzBlEm_K.cjs} +1 -1
  155. package/dist/{gridview-DMqISEIm.cjs → gridview-CyXCqWKq.cjs} +1 -1
  156. package/dist/{gridview-ieOKw-zp.js → gridview-Dt3i1t5d.js} +2 -2
  157. package/dist/{groundwaterFilterBar-CMrXUaJD.js → groundwaterFilterBar-BbS81e9a.js} +2 -2
  158. package/dist/{groundwaterFilterBar-DTjCop4R.cjs → groundwaterFilterBar-C4xCPqa_.cjs} +1 -1
  159. package/dist/{groundwaterProfileChart-wwZ31Nxz.js → groundwaterProfileChart-BBPFrt5W.js} +3 -3
  160. package/dist/{groundwaterProfileChart-CHFMvxM0.cjs → groundwaterProfileChart-DvjFvCm5.cjs} +2 -2
  161. package/dist/{groundwaterTimeCurve-CL7EWs-M.js → groundwaterTimeCurve-CKlvc2nQ.js} +3 -3
  162. package/dist/{groundwaterTimeCurve-DzTolxJ6.cjs → groundwaterTimeCurve-Cb3xlM78.cjs} +1 -1
  163. package/dist/{groupCard-3iWG0sN3.js → groupCard-BBzDl9uX.js} +2 -2
  164. package/dist/{groupCard-CdPis-TL.cjs → groupCard-BVdjzdqF.cjs} +1 -1
  165. package/dist/{headerBar-DVP5Ob99.cjs → headerBar-B5Z8UviF.cjs} +1 -1
  166. package/dist/{headerBar-BVa2ewi0.js → headerBar-Dty08mHR.js} +2 -2
  167. package/dist/{history-CZCtaT0D.js → history-TkSKA8F1.js} +1 -1
  168. package/dist/{history-CVMvhgUJ.cjs → history-yI8XiwXi.cjs} +1 -1
  169. package/dist/{index-DYr57ceS.cjs → index-6QhTSPkL.cjs} +10 -10
  170. package/dist/{index-BueGUjcH.js → index-YNdVib_6.js} +1260 -1265
  171. package/dist/{insarDeformChart-vPREnzjC.js → insarDeformChart-C9UkWIL9.js} +2 -2
  172. package/dist/{insarDeformChart-CVrCLtcb.cjs → insarDeformChart-Dr9Ve1vY.cjs} +1 -1
  173. package/dist/{insarImageViewer-C0D9bkS3.cjs → insarImageViewer-DAKBn2vV.cjs} +1 -1
  174. package/dist/{insarImageViewer-DsNoAsNI.js → insarImageViewer-DZbq2xch.js} +2 -2
  175. package/dist/{kds-C6tBi9fO.cjs → kds-BkH8cJCu.cjs} +1 -1
  176. package/dist/{kds-DUdtTddq.js → kds-__I8-o5i.js} +2 -2
  177. package/dist/{kpiCard-A_7vB_FS.js → kpiCard-BzuF0qdE.js} +2 -2
  178. package/dist/{kpiCard-Dfn9Utnc.cjs → kpiCard-fRfv1QPb.cjs} +1 -1
  179. package/dist/{landslideMap-DEYHn_Z8.js → landslideMap-D84pku4Y.js} +3 -3
  180. package/dist/{landslideMap-CjsBed2W.cjs → landslideMap-zD8SU2Lh.cjs} +1 -1
  181. package/dist/{landslideWarning-C2SVP_SW.js → landslideWarning-0mckvEoZ.js} +5 -5
  182. package/dist/{landslideWarning-9q-8-Yaf.cjs → landslideWarning-Cq-di-hN.cjs} +1 -1
  183. package/dist/{layerTabs-DpIpshzv.cjs → layerTabs-C2zq6a5M.cjs} +1 -1
  184. package/dist/{layerTabs-CkgVEQIu.js → layerTabs-COzqQ9mn.js} +2 -2
  185. package/dist/{leaflet-src-BV47Q4HI.js → leaflet-src-2tPn7QVH.js} +1 -1
  186. package/dist/{leaflet-src-DzRw1bMt.cjs → leaflet-src-D8MF2j44.cjs} +1 -1
  187. package/dist/{lerc-COLax3Js.js → lerc-BCmG0CMS.js} +2 -2
  188. package/dist/{lerc-BxPJ0Ezc.cjs → lerc-BHcVhBOn.cjs} +1 -1
  189. package/dist/{lin-BgNnturC.js → lin-CQ6TCBCr.js} +59 -51
  190. package/dist/{lin-0o_p8mvp.cjs → lin-niA_T9Ql.cjs} +2 -2
  191. package/dist/{linIndass-DqIczVZr.js → linIndass-J9rdji6E.js} +2 -2
  192. package/dist/{linIndass-DCnHejlJ.cjs → linIndass-nZx16Vos.cjs} +1 -1
  193. package/dist/{lst-DVSrQxnF.cjs → lst-Cw1XCAv0.cjs} +1 -1
  194. package/dist/{lst-pzZFRLE7.js → lst-DieyrYCh.js} +2 -2
  195. package/dist/{manualEntry-CU7C50JU.js → manualEntry-CCmyPMJm.js} +2 -2
  196. package/dist/{manualEntry-COjFNu6s.cjs → manualEntry-ChhTpAF2.cjs} +1 -1
  197. package/dist/{mapBackground-ssUjWKfZ.cjs → mapBackground-BzOdjhnZ.cjs} +1 -1
  198. package/dist/{mapBackground-Bi8yjPRE.js → mapBackground-CiiG2nHi.js} +3 -3
  199. package/dist/{mappingList-BRndtYHP.js → mappingList-CoBD8D27.js} +2 -2
  200. package/dist/{mappingList-Cryu-iab.cjs → mappingList-D42mILiq.cjs} +1 -1
  201. package/dist/{markdownViewer-i0a6mIv1.js → markdownViewer-C3HUXDvf.js} +2 -2
  202. package/dist/{markdownViewer-Dn2PQ9LA.cjs → markdownViewer-DHs9ekCh.cjs} +1 -1
  203. package/dist/{mix-control-modal-CHglSLUZ.js → mix-control-modal-BEwriuWS.js} +1 -1
  204. package/dist/{mix-control-modal-CicQq7ai.cjs → mix-control-modal-DGd2S6Jd.cjs} +1 -1
  205. package/dist/{mixGrid-CJfUwclp.js → mixGrid-CBenxHD_.js} +2 -2
  206. package/dist/{mixGrid-CHyP3WlY.cjs → mixGrid-Cnq99D09.cjs} +1 -1
  207. package/dist/mixdashboards.cjs +1 -1
  208. package/dist/mixdashboards.css +1 -1
  209. package/dist/mixdashboards.js +1 -1
  210. package/dist/{mixiotObjectListApi-BzhGWfpb.js → mixiotObjectListApi-CKJLXcnf.js} +1 -1
  211. package/dist/{mixiotObjectListApi-D8aEu-tS.cjs → mixiotObjectListApi-e1qL7PHh.cjs} +1 -1
  212. package/dist/{mjpegCamera-BltugLlx.js → mjpegCamera-D8lB701i.js} +2 -2
  213. package/dist/{mjpegCamera-DNETbJj6.cjs → mjpegCamera-DDFrZo-x.cjs} +1 -1
  214. package/dist/{monitorAlert-B0e6NlDC.cjs → monitorAlert-C-mo-lDe.cjs} +1 -1
  215. package/dist/{monitorAlert-BZt1nTav.js → monitorAlert-Z1dFDfPh.js} +2 -2
  216. package/dist/{monitorData-BN6f9iMG.cjs → monitorData-CNRfV5Wt.cjs} +1 -1
  217. package/dist/{monitorData-Bj-yPQyW.js → monitorData-DZhO9Gos.js} +2 -2
  218. package/dist/{monitorSpeedChart-DPUyFmKD.js → monitorSpeedChart-C5pN46lO.js} +1 -1
  219. package/dist/{monitorSpeedChart-B3VWNas7.cjs → monitorSpeedChart-DrRdMdGD.cjs} +1 -1
  220. package/dist/{mxa-pTWhgscr.js → mxa-BFQ70ksk.js} +39 -31
  221. package/dist/mxa-COpw24fq.cjs +2 -0
  222. package/dist/{myValue-Dyyv7mp6.js → myValue-Dosl4Ro5.js} +2 -2
  223. package/dist/{myValue-K9yzWHVv.cjs → myValue-Eb3asTOC.cjs} +1 -1
  224. package/dist/{myValueList-BrL41hIy.js → myValueList-Dkc10vr6.js} +2 -2
  225. package/dist/{myValueList-BF88xTbG.cjs → myValueList-mcqRZanE.cjs} +1 -1
  226. package/dist/{objectList-D1wulpL0.cjs → objectList-D4owr3ED.cjs} +1 -1
  227. package/dist/{objectList-DqUaLWIN.js → objectList-FWkZ6PAs.js} +3 -3
  228. package/dist/{objectListAPP-BJI-LZ9h.cjs → objectListAPP-Bzevu1od.cjs} +1 -1
  229. package/dist/{objectListAPP-68pa8xQ3.js → objectListAPP-CdfeZTgm.js} +3 -3
  230. package/dist/{photo-D2G-MiYd.cjs → photo-Dmxxqgrg.cjs} +1 -1
  231. package/dist/{photo-CqtG1ZDn.js → photo-DxXTYq73.js} +2 -2
  232. package/dist/pie-BxpiCEYe.cjs +2 -0
  233. package/dist/{pie-rodX5eBx.js → pie-COixdWUz.js} +85 -75
  234. package/dist/{placeholder-C2uw4-Bv.js → placeholder-CLLNLxRC.js} +1 -1
  235. package/dist/{placeholder-yXuUcCld.cjs → placeholder-Ole-Or58.cjs} +1 -1
  236. package/dist/{pressBtn-CkKRECXu.js → pressBtn-C7Y-B8Dz.js} +3 -3
  237. package/dist/{pressBtn-kIjSTK2P.cjs → pressBtn-DwKg9PbD.cjs} +1 -1
  238. package/dist/{processTable-pFBZ3sr0.js → processTable-CTkwZWWJ.js} +2 -2
  239. package/dist/{processTable-DVvTpite.cjs → processTable-DDcKkjJx.cjs} +1 -1
  240. package/dist/{progressBar-CE8Tat_F.cjs → progressBar-7qHg67Sf.cjs} +1 -1
  241. package/dist/{progressBar-CJXjo8T8.js → progressBar-9npgJ9jD.js} +2 -2
  242. package/dist/{progressCircle-jhxHU2LM.js → progressCircle-DP08TX08.js} +2 -2
  243. package/dist/{progressCircle-Cqjxopp0.cjs → progressCircle-Xgjnl1KF.cjs} +1 -1
  244. package/dist/{qrcode-COU9b8jO.js → qrcode-ClTSNzEN.js} +2 -2
  245. package/dist/{qrcode-ICKNQzlF.cjs → qrcode-D6wDMo-f.cjs} +1 -1
  246. package/dist/{raceBar-CpfkbT_l.cjs → raceBar-C8mVFHnd.cjs} +1 -1
  247. package/dist/{raceBar-DPZn5eQr.js → raceBar-CTmsN8VC.js} +2 -2
  248. package/dist/{rad-DYSDihyX.js → rad-DWCSD35t.js} +2 -2
  249. package/dist/{rad-MVqAl4DI.cjs → rad-Dxaakm82.cjs} +1 -1
  250. package/dist/{radarMapViewer-DSEst_zr.cjs → radarMapViewer-U7IQJjQs.cjs} +1 -1
  251. package/dist/{radarMapViewer-DT-cLDqj.js → radarMapViewer-eEBE3MS-.js} +2 -2
  252. package/dist/{rainfallFilterBar-BH4y-ZiG.js → rainfallFilterBar-DJTDGu7Z.js} +2 -2
  253. package/dist/{rainfallFilterBar-DBckf4TU.cjs → rainfallFilterBar-ow_wdOwq.cjs} +1 -1
  254. package/dist/{rainfallTimeCurve-BLPYjZne.cjs → rainfallTimeCurve-BL1I5Z2D.cjs} +1 -1
  255. package/dist/{rainfallTimeCurve-CEROEYQa.js → rainfallTimeCurve-CwGmJhxu.js} +3 -3
  256. package/dist/{rangeLin-CAWXiFqA.cjs → rangeLin-BEz9xapa.cjs} +1 -1
  257. package/dist/{rangeLin-D5m33pm3.js → rangeLin-BqcJpIva.js} +2 -2
  258. package/dist/{realtimeEvolutionMap-B_WyUQ7o.js → realtimeEvolutionMap-NOkyU7G3.js} +2 -2
  259. package/dist/{realtimeEvolutionMap-7YXQpGQV.cjs → realtimeEvolutionMap-mzXlR8gS.cjs} +1 -1
  260. package/dist/{regionBar-CRE0mrBK.cjs → regionBar-CEfz0Yol.cjs} +1 -1
  261. package/dist/{regionBar-BklMVV2U.js → regionBar-DDk-2UWS.js} +2 -2
  262. package/dist/{request-Bu96_fCa.js → request-BIXfJXjX.js} +1 -1
  263. package/dist/{request-C_dGr-al.cjs → request-BfG3yDz6.cjs} +1 -1
  264. package/dist/{retainer1-CSONW25j.cjs → retainer1-Ch1oZMeA.cjs} +1 -1
  265. package/dist/{retainer1-C9XjKFwo.js → retainer1-Cz5rXIJj.js} +3 -3
  266. package/dist/{retainer2-pxQIRn6B.cjs → retainer2-DJ1R2GJE.cjs} +1 -1
  267. package/dist/{retainer2-Nohg83dY.js → retainer2-DeelXgAZ.js} +3 -3
  268. package/dist/{retainerRecordList-B7mJ2EWt.cjs → retainerRecordList-D3MsCnqy.cjs} +1 -1
  269. package/dist/{retainerRecordList-D7ZTrf1N.js → retainerRecordList-DyhfjtfF.js} +2 -2
  270. package/dist/{retainerRecordListAPP-C5v2ahXJ.js → retainerRecordListAPP-3Gr7db3D.js} +2 -2
  271. package/dist/{retainerRecordListAPP-D-YaMhTT.cjs → retainerRecordListAPP-B_hCyRak.cjs} +1 -1
  272. package/dist/{ringTopN-CxZDBUkx.cjs → ringTopN-fLinQVwX.cjs} +1 -1
  273. package/dist/{ringTopN-n0TONMcf.js → ringTopN-t9xaVCWg.js} +2 -2
  274. package/dist/{riskRegionTable-CBddIShe.js → riskRegionTable-BThwQbTf.js} +2 -2
  275. package/dist/{riskRegionTable-Byb0Z693.cjs → riskRegionTable-CagcISBC.cjs} +1 -1
  276. package/dist/{sankey-BlIAPski.cjs → sankey-BY_nwThw.cjs} +1 -1
  277. package/dist/{sankey-D6XWVSSp.js → sankey-Bwm0omQr.js} +2 -2
  278. package/dist/{scd-CW_VLAdy.cjs → scd-Bs1dG1w8.cjs} +1 -1
  279. package/dist/{scd-B-DnzdLf.js → scd-DeYC1Rqx.js} +2 -2
  280. package/dist/{sideMenu-DCz3bw5f.cjs → sideMenu-CAEh3bwF.cjs} +1 -1
  281. package/dist/{sideMenu-B4NRCYfC.js → sideMenu-Db_Nc_xz.js} +2 -2
  282. package/dist/{slopeStability-C-vWRW5q.cjs → slopeStability-BWg6jhBB.cjs} +1 -1
  283. package/dist/{slopeStability-D5OmQDgi.js → slopeStability-CVC68Qcj.js} +2 -2
  284. package/dist/{speedCurve-tvLBjNoJ.js → speedCurve-CK4CXHeC.js} +2 -2
  285. package/dist/{speedCurve-D6uG-gFp.cjs → speedCurve-DNNEIz4o.cjs} +1 -1
  286. package/dist/{stressFilterBar-BQYqGIRB.cjs → stressFilterBar-Cigl3IyR.cjs} +1 -1
  287. package/dist/{stressFilterBar-aj-X6HC9.js → stressFilterBar-DQ8nq8jV.js} +2 -2
  288. package/dist/{stressTimeCurve-DC8cKQ52.js → stressTimeCurve-BEANw1F8.js} +3 -3
  289. package/dist/{stressTimeCurve-B0Gplbam.cjs → stressTimeCurve-BiduKfcg.cjs} +1 -1
  290. package/dist/{swiper-yrpsF9po.js → swiper-BgkvIN5U.js} +2 -2
  291. package/dist/{swiper-CDdx8LXl.cjs → swiper-MIRXMnxk.cjs} +1 -1
  292. package/dist/{terminalConfigList-VU0kGVKY.js → terminalConfigList-B3lqvQel.js} +2 -2
  293. package/dist/{terminalConfigList-NmdMNFkS.cjs → terminalConfigList-C3zRbQvM.cjs} +1 -1
  294. package/dist/{terminalList-BsHqVc8x.cjs → terminalList-ArxJ1jdO.cjs} +1 -1
  295. package/dist/{terminalList-BAYA-Ac0.js → terminalList-BevfdySj.js} +2 -2
  296. package/dist/{terminalListAPP-o2MxJO3g.js → terminalListAPP-CbpVft_s.js} +2 -2
  297. package/dist/{terminalListAPP-CsFu8juA.cjs → terminalListAPP-Cs0nnBfc.cjs} +1 -1
  298. package/dist/{textbox-B4Mo8FWS.js → textbox-CjkfmdaO.js} +2 -2
  299. package/dist/{textbox-5BUkzLTc.cjs → textbox-DC9YLTn5.cjs} +1 -1
  300. package/dist/{timeQueryBar-G4hUPdC2.cjs → timeQueryBar-B69eldHQ.cjs} +1 -1
  301. package/dist/{timeQueryBar-B0LIBA90.js → timeQueryBar-CXd9yNgD.js} +1 -1
  302. package/dist/{timeSeries-Ch4UV0P1.js → timeSeries-CLnLd-gX.js} +3 -3
  303. package/dist/{timeSeries-DC_CbU3l.cjs → timeSeries-fB14CgRy.cjs} +1 -1
  304. package/dist/{timeSeriesCurve-BF10Q_7c.js → timeSeriesCurve-CMcCzR13.js} +3 -3
  305. package/dist/{timeSeriesCurve-CJSHo8qO.cjs → timeSeriesCurve-DOaxDpjr.cjs} +1 -1
  306. package/dist/{toggleBtn-DQ2sHyaB.cjs → toggleBtn-BiUyrx_o.cjs} +1 -1
  307. package/dist/{toggleBtn-BhILbiNf.js → toggleBtn-CWmuTxSD.js} +2 -2
  308. package/dist/{trajectoryConfigPanel-BgSmlQkD.cjs → trajectoryConfigPanel-D7IDlQIH.cjs} +1 -1
  309. package/dist/{trajectoryConfigPanel-BlqriMc7.js → trajectoryConfigPanel-DKLN3KY5.js} +1 -1
  310. package/dist/{trajectoryScatter-CeX4LQpn.cjs → trajectoryScatter-CL-2FKZe.cjs} +1 -1
  311. package/dist/{trajectoryScatter-BL2aiBf-.js → trajectoryScatter-TEactc8J.js} +2 -2
  312. package/dist/{universalConfigPanel-NMan3ddE.cjs → universalConfigPanel-B8JIiLXp.cjs} +1 -1
  313. package/dist/{universalConfigPanel-CLKhwJP4.js → universalConfigPanel-wicv4Ypw.js} +1 -1
  314. package/dist/{universalTable-CEmD-HRB.js → universalTable-8e3LrZvD.js} +2 -2
  315. package/dist/{universalTable-thYFp4vt.cjs → universalTable-BlTdL3c0.cjs} +1 -1
  316. package/dist/{video-t1nUpAcT.js → video-DpRcCZZQ.js} +2 -2
  317. package/dist/{video-8idiBjxG.cjs → video-nPkrKQyL.cjs} +1 -1
  318. package/dist/{videoMonitor-BEeCMVJf.cjs → videoMonitor-DOVw5mE0.cjs} +1 -1
  319. package/dist/{videoMonitor-PM3-BUjQ.js → videoMonitor-Z_7cZk5Y.js} +2 -2
  320. package/dist/{vlu-CE181id-.js → vlu-BQCrHSlq.js} +2 -2
  321. package/dist/{vlu-o3-SObwR.cjs → vlu-DEIgGiO-.cjs} +1 -1
  322. package/dist/{warningOverview-CKcMNgw-.js → warningOverview-C7J5aXTJ.js} +3 -3
  323. package/dist/{warningOverview-CbJfW5ek.cjs → warningOverview-DXJNk5bT.cjs} +1 -1
  324. package/dist/{weather-a0CGhe9q.cjs → weather-B1Pfcn75.cjs} +1 -1
  325. package/dist/{weather-D3LQY9qO.js → weather-C1sjTcwC.js} +2 -2
  326. package/dist/{windLin-Cg58bRj3.cjs → windLin-QKZKJ1h_.cjs} +1 -1
  327. package/dist/{windLin-D7qqnbNz.js → windLin-vlM63Hu7.js} +2 -2
  328. package/package.json +1 -1
  329. package/dist/dzc-9BLm4nwW.cjs +0 -2
  330. package/dist/mxa-BQ_gyPOg.cjs +0 -2
  331. package/dist/pie-DGQowd1d.cjs +0 -2
@@ -1,4 +1,4 @@
1
- "use strict";var oo=Object.defineProperty,lo=Object.defineProperties;var uo=Object.getOwnPropertyDescriptors;var nr=Object.getOwnPropertySymbols;var ho=Object.prototype.hasOwnProperty,co=Object.prototype.propertyIsEnumerable;var or=Math.pow,ar=(a,e,t)=>e in a?oo(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,lr=(a,e)=>{for(var t in e||(e={}))ho.call(e,t)&&ar(a,t,e[t]);if(nr)for(var t of nr(e))co.call(e,t)&&ar(a,t,e[t]);return a},ur=(a,e)=>lo(a,uo(e));var ri=(a,e,t)=>new Promise((i,s)=>{var r=u=>{try{o(t.next(u))}catch(l){s(l)}},n=u=>{try{o(t.throw(u))}catch(l){s(l)}},o=u=>u.done?i(u.value):Promise.resolve(u.value).then(r,n);o((t=t.apply(a,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("vue"),fo=require("./BaseComponent-B5ivgb3E.cjs"),Lt=require("./index-DYr57ceS.cjs"),Xe=require("element-plus"),dr=require("./ele-vdo-icon-Bgp9gaT6.cjs");var ji={exports:{}},hr;function go(){return hr||(hr=1,(function(a,e){(function(i,s){a.exports=s()})(self,function(){return(function(){var t={"./node_modules/es6-promise/dist/es6-promise.js":(function(n,o,u){(function(l,d){n.exports=d()})(this,(function(){function l(B){var j=typeof B;return B!==null&&(j==="object"||j==="function")}function d(B){return typeof B=="function"}var h=void 0;Array.isArray?h=Array.isArray:h=function(B){return Object.prototype.toString.call(B)==="[object Array]"};var c=h,g=0,f=void 0,m=void 0,p=function(j,Y){P[g]=j,P[g+1]=Y,g+=2,g===2&&(m?m(C):O())};function v(B){m=B}function _(B){p=B}var E=typeof window!="undefined"?window:void 0,x=E||{},y=x.MutationObserver||x.WebKitMutationObserver,T=typeof self=="undefined"&&typeof process!="undefined"&&{}.toString.call(process)==="[object process]",A=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function L(){return function(){return process.nextTick(C)}}function R(){return typeof f!="undefined"?function(){f(C)}:b()}function I(){var B=0,j=new y(C),Y=document.createTextNode("");return j.observe(Y,{characterData:!0}),function(){Y.data=B=++B%2}}function D(){var B=new MessageChannel;return B.port1.onmessage=C,function(){return B.port2.postMessage(0)}}function b(){var B=setTimeout;return function(){return B(C,1)}}var P=new Array(1e3);function C(){for(var B=0;B<g;B+=2){var j=P[B],Y=P[B+1];j(Y),P[B]=void 0,P[B+1]=void 0}g=0}function k(){try{var B=Function("return this")().require("vertx");return f=B.runOnLoop||B.runOnContext,R()}catch(j){return b()}}var O=void 0;T?O=L():y?O=I():A?O=D():E===void 0?O=k():O=b();function F(B,j){var Y=this,J=new this.constructor(V);J[G]===void 0&&be(J);var ae=Y._state;if(ae){var le=arguments[ae-1];p(function(){return ne(ae,J,le,Y._result)})}else Oe(Y,J,B,j);return J}function U(B){var j=this;if(B&&typeof B=="object"&&B.constructor===j)return B;var Y=new j(V);return Ee(Y,B),Y}var G=Math.random().toString(36).substring(2);function V(){}var $=void 0,K=1,H=2;function X(){return new TypeError("You cannot resolve a promise with itself")}function ee(){return new TypeError("A promises callback cannot return that same promise.")}function Q(B,j,Y,J){try{B.call(j,Y,J)}catch(ae){return ae}}function re(B,j,Y){p(function(J){var ae=!1,le=Q(Y,j,function(De){ae||(ae=!0,j!==De?Ee(J,De):_e(J,De))},function(De){ae||(ae=!0,te(J,De))},"Settle: "+(J._label||" unknown promise"));!ae&&le&&(ae=!0,te(J,le))},B)}function de(B,j){j._state===K?_e(B,j._result):j._state===H?te(B,j._result):Oe(j,void 0,function(Y){return Ee(B,Y)},function(Y){return te(B,Y)})}function he(B,j,Y){j.constructor===B.constructor&&Y===F&&j.constructor.resolve===U?de(B,j):Y===void 0?_e(B,j):d(Y)?re(B,j,Y):_e(B,j)}function Ee(B,j){if(B===j)te(B,X());else if(l(j)){var Y=void 0;try{Y=j.then}catch(J){te(B,J);return}he(B,j,Y)}else _e(B,j)}function Pe(B){B._onerror&&B._onerror(B._result),qe(B)}function _e(B,j){B._state===$&&(B._result=j,B._state=K,B._subscribers.length!==0&&p(qe,B))}function te(B,j){B._state===$&&(B._state=H,B._result=j,p(Pe,B))}function Oe(B,j,Y,J){var ae=B._subscribers,le=ae.length;B._onerror=null,ae[le]=j,ae[le+K]=Y,ae[le+H]=J,le===0&&B._state&&p(qe,B)}function qe(B){var j=B._subscribers,Y=B._state;if(j.length!==0){for(var J=void 0,ae=void 0,le=B._result,De=0;De<j.length;De+=3)J=j[De],ae=j[De+Y],J?ne(Y,J,ae,le):ae(le);B._subscribers.length=0}}function ne(B,j,Y,J){var ae=d(Y),le=void 0,De=void 0,bt=!0;if(ae){try{le=Y(J)}catch(si){bt=!1,De=si}if(j===le){te(j,ee());return}}else le=J;j._state!==$||(ae&&bt?Ee(j,le):bt===!1?te(j,De):B===K?_e(j,le):B===H&&te(j,le))}function ve(B,j){try{j(function(J){Ee(B,J)},function(J){te(B,J)})}catch(Y){te(B,Y)}}var Te=0;function Ue(){return Te++}function be(B){B[G]=Te++,B._state=void 0,B._result=void 0,B._subscribers=[]}function ke(){return new Error("Array Methods must be provided an Array")}var Le=(function(){function B(j,Y){this._instanceConstructor=j,this.promise=new j(V),this.promise[G]||be(this.promise),c(Y)?(this.length=Y.length,this._remaining=Y.length,this._result=new Array(this.length),this.length===0?_e(this.promise,this._result):(this.length=this.length||0,this._enumerate(Y),this._remaining===0&&_e(this.promise,this._result))):te(this.promise,ke())}return B.prototype._enumerate=function(Y){for(var J=0;this._state===$&&J<Y.length;J++)this._eachEntry(Y[J],J)},B.prototype._eachEntry=function(Y,J){var ae=this._instanceConstructor,le=ae.resolve;if(le===U){var De=void 0,bt=void 0,si=!1;try{De=Y.then}catch(Vi){si=!0,bt=Vi}if(De===F&&Y._state!==$)this._settledAt(Y._state,J,Y._result);else if(typeof De!="function")this._remaining--,this._result[J]=Y;else if(ae===Be){var Ki=new ae(V);si?te(Ki,bt):he(Ki,Y,De),this._willSettleAt(Ki,J)}else this._willSettleAt(new ae(function(Vi){return Vi(Y)}),J)}else this._willSettleAt(le(Y),J)},B.prototype._settledAt=function(Y,J,ae){var le=this.promise;le._state===$&&(this._remaining--,Y===H?te(le,ae):this._result[J]=ae),this._remaining===0&&_e(le,this._result)},B.prototype._willSettleAt=function(Y,J){var ae=this;Oe(Y,void 0,function(le){return ae._settledAt(K,J,le)},function(le){return ae._settledAt(H,J,le)})},B})();function ft(B){return new Le(this,B).promise}function lt(B){var j=this;return c(B)?new j(function(Y,J){for(var ae=B.length,le=0;le<ae;le++)j.resolve(B[le]).then(Y,J)}):new j(function(Y,J){return J(new TypeError("You must pass an array to race."))})}function ei(B){var j=this,Y=new j(V);return te(Y,B),Y}function xt(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ti(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Be=(function(){function B(j){this[G]=Ue(),this._result=this._state=void 0,this._subscribers=[],V!==j&&(typeof j!="function"&&xt(),this instanceof B?ve(this,j):ti())}return B.prototype.catch=function(Y){return this.then(null,Y)},B.prototype.finally=function(Y){var J=this,ae=J.constructor;return d(Y)?J.then(function(le){return ae.resolve(Y()).then(function(){return le})},function(le){return ae.resolve(Y()).then(function(){throw le})}):J.then(Y,Y)},B})();Be.prototype.then=F,Be.all=ft,Be.race=lt,Be.resolve=U,Be.reject=ei,Be._setScheduler=v,Be._setAsap=_,Be._asap=p;function ii(){var B=void 0;if(typeof u.g!="undefined")B=u.g;else if(typeof self!="undefined")B=self;else try{B=Function("return this")()}catch(J){throw new Error("polyfill failed because global object is unavailable in this environment")}var j=B.Promise;if(j){var Y=null;try{Y=Object.prototype.toString.call(j.resolve())}catch(J){}if(Y==="[object Promise]"&&!j.cast)return}B.Promise=Be}return Be.polyfill=ii,Be.Promise=Be,Be}))}),"./node_modules/events/events.js":(function(n){var o=typeof Reflect=="object"?Reflect:null,u=o&&typeof o.apply=="function"?o.apply:function(b,P,C){return Function.prototype.apply.call(b,P,C)},l;o&&typeof o.ownKeys=="function"?l=o.ownKeys:Object.getOwnPropertySymbols?l=function(b){return Object.getOwnPropertyNames(b).concat(Object.getOwnPropertySymbols(b))}:l=function(b){return Object.getOwnPropertyNames(b)};function d(D){console&&console.warn&&console.warn(D)}var h=Number.isNaN||function(b){return b!==b};function c(){c.init.call(this)}n.exports=c,n.exports.once=L,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var g=10;function f(D){if(typeof D!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof D)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return g},set:function(D){if(typeof D!="number"||D<0||h(D))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+D+".");g=D}}),c.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},c.prototype.setMaxListeners=function(b){if(typeof b!="number"||b<0||h(b))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+b+".");return this._maxListeners=b,this};function m(D){return D._maxListeners===void 0?c.defaultMaxListeners:D._maxListeners}c.prototype.getMaxListeners=function(){return m(this)},c.prototype.emit=function(b){for(var P=[],C=1;C<arguments.length;C++)P.push(arguments[C]);var k=b==="error",O=this._events;if(O!==void 0)k=k&&O.error===void 0;else if(!k)return!1;if(k){var F;if(P.length>0&&(F=P[0]),F instanceof Error)throw F;var U=new Error("Unhandled error."+(F?" ("+F.message+")":""));throw U.context=F,U}var G=O[b];if(G===void 0)return!1;if(typeof G=="function")u(G,this,P);else for(var V=G.length,$=y(G,V),C=0;C<V;++C)u($[C],this,P);return!0};function p(D,b,P,C){var k,O,F;if(f(P),O=D._events,O===void 0?(O=D._events=Object.create(null),D._eventsCount=0):(O.newListener!==void 0&&(D.emit("newListener",b,P.listener?P.listener:P),O=D._events),F=O[b]),F===void 0)F=O[b]=P,++D._eventsCount;else if(typeof F=="function"?F=O[b]=C?[P,F]:[F,P]:C?F.unshift(P):F.push(P),k=m(D),k>0&&F.length>k&&!F.warned){F.warned=!0;var U=new Error("Possible EventEmitter memory leak detected. "+F.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");U.name="MaxListenersExceededWarning",U.emitter=D,U.type=b,U.count=F.length,d(U)}return D}c.prototype.addListener=function(b,P){return p(this,b,P,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(b,P){return p(this,b,P,!0)};function v(){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 _(D,b,P){var C={fired:!1,wrapFn:void 0,target:D,type:b,listener:P},k=v.bind(C);return k.listener=P,C.wrapFn=k,k}c.prototype.once=function(b,P){return f(P),this.on(b,_(this,b,P)),this},c.prototype.prependOnceListener=function(b,P){return f(P),this.prependListener(b,_(this,b,P)),this},c.prototype.removeListener=function(b,P){var C,k,O,F,U;if(f(P),k=this._events,k===void 0)return this;if(C=k[b],C===void 0)return this;if(C===P||C.listener===P)--this._eventsCount===0?this._events=Object.create(null):(delete k[b],k.removeListener&&this.emit("removeListener",b,C.listener||P));else if(typeof C!="function"){for(O=-1,F=C.length-1;F>=0;F--)if(C[F]===P||C[F].listener===P){U=C[F].listener,O=F;break}if(O<0)return this;O===0?C.shift():T(C,O),C.length===1&&(k[b]=C[0]),k.removeListener!==void 0&&this.emit("removeListener",b,U||P)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(b){var P,C,k;if(C=this._events,C===void 0)return this;if(C.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):C[b]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete C[b]),this;if(arguments.length===0){var O=Object.keys(C),F;for(k=0;k<O.length;++k)F=O[k],F!=="removeListener"&&this.removeAllListeners(F);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(P=C[b],typeof P=="function")this.removeListener(b,P);else if(P!==void 0)for(k=P.length-1;k>=0;k--)this.removeListener(b,P[k]);return this};function E(D,b,P){var C=D._events;if(C===void 0)return[];var k=C[b];return k===void 0?[]:typeof k=="function"?P?[k.listener||k]:[k]:P?A(k):y(k,k.length)}c.prototype.listeners=function(b){return E(this,b,!0)},c.prototype.rawListeners=function(b){return E(this,b,!1)},c.listenerCount=function(D,b){return typeof D.listenerCount=="function"?D.listenerCount(b):x.call(D,b)},c.prototype.listenerCount=x;function x(D){var b=this._events;if(b!==void 0){var P=b[D];if(typeof P=="function")return 1;if(P!==void 0)return P.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function y(D,b){for(var P=new Array(b),C=0;C<b;++C)P[C]=D[C];return P}function T(D,b){for(;b+1<D.length;b++)D[b]=D[b+1];D.pop()}function A(D){for(var b=new Array(D.length),P=0;P<b.length;++P)b[P]=D[P].listener||D[P];return b}function L(D,b){return new Promise(function(P,C){function k(F){D.removeListener(b,O),C(F)}function O(){typeof D.removeListener=="function"&&D.removeListener("error",k),P([].slice.call(arguments))}I(D,b,O,{once:!0}),b!=="error"&&R(D,k,{once:!0})})}function R(D,b,P){typeof D.on=="function"&&I(D,"error",b,P)}function I(D,b,P,C){if(typeof D.on=="function")C.once?D.once(b,P):D.on(b,P);else if(typeof D.addEventListener=="function")D.addEventListener(b,function k(O){C.once&&D.removeEventListener(b,k),P(O)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof D)}}),"./node_modules/webworkify-webpack/index.js":(function(n,o,u){function l(v){var _={};function E(y){if(_[y])return _[y].exports;var T=_[y]={i:y,l:!1,exports:{}};return v[y].call(T.exports,T,T.exports,E),T.l=!0,T.exports}E.m=v,E.c=_,E.i=function(y){return y},E.d=function(y,T,A){E.o(y,T)||Object.defineProperty(y,T,{configurable:!1,enumerable:!0,get:A})},E.r=function(y){Object.defineProperty(y,"__esModule",{value:!0})},E.n=function(y){var T=y&&y.__esModule?function(){return y.default}:function(){return y};return E.d(T,"a",T),T},E.o=function(y,T){return Object.prototype.hasOwnProperty.call(y,T)},E.p="/",E.oe=function(y){throw console.error(y),y};var x=E(E.s=ENTRY_MODULE);return x.default||x}var d="[\\.|\\-|\\+|\\w|/|@]+",h="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+d+").*?\\)";function c(v){return(v+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function g(v){return!isNaN(1*v)}function f(v,_,E){var x={};x[E]=[];var y=_.toString(),T=y.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!T)return x;for(var A=T[1],L=new RegExp("(\\\\n|\\W)"+c(A)+h,"g"),R;R=L.exec(y);)R[3]!=="dll-reference"&&x[E].push(R[3]);for(L=new RegExp("\\("+c(A)+'\\("(dll-reference\\s('+d+'))"\\)\\)'+h,"g");R=L.exec(y);)v[R[2]]||(x[E].push(R[1]),v[R[2]]=u(R[1]).m),x[R[2]]=x[R[2]]||[],x[R[2]].push(R[4]);for(var I=Object.keys(x),D=0;D<I.length;D++)for(var b=0;b<x[I[D]].length;b++)g(x[I[D]][b])&&(x[I[D]][b]=1*x[I[D]][b]);return x}function m(v){var _=Object.keys(v);return _.reduce(function(E,x){return E||v[x].length>0},!1)}function p(v,_){for(var E={main:[_]},x={main:[]},y={main:{}};m(E);)for(var T=Object.keys(E),A=0;A<T.length;A++){var L=T[A],R=E[L],I=R.pop();if(y[L]=y[L]||{},!(y[L][I]||!v[L][I])){y[L][I]=!0,x[L]=x[L]||[],x[L].push(I);for(var D=f(v,v[L][I],L),b=Object.keys(D),P=0;P<b.length;P++)E[b[P]]=E[b[P]]||[],E[b[P]]=E[b[P]].concat(D[b[P]])}}return x}n.exports=function(v,_){_=_||{};var E={main:u.m},x=_.all?{main:Object.keys(E.main)}:p(E,v),y="";Object.keys(x).filter(function(I){return I!=="main"}).forEach(function(I){for(var D=0;x[I][D];)D++;x[I].push(D),E[I][D]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",y=y+"var "+I+" = ("+l.toString().replace("ENTRY_MODULE",JSON.stringify(D))+")({"+x[I].map(function(b){return""+JSON.stringify(b)+": "+E[I][b].toString()}).join(",")+`});
1
+ "use strict";var oo=Object.defineProperty,lo=Object.defineProperties;var uo=Object.getOwnPropertyDescriptors;var nr=Object.getOwnPropertySymbols;var ho=Object.prototype.hasOwnProperty,co=Object.prototype.propertyIsEnumerable;var or=Math.pow,ar=(a,e,t)=>e in a?oo(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,lr=(a,e)=>{for(var t in e||(e={}))ho.call(e,t)&&ar(a,t,e[t]);if(nr)for(var t of nr(e))co.call(e,t)&&ar(a,t,e[t]);return a},ur=(a,e)=>lo(a,uo(e));var ri=(a,e,t)=>new Promise((i,s)=>{var r=u=>{try{o(t.next(u))}catch(l){s(l)}},n=u=>{try{o(t.throw(u))}catch(l){s(l)}},o=u=>u.done?i(u.value):Promise.resolve(u.value).then(r,n);o((t=t.apply(a,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("vue"),fo=require("./BaseComponent-bzb58Hhs.cjs"),Lt=require("./index-6QhTSPkL.cjs"),Xe=require("element-plus"),dr=require("./ele-vdo-icon-Bgp9gaT6.cjs");var ji={exports:{}},hr;function go(){return hr||(hr=1,(function(a,e){(function(i,s){a.exports=s()})(self,function(){return(function(){var t={"./node_modules/es6-promise/dist/es6-promise.js":(function(n,o,u){(function(l,d){n.exports=d()})(this,(function(){function l(B){var j=typeof B;return B!==null&&(j==="object"||j==="function")}function d(B){return typeof B=="function"}var h=void 0;Array.isArray?h=Array.isArray:h=function(B){return Object.prototype.toString.call(B)==="[object Array]"};var c=h,g=0,f=void 0,m=void 0,p=function(j,Y){P[g]=j,P[g+1]=Y,g+=2,g===2&&(m?m(C):O())};function v(B){m=B}function _(B){p=B}var E=typeof window!="undefined"?window:void 0,x=E||{},y=x.MutationObserver||x.WebKitMutationObserver,T=typeof self=="undefined"&&typeof process!="undefined"&&{}.toString.call(process)==="[object process]",A=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function L(){return function(){return process.nextTick(C)}}function R(){return typeof f!="undefined"?function(){f(C)}:b()}function I(){var B=0,j=new y(C),Y=document.createTextNode("");return j.observe(Y,{characterData:!0}),function(){Y.data=B=++B%2}}function D(){var B=new MessageChannel;return B.port1.onmessage=C,function(){return B.port2.postMessage(0)}}function b(){var B=setTimeout;return function(){return B(C,1)}}var P=new Array(1e3);function C(){for(var B=0;B<g;B+=2){var j=P[B],Y=P[B+1];j(Y),P[B]=void 0,P[B+1]=void 0}g=0}function k(){try{var B=Function("return this")().require("vertx");return f=B.runOnLoop||B.runOnContext,R()}catch(j){return b()}}var O=void 0;T?O=L():y?O=I():A?O=D():E===void 0?O=k():O=b();function F(B,j){var Y=this,J=new this.constructor(V);J[G]===void 0&&be(J);var ae=Y._state;if(ae){var le=arguments[ae-1];p(function(){return ne(ae,J,le,Y._result)})}else Oe(Y,J,B,j);return J}function U(B){var j=this;if(B&&typeof B=="object"&&B.constructor===j)return B;var Y=new j(V);return Ee(Y,B),Y}var G=Math.random().toString(36).substring(2);function V(){}var $=void 0,K=1,H=2;function X(){return new TypeError("You cannot resolve a promise with itself")}function ee(){return new TypeError("A promises callback cannot return that same promise.")}function Q(B,j,Y,J){try{B.call(j,Y,J)}catch(ae){return ae}}function re(B,j,Y){p(function(J){var ae=!1,le=Q(Y,j,function(De){ae||(ae=!0,j!==De?Ee(J,De):_e(J,De))},function(De){ae||(ae=!0,te(J,De))},"Settle: "+(J._label||" unknown promise"));!ae&&le&&(ae=!0,te(J,le))},B)}function de(B,j){j._state===K?_e(B,j._result):j._state===H?te(B,j._result):Oe(j,void 0,function(Y){return Ee(B,Y)},function(Y){return te(B,Y)})}function he(B,j,Y){j.constructor===B.constructor&&Y===F&&j.constructor.resolve===U?de(B,j):Y===void 0?_e(B,j):d(Y)?re(B,j,Y):_e(B,j)}function Ee(B,j){if(B===j)te(B,X());else if(l(j)){var Y=void 0;try{Y=j.then}catch(J){te(B,J);return}he(B,j,Y)}else _e(B,j)}function Pe(B){B._onerror&&B._onerror(B._result),qe(B)}function _e(B,j){B._state===$&&(B._result=j,B._state=K,B._subscribers.length!==0&&p(qe,B))}function te(B,j){B._state===$&&(B._state=H,B._result=j,p(Pe,B))}function Oe(B,j,Y,J){var ae=B._subscribers,le=ae.length;B._onerror=null,ae[le]=j,ae[le+K]=Y,ae[le+H]=J,le===0&&B._state&&p(qe,B)}function qe(B){var j=B._subscribers,Y=B._state;if(j.length!==0){for(var J=void 0,ae=void 0,le=B._result,De=0;De<j.length;De+=3)J=j[De],ae=j[De+Y],J?ne(Y,J,ae,le):ae(le);B._subscribers.length=0}}function ne(B,j,Y,J){var ae=d(Y),le=void 0,De=void 0,bt=!0;if(ae){try{le=Y(J)}catch(si){bt=!1,De=si}if(j===le){te(j,ee());return}}else le=J;j._state!==$||(ae&&bt?Ee(j,le):bt===!1?te(j,De):B===K?_e(j,le):B===H&&te(j,le))}function ve(B,j){try{j(function(J){Ee(B,J)},function(J){te(B,J)})}catch(Y){te(B,Y)}}var Te=0;function Ue(){return Te++}function be(B){B[G]=Te++,B._state=void 0,B._result=void 0,B._subscribers=[]}function ke(){return new Error("Array Methods must be provided an Array")}var Le=(function(){function B(j,Y){this._instanceConstructor=j,this.promise=new j(V),this.promise[G]||be(this.promise),c(Y)?(this.length=Y.length,this._remaining=Y.length,this._result=new Array(this.length),this.length===0?_e(this.promise,this._result):(this.length=this.length||0,this._enumerate(Y),this._remaining===0&&_e(this.promise,this._result))):te(this.promise,ke())}return B.prototype._enumerate=function(Y){for(var J=0;this._state===$&&J<Y.length;J++)this._eachEntry(Y[J],J)},B.prototype._eachEntry=function(Y,J){var ae=this._instanceConstructor,le=ae.resolve;if(le===U){var De=void 0,bt=void 0,si=!1;try{De=Y.then}catch(Vi){si=!0,bt=Vi}if(De===F&&Y._state!==$)this._settledAt(Y._state,J,Y._result);else if(typeof De!="function")this._remaining--,this._result[J]=Y;else if(ae===Be){var Ki=new ae(V);si?te(Ki,bt):he(Ki,Y,De),this._willSettleAt(Ki,J)}else this._willSettleAt(new ae(function(Vi){return Vi(Y)}),J)}else this._willSettleAt(le(Y),J)},B.prototype._settledAt=function(Y,J,ae){var le=this.promise;le._state===$&&(this._remaining--,Y===H?te(le,ae):this._result[J]=ae),this._remaining===0&&_e(le,this._result)},B.prototype._willSettleAt=function(Y,J){var ae=this;Oe(Y,void 0,function(le){return ae._settledAt(K,J,le)},function(le){return ae._settledAt(H,J,le)})},B})();function ft(B){return new Le(this,B).promise}function lt(B){var j=this;return c(B)?new j(function(Y,J){for(var ae=B.length,le=0;le<ae;le++)j.resolve(B[le]).then(Y,J)}):new j(function(Y,J){return J(new TypeError("You must pass an array to race."))})}function ei(B){var j=this,Y=new j(V);return te(Y,B),Y}function xt(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ti(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Be=(function(){function B(j){this[G]=Ue(),this._result=this._state=void 0,this._subscribers=[],V!==j&&(typeof j!="function"&&xt(),this instanceof B?ve(this,j):ti())}return B.prototype.catch=function(Y){return this.then(null,Y)},B.prototype.finally=function(Y){var J=this,ae=J.constructor;return d(Y)?J.then(function(le){return ae.resolve(Y()).then(function(){return le})},function(le){return ae.resolve(Y()).then(function(){throw le})}):J.then(Y,Y)},B})();Be.prototype.then=F,Be.all=ft,Be.race=lt,Be.resolve=U,Be.reject=ei,Be._setScheduler=v,Be._setAsap=_,Be._asap=p;function ii(){var B=void 0;if(typeof u.g!="undefined")B=u.g;else if(typeof self!="undefined")B=self;else try{B=Function("return this")()}catch(J){throw new Error("polyfill failed because global object is unavailable in this environment")}var j=B.Promise;if(j){var Y=null;try{Y=Object.prototype.toString.call(j.resolve())}catch(J){}if(Y==="[object Promise]"&&!j.cast)return}B.Promise=Be}return Be.polyfill=ii,Be.Promise=Be,Be}))}),"./node_modules/events/events.js":(function(n){var o=typeof Reflect=="object"?Reflect:null,u=o&&typeof o.apply=="function"?o.apply:function(b,P,C){return Function.prototype.apply.call(b,P,C)},l;o&&typeof o.ownKeys=="function"?l=o.ownKeys:Object.getOwnPropertySymbols?l=function(b){return Object.getOwnPropertyNames(b).concat(Object.getOwnPropertySymbols(b))}:l=function(b){return Object.getOwnPropertyNames(b)};function d(D){console&&console.warn&&console.warn(D)}var h=Number.isNaN||function(b){return b!==b};function c(){c.init.call(this)}n.exports=c,n.exports.once=L,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var g=10;function f(D){if(typeof D!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof D)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return g},set:function(D){if(typeof D!="number"||D<0||h(D))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+D+".");g=D}}),c.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},c.prototype.setMaxListeners=function(b){if(typeof b!="number"||b<0||h(b))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+b+".");return this._maxListeners=b,this};function m(D){return D._maxListeners===void 0?c.defaultMaxListeners:D._maxListeners}c.prototype.getMaxListeners=function(){return m(this)},c.prototype.emit=function(b){for(var P=[],C=1;C<arguments.length;C++)P.push(arguments[C]);var k=b==="error",O=this._events;if(O!==void 0)k=k&&O.error===void 0;else if(!k)return!1;if(k){var F;if(P.length>0&&(F=P[0]),F instanceof Error)throw F;var U=new Error("Unhandled error."+(F?" ("+F.message+")":""));throw U.context=F,U}var G=O[b];if(G===void 0)return!1;if(typeof G=="function")u(G,this,P);else for(var V=G.length,$=y(G,V),C=0;C<V;++C)u($[C],this,P);return!0};function p(D,b,P,C){var k,O,F;if(f(P),O=D._events,O===void 0?(O=D._events=Object.create(null),D._eventsCount=0):(O.newListener!==void 0&&(D.emit("newListener",b,P.listener?P.listener:P),O=D._events),F=O[b]),F===void 0)F=O[b]=P,++D._eventsCount;else if(typeof F=="function"?F=O[b]=C?[P,F]:[F,P]:C?F.unshift(P):F.push(P),k=m(D),k>0&&F.length>k&&!F.warned){F.warned=!0;var U=new Error("Possible EventEmitter memory leak detected. "+F.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");U.name="MaxListenersExceededWarning",U.emitter=D,U.type=b,U.count=F.length,d(U)}return D}c.prototype.addListener=function(b,P){return p(this,b,P,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(b,P){return p(this,b,P,!0)};function v(){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 _(D,b,P){var C={fired:!1,wrapFn:void 0,target:D,type:b,listener:P},k=v.bind(C);return k.listener=P,C.wrapFn=k,k}c.prototype.once=function(b,P){return f(P),this.on(b,_(this,b,P)),this},c.prototype.prependOnceListener=function(b,P){return f(P),this.prependListener(b,_(this,b,P)),this},c.prototype.removeListener=function(b,P){var C,k,O,F,U;if(f(P),k=this._events,k===void 0)return this;if(C=k[b],C===void 0)return this;if(C===P||C.listener===P)--this._eventsCount===0?this._events=Object.create(null):(delete k[b],k.removeListener&&this.emit("removeListener",b,C.listener||P));else if(typeof C!="function"){for(O=-1,F=C.length-1;F>=0;F--)if(C[F]===P||C[F].listener===P){U=C[F].listener,O=F;break}if(O<0)return this;O===0?C.shift():T(C,O),C.length===1&&(k[b]=C[0]),k.removeListener!==void 0&&this.emit("removeListener",b,U||P)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(b){var P,C,k;if(C=this._events,C===void 0)return this;if(C.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):C[b]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete C[b]),this;if(arguments.length===0){var O=Object.keys(C),F;for(k=0;k<O.length;++k)F=O[k],F!=="removeListener"&&this.removeAllListeners(F);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(P=C[b],typeof P=="function")this.removeListener(b,P);else if(P!==void 0)for(k=P.length-1;k>=0;k--)this.removeListener(b,P[k]);return this};function E(D,b,P){var C=D._events;if(C===void 0)return[];var k=C[b];return k===void 0?[]:typeof k=="function"?P?[k.listener||k]:[k]:P?A(k):y(k,k.length)}c.prototype.listeners=function(b){return E(this,b,!0)},c.prototype.rawListeners=function(b){return E(this,b,!1)},c.listenerCount=function(D,b){return typeof D.listenerCount=="function"?D.listenerCount(b):x.call(D,b)},c.prototype.listenerCount=x;function x(D){var b=this._events;if(b!==void 0){var P=b[D];if(typeof P=="function")return 1;if(P!==void 0)return P.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function y(D,b){for(var P=new Array(b),C=0;C<b;++C)P[C]=D[C];return P}function T(D,b){for(;b+1<D.length;b++)D[b]=D[b+1];D.pop()}function A(D){for(var b=new Array(D.length),P=0;P<b.length;++P)b[P]=D[P].listener||D[P];return b}function L(D,b){return new Promise(function(P,C){function k(F){D.removeListener(b,O),C(F)}function O(){typeof D.removeListener=="function"&&D.removeListener("error",k),P([].slice.call(arguments))}I(D,b,O,{once:!0}),b!=="error"&&R(D,k,{once:!0})})}function R(D,b,P){typeof D.on=="function"&&I(D,"error",b,P)}function I(D,b,P,C){if(typeof D.on=="function")C.once?D.once(b,P):D.on(b,P);else if(typeof D.addEventListener=="function")D.addEventListener(b,function k(O){C.once&&D.removeEventListener(b,k),P(O)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof D)}}),"./node_modules/webworkify-webpack/index.js":(function(n,o,u){function l(v){var _={};function E(y){if(_[y])return _[y].exports;var T=_[y]={i:y,l:!1,exports:{}};return v[y].call(T.exports,T,T.exports,E),T.l=!0,T.exports}E.m=v,E.c=_,E.i=function(y){return y},E.d=function(y,T,A){E.o(y,T)||Object.defineProperty(y,T,{configurable:!1,enumerable:!0,get:A})},E.r=function(y){Object.defineProperty(y,"__esModule",{value:!0})},E.n=function(y){var T=y&&y.__esModule?function(){return y.default}:function(){return y};return E.d(T,"a",T),T},E.o=function(y,T){return Object.prototype.hasOwnProperty.call(y,T)},E.p="/",E.oe=function(y){throw console.error(y),y};var x=E(E.s=ENTRY_MODULE);return x.default||x}var d="[\\.|\\-|\\+|\\w|/|@]+",h="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+d+").*?\\)";function c(v){return(v+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function g(v){return!isNaN(1*v)}function f(v,_,E){var x={};x[E]=[];var y=_.toString(),T=y.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!T)return x;for(var A=T[1],L=new RegExp("(\\\\n|\\W)"+c(A)+h,"g"),R;R=L.exec(y);)R[3]!=="dll-reference"&&x[E].push(R[3]);for(L=new RegExp("\\("+c(A)+'\\("(dll-reference\\s('+d+'))"\\)\\)'+h,"g");R=L.exec(y);)v[R[2]]||(x[E].push(R[1]),v[R[2]]=u(R[1]).m),x[R[2]]=x[R[2]]||[],x[R[2]].push(R[4]);for(var I=Object.keys(x),D=0;D<I.length;D++)for(var b=0;b<x[I[D]].length;b++)g(x[I[D]][b])&&(x[I[D]][b]=1*x[I[D]][b]);return x}function m(v){var _=Object.keys(v);return _.reduce(function(E,x){return E||v[x].length>0},!1)}function p(v,_){for(var E={main:[_]},x={main:[]},y={main:{}};m(E);)for(var T=Object.keys(E),A=0;A<T.length;A++){var L=T[A],R=E[L],I=R.pop();if(y[L]=y[L]||{},!(y[L][I]||!v[L][I])){y[L][I]=!0,x[L]=x[L]||[],x[L].push(I);for(var D=f(v,v[L][I],L),b=Object.keys(D),P=0;P<b.length;P++)E[b[P]]=E[b[P]]||[],E[b[P]]=E[b[P]].concat(D[b[P]])}}return x}n.exports=function(v,_){_=_||{};var E={main:u.m},x=_.all?{main:Object.keys(E.main)}:p(E,v),y="";Object.keys(x).filter(function(I){return I!=="main"}).forEach(function(I){for(var D=0;x[I][D];)D++;x[I].push(D),E[I][D]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",y=y+"var "+I+" = ("+l.toString().replace("ENTRY_MODULE",JSON.stringify(D))+")({"+x[I].map(function(b){return""+JSON.stringify(b)+": "+E[I][b].toString()}).join(",")+`});
2
2
  `}),y=y+"new (("+l.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+x.main.map(function(I){return""+JSON.stringify(I)+": "+E.main[I].toString()}).join(",")+"}))(self);";var T=new window.Blob([y],{type:"text/javascript"});if(_.bare)return T;var A=window.URL||window.webkitURL||window.mozURL||window.msURL,L=A.createObjectURL(T),R=new window.Worker(L);return R.objectURL=L,R}}),"./src/config.js":(function(n,o,u){u.r(o),u.d(o,{defaultConfig:function(){return l},createDefaultConfig:function(){return d}});var l={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,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 d(){return Object.assign({},l)}}),"./src/core/features.js":(function(n,o,u){u.r(o);var l=u("./src/io/io-controller.js"),d=u("./src/config.js"),h=(function(){function c(){}return c.supportMSEH264Playback=function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},c.supportNetworkStreamIO=function(){var g=new l.default({},(0,d.createDefaultConfig)()),f=g.loaderType;return g.destroy(),f=="fetch-stream-loader"||f=="xhr-moz-chunked-loader"},c.getNetworkLoaderTypeName=function(){var g=new l.default({},(0,d.createDefaultConfig)()),f=g.loaderType;return g.destroy(),f},c.supportNativeMediaPlayback=function(g){c.videoElement==null&&(c.videoElement=window.document.createElement("video"));var f=c.videoElement.canPlayType(g);return f==="probably"||f=="maybe"},c.getFeatureList=function(){var g={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return g.mseFlvPlayback=c.supportMSEH264Playback(),g.networkStreamIO=c.supportNetworkStreamIO(),g.networkLoaderName=c.getNetworkLoaderTypeName(),g.mseLiveFlvPlayback=g.mseFlvPlayback&&g.networkStreamIO,g.nativeMP4H264Playback=c.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),g.nativeWebmVP8Playback=c.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),g.nativeWebmVP9Playback=c.supportNativeMediaPlayback('video/webm; codecs="vp9"'),g},c})();o.default=h}),"./src/core/media-info.js":(function(n,o,u){u.r(o);var l=(function(){function d(){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 d.prototype.isComplete=function(){var h=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,c=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&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&h&&c},d.prototype.isSeekable=function(){return this.hasKeyframesIndex===!0},d.prototype.getNearestKeyframe=function(h){if(this.keyframesIndex==null)return null;var c=this.keyframesIndex,g=this._search(c.times,h);return{index:g,milliseconds:c.times[g],fileposition:c.filepositions[g]}},d.prototype._search=function(h,c){var g=0,f=h.length-1,m=0,p=0,v=f;for(c<h[0]&&(g=0,p=v+1);p<=v;)if(m=p+Math.floor((v-p)/2),m===f||c>=h[m]&&c<h[m+1]){g=m;break}else h[m]<c?p=m+1:v=m-1;return g},d})();o.default=l}),"./src/core/media-segment-info.js":(function(n,o,u){u.r(o),u.d(o,{SampleInfo:function(){return l},MediaSegmentInfo:function(){return d},IDRSampleList:function(){return h},MediaSegmentInfoList:function(){return c}});var l=(function(){function g(f,m,p,v,_){this.dts=f,this.pts=m,this.duration=p,this.originalDts=v,this.isSyncPoint=_,this.fileposition=null}return g})(),d=(function(){function g(){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 g.prototype.appendSyncPoint=function(f){f.isSyncPoint=!0,this.syncPoints.push(f)},g})(),h=(function(){function g(){this._list=[]}return g.prototype.clear=function(){this._list=[]},g.prototype.appendArray=function(f){var m=this._list;f.length!==0&&(m.length>0&&f[0].originalDts<m[m.length-1].originalDts&&this.clear(),Array.prototype.push.apply(m,f))},g.prototype.getLastSyncPointBeforeDts=function(f){if(this._list.length==0)return null;var m=this._list,p=0,v=m.length-1,_=0,E=0,x=v;for(f<m[0].dts&&(p=0,E=x+1);E<=x;)if(_=E+Math.floor((x-E)/2),_===v||f>=m[_].dts&&f<m[_+1].dts){p=_;break}else m[_].dts<f?E=_+1:x=_-1;return this._list[p]},g})(),c=(function(){function g(f){this._type=f,this._list=[],this._lastAppendLocation=-1}return Object.defineProperty(g.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),g.prototype.isEmpty=function(){return this._list.length===0},g.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},g.prototype._searchNearestSegmentBefore=function(f){var m=this._list;if(m.length===0)return-2;var p=m.length-1,v=0,_=0,E=p,x=0;if(f<m[0].originalBeginDts)return x=-1,x;for(;_<=E;)if(v=_+Math.floor((E-_)/2),v===p||f>m[v].lastSample.originalDts&&f<m[v+1].originalBeginDts){x=v;break}else m[v].originalBeginDts<f?_=v+1:E=v-1;return x},g.prototype._searchNearestSegmentAfter=function(f){return this._searchNearestSegmentBefore(f)+1},g.prototype.append=function(f){var m=this._list,p=f,v=this._lastAppendLocation,_=0;v!==-1&&v<m.length&&p.originalBeginDts>=m[v].lastSample.originalDts&&(v===m.length-1||v<m.length-1&&p.originalBeginDts<m[v+1].originalBeginDts)?_=v+1:m.length>0&&(_=this._searchNearestSegmentBefore(p.originalBeginDts)+1),this._lastAppendLocation=_,this._list.splice(_,0,p)},g.prototype.getLastSegmentBefore=function(f){var m=this._searchNearestSegmentBefore(f);return m>=0?this._list[m]:null},g.prototype.getLastSampleBefore=function(f){var m=this.getLastSegmentBefore(f);return m!=null?m.lastSample:null},g.prototype.getLastSyncPointBefore=function(f){for(var m=this._searchNearestSegmentBefore(f),p=this._list[m].syncPoints;p.length===0&&m>0;)m--,p=this._list[m].syncPoints;return p.length>0?p[p.length-1]:null},g})()}),"./src/core/mse-controller.js":(function(n,o,u){u.r(o);var l=u("./node_modules/events/events.js"),d=u.n(l),h=u("./src/utils/logger.js"),c=u("./src/utils/browser.js"),g=u("./src/core/mse-events.js"),f=u("./src/core/media-segment-info.js"),m=u("./src/utils/exception.js"),p=(function(){function v(_){this.TAG="MSEController",this._config=_,this._emitter=new(d()),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),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=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:[]},this._idrList=new f.IDRSampleList}return v.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},v.prototype.on=function(_,E){this._emitter.addListener(_,E)},v.prototype.off=function(_,E){this._emitter.removeListener(_,E)},v.prototype.attachMediaElement=function(_){if(this._mediaSource)throw new m.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var E=this._mediaSource=new window.MediaSource;E.addEventListener("sourceopen",this.e.onSourceOpen),E.addEventListener("sourceended",this.e.onSourceEnded),E.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=_,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),_.src=this._mediaSourceObjectURL},v.prototype.detachMediaElement=function(){if(this._mediaSource){var _=this._mediaSource;for(var E in this._sourceBuffers){var x=this._pendingSegments[E];x.splice(0,x.length),this._pendingSegments[E]=null,this._pendingRemoveRanges[E]=null,this._lastInitSegments[E]=null;var y=this._sourceBuffers[E];if(y){if(_.readyState!=="closed"){try{_.removeSourceBuffer(y)}catch(T){h.default.e(this.TAG,T.message)}y.removeEventListener("error",this.e.onSourceBufferError),y.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[E]=null,this._sourceBuffers[E]=null}}if(_.readyState==="open")try{_.endOfStream()}catch(T){h.default.e(this.TAG,T.message)}_.removeEventListener("sourceopen",this.e.onSourceOpen),_.removeEventListener("sourceended",this.e.onSourceEnded),_.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},v.prototype.appendInitSegment=function(_,E){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(_),this._pendingSegments[_.type].push(_);return}var x=_,y=""+x.container;x.codec&&x.codec.length>0&&(y+=";codecs="+x.codec);var T=!1;if(h.default.v(this.TAG,"Received Initialization Segment, mimeType: "+y),this._lastInitSegments[x.type]=x,y!==this._mimeTypes[x.type]){if(this._mimeTypes[x.type])h.default.v(this.TAG,"Notice: "+x.type+" mimeType changed, origin: "+this._mimeTypes[x.type]+", target: "+y);else{T=!0;try{var A=this._sourceBuffers[x.type]=this._mediaSource.addSourceBuffer(y);A.addEventListener("error",this.e.onSourceBufferError),A.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(L){h.default.e(this.TAG,L.message),this._emitter.emit(g.default.ERROR,{code:L.code,msg:L.message});return}}this._mimeTypes[x.type]=y}E||this._pendingSegments[x.type].push(x),T||this._sourceBuffers[x.type]&&!this._sourceBuffers[x.type].updating&&this._doAppendSegments(),c.default.safari&&x.container==="audio/mpeg"&&x.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=x.mediaDuration/1e3,this._updateMediaSourceDuration())},v.prototype.appendMediaSegment=function(_){var E=_;this._pendingSegments[E.type].push(E),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var x=this._sourceBuffers[E.type];x&&!x.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()},v.prototype.seek=function(_){for(var E in this._sourceBuffers)if(this._sourceBuffers[E]){var x=this._sourceBuffers[E];if(this._mediaSource.readyState==="open")try{x.abort()}catch(I){h.default.e(this.TAG,I.message)}this._idrList.clear();var y=this._pendingSegments[E];if(y.splice(0,y.length),this._mediaSource.readyState!=="closed"){for(var T=0;T<x.buffered.length;T++){var A=x.buffered.start(T),L=x.buffered.end(T);this._pendingRemoveRanges[E].push({start:A,end:L})}if(x.updating||this._doRemoveRanges(),c.default.safari){var R=this._lastInitSegments[E];R&&(this._pendingSegments[E].push(R),x.updating||this._doAppendSegments())}}}},v.prototype.endOfStream=function(){var _=this._mediaSource,E=this._sourceBuffers;if(!_||_.readyState!=="open"){_&&_.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}E.video&&E.video.updating||E.audio&&E.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,_.endOfStream())},v.prototype.getNearestKeyframe=function(_){return this._idrList.getLastSyncPointBeforeDts(_)},v.prototype._needCleanupSourceBuffer=function(){if(!this._config.autoCleanupSourceBuffer)return!1;var _=this._mediaElement.currentTime;for(var E in this._sourceBuffers){var x=this._sourceBuffers[E];if(x){var y=x.buffered;if(y.length>=1&&_-y.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},v.prototype._doCleanupSourceBuffer=function(){var _=this._mediaElement.currentTime;for(var E in this._sourceBuffers){var x=this._sourceBuffers[E];if(x){for(var y=x.buffered,T=!1,A=0;A<y.length;A++){var L=y.start(A),R=y.end(A);if(L<=_&&_<R+3){if(_-L>=this._config.autoCleanupMaxBackwardDuration){T=!0;var I=_-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[E].push({start:L,end:I})}}else R<_&&(T=!0,this._pendingRemoveRanges[E].push({start:L,end:R}))}T&&!x.updating&&this._doRemoveRanges()}}},v.prototype._updateMediaSourceDuration=function(){var _=this._sourceBuffers;if(!(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open")&&!(_.video&&_.video.updating||_.audio&&_.audio.updating)){var E=this._mediaSource.duration,x=this._pendingMediaDuration;x>0&&(isNaN(E)||x>E)&&(h.default.v(this.TAG,"Update MediaSource duration from "+E+" to "+x),this._mediaSource.duration=x),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},v.prototype._doRemoveRanges=function(){for(var _ in this._pendingRemoveRanges)if(!(!this._sourceBuffers[_]||this._sourceBuffers[_].updating))for(var E=this._sourceBuffers[_],x=this._pendingRemoveRanges[_];x.length&&!E.updating;){var y=x.shift();E.remove(y.start,y.end)}},v.prototype._doAppendSegments=function(){var _=this._pendingSegments;for(var E in _)if(!(!this._sourceBuffers[E]||this._sourceBuffers[E].updating)&&_[E].length>0){var x=_[E].shift();if(x.timestampOffset){var y=this._sourceBuffers[E].timestampOffset,T=x.timestampOffset/1e3,A=Math.abs(y-T);A>.1&&(h.default.v(this.TAG,"Update MPEG audio timestampOffset from "+y+" to "+T),this._sourceBuffers[E].timestampOffset=T),delete x.timestampOffset}if(!x.data||x.data.byteLength===0)continue;try{this._sourceBuffers[E].appendBuffer(x.data),this._isBufferFull=!1,E==="video"&&x.hasOwnProperty("info")&&this._idrList.appendArray(x.info.syncPoints)}catch(L){this._pendingSegments[E].unshift(x),L.code===22?(this._isBufferFull||this._emitter.emit(g.default.BUFFER_FULL),this._isBufferFull=!0):(h.default.e(this.TAG,L.message),this._emitter.emit(g.default.ERROR,{code:L.code,msg:L.message}))}}},v.prototype._onSourceOpen=function(){if(h.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var _=this._pendingSourceBufferInit;_.length;){var E=_.shift();this.appendInitSegment(E,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(g.default.SOURCE_OPEN)},v.prototype._onSourceEnded=function(){h.default.v(this.TAG,"MediaSource onSourceEnded")},v.prototype._onSourceClose=function(){h.default.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))},v.prototype._hasPendingSegments=function(){var _=this._pendingSegments;return _.video.length>0||_.audio.length>0},v.prototype._hasPendingRemoveRanges=function(){var _=this._pendingRemoveRanges;return _.video.length>0||_.audio.length>0},v.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(g.default.UPDATE_END)},v.prototype._onSourceBufferError=function(_){h.default.e(this.TAG,"SourceBuffer Error: "+_)},v})();o.default=p}),"./src/core/mse-events.js":(function(n,o,u){u.r(o);var l={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};o.default=l}),"./src/core/transmuxer.js":(function(n,o,u){u.r(o);var l=u("./node_modules/events/events.js"),d=u.n(l),h=u("./node_modules/webworkify-webpack/index.js"),c=u.n(h),g=u("./src/utils/logger.js"),f=u("./src/utils/logging-control.js"),m=u("./src/core/transmuxing-controller.js"),p=u("./src/core/transmuxing-events.js"),v=u("./src/core/media-info.js"),_=(function(){function E(x,y){if(this.TAG="Transmuxer",this._emitter=new(d()),y.enableWorker&&typeof Worker!="undefined")try{this._worker=c()("./src/core/transmuxing-worker.js"),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[x,y]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},f.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:f.default.getConfig()})}catch(A){g.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new m.default(x,y)}else this._controller=new m.default(x,y);if(this._controller){var T=this._controller;T.on(p.default.IO_ERROR,this._onIOError.bind(this)),T.on(p.default.DEMUX_ERROR,this._onDemuxError.bind(this)),T.on(p.default.INIT_SEGMENT,this._onInitSegment.bind(this)),T.on(p.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),T.on(p.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),T.on(p.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),T.on(p.default.MEDIA_INFO,this._onMediaInfo.bind(this)),T.on(p.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),T.on(p.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),T.on(p.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),T.on(p.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return E.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),f.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},E.prototype.on=function(x,y){this._emitter.addListener(x,y)},E.prototype.off=function(x,y){this._emitter.removeListener(x,y)},E.prototype.hasWorker=function(){return this._worker!=null},E.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},E.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},E.prototype.seek=function(x){this._worker?this._worker.postMessage({cmd:"seek",param:x}):this._controller.seek(x)},E.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},E.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},E.prototype._onInitSegment=function(x,y){var T=this;Promise.resolve().then(function(){T._emitter.emit(p.default.INIT_SEGMENT,x,y)})},E.prototype._onMediaSegment=function(x,y){var T=this;Promise.resolve().then(function(){T._emitter.emit(p.default.MEDIA_SEGMENT,x,y)})},E.prototype._onLoadingComplete=function(){var x=this;Promise.resolve().then(function(){x._emitter.emit(p.default.LOADING_COMPLETE)})},E.prototype._onRecoveredEarlyEof=function(){var x=this;Promise.resolve().then(function(){x._emitter.emit(p.default.RECOVERED_EARLY_EOF)})},E.prototype._onMediaInfo=function(x){var y=this;Promise.resolve().then(function(){y._emitter.emit(p.default.MEDIA_INFO,x)})},E.prototype._onMetaDataArrived=function(x){var y=this;Promise.resolve().then(function(){y._emitter.emit(p.default.METADATA_ARRIVED,x)})},E.prototype._onScriptDataArrived=function(x){var y=this;Promise.resolve().then(function(){y._emitter.emit(p.default.SCRIPTDATA_ARRIVED,x)})},E.prototype._onStatisticsInfo=function(x){var y=this;Promise.resolve().then(function(){y._emitter.emit(p.default.STATISTICS_INFO,x)})},E.prototype._onIOError=function(x,y){var T=this;Promise.resolve().then(function(){T._emitter.emit(p.default.IO_ERROR,x,y)})},E.prototype._onDemuxError=function(x,y){var T=this;Promise.resolve().then(function(){T._emitter.emit(p.default.DEMUX_ERROR,x,y)})},E.prototype._onRecommendSeekpoint=function(x){var y=this;Promise.resolve().then(function(){y._emitter.emit(p.default.RECOMMEND_SEEKPOINT,x)})},E.prototype._onLoggingConfigChanged=function(x){this._worker&&this._worker.postMessage({cmd:"logging_config",param:x})},E.prototype._onWorkerMessage=function(x){var y=x.data,T=y.data;if(y.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(y.msg){case p.default.INIT_SEGMENT:case p.default.MEDIA_SEGMENT:this._emitter.emit(y.msg,T.type,T.data);break;case p.default.LOADING_COMPLETE:case p.default.RECOVERED_EARLY_EOF:this._emitter.emit(y.msg);break;case p.default.MEDIA_INFO:Object.setPrototypeOf(T,v.default.prototype),this._emitter.emit(y.msg,T);break;case p.default.METADATA_ARRIVED:case p.default.SCRIPTDATA_ARRIVED:case p.default.STATISTICS_INFO:this._emitter.emit(y.msg,T);break;case p.default.IO_ERROR:case p.default.DEMUX_ERROR:this._emitter.emit(y.msg,T.type,T.info);break;case p.default.RECOMMEND_SEEKPOINT:this._emitter.emit(y.msg,T);break;case"logcat_callback":g.default.emitter.emit("log",T.type,T.logcat);break}},E})();o.default=_}),"./src/core/transmuxing-controller.js":(function(n,o,u){u.r(o);var l=u("./node_modules/events/events.js"),d=u.n(l),h=u("./src/utils/logger.js"),c=u("./src/utils/browser.js"),g=u("./src/core/media-info.js"),f=u("./src/demux/flv-demuxer.js"),m=u("./src/remux/mp4-remuxer.js"),p=u("./src/demux/demux-errors.js"),v=u("./src/io/io-controller.js"),_=u("./src/core/transmuxing-events.js"),E=(function(){function x(y,T){this.TAG="TransmuxingController",this._emitter=new(d()),this._config=T,y.segments||(y.segments=[{duration:y.duration,filesize:y.filesize,url:y.url}]),typeof y.cors!="boolean"&&(y.cors=!0),typeof y.withCredentials!="boolean"&&(y.withCredentials=!1),this._mediaDataSource=y,this._currentSegmentIndex=0;var A=0;this._mediaDataSource.segments.forEach(function(L){L.timestampBase=A,A+=L.duration,L.cors=y.cors,L.withCredentials=y.withCredentials,T.referrerPolicy&&(L.referrerPolicy=T.referrerPolicy)}),!isNaN(A)&&this._mediaDataSource.duration!==A&&(this._mediaDataSource.duration=A),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return x.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},x.prototype.on=function(y,T){this._emitter.addListener(y,T)},x.prototype.off=function(y,T){this._emitter.removeListener(y,T)},x.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},x.prototype._loadSegment=function(y,T){this._currentSegmentIndex=y;var A=this._mediaDataSource.segments[y],L=this._ioctl=new v.default(A,this._config,y);L.onError=this._onIOException.bind(this),L.onSeeked=this._onIOSeeked.bind(this),L.onComplete=this._onIOComplete.bind(this),L.onRedirect=this._onIORedirect.bind(this),L.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),T?this._demuxer.bindDataSource(this._ioctl):L.onDataArrival=this._onInitChunkArrival.bind(this),L.open(T)},x.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},x.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},x.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},x.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},x.prototype.seek=function(y){if(!(this._mediaInfo==null||!this._mediaInfo.isSeekable())){var T=this._searchSegmentIndexContains(y);if(T===this._currentSegmentIndex){var A=this._mediaInfo.segments[T];if(A==null)this._pendingSeekTime=y;else{var L=A.getNearestKeyframe(y);this._remuxer.seek(L.milliseconds),this._ioctl.seek(L.fileposition),this._pendingResolveSeekPoint=L.milliseconds}}else{var R=this._mediaInfo.segments[T];if(R==null)this._pendingSeekTime=y,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(T);else{var L=R.getNearestKeyframe(y);this._internalAbort(),this._remuxer.seek(y),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[T].timestampBase,this._loadSegment(T,L.fileposition),this._pendingResolveSeekPoint=L.milliseconds,this._reportSegmentMediaInfo(T)}}this._enableStatisticsReporter()}},x.prototype._searchSegmentIndexContains=function(y){for(var T=this._mediaDataSource.segments,A=T.length-1,L=0;L<T.length;L++)if(y<T[L].timestampBase){A=L-1;break}return A},x.prototype._onInitChunkArrival=function(y,T){var A=this,L=null,R=0;if(T>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,R=this._demuxer.parseChunks(y,T);else if((L=f.default.probe(y)).match){this._demuxer=new f.default(L,this._config),this._remuxer||(this._remuxer=new m.default(this._config));var I=this._mediaDataSource;I.duration!=null&&!isNaN(I.duration)&&(this._demuxer.overridedDuration=I.duration),typeof I.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=I.hasAudio),typeof I.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=I.hasVideo),this._demuxer.timestampBase=I.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),R=this._demuxer.parseChunks(y,T)}else L=null,h.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){A._internalAbort()}),this._emitter.emit(_.default.DEMUX_ERROR,p.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),R=0;return R},x.prototype._onMediaInfo=function(y){var T=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},y),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,g.default.prototype));var A=Object.assign({},y);Object.setPrototypeOf(A,g.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=A,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var L=T._pendingSeekTime;T._pendingSeekTime=null,T.seek(L)})},x.prototype._onMetaDataArrived=function(y){this._emitter.emit(_.default.METADATA_ARRIVED,y)},x.prototype._onScriptDataArrived=function(y){this._emitter.emit(_.default.SCRIPTDATA_ARRIVED,y)},x.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},x.prototype._onIOComplete=function(y){var T=y,A=T+1;A<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(A)):(this._remuxer.flushStashedSamples(),this._emitter.emit(_.default.LOADING_COMPLETE),this._disableStatisticsReporter())},x.prototype._onIORedirect=function(y){var T=this._ioctl.extraData;this._mediaDataSource.segments[T].redirectedURL=y},x.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(_.default.RECOVERED_EARLY_EOF)},x.prototype._onIOException=function(y,T){h.default.e(this.TAG,"IOException: type = "+y+", code = "+T.code+", msg = "+T.msg),this._emitter.emit(_.default.IO_ERROR,y,T),this._disableStatisticsReporter()},x.prototype._onDemuxException=function(y,T){h.default.e(this.TAG,"DemuxException: type = "+y+", info = "+T),this._emitter.emit(_.default.DEMUX_ERROR,y,T)},x.prototype._onRemuxerInitSegmentArrival=function(y,T){this._emitter.emit(_.default.INIT_SEGMENT,y,T)},x.prototype._onRemuxerMediaSegmentArrival=function(y,T){if(this._pendingSeekTime==null&&(this._emitter.emit(_.default.MEDIA_SEGMENT,y,T),this._pendingResolveSeekPoint!=null&&y==="video")){var A=T.info.syncPoints,L=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,c.default.safari&&A.length>0&&A[0].originalDts===L&&(L=A[0].pts),this._emitter.emit(_.default.RECOMMEND_SEEKPOINT,L)}},x.prototype._enableStatisticsReporter=function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},x.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},x.prototype._reportSegmentMediaInfo=function(y){var T=this._mediaInfo.segments[y],A=Object.assign({},T);A.duration=this._mediaInfo.duration,A.segmentCount=this._mediaInfo.segmentCount,delete A.segments,delete A.keyframesIndex,this._emitter.emit(_.default.MEDIA_INFO,A)},x.prototype._reportStatisticsInfo=function(){var y={};y.url=this._ioctl.currentURL,y.hasRedirect=this._ioctl.hasRedirect,y.hasRedirect&&(y.redirectedURL=this._ioctl.currentRedirectedURL),y.speed=this._ioctl.currentSpeed,y.loaderType=this._ioctl.loaderType,y.currentSegmentIndex=this._currentSegmentIndex,y.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(_.default.STATISTICS_INFO,y)},x})();o.default=E}),"./src/core/transmuxing-events.js":(function(n,o,u){u.r(o);var l={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};o.default=l}),"./src/core/transmuxing-worker.js":(function(n,o,u){u.r(o);var l=u("./src/utils/logging-control.js"),d=u("./src/utils/polyfill.js"),h=u("./src/core/transmuxing-controller.js"),c=u("./src/core/transmuxing-events.js"),g=function(f){var m=null,p=b.bind(this);d.default.install(),f.addEventListener("message",function(P){switch(P.data.cmd){case"init":m=new h.default(P.data.param[0],P.data.param[1]),m.on(c.default.IO_ERROR,R.bind(this)),m.on(c.default.DEMUX_ERROR,I.bind(this)),m.on(c.default.INIT_SEGMENT,v.bind(this)),m.on(c.default.MEDIA_SEGMENT,_.bind(this)),m.on(c.default.LOADING_COMPLETE,E.bind(this)),m.on(c.default.RECOVERED_EARLY_EOF,x.bind(this)),m.on(c.default.MEDIA_INFO,y.bind(this)),m.on(c.default.METADATA_ARRIVED,T.bind(this)),m.on(c.default.SCRIPTDATA_ARRIVED,A.bind(this)),m.on(c.default.STATISTICS_INFO,L.bind(this)),m.on(c.default.RECOMMEND_SEEKPOINT,D.bind(this));break;case"destroy":m&&(m.destroy(),m=null),f.postMessage({msg:"destroyed"});break;case"start":m.start();break;case"stop":m.stop();break;case"seek":m.seek(P.data.param);break;case"pause":m.pause();break;case"resume":m.resume();break;case"logging_config":{var C=P.data.param;l.default.applyConfig(C),C.enableCallback===!0?l.default.addLogListener(p):l.default.removeLogListener(p);break}}});function v(P,C){var k={msg:c.default.INIT_SEGMENT,data:{type:P,data:C}};f.postMessage(k,[C.data])}function _(P,C){var k={msg:c.default.MEDIA_SEGMENT,data:{type:P,data:C}};f.postMessage(k,[C.data])}function E(){var P={msg:c.default.LOADING_COMPLETE};f.postMessage(P)}function x(){var P={msg:c.default.RECOVERED_EARLY_EOF};f.postMessage(P)}function y(P){var C={msg:c.default.MEDIA_INFO,data:P};f.postMessage(C)}function T(P){var C={msg:c.default.METADATA_ARRIVED,data:P};f.postMessage(C)}function A(P){var C={msg:c.default.SCRIPTDATA_ARRIVED,data:P};f.postMessage(C)}function L(P){var C={msg:c.default.STATISTICS_INFO,data:P};f.postMessage(C)}function R(P,C){f.postMessage({msg:c.default.IO_ERROR,data:{type:P,info:C}})}function I(P,C){f.postMessage({msg:c.default.DEMUX_ERROR,data:{type:P,info:C}})}function D(P){f.postMessage({msg:c.default.RECOMMEND_SEEKPOINT,data:P})}function b(P,C){f.postMessage({msg:"logcat_callback",data:{type:P,logcat:C}})}};o.default=g}),"./src/demux/amf-parser.js":(function(n,o,u){u.r(o);var l=u("./src/utils/logger.js"),d=u("./src/utils/utf8-conv.js"),h=u("./src/utils/exception.js"),c=(function(){var f=new ArrayBuffer(2);return new DataView(f).setInt16(0,256,!0),new Int16Array(f)[0]===256})(),g=(function(){function f(){}return f.parseScriptData=function(m,p,v){var _={};try{var E=f.parseValue(m,p,v),x=f.parseValue(m,p+E.size,v-E.size);_[E.data]=x.data}catch(y){l.default.e("AMF",y.toString())}return _},f.parseObject=function(m,p,v){if(v<3)throw new h.IllegalStateException("Data not enough when parse ScriptDataObject");var _=f.parseString(m,p,v),E=f.parseValue(m,p+_.size,v-_.size),x=E.objectEnd;return{data:{name:_.data,value:E.data},size:_.size+E.size,objectEnd:x}},f.parseVariable=function(m,p,v){return f.parseObject(m,p,v)},f.parseString=function(m,p,v){if(v<2)throw new h.IllegalStateException("Data not enough when parse String");var _=new DataView(m,p,v),E=_.getUint16(0,!c),x;return E>0?x=(0,d.default)(new Uint8Array(m,p+2,E)):x="",{data:x,size:2+E}},f.parseLongString=function(m,p,v){if(v<4)throw new h.IllegalStateException("Data not enough when parse LongString");var _=new DataView(m,p,v),E=_.getUint32(0,!c),x;return E>0?x=(0,d.default)(new Uint8Array(m,p+4,E)):x="",{data:x,size:4+E}},f.parseDate=function(m,p,v){if(v<10)throw new h.IllegalStateException("Data size invalid when parse Date");var _=new DataView(m,p,v),E=_.getFloat64(0,!c),x=_.getInt16(8,!c);return E+=x*60*1e3,{data:new Date(E),size:10}},f.parseValue=function(m,p,v){if(v<1)throw new h.IllegalStateException("Data not enough when parse Value");var _=new DataView(m,p,v),E=1,x=_.getUint8(0),y,T=!1;try{switch(x){case 0:y=_.getFloat64(1,!c),E+=8;break;case 1:{var A=_.getUint8(1);y=!!A,E+=1;break}case 2:{var L=f.parseString(m,p+1,v-1);y=L.data,E+=L.size;break}case 3:{y={};var R=0;for((_.getUint32(v-4,!c)&16777215)===9&&(R=3);E<v-4;){var I=f.parseObject(m,p+E,v-E-R);if(I.objectEnd)break;y[I.data.name]=I.data.value,E+=I.size}if(E<=v-3){var D=_.getUint32(E-1,!c)&16777215;D===9&&(E+=3)}break}case 8:{y={},E+=4;var R=0;for((_.getUint32(v-4,!c)&16777215)===9&&(R=3);E<v-8;){var b=f.parseVariable(m,p+E,v-E-R);if(b.objectEnd)break;y[b.data.name]=b.data.value,E+=b.size}if(E<=v-3){var D=_.getUint32(E-1,!c)&16777215;D===9&&(E+=3)}break}case 9:y=void 0,E=1,T=!0;break;case 10:{y=[];var P=_.getUint32(1,!c);E+=4;for(var C=0;C<P;C++){var k=f.parseValue(m,p+E,v-E);y.push(k.data),E+=k.size}break}case 11:{var O=f.parseDate(m,p+1,v-1);y=O.data,E+=O.size;break}case 12:{var F=f.parseString(m,p+1,v-1);y=F.data,E+=F.size;break}default:E=v,l.default.w("AMF","Unsupported AMF value type "+x)}}catch(U){l.default.e("AMF",U.toString())}return{data:y,size:E,objectEnd:T}},f})();o.default=g}),"./src/demux/demux-errors.js":(function(n,o,u){u.r(o);var l={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};o.default=l}),"./src/demux/exp-golomb.js":(function(n,o,u){u.r(o);var l=u("./src/utils/exception.js"),d=(function(){function h(c){this.TAG="ExpGolomb",this._buffer=c,this._buffer_index=0,this._total_bytes=c.byteLength,this._total_bits=c.byteLength*8,this._current_word=0,this._current_word_bits_left=0}return h.prototype.destroy=function(){this._buffer=null},h.prototype._fillCurrentWord=function(){var c=this._total_bytes-this._buffer_index;if(c<=0)throw new l.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var g=Math.min(4,c),f=new Uint8Array(4);f.set(this._buffer.subarray(this._buffer_index,this._buffer_index+g)),this._current_word=new DataView(f.buffer).getUint32(0,!1),this._buffer_index+=g,this._current_word_bits_left=g*8},h.prototype.readBits=function(c){if(c>32)throw new l.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(c<=this._current_word_bits_left){var g=this._current_word>>>32-c;return this._current_word<<=c,this._current_word_bits_left-=c,g}var f=this._current_word_bits_left?this._current_word:0;f=f>>>32-this._current_word_bits_left;var m=c-this._current_word_bits_left;this._fillCurrentWord();var p=Math.min(m,this._current_word_bits_left),v=this._current_word>>>32-p;return this._current_word<<=p,this._current_word_bits_left-=p,f=f<<p|v,f},h.prototype.readBool=function(){return this.readBits(1)===1},h.prototype.readByte=function(){return this.readBits(8)},h.prototype._skipLeadingZero=function(){var c;for(c=0;c<this._current_word_bits_left;c++)if((this._current_word&2147483648>>>c)!==0)return this._current_word<<=c,this._current_word_bits_left-=c,c;return this._fillCurrentWord(),c+this._skipLeadingZero()},h.prototype.readUEG=function(){var c=this._skipLeadingZero();return this.readBits(c+1)-1},h.prototype.readSEG=function(){var c=this.readUEG();return c&1?c+1>>>1:-1*(c>>>1)},h})();o.default=d}),"./src/demux/flv-demuxer.js":(function(n,o,u){u.r(o);var l=u("./src/utils/logger.js"),d=u("./src/demux/amf-parser.js"),h=u("./src/demux/sps-parser.js"),c=u("./src/demux/demux-errors.js"),g=u("./src/core/media-info.js"),f=u("./src/utils/exception.js");function m(v,_){return v[_]<<24|v[_+1]<<16|v[_+2]<<8|v[_+3]}var p=(function(){function v(_,E){this.TAG="FLVDemuxer",this._config=E,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=_.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=_.hasAudioTrack,this._hasVideo=_.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new g.default,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 x=new ArrayBuffer(2);return new DataView(x).setInt16(0,256,!0),new Int16Array(x)[0]===256})()}return v.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},v.probe=function(_){var E=new Uint8Array(_),x={match:!1};if(E[0]!==70||E[1]!==76||E[2]!==86||E[3]!==1)return x;var y=(E[4]&4)>>>2!==0,T=(E[4]&1)!==0,A=m(E,5);return A<9?x:{match:!0,consumed:A,dataOffset:A,hasAudioTrack:y,hasVideoTrack:T}},v.prototype.bindDataSource=function(_){return _.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(v.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(_){this._onTrackMetadata=_},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(_){this._onMediaInfo=_},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(_){this._onMetaDataArrived=_},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(_){this._onScriptDataArrived=_},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onError",{get:function(){return this._onError},set:function(_){this._onError=_},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(_){this._onDataAvailable=_},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(_){this._timestampBase=_},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"overridedDuration",{get:function(){return this._duration},set:function(_){this._durationOverrided=!0,this._duration=_,this._mediaInfo.duration=_},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"overridedHasAudio",{set:function(_){this._hasAudioFlagOverrided=!0,this._hasAudio=_,this._mediaInfo.hasAudio=_},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"overridedHasVideo",{set:function(_){this._hasVideoFlagOverrided=!0,this._hasVideo=_,this._mediaInfo.hasVideo=_},enumerable:!1,configurable:!0}),v.prototype.resetMediaInfo=function(){this._mediaInfo=new g.default},v.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1},v.prototype.parseChunks=function(_,E){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new f.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var x=0,y=this._littleEndian;if(E===0)if(_.byteLength>13){var T=v.probe(_);x=T.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,E+x!==this._dataOffset&&l.default.w(this.TAG,"First time parsing but chunk byteStart invalid!");var A=new DataView(_,x),L=A.getUint32(0,!y);L!==0&&l.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),x+=4}for(;x<_.byteLength;){this._dispatch=!0;var A=new DataView(_,x);if(x+11+4>_.byteLength)break;var R=A.getUint8(0),I=A.getUint32(0,!y)&16777215;if(x+11+I+4>_.byteLength)break;if(R!==8&&R!==9&&R!==18){l.default.w(this.TAG,"Unsupported tag type "+R+", skipped"),x+=11+I+4;continue}var D=A.getUint8(4),b=A.getUint8(5),P=A.getUint8(6),C=A.getUint8(7),k=P|b<<8|D<<16|C<<24,O=A.getUint32(7,!y)&16777215;O!==0&&l.default.w(this.TAG,"Meet tag which has StreamID != 0!");var F=x+11;switch(R){case 8:this._parseAudioData(_,F,I,k);break;case 9:this._parseVideoData(_,F,I,k,E+x);break;case 18:this._parseScriptData(_,F,I);break}var U=A.getUint32(11+I,!y);U!==11+I&&l.default.w(this.TAG,"Invalid PrevTagSize "+U),x+=11+I+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),x},v.prototype._parseScriptData=function(_,E,x){var y=d.default.parseScriptData(_,E,x);if(y.hasOwnProperty("onMetaData")){if(y.onMetaData==null||typeof y.onMetaData!="object"){l.default.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&l.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=y;var T=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},T)),typeof T.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=T.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof T.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=T.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof T.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=T.audiodatarate),typeof T.videodatarate=="number"&&(this._mediaInfo.videoDataRate=T.videodatarate),typeof T.width=="number"&&(this._mediaInfo.width=T.width),typeof T.height=="number"&&(this._mediaInfo.height=T.height),typeof T.duration=="number"){if(!this._durationOverrided){var A=Math.floor(T.duration*this._timescale);this._duration=A,this._mediaInfo.duration=A}}else this._mediaInfo.duration=0;if(typeof T.framerate=="number"){var L=Math.floor(T.framerate*1e3);if(L>0){var R=L/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=R,this._referenceFrameRate.fps_num=L,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=R}}if(typeof T.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var I=T.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(I),T.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=T,l.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(y).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},y))},v.prototype._parseKeyframesIndex=function(_){for(var E=[],x=[],y=1;y<_.times.length;y++){var T=this._timestampBase+Math.floor(_.times[y]*1e3);E.push(T),x.push(_.filepositions[y])}return{times:E,filepositions:x}},v.prototype._parseAudioData=function(_,E,x,y){if(x<=1){l.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(!(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)){this._littleEndian;var T=new DataView(_,E,x),A=T.getUint8(0),L=A>>>4;if(L!==2&&L!==10){this._onError(c.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+L);return}var R=0,I=(A&12)>>>2;if(I>=0&&I<=4)R=this._flvSoundRateTable[I];else{this._onError(c.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+I);return}var D=A&1,b=this._audioMetadata,P=this._audioTrack;if(b||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),b=this._audioMetadata={},b.type="audio",b.id=P.id,b.timescale=this._timescale,b.duration=this._duration,b.audioSampleRate=R,b.channelCount=D===0?1:2),L===10){var C=this._parseAACAudioData(_,E+1,x-1);if(C==null)return;if(C.packetType===0){b.config&&l.default.w(this.TAG,"Found another AudioSpecificConfig!");var k=C.data;b.audioSampleRate=k.samplingRate,b.channelCount=k.channelCount,b.codec=k.codec,b.originalCodec=k.originalCodec,b.config=k.config,b.refSampleDuration=1024/b.audioSampleRate*b.timescale,l.default.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",b);var O=this._mediaInfo;O.audioCodec=b.originalCodec,O.audioSampleRate=b.audioSampleRate,O.audioChannelCount=b.channelCount,O.hasVideo?O.videoCodec!=null&&(O.mimeType='video/x-flv; codecs="'+O.videoCodec+","+O.audioCodec+'"'):O.mimeType='video/x-flv; codecs="'+O.audioCodec+'"',O.isComplete()&&this._onMediaInfo(O)}else if(C.packetType===1){var F=this._timestampBase+y,U={unit:C.data,length:C.data.byteLength,dts:F,pts:F};P.samples.push(U),P.length+=C.data.length}else l.default.e(this.TAG,"Flv: Unsupported AAC data type "+C.packetType)}else if(L===2){if(!b.codec){var k=this._parseMP3AudioData(_,E+1,x-1,!0);if(k==null)return;b.audioSampleRate=k.samplingRate,b.channelCount=k.channelCount,b.codec=k.codec,b.originalCodec=k.originalCodec,b.refSampleDuration=1152/b.audioSampleRate*b.timescale,l.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",b);var O=this._mediaInfo;O.audioCodec=b.codec,O.audioSampleRate=b.audioSampleRate,O.audioChannelCount=b.channelCount,O.audioDataRate=k.bitRate,O.hasVideo?O.videoCodec!=null&&(O.mimeType='video/x-flv; codecs="'+O.videoCodec+","+O.audioCodec+'"'):O.mimeType='video/x-flv; codecs="'+O.audioCodec+'"',O.isComplete()&&this._onMediaInfo(O)}var G=this._parseMP3AudioData(_,E+1,x-1,!1);if(G==null)return;var F=this._timestampBase+y,V={unit:G,length:G.byteLength,dts:F,pts:F};P.samples.push(V),P.length+=G.length}}},v.prototype._parseAACAudioData=function(_,E,x){if(x<=1){l.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var y={},T=new Uint8Array(_,E,x);return y.packetType=T[0],T[0]===0?y.data=this._parseAACAudioSpecificConfig(_,E+1,x-1):y.data=T.subarray(1),y},v.prototype._parseAACAudioSpecificConfig=function(_,E,x){var y=new Uint8Array(_,E,x),T=null,A=0,L=0,R=0,I=null;if(A=L=y[0]>>>3,R=(y[0]&7)<<1|y[1]>>>7,R<0||R>=this._mpegSamplingRates.length){this._onError(c.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var D=this._mpegSamplingRates[R],b=(y[1]&120)>>>3;if(b<0||b>=8){this._onError(c.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}A===5&&(I=(y[1]&7)<<1|y[2]>>>7,(y[2]&124)>>>2);var P=self.navigator.userAgent.toLowerCase();return P.indexOf("firefox")!==-1?R>=6?(A=5,T=new Array(4),I=R-3):(A=2,T=new Array(2),I=R):P.indexOf("android")!==-1?(A=2,T=new Array(2),I=R):(A=5,I=R,T=new Array(4),R>=6?I=R-3:b===1&&(A=2,T=new Array(2),I=R)),T[0]=A<<3,T[0]|=(R&15)>>>1,T[1]=(R&15)<<7,T[1]|=(b&15)<<3,A===5&&(T[1]|=(I&15)>>>1,T[2]=(I&1)<<7,T[2]|=8,T[3]=0),{config:T,samplingRate:D,channelCount:b,codec:"mp4a.40."+A,originalCodec:"mp4a.40."+L}},v.prototype._parseMP3AudioData=function(_,E,x,y){if(x<4){l.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}this._littleEndian;var T=new Uint8Array(_,E,x),A=null;if(y){if(T[0]!==255)return;var L=T[1]>>>3&3,R=(T[1]&6)>>1,I=(T[2]&240)>>>4,D=(T[2]&12)>>>2,b=T[3]>>>6&3,P=b!==3?2:1,C=0,k=0,O="mp3";switch(L){case 0:C=this._mpegAudioV25SampleRateTable[D];break;case 2:C=this._mpegAudioV20SampleRateTable[D];break;case 3:C=this._mpegAudioV10SampleRateTable[D];break}switch(R){case 1:I<this._mpegAudioL3BitRateTable.length&&(k=this._mpegAudioL3BitRateTable[I]);break;case 2:I<this._mpegAudioL2BitRateTable.length&&(k=this._mpegAudioL2BitRateTable[I]);break;case 3:I<this._mpegAudioL1BitRateTable.length&&(k=this._mpegAudioL1BitRateTable[I]);break}A={bitRate:k,samplingRate:C,channelCount:P,codec:O,originalCodec:O}}else A=T;return A},v.prototype._parseVideoData=function(_,E,x,y,T){if(x<=1){l.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(!(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)){var A=new Uint8Array(_,E,x)[0],L=(A&240)>>>4,R=A&15;if(R!==7){this._onError(c.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+R);return}this._parseAVCVideoPacket(_,E+1,x-1,y,T,L)}},v.prototype._parseAVCVideoPacket=function(_,E,x,y,T,A){if(x<4){l.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var L=this._littleEndian,R=new DataView(_,E,x),I=R.getUint8(0),D=R.getUint32(0,!L)&16777215,b=D<<8>>8;if(I===0)this._parseAVCDecoderConfigurationRecord(_,E+4,x-4);else if(I===1)this._parseAVCVideoData(_,E+4,x-4,y,T,A,b);else if(I!==2){this._onError(c.default.FORMAT_ERROR,"Flv: Invalid video packet type "+I);return}},v.prototype._parseAVCDecoderConfigurationRecord=function(_,E,x){if(x<7){l.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var y=this._videoMetadata,T=this._videoTrack,A=this._littleEndian,L=new DataView(_,E,x);y?typeof y.avcc!="undefined"&&l.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),y=this._videoMetadata={},y.type="video",y.id=T.id,y.timescale=this._timescale,y.duration=this._duration);var R=L.getUint8(0),I=L.getUint8(1);if(L.getUint8(2),L.getUint8(3),R!==1||I===0){this._onError(c.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(L.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(c.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));return}var D=L.getUint8(5)&31;if(D===0){this._onError(c.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else D>1&&l.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+D);for(var b=6,P=0;P<D;P++){var C=L.getUint16(b,!A);if(b+=2,C!==0){var k=new Uint8Array(_,E+b,C);b+=C;var O=h.default.parseSPS(k);if(P===0){y.codecWidth=O.codec_size.width,y.codecHeight=O.codec_size.height,y.presentWidth=O.present_size.width,y.presentHeight=O.present_size.height,y.profile=O.profile_string,y.level=O.level_string,y.bitDepth=O.bit_depth,y.chromaFormat=O.chroma_format,y.sarRatio=O.sar_ratio,y.frameRate=O.frame_rate,(O.frame_rate.fixed===!1||O.frame_rate.fps_num===0||O.frame_rate.fps_den===0)&&(y.frameRate=this._referenceFrameRate);var F=y.frameRate.fps_den,U=y.frameRate.fps_num;y.refSampleDuration=y.timescale*(F/U);for(var G=k.subarray(1,4),V="avc1.",$=0;$<3;$++){var K=G[$].toString(16);K.length<2&&(K="0"+K),V+=K}y.codec=V;var H=this._mediaInfo;H.width=y.codecWidth,H.height=y.codecHeight,H.fps=y.frameRate.fps,H.profile=y.profile,H.level=y.level,H.refFrames=O.ref_frames,H.chromaFormat=O.chroma_format_string,H.sarNum=y.sarRatio.width,H.sarDen=y.sarRatio.height,H.videoCodec=V,H.hasAudio?H.audioCodec!=null&&(H.mimeType='video/x-flv; codecs="'+H.videoCodec+","+H.audioCodec+'"'):H.mimeType='video/x-flv; codecs="'+H.videoCodec+'"',H.isComplete()&&this._onMediaInfo(H)}}}var X=L.getUint8(b);if(X===0){this._onError(c.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else X>1&&l.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+X);b++;for(var P=0;P<X;P++){var C=L.getUint16(b,!A);b+=2,C!==0&&(b+=C)}y.avcc=new Uint8Array(x),y.avcc.set(new Uint8Array(_,E,x),0),l.default.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",y)},v.prototype._parseAVCVideoData=function(_,E,x,y,T,A,L){for(var R=this._littleEndian,I=new DataView(_,E,x),D=[],b=0,P=0,C=this._naluLengthSize,k=this._timestampBase+y,O=A===1;P<x;){if(P+4>=x){l.default.w(this.TAG,"Malformed Nalu near timestamp "+k+", offset = "+P+", dataSize = "+x);break}var F=I.getUint32(P,!R);if(C===3&&(F>>>=8),F>x-C){l.default.w(this.TAG,"Malformed Nalus near timestamp "+k+", NaluSize > DataSize!");return}var U=I.getUint8(P+C)&31;U===5&&(O=!0);var G=new Uint8Array(_,E+P,C+F),V={type:U,data:G};D.push(V),b+=G.byteLength,P+=C+F}if(D.length){var $=this._videoTrack,K={units:D,length:b,isKeyframe:O,dts:k,cts:L,pts:k+L};O&&(K.fileposition=T),$.samples.push(K),$.length+=b}},v})();o.default=p}),"./src/demux/sps-parser.js":(function(n,o,u){u.r(o);var l=u("./src/demux/exp-golomb.js"),d=(function(){function h(){}return h._ebsp2rbsp=function(c){for(var g=c,f=g.byteLength,m=new Uint8Array(f),p=0,v=0;v<f;v++)v>=2&&g[v]===3&&g[v-1]===0&&g[v-2]===0||(m[p]=g[v],p++);return new Uint8Array(m.buffer,0,p)},h.parseSPS=function(c){var g=h._ebsp2rbsp(c),f=new l.default(g);f.readByte();var m=f.readByte();f.readByte();var p=f.readByte();f.readUEG();var v=h.getProfileString(m),_=h.getLevelString(p),E=1,x=420,y=[0,420,422,444],T=8;if((m===100||m===110||m===122||m===244||m===44||m===83||m===86||m===118||m===128||m===138||m===144)&&(E=f.readUEG(),E===3&&f.readBits(1),E<=3&&(x=y[E]),T=f.readUEG()+8,f.readUEG(),f.readBits(1),f.readBool()))for(var A=E!==3?8:12,L=0;L<A;L++)f.readBool()&&(L<6?h._skipScalingList(f,16):h._skipScalingList(f,64));f.readUEG();var R=f.readUEG();if(R===0)f.readUEG();else if(R===1){f.readBits(1),f.readSEG(),f.readSEG();for(var I=f.readUEG(),L=0;L<I;L++)f.readSEG()}var D=f.readUEG();f.readBits(1);var b=f.readUEG(),P=f.readUEG(),C=f.readBits(1);C===0&&f.readBits(1),f.readBits(1);var k=0,O=0,F=0,U=0,G=f.readBool();G&&(k=f.readUEG(),O=f.readUEG(),F=f.readUEG(),U=f.readUEG());var V=1,$=1,K=0,H=!0,X=0,ee=0,Q=f.readBool();if(Q){if(f.readBool()){var re=f.readByte(),de=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],he=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];re>0&&re<16?(V=de[re-1],$=he[re-1]):re===255&&(V=f.readByte()<<8|f.readByte(),$=f.readByte()<<8|f.readByte())}if(f.readBool()&&f.readBool(),f.readBool()&&(f.readBits(4),f.readBool()&&f.readBits(24)),f.readBool()&&(f.readUEG(),f.readUEG()),f.readBool()){var Ee=f.readBits(32),Pe=f.readBits(32);H=f.readBool(),X=Pe,ee=Ee*2,K=X/ee}}var _e=1;(V!==1||$!==1)&&(_e=V/$);var te=0,Oe=0;if(E===0)te=1,Oe=2-C;else{var qe=E===3?1:2,ne=E===1?2:1;te=qe,Oe=ne*(2-C)}var ve=(b+1)*16,Te=(2-C)*((P+1)*16);ve-=(k+O)*te,Te-=(F+U)*Oe;var Ue=Math.ceil(ve*_e);return f.destroy(),f=null,{profile_string:v,level_string:_,bit_depth:T,ref_frames:D,chroma_format:x,chroma_format_string:h.getChromaFormatString(x),frame_rate:{fixed:H,fps:K,fps_den:ee,fps_num:X},sar_ratio:{width:V,height:$},codec_size:{width:ve,height:Te},present_size:{width:Ue,height:Te}}},h._skipScalingList=function(c,g){for(var f=8,m=8,p=0,v=0;v<g;v++)m!==0&&(p=c.readSEG(),m=(f+p+256)%256),f=m===0?f:m},h.getProfileString=function(c){switch(c){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"}},h.getLevelString=function(c){return(c/10).toFixed(1)},h.getChromaFormatString=function(c){switch(c){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},h})();o.default=d}),"./src/flv.js":(function(n,o,u){u.r(o);var l=u("./src/utils/polyfill.js"),d=u("./src/core/features.js"),h=u("./src/io/loader.js"),c=u("./src/player/flv-player.js"),g=u("./src/player/native-player.js"),f=u("./src/player/player-events.js"),m=u("./src/player/player-errors.js"),p=u("./src/utils/logging-control.js"),v=u("./src/utils/exception.js");l.default.install();function _(T,A){var L=T;if(L==null||typeof L!="object")throw new v.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!L.hasOwnProperty("type"))throw new v.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");return L.type==="flv"?new c.default(L,A):new g.default(L,A)}function E(){return d.default.supportMSEH264Playback()}function x(){return d.default.getFeatureList()}var y={};y.createPlayer=_,y.isSupported=E,y.getFeatureList=x,y.BaseLoader=h.BaseLoader,y.LoaderStatus=h.LoaderStatus,y.LoaderErrors=h.LoaderErrors,y.Events=f.default,y.ErrorTypes=m.ErrorTypes,y.ErrorDetails=m.ErrorDetails,y.FlvPlayer=c.default,y.NativePlayer=g.default,y.LoggingControl=p.default,Object.defineProperty(y,"version",{enumerable:!0,get:function(){return"1.6.2"}}),o.default=y}),"./src/index.js":(function(n,o,u){n.exports=u("./src/flv.js").default}),"./src/io/fetch-stream-loader.js":(function(n,o,u){u.r(o);var l=u("./src/utils/browser.js"),d=u("./src/io/loader.js"),h=u("./src/utils/exception.js"),c=(function(){var f=function(m,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,_){v.__proto__=_}||function(v,_){for(var E in _)Object.prototype.hasOwnProperty.call(_,E)&&(v[E]=_[E])},f(m,p)};return function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(m,p);function v(){this.constructor=m}m.prototype=p===null?Object.create(p):(v.prototype=p.prototype,new v)}})(),g=(function(f){c(m,f);function m(p,v){var _=f.call(this,"fetch-stream-loader")||this;return _.TAG="FetchStreamLoader",_._seekHandler=p,_._config=v,_._needStash=!0,_._requestAbort=!1,_._contentLength=null,_._receivedLength=0,_}return m.isSupported=function(){try{var p=l.default.msedge&&l.default.version.minor>=15048,v=l.default.msedge?p:!0;return self.fetch&&self.ReadableStream&&v}catch(_){return!1}},m.prototype.destroy=function(){this.isWorking()&&this.abort(),f.prototype.destroy.call(this)},m.prototype.open=function(p,v){var _=this;this._dataSource=p,this._range=v;var E=p.url;this._config.reuseRedirectedURL&&p.redirectedURL!=null&&(E=p.redirectedURL);var x=this._seekHandler.getConfig(E,v),y=new self.Headers;if(typeof x.headers=="object"){var T=x.headers;for(var A in T)T.hasOwnProperty(A)&&y.append(A,T[A])}var L={method:"GET",headers:y,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var A in this._config.headers)y.append(A,this._config.headers[A]);p.cors===!1&&(L.mode="same-origin"),p.withCredentials&&(L.credentials="include"),p.referrerPolicy&&(L.referrerPolicy=p.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,L.signal=this._abortController.signal),this._status=d.LoaderStatus.kConnecting,self.fetch(x.url,L).then(function(R){if(_._requestAbort){_._status=d.LoaderStatus.kIdle,R.body.cancel();return}if(R.ok&&R.status>=200&&R.status<=299){if(R.url!==x.url&&_._onURLRedirect){var I=_._seekHandler.removeURLParameters(R.url);_._onURLRedirect(I)}var D=R.headers.get("Content-Length");return D!=null&&(_._contentLength=parseInt(D),_._contentLength!==0&&_._onContentLengthKnown&&_._onContentLengthKnown(_._contentLength)),_._pump.call(_,R.body.getReader())}else if(_._status=d.LoaderStatus.kError,_._onError)_._onError(d.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:R.status,msg:R.statusText});else throw new h.RuntimeException("FetchStreamLoader: Http code invalid, "+R.status+" "+R.statusText)}).catch(function(R){if(!(_._abortController&&_._abortController.signal.aborted))if(_._status=d.LoaderStatus.kError,_._onError)_._onError(d.LoaderErrors.EXCEPTION,{code:-1,msg:R.message});else throw R})},m.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==d.LoaderStatus.kBuffering||!l.default.chrome)&&this._abortController)try{this._abortController.abort()}catch(p){}},m.prototype._pump=function(p){var v=this;return p.read().then(function(_){if(_.done)if(v._contentLength!==null&&v._receivedLength<v._contentLength){v._status=d.LoaderStatus.kError;var E=d.LoaderErrors.EARLY_EOF,x={code:-1,msg:"Fetch stream meet Early-EOF"};if(v._onError)v._onError(E,x);else throw new h.RuntimeException(x.msg)}else v._status=d.LoaderStatus.kComplete,v._onComplete&&v._onComplete(v._range.from,v._range.from+v._receivedLength-1);else{if(v._abortController&&v._abortController.signal.aborted){v._status=d.LoaderStatus.kComplete;return}else if(v._requestAbort===!0)return v._status=d.LoaderStatus.kComplete,p.cancel();v._status=d.LoaderStatus.kBuffering;var y=_.value.buffer,T=v._range.from+v._receivedLength;v._receivedLength+=y.byteLength,v._onDataArrival&&v._onDataArrival(y,T,v._receivedLength),v._pump(p)}}).catch(function(_){if(v._abortController&&v._abortController.signal.aborted){v._status=d.LoaderStatus.kComplete;return}if(!(_.code===11&&l.default.msedge)){v._status=d.LoaderStatus.kError;var E=0,x=null;if((_.code===19||_.message==="network error")&&(v._contentLength===null||v._contentLength!==null&&v._receivedLength<v._contentLength)?(E=d.LoaderErrors.EARLY_EOF,x={code:_.code,msg:"Fetch stream meet Early-EOF"}):(E=d.LoaderErrors.EXCEPTION,x={code:_.code,msg:_.message}),v._onError)v._onError(E,x);else throw new h.RuntimeException(x.msg)}})},m})(d.BaseLoader);o.default=g}),"./src/io/io-controller.js":(function(n,o,u){u.r(o);var l=u("./src/utils/logger.js"),d=u("./src/io/speed-sampler.js"),h=u("./src/io/loader.js"),c=u("./src/io/fetch-stream-loader.js"),g=u("./src/io/xhr-moz-chunked-loader.js"),f=u("./src/io/xhr-range-loader.js"),m=u("./src/io/websocket-loader.js"),p=u("./src/io/range-seek-handler.js"),v=u("./src/io/param-seek-handler.js"),_=u("./src/utils/exception.js"),E=(function(){function x(y,T,A){this.TAG="IOController",this._config=T,this._extraData=A,this._stashInitialSize=1024*384,T.stashInitialSize!=null&&T.stashInitialSize>0&&(this._stashInitialSize=T.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,T.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=y,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(y.url),this._refTotalLength=y.filesize?y.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new d.default,this._speedNormalizeList=[64,128,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 x.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},x.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},x.prototype.isPaused=function(){return this._paused},Object.defineProperty(x.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"extraData",{get:function(){return this._extraData},set:function(y){this._extraData=y},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(y){this._onDataArrival=y},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(y){this._onSeeked=y},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onError",{get:function(){return this._onError},set:function(y){this._onError=y},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onComplete",{get:function(){return this._onComplete},set:function(y){this._onComplete=y},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(y){this._onRedirect=y},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(y){this._onRecoveredEarlyEof=y},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"hasRedirect",{get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"currentSpeed",{get:function(){return this._loaderClass===f.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),x.prototype._selectSeekHandler=function(){var y=this._config;if(y.seekType==="range")this._seekHandler=new p.default(this._config.rangeLoadZeroStart);else if(y.seekType==="param"){var T=y.seekParamStart||"bstart",A=y.seekParamEnd||"bend";this._seekHandler=new v.default(T,A)}else if(y.seekType==="custom"){if(typeof y.customSeekHandler!="function")throw new _.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new y.customSeekHandler}else throw new _.InvalidArgumentException("Invalid seekType in config: "+y.seekType)},x.prototype._selectLoader=function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=m.default;else if(c.default.isSupported())this._loaderClass=c.default;else if(g.default.isSupported())this._loaderClass=g.default;else if(f.default.isSupported())this._loaderClass=f.default;else throw new _.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!")},x.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)},x.prototype.open=function(y){this._currentRange={from:0,to:-1},y&&(this._currentRange.from=y),this._speedSampler.reset(),y||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))},x.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},x.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)},x.prototype.resume=function(){if(this._paused){this._paused=!1;var y=this._resumeFrom;this._resumeFrom=0,this._internalSeek(y,!0)}},x.prototype.seek=function(y){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(y,!0)},x.prototype._internalSeek=function(y,T){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(T),this._loader.destroy(),this._loader=null;var A={from:y,to:-1};this._currentRange={from:A.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,A),this._onSeeked&&this._onSeeked()},x.prototype.updateUrl=function(y){if(!y||typeof y!="string"||y.length===0)throw new _.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=y},x.prototype._expandBuffer=function(y){for(var T=this._stashSize;T+1024*1024*1<y;)T*=2;if(T+=1024*1024*1,T!==this._bufferSize){var A=new ArrayBuffer(T);if(this._stashUsed>0){var L=new Uint8Array(this._stashBuffer,0,this._stashUsed),R=new Uint8Array(A,0,T);R.set(L,0)}this._stashBuffer=A,this._bufferSize=T}},x.prototype._normalizeSpeed=function(y){var T=this._speedNormalizeList,A=T.length-1,L=0,R=0,I=A;if(y<T[0])return T[0];for(;R<=I;){if(L=R+Math.floor((I-R)/2),L===A||y>=T[L]&&y<T[L+1])return T[L];T[L]<y?R=L+1:I=L-1}},x.prototype._adjustStashSize=function(y){var T=0;this._config.isLive||y<512?T=y:y>=512&&y<=1024?T=Math.floor(y*1.5):T=y*2,T>8192&&(T=8192);var A=T*1024+1024*1024*1;this._bufferSize<A&&this._expandBuffer(A),this._stashSize=T*1024},x.prototype._dispatchChunks=function(y,T){return this._currentRange.to=T+y.byteLength-1,this._onDataArrival(y,T)},x.prototype._onURLRedirect=function(y){this._redirectedURL=y,this._onRedirect&&this._onRedirect(y)},x.prototype._onContentLengthKnown=function(y){y&&this._fullRequestFlag&&(this._totalLength=y,this._fullRequestFlag=!1)},x.prototype._onLoaderChunkArrival=function(y,T,A){if(!this._onDataArrival)throw new _.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(y.byteLength);var L=this._speedSampler.lastSecondKBps;if(L!==0){var R=this._normalizeSpeed(L);this._speedNormalized!==R&&(this._speedNormalized=R,this._adjustStashSize(R))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=T),this._stashUsed+y.byteLength<=this._stashSize){var b=new Uint8Array(this._stashBuffer,0,this._stashSize);b.set(new Uint8Array(y),this._stashUsed),this._stashUsed+=y.byteLength}else{var b=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var C=this._stashBuffer.slice(0,this._stashUsed),I=this._dispatchChunks(C,this._stashByteStart);if(I<C.byteLength){if(I>0){var P=new Uint8Array(C,I);b.set(P,0),this._stashUsed=P.byteLength,this._stashByteStart+=I}}else this._stashUsed=0,this._stashByteStart+=I;this._stashUsed+y.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+y.byteLength),b=new Uint8Array(this._stashBuffer,0,this._bufferSize)),b.set(new Uint8Array(y),this._stashUsed),this._stashUsed+=y.byteLength}else{var I=this._dispatchChunks(y,T);if(I<y.byteLength){var D=y.byteLength-I;D>this._bufferSize&&(this._expandBuffer(D),b=new Uint8Array(this._stashBuffer,0,this._bufferSize)),b.set(new Uint8Array(y,I),0),this._stashUsed+=D,this._stashByteStart=T+I}}}else if(this._stashUsed===0){var I=this._dispatchChunks(y,T);if(I<y.byteLength){var D=y.byteLength-I;D>this._bufferSize&&this._expandBuffer(D);var b=new Uint8Array(this._stashBuffer,0,this._bufferSize);b.set(new Uint8Array(y,I),0),this._stashUsed+=D,this._stashByteStart=T+I}}else{this._stashUsed+y.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+y.byteLength);var b=new Uint8Array(this._stashBuffer,0,this._bufferSize);b.set(new Uint8Array(y),this._stashUsed),this._stashUsed+=y.byteLength;var I=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(I<this._stashUsed&&I>0){var P=new Uint8Array(this._stashBuffer,I);b.set(P,0)}this._stashUsed-=I,this._stashByteStart+=I}}},x.prototype._flushStashBuffer=function(y){if(this._stashUsed>0){var T=this._stashBuffer.slice(0,this._stashUsed),A=this._dispatchChunks(T,this._stashByteStart),L=T.byteLength-A;if(A<T.byteLength)if(y)l.default.w(this.TAG,L+" bytes unconsumed data remain when flush buffer, dropped");else{if(A>0){var R=new Uint8Array(this._stashBuffer,0,this._bufferSize),I=new Uint8Array(T,A);R.set(I,0),this._stashUsed=I.byteLength,this._stashByteStart+=A}return 0}return this._stashUsed=0,this._stashByteStart=0,L}return 0},x.prototype._onLoaderComplete=function(y,T){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},x.prototype._onLoaderError=function(y,T){switch(l.default.e(this.TAG,"Loader error, code = "+T.code+", msg = "+T.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,y=h.LoaderErrors.UNRECOVERABLE_EARLY_EOF),y){case h.LoaderErrors.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var A=this._currentRange.to+1;A<this._totalLength&&(l.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(A,!1));return}y=h.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break}case h.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case h.LoaderErrors.CONNECTING_TIMEOUT:case h.LoaderErrors.HTTP_STATUS_CODE_INVALID:case h.LoaderErrors.EXCEPTION:break}if(this._onError)this._onError(y,T);else throw new _.RuntimeException("IOException: "+T.msg)},x})();o.default=E}),"./src/io/loader.js":(function(n,o,u){u.r(o),u.d(o,{LoaderStatus:function(){return d},LoaderErrors:function(){return h},BaseLoader:function(){return c}});var l=u("./src/utils/exception.js"),d={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},h={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},c=(function(){function g(f){this._type=f||"undefined",this._status=d.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return g.prototype.destroy=function(){this._status=d.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},g.prototype.isWorking=function(){return this._status===d.kConnecting||this._status===d.kBuffering},Object.defineProperty(g.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(f){this._onContentLengthKnown=f},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(f){this._onURLRedirect=f},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(f){this._onDataArrival=f},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onError",{get:function(){return this._onError},set:function(f){this._onError=f},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onComplete",{get:function(){return this._onComplete},set:function(f){this._onComplete=f},enumerable:!1,configurable:!0}),g.prototype.open=function(f,m){throw new l.NotImplementedException("Unimplemented abstract function!")},g.prototype.abort=function(){throw new l.NotImplementedException("Unimplemented abstract function!")},g})()}),"./src/io/param-seek-handler.js":(function(n,o,u){u.r(o);var l=(function(){function d(h,c){this._startName=h,this._endName=c}return d.prototype.getConfig=function(h,c){var g=h;if(c.from!==0||c.to!==-1){var f=!0;g.indexOf("?")===-1&&(g+="?",f=!1),f&&(g+="&"),g+=this._startName+"="+c.from.toString(),c.to!==-1&&(g+="&"+this._endName+"="+c.to.toString())}return{url:g,headers:{}}},d.prototype.removeURLParameters=function(h){var c=h.split("?")[0],g=void 0,f=h.indexOf("?");f!==-1&&(g=h.substring(f+1));var m="";if(g!=null&&g.length>0)for(var p=g.split("&"),v=0;v<p.length;v++){var _=p[v].split("="),E=v>0;_[0]!==this._startName&&_[0]!==this._endName&&(E&&(m+="&"),m+=p[v])}return m.length===0?c:c+"?"+m},d})();o.default=l}),"./src/io/range-seek-handler.js":(function(n,o,u){u.r(o);var l=(function(){function d(h){this._zeroStart=h||!1}return d.prototype.getConfig=function(h,c){var g={};if(c.from!==0||c.to!==-1){var f=void 0;c.to!==-1?f="bytes="+c.from.toString()+"-"+c.to.toString():f="bytes="+c.from.toString()+"-",g.Range=f}else this._zeroStart&&(g.Range="bytes=0-");return{url:h,headers:g}},d.prototype.removeURLParameters=function(h){return h},d})();o.default=l}),"./src/io/speed-sampler.js":(function(n,o,u){u.r(o);var l=(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(h){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=h,this._totalBytes+=h):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=h,this._totalBytes+=h):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=h,this._totalBytes+=h,this._lastCheckpoint=this._now())},Object.defineProperty(d.prototype,"currentKBps",{get:function(){this.addBytes(0);var h=(this._now()-this._lastCheckpoint)/1e3;return h==0&&(h=1),this._intervalBytes/h/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 h=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/h/1024},enumerable:!1,configurable:!0}),d})();o.default=l}),"./src/io/websocket-loader.js":(function(n,o,u){u.r(o);var l=u("./src/io/loader.js"),d=u("./src/utils/exception.js"),h=(function(){var g=function(f,m){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,v){p.__proto__=v}||function(p,v){for(var _ in v)Object.prototype.hasOwnProperty.call(v,_)&&(p[_]=v[_])},g(f,m)};return function(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");g(f,m);function p(){this.constructor=f}f.prototype=m===null?Object.create(m):(p.prototype=m.prototype,new p)}})(),c=(function(g){h(f,g);function f(){var m=g.call(this,"websocket-loader")||this;return m.TAG="WebSocketLoader",m._needStash=!0,m._ws=null,m._requestAbort=!1,m._receivedLength=0,m}return f.isSupported=function(){try{return typeof self.WebSocket!="undefined"}catch(m){return!1}},f.prototype.destroy=function(){this._ws&&this.abort(),g.prototype.destroy.call(this)},f.prototype.open=function(m){try{var p=this._ws=new self.WebSocket(m.url);p.binaryType="arraybuffer",p.onopen=this._onWebSocketOpen.bind(this),p.onclose=this._onWebSocketClose.bind(this),p.onmessage=this._onWebSocketMessage.bind(this),p.onerror=this._onWebSocketError.bind(this),this._status=l.LoaderStatus.kConnecting}catch(_){this._status=l.LoaderStatus.kError;var v={code:_.code,msg:_.message};if(this._onError)this._onError(l.LoaderErrors.EXCEPTION,v);else throw new d.RuntimeException(v.msg)}},f.prototype.abort=function(){var m=this._ws;m&&(m.readyState===0||m.readyState===1)&&(this._requestAbort=!0,m.close()),this._ws=null,this._status=l.LoaderStatus.kComplete},f.prototype._onWebSocketOpen=function(m){this._status=l.LoaderStatus.kBuffering},f.prototype._onWebSocketClose=function(m){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=l.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)},f.prototype._onWebSocketMessage=function(m){var p=this;if(m.data instanceof ArrayBuffer)this._dispatchArrayBuffer(m.data);else if(m.data instanceof Blob){var v=new FileReader;v.onload=function(){p._dispatchArrayBuffer(v.result)},v.readAsArrayBuffer(m.data)}else{this._status=l.LoaderStatus.kError;var _={code:-1,msg:"Unsupported WebSocket message type: "+m.data.constructor.name};if(this._onError)this._onError(l.LoaderErrors.EXCEPTION,_);else throw new d.RuntimeException(_.msg)}},f.prototype._dispatchArrayBuffer=function(m){var p=m,v=this._receivedLength;this._receivedLength+=p.byteLength,this._onDataArrival&&this._onDataArrival(p,v,this._receivedLength)},f.prototype._onWebSocketError=function(m){this._status=l.LoaderStatus.kError;var p={code:m.code,msg:m.message};if(this._onError)this._onError(l.LoaderErrors.EXCEPTION,p);else throw new d.RuntimeException(p.msg)},f})(l.BaseLoader);o.default=c}),"./src/io/xhr-moz-chunked-loader.js":(function(n,o,u){u.r(o);var l=u("./src/utils/logger.js"),d=u("./src/io/loader.js"),h=u("./src/utils/exception.js"),c=(function(){var f=function(m,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,_){v.__proto__=_}||function(v,_){for(var E in _)Object.prototype.hasOwnProperty.call(_,E)&&(v[E]=_[E])},f(m,p)};return function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(m,p);function v(){this.constructor=m}m.prototype=p===null?Object.create(p):(v.prototype=p.prototype,new v)}})(),g=(function(f){c(m,f);function m(p,v){var _=f.call(this,"xhr-moz-chunked-loader")||this;return _.TAG="MozChunkedLoader",_._seekHandler=p,_._config=v,_._needStash=!0,_._xhr=null,_._requestAbort=!1,_._contentLength=null,_._receivedLength=0,_}return m.isSupported=function(){try{var p=new XMLHttpRequest;return p.open("GET","https://example.com",!0),p.responseType="moz-chunked-arraybuffer",p.responseType==="moz-chunked-arraybuffer"}catch(v){return l.default.w("MozChunkedLoader",v.message),!1}},m.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),f.prototype.destroy.call(this)},m.prototype.open=function(p,v){this._dataSource=p,this._range=v;var _=p.url;this._config.reuseRedirectedURL&&p.redirectedURL!=null&&(_=p.redirectedURL);var E=this._seekHandler.getConfig(_,v);this._requestURL=E.url;var x=this._xhr=new XMLHttpRequest;if(x.open("GET",E.url,!0),x.responseType="moz-chunked-arraybuffer",x.onreadystatechange=this._onReadyStateChange.bind(this),x.onprogress=this._onProgress.bind(this),x.onloadend=this._onLoadEnd.bind(this),x.onerror=this._onXhrError.bind(this),p.withCredentials&&(x.withCredentials=!0),typeof E.headers=="object"){var y=E.headers;for(var T in y)y.hasOwnProperty(T)&&x.setRequestHeader(T,y[T])}if(typeof this._config.headers=="object"){var y=this._config.headers;for(var T in y)y.hasOwnProperty(T)&&x.setRequestHeader(T,y[T])}this._status=d.LoaderStatus.kConnecting,x.send()},m.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=d.LoaderStatus.kComplete},m.prototype._onReadyStateChange=function(p){var v=p.target;if(v.readyState===2){if(v.responseURL!=null&&v.responseURL!==this._requestURL&&this._onURLRedirect){var _=this._seekHandler.removeURLParameters(v.responseURL);this._onURLRedirect(_)}if(v.status!==0&&(v.status<200||v.status>299))if(this._status=d.LoaderStatus.kError,this._onError)this._onError(d.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:v.status,msg:v.statusText});else throw new h.RuntimeException("MozChunkedLoader: Http code invalid, "+v.status+" "+v.statusText);else this._status=d.LoaderStatus.kBuffering}},m.prototype._onProgress=function(p){if(this._status!==d.LoaderStatus.kError){this._contentLength===null&&p.total!==null&&p.total!==0&&(this._contentLength=p.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var v=p.target.response,_=this._range.from+this._receivedLength;this._receivedLength+=v.byteLength,this._onDataArrival&&this._onDataArrival(v,_,this._receivedLength)}},m.prototype._onLoadEnd=function(p){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===d.LoaderStatus.kError)return;this._status=d.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)},m.prototype._onXhrError=function(p){this._status=d.LoaderStatus.kError;var v=0,_=null;if(this._contentLength&&p.loaded<this._contentLength?(v=d.LoaderErrors.EARLY_EOF,_={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(v=d.LoaderErrors.EXCEPTION,_={code:-1,msg:p.constructor.name+" "+p.type}),this._onError)this._onError(v,_);else throw new h.RuntimeException(_.msg)},m})(d.BaseLoader);o.default=g}),"./src/io/xhr-range-loader.js":(function(n,o,u){u.r(o);var l=u("./src/utils/logger.js"),d=u("./src/io/speed-sampler.js"),h=u("./src/io/loader.js"),c=u("./src/utils/exception.js"),g=(function(){var m=function(p,v){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,E){_.__proto__=E}||function(_,E){for(var x in E)Object.prototype.hasOwnProperty.call(E,x)&&(_[x]=E[x])},m(p,v)};return function(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");m(p,v);function _(){this.constructor=p}p.prototype=v===null?Object.create(v):(_.prototype=v.prototype,new _)}})(),f=(function(m){g(p,m);function p(v,_){var E=m.call(this,"xhr-range-loader")||this;return E.TAG="RangeLoader",E._seekHandler=v,E._config=_,E._needStash=!1,E._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],E._currentChunkSizeKB=384,E._currentSpeedNormalized=0,E._zeroSpeedChunkCount=0,E._xhr=null,E._speedSampler=new d.default,E._requestAbort=!1,E._waitForTotalLength=!1,E._totalLengthReceived=!1,E._currentRequestURL=null,E._currentRedirectedURL=null,E._currentRequestRange=null,E._totalLength=null,E._contentLength=null,E._receivedLength=0,E._lastTimeLoaded=0,E}return p.isSupported=function(){try{var v=new XMLHttpRequest;return v.open("GET","https://example.com",!0),v.responseType="arraybuffer",v.responseType==="arraybuffer"}catch(_){return l.default.w("RangeLoader",_.message),!1}},p.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),m.prototype.destroy.call(this)},Object.defineProperty(p.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),p.prototype.open=function(v,_){this._dataSource=v,this._range=_,this._status=h.LoaderStatus.kConnecting;var E=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(E=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!E?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()},p.prototype._openSubRange=function(){var v=this._currentChunkSizeKB*1024,_=this._range.from+this._receivedLength,E=_+v;this._contentLength!=null&&E-this._range.from>=this._contentLength&&(E=this._range.from+this._contentLength-1),this._currentRequestRange={from:_,to:E},this._internalOpen(this._dataSource,this._currentRequestRange)},p.prototype._internalOpen=function(v,_){this._lastTimeLoaded=0;var E=v.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?E=this._currentRedirectedURL:v.redirectedURL!=null&&(E=v.redirectedURL));var x=this._seekHandler.getConfig(E,_);this._currentRequestURL=x.url;var y=this._xhr=new XMLHttpRequest;if(y.open("GET",x.url,!0),y.responseType="arraybuffer",y.onreadystatechange=this._onReadyStateChange.bind(this),y.onprogress=this._onProgress.bind(this),y.onload=this._onLoad.bind(this),y.onerror=this._onXhrError.bind(this),v.withCredentials&&(y.withCredentials=!0),typeof x.headers=="object"){var T=x.headers;for(var A in T)T.hasOwnProperty(A)&&y.setRequestHeader(A,T[A])}if(typeof this._config.headers=="object"){var T=this._config.headers;for(var A in T)T.hasOwnProperty(A)&&y.setRequestHeader(A,T[A])}y.send()},p.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=h.LoaderStatus.kComplete},p.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)},p.prototype._onReadyStateChange=function(v){var _=v.target;if(_.readyState===2){if(_.responseURL!=null){var E=this._seekHandler.removeURLParameters(_.responseURL);_.responseURL!==this._currentRequestURL&&E!==this._currentRedirectedURL&&(this._currentRedirectedURL=E,this._onURLRedirect&&this._onURLRedirect(E))}if(_.status>=200&&_.status<=299){if(this._waitForTotalLength)return;this._status=h.LoaderStatus.kBuffering}else if(this._status=h.LoaderStatus.kError,this._onError)this._onError(h.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:_.status,msg:_.statusText});else throw new c.RuntimeException("RangeLoader: Http code invalid, "+_.status+" "+_.statusText)}},p.prototype._onProgress=function(v){if(this._status!==h.LoaderStatus.kError){if(this._contentLength===null){var _=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,_=!0;var E=v.total;this._internalAbort(),E!=null&E!==0&&(this._totalLength=E)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,_){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var x=v.loaded-this._lastTimeLoaded;this._lastTimeLoaded=v.loaded,this._speedSampler.addBytes(x)}},p.prototype._normalizeSpeed=function(v){var _=this._chunkSizeKBList,E=_.length-1,x=0,y=0,T=E;if(v<_[0])return _[0];for(;y<=T;){if(x=y+Math.floor((T-y)/2),x===E||v>=_[x]&&v<_[x+1])return _[x];_[x]<v?y=x+1:T=x-1}},p.prototype._onLoad=function(v){if(this._status!==h.LoaderStatus.kError){if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;var _=this._speedSampler.lastSecondKBps;if(_===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(_=this._speedSampler.currentKBps)),_!==0){var E=this._normalizeSpeed(_);this._currentSpeedNormalized!==E&&(this._currentSpeedNormalized=E,this._currentChunkSizeKB=E)}var x=v.target.response,y=this._range.from+this._receivedLength;this._receivedLength+=x.byteLength;var T=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():T=!0,this._onDataArrival&&this._onDataArrival(x,y,this._receivedLength),T&&(this._status=h.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},p.prototype._onXhrError=function(v){this._status=h.LoaderStatus.kError;var _=0,E=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(_=h.LoaderErrors.EARLY_EOF,E={code:-1,msg:"RangeLoader meet Early-Eof"}):(_=h.LoaderErrors.EXCEPTION,E={code:-1,msg:v.constructor.name+" "+v.type}),this._onError)this._onError(_,E);else throw new c.RuntimeException(E.msg)},p})(h.BaseLoader);o.default=f}),"./src/player/flv-player.js":(function(n,o,u){u.r(o);var l=u("./node_modules/events/events.js"),d=u.n(l),h=u("./src/utils/logger.js"),c=u("./src/utils/browser.js"),g=u("./src/player/player-events.js"),f=u("./src/core/transmuxer.js"),m=u("./src/core/transmuxing-events.js"),p=u("./src/core/mse-controller.js"),v=u("./src/core/mse-events.js"),_=u("./src/player/player-errors.js"),E=u("./src/config.js"),x=u("./src/utils/exception.js"),y=(function(){function T(A,L){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(d()),this._config=(0,E.createDefaultConfig)(),typeof L=="object"&&Object.assign(this._config,L),A.type.toLowerCase()!=="flv")throw new x.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");A.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=A,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var R=c.default.chrome&&(c.default.version.major<50||c.default.version.major===50&&c.default.version.build<2661);this._alwaysSeekKeyframe=!!(R||c.default.msedge||c.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return T.prototype.destroy=function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},T.prototype.on=function(A,L){var R=this;A===g.default.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){R._emitter.emit(g.default.MEDIA_INFO,R.mediaInfo)}):A===g.default.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(function(){R._emitter.emit(g.default.STATISTICS_INFO,R.statisticsInfo)}),this._emitter.addListener(A,L)},T.prototype.off=function(A,L){this._emitter.removeListener(A,L)},T.prototype.attachMediaElement=function(A){var L=this;if(this._mediaElement=A,A.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),A.addEventListener("seeking",this.e.onvSeeking),A.addEventListener("canplay",this.e.onvCanPlay),A.addEventListener("stalled",this.e.onvStalled),A.addEventListener("progress",this.e.onvProgress),this._msectl=new p.default(this._config),this._msectl.on(v.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(v.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(v.default.SOURCE_OPEN,function(){L._mseSourceOpened=!0,L._hasPendingLoad&&(L._hasPendingLoad=!1,L.load())}),this._msectl.on(v.default.ERROR,function(R){L._emitter.emit(g.default.ERROR,_.ErrorTypes.MEDIA_ERROR,_.ErrorDetails.MEDIA_MSE_ERROR,R)}),this._msectl.attachMediaElement(A),this._pendingSeekTime!=null)try{A.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(R){}},T.prototype.detachMediaElement=function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},T.prototype.load=function(){var A=this;if(!this._mediaElement)throw new x.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new x.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new f.default(this._mediaDataSource,this._config),this._transmuxer.on(m.default.INIT_SEGMENT,function(L,R){A._msectl.appendInitSegment(R)}),this._transmuxer.on(m.default.MEDIA_SEGMENT,function(L,R){if(A._msectl.appendMediaSegment(R),A._config.lazyLoad&&!A._config.isLive){var I=A._mediaElement.currentTime;R.info.endDts>=(I+A._config.lazyLoadMaxDuration)*1e3&&A._progressChecker==null&&(h.default.v(A.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),A._suspendTransmuxer())}}),this._transmuxer.on(m.default.LOADING_COMPLETE,function(){A._msectl.endOfStream(),A._emitter.emit(g.default.LOADING_COMPLETE)}),this._transmuxer.on(m.default.RECOVERED_EARLY_EOF,function(){A._emitter.emit(g.default.RECOVERED_EARLY_EOF)}),this._transmuxer.on(m.default.IO_ERROR,function(L,R){A._emitter.emit(g.default.ERROR,_.ErrorTypes.NETWORK_ERROR,L,R)}),this._transmuxer.on(m.default.DEMUX_ERROR,function(L,R){A._emitter.emit(g.default.ERROR,_.ErrorTypes.MEDIA_ERROR,L,{code:-1,msg:R})}),this._transmuxer.on(m.default.MEDIA_INFO,function(L){A._mediaInfo=L,A._emitter.emit(g.default.MEDIA_INFO,Object.assign({},L))}),this._transmuxer.on(m.default.METADATA_ARRIVED,function(L){A._emitter.emit(g.default.METADATA_ARRIVED,L)}),this._transmuxer.on(m.default.SCRIPTDATA_ARRIVED,function(L){A._emitter.emit(g.default.SCRIPTDATA_ARRIVED,L)}),this._transmuxer.on(m.default.STATISTICS_INFO,function(L){A._statisticsInfo=A._fillStatisticsInfo(L),A._emitter.emit(g.default.STATISTICS_INFO,Object.assign({},A._statisticsInfo))}),this._transmuxer.on(m.default.RECOMMEND_SEEKPOINT,function(L){A._mediaElement&&!A._config.accurateSeek&&(A._requestSetTime=!0,A._mediaElement.currentTime=L/1e3)}),this._transmuxer.open()}},T.prototype.unload=function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)},T.prototype.play=function(){return this._mediaElement.play()},T.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(T.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(A){this._mediaElement.volume=A},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(A){this._mediaElement.muted=A},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(A){this._mediaElement?this._internalSeek(A):this._pendingSeekTime=A},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"statisticsInfo",{get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),T.prototype._fillStatisticsInfo=function(A){if(A.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return A;var L=!0,R=0,I=0;if(this._mediaElement.getVideoPlaybackQuality){var D=this._mediaElement.getVideoPlaybackQuality();R=D.totalVideoFrames,I=D.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(R=this._mediaElement.webkitDecodedFrameCount,I=this._mediaElement.webkitDroppedFrameCount):L=!1;return L&&(A.decodedFrames=R,A.droppedFrames=I),A},T.prototype._onmseUpdateEnd=function(){if(!(!this._config.lazyLoad||this._config.isLive)){for(var A=this._mediaElement.buffered,L=this._mediaElement.currentTime,R=0,I=0;I<A.length;I++){var D=A.start(I),b=A.end(I);if(D<=L&&L<b){R=b;break}}R>=L+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(h.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},T.prototype._onmseBufferFull=function(){h.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()},T.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},T.prototype._checkProgressAndResume=function(){for(var A=this._mediaElement.currentTime,L=this._mediaElement.buffered,R=!1,I=0;I<L.length;I++){var D=L.start(I),b=L.end(I);if(A>=D&&A<b){A>=b-this._config.lazyLoadRecoverDuration&&(R=!0);break}}R&&(window.clearInterval(this._progressChecker),this._progressChecker=null,R&&(h.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))},T.prototype._isTimepointBuffered=function(A){for(var L=this._mediaElement.buffered,R=0;R<L.length;R++){var I=L.start(R),D=L.end(R);if(A>=I&&A<D)return!0}return!1},T.prototype._internalSeek=function(A){var L=this._isTimepointBuffered(A),R=!1,I=0;if(A<1&&this._mediaElement.buffered.length>0){var D=this._mediaElement.buffered.start(0);(D<1&&A<D||c.default.safari)&&(R=!0,I=c.default.safari?.1:D)}if(R)this._requestSetTime=!0,this._mediaElement.currentTime=I;else if(L){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=A;else{var b=this._msectl.getNearestKeyframe(Math.floor(A*1e3));this._requestSetTime=!0,b!=null?this._mediaElement.currentTime=b.dts/1e3:this._mediaElement.currentTime=A}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(A),this._transmuxer.seek(Math.floor(A*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=A)},T.prototype._checkAndApplyUnbufferedSeekpoint=function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var A=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(A)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(A),this._transmuxer.seek(Math.floor(A*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=A))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)},T.prototype._checkAndResumeStuckPlayback=function(A){var L=this._mediaElement;if(A||!this._receivedCanPlay||L.readyState<2){var R=L.buffered;R.length>0&&L.currentTime<R.start(0)&&(h.default.w(this.TAG,"Playback seems stuck at "+L.currentTime+", seek to "+R.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=R.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)},T.prototype._onvLoadedMetadata=function(A){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)},T.prototype._onvSeeking=function(A){var L=this._mediaElement.currentTime,R=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(L<1&&R.length>0){var I=R.start(0);if(I<1&&L<I||c.default.safari){this._requestSetTime=!0,this._mediaElement.currentTime=c.default.safari?.1:I;return}}if(this._isTimepointBuffered(L)){if(this._alwaysSeekKeyframe){var D=this._msectl.getNearestKeyframe(Math.floor(L*1e3));D!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=D.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:L,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)},T.prototype._onvCanPlay=function(A){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)},T.prototype._onvStalled=function(A){this._checkAndResumeStuckPlayback(!0)},T.prototype._onvProgress=function(A){this._checkAndResumeStuckPlayback()},T})();o.default=y}),"./src/player/native-player.js":(function(n,o,u){u.r(o);var l=u("./node_modules/events/events.js"),d=u.n(l),h=u("./src/player/player-events.js"),c=u("./src/config.js"),g=u("./src/utils/exception.js"),f=(function(){function m(p,v){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(d()),this._config=(0,c.createDefaultConfig)(),typeof v=="object"&&Object.assign(this._config,v),p.type.toLowerCase()==="flv")throw new g.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(p.hasOwnProperty("segments"))throw new g.InvalidArgumentException("NativePlayer("+p.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=p,this._mediaElement=null}return m.prototype.destroy=function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},m.prototype.on=function(p,v){var _=this;p===h.default.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){_._emitter.emit(h.default.MEDIA_INFO,_.mediaInfo)}):p===h.default.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){_._emitter.emit(h.default.STATISTICS_INFO,_.statisticsInfo)}),this._emitter.addListener(p,v)},m.prototype.off=function(p,v){this._emitter.removeListener(p,v)},m.prototype.attachMediaElement=function(p){if(this._mediaElement=p,p.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{p.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(v){}},m.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)},m.prototype.load=function(){if(!this._mediaElement)throw new g.IllegalStateException("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)},m.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},m.prototype.play=function(){return this._mediaElement.play()},m.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(m.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(p){this._mediaElement.volume=p},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(p){this._mediaElement.muted=p},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(p){this._mediaElement?this._mediaElement.currentTime=p:this._pendingSeekTime=p},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"mediaInfo",{get:function(){var p=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",v={mimeType:p+this._mediaDataSource.type};return this._mediaElement&&(v.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(v.width=this._mediaElement.videoWidth,v.height=this._mediaElement.videoHeight)),v},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"statisticsInfo",{get:function(){var p={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return p;var v=!0,_=0,E=0;if(this._mediaElement.getVideoPlaybackQuality){var x=this._mediaElement.getVideoPlaybackQuality();_=x.totalVideoFrames,E=x.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(_=this._mediaElement.webkitDecodedFrameCount,E=this._mediaElement.webkitDroppedFrameCount):v=!1;return v&&(p.decodedFrames=_,p.droppedFrames=E),p},enumerable:!1,configurable:!0}),m.prototype._onvLoadedMetadata=function(p){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(h.default.MEDIA_INFO,this.mediaInfo)},m.prototype._reportStatisticsInfo=function(){this._emitter.emit(h.default.STATISTICS_INFO,this.statisticsInfo)},m})();o.default=f}),"./src/player/player-errors.js":(function(n,o,u){u.r(o),u.d(o,{ErrorTypes:function(){return h},ErrorDetails:function(){return c}});var l=u("./src/io/loader.js"),d=u("./src/demux/demux-errors.js"),h={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},c={NETWORK_EXCEPTION:l.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:l.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:l.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:l.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:d.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:d.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:d.default.CODEC_UNSUPPORTED}}),"./src/player/player-events.js":(function(n,o,u){u.r(o);var l={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};o.default=l}),"./src/remux/aac-silent.js":(function(n,o,u){u.r(o);var l=(function(){function d(){}return d.getSilentFrame=function(h,c){if(h==="mp4a.40.2"){if(c===1)return new Uint8Array([0,200,0,128,35,128]);if(c===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(c===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(c===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(c===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(c===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(c===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(c===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(c===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},d})();o.default=l}),"./src/remux/mp4-generator.js":(function(n,o,u){u.r(o);var l=(function(){function d(){}return d.init=function(){d.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],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":[]};for(var h in d.types)d.types.hasOwnProperty(h)&&(d.types[h]=[h.charCodeAt(0),h.charCodeAt(1),h.charCodeAt(2),h.charCodeAt(3)]);var c=d.constants={};c.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),c.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),c.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),c.STSC=c.STCO=c.STTS,c.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),c.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]),c.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]),c.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),c.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),c.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},d.box=function(h){for(var c=8,g=null,f=Array.prototype.slice.call(arguments,1),m=f.length,p=0;p<m;p++)c+=f[p].byteLength;g=new Uint8Array(c),g[0]=c>>>24&255,g[1]=c>>>16&255,g[2]=c>>>8&255,g[3]=c&255,g.set(h,4);for(var v=8,p=0;p<m;p++)g.set(f[p],v),v+=f[p].byteLength;return g},d.generateInitSegment=function(h){var c=d.box(d.types.ftyp,d.constants.FTYP),g=d.moov(h),f=new Uint8Array(c.byteLength+g.byteLength);return f.set(c,0),f.set(g,c.byteLength),f},d.moov=function(h){var c=d.mvhd(h.timescale,h.duration),g=d.trak(h),f=d.mvex(h);return d.box(d.types.moov,c,g,f)},d.mvhd=function(h,c){return d.box(d.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,h>>>24&255,h>>>16&255,h>>>8&255,h&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))},d.trak=function(h){return d.box(d.types.trak,d.tkhd(h),d.mdia(h))},d.tkhd=function(h){var c=h.id,g=h.duration,f=h.presentWidth,m=h.presentHeight;return d.box(d.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,c>>>24&255,c>>>16&255,c>>>8&255,c&255,0,0,0,0,g>>>24&255,g>>>16&255,g>>>8&255,g&255,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,f>>>8&255,f&255,0,0,m>>>8&255,m&255,0,0]))},d.mdia=function(h){return d.box(d.types.mdia,d.mdhd(h),d.hdlr(h),d.minf(h))},d.mdhd=function(h){var c=h.timescale,g=h.duration;return d.box(d.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,c>>>24&255,c>>>16&255,c>>>8&255,c&255,g>>>24&255,g>>>16&255,g>>>8&255,g&255,85,196,0,0]))},d.hdlr=function(h){var c=null;return h.type==="audio"?c=d.constants.HDLR_AUDIO:c=d.constants.HDLR_VIDEO,d.box(d.types.hdlr,c)},d.minf=function(h){var c=null;return h.type==="audio"?c=d.box(d.types.smhd,d.constants.SMHD):c=d.box(d.types.vmhd,d.constants.VMHD),d.box(d.types.minf,c,d.dinf(),d.stbl(h))},d.dinf=function(){var h=d.box(d.types.dinf,d.box(d.types.dref,d.constants.DREF));return h},d.stbl=function(h){var c=d.box(d.types.stbl,d.stsd(h),d.box(d.types.stts,d.constants.STTS),d.box(d.types.stsc,d.constants.STSC),d.box(d.types.stsz,d.constants.STSZ),d.box(d.types.stco,d.constants.STCO));return c},d.stsd=function(h){return h.type==="audio"?h.codec==="mp3"?d.box(d.types.stsd,d.constants.STSD_PREFIX,d.mp3(h)):d.box(d.types.stsd,d.constants.STSD_PREFIX,d.mp4a(h)):d.box(d.types.stsd,d.constants.STSD_PREFIX,d.avc1(h))},d.mp3=function(h){var c=h.channelCount,g=h.audioSampleRate,f=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,c,0,16,0,0,0,0,g>>>8&255,g&255,0,0]);return d.box(d.types[".mp3"],f)},d.mp4a=function(h){var c=h.channelCount,g=h.audioSampleRate,f=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,c,0,16,0,0,0,0,g>>>8&255,g&255,0,0]);return d.box(d.types.mp4a,f,d.esds(h))},d.esds=function(h){var c=h.config||[],g=c.length,f=new Uint8Array([0,0,0,0,3,23+g,0,1,0,4,15+g,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([g]).concat(c).concat([6,1,2]));return d.box(d.types.esds,f)},d.avc1=function(h){var c=h.avcc,g=h.codecWidth,f=h.codecHeight,m=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,g>>>8&255,g&255,f>>>8&255,f&255,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 d.box(d.types.avc1,m,d.box(d.types.avcC,c))},d.mvex=function(h){return d.box(d.types.mvex,d.trex(h))},d.trex=function(h){var c=h.id,g=new Uint8Array([0,0,0,0,c>>>24&255,c>>>16&255,c>>>8&255,c&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return d.box(d.types.trex,g)},d.moof=function(h,c){return d.box(d.types.moof,d.mfhd(h.sequenceNumber),d.traf(h,c))},d.mfhd=function(h){var c=new Uint8Array([0,0,0,0,h>>>24&255,h>>>16&255,h>>>8&255,h&255]);return d.box(d.types.mfhd,c)},d.traf=function(h,c){var g=h.id,f=d.box(d.types.tfhd,new Uint8Array([0,0,0,0,g>>>24&255,g>>>16&255,g>>>8&255,g&255])),m=d.box(d.types.tfdt,new Uint8Array([0,0,0,0,c>>>24&255,c>>>16&255,c>>>8&255,c&255])),p=d.sdtp(h),v=d.trun(h,p.byteLength+16+16+8+16+8+8);return d.box(d.types.traf,f,m,v,p)},d.sdtp=function(h){for(var c=h.samples||[],g=c.length,f=new Uint8Array(4+g),m=0;m<g;m++){var p=c[m].flags;f[m+4]=p.isLeading<<6|p.dependsOn<<4|p.isDependedOn<<2|p.hasRedundancy}return d.box(d.types.sdtp,f)},d.trun=function(h,c){var g=h.samples||[],f=g.length,m=12+16*f,p=new Uint8Array(m);c+=8+m,p.set([0,0,15,1,f>>>24&255,f>>>16&255,f>>>8&255,f&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255],0);for(var v=0;v<f;v++){var _=g[v].duration,E=g[v].size,x=g[v].flags,y=g[v].cts;p.set([_>>>24&255,_>>>16&255,_>>>8&255,_&255,E>>>24&255,E>>>16&255,E>>>8&255,E&255,x.isLeading<<2|x.dependsOn,x.isDependedOn<<6|x.hasRedundancy<<4|x.isNonSync,0,0,y>>>24&255,y>>>16&255,y>>>8&255,y&255],12+16*v)}return d.box(d.types.trun,p)},d.mdat=function(h){return d.box(d.types.mdat,h)},d})();l.init(),o.default=l}),"./src/remux/mp4-remuxer.js":(function(n,o,u){u.r(o);var l=u("./src/utils/logger.js"),d=u("./src/remux/mp4-generator.js"),h=u("./src/remux/aac-silent.js"),c=u("./src/utils/browser.js"),g=u("./src/core/media-segment-info.js"),f=u("./src/utils/exception.js"),m=(function(){function p(v){this.TAG="MP4Remuxer",this._config=v,this._isLive=v.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 g.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new g.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(c.default.chrome&&(c.default.version.major<50||c.default.version.major===50&&c.default.version.build<2661)),this._fillSilentAfterSeek=c.default.msedge||c.default.msie,this._mp3UseMpegAudio=!c.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return p.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},p.prototype.bindDataSource=function(v){return v.onDataAvailable=this.remux.bind(this),v.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(p.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(v){this._onInitSegment=v},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(v){this._onMediaSegment=v},enumerable:!1,configurable:!0}),p.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},p.prototype.seek=function(v){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},p.prototype.remux=function(v,_){if(!this._onMediaSegment)throw new f.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(v,_),this._remuxVideo(_),this._remuxAudio(v)},p.prototype._onTrackMetadataReceived=function(v,_){var E=null,x="mp4",y=_.codec;if(v==="audio")this._audioMeta=_,_.codec==="mp3"&&this._mp3UseMpegAudio?(x="mpeg",y="",E=new Uint8Array):E=d.default.generateInitSegment(_);else if(v==="video")this._videoMeta=_,E=d.default.generateInitSegment(_);else return;if(!this._onInitSegment)throw new f.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(v,{type:v,data:E.buffer,codec:y,container:v+"/"+x,mediaDuration:_.duration})},p.prototype._calculateDtsBase=function(v,_){this._dtsBaseInited||(v.samples&&v.samples.length&&(this._audioDtsBase=v.samples[0].dts),_.samples&&_.samples.length&&(this._videoDtsBase=_.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},p.prototype.flushStashedSamples=function(){var v=this._videoStashedLastSample,_=this._audioStashedLastSample,E={type:"video",id:1,sequenceNumber:0,samples:[],length:0};v!=null&&(E.samples.push(v),E.length=v.length);var x={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};_!=null&&(x.samples.push(_),x.length=_.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(E,!0),this._remuxAudio(x,!0)},p.prototype._remuxAudio=function(v,_){if(this._audioMeta!=null){var E=v,x=E.samples,y=void 0,T=-1,A=-1,L=this._audioMeta.refSampleDuration,R=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,I=this._dtsBaseInited&&this._audioNextDts===void 0,D=!1;if(!(!x||x.length===0)&&!(x.length===1&&!_)){var b=0,P=null,C=0;R?(b=0,C=E.length):(b=8,C=8+E.length);var k=null;if(x.length>1&&(k=x.pop(),C-=k.length),this._audioStashedLastSample!=null){var O=this._audioStashedLastSample;this._audioStashedLastSample=null,x.unshift(O),C+=O.length}k!=null&&(this._audioStashedLastSample=k);var F=x[0].dts-this._dtsBase;if(this._audioNextDts)y=F-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())y=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(D=!0);else{var U=this._audioSegmentInfoList.getLastSampleBefore(F);if(U!=null){var G=F-(U.originalDts+U.duration);G<=3&&(G=0);var V=U.dts+U.duration+G;y=F-V}else y=0}if(D){var $=F-y,K=this._videoSegmentInfoList.getLastSegmentBefore(F);if(K!=null&&K.beginDts<$){var H=h.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(H){var X=K.beginDts,ee=$-K.beginDts;l.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+X+", duration: "+ee),x.unshift({unit:H,dts:X,pts:X}),C+=H.byteLength}}else D=!1}for(var Q=[],re=0;re<x.length;re++){var O=x[re],de=O.unit,he=O.dts-this._dtsBase,X=he,Ee=!1,Pe=null,_e=0;if(!(he<-.001)){if(this._audioMeta.codec!=="mp3"){var te=he,Oe=3;if(this._audioNextDts&&(te=this._audioNextDts),y=he-te,y<=-Oe*L){l.default.w(this.TAG,"Dropping 1 audio frame (originalDts: "+he+" ms ,curRefDts: "+te+" ms) due to dtsCorrection: "+y+" ms overlap.");continue}else if(y>=Oe*L&&this._fillAudioTimestampGap&&!c.default.safari){Ee=!0;var qe=Math.floor(y/L);l.default.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
3
3
  `+("originalDts: "+he+" ms, curRefDts: "+te+" ms, ")+("dtsCorrection: "+Math.round(y)+" ms, generate: "+qe+" frames")),X=Math.floor(te),_e=Math.floor(te+L)-X;var H=h.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);H==null&&(l.default.w(this.TAG,"Unable to generate silent frame for "+(this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame")),H=de),Pe=[];for(var ne=0;ne<qe;ne++){te=te+L;var ve=Math.floor(te),Te=Math.floor(te+L)-ve,Ue={dts:ve,pts:ve,cts:0,unit:H,size:H.byteLength,duration:Te,originalDts:he,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Pe.push(Ue),C+=Ue.size}this._audioNextDts=te+L}else X=Math.floor(te),_e=Math.floor(te+L)-X,this._audioNextDts=te+L}else{if(X=he-y,re!==x.length-1){var be=x[re+1].dts-this._dtsBase-y;_e=be-X}else if(k!=null){var be=k.dts-this._dtsBase-y;_e=be-X}else Q.length>=1?_e=Q[Q.length-1].duration:_e=Math.floor(L);this._audioNextDts=X+_e}T===-1&&(T=X),Q.push({dts:X,pts:X,cts:0,unit:O.unit,size:O.unit.byteLength,duration:_e,originalDts:he,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Ee&&Q.push.apply(Q,Pe)}}if(Q.length===0){E.samples=[],E.length=0;return}R?P=new Uint8Array(C):(P=new Uint8Array(C),P[0]=C>>>24&255,P[1]=C>>>16&255,P[2]=C>>>8&255,P[3]=C&255,P.set(d.default.types.mdat,4));for(var re=0;re<Q.length;re++){var de=Q[re].unit;P.set(de,b),b+=de.byteLength}var ke=Q[Q.length-1];A=ke.dts+ke.duration;var Le=new g.MediaSegmentInfo;Le.beginDts=T,Le.endDts=A,Le.beginPts=T,Le.endPts=A,Le.originalBeginDts=Q[0].originalDts,Le.originalEndDts=ke.originalDts+ke.duration,Le.firstSample=new g.SampleInfo(Q[0].dts,Q[0].pts,Q[0].duration,Q[0].originalDts,!1),Le.lastSample=new g.SampleInfo(ke.dts,ke.pts,ke.duration,ke.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(Le),E.samples=Q,E.sequenceNumber++;var ft=null;R?ft=new Uint8Array:ft=d.default.moof(E,T),E.samples=[],E.length=0;var lt={type:"audio",data:this._mergeBoxes(ft,P).buffer,sampleCount:Q.length,info:Le};R&&I&&(lt.timestampOffset=T),this._onMediaSegment("audio",lt)}}},p.prototype._remuxVideo=function(v,_){if(this._videoMeta!=null){var E=v,x=E.samples,y=void 0,T=-1,A=-1,L=-1,R=-1;if(!(!x||x.length===0)&&!(x.length===1&&!_)){var I=8,D=null,b=8+v.length,P=null;if(x.length>1&&(P=x.pop(),b-=P.length),this._videoStashedLastSample!=null){var C=this._videoStashedLastSample;this._videoStashedLastSample=null,x.unshift(C),b+=C.length}P!=null&&(this._videoStashedLastSample=P);var k=x[0].dts-this._dtsBase;if(this._videoNextDts)y=k-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())y=0;else{var O=this._videoSegmentInfoList.getLastSampleBefore(k);if(O!=null){var F=k-(O.originalDts+O.duration);F<=3&&(F=0);var U=O.dts+O.duration+F;y=k-U}else y=0}for(var G=new g.MediaSegmentInfo,V=[],$=0;$<x.length;$++){var C=x[$],K=C.dts-this._dtsBase,H=C.isKeyframe,X=K-y,ee=C.cts,Q=X+ee;T===-1&&(T=X,L=Q);var re=0;if($!==x.length-1){var de=x[$+1].dts-this._dtsBase-y;re=de-X}else if(P!=null){var de=P.dts-this._dtsBase-y;re=de-X}else V.length>=1?re=V[V.length-1].duration:re=Math.floor(this._videoMeta.refSampleDuration);if(H){var he=new g.SampleInfo(X,Q,re,C.dts,!0);he.fileposition=C.fileposition,G.appendSyncPoint(he)}V.push({dts:X,pts:Q,cts:ee,units:C.units,size:C.length,isKeyframe:H,duration:re,originalDts:K,flags:{isLeading:0,dependsOn:H?2:1,isDependedOn:H?1:0,hasRedundancy:0,isNonSync:H?0:1}})}D=new Uint8Array(b),D[0]=b>>>24&255,D[1]=b>>>16&255,D[2]=b>>>8&255,D[3]=b&255,D.set(d.default.types.mdat,4);for(var $=0;$<V.length;$++)for(var Ee=V[$].units;Ee.length;){var Pe=Ee.shift(),_e=Pe.data;D.set(_e,I),I+=_e.byteLength}var te=V[V.length-1];if(A=te.dts+te.duration,R=te.pts+te.duration,this._videoNextDts=A,G.beginDts=T,G.endDts=A,G.beginPts=L,G.endPts=R,G.originalBeginDts=V[0].originalDts,G.originalEndDts=te.originalDts+te.duration,G.firstSample=new g.SampleInfo(V[0].dts,V[0].pts,V[0].duration,V[0].originalDts,V[0].isKeyframe),G.lastSample=new g.SampleInfo(te.dts,te.pts,te.duration,te.originalDts,te.isKeyframe),this._isLive||this._videoSegmentInfoList.append(G),E.samples=V,E.sequenceNumber++,this._forceFirstIDR){var Oe=V[0].flags;Oe.dependsOn=2,Oe.isNonSync=0}var qe=d.default.moof(E,T);E.samples=[],E.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(qe,D).buffer,sampleCount:V.length,info:G})}}},p.prototype._mergeBoxes=function(v,_){var E=new Uint8Array(v.byteLength+_.byteLength);return E.set(v,0),E.set(_,v.byteLength),E},p})();o.default=m}),"./src/utils/browser.js":(function(n,o,u){u.r(o);var l={};function d(){var h=self.navigator.userAgent.toLowerCase(),c=/(edge)\/([\w.]+)/.exec(h)||/(opr)[\/]([\w.]+)/.exec(h)||/(chrome)[ \/]([\w.]+)/.exec(h)||/(iemobile)[\/]([\w.]+)/.exec(h)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(h)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(h)||/(webkit)[ \/]([\w.]+)/.exec(h)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(h)||/(msie) ([\w.]+)/.exec(h)||h.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(h)||h.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(h)||[],g=/(ipad)/.exec(h)||/(ipod)/.exec(h)||/(windows phone)/.exec(h)||/(iphone)/.exec(h)||/(kindle)/.exec(h)||/(android)/.exec(h)||/(windows)/.exec(h)||/(mac)/.exec(h)||/(linux)/.exec(h)||/(cros)/.exec(h)||[],f={browser:c[5]||c[3]||c[1]||"",version:c[2]||c[4]||"0",majorVersion:c[4]||c[2]||"0",platform:g[0]||""},m={};if(f.browser){m[f.browser]=!0;var p=f.majorVersion.split(".");m.version={major:parseInt(f.majorVersion,10),string:f.version},p.length>1&&(m.version.minor=parseInt(p[1],10)),p.length>2&&(m.version.build=parseInt(p[2],10))}if(f.platform&&(m[f.platform]=!0),(m.chrome||m.opr||m.safari)&&(m.webkit=!0),m.rv||m.iemobile){m.rv&&delete m.rv;var v="msie";f.browser=v,m[v]=!0}if(m.edge){delete m.edge;var _="msedge";f.browser=_,m[_]=!0}if(m.opr){var E="opera";f.browser=E,m[E]=!0}if(m.safari&&m.android){var x="android";f.browser=x,m[x]=!0}m.name=f.browser,m.platform=f.platform;for(var y in l)l.hasOwnProperty(y)&&delete l[y];Object.assign(l,m)}d(),o.default=l}),"./src/utils/exception.js":(function(n,o,u){u.r(o),u.d(o,{RuntimeException:function(){return d},IllegalStateException:function(){return h},InvalidArgumentException:function(){return c},NotImplementedException:function(){return g}});var l=(function(){var f=function(m,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,_){v.__proto__=_}||function(v,_){for(var E in _)Object.prototype.hasOwnProperty.call(_,E)&&(v[E]=_[E])},f(m,p)};return function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(m,p);function v(){this.constructor=m}m.prototype=p===null?Object.create(p):(v.prototype=p.prototype,new v)}})(),d=(function(){function f(m){this._message=m}return Object.defineProperty(f.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),f.prototype.toString=function(){return this.name+": "+this.message},f})(),h=(function(f){l(m,f);function m(p){return f.call(this,p)||this}return Object.defineProperty(m.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),m})(d),c=(function(f){l(m,f);function m(p){return f.call(this,p)||this}return Object.defineProperty(m.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),m})(d),g=(function(f){l(m,f);function m(p){return f.call(this,p)||this}return Object.defineProperty(m.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),m})(d)}),"./src/utils/logger.js":(function(n,o,u){u.r(o);var l=u("./node_modules/events/events.js"),d=u.n(l),h=(function(){function c(){}return c.e=function(g,f){(!g||c.FORCE_GLOBAL_TAG)&&(g=c.GLOBAL_TAG);var m="["+g+"] > "+f;c.ENABLE_CALLBACK&&c.emitter.emit("log","error",m),c.ENABLE_ERROR&&(console.error?console.error(m):console.warn?console.warn(m):console.log(m))},c.i=function(g,f){(!g||c.FORCE_GLOBAL_TAG)&&(g=c.GLOBAL_TAG);var m="["+g+"] > "+f;c.ENABLE_CALLBACK&&c.emitter.emit("log","info",m),c.ENABLE_INFO&&(console.info?console.info(m):console.log(m))},c.w=function(g,f){(!g||c.FORCE_GLOBAL_TAG)&&(g=c.GLOBAL_TAG);var m="["+g+"] > "+f;c.ENABLE_CALLBACK&&c.emitter.emit("log","warn",m),c.ENABLE_WARN&&(console.warn?console.warn(m):console.log(m))},c.d=function(g,f){(!g||c.FORCE_GLOBAL_TAG)&&(g=c.GLOBAL_TAG);var m="["+g+"] > "+f;c.ENABLE_CALLBACK&&c.emitter.emit("log","debug",m),c.ENABLE_DEBUG&&(console.debug?console.debug(m):console.log(m))},c.v=function(g,f){(!g||c.FORCE_GLOBAL_TAG)&&(g=c.GLOBAL_TAG);var m="["+g+"] > "+f;c.ENABLE_CALLBACK&&c.emitter.emit("log","verbose",m),c.ENABLE_VERBOSE&&console.log(m)},c})();h.GLOBAL_TAG="flv.js",h.FORCE_GLOBAL_TAG=!1,h.ENABLE_ERROR=!0,h.ENABLE_INFO=!0,h.ENABLE_WARN=!0,h.ENABLE_DEBUG=!0,h.ENABLE_VERBOSE=!0,h.ENABLE_CALLBACK=!1,h.emitter=new(d()),o.default=h}),"./src/utils/logging-control.js":(function(n,o,u){u.r(o);var l=u("./node_modules/events/events.js"),d=u.n(l),h=u("./src/utils/logger.js"),c=(function(){function g(){}return Object.defineProperty(g,"forceGlobalTag",{get:function(){return h.default.FORCE_GLOBAL_TAG},set:function(f){h.default.FORCE_GLOBAL_TAG=f,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"globalTag",{get:function(){return h.default.GLOBAL_TAG},set:function(f){h.default.GLOBAL_TAG=f,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableAll",{get:function(){return h.default.ENABLE_VERBOSE&&h.default.ENABLE_DEBUG&&h.default.ENABLE_INFO&&h.default.ENABLE_WARN&&h.default.ENABLE_ERROR},set:function(f){h.default.ENABLE_VERBOSE=f,h.default.ENABLE_DEBUG=f,h.default.ENABLE_INFO=f,h.default.ENABLE_WARN=f,h.default.ENABLE_ERROR=f,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableDebug",{get:function(){return h.default.ENABLE_DEBUG},set:function(f){h.default.ENABLE_DEBUG=f,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableVerbose",{get:function(){return h.default.ENABLE_VERBOSE},set:function(f){h.default.ENABLE_VERBOSE=f,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableInfo",{get:function(){return h.default.ENABLE_INFO},set:function(f){h.default.ENABLE_INFO=f,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableWarn",{get:function(){return h.default.ENABLE_WARN},set:function(f){h.default.ENABLE_WARN=f,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableError",{get:function(){return h.default.ENABLE_ERROR},set:function(f){h.default.ENABLE_ERROR=f,g._notifyChange()},enumerable:!1,configurable:!0}),g.getConfig=function(){return{globalTag:h.default.GLOBAL_TAG,forceGlobalTag:h.default.FORCE_GLOBAL_TAG,enableVerbose:h.default.ENABLE_VERBOSE,enableDebug:h.default.ENABLE_DEBUG,enableInfo:h.default.ENABLE_INFO,enableWarn:h.default.ENABLE_WARN,enableError:h.default.ENABLE_ERROR,enableCallback:h.default.ENABLE_CALLBACK}},g.applyConfig=function(f){h.default.GLOBAL_TAG=f.globalTag,h.default.FORCE_GLOBAL_TAG=f.forceGlobalTag,h.default.ENABLE_VERBOSE=f.enableVerbose,h.default.ENABLE_DEBUG=f.enableDebug,h.default.ENABLE_INFO=f.enableInfo,h.default.ENABLE_WARN=f.enableWarn,h.default.ENABLE_ERROR=f.enableError,h.default.ENABLE_CALLBACK=f.enableCallback},g._notifyChange=function(){var f=g.emitter;if(f.listenerCount("change")>0){var m=g.getConfig();f.emit("change",m)}},g.registerListener=function(f){g.emitter.addListener("change",f)},g.removeListener=function(f){g.emitter.removeListener("change",f)},g.addLogListener=function(f){h.default.emitter.addListener("log",f),h.default.emitter.listenerCount("log")>0&&(h.default.ENABLE_CALLBACK=!0,g._notifyChange())},g.removeLogListener=function(f){h.default.emitter.removeListener("log",f),h.default.emitter.listenerCount("log")===0&&(h.default.ENABLE_CALLBACK=!1,g._notifyChange())},g})();c.emitter=new(d()),o.default=c}),"./src/utils/polyfill.js":(function(n,o,u){u.r(o);var l=(function(){function d(){}return d.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(h,c){return h.__proto__=c,h},Object.assign=Object.assign||function(h){if(h==null)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(h),g=1;g<arguments.length;g++){var f=arguments[g];if(f!=null)for(var m in f)f.hasOwnProperty(m)&&(c[m]=f[m])}return c},typeof self.Promise!="function"&&u("./node_modules/es6-promise/dist/es6-promise.js").polyfill()},d})();l.install(),o.default=l}),"./src/utils/utf8-conv.js":(function(n,o,u){u.r(o);function l(h,c,g){var f=h;if(c+g<f.length){for(;g--;)if((f[++c]&192)!==128)return!1;return!0}else return!1}function d(h){for(var c=[],g=h,f=0,m=h.length;f<m;){if(g[f]<128){c.push(String.fromCharCode(g[f])),++f;continue}else if(!(g[f]<192)){if(g[f]<224){if(l(g,f,1)){var p=(g[f]&31)<<6|g[f+1]&63;if(p>=128){c.push(String.fromCharCode(p&65535)),f+=2;continue}}}else if(g[f]<240){if(l(g,f,2)){var p=(g[f]&15)<<12|(g[f+1]&63)<<6|g[f+2]&63;if(p>=2048&&(p&63488)!==55296){c.push(String.fromCharCode(p&65535)),f+=3;continue}}}else if(g[f]<248&&l(g,f,3)){var p=(g[f]&7)<<18|(g[f+1]&63)<<12|(g[f+2]&63)<<6|g[f+3]&63;if(p>65536&&p<1114112){p-=65536,c.push(String.fromCharCode(p>>>10|55296)),c.push(String.fromCharCode(p&1023|56320)),f+=4;continue}}}c.push("�"),++f}return c.join("")}o.default=d})},i={};function s(n){var o=i[n];if(o!==void 0)return o.exports;var u=i[n]={exports:{}};return t[n].call(u.exports,u,u.exports,s),u.exports}s.m=t,(function(){s.n=function(n){var o=n&&n.__esModule?function(){return n.default}:function(){return n};return s.d(o,{a:o}),o}})(),(function(){s.d=function(n,o){for(var u in o)s.o(o,u)&&!s.o(n,u)&&Object.defineProperty(n,u,{enumerable:!0,get:o[u]})}})(),(function(){s.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(n){if(typeof window=="object")return window}})()})(),(function(){s.o=function(n,o){return Object.prototype.hasOwnProperty.call(n,o)}})(),(function(){s.r=function(n){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})}})();var r=s("./src/index.js");return r})()})})(ji)),ji.exports}var mo=go();const Hi=Lt.getDefaultExportFromCjs(mo),z=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},po=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=_o},_o=Number.MAX_SAFE_INTEGER||9007199254740991;let Z=(function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a})({}),M=(function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",a.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",a.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.ASSET_LIST_LOAD_ERROR="assetListLoadError",a.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",a.ASSET_LIST_PARSING_ERROR="assetListParsingError",a.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.ATTACH_MEDIA_ERROR="attachMediaError",a.UNKNOWN="unknown",a})({}),S=(function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.MEDIA_ENDED="hlsMediaEnded",a.STALL_RESOLVED="hlsStallResolved",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFERED_TO_END="hlsBufferedToEnd",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a.ASSET_LIST_LOADING="hlsAssetListLoading",a.ASSET_LIST_LOADED="hlsAssetListLoaded",a.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",a.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",a.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",a.INTERSTITIAL_STARTED="hlsInterstitialStarted",a.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",a.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",a.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",a.INTERSTITIAL_ENDED="hlsInterstitialEnded",a.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",a.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",a.EVENT_CUE_ENTER="hlsEventCueEnter",a})({});var ue={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},q={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class Dt{constructor(e,t=0,i=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=i}sample(e,t){const i=Math.pow(this.alpha_,e);this.estimate_=t*(1-i)+i*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class vo{constructor(e,t,i,s=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Dt(e),this.fast_=new Dt(t),this.defaultTTFB_=s,this.ttfb_=new Dt(e)}update(e,t){const{slow_:i,fast_:s,ttfb_:r}=this;i.halfLife!==e&&(this.slow_=new Dt(e,i.getEstimate(),i.getTotalWeight())),s.halfLife!==t&&(this.fast_=new Dt(t,s.getEstimate(),s.getTotalWeight())),r.halfLife!==e&&(this.ttfb_=new Dt(e,r.getEstimate(),r.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const i=8*t,s=e/1e3,r=i/s;this.fast_.sample(s,r),this.slow_.sample(s,r)}sampleTTFB(e){const t=e/1e3,i=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(i,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function Eo(a,e,t){return(e=xo(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function ge(){return ge=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(a[i]=t[i])}return a},ge.apply(null,arguments)}function cr(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(a);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable})),t.push.apply(t,i)}return t}function ce(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?cr(Object(t),!0).forEach(function(i){Eo(a,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):cr(Object(t)).forEach(function(i){Object.defineProperty(a,i,Object.getOwnPropertyDescriptor(t,i))})}return a}function yo(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var i=t.call(a,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function xo(a){var e=yo(a,"string");return typeof e=="symbol"?e:e+""}class ze{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const i=`[${e}]:`;this.trace=pt,this.debug=t.debug.bind(null,i),this.log=t.log.bind(null,i),this.warn=t.warn.bind(null,i),this.info=t.info.bind(null,i),this.error=t.error.bind(null,i)}}const pt=function(){},So={trace:pt,debug:pt,log:pt,warn:pt,info:pt,error:pt};function ps(){return ge({},So)}function To(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):pt}function fr(a,e,t){return e[a]?e[a].bind(e):To(a,t)}const _s=ps();function Ao(a,e,t){const i=ps();if(typeof console=="object"&&a===!0||typeof a=="object"){const s=["debug","log","info","warn","error"];s.forEach(r=>{i[r]=fr(r,a,t)});try{i.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`)}catch(r){return ps()}s.forEach(r=>{_s[r]=fr(r,a)})}else ge(_s,i);return i}const fe=_s;function Et(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Lo(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function Cn(a,e){const t=Object.keys(a),i=Object.keys(e),s=t.length,r=i.length;return!s||!r||s===r&&!t.some(n=>i.indexOf(n)===-1)}function We(a,e=!1){if(typeof TextDecoder!="undefined"){const l=new TextDecoder("utf-8").decode(a);if(e){const d=l.indexOf("\0");return d!==-1?l.substring(0,d):l}return l.replace(/\0/g,"")}const t=a.length;let i,s,r,n="",o=0;for(;o<t;){if(i=a[o++],i===0&&e)return n;if(i===0||i===3)continue;switch(i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=String.fromCharCode(i);break;case 12:case 13:s=a[o++],n+=String.fromCharCode((i&31)<<6|s&63);break;case 14:s=a[o++],r=a[o++],n+=String.fromCharCode((i&15)<<12|(s&63)<<6|(r&63)<<0);break}}return n}function Me(a){let e="";for(let t=0;t<a.length;t++){let i=a[t].toString(16);i.length<2&&(i="0"+i),e+=i}return e}function Pn(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function Io(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Wi={exports:{}},gr;function Ro(){return gr||(gr=1,(function(a,e){(function(t){var i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(u,l,d){if(d=d||{},u=u.trim(),l=l.trim(),!l){if(!d.alwaysNormalize)return u;var h=o.parseURL(u);if(!h)throw new Error("Error trying to parse base URL.");return h.path=o.normalizePath(h.path),o.buildURLFromParts(h)}var c=o.parseURL(l);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return d.alwaysNormalize?(c.path=o.normalizePath(c.path),o.buildURLFromParts(c)):l;var g=o.parseURL(u);if(!g)throw new Error("Error trying to parse base URL.");if(!g.netLoc&&g.path&&g.path[0]!=="/"){var f=s.exec(g.path);g.netLoc=f[1],g.path=f[2]}g.netLoc&&!g.path&&(g.path="/");var m={scheme:g.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(m.netLoc=g.netLoc,c.path[0]!=="/"))if(!c.path)m.path=g.path,c.params||(m.params=g.params,c.query||(m.query=g.query));else{var p=g.path,v=p.substring(0,p.lastIndexOf("/")+1)+c.path;m.path=o.normalizePath(v)}return m.path===null&&(m.path=d.alwaysNormalize?o.normalizePath(c.path):c.path),o.buildURLFromParts(m)},parseURL:function(u){var l=i.exec(u);return l?{scheme:l[1]||"",netLoc:l[2]||"",path:l[3]||"",params:l[4]||"",query:l[5]||"",fragment:l[6]||""}:null},normalizePath:function(u){for(u=u.split("").reverse().join("").replace(r,"");u.length!==(u=u.replace(n,"")).length;);return u.split("").reverse().join("")},buildURLFromParts:function(u){return u.scheme+u.netLoc+u.path+u.params+u.query+u.fragment}};a.exports=o})()})(Wi)),Wi.exports}var Ms=Ro();class Fs{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var me={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class On{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,Do(this,"stats")}setByteRange(e,t){const i=e.split("@",2);let s;i.length===1?s=(t==null?void 0:t.byteRangeEndOffset)||0:s=parseInt(i[1]),this._byteRange=[s,parseInt(i[0])+s]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[me.AUDIO]:null,[me.VIDEO]:null,[me.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new Fs),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Ms.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[me.AUDIO]=null,e[me.VIDEO]=null,e[me.AUDIOVIDEO]=null}}function Ae(a){return a.sn!=="initSegment"}class Yi extends On{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange.length){const e=this.byteRange[0],t=this.byteRange[1];if(z(e)&&z(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){var e;const{levelkeys:t}=this;if(!t||t.NONE)return null;if(t.identity)this._decryptdata||(this._decryptdata=t.identity.getDecryptData(this.sn));else if(!((e=this._decryptdata)!=null&&e.keyId)){const i=Object.keys(t);if(i.length===1){const s=this._decryptdata=t[i[0]]||null;s&&(this._decryptdata=s.getDecryptData(this.sn,t))}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=z(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){var t;const i=Object.keys(this.levelkeys),s=i.length;if(s>1||s===1&&(t=this.levelkeys[i[0]])!=null&&t.encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!z(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Ae(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){const t=this.levelkeys;if(t){var i;const s=t[e];s&&!((i=this._decryptdata)!=null&&i.keyId)&&(this._decryptdata=s.getDecryptData(this.sn,t))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,i,s,r,n=!1){const{elementaryStreams:o}=this,u=o[e];if(!u){o[e]={startPTS:t,endPTS:i,startDTS:s,endDTS:r,partial:n};return}u.startPTS=Math.min(u.startPTS,t),u.endPTS=Math.max(u.endPTS,i),u.startDTS=Math.min(u.startDTS,s),u.endDTS=Math.max(u.endDTS,r)}}class bo extends On{constructor(e,t,i,s,r){super(i),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=s;const n=e.enumeratedString("BYTERANGE");n&&this.setByteRange(n,r),r&&(this.fragOffset=r.fragOffset+r.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function kn(a,e){const t=Object.getPrototypeOf(a);if(t){const i=Object.getOwnPropertyDescriptor(t,e);return i||kn(t,e)}}function Do(a,e){const t=kn(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const mr=Math.pow(2,32)-1,Co=[].push,wn={video:1,audio:2,id3:3,text:4};function Ie(a){return String.fromCharCode.apply(null,a)}function Mn(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function ie(a,e){const t=Fn(a,e);return t<0?4294967296+t:t}function pr(a,e){let t=ie(a,e);return t*=Math.pow(2,32),t+=ie(a,e+4),t}function Fn(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function Po(a){const e=a.byteLength;for(let t=0;t<e;){const i=ie(a,t);if(i>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=i>1?t+i:e}return!1}function oe(a,e){const t=[];if(!e.length)return t;const i=a.byteLength;for(let s=0;s<i;){const r=ie(a,s),n=Ie(a.subarray(s+4,s+8)),o=r>1?s+r:i;if(n===e[0])if(e.length===1)t.push(a.subarray(s+8,o));else{const u=oe(a.subarray(s+8,o),e.slice(1));u.length&&Co.apply(t,u)}s=o}return t}function Oo(a){const e=[],t=a[0];let i=8;const s=ie(a,i);i+=4;let r=0,n=0;t===0?(r=ie(a,i),n=ie(a,i+4),i+=8):(r=pr(a,i),n=pr(a,i+8),i+=16),i+=2;let o=a.length+n;const u=Mn(a,i);i+=2;for(let l=0;l<u;l++){let d=i;const h=ie(a,d);d+=4;const c=h&2147483647;if((h&2147483648)>>>31===1)return fe.warn("SIDX has hierarchical references (not supported)"),null;const f=ie(a,d);d+=4,e.push({referenceSize:c,subsegmentDuration:f,info:{duration:f/s,start:o,end:o+c-1}}),o+=c,d+=4,i=d}return{earliestPresentationTime:r,timescale:s,version:t,referencesCount:u,references:e}}function Bn(a){const e=[],t=oe(a,["moov","trak"]);for(let s=0;s<t.length;s++){const r=t[s],n=oe(r,["tkhd"])[0];if(n){let o=n[0];const u=ie(n,o===0?12:20),l=oe(r,["mdia","mdhd"])[0];if(l){o=l[0];const d=ie(l,o===0?12:20),h=oe(r,["mdia","hdlr"])[0];if(h){const c=Ie(h.subarray(8,12)),g={soun:me.AUDIO,vide:me.VIDEO}[c],f=oe(r,["mdia","minf","stbl","stsd"])[0],m=ko(f);g?(e[u]={timescale:d,type:g,stsd:m},e[g]=ce({timescale:d,id:u},m)):e[u]={timescale:d,type:c,stsd:m}}}}}return oe(a,["moov","mvex","trex"]).forEach(s=>{const r=ie(s,4),n=e[r];n&&(n.default={duration:ie(s,12),flags:ie(s,20)})}),e}function ko(a){const e=a.subarray(8),t=e.subarray(86),i=Ie(e.subarray(4,8));let s=i,r;const n=i==="enca"||i==="encv";if(n){const l=oe(e,[i])[0].subarray(i==="enca"?28:78);oe(l,["sinf"]).forEach(h=>{const c=oe(h,["schm"])[0];if(c){const g=Ie(c.subarray(4,8));if(g==="cbcs"||g==="cenc"){const f=oe(h,["frma"])[0];f&&(s=Ie(f))}}})}const o=s;switch(s){case"avc1":case"avc2":case"avc3":case"avc4":{const u=oe(t,["avcC"])[0];u&&u.length>3&&(s+="."+ai(u[1])+ai(u[2])+ai(u[3]),r=ni(o==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const u=oe(e,[i])[0],l=oe(u.subarray(28),["esds"])[0];if(l&&l.length>7){let d=4;if(l[d++]!==3)break;d=zi(l,d),d+=2;const h=l[d++];if(h&128&&(d+=2),h&64&&(d+=l[d++]),l[d++]!==4)break;d=zi(l,d);const c=l[d++];if(c===64)s+="."+ai(c);else break;if(d+=12,l[d++]!==5)break;d=zi(l,d);const g=l[d++];let f=(g&248)>>3;f===31&&(f+=1+((g&7)<<3)+((l[d]&224)>>5)),s+="."+f}break}case"hvc1":case"hev1":{const u=oe(t,["hvcC"])[0];if(u&&u.length>12){const l=u[1],d=["","A","B","C"][l>>6],h=l&31,c=ie(u,2),g=(l&32)>>5?"H":"L",f=u[12],m=u.subarray(6,12);s+="."+d+h,s+="."+wo(c).toString(16).toUpperCase(),s+="."+g+f;let p="";for(let v=m.length;v--;){const _=m[v];(_||p)&&(p="."+_.toString(16).toUpperCase()+p)}s+=p}r=ni(o=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{s=ni(s,t)||s;break}case"vp09":{const u=oe(t,["vpcC"])[0];if(u&&u.length>6){const l=u[4],d=u[5],h=u[6]>>4&15;s+="."+it(l)+"."+it(d)+"."+it(h)}break}case"av01":{const u=oe(t,["av1C"])[0];if(u&&u.length>2){const l=u[1]>>>5,d=u[1]&31,h=u[2]>>>7?"H":"M",c=(u[2]&64)>>6,g=(u[2]&32)>>5,f=l===2&&c?g?12:10:c?10:8,m=(u[2]&16)>>4,p=(u[2]&8)>>3,v=(u[2]&4)>>2,_=u[2]&3;s+="."+l+"."+it(d)+h+"."+it(f)+"."+m+"."+p+v+_+"."+it(1)+"."+it(1)+"."+it(1)+"."+0,r=ni("dav1",t)}break}}return{codec:s,encrypted:n,supplemental:r}}function ni(a,e){const t=oe(e,["dvvC"]),i=t.length?t[0]:oe(e,["dvcC"])[0];if(i){const s=i[2]>>1&127,r=i[2]<<5&32|i[3]>>3&31;return a+"."+it(s)+"."+it(r)}}function wo(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function zi(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function ai(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function it(a){return(a<10?"0":"")+a}function Mo(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&Nn(a,(i,s)=>{const r=i.subarray(8,24);r.some(n=>n!==0)||(fe.log(`[eme] Patching keyId in 'enc${s?"a":"v"}>sinf>>tenc' box: ${Me(r)} -> ${Me(t)}`),i.set(t,8))})}function Fo(a){const e=[];return Nn(a,t=>e.push(t.subarray(8,24))),e}function Nn(a,e){oe(a,["moov","trak"]).forEach(i=>{const s=oe(i,["mdia","minf","stbl","stsd"])[0];if(!s)return;const r=s.subarray(8);let n=oe(r,["enca"]);const o=n.length>0;o||(n=oe(r,["encv"])),n.forEach(u=>{const l=o?u.subarray(28):u.subarray(78);oe(l,["sinf"]).forEach(h=>{const c=Un(h);c&&e(c,o)})})})}function Un(a){const e=oe(a,["schm"])[0];if(e){const t=Ie(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const i=oe(a,["schi","tenc"])[0];if(i)return i}}}function Bo(a,e,t){const i={},s=oe(a,["moof","traf"]);for(let r=0;r<s.length;r++){const n=s[r],o=oe(n,["tfhd"])[0],u=ie(o,4),l=e[u];if(!l)continue;i[u]||(i[u]={start:NaN,duration:0,sampleCount:0,timescale:l.timescale,type:l.type});const d=i[u],h=oe(n,["tfdt"])[0];if(h){const E=h[0];let x=ie(h,4);E===1&&(x===mr?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(x*=mr+1,x+=ie(h,8))),z(x)&&(!z(d.start)||x<d.start)&&(d.start=x)}const c=l.default,g=ie(o,0)|(c==null?void 0:c.flags);let f=(c==null?void 0:c.duration)||0;g&8&&(g&2?f=ie(o,12):f=ie(o,8));const m=oe(n,["trun"]);let p=d.start||0,v=0,_=f;for(let E=0;E<m.length;E++){const x=m[E],y=ie(x,4),T=d.sampleCount;d.sampleCount+=y;const A=x[3]&1,L=x[3]&4,R=x[2]&1,I=x[2]&2,D=x[2]&4,b=x[2]&8;let P=8,C=y;for(A&&(P+=4),L&&y&&(!(x[P+1]&1)&&d.keyFrameIndex===void 0&&(d.keyFrameIndex=T),P+=4,R?(_=ie(x,P),P+=4):_=f,I&&(P+=4),b&&(P+=4),p+=_,v+=_,C--);C--;)R?(_=ie(x,P),P+=4):_=f,I&&(P+=4),D&&(x[P+1]&1||d.keyFrameIndex===void 0&&(d.keyFrameIndex=d.sampleCount-(C+1),d.keyFrameStart=p),P+=4),b&&(P+=4),p+=_,v+=_;!v&&f&&(v+=f*y)}d.duration+=v}if(!Object.keys(i).some(r=>i[r].duration)){let r=1/0,n=0;const o=oe(a,["sidx"]);for(let u=0;u<o.length;u++){const l=Oo(o[u]);if(l!=null&&l.references){r=Math.min(r,l.earliestPresentationTime/l.timescale);const d=l.references.reduce((h,c)=>h+c.info.duration||0,0);n=Math.max(n,d+l.earliestPresentationTime/l.timescale)}}n&&z(n)&&Object.keys(i).forEach(u=>{i[u].duration||(i[u].duration=n*i[u].timescale-i[u].start)})}return i}function No(a){const e={valid:null,remainder:null},t=oe(a,["moof"]);if(t.length<2)return e.remainder=a,e;const i=t[t.length-1];return e.valid=a.slice(0,i.byteOffset-8),e.remainder=a.slice(i.byteOffset-8),e}function Ye(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function _r(a,e){const t=[],i=e.samples,s=e.timescale,r=e.id;let n=!1;return oe(i,["moof"]).map(u=>{const l=u.byteOffset-8;oe(u,["traf"]).map(h=>{const c=oe(h,["tfdt"]).map(g=>{const f=g[0];let m=ie(g,4);return f===1&&(m*=Math.pow(2,32),m+=ie(g,8)),m/s})[0];return c!==void 0&&(a=c),oe(h,["tfhd"]).map(g=>{const f=ie(g,4),m=ie(g,0)&16777215,p=(m&1)!==0,v=(m&2)!==0,_=(m&8)!==0;let E=0;const x=(m&16)!==0;let y=0;const T=(m&32)!==0;let A=8;f===r&&(p&&(A+=8),v&&(A+=4),_&&(E=ie(g,A),A+=4),x&&(y=ie(g,A),A+=4),T&&(A+=4),e.type==="video"&&(n=Ui(e.codec)),oe(h,["trun"]).map(L=>{const R=L[0],I=ie(L,0)&16777215,D=(I&1)!==0;let b=0;const P=(I&4)!==0,C=(I&256)!==0;let k=0;const O=(I&512)!==0;let F=0;const U=(I&1024)!==0,G=(I&2048)!==0;let V=0;const $=ie(L,4);let K=8;D&&(b=ie(L,K),K+=4),P&&(K+=4);let H=b+l;for(let X=0;X<$;X++){if(C?(k=ie(L,K),K+=4):k=E,O?(F=ie(L,K),K+=4):F=y,U&&(K+=4),G&&(R===0?V=ie(L,K):V=Fn(L,K),K+=4),e.type===me.VIDEO){let ee=0;for(;ee<F;){const Q=ie(i,H);if(H+=4,Uo(n,i[H])){const re=i.subarray(H,H+Q);Bs(re,n?2:1,a+V/s,t)}H+=Q,ee+=Q+4}}a+=k/s}}))})})}),t}function Ui(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function Uo(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Bs(a,e,t,i){const s=$n(a);let r=0;r+=e;let n=0,o=0,u=0;for(;r<s.length;){n=0;do{if(r>=s.length)break;u=s[r++],n+=u}while(u===255);o=0;do{if(r>=s.length)break;u=s[r++],o+=u}while(u===255);const l=s.length-r;let d=r;if(o<l)r+=o;else if(o>l){fe.error(`Malformed SEI payload. ${o} is too small, only ${l} bytes left to parse.`);break}if(n===4){if(s[d++]===181){const c=Mn(s,d);if(d+=2,c===49){const g=ie(s,d);if(d+=4,g===1195456820){const f=s[d++];if(f===3){const m=s[d++],p=31&m,v=64&m,_=v?2+p*3:0,E=new Uint8Array(_);if(v){E[0]=m;for(let x=1;x<_;x++)E[x]=s[d++]}i.push({type:f,payloadType:n,pts:t,bytes:E})}}}}}else if(n===5&&o>16){const h=[];for(let f=0;f<16;f++){const m=s[d++].toString(16);h.push(m.length==1?"0"+m:m),(f===3||f===5||f===7||f===9)&&h.push("-")}const c=o-16,g=new Uint8Array(c);for(let f=0;f<c;f++)g[f]=s[d++];i.push({payloadType:n,pts:t,uuid:h.join(""),userData:We(g),userDataBytes:g})}}}function $n(a){const e=a.byteLength,t=[];let i=1;for(;i<e-2;)a[i]===0&&a[i+1]===0&&a[i+2]===3?(t.push(i+2),i+=2):i++;if(t.length===0)return a;const s=e-t.length,r=new Uint8Array(s);let n=0;for(i=0;i<s;n++,i++)n===t[0]&&(n++,t.shift()),r[i]=a[n];return r}function $o(a){const e=a[0];let t="",i="",s=0,r=0,n=0,o=0,u=0,l=0;if(e===0){for(;Ie(a.subarray(l,l+1))!=="\0";)t+=Ie(a.subarray(l,l+1)),l+=1;for(t+=Ie(a.subarray(l,l+1)),l+=1;Ie(a.subarray(l,l+1))!=="\0";)i+=Ie(a.subarray(l,l+1)),l+=1;i+=Ie(a.subarray(l,l+1)),l+=1,s=ie(a,12),r=ie(a,16),o=ie(a,20),u=ie(a,24),l=28}else if(e===1){l+=4,s=ie(a,l),l+=4;const h=ie(a,l);l+=4;const c=ie(a,l);for(l+=4,n=or(2,32)*h+c,po(n)||(n=Number.MAX_SAFE_INTEGER,fe.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=ie(a,l),l+=4,u=ie(a,l),l+=4;Ie(a.subarray(l,l+1))!=="\0";)t+=Ie(a.subarray(l,l+1)),l+=1;for(t+=Ie(a.subarray(l,l+1)),l+=1;Ie(a.subarray(l,l+1))!=="\0";)i+=Ie(a.subarray(l,l+1)),l+=1;i+=Ie(a.subarray(l,l+1)),l+=1}const d=a.subarray(l,a.byteLength);return{schemeIdUri:t,value:i,timeScale:s,presentationTime:n,presentationTimeDelta:r,eventDuration:o,id:u,payload:d}}function Go(a,...e){const t=e.length;let i=8,s=t;for(;s--;)i+=e[s].byteLength;const r=new Uint8Array(i);for(r[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=i&255,r.set(a,4),s=0,i=8;s<t;s++)r.set(e[s],i),i+=e[s].byteLength;return r}function Ko(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let i,s;i=0,s=new Uint8Array;let r;i>0?(r=new Uint8Array(4),e.length>0&&new DataView(r.buffer).setUint32(0,e.length,!1)):r=new Uint8Array;const n=new Uint8Array(4);return t.byteLength>0&&new DataView(n.buffer).setUint32(0,t.byteLength,!1),Go([112,115,115,104],new Uint8Array([i,0,0,0]),a,r,s,n,t)}function Vo(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let i=0;for(;i+32<t;){const s=new DataView(a,i),r=jo(s);e.push(r),i+=r.size}}return e}function jo(a){const e=a.getUint32(0),t=a.byteOffset,i=a.byteLength;if(i<e)return{offset:t,size:i};if(a.getUint32(4)!==1886614376)return{offset:t,size:e};const r=a.getUint32(8)>>>24;if(r!==0&&r!==1)return{offset:t,size:e};const n=a.buffer,o=Me(new Uint8Array(n,t+12,16));let u=null,l=null,d=0;if(r===0)d=28;else{const c=a.getUint32(28);if(!c||i<32+c*16)return{offset:t,size:e};u=[];for(let g=0;g<c;g++)u.push(new Uint8Array(n,t+32+g*16,16));d=32+c*16}if(!d)return{offset:t,size:e};const h=a.getUint32(d);return e-32<h?{offset:t,size:e}:(l=new Uint8Array(n,t+d+4,h),{version:r,systemId:o,kids:u,data:l,offset:t,size:e})}const Gn=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),$t={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Ns(a,e){const t=$t[e];return!!t&&!!t[a.slice(0,4)]}function Yt(a,e,t=!0){return!a.split(",").some(i=>!Us(i,e,t))}function Us(a,e,t=!0){var i;const s=Et(t);return(i=s==null?void 0:s.isTypeSupported(zt(a,e)))!=null?i:!1}function zt(a,e){return`${e}/mp4;codecs=${a}`}function vr(a){if(a){const e=a.substring(0,4);return $t.video[e]}return 2}function bi(a){const e=Gn();return a.split(",").reduce((t,i)=>{const r=e&&Ui(i)?9:$t.video[i];return r?(r*2+t)/(t?3:2):($t.audio[i]+t)/(t?2:1)},0)}const qi={};function Ho(a,e=!0){if(qi[a])return qi[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let s=0;s<t.length;s++){var i;if(Us(t[s],"audio",e))return qi[a]=t[s],t[s];if(t[s]==="mp3"&&(i=Et(e))!=null&&i.isTypeSupported("audio/mpeg"))return""}return a}const Wo=/flac|opus|mp4a\.40\.34/i;function Di(a,e=!0){return a.replace(Wo,t=>Ho(t.toLowerCase(),e))}function Yo(a,e){const t=[];if(a){const i=a.split(",");for(let s=0;s<i.length;s++)Ns(i[s],"video")||t.push(i[s])}return e&&t.push(e),t.join(",")}function yi(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(Er(a,"audio")||Er(a,"video")))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let i=t.length;i--;)if(t[i].substring(0,4)===a.substring(0,4))return t[i]}return t[0]}}return e||a}function Er(a,e){return Ns(a,e)&&Us(a,e)}function zo(a){const e=a.split(",");for(let t=0;t<e.length;t++){const i=e[t].split(".");i.length>2&&i[0]==="avc1"&&(e[t]=`avc1.${parseInt(i[1]).toString(16)}${("000"+parseInt(i[2]).toString(16)).slice(-4)}`)}return e.join(",")}function qo(a){if(a.startsWith("av01.")){const e=a.split("."),t=["0","111","01","01","01","0"];for(let i=e.length;i>4&&i<10;i++)e[i]=t[i-4];return e.join(".")}return a}function yr(a){const e=Et(a)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function vs(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Xo={supported:!0,powerEfficient:!0,smooth:!0},Qo={supported:!1,smooth:!1,powerEfficient:!1},Kn={supported:!0,configurations:[],decodingInfoResults:[Xo]};function Vn(a,e){return{supported:!1,configurations:e,decodingInfoResults:[Qo],error:a}}function Zo(a,e,t,i,s,r){const n=a.videoCodec,o=a.audioCodec?a.audioGroups:null,u=r==null?void 0:r.audioCodec,l=r==null?void 0:r.channels,d=l?parseInt(l):u?1/0:2;let h=null;if(o!=null&&o.length)try{o.length===1&&o[0]?h=e.groups[o[0]].channels:h=o.reduce((c,g)=>{if(g){const f=e.groups[g];if(!f)throw new Error(`Audio track group ${g} not found`);Object.keys(f.channels).forEach(m=>{c[m]=(c[m]||0)+f.channels[m]})}return c},{2:0})}catch(c){return!0}return n!==void 0&&(n.split(",").some(c=>Ui(c))||a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(i,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(s,8e6))||!!h&&z(d)&&Object.keys(h).some(c=>parseInt(c)>d)}function jn(a,e,t,i={}){const s=a.videoCodec;if(!s&&!a.audioCodec||!t)return Promise.resolve(Kn);const r=[],n=Jo(a),o=n.length,u=el(a,e,o>0),l=u.length;for(let d=o||1*l||1;d--;){const h={type:"media-source"};if(o&&(h.video=n[d%o]),l){h.audio=u[d%l];const c=h.audio.bitrate;h.video&&c&&(h.video.bitrate-=c)}r.push(h)}if(s){const d=navigator.userAgent;if(s.split(",").some(h=>Ui(h))&&Gn())return Promise.resolve(Vn(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${d})`),r))}return Promise.all(r.map(d=>{const h=il(d);return i[h]||(i[h]=t.decodingInfo(d))})).then(d=>({supported:!d.some(h=>!h.supported),configurations:r,decodingInfoResults:d})).catch(d=>({supported:!1,configurations:r,decodingInfoResults:[],error:d}))}function Jo(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),i=Hn(a),s=a.width||640,r=a.height||480,n=a.frameRate||30,o=a.videoRange.toLowerCase();return t?t.map(u=>{const l={contentType:zt(qo(u),"video"),width:s,height:r,bitrate:i,framerate:n};return o!=="sdr"&&(l.transferFunction=o),l}):[]}function el(a,e,t){var i;const s=(i=a.audioCodec)==null?void 0:i.split(","),r=Hn(a);return s&&a.audioGroups?a.audioGroups.reduce((n,o)=>{var u;const l=o?(u=e.groups[o])==null?void 0:u.tracks:null;return l?l.reduce((d,h)=>{if(h.groupId===o){const c=parseFloat(h.channels||"");s.forEach(g=>{const f={contentType:zt(g,"audio"),bitrate:t?tl(g,r):r};c&&(f.channels=""+c),d.push(f)})}return d},n):n},[]):[]}function tl(a,e){if(e<=1)return 1;let t=128e3;return a==="ec-3"?t=768e3:a==="ac-3"&&(t=64e4),Math.min(e/2,t)}function Hn(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function il(a){let e="";const{audio:t,video:i}=a;if(i){const s=vs(i.contentType);e+=`${s}_r${i.height}x${i.width}f${Math.ceil(i.framerate)}${i.transferFunction||"sd"}_${Math.ceil(i.bitrate/1e5)}`}if(t){const s=vs(t.contentType);e+=`${i?"_":""}${s}_c${t.channels}`}return e}const Es=["NONE","TYPE-0","TYPE-1",null];function sl(a){return Es.indexOf(a)>-1}const Ci=["SDR","PQ","HLG"];function rl(a){return!!a&&Ci.indexOf(a)>-1}var xi={No:"",Yes:"YES",v2:"v2"};function xr(a){const{canSkipUntil:e,canSkipDateRanges:t,age:i}=a,s=i<e/2;return e&&s?t?xi.v2:xi.Yes:xi.No}class Sr{constructor(e,t,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=i}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class qt{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(i=>!!i).map(i=>i.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const i=(t=e.supplemental)==null?void 0:t.videoCodec;i&&i!==e.videoCodec&&(this.codecSet+=`,${i.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Tr(this._audioGroups,e)}hasSubtitleGroup(e){return Tr(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let i=this._audioGroups;i||(i=this._audioGroups=[]),i.indexOf(t)===-1&&i.push(t)}else if(e==="text"){let i=this._subtitleGroups;i||(i=this._subtitleGroups=[]),i.indexOf(t)===-1&&i.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Tr(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function nl(){if(typeof matchMedia=="function"){const a=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(a.media!==e.media)return a.matches===!0}return!1}function al(a,e){let t=!1,i=[];if(a&&(t=a!=="SDR",i=[a]),e){i=e.allowedVideoRanges||Ci.slice(0);const s=i.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:s&&nl(),t||(i=["SDR"])}return{preferHDR:t,allowedVideoRanges:i}}const ol=a=>{const e=new WeakSet;return(t,i)=>{if(a&&(i=a(t,i)),typeof i=="object"&&i!==null){if(e.has(i))return;e.add(i)}return i}},pe=(a,e)=>JSON.stringify(a,ol(e));function ll(a,e,t,i,s){const r=Object.keys(a),n=i==null?void 0:i.channels,o=i==null?void 0:i.audioCodec,u=s==null?void 0:s.videoCodec,l=n&&parseInt(n)===2;let d=!1,h=!1,c=1/0,g=1/0,f=1/0,m=1/0,p=0,v=[];const{preferHDR:_,allowedVideoRanges:E}=al(e,s);for(let L=r.length;L--;){const R=a[r[L]];d||(d=R.channels[2]>0),c=Math.min(c,R.minHeight),g=Math.min(g,R.minFramerate),f=Math.min(f,R.minBitrate),E.filter(D=>R.videoRanges[D]>0).length>0&&(h=!0)}c=z(c)?c:0,g=z(g)?g:0;const x=Math.max(1080,c),y=Math.max(30,g);f=z(f)?f:t,t=Math.max(f,t),h||(e=void 0);const T=r.length>1;return{codecSet:r.reduce((L,R)=>{const I=a[R];if(R===L)return L;if(v=h?E.filter(D=>I.videoRanges[D]>0):[],T){if(I.minBitrate>t)return et(R,`min bitrate of ${I.minBitrate} > current estimate of ${t}`),L;if(!I.hasDefaultAudio)return et(R,"no renditions with default or auto-select sound found"),L;if(o&&R.indexOf(o.substring(0,4))%5!==0)return et(R,`audio codec preference "${o}" not found`),L;if(n&&!l){if(!I.channels[n])return et(R,`no renditions with ${n} channel sound found (channels options: ${Object.keys(I.channels)})`),L}else if((!o||l)&&d&&I.channels[2]===0)return et(R,"no renditions with stereo sound found"),L;if(I.minHeight>x)return et(R,`min resolution of ${I.minHeight} > maximum of ${x}`),L;if(I.minFramerate>y)return et(R,`min framerate of ${I.minFramerate} > maximum of ${y}`),L;if(!v.some(D=>I.videoRanges[D]>0))return et(R,`no variants with VIDEO-RANGE of ${pe(v)} found`),L;if(u&&R.indexOf(u.substring(0,4))%5!==0)return et(R,`video codec preference "${u}" not found`),L;if(I.maxScore<p)return et(R,`max score of ${I.maxScore} < selected max of ${p}`),L}return L&&(bi(R)>=bi(L)||I.fragmentError>a[L].fragmentError)?L:(m=I.minIndex,p=I.maxScore,R)},void 0),videoRanges:v,preferHDR:_,minFramerate:g,minBitrate:f,minIndex:m}}function et(a,e){fe.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function Wn(a){return a.reduce((e,t)=>{let i=e.groups[t.groupId];i||(i=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),i.tracks.push(t);const s=t.channels||"2";return i.channels[s]=(i.channels[s]||0)+1,i.hasDefault=i.hasDefault||t.default,i.hasAutoSelect=i.hasAutoSelect||t.autoselect,i.hasDefault&&(e.hasDefaultAudio=!0),i.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function ul(a,e,t,i){return a.slice(t,i+1).reduce((s,r,n)=>{if(!r.codecSet)return s;const o=r.audioGroups;let u=s[r.codecSet];u||(s[r.codecSet]=u={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:n,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!o,fragmentError:0}),u.minBitrate=Math.min(u.minBitrate,r.bitrate);const l=Math.min(r.height,r.width);return u.minHeight=Math.min(u.minHeight,l),u.minFramerate=Math.min(u.minFramerate,r.frameRate),u.minIndex=Math.min(u.minIndex,n),u.maxScore=Math.max(u.maxScore,r.score),u.fragmentError+=r.fragmentError,u.videoRanges[r.videoRange]=(u.videoRanges[r.videoRange]||0)+1,o&&o.forEach(d=>{if(!d)return;const h=e.groups[d];h&&(u.hasDefaultAudio=u.hasDefaultAudio||e.hasDefaultAudio?h.hasDefault:h.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(h.channels).forEach(c=>{u.channels[c]=(u.channels[c]||0)+h.channels[c]}))}),s},{})}function Ar(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:i,channels:s,audioCodec:r}=a;return{lang:e,assocLang:t,characteristics:i,channels:s,audioCodec:r}}function rt(a,e,t){if("attrs"in a){const i=e.indexOf(a);if(i!==-1)return i}for(let i=0;i<e.length;i++){const s=e[i];if(It(a,s,t))return i}return-1}function It(a,e,t){const{groupId:i,name:s,lang:r,assocLang:n,default:o}=a,u=a.forced;return(i===void 0||e.groupId===i)&&(s===void 0||e.name===s)&&(r===void 0||dl(r,e.lang))&&(r===void 0||e.assocLang===n)&&(o===void 0||e.default===o)&&(u===void 0||e.forced===u)&&(!("characteristics"in a)||hl(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function dl(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function hl(a,e=""){const t=a.split(","),i=e.split(",");return t.length===i.length&&!t.some(s=>i.indexOf(s)===-1)}function At(a,e){const{audioCodec:t,channels:i}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(i===void 0||i===(e.channels||"2"))}function cl(a,e,t,i,s){const r=e[i],o=e.reduce((c,g,f)=>{const m=g.uri;return(c[m]||(c[m]=[])).push(f),c},{})[r.uri];o.length>1&&(i=Math.max.apply(Math,o));const u=r.videoRange,l=r.frameRate,d=r.codecSet.substring(0,4),h=Lr(e,i,c=>{if(c.videoRange!==u||c.frameRate!==l||c.codecSet.substring(0,4)!==d)return!1;const g=c.audioGroups,f=t.filter(m=>!g||g.indexOf(m.groupId)!==-1);return rt(a,f,s)>-1});return h>-1?h:Lr(e,i,c=>{const g=c.audioGroups,f=t.filter(m=>!g||g.indexOf(m.groupId)!==-1);return rt(a,f,s)>-1})}function Lr(a,e,t){for(let i=e;i>-1;i--)if(t(a[i]))return i;for(let i=e+1;i<a.length;i++)if(t(a[i]))return i;return-1}function Pi(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class fl extends ze{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var i;const{fragCurrent:s,partCurrent:r,hls:n}=this,{autoLevelEnabled:o,media:u}=n;if(!s||!u)return;const l=performance.now(),d=r?r.stats:s.stats,h=r?r.duration:s.duration,c=l-d.loading.start,g=n.minAutoLevel,f=s.level,m=this._nextAutoLevel;if(d.aborted||d.loaded&&d.loaded===d.total||f<=g){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o)return;const p=m>-1&&m!==f,v=!!t||p;if(!v&&(u.paused||!u.playbackRate||!u.readyState))return;const _=n.mainForwardBufferInfo;if(!v&&_===null)return;const E=this.bwEstimator.getEstimateTTFB(),x=Math.abs(u.playbackRate);if(c<=Math.max(E,1e3*(h/(x*2))))return;const y=_?_.len/x:0,T=d.loading.first?d.loading.first-d.loading.start:-1,A=d.loaded&&T>-1,L=this.getBwEstimate(),R=n.levels,I=R[f],D=Math.max(d.loaded,Math.round(h*(s.bitrate||I.averageBitrate)/8));let b=A?c-T:c;b<1&&A&&(b=Math.min(c,d.loaded*8/L));const P=A?d.loaded*1e3/b:0,C=E/1e3,k=P?(D-d.loaded)/P:D*8/L+C;if(k<=y)return;const O=P?P*8:L,F=((i=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:i.live)===!0,U=this.hls.config.abrBandWidthUpFactor;let G=Number.POSITIVE_INFINITY,V;for(V=f-1;V>g;V--){const X=R[V].maxBitrate,ee=!R[V].details||F;if(G=this.getTimeToLoadFrag(C,O,h*X,ee),G<Math.min(y,h+C))break}if(G>=k||G>h*10)return;A?this.bwEstimator.sample(c-Math.min(E,T),d.loaded):this.bwEstimator.sampleTTFB(c);const $=R[V].maxBitrate;this.getBwEstimate()*U>$&&this.resetEstimator($);const K=this.findBestLevel($,g,V,0,y,1,1);K>-1&&(V=K),this.warn(`Fragment ${s.sn}${r?" part "+r.index:""} of level ${f} is loading too slowly;
4
4
  Fragment duration: ${s.duration.toFixed(3)}