PageSourceSearch

https://tech-verse.me/_nuxt/d88294b.js

js tech-verse.me collected 2026-10-03 20:15:17 UTC 595,994 bytes, 2 lines download raw bytes

1/*! For license information please see LICENSES */
2(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{1310:function(e,t,r){var n=r(83)(!1);n.push([e.i,'/*! 3.6.1 HEAD:5184dcac337ea24ac23d017c9c14912b13b116cf 9f93a013426517c2c8e2 */.__video{-uvp-version:"3.6.1";position:relative;display:inline-block;outline:0;overflow:hidden;background-color:#000;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;height:100%;font-family:-apple-system,system,Helvetica,sans-serif;font-weight:400;color:#fff;-webkit-tap-highlight-color:rgba(255,255,255,0)}.__video button{border:0;padding:0;background-color:transparent;cursor:pointer;color:#fff}.__video button:focus{outline:0;box-shadow:none}.__video.__video_keyboard_focus button:focus{outline:1px solid #87ceeb}.__video_screen{width:100%;height:100%}.__video_screen video{position:relative;visibility:visible;-o-object-fit:contain;object-fit:contain;pointer-events:none;vertical-align:top}.__video_screen:before{display:none;content:"";position:absolute;top:50%;left:50%;width:42px;height:42px;background:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibG9hZGluZ19zcGlubmVyIiB3aWR0aD0iNDQiIGhlaWdodD0iNDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHN0eWxlPkBrZXlmcmFtZXMgYW5pbWF0aW9uU3Ryb2tlezAlLHRve3N0cm9rZS1kYXNoYXJyYXk6MTUsODR9NTAle3N0cm9rZS1kYXNoYXJyYXk6ODQsMH19QGtleWZyYW1lcyBhbmltYXRpb25UcmFuc2Zvcm17MCV7dHJhbnNmb3JtOnJvdGF0ZSgwKX10b3t0cmFuc2Zvcm06cm90YXRlKDcyMGRlZyl9fTwvc3R5bGU+PGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZGQpIiBzdHlsZT0idHJhbnNmb3JtLW9yaWdpbjoyMnB4IDIycHg7YW5pbWF0aW9uOmFuaW1hdGlvblN0cm9rZSAxcyBsaW5lYXIgaW5maW5pdGUsYW5pbWF0aW9uVHJhbnNmb3JtIDFzIGxpbmVhciBpbmZpbml0ZSI+PHBhdGggZD0iTTQuMjIzIDIyYzAgMy42NTQgMS4xMDIgNy4wNSAyLjk5MiA5Ljg3NSAzLjE4OSA0Ljc2NSA4LjYyIDcuOTAzIDE0Ljc4NSA3LjkwMyA5LjgxOSAwIDE3Ljc3OC03Ljk2IDE3Ljc3OC0xNy43NzggMC05LjgxOC03Ljk2LTE3Ljc3Ny0xNy43NzgtMTcuNzc3IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjxkZWZzPjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZGQiIHg9IjAiIHk9IjAiIHdpZHRoPSI0NCIgaGVpZ2h0PSI0NSIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPjxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+PGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPjxmZU9mZnNldCBkeT0iMSIvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjEiLz48ZmVDb2xvck1hdHJpeCB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDcgMCIvPjxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvdyIvPjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz48ZmVPZmZzZXQvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjEiLz48ZmVDb2xvck1hdHJpeCB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDcgMCIvPjxmZUJsZW5kIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93IiByZXN1bHQ9ImVmZmVjdDJfZHJvcFNoYWRvdyIvPjxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDJfZHJvcFNoYWRvdyIgcmVzdWx0PSJzaGFwZSIvPjwvZmlsdGVyPjwvZGVmcz48L3N2Zz4=) no-repeat;background-size:42px 42px;transform:translate(-50%,-50%);z-index:40}.__video_screen:after{content:"";position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;opacity:.7;transition:opacity .2s ease;z-index:10}.__video_playing .__video_screen:after{opacity:0;pointer-events:none}.__video_playing.__ui_more_opened .__video_screen:after,.__video_playing.__ui_playback_rate_opened .__video_screen:after,.__video_playing.__ui_resolution_opened .__video_screen:after,.__video_playing.__ui_subtitle_opened .__video_screen:after,.__video_playing.__video_active .__video_screen:after{opacity:.4}.__video_initializing .__video_screen:before,.__video_loading .__video_screen:before{display:block}.__video_initializing .__video_header,.__video_initializing .__video_screen video,.__video_initializing .__video_toolbar{opacity:0}.__video_header{position:absolute;z-index:30;left:0;right:0;top:0;display:flex;padding:12px 6px 0 12px;pointer-events:none}.__video_header .__ui_header_left{flex:1 1 auto;min-width:0}.__video_header .__ui_header_right{flex:0 0 auto;display:flex;height:24px;pointer-events:auto;line-height:0}.__video_playing .__video_header{opacity:0;visibility:hidden}.__video_playing.__video_active .__video_header{opacity:1;visibility:visible}.__video_overlay{top:0;pointer-events:none}.__video_overlay,.__video_toolbar{display:flex;position:absolute;
2left:0;right:0;bottom:0}.__video_toolbar{align-items:center;padding:0 6px;transition:opacity .2s ease;z-index:30;box-sizing:border-box}.__video_toolbar .__ui_toolbar_left,.__video_toolbar .__ui_toolbar_right{flex:0 0 auto;display:flex;align-items:center;line-height:0}.__video_playing .__video_toolbar{opacity:0;visibility:hidden}.__video_dragging .__video_toolbar,.__video_playing.__video_active .__video_toolbar{opacity:1;visibility:visible}.__video_medium .__video_screen:before{width:84px;height:84px;background-size:84px 84px}.__video_medium .__video_header{padding:16px 8px 0 16px}.__video_medium .__video_header .__ui_header_right{height:30px}.__video_medium .__video_toolbar{padding:0 8px}.__video_large .__video_screen:before{width:120px;height:120px;background-size:120px 120px}.__video_large .__video_header{padding:24px 10px 0 24px}.__video_large .__video_header .__ui_header_right{height:48px}.__video_large .__video_toolbar{padding:0 10px}.__video_mobile .__video_toolbar{height:48px}.__video_mobile .__ui_toolbar_left{flex:1 1 auto;min-width:0;margin-right:4px}.__video_mobile.__video_medium .__video_toolbar{height:62px}.__video_mobile.__video_large .__video_toolbar{height:96px}.__video_pc .__video_toolbar{height:52px;justify-content:space-between;padding-top:16px;padding-bottom:8px}.__video_pc.__ui_more_opened .__video_header,.__video_pc.__ui_more_opened .__video_toolbar,.__video_pc.__ui_playback_rate_opened .__video_header,.__video_pc.__ui_playback_rate_opened .__video_toolbar,.__video_pc.__ui_resolution_opened .__video_header,.__video_pc.__ui_resolution_opened .__video_toolbar,.__video_pc.__ui_subtitle_opened .__video_header,.__video_pc.__ui_subtitle_opened .__video_toolbar{opacity:1;visibility:visible}.__video_pc.__video_medium .__video_toolbar{height:64px}.__video_pc.__video_large .__video_toolbar{height:96px;padding-bottom:8px}.__ui_fullscreen_button{width:24px;height:24px;margin:0 6px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik00LjE1IDNBMS4xNSAxLjE1IDAgMDAzIDQuMTV2NC41aDEuM1Y0LjNoNC4zNVYzaC00LjV6bTAgMThBMS4xNSAxLjE1IDAgMDEzIDE5Ljg1di00LjVoMS4zdjQuMzVoNC4zNVYyMWgtNC41em0xNS43LTE4Yy42MzUgMCAxLjE1LjUxNSAxLjE1IDEuMTV2NC41aC0xLjNWNC4zaC00LjM1VjNoNC41ek0yMSAxOS44NUExLjE1IDEuMTUgMCAwMTE5Ljg1IDIxaC00LjV2LTEuM2g0LjM1di00LjM1SDIxdjQuNXoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=) no-repeat}.__ui_fullscreen_button:active{opacity:.5}.__video_agent_ios.__video_not_played .__ui_fullscreen{display:none}.__video_fullscreen{display:block}.__video_fullscreen .__ui_fullscreen_button{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik04LjQ1IDN2NS40NUgzdjEuM2g2Ljc1VjNoLTEuM3ptMCAxOHYtNS40NUgzdi0xLjNoNi43NVYyMWgtMS4zem03LjEtMTIuNTVIMjF2MS4zaC02Ljc1VjNoMS4zdjUuNDV6bTUuNDUgNy4xaC01LjQ1VjIxaC0xLjN2LTYuNzVIMjF2MS4zeiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==)}.__video_fullscreen.fix_pushing_down .__video_overlay{bottom:0;bottom:calc(var(--android-safe-area-inset-top, 0px)*1.5)}.__video_fullscreen.fix_pushing_down .__video_screen video,.__video_fullscreen.fix_pushing_down .__video_toolbar{bottom:0;bottom:var(--android-safe-area-inset-top,0)}.__video_medium .__ui_fullscreen_button{width:30px;height:30px;margin:0 8px}.__video_large .__ui_fullscreen_button{width:48px;height:48px;margin:0 10px}.__ui_play_pause .__ui_prev_button{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik02LjQgNi4yYS4yLjIgMCAwMC0uMi4ydjExLjJjMCAuMTEuMDkuMi4yLjJoLjlhLjIuMiAwIDAwLjItLjJWNi40YS4yLjIgMCAwMC0uMi0uMmgtLjl6bTIuOTk1IDYuMTU0YS40MTkuNDE5IDAgMDEwLS43MDhsNy43MjgtNC44OWEuNDE5LjQxOSAwIDAxLjY0My4zNTN2OS43ODFhLjQyLjQyIDAgMDEtLjY0My4zNTRsLTcuNzI4LTQuODl6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat;pointer-events:auto}.__ui_play_pause .__ui_play_button{pointer-events:auto}.__ui_play_pause .__ui_play_button:before{content:"";display:block;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOC4xMDUgMTEuNDM3YS42NjUuNjY1IDAgMDEwIDEuMTI2TDcuNDEyIDE5LjI5YS42NjUuNjY1IDAgMDEtMS4wMi0uNTYzVjUuMjc0YS42NjUuNjY1IDAgMDExLjAyLS41NjNsMTAuNjkzIDYuNzI2eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==) no-repeat}.__ui_play_pause .__ui_replay_button{margin:0!important}.__ui_play_pause .__ui_next_button{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNy42IDYuMmMuMTEgMCAuMi4wOS4yLjJ2MTEuMmEuMi4yIDAgMDEtLjIuMmgtLjlhLjIuMiAwIDAxLS4yLS4yVjYuNGMwLS4xMS4wOS0uMi4yLS4yaC45em0tMi45OTUgNi4xNTRhLjQxOS40MTkgMCAwMDAtLjcwOGwtNy43MjgtNC44OWEuNDE5LjQxOSAwIDAwLS42NDMuMzUzdjkuNzgxYzAgLjMzLjM2NC41My42NDMuMzU0bDcuNzI4LTQuODl6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat;pointer-events:auto}.__video_toolbar .__ui_play_pause{display:flex;align-items:center;margin:0 6px}.__video_toolbar .__ui_play_pause [class$=_button]{width:24px;height:24px}.__video_toolbar .__ui_play_pause .__ui_play_button:before{width:100%;height:100%}.__video_toolbar .__ui_play_pause .__ui_prev_button{margin-right:8px}.__video_toolbar .__ui_play_pause .__ui_next_button{margin-left:8px}.__video_overlay .__ui_play_pause{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;z-index:20}.__video_overlay .__ui_play_pause [class$=_button]:active{opacity:.5}.__video_overlay .__ui_play_pause .__ui_play_button{position:relative}.__video_overlay .__ui_play_pause .__ui_play_button:before{width:66px;height:66px}.__video_overlay .__ui_play_pause .__ui_play_button time{font-size:11px;line-height:16px}.__video_overlay .__ui_play_pause .__ui_next_button,.__video_overlay .__ui_play_pause .__ui_prev_button{position:absolute;top:50%;left:50%;width:42px;height:42px;transform:translate(-50%,-50%)}.__video_overlay .__ui_play_pause .__ui_next_button[disabled],.__video_overlay .__ui_play_pause .__ui_prev_button[disabled]{opacity:.4}.__video_overlay .__ui_play_pause .__ui_prev_button{margin-left:-96px}.__video_overlay .__ui_play_pause .__ui_next_button{margin-left:96px}.__video_overlay .__ui_seekbar_dragging~.__ui_play_pause{display:none!important}.__video_playing .__video_overlay .__ui_play_pause{display:none}.__video_playing .__ui_play_button:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik02Ljk5NyA0LjkxNmEuMzQ3LjM0NyAwIDAwLS4zNDcuMzQ3djEzLjQ3NGMwIC4xOTIuMTU2LjM0Ny4zNDcuMzQ3aDMuNjE2YS4zNDcuMzQ3IDAgMDAuMzQ3LS4zNDdWNS4yNjNhLjM0Ny4zNDcgMCAwMC0uMzQ3LS4zNDdINi45OTd6bTYuMzkgMGEuMzQ3LjM0NyAwIDAwLS4zNDguMzQ3djEzLjQ3NGMwIC4xOTIuMTU1LjM0Ny4zNDcuMzQ3aDMuNjE2YS4zNDcuMzQ3IDAgMDAuMzQ3LS4zNDdWNS4yNjNhLjM0Ny4zNDcgMCAwMC0uMzQ3LS4zNDdoLTMuNjE2eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==)}.__video_active .__video_overlay .__ui_play_pause{display:block}.__video_ended .__video_overlay .__ui_play_pause,.__video_initializing .__video_overlay .__ui_play_pause,.__video_loading .__video_overlay .__ui_play_pause{display:none}.__video_medium .__video_toolbar .__ui_play_pause{margin:0 8px}.__video_medium .__video_toolbar .__ui_play_pause [class$=_button]{width:30px;height:30px}.__video_medium .__video_toolbar .__ui_play_pause .__ui_prev_button{margin-right:12px}.__video_medium .__video_toolbar .__ui_play_pause .__ui_next_button{margin-left:12px}.__video_medium .__video_overlay .__ui_play_pause .__ui_play_button:before{width:120px;height:120px}.__video_medium .__video_overlay .__ui_play_pause .__ui_play_button time{font-size:17px;line-height:26px}.__video_medium .__video_overlay .__ui_play_pause .__ui_next_button,.__video_medium .__video_overlay .__ui_play_pause .__ui_prev_button{width:84px;height:84px}.__video_medium .__video_overlay .__ui_play_pause .__ui_prev_button{margin-left:-186px}.__video_medium .__video_overlay .__ui_play_pause .__ui_next_button{margin-left:186px}.__video_large .__video_toolbar .__ui_play_pause{margin:0 10px}.__video_large .__video_toolbar .__ui_play_pause [class$=_button]{width:48px;height:48px}.__video_large .__video_toolbar .__ui_play_pause .__ui_prev_button{margin-right:16px}.__video_large .__video_toolbar .__ui_play_pause .__ui_next_button{margin-left:16px}.__video_large .__video_overlay .__ui_play_pause .__ui_play_button:before{width:180px;height:180px}.__video_large .__video_overlay .__ui_play_pause .__ui_play_button time{font-size:26px;line-height:31px}.__video_large .__video_overlay .__ui_play_pause .__ui_next_button,.__video_large .__video_overlay .__ui_play_pause .__ui_prev_button{width:120px;height:120px}.__video_large .__video_overlay .__ui_play_pause .__ui_prev_button{margin-left:-270px}.__video_large .__video_overlay .__ui_play_pause .__ui_next_button{margin-left:270px}.__video_overlay .__ui_seekbar{position:absolute;
2left:50%;top:50%;transform:translate(-50%,-50%);opacity:0;pointer-events:none;transition:opacity .2s ease;text-align:center;font-size:13px;line-height:16px;font-weight:200;line-height:1.1;color:#fff;z-index:20}.__video_overlay .__ui_seekbar_absolute_time{font-size:38px;line-height:46px}.__video_overlay .__ui_seekbar.__ui_seekbar_dragging{opacity:1}.__video_toolbar .__ui_seekbar{position:relative;flex:1 1 auto;margin:0 8px}.__video_toolbar .__ui_seekbar_slider{position:relative;width:100%;height:12px;pointer-events:auto;cursor:pointer}.__video_toolbar .__ui_seekbar_slider:focus{outline:0;box-shadow:none}.__video_keyboard_focus .__video_toolbar .__ui_seekbar_slider:focus{outline:1px solid #87ceeb}.__video_toolbar .__ui_seekbar_track{width:100%;height:100%;border-radius:2px}.__video_toolbar .__ui_seekbar_track:before{content:"";position:absolute;top:4px;left:0;right:0;height:4px;background-color:hsla(0,0%,100%,.2);border-radius:inherit}.__video_toolbar .__ui_seekbar_progress{position:absolute;left:0;top:4px;width:0;height:4px;background-color:#fff;border-radius:inherit}.__video_toolbar .__ui_seekbar_buffered_wrap{position:absolute;left:0;top:4px;width:100%;height:4px;border-radius:inherit;overflow:hidden}.__video_toolbar .__ui_seekbar_buffered{position:absolute;left:0;top:0;height:100%;width:0;background-color:hsla(0,0%,100%,.3)}.__video_toolbar .__ui_seekbar_thumb{position:absolute;z-index:1;top:0;left:0;width:12px;height:12px;border-radius:100%;box-sizing:border-box;background-color:#fff;transform:translateX(-50%);transition:transform .2s ease}.__video_medium .__video_overlay .__ui_seekbar{font-size:17px;line-height:26px}.__video_medium .__video_overlay .__ui_seekbar_absolute_time{font-size:54px;line-height:64px}.__video_medium .__video_toolbar .__ui_seekbar{margin:0 10px}.__video_medium .__video_toolbar .__ui_seekbar_slider{height:14px}.__video_medium .__video_toolbar .__ui_seekbar_track{border-radius:3px}.__video_medium .__video_toolbar .__ui_seekbar_buffered_wrap,.__video_medium .__video_toolbar .__ui_seekbar_progress,.__video_medium .__video_toolbar .__ui_seekbar_track:before{height:6px}.__video_medium .__video_toolbar .__ui_seekbar_thumb{width:14px;height:14px}.__video_large .__video_overlay .__ui_seekbar{font-size:26px;line-height:31px}.__video_large .__video_overlay .__ui_seekbar_absolute_time{font-size:84px;line-height:100px}.__video_large .__video_toolbar .__ui_seekbar{margin:0 12px}.__video_large .__video_toolbar .__ui_seekbar_slider{height:16px}.__video_large .__video_toolbar .__ui_seekbar_track{border-radius:4px}.__video_large .__video_toolbar .__ui_seekbar_buffered_wrap,.__video_large .__video_toolbar .__ui_seekbar_progress,.__video_large .__video_toolbar .__ui_seekbar_track:before{height:8px}.__video_large .__video_toolbar .__ui_seekbar_thumb{width:18px;height:18px;margin-top:-1px}.__video_pc .__video_toolbar .__ui_seekbar{position:absolute;top:0;left:4px;right:4px}.__video_pc.__video_small .__video_overlay .__ui_seekbar{margin-top:-6px}.__video_pc.__video_medium .__video_toolbar .__ui_seekbar{left:6px;right:6px}.__video_pc.__video_large .__video_toolbar .__ui_seekbar{left:16px;right:16px}.__ui_duration{position:relative;margin-right:6px;font-size:11px;line-height:16px}.__ui_duration time{position:absolute}.__video_medium .__ui_duration{margin-right:8px;font-size:15px;line-height:22px}.__video_large .__ui_duration{margin-right:10px;font-size:20px;line-height:26px}.__video_pc .__ui_current_time~.__ui_duration:before{content:"/";display:inline-block;padding:0 4px}.__video_pc.__video_large .__ui_current_time~.__ui_duration:before{padding:0 6px}.__ui_current_time{position:relative;margin-left:6px;font-size:11px;line-height:16px}.__ui_current_time time{position:absolute}.__video_medium .__ui_current_time{margin-left:8px;font-size:15px;line-height:22px}.__video_large .__ui_current_time{margin-left:10px;font-size:20px;line-height:26px}.__video_header .__ui_volume,.__video_toolbar .__ui_volume{position:relative;padding:0 6px;line-height:0}.__video_header .__ui_volume:active .__ui_volume_slider,.__video_header .__ui_volume:hover .__ui_volume_slider,.__video_header .__ui_volume[focu
2s-within] .__ui_volume_slider,.__video_toolbar .__ui_volume:active .__ui_volume_slider,.__video_toolbar .__ui_volume:hover .__ui_volume_slider,.__video_toolbar .__ui_volume[focus-within] .__ui_volume_slider{opacity:1}.__video_header .__ui_volume:active .__ui_volume_slider,.__video_header .__ui_volume:focus-within .__ui_volume_slider,.__video_header .__ui_volume:hover .__ui_volume_slider,.__video_toolbar .__ui_volume:active .__ui_volume_slider,.__video_toolbar .__ui_volume:focus-within .__ui_volume_slider,.__video_toolbar .__ui_volume:hover .__ui_volume_slider{opacity:1}.__video_overlay .__ui_volume{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;z-index:20;visibility:hidden;pointer-events:none;opacity:0;transition:opacity .4s,visibility .4s}.__video_overlay .__ui_volume .__ui_volume_view{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:13px;line-height:16px;text-align:center}.__video_overlay .__ui_volume .__ui_volume_view:before{content:"";display:block;width:42px;height:42px;margin-bottom:4px}.__video_volume_up .__video_overlay .__ui_volume .__ui_volume_view:before{background:url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDkgNDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZGRfMjExMF8xMjExNikiIGZpbGw9IiNmZmYiPjxwYXRoIGQ9Ik0yNy4yNiA2LjM2bC0xMC4wMDcgOS4zM0g1LjgxOWMtLjczIDAtMS4zMi41NzItMS4zMiAxLjI3OVYzMS4wM2wuMDEzLjE5Yy4wOTUuNjE2LjY0NCAxLjA4OSAxLjMwNyAxLjA4OWwxMS40MzQtLjAwMkwyNy4yNiA0MS42NGMuODQuNzgyIDIuMjM4LjIwNiAyLjIzOC0uOTIxVjcuMjhjMC0xLjEyOC0xLjM5OS0xLjcwMy0yLjIzOC0uOTJ6TTM0LjU0MyAxNy4wMzVhOC4zNzUgOC4zNzUgMCAwMTEuNDQ4IDEuMTQgOC4xMzggOC4xMzggMCAwMTAgMTEuNjQ5IDguMzkyIDguMzkyIDAgMDEtMS4wNjUuODg3bC0uMzg0LjI1My0xLjQwMy0yLjE4Yy4zNTctLjIyMi42OTEtLjQ4NS45OTYtLjc4NWE1LjU4OSA1LjU4OSAwIDAwMC04IDUuNzg3IDUuNzg3IDAgMDAtLjY0Ni0uNTQ4bC0uMzUtLjIzNiAxLjQwNC0yLjE4eiIvPjxwYXRoIGQ9Ik00MC4yNzMgMTMuOTY2Yy0uNzYyLS43NS0xLjU5OS0xLjQwOC0yLjQ5Ni0xLjk2NmwtMS40MDQgMi4xOC41NDEuMzU4Yy41MzIuMzczIDEuMDM0Ljc5IDEuNTAzIDEuMjUyYTExLjQ3MiAxMS40NzIgMCAwMTAgMTYuNDIgMTEuODI4IDExLjgyOCAwIDAxLTIuMDQ0IDEuNjFMMzcuNzc3IDM2bC41MzEtLjM0N2ExNC40NjYgMTQuNDY2IDAgMDAxLjk2NS0xLjYxOCAxNC4wMjEgMTQuMDIxIDAgMDAwLTIwLjA3eiIvPjwvZz48ZGVmcz48ZmlsdGVyIGlkPSJmaWx0ZXIwX2RkXzIxMTBfMTIxMTYiIHg9Ii0xLjUiIHk9Ii0yIiB3aWR0aD0iNTIiIGhlaWdodD0iNTMiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj48ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz48ZmVPZmZzZXQgZHk9IjEiLz48ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxIi8+PGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjA3IDAiLz48ZmVCbGVuZCBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJlZmZlY3QxX2Ryb3BTaGFkb3dfMjExMF8xMjExNiIvPjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz48ZmVPZmZzZXQvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjEiLz48ZmVDb2xvck1hdHJpeCB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDcgMCIvPjxmZUJsZW5kIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93XzIxMTBfMTIxMTYiIHJlc3VsdD0iZWZmZWN0Ml9kcm9wU2hhZG93XzIxMTBfMTIxMTYiLz48ZmVCbGVuZCBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QyX2Ryb3BTaGFkb3dfMjExMF8xMjExNiIgcmVzdWx0PSJzaGFwZSIvPjwvZmlsdGVyPjwvZGVmcz48L3N2Zz4=) no-repeat}.__video_volume_down .__video_overlay .__ui_volume .__ui_volume_view:before{background:url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDkgNDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZGRfMjExMF81MzczKSIgZmlsbD0iI2ZmZiI+PHBhdGggZD0iTTI3LjI2MiA2LjM2bC0xMC4wMDcgOS4zM0g1LjgyYy0uNzMgMC0xLjMyMS41NzItMS4zMjEgMS4yNzlWMzEuMDNsLjAxNC4xOWMuMDk1LjYxNi42NDQgMS4wODkgMS4zMDcgMS4wODlsMTEuNDM0LS4wMDIgMTAuMDA3IDkuMzMyYy44NC43ODIgMi4yMzguMjA2IDIuMjM4LS45MjFWNy4yOGMwLTEuMTI4LTEuMzk5LTEuNzAzLTIuMjM4LS45MnpNMzQuNTQ1IDE3LjAzNWE4LjM3IDguMzcgMCAwMTEuNDQ4IDEuMTQgOC4xMzggOC4xMzggMCAwMTAgMTEuNjQ5IDguMzkgOC4zOSAwIDAxLTEuMDY1Ljg4N2wtLjM4My4yNTMtMS40MDQtMi4xOGMuMzU3LS4yMjIuNjktLjQ4NS45OTYtLjc4NWE1LjU4OSA1LjU4OSAwIDAwMC04IDUuNzc4IDUuNzc4IDAgMDAtLjY0Ny0uNTQ4bC0uMzUtLjIzNiAxLjQwNS0yLjE4eiIvPjwvZz48ZGVmcz48ZmlsdGVyIGlkPSJmaWx0ZXIwX2RkXzIxMTBfNTM3MyIgeD0iLTEuNSIgeT0iLTIiIHdpZHRoPSI1MiIgaGVpZ2h0PSI1MyIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPjxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+PGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPjxmZU9mZnNldCBkeT0iMSIvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjEiLz48ZmVDb2xvck1hdHJpeCB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDcgMCIvPjxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18yMTEwXzUzNzMiLz48ZmVDb2xvck1hdHJpeCBpbj0iU291cmNlQWxwaGEiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+PGZlT2Zmc2V0Lz48ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxIi8+PGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjA3IDAiLz48ZmVCbGVuZCBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18yMTEwXzUzNzMiIHJlc3VsdD0iZWZmZWN0Ml9kcm9wU2hhZG93XzIxMTBfNTM3MyIvPjxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDJfZHJvcFNoYWRvd18yMTEwXzUzNzMiIHJlc3VsdD0ic2hhcGUiLz48L2ZpbHRlcj48L2RlZnM+PC9zdmc+) no-repeat}.__video_volume_down.__video_muted .__video_overlay .__ui_volume .__ui_volume_view:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDMgNDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTUuMTU2IDEzLjcyOWg1LjczbDE0Ljk4OSAxNC45ODh2Ni45MTJjMCAuOTg3LTEuMjI0IDEuNDktMS45NTguODA2TDE1LjE2IDI4LjI3bC0xMC4wMDQuMDAxYy0uNTggMC0xLjA2LS40MTQtMS4xNDMtLjk1M0w0IDI3LjE1MlYxNC44NDhjMC0uNjE3LjUxOC0xLjExOCAxLjE1Ni0xLjExOHpNMTYuMTk1IDEyLjc2NGwtNS4zMjctNS4zMjZMOS4yNSA5LjA1NmwyMi44ODIgMjIuODgxIDEuNjE4LTEuNjE3LTcuODc1LTcuODc1VjYuMzdjMC0uOTg3LTEuMjI0LT
2EuNDktMS45NTgtLjgwNmwtNy43MjIgNy4yeiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==)}.__video_muted.__video_volume_down .__video_overlay .__ui_volume,.__video_volume_down .__video_overlay .__ui_volume,.__video_volume_up .__video_overlay .__ui_volume{visibility:visible;opacity:1}.__video_muted.__video_volume_down .__video_overlay .__ui_play_pause,.__video_volume_down .__video_overlay .__ui_play_pause,.__video_volume_up .__video_overlay .__ui_play_pause{opacity:0;visibility:hidden}.__ui_volume_button{flex-shrink:0;width:24px;height:24px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEzLjM4IDMuMThMOC4zNzYgNy44NDVIMi42NmEuNjUuNjUgMCAwMC0uNjYuNjM5djcuMDMybC4wMDYuMDk0YS42NTQuNjU0IDAgMDAuNjU0LjU0NWw1LjcxNi0uMDAxIDUuMDA0IDQuNjY2Yy40MTkuMzkxIDEuMTE5LjEwMyAxLjExOS0uNDZWMy42NGMwLS41NjMtLjY5OS0uODUxLTEuMTE5LS40NnptLS4yMDMgMS45NjV2MTMuNzExbC00LjA3Ni0zLjgtLjA3OC0uMDYzYS42OC42OCAwIDAwLS4zOC0uMTE3SDMuMzE5VjkuMTI0aDUuMzI0Yy4xNyAwIC4zMzMtLjA2NC40NTgtLjE3OWw0LjA3Ni0zLjh6bTQuNTY5IDMuOTQzYTQuMTg1IDQuMTg1IDAgMDAtLjcyNS0uNTdsLS43MDIgMS4wOS4xNzUuMTE4QTIuNzkzIDIuNzkzIDAgMDExNi44MTggMTRjLS4xNTMuMTUtLjMyLjI4MS0uNDk4LjM5MmwuNzAxIDEuMDkuMTkyLS4xMjdjLjE5LS4xMzMuMzY4LS4yOC41MzMtLjQ0M2E0LjA2OCA0LjA2OCAwIDAwMC01LjgyNHpNMTguNjM4IDZjLjQ1LjI4Ljg3LjYxIDEuMjQ4Ljk4M2guMDAyYTcuMDA4IDcuMDA4IDAgMDEwIDEwLjAzNGMtLjMwNi4zLS42MzUuNTctLjk4NC44MDlMMTguNjQgMThsLS43MDQtMS4wOWMuMzctLjIzLjcxMi0uNSAxLjAyMy0uODA1YTUuNzM1IDUuNzM1IDAgMDAwLTguMjEgNS44NzQgNS44NzQgMCAwMC0uNzUzLS42MjZsLS4yNy0uMTc5LjcwMS0xLjA5eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==) no-repeat}.__video_muted .__ui_volume_button{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjgiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIuNjYgNy44NDVoMy4yNzVsMS4yOCAxLjI3OUgzLjMydjUuNzUyaDUuMzI0Yy4xMzYgMCAuMjY5LjA0Mi4zOC4xMTdsLjA3OC4wNjMgNC4wNzYgMy44di0zLjc2OEwxNC41IDE2LjQxdjMuOTVjMCAuNTYzLS43Ljg1MS0xLjExOS40NmwtNS4wMDQtNC42NjYtNS43MTYuMDAxYS42NTQuNjU0IDAgMDEtLjY1NC0uNTQ1TDIgMTUuNTE2VjguNDg0YS42NS42NSAwIDAxLjY2LS42Mzl6bTExLjg0IDQuOThsNC41IDQuNS0uOTI1LjkyNUw1IDUuMTc1bC45MjUtLjkyNSAzLjA0MyAzLjA0NCA0LjQxMy00LjExNGMuNDItLjM5MSAxLjExOS0uMTAzIDEuMTE5LjQ2djkuMTg1em0tMS4zMjItMS4zMjF2LTYuMzZsLTMuMjkgMy4wNjkgMy4yOSAzLjI5eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==)}.__video_no_sound .__ui_volume_button{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEzLjM4MSAzLjE4TDguMzc3IDcuODQ1SDIuNjYxYS42NS42NSAwIDAwLS42NjEuNjR2Ny4wM2wuMDA3LjA5NWEuNjU0LjY1NCAwIDAwLjY1NC41NDVoNS43MTZsNS4wMDQgNC42NjVjLjQyLjM5MSAxLjExOS4xMDMgMS4xMTktLjQ2VjMuNjRjMC0uNTYzLS43LS44NTEtMS4xMTktLjQ2em0tLjIwMyAxLjk2NXYxMy43MWwtNC4wNzYtMy44LS4wNzgtLjA2MmEuNjc2LjY3NiAwIDAwLS4zOC0uMTE2bC01LjMyNC0uMDAxVjkuMTI0aDUuMzI0Yy4xNyAwIC4zMzUtLjA2NC40NTgtLjE4bDQuMDc2LTMuOHpNMjEuMTQgOWwuODYuODZMMTkuODYgMTIgMjIgMTQuMTRsLS44Ni44NkwxOSAxMi44NiAxNi44NiAxNWwtLjg2LS44NkwxOC4xNCAxMiAxNiA5Ljg2bC44Ni0uODZMMTkgMTEuMTQgMjEuMTQgOXoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)}.__ui_volume_button:active{opacity:.5}.__ui_volume_slider{position:absolute;top:-35px;left:50%;min-width:50px;transform:translateX(-50%) rotate(-90deg);opacity:0;transition:opacity .2s ease-in-out;cursor:pointer}.__video_header .__ui_volume_slider{top:47px}.__ui_volume_slider:focus{outline:0;box-shadow:none}.__video_keyboard_focus .__ui_volume_slider:focus{outline:1px solid #87ceeb}.__ui_volume_slider .__ui_volume_track{position:relative;height:12px}.__ui_volume_slider .__ui_volume_progress,.__ui_volume_slider .__ui_volume_track:before{position:absolute;left:0;top:4px;height:4px;width:0;border-radius:2px}.__ui_volume_slider .__ui_volume_track:before{content:"";width:100%;background:hsla(0,0%,100%,.2)}.__ui_volume_slider .__ui_volume_progress{background:#fff}.__ui_volume_slider .__ui_volume_thumb{position:absolute;width:12px;height:12px;top:0;left:0;margin:0 -6px;border-radius:100%;box-sizing:border-box;background-color:#fff;transition:transform .2s ease}.__video_touch .__ui_volume_slider{display:none}.__video_medium .__video_header .__ui_volume,.__video_medium .__video_toolbar .__ui_volume{padding:0 8px}.__video_medium .__ui_volume_button{width:30px;height:30px}.__video_medium .__video_overlay .__ui_volume .__ui_volume_view{font-size:17px;line-height:22px}.__video_medium .__video_overlay .__ui_volume .__ui_volume_view:before{width:84px;height:84px}.__video_medium .__ui_volume_slider{min-width:60px;top:-40px}.__video_medium .__video_header .__ui_volume_slider{top:58px}.__video_large .__video_header .__ui_volume,.__video_large .__video_toolbar .__ui_volume{padding:0 10px}.__video_large .__ui_volume_button{width:48px;height:48px}.__video_large .__video_overlay .__ui_volume .__ui_volume_view{font-size:26px;line-height:31px}.__video_large .__video_overlay .__ui_volume .__ui_volume_view:before{width:120px;height:120px;margin-bottom:6px}.__video_large .__ui_volume_slider{min-width:72px;top:-48px}.__video_large .__video_header .__ui_volume_slider{top:83px}.__video_large .__ui_volume_track{height:14px}.__video_large .__ui_volume_progress,.__video_large .__ui_volume_track:before{height:6px;border-radius:3px}.__video_large .__ui_volume_thumb{width:14px;
2height:14px;margin:0 -7px}.__video_pc .__video_toolbar .__ui_volume{display:flex;align-items:center;width:24px;transition:width .4s ease-in-out;overflow:hidden}.__video_pc .__video_toolbar .__ui_volume:active,.__video_pc .__video_toolbar .__ui_volume:hover,.__video_pc .__video_toolbar .__ui_volume[focus-within]{width:78px}.__video_pc .__video_toolbar .__ui_volume:active,.__video_pc .__video_toolbar .__ui_volume:focus-within,.__video_pc .__video_toolbar .__ui_volume:hover{width:78px}.__video_pc .__video_toolbar .__ui_volume.__ui_no_slider{width:24px;transition:none}.__video_pc .__video_toolbar .__ui_volume_slider{position:static;transform:none;margin-left:4px}.__video_pc.__video_medium .__video_toolbar .__ui_volume{width:30px}.__video_pc.__video_medium .__video_toolbar .__ui_volume:active,.__video_pc.__video_medium .__video_toolbar .__ui_volume:hover,.__video_pc.__video_medium .__video_toolbar .__ui_volume[focus-within]{width:94px}.__video_pc.__video_medium .__video_toolbar .__ui_volume:active,.__video_pc.__video_medium .__video_toolbar .__ui_volume:focus-within,.__video_pc.__video_medium .__video_toolbar .__ui_volume:hover{width:94px}.__video_pc.__video_medium .__video_toolbar .__ui_volume.__ui_no_slider{width:30px}.__video_pc.__video_large .__video_toolbar .__ui_volume{width:48px}.__video_pc.__video_large .__video_toolbar .__ui_volume:active,.__video_pc.__video_large .__video_toolbar .__ui_volume:hover,.__video_pc.__video_large .__video_toolbar .__ui_volume[focus-within]{width:126px}.__video_pc.__video_large .__video_toolbar .__ui_volume:active,.__video_pc.__video_large .__video_toolbar .__ui_volume:focus-within,.__video_pc.__video_large .__video_toolbar .__ui_volume:hover{width:126px}.__video_pc.__video_large .__video_toolbar .__ui_volume.__ui_no_slider{width:48px}.__video_pc.__video_large .__video_toolbar .__ui_volume_slider{margin-left:6px}.__ui_subtitle_button{width:24px;height:24px;margin:0 6px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTQuNzUgMTkuMjVoMTQuNVY0Ljc1SDQuNzV2MTQuNXpNMy40NSA0LjZjMC0uNjM0LjUxNi0xLjE1IDEuMTUtMS4xNWgxNC44Yy42MzYgMCAxLjE1LjUxNyAxLjE1IDEuMTV2MTQuOGExLjE1IDEuMTUgMCAwMS0xLjE1IDEuMTVINC42YTEuMTUgMS4xNSAwIDAxLTEuMTUtMS4xNVY0LjZ6bTguMzIzIDguNDI1Yy0uMzEyIDEuMDEtMS4yMDQgMS43MjUtMi40ODEgMS43MjUtMS42MTggMC0yLjY5MS0xLjEwNC0yLjY5MS0yLjc1czEuMTUzLTIuNzUgMi42OTgtMi43NWMxLjE2MSAwIDEuOTY2LjUzNCAyLjM0NCAxLjQ4LjAyOC4wNzIgMCAuMTMtLjA3My4xNDRsLTEuMTEuMjk2Yy0uMDU4LjAyMS0uMTA5IDAtLjE0NS0uMDU4LS4yMTgtLjM2OC0uNTU5LS41NTYtMS4wMTYtLjU1Ni0uNzc2IDAtMS4yOTguNTYzLTEuMjk4IDEuNDQ0IDAgLjg4OC41MyAxLjQ0NCAxLjI5OCAxLjQ0NC41MyAwIC45NS0uMjE3IDEuMTQ2LS43NTEuMDMtLjA3Mi4wNzMtLjEwMS4xMzgtLjA4bDEuMTAzLjI5Yy4wNzIuMDIuMTAyLjA2NC4wODcuMTIyem01LjYyNCAwYy0uMzEyIDEuMDEtMS4yMDQgMS43MjUtMi40ODEgMS43MjUtMS42MTggMC0yLjY5MS0xLjEwNC0yLjY5MS0yLjc1czEuMTUzLTIuNzUgMi42OTgtMi43NWMxLjE2IDAgMS45NjYuNTM0IDIuMzQzIDEuNDguMDMuMDcyIDAgLjEzLS4wNzIuMTQ0bC0xLjExLjI5NmMtLjA1OC4wMjEtLjEwOSAwLS4xNDUtLjA1OC0uMjE4LS4zNjgtLjU1OS0uNTU2LTEuMDE2LS41NTYtLjc3NiAwLTEuMjk4LjU2My0xLjI5OCAxLjQ0NCAwIC44ODguNTMgMS40NDQgMS4yOTggMS40NDQuNTMgMCAuOTUtLjIxNyAxLjE0Ni0uNzUxLjAzLS4wNzIuMDczLS4xMDEuMTM4LS4wOGwxLjEwMy4yOWMuMDczLjAyLjEwMi4wNjQuMDg3LjEyMnoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=) no-repeat}.__ui_subtitle_button[aria-pressed=true]{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTQuNiAzLjQ1Yy0uNjM0IDAtMS4xNS41MTYtMS4xNSAxLjE1djE0LjhjMCAuNjM1LjUxNSAxLjE1IDEuMTUgMS4xNWgxNC44YTEuMTUgMS4xNSAwIDAwMS4xNS0xLjE1VjQuNmExLjE1IDEuMTUgMCAwMC0xLjE1LTEuMTVINC42em03LjE3MyA5LjU3NWMtLjMxMiAxLjAxLTEuMjA0IDEuNzI1LTIuNDgxIDEuNzI1LTEuNjE4IDAtMi42OTEtMS4xMDQtMi42OTEtMi43NXMxLjE1My0yLjc1IDIuNjk4LTIuNzVjMS4xNjEgMCAxLjk2Ni41MzQgMi4zNDQgMS40OC4wMjguMDcyIDAgLjEzLS4wNzMuMTQ0bC0xLjExLjI5NmMtLjA1OC4wMjEtLjEwOSAwLS4xNDUtLjA1OC0uMjE4LS4zNjgtLjU1OS0uNTU2LTEuMDE2LS41NTYtLjc3NiAwLTEuMjk4LjU2My0xLjI5OCAxLjQ0NCAwIC44ODguNTMgMS40NDQgMS4yOTggMS40NDQuNTMgMCAuOTUtLjIxNyAxLjE0Ni0uNzUxLjAzLS4wNzIuMDczLS4xMDEuMTM4LS4wOGwxLjEwMy4yOWMuMDcyLjAyLjEwMi4wNjQuMDg3LjEyMnptNS42MjQgMGMtLjMxMiAxLjAxLTEuMjA0IDEuNzI1LTIuNDgxIDEuNzI1LTEuNjE4IDAtMi42OTEtMS4xMDQtMi42OTEtMi43NXMxLjE1My0yLjc1IDIuNjk4LTIuNzVjMS4xNiAwIDEuOTY2LjUzNCAyLjM0MyAxLjQ4LjAzLjA3MiAwIC4xMy0uMDcyLjE0NGwtMS4xMS4yOTZjLS4wNTguMDIxLS4xMDkgMC0uMTQ1LS4wNTgtLjIxOC0uMzY4LS41NTktLjU1Ni0xLjAxNi0uNTU2LS43NzYgMC0xLjI5OC41NjMtMS4yOTggMS40NDQgMCAuODg4LjUzIDEuNDQ0IDEuMjk4IDEuNDQ0LjUzIDAgLjk1LS4yMTcgMS4xNDYtLjc1MS4wMy0uMDcyLjA3My0uMTAxLjEzOC0uMDhsMS4xMDMuMjljLjA3My4wMi4xMDIuMDY0LjA4Ny4xMjJ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+)}.__ui_subtitle_text{position:absolute;
2left:0;width:100%;transition:bottom .2s;transition-delay:.2s;text-align:center;z-index:20}.__ui_subtitle_text>p{display:inline-block;max-width:calc(100% - 32px);padding:2px 4px;margin:0 auto;box-sizing:border-box;background:rgba(0,0,0,.7);border-radius:4px;font-size:15px;line-height:22px;white-space:normal}.__video_overlay .__ui_subtitle{display:none}.__video_overlay .__ui_subtitle:focus{outline:0;box-shadow:none}.__ui_subtitle_opened .__video_overlay .__ui_subtitle{display:block}.__video_active .__video_screen .__ui_subtitle_text{transition-delay:0s}.__video_agent_ios.__video_not_played .__ui_subtitle{display:none}.__video_medium .__ui_subtitle_button{width:30px;height:30px;margin:0 8px}.__video_medium .__ui_subtitle_text>p{max-width:calc(100% - 120px);padding:4px 8px;font-size:17px;line-height:26px}.__video_large .__ui_subtitle_button{width:48px;height:48px;margin:0 10px}.__video_large .__ui_subtitle_text>p{max-width:calc(100% - 180px);padding:8px 16px;font-size:42px;line-height:46px}.__video_mobile .__ui_subtitle .__ui_setting_sublist{grid-template-columns:repeat(2,1fr)}.__video_mobile.__ui_subtitle_opened .__ui_ended,.__video_mobile.__ui_subtitle_opened .__ui_play_pause,.__video_mobile.__ui_subtitle_opened .__video_header,.__video_mobile.__ui_subtitle_opened .__video_toolbar{display:none}.__video_mobile .__ui_subtitle_text{bottom:48px}.__video_mobile.__video_playing .__ui_subtitle_text{bottom:12px}.__video_mobile.__video_playing.__video_active .__ui_subtitle_text{bottom:48px}.__video_mobile.__ui_more_opened .__ui_subtitle_text,.__video_mobile.__ui_playback_rate_opened .__ui_subtitle_text,.__video_mobile.__ui_resolution_opened .__ui_subtitle_text,.__video_mobile.__ui_subtitle_opened .__ui_subtitle_text{bottom:12px!important}.__video_mobile.__video_medium .__ui_subtitle_text{bottom:62px}.__video_mobile.__video_medium.__video_playing .__ui_subtitle_text{bottom:16px}.__video_mobile.__video_medium.__video_playing.__video_active .__ui_subtitle_text{bottom:62px}.__video_mobile.__video_medium.__ui_more_opened .__ui_subtitle_text,.__video_mobile.__video_medium.__ui_playback_rate_opened .__ui_subtitle_text,.__video_mobile.__video_medium.__ui_resolution_opened .__ui_subtitle_text,.__video_mobile.__video_medium.__ui_subtitle_opened .__ui_subtitle_text{bottom:16px!important}.__video_mobile.__video_large .__ui_subtitle_text{bottom:96px}.__video_mobile.__video_large.__video_playing .__ui_subtitle_text{bottom:24px}.__video_mobile.__video_large.__video_playing.__video_active .__ui_subtitle_text{bottom:96px}.__video_mobile.__video_large.__ui_more_opened .__ui_subtitle_text,.__video_mobile.__video_large.__ui_playback_rate_opened .__ui_subtitle_text,.__video_mobile.__video_large.__ui_resolution_opened .__ui_subtitle_text,.__video_mobile.__video_large.__ui_subtitle_opened .__ui_subtitle_text{bottom:24px!important}.__video_pc .__ui_subtitle_text{bottom:64px}.__video_pc.__video_playing .__ui_subtitle_text{bottom:12px}.__video_pc.__video_playing.__video_active .__ui_subtitle_text{bottom:64px}.__video_pc.__ui_more_opened .__ui_subtitle_text,.__video_pc.__ui_playback_rate_opened .__ui_subtitle_text,.__video_pc.__ui_resolution_opened .__ui_subtitle_text,.__video_pc.__ui_subtitle_opened .__ui_subtitle_text{bottom:64px!important}.__video_pc.__video_medium .__ui_subtitle_text{bottom:80px}.__video_pc.__video_medium.__video_playing .__ui_subtitle_text{bottom:16px}.__video_pc.__video_medium.__video_playing.__video_active .__ui_subtitle_text{bottom:80px}.__video_pc.__video_medium.__ui_more_opened .__ui_subtitle_text,.__video_pc.__video_medium.__ui_playback_rate_opened .__ui_subtitle_text,.__video_pc.__video_medium.__ui_resolution_opened .__ui_subtitle_text,.__video_pc.__video_medium.__ui_subtitle_opened .__ui_subtitle_text{bottom:80px!important}.__video_pc.__video_large .__ui_subtitle_text{bottom:120px}.__video_pc.__video_large.__video_playing .__ui_subtitle_text{bottom:24px}.__video_pc.__video_large.__video_playing.__video_active .__ui_subtitle_text{bottom:120px}.__video_pc.__video_large.__ui_more_opened .__ui_subtitle_text,.__video_pc.__video_large.__ui_playback_rate_opened .__ui_subtitle_text,.__video_pc.__video_large.__ui_resolution_opened .__ui_subtitle_text,.__video_pc.__video_large.__ui_subtitle_opened .__ui_subtitle_text{bottom:120px!important}.__ui_resolution_button{display:flex;align-items:center;height:24px;margin:0 6px;font-size:11px;line-height:16px;font-weight:700}.__ui_resolution_button:after{content:"";display:inline-block;width:14px;
2height:14px;margin-left:4px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE4Ljk1OSA4LjEwNmwxLjQxNCAxLjQxNEwxMiAxNy44OTQgMy42MjcgOS41MmwxLjQxNC0xLjQxNEwxMiAxNS4wNjR6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat}.__video_toolbar .__ui_resolution_button:after{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE4Ljk1OSAxNS44OTRsMS40MTQtMS40MTRMMTIgNi4xMDYgMy42MjcgMTQuNDhsMS40MTQgMS40MTRMMTIgOC45MzZ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+)}.__video_overlay .__ui_resolution{display:none}.__video_overlay .__ui_resolution:focus{outline:0;box-shadow:none}.__ui_resolution_opened .__ui_resolution_button:after{transform:rotate(180deg)}.__ui_resolution_opened .__video_overlay .__ui_resolution{display:block}.__video_medium .__ui_resolution_button{height:30px;margin:0 8px;font-size:15px;line-height:22px}.__video_medium .__ui_resolution_button:after{width:16px;height:16px}.__video_large .__ui_resolution_button{height:48px;margin:0 10px;font-size:26px;line-height:30px}.__video_large .__ui_resolution_button:after{width:24px;height:24px}.__video_mobile .__ui_resolution .__ui_setting_sublist{grid-template-columns:repeat(3,1fr)}.__video_mobile.__ui_resolution_opened .__ui_ended,.__video_mobile.__ui_resolution_opened .__ui_play_pause,.__video_mobile.__ui_resolution_opened .__video_header,.__video_mobile.__ui_resolution_opened .__video_toolbar{display:none}.__ui_playback_rate_button{width:24px;height:24px;margin:0 6px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTExLjkxNCA0Ljc2M2E3LjM1IDcuMzUgMCAwMC0zLjc2NyAxLjg5OWwtLjg5NC0uOTQ0YTguNjUgOC42NSAwIDExMCAxMi41NjNsLjg5NC0uOTQ0YTcuMzUgNy4zNSAwIDEwMy43NjctMTIuNTc0em01LjUyOSA0LjIxNGwtMi40MDIgMi4yNGEyIDIgMCAxMS0uODctLjk2NmwyLjM4NS0yLjIyNS44ODcuOTUxem0tMy43NDggMy41MThhLjcuNyAwIDEwLS45OS0uOTkuNy43IDAgMDAuOTkuOTl6TTMuODQ3IDEwLjE1aDUuNTQ1di0xLjNIMy44NDd2MS4zek0yIDEyLjY1aDUuNTQ1di0xLjNIMnYxLjN6bTcuMzkyIDIuNUgzLjg0N3YtMS4zaDUuNTQ1djEuM3oiIGZpbGw9IiNmZmYiLz48L3N2Zz4=) no-repeat}.__video_overlay .__ui_playback_rate{display:none}.__video_overlay .__ui_playback_rate:focus{outline:0;box-shadow:none}.__ui_playback_rate_opened .__video_overlay .__ui_playback_rate{display:block}.__video_agent_ios.__video_not_played .__ui_playback_rate{display:none}.__video_medium .__ui_playback_rate_button{width:30px;height:30px;margin:0 8px}.__video_large .__ui_playback_rate_button{width:48px;height:48px;margin:0 10px}.__video_mobile .__ui_playback_rate .__ui_setting_sublist{grid-template-columns:repeat(4,1fr)}.__video_mobile.__ui_playback_rate_opened .__ui_ended,.__video_mobile.__ui_playback_rate_opened .__ui_play_pause,.__video_mobile.__ui_playback_rate_opened .__video_header,.__video_mobile.__ui_playback_rate_opened .__video_toolbar{display:none}.__ui_replay_button:before{content:"";display:block;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDQuMjA4di0yLjJsNC4wOTQgMy00LjA5NCAzdi0yLjJhNi4yMDkgNi4yMDkgMCAwMC01LjM2OSA5LjMwNSA2LjIgNi4yIDAgMDA4LjQ2OSAyLjI3MSA2LjIgNi4yIDAgMDAyLjI3LTguNDdsMS4zODUtLjhBNy44IDcuOCAwIDExMTIgNC4yMDh6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat}.__ui_outlink_button:before{content:"";display:block;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE1Ljc4NCA0Ljc4MmwtMS40MTUgMS40MTQgMy4xMTQgMy4xMTJoLTQuODg0Yy01LjQ2MyAwLTkuOTEgNC40NDYtOS45MSA5LjkxaDJjMC00LjM2MiAzLjU0OS03LjkxIDcuOTEtNy45MWg0Ljg4NGwtMy4xMTMgMy4xMTMgMS40MTQgMS40MTQgNS41MjctNS41MjctNS41MjctNS41MjZ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat}.__ui_outlink_button[focus-within]{outline:1px solid #87ceeb}.__ui_outlink_button:focus-within{outline:1px solid #87ceeb}.__ui_ended{display:none}.__video_overlay .__ui_ended{position:relative;z-index:20;width:100%;height:100%}.__ui_ended_button_group{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:10px;line-height:16px;text-align:center;white-space:nowrap;pointer-events:auto}.__ui_ended_button_group button{font-size:inherit;line-height:inherit}.__ui_ended_button_group .__ui_timeout_info{display:block;margin-bottom:6px}.__ui_ended_button_group .__ui_timeout_label{color:#35db80}.__ui_ended_button_group .__ui_timeout_title{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-all;white-space:normal;color:#fff}.__video_small .__ui_ended_button_group .__ui_timeout_title{display:none}.__ui_ended_button_group .__ui_button_label{display:inline-flex;align-items:center;--uvp-button-label-height:20px;height:var(--uvp-button-label-height);padding:0 10px;border-radius:calc(var(--uvp-button-label-height)/2);background-color:hsla(0,0%,100%,.2);color:#fff;letter-spacing:-.2px}.__ui_ended_button_group .__ui_outlink_button,.__ui_ended_button_group .__ui_replay_button{margin:0 30px}.__ui_ended_button_group .__ui_outlink_button:before,.__ui_ended_button_group .__ui_replay_button:before{width:42px;height:42px;margin:0 auto 6px}.__ui_ended_button_group .__ui_outlink_button{display:inline-block;text-decoration:none}.__ui_ended_button_group .__ui_timeout{display:none}.__ui_ended_button_group .__ui_timeout_loading{position:relative}.__ui_ended_button_group .__ui_timeout_next_button{display:block;width:54px;height:54px;margin:0 auto;border:3px solid hsla(0,0%,100%,.5);border-radius:50%}.__ui_ended_button_group .__ui_timeout_next_button:before{content:"";display:block;width:32px;height:32px;margin-left:9px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOC4xMDUgMTEuNDM3YS42NjUuNjY1IDAgMDEwIDEuMTI2TDcuNDEyIDE5LjI5YS42NjUuNjY1IDAgMDEtMS4wMi0uNTYzVjUuMjc0YS42NjUuNjY1IDAgMDExLjAyLS41NjNsMTAuNjkzIDYuNzI2eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==) no-repeat}.__ui_ended_button_group svg{position:absolute;top:0;left:50%;width:54px;height:54px;pointer-events:none;transform:translateX(-50%) rotate(-90deg)}.__ui_ended_button_group svg circle{fill:none;stroke-width:3;stroke:#35db80;transition:stroke-dashoffset .15s ease}.__ui_ended_button_group .__ui_timeout_cancel_button{margin-top:10px}.__video_header .__ui_outlink_button,.__video_header .__ui_replay_button,.__video_toolbar .__ui_outlink_button,.__video_toolbar .__ui_replay_button{display:block;margin:0 6px}.__video_header .__ui_outlink_button:before,.__video_header .__ui_replay_button:before,.__video_toolbar .__ui_outlink_button:before,.__video_toolbar .__ui_replay_button:before{width:24px;height:24px}.__video_ended .__ui_ended{display:block}.__video_ended .__ui_ended.__ui_ended_waiting .__ui_outlink_button,.__video_ended .__ui_ended.__ui_ended_waiting .__ui_replay_button{display:none}.__video_ended .__ui_ended.__ui_ended_waiting .__ui_timeout{display:block}.__video_ended .__ui_seekbar_dragging~.__ui_ended{display:none}.__video_medium .__ui_ended_button_group{font-size:15px;line-height:20px}.__video_medium .__ui_ended_button_group .__ui_timeout_info{margin-bottom:20px}.__video_medium .__ui_ended_button_group .__ui_timeout_title{width:540px;font-size:20px;line-height:26px;margin-top:2px}.__video_medium .__ui_ended_button_group .__ui_outlink_button,.__video_medium .__ui_ended_button_group .__ui_replay_button{margin:0 75px}.__video_medium .__ui_ended_button_group .__ui_outlink_button:before,.__video_medium .__ui_ended_button_group .__ui_replay_button:before{width:84px;height:84px;margin-bottom:6px}.__video_medium .__ui_ended_button_group .__ui_timeout_next_button{width:100px;height:100px;border-width:6px}.__video_medium .__ui_ended_button_group .__ui_timeout_next_button:before{width:72px;height:72px;margin-left:11px}.__video_medium .__ui_ended_button_group svg{width:100px;height:100px}.__video_medium .__ui_ended_button_group .__ui_button_label{--uvp-button-label-height:30px;padding:0 12px;font-size:15px}.__video_medium .__ui_ended_button_group .__ui_timeout_cancel_button{margin-top:16px}.__video_medium .__video_header .__ui_outlink_button,.__video_medium .__video_header .__ui_replay_button,.__video_medium .__video_toolbar .__ui_outlink_button,.__video_medium .__video_toolbar .__ui_replay_button{margin:0 8px}.__video_medium .__video_header .__ui_outlink_button:before,.__video_medium .__video_header .__ui_replay_button:before,.__video_medium .__video_toolbar .__ui_outlink_button:before,.__video_medium .__video_toolbar .__ui_replay_button:before{width:30px;height:30px;margin-bottom:12px}.__video_large .__ui_ended_button_group{font-size:26px;line-height:31px}.__video_large .__ui_ended_button_group .__ui_timeout_info{margin-bottom:41px}.__video_large .__ui_ended_button_group .__ui_timeout_title{width:1080px;font-size:38px;line-height:46px;margin-top:8px}.__video_large .__ui_ended_button_group .__ui_outlink_button,.__video_large .__ui_ended_button_group .__ui_replay_button{margin:0 105px}.__video_large .__ui_ended_button_group .__ui_outlink_button:before,.__video_large .__ui_ended_button_group .__ui_replay_button:before{width:120px;height:120px}.__video_large .__ui_ended_button_group .__ui_timeout_next_button{width:142px;height:142px;margin-bottom:17px;border-width:8px}.__video_large .__ui_ended_button_group .__ui_timeout_next_button:before{width:96px;height:96px;margin-left:19px}.__video_large .__ui_ended_button_group svg{width:142px;height:142px}.__video_large .__ui_ended_button_group .__ui_button_label{--uvp-button-label-height:48px;padding:0 20px;font-size:26px}.__video_large .__ui_ended_button_group .__ui_timeout_cancel_button{margin-top:25px}.__video_large .__video_header .__ui_outlink_button,.__video_large .__video_header .__ui_replay_button,.__video_large .__video_toolbar .__ui_outlink_button,.__video_large .__video_toolbar .__ui_replay_button{margin:0 10px}.__video_large .__video_header .__ui_outlink_button:before,.__video_large .__video_header .__ui_replay_button:before,.__video_large .__video_toolbar .__ui_outlink_button:before,.__video_large .__video_toolbar .__ui_replay_button:before{width:48px;height:48px}.__ui_setting_menu{position:absolute;z-index:30;pointer-events:auto}.__ui_setting_list,.__ui_setting_sublist{padding:0;margin:0;list-style:none}.__ui_setting_item,.__ui_setting_subitem{display:flex;align-items:center;justify-content:space-between;cursor:pointer}.__ui_setting_item:focus,.__ui_setting_subitem:focus{outline:0;box-shadow:none}.__video_keyboard_focus .__ui_setting_item:focus,.__video_keyboard_focus .__ui_setting_subitem:focus{outline:1px solid #87ceeb;outline-offset:-1px}.__ui_setting_item.focus-visible,.__ui_setting_item:focus-visible,.__ui_setting_subitem.focus-visible,.__ui_setting_subitem:focus-visible{outline:none}.__ui_setting_item:active,.__ui_setting_subitem:active{opacity:.5}.__ui_setting_item label,.__ui_setting_subitem label{flex:1 1 auto;cursor:inherit}.__ui_setting_item .__ui_label_value{font-weight:700}.__ui_setting_subitem.__ui_setting_selected{color:#35db80;font-weight:700}.__video_mobile .__ui_setting_close_button{position:absolute;top:0;left:0;width:24px;height:24px;margin:12px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDIuNzVjNS4xIDAgOS4yNSA0LjE1IDkuMjUgOS4yNVMxNy4xIDIxLjI1I
2DEyIDIxLjI1IDIuNzUgMTcuMSAyLjc1IDEyIDYuOSAyLjc1IDEyIDIuNzV6bTIuNjg3IDUuODU2TDEyIDExLjI5MiA5LjMxMyA4LjYwNmwtLjcwNy43MDdMMTEuMjkzIDEybC0yLjY4NyAyLjY4Ny43MDcuNzA3TDEyIDEyLjcwNmwyLjY4NyAyLjY4Ny43MDctLjcwN0wxMi43MDcgMTJsMi42ODctMi42ODYtLjcwNy0uNzA3eiIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjQpIi8+PC9zdmc+) no-repeat}.__video_mobile.__ui_more_opened.__ui_playback_rate_opened .__ui_setting_close_button,.__video_mobile.__ui_more_opened.__ui_resolution_opened .__ui_setting_close_button,.__video_mobile.__ui_more_opened.__ui_subtitle_opened .__ui_setting_close_button{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIxLjI1IDEyYTkuMjUgOS4yNSAwIDExLTE4LjUgMCA5LjI1IDkuMjUgMCAwMTE4LjUgMHptLTcuNDIgMi42NUwxMS4yMiAxMmwyLjYxLTIuNjUtLjcxMi0uN0w5LjgxNSAxMmwzLjMwMyAzLjM1LjcxMi0uN3oiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC40KSIvPjwvc3ZnPg==)}.__video_mobile .__ui_setting_menu{top:0;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:center}.__video_mobile .__ui_setting_item{width:180px;margin:4px auto;padding:10px 16px;background:rgba(0,0,0,.7);box-sizing:border-box;border-radius:40px;font-size:13px;line-height:16px}.__video_mobile .__ui_setting_item:hover{background:hsla(0,0%,100%,.1)}.__video_mobile .__ui_setting_item .__ui_label_name{font-size:11px;color:#c8c8c8}.__video_mobile .__ui_setting_sublist{display:grid;min-width:300px}.__video_mobile .__ui_setting_subitem{display:block;padding:10px 21px;font-size:17px;line-height:22px;text-align:center}.__video_mobile.__video_medium .__ui_setting_close_button{width:42px;height:42px;margin:16px}.__video_mobile.__video_medium .__ui_setting_item{width:280px;margin:6px auto;padding:14px 28px;font-size:16px;line-height:26px}.__video_mobile.__video_medium .__ui_setting_item .__ui_label_name{font-size:17px}.__video_mobile.__video_medium .__ui_setting_subitem{padding:18px 42px;font-size:26px;line-height:31px}.__video_mobile.__video_large .__ui_setting_close_button{width:60px;height:60px;margin:24px}.__video_mobile.__video_large .__ui_setting_item{width:400px;margin:8px auto;padding:20px 36px;font-size:26px;line-height:31px;border-radius:92px}.__video_mobile.__video_large .__ui_setting_item .__ui_label_name{font-size:20px}.__video_mobile.__video_large .__ui_setting_subitem{padding:30px 60px;font-size:38px;line-height:46px}.__video_pc .__ui_setting_close_button{display:flex;align-items:center;width:100%;margin-bottom:2px;padding:5px 12px;font-size:11px;line-height:16px;color:#c8c8c8;text-align:left}.__video_pc .__ui_setting_close_button:before{content:"";flex-shrink:0;width:16px;height:16px;margin-right:4px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE0LjU0IDMuNTRsLjkyLjkyTDcuOTE5IDEybDcuNTQxIDcuNTQtLjkyLjkyTDYuMDgxIDEyeiIgZmlsbD0iI2M4YzhjOCIvPjwvc3ZnPg==) no-repeat}.__video_pc .__ui_setting_close_button .__ui_label_name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:700}.__video_pc .__ui_setting_menu{right:12px;bottom:64px;width:150px;max-height:calc(100% - 112px);overflow-y:auto;background-color:rgba(0,0,0,.6);border-radius:4px;padding:7px 0;box-sizing:border-box}.__video_pc .__ui_setting_item,.__video_pc .__ui_setting_subitem{padding:5px 12px;font-size:13px;line-height:18px}.__video_pc .__ui_setting_item:hover,.__video_pc .__ui_setting_subitem:hover{background:hsla(0,0%,100%,.1)}.__video_pc .__ui_setting_item .__ui_label_name{font-size:11px}.__video_pc.__ui_header_opened .__ui_setting_menu{bottom:auto!important;top:48px}.__video_pc.__video_medium .__ui_setting_close_button{padding:8px 16px;font-size:13px;line-height:18px}.__video_pc.__video_medium .__ui_setting_menu{right:16px;bottom:80px;width:180px;max-height:calc(100% - 142px)}.__video_pc.__video_medium .__ui_setting_item,.__video_pc.__video_medium .__ui_setting_subitem{padding:8px 16px;font-size:15px;line-height:20px}.__video_pc.__video_medium .__ui_setting_item .__ui_label_name{font-size:13px}.__video_pc.__video_medium.__ui_header_opened .__ui_setting_menu{top:62px}.__video_pc.__video_large .__ui_setting_close_button{padding:10px 20px;font-size:15px;line-height:22px}.__video_pc.__video_large .__ui_setting_close_button:before{width:20px;height:20px;margin-right:8px}.__video_pc.__video_large .__ui_setting_menu{right:24px;bottom:120px;width:210px;max-height:calc(100% - 216px);padding:6px 0;border-radius:8px}.__video_pc.__video_large .__ui_setting_item,.__video_pc.__video_large .__ui_setting_subitem{padding:10px 20px;font-size:17px;line-height:22px}.__video_pc.__video_large .__ui_setting_item .__ui_label_name{font-size:15px}.__video_pc.__video_large.__ui_header_opened .__ui_setting_menu{top:96px}.__ui_title{position:relative;display:flex;align-items:center;transition:opacity .2s ease}.__ui_title,.__ui_title_content{overflow:hidden}.__ui_title_main{font-weight:700;font-size:15px;line-height:20px;pointer-events:auto}.__ui_title_main,.__ui_title_sub{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__ui_title_sub{font-size:11px;line-height:16px;color:#f5f5f5}.__ui_title_avatar{align-self:flex-start;flex-shrink:0;position:relative;width:32px;height:32px;margin-right:8px;font-size:0;border-radius:50%;overflow:hidden;pointer-events:auto}.__ui_title_avatar:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border:1px solid rgba(0,0,0,.05);border-radius:50%}.__ui_title_avatar img{display:block;width:100%;height:100%;background-size:#fff;-o-object-fit:cover;object-fit:cover;overflow:hidden}.__ui_title_main~.__ui_live_option,.__ui_title_sub~.__ui_live_option{margin-top:6px}.__ui_live_label{display:inline-block;height:18px;padding:0 6px;border-radius:10px;background-color:#000;margin-right:6px;font-size:8.5px;font-weight:800;line-height:18px;color:#fff;letter-spacing:.3px;vertical-align:top}.__ui_label_live{display:inline-flex;align-items:center;color:#35db80}.__ui_label_live:before{content:"";display:inline-block;width:10px;height:10px;margin-right:2px;background:url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTMgMTQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05LjI2NyA3YTIuNzY3IDIuNzY3IDAgMTEtNS41MzQgMCAyLjc2NyAyLjc2NyAwIDAxNS41MzQgMHpNMTEgN2E0LjUgNC41IDAgMTEtOSAwIDQuNSA0LjUgMCAwMTkgMHpNNi41IDguNjA3YTEuNjA3IDEuNjA3IDAgMTAwLTMuMjE0IDEuNjA3IDEuNjA3IDAgMDAwIDMuMjE0eiIgZmlsbD0iIzM1REI4MCIvPjwvc3ZnPg==) no-repeat}.__ui_live_info{display:inline-flex;align-items:center;margin-right:6px;font-size:11px;line-height:18px;vertical-align:top}.__ui_live_info.viewer:before{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDUuMzVjMy45OTMgMCA3LjcyNiAyLjQyNSA5LjgxOCA2LjM0NGwuMTYzLjMwNi0uMTYzLjMwNkMxOS43MjYgMTYuMjI1I
2DE1Ljk5MyAxOC42NSAxMiAxOC42NWMtMy45OTMgMC03LjcyNi0yLjQyNS05LjgxOC02LjM0NEwyLjAyIDEybC4xNjMtLjMwNkM0LjI3NCA3Ljc3NSA4LjAwNyA1LjM1IDEyIDUuMzV6bTAgMS4zYy0zLjI5NSAwLTYuNDE5IDEuOTA4LTguMzM2IDUuMDY4bC0uMTY2LjI4MS4xNjYuMjgzYzEuODU5IDMuMDY0IDQuODUzIDQuOTUxIDguMDM3IDUuMDYzbC4yOTguMDA1YzMuMjk1IDAgNi40Mi0xLjkwOCA4LjMzNy01LjA2OEwyMC41IDEybC0uMTY1LS4yODFjLTEuODYtMy4wNjUtNC44NTMtNC45NTEtOC4wMzctNS4wNjN6bTAgMS41OTRhMy43NTYgMy43NTYgMCAxMTAgNy41MTIgMy43NTYgMy43NTYgMCAwMTAtNy41MTJ6bTAgMS4zYTIuNDU2IDIuNDU2IDAgMTAwIDQuOTEyIDIuNDU2IDIuNDU2IDAgMDAwLTQuOTEyeiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==) no-repeat}.__ui_live_info.time:before{content:none}.__ui_live_info.chat:before{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyLjEgMy4wNzhjLTUuMzU3IDAtOC43NSAzLjQyNC04Ljc1IDguODI1IDAgMy4xMTEgMS41ODggNS45NzYgMy44MSA4LjM0M2wuNjM1LjY3Ni40MTktLjgyN2MuNTcyLTEuMTI4IDEuNDAzLTEuODI2IDIuNTUyLTEuODI2bDIuMjk0LS4wMWM0LjE4NCAwIDcuNTg5LTMuNDA0IDcuNTg5LTcuNTkgMC00LjU5Ni0zLjQxLTcuNTkxLTguNTUtNy41OTF6bTAgMS4zYzQuNDU2IDAgNy4yNDkgMi40NTMgNy4yNDkgNi4yOWE2LjI5OCA2LjI5OCAwIDAxLTYuMjkxIDYuMjkxbC0yLjI5NS4wMS0uMjIyLjAwNmMtMS4yNDMuMDY0LTIuMjA3LjY3My0yLjkyIDEuNjE4bC0uMDg4LjExOS0uMTI1LS4xNDhjLTEuNjQyLTEuOTgyLTIuNzU4LTQuMjgtMi43NTgtNi42NjIgMC00LjY4NCAyLjgxNC03LjUyNCA3LjQ1LTcuNTI0eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==) no-repeat}.__ui_live_info.play:before{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjEwIiB2aWV3Qm94PSIwIDAgMjAgMjAiPjxwYXRoIGQ9Ik0xNC41NTggMTBsLTguODY1IDUuNTc3VjQuNDI0TDE0LjU1OCAxMHptMS41NDcuNTYzYS42NjUuNjY1IDAgMDAwLTEuMTI2TDUuNDEyIDIuNzExYS42NjUuNjY1IDAgMDAtMS4wMi41NjN2MTMuNDUzYzAgLjUyMy41NzcuODQxIDEuMDIuNTYzbDEwLjY5My02LjcyN3oiIGZpbGw9IiNmZmYiLz48L3N2Zz4=) no-repeat}.__ui_live_info:before{content:"";display:inline-block;width:14px;height:14px;margin-right:2px;vertical-align:top}.__video_medium .__ui_title_main{font-size:20px;line-height:26px}.__video_medium .__ui_title_sub{font-size:13px;line-height:18px}.__video_medium .__ui_title_avatar{width:42px;height:42px;margin-right:12px}.__video_medium .__ui_title_main~.__ui_live_option,.__video_medium .__ui_title_sub~.__ui_live_option{margin-top:10px}.__video_medium .__ui_live_label{height:22px;padding:0 8px;border-radius:20px;margin-right:8px;font-size:11px;line-height:22px}.__video_medium .__ui_label_live:before{width:13px;height:13px}.__video_medium .__ui_live_info{margin-right:8px;font-size:13px;line-height:22px}.__video_medium .__ui_live_info:before{width:16px;height:16px}.__video_large .__ui_title_main{font-size:38px;line-height:46px}.__video_large .__ui_title_sub{font-size:20px;line-height:26px}.__video_large .__ui_title_avatar{width:72px;height:72px;margin-right:16px}.__video_large .__ui_title_main~.__ui_live_option,.__video_large .__ui_title_sub~.__ui_live_option{margin-top:14px}.__video_large .__ui_live_label{height:30px;padding:0 10px;border-radius:20px;margin-right:10px;font-size:15px;line-height:30px}.__video_large .__ui_label_live:before{width:18px;height:18px}.__video_large .__ui_live_info{margin-right:10px;font-size:20px;line-height:30px}.__video_large .__ui_live_info:before{width:24px;height:24px;margin-right:4px}.__video_overlay .__ui_error{display:none;position:absolute;top:0;left:0;right:0;bottom:0;padding:0 50px;flex-direction:column;align-items:center;justify-content:center;background:#000;z-index:40;font-size:13px;line-height:18px;pointer-events:auto}.__video_overlay .__ui_error:before{content:"";display:block;width:42px;height:42px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDIuNzUxYTkuMjQ5IDkuMjQ5IDAgMTEwIDE4LjQ5OEE5LjI0OSA5LjI0OSAwIDExMTIgMi43NXptMCAxLjNhNy45NDkgNy45NDkgMCAxMDAgMTUuODk4QTcuOTQ5IDcuOTQ5IDAgMDAxMiA0LjA1em0uMDA1IDEwLjY2NWEuODM1LjgzNSAwIDExMCAxLjY2OS44MzUuODM1IDAgMDEwLTEuNjd6bS42NDUtNy4xMzh2NS41NzRoLTEuM1Y3LjU3OGgxLjN6IiBmaWxsPSIjYjdiN2I3Ii8+PC9zdmc+) no-repeat}.__video_overlay .__ui_error_title{margin-top:8px;white-space:pre-line;text-align:center;color:#b7b7b7}.__video_overlay .__ui_error_button{margin-top:8px;padding:4px 8px;font-weight:700;font-size:inherit;line-height:inherit}.__ui_error_show .__video_overlay .__ui_error{display:flex}.__video_medium .__ui_error{font-size:17px;line-height:26px}.__video_medium .__ui_error:before{width:84px;height:84px}.__video_large .__ui_error{font-size:26px;line-height:31px}.__video_large .__ui_error:before{width:120px;height:120px}.__video_large .__ui_error_title{margin-top:12px}.__video_large .__ui_error_button{margin-top:20px}.__ui_more_button{width:24px;height:24px;margin:0 6px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDE2Ljg3MmExLjEgMS4xIDAgMTEwIDIuMiAxLjEgMS4xIDAgMDEwLTIuMnptMC01Ljk3MmExLjEgMS4xIDAgMTEwIDIuMiAxLjEgMS4xIDAgMDEwLTIuMnptMC01Ljk3MmExLjEgMS4xIDAgMTEwIDIuMiAxLjEgMS4xIDAgMDEwLTIuMnoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=) no-repeat}.__video_overlay .__ui_more{display:none}.__video_overlay .__ui_more:focus{outline:0;box-shadow:none}.__ui_more_opened .__video_overlay .__ui_more{display:block}.__ui_more_opened.__ui_playback_rate_opened .__video_overlay .__ui_more,.__ui_more_opened.__ui_resolution_opened .__video_overlay .__ui_more,.__ui_more_opened.__ui_subtitle_opened .__video_overlay .__ui_more{display:none}.__video_medium .__ui_more_button{width:30px;height:30px;margin:0 8px}.__video_large .__ui_more_button{width:48px;height:48px;margin:0 10px}.__video_mobile.__ui_more_opened .__ui_ended,.__video_mobile.__ui_more_opened .__ui_play_pause,.__video_mobile.__ui_more_opened .__video_header,.__video_mobile.__ui_more_opened .__video_toolbar,.__video_pc .__ui_more .__ui_setting_close_button{display:none}.__ui_share_button{width:24px;height:24px;margin:0 6px;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTUuNzI2IDExLjE2MXY3LjgxMmgxMi41NDZWMTEuMTZoMS4zdjcuOTY3YzAgLjU5LS40NDYgMS4wNzYtMS4wMiAxLjEzOGwtLjEyNC4wMDdINS41N2MtLjU5IDAtMS4wNzYtLjQ0Ny0xLjEzOC0xLjAybC0uMDA3LS4xMjV2LTcuOTY3aDEuM3pNMTIgMy43MjdMMTYuMSA3LjYxMmwtLjg5NC45NDQtMi41NTUtMi40Mi0uMDA1IDguNDg3aC0xLjNsLjAwNS04LjQ5My0yLjU1OSAyLjQyNi0uODk0LS45NDRMMTIgMy43Mjd6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat}.__video_medium .__ui_share_button{width:30px;height:30px;margin:0 8px}.__video_large .__ui_share_button{width:48px;height:48px;margin:0 10px}.__ui_skip_next_button,.__ui_skip_prev_button{width:24px;height:24px;margin:0 6px;font-size:8px;line-height:10px;font-weight:700;pointer-events:auto}.__ui_skip_prev_button{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LjgwNiAxMi4wMTRhNy44MDYgNy44MDYgMCAxMS0xNC41NjEtMy45bDEuMzg1LjhhNi4yIDYuMiAwIDAwMi4yNyA4LjQ3IDYuMiA2LjIgMCAwMDguNDY5LTIuMjcxQTYuMjA5IDYuMjA5IDAgMDAxMiA1LjgwOHYyLjJsLTQuMDk0LTMgNC4wOTQtM3YyLjJhNy44MjEgNy44MjEgMCAwMTcuODA2IDcuODA2eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==) no-repeat}.__ui_skip_next_button{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDQuMjA4di0yLjJsNC4wOTQgMy00LjA5NCAzdi0yLjJhNi4yMDkgNi4yMDkgMCAwMC01LjM2OSA5LjMwNSA2LjIgNi4yIDAgMDA4LjQ2OSAyLjI3MSA2LjIgNi4yIDAgMDAyLjI3LTguNDdsMS4zODUtLjhBNy44IDcuOCAwIDExMTIgNC4yMDh6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat}.__video_overlay .__ui_skip{top:0;left:0;right:0;bottom:0;overflow:hidden;z-index:20}.__video_overlay .__ui_skip,.__video_overlay .__ui_skip_next,.__video_overlay .__ui_skip_prev{position:absolute;visibility:hidden;pointer-events:none;opacity:0;transition:opacity .4s,visibility .4s}.__video_overlay .__ui_skip .seconds{position:absolute}.__video_overlay .__ui_skip .seconds:before{content:"";display:block}.__video_skip_next .__video_overlay .__ui_skip,.__video_skip_next .__video_overlay .__ui_skip_next,.__video_skip_prev .__video_overlay .__ui_skip,.__video_skip_prev .__video_overlay .__ui_skip_prev{visibility:visible;opacity:1}.__video_skip_next .__video_overlay .__ui_play_pause,.__video_skip_prev .__video_overlay .__ui_play_pause{display:none!important}.__video_medium .__ui_skip_next_button,.__video_medium .__ui_skip_prev_button{width:30px;height:30px;margin:0 8px;font-size:9px;line-height:11px}.__video_large .__ui_skip_next_button,.__video_large .__ui_skip_prev_button{width:48px;height:48px;margin:0 10px;font-size:15px;line-height:20px}.__video_mobile .__video_overlay .__ui_skip_next,.__video_mobile .__video_overlay .__ui_skip_prev{top:50%;left:0;width:80%;padding-bottom:100%;transform:translate(-58%,-50%);background:hsla(0,0%,100%,.2);border-radius:50%}.__video_mobile .__video_overlay .__ui_skip_prev .seconds:before{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMi42MjkgMTIuMzU0YS40MTkuNDE5IDAgMDEwLS43MDhsNy43MjgtNC44OWEuNDE5LjQxOSAwIDAxLjY0My4zNTN2OS43ODFhLjQyLjQyIDAgMDEtLjY0My4zNTRsLTcuNzI4LTQuODl6bS05Ljc3MiAwYS40MTkuNDE5IDAgMDEwLS43MDhsNy43MjgtNC44OWEuNDE5LjQxOSAwIDAxLjY0My4zNTN2OS43ODFhLjQyLjQyIDAgMDEtLjY0My4zNTRsLTcuNzI4LTQuODl6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat}.__video_mobile .__video_overlay .__ui_skip_next{left:auto;right:0;transform:translate(58%,-50%)}.__video_mobile .__video_overlay .__ui_skip_next .seconds:before{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMS4zNzEgMTIuMzU0YS40MTkuNDE5IDAgMDAwLS43MDhsLTcuNzI4LTQuODlBLjQxOS40MTkgMCAwMDMgNy4xMDl2OS43ODFjMCAuMzMuMzY0LjUzLjY0My4zNTRsNy43MjgtNC44OXptOS43NzIgMGEuNDE5LjQxOSAwIDAwMC0uNzA4bC03LjcyOC00Ljg5YS40MTkuNDE5IDAgMDAtLjY0My4zNTN2OS43ODFjMCAuMzMuMzY0LjUzLjY0My4zNTRsNy43MjgtNC44OXoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=) no-repeat}.__video_mobile .__video_overlay .__ui_skip .seconds{position:absolute;top:50%;transform:translateY(-50%);font-size:13px;line-height:16px;text-align:center}.__video_mobile .__video_overlay .__ui_skip .seconds:before{width:42px;height:42px}.__video_mobile .__ui_skip_prev .seconds{right:17.5%}.__video_mobile .__ui_skip_next .seconds{left:17.5%}.__video_mobile.__video_medium .__video_overlay .__ui_skip .seconds{font-size:17px;line-height:22px}.__video_mobile.__video_medium .__video_overlay .__ui_skip .seconds:before{width:84px;height:84px}.__video_mobile.__video_medium .__ui_skip_prev .seconds{right:20%}.__video_mobile.__video_medium .__ui_skip_next .seconds{left:20%}.__video_mobile.__video_large .__video_overlay .__ui_skip .seconds{font-size:26px;line-height:31px}.__video_mobile.__video_large .__video_overlay .__ui_skip .seconds:before{width:120px;height:120px}.__video_mobile.__video_large .__ui_skip_prev .seconds{right:22.5%}.__video_mobile.__video_large .__ui_skip_next .seconds{left:22.5%}.__video_pc .__video_overlay .__ui_skip_next,.__video_pc .__video_overlay .__ui_skip_prev{top:0;bottom:0;width:100%}.__video_pc .__video_overlay .__ui_skip .seconds{top:50%;left:50%;display:flex;align-items:center;justify-content:center;width:54px;height:54px;font-size:13px;line-height:16px;transform:translate(-50%,-50%)}.__video_pc .__video_overlay .__ui_skip .seconds:before{position:absolute;top:0;left:0;width:100%;height:100%}.__video_pc .__video_overlay .__ui_skip_prev .seconds:before{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LjgwNiAxMi4wMTRhNy44MDYgNy44MDYgMCAxMS0xNC41NjEtMy45bDEuMzg1LjhhNi4yIDYuMiAwIDAwMi4yNyA4LjQ3IDYuMiA2LjIgMCAwMDguNDY5LTIuMjcxQTYuMjA5IDYuMjA5IDAgMDAxMiA1LjgwOHYyLjJsLTQuMDk0LTMgNC4wOTQtM3YyLjJhNy44MjEgNy44MjEgMCAwMTcuODA2IDcuODA2eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==) no-repeat}.__video_pc .__video_overlay .__ui_skip_next .seconds:before{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbGFpY29uLXZlcnNpb249IjUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDQuMjA4di0yLjJsNC4wOTQgMy00LjA5NCAzdi0yLjJhNi4yMDkgNi4yMDkgMCAwMC01LjM2OSA5LjMwNSA2LjIgNi4yIDAgMDA4LjQ2OSAyLjI3MSA2LjIgNi4yIDAgMDAyLjI3LTguNDdsMS4zODUtLjhBNy44IDcuOCAwIDExMTIgNC4yMDh6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat}.__video_pc.__video_medium .__video_overlay .__ui_skip .seconds{width:120px;height:120px;font-size:26px;line-height:31px}.__video_pc.__video_large .__video_overlay .__ui_skip .seconds{width:180px;height:180px;font-size:26px;line-height:31px}.__ui_custom_button{width:24px;height:24px;margin:0 6px}.__video_medium .__ui_custom_button{width:30px;height:30px;margin:0 8px}.__video_large .__ui_custom_button{width:48px;height:48px;margin:0 10px}',""]),e.exports=n},380:function(e,t,r){var n;n=()=>(()=>{var e={609:(e,t,r)=>{var n=r(425).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,l=r.hasOwnProperty,c="function"==typeof Symbol?Symbol:{},d=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",h=c.toStringTag||"@@toStringTag";function _(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{_({},"")}catch(e){_=function(e,t,r){return e[t]=r}}function v(e,t,r,n){var o=t&&t.prototype instanceof E?t:E,l=Object.create(o.prototype),c=new R(n||[]);return l._invoke=function(e,t,r){var n="suspendedStart";return function(o,l){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw l;return{value:void 0,done:!0}}for(r.method=o,r.arg=l;;){var c=r.delegate;if(c){var d=k(c,r);if(d){if(d===y)continue;return d}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var f=m(e,t,r);if("normal"===f.type){if(n=r.done?"completed":"suspendedYield",f.arg===y)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n="completed",r.method="throw",r.arg=f.arg)}}}(e,r,c),l}function m(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=v;var y={};function E(){}function T(){}function S(){}var D={};_(D,d,(function(){return this}));var L=Object.getPrototypeOf,I=L&&L(L(O([])));I&&I!==r&&l.call(I,d)&&(D=I);var A=S.prototype=E.prototype=Object.create(D);function x(e){["next","throw","return"].forEach((function(t){_(e,t,(function(e){return this._invoke(t,e)}))}
vendor: 4,480 bytes, line 2
2))}function M(e,t){function r(o,c,d,f){var h=m(e[o],e,c);if("throw"!==h.type){var _=h.arg,v=_.value;return v&&"object"==n(v)&&l.call(v,"__await")?t.resolve(v.__await).then((function(e){r("next",e,d,f)}),(function(e){r("throw",e,d,f)})):t.resolve(v).then((function(e){_.value=e,d(_)}),(function(e){return r("throw",e,d,f)}))}f(h.arg)}var o;this._invoke=function(e,n){function l(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(l,l):l()}}function k(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return y;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var n=m(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,y;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,y):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function O(e){if(e){var t=e[d];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(l.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:C}}function C(){return{value:void 0,done:!0}}return T.prototype=S,_(A,"constructor",S),_(S,"constructor",T),T.displayName=_(S,h,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,_(e,h,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},x(M.prototype),_(M.prototype,f,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,o,l){void 0===l&&(l=Promise);var c=new M(v(e,r,n,o),l);return t.isGeneratorFunction(r)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},x(A),_(A,h,"Generator"),_(A,d,(function(){return this})),_(A,"toString",(function(){return"[object Generator]"})),t.keys=function(object){var e=[];for(var t in object)e.push(t);return e.reverse(),function t(){for(;e.length;){var r=e.pop();if(r in object)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=O,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(N),!e)for(var t in this)"t"===t.charAt(0)&&l.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i],o=n.completion;if("root"===n.tryLoc)return r("end");if(n.tryLoc<=this.prev){var c=l.call(n,"catchLoc"),d=l.call(n,"finallyLoc");if(c&&d){if(this.prev<n.catchLoc)return r(n.catchLoc,!0);if(this.prev<n.finallyLoc)return r(n.finallyLoc)}else if(c){if(this.prev<n.catchLoc)return r(n.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return r(n.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var o=n?n.completion:{};return o.type=e,o.arg=t,n?(this.method="next",this.next=n.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var i=this.tryEntries.length-1;i>=0;--i){var t=this.tryEntries[i];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),N(t),y}}
vendor: 6,693 bytes, line 2
2,catch:function(e){for(var i=this.tryEntries.length-1;i>=0;--i){var t=this.tryEntries[i];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var n=r.arg;N(t)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),y}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},425:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},841:(e,t,r)=>{var n=r(609)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var l=t[n]={exports:{}};return e[n](l,l.exports,r),l.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{Plugin:()=>Wi,default:()=>bn,video:()=>video});var e,t,u,o,l,c,d={},f=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(e,t){for(var u in t)e[u]=t[u];return e}function a(e){var t=e.parentNode;t&&t.removeChild(e)}function _(t,u,i){var r,n,o,l={};for(o in u)"key"==o?r=u[o]:"ref"==o?n=u[o]:l[o]=u[o];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===l[o]&&(l[o]=t.defaultProps[o]);return v(t,l,r,n,null)}function v(e,i,r,n,o){var l={type:e,props:i,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u:o};return null==o&&null!=t.vnode&&t.vnode(l),l}function p(e){return e.children}function m(e,t){this.props=e,this.context=t}function y(e,t){if(null==t)return e.__?y(e.__,e.__.__k.indexOf(e)+1):null;for(var u;t<e.__k.length;t++)if(null!=(u=e.__k[t])&&null!=u.__e)return u.__e;return"function"==typeof e.type?y(e):null}function E(e){var t,u;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(u=e.__k[t])&&null!=u.__e){e.__e=e.__c.base=u.__e;break}return E(e)}}function b(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!g.__r++||l!==t.debounceRendering)&&((l=t.debounceRendering)||setTimeout)(g)}function g(){for(var e;g.__r=o.length;)e=o.sort((function(e,t){return e.__v.__b-t.__v.__b})),o=[],e.some((function(e){var t,u,i,r,n,o;e.__d&&(n=(r=(t=e).__v).__e,(o=t.__P)&&(u=[],(i=s({},r)).__v=r.__v+1,M(o,r,i,t.__n,void 0!==o.ownerSVGElement,null!=r.__h?[n]:null,u,null==n?y(r):n,r.__h),k(u,r),r.__e!=n&&E(r)))}))}function T(e,t,u,i,r,n,o,l,s,a){var c,h,_,m,b,g,E,T=i&&i.__k||f,L=T.length;for(u.__k=[],c=0;c<t.length;c++)if(null!=(m=u.__k[c]=null==(m=t[c])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?v(null,m,null,null,m):Array.isArray(m)?v(p,{children:m},null,null,null):m.__b>0?v(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)){if(m.__=u,m.__b=u.__b+1,null===(_=T[c])||_&&m.key==_.key&&m.type===_.type)T[c]=void 0;else for(h=0;h<L;h++){if((_=T[h])&&m.key==_.key&&m.type===_.type){T[h]=void 0;break}_=null}M(e,m,_=_||d,r,n,o,l,s,a),b=m.__e,(h=m.ref)&&_.ref!=h&&(E||(E=[]),_.ref&&E.push(_.ref,null,m),E.push(h,m.__c||b,m)),null!=b?(null==g&&(g=b),"function"==typeof m.type&&m.__k===_.__k?m.__d=s=S(m,s,e):s=D(e,m,_,T,b,s),"function"==typeof u.type&&(u.__d=s)):s&&_.__e==s&&s.parentNode!=e&&(s=y(_))}for(u.__e=g,c=L;c--;)null!=T[c]&&("function"==typeof u.type&&null!=T[c].__e&&T[c].__e==u.__d&&(u.__d=y(i,c+1)),R(T[c],T[c]));if(E)for(c=0;c<E.length;c++)N(E[c],E[++c],E[++c])}function S(e,t,u){for(var i,r=e.__k,n=0;r&&n<r.length;n++)(i=r[n])&&(i.__=e,t="function"==typeof i.type?S(i,t,u):D(u,i,i,r,i.__e,t));return t}function D(e,t,u,i,r,n){var o,l,c;if(void 0!==t.__d)o=t.__d,t.__d=void 0;else if(null==u||r!=n||null==r.parentNode)e:if(null==n||n.parentNode!==e)e.appendChild(r),o=null;else{for(l=n,c=0;(l=l.nextSibling)&&c<i.length;c+=2)if(l==r)break e;e.insertBefore(r,n),o=n}return void 0!==o?o:r.nextSibling}function L(e,t,u){"-"===t[0]?e.setProperty(t,u):e[t]=null==u?"":"number"!=typeof u||h.test(t)?u:u+"px"}function I(e,t,u,i,r){var n;e:if("style"===t)if("string"==typeof u)e.style.cssText=u;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)u&&t in u||L(e.style,t,"");if(u)for(t in u)i&&u[t]===i[t]||L(e.style,t,u[t])}else if("o"===t[0]&&"n"===t[1])n=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+n]=u,u?i||e.addEventListener(t,n?x:A,n):e.removeEventListener(t,n?x:A,n);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==u?"":u;break e}catch(e){}"function"==typeof u||(null!=u&&(!1!==u||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,u):e.removeAttribute(t))}}function A(e){this.l[e.type+!1](t.event?t.event(e):e)}function x(e){this.l[e.type+!0](t.event?t.event(e):e)}function M(e,u,i,r,n,o,l,c,d){var a,f,h,_,v,y,b,g,E,S,D,L,I,A=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(d=i.__h,c=u.__e=i.__e,u.__h=null,o=[c]),(a=t.__b)&&a(u);try{e:if("function"==typeof A){if(g=u.props,E=(a=A.contextType)&&r[a.__c],S=a?E?E.props.value:a.__:r,i.__c?b=(f=u.__c=i.__c).__=f.__E:("prototype"in A&&A.prototype.render?u.__c=f=new A(g,S):(u.__c=f=new m(g,S),f.constructor=A,f.render=O),E&&E.sub(f),f.props=g,f.state||(f.state={}),f.context=S,f.__n=r,h=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=A.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=s({},f.__s)),s(f.__s,A.getDerivedStateFromProps(g,f.__s))),_=f.props,v=f.state,h)null==A.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==A.getDerivedStateFromProps&&g!==_&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(g,S),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(g,f.__s,S)||u.__v===i.__v){f.props=g,f.state=f.__s,u.__v!==i.__v&&(f.__d=!1),f.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEac
vendor: 5,858 bytes, line 2
2h((function(e){e&&(e.__=u)})),f.__h.length&&l.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(g,f.__s,S),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(_,v,y)}))}if(f.context=S,f.props=g,f.__v=u,f.__P=e,D=t.__r,L=0,"prototype"in A&&A.prototype.render)f.state=f.__s,f.__d=!1,D&&D(u),a=f.render(f.props,f.state,f.context);else do{f.__d=!1,D&&D(u),a=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++L<25);f.state=f.__s,null!=f.getChildContext&&(r=s(s({},r),f.getChildContext())),h||null==f.getSnapshotBeforeUpdate||(y=f.getSnapshotBeforeUpdate(_,v)),I=null!=a&&a.type===p&&null==a.key?a.props.children:a,T(e,Array.isArray(I)?I:[I],u,i,r,n,o,l,c,d),f.base=u.__e,u.__h=null,f.__h.length&&l.push(f),b&&(f.__E=f.__=null),f.__e=!1}else null==o&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=w(i.__e,u,i,r,n,o,l,d);(a=t.diffed)&&a(u)}catch(e){u.__v=null,(d||null!=o)&&(u.__e=c,u.__h=!!d,o[o.indexOf(c)]=null),t.__e(e,u,i)}}function k(e,u){t.__c&&t.__c(u,e),e.some((function(u){try{e=u.__h,u.__h=[],e.some((function(e){e.call(u)}))}catch(e){t.__e(e,u.__v)}}))}function w(t,u,i,r,n,o,l,c){var s,f,h,_=i.props,p=u.props,v=u.type,m=0;if("svg"===v&&(n=!0),null!=o)for(;m<o.length;m++)if((s=o[m])&&"setAttribute"in s==!!v&&(v?s.localName===v:3===s.nodeType)){t=s,o[m]=null;break}if(null==t){if(null===v)return document.createTextNode(p);t=n?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,p.is&&p),o=null,c=!1}if(null===v)_===p||c&&t.data===p||(t.data=p);else{if(o=o&&e.call(t.childNodes),f=(_=i.props||d).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!c){if(null!=o)for(_={},m=0;m<t.attributes.length;m++)_[t.attributes[m].name]=t.attributes[m].value;(h||f)&&(h&&(f&&h.__html==f.__html||h.__html===t.innerHTML)||(t.innerHTML=h&&h.__html||""))}if(function(e,t,u,i,r){var n;for(n in u)"children"===n||"key"===n||n in t||I(e,n,null,u[n],i);for(n in t)r&&"function"!=typeof t[n]||"children"===n||"key"===n||"value"===n||"checked"===n||u[n]===t[n]||I(e,n,t[n],u[n],i)}(t,p,_,n,c),h)u.__k=[];else if(m=u.props.children,T(t,Array.isArray(m)?m:[m],u,i,r,n&&"foreignObject"!==v,o,l,o?o[0]:i.__k&&y(i,0),c),null!=o)for(m=o.length;m--;)null!=o[m]&&a(o[m]);c||("value"in p&&void 0!==(m=p.value)&&(m!==t.value||"progress"===v&&!m||"option"===v&&m!==_.value)&&I(t,"value",m,_.value,!1),"checked"in p&&void 0!==(m=p.checked)&&m!==t.checked&&I(t,"checked",m,_.checked,!1))}return t}function N(e,u,i){try{"function"==typeof e?e(u):e.current=u}catch(e){t.__e(e,i)}}function R(e,u,i){var r,n;if(t.unmount&&t.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||N(r,null,u)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){t.__e(e,u)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&R(r[n],u,"function"!=typeof e.type);i||null==e.__e||a(e.__e),e.__=e.__e=e.__d=void 0}function O(e,t,u){return this.constructor(e,u)}function C(u,i,r){var n,o,l;t.__&&t.__(u,i),o=(n="function"==typeof r)?null:r&&r.__k||i.__k,l=[],M(i,u=(!n&&r||i).__k=_(p,null,[u]),o||d,d,void 0!==i.ownerSVGElement,!n&&r?[r]:o?null:i.firstChild?e.call(i.childNodes):null,l,!n&&r?r:o?o.__e:i.firstChild,n),k(l,u)}function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}e=f.slice,t={__e:function(e,t,u,i){for(var r,n,o;t=t.__;)if((r=t.__c)&&!r.__)try{if((n=r.constructor)&&null!=n.getDerivedStateFromError&&(r.setState(n.getDerivedStateFromError(e)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),o=r.__d),o)return r.__E=r}catch(t){e=t}throw e}},u=0,m.prototype.setState=function(e,t){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s({},this.state),"function"==typeof e&&(e=e(s({},u),this.props)),e&&s(u,e),null!=e&&this.__v&&(t&&this.__h.push(t),b(this))},m.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},m.prototype.render=p,o=[],g.__r=0,c=0;var j=function(e){return void 0===e},F=function(e){return"object"===P(e)},U=function(e){return null===e},B=function(e){return j(e)||null===e},G=function(e){return"boolean"==typeof e},z=function(e){return"number"==typeof e},H=function(e){return"string"==typeof e},Y=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ";return"".concat(Array(Math.max(0,e-String(t).length+1)).join(r)).concat(t)},V=function(time){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=Math.abs(time),r=e||t,n=Math.floor(t%60),o=Math.floor(t/60)%60,l=Math.floor(t/3600);if(Math.floor(r/3600))return"".concat(Y(2,l,"0"),":").concat(Y(2,o,"0"),":").concat(Y(2,n,"0"));var c="".concat(Y(2,o,"0"),":").concat(Y(2,n,"0"));return U(time)?c.replace(/[0-9]/g,"8"):c},W=function(){return"undefined"!=typeof window?window:{}},Z=function(){var e=W();return!!("ontouchstart"in e||e.DocumentTouch&&document instanceof DocumentTouch)};function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}function Q(e,t){if(e){if("string"==typeof e)return K(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(e,t):void 0}}function X(e,i){return function(e){if(Array.isArray(e))return e}(e)||function(e,i){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o=[],l=!0,c=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(o.push(r.value),!i||o.length!==i);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==t.return||t.return()}finally{if(c)throw n}}return o}}(e,i)||Q(e,i)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var J,$,ee,te,ie=0,re=[],ne=[],oe=t.__b,ae=t.__r,se=t.diffed,ue=t.__c,le=t.unmount;function ce(e,r){t.__h&&t.__h($,e,ie||r),ie=0;var i=$.__H||($.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:ne}),i.__[e]}function de(e){return ie=1,fe(Le,e)}function fe(e,t,i){var r=ce(J++,2);if(r.t=e,!r.__c&&(r.__=[i?i(t):Le(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=$,!$.u)){$.u=!0;var n=$.shouldComponentUpdate;$.shouldComponentUpdate=function(e,t,o){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter((function(e){return e.__c}));if(u.every((function(e){return!e.__N})))return!n||n.call(this,e,t,o);var i=!1;return u.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!!i&&(!n||n.call(this,e,t,o))}}return r.__N||r.__}function he(e,i){var r=ce(J++,3);!t.__s&&De(r.__H,i)&&(r.__=e,r.i=i,$.__H.__h.push(r))}function _e(e,i){var r=ce(J++,4);!t.__s&&De(r.__H,i)&&(r.__=e,r.i=i,$.__h.push(r))}function ve(e){return ie=5,pe((function(){return{current:e}}),[])}function pe(e,t){var u=ce(J++,7);return De(u.__H,t)?(u.__V=e(),u.i=t,u.__h=e,u.__V):u.__}function ge(e,t){return ie=8,pe((function(){return e}),t)}function me(e){var t=$.context[e.__c],i=ce(J++,9);return i.c=e,t?(null==i.__&&(i.__=!0,t.sub($)),t.props.value):e.__}function ye(){for(var e;e=re.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Te),e.__H.__h.forEach(Se),e.__H.__h=[]}catch(r){e.__H.__h=[],t.__e(r,e.__v)}}t.__b=function(e){"function"!=typeof e.type||e.o||e.type===p?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),$=null,oe&&oe(e)},t.__r=function(e){ae&&ae(e),J=0;var t=($=e.__c).__H;t&&(ee===$?(t.__h=[],$.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ne,e.__N=e.i=void 0}))):(t.__h.forEach(Te),t.__h.forEach(Se),t.__h=[])),ee=$},t.diffed=function(e){se&&se(e);var r=e.__c;r&&r.__H&&(r.__H.__h.length&&(1!==re.push(r)&&te===t.requestAnimationFrame||((te=t.requestAnimationFrame)||Ee)(ye)),r.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ne&&(e.__=e.__V),e.i=void 0,e.__V=ne}))),ee=$=null},t.__c=function(e,r){r.some((function(e){try{e.__h.forEach(Te),e.__h=e.__h.filter((function(e){return!e.__||Se(e)}))}catch(n){r.some((function(e){e.__h&&(e.__h=[])})),r=[],t.__e(n,e.__v)}})),ue&&ue(e,r)},t.unmount=function(e){le&&le(e);var r,u=e.__c;u&&u.__H&&(u.__H.__.forEach((function(e){try{Te(e)}catch(e){r=e}})),u.__H=void 0,r&&t.__e(r,u.__v))};var be="function"==typeof requestAnimationFrame;function Ee(e){var t,r=function(){clearTimeout(u),be&&cancelAnimationFrame(t),setTimeout(e)},u=setTimeout(r,100);be&&(t=requestAnimationFrame(r))}function Te(e){var t=$,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),$=t}function Se(e){var t=$;e.__c=e.__(),$=t}function De(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function Le(e,t){return"function"==typeof t?t(e):t}var Ie={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},Ae=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],xe=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],Me=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],ke="undefined"!=typeof window&&void 0!==window.document?window.document:{},we="fullscreenEnabled"in ke&&Object.keys(Ie)||Ae[0]in ke&&Ae||xe[0]in ke&&xe||Me[0]in ke&&Me||[];const Ne={requestFullscreen:function(element){return element[we[Ie.requestFullscreen]]()},requestFullscreenFunction:function(element){return element[we[Ie.requestFullscreen]]},get exitFullscreen(){return ke[we[Ie.exitFullscreen]].bind(ke)},get fullscreenPseudoClass(){return":"+we[Ie.fullscreen]},addEventListener:function(e,t,r){return ke.addEventListener(we[Ie[e]],t,r)},removeEventListener:function(e,t,r){return ke.removeEventListener(we[Ie[e]],t,r)},get fullscreenEnabled(){return Boolean(ke[we[Ie.fullscreenEnabled]])},set fullscreenEnabled(e){},get fullscreenElement(){return ke[we[Ie.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return ke[("on"+we[Ie.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return ke[("on"+we[Ie.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return ke[("on"+we[Ie.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return ke[("on"+we[Ie.fullscreenerror]).toLowerCase()]=e}},Re=function(){return _("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"#000",zIndex:1}})},Oe=function(e){return _("div",{className:"__ui_subtitle_text"},_("p",{dangerouslySetInnerHTML:{__html:e.subtitle}}
2))};function Ce(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Pe,je,Fe;!function(e){e.UVP_REF_NOT_EXIST="UVP ref not exist",e.UNHANDLED_ACTION="Unhandled action",e.CANNOT_FIND_PROVIDER="Cannot find Provider",e.CANNOT_FIND_EVENT="Cannot find Event. Check your emit event name",e.ERROR_ADS_MANAGER="AdsManager Error fire...",e.VOLUME_RANGE="Invalid volume range or type. Volume can only be a value between 0 and 1",e.EL_NOT_EXIST='"el" does not exist. Put the element where the uvp will be rendered in "el"',e.SRC_NOT_EXIST="src does not exist. Enter the source of the video you want to play in the options.",e.MUTED_TYPE='"muted" can only be of type boolean. If you want to change a muted, pass "true" or "false" to argument.',e.POSTER_TYPE='"poster" can only be of type string. If you want to change a poster, pass string type poster source to argument.',e.ON_ARGUMENT_TYPE='The argument of the "on" method is invalid. To register a custom event, "eventType(string)" and "handler(function)" are required.',e.OFF_ARGUMENT_TYPE='The argument of the "off" method is invalid. The "eventType" is required to clear a custom event.',e.EMIT_ARGUMENT_TYPE='The argument of the "emit" method is invalid. The "eventType" is required to emit a custom event.',e.TITLE_TYPE='"title" can only be of type string. If you want to change a title, pass string type title to argument.',e.DESCRIPTION_TYPE='"description" can only be of type string. If you want to change a description, pass string type description to argument.',e.PROFILE_IMAGE_TYPE='"profileImage" can only be of type string. If you want to change a profileImage, pass string type profileImage to argument.',e.LIVE_STATUS_TYPE='"status" can only be of type "preview", "live", and "replay". If you want to change a live option, pass exact type status to argument.',e.CANNOT_FIND_LIVE_STATUS="Cannot find live status. Set the live status first",e.VIEWER_TYPE='"viewer" can only be of type number. If you want to change a viewer, pass number type viewer to argument.',e.CHAT_TYPE='"chat" can only be of type number. If you want to change a chat, pass number type chat to argument.',e.START_TIME_TYPE='"startTime" can only be of type number. If you want to change a startTime, pass number type startTime to argument.',e.PLAYBACK_RATE_LIST='Problem occurred while calling the "setPlaybackRateList" method. This method needs a playbackRate list as an argument. Check that you have passed the argument of the correct type.',e.RESOLUTION_LIST='Problem occurred while calling the "setResolutionList" method. This method needs a resolution list as an argument. Check that you have passed the argument of the correct type.',e.SUBTITLE_LIST='Problem occurred while calling the "setSubtitleList" method. This method needs a subtitle list as an argument. Check that you have passed the argument of the correct type.',e.PLAYBACK_RATE_NAME_TYPE='playbackRate "name" can only be of type string. If you want to select a playbackRate, pass string type name to argument.',e.RESOLUTION_NAME_TYPE='resolution "name" can only be of type string. If you want to select a resolution, pass string type name to argument.',e.SELECTED_RESOLUTION_SRC_NOT_EXIST="The resolution src file had name does not exist. Check that your resolution name argument that exists in the resolution list.",e.SUBTITLE_NAME_TYPE='subtitle "name" can only be of type string. If you want to select a subtitle, pass string type name to argument.',e.SUBTITLE_VISIBILITY_TYPE='"subtitleVisibility" can only be of type boolean. If you want to change a subtitleVisibility, pass boolean type subtitleVisibility to argument.',e.VIDEO_REF_NOT_FOUND="videoRef was not found. Check the cause of the rendering failure.",e.ERROR_CODE_NOT_FOUND="Error code was not found. If the error code is not a default supported error, check whether error code is included in option you initialized.",e.IFRAME_CREATE_FAILURE="Failed to create Iframe required by Sanitize. Please check the parent Document.",e.WRONG_LAYOUT_PARAM='Wrong layout param. check "initializeLayout".',e.PLUGIN_METHOD_EXIST="Illegal plugin name. Cannot share a name with an existing UVP method!",e.PLUGIN_NOT_EXIST="Illegal plugin name. Cannot find a plugin. You must register plugin for UVP.",e.PLUGIN_MUST_FUNCTION="Illegal plugin for type. Must be a function.",e.PLUGIN_NAME_MUST_NOT_DEFAULT='Illegal plugin name. You must not use an "Plugin" in the plugin name.',e.PLUGIN_MUST_HAVE_PLUGIN_NAME='Illegal plugin. Class plugin must have "static pluginName" field.',e.PLUGIN_INSTANCE_NOT_EXIST="Plugin instance does not exist. It is necessary to check whether the render method is executed normally.",e.CANNOT_CALL_EVENT_BEFORE_RENDER='UVP instance not rendered. Call it in "afterUvpRender" method.'}(Pe||(Pe={})),function(e){e.WARN_EMPTY_ERROR_MESSAGE="There is no error message defined. Nothing but error icon would be shown",e.RESOLUTION_SETTING_WARNING_MESSAGE="UVP WARN: If you set both 
2src and resolution option, src will be ignored. Please use resolution select instead of src.",e.RESOLUTION_LIST_SETTING_WARNING_MESSAGE="UVP WARN: `list` property should exist in resolution option",e.MOBILE_TYPE_NO_LEFT_TOOLBAR="Mobile type cannot have left toolbar slot",e.AVOID_REMOVABLE_MORE_SLOT="Do not set more slot as removable. It would be unable to set settings inside more",e.PLUGIN_ALREADY_EXIST="A plugin name already exists. You must avoid re-registering plugins.",e.WARN_DEBUG_MESSAGE="DEBUG OPTION WARN: Option settings require that you write all or none of the ! prefixes.! Unprefixed events have a higher priority. Please correct the debug options."}(je||(je={})),function(e){e.ABORT_ERROR="AbortError"}(Fe||(Fe={}));var Ue={V:!0,ABBR:!0,B:!0,C:!0,RUBY:!0,RT:!0,BODY:!0,BR:!0,CENTER:!0,DIV:!0,EM:!0,FONT:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,HR:!0,I:!0,U:!0,P:!0,SMALL:!0,SPAN:!0,STRONG:!0},Be={align:!0,color:!0,height:!0,style:!0,title:!0,width:!0},Ge={color:!0,"background-color":!0,"font-size":!0,"font-weight":!0,"text-align":!0,"text-decoration-line":!0,"text-decoration-thickness":!0,"text-decoration-color":!0},ze=["http:","https:","data:","m-files:","file:","ftp:"],He={href:!1,action:!1,src:!1},Ye=function(e,t){var r;He[t.name]&&(r=t.value,!ze.some((function(e){return r.startsWith(e)})))||e.setAttribute(t.name,t.value)},Ve=function(e,t){Ce(t.attributes).forEach((function(r){Be[r.name]&&("style"===r.name?function(e,t){Array.from(t.style).filter((function(e){return Ge[e]})).forEach((function(r){e.style.setProperty(r,t.style.getPropertyValue(r))}))}(e,t):Ye(e,r))}))},We=function(e,t){var r=t.nodeType===Node.TEXT_NODE,n=t.nodeType===Node.ELEMENT_NODE&&Ue[t.tagName];if(r)return t.cloneNode(!0);if(n){var o=e.createElement(t.tagName);return Ve(o,t),Ze(e,t,o),o}return document.createDocumentFragment()},Ze=function(e,t,r){Object.values(t.childNodes).forEach((function(t){var n=We(e,t);r.appendChild(n)}))};const Ke=function(e){var t,input=e.trim();if(!input.length)return"";var iframe=document.createElement("iframe");iframe.setAttribute("sandbox","allow-same-origin allow-scripts"),iframe.style.display="none",document.body.appendChild(iframe);var r=iframe.contentDocument||(null===(t=iframe.contentWindow)||void 0===t?void 0:t.document);if(j(r))throw new Error(Pe.IFRAME_CREATE_FAILURE);r.body.innerHTML=input;var n=We(r,r.body);return document.body.removeChild(iframe),n.innerHTML};function Qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xe="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?he:_e;const qe=function(){var e=function(e,t){var u={__c:t="__cC"+c++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var u,i;return this.getChildContext||(u=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&u.some(b)},this.sub=function(e){u.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){u.splice(u.indexOf(e),1),t&&t.call(e)}}),e.children}};return u.Provider.__=u.Consumer.contextType=u}(null);return{Provider:function(t){var r=t.store,n=t.children;return _(e.Provider,{value:r,children:n})},useStore:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.is,n=me(e);if(B(n))throw new Error("Provider is not found");var o,l=fe((function(e){return e+1}),0),c=X(l,2),d=c[1],f=n.getState(),h=ve(f),_=ve(t),v=ve(r),m=ve(!1),y=ve();j(y.current)&&(y.current=t(f));var E=!1,T=h.current!==f||_.current!==t||v.current!==r||m.current;T&&(o=t(f),E=!r(y.current,o)),Xe((function(){E&&(y.current=o),h.current=f,_.current=t,v.current=r,m.current=!1}));var S=ve(f);return Xe((function(){var e=function(){try{var e=n.getState(),t=_.current(e);!v.current(y.current,t)&&(h.current=e,y.current=o,d())}catch(e){console.error("[UVP] failed to update state",e.message),m.current=!0,d()}},t=n.subscribe(e);return n.getState()!==S.current&&e(),t}),[]),E?o:y.current},useStoreApi:function(){var t=me(e);if(!t)throw new Error("Seems like you have not used zustand provider as an ancestor.");return pe((function(){return{getState:t.getState,setState:t.setState,subscribe:t.subscribe,destroy:t.destroy,debug:t.debug}}),[t])}}};function Je(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function $e(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};
2i%2?Je(Object(source),!0).forEach((function(t){Qe(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):Je(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}function et(e){var t,r=new Set,n=function(e){var n=e(t);if(n!==t){var o=t;t=$e($e({},t),n),r.forEach((function(e){return e(t,o)}))}},o=function(){return t},l=function(e,n,l){return n||l?function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.is,c=n(t),d=function(){var r=n(t);if(!l(c,r)){var o=c;e(c=r,o)}};return r.add(d),function(){return r.delete(d)}}(e,n,l):(r.add(e),function(){return r.delete(e)})},c={setState:n,getState:o,subscribe:l,destroy:function(){return r.clear()},debug:function(){l((function(e,t){var r={},n={},o={},l={};for(var c in e)e[c]!==t[c]&&(r[c]=t[c],n[c]=e[c]);var d=Object.keys(r)[0];if("object"!==P(r[d]))0!==Object.keys(r).length&&(console.info("%cprev","color: red;font-weight:bold;",r),console.info("%cnext","color: blue;font-weight:bold;",n));else{for(var f in r[d])r[d][f]!==n[d][f]&&(o[f]=r[d][f],l[f]=n[d][f]);0!==Object.keys(o).length&&(console.info("%cprev","color: red;font-weight:bold;",d,o),console.info("%cnext","color: blue;font-weight:bold;",d,l))}}))}};return t=e(n,o,c),c}var tt;!function(e){e.muted="lc.uvp.muted",e.volume="lc.uvp.volume",e.playbackRate="lc.uvp.playbackRate",e.resolution="lc.uvp.resolution",e.subtitle="lc.uvp.subtitle",e.subtitleVisibility="lc.uvp.subtitleVisibility"}(tt||(tt={}));var it,nt,ot=function(e){try{var data=localStorage.getItem(e);if(data)return JSON.parse(data)}catch(e){return}},at=function(e,t){try{return localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){return!1}},st=function(e,t,r){var n,time=(n=window.performance.now(),Number((n/1e3).toFixed(4)));console.group(t),console.info("field: %c %s","font-weight: bold;",e),console.info("time: ",time),console.info("eventData:",r),console.groupEnd()},ut=function(e){return e.startsWith("!")?"!":""},lt=["play","playing","pause","ended","canplay","volumeChange","emptied","progress","waiting","seeking","seeked","loadedData","durationChange","canplayThrough","timeUpdate","suspend","stalled","rateChange","loadedMetaData","loadStart","error","loaded","resize","abort","fullscreenchange"],ct=["clickTitle","clickProfileImage","clickNextVideoButton","clickPreviousVideoButton","progressPercentage","selectPlaybackRate","selectResolution","selectSubtitle","clickSubtitleToggleButton","clickCancelButton","clickReplayButton","clickMoreButton","clickResolutionButton","clickPlaybackRateButton","clickVolumeButton","clickSubtitleButton","sliderDragStart","sliderDragMove","sliderDragEnd","keydown","skip","resolutionBeingChanged","videoComponentMounted","headerComponentMounted","overlayComponentMounted","toolbarComponentMounted","videoContainerComponentMounted","volumeSliderComponentMounted","seekbarSliderComponentMounted","endedComponentMounted","beforePluginActivate","afterPluginActivate","beforePluginDeactivate","afterPluginDeactivate","pluginStateChanged","beforeDestroy","destroy"],ft=100,ht="loaded",_t="pause",vt="play",pt="playing",gt="ended",mt="canplay",yt="error",bt="none",Et="changing",Tt="done",St={NONE:0,QUARTER:25,HALF:50,THREEQUARTERS:75},Dt="up",Lt="down",It="none";!function(e){e[e.MEDIA_ERR_ABORTED=1]="MEDIA_ERR_ABORTED",e[e.MEDIA_ERR_NETWORK=2]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=3]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=4]="MEDIA_ERR_SRC_NOT_SUPPORTED"}(nt||(nt={}));var At=(Qe(it={},nt.MEDIA_ERR_ABORTED,{type:"MEDIA_ERR_ABORTED",message:"The fetching of the associated resource was aborted by the user's request."}),Qe(it,nt.MEDIA_ERR_NETWORK,{type:"MEDIA_ERR_NETWORK",message:"Some kind of network error occurred :("}),Qe(it,nt.MEDIA_ERR_DECODE,{type:"MEDIA_ERR_DECODE",message:"An error occurred while trying to decode the media resource."}),Qe(it,nt.MEDIA_ERR_SRC_NOT_SUPPORTED,{type:"MEDIA_ERR_SRC_NOT_SUPPORTED",message:"The associated resource or media provider object is not supported"}),it);function xt(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function Mt(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};
2i%2?xt(Object(source),!0).forEach((function(t){Qe(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):xt(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var kt=function(e,t,r){var n=!1,o=e.map((function(e){return e.selected&&!n?(n=!0,e):Mt(Mt({},e),{},{selected:!1})}));if(!n&&o.length){var l,c=t?ot(r):null;(null!==(l=null==o?void 0:o.find((function(e){return e.name===c})))&&void 0!==l?l:o[0]).selected=!0}return o},wt=function(e,t){return G(e.useLocalStorage)||(e.useLocalStorage=!0),e.list&&(e.list=kt(e.list,e.useLocalStorage,t)),e.list},Nt=function(e){var t,r,n,o,l,label,c;return e.debug&&(e.debug=Rt(e.debug)),e.playbackRate&&(wt(e.playbackRate,tt.playbackRate),e.playbackRate.label||(e.playbackRate.label="Play Speed")),e.resolution&&(e.src&&console.warn(je.RESOLUTION_SETTING_WARNING_MESSAGE),wt(e.resolution,tt.resolution),e.resolution.label||(e.resolution.label="Resolution")),e.subtitle&&(r=e.subtitle,wt(r,tt.subtitle),j(r.subtitleVisibility)&&(r.subtitleVisibility=r.useLocalStorage&&"true"===ot(tt.subtitleVisibility)),e.subtitle.label||(e.subtitle.label="Subtitle")),e.ended&&null!==(t=e.ended)&&void 0!==t&&t.outlink&&(n=e.ended,label="Outlink",H(null==n?void 0:n.outlink)?o=n.outlink:(o=n.outlink.href,label=null!==(l=n.outlink.label)&&void 0!==l?l:label),n.outlink={href:o,label:label}),j(e.duration)||(e.duration=Ot(e.duration)),j(e.currentTime)||(e.currentTime=Ct(e.currentTime)),function(e){G(e.volume)?e.volume={visible:e.volume}:j(e.volume)&&(e.volume={})}(e),e.errors=(c=e.errors,G(c)&&c||j(c)?At:c),e},Rt=function(e){var t=null==e?void 0:e.uvpEvent,r=null==e?void 0:e.domEvent,n={uvpEvent:t,domEvent:r,storeState:null==e?void 0:e.storeState};return t&&(n.uvpEvent=function(option){if(!1===option)return[];if("object"!==P(option))return ct;var e=option.every((function(e){return e.startsWith("!")}));if(e){var t=option.reduce((function(e,t){return t.startsWith("!")?e.concat(t.slice(1)):e}),[]);return ct.filter((function(e){return!t.includes(e)}))}var r=option.filter((function(element){return!element.startsWith("!")}));return ct.filter((function(e){return r.includes(e)}))}(t)),r&&(n.domEvent=function(option){if(!1===option)return[];if("object"!==P(option))return lt;var e=option.every((function(e){return e.startsWith("!")}));if(e){var t=option.reduce((function(e,t){return t.startsWith("!")?e.concat(t.slice(1)):e}),[]);return lt.filter((function(e){return!t.includes(e)}))}var r=option.filter((function(element){return!element.startsWith("!")}));return lt.filter((function(e){return r.includes(e)}))}(r)),n},Ot=function(e){var t={position:"toolbar"};return!1===e?(t.position="none",t):G(e)?{position:e?"toolbar":"none"}:Mt(Mt({},t),e)},Ct=function(e){var t={position:"toolbar"};return!1===e?(t.position="none",t):G(e)?{position:e?"toolbar":"none"}:Mt(Mt({},t),e)};function Pt(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function jt(e,source){if(Array.isArray(e)||Array.isArray(source))return source;var output=function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?Pt(Object(source),!0).forEach((function(t){Qe(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):Pt(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({},e);return F(e)&&F(source)&&Object.keys(source).forEach((function(t){F(source[t])?!(t in e)||U(source[t])?Object.assign(output,Qe({},t,source[t])):output[t]=jt(e[t],source[t]):Object.assign(output,Qe({},t,source[t]))})),output}function Ft(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o={};return Object.keys(e).forEach((function(t){r.includes(t)&&(o[t]=e[t])})),o}function Ut(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o={};return Object.keys(e).forEach((function(t){r.includes(t)||(o[t]=e[t])})),o}var Bt=function e(t,r){var n=!1;return t!==r&&(Object.entries(r).forEach((function(o){var l=X(o,2),c=l[0],d=l[1];n||(F(t[c])?e(t[c],r[c])&&(n=!0):t[c]!==d&&(n=!0))})),n)},Gt=function(e){var t=e.poster,r=function(option){var e,t,r,n=option.resolution;if(!n)return null!==(t=option.src)&&void 0!==t?t:"";if(option.src&&console.warn(je.RESOLUTION_SETTING_WARNING_MESSAGE),!n.list)return console.warn(je.RESOLUTION_LIST_SETTING_WARNING_MESSAGE),null!==(r=option.src)&&void 0!==r?r:"";var o=wt(n,tt.resolution).find((function(e){return e.selected}));return null!==(e=null==o?void 0:o.src)&&void 0!==e?e:""}(e),n=function(e){return G(e.volume)||j(e.volume)?Number(ot(tt.volume))||1:z(e.volume.value)?e.volume.value:e.volume.useLocalStorage&&Number(ot(tt.volume))||1}(e),o=function(e){var t,r=!0;return G(e.volume)||j(e.volume)?"true"===ot(tt.muted)||r:G(null===(t=e.volume)||void 0===t?void 0:t.muted)?e.volume.muted:e.volume.useLocalStorage&&"true"===ot(tt.muted)||r}
2(e),l=!!G(e.autoplay)&&e.autoplay,c=!G(e.playsInline)||e.playsInline,d=!!G(e.loop)&&e.loop,f=H(e.preload)?e.preload:"auto",h=H(e.crossOrigin)?e.crossOrigin:"anonymous";return{videoState:ht,loading:!1,src:r,poster:t,videoRef:null,containerRef:null,headerRef:null,overlayRef:null,toolbarRef:null,duration:0,currentTime:0,fullscreen:!1,uiBreakpoint:null,volume:n,muted:o,volumeChangeState:It,touchDevice:Z(),draggingType:null,autoplay:l,resolutionChangeState:bt,active:!1,playsInline:c,loop:d,preload:f,crossOrigin:h,progressPercentage:St.NONE,errorState:{code:"",message:""}}},zt=function(e,t){return{setVideoRef:function(t){e((function(){return{videoRef:t}}))},setContainerRef:function(t){e((function(){return{containerRef:t}}))},setHeaderRef:function(t){e((function(){return{headerRef:t}}))},setOverlayRef:function(t){e((function(){return{overlayRef:t}}))},setToolbarRef:function(t){e((function(){return{toolbarRef:t}}))},setUIBreakpoint:function(r){var n="small";r>=768&&r<1600?n="medium":r>=1600&&(n="large"),t().uiBreakpoint!==n&&e((function(){return{uiBreakpoint:n}}))},setState:function(t){e((function(){return{videoState:t}}))},setLoading:function(t){e((function(){return{loading:t}}))},setSrc:function(t){if(!H(t))throw new Error(Pe.SRC_NOT_EXIST);e((function(){return{src:t,videoState:ht}}))},setSrcToSelectedResolution:function(){var r,n,o=null===(r=t().options.resolution)||void 0===r||null===(n=r.list)||void 0===n?void 0:n.find((function(e){return e.selected}));o&&H(o.src)&&o.src!==t().src&&e((function(){return{src:o.src,resolutionChangeState:Et}}))},setResolutionChangeState:function(t){e((function(){return{resolutionChangeState:t}}))},setPoster:function(t){if(!H(t))throw new Error(Pe.POSTER_TYPE);e((function(){return{poster:t}}))},setDuration:function(t){e((function(){return{duration:t}}))},setCurrentTime:function(t){e((function(){return{currentTime:t}}))},setFullscreen:function(t){e((function(){return{fullscreen:t}}))},setMuted:function(t){if(!G(t))throw new Error(Pe.MUTED_TYPE);e((function(){return{muted:t}}))},setVolume:function(t){if(t<0||t>1)throw new Error(Pe.VOLUME_RANGE);e((function(){return{volume:t}}))},setVolumeChangeState:function(t){e((function(){return{volumeChangeState:t}}))},setDraggingType:function(t){e((function(){return{draggingType:t}}))},setActive:function(t){e((function(){return{active:t}}))},setProgressPercentage:function(t){e((function(){return{progressPercentage:t}}))},setErrorState:function(r){var n=t().options.errors;if(t().videoState===yt){if(G(n))return r.message||console.warn(je.WARN_EMPTY_ERROR_MESSAGE),void e((function(){return{errorState:r}}));var o=n[r.code];if(!o)throw new Error(Pe.ERROR_CODE_NOT_FOUND);var l=jt(o,r);l.message||(l.message="Error Occurred!"),e((function(){return{errorState:l}}))}else e((function(){return{errorState:r}}))},setLoop:function(t){e((function(){return{loop:t}}))}}};function Ht(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function Yt(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?Ht(Object(source),!0).forEach((function(t){Qe(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):Ht(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var Vt=function(e){return function(e){["src","poster","volume","autoplay","playsInline","loop","crossOrigin","preload"].forEach((function(t){"volume"===t?F(e.volume)&&(delete e.volume.muted,delete e.volume.value):delete e[t]}))}(e),{options:jt({ended:{timeout:null,nextLabel:"Next",nextTitle:"The next video will start shortly",cancelLabel:"Cancel",replayLabel:"Replay",waiting:!1,outlink:null},fullscreen:!0,playPause:!0,seekbar:!0,seekingTimeVisiblity:!0,duration:{position:"toolbar"},currentTime:{position:"toolbar"},volume:{visible:!0,useLocalStorage:!0,showSlider:!0},skipStep:15,skipOnDoubleTap:!0,playOnVideoClick:!0,errors:At,keyboard:{showVolume:!0},debug:{uvpEvent:!1,domEvent:!1,storeState:!1}},Nt(e))}},Wt=function(e,t){return{update:function(t){e((function(e){return{options:jt(e.options,Nt(t))}}))},setEndedWaiting:function(t){e((function(e){return e.options.ended?{options:Yt(Yt({},e.options),{},{ended:Yt(Yt({},e.options.ended),{},{waiting:t})})}:e}))},setEndedFalse:function(){e((function(e){return{options:Yt(Yt({},e.options),{},{ended:!1})}}))},setPlaybackRateList:function(r){try{var n=t().dispatch.layoutDispatch;if(!t().options.playbackRate)return t().dispatch.optionsDispatch.update({playbackRate:{list:r}}),void n.update();e((function(e){var t=e.options.playbackRate,n=kt(r,!!t.useLocalStorage,tt.playbackRate);return{options:Yt(Yt({},e.options),{},{playbackRate:Yt(Yt({},t),{},{list:n})})}})),n.update()}catch(e){throw new Error(Pe.PLAYBACK_RATE_LIST)}},setResolutionList:function(r){try{var n=t().dispatch.layoutDispatch;if(!t().options.resolution)return t().dispatch.optionsDispatch.update({resolution:{list:r}}),void n.update();e((function(e){var t=e.options.resolution,n=kt(r,!!t.useLocalStorage,tt.resolution);return{options:Yt(Yt({},e.options),{},{resolution:Yt(Yt({},t),{},{list:n})})}})),n.update()}catch(e){throw new Error(Pe.RESOLUTION_LIST)}},setSubtitleList:function(r){try{var n=t().dispatch.layoutDispatch;if(!t().options.subtitle)return t().dispatch.optionsDispatch.update({subtitle:{list:r}}),void n.update();e((function(e){var t=e.options.subtitle,n=kt(r,!!t.useLocalStorage,tt.subt
2itle);return{options:Yt(Yt({},e.options),{},{subtitle:Yt(Yt({},t),{},{list:n})})}})),n.update()}catch(e){throw new Error(Pe.SUBTITLE_LIST)}},selectPlaybackRate:function(r){var n,o;if(!H(r))throw new Error(Pe.PLAYBACK_RATE_NAME_TYPE);e((function(e){var t,n;return e.options.playbackRate?{options:Yt(Yt({},e.options),{},{playbackRate:Yt(Yt({},e.options.playbackRate),{},{list:null===(t=e.options.playbackRate)||void 0===t||null===(n=t.list)||void 0===n?void 0:n.map((function(e){return Yt(Yt({},e),{},{selected:e.name===r})}))})})}:e}));var l=null===(n=t().options.playbackRate)||void 0===n||null===(o=n.list)||void 0===o?void 0:o.find((function(e){return e.selected}));t().dispatch.eventBusDispatch.emit("selectPlaybackRate",{selectedItem:l})},selectResolution:function(r){var n,o;if(!H(r))throw new Error(Pe.RESOLUTION_NAME_TYPE);e((function(e){if(!e.options.resolution)return e;var t=e.options.resolution.list.map((function(e){return Yt(Yt({},e),{},{selected:e.name===r})}));return{options:Yt(Yt({},e.options),{},{resolution:Yt(Yt({},e.options.resolution),{},{list:t})})}}));var l=null===(n=t().options.resolution)||void 0===n||null===(o=n.list)||void 0===o?void 0:o.find((function(e){return e.selected}));t().dispatch.eventBusDispatch.emit("selectResolution",{selectedItem:l})},selectSubtitle:function(r){var n;if(!H(r))throw new Error(Pe.SUBTITLE_NAME_TYPE);var o=!1;e((function(e){return e.options.subtitle?{options:Yt(Yt({},e.options),{},{subtitle:Yt(Yt({},e.options.subtitle),{},{list:e.options.subtitle.list.map((function(e){var t=e.name===r;return t&&(o=!!e.src.length),Yt(Yt({},e),{},{selected:t})}))})})}:e}));var l=null===(n=t().options.subtitle)||void 0===n?void 0:n.list.find((function(e){return e.selected}));t().dispatch.eventBusDispatch.emit("selectSubtitle",{selectedItem:l}),t().dispatch.optionsDispatch.setSubtitleVisibility(o)},setSubtitleVisibility:function(t){if(!G(t))throw new Error(Pe.SUBTITLE_VISIBILITY_TYPE);e((function(e){return e.options.subtitle?{options:Yt(Yt({},e.options),{},{subtitle:Yt(Yt({},e.options.subtitle),{},{subtitleVisibility:t})})}:e}))},setErrors:function(t){e((function(e){return G(e.options.errors)?!1===e.options.errors?{options:Yt(Yt({},e.options),{},{errors:!1})}:{options:Yt(Yt({},e.options),{},{errors:At})}:{options:Yt(Yt({},e.options),{},{errors:Yt(Yt({},e.options.errors),t)})}}))}}};function Zt(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function Kt(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?Zt(Object(source),!0).forEach((function(t){Qe(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):Zt(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var Qt=function(e,t){return{on:function(t,r,n){e((function(e){return{eventBus:Kt(Kt({},e.eventBus),{},Qe({},t,[].concat(Ce(e.eventBus[t]||[]),[{handler:r,options:n}])))}}))},off:function(t,r){e((function(e){var n=e.eventBus[t];if(!n)return{eventBus:e.eventBus};if(!r)return{eventBus:Ut(e.eventBus,t)};var o,l,c,d=n.find((function(e){return e.handler===r}));return{eventBus:Kt(Kt({},e.eventBus),{},Qe({},t,(o=n,l=d,c=o.findIndex((function(e){return e===l})),-1!==c&&o.splice(c,1),o)))}}))},offAll:function(){e((function(){return{eventBus:{}}}))},offOnce:function(r){t().eventBus[r]&&e((function(e){var t;return{eventBus:Kt(Kt({},e.eventBus),{},Qe({},r,null===(t=e.eventBus[r])||void 0===t?void 0:t.filter((function(e){var t=e.options;return!(null!=t&&t.once)}))))}}))},emit:function(e,r){var n,o,l,c=t(),d=c.eventBus,f=c.videoRef;d[e]&&(null===(l=d[e])||void 0===l||l.forEach((function(t){(0,t.handler)(Kt({videoRef:f,type:e},r))})),t().dispatch.eventBusDispatch.offOnce(e));var h=null===(n=t().options.debug)||void 0===n?void 0:n.domEvent,_=null===(o=t().options.debug)||void 0===o?void 0:o.uvpEvent;"object"===P(h)&&h.includes(e)&&st("DOM",e,r),"object"===P(_)&&_.includes(e)&&st("Uvp",e,r)}}},Xt=function(e,t){return{set:function(t){e((function(e){return{customStore:jt(e.customStore,t)}}))},get:function(e){return t().customStore[e]}}};function qt(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function Jt(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};
2i%2?qt(Object(source),!0).forEach((function(t){Qe(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):qt(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var $t=function(e,t){return{update:function(t){e((function(e){var r=t?jt(e.layout,t):e.layout;return{layout:ei(e.options,r)}}))}}},ei=function(e,t){ni(t);var r=Jt({},t);oi(r.type,r.slots.toolbar);var n=ii(r),o=ti(e,r,n.isMoreExist),l=o.moreMustNotExist,c=o.isOtherSlotExist;if(l&&n.isMoreExist){var d=ri({mergedLayout:r,moreArrayData:n});if(!c)return d}return e.subtitle&&(r.slots=ai(r.slots)),e.resolution&&(r.slots=ci(r.slots)),e.playbackRate&&(r.slots=di(r.slots)),r},ti=function(e,t,r){var n,o,l,c,d,f,h,_,v,m,y,E=e.resolution,T=e.subtitle,S=e.playbackRate,D=!r&&(Number(null===(n=t.slots)||void 0===n||null===(o=n.header)||void 0===o?void 0:o.length)>0||Number(null===(l=t.slots)||void 0===l||null===(c=l.toolbar)||void 0===c||null===(d=c.left)||void 0===d?void 0:d.length)>0||Number(null===(f=t.slots)||void 0===f||null===(h=f.toolbar)||void 0===h||null===(_=h.right)||void 0===_?void 0:_.length)>0);return{moreMustNotExist:!(null!=T&&null!==(v=T.list)&&void 0!==v&&v.length||null!=E&&null!==(m=E.list)&&void 0!==m&&m.length||null!=S&&null!==(y=S.list)&&void 0!==y&&y.length),isOtherSlotExist:D}},ii=function(e){var t=e.slots,header=t.header,r=t.toolbar,n=function(slot){return"more"===slot||"$more"===slot},o=header.findIndex(n),l=r.left.findIndex(n),c=r.right.findIndex(n);return{isMoreExist:o>-1||l>-1||c>-1,moreInHeaderIndex:o,moreInToolbarLeftIndex:l,moreInToolbarRightIndex:c}},ri=function(e){var t=e.mergedLayout,r=e.moreArrayData,n=t.slots,header=n.header,o=n.toolbar,l=r.moreInHeaderIndex,c=r.moreInToolbarLeftIndex,d=r.moreInToolbarRightIndex;return[[header,l],[o.left,c],[o.right,d]].forEach((function(e){var t=X(e,2),r=t[0],n=t[1];r.splice(n,1)})),t},ni=function(e){if(!(e.type&&e.slots&&e.slots.toolbar&&e.slots.toolbar.right))throw new Error("".concat(Pe.WRONG_LAYOUT_PARAM,", ").concat(JSON.stringify(e)))},oi=function(e,t){"mobile"===e&&0!==t.left.length&&(console.warn(je.MOBILE_TYPE_NO_LEFT_TOOLBAR),t.left=[])},ai=function(e){var t=Jt({},e);return si(e)||t.toolbar.right.push("more"),ui(e),t},si=function(e){return fi(e,["more"])},ui=function(e){fi(e,["$more"])&&console.warn(je.AVOID_REMOVABLE_MORE_SLOT)},ci=function(e){var t=Jt({},e);return fi(e,["resolution","$resolution","more"])||t.toolbar.right.push("more"),t},di=function(e){var t=Jt({},e);return fi(e,["playbackRate","$playbackRate","more"])||t.toolbar.right.push("more"),t},fi=function e(t,r){for(var option in t){if(!Array.isArray(t[option]))return e(t[option],r);if(t[option].some((function(slot){return!!H(slot)&&r.includes(slot)})))return!0}return!1};function hi(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function _i(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?hi(Object(source),!0).forEach((function(t){Qe(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):hi(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var vi=function(e,t,r){return et((function(n,o){return _i(_i(_i(_i(_i(_i(_i(_i({instanceId:String(Date.now())},Gt(e)),Vt(e)),{eventBus:{}}),function(e){return{plugins:Ce(e||[])}}(t)),function(e,t){var r=jt({type:"mobile",slots:{header:[],toolbar:{left:[],right:[]}}},null!=t?t:{});return{layout:ei(e,r)}}(e,r)),{domStore:{}}),{customStore:{}}),{},{dispatch:{eventBusDispatch:Qt(n,o),videoDispatch:zt(n,o),optionsDispatch:Wt(n,o),layoutDispatch:$t(n),domDispatch:(l=n,c=o,{set:function(e){l((function(t){return{domStore:jt(t.domStore,e)}}))},get:function(e){return c().domStore[e]}}),customStoreDispatch:Xt(n,o)}});var l,c}))},pi=qe(),gi=pi.Provider,mi=pi.useStore,yi=(pi.useStoreApi,function(){var e=mi((function(e){return Ft(e.options,"playbackRate","resolution","subtitle")}
2)),t=e.playbackRate,r=e.resolution,n=e.subtitle;return{selectedPlaybackRate:pe((function(){var e;return null==t||null===(e=t.list)||void 0===e?void 0:e.find((function(e){return e.selected}))}),[t]),selectedResolution:pe((function(){var e;return null==r||null===(e=r.list)||void 0===e?void 0:e.find((function(e){return e.selected}))}),[r]),selectedSubtitle:pe((function(){var e;return null==n||null===(e=n.list)||void 0===e?void 0:e.find((function(e){return e.selected}))}),[n]),hasSubtitle:pe((function(){var e;return!(null==n||null===(e=n.list)||void 0===e||!e.length)}),[n])}});const bi=function(e){var t,r,n=e.setSubtitle,o=ve(null),l=yi().selectedSubtitle,c=function(e){var t=e.target;if(t){var r=t.track.activeCues;null!=r&&r.length?Ce(r).forEach((function(e){var track=e.track,text=e.text;if(track){var t=Ke(function(text){return text.replaceAll(/\n/g,"<br />")}(text));track.mode="hidden",n(t)}})):n("")}};return _e((function(){o.current&&"showing"===o.current.track.mode&&(o.current.track.mode="hidden")}),[null===(t=o.current)||void 0===t?void 0:t.track.mode]),null!=(r=l)&&r.src.length?_("track",{id:"caption",label:r.name,kind:"subtitles",srcLang:r.srclang,src:r.src,default:!0,ref:o,oncuechange:c}):(n(""),null)};var Ei=function(e){if(e){var t=e.play();t&&t.catch((function(e){if(e.name!==Fe.ABORT_ERROR)throw e}))}},Ti=function(e,t){if(e){var r=parseFloat(t.toFixed(6));e.currentTime=r}},Si=function(){var e=mi((function(e){return e.videoRef})),t=mi((function(e){return e.containerRef})),r=function(){var e=W();return void 0!==(null==e?void 0:e.document)?null==e?void 0:e.document:{}}(),n=function(){return Ne.fullscreenElement===t||r.fullscreenElement===t||(null==e?void 0:e.displayingFullscreen)||(null==e?void 0:e.webkitDisplayingFullscreen)};return{isFullscreen:function(){return!!n()},fullscreenEnabled:function(){var e=r.createElement("video");return!!(Ne.fullscreenEnabled||e&&e.enterFullscreen&&e.exitFullscreen||e.webkitEnterFullscreen&&e.webkitExitFullscreen||e.supportsFullscreen||e.webkitSupportsFullscreen)},exitFullscreen:function(){if(Ne.fullscreenEnabled)Ne.exitFullscreen();else{var t=e.exitFullscreen||e.webkitExitFullscreen;null==t||t.call(e)}},getFullscreenElement:n,requestFullscreen:function(t){if(t)if(Ne.fullscreenEnabled)Ne.requestFullscreen(t);else{var r=e.enterFullscreen||e.webkitEnterFullscreen;null==r||r.call(e)}}}};const Di=Si;var Li=function(){var e=mi((function(e){return Ft(e,"videoState","videoRef")})),t=e.videoState,r=e.videoRef,n=mi((function(e){return e.dispatch.eventBusDispatch})),o=mi((function(e){return e.eventBus})),l=pe((function(){return!!o.clickPreviousVideoButton}),[o]);return{hasNextButtonCustomEvent:pe((function(){return!!o.clickNextVideoButton}),[o]),hasPrevButtonCustomEvent:l,handlePlayPauseToggle:ge((function(){var e;t===pt?(e=r)&&e.pause():t!==_t&&t!==ht||Ei(r)}),[t,r]),handlePreviousButtonClick:ge((function(){n.emit("clickPreviousVideoButton",{videoRef:r})}),[r]),handleNextButtonClick:ge((function(){n.emit("clickNextVideoButton",{videoRef:r})}),[r])}},Ii=3e3,Ai=function(){var e=mi((function(e){return Ft(e,"touchDevice","active","dispatch")})),t=e.touchDevice,r=e.active,n=e.dispatch.videoDispatch,o=ve(null),l=function(){n.setActive(!1),U(o.current)||(clearTimeout(o.current),o.current=null)};return{handleFocusIn:function(){U(o.current)||clearTimeout(o.current),r||n.setActive(!0),o.current=setTimeout((function(){l()}),Ii)},handleMouseMove:function(){t||(U(o.current)||clearTimeout(o.current),r||n.setActive(!0),o.current=setTimeout(l,Ii))},handleMouseEnter:function(){n.setActive(!0),o.current=setTimeout(l,Ii)},handleMouseLeave:l,handleTouchToggle:function(){t&&(U(o.current)||clearTimeout(o.current),n.setActive(!r),r||(o.current=setTimeout(l,Ii)))}}};const xi=function(e,t){var r,n=(r=ve(!0)).current?(r.current=!1,!0):r.current;he((function(){if(!n)return e()}),t)},Mi=function(){var e,t,r=mi((function(e){return Ft(e,"src","poster","options","videoState","currentTime","fullscreen","containerRef","volume","muted","duration","autoplay","resolutionChangeState","touchDevice","loop","playsInline","preload","crossOrigin","progressPercentage")})),n=r.src,o=r.poster,l=r.options,c=r.videoState,d=r.currentTime,f=r.volume,h=r.muted,v=r.duration,m=r.autoplay,y=r.resolutionChangeState,E=r.touchDevice,T=r.containerRef,S=r.loop,D=r.playsInl
2ine,L=r.preload,I=r.crossOrigin,A=r.progressPercentage,x=ve(null),M=yi(),k=M.selectedPlaybackRate,w=M.selectedResolution,N=M.selectedSubtitle,R=M.hasSubtitle,O=Li().handlePlayPauseToggle,C=Ai().handleTouchToggle,P=Di().isFullscreen,F=mi((function(e){return e.dispatch})),B=F.videoDispatch,G=F.eventBusDispatch,z=F.optionsDispatch,H=F.domDispatch,Y=function(){var e=P();B.setFullscreen(e),G.emit("fullscreenchange",{fullscreen:e})};he((function(){return x.current&&(B.setVideoRef(x.current),G.emit("videoComponentMounted",{ref:x.current}),H.set({video:x.current})),function(){B.setVideoRef(null)}}),[]),he((function(){return x.current&&T&&Ne.addEventListener("fullscreenchange",Y),function(){Ne.removeEventListener("fullscreenchange",Y)}}),[T,x]),xi((function(){var e;(e=x.current)&&e.load()}),[n]),he((function(){var e,t,r;k&&(t=x.current,r=k.rate,t&&(t.playbackRate=r),null!==(e=l.playbackRate)&&void 0!==e&&e.useLocalStorage&&at(tt.playbackRate,k.name))}),[n,k]),xi((function(){null!=w&&w.src&&w.src!==n&&(B.setLoading(!0),B.setSrcToSelectedResolution())}),[w]),he((function(){var e;w&&null!==(e=l.resolution)&&void 0!==e&&e.useLocalStorage&&at(tt.resolution,w.name)}),[w]),he((function(){y===Et&&(G.emit("resolutionBeingChanged"),G.on("canplay",(function(){0!==d?(Ti(x.current,d),B.setCurrentTime(d),B.setResolutionChangeState(Tt)):B.setResolutionChangeState(bt)}),{once:!0}),G.on("seeked",(function(){c===pt&&Ei(x.current)}),{once:!0}))}),[y]),he((function(){var e;null!==(e=l.subtitle)&&void 0!==e&&e.useLocalStorage&&N&&N.src.length&&at(tt.subtitle,N.name)}),[N]),he((function(){var e,t,r=null===(e=l.subtitle)||void 0===e?void 0:e.subtitleVisibility;null!==(t=l.subtitle)&&void 0!==t&&t.useLocalStorage&&r&&at(tt.subtitleVisibility,String(r));var n=null==N?void 0:N.src.length;if(r&&!n){var o,c,d,f=null===(o=l.subtitle)||void 0===o||null===(c=o.list)||void 0===c||null===(d=c.find((function(e){return e.src.length})))||void 0===d?void 0:d.name;f&&z.selectSubtitle(f)}}),[null===(e=l.subtitle)||void 0===e?void 0:e.subtitleVisibility]),he((function(){var e;!function(e,t){e&&(e.volume=t)}(x.current,f),null!==(e=l.volume)&&void 0!==e&&e.useLocalStorage&&at(tt.volume,String(f))}),[f]),he((function(){var e;!function(e,t){e&&(e.muted=t)}(x.current,h),null!==(e=l.volume)&&void 0!==e&&e.useLocalStorage&&at(tt.muted,String(h))}),[h]);var V=X(de(""),2),W=V[0],Z=V[1],K=!(!W.length||null==l||null===(t=l.subtitle)||void 0===t||!t.subtitleVisibility||0===d||y!==bt),Q=R&&0!==d;return _("div",{className:"__video_screen",onClickCapture:function(){var e=l.playOnVideoClick;E?C():e&&O()}},y!==bt&&_(Re,null),_("video",{src:n,poster:o,ref:x,muted:h,autoPlay:m,onLoadStart:function(e){G.emit("loadStart",{event:e})},onLoadedMetadata:function(e){G.emit("loadedMetaData",{event:e})},onVolumeChange:function(e){G.emit("volumeChange",{event:e,volume:f})},onError:function(e){var t,r,n,o,c,d=null===(t=x.current)||void 0===t||null===(r=t.error)||void 0===r?void 0:r.code,f=null===(n=x.current)||void 0===n||null===(o=n.error)||void 0===o?void 0:o.message;if(l.errors&&!U(null===(c=x.current)||void 0===c?void 0:c.error)){if(B.setState(yt),G.emit("error",{event:e,errorCode:d,errorMessage:f}),d){var code=x.current.error.code;B.setErrorState({code:code})}}else G.emit("error",{event:e,errorCode:d,errorMessage:f})},onEmptied:function(e){G.emit("emptied",{event:e})},onProgress:function(e){G.emit("progress",{event:e})},onPlay:function(e){B.setState(vt),G.emit(vt,{event:e}),B.setLoading(!1)},onPlaying:function(e){B.setState(pt),G.emit(pt,{event:e})},onPause:function(e){B.setState(_t),G.emit(_t,{event:e}),B.setLoading(!1)},onLoadedData:function(e){var t;B.setDuration((null===(t=x.current)||void 0===t?void 0:t.duration)||0),G.emit("loadedData",{event:e})},onTimeUpdate:function(e){var t;if(y!==Tt){var r=(null===(t=x.current)||void 0===t?void 0:t.currentTime)||0,n=Math.floor(r/v*4)/4*100,o=Object.values(St).find((function(e){return e===n}));!j(o)&&n>A&&(B.setProgressPercentage(o),G.emit("progressPercentage",{percentage:n})),B.setCurrentTime(r),G.emit("timeUpdate",{event:e,currentTime:r})}},onEnded:function(e){B.setState(gt),G.emit(gt,{event:e})},onCanPlay:function(e){B.setLoading(!1),G.emit(mt,{event:e})},onCanPlayThrough:function(e){B.setLoading(!1),G.emit("canplayThrough",{event:e})},onSeeked:function(e){B.setLoading(!1),G.emit("seeked",{event:e,currentTime:d}),y!==Tt?d!==v&&c===gt&&B.setState(_t):B.setResolutionChangeState(bt)},onSeeking:function(e){B.setLoading(!0),G.emit("seeking",{event:e})},onWaiting:function(e){B.setLoading(!0),G.emit("waiting",{event:e})},onDurationChange:function(e){var t,r=(null===(t=x.current)||void 0===t?void 0:t.duration)||0;B.setDuration(r),G.emit("durationChange",{event:e,duration:r})},onSuspend:function(e){G.emit("suspend",{event:e})},onAbort:function(e){G.emit("abort",{event:e})},onStalled:function(e){G.emit("stalled",{event:e})},onRateChange:function(e){G.emit("rateChange",{event:e})},onresize:function(e){G.emit("resize",{event:e})}
2,tabIndex:-1,playsInline:D,loop:S,crossOrigin:I,preload:L,style:{width:"100%",height:"100%"}},Q&&_(bi,{setSubtitle:Z})),K&&_(Oe,{subtitle:W}))},ki=function(e){var t=e.children,r=mi((function(e){return Ft(e,"uiBreakpoint","dispatch")})).uiBreakpoint;return _(p,null,_(Mi,null),!U(r)&&t)},wi=function(e){var t=e.children,r=ve(null),n=mi((function(e){return e.dispatch})),o=n.eventBusDispatch,l=n.videoDispatch,c=n.domDispatch;return he((function(){r.current&&(l.setHeaderRef(r.current),o.emit("headerComponentMounted",{ref:r.current}),c.set({header:r.current}))}),[]),_("div",{className:"__video_header",ref:r},t)},Ni=function(e){var t=e.children,r=ve(null),n=mi((function(e){return e.dispatch})),o=n.eventBusDispatch,l=n.videoDispatch,c=n.domDispatch;return he((function(){r.current&&(l.setOverlayRef(r.current),o.emit("overlayComponentMounted",{ref:r.current}),c.set({overlay:r.current}))}),[]),_("div",{className:"__video_overlay",ref:r},t)},Ri=function(e){var t=e.children,r=ve(null),n=mi((function(e){return e.dispatch})),o=n.eventBusDispatch,l=n.videoDispatch,c=n.domDispatch;return he((function(){r.current&&(l.setToolbarRef(r.current),o.emit("toolbarComponentMounted",{ref:r.current}),c.set({toolbar:r.current}))}),[]),_("div",{className:"__video_toolbar",ref:r},t)};function Oi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ci(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pi(e,t,r){return t&&Ci(e.prototype,t),r&&Ci(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}const ji={};var Fi=function e(t){var r;return""!==(null===(r=t.__proto__)||void 0===r?void 0:r.name)&&(t.__proto__.name===Wi.name||e(t.__proto__))},Ui=function(e){var t=e.pluginName;if(!t||!H(t))throw new Error("".concat(Pe.PLUGIN_MUST_HAVE_PLUGIN_NAME,' Your PluginName is "').concat(t,'"'));if("Plugin"===t)throw new Error(Pe.PLUGIN_NAME_MUST_NOT_DEFAULT);if("function"!=typeof e)throw new Error("".concat(Pe.PLUGIN_MUST_FUNCTION,', Typeof your plugin is "').concat(P(e),'"'))};function Bi(e,t){return new e(this,t)}function Gi(e,t){return e.call(this,t),e}var zi=function(e){return!!ji[e]};function Hi(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function Yi(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?Hi(Object(source),!0).forEach((function(t){Qe(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):Hi(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var Vi=function(){function e(t,r,n){Oi(this,e),Qe(this,"uvp",void 0),Qe(this,"event",void 0),Qe(this,"state",{}),Qe(this,"originClass",void 0),Qe(this,"eventMap",new Map),Ui(r),this.uvp=t,this.event={on:this.on.bind(this),emit:this.emit.bind(this),off:this.off.bind(this)}
2,this.getState=this.getState.bind(this),this.setState=this.setState.bind(this),this.deactivate=this.deactivate.bind(this),this.originClass=r,this.setState(Yi(Yi(Yi({},this.state),r.defaultState||{}),null==n?void 0:n.state)),this.uvp.on("destroy",this.deactivate)}return Pi(e,[{key:"beforeUvpRender",value:function(){}},{key:"afterUvpRender",value:function(){}},{key:"setState",value:function(e){"function"==typeof e&&(e=e(Yi({},this.state)));var t=this.state,r=Yi({},e),n=Bt(this.state,r);if(this.state=r,n){if(!this.uvp)throw new Error(Pe.CANNOT_CALL_EVENT_BEFORE_RENDER);this.uvp.emit("pluginStateChanged",{detail:{beforeState:t,nextState:r,pluginName:this.originClass.pluginName}})}return r}},{key:"getState",value:function(e){if(j(e))return Yi({},this.state);var t=this.state[e];return j(t)?void 0:t}},{key:"deactivate",value:function(){var e=this;try{return this.state={},this.eventMap.forEach((function(t,r){t.forEach((function(t){e.uvp.off(r,t)}))})),!0}catch(e){return console.error(e),!1}}},{key:"on",value:function(e,t,r){this.uvp.on(e,t,r);var n=[];if(this.eventMap.has(e)){var o=this.eventMap.get(e);n.push.apply(n,Ce(o))}n.push(t),this.eventMap.set(e,n)}},{key:"emit",value:function(e,t){this.uvp.emit(e,t)}},{key:"off",value:function(e,t){this.uvp.off(e,t)}}],[{key:"isPluginExtend",value:function(t){return"function"==typeof t&&(Object.prototype.isPrototypeOf.call(e,t)||Fi(t))}}]),e}();Qe(Vi,"version",void 0),Qe(Vi,"pluginName",void 0);const Wi=Vi;var Zi={SPACE:" ",ESCAPE:"Escape",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ENTER:"Enter",TAB:"Tab"},Ki=[Zi.ARROW_DOWN,Zi.ARROW_UP];function Qi(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;function n(){for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];clearTimeout(t),t=setTimeout((function(){e.apply(void 0,o)}),r)}return n}var Xi="replay";function qi(e,t,r,n,o,l,c){try{var d=e[l](c),f=d.value}catch(e){return void r(e)}d.done?t(f):Promise.resolve(f).then(n,o)}var Ji=r(841),$i=r.n(Ji);function er(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function ir(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?er(Object(source),!0).forEach((function(t){Qe(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):er(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var rr,nr=function(){function e(t){var r=this,n=t.el,o=t.options,l=void 0===o?{}:o,c=t.plugins,d=t.layout;if(Oi(this,e),Qe(this,"el",void 0),Qe(this,"store",void 0),Qe(this,"plugin",{}),!n)throw new Error(Pe.EL_NOT_EXIST);this.el=n,this.store=vi(l,c,d),this.activatePluginBeforeUvpRender=this.activatePluginBeforeUvpRender.bind(this),this.activatePluginAfterUvpRender=this.activatePluginAfterUvpRender.bind(this);var f=this.store.getState().options.debug;f.storeState&&this.store.debug(),(f.domEvent||f.uvpEvent)&&function(e,t){if("object"===P(e)&&"object"===P(t)){var r=ut(e[0]),n=e.every((function(e){return ut(e)===r})),o=t.every((function(e){return ut(e)===r}));n&&o||console.warn(je.WARN_DEBUG_MESSAGE)}}(f.domEvent,f.uvpEvent);try{new ResizeObserver(Qi((function(e){var t;null===(t=r.store)||void 0===t||t.getState().dispatch.videoDispatch.setUIBreakpoint(e[0].contentRect.width)}),150)).observe(n)}catch(e){var h=function(){var e,t=n.getBoundingClientRect().width;null===(e=r.store)||void 0===e||e.getState().dispatch.videoDispatch.setUIBreakpoint(t)};h(),window.addEventListener("resize",Qi(h,150))}}var t,r;return Pi(e,[{key:"activatePlugin",value:function(t,r){var n=this,o="string"==typeof t?t:t.pluginName;if(this.plugin[o])return console.warn('"'.concat(o,'" plugin is already activated.')),!1;var l=ji[o];if(j(l)){if("string"==typeof t)throw new Error('"'.concat(o,'" is ').concat(Pe.PLUGIN_NOT_EXIST));Ui(t),console.warn('"'.concat(o,'" is ').concat(Pe.PLUGIN_NOT_EXIST," But now automatically registered.")),e.registerPlugin(t,!0),l=ji[o]}
2this.emit("beforePluginActivate",{detail:{pluginName:o}});var c,d=Wi.isPluginExtend(l)?((c=Bi.call(n,l,r)).afterUvpRender(),c):Gi.call(this,l,r);return this.plugin[o]=d,this.emit("afterPluginActivate",{detail:{pluginName:o,pluginInstance:d}}),!0}},{key:"activatePluginBeforeUvpRender",value:function(t){var r=t.origin,n=t.options;if(!H(r)&&Wi.isPluginExtend(r)){var o=r.pluginName,l=ji[o];j(l)&&(Ui(r),console.warn('"'.concat(o,'" is ').concat(Pe.PLUGIN_NOT_EXIST," But now automatically registered.")),e.registerPlugin(r,!0),l=ji[o]),this.emit("beforePluginActivate",{detail:{pluginName:o}});var c=Bi.call(this,l,n);c.beforeUvpRender(),this.plugin[o]=c}else this.activatePlugin.call(this,t.origin,t.options)}},{key:"activatePluginAfterUvpRender",value:function(e){var t=e.origin;if(!H(t)&&Wi.isPluginExtend(t)){var r=t.pluginName,n=this.plugin[r];if(!n)throw new Error(Pe.PLUGIN_INSTANCE_NOT_EXIST);n.afterUvpRender(),this.emit("afterPluginActivate",{detail:{pluginName:r,pluginInstance:n}})}}},{key:"deactivatePlugin",value:function(e){return this.emit("beforePluginDeactivate",{detail:{pluginName:e}}),Object.prototype.hasOwnProperty.call(this.plugin[e],"deactivate")&&this.plugin[e].deactivate(),delete this.plugin[e],this.emit("afterPluginDeactivate",{detail:{pluginName:e}}),!0}},{key:"getPlugin",value:function(e){return this.plugin[e]}},{key:"getActivePlugins",value:function(){return Object.values(this.plugin).filter((function(e){return!j(e)}))}},{key:"destroy",value:function(){for(var e in this.store.getState().dispatch.eventBusDispatch.emit("beforeDestroy"),this.store.getState().dispatch.eventBusDispatch.emit("destroy"),this.store.getState().dispatch.eventBusDispatch.offAll(),C("",this.el),this)Object.prototype.hasOwnProperty.call(this,e)&&delete this[e]}},{key:"appendChildAtHeader",value:function(e){var t=this.store.getState().headerRef,r=document.createElement("div");r.className="__ui_custom",r.appendChild(e),t?t.appendChild(r):this.on("headerComponentMounted",(function(e){e.ref.appendChild(r)}),{once:!0})}},{key:"appendChildAtOverlay",value:function(e){var t=this.store.getState().overlayRef;t?t.appendChild(e):this.on("overlayComponentMounted",(function(t){t.ref.appendChild(e)}),{once:!0})}},{key:"appendChildAtToolbar",value:function(e){var t=this.store.getState().toolbarRef,r=document.createElement("div");r.className="__ui_custom",r.appendChild(e),t?t.appendChild(r):this.on("toolbarComponentMounted",(function(e){e.ref.appendChild(r)}),{once:!0})}},{key:"setSrc",value:function(e){if(!H(e))throw new Error(Pe.SRC_NOT_EXIST);this.store.getState().dispatch.videoDispatch.setSrc(e)}},{key:"getSrc",value:function(){return this.store.getState().src}},{key:"setPoster",value:function(e){if(!H(e))throw new Error(Pe.POSTER_TYPE);this.store.getState().dispatch.videoDispatch.setPoster(e)}},{key:"getPoster",value:function(){return this.store.getState().poster}},{key:"on",value:function(e,t,r){if(j(e)||j(t))throw new Error(Pe.ON_ARGUMENT_TYPE);this.store.getState().dispatch.eventBusDispatch.on(e,t,r)}},{key:"emit",value:function(e,t){if(j(e))throw new Error(Pe.EMIT_ARGUMENT_TYPE);this.store.getState().dispatch.eventBusDispatch.emit(e,t)}},{key:"off",value:function(e,t){if(j(e))throw new Error(Pe.OFF_ARGUMENT_TYPE);this.store.getState().dispatch.eventBusDispatch.off(e,t)}},{key:"setTitle",value:function(title){if(!H(title))throw new Error(Pe.TITLE_TYPE);this.store.getState().dispatch.optionsDispatch.update({title:title})}},{key:"getTitle",value:function(){return this.store.getState().options.title}},{key:"setDescription",value:function(e){if(!H(e))throw new Error(Pe.DESCRIPTION_TYPE);this.store.getState().dispatch.optionsDispatch.update({description:e})}},{key:"getDescription",value:function(){return this.store.getState().options.description}},{key:"setProfileImage",value:function(e){if(!H(e))throw new Error(Pe.PROFILE_IMAGE_TYPE);this.store.getState().dispatch.optionsDispatch.update({profileImage:e})}},{key:"getProfileImage",value:function(){return this.store.getState().options.profileImage}},{key:"setViewer",value:function(e){if(!z(e))throw new Error(Pe.VIEWER_TYPE);var t=this.store.getState().options.live;if(j(t))throw new Error(Pe.CANNOT_FIND_LIVE_STATUS);this.store.getState().dispatch.optionsDispatch.update({live:ir(ir({},t),{},{viewer:e})})}},{key:"getViewer",value:function(){var e;return null===(e=this.store.getState().options.live)||void 0===e?void 0:e.viewer}},{key:"setChat",value:function(e){if(!z(e))throw new Error(Pe.CHAT_TYPE);var t=this.store.getState().options.live;if(j(t))throw new Error(Pe.CANNOT_FIND_LIVE_STATUS);this.store.getState().dispatch.optionsDispatch.update({live:ir(ir({},t),{},{chat:e})})}},{key:"getChat",value:function(){var e;return null===(e=this.store.getState().options.live)||void 0===e?void 0:e.chat}},{key:"setLiveStatus",value:function(e){if(!function(e){return["replay","live","preview"].includes(e)}(e))throw new Error(Pe.LIVE_STATUS_TYPE);this.store.getState().dispatch.optionsDispatch.update({live:{status:e}})}},{key:"getLiveStatus",value:function(){var e;return null===(e=this.store.getState().options.live)||void 0===e?void 0:e.status}},{key:"setStartTime",value:function(e){if(!z(e))throw new Error(Pe.START_TIME_TYPE);var t=this.store.getState().options.live;if(j(t))throw new Error(Pe.CANNOT_FIND_LIVE_STATUS);this.store.getState().dispatch.optionsDispatch.update({live:ir(ir({},t),{},{startTime:e})})}},{key:"getStartTime",value:function(){var e;return null===(e=this.store.getState().options.live)||void 0===e?void 0:e.startTime}},{key:"setLiveOptions",value:function(e){if(!e){var t=this.store.getState().options;return delete t.live,this.store.getState().dispatch.optionsDispatch.update(ir({},t))}this.store.getState().dispatch.optionsDispatch.update({live:e})}},{key:"getLiveOptions",value:function(){return this.store.getState().options.live}},{key:"setPlaybackRateList",value:function(e){this.store.getState().dispatch.optionsDispatch.setPlaybackRateList(e)}},{key:"getPlaybackRateList",value:function(){var e;return null===(e=this.store.getState().options.playbackRate)||void 0===e?void 0:e.list}},{key:"selectPlaybackRate",value:function(e){this.store.getState().dispatch.optionsDispatch.selectPlaybackRate(e)}},{key:"setResolutionList",value:function(e){this.store.getState().dispatch.optionsDispatch.setResolutionList(e)}},{key:"getResolutionList",value:function(){var e;return null===(e=this.store.getState().options.resolution)||void 0===e?void 0:e.list}},{key:"selectResolution",value:function(e){this.store.getState().dispatch.optionsDispatch.selectResolution(e)}},{key:"selectSubtitle",value:function(e){this.store.getState().dispatch.optionsDispatch.selectSubtitle(e)}},{key:"setSubtitleList",value:function(e){this.store.getState().dispatch.optionsDispatch.setSubtitleList(e)}},{key:"getSubtitleList",value:function(){var e;return null===(e=this.store.getState().options.subtitle)||void 0===e?void 0:e.list}},{key:"setSubtitleVisibility",value:function(e){this.store.getState().dispatch.optionsDispatch.setSubtitleVisibility(e)}},{key:"getSubtitleVisibility",value:function(){var e;return null===(e=this.store.getState().options.subtitle)||void 0===e?void 0:e.subt
2itleVisibility}},{key:"setSeekingTimeVisiblity",value:function(e){this.store.getState().dispatch.optionsDispatch.update({seekingTimeVisiblity:e})}},{key:"getSeekingTimeVisiblity",value:function(){return this.store.getState().options.seekingTimeVisiblity}},{key:"setEndedFalse",value:function(){return this.store.getState().dispatch.optionsDispatch.setEndedFalse()}},{key:"serErrors",value:function(e){this.store.getState().dispatch.optionsDispatch.setErrors(e)}},{key:"getErrors",value:function(){return this.store.getState().options.errors}},{key:"errorDisplay",value:function(code,option){this.store.getState().dispatch.videoDispatch.setState(yt),this.store.getState().dispatch.videoDispatch.setErrorState(ir({code:code},option))}},{key:"hideErrorDisplay",value:function(){this.store.getState().dispatch.videoDispatch.setState(_t),this.store.getState().dispatch.videoDispatch.setErrorState({code:"",message:""})}},{key:"setMuted",value:function(e){this.store.getState().dispatch.videoDispatch.setMuted(e)}},{key:"getMuted",value:function(){return this.store.getState().muted}},{key:"setVolume",value:function(e){this.store.getState().dispatch.videoDispatch.setVolume(e),this.store.getState().dispatch.videoDispatch.setMuted(!e)}},{key:"getVolume",value:function(){return this.store.getState().volume}},{key:"setLoop",value:function(e){this.store.getState().dispatch.videoDispatch.setLoop(e)}},{key:"getLoop",value:function(){return this.store.getState().loop}},{key:"getComponentRef",value:(t=$i().mark((function e(t){var r,n,o,l,c,d,f=this;return $i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new Promise((function(e,t){var r=f.store.getState().videoRef;if(r)return e(r);f.on("videoComponentMounted",(function(r){var n=r.videoRef;n?e(n):t(new Error(Pe.VIDEO_REF_NOT_FOUND))}))})),n=new Promise((function(e,r){var n=f.store.getState().dispatch.domDispatch.get(t);if(n)return e(n);f.on("".concat(t,"ComponentMounted"),(function(n){var o=n.ref;if(!o)return r(new Error("".concat(t,"Component's Ref does not exist.")));e(o)}))})),e.next=4,Promise.all([r,n]);case 4:return o=e.sent,l=X(o,2),c=l[0],d=l[1],e.abrupt("return",{ref:d,videoRef:c});case 9:case"end":return e.stop()}}),e)})),r=function(){var e=this,r=arguments;return new Promise((function(n,o){var l=t.apply(e,r);function c(e){qi(l,n,o,c,d,"next",e)}function d(e){qi(l,n,o,c,d,"throw",e)}c(void 0)}))},function(e){return r.apply(this,arguments)})},{key:"getVideoRef",value:function(){var e=this;return new Promise((function(t,r){window.setTimeout((function(){var n=e.store.getState().videoRef;n?t(n):e.on("videoComponentMounted",(function(e){var n=e.videoRef;n?t(n):r(new Error(Pe.VIDEO_REF_NOT_FOUND))}))}),0)}))}}],[{key:"createButton",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},button=document.createElement("button");return button.classList.add("__ui_custom_".concat(e,"_button")),Object.getOwnPropertyNames(t).forEach((function(e){var r=t[e];button.setAttribute(e,r)})),button}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.pluginName;if(!t)return Ui(e),zi(r)&&console.warn(je.PLUGIN_ALREADY_EXIST),ji[r]=e,e;ji[r]=e}},{key:"deregisterPlugin",value:function(e){if(j(e))for(var t in ji)Object.prototype.hasOwnProperty.call(ji,t)&&delete ji[t];else zi(e)&&delete ji[e]}}]),e}();function or(e,p){return or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},or(e,p)}function ar(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function sr(e){return sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sr(e)}!function(e){e.init="INIT",e.next="NEXT",e.prev="PREV"}(rr||(rr={}));const ur=function(e){var t=e.forwardedRef,r=e.onKeyDown,n=e.onClick,o=e.onFocus;return _("button",{type:"button",className:e.className,ref:t,onKeyDown:r,onClick:n,onFocus:o,"aria-label":e.ariaLabel,"aria-pressed":e.ariaPressed},e.children)},lr=function(){var e=Si(),t=e.exitFullscreen,r=e.requestFullscreen,n=e.fullscreenEnabled,o=mi((function(e){return Ft(e,"fullscreen","containerRef")})),l=o.fullscreen,c=o.containerRef,d=ve(null),f=Gr().handleButtonKeyDown;return _("div",{className:"__ui_fullscreen"},_(ur,{className:"__ui_fullscreen_button",onKeyDown:f,onClick:function(){n()&&(l?t():r(c))},forwardedRef:d,ariaLabel:"Fullscreen"}))},cr=function(e){var t=e.isHeaderSlot,r=mi((function(e){return Ft(e,"customStore","dispatch","videoRef")})),n=r.customStore.more,o=r.dispatch,l=o.eventBusDispatch,c=o.customStoreDispatch.set,d=r.videoRef,f=Gr().handleButtonKeyDown,h=Br().setMoreOpened,v=ve(null),m=X(de(!0),2),y=m[0],E=m[1];return he((function(){var e;!y&&!n.opened&&U(n.selected)&&U(n.beforeSelected)&&(null===(e=v.current)||void 0===e||e.focus())}),[n.opened,n.selected,n.beforeSelected]),_("div",{className:"__ui_more"},_(ur,{className:"__ui_more_button",forwardedRef:v,onKeyDown:f,onClick:function(e){c({headerPanelOpened:!!t&&!n.opened}),h(!n.opened),l.emit("clickMoreButton",{event:e,videoRef:d})},onFocus:function(){return E(!1)},ariaLabel:"More"}))},dr=function(e){var t=e.isHeaderSlot,r=mi((function(e){return Ft(e,"dispatch","customStore","videoRef")})),n=r.dispatch,o=n.eventBusDispatch,l=n.customStoreDispatch.set,c=r.customStore.more,d=r.videoRef,f=Br(),h=f.setMoreSelected,v=f.setMoreOpened,m=Gr().handleButtonKeyDown,y=ve(null);return he((function(){var e;"playbackRate"===c.beforeSelected&&(null===(e=y.current)||void 0===e||e.focus())}),[c.beforeSelected]),_("div",{className:"__ui_playback_rate"},_(ur,{className:"__ui_playback_rate_button",onKeyDown:m,onClick:function(e){l({headerPanelOpened:t}),c.opened&&v(!1),"playbackRate"!==c.selected?(h("playbackRate"),o.emit("clickPlaybackRateButton",{event:e,videoRef:d})):h(null)},forwardedRef:y,ariaLabel:"Play Speed"}))},fr=function(e){var t=e.isHeaderSlot,r=mi((function(e){return Ft(e,"dispatch","customStore","videoRef")})),n=r.dispatch,o=n.eventBusDispatch,l=n.customStoreDispatch.set,c=r.customStore.more,d=r.videoRef,f=Br(),h=f.setMoreSelected,v=f.setMoreOpened,m=yi().selectedResolution,y=Gr().handleButtonKeyDown,E=ve(null);return he((function(){var e;"resolution"===c.beforeSelected&&(null===(e=E.current)||void 0===e||e.focus())}),[c.beforeSelected]),_("div",{className:"__ui_resolution"},_(ur,{className:"__ui_resolution_button",onKeyDown:y,onClick:function(e){l({headerPanelOpened:t}),c.opened&&v(!1),"resolution"!==c.selected?(h("resolution"),o.emit("clickResolutionButton",{event:e,videoRef:d})):h(null)},forwardedRef:E},null==m?void 0:m.name))},_r=function(){var e=mi((function(e){return Ft(e,"videoRef","currentTime","options")})),t=e.videoRef,r=e.currentTime,n=e.options.skipStep;return _("div",{className:"__ui_skip"},_("button",{type:"button",className:"__ui_skip_prev_button","aria-label":"Skip prev",onClick:function(e){0!==r&&Ti(t,r<n?0:r-n)}},n))},vr=function(){var e=mi((function(e){return Ft(e,"videoRef","currentTime","duration","options")})),t=e.videoRef,r=e.currentTime,n=e.duration,o=e.options.skipStep;return _("div",{className:"__ui_skip"},_("button",{type:"button",className:"__ui_skip_next_button","aria-label":"Skip next",onClick:function(e){r!==n&&Ti(t,r+o>
2n?n:r+o)}},o))},pr=function(){return _(p,null,_(_r,null),_(vr,null))},gr=function(){var e=mi((function(e){return Ft(e,"dispatch","options","videoRef")})),t=e.dispatch,r=e.options,n=e.videoRef,o=t.optionsDispatch,l=t.eventBusDispatch,c=r.subtitle.subtitleVisibility,d=ve(null),f=Gr().handleButtonKeyDown;return _("div",{className:"__ui_subtitle"},_(ur,{className:"__ui_subtitle_button",onKeyDown:f,onClick:function(e){o.setSubtitleVisibility(!c),l.emit("clickSubtitleToggleButton",{event:e,videoRef:n,subtitleVisibility:!c})},forwardedRef:d,ariaLabel:"Subtitle",ariaPressed:c}))};var mr,yr=function(){for(var e=[],t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach((function(t){Array.isArray(t)?t[0]&&e.push(t[1]):e.push(t)})),e.join(" ")};!function(e){e.__video="__video",e.__video_mobile="__video_mobile",e.__video_pc="__video_pc",e.__video_active="__video_active",e.__video_playing="__video_playing",e.__video_ended="__video_ended",e.__video_muted="__video_muted",e.__video_fullscreen="__video_fullscreen",e.__video_loading="__video_loading",e.__ui_ended_waiting="__ui_ended_waiting",e.__video_not_played="__video_not_played",e.__ui_ended="__ui_ended",e.__ui_error_show="__ui_error_show",e.__ui_more_opened="__ui_more_opened",e.__ui_playback_rate_opened="__ui_playback_rate_opened",e.__ui_resolution_opened="__ui_resolution_opened",e.__ui_subtitle_opened="__ui_subtitle_opened",e.__ui_playback_rate_selected="__ui_setting_selected",e.__ui_resolution_selected="__ui_setting_selected",e.__ui_subtitle_selected="__ui_setting_selected",e.__video_medium="__video_medium",e.__video_large="__video_large",e.__video_small="__video_small",e.__video_touch="__video_touch",e.__ui_volume="__ui_volume",e.__ui_volume_dragging="__ui_volume_dragging",e.__ui_volume_slider="__ui_volume_slider",e.__ui_no_slider="__ui_no_slider",e.__ui_seekbar="__ui_seekbar",e.__ui_seekbar_dragging="__ui_seekbar_dragging",e.__ui_seekbar_slider="__ui_seekbar_slider",e.__video_skip_prev="__video_skip_prev",e.__video_skip_next="__video_skip_next",e.__video_keyboard_focus="__video_keyboard_focus",e.__video_volume_up="__video_volume_up",e.__video_volume_down="__video_volume_down",e.__ui_header_opened="__ui_header_opened",e.__ui_title_info="__ui_live_info",e.__ui_title_info_play="play",e.__ui_title_info_viewer="viewer",e.__video_header="__video_header",e.__video_overlay="__video_overlay",e.__video_toolbar="__video_toolbar"}(mr||(mr={}));var Er=function(e){return Math.max(0,Math.min(1,e))},Tr=function(e){var t=e;return t.touches?t.touches[0]:e},Sr=function(e,t){var r=ve(null),n=mi((function(e){return Ft(e,"layout","dispatch")})),o=n.layout.type,l=n.dispatch,c=l.videoDispatch,d=l.eventBusDispatch,f=e.type,h=e.setProgress,_=e.dragStartHandler,v=e.dragMoveHandler,m=e.dragEndHandler,y=e.disabled,E=void 0!==y&&y,T=e.isHeaderSlot,S="volume"===f?"volume":"seekbar",D="volume"===f&&("mobile"===o||void 0!==T&&T)?"vertical":"horizontal",L="horizontal"===D?"pageX":"pageY",I="horizontal"===D?"scrollX":"scrollY",A="horizontal"===D?1:-1,x=function(e){if(r.current&&t.current){var n=(Tr(e)[L]-r.current.pageXY)*A,o=Number(Er(n/t.current.offsetWidth+r.current.rate).toFixed(3)),l=o*ft;r.current.lastRate=o,h(l),null==v||v({event:e,rate:o}),d.emit("sliderDragMove",{event:e,detail:{progressDirection:D,sliderName:S,progressRate:l}})}},M=function e(t){if(r.current){var n=r.current.lastRate,o=n*ft;document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",e),r.current=null,c.setDraggingType(null),null==m||m({event:t,rate:n}),d.emit("sliderDragEnd",{event:t,detail:{progressDirection:D,sliderName:S,progressRate:o}})}};return{className:"volume"===f?"__ui_volume":"__ui_seekbar",handleDragStart:function(e){if(t.current&&!E){e.preventDefault();var n=Tr(e),o=Number(function(e){var r="horizontal"===D?"left":"bottom";return Er((e[L]-(t.current.getBoundingClientRect()[r]+window[I]))*A/t.current.offsetWidth)}(n).toFixed(3)),l=o*ft;r.current||h(l),r.current={pageXY:n[L],lastRate:o,rate:o},c.setDraggingType(f),document.addEventListener("mousemove",x),document.addEventListener("mouseup",M),null==_||_({event:e,rate:o}),d.emit("sliderDragStart",{event:e,detail:{progressDirection:D,sliderName:S,progressRate:l}})}},handleDragMove:x,handleDragEnd:M}};const Dr=function(){var e=mi((function(e){return Ft(e,"videoRef","duration")})),t=e.videoRef,r=function(e,t){if(!t)return[];for(var r=[],i=0;i<t.length;i+=1){var n=t.start(i),o=t.end(i)-n,l=(n/e*ft).toFixed(3),c=(o/e*ft).toFixed(3);r.push({left:l,width:c})}return r}(e.duration,null==t?void 0:t.buffered);return _("div",{className:"__ui_seekbar_buffered_wrap"},r.map((function(e){var t=e.width,r=e.left;return _("div",{className:"__ui_seekbar_buffered",style:"left:".concat(r,"%; width:").concat(t,"%;")})})))},Lr=function(e){var progress=e.progress,t=e.type,r=ve(null),n=ve(null),o=ve(null),l=Gr(),c=l.handleDivKeyD
2own,d=l.handleVolumeSlider,f=mi((function(e){return Ft(e,"dispatch")})).dispatch,h=f.domDispatch,v=f.eventBusDispatch,m=Sr(e,n),y=m.className,E=m.handleDragStart,T=m.handleDragMove,S=m.handleDragEnd;return he((function(){if(r.current){var e="volume"===t?"volume":"seekbar";v.emit("".concat(e,"SliderComponentMounted"),{ref:r.current}),h.set(Qe({},"".concat(e,"Slider"),r.current))}}),[]),_("div",{className:"".concat("volume"===t?mr.__ui_volume_slider:mr.__ui_seekbar_slider),ref:r,onTouchMove:T,onTouchEnd:S,onKeyDown:"volume"===e.type?d:c,tabIndex:0},_("div",{className:"".concat(y,"_track"),ref:n,onMouseDown:E,onTouchStart:E},"seekbar"===t&&_(Dr,null),_("div",{className:"".concat(y,"_thumb_wrap")},_("div",{style:{left:"".concat(progress,"%")},className:"".concat(y,"_thumb")})),_("div",{className:"".concat(y,"_progress"),ref:o,style:{width:"".concat(progress,"%")}})))},Ir=function(e){var t=e.isHeaderSlot,r=mi((function(e){return Ft(e,"muted","volume","draggingType","videoRef","options")})),n=r.muted,o=r.volume,l=r.draggingType,c=r.videoRef,d=r.options.volume.showSlider,f=mi((function(e){return e.dispatch})),h=f.videoDispatch,v=f.eventBusDispatch,m=X(de(n?0:o*ft),2),progress=m[0],y=m[1],E=Gr().handleButtonKeyDown,T=function(e){var t=e.rate;h.setMuted(!t),h.setVolume(t)};return he((function(){var e=n?0:o*ft;e!==progress&&y(e)}),[o]),_("div",{className:yr(mr.__ui_volume,["volume"===l,mr.__ui_volume_dragging],[!d,mr.__ui_no_slider])},_("button",{type:"button",className:"__ui_volume_button",onClick:function(e){var t=!n;h.setMuted(t),v.emit("clickVolumeButton",{event:e,videoRef:c,muted:t});var r=t?0:o;t||0!==o||(r=1,h.setVolume(r)),y(r*ft)},onKeyDown:E}),d&&_(Lr,{type:"volume",progress:progress,setProgress:y,dragMoveHandler:T,dragStartHandler:T,isHeaderSlot:t}))},Ar=function(){var e=mi((function(e){return Ft(e,"duration")})).duration,t=Number.isNaN(e)||!Number.isFinite(e),r=t?"":V(e||0,e||0),n=t?"":V(0,e||0);return _("div",{className:"__ui_duration"},_("time",null,r),_("span",{style:{visibility:"hidden"}},n))},xr=function(){var e=mi((function(e){return Ft(e,"currentTime")})).currentTime,t=Number.isNaN(e)||!Number.isFinite(e),r=t?"":V(e||0,e||0),n=t?"":V(0,e||0);return _("div",{className:"__ui_current_time"},_("time",null,r),_("span",{style:{visibility:"hidden"}},n))},Mr=function(){return _(p,null,_(xr,null),_(Ar,null))};var kr=function(e){var t=e.replayLabel,r=e.isEndedOverlay,n=mi((function(e){return e})).videoRef,o=mi((function(e){return e.dispatch})),l=o.videoDispatch,c=o.eventBusDispatch;return _("button",{type:"button",className:"__ui_replay_button","aria-label":"Replay",onClick:function(e){l.setCurrentTime(0),c.emit("clickReplayButton",{event:e,videoRef:n}),Ei(n)}},r&&_("span",{className:"__ui_button_label"},t))};const wr=function(e){var t=e.replayLabel,r=e.needsEndedDivision,n=void 0!==r&&r,o=e.isEndedOverlay,l=void 0!==o&&o;return n?_("div",{className:"__ui_ended"},_(kr,{replayLabel:t,isEndedOverlay:l})):_(kr,{replayLabel:t,isEndedOverlay:l})},Nr=function(e){var t=e.onClick,r=ve(null),n=function(){var title=document.title,e=document.querySelector("link[rel=canonical]"),t=U(e)?document.location.href:e.href;navigator.share({title:title,url:t})};return _("div",{className:"__ui_share"},_(ur,{className:"__ui_share_button",forwardedRef:r,onClick:t||n,onKeyDown:t||n,ariaLabel:"Share"}))};var Rr=function(e){var slot=e.slot,t=e.uiBreakpoint,r=e.isHeaderSlot,
2n=void 0!==r&&r;return H(slot)?"small"===t&&Pr(slot)?void 0:Cr(slot,n):Or(slot)},Or=function(slot){return"BUTTON"===slot.tagName&&slot.classList.add("__ui_custom_button"),_("div",{className:"__ui_custom",ref:function(e){return null==e?void 0:e.appendChild(slot)}})},Cr=function(slot,e){var t,r,n,o=Si().fullscreenEnabled,l=mi((function(e){return e})).options,c=l.resolution,d=l.playbackRate,f=l.subtitle,h=l.fullscreen,v=l.volume,m=l.currentTime,y=l.share;switch(slot){case"resolution":case"$resolution":if(null==c||null===(t=c.list)||void 0===t||!t.length)return;return _(fr,{isHeaderSlot:e});case"playbackRate":case"$playbackRate":if(null==d||null===(r=d.list)||void 0===r||!r.length)return;return _(dr,{isHeaderSlot:e});case"subtitle":case"$subtitle":if(null==f||null===(n=f.list)||void 0===n||!n.length)return;return _(gr,null);case"fullscreen":case"$fullscreen":if(!h)return;if(!o())return;return _(lr,null);case"volume":case"$volume":if(!v.visible)return;return _(Ir,{isHeaderSlot:e});case"more":case"$more":return _(cr,{isHeaderSlot:e});case"skip":case"$skip":return _(pr,null);case"replay":case"$replay":return _(wr,{needsEndedDivision:!0});case"currentTimeDuration":case"$currentTimeDuration":if("none"===m.position)return;return _(Mr,null);case"share":case"$share":if(!navigator.share&&!y)return;return _(Nr,{onClick:y})}},Pr=function(slot){return slot.startsWith("$")},jr=function(slot,e){var t=e.slots,header=t.header,r=t.toolbar,n=r.left,o=r.right,l=[].concat(Ce(header),Ce(n),Ce(o));return!("small"===mi((function(e){return e.uiBreakpoint}))&&l.includes("$".concat(slot))||!Fr(slot,l))},Fr=function(slot,e){return e.includes(slot)||e.includes("$".concat(slot))},Ur=function(){var e=mi((function(e){return Ft(e,"options","customStore","layout")})),t=e.options,r=t.playbackRate,n=t.resolution,o=t.subtitle,l=e.layout,c=jr("playbackRate",l),d=jr("resolution",l),f=pe((function(){var e;return!(c||null==r||null===(e=r.list)||void 0===e||!e.length)}),[r,c]),h=pe((function(){var e;return!(d||null==n||null===(e=n.list)||void 0===e||!e.length)}),[n,d]),_=pe((function(){var e;return!(null==o||null===(e=o.list)||void 0===e||!e.length)}),[o]),v=pe((function(){return f||h||_}),[f,h]);return{isPlaybackRateInMore:f,isResolutionInMore:h,hasSubtitle:_,isMoreVisible:v}},Br=function(){var e=mi((function(e){return e.dispatch})).customStoreDispatch;return{setMoreOpened:function(t){e.set({more:{beforeSelected:null,selected:null,opened:t}})},setMoreBeforeSelected:function(t){e.set({more:{beforeSelected:t}})},setMoreSelected:function(t){e.set({more:{beforeSelected:U(t)&&null,selected:t}})}}};const Gr=function(){var e=mi((function(e){return Ft(e,"videoRef","currentTime","options","volume","dispatch","layout")})),t=e.videoRef,r=e.currentTime,n=e.options,o=e.volume,l=e.dispatch,c=e.layout,d=l.videoDispatch,f=l.eventBusDispatch,h=l.optionsDispatch,_=n.skipStep,v=Ur(),m=v.isPlaybackRateInMore,y=v.isResolutionInMore,E=Br(),T=E.setMoreOpened,S=E.setMoreSelected,D=E.setMoreBeforeSelected,L=Li().handlePlayPauseToggle,I=ge(Qi((function(){d.setVolumeChangeState(It)}),1e3),[]),A=function(){if(d.setVolumeChangeState(Lt),I(),0!==o){var e=Math.max(o-.05,0);d.setVolume(e),d.setMuted(!e)}},x=function(){if(d.setVolumeChangeState(Dt),I(),1!==o){var e=Math.min(o+.05,1);d.setVolume(e),d.setMuted(!e)}};return{handleButtonKeyDown:function(e){switch(e.key){case Zi.ARROW_UP:x();break;case Zi.ARROW_DOWN:A();break;case Zi.ARROW_LEFT:Ti(t,r-_);break;case Zi.ARROW_RIGHT:Ti(t,r+_);break;case Zi.ESCAPE:f.emit("containerFocus")}f.emit("keydown",{event:e})},handleVolumeSlider:function(e){switch(e.key){case Zi.SPACE:case Zi.ENTER:L();break;case Zi.ARROW_UP:x();break;case Zi.ARROW_DOWN:A();break;case Zi.ARROW_LEFT:"mobile"===c.type||Fr("volume",c.slots.header)?Ti(t,r-_):A();break;case Zi.ARROW_RIGHT:"mobile"===c.type||Fr("volume",c.slots.header)?Ti(t,r+_):x();break;case Zi.ESCAPE:f.emit("containerFocus")}f.emit("keydown",{event:e})},handlePanelKeyDown:function(e,t){e.key===Zi.ESCAPE&&(T(!1),D(null!=t?t:null),f.emit("keydown",{event:e}),e.preventDefault())},handleDivKeyDown:function(e){switch(e.key){case Zi.SPACE:L();break;case Zi.ARROW_UP:x();break;case Zi.ARROW_DOWN:A();break;case Zi.ARROW_LEFT:Ti(t,r-_);break;case Zi.ARROW_RIGHT:Ti(t,r+_);break;case Zi.ESCAPE:f.emit("containerFocus")}f.emit("keydown",{event:e})},handlePanelResolutionKeyDown:function(e){var t,r;if(e.key===Zi.SPACE||e.key===Zi.ENTER){var n=null!==(t=e.target.dataset.name)&&void 0!==t?t:null===(r=e.target.closest("li"))||void 0===r?void 0:r.dataset.name;if(n){h.selectResolution(n);var o=y?null:"resolution";T(!1),D(o),f.emit("keydown",{event:e})}}},handlePanelPlaybackRateKeyDown:function(e){var t,r;if(e.key===Zi.SPACE||e.key===Zi.ENTER){var n=null!==(t=e.target.dataset.name)&&void 0!==t?t:null===(r=e.target.closest("li"))||void 0===r?void 0:r.dataset.name;if(n){h.selectPlaybackRate(n);var o=m?null:"playbackRate";T(!1),D(o),f.emit("keydown",{event:e})}}},handlePanelSubtitleKeyDown:function(e){var t,r;if(e.key===Zi.SPACE||e.key===Zi.ENTER){var n=null!==(t=e.target.dataset.name)&&void 0!==t?t:null===(r=e.target.closest("li"))||void 0===r?void 0:r.dataset.name;n&&(h.selectSubtitle(n),T(!1),D(null),f.emit("keydown",{event:e}))}},handleMorePanelKeyDown:function(e){if(e.key===Zi.SPACE||e.key===Zi.ENTER){switch(document.activeElement.dataset.id){case"playbackRate":S("playbackRate");break;case"resolution":S("resolution");break;case"subtitle":S("subtitle")}f.emit("keydown",{event:e})}}}}
2,zr=function(e){var t=e.containerFocus,r=Gr().handleDivKeyDown,n=ve(null);return he((function(){var e;t&&(null===(e=n.current)||void 0===e||e.focus())}),[t]),_("div",{onKeyDown:r,ref:n,tabIndex:-1})},Hr=function(){var e=mi((function(e){return e})),t=e.duration,r=e.videoRef,n=e.currentTime,o=e.options,l=o.duration,c=o.currentTime,d=pe((function(){return!(!r||!r.paused||"all"!==l.position&&"overlay"!==l.position)}),[l,null==r?void 0:r.paused]),f=pe((function(){return!(!r||r.paused||"all"!==c.position&&"overlay"!==c.position)}),[c,null==r?void 0:r.paused]);return d||f?_("time",null,V(f?n:t)):null},Yr=function(){var e=Li(),t=e.handlePlayPauseToggle,r=e.handleNextButtonClick,n=e.handlePreviousButtonClick,o=e.hasNextButtonCustomEvent,l=e.hasPrevButtonCustomEvent,c=Gr().handleButtonKeyDown,d=mi((function(e){return e})),f=d.videoRef;return _("div",{className:"__ui_play_pause"},l&&_("button",{className:"__ui_prev_button",onKeyDown:c,onClick:n,type:"button","aria-label":"Prev"}),_("button",{type:"button",className:"__ui_play_button",onKeyDown:c,onClick:t,"aria-label":null!=f&&f.paused?"Pause":"Play"},_(Hr,null)),o&&_("button",{className:"__ui_next_button",onKeyDown:c,onClick:r,type:"button","aria-label":"Next"}))},Vr=function(){var e=mi((function(e){return e.options.ended.outlink}));return _("a",{href:e.href,target:"_blank",className:"__ui_outlink_button"},_("span",{className:"__ui_button_label"},e.label))};var Wr=25.5,Zr=51*Math.PI,Kr={};const Qr=function(){var e,t,r,n,o=mi((function(e){return e.dispatch.optionsDispatch})),l=mi((function(e){return Ft(e,"videoState","options","instanceId")})),c=l.videoState,d=l.options,f=l.instanceId,h=d.ended,v=h.timeout,m=h.waiting,y=X(de(Zr),2),E=y[0],T=y[1],S=Li().handleNextButtonClick;return _e((function(){c===gt&&(T(Zr),function(e){delete Kr[e]}(f),o.setEndedWaiting(!0))}),[c]),e=function(){var e=function(e,t,r){j(Kr[r])&&(Kr[r]=(new Date).getTime());var n=((new Date).getTime()-Kr[r])/t,o=Math.max(0,Math.min(1,n));return Zr*(1-o)}(0,v,f);T(e),0===e&&S()},t=E&&m?100:null,r=function(){o.setEndedWaiting(!1)},n=ve(),he((function(){n.current=e}),[e]),he((function(){if(!U(t)){var e=setInterval((function(){var e;null===(e=n.current)||void 0===e||e.call(n)}),t);return function(){clearInterval(e),null==r||r()}}}),[t]),_("svg",{viewBox:"0 0 54 54"},_("circle",{cx:"27",cy:"27",r:Wr,style:{strokeLinecap:"round",strokeDashoffset:E,strokeDasharray:"".concat(Zr)}}))},Xr=function(){var e=ve(null),t=Li(),r=t.handleNextButtonClick,n=t.hasNextButtonCustomEvent,o=mi((function(e){return Ft(e,"videoRef","dispatch","options")})),l=o.videoRef,c=o.dispatch,d=o.options,f=c.optionsDispatch,h=c.eventBusDispatch,v=c.domDispatch;if(he((function(){e.current&&(h.emit("endedComponentMounted",{ref:e.current}),v.set({ended:e.current}))}),[]),!d.ended)return _("div",{className:mr.__ui_ended,ref:e});var m=d.ended,y=m.timeout,E=m.replayLabel,T=m.cancelLabel,S=m.waiting,D=m.outlink,L=m.nextLabel,I=m.nextTitle,A=n&&z(y);return _("div",{className:yr(mr.__ui_ended,[S,mr.__ui_ended_waiting]),ref:e},_("div",{className:"__ui_ended_button_group"},_(wr,{replayLabel:E,isEndedOverlay:!0}),_("div",{className:"__ui_timeout"},_("strong",{className:"__ui_timeout_info"},_("span",{className:"__ui_timeout_label"},L),_("span",{className:"__ui_timeout_title"},I)),_("div",{className:"__ui_timeout_loading"},A&&_(p,null,_("button",{className:"__ui_timeout_next_button",onClick:function(){r(),f.setEndedWaiting(!1)},type:"button"}),_(Qr,null))),_("button",{className:"__ui_timeout_cancel_button",onClick:function(e){f.setEndedWaiting(!1),h.emit("clickCancelButton",{event:e,videoRef:l})},type:"button"},_("span",{className:"__ui_button_label"},T))),D&&_(Vr,null)))},qr=function(){var e=mi((function(e){return Ft(e,"customStore","dispatch","uiBreakpoint","videoRef","layout","options")})),t=e.customStore.more,r=e.dispatch.eventBusDispatch,n=e.uiBreakpoint,o=e.videoRef,l=(e.layout.type,e.options),c=l.resolution,d=l.playbackRate,f=l.subtitle,h=yi(),v=h.selectedPlaybackRate,m=h.selectedResolution,y=h.selectedSubtitle,E=Ur(),T=E.isPlaybackRateInMore,S=E.isResolutionInMore,D=E.hasSubtitle,L=Br(),I=L.setMoreSelected,A=L.setMoreOpened,x=ve(null),M=ve(null),k=ve(null),w=ve(null),N=ve(null),R=ve(null),O=Gr(),C=O.handleMorePanelKeyDown,P=O.handlePanelKeyDown,j=O.handleButtonKeyDown,F=ge((function(e){I("resolution"),r.emit("clickResolutionButton",{event:e,videoRef:o})}),[]),B=ge((function(e){I("subtitle"),r.emit("clickSubtitleButton",{event:e,videoRef:o})}),[]);return he((function(){var e,r,o,l;!t.opened||U(t.beforeSelected)?t.opened&&U(t.beforeSelected)&&U(t.selected)&&("small"===n?null===(e=M.current)||void 0===e||e.focus():null===(r=w.current||N.current||R.current)||void 0===r||r.focus()):null===(o=k.current)||void 0===o||null===(l=o.children.namedItem(t.beforeSelected))||void 0===l||l.focus()}),[t.opened,t.selected,t.beforeSelected]),_("div",{className:"__ui_more",onKeyDown:P,tabIndex:-1},_("div",{className:"__ui_setting_menu",ref:x},_("button",{ref:M,className:"__ui_setting_close_button",onKeyDown:j,onClick:function(e){A(!1),r.emit("clickMoreButton",{event:e,videoRef:o})},type:"button",tabIndex:t.opened?0:-1}),_("ul",{ref:k,className:"__ui_setting_list",onKeyDown:C},T&&_("li",{className:"__ui_setting_item",name:"playbackRate",onClick:function(e){I("playbackRate"),r.emit("clickPlaybackRateButton",{event:e,videoRef:o})},"data-id":"playbackRate",tabIndex:t.opened?0:-1,ref:w},_("span",{className:"__ui_label_name"},null==d?void 0:d.label),_("span",{className:"__ui_label_value"},null==v?void 0:v.name)),S&&_("li",{className:"__ui_setting_item",name:"resolution",onClick:F,"data-id":"resolution",tabIndex:t.opened?0:-1,ref:N},_("span",{className:"__ui_label_name"},null==c?void 0:c.label),_("span",{className:"__ui_label_value"},null==m?void 0:m.name)),D&&_("li",{className:"__ui_setting_item",name:"subtitle",onClick:B,"data-id":"subtitle",tabIndex:t.opened?0:-1,ref:R},_("span",{className:"__ui_label_name"},null==f?void 0:f.label),_("span",{className:"__ui_label_value"},null==y?void 0:y.name)))))},Jr=function(){var e=mi((function(e){return Ft(e,"customStore","layout","options")})),t=e.customStore.more,r=e.layout.type,n=e.options.playbackRate,o=Ur().isPlaybackRateInMore,l=Br(),c=l.setMoreOpened,d=l.setMoreSelected,f=l.setMoreBeforeSelected,h=Gr().handleButtonKeyDown,v=ve(null);return he((function(){var e;"playbackRate"===t.selected&&(null===(e=v.current)||void 0===e||e.focus())}),[t.selected]),_("button",{type:"button",ref:v,className:"__ui_setting_close_button",onKeyDown:h,onClick:function(e){if(o)return c(!0),void f("playbackRate");d(null),f("playbackRate")},tabIndex:t.opened||"playbackRate"===t.selected?0:-1,"aria-label":"Close"},"pc"===r&&_("span",{className:"__ui_label_name"},null==n?void 0:n.label))},$r=function(){var e,t=mi((function(e){return Ft(e,"customStore","dispatch","options")})),r=t.customStore.more,n=t.dispatch.optionsDispatch,o=t.options.playbackRate,l=Gr(),c=l.handlePanelKeyDown,d=l.handlePanelPlaybackRateKeyDown,f=Ur().isPlaybackRateInMore,h=Br().setMoreOpened;return _("div",{className:"__ui_playback_rate",onKeyDown:function(e){c(e,f?null:"playbackRate")},tabIndex:-1},_("div",{className:"__ui_setting_menu"},_(Jr,null),_("ul",{className:"__ui_setting_sublist",onClick:function(e){var t,r,o=null!==(t=e.target.dataset.name)&&void 0!==t?t:null===(r=e.target.closest("li"))||void 0===r?void 0:r.dataset.name;o&&(n.selectPlaybackRate(o),h(!1))}},null==o||null===(e=o.list)||void 0===e?void 0:e.map((function(e){var t=e.name,n=e.selected;return _("li",{key:t,tabIndex:"playbackRate"===r.selected?0:-1,"data-name":t,className:"__ui_setting_subitem "+yr([!!n,mr.__ui_playback_rate_selected]),onKeyDown:d},_("label",null,t))})))))},en=function(){var e=mi((function(e){return Ft(e,"customStore","layout","options")})),t=e.customStore.more,r=e.layout.type,n=e.options.resolution,o=Ur
2().isResolutionInMore,l=Br(),c=l.setMoreOpened,d=l.setMoreSelected,f=l.setMoreBeforeSelected,h=Gr().handleButtonKeyDown,v=ve(null);return he((function(){var e;"resolution"===t.selected&&(null===(e=v.current)||void 0===e||e.focus())}),[t.selected]),_("button",{type:"button",ref:v,className:"__ui_setting_close_button",onKeyDown:h,onClick:function(e){if(o)return c(!0),void f("resolution");d(null),f("resolution")},tabIndex:t.opened||"resolution"===t.selected?0:-1,"aria-label":"Close"},"pc"===r&&_("span",{className:"__ui_label_name"},null==n?void 0:n.label))},tn=function(){var e,t,r,n,o=mi((function(e){return Ft(e,"options","customStore","dispatch")})),l=o.options,c=o.customStore.more,d=o.dispatch.optionsDispatch,f=Gr(),h=f.handlePanelKeyDown,v=f.handlePanelResolutionKeyDown,m=Ur().isResolutionInMore,y=Br().setMoreOpened,E=null===(e=l.resolution)||void 0===e||null===(t=e.list)||void 0===t?void 0:t.find((function(e){return e.selected})),T=E&&E.name;return _("div",{className:"__ui_resolution",onKeyDown:function(e){h(e,m?null:"resolution")},tabIndex:-1},_("div",{className:"__ui_setting_menu"},_(en,null),_("ul",{className:"__ui_setting_sublist",onClick:function(e){var t,r,n=null!==(t=e.target.dataset.name)&&void 0!==t?t:null===(r=e.target.closest("li"))||void 0===r?void 0:r.dataset.name;n&&(n!==T&&d.selectResolution(n),y(!1))}},null===(r=l.resolution)||void 0===r||null===(n=r.list)||void 0===n?void 0:n.map((function(e){var t=e.name,r=(e.src,e.selected);return _("li",{key:t,tabIndex:"resolution"===c.selected?0:-1,"data-name":t,className:"__ui_setting_subitem "+yr([!!r,mr.__ui_resolution_selected]),onKeyDown:v},_("label",null,t))})))))},rn=function(){var e=mi((function(e){return Ft(e,"customStore","options","layout")})),t=e.customStore.more,r=e.options,n=e.layout.type,o=r.subtitle,l=o.subtitleVisibility,label=o.label,c=ve(null),d=Gr().handleButtonKeyDown,f=Br(),h=f.setMoreOpened,v=f.setMoreBeforeSelected;return he((function(){var e;"subtitle"===t.selected&&"subtitle"===t.selected&&(null===(e=c.current)||void 0===e||e.focus())}),[t.selected]),_("button",{type:"button",ref:c,className:"__ui_setting_close_button",onKeyDown:d,onClick:function(e){h(!0),v("subtitle")},"aria-pressed":l,tabIndex:t.opened?0:-1,"aria-label":"Close"},"pc"===n&&_("span",{className:"__ui_label_name"},label))},nn=function(){var e,t=mi((function(e){return Ft(e,"dispatch","options","customStore")})),r=t.dispatch.optionsDispatch,n=t.options,o=t.customStore.more,l=n.subtitle,c=Gr(),d=c.handlePanelKeyDown,f=c.handlePanelSubtitleKeyDown,h=Br().setMoreOpened;return _("div",{className:"__ui_subtitle",onKeyDown:d,tabIndex:-1},_("div",{className:"__ui_setting_menu"},_(rn,null),_("ul",{className:"__ui_setting_sublist",onClick:function(e){var t,n,o=null!==(t=e.target.dataset.name)&&void 0!==t?t:null===(n=e.target.closest("li"))||void 0===n?void 0:n.dataset.name;o&&(r.selectSubtitle(o),h(!1))}},null==l||null===(e=l.list)||void 0===e?void 0:e.map((function(e){var t=e.name,r=e.selected;return _("li",{key:t,tabIndex:"subtitle"===o.selected?0:-1,"data-name":t,className:"__ui_setting_subitem "+yr([!!r,mr.__ui_subtitle_selected]),onKeyDown:f},_("label",null,t))})))))},on=function(){var e=mi((function(e){return e.dispatch.eventBusDispatch})),t=mi((function(e){return Ft(e,"draggingType")})).draggingType,r=X(de("00:00"),2),n=r[0],o=r[1],l=X(de("00:00"),2),c=l[0],d=l[1],f=function(e){if(!j(e)&&z(e.seekbarThumbTime)&&z(e.dragStartTime)){var t=e.seekbarThumbTime,r=e.dragStartTime,n=Math.floor(t-r),l=Math.abs(n),c=function(e){return 0===e?"":e<0?"-":"+"}(n);o(V(t)),d("".concat(c).concat(V(l)))}};return he((function(){return e.on("seekingTime",f),function(){e.off("seekingTime",f)}}),[]),_("div",{className:yr(mr.__ui_seekbar,["seekbar"===t,mr.__ui_seekbar_dragging])},_("div",{className:"__ui_seekbar_absolute_time"},n),_("div",{className:"__ui_seekbar_relative_time"},c))},an=function(){var e=mi((function(e){return Ft(e,"options","dispatch")})),t=e.options,r=e.dispatch,n=X(de(0),2),o=n[0],l=n[1],c=X(de(0),2),d=c[0],f=c[1],h=t.skipStep,v=r.eventBusDispatch,m=function(e){if(e){var t=e.skipClickCount,r=void 0===t?0:t,n=e.currentTime,o=e.duration;if(!j(n)&&!j(o)){var c=Math.floor(n<=r*h?n:r*h),d=Math.floor(o-n<=r*h?o-n:r*h);l(c),f(d)}}};return he((function(){return v.on("skipCount",m),function(){v.off("skipCount",m)}}),[]),_("div",{className:"__ui_skip"},_("div",{className:"__ui_skip_prev"},_("span",{className:"seconds"},o)),_("div",{className:"__ui_skip_next"},_("span",{className:"seconds"},d)))},sn=function(){var e=mi((function(e){return Ft(e,"videoRef","errorState")})),t=e.videoRef,r=e.errorState,code=r.code,n=r.message,button=r.button;return _("div",{className:"__ui_error"},_("div",{className:"__ui_error_title"},n),button&&_("button",{type:"button",className:"__ui_error_button",onClick:function(){button.onClick&&button.onClick(code,t)}},button.label))},un=function(){var e=mi((function(e){return e.volume}));return _("div",{className:"__ui_volume"},_("div",{className:"__ui_volume_view"},Math.round(e*ft)))},ln=function(){var e,t,r=Ur(),n=r.isMoreVisible,o=r.hasSubtitle,l=mi((function(e){return Ft(e,"options","layout","videoState")})),c=l.options,d=l.layout,f=l.videoState,h=c.playPause,v=c.keyboard.showVolume,m=c.resolution,y=c.playbackRate,E=c.seekingTimeVisiblity,T=!(null==m||null===(e=m.list)||void 0===e||!e.length),S=!(null==y||null===(t=y.list)||void 0===t||!t.length);return _(Ni,null,f===yt&&_(sn,null),_(an,null),E&&_(on,null),v&&_(un,null),T&&_(tn,null),S&&_($r,null),o&&_(nn,null),n&&_(qr,null),"mobile"===d.type&&h&&_(Yr,null),_(Xr,null))},cn=function(){var e=mi((function(e){return e.videoState})),t=Li(),r=t.handlePlayPauseToggle,n=t.handleNextButtonClick,o=t.handlePreviousButtonClick,l=t.hasNextButtonCustomEvent,c=t.hasPrevButtonCustomEvent,d=Gr().handleButtonKeyDown;return _("div",{className:"__ui_play_pause"},c&&_("button",{type:"button",className:"__ui_prev_button",onKeyDown:d,onClick:o,"aria-label":"Prev"}),e===gt?_(wr,null):_("button",{type:"button",className:"__ui_play_button",onKeyDown:d,onClick:r,"aria-label":"Play/Pause"}),l&&_("button",{type:"button",className:"__ui_next_button",onKeyDown:d,onClick:n,"aria-label":"Next"}))},dn=function(){var e=ve(null),t=mi((function(e){return e.dispatch})),r=t.eventBusDispatch,n=t.videoDispatch,o=mi((function(e){return Ft(e,"currentTime","duration","videoRef","draggingType","resolutionChangeState")})),l=o.currentTime,c=o.duration,d=o.videoRef,f=o.draggingType,h=o.resolutionChangeState,v=X(de(0),2),progress=v[0],m=v[1];return he((function(){"seekbar"===f&&(U(e.current)&&(e.current=l),r.emit("seekingTime",{seekbarThumbTime:progress/ft*c,dragStartTime:e.current}))}),[progress]),he((function(){if("seekbar"!==f&&h===bt){var e=l/c*ft;z(e)&&m(e)}}),[l]),_("div",{className:yr(mr.__ui_seekbar,["seekbar"===f,mr.__ui_seekbar_dragging])},!!c&&_("div",{"data-testid":"video-loaded"}),_(Lr,{type:"seekbar",progress:progress,setProgress:m,dragMoveHandler:function(){n.setA
2ctive(!0)},dragEndHandler:function(t){var r=t.rate;e.current=null,n.setActive(!1),Ti(d,r*c)},disabled:!c}))},fn=function(){var e=mi((function(e){return Ft(e.options,"playPause","seekbar","currentTime","duration")})),t=e.seekbar,r=e.playPause,n=e.currentTime,o=e.duration,l=mi((function(e){return Ft(e,"layout","uiBreakpoint","dispatch","videoState")})),c=l.layout,d=l.uiBreakpoint,f=l.videoState,h=c.type,v=c.slots.toolbar,m=v.left,y=v.right,E=f===ht,T=["toolbar","all"].includes(n.position),S=["toolbar","all"].includes(o.position);return _(Ri,null,_("div",{className:"__ui_toolbar_left"},"pc"===h&&r&&_(cn,null),"mobile"===h&&T&&!E&&_(xr,null),t&&!E&&_(dn,null),"mobile"===h&&S&&!E&&_(Ar,null),"pc"===h&&m.map((function(slot){return Rr({slot:slot,uiBreakpoint:d})}))),_("div",{className:"__ui_toolbar_right"},y.map((function(slot){return Rr({slot:slot,uiBreakpoint:d})}))))},hn=function(){var e=mi((function(e){return e.options.live})),t=e.viewer,r=e.chat,n=e.status,o=e.startTime,l=function(){var e=mi((function(e){return e.options.live})),t=e.startTime,r=e.status,n=mi((function(e){return Ft(e,"duration","currentTime")})),o=n.duration,l=n.currentTime;return pe((function(){return r===Xi?V(o):z(t)?V(t+l):"00:00"}),[r,o,t,l])}();return _(p,null,_("div",{className:"__ui_live_option"},"live"===n?_("span",{className:"__ui_live_label __ui_label_live"}," LIVE "):_("span",{className:"__ui_live_label"},n===Xi?"REPLAY":"PREVIEW"),!j(o)&&_("span",{className:"__ui_live_info time"},l),z(t)&&_("span",{className:yr(mr.__ui_title_info,[n===Xi,mr.__ui_title_info_play],[n!==Xi,mr.__ui_title_info_viewer])},t),z(r)&&_("span",{className:"__ui_live_info chat"},r)))},_n=function(){var e=mi((function(e){return Ft(e,"options","videoRef")})),t=e.options,r=e.videoRef,title=t.title,n=t.description,o=t.live,l=t.profileImage,c=mi((function(e){return e.dispatch.eventBusDispatch}));return _("div",{className:"__ui_title"},l&&_("div",{className:"__ui_title_avatar",onClick:function(e){c.emit("clickProfileImage",{event:e,videoRef:r})}},_("img",{src:l,alt:"Thumbnail"})),_("div",{className:"__ui_title_content"},title&&_("p",{className:"__ui_title_main",onClick:function(e){c.emit("clickTitle",{event:e,videoRef:r})}},title),n&&_("p",{className:"__ui_title_sub"},n),o&&_(hn,null)))},header=function(){var e=mi((function(e){return Ft(e,"layout","uiBreakpoint")})),t=e.layout,r=e.uiBreakpoint,n=t.slots.header;return _(wi,null,_("div",{className:"__ui_header_left"},_(_n,null)),_("div",{className:"__ui_header_right"},n.map((function(slot){return Rr({slot:slot,uiBreakpoint:r,isHeaderSlot:!0})}))))},vn=function(){var e=mi((function(e){return Ft(e,"videoState","customStore","fullscreen","loading","currentTime","videoRef","options","uiBreakpoint","touchDevice","muted","dispatch","active","duration","volumeChangeState","layout")})),t=e.videoState,r=e.customStore,n=r.more,o=r.headerPanelOpened,l=r.activeCustomClassNames,c=e.fullscreen,d=e.loading,f=e.uiBreakpoint,h=e.options,v=e.touchDevice,m=e.videoRef,y=e.muted,E=e.currentTime,T=e.dispatch,S=e.active,D=e.duration,L=e.volumeChangeState,I=e.layout,A=h.skipStep,x=h.skipOnDoubleTap,M=Ai(),k=M.handleMouseMove,w=M.handleMouseEnter,N=M.handleMouseLeave,R=M.handleFocusIn,O=T.eventBusDispatch,C=T.videoDispatch,P=T.domDispatch,j=ve(null),F=X(de(0),2),U=F[0],B=F[1],G=X(de(!1),2),z=G[0],H=G[1],Y=X(de(!1),2),V=Y[0],W=Y[1],Z=X(de(!1),2),K=Z[0],Q=Z[1],J=X(de(!1),2),$=J[0],ee=J[1],te=X(de(rr.init),2),ie=te[0],re=te[1],ne=ge(Qi((function(e,t,r){var n=A*e,o=r===rr.next?n:-n;Ti(m,t+o),re(rr.init),B(0),O.emit("skip",{skipClickCount:e})}),300),[m]),oe=ge(Qi((function(){W(!1)}),300),[]);return he((function(){return j.current&&(O.on("containerFocus",(function(){var e;null===(e=j.current)||void 0===e||e.focus()})),C.setContainerRef(j.current),O.emit("videoContainerComponentMounted",{ref:j.current}),P.set({videoContainer:j.current})),function(){C.setContainerRef(null),O.off("containerFocus")}}),[]),_("div",{className:yr.apply(void 0,[mr.__video,["mobile"===I.type,mr.__video_mobile],["pc"===I.type,mr.__video_pc],["pc"===I.type&&o,mr.__ui_header_opened],[c,mr.__video_fullscreen],[S,mr.__video_active],[t===_t||t===ht,mr.__video_not_played],[t===pt,mr.__video_playing],[t===gt,mr.__video_ended],[t===yt,mr.__ui_error_show],[d,mr.__video_loading],[$,mr.__video_keyboard_focus],[n.opened,mr.__ui_more_opened],["playbackRate"===n.selected,mr.__ui_playback_rate_opened],["resolution"===n.selected,mr.__ui_resolution_opened],["subtitle"===n.selected,mr.__ui_subtitle_opened],["small"===f,mr.__video_small],["medium"===f,mr.__video_medium],["large"===f,mr.__video_large],[y,mr.__video_muted],[v,mr.__video_touch],[ie===rr.prev,mr.__video_skip_prev],[ie===rr.next,mr.__video_skip_next],[L===Dt,mr.__video_volume_up],[L===Lt,mr.__video_volume_down]].concat(Ce(l))),onClick:function(e){""!==e.pointerType&&(v||ee(!1))}
2,onKeyDown:function(e){Object.values(Zi).includes(e.key)&&(!S&&Ki.includes(e.key)||(R(),ee(!0)))},onMouseEnter:w,onMouseLeave:N,onMouseMove:k,onTouchMove:function(e){Q(!0)},onTouchEnd:function(e){if(v&&x&&t!==gt)if(ee(!1),K)Q(!1);else{oe();var r,n,o=e.changedTouches[0].clientX,l=e.currentTarget.getBoundingClientRect(),c=l.x,d=l.width,f=o-c;if(f<=d/3)r=rr.prev;else{if(!(f>=2*d/3))return;r=rr.next}if(e.preventDefault(),!V)return W(!0),void(null===(n=e.target)||void 0===n||n.click());var h=U+1;O.emit("skipCount",{skipClickCount:h,duration:D,currentTime:E}),re(r),B(h),ne(h,E,r)}},onFocus:function(){return H(!0)},onBlur:function(){H(!1),ee(!1)},ref:j,tabIndex:-1},_(zr,{containerFocus:z}),_(ki,null,_(header,null),_(ln,null),_(fn,null)))};function pn(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function gn(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?pn(Object(source),!0).forEach((function(t){Qe(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):pn(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var mn=function(e){return gn(gn({},e),{},{customStore:{more:{opened:!1,beforeSelected:null,selected:null},headerPanelOpened:!1,activeCustomClassNames:[]}})};function yn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sr(e);if(t){var o=sr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ar(this,r)}}var bn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&or(e,t)}(r,e);var t=yn(r);function r(e){var n,o=e.el,l=e.options,c=void 0===l?{}:l,d=e.plugins,f=e.layout;return Oi(this,r),(n=t.call(this,{el:o,options:c,plugins:d,layout:f})).store.setState(mn),n.build({el:o,plugins:d}),n}return Pi(r,[{key:"build",value:function(e){var t=this,r=e.el,n=e.plugins;null==n||n.forEach(this.activatePluginBeforeUvpRender),this.on("videoComponentMounted",(function(){null==n||n.forEach(t.activatePluginAfterUvpRender)}),{once:!0}),this.render(r)}},{key:"addClassToContainer",value:function(){for(var e=this.store.getState().customStore.activeCustomClassNames,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=Ce(new Set([].concat(r,Ce(e))));this.store.getState().dispatch.customStoreDispatch.set({activeCustomClassNames:o})}},{key:"removeClassToContainer",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this.store.getState().customStore.activeCustomClassNames,o=n.filter((function(e){return!t.includes(e)}));this.store.getState().dispatch.customStoreDispatch.set({activeCustomClassNames:o})}},{key:"render",value:function(e){C(_(gi,{store:this.store},_(vn,null)),e)}}]),r}(nr);Qe(bn,"version","3.6.1"),Qe(bn,"Plugin",Wi);var video=bn})(),n})(),e.exports=n()},410:function(e,t,r){r(2)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},411:function(e,t,r){var n;n=e=>(()=>{var t={711:function(e){var t;"undefined"!=typeof window&&(t=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
2),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(object,e){return Object.prototype.hasOwnProperty.call(object,e)},r.p="/dist/",r(r.s="./src/hls.ts")}({
vendor: 2,794 bytes, line 2
2"./node_modules/eventemitter3/index.js":function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o="~";function l(){}function c(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function d(e,t,r,n,l){if("function"!=typeof r)throw new TypeError("The listener must be a function");var d=new c(r,n||e,l),f=o?o+t:t;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],d]:e._events[f].push(d):(e._events[f]=d,e._eventsCount++),e}function f(e,t){0==--e._eventsCount?e._events=new l:delete e._events[t]}function h(){this._events=new l,this._eventsCount=0}Object.create&&(l.prototype=Object.create(null),(new l).__proto__||(o=!1)),h.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},h.prototype.listeners=function(e){var t=o?o+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,n=r.length,l=new Array(n);i<n;i++)l[i]=r[i].fn;return l},h.prototype.listenerCount=function(e){var t=o?o+e:e,r=this._events[t];return r?r.fn?1:r.length:0},h.prototype.emit=function(e,t,r,n,l,c){var d=o?o+e:e;if(!this._events[d])return!1;var f,i,h=this._events[d],_=arguments.length;if(h.fn){switch(h.once&&this.removeListener(e,h.fn,void 0,!0),_){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,t),!0;case 3:return h.fn.call(h.context,t,r),!0;case 4:return h.fn.call(h.context,t,r,n),!0;case 5:return h.fn.call(h.context,t,r,n,l),!0;case 6:return h.fn.call(h.context,t,r,n,l,c),!0}for(i=1,f=new Array(_-1);i<_;i++)f[i-1]=arguments[i];h.fn.apply(h.context,f)}else{var v,m=h.length;for(i=0;i<m;i++)switch(h[i].once&&this.removeListener(e,h[i].fn,void 0,!0),_){case 1:h[i].fn.call(h[i].context);break;case 2:h[i].fn.call(h[i].context,t);break;case 3:h[i].fn.call(h[i].context,t,r);break;case 4:h[i].fn.call(h[i].context,t,r,n);break;default:if(!f)for(v=1,f=new Array(_-1);v<_;v++)f[v-1]=arguments[v];h[i].fn.apply(h[i].context,f)}}return!0},h.prototype.on=function(e,t,r){return d(this,e,t,r,!1)},h.prototype.once=function(e,t,r){return d(this,e,t,r,!0)},h.prototype.removeListener=function(e,t,r,n){var l=o?o+e:e;if(!this._events[l])return this;if(!t)return f(this,l),this;var c=this._events[l];if(c.fn)c.fn!==t||n&&!c.once||r&&c.context!==r||f(this,l);else{for(var i=0,d=[],h=c.length;i<h;i++)(c[i].fn!==t||n&&!c[i].once||r&&c[i].context!==r)&&d.push(c[i]);d.length?this._events[l]=1===d.length?d[0]:d:f(this,l)}return this},h.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&f(this,t)):(this._events=new l,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=o,h.EventEmitter=h,e.exports=h},
vendor: 1,771 bytes, line 2
2"./node_modules/url-toolkit/src/url-toolkit.js":function(e,t,r){var n,o,l,c,d;n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,o=/^(?=([^\/?#]*))\1([^]*)$/,l=/(?:\/|^)\.(?=\/)/g,c=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,d={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var n=d.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=d.normalizePath(n.path),d.buildURLFromParts(n)}var l=d.parseURL(t);if(!l)throw new Error("Error trying to parse relative URL.");if(l.scheme)return r.alwaysNormalize?(l.path=d.normalizePath(l.path),d.buildURLFromParts(l)):t;var c=d.parseURL(e);if(!c)throw new Error("Error trying to parse base URL.");if(!c.netLoc&&c.path&&"/"!==c.path[0]){var f=o.exec(c.path);c.netLoc=f[1],c.path=f[2]}c.netLoc&&!c.path&&(c.path="/");var h={scheme:c.scheme,netLoc:l.netLoc,path:null,params:l.params,query:l.query,fragment:l.fragment};if(!l.netLoc&&(h.netLoc=c.netLoc,"/"!==l.path[0]))if(l.path){var _=c.path,v=_.substring(0,_.lastIndexOf("/")+1)+l.path;h.path=d.normalizePath(v)}else h.path=c.path,l.params||(h.params=c.params,l.query||(h.query=c.query));return null===h.path&&(h.path=r.alwaysNormalize?d.normalizePath(l.path):l.path),d.buildURLFromParts(h)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(path){for(path=path.split("").reverse().join("").replace(l,"");path.length!==(path=path.replace(c,"")).length;);return path.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=d},
vendor: 2,708 bytes, line 2
2"./node_modules/webworkify-webpack/index.js":function(e,t,r){function n(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(object,e){return Object.prototype.hasOwnProperty.call(object,e)},r.p="/",r.oe=function(e){throw console.error(e),e};var n=r(r.s=ENTRY_MODULE);return n.default||n}var o="[\\.|\\-|\\+|\\w|/|@]+",l="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function c(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function d(e){return!isNaN(1*e)}function f(e,t,n){var f={};f[n]=[];var h=t.toString(),_=h.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!_)return f;for(var v,m=_[1],y=new RegExp("(\\\\n|\\W)"+c(m)+l,"g");v=y.exec(h);)"dll-reference"!==v[3]&&f[n].push(v[3]);for(y=new RegExp("\\("+c(m)+'\\("(dll-reference\\s('+o+'))"\\)\\)'+l,"g");v=y.exec(h);)e[v[2]]||(f[n].push(v[1]),e[v[2]]=r(v[1]).m),f[v[2]]=f[v[2]]||[],f[v[2]].push(v[4]);for(var E=Object.keys(f),i=0;i<E.length;i++)for(var T=0;T<f[E[i]].length;T++)d(f[E[i]][T])&&(f[E[i]][T]=1*f[E[i]][T]);return f}function h(e){return Object.keys(e).reduce((function(t,r){return t||e[r].length>0}),!1)}e.exports=function(e,t){t=t||{};var o={main:r.m},l=t.all?{main:Object.keys(o.main)}:function(e,t){for(var r={main:[t]},n={main:[]},o={main:{}};h(r);)for(var l=Object.keys(r),i=0;i<l.length;i++){var c=l[i],d=r[c].pop();if(o[c]=o[c]||{},!o[c][d]&&e[c][d]){o[c][d]=!0,n[c]=n[c]||[],n[c].push(d);for(var _=f(e,e[c][d],c),v=Object.keys(_),m=0;m<v.length;m++)r[v[m]]=r[v[m]]||[],r[v[m]]=r[v[m]].concat(_[v[m]])}}return n}(o,e),c="";Object.keys(l).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;l[e][t];)t++;l[e].push(t),o[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",c=c+"var "+e+" = ("+n.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+l[e].map((function(t){return JSON.stringify(t)+": "+o[e][t].toString()})).join(",")+"});\n"})),c=c+"new (("+n.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+l.main.map((function(e){return JSON.stringify(e)+": "+o.main[e].toString()})).join(",")+"}))(self);";var d=new window.Blob([c],{type:"text/javascript"});if(t.bare)return d;var _=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(d),v=new window.Worker(_);return v.objectURL=_,v}},
vendor: 5,341 bytes, line 2
2"./src/config.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"hlsDefaultConfig",(function(){return k})),r.d(t,"mergeConfig",(function(){return w})),r.d(t,"enableStreamingMode",(function(){return N}));var n=r("./src/controller/abr-controller.ts"),o=r("./src/controller/audio-stream-controller.ts"),l=r("./src/controller/audio-track-controller.ts"),c=r("./src/controller/subtitle-stream-controller.ts"),d=r("./src/controller/subtitle-track-controller.ts"),f=r("./src/controller/buffer-controller.ts"),h=r("./src/controller/timeline-controller.ts"),_=r("./src/controller/cap-level-controller.ts"),v=r("./src/controller/fps-controller.ts"),m=r("./src/controller/eme-controller.ts"),y=r("./src/controller/cmcd-controller.ts"),E=r("./src/utils/xhr-loader.ts"),T=r("./src/utils/fetch-loader.ts"),S=r("./src/utils/cues.ts"),D=r("./src/utils/mediakeys-helper.ts"),L=r("./src/utils/logger.ts");function I(){return I=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},I.apply(this,arguments)}function A(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function x(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?A(Object(source),!0).forEach((function(t){M(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):A(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var k=x(x({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:E.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:n.default,bufferController:f.default,capLevelController:_.default,fpsController:v.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:D.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0},{cueHandler:S.default,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:c.SubtitleStreamController,subtitleTrackController:d.default,timelineController:h.TimelineController,audioStreamController:o.default,audioTrackController:l.default,emeController:m.default,cmcdController:y.default});function w(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return I({},e,t)}function N(e){var t=e.loader;t!==T.default&&t!==E.default?(L.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):Object(T.fetchSupported)()&&(e.loader=T.default,e.progressive=!0,e.enableSoftw
2areAES=!0,L.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}},
vendor: 5,389 bytes, line 2
2"./src/controller/abr-controller.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/polyfills/number.ts"),o=r("./src/utils/ewma-bandwidth-estimator.ts"),l=r("./src/events.ts"),c=r("./src/utils/buffer-helper.ts"),d=r("./src/errors.ts"),f=r("./src/types/loader.ts"),h=r("./src/utils/logger.ts");function _(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var v=function(){function e(e){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;var t=e.config;this.bwEstimator=new o.default(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}var t,r,v,m=e.prototype;return m.registerListeners=function(){var e=this.hls;e.on(l.Events.FRAG_LOADING,this.onFragLoading,this),e.on(l.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(l.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(l.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(l.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){var e=this.hls;e.off(l.Events.FRAG_LOADING,this.onFragLoading,this),e.off(l.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(l.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(l.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(l.Events.ERROR,this.onError,this)},m.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},m.onFragLoading=function(e,data){var t,r=data.frag;r.type===f.PlaylistLevelType.MAIN&&(this.timer||(this.fragCurrent=r,this.partCurrent=null!=(t=data.part)?t:null,this.timer=self.setInterval(this.onCheck,100)))},m.onLevelLoaded=function(e,data){var t=this.hls.config;data.details.live?this.bwEstimator.update(t.abrEwmaSlowLive,t.abrEwmaFastLive):this.bwEstimator.update(t.abrEwmaSlowVoD,t.abrEwmaFastVoD)},m._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,r=this.hls,o=r.autoLevelEnabled,d=r.config,f=r.media;if(e&&f){var _=t?t.stats:e.stats,v=t?t.duration:e.duration;if(_.aborted)return h.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);if(o&&!f.paused&&f.playbackRate&&f.readyState){var m=performance.now()-_.loading.start,y=Math.abs(f.playbackRate);if(!(m<=500*v/y)){var E=r.levels,T=r.minAutoLevel,S=E[e.level],D=_.total||Math.max(_.loaded,Math.round(v*S.maxBitrate/8)),L=Math.max(1,_.bwEstimate?_.bwEstimate/8:1e3*_.loaded/m),I=(D-_.loaded)/L,A=f.currentTime,x=(c.BufferHelper.bufferInfo(f,A,d.maxBufferHole).end-A)/y;if(!(x>=2*v/y||I<=x)){var M,k=Number.POSITIVE_INFINITY;for(M=e.level-1;M>T&&!((k=v*E[M].maxBitrate/(6.4*L))<x);M--);if(!(k>=I)){var w=this.bwEstimator.getEstimate();h.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+M+"\n      Current BW estimate: "+(Object(n.isFiniteNumber)(w)?(w/1024).toFixed(3):"Unknown")+" Kb/s\n      Estimated load time for current fragment: "+I.toFixed(3)+" s\n      Estimated load time for the next fragment: "+k.toFixed(3)+" s\n      Time to underbuffer: "+x.toFixed(3)+" s"),r.nextLoadLevel=M,this.bwEstimator.sample(m,_.loaded),this.clearTimer(),e.loader&&(this.fragCurrent=this.partCurrent=null,e.loader.abort()),r.trigger(l.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:_})}}}}}},m.onFragLoaded=function(e,t){var r=t.frag,o=t.part;if(r.type===f.PlaylistLevelType.MAIN&&Object(n.isFiniteNumber)(r.sn)){var c=o?o.stats:r.stats,d=o?o.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var h=this.hls.levels[r.level],_=(h.loaded?h.loaded.bytes:0)+c.loaded,v=(h.loaded?h.loaded.duration:0)+d;h.loaded={bytes:_,duration:v},h.realBitrate=Math.round(8*_/v)}if(r.bitrateTest){var m={stats:c,frag:r,part:o,id:r.type};this.onFragBuffered(l.Events.FRAG_BUFFERED,m)}}},m.onFragBuffered=function(e,data){var t=data.frag,r=data.part,n=r?r.stats:t.stats;if(!n.aborted&&t.type===f.PlaylistLevelType.MAIN&&"initSegment"!==t.sn){var o=n.parsing.end-n.loading.start;this.bwEstimator.sample(o,n.loaded),n.bwEstimate=this.bwEstimator.getEstimate(),t.bitrateTest?this.bitrateTestDelay=o/1e3:this.bitrateTestDelay=0}},m.onError=function(e,data){switch(data.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},m.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},m.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,r=this.hls,n=r.maxAutoLevel,o=r.config,l=r.minAutoLevel,d=r.media,f=t?t.duration:e?e.duration:0,_=d?d.currentTime:0,v=d&&0!==d.playbackRate?Math.abs(d.playbackRate):1,m=this.bwEstimator?this.bwEstimator.getEstimate():o.abrEwmaDefaultEstimate,y=(c.BufferHelper.bufferInfo(d,_,o.maxBufferHole).end-_)/v,E=this.findBestLevel(m,l,n,y,o.abrBandWidthFactor,o.abrBandWidthUpFactor);if(E>=0)return E;h.logger.trace((y?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var T=f?Math.min(f,o.maxStarvationDelay):o.maxStarvationDelay,S=o.abrBandWidthFactor,D=o.abrBandWidthUpFactor;if(!y){var L=this.bitrateTestDelay;
vendor: 1,273 bytes, line 2
2L&&(T=(f?Math.min(f,o.maxLoadingDelay):o.maxLoadingDelay)-L,h.logger.trace("bitrate test took "+Math.round(1e3*L)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*T)+" ms"),S=D=1)}return E=this.findBestLevel(m,l,n,y+T,S,D),Math.max(E,0)},m.findBestLevel=function(e,t,r,n,o,l){for(var c,d=this.fragCurrent,f=this.partCurrent,_=this.lastLoadedFragLevel,v=this.hls.levels,m=v[_],y=!(null==m||null===(c=m.details)||void 0===c||!c.live),E=null==m?void 0:m.codecSet,T=f?f.duration:d?d.duration:0,i=r;i>=t;i--){var S=v[i];if(S&&(!E||S.codecSet===E)){var D=S.details,L=(f?null==D?void 0:D.partTarget:null==D?void 0:D.averagetargetduration)||T,I=void 0;I=i<=_?o*e:l*e;var A=v[i].maxBitrate,x=A*L/I;if(h.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+i+"/"+Math.round(I)+"/"+A+"/"+L+"/"+n+"/"+x),I>A&&(!x||y&&!this.bitrateTestDelay||x<n))return i}}return-1},t=e,(r=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator;if(-1!==e&&!t.canEstimate())return e;var r=this.getNextABRAutoLevel();return-1!==e&&this.hls.levels[r].loadError?e:(-1!==e&&(r=Math.min(e,r)),r)},set:function(e){this._nextAutoLevel=e}}])&&_(t.prototype,r),v&&_(t,v),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=v},
vendor: 40,203 bytes, line 2
2"./src/controller/audio-stream-controller.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/polyfills/number.ts"),o=r("./src/controller/base-stream-controller.ts"),l=r("./src/events.ts"),c=r("./src/utils/buffer-helper.ts"),d=r("./src/controller/fragment-tracker.ts"),f=r("./src/types/level.ts"),h=r("./src/types/loader.ts"),_=r("./src/loader/fragment.ts"),v=r("./src/demux/chunk-cache.ts"),m=r("./src/demux/transmuxer-interface.ts"),y=r("./src/types/transmuxer.ts"),E=r("./src/controller/fragment-finders.ts"),T=r("./src/utils/discontinuities.ts"),S=r("./src/errors.ts");function D(){return D=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},D.apply(this,arguments)}function L(e,p){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},L(e,p)}var I=function(e){var t,r;function I(t,r){var n;return(n=e.call(this,t,r,"[audio-stream-controller]")||this).videoBuffer=null,n.videoTrackCC=-1,n.waitingVideoCC=-1,n.audioSwitch=!1,n.trackId=-1,n.waitingData=null,n.mainDetails=null,n.bufferFlushed=!1,n.cachedTrackLoadedData=null,n._registerListeners(),n}r=e,(t=I).prototype=Object.create(r.prototype),t.prototype.constructor=t,L(t,r);var A=I.prototype;return A.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},A._registerListeners=function(){var e=this.hls;e.on(l.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(l.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(l.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(l.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(l.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(l.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(l.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(l.Events.ERROR,this.onError,this),e.on(l.Events.BUFFER_RESET,this.onBufferReset,this),e.on(l.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(l.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(l.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(l.Events.FRAG_BUFFERED,this.onFragBuffered,this)},A._unregisterListeners=function(){var e=this.hls;e.off(l.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(l.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(l.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(l.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(l.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(l.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(l.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(l.Events.ERROR,this.onError,this),e.off(l.Events.BUFFER_RESET,this.onBufferReset,this),e.off(l.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(l.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(l.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(l.Events.FRAG_BUFFERED,this.onFragBuffered,this)},A.onInitPtsFound=function(e,t){var r=t.frag,n=t.id,l=t.initPTS;if("main"===n){var c=r.cc;this.initPTS[r.cc]=l,this.log("InitPTS for cc: "+c+" found from main: "+l),this.videoTrackCC=c,this.state===o.State.WAITING_INIT_PTS&&this.tick()}},A.startLoad=function(e){if(!this.levels)return this.startPosition=e,void(this.state=o.State.STOPPED);var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t,this.state=o.State.IDLE):(this.loadedmetadata=!1,this.state=o.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},A.doTick=function(){switch(this.state){case o.State.IDLE:this.doTickIdle();break;case o.State.WAITING_TRACK:var t,r=this.levels,n=this.trackId,details=null==r||null===(t=r[n])||void 0===t?void 0:t.details;if(details){if(this.waitForCdnTuneIn(details))break;this.state=o.State.WAITING_INIT_PTS}break;case o.State.FRAG_LOADING_WAITING_RETRY:var l,d=performance.now(),f=this.retryDate;(!f||d>=f||null!==(l=this.media)&&void 0!==l&&l.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=o.State.IDLE);break;case o.State.WAITING_INIT_PTS:var h=this.waitingData;if(h){var _=h.frag,v=h.part,m=h.cache,y=h.complete;if(void 0!==this.initPTS[_.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=o.State.FRAG_LOADING;var data={frag:_,part:v,payload:m.flush(),networkDetails:null};this._handleFragmentLoadProgress(data),y&&e.prototype._handleFragmentLoadComplete.call(this,data)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log("Waiting fragment cc ("+_.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var T=this.getLoadPosition(),S=c.BufferHelper.bufferInfo(this.mediaBuffer,T,this.config.maxBufferHole);Object(E.fragmentWithinToleranceTest)(S.end,this.config.maxFragLookUpTolerance,_)<0&&(this.log("Waiting fragment cc ("+_.cc+") @ "+_.start+" cancelled because another fragment at "+S.end+" is needed"),this.clearWaitingFragment())}}else this.state=o.State.IDLE}this.onTickEnd()},A.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=o.State.IDLE)},A.resetLoadingState=function(){this.clearWaitingFragment(),e.prototype.resetLoadingState.call(this)},A.onTickEnd=function(){var e=this.media;if(e&&e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length&&(this.loadedmetadata=!0),this.lastCurrentTime=e.currentTime}},A.doTickIdle=function(){var e,t,r=this.hls,n=this.levels,c=this.media,d=this.trackId,f=r.config;if(n&&n[d]&&(c||!this.startFragRequested&&f.startFragPrefetch)){var v=n[d].details;if(!v||v.live&&this.levelLastLoaded!==d||this.waitForCdnTuneIn(v))this.state=o.State.WAITING_TRACK;else{var m=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&m&&(this.bufferFlushed=!1,this.afterBufferFlushed(m,_.ElementaryStreamTypes.AUDIO,h.PlaylistLevelType.AUDIO));var y=this.getFwdBufferInfo(m,h.PlaylistLevelType.AUDIO);if(null!==y){var E=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,h.PlaylistLevelType.MAIN),T=y.len,S=this.getMaxBufferLength(null==E?void 0:E.len),D=this.audioSwitch;if(!(T>=S)||D){if(!D&&this._streamEnded(y,v))return r.trigger(l.Events.BUFFER_EOS,{type:"audio"}),void(this.state=o.State.ENDED);var L=v.fragments[0].start,I=y.end;if(D&&c){var A=this.getLoadPosition();I=A,v.PTSKnown&&A<L&&(y.end>L||y.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),c.currentTime=L+.05)}if(!(E&&I>E.end+v.targetduration)&&(E&&E.len||!y.len)){var x=this.getNextFragment(I,v);x?"identity"!==(null===(e=x.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=x.decryptdata)&&void 0!==t&&t.key?this.loadFragment(x,v,I):this.loadKey(x,v):this.bufferFlushed=!0}}}}}},A.getMaxBufferLength=function(t){var r=e.prototype.getMaxBufferLength.call(this);return t?Math.max(r,t):r},A.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},A.onAudioTracksUpdated=function(e,t){var r=t.audioTracks;this.resetTransmuxer(),this.levels=r.map((function(e){return new f.Level(e)}))},A.onAudioTrackSwitching=function(e,data){var t=!!data.url;this.trackId=data.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),t?this.setInterval(100):this.resetTransmuxer(),t?(this.audioSwitch=!0,this.state=o.State.IDLE):this.state=o.State.STOPPED,this.tick()},A.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},A.onLevelLoaded=function(e,data){this.mainDetails=data.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(l.Events.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},A.onAudioTrackLoaded=function(e,data){var t;if(null!=this.mainDetails){var r=this.levels,n=data.details,l=data.id;if(r){this.log("Track "+l+" loaded ["+n.startSN+","+n.endSN+"],duration:"+n.totalduration);var track=r[l],c=0;if(n.live||null!==(t=track.details)&&void 0!==t&&t.live){var d=this.mainDetails;if(n.fragments[0]||(n.deltaUpdateFailed=!0),n.deltaUpdateFailed||!d)return;!track.details&&n.hasProgramDateTime&&d.hasProgramDateTime?(Object(T.alignMediaPlaylistByPDT)(n,d),c=n.fragments[0].start):c=this.alignPlaylists(n,track.details)}track.details=n,this.levelLastLoaded=l,this.startFragRequested||!this.mainDetails&&n.live||this.setStartPosition(track.details,c),this.state!==o.State.WAITING_TRACK||this.waitForCdnTuneIn(n)||(this.state=o.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+l)}else this.cachedTrackLoadedData=data},A._handleFragmentLoadProgress=function(data){var e,t=data.frag,r=data.part,n=data.payload,l=this.config,c=this.trackId,d=this.levels;if(d){var track=d[c];console.assert(track,"Audio track is defined on fragment load progress");var details=track.details;console.assert(details,"Audio track details are defined on fragment load progress");var f=l.defaultAudioCodec||track.audioCodec||"mp4a.40.2",_=this.transmuxer;_||(_=this.transmuxer=new m.default(this.hls,h.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var E=this.initPTS[t.cc],T=null===(e=t.initSegment)||void 0===e?void 0:e.data;if(void 0!==E){var S=r?r.index:-1,D=-1!==S,L=new y.ChunkMetadata(t.level,t.sn,t.stats.chunkCount,n.byteLength,S,D);_.push(n,T,f,"",t,r,details.totalduration,!1,L,E)}else this.log("Unknown video PTS for cc "+t.cc+", waiting for video PTS before demuxing audio frag "+t.sn+" of ["+details.startSN+" ,"+details.endSN+"],track "+c),(this.waitingData=this.waitingData||{frag:t,part:r,cache:new v.default,complete:!1}).cache.push(new Uint8Array(n)),this.waitingVideoCC=this.videoTrackCC,this.state=o.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+t.sn+" of level "+t.level+" will not be buffered")},A._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},A.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},A.onBufferCreated=function(e,data){var t=data.tracks.audio;t&&(this.mediaBuffer=t.buffer||null),data.tracks.video&&(this.videoBuffer=data.tracks.video.buffer||null)},A.onFragBuffered=function(e,data){var t=data.frag,r=data.part;t.type===h.PlaylistLevelType.AUDIO&&(this.fragContextChanged(t)?this.warn("Fragment "+t.sn+(r?" p: "+r.index:"")+" of level "+t.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==t.sn&&(this.fragPrevious=t,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(l.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(t,r)))},A.onError=function(t,data){switch(data.details){case S.ErrorDetails.FRAG_LOAD_ERROR:case S.ErrorDetails.FRAG_LOAD_TIMEOUT:case S.ErrorDetails.KEY_LOAD_ERROR:case S.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.AUDIO,data);break;case S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case S.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==o.State.ERROR&&this.state!==o.State.STOPPED&&(this.state=data.fatal?o.State.ERROR:o.State.IDLE,this.warn(data.details+" while loading frag, switching to "+this.state+" state"));break;case S.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===data.parent&&(this.state===o.State.PARSING||this.state===o.State.PARSED)){var r=!0,n=this.getFwdBufferInfo(this.mediaBuffer,h.PlaylistLevelType.AUDIO);n&&n.len>.5&&(r=!this.reduceMaxBufferLength(n.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},A.onBufferFlushed=function(e,t){t.type===_.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},A._handleTransmuxComplete=function(e){var t,r="audio",n=this.hls,c=e.remuxResult,d=e.chunkMeta,f=this.getCurrentContext(d);if(!f)return this.warn("The loading context changed while buffering fragment "+d.sn+" of level "+d.level+". This chunk will not be buffered."),void this.resetStartWhenNotLoaded(d.level);var h=f.frag,v=f.part,details=f.level.details,audio=c.audio,text=c.text,m=c.id3,y=c.initSegment;if(!this.fragContextChanged(h)&&details){if(this.state=o.State.PARSING,this.audioSwitch&&audio&&this.completeAudioSwitch(),null!=y&&y.tracks&&(this._bufferInitSegment(y.tracks,h,d),n.trigger(l.Events.FRAG_PARSING_INIT_SEGMENT,{frag:h,id:r,tracks:y.tracks})),audio){var E=audio.startPTS,T=audio.endPTS,S=audio.startDTS,L=audio.endDTS;v&&(v.elementaryStreams[_.ElementaryStreamTypes.AUDIO]={startPTS:E,endPTS:T,startDTS:S,endDTS:L}),h.setElementaryStreamInfo(_.ElementaryStreamTypes.AUDIO,E,T,S,L),this.bufferFragmentData(audio,h,v,d)}if(null!=m&&null!==(t=m.samples)&&void 0!==t&&t.length){var I=D({id:r,frag:h,details:details},m);n.trigger(l.Events.FRAG_PARSING_METADATA,I)}if(text){var A=D({id:r,frag:h,details:details},text);n.trigger(l.Events.FRAG_PARSING_USERDATA,A)}}},A._bufferInitSegment=function(e,t,r){if(this.state===o.State.PARSING){e.video&&delete e.video;var track=e.audio;if(track){track.levelCodec=track.codec,track.id="audio",this.log("Init audio buffer, container:"+track.container+", codecs[parsed]=["+track.codec+"]"),this.hls.trigger(l.Events.BUFFER_CODECS,e);var n=track.initSegment;if(null!=n&&n.byteLength){var c={type:"audio",frag:t,part:null,chunkMeta:r,parent:t.type,data:n};this.hls.trigger(l.Events.BUFFER_APPENDING,c)}this.tick()}}},A.loadFragment=function(t,r,l){var c=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||c===d.FragmentState.NOT_LOADED||c===d.FragmentState.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t):r.live&&!Object(n.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=o.State.WAITING_INIT_PTS):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,r,l)))},A.completeAudioSwitch=function(){var t=this.hls,r=this.media,n=this.trackId;r&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(l.Events.AUDIO_TRACK_SWITCHED,{id:n})},I}(o.default);t.default=I},"./src/controller/audio-track-controller.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/events.ts"),o=r("./src/errors.ts"),l=r("./src/controller/base-playlist-controller.ts"),c=r("./src/types/loader.ts");function d(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,p){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},f(e,p)}var h=function(e){var t,r;function l(t){var r;return(r=e.call(this,t,"[audio-track-controller]")||this).tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.trackName="",r.selectDefaultTrack=!0,r.registerListeners(),r}r=e,(t=l).prototype=Object.create(r.prototype),t.prototype.constructor=t,f(t,r);var h,_,v,m=l.prototype;return m.registerListeners=function(){var e=this.hls;e.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(n.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(n.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){var e=this.hls;e.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(n.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(n.Events.ERROR,this.onError,this)},m.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,e.prototype.destroy.call(this)},m.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},m.onManifestParsed=function(e,data){this.tracks=data.audioTracks||[]},m.onAudioTrackLoaded=function(e,data){var t=data.id,details=data.details,r=this.tracksInGroup[t];if(r){var n=r.details;r.details=data.details,this.log("audioTrack "+t+" loaded ["+details.startSN+"-"+details.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,data,n))}else this.warn("Invalid audio track id "+t)},m.onLevelLoading=function(e,data){this.switchLevel(data.level)},m.onLevelSwitching=function(e,data){this.switchLevel(data.level)},m.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.audioGroupIds){var r=t.audioGroupIds[t.urlId];if(this.groupId!==r){this.groupId=r;var o=this.tracks.filter((function(track){return!r||track.groupId===r}));this.selectDefaultTrack&&!o.some((function(track){return track.default}))&&(this.selectDefaultTrack=!1),this.tracksInGroup=o;var l={audioTracks:o};this.log("Updating audio tracks, "+o.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(n.Events.AUDIO_TRACKS_UPDATED,l),this.selectInitialTrack()}}},m.onError=function(t,data){e.prototype.onError.call(this,t,data),!data.fatal&&data.context&&data.context.type===c.PlaylistContextType.AUDIO_TRACK&&data.context.id===this.trackId&&data.context.groupId===this.groupId&&this.retryLoadingOrFail(data)},m.setAudioTrack=function(e){var t=this.tracksInGroup;if(e<0||e>=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var r=t[this.trackId];this.log("Now switching to audio-track index "+e);var track=t[e],o=track.id,l=track.groupId,c=void 0===l?"":l,d=track.name,f=track.type,h=track.url;if(this.trackId=e,this.trackName=d,this.selectDefaultTrack=!1,this.hls.trigger(n.Events.AUDIO_TRACK_SWITCHING,{id:o,groupId:c,name:d,type:f,url:h}),!track.details||track.details.live){var _=this.switchParams(track.url,null==r?void 0:r.details);this.loadPlaylist(_)}}},m.selectInitialTrack=function(){var e=this.tracksInGroup;console.assert(e.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,r=this.findTrackId(t)||this.findTrackId();-1!==r?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},m.findTrackId=function(e){for(var t=this.tracksInGroup,i=0;i<t.length;i++){var track=t[i];if((!this.selectDefaultTrack||track.default)&&(!e||e===track.name))return track.id}return-1},m.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var r=t.id,o=t.groupId,l=t.url;if(e)try{l=e.addDirectives(l)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("loading audio-track playlist for id: "+r),this.clearTimer(),this.hls.trigger(n.Events.AUDIO_TRACK_LOADING,{url:l,id:r,groupId:o,deliveryDirectives:e||null})}},h=l,(_=[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}])&&d(h.prototype,_),v&&d(h,v),Object.defineProperty(h,"prototype",{writable:!1}),l}(l.default);t.default=h},"./src/controller/base-playlist-controller.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return f}));var n=r("./src/polyfills/number.ts"),o=r("./src/types/level.ts"),l=r("./src/controller/level-helper.ts"),c=r("./src/utils/logger.ts"),d=r("./src/errors.ts"),f=function(){function e(e,t){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=c.logger.log.bind(c.logger,t+":"),this.warn=c.logger.warn.bind(c.logger,t+":"),this.hls=e}var t=e.prototype;return t.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},t.onError=function(e,data){data.fatal&&data.type===d.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},t.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},t.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},t.stopLoad=function(){this.canLoad=!1,this.clearTimer()},t.switchParams=function(e,t){var r=null==t?void 0:t.renditionReports;if(r)for(var i=0;i<r.length;i++){var l=r[i],c=""+l.URI;if(c===e.slice(-c.length)){var d=parseInt(l["LAST-MSN"]),f=parseInt(l["LAST-PART"]);if(t&&this.hls.config.lowLatencyMode){var h=Math.min(t.age-t.partTarget,t.targetduration);void 0!==f&&h>t.partTarget&&(f+=1)}if(Object(n.isFiniteNumber)(d))return new o.HlsUrlParameters(d,Object(n.isFiniteNumber)(f)?f:void 0,o.HlsSkip.No)}}},t.loadPlaylist=function(e){},t.shouldLoadTrack=function(track){return this.canLoad&&track&&!!track.url&&(!track.details||track.details.live)},t.playlistLoaded=function(e,data,t){var r=this,details=data.details,n=data.stats,o=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(details.advancedDateTime=Date.now()-o,details.live||null!=t&&t.live){if(details.reloaded(t),t&&this.log("live playlist "+e+" "+(details.advanced?"REFRESHED "+details.lastPartSn+"-"+details.lastPartIndex:"MISSED")),t&&details.fragments.length>0&&Object(l.mergeDetails)(t,details),!this.canLoad||!details.live)return;var c,d=void 0,f=void 0;if(details.canBlockReload&&details.endSN&&details.advanced){var h=this.hls.config.lowLatencyMode,_=details.lastPartSn,v=details.endSN,m=details.lastPartIndex,y=_===v;-1!==m?(d=y?v+1:_,f=y?h?0:m:m+1):d=v+1;var E=details.age,T=E+details.ageHeader,S=Math.min(T-details.partTarget,1.5*details.targetduration);if(S>0){if(t&&S>t.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+t.tuneInGoal+" to: "+S+" with playlist age: "+details.age),S=0;else{var D=Math.floor(S/details.targetduration);d+=D,void 0!==f&&(f+=Math.round(S%details.targetduration/details.partTarget)),this.log("CDN Tune-in age: "+details.ageHeader+"s last advanced "+E.toFixed(2)+"s goal: "+S+" skip sn "+D+" to part "+f)}details.tuneInGoal=S}if(c=this.getDeliveryDirectives(details,data.deliveryDirectives,d,f),h||!y)return void this.loadPlaylist(c)}else c=this.getDeliveryDirectives(details,data.deliveryDirectives,d,f);var L=Object(l.computeReloadInterval)(details,n);void 0!==d&&details.canBlockReload&&(L-=details.partTarget||1),this.log("reload live playlist "+e+" in "+Math.round(L)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(c)}),L)}else this.clearTimer()},t.getDeliveryDirectives=function(details,e,t,r){var n=Object(o.getSkipValue)(details,t);return null!=e&&e.skip&&details.deltaUpdateFailed&&(t=e.msn,r=e.part,n=o.HlsSkip.No),new o.HlsUrlParameters(t,r,n)},t.retryLoadingOrFail=function(e){var t,r=this,n=this.hls.config,o=this.retryCount<n.levelLoadingMaxRetry;if(o)if(this.retryCount++,e.details.indexOf("LoadTimeOut")>-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var l=Math.min(Math.pow(2,this.retryCount)*n.levelLoadingRetryDelay,n.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return r.loadPlaylist()}),l),this.warn("retry playlist loading #"+this.retryCount+" in "+l+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return o},e}()},"./src/controller/base-stream-controller.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"State",(function(){return M})),r.d(t,"default",(function(){return k}));var n=r("./src/polyfills/number.ts"),o=r("./src/task-loop.ts"),l=r("./src/controller/fragment-tracker.ts"),c=r("./src/utils/buffer-helper.ts"),d=r("./src/utils/logger.ts"),f=r("./src/events.ts"),h=r("./src/errors.ts"),_=r("./src/types/transmuxer.ts"),v=r("./src/utils/mp4-tools.ts"),m=r("./src/utils/discontinuities.ts"),y=r("./src/controller/fragment-finders.ts"),E=r("./src/controller/level-helper.ts"),T=r("./src/loader/fragment-loader.ts"),S=r("./src/crypt/decrypter.ts"),D=r("./src/utils/time-ranges.ts"),L=r("./src/types/loader.ts");function I(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e,p){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},x(e,p)}var M={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},k=function(e){var t,r;function o(t,r,n){var o;return(o=e.call(this)||this).hls=void 0,o.fragPrevious=null,o.fragCurrent=null,o.fragmentTracker=void 0,o.transmuxer=null,o._state=M.STOPPED,o.media=null,o.mediaBuffer=null,o.config=void 0,o.bitrateTest=!1,o.lastCurrentTime=0,o.nextLoadPosition=0,o.startPosition=0,o.loadedmetadata=!1,o.fragLoadError=0,o.retryDate=0,o.levels=null,o.fragmentLoader=void 0,o.levelLastLoaded=null,o.startFragRequested=!1,o.decrypter=void 0,o.initPTS=[],o.onvseeking=null,o.onvended=null,o.logPrefix="",o.log=void 0,o.warn=void 0,o.logPrefix=n,o.log=d.logger.log.bind(d.logger,n+":"),o.warn=d.logger.warn.bind(d.logger,n+":"),o.hls=t,o.fragmentLoader=new T.default(t.config),o.fragmentTracker=r,o.config=t.config,o.decrypter=new S.default(t,t.config),t.on(f.Events.KEY_LOADED,o.onKeyLoaded,A(o)),t.on(f.Events.LEVEL_SWITCHING,o.onLevelSwitching,A(o)),o}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,x(t,r);var k,w,N,R=o.prototype;return R.doTick=function(){this.onTickEnd()},R.onTickEnd=function(){},R.startLoad=function(e){},R.stopLoad=function(){this.fragmentLoader.abort();var e=this.fragCurrent;e&&this.fragmentTracker.removeFragment(e),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=M.STOPPED},R._streamEnded=function(e,t){var r=this.fragCurrent,n=this.fragmentTracker;if(!t.live&&r&&this.media&&r.sn>=t.endSN&&!e.nextStart){var o=t.partList;if(null!=o&&o.length){var d=o[o.length-1];return c.BufferHelper.isBuffered(this.media,d.start+d.duration/2)}var f=n.getState(r);return f===l.FragmentState.PARTIAL||f===l.FragmentState.OK}return!1},R.onMediaAttached=function(e,data){var t=this.media=this.mediaBuffer=data.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.state===M.STOPPED&&this.startLoad(r.startPosition)},R.onMediaDetaching=function(){var e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},R.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,r=this.media,o=this.mediaBuffer,l=this.state,d=r?r.currentTime:0,f=c.BufferHelper.bufferInfo(o||r,d,e.maxBufferHole);if(this.log("media seeking to "+(Object(n.isFiniteNumber)(d)?d.toFixed(3):d)+", state: "+l),l===M.ENDED)this.resetLoadingState();else if(t&&!f.len){var h=e.maxFragLookUpTolerance,_=t.start-h,v=d>t.start+t.duration+h;(d<_||v)&&(v&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.loader.abort()),this.resetLoadingState())}r&&(this.lastCurrentTime=d),this.loadedmetadata||f.len||(this.nextLoadPosition=this.startPosition=d),this.tickImmediate()},R.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},R.onKeyLoaded=function(e,data){if(this.state===M.KEY_LOADING&&data.frag===this.fragCurrent&&this.levels){this.state=M.IDLE;var t=this.levels[data.frag.level].details;t&&this.loadFragment(data.frag,t,data.frag.start)}},R.onLevelSwitching=function(e,data){this.fragLoadError=0},R.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},R.onHandlerDestroyed=function(){this.state=M.STOPPED,this.hls.off(f.Events.KEY_LOADED,this.onKeyLoaded,this),this.hls.off(f.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,e.prototype.onHandlerDestroyed.call(this)},R.loadKey=function(e,details){this.log("Loading key for "+e.sn+" of ["+details.startSN+"-"+details.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level),this.state=M.KEY_LOADING,this.fragCurrent=e,this.hls.trigger(f.Events.KEY_LOADING,{frag:e})},R.loadFragment=function(e,t,r){this._loadFragForPlayback(e,t,r)},R._loadFragForPlayback=function(e,t,r){var n=this;this._doFragLoad(e,t,r,(function(data){if(n.fragContextChanged(e))return n.warn("Fragment "+e.sn+(data.part?" p: "+data.part.index:"")+" of level "+e.level+" was dropped during download."),void n.fragmentTracker.removeFragment(e);e.stats.chunkCount++,n._handleFragmentLoadProgress(data)})).then((function(data){if(data){n.fragLoadError=0;var t=n.state;n.fragContextChanged(e)?(t===M.FRAG_LOADING||!n.fragCurrent&&t===M.PARSING)&&(n.fragmentTracker.removeFragment(e),n.state=M.IDLE):("payload"in data&&(n.log("Loaded fragment "+e.sn+" of level "+e.level),n.hls.trigger(f.Events.FRAG_LOADED,data)),n._handleFragmentLoadComplete(data))}})).catch((function(t){n.state!==M.STOPPED&&n.state!==M.ERROR&&(n.warn(t),n.resetFragmentLoading(e))}))},R.flushMainBuffer=function(e,t,r){if(void 0===r&&(r=null),e-t){var n={startOffset:e,endOffset:t,type:r};this.fragLoadError=0,this.hls.trigger(f.Events.BUFFER_FLUSHING,n)}},R._loadInitSegment=function(e){var t=this;this._doFragLoad(e).then((function(data){if(!data||t.fragContextChanged(e)||!t.levels)throw new Error("init load aborted");return data})).then((function(data){var r=t.hls,n=data.payload,o=e.decryptdata;if(n&&n.byteLength>0&&o&&o.key&&o.iv&&"AES-128"===o.method){var l=self.performance.now();return t.decrypter.webCryptoDecrypt(new Uint8Array(n),o.key.buffer,o.iv.buffer).then((function(t){var n=self.performance.now();return r.trigger(f.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:l,tdecrypt:n}}),data.payload=t,data}))}return data})).then((function(data){var r=t.fragCurrent,n=t.hls,o=t.levels;if(!o)throw new Error("init load aborted, missing levels");var details=o[e.level].details;console.assert(details,"Level details are defined when init segment is loaded");var l=e.stats;t.state=M.IDLE,t.fragLoadError=0,e.data=new Uint8Array(data.payload),l.parsing.start=l.buffering.start=self.performance.now(),l.parsing.end=l.buffering.end=self.performance.now(),data.frag===r&&n.trigger(f.Events.FRAG_BUFFERED,{stats:l,frag:r,part:null,id:e.type}),t.tick()})).catch((function(r){t.state!==M.STOPPED&&t.state!==M.ERROR&&(t.warn(r),t.resetFragmentLoading(e))}))},R.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},R.fragBufferedComplete=function(e,t){var r=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" "+(r?D.default.toString(c.BufferHelper.getBuffered(r)):"(detached)")),this.state=M.IDLE,r&&(!this.loadedmetadata&&r.buffered.length&&this.fragCurrent===this.fragPrevious&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},R.seekToStartPos=function(){},R._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var r=e.frag,n=e.part,o=e.partsLoaded,l=!o||0===o.length||o.some((function(e){return!e})),c=new _.ChunkMetadata(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!l);t.flush(c)}},R._handleFragmentLoadProgress=function(e){},R._doFragLoad=function(e,details,t,r){var o=this;if(void 0===t&&(t=null),!this.levels)throw new Error("frag load aborted, missing levels");if(t=Math.max(e.start,t||0),this.config.lowLatencyMode&&details){var l=details.partList;if(l&&r){t>e.end&&details.fragmentHint&&(e=details.fragmentHint);var c=this.getNextPart(l,e,t);if(c>-1){var d=l[c];return this.log("Loading part sn: "+e.sn+" p: "+d.index+" cc: "+e.cc+" of playlist ["+details.startSN+"-"+details.endSN+"] parts [0-"+c+"-"+(l.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(t.toFixed(3))),this.nextLoadPosition=d.start+d.duration,this.state=M.FRAG_LOADING,this.hls.trigger(f.Events.FRAG_LOADING,{frag:e,part:l[c],targetBufferTime:t}),this.doFragPartsLoad(e,l,c,r).catch((function(e){return o.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(l,t))return Promise.resolve(null)}}return this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(details?"of ["+details.startSN+"-"+details.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(t.toFixed(3))),Object(n.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=M.FRAG_LOADING,this.hls.trigger(f.Events.FRAG_LOADING,{frag:e,targetBufferTime:t}),this.fragmentLoader.load(e,r).catch((function(e){return o.handleFragLoadError(e)}))},R.doFragPartsLoad=function(e,t,r,n){var o=this;return new Promise((function(l,c){var d=[];!function r(h){var _=t[h];o.fragmentLoader.loadPart(e,_,n).then((function(n){d[_.index]=n;var c=n.part;o.hls.trigger(f.Events.FRAG_LOADED,n);var v=t[h+1];if(!v||v.fragment!==e)return l({frag:e,part:c,partsLoaded:d});r(h+1)})).catch(c)}(r)}))},R.handleFragLoadError=function(e){var data=e.data;return data&&data.details===h.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(data.frag,data.part):this.hls.trigger(f.Events.ERROR,data),null},R._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===M.PARSING){var r=t.frag,n=t.part,o=t.level,l=self.performance.now();r.stats.parsing.end=l,n&&(n.stats.parsing.end=l),this.updateLevelTiming(r,n,o,e.partial)}else this.fragCurrent||(this.state=M.IDLE)},R.getCurrentContext=function(e){var t=this.levels,r=e.level,n=e.sn,o=e.part;if(!t||!t[r])return this.warn("Levels object was unset while buffering fragment "+n+" of level "+r+". The current chunk will not be buffered."),null;var l=t[r],c=o>-1?Object(E.getPartWith)(l,n,o):null,d=c?c.fragment:Object(E.getFragmentWithSN)(l,n,this.fragCurrent);return d?{frag:d,part:c,level:l}:null},R.bufferFragmentData=function(data,e,t,r){if(data&&this.state===M.PARSING){var n=data.data1,o=data.data2,l=n;if(n&&o&&(l=Object(v.appendUint8Array)(n,o)),l&&l.length){var c={type:data.type,frag:e,part:t,chunkMeta:r,parent:e.type,data:l};this.hls.trigger(f.Events.BUFFER_APPENDING,c),data.dropped&&data.independent&&!t&&this.flushBufferGap(e)}}},R.flushBufferGap=function(e){var t=this.media;if(t)if(c.BufferHelper.isBuffered(t,t.currentTime)){var r=t.currentTime,n=c.BufferHelper.bufferInfo(t,r,0),o=e.duration,l=Math.min(2*this.config.maxFragLookUpTolerance,.25*o),d=Math.max(Math.min(e.start-l,n.end-l),r+l);e.start-d>l&&this.flushMainBuffer(d,e.start)}else this.flushMainBuffer(0,e.start)},R.getFwdBufferInfo=function(e,t){var r=this.config,o=this.getLoadPosition();if(!Object(n.isFiniteNumber)(o))return null;var l=c.BufferHelper.bufferInfo(e,o,r.maxBufferHole);if(0===l.len&&void 0!==l.nextStart){var d=this.fragmentTracker.getBufferedFrag(o,t);if(d&&l.nextStart<d.end)return c.BufferHelper.bufferInfo(e,o,Math.max(l.nextStart,r.maxBufferHole))}return l},R.getMaxBufferLength=function(e){var t,r=this.config;return t=e?Math.max(8*r.maxBufferSize/e,r.maxBufferLength):r.maxBufferLength,Math.min(t,r.maxMaxBufferLength)},R.reduceMaxBufferLength=function(e){var t=this.config,r=e||t.maxBufferLength;return t.maxMaxBufferLength>=r&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},R.getNextFragment=function(e,t){var r=t.fragments,n=r.length;if(!n)return null;var o,l=this.config,c=r[0].start;if(t.live){var d=l.initialLiveManifestSize;if(n<d)return this.warn("Not enough fragments to start playback (have: "+n+", need: "+d+")"),null;t.PTSKnown||this.startFragRequested||-1!==this.startPosition||(o=this.getInitialLiveFragment(t,r),this.startPosition=o?this.hls.liveSyncPosition||o.start:e)}else e<=c&&(o=r[0]);if(!o){var f=l.lowLatencyMode?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,f,t)}return this.mapToInitFragWhenRequired(o)},R.mapToInitFragWhenRequired=function(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment},R.getNextPart=function(e,t,r){for(var n=-1,o=!1,l=!0,i=0,c=e.length;i<c;i++){var d=e[i];if(l=l&&!d.independent,n>-1&&r<d.start)break;var f=d.loaded;!f&&(o||d.independent||l)&&d.fragment===t&&(n=i),o=f}return n},R.loadedEndOfParts=function(e,t){var r=e[e.length-1];return r&&t>r.start&&r.loaded},R.getInitialLiveFragment=function(e,t){var r=this.fragPrevious,n=null;if(r){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),n=Object(y.findFragmentByPDT)(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!n){var o=r.sn+1;if(o>=e.startSN&&o<=e.endSN){var l=t[o-e.startSN];r.cc===l.cc&&(n=l,this.log("Live playlist, switching playlist, load frag with next SN: "+n.sn))}n||(n=Object(y.findFragWithCC)(t,r.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+n.sn)}}else{var c=this.hls.liveSyncPosition;null!==c&&(n=this.getFragmentAtPosition(c,this.bitrateTest?e.fragmentEnd:e.edge,e))}return n},R.getFragmentAtPosition=function(e,t,r){var n,o=this.config,c=this.fragPrevious,d=r.fragments,f=r.endSN,h=r.fragmentHint,_=o.maxFragLookUpTolerance,v=!!(o.lowLatencyMode&&r.partList&&h);if(v&&h&&!this.bitrateTest&&(d=d.concat(h),f=h.sn),e<t){var m=e>t-_?0:_;n=Object(y.findFragmentByPTS)(c,d,e,m)}else n=d[d.length-1];if(n){var E=n.sn-r.startSN;if(c&&n.sn===c.sn&&!v&&c&&n.level===c.level){var T=d[E+1];n.sn<f&&this.fragmentTracker.getState(T)!==l.FragmentState.OK?(this.log("SN "+n.sn+" just loaded, load next one: "+T.sn),n=T):n=null}}return n},R.synchronizeToLiveEdge=function(e){var t=this.config,r=this.media;if(r){var n=this.hls.liveSyncPosition,o=r.currentTime,l=e.fragments[0].start,c=e.edge,d=o>=l-t.maxFragLookUpTolerance&&o<=c;if(null!==n&&r.duration>n&&(o<n||!d)){var f=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!d&&r.readyState<4||o<c-f)&&(this.loadedmetadata||(this.nextLoadPosition=n),r.readyState&&(this.warn("Playback: "+o.toFixed(3)+" is located too far from the end of live sliding playlist: "+c+", reset currentTime to : "+n.toFixed(3)),r.currentTime=n))}}},R.alignPlaylists=function(details,e){var t=this.levels,r=this.levelLastLoaded,o=this.fragPrevious,l=null!==r?t[r]:null,c=details.fragments.length;if(!c)return this.warn("No fragments in live playlist"),0;var d=details.fragments[0].start,f=!e,h=details.alignedSliding&&Object(n.isFiniteNumber)(d);if(f||!h&&!d){Object(m.alignStream)(o,l,details);var _=details.fragments[0].start;return this.log("Live playlist sliding: "+_.toFixed(2)+" start-sn: "+(e?e.startSN:"na")+"->"+details.startSN+" prev-sn: "+(o?o.sn:"na")+" fragments: "+c),_}return d},R.waitForCdnTuneIn=function(details){return details.live&&details.canBlockReload&&details.partTarget&&details.tuneInGoal>
vendor: 3,661 bytes, line 2
2Math.max(details.partHoldBack,3*details.partTarget)},R.setStartPosition=function(details,e){var t=this.startPosition;if(t<e&&(t=-1),-1===t||-1===this.lastCurrentTime){var r=details.startTimeOffset;Object(n.isFiniteNumber)(r)?(t=e+r,r<0&&(t+=details.totalduration),t=Math.min(Math.max(e,t),e+details.totalduration),this.log("Start time offset "+r+" found in playlist, adjust startPosition to "+t),this.startPosition=t):details.live?t=this.hls.liveSyncPosition||e:this.startPosition=t=0,this.lastCurrentTime=t}this.nextLoadPosition=t},R.getLoadPosition=function(){var e=this.media,t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t},R.handleFragLoadAborted=function(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn("Fragment "+e.sn+(t?" part"+t.index:"")+" of level "+e.level+" was aborted"),this.resetFragmentLoading(e))},R.resetFragmentLoading=function(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===M.FRAG_LOADING_WAITING_RETRY)||(this.state=M.IDLE)},R.onFragmentOrKeyLoadError=function(e,data){if(!data.fatal){var t=data.frag;if(t&&t.type===e){var r=this.fragCurrent;console.assert(r&&t.sn===r.sn&&t.level===r.level&&t.urlId===r.urlId,"Frag load error must match current frag to retry");var n=this.config;if(this.fragLoadError+1<=n.fragLoadingMaxRetry){this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition);var o=Math.min(Math.pow(2,this.fragLoadError)*n.fragLoadingRetryDelay,n.fragLoadingMaxRetryTimeout);this.warn("Fragment "+t.sn+" of "+e+" "+t.level+" failed to load, retrying in "+o+"ms"),this.retryDate=self.performance.now()+o,this.fragLoadError++,this.state=M.FRAG_LOADING_WAITING_RETRY}else data.levelRetry?(e===L.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=M.IDLE):(d.logger.error(data.details+" reaches max retry, redispatch as fatal ..."),data.fatal=!0,this.hls.stopLoad(),this.state=M.ERROR)}}},R.afterBufferFlushed=function(e,t,r){if(e){var n=c.BufferHelper.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===M.ENDED&&this.resetLoadingState()}},R.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=M.IDLE},R.resetStartWhenNotLoaded=function(e){if(!this.loadedmetadata){this.startFragRequested=!1;var details=this.levels?this.levels[e].details:null;null!=details&&details.live?(this.startPosition=-1,this.setStartPosition(details,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},R.updateLevelTiming=function(e,t,r,n){var o=this,details=r.details;console.assert(!!details,"level.details must be defined"),Object.keys(e.elementaryStreams).reduce((function(t,l){var c=e.elementaryStreams[l];if(c){var d=c.endPTS-c.startPTS;if(d<=0)return o.warn("Could not parse fragment "+e.sn+" "+l+" duration reliably ("+d+")"),t||!1;var h=n?0:Object(E.updateFragPTSDTS)(details,e,c.startPTS,c.endPTS,c.startDTS,c.endDTS);return o.hls.trigger(f.Events.LEVEL_PTS_UPDATED,{details:details,level:r,drift:h,type:l,frag:e,start:c.startPTS,end:c.endPTS}),!0}return t}),!1)||(this.warn("Found no media in fragment "+e.sn+" of level "+r.id+" resetting transmuxer to fallback to playlist timing"),this.resetTransmuxer()),this.state=M.PARSED,this.hls.trigger(f.Events.FRAG_PARSED,{frag:e,part:t})},R.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},k=o,(w=[{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}])&&I(k.prototype,w),N&&I(k,N),Object.defineProperty(k,"prototype",{writable:!1}),o}(o.default)},
vendor: 4,494 bytes, line 2
2"./src/controller/buffer-controller.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return y}));var n=r("./src/polyfills/number.ts"),o=r("./src/events.ts"),l=r("./src/utils/logger.ts"),c=r("./src/errors.ts"),d=r("./src/utils/buffer-helper.ts"),f=r("./src/utils/mediasource-helper.ts"),h=r("./src/loader/fragment.ts"),_=r("./src/controller/buffer-operation-queue.ts"),v=Object(f.getMediaSource)(),m=/([ha]vc.)(?:\.[^.,]+)+/,y=function(){function e(e){var t=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var e=t.hls,r=t.media,n=t.mediaSource;l.logger.log("[buffer-controller]: Media source opened"),r&&(t.updateMediaElementDuration(),e.trigger(o.Events.MEDIA_ATTACHED,{media:r})),n&&n.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){l.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){l.logger.log("[buffer-controller]: Media source ended")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null},t.registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.BUFFER_RESET,this.onBufferReset,this),e.on(o.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(o.Events.BUFFER_EOS,this.onBufferEos,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(o.Events.FRAG_PARSED,this.onFragParsed,this),e.on(o.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.BUFFER_RESET,this.onBufferReset,this),e.off(o.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(o.Events.BUFFER_EOS,this.onBufferEos,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(o.Events.FRAG_PARSED,this.onFragParsed,this),e.off(o.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new _.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},t.onManifestParsed=function(e,data){var t=2;(data.audio&&!data.video||!data.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,l.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,data){var t=this.media=data.media;if(t&&v){var r=this.mediaSource=new v;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(r),this._objectUrl=t.src}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,r=this._objectUrl;if(t){if(l.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){l.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(r&&self.URL.revokeObjectURL(r),e.src===r?(e.removeAttribute("src"),e.load()):l.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(o.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;
vendor: 4,319 bytes, line 2
2this.getSourceBufferTypes().forEach((function(t){var r=e.sourceBuffer[t];try{r&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(r),e.sourceBuffer[t]=void 0)}catch(e){l.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,data){var t=this,r=this.getSourceBufferTypes().length;Object.keys(data).forEach((function(e){if(r){var track=t.tracks[e];if(track&&"function"==typeof track.buffer.changeType){var n=data[e],o=n.id,c=n.codec,d=n.levelCodec,f=n.container,h=n.metadata,_=(track.levelCodec||track.codec).replace(m,"$1"),v=(d||c).replace(m,"$1");if(_!==v){var y=f+";codecs="+(d||c);t.appendChangeType(e,y),l.logger.log("[buffer-controller]: switching codec "+_+" to "+v),t.tracks[e]={buffer:track.buffer,codec:c,container:f,levelCodec:d,metadata:h,id:o}}}}else t.pendingTracks[e]=data[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var r=this,n=this.operationQueue,o={execute:function(){var o=r.sourceBuffer[e];o&&(l.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),o.changeType(t)),n.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){l.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};n.append(o,e)},t.onBufferAppending=function(e,t){var r=this,n=this.hls,f=this.operationQueue,h=this.tracks,data=t.data,_=t.type,v=t.frag,m=t.part,y=t.chunkMeta,E=y.buffering[_],T=self.performance.now();E.start=T;var S=v.stats.buffering,D=m?m.stats.buffering:null;0===S.start&&(S.start=T),D&&0===D.start&&(D.start=T);var L=h.audio,I="audio"===_&&1===y.id&&"audio/mpeg"===(null==L?void 0:L.container),A={execute:function(){if(E.executeStart=self.performance.now(),I){var e=r.sourceBuffer[_];if(e){var t=v.start-e.timestampOffset;Math.abs(t)>=.1&&(l.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+v.start+" (delta: "+t+") sn: "+v.sn+")"),e.timestampOffset=v.start)}}r.appendExecutor(data,_)},onStart:function(){},onComplete:function(){var e=self.performance.now();E.executeEnd=E.end=e,0===S.first&&(S.first=e),D&&0===D.first&&(D.first=e);var t=r.sourceBuffer,n={};for(var l in t)n[l]=d.BufferHelper.getBuffered(t[l]);r.appendError=0,r.hls.trigger(o.Events.BUFFER_APPENDED,{type:_,frag:v,part:m,chunkMeta:y,parent:v.type,timeRanges:n})},onError:function(e){l.logger.error("[buffer-controller]: Error encountered while trying to append to the "+_+" SourceBuffer",e);var t={type:c.ErrorTypes.MEDIA_ERROR,parent:v.type,details:c.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=c.ErrorDetails.BUFFER_FULL_ERROR:(r.appendError++,t.details=c.ErrorDetails.BUFFER_APPEND_ERROR,r.appendError>n.config.appendErrorMaxRetry&&(l.logger.error("[buffer-controller]: Failed "+n.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0,n.stopLoad())),n.trigger(o.Events.ERROR,t)}};f.append(A,_)},t.onBufferFlushing=function(e,data){var t=this,r=this.operationQueue,n=function(e){return{execute:t.removeExecutor.bind(t,e,data.startOffset,data.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(o.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){l.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};data.type?r.append(n(data.type),data.type):this.getSourceBufferTypes().forEach((function(e){r.append(n(e),e)}))},t.onFragParsed=function(e,data){var t=this,r=data.frag,n=data.part,c=[],d=n?n.elementaryStreams:r.elementaryStreams;d[h.ElementaryStreamTypes.AUDIOVIDEO]?c.push("audiovideo"):(d[h.ElementaryStreamTypes.AUDIO]&&c.push("audio"),d[h.ElementaryStreamTypes.VIDEO]&&c.push("video")),0===c.length&&l.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,n&&(n.stats.buffering.end=e);var l=n?n.stats:r.stats;t.hls.trigger(o.Events.FRAG_BUFFERED,{frag:r,part:n,stats:l,id:r.type})}),c)},t.onFragChanged=function(e,data){this.flushBackBuffer()},t.onBufferEos=function(e,data){var t=this;
vendor: 10,431 bytes, line 2
2this.getSourceBufferTypes().reduce((function(e,r){var n=t.sourceBuffer[r];return data.type&&data.type!==r||n&&!n.ended&&(n.ended=!0,l.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),e&&!(n&&!n.ended)}),!0)&&this.blockBuffers((function(){var e=t.mediaSource;e&&"open"===e.readyState&&e.endOfStream()}))},t.onLevelUpdated=function(e,t){var details=t.details;details.fragments.length&&(this.details=details,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,details=this.details,t=this.media,r=this.sourceBuffer;if(t&&null!==details){var l=this.getSourceBufferTypes();if(l.length){var c=details.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(Object(n.isFiniteNumber)(c)&&!(c<0)){var f=t.currentTime,h=details.levelTargetDuration,_=Math.max(c,h),v=Math.floor(f/h)*h-_;l.forEach((function(t){var n=r[t];if(n){var l=d.BufferHelper.getBuffered(n);l.length>0&&v>l.start(0)&&(e.trigger(o.Events.BACK_BUFFER_REACHED,{bufferEnd:v}),details.live&&e.trigger(o.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:v}),e.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:v,type:t}))}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var details=this.details,e=this.hls,t=this.media,r=this.mediaSource,o=details.fragments[0].start+details.totalduration,c=t.duration,d=Object(n.isFiniteNumber)(r.duration)?r.duration:0;details.live&&e.config.liveDurationInfinity?(l.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),r.duration=1/0,this.updateSeekableRange(details)):(o>d&&o>c||!Object(n.isFiniteNumber)(c))&&(l.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),r.duration=o)}},t.updateSeekableRange=function(e){var t=this.mediaSource,r=e.fragments;if(r.length&&e.live&&null!=t&&t.setLiveSeekableRange){var n=Math.max(0,r[0].start),o=Math.max(n,n+e.totalduration);t.setLiveSeekableRange(n,o)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,r=this.pendingTracks,n=Object.keys(r).length;if(n&&!e||2===n){this.createSourceBuffers(r),this.pendingTracks={};var l=this.getSourceBufferTypes();if(0===l.length)return void this.hls.trigger(o.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});l.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var n=0;for(var d in e)if(!t[d]){var track=e[d];if(!track)throw Error("source buffer exists for track "+d+", however track does not");var f=track.levelCodec||track.codec,h=track.container+";codecs="+f;l.logger.log("[buffer-controller]: creating sourceBuffer("+h+")");try{var _=t[d]=r.addSourceBuffer(h),v=d;this.addBufferListener(v,"updatestart",this._onSBUpdateStart),this.addBufferListener(v,"updateend",this._onSBUpdateEnd),this.addBufferListener(v,"error",this._onSBUpdateError),this.tracks[d]={buffer:_,codec:f,container:track.container,levelCodec:track.levelCodec,metadata:track.metadata,id:track.id},n++}catch(e){l.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(o.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:h})}}n&&this.hls.trigger(o.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){l.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(o.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var r=this.operationQueue.current(e);r&&r.onError(t)},t.removeExecutor=function(e,t,r){var o=this.media,c=this.mediaSource,d=this.operationQueue,f=this.sourceBuffer[e];if(!o||!c||!f)return l.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void d.shiftAndExecuteNext(e);var h=Object(n.isFiniteNumber)(o.duration)?o.duration:1/0,_=Object(n.isFiniteNumber)(c.duration)?c.duration:1/0,v=Math.max(0,t),m=Math.min(r,h,_);m>v?(l.logger.log("[buffer-controller]: Removing ["+v+","+m+"] from the "+e+" SourceBuffer"),console.assert(!f.updating,e+" sourceBuffer must not be updating"),f.remove(v,m)):d.shiftAndExecuteNext(e)},t.appendExecutor=function(data,e){var t=this.operationQueue,r=this.sourceBuffer[e];if(!r)return l.logger.warn("[buffer-controller]: Attempting to append to the "+e+" SourceBuffer, but it does not exist"),void t.shiftAndExecuteNext(e);r.ended=!1,console.assert(!r.updating,e+" sourceBuffer must not be updating"),r.appendBuffer(data)},t.blockBuffers=function(e,t){var r=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return l.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);var n=this.operationQueue,o=t.map((function(e){return n.appendBlocker(e)}));Promise.all(o).then((function(){e(),t.forEach((function(e){var t=r.sourceBuffer[e];t&&t.updating||n.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,r){var n=this.sourceBuffer[e];if(n){var o=r.bind(this,e);this.listeners[e].push({event:t,listener:o}),n.addEventListener(t,o)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}()},"./src/controller/buffer-operation-queue.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return o}));var n=r("./src/utils/logger.ts"),o=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var r=this.queues[t];r.push(e),1===r.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,r=new Promise((function(e){t=e})),n={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(n,e),r},t.executeNext=function(e){var t=this.buffers,r=this.queues,o=t[e],l=r[e];if(l.length){var c=l[0];try{c.execute()}catch(t){n.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(t),o&&o.updating||(l.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}()},"./src/controller/cap-level-controller.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/events.ts");function o(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(e){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t,r,l,c=e.prototype;return c.setStreamController=function(e){this.streamController=e},c.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},c.registerListeners=function(){var e=this.hls;e.on(n.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},c.unregisterListener=function(){var e=this.hls;e.off(n.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},c.onFpsDropLevelCapping=function(t,data){e.isLevelAllowed(data.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(data.droppedLevel)},c.onMediaAttaching=function(e,data){this.media=data.media instanceof HTMLVideoElement?data.media:null},c.onManifestParsed=function(e,data){var t=this.hls;this.restrictedLevels=[],this.firstLevel=data.firstLevel,t.config.capLevelToPlayerSize&&data.video&&this.startCapping()},c.onBufferCodecs=function(e,data){this.hls.config.capLevelToPlayerSize&&data.video&&this.startCapping()},c.onMediaDetaching=function(){this.stopCapping()},c.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},c.getMaxLevel=function(t){var r=this,n=this.hls.levels;if(!n.length)return-1;var o=n.filter((function(n,o){return e.isLevelAllowed(o,r.restrictedLevels)&&o<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(o,this.mediaWidth,this.mediaHeight)},c.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},c.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},c.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var r=e.getBoundingClientRect();t.width=r.width,t.height=r.height,t.width||t.height||(t.width=r.right-r.left||e.
vendor: 821 bytes, line 2
2width||0,t.height=r.bottom-r.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,r){if(!e||!e.length)return-1;for(var n,o,l=e.length-1,i=0;i<e.length;i+=1){var c=e[i];if((c.width>=t||c.height>=r)&&(n=c,!(o=e[i+1])||n.width!==o.width||n.height!==o.height)){l=i;break}}return l},t=e,(r=[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}}])&&o(t.prototype,r),l&&o(t,l),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=l},
vendor: 7,469 bytes, line 2
2"./src/controller/cmcd-controller.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return m}));var n=r("./src/events.ts"),o=r("./src/types/cmcd.ts"),l=r("./src/utils/buffer-helper.ts"),c=r("./src/utils/logger.ts");function d(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},v.apply(this,arguments)}var m=function(){function e(t){var r=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){r.initialized&&(r.starved=!0),r.buffering=!0},this.onPlaying=function(){r.initialized||(r.initialized=!0),r.buffering=!1},this.applyPlaylistData=function(e){try{r.apply(e,{ot:o.CMCDObjectType.MANIFEST,su:!r.initialized})}catch(e){c.logger.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var t=e.frag,n=r.hls.levels[t.level],l=r.getObjectType(t),data={d:1e3*t.duration,ot:l};l!==o.CMCDObjectType.VIDEO&&l!==o.CMCDObjectType.AUDIO&&l!=o.CMCDObjectType.MUXED||(data.br=n.bitrate/1e3,data.tb=r.getTopBandwidth(l)/1e3,data.bl=r.getBufferLength(l)),r.apply(e,data)}catch(e){c.logger.warn("Could not generate segment CMCD data.",e)}},this.hls=t;var n=this.config=t.config,l=n.cmcd;null!=l&&(n.pLoader=this.createPlaylistLoader(),n.fLoader=this.createFragmentLoader(),this.sid=l.sessionId||e.uuid(),this.cid=l.contentId,this.useHeaders=!0===l.useHeaders,this.registerListeners())}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.on(n.Events.BUFFER_CREATED,this.onBufferCreated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.off(n.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},t.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},t.onMediaAttached=function(e,data){this.media=data.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},t.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},t.onBufferCreated=function(e,data){var t,r;this.audioBuffer=null===(t=data.tracks.audio)||void 0===t?void 0:t.buffer,this.videoBuffer=null===(r=data.tracks.video)||void 0===r?void 0:r.buffer},t.createData=function(){var e;return{v:o.CMCDVersion,sf:o.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:null===(e=this.media)||void 0===e?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},t.apply=function(t,data){void 0===data&&(data={}),v(data,this.createData());var r=data.ot===o.CMCDObjectType.INIT||data.ot===o.CMCDObjectType.VIDEO||data.ot===o.CMCDObjectType.MUXED;if(this.starved&&r&&(data.bs=!0,data.su=!0,this.starved=!1),null==data.su&&(data.su=this.buffering),this.useHeaders){var n=e.toHeaders(data);if(!Object.keys(n).length)return;t.headers||(t.headers={}),v(t.headers,n)}else{var l=e.toQuery(data);if(!l)return;t.url=e.appendQueryToUri(t.url,l)}},t.getObjectType=function(e){var t=e.type;return"subtitle"===t?o.CMCDObjectType.TIMED_TEXT:"initSegment"===e.sn?o.CMCDObjectType.INIT:"audio"===t?o.CMCDObjectType.AUDIO:"main"===t?this.hls.audioTracks.length?o.CMCDObjectType.VIDEO:o.CMCDObjectType.MUXED:void 0},t.getTopBandwidth=function(e){var t,r=0,n=this.hls;if(e===o.CMCDObjectType.AUDIO)t=n.audioTracks;else{var l=n.maxAutoLevel,c=l>-1?l+1:n.levels.length;t=n.levels.slice(0,c)}for(var d,f=h(t);!(d=f()).done;){var _=d.value;_.bitrate>r&&(r=_.bitrate)}return r>0?r:NaN},t.getBufferLength=function(e){var t=this.hls.media,r=e===o.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return r&&t?1e3*l.BufferHelper.bufferInfo(r,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,r=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new r(e)}var n=e.prototype;return n.destroy=function(){this.loader.destroy()},n.abort=function(){this.loader.abort()},n.load=function(e,r,n){t(e),this.loader.load(e,r,n)},f(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,r=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new r(e)}var n=e.prototype;return n.destroy=function(){this.loader.destroy()},n.abort=function(){this.loader.abort()},n.load=function(e,r,n){t(e),this.loader.load(e,r,n)},f(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)},e.serialize=function(data){for(var e,t=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},n=function(e){return Math.round(e)},o=function(e){return 100*n(e/100)},l={br:n,d:n,bl:o,dl:o,mtp:o,nor:function(e){return encodeURIComponent(e)},rtp:o,tb:n},c=h(Object.keys(data||{}).sort());!(e=c()).done;){var d=e.value,f=data[d];if(r(f)&&!("v"===d&&1===f||"pr"==d&&1===f)){var _=l[d];_&&(f=_(f));var v=typeof f,m=void 0;m="ot"===d||"sf"===d||"st"===d?d+"="+f:"boolean"===v?d:"number"===v?d+"="+f:d+"="+JSON.stringify(f),t.push(m)}}return t.join(",")},e.toHeaders=function(data){for(var t={},r=["Object","Request","Session","Status"],n=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},l=0,c=Object.keys(data);l<c.length;l++){var d=c[l];n[null!=o[d]?o[d]:1][d]=data[d]}for(var i=0;i<n.length;i++){var f=e.serialize(n[i]);f&&(t["CMCD-"+r[i]]=f)}return t},e.toQuery=function(data){return"CMCD="+encodeURIComponent(e.serialize(data))},e.appendQueryToUri=function(e,t){if(!t)return e;var r=e.includes("?")?"&":"?";return""+e+r+t},e}()},
vendor: 18,004 bytes, line 2
2"./src/controller/eme-controller.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/events.ts"),o=r("./src/errors.ts"),l=r("./src/utils/logger.ts"),c=r("./src/utils/mediakeys-helper.ts");function d(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var f=function(){function e(e){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=e,this._config=e.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var t,r,f,h=e.prototype;return h.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},h._registerListeners=function(){this.hls.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(n.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this)},h._unregisterListeners=function(){this.hls.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(n.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this)},h.getLicenseServerUrl=function(e){switch(e){case c.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},h._attemptKeySystemAccess=function(e,t,r){var n=this,o=function(e,t,r,n){if(e===c.KeySystems.WIDEVINE)return function(e,t,r){var n={audioCapabilities:[],videoCapabilities:[]};return e.forEach((function(e){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+e+'"',robustness:r.audioRobustness||""})})),t.forEach((function(e){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"',robustness:r.videoRobustness||""})})),[n]}(t,r,n);throw new Error("Unknown key-system: "+e)}(e,t,r,this._drmSystemOptions);l.logger.log("Requesting encrypted media key-system access");var d=this.requestMediaKeySystemAccess(e,o);this.mediaKeysPromise=d.then((function(t){return n._onMediaKeySystemAccessObtained(e,t)})),d.catch((function(t){l.logger.error('Failed to obtain key-system "'+e+'" access:',t)}))},h._onMediaKeySystemAccessObtained=function(e,t){var r=this;l.logger.log('Access for key-system "'+e+'" obtained');var n={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(n);var o=Promise.resolve().then((function(){return t.createMediaKeys()})).then((function(t){return n.mediaKeys=t,l.logger.log('Media-keys created for key-system "'+e+'"'),r._onMediaKeysCreated(),t}));return o.catch((function(e){l.logger.error("Failed to create media-keys:",e)})),o},h._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},h._onNewMediaKeySession=function(e){var t=this;l.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(r){t._onKeySessionMessage(e,r.message)}),!1)},h._onKeySessionMessage=function(e,t){l.logger.log("Got EME message event, creating license request"),this._requestLicense(t,(function(data){l.logger.log("Received license data (length: "+(data?data.byteLength:data)+"), updating key-session"),e.update(data).catch((function(e){l.logger.warn("Updating key-session failed: "+e)}))}))},h.onMediaEncrypted=function(e){var t=this;if(l.logger.log('Media is encrypted using "'+e.initDataType+'" init data type'),!this.mediaKeysPromise)return l.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});var r=function(r){t._media&&(t._attemptSetMediaKeys(r),t._generateRequestWithPreferredKeySession(e.initDataType,e.initData))};this.mediaKeysPromise.then(r).catch(r)},h._attemptSetMediaKeys=function(e){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys)return l.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});l.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},h._generateRequestWithPreferredKeySession=function(e,t){var r=this,c=this._mediaKeysList[0];if(!c)return l.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(c.mediaKeysSessionInitialized)l.logger.warn("Key-Session already initialized but requested again");else{var d=c.mediaKeysSession;if(!d)return l.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!t)return l.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});l.logger.log('Generating key-session request for "'+e+'" init data type'),c.mediaKeysSessionInitialized=!0,d.generateRequest(e,t).then((function(){l.logger.debug("Key-session generation succeeded")})).catch((function(e){l.logger.error("Error generating key-session request:",e),r.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},h._createLicenseXhr=function(e,t,r){var n=new XMLHttpRequest;n.responseType="arraybuffer",n.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,n,e,t,r);var o=this._licenseXhrSetup;if(o)try{o.call(this.hls,n,e),o=void 0}catch(e){l.logger.error(e)}try{n.readyState||n.open("POST",e,!0),o&&o.call(this.hls,n,e)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return n},h._onLicenseRequestReadyStageChange=function(e,t,r,c){if(4===e.readyState)if(200===e.status){this._requestLicenseFailureCount=0,l.logger.log("License request succeeded");var d=e.response,f=this._licenseResponseCallback;if(f)try{d=f.call(this.hls,e,t)}catch(e){l.logger.error(e)}c(d)}else{if(l.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var h=3-this._requestLicenseFailureCount+1;l.logger.warn("Retrying license request, "+h+" attempts left"),this._requestLicense(r,c)}},h._generateLicenseRequestChallenge=function(e,t){if(e.mediaKeySystemDomain===c.KeySystems.WIDEVINE)return t;throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},h._requestLicense=function(e,t){l.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return l.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var c=this.getLicenseServerUrl(r.mediaKeySystemDomain),d=this._createLicenseXhr(c,e,t);l.logger.log("Sending license request to URL: "+c);var f=this._generateLicenseRequestChallenge(r,e);d.send(f)}catch(e){l.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},h.onMediaAttached=function(e,data){if(this._emeEnabled){var t=data.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)}},h.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;e&&(e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map((function(e){if(e.mediaKeysSession)return e.mediaKeysSession.close().catch((function(){}))}))).then((function(){return e.setMediaKeys(null)})).catch((function(){})))},h.onManifestParsed=function(e,data){if(this._emeEnabled){var t=data.levels.map((function(e){return e.audioCodec})).filter((function(e){return!!e})),r=data.levels.map((function(e){return e.videoCodec})).filter((function(e){return!!e}));this._attemptKeySystemAccess(c.KeySystems.WIDEVINE,t,r)}},t=e,(r=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&d(t.prototype,r),f&&d(t,f),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=f},"./src/controller/fps-controller.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/events.ts"),o=r("./src/utils/logger.ts"),l=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(n.Events.MEDIA_ATTACHING,this.onMediaAttaching)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,data){var t=this.hls.config;if(t.capLevelOnFPSDrop){var r=data.media instanceof self.HTMLVideoElement?data.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(video,e,t){var r=performance.now();if(e){if(this.lastTime){var l=r-this.lastTime,c=t-this.lastDroppedFrames,d=e-this.lastDecodedFrames,f=1e3*c/l,h=this.hls;if(h.trigger(n.Events.FPS_DROP,{currentDropped:c,currentDecoded:d,totalDroppedFrames:t}),f>0&&c>h.config.fpsDroppedMonitoringThreshold*d){var _=h.currentLevel;o.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+_),_>0&&(-1===h.autoLevelCapping||h.autoLevelCapping>=_)&&(_-=1,h.trigger(n.Events.FPS_DROP_LEVEL_CAPPING,{level:_,droppedLevel:h.currentLevel}),h.autoLevelCapping=_,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=t,this.lastDecodedFrames=e}},t.checkFPSInterval=function(){var video=this.media;if(video)if(this.isVideoPlaybackQualityAvailable){var e=video.getVideoPlaybackQuality();this.checkFPS(video,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(video,video.webkitDecodedFrameCount,video.webkitDroppedFrameCount)},e}();t.default=l},"./src/controller/fragment-finders.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"findFragmentByPDT",(function(){return l})),r.d(t,"findFragmentByPTS",(function(){return c})),r.d(t,"fragmentWithinToleranceTest",(function(){return d})),r.d(t,"pdtWithinToleranceTest",(function(){return f})),r.d(t,"findFragWithCC",(function(){return h}));var n=r("./src/polyfills/number.ts"),o=r("./src/utils/binary-search.ts");function l(e,t,r){if(null===t||!Array.isArray(e)||!e.length||!Object(n.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;r=r||0;for(var o=0;o<e.length;++o){var l=e[o];if(f(t,r,l))return l}return null}function c(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=0);var l=null;if(e?l=t[e.sn-t[0].sn+1]||null:0===r&&0===t[0].start&&(l=t[0]),l&&0===d(r,n,l))return l;var c=o.default.search(t,d.bind(null,r,n));return c||l}function d(e,t,r){void 0===e&&(e=0),void 0===t&&(t=0);var n=Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-n<=e?1:r.start-n>e&&r.start?-1:0}function f(e,t,r){var n=1e3*Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return(r.endProgramDateTime||0)-n>e}function h(e,t){return o.default.search(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}},"./src/controller/fragment-tracker.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"FragmentState",(function(){return n})),r.d(t,"FragmentTracker",(function(){return c}));var n,o=r("./src/events.ts"),l=r("./src/types/loader.ts");!function(e){e.NOT_LOADED="NOT_LOADED",e.APPENDING="APPENDING",e.PARTIAL="PARTIAL",e.OK="OK"}(n||(n={}));var c=function(){function e(e){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(o.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(o.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){if(t===l.PlaylistLevelType.MAIN){var r=this.activeFragment,n=this.activeParts;if(!r)return null;if(n)for(var i=n.length;i--;){var o=n[i],c=o?o.end:r.appendedPTS;if(o.start<=e&&void 0!==c&&e<=c)return i>9&&(this.activeParts=n.slice(i-9)),o}else if(r.start<=e&&void 0!==r.appendedPTS&&e<=r.appendedPTS)return r}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var r=this.fragments,n=Object.keys(r),i=n.length;i--;){var o=r[n[i]];if((null==o?void 0:o.body.type)===t&&o.buffered){var l=o.body;if(l.start<=e&&e<=l.end)return l}}return null},t.detectEvictedFragments=function(e,t,r){var n=this;Object.keys(this.fragments).forEach((function(o){var l=n.fragments[o];if(l)if(l.buffered){var c=l.range[e];c&&c.time.some((function(time){var e=!n.isTimeBuffered(time.startPTS,time.endPTS,t);return e&&n.removeFragment(l.body),e}))}else l.body.type===r&&n.removeFragment(l.body)}))},t.detectPartialFragments=function(data){var e=this,t=this.timeRanges,r=data.frag,n=data.part;if(t&&"initSegment"!==r.sn){var o=f(r),l=this.fragments[o];l&&(Object.keys(t).forEach((function(o){var c=r.elementaryStreams[o];if(c){var d=t[o],f=null!==n||!0===c.partial;l.range[o]=e.getBufferedTimes(r,n,f,d)}})),l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body))}},t.fragBuffered=function(e){var t=f(e),r=this.fragments[t];r&&(r.loaded=null,r.buffered=!0)},t.getBufferedTimes=function(e,t,r,n){for(var o={time:[],partial:r},l=t?t.start:e.start,c=t?t.end:e.end,d=e.minEndPTS||c,f=e.maxStartPTS||l,i=0;i<n.length;i++){var h=n.start(i)-this.bufferPadding,_=n.end(i)+this.bufferPadding;if(f>=h&&d<=_){o.time.push({startPTS:Math.max(l,n.start(i)),endPTS:Math.min(c,n.end(i))});break}if(l<_&&c>h)o.partial=!0,o.time.push({startPTS:Math.max(l,n.start(i)),endPTS:Math.min(c,n.end(i))});else if(c<=h)break}return o},t.getPartialFragment=function(time){var e,t,r,n=null,o=0,l=this.bufferPadding,c=this.fragments;return Object.keys(c).forEach((function(f){var h=c[f];h&&d(h)&&(t=h.body.start-l,r=h.body.end+l,time>=t&&time<=r&&(e=Math.min(time-t,r-time),o<=e&&(n=h.body,o=e)))})),n},t.getState=function(e){var t=f(e),r=this.fragments[t];return r?r.buffered?d(r)?n.PARTIAL:n.OK:n.APPENDING:n.NOT_LOADED},t.isTimeBuffered=function(e,t,r){for(var n,o,i=0;i<r.length;i++){if(n=r.start(i)-this.bufferPadding,o=r.end(i)+this.bufferPadding,e>=n&&t<=o)return!0;if(t<=n)return!1}return!1},t.onFragLoaded=function(e,data){var t=data.frag,r=data.part;if("initSegment"!==t.sn&&!t.bitrateTest&&!r){var n=f(t);this.fragments[n]={body:t,loaded:data,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,data){var t=this,r=data.frag,n=data.part,o=data.timeRanges;if(r.type===l.PlaylistLevelType.MAIN)if(this.activeFragment=r,n){var c=this.activeParts;c||(this.activeParts=c=[]),c.push(n)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(e){var l=o[e];if(t.detectEvictedFragments(e,l),!n)for(var i=0;i<l.length;i++)r.appendedPTS=Math.max(l.end(i),r.appendedPTS||0)}))},t.onFragBuffered=function(e,data){this.detectPartialFragments(data)},t.hasFragment=function(e){var t=f(e);return!!this.fragments[t]},t.removeFragmentsInRange=function(e,t,r){var n=this;Object.keys(this.fragments).forEach((function(o){var l=n.fragments[o];if(l&&l.buffered){var c=l.body;c.type===r&&c.start<t&&c.end>e&&n.removeFragment(c)}}))},t.removeFragment=function(e){var t=f(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),delete this.fragments[t]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function d(e){var t,r;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(r=e.range.audio)||void 0===r?void 0:r.partial))}function f(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}},
vendor: 3,928 bytes, line 2
2"./src/controller/gap-controller.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"STALL_MINIMUM_DURATION_MS",(function(){return d})),r.d(t,"MAX_START_GAP_JUMP",(function(){return f})),r.d(t,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return h})),r.d(t,"SKIP_BUFFER_RANGE_START",(function(){return _})),r.d(t,"default",(function(){return v}));var n=r("./src/utils/buffer-helper.ts"),o=r("./src/errors.ts"),l=r("./src/events.ts"),c=r("./src/utils/logger.ts"),d=250,f=2,h=.1,_=.05,v=function(){function e(e,t,r,n){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=r,this.hls=n}var t=e.prototype;return t.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},t.poll=function(e,t){var r=this.config,o=this.media,l=this.stalled;if(null!==o){var h=o.currentTime,_=o.seeking,v=this.seeking&&!_,m=!this.seeking&&_;if(this.seeking=_,h===e){if((m||v)&&(this.stalled=null),!(o.paused&&!_||o.ended||0===o.playbackRate)&&n.BufferHelper.getBuffered(o).length){var y=n.BufferHelper.bufferInfo(o,h,0),E=y.len>0,T=y.nextStart||0;if(E||T){if(_){var S=y.len>f,D=!T||t&&t.start<=h||T-h>f&&!this.fragmentTracker.getPartialFragment(h);if(S||D)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var L,I=Math.max(T,y.start||0)-h,A=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,x=(null==A||null===(L=A.details)||void 0===L?void 0:L.live)?2*A.details.targetduration:f;if(I>0&&I<=x)return void this._trySkipBufferHole(null)}var M=self.performance.now();if(null!==l){var k=M-l;if(_||!(k>=d)||(this._reportStall(y),this.media)){var w=n.BufferHelper.bufferInfo(o,h,r.maxBufferHole);this._tryFixBufferStall(w,k)}}else this.stalled=M}}}else if(this.moved=!0,null!==l){if(this.stallReported){var N=self.performance.now()-l;c.logger.warn("playback not stuck anymore @"+h+", after "+Math.round(N)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}}},t._tryFixBufferStall=function(e,t){var r=this.config,n=this.fragmentTracker,o=this.media;if(null!==o){var l=o.currentTime,d=n.getPartialFragment(l);if(d&&(this._trySkipBufferHole(d)||!this.media))return;e.len>r.maxBufferHole&&t>1e3*r.highBufferWatchdogPeriod&&(c.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},t._reportStall=function(e){var t=this.hls,r=this.media;!this.stallReported&&r&&(this.stallReported=!0,c.logger.warn("Playback stalling at @"+r.currentTime+" due to low buffer ("+JSON.stringify(e)+")"),t.trigger(l.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e.len}))},t._trySkipBufferHole=function(e){var t=this.config,r=this.hls,d=this.media;if(null===d)return 0;for(var f=d.currentTime,v=0,m=n.BufferHelper.getBuffered(d),i=0;i<m.length;i++){var y=m.start(i);if(f+t.maxBufferHole>=v&&f<y){var E=Math.max(y+_,d.currentTime+h);return c.logger.warn("skipping hole, adjusting currentTime from "+f+" to "+E),this.moved=!0,this.stalled=null,d.currentTime=E,e&&r.trigger(l.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+f+" to "+E,frag:e}),E}v=m.end(i)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,r=this.media,n=this.nudgeRetry;if(null!==r){var d=r.currentTime;if(this.nudgeRetry++,n<e.nudgeMaxRetry){var f=d+(n+1)*e.nudgeOffset;c.logger.warn("Nudging 'currentTime' from "+d+" to "+f),r.currentTime=f,t.trigger(l.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else c.logger.error("Playhead still not moving while enough data buffered @"+d+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(l.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})}},e}()},
2"./src/controller/id3-track-controller.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/polyfills/number.ts"),o=r("./src/events.ts"),l=r("./src/utils/texttrack-utils.ts"),c=r("./src/demux/id3.ts"),d=r("./src/loader/date-range.ts"),f=r("./src/types/demuxer.ts");function h(){return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}function _(e,t){return e.getTime()/1e3-t}var v=function(){function e(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}var t=e.prototype;return t.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},t._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},t._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},t.onMediaAttached=function(e,data){this.media=data.media},t.onMediaDetaching=function(){this.id3Track&&(Object(l.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})},t.onManifestLoading=function(){this.dateRangeCuesAppended={}},t.createTrack=function(e){var track=this.getID3Track(e.textTracks);return track.mode="hidden",track},t.getID3Track=function(e){if(this.media){for(var i=0;i<e.length;i++){var t=e[i];if("metadata"===t.kind&&"id3"===t.label)return Object(l.sendAddTrackEvent)(t,this.media),t}return this.media.addTextTrack("metadata","id3")}},t.onFragParsingMetadata=function(e,data){if(this.media){var t=this.hls.config,r=t.enableEmsgMetadataCues,n=t.enableID3MetadataCues;if(r||n){var o=data.frag,l=data.samples,details=data.details;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var d=details.edge||o.end,_=h(),v=!1,m={},i=0;i<l.length;i++){var y=l[i].type;if((y!==f.MetadataSchema.emsg||r)&&n){var E=c.getID3Frames(l[i].data);if(E){var T=l[i].pts,S=d;S-T<=0&&(S=T+.25);for(var D=0;D<E.length;D++){var L=E[D];if(!c.isTimeStampFrame(L)){var I=new _(T,S,"");I.value=L,y&&(I.type=y),this.id3Track.addCue(I),m[L.key]=null,v=!0}}}}}v&&this.updateId3CueEnds(m)}}},t.updateId3CueEnds=function(e){var t,r=null===(t=this.id3Track)||void 0===t?void 0:t.cues;if(r)for(var i=r.length;i--;){var n,o=r[i],l=null===(n=o.value)||void 0===n?void 0:n.key;if(l&&l in e){var c=e[l];c&&o.endTime!==c&&(o.endTime=c),e[l]=o.startTime}}},t.onBufferFlushing=function(e,t){var r=t.startOffset,n=t.endOffset,o=t.type,c=this.id3Track,d=this.hls;if(d){var h,_=d.config,v=_.enableEmsgMetadataCues,m=_.enableID3MetadataCues;c&&(v||m)&&(h="audio"===o?function(e){return e.type===f.MetadataSchema.audioId3&&m}:"video"===o?function(e){return e.type===f.MetadataSchema.emsg&&v}:function(e){return e.type===f.MetadataSchema.audioId3&&m||e.type===f.MetadataSchema.emsg&&v},Object(l.removeCuesInRange)(c,r,n,h))}},t.onLevelUpdated=function(e,t){var r=this,details=t.details;if(this.media&&details.hasProgramDateTime&&this.hls.config.enableDateRangeMetadataCues){var o=this.dateRangeCuesAppended,l=this.id3Track,c=details.dateRanges,v=Object.keys(c);if(l)for(var m=Object.keys(o).filter((function(e){return!v.includes(e)})),y=function(i){var e=m[i];Object.keys(o[e].cues).forEach((function(t){l.removeCue(o[e].cues[t])})),delete o[e]},i=m.length;i--;)y(i);var E=details.fragments[details.fragments.length-1];if(0!==v.length&&Object(n.isFiniteNumber)(null==E?void 0:E.programDateTime)){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var T=E.programDateTime/1e3-E.start,S=details.edge||E.end,D=h(),L=function(e){var t=v[e],n=c[t],l=o[t],h=(null==l?void 0:l.cues)||{}
vendor: 5,430 bytes, line 2
2,m=(null==l?void 0:l.durationKnown)||!1,y=_(n.startDate,T),E=S,L=n.endDate;if(L)E=_(L,T),m=!0;else if(n.endOnNext&&!m){var I=v.reduce((function(e,t){var r=c[t];return r.class===n.class&&r.id!==t&&r.startDate>n.startDate&&e.push(r),e}),[]).sort((function(a,b){return a.startDate.getTime()-b.startDate.getTime()}))[0];I&&(E=_(I.startDate,T),m=!0)}for(var A,x=Object.keys(n.attr),M=0;M<x.length;M++){var k=x[M];if(k!==d.DateRangeAttribute.ID&&k!==d.DateRangeAttribute.CLASS&&k!==d.DateRangeAttribute.START_DATE&&k!==d.DateRangeAttribute.DURATION&&k!==d.DateRangeAttribute.END_DATE&&k!==d.DateRangeAttribute.END_ON_NEXT){var w=h[k];if(w)m&&!l.durationKnown&&(w.endTime=E);else{var data=n.attr[k];w=new D(y,E,""),k!==d.DateRangeAttribute.SCTE35_OUT&&k!==d.DateRangeAttribute.SCTE35_IN||(A=data,data=Uint8Array.from(A.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer),w.value={key:k,data:data},w.type=f.MetadataSchema.dateRange,r.id3Track.addCue(w),h[k]=w}}}o[t]={cues:h,dateRange:n,durationKnown:m}},I=0;I<v.length;I++)L(I)}}},e}();t.default=v},"./src/controller/latency-controller.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return d}));var n=r("./src/errors.ts"),o=r("./src/events.ts"),l=r("./src/utils/logger.ts");function c(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(){function e(e){var t=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return t.timeupdate()},this.hls=e,this.config=e.config,this.registerListeners()}var t,r,d,f=e.prototype;return f.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},f.registerListeners=function(){this.hls.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(o.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){this.hls.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(o.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(o.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(o.Events.ERROR,this.onError)},f.onMediaAttached=function(e,data){this.media=data.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},f.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},f.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},f.onLevelUpdated=function(e,t){var details=t.details;this.levelDetails=details,details.advanced&&this.timeupdate(),!details.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},f.onError=function(e,data){data.details===n.ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,l.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},f.timeupdate=function(){var e=this.media,t=this.levelDetails;if(e&&t){this.currentTime=e.currentTime;var r=this.computeLatency();if(null!==r){this._latency=r;var n=this.config,o=n.lowLatencyMode,l=n.maxLiveSyncPlaybackRate;if(o&&1!==l){var c=this.targetLatency;if(null!==c){var d=r-c,f=d<Math.min(this.maxLatency,c+t.targetduration);if(t.live&&f&&d>.05&&this.forwardBufferLength>1){var h=Math.min(2,Math.max(1,l)),_=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20;e.playbackRate=Math.min(h,Math.max(1,_))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},f.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},f.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(r=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,r=e.partHoldBack,n=e.targetduration,o=this.config,l=o.liveSyncDuration,c=o.liveSyncDurationCount,d=o.lowLatencyMode,f=this.hls.userConfig,h=d&&r||t;(f.liveSyncDuration||f.liveSyncDurationCount||0===h)&&(h=void 0!==l?l:c*n);var _=n;return h+Math.min(1*this.stallCount,_)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,r=this.levelDetails;if(null===e||null===t||null===r)return null;var n=r.edge,o=e-t-this.edgeStalled,l=n-r.totalduration,c=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(l,o),c)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var r=e.buffered.length;return(r?e.buffered.end(r-1):t.edge)-this.currentTime}}
2])&&c(t.prototype,r),d&&c(t,d),Object.defineProperty(t,"prototype",{writable:!1}),e}()},
vendor: 4,709 bytes, line 2
2"./src/controller/level-controller.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return E}));var n=r("./src/types/level.ts"),o=r("./src/events.ts"),l=r("./src/errors.ts"),c=r("./src/utils/codecs.ts"),d=r("./src/controller/level-helper.ts"),f=r("./src/controller/base-playlist-controller.ts"),h=r("./src/types/loader.ts");function _(){return _=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},_.apply(this,arguments)}function v(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,p){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},m(e,p)}var y=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),E=function(e){var t,r;function f(t){var r;return(r=e.call(this,t,"[level-controller]")||this)._levels=[],r._firstLevel=-1,r._startLevel=void 0,r.currentLevelIndex=-1,r.manualLevelIndex=-1,r.onParsedComplete=void 0,r._registerListeners(),r}r=e,(t=f).prototype=Object.create(r.prototype),t.prototype.constructor=t,m(t,r);var E,T,S,D=f.prototype;return D._registerListeners=function(){var e=this.hls;e.on(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(o.Events.ERROR,this.onError,this)},D._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(o.Events.ERROR,this.onError,this)},D.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,e.prototype.destroy.call(this)},D.startLoad=function(){this._levels.forEach((function(e){e.loadError=0})),e.prototype.startLoad.call(this)},D.onManifestLoaded=function(e,data){var t,r,f=[],h=[],_=[],v={},m=!1,E=!1,T=!1;if(data.levels.forEach((function(e){var t=e.attrs;m=m||!(!e.width||!e.height),E=E||!!e.videoCodec,T=T||!!e.audioCodec,y&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0);var o=e.bitrate+"-"+e.attrs.RESOLUTION+"-"+e.attrs.CODECS;(r=v[o])?r.url.push(e.url):(r=new n.Level(e),v[o]=r,f.push(r)),t&&(t.AUDIO&&Object(d.addGroupId)(r,"audio",t.AUDIO),t.SUBTITLES&&Object(d.addGroupId)(r,"text",t.SUBTITLES))})),(m||E)&&T&&(f=f.filter((function(e){var t=e.videoCodec,r=e.width,n=e.height;return!!t||!(!r||!n)}))),f=f.filter((function(e){var t=e.audioCodec,r=e.videoCodec;return(!t||Object(c.isCodecSupportedInMp4)(t,"audio"))&&(!r||Object(c.isCodecSupportedInMp4)(r,"video"))})),data.audioTracks&&(h=data.audioTracks.filter((function(track){return!track.audioCodec||Object(c.isCodecSupportedInMp4)(track.audioCodec,"audio")})),Object(d.assignTrackIdsByGroup)(h)),data.subtitles&&(_=data.subtitles,Object(d.assignTrackIdsByGroup)(_)),f.length>0){t=f[0].bitrate,f.sort((function(a,b){return a.bitrate-b.bitrate})),this._levels=f;for(var i=0;i<f.length;i++)if(f[i].bitrate===t){this._firstLevel=i,this.log("manifest loaded, "+f.length+" level(s) found, first bitrate: "+t);break}var S=T&&!E,D={levels:f,audioTracks:h,subtitleTracks:_,firstLevel:this._firstLevel,stats:data.stats,audio:T,video:E,altAudio:!S&&h.some((function(e){return!!e.url}))};this.hls.trigger(o.Events.MANIFEST_PARSED,D),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(o.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:data.url,reason:"no level with compatible codecs found in manifest"})},D.onError=function(t,data){var r;if(e.prototype.onError.call(this,t,data),!data.fatal){var n=data.context,o=this._levels[this.currentLevelIndex];if(n&&(n.type===h.PlaylistContextType.AUDIO_TRACK&&o.audioGroupIds&&n.groupId===o.audioGroupIds[o.urlId]||n.type===h.PlaylistContextType.SUBTITLE_TRACK&&o.textGroupIds&&n.groupId===o.textGroupIds[o.urlId]))this.redundantFailover(this.currentLevelIndex);else{var c,d=!1,f=!0;switch(data.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:if(data.frag){var _=data.frag.type===h.PlaylistLevelType.MAIN?data.frag.level:this.currentLevelIndex,v=this._levels[_];v?(v.fragmentError++,v.fragmentError>
vendor: 8,099 bytes, line 2
2this.hls.config.fragLoadingMaxRetry&&(c=_)):c=_}break;case l.ErrorDetails.LEVEL_LOAD_ERROR:case l.ErrorDetails.LEVEL_LOAD_TIMEOUT:n&&(n.deliveryDirectives&&(f=!1),c=n.level),d=!0;break;case l.ErrorDetails.REMUX_ALLOC_ERROR:c=null!=(r=data.level)?r:this.currentLevelIndex,d=!0}void 0!==c&&this.recoverLevel(data,c,d,f)}}},D.recoverLevel=function(e,t,r,n){var o=e.details,l=this._levels[t];if(l.loadError++,r){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(n){var c=l.url.length;if(c>1&&l.loadError<c)e.levelRetry=!0,this.redundantFailover(t);else if(-1===this.manualLevelIndex){for(var d=-1,f=this._levels,i=f.length;i--;){var h=(i+this.currentLevelIndex)%f.length;if(h!==this.currentLevelIndex&&0===f[h].loadError){d=h;break}}d>-1&&this.currentLevelIndex!==d&&(this.warn(o+": switch to "+d),e.levelRetry=!0,this.hls.nextAutoLevel=d)}}},D.redundantFailover=function(e){var t=this._levels[e],r=t.url.length;if(r>1){var n=(t.urlId+1)%r;this.warn("Switching to redundant URL-id "+n),this._levels.forEach((function(e){e.urlId=n})),this.level=e}},D.onFragLoaded=function(e,t){var r=t.frag;if(void 0!==r&&r.type===h.PlaylistLevelType.MAIN){var n=this._levels[r.level];void 0!==n&&(n.fragmentError=0,n.loadError=0)}},D.onLevelLoaded=function(e,data){var t,r,n=data.level,details=data.details,o=this._levels[n];if(!o)return this.warn("Invalid level index "+n),void(null!==(r=data.deliveryDirectives)&&void 0!==r&&r.skip&&(details.deltaUpdateFailed=!0));n===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(n,data,o.details)):null!==(t=data.deliveryDirectives)&&void 0!==t&&t.skip&&(details.deltaUpdateFailed=!0)},D.onAudioTrackSwitched=function(e,data){var t=this.hls.levels[this.currentLevelIndex];if(t&&t.audioGroupIds){for(var r=-1,n=this.hls.audioTracks[data.id].groupId,i=0;i<t.audioGroupIds.length;i++)if(t.audioGroupIds[i]===n){r=i;break}r!==t.urlId&&(t.urlId=r,this.startLoad())}},D.loadPlaylist=function(e){var t=this.currentLevelIndex,r=this._levels[t];if(this.canLoad&&r&&r.url.length>0){var n=r.urlId,l=r.url[n];if(e)try{l=e.addDirectives(l)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+t+(e?" at sn "+e.msn+" part "+e.part:"")+" with URL-id "+n+" "+l),this.clearTimer(),this.hls.trigger(o.Events.LEVEL_LOADING,{url:l,level:t,id:n,deliveryDirectives:e||null})}},D.removeLevel=function(e,t){var r=function(e,r){return r!==t},n=this._levels.filter((function(n,o){return o!==e||n.url.length>1&&void 0!==t&&(n.url=n.url.filter(r),n.audioGroupIds&&(n.audioGroupIds=n.audioGroupIds.filter(r)),n.textGroupIds&&(n.textGroupIds=n.textGroupIds.filter(r)),n.urlId=0,!0)})).map((function(e,t){var details=e.details;return null!=details&&details.fragments&&details.fragments.forEach((function(e){e.level=t})),e}));this._levels=n,this.hls.trigger(o.Events.LEVELS_UPDATED,{levels:n})},E=f,(T=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,r=this._levels;if(0!==r.length&&(this.currentLevelIndex!==e||null===(t=r[e])||void 0===t||!t.details)){if(e<0||e>=r.length){var n=e<0;if(this.hls.trigger(o.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:n,reason:"invalid level idx"}),n)return;e=Math.min(e,r.length-1)}this.clearTimer();var c=this.currentLevelIndex,d=r[c],f=r[e];this.log("switching to level "+e+" from "+c),this.currentLevelIndex=e;var h=_({},f,{level:e,maxBitrate:f.maxBitrate,uri:f.uri,urlId:f.urlId});delete h._urlId,this.hls.trigger(o.Events.LEVEL_SWITCHING,h);var v=f.details;if(!v||v.live){var m=this.switchParams(f.uri,null==d?void 0:d.details);this.loadPlaylist(m)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&v(E.prototype,T),S&&v(E,S),Object.defineProperty(E,"prototype",{writable:!1}),f}(f.default)},"./src/controller/level-helper.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"addGroupId",(function(){return d})),r.d(t,"assignTrackIdsByGroup",(function(){return f})),r.d(t,"updatePTS",(function(){return h})),r.d(t,"updateFragPTSDTS",(function(){return v})),r.d(t,"mergeDetails",(function(){return m})),r.d(t,"mapPartIntersection",(function(){return y})),r.d(t,"mapFragmentIntersection",(function(){return E})),r.d(t,"adjustSliding",(function(){return T})),r.d(t,"addSliding",(function(){return S})),r.d(t,"computeReloadInterval",(function(){return D})),r.d(t,"getFragmentWithSN",(function(){return L})),r.d(t,"getPartWith",(function(){return I}));var n=r("./src/polyfills/number.ts"),o=r("./src/utils/logger.ts"),l=r("./src/loader/date-range.ts");function c(){return c=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},c.apply(this,arguments)}function d(e,t,r){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(r);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(r)}}function f(e){var t={};e.forEach((function(track){var e=track.groupId||"";track.id=t[e]=t[e]||0,t[e]++}))}function h(e,t,r){_(e[t],e[r])}function _(e,t){var r=t.startPTS;if(Object(n.isFiniteNumber)(r)){var o,l=0;t.sn>e.sn?(l=r-e.start,o=e):(l=e.start-r,o=t),o.duration!==l&&(o.duration=l)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function v(details,e,t,r,l,c){r-t<=0&&(o.logger.warn("Fragment should have a positive duration",e),r=t+e.duration,c=l+e.duration);var d=t,f=r,h=e.startPTS,v=e.endPTS;if(Object(n.isFiniteNumber)(h)){var m=Math.abs(h-t);Object(n.isFiniteNumber)(e.deltaPTS)?e.deltaPTS=Math.max(m,e.deltaPTS):e.deltaPTS=m,d=Math.max(t,h),t=Math.min(t,h),l=Math.min(l,e.startDTS),f=Math.min(r,v),r=Math.max(r,v),c=Math.max(c,e.endDTS)}e.duration=r-t;var y=t-e.start;e.appendedPTS=r,e.start=e.startPTS=t,e.maxStartPTS=d,e.startDTS=l,e.endPTS=r,e.minEndPTS=f,e.endDTS=c;var i,E=e.sn;if(!details||E<details.startSN||E>details.endSN)return 0;var T=E-details.startSN,S=details.fragments;for(S[T]=e,i=T;i>0;i--)_(S[i],S[i-1]);for(i=T;i<S.length-1;i++)_(S[i],S[i+1]);return details.fragmentHint&&_(S[S.length-1],details.fragmentHint),details.PTSKnown=details.alignedSliding=!0,y}function m(e,t){for(var r=null,d=e.fragments,i=d.length-1;i>=0;i--){var f=d[i].initSegment;if(f){r=f;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var h,_,m,S,D,L=0;if(E(e,t,(function(e,o){e.relurl&&(L=e.cc-o.cc),Object(n.isFiniteNumber)(e.startPTS)&&Object(n.isFiniteNumber)(e.endPTS)&&(o.start=o.startPTS=e.startPTS,o.startDTS=e.startDTS,o.appendedPTS=e.appendedPTS,o.maxStartPTS=e.maxStartPTS,o.endPTS=e.endPTS,o.endDTS=e.endDTS,o.minEndPTS=e.minEndPTS,o.duration=e.endPTS-e.startPTS,o.duration&&(h=o),t.PTSKnown=t.alignedSliding=!0),o.elementaryStreams=e.elementaryStreams,o.loader=e.loader,o.stats=e.stats,o.urlId=e.urlId,e.initSegment&&(o.initSegment=e.initSegment,r=e.initSegment)})),r&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=r)||void 0===t?void 0:t.relurl)||(e.initSegment=r)})),t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed){o.logger.warn("[level-helper] Previous playlist missing segments ski
2pped in delta playlist");for(var I=t.skippedSegments;I--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=(_=e.dateRanges,m=t.dateRanges,S=t.recentlyRemovedDateranges,D=c({},_),S&&S.forEach((function(e){delete D[e]})),Object.keys(m).forEach((function(e){var t=new l.DateRange(m[e].attr,D[e]);t.isValid?D[e]=t:o.logger.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(m[e].attr)+'"')})),D));var A=t.fragments;if(L){o.logger.warn("discontinuity sliding from playlist, take drift into account");for(var x=0;x<A.length;x++)A[x].cc+=L}t.skippedSegments&&(t.startCC=t.fragments[0].cc),y(e.partList,t.partList,(function(e,t){t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),h?v(t,h,h.startPTS,h.endPTS,h.startDTS,h.endDTS):T(e,t),A.length&&(t.totalduration=t.edge-A[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;var M=t.advancedDateTime;if(t.advanced&&M){var k=t.edge;t.driftStart||(t.driftStartTime=M,t.driftStart=k),t.driftEndTime=M,t.driftEnd=k}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function y(e,t,r){if(e&&t)for(var n=0,i=0,o=e.length;i<=o;i++){var l=e[i],c=t[i+n];l&&c&&l.index===c.index&&l.fragment.sn===c.fragment.sn?r(l,c):n--}}function E(e,t,r){for(var n=t.skippedSegments,o=Math.max(e.startSN,t.startSN)-t.startSN,l=(e.fragmentHint?1:0)+(n?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,c=t.startSN-e.startSN,d=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,f=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,i=o;i<=l;i++){var h=f[c+i],_=d[i];n&&!_&&i<n&&(_=t.fragments[i]=h),h&&_&&r(h,_)}}function T(e,t){var r=t.startSN+t.skippedSegments-e.startSN,n=e.fragments;r<0||r>=n.length||S(t,n[r].start)}function S(details,e){if(e){for(var t=details.fragments,i=details.skippedSegments;i<t.length;i++)t[i].start+=e;details.fragmentHint&&(details.fragmentHint.start+=e)}}function D(e,t){var r,n=1e3*e.levelTargetDuration,o=n/2,l=e.age,c=l>0&&l<3*n,d=t.loading.end-t.loading.start,f=e.availabilityDelay;if(!1===e.updated)if(c){var h=333*e.misses;r=Math.max(Math.min(o,2*d),h),e.availabilityDelay=(e.availabilityDelay||0)+r}else r=o;else c?(f=Math.min(f||n/2,l),e.availabilityDelay=f,r=f+n-l):r=n-d;return Math.round(r)}function L(e,t,r){if(!e||!e.details)return null;var n=e.details,o=n.fragments[t-n.startSN];return o||((o=n.fragmentHint)&&o.sn===t?o:t<n.startSN&&r&&r.sn===t?r:null)}function I(e,t,r){if(!e||!e.details)return null;var n=e.details.partList;if(n)for(var i=n.length;i--;){var o=n[i];if(o.index===r&&o.fragment.sn===t)return o}return null}},
vendor: 4,618 bytes, line 2
2"./src/controller/stream-controller.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return D}));var n=r("./src/polyfills/number.ts"),o=r("./src/controller/base-stream-controller.ts"),l=r("./src/is-supported.ts"),c=r("./src/events.ts"),d=r("./src/utils/buffer-helper.ts"),f=r("./src/controller/fragment-tracker.ts"),h=r("./src/types/loader.ts"),_=r("./src/loader/fragment.ts"),v=r("./src/demux/transmuxer-interface.ts"),m=r("./src/types/transmuxer.ts"),y=r("./src/controller/gap-controller.ts"),E=r("./src/errors.ts");function T(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,p){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},S(e,p)}var D=function(e){var t,r;function D(t,r){var n;return(n=e.call(this,t,r,"[stream-controller]")||this).audioCodecSwap=!1,n.gapController=null,n.level=-1,n._forceStartLoad=!1,n.altAudio=!1,n.audioOnly=!1,n.fragPlaying=null,n.onvplaying=null,n.onvseeked=null,n.fragLastKbps=0,n.couldBacktrack=!1,n.backtrackFragment=null,n.audioCodecSwitch=!1,n.videoBuffer=null,n._registerListeners(),n}r=e,(t=D).prototype=Object.create(r.prototype),t.prototype.constructor=t,S(t,r);var L,I,A,x=D.prototype;return x._registerListeners=function(){var e=this.hls;e.on(c.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(c.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(c.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(c.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(c.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(c.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(c.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(c.Events.ERROR,this.onError,this),e.on(c.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(c.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(c.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(c.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(c.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(c.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var e=this.hls;e.off(c.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(c.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(c.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(c.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(c.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(c.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(c.Events.ERROR,this.onError,this),e.off(c.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(c.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(c.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(c.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(c.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(c.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},x.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var n=r.startLevel;-1===n&&(r.config.testBandwidth&&this.levels.length>1?(n=0,this.bitrateTest=!0):n=r.nextAutoLevel),this.level=r.nextLoadLevel=n,this.loadedmetadata=!1}t>0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=o.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=o.State.STOPPED},x.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},x.doTick=function(){switch(this.state){case o.State.IDLE:this.doTickIdle();break;case o.State.WAITING_LEVEL:var e,t=this.levels,r=this.level,details=null==t||null===(e=t[r])||void 0===e?void 0:e.details;if(details&&(!details.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(details))break;this.state=o.State.IDLE;break}break;case o.State.FRAG_LOADING_WAITING_RETRY:var n,l=self.performance.now(),c=this.retryDate;(!c||l>=c||null!==(n=this.media)&&void 0!==n&&n.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.level),this.state=o.State.IDLE)}this.onTickEnd()},x.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},x.doTickIdle=function(){var e,t,r=this.hls,n=this.levelLastLoaded,l=this.levels,d=this.media,v=r.config,m=r.nextLo
vendor: 17,213 bytes, line 2
2adLevel;if(null!==n&&(d||!this.startFragRequested&&v.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&l&&l[m]){var y=l[m];this.level=r.nextLoadLevel=m;var E=y.details;if(!E||this.state===o.State.WAITING_LEVEL||E.live&&this.levelLastLoaded!==m)this.state=o.State.WAITING_LEVEL;else{var T=this.getMainFwdBufferInfo();if(null!==T&&!(T.len>=this.getMaxBufferLength(y.maxBitrate))){if(this._streamEnded(T,E)){var data={};return this.altAudio&&(data.type="video"),this.hls.trigger(c.Events.BUFFER_EOS,data),void(this.state=o.State.ENDED)}this.backtrackFragment&&this.backtrackFragment.start>T.end&&(this.backtrackFragment=null);var S=this.backtrackFragment?this.backtrackFragment.start:T.end,D=this.getNextFragment(S,E);if(this.couldBacktrack&&!this.fragPrevious&&D&&"initSegment"!==D.sn&&this.fragmentTracker.getState(D)!==f.FragmentState.OK){var L,I=(null!=(L=this.backtrackFragment)?L:D).sn-E.startSN,A=E.fragments[I-1];A&&D.cc===A.cc&&(D=A,this.fragmentTracker.removeFragment(A))}else this.backtrackFragment&&T.len&&(this.backtrackFragment=null);if(D&&this.fragmentTracker.getState(D)===f.FragmentState.OK&&this.nextLoadPosition>S){var x=this.audioOnly&&!this.altAudio?_.ElementaryStreamTypes.AUDIO:_.ElementaryStreamTypes.VIDEO;d&&this.afterBufferFlushed(d,x,h.PlaylistLevelType.MAIN),D=this.getNextFragment(this.nextLoadPosition,E)}D&&(!D.initSegment||D.initSegment.data||this.bitrateTest||(D=D.initSegment),"identity"!==(null===(e=D.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=D.decryptdata)&&void 0!==t&&t.key?this.loadFragment(D,E,S):this.loadKey(D,E))}}}},x.loadFragment=function(t,r,n){var o,l=this.fragmentTracker.getState(t);this.fragCurrent=t,l===f.FragmentState.NOT_LOADED?"initSegment"===t.sn?this._loadInitSegment(t):this.bitrateTest?(this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,r,n)):l===f.FragmentState.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(o=this.media)||void 0===o?void 0:o.buffered.length)&&this.fragmentTracker.removeAllFragments()},x.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,h.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},x.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,h.PlaylistLevelType.MAIN)},x.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},x.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},x.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var r,n=this.getAppendedFrag(t.currentTime);if(n&&n.start>1&&this.flushMainBuffer(0,n.start-1),!t.paused&&e){var o=e[this.hls.nextLoadLevel],l=this.fragLastKbps;r=l&&this.fragCurrent?this.fragCurrent.duration*o.maxBitrate/(1e3*l)+1:0}else r=0;var c=this.getBufferedFrag(t.currentTime+r);if(c){var d=this.followingBufferedFrag(c);if(d){this.abortCurrentFrag();var f=d.maxStartPTS?d.maxStartPTS:d.start,h=d.duration,_=Math.max(c.end,f+Math.min(Math.max(h-this.config.maxFragLookUpTolerance,.5*h),.75*h));this.flushMainBuffer(_,Number.POSITIVE_INFINITY)}}}},x.abortCurrentFrag=function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,null!=e&&e.loader&&e.loader.abort(),this.state){case o.State.KEY_LOADING:case o.State.FRAG_LOADING:case o.State.FRAG_LOADING_WAITING_RETRY:case o.State.PARSING:case o.State.PARSED:this.state=o.State.IDLE}this.nextLoadPosition=this.getLoadPosition()},x.flushMainBuffer=function(t,r){e.prototype.flushMainBuffer.call(this,t,r,this.altAudio?"video":null)},x.onMediaAttached=function(t,data){e.prototype.onMediaAttached.call(this,t,data);var r=data.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new y.default(this.config,r,this.fragmentTracker,this.hls)},x.onMediaDetaching=function(){var t=this.media;t&&this.onvplaying&&this.onvseeked&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},x.onMediaPlaying=function(){this.tick()},x.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;Object(n.isFiniteNumber)(t)&&this.log("Media seeked to "+t.toFixed(3)),this.tick()},x.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(c.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null,this.backtrackFragment=null},x.onManifestParsed=function(e,data){var t,r=!1,n=!1;data.levels.forEach((function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(r=!0),-1!==t.indexOf("mp4a.40.5")&&(n=!0))})),this.audioCodecSwitch=r&&n&&!Object(l.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=data.levels,this.startFragRequested=!1},x.onLevelLoading=function(e,data){var t=this.levels;if(t&&this.state===o.State.IDLE){var r=t[data.level];(!r.details||r.details.live&&this.levelLastLoaded!==data.level||this.waitForCdnTuneIn(r.details))&&(this.state=o.State.WAITING_LEVEL)}},x.onLevelLoaded=function(e,data){var t,r=this.levels,n=data.level,l=data.details,d=l.totalduration;if(r){this.log("Level "+n+" loaded ["+l.startSN+","+l.endSN+"], cc ["+l.startCC+", "+l.endCC+"] duration:"+d);var f=this.fragCurrent;!f||this.state!==o.State.FRAG_LOADING&&this.state!==o.State.FRAG_LOADING_WAITING_RETRY||f.level!==data.level&&f.loader&&(this.state=o.State.IDLE,this.backtrackFragment=null,f.loader.abort());var h=r[n],_=0;if(l.live||null!==(t=h.details)&&void 0!==t&&t.live){if(l.fragments[0]||(l.deltaUpdateFailed=!0),l.deltaUpdateFailed)return;_=this.alignPlaylists(l,h.details)}if(h.details=l,this.levelLastLoaded=n,this.hls.trigger(c.Events.LEVEL_UPDATED,{details:l,level:n}),this.state===o.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=o.State.IDLE}this.startFragRequested?l.live&&this.synchronizeToLiveEdge(l):this.setStartPosition(l,_),this.tick()}else this.warn("Levels were reset while loading level "+n)},x._handleFragmentLoadProgress=function(data){var e,t=data.frag,r=data.part,n=data.payload,o=this.levels;if(o){var l=o[t.level],details=l.details;if(details){var c=l.videoCodec,d=details.PTSKnown||!details.live,f=null===(e=t.initSegment)||void 0===e?void 0:e.data,_=this._getAudioCodec(l),y=this.transmuxer=this.transmuxer||new v.default(this.hls,h.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),E=r?r.index:-1,T=-1!==E,S=new m.ChunkMetadata(t.level,t.sn,t.stats.chunkCount,n.byteLength,E,T),D=this.initPTS[t.cc];y.push(n,f,_,c,t,r,details.totalduration,d,S,D)}else this.warn("Dropping fragment "+t.sn+" of level "+t.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+t.sn+" of level "+t.level+" will not be buffered")},x.onAudioTrackSwitching=function(e,data){var t=this.altAudio,r=!!data.url,n=data.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var o=this.fragCurrent;null!=o&&o.loader&&(this.log("Switching to main audio track, cancel main fragment load"),o.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var l=this.hls;t&&l.trigger(c.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),l.trigger(c.Events.AUDIO_TRACK_SWITCHED,{id:n})}},x.onAudioTrackSwitched=function(e,data){var t=data.id,r=!!this.hls.audioTracks[t].url;if(r){var n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=r,this.tick()},x.onBufferCreated=function(e,data){var t,r,n=data.tracks,o=!1;for(var l in n){var track=n[l];if("main"===track.id){if(r=l,t=track,"video"===l){var c=n[l];c&&(this.videoBuffer=c.buffer)}}else o=!0}o&&t?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},x.onFragBuffered=function(e,data){var t=data.frag,r=data.part;if(!t||t.type===h.PlaylistLevelType.MAIN){if(this.fragContextChanged(t))return this.warn("Fragment "+t.sn+(r?" p: "+r.index:"")+" of level "+t.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===o.State.PARSED&&(this.state=o.State.IDLE));var n=r?r.stats:t.stats;this.fragLastKbps=Math.round(8*n.total/(n.buffering.end-n.loading.first)),"initSegment"!==t.sn&&(this.fragPrevious=t),this.fragBufferedComplete(t,r)}},x.onError=function(e,data){switch(data.details){case E.ErrorDetails.FRAG_LOAD_ERROR:case E.ErrorDetails.FRAG_LOAD_TIMEOUT:case E.ErrorDetails.KEY_LOAD_ERROR:case E.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.MAIN,data);break;case E.ErrorDetails.LEVEL_LOAD_ERROR:case E.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==o.State.ERROR&&(data.fatal?(this.warn(""+data.details),this.state=o.State.ERROR):data.levelRetry||this.state!==o.State.WAITING_LEVEL||(this.state=o.State.IDLE));break;case E.ErrorDetails.BUFFER_FULL_ERROR:if("main"===data.parent&&(this.state===o.State.PARSING||this.state===o.State.PARSED)){var t=!0,r=this.getFwdBufferInfo(this.media,h.PlaylistLevelType.MAIN);r&&r.len>.5&&(t=!this.reduceMaxBufferLength(r.len)),t&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},x.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){if(this.loadedmetadata||!d.BufferHelper.getBuffered(e).length){var r=this.state!==o.State.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,r)}this.lastCurrentTime=e.currentTime}},x.onFragLoadEmergencyAborted=function(){this.state=o.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},x.onBufferFlushed=function(e,t){var r=t.type;if(r!==_.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var n=(r===_.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(n,r,h.PlaylistLevelType.MAIN)}},x.onLevelsUpdated=function(e,data){this.levels=data.levels},x.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},x.seekToStartPos=function(){var e=this.media;if(e){var t=e.currentTime,r=this.startPosition;if(r>=0&&t<r){if(e.seeking)return void this.log("could not seek to "+r+", already seeking at "+t);var n=d.BufferHelper.getBuffered(e),o=(n.length?n.start(0):0)-r;o>0&&(o<this.config.maxBufferHole||o<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+o+" to match buffer start"),r+=o,this.startPosition=r),this.log("seek to target start position "+r+" from current time "+t),e.currentTime=r}}},x._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t},x._loadBitrateTestFrag=function(e){var t=this;e.bitrateTest=!0,this._doFragLoad(e).then((function(data){var r=t.hls;if(data&&!r.nextLoadLevel&&!t.fragContextChanged(e)){t.fragLoadError=0,t.state=o.State.IDLE,t.startFragRequested=!1,t.bitrateTest=!1;var n=e.stats;n.parsing.start=n.parsing.end=n.buffering.start=n.buffering.end=self.performance.now(),r.trigger(c.Events.FRAG_LOADED,data),e.bitrateTest=!1}}))},x._handleTransmuxComplete=function(e){var t,r="main",l=this.hls,d=e.remuxResult,f=e.chunkMeta,h=this.getCurrentContext(f);if(!h)return this.warn("The loading context changed while buffering fragment "+f.sn+" of level "+f.level+". This chunk will not be buffered."),void this.resetStartWhenNotLoaded(f.level);var v=h.frag,m=h.part,y=h.level,video=d.video,text=d.text,E=d.id3,T=d.initSegment,details=y.details,audio=this.altAudio?void 0:d.audio;if(!this.fragContextChanged(v)){if(this.state=o.State.PARSING,T){T.tracks&&(this._bufferInitSegment(y,T.tracks,v,f),l.trigger(c.Events.FRAG_PARSING_INIT_SEGMENT,{frag:v,id:r,tracks:T.tracks}));var S=T.initPTS,D=T.timescale;Object(n.isFiniteNumber)(S)&&(this.initPTS[v.cc]=S,l.trigger(c.Events.INIT_PTS_FOUND,{frag:v,id:r,initPTS:S,timescale:D}))}if(video&&!1!==d.independent){if(details){var L=video.startPTS,I=video.endPTS,A=video.startDTS,x=video.endDTS;if(m)m.elementaryStreams[video.type]={startPTS:L,endPTS:I,startDTS:A,endDTS:x};else if(video.firstKeyFrame&&video.independent&&(this.couldBacktrack=!0),video.dropped&&video.independent){var M=this.getMainFwdBufferInfo();if((M?M.end:this.getLoadPosition())+this.config.maxBufferHole<(video.firstKeyFramePTS?video.firstKeyFramePTS:L)-this.config.maxBufferHole)return void this.backtrack(v);v.setElementaryStreamInfo(video.type,v.start,I,v.start,x,!0)}v.setElementaryStreamInfo(video.type,L,I,A,x),this.backtrackFragment&&(this.backtrackFragment=v),this.bufferFragmentData(video,v,m,f)}}else if(!1===d.independent)return void this.backtrack(v);if(audio){var k=audio.startPTS,w=audio.endPTS,N=audio.startDTS,R=audio.endDTS;m&&(m.elementaryStreams[_.ElementaryStreamTypes.AUDIO]={startPTS:k,endPTS:w,startDTS:N,endDTS:R}),v.setElementaryStreamInfo(_.ElementaryStreamTypes.AUDIO,k,w,N,R),this.bufferFragmentData(audio,v,m,f)}if(details&&null!=E&&null!==(t=E.samples)&&void 0!==t&&t.length){var O={id:r,frag:v,details:details,samples:E.samples};l.trigger(c.Events.FRAG_PARSING_METADATA,O)}if(details&&text){var C={id:r,frag:v,details:details,samples:text.samples};l.trigger(c.Events.FRAG_PARSING_USERDATA,C)}}},x._bufferInitSegment=function(e,t,r,n){var l=this;if(this.state===o.State.PARSING){this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;var audio=t.audio,video=t.video,d=t.audiovideo;if(audio){var f=e.audioCodec,h=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(f&&(f=-1!==f.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==audio.metadata.channelCount&&-1===h.indexOf("firefox")&&(f="mp4a.40.5")),-1!==h.indexOf("android")&&"audio/mpeg"!==audio.container&&(f="mp4a.40.2",this.log("Android: force audio codec to "+f)),e.audioCodec&&e.audioCodec!==f&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+f+'"'),audio.levelCodec=f,audio.id="main",this.log("Init audio buffer, container:"+audio.container+", codecs[selected/level/parsed]=["+(f||"")+"/"+(e.audioCodec||"")+"/"+audio.codec+"]")}video&&(video.levelCodec=e.videoCodec,video.id="main",this.log("Init video buffer, container:"+video.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+video.codec+"]")),d&&this.log("Init audiovideo buffer, container:"+d.container+", codecs[level/parsed]=["+(e.attrs.CODECS||"")+"/"+d.codec+"]"),this.hls.trigger(c.Events.BUFFER_CODECS,t),Object.keys(t).forEach((function(e){var o=t[e].initSegment;null!=o&&o.byteLength&&l.hls.trigger(c.Events.BUFFER_APPENDING,{type:e,data:o,frag:r,part:null,chunkMeta:n,parent:r.type})})),this.tick()}},x.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,h.PlaylistLevelType.MAIN)},x.backtrack=function(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=o.State.IDLE},x.checkFragmentChanged=function(){var video=this.media,e=null;if(video&&video.readyState>1&&!1===video.seeking){var t=video.currentTime;if(d.BufferHelper.isBuffered(video,t)?e=this.getAppendedFrag(t):d.BufferHelper.isBuffered(video,t+.1)&&(e=this.getAppendedFrag(t+.1)),e){this.backtrackFragment=null;var r=this.fragPlaying,n=e.level;r&&e.sn===r.sn&&r.level===n&&e.urlId===r.urlId||(this.hls.trigger(c.Events.FRAG_CHANGED,{frag:e}),r&&r.level===n||this.hls.trigger(c.Events.LEVEL_SWITCHED,{level:n}),this.fragPlaying=e)}}},L=D,(I=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentFrag",get:function(){var e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}},{key:"currentProgramDateTime",get:function(){var e=this.media;if(e){var t=e.currentTime,r=this.currentFrag;if(r&&Object(n.isFiniteNumber)(t)&&Object(n.isFiniteNumber)(r.programDateTime)){var o=r.programDateTime+1e3*(t-r.start);return new Date(o)}}return null}},{key:"currentLevel",get:function(){var e=this.currentFrag;return e?e.level:-1}},{key:"nextBufferedFrag",get:function(){var e=this.currentFrag;return e?this.followingBufferedFrag(e):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&T(L.prototype,I),A&&T(L,A),Object.defineProperty(L,"prototype",{writable:!1}),D}(o.default)},
vendor: 5,446 bytes, line 2
2"./src/controller/subtitle-stream-controller.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"SubtitleStreamController",(function(){return E}));var n=r("./src/events.ts"),o=r("./src/utils/buffer-helper.ts"),l=r("./src/controller/fragment-finders.ts"),c=r("./src/utils/discontinuities.ts"),d=r("./src/controller/level-helper.ts"),f=r("./src/controller/fragment-tracker.ts"),h=r("./src/controller/base-stream-controller.ts"),_=r("./src/types/loader.ts"),v=r("./src/types/level.ts");function m(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,p){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},y(e,p)}var E=function(e){var t,r;function E(t,r){var n;return(n=e.call(this,t,r,"[subtitle-stream-controller]")||this).levels=[],n.currentTrackId=-1,n.tracksBuffered=[],n.mainDetails=null,n._registerListeners(),n}r=e,(t=E).prototype=Object.create(r.prototype),t.prototype.constructor=t,y(t,r);var S,D,L,I=E.prototype;return I.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},I._registerListeners=function(){var e=this.hls;e.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(n.Events.ERROR,this.onError,this),e.on(n.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(n.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(n.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},I._unregisterListeners=function(){var e=this.hls;e.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(n.Events.ERROR,this.onError,this),e.off(n.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(n.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(n.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},I.startLoad=function(){this.stopLoad(),this.state=h.State.IDLE,this.setInterval(500),this.tick()},I.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},I.onLevelLoaded=function(e,data){this.mainDetails=data.details},I.onSubtitleFragProcessed=function(e,data){var t=data.frag,r=data.success;if(this.fragPrevious=t,this.state=h.State.IDLE,r){var n=this.tracksBuffered[this.currentTrackId];if(n){for(var o,l=t.start,i=0;i<n.length;i++)if(l>=n[i].start&&l<=n[i].end){o=n[i];break}var c=t.start+t.duration;o?o.end=c:(o={start:l,end:c},n.push(o)),this.fragmentTracker.fragBuffered(t)}}},I.onBufferFlushing=function(e,data){var t=data.startOffset,r=data.endOffset;if(0===t&&r!==Number.POSITIVE_INFINITY){var n=this.currentTrackId,o=this.levels;if(!o.length||!o[n]||!o[n].details)return;var l=r-o[n].details.targetduration;if(l<=0)return;data.endOffsetSubtitles=Math.max(0,l),this.tracksBuffered.forEach((function(e){for(var i=0;i<e.length;)if(e[i].end<=l)e.shift();else{if(!(e[i].start<l))break;e[i].start=l,i++}})),this.fragmentTracker.removeFragmentsInRange(t,l,_.PlaylistLevelType.SUBTITLE)}},I.onError=function(e,data){var t,r=data.frag;r&&r.type===_.PlaylistLevelType.SUBTITLE&&(null!==(t=this.fragCurrent)&&void 0!==t&&t.loader&&this.fragCurrent.loader.abort(),this.state=h.State.IDLE)},I.onSubtitleTracksUpdated=function(e,t){var r=this,n=t.subtitleTracks;this.tracksBuffered=[],this.levels=n.map((function(e){return new v.Level(e)})),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach((function(e){r.tracksBuffered[e.id]=[]})),this.mediaBuffer=null},I.onSubtitleTrackSwitch=function(e,data){if(this.currentTrackId=data.id,this.levels.length&&-1!==this.currentTrackId){var t=this.levels[this.currentTrackId];null!=t&&t.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,t&&this.setInterval(500)}else this.clearInterval()},I.onSubtitleTrackLoaded=function(e,data){var t,r=data.details,n=data.id,o=this.currentTrackId,f=this.levels;if(f.length){var track=f[o];if(!(n>=f.length||n!==o)&&track){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(t=track.details)&&void 0!==t&&t.live){var _=this.mainDetails;if(r.deltaUpdateFailed||!_)return;var v=_.fragments[0];track.details?0===this.alignPlaylists(r,track.details)&&v&&Object(d.addSliding)(r,v.start):r.hasProgramDateTime&&_.hasProgramDateTime?Object(c.alignMediaPlaylistByPDT)(r,_):v&&Object(d.addSliding)(r,v.start)}track.details=r,this.levelLastLoaded=n,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===h.State.IDLE&&(Object(l.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),track.details=void 0))}}},I._handleFragmentLoadComplete=function(e){var t=e.frag,r=e.payload,o=t.decryptdata,l=this.hls;if(!this.fragContextChanged(t)&&r&&r.byteLength>0&&o&&o.key&&o.iv&&"AES-128"===o.method){var c=performance.now();
2this.decrypter.webCryptoDecrypt(new Uint8Array(r),o.key.buffer,o.iv.buffer).then((function(e){var r=performance.now();l.trigger(n.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:c,tdecrypt:r}})}))}},I.doTick=function(){if(this.media){if(this.state===h.State.IDLE){var e=this.currentTrackId,t=this.levels;if(!t.length||!t[e]||!t[e].details)return;var r=t[e].details,n=r.targetduration,c=this.config,d=this.media,_=o.BufferHelper.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],d.currentTime-n,c.maxBufferHole),v=_.end;if(_.len>this.getMaxBufferLength()+n)return;console.assert(r,"Subtitle track details are defined on idle subtitle stream controller tick");var m,y=r.fragments,E=y.length,T=r.edge,S=this.fragPrevious;if(v<T){var D=c.maxFragLookUpTolerance;!(m=Object(l.findFragmentByPTS)(S,y,Math.max(y[0].start,v),D))&&S&&S.start<y[0].start&&(m=y[0])}else m=y[E-1];if(!(m=this.mapToInitFragWhenRequired(m)))return;if(this.fragmentTracker.getState(m)!==f.FragmentState.NOT_LOADED)return;m.encrypted?this.loadKey(m,r):this.loadFragment(m,r,v)}}else this.state=h.State.IDLE},I.loadFragment=function(t,r,n){this.fragCurrent=t,"initSegment"===t.sn?this._loadInitSegment(t):e.prototype.loadFragment.call(this,t,r,n)},S=E,(D=[{key:"mediaBufferTimeRanges",get:function(){return new T(this.tracksBuffered[this.currentTrackId]||[])}}])&&m(S.prototype,D),L&&m(S,L),Object.defineProperty(S,"prototype",{writable:!1}),E}(h.default),T=function(e){this.buffered=void 0;var t=function(t,r,n){if((r>>>=0)>n-1)throw new DOMException("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+r+") is greater than the maximum bound ("+n+")");return e[r][t]};this.buffered={get length(){return e.length},end:function(r){return t("end",r,e.length)},start:function(r){return t("start",r,e.length)}}}},
vendor: 13,102 bytes, line 2
2"./src/controller/subtitle-track-controller.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/events.ts"),o=r("./src/utils/texttrack-utils.ts"),l=r("./src/controller/base-playlist-controller.ts"),c=r("./src/types/loader.ts");function d(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,p){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},f(e,p)}var h=function(e){var t,r;function l(t){var r;return(r=e.call(this,t,"[subtitle-track-controller]")||this).media=null,r.tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.selectDefaultTrack=!0,r.queuedDefaultTrack=-1,r.trackChangeListener=function(){return r.onTextTracksChanged()},r.asyncPollTrackChange=function(){return r.pollTrackChange(0)},r.useTextTrackPolling=!1,r.subtitlePollingInterval=-1,r._subtitleDisplay=!0,r.registerListeners(),r}r=e,(t=l).prototype=Object.create(r.prototype),t.prototype.constructor=t,f(t,r);var h,v,m,y=l.prototype;return y.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,e.prototype.destroy.call(this)},y.registerListeners=function(){var e=this.hls;e.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(n.Events.ERROR,this.onError,this)},y.unregisterListeners=function(){var e=this.hls;e.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(n.Events.ERROR,this.onError,this)},y.onMediaAttached=function(e,data){this.media=data.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},y.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},y.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),_(this.media.textTracks).forEach((function(track){Object(o.clearCurrentCues)(track)})),this.subtitleTrack=-1,this.media=null)},y.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},y.onManifestParsed=function(e,data){this.tracks=data.subtitleTracks},y.onSubtitleTrackLoaded=function(e,data){var t=data.id,details=data.details,r=this.trackId,n=this.tracksInGroup[r];if(n){var o=n.details;n.details=data.details,this.log("subtitle track "+t+" loaded ["+details.startSN+"-"+details.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,data,o))}else this.warn("Invalid subtitle track id "+t)},y.onLevelLoading=function(e,data){this.switchLevel(data.level)},y.onLevelSwitching=function(e,data){this.switchLevel(data.level)},y.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var r=t.textGroupIds[t.urlId];if(this.groupId!==r){var o=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,l=this.tracks.filter((function(track){return!r||track.groupId===r}));this.tracksInGroup=l;var c=this.findTrackId(null==o?void 0:o.name)||this.findTrackId();this.groupId=r;var d={subtitleTracks:l};this.log("Updating subtitle tracks, "+l.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(n.Events.SUBTITLE_TRACKS_UPDATED,d),-1!==c&&this.setSubtitleTrack(c,o)}}},y.findTrackId=function(e){for(var t=this.tracksInGroup,i=0;i<t.length;i++){var track=t[i];if((!this.selectDefaultTrack||track.default)&&(!e||e===track.name))return track.id}return-1},y.onError=function(t,data){e.prototype.onError.call(this,t,data),!data.fatal&&data.context&&data.context.type===c.PlaylistContextType.SUBTITLE_TRACK&&data.context.id===this.trackId&&data.context.groupId===this.groupId&&this.retryLoadingOrFail(data)},y.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var r=t.id,o=t.groupId,l=t.url;if(e)try{l=e.addDirectives(l)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Loading subtitle playlist for id "+r),this.hls.trigger(n.Events.SUBTITLE_TRACK_LOADING,{url:l,id:r,groupId:o,deliveryDirectives:e||null})}},y.toggleTrackModes=function(e){var t=this,r=this.media,n=this.trackId;if(r){var o=_(r.textTracks),l=o.filter((function(track){return track.groupId===t.groupId}));if(-1===e)[].slice.call(o).forEach((function(track){track.mode="disabled"}));else{var c=l[n];c&&(c.mode="disabled")}var d=l[e];d&&(d.mode=this.subtitleDisplay?"showing":"hidden")}},y.setSubtitleTrack=function(e,t){var r,o=this.tracksInGroup;if(this.media){if(this.trackId!==e&&this.toggleTrackModes(e),!(this.trackId===e&&(-1===e||null!==(r=o[e])&&void 0!==r&&r.details)||e<-1||e>=o.length)){this.clearTimer();var track=o[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,track){var l=track.id,c=track.groupId,d=void 0===c?"":c,f=track.name,h=track.type,_=track.url;this.hls.trigger(n.Events.SUBTITLE_TRACK_SWITCH,{id:l,groupId:d,name:f,type:h,url:_});var v=this.switchParams(track.url,null==t?void 0:t.details);this.loadPlaylist(v)}else this.hls.trigger(n.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},y.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=_(this.media.textTracks),r=0;r<t.length;r++)if("hidden"===t[r].mode)e=r;else if("showing"===t[r].mode){e=r;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}},h=l,(v=[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes(this.trackId)}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,t)}}])&&d(h.prototype,v),m&&d(h,m),Object.defineProperty(h,"prototype",{writable:!1}),l}(l.default);function _(e){for(var t=[],i=0;i<e.length;i++){var track=e[i];"subtitles"===track.kind&&track.label&&t.push(e[i])}return t}t.default=h},"./src/controller/timeline-controller.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"TimelineController",(function(){return y}));var n=r("./src/polyfills/number.ts"),o=r("./src/events.ts"),l=r("./src/utils/cea-608-parser.ts"),c=r("./src/utils/output-filter.ts"),d=r("./src/utils/webvtt-parser.ts"),f=r("./src/utils/texttrack-utils.ts"),h=r("./src/utils/imsc1-ttml-parser.ts"),_=r("./src/utils/mp4-tools.ts"),v=r("./src/types/loader.ts"),m=r("./src/utils/logger.ts"),y=function(){function e(e){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new c.default(this,"textTrack1"),r=new c.default(this,"textTrack2"),n=new c.default(this,"textTrack3"),d=new c.default(this,"textTrack4");this.cea608Parser1=new l.default(1,t,r),this.cea608Parser2=new l.default(3,n,d)}e.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(o.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(o.Events.FRAG_LOADING,this.onFragLoading,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(o.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(o.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(o.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=e.prototype;return t.destroy=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(o.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(o.Events.FRAG_LOADING,this.onFragLoading,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(o.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(o.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(o.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},t.addCues=function(e,t,r,n,l){for(var c,d,f,h,_=!1,i=l.length;i--;){var v=l[i],m=(c=v[0],d=v[1],f=t,h=r,Math.min(d,h)-Math.max(c,f));if(m>=0&&(v[0]=Math.min(v[0],t),v[1]=Math.max(v[1],r),_=!0,m/(r-t)>.5))return}if(_||l.push([t,r]),this.config.renderTextTracksNatively){var track=this.captionsTracks[e];this.Cues.newCue(track,t,r,n)}else{var y=this.Cues.newCue(null,t,r,n);this.hls.trigger(o.Events.CUES_PARSED,{type:"captions",cues:y,track:e})}},t.onInitPtsFound=function(e,t){var r=this,n=t.frag,l=t.id,c=t.initPTS,d=t.timescale,f=this.unparsedVttFrags;"main"===l&&(this.initPTS[n.cc]=c,this.timescale[n.cc]=d),f.length&&(this.unparsedVttFrags=[],f.forEach((function(e){r.onFragLoaded(o.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var i=0;i<t.textTracks.length;i++){var r=t.textTracks[i];if(r[e])return r}return null},t.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},t.createNativeTrack=function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,r=this.captionsTracks,n=this.media,o=t[e],label=o.label,l=o.languageCode,c=this.getExistingTrack(e);if(c)r[e]=c,Object(f.clearCurrentCues)(r[e]),Object(f.sendAddTrackEvent)(r[e],n);else{var d=this.createTextTrack("captions",label,l);d&&(d[e]=!0,r[e]=d)}}},t.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var track={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=track,this.hls.trigger(o.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[track]})}}},t.createTextTrack=function(e,label,t){var r=this.media;if(r)return r.addTextTrack(e,label,t)},t.onMediaAttaching=function(e,data){this.media=data.media,this._cleanTracks()},t.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Object(f.clearCurrentCues)(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},t._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;
2if(t)for(var i=0;i<t.length;i++)Object(f.clearCurrentCues)(t[i])}},t.onSubtitleTracksUpdated=function(e,data){var t=this;this.textTracks=[];var r=data.subtitleTracks||[],n=r.some((function(track){return track.textCodec===h.IMSC1_CODEC}));if(this.config.enableWebVTT||n&&this.config.enableIMSC1){var l=this.tracks&&r&&this.tracks.length===r.length;if(this.tracks=r||[],this.config.renderTextTracksNatively){var c=this.media?this.media.textTracks:[];this.tracks.forEach((function(track,e){var r;if(e<c.length){for(var n=null,i=0;i<c.length;i++)if(E(c[i],track)){n=c[i];break}n&&(r=n)}if(r)Object(f.clearCurrentCues)(r);else{var o=t._captionsOrSubtitlesFromCharacteristics(track);(r=t.createTextTrack(o,track.name,track.lang))&&(r.mode="disabled")}r&&(r.groupId=track.groupId,t.textTracks.push(r))}))}else if(!l&&this.tracks&&this.tracks.length){var d=this.tracks.map((function(track){return{label:track.name,kind:track.type.toLowerCase(),default:track.default,subtitleTrack:track}}));this.hls.trigger(o.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:d})}}},t._captionsOrSubtitlesFromCharacteristics=function(track){var e;if(null!==(e=track.attrs)&&void 0!==e&&e.CHARACTERISTICS){var t=/transcribes-spoken-dialog/gi.test(track.attrs.CHARACTERISTICS),r=/describes-music-and-sound/gi.test(track.attrs.CHARACTERISTICS);if(t&&r)return"captions"}return"subtitles"},t.onManifestLoaded=function(e,data){var t=this;this.config.enableCEA708Captions&&data.captions&&data.captions.forEach((function(e){var r=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(r){var n="textTrack"+r[1],o=t.captionsProperties[n];o&&(o.label=e.name,e.lang&&(o.languageCode=e.lang),o.media=e)}}))},t.onFragLoading=function(e,data){var t=this.cea608Parser1,r=this.cea608Parser2,n=this.lastSn,o=this.lastPartIndex;if(this.enabled&&t&&r&&data.frag.type===v.PlaylistLevelType.MAIN){var l,c,d=data.frag.sn,f=null!=(l=null==data||null===(c=data.part)||void 0===c?void 0:c.index)?l:-1;d===n+1||d===n&&f===o+1||(t.reset(),r.reset()),this.lastSn=d,this.lastPartIndex=f}},t.onFragLoaded=function(e,data){var t=data.frag,r=data.payload,l=this.initPTS,c=this.unparsedVttFrags;if(t.type===v.PlaylistLevelType.SUBTITLE)if(r.byteLength){if(!Object(n.isFiniteNumber)(l[t.cc]))return c.push(data),void(l.length&&this.hls.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:new Error("Missing initial subtitle PTS")}));var d=t.decryptdata,f="stats"in data;if(null==d||null==d.key||"AES-128"!==d.method||f){var _=this.tracks[t.level],m=this.vttCCs;m[t.cc]||(m[t.cc]={start:t.start,prevCC:this.prevCC,new:!0},this.prevCC=t.cc),_&&_.textCodec===h.IMSC1_CODEC?this._parseIMSC1(t,r):this._parseVTTs(t,r,m)}}else this.hls.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(e,t){var r=this,n=this.hls;Object(h.parseIMSC1)(t,this.initPTS[e.cc],this.timescale[e.cc],(function(t){r._appendCues(t,e.level),n.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){m.logger.log("Failed to parse IMSC1: "+t),n.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))},t._parseVTTs=function(e,t,r){var n,l=this,c=this.hls,f=null!==(n=e.initSegment)&&void 0!==n&&n.data?Object(_.appendUint8Array)(e.initSegment.data,new Uint8Array(t)):t;Object(d.parseWebVTT)(f,this.initPTS[e.cc],this.timescale[e.cc],r,e.cc,e.start,(function(t){l._appendCues(t,e.level),c.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(r){l._fallbackToIMSC1(e,t),m.logger.log("Failed to parse VTT cue: "+r),c.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})}))},t._fallbackToIMSC1=function(e,t){var r=this,n=this.tracks[e.level];n.textCodec||Object(h.parseIMSC1)(t,this.initPTS[e.cc],this.timescale[e.cc],(function(){n.textCodec=h.IMSC1_CODEC,r._parseIMSC1(e,t)}),(function(){n.textCodec="wvtt"}))},t._appendCues=function(e,t){var r=this.hls;if(this.config.renderTextTracksNatively){var n=this.textTracks[t];if(!n||"disabled"===n.mode)return;e.forEach((function(e){return Object(f.addCueToTrack)(n,e)}))}else{var l=this.tracks[t];if(!l)return;var track=l.default?"default":"subtitles"+t;r.trigger(o.Events.CUES_PARSED,{type:"subtitles",cues:e,track:track})}},t.onFragDecrypted=function(e,data){var t=data.frag;if(t.type===v.PlaylistLevelType.SUBTITLE){if(!Object(n.isFiniteNumber)(this.initPTS[t.cc]))return void this.unparsedVttFrags.push(data);this.onFragLoaded(o.Events.FRAG_LOADED,data)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(e,data){var t=this.cea608Parser1,r=this.cea608Parser2;if(this.enabled&&t&&r)for(var i=0;i<data.samples.length;i++){var n=data.samples[i].bytes;if(n){var o=this.extractCea608Data(n);t.addData(data.samples[i].pts,o[0]),r.addData(data.samples[i].pts,o[1])}}},t.onBufferFlushing=function(e,t){var r=t.startOffset,n=t.endOffset,o=t.endOffsetSubtitles,l=t.type,c=this.media;
vendor: 614 bytes, line 2
2if(c&&!(c.currentTime<n)){if(!l||"video"===l){var d=this.captionsTracks;Object.keys(d).forEach((function(e){return Object(f.removeCuesInRange)(d[e],r,n)}))}if(this.config.renderTextTracksNatively&&0===r&&void 0!==o){var h=this.textTracks;Object.keys(h).forEach((function(e){return Object(f.removeCuesInRange)(h[e],r,o)}))}}},t.extractCea608Data=function(e){for(var t=[[],[]],r=31&e[0],n=2,o=0;o<r;o++){var l=e[n++],c=127&e[n++],d=127&e[n++];if((0!==c||0!==d)&&0!=(4&l)){var f=3&l;0!==f&&1!==f||(t[f].push(c),t[f].push(d))}}return t},e}();function E(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}},
2"./src/crypt/aes-crypto.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return n}));var n=function(){function e(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(data,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,data)},e}()},
vendor: 6,122 bytes, line 2
2"./src/crypt/aes-decryptor.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"removePadding",(function(){return o})),r.d(t,"default",(function(){return l}));var n=r("./src/utils/typed-array.ts");function o(e){var t=e.byteLength,r=t&&new DataView(e.buffer).getUint8(t-1);return r?Object(n.sliceUint8)(e,0,t-r):e}var l=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var view=new DataView(e),t=new Uint32Array(4),i=0;i<4;i++)t[i]=view.getUint32(4*i);return t},t.initTable=function(){var e=this.sBox,t=this.invSBox,r=this.subMix,n=r[0],o=r[1],l=r[2],c=r[3],d=this.invSubMix,f=d[0],h=d[1],_=d[2],v=d[3],m=new Uint32Array(256),y=0,E=0,i=0;for(i=0;i<256;i++)m[i]=i<128?i<<1:i<<1^283;for(i=0;i<256;i++){var T=E^E<<1^E<<2^E<<3^E<<4;T=T>>>8^255&T^99,e[y]=T,t[T]=y;var S=m[y],D=m[S],L=m[D],I=257*m[T]^16843008*T;n[y]=I<<24|I>>>8,o[y]=I<<16|I>>>16,l[y]=I<<8|I>>>24,c[y]=I,I=16843009*L^65537*D^257*S^16843008*y,f[T]=I<<24|I>>>8,h[T]=I<<16|I>>>16,_[T]=I<<8|I>>>24,v[T]=I,y?(y=S^m[m[m[L^S]]],E^=m[m[E]]):y=E=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,n=0;n<t.length&&r;)r=t[n]===this.key[n],n++;if(!r){this.key=t;var o=this.keySize=t.length;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size="+o);var l,c,d,f,h=this.ksRows=4*(o+6+1),_=this.keySchedule=new Uint32Array(h),v=this.invKeySchedule=new Uint32Array(h),m=this.sBox,y=this.rcon,E=this.invSubMix,T=E[0],S=E[1],D=E[2],L=E[3];for(l=0;l<h;l++)l<o?d=_[l]=t[l]:(f=d,l%o==0?(f=m[(f=f<<8|f>>>24)>>>24]<<24|m[f>>>16&255]<<16|m[f>>>8&255]<<8|m[255&f],f^=y[l/o|0]<<24):o>6&&l%o==4&&(f=m[f>>>24]<<24|m[f>>>16&255]<<16|m[f>>>8&255]<<8|m[255&f]),_[l]=d=(_[l-o]^f)>>>0);for(c=0;c<h;c++)l=h-c,f=3&c?_[l]:_[l-4],v[c]=c<4||l<=4?f:T[m[f>>>24]]^S[m[f>>>16&255]]^D[m[f>>>8&255]]^L[m[255&f]],v[c]=v[c]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,r){for(var n,o,l,c,d,f,h,_,v,m,y,E,T,i,S=this.keySize+6,D=this.invKeySchedule,L=this.invSBox,I=this.invSubMix,A=I[0],x=I[1],M=I[2],k=I[3],w=this.uint8ArrayToUint32Array_(r),N=w[0],R=w[1],O=w[2],C=w[3],P=new Int32Array(e),j=new Int32Array(P.length),F=this.networkToHostOrderSwap;t<P.length;){for(v=F(P[t]),m=F(P[t+1]),y=F(P[t+2]),E=F(P[t+3]),d=v^D[0],f=E^D[1],h=y^D[2],_=m^D[3],T=4,i=1;i<S;i++)n=A[d>>>24]^x[f>>16&255]^M[h>>8&255]^k[255&_]^D[T],o=A[f>>>24]^x[h>>16&255]^M[_>>8&255]^k[255&d]^D[T+1],l=A[h>>>24]^x[_>>16&255]^M[d>>8&255]^k[255&f]^D[T+2],c=A[_>>>24]^x[d>>16&255]^M[f>>8&255]^k[255&h]^D[T+3],d=n,f=o,h=l,_=c,T+=4;n=L[d>>>24]<<24^L[f>>16&255]<<16^L[h>>8&255]<<8^L[255&_]^D[T],o=L[f>>>24]<<24^L[h>>16&255]<<16^L[_>>8&255]<<8^L[255&d]^D[T+1],l=L[h>>>24]<<24^L[_>>16&255]<<16^L[d>>8&255]<<8^L[255&f]^D[T+2],c=L[_>>>24]<<24^L[d>>16&255]<<16^L[f>>8&255]<<8^L[255&h]^D[T+3],j[t]=F(n^N),j[t+1]=F(c^R),j[t+2]=F(l^O),j[t+3]=F(o^C),N=v,R=m,O=y,C=E,t+=4}return j.buffer},e}()},"./src/crypt/decrypter.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return h}));var n=r("./src/crypt/aes-crypto.ts"),o=r("./src/crypt/fast-aes-key.ts"),l=r("./src/crypt/aes-decryptor.ts"),c=r("./src/utils/logger.ts"),d=r("./src/utils/mp4-tools.ts"),f=r("./src/utils/typed-array.ts"),h=function(){function e(e,t,r){var n=(void 0===r?{}:r).removePKCS7Padding,o=void 0===n||n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=e,this.config=t,this.removePKCS7Padding=o,o)try{var l=self.crypto;l&&(this.subtle=l.subtle||l.webkitSubtle)}catch(e){}null===this.subtle&&(this.config.enableSoftwareAES=!0)}var t=e.prototype;return t.destroy=function(){this.observer=null},t.isSync=function(){return this.config.enableSoftwareAES},t.flush=function(){var e=this.currentResult;if(e){var data=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Object(l.removePadding)(data):data}this.reset()},t.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},t.decrypt=function(data,e,t,r){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(data),e,t);var n=this.flush();n&&r(n.buffer)}else this.webCryptoDecrypt(new Uint8Array(data),e,t).then(r)},t.softwareDecrypt=function(data,e,t){var r=this.currentIV,n=this.currentResult,o=this.remainderData;this.logOnce("JS AES decrypt"),o&&(data=Object(d.appendUint8Array)(o,data),this.remainderData=null);var c=this.getValidChunk(data);if(!c.length)return null;r&&(t=r);var h=this.softwareDecrypter;h||(h=this.softwareDecrypter=new l.default),h.expandKey(e);var _=n;return this.currentResult=h.decrypt(c.buffer,0,t),this.currentIV=Object(f.sliceUint8)(c,-16).buffer,_||null},t.webCryptoDecrypt=function(data,e,t){var r=this,l=this.subtle;return this.key===e&&this.fastAesKey||(this.key=e,this.fastAesKey=new o.default(l,e)),this.fastAesKey.expandKey().then((function(e){return l?new n.default(l,t).decrypt(data.buffer,e):Promise.reject(new Error("web crypto not initialized"))})).catch((function(n){return r.onWebCryptoError(n,data,e,t)}))},t.onWebCryptoError=function(e,data,t,r){return c.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",e),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(data,t,r)},t.getValidChunk=function(data){var e=data,t=data.length-data.length%16;return t!==data.length&&(e=Object(f.sliceUint8)(data,0,t),this.remainderData=Object(f.sliceUint8)(data,t)),e},t.logOnce=function(e){this.logEnabled&&(c.logger.log("[decrypter.ts]: "+e),this.logEnabled=!1)},e}()},
2"./src/crypt/fast-aes-key.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return n}));var n=function(){function e(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}()},
vendor: 1,271 bytes, line 2
2"./src/demux/aacdemuxer.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/demux/base-audio-demuxer.ts"),o=r("./src/demux/adts.ts"),l=r("./src/utils/logger.ts"),c=r("./src/demux/id3.ts");function d(e,p){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},d(e,p)}var f=function(e){var t,r;function n(t,r){var n;return(n=e.call(this)||this).observer=void 0,n.config=void 0,n.observer=t,n.config=r,n}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,d(t,r);var f=n.prototype;return f.resetInitSegment=function(t,r,n,o){e.prototype.resetInitSegment.call(this,t,r,n,o),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:r,duration:o,inputTimeScale:9e4,dropped:0}},n.probe=function(data){if(!data)return!1;for(var e=(c.getID3Data(data,0)||[]).length,t=data.length;e<t;e++)if(o.probe(data,e))return l.logger.log("ADTS sync word found !"),!0;return!1},f.canParse=function(data,e){return o.canParse(data,e)},f.appendFrame=function(track,data,e){o.initTrackConfig(track,this.observer,data,e,track.manifestCodec);var t=o.appendFrame(track,data,e,this.basePTS,this.frameIndex);if(t&&0===t.missing)return t},n}(n.default);t.default=f},
vendor: 2,527 bytes, line 2
2"./src/demux/adts.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"getAudioConfig",(function(){return c})),r.d(t,"isHeaderPattern",(function(){return d})),r.d(t,"getHeaderLength",(function(){return f})),r.d(t,"getFullFrameLength",(function(){return h})),r.d(t,"canGetFrameLength",(function(){return _})),r.d(t,"isHeader",(function(){return v})),r.d(t,"canParse",(function(){return m})),r.d(t,"probe",(function(){return y})),r.d(t,"initTrackConfig",(function(){return E})),r.d(t,"getFrameDuration",(function(){return T})),r.d(t,"parseFrameHeader",(function(){return S})),r.d(t,"appendFrame",(function(){return D}));var n=r("./src/utils/logger.ts"),o=r("./src/errors.ts"),l=r("./src/events.ts");function c(e,data,t,r){var c,d,f,h,_=navigator.userAgent.toLowerCase(),v=r,m=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];c=1+((192&data[t+2])>>>6);var y=(60&data[t+2])>>>2;if(!(y>m.length-1))return f=(1&data[t+2])<<2,f|=(192&data[t+3])>>>6,n.logger.log("manifest codec:"+r+", ADTS type:"+c+", samplingIndex:"+y),/firefox/i.test(_)?y>=6?(c=5,h=new Array(4),d=y-3):(c=2,h=new Array(2),d=y):-1!==_.indexOf("android")?(c=2,h=new Array(2),d=y):(c=5,h=new Array(4),r&&(-1!==r.indexOf("mp4a.40.29")||-1!==r.indexOf("mp4a.40.5"))||!r&&y>=6?d=y-3:((r&&-1!==r.indexOf("mp4a.40.2")&&(y>=6&&1===f||/vivaldi/i.test(_))||!r&&1===f)&&(c=2,h=new Array(2)),d=y)),h[0]=c<<3,h[0]|=(14&y)>>1,h[1]|=(1&y)<<7,h[1]|=f<<3,5===c&&(h[1]|=(14&d)>>1,h[2]=(1&d)<<7,h[2]|=8,h[3]=0),{config:h,samplerate:m[y],channelCount:f,codec:"mp4a.40."+c,manifestCodec:v};e.trigger(l.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+y})}function d(data,e){return 255===data[e]&&240==(246&data[e+1])}function f(data,e){return 1&data[e+1]?7:9}function h(data,e){return(3&data[e+3])<<11|data[e+4]<<3|(224&data[e+5])>>>5}function _(data,e){return e+5<data.length}function v(data,e){return e+1<data.length&&d(data,e)}function m(data,e){return _(data,e)&&d(data,e)&&h(data,e)<=data.length-e}function y(data,e){if(v(data,e)){var t=f(data,e);if(e+t>=data.length)return!1;var r=h(data,e);if(r<=t)return!1;var n=e+r;return n===data.length||v(data,n)}return!1}function E(track,e,data,t,r){if(!track.samplerate){var o=c(e,data,t,r);if(!o)return;track.config=o.config,track.samplerate=o.samplerate,track.channelCount=o.channelCount,track.codec=o.codec,track.manifestCodec=o.manifestCodec,n.logger.log("parsed codec:"+track.codec+", rate:"+o.samplerate+", channels:"+o.channelCount)}
vendor: 624 bytes, line 2
2}function T(e){return 9216e4/e}function S(data,e){var t=f(data,e);if(e+t<=data.length){var r=h(data,e)-t;if(r>0)return{headerLength:t,frameLength:r}}}function D(track,data,e,t,r){var n,o=t+r*T(track.samplerate),header=S(data,e);if(header){var l=header.frameLength,c=header.headerLength,d=c+l,f=Math.max(0,e+d-data.length);f?(n=new Uint8Array(d-c)).set(data.subarray(e+c,data.length),0):n=data.subarray(e+c,e+d);var h={unit:n,pts:o};return f||track.samples.push(h),{sample:h,length:d,missing:f}}var _=data.length-e;return(n=new Uint8Array(_)).set(data.subarray(e,data.length),0),{sample:{unit:n,pts:o},length:_,missing:-1}}},
vendor: 2,855 bytes, line 2
2"./src/demux/base-audio-demuxer.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"initPTSFn",(function(){return _}));var n=r("./src/polyfills/number.ts"),o=r("./src/demux/id3.ts"),l=r("./src/types/demuxer.ts"),c=r("./src/demux/dummy-demuxed-track.ts"),d=r("./src/utils/mp4-tools.ts"),f=r("./src/utils/typed-array.ts"),h=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,r,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(e){this.initPTS=e,this.resetContiguity()},t.resetContiguity=function(){this.basePTS=null,this.frameIndex=0},t.canParse=function(data,e){return!1},t.appendFrame=function(track,data,e){},t.demux=function(data,e){this.cachedData&&(data=Object(d.appendUint8Array)(this.cachedData,data),this.cachedData=null);var t,r,h=o.getID3Data(data,0),v=h?h.length:0,track=this._audioTrack,m=this._id3Track,y=h?o.getTimeStamp(h):void 0,E=data.length;for((null===this.basePTS||0===this.frameIndex&&Object(n.isFiniteNumber)(y))&&(this.basePTS=_(y,e,this.initPTS)),h&&h.length>0&&m.samples.push({pts:this.basePTS,dts:this.basePTS,data:h,type:l.MetadataSchema.audioId3}),r=this.basePTS;v<E;){if(this.canParse(data,v)){var T=this.appendFrame(track,data,v);T?(this.frameIndex++,r=T.sample.pts,t=v+=T.length):v=E}else o.canParse(data,v)?(h=o.getID3Data(data,v),m.samples.push({pts:r,dts:r,data:h,type:l.MetadataSchema.audioId3}),t=v+=h.length):v++;if(v===E&&t!==E){var S=Object(f.sliceUint8)(data,t);this.cachedData?this.cachedData=Object(d.appendUint8Array)(this.cachedData,S):this.cachedData=S}}return{audioTrack:track,videoTrack:Object(c.dummyTrack)(),id3Track:m,textTrack:Object(c.dummyTrack)()}},t.demuxSampleAes=function(data,e,t){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},t.flush=function(e){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Object(c.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(c.dummyTrack)()}},t.destroy=function(){},e}(),_=function(e,t,r){return Object(n.isFiniteNumber)(e)?90*e:9e4*t+(r||0)};t.default=h},"./src/demux/chunk-cache.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return n}));var n=function(){function e(){this.chunks=[],this.dataLength=0}var t=e.prototype;return t.push=function(e){this.chunks.push(e),this.dataLength+=e.length},t.flush=function(){var e,t=this.chunks,r=this.dataLength;return t.length?(e=1===t.length?t[0]:function(e,t){for(var r=new Uint8Array(t),n=0,i=0;i<e.length;i++){var o=e[i];r.set(o,n),n+=o.length}return r}(t,r),this.reset(),e):new Uint8Array(0)},t.reset=function(){this.chunks.length=0,this.dataLength=0},e}()},
2"./src/demux/dummy-demuxed-track.ts":function(e,t,r){"use strict";function n(e,t){return void 0===e&&(e=""),void 0===t&&(t=9e4),{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}r.r(t),r.d(t,"dummyTrack",(function(){return n}))},
vendor: 6,204 bytes, line 2
2"./src/demux/exp-golomb.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/utils/logger.ts"),o=function(){function e(data){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=data,this.bytesAvailable=data.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var data=this.data,e=this.bytesAvailable,t=data.byteLength-e,r=new Uint8Array(4),n=Math.min(4,e);if(0===n)throw new Error("no bytes available");r.set(data.subarray(t,t+n)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*n,this.bytesAvailable-=n},t.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),r=this.word>>>32-t;return e>32&&n.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?r<<t|this.readBits(t):r},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,r=8,n=0;n<e;n++)0!==r&&(r=(t+this.readEG()+256)%256),t=0===r?t:r},t.readSPS=function(){var e,t,i,r=0,n=0,o=0,l=0,c=this.readUByte.bind(this),d=this.readBits.bind(this),f=this.readUEG.bind(this),h=this.readBoolean.bind(this),_=this.skipBits.bind(this),v=this.skipEG.bind(this),m=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);c();var E=c();if(d(5),_(3),c(),m(),100===E||110===E||122===E||244===E||44===E||83===E||86===E||118===E||128===E){var T=f();if(3===T&&_(1),m(),m(),_(1),h())for(t=3!==T?8:12,i=0;i<t;i++)h()&&y(i<6?16:64)}m();var S=f();if(0===S)f();else if(1===S)for(_(1),v(),v(),e=f(),i=0;i<e;i++)v();m(),_(1);var D=f(),L=f(),I=d(1);0===I&&_(1),_(1),h()&&(r=f(),n=f(),o=f(),l=f());var A=[1,1];if(h()&&h())switch(c()){case 1:A=[1,1];break;case 2:A=[12,11];break;case 3:A=[10,11];break;case 4:A=[16,11];break;case 5:A=[40,33];break;case 6:A=[24,11];break;case 7:A=[20,11];break;case 8:A=[32,11];break;case 9:A=[80,33];break;case 10:A=[18,11];break;case 11:A=[15,11];break;case 12:A=[64,33];break;case 13:A=[160,99];break;case 14:A=[4,3];break;case 15:A=[3,2];break;case 16:A=[2,1];break;case 255:A=[c()<<8|c(),c()<<8|c()]}return{width:Math.ceil(16*(D+1)-2*r-2*n),height:(2-I)*(L+1)*16-(I?2:4)*(o+l),pixelRatio:A}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}();t.default=o},"./src/demux/id3.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"isHeader",(function(){return o})),r.d(t,"isFooter",(function(){return l})),r.d(t,"getID3Data",(function(){return c})),r.d(t,"canParse",(function(){return f})),r.d(t,"getTimeStamp",(function(){return h})),r.d(t,"isTimeStampFrame",(function(){return _})),r.d(t,"getID3Frames",(function(){return m})),r.d(t,"decodeFrame",(function(){return y})),r.d(t,"utf8ArrayToStr",(function(){return L})),r.d(t,"testables",(function(){return I}));var n,o=function(data,e){return e+10<=data.length&&73===data[e]&&68===data[e+1]&&51===data[e+2]&&data[e+3]<255&&data[e+4]<255&&data[e+6]<128&&data[e+7]<128&&data[e+8]<128&&data[e+9]<128},l=function(data,e){return e+10<=data.length&&51===data[e]&&68===data[e+1]&&73===data[e+2]&&data[e+3]<255&&data[e+4]<255&&data[e+6]<128&&data[e+7]<128&&data[e+8]<128&&data[e+9]<128},c=function(data,e){for(var t=e,r=0;o(data,e);)r+=10,r+=d(data,e+6),l(data,e+10)&&(r+=10),e+=r;if(r>0)return data.subarray(t,t+r)},d=function(data,e){var t=0;return t=(127&data[e])<<21,t|=(127&data[e+1])<<14,t|=(127&data[e+2])<<7,t|=127&data[e+3]},f=function(data,e){return o(data,e)&&d(data,e+6)+10<=data.length-e},h=function(data){for(var e=m(data),i=0;i<e.length;i++){var t=e[i];if(_(t))return D(t)}},_=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},v=function(data){var e=String.fromCharCode(data[0],data[1],data[2],data[3]),t=d(data,4);return{type:e,size:t,data:data.subarray(10,10+t)}},m=function(e){for(var t=0,r=[];o(e,t);){for(var n=d(e,t+6),c=(t+=10)+n;t+8<c;){var f=v(e.subarray(t)),h=y(f);h&&r.push(h),t+=f.size+10}l(e,t)&&(t+=10)}return r},y=function(e){return"PRIV"===e.type?E(e):"W"===e.type[0]?S(e):T(e)},E=function(e){if(!(e.size<2)){var t=L(e.data,!0),r=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:r.buffer}}},T=function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,r=L(e.data.subarray(t),!0);t+=r.length+1;var n=L(e.data.subarray(t));return{key:e.type,info:r,data:n}}var text=L(e.data.subarray(1));return{key:e.type,data:text}}},S=function(e){if("WXXX"===e.type){if(e.size<2)return;var t=1,r=L(e.data.subarray(t),!0);t+=r.length+1;var n=L(e.data.subarray(t));return{key:e.type,info:r,data:n}}var o=L(e.data);return{key:e.type,data:o}},D=function(e){if(8===e.data.byteLength){var data=new Uint8Array(e.data),t=1&data[3],r=(data[4]<<23)+(data[5]<<15)+(data[6]<<7)+data[7];return r/=45,t&&(r+=47721858.84),Math.round(r)}},L=function(e,t){void 0===t&&(t=!1);var r=A();if(r){var n=r.decode(e);if(t){var o=n.indexOf("\0");return-1!==o?n.substring(0,o):n}return n.replace(/\0/g,"")}for(var l,c,d,f=e.length,h="",i=0;i<f;){if(0===(l=e[i++])&&t)return h;if(0!==l&&3!==l)switch(l>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:h+=String.fromCharCode(l);break;case 12:case 13:c=e[i++],h+=String.fromCharCode((31&l)<<6|63&c);break;case 14:c=e[i++],d=e[i++],h+=String.fromCharCode((15&l)<<12|(63&c)<<6|(63&d)<<0)}}return h},I={decodeTextFrame:T};function A(){return n||void 0===self.TextDecoder||(n=new self.TextDecoder("utf-8")),n}},
vendor: 1,152 bytes, line 2
2"./src/demux/mp3demuxer.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/demux/base-audio-demuxer.ts"),o=r("./src/demux/id3.ts"),l=r("./src/utils/logger.ts"),c=r("./src/demux/mpegaudio.ts");function d(e,p){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},d(e,p)}var f=function(e){var t,r;function n(){return e.apply(this,arguments)||this}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,d(t,r);var f=n.prototype;return f.resetInitSegment=function(t,r,n,o){e.prototype.resetInitSegment.call(this,t,r,n,o),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:r,duration:o,inputTimeScale:9e4,dropped:0}},n.probe=function(data){if(!data)return!1;for(var e=(o.getID3Data(data,0)||[]).length,t=data.length;e<t;e++)if(c.probe(data,e))return l.logger.log("MPEG Audio sync word found !"),!0;return!1},f.canParse=function(data,e){return c.canParse(data,e)},f.appendFrame=function(track,data,e){if(null!==this.basePTS)return c.appendFrame(track,data,e,this.basePTS,this.frameIndex)},n}(n.default);t.default=f},
2"./src/demux/mp4demuxer.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/polyfills/number.ts"),o=r("./src/types/demuxer.ts"),l=r("./src/utils/mp4-tools.ts"),c=r("./src/demux/dummy-demuxed-track.ts"),d=/\/emsg[-/]ID3/i,f=function(){function e(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}var t=e.prototype;return t.resetTimeStamp=function(){},t.resetInitSegment=function(e,t,r,n){var o=Object(l.parseInitSegment)(e),d=this.videoTrack=Object(c.dummyTrack)("video",1),f=this.audioTrack=Object(c.dummyTrack)("audio",1),h=this.txtTrack=Object(c.dummyTrack)("text",1);if(this.id3Track=Object(c.dummyTrack)("id3",1),this.timeOffset=0,o.video){var _=o.video,v=_.id,m=_.timescale,y=_.codec;d.id=v,d.timescale=h.timescale=m,d.codec=y}if(o.audio){var E=o.audio,T=E.id,S=E.timescale,D=E.codec;f.id=T,f.timescale=S,f.codec=D}h.id=l.RemuxerTrackIdConfig.text,d.sampleDuration=0,d.duration=f.duration=n},t.resetContiguity=function(){},e.probe=function(data){return data=data.length>16384?data.subarray(0,16384):data,Object(l.findBox)(data,["moof"]).length>0},t.demux=function(data,e){this.timeOffset=e;var t=data,r=this.videoTrack,n=this.txtTrack;if(this.config.progressive){this.remainderData&&(t=Object(l.appendUint8Array)(this.remainderData,data));var o=Object(l.segmentValidRange)(t);this.remainderData=o.remainder,r.samples=o.valid||new Uint8Array}else r.samples=t;var c=this.extractID3Track(r,e);return n.samples=Object(l.parseSamples)(e,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:c,textTrack:this.txtTrack}},t.flush=function(){var e=this.timeOffset,t=this.videoTrack,r=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;var n=this.extractID3Track(t,this.timeOffset);
2return r.samples=Object(l.parseSamples)(e,t),{videoTrack:t,audioTrack:Object(c.dummyTrack)(),id3Track:n,textTrack:Object(c.dummyTrack)()}},t.extractID3Track=function(e,t){var r=this.id3Track;if(e.samples.length){var c=Object(l.findBox)(e.samples,["emsg"]);c&&c.forEach((function(data){var e=Object(l.parseEmsg)(data);if(d.test(e.schemeIdUri)){var c=Object(n.isFiniteNumber)(e.presentationTime)?e.presentationTime/e.timeScale:t+e.presentationTimeDelta/e.timeScale,f=e.payload;r.samples.push({data:f,len:f.byteLength,dts:c,pts:c,type:o.MetadataSchema.emsg})}}))}return r},t.demuxSampleAes=function(data,e,t){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();t.default=f},
vendor: 3,771 bytes, line 2
2"./src/demux/mpegaudio.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"appendFrame",(function(){return f})),r.d(t,"parseHeader",(function(){return h})),r.d(t,"isHeaderPattern",(function(){return _})),r.d(t,"isHeader",(function(){return v})),r.d(t,"canParse",(function(){return m})),r.d(t,"probe",(function(){return y}));var n=null,o=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],l=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],c=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],d=[0,1,1,4];function f(track,data,e,t,r){if(!(e+24>data.length)){var header=h(data,e);if(header&&e+header.frameLength<=data.length){var n=t+r*(9e4*header.samplesPerFrame/header.sampleRate),o={unit:data.subarray(e,e+header.frameLength),pts:n,dts:n};return track.config=[],track.channelCount=header.channelCount,track.samplerate=header.sampleRate,track.samples.push(o),{sample:o,length:header.frameLength,missing:0}}}}function h(data,e){var t=data[e+1]>>3&3,r=data[e+1]>>1&3,f=data[e+2]>>4&15,h=data[e+2]>>2&3;if(1!==t&&0!==f&&15!==f&&3!==h){var _=data[e+2]>>1&1,v=data[e+3]>>6,m=1e3*o[14*(3===t?3-r:3===r?3:4)+f-1],y=l[3*(3===t?0:2===t?1:2)+h],E=3===v?1:2,T=c[t][r],S=d[r],D=8*T*S,L=Math.floor(T*m/y+_)*S;if(null===n){var I=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);n=I?parseInt(I[1]):0}return!!n&&n<=87&&2===r&&m>=224e3&&0===v&&(data[e+3]=128|data[e+3]),{sampleRate:y,channelCount:E,frameLength:L,samplesPerFrame:D}}}function _(data,e){return 255===data[e]&&224==(224&data[e+1])&&0!=(6&data[e+1])}function v(data,e){return e+1<data.length&&_(data,e)}function m(data,e){return _(data,e)&&4<=data.length-e}function y(data,e){if(e+1<data.length&&_(data,e)){var header=h(data,e),t=4;null!=header&&header.frameLength&&(t=header.frameLength);var r=e+t;return r===data.length||v(data,r)}return!1}},"./src/demux/sample-aes.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/crypt/decrypter.ts"),o=r("./src/demux/tsdemuxer.ts"),l=function(){function e(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new n.default(e,t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,t)},t.decryptAacSample=function(e,t,r,n){var o=e[t].unit;if(!(o.length<=16)){var l=o.subarray(16,o.length-o.length%16),c=l.buffer.slice(l.byteOffset,l.byteOffset+l.length),d=this;this.decryptBuffer(c,(function(l){var c=new Uint8Array(l);o.set(c,16),n||d.decryptAacSamples(e,t+1,r)}))}},t.decryptAacSamples=function(e,t,r){for(;;t++){if(t>=e.length)return void r();if(!(e[t].unit.length<32)){var n=this.decrypter.isSync();if(this.decryptAacSample(e,t,r,n),!n)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,r=new Int8Array(t),n=0,o=32;o<e.length-16;o+=160,n+=16)r.set(e.subarray(o,o+16),n);return r},t.getAvcDecryptedUnit=function(e,t){for(var r=new Uint8Array(t),n=0,o=32;o<e.length-16;o+=160,n+=16)e.set(r.subarray(n,n+16),o);return e},t.decryptAvcSample=function(e,t,r,n,l,c){var d=Object(o.discardEPB)(l.data),f=this.getAvcEncryptedData(d),h=this;this.decryptBuffer(f.buffer,(function(o){l.data=h.getAvcDecryptedUnit(d,o),c||h.decryptAvcSamples(e,t,r+1,n)}))},t.decryptAvcSamples=function(e,t,r,n){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,r=0){if(t>=e.length)return void n();for(var o=e[t].units;!(r>=o.length);r++){var l=o[r];if(!(l.data.length<=48||1!==l.type&&5!==l.type)){var c=this.decrypter.isSync();if(this.decryptAvcSample(e,t,r,n,l,c),!c)return}}}},e}();t.default=l},
vendor: 4,702 bytes, line 2
2"./src/demux/transmuxer-interface.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return v}));var n=r("./node_modules/webworkify-webpack/index.js"),o=r("./src/events.ts"),l=r("./src/demux/transmuxer.ts"),c=r("./src/utils/logger.ts"),d=r("./src/errors.ts"),f=r("./src/utils/mediasource-helper.ts"),h=r("./node_modules/eventemitter3/index.js"),_=Object(f.getMediaSource)()||{isTypeSupported:function(){return!1}},v=function(){function e(e,t,r,f){var v=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=e,this.id=t,this.onTransmuxComplete=r,this.onFlush=f;var m=e.config,y=function(t,data){(data=data||{}).frag=v.frag,data.id=v.id,e.trigger(t,data)};this.observer=new h.EventEmitter,this.observer.on(o.Events.FRAG_DECRYPTED,y),this.observer.on(o.Events.ERROR,y);var E={mp4:_.isTypeSupported("video/mp4"),mpeg:_.isTypeSupported("audio/mpeg"),mp3:_.isTypeSupported('audio/mp4; codecs="mp3"')},T=navigator.vendor;if(m.enableWorker&&"undefined"!=typeof Worker){var S;c.logger.log("demuxing in webworker");try{S=this.worker=n("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),S.addEventListener("message",this.onwmsg),S.onerror=function(t){e.trigger(o.Events.ERROR,{type:d.ErrorTypes.OTHER_ERROR,details:d.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(t.message+"  ("+t.filename+":"+t.lineno+")")})},S.postMessage({cmd:"init",typeSupported:E,vendor:T,id:t,config:JSON.stringify(m)})}catch(e){c.logger.warn("Error in worker:",e),c.logger.error("Error while initializing DemuxerWorker, fallback to inline"),S&&self.URL.revokeObjectURL(S.objectURL),this.transmuxer=new l.default(this.observer,E,m,T,t),this.worker=null}}else this.transmuxer=new l.default(this.observer,E,m,T,t)}var t=e.prototype;return t.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null,this.onwmsg=void 0;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var r=this.observer;r&&r.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},t.push=function(data,e,t,r,n,o,d,f,h,_){var v,m,y=this;h.transmuxing.start=self.performance.now();var E=this.transmuxer,T=this.worker,S=o?o.start:n.start,D=n.decryptdata,L=this.frag,I=!(L&&n.cc===L.cc),A=!(L&&h.level===L.level),x=L?h.sn-L.sn:-1,M=this.part?h.part-this.part.index:-1,k=0===x&&h.id>1&&h.id===(null==L?void 0:L.stats.chunkCount),w=!A&&(1===x||0===x&&(1===M||k&&M<=0)),N=self.performance.now();(A||x||0===n.stats.parsing.start)&&(n.stats.parsing.start=N),!o||!M&&w||(o.stats.parsing.start=N);var R=!(L&&(null===(v=n.initSegment)||void 0===v?void 0:v.url)===(null===(m=L.initSegment)||void 0===m?void 0:m.url)),O=new l.TransmuxState(I,w,f,A,S,R);if(!w||I||R){c.logger.log("[transmuxer-interface, "+n.type+"]: Starting new transmux session for sn: "+h.sn+" p: "+h.part+" level: "+h.level+" id: "+h.id+"\n        discontinuity: "+I+"\n        trackSwitch: "+A+"\n        contiguous: "+w+"\n        accurateTimeOffset: "+f+"\n        timeOffset: "+S+"\n        initSegmentChange: "+R);var C=new l.TransmuxConfig(t,r,e,d,_);this.configureTransmuxer(C)}if(this.frag=n,this.part=o,T)T.postMessage({cmd:"demux",data:data,decryptdata:D,chunkMeta:h,state:O},data instanceof ArrayBuffer?[data]:[]);else if(E){var P=E.push(data,D,h,O);Object(l.isPromise)(P)?P.then((function(data){y.handleTransmuxComplete(data)})):this.handleTransmuxComplete(P)}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var r=this.transmuxer,n=this.worker;if(n)n.postMessage({cmd:"flush",chunkMeta:e});else if(r){var o=r.flush(e);Object(l.isPromise)(o)?o.then((function(data){t.handleFlushResult(data,e)})):this.handleFlushResult(o,e)}},t.handleFlushResult=function(e,t){var r=this;e.forEach((function(e){r.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var data=e.data,t=this.hls;switch(data.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(data.data);break;case"flush":this.onFlush(data.data);break;case"workerLog":c.logger[data.data.logType]&&c.logger[data.data.logType](data.data.message);break;default:data.data=data.data||{},data.data.frag=this.frag,data.data.id=this.id,t.trigger(data.event,data.data)}},t.configureTransmuxer=function(e){var t=this.worker,r=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):r&&r.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}()},
2"./src/demux/transmuxer-worker.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return d}));var n=r("./src/demux/transmuxer.ts"),o=r("./src/events.ts"),l=r("./src/utils/logger.ts"),c=r("./node_modules/eventemitter3/index.js");function d(e){var t=new c.EventEmitter,r=function(t,data){e.postMessage({event:t,data:data})};t.on(o.Events.FRAG_DECRYPTED,r),t.on(o.Events.ERROR,r),e.addEventListener("message",(function(o){var data=o.data;switch(data.cmd){case"init":var c=JSON.parse(data.config);e.transmuxer=new n.default(t,data.typeSupported,c,data.vendor,data.id),Object(l.enableLogs)(c.debug),function(){var e=function(e){l.logger[e]=function(t){r("workerLog",{logType:e,message:t})}};for(var t in l.logger)e(t)}(),r("init",null);break;case"configure":e.transmuxer.configure(data.config);break;case"demux":var d=e.transmuxer.push(data.data,data.decryptdata,data.chunkMeta,data.state);Object(n.isPromise)(d)?d.then((function(data){f(e,data)})):f(e,d);break;case"flush":var h=data.chunkMeta,v=e.transmuxer.flush(h);Object(n.isPromise)(v)?v.then((function(t){_(e,t,h)})):_(e,v,h)}}))}function f(e,t){if(!((r=t.remuxResult).audio||r.video||r.text||r.id3||r.initSegment))return!1;var r,n=[],o=t.remuxResult,audio=o.audio,video=o.video;return audio&&h(n,audio),video&&h(n,video),e.postMessage({event:"transmuxComplete",data:t},n),!0}function h(e,track){track.data1&&e.push(track.data1.buffer),track.data2&&e.push(track.data2.buffer)}function _(e,t,r){t.reduce((function(t,r){return f(e,r)||t}),!1)||e.postMessage({event:"transmuxComplete",data:t[0]}),e.postMessage({event:"flush",data:r})}},
vendor: 4,317 bytes, line 2
2"./src/demux/transmuxer.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return T})),r.d(t,"isPromise",(function(){return D})),r.d(t,"TransmuxConfig",(function(){return L})),r.d(t,"TransmuxState",(function(){return I}));var n,o=r("./src/events.ts"),l=r("./src/errors.ts"),c=r("./src/crypt/decrypter.ts"),d=r("./src/demux/aacdemuxer.ts"),f=r("./src/demux/mp4demuxer.ts"),h=r("./src/demux/tsdemuxer.ts"),_=r("./src/demux/mp3demuxer.ts"),v=r("./src/remux/mp4-remuxer.ts"),m=r("./src/remux/passthrough-remuxer.ts"),y=r("./src/utils/logger.ts");try{n=self.performance.now.bind(self.performance)}catch(e){y.logger.debug("Unable to use Performance API on this environment"),n=self.Date.now}var E=[{demux:h.default,remux:v.default},{demux:f.default,remux:m.default},{demux:d.default,remux:v.default},{demux:_.default,remux:v.default}],T=function(){function e(e,t,r,n,o){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=r,this.vendor=n,this.id=o}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(data,e,t,r){var o=this,l=t.transmuxing;l.executeStart=n();var c=new Uint8Array(data),d=this.config,f=this.currentTransmuxState,h=this.transmuxConfig;r&&(this.currentTransmuxState=r);var _=r||f,v=_.contiguous,m=_.discontinuity,y=_.trackSwitch,E=_.accurateTimeOffset,T=_.timeOffset,D=_.initSegmentChange,L=h.audioCodec,I=h.videoCodec,A=h.defaultInitPts,x=h.duration,M=h.initSegmentData;(m||y||D)&&this.resetInitSegment(M,L,I,x),(m||D)&&this.resetInitialTimestamp(A),v||this.resetContiguity();var k=function(data,e){var t=null;return data.byteLength>0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(t=e),t}(c,e);if(k&&"AES-128"===k.method){var w=this.getDecrypter();if(!d.enableSoftwareAES)return this.decryptionPromise=w.webCryptoDecrypt(c,k.key.buffer,k.iv.buffer).then((function(e){var r=o.push(e,null,t);return o.decryptionPromise=null,r})),this.decryptionPromise;var N=w.softwareDecrypt(c,k.key.buffer,k.iv.buffer);if(!N)return l.executeEnd=n(),S(t);c=new Uint8Array(N)}this.needsProbing(c,m,y)&&this.configureTransmuxer(c,h);var R=this.transmux(c,k,T,E,t),O=this.currentTransmuxState;return O.contiguous=!0,O.discontinuity=!1,O.trackSwitch=!1,l.executeEnd=n(),R},t.flush=function(e){var t=this,r=e.transmuxing;r.executeStart=n();var c=this.decrypter,d=this.currentTransmuxState,f=this.decryptionPromise;if(f)return f.then((function(){return t.flush(e)}));var h=[],_=d.timeOffset;if(c){var v=c.flush();v&&h.push(this.push(v,null,e))}var m=this.demuxer,y=this.remuxer;if(!m||!y)return this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),r.executeEnd=n(),[S(e)];var E=m.flush(_);return D(E)?E.then((function(r){return t.flushRemux(h,r,e),h})):(this.flushRemux(h,E,e),h)},t.flushRemux=function(e,t,r){var o=t.audioTrack,l=t.videoTrack,c=t.id3Track,d=t.textTrack,f=this.currentTransmuxState,h=f.accurateTimeOffset,_=f.timeOffset;y.logger.log("[transmuxer.ts]: Flushed fragment "+r.sn+(r.part>-1?" p: "+r.part:"")+" of level "+r.level);var v=this.remuxer.remux(o,l,c,d,_,h,!0,this.id);e.push({remuxResult:v,chunkMeta:r}),r.transmuxing.executeEnd=n()},t.resetInitialTimestamp=function(e){var t=this.demuxer,r=this.remuxer;t&&r&&(t.resetTimeStamp(e),r.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,r,n){var o=this.demuxer,l=this.remuxer;o&&l&&(o.resetInitSegment(e,t,r,n),l.resetInitSegment(e,t,r))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(data,e,t,r,n){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(data,e,t,r,n):this.transmuxUnencrypted(data,t,r,n)},t.transmuxUnencrypted=function(data,e,t,r){var n=this.demuxer.demux(data,e,!1,!this.config.progressive),o=n.audioTrack,l=n.videoTrack,
vendor: 1,816 bytes, line 2
2c=n.id3Track,d=n.textTrack;return{remuxResult:this.remuxer.remux(o,l,c,d,e,t,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(data,e,t,r,n){var o=this;return this.demuxer.demuxSampleAes(data,e,t).then((function(e){return{remuxResult:o.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,t,r,!1,o.id),chunkMeta:n}}))},t.configureTransmuxer=function(data,e){for(var t,r=this.config,n=this.observer,o=this.typeSupported,l=this.vendor,c=e.audioCodec,d=e.defaultInitPts,h=e.duration,_=e.initSegmentData,v=e.videoCodec,i=0,T=E.length;i<T;i++)if(E[i].demux.probe(data)){t=E[i];break}t||(y.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),t={demux:f.default,remux:m.default});var S=this.demuxer,D=this.remuxer,L=t.remux,I=t.demux;D&&D instanceof L||(this.remuxer=new L(n,r,o,l)),S&&S instanceof I||(this.demuxer=new I(n,r,o),this.probe=I.probe),this.resetInitSegment(_,c,v,h),this.resetInitialTimestamp(d)},t.needsProbing=function(data,e,t){return!this.demuxer||!this.remuxer||e||t},t.getDecrypter=function(){var e=this.decrypter;return e||(e=this.decrypter=new c.default(this.observer,this.config)),e},e}(),S=function(e){return{remuxResult:{},chunkMeta:e}};function D(p){return"then"in p&&p.then instanceof Function}var L=function(e,t,r,n,o){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=r,this.duration=n,this.defaultInitPts=o},I=function(e,t,r,n,o,l){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=r,this.trackSwitch=n,this.timeOffset=o,this.initSegmentChange=l}},
vendor: 11,098 bytes, line 2
2"./src/demux/tsdemuxer.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"discardEPB",(function(){return I}));var n=r("./src/demux/adts.ts"),o=r("./src/demux/mpegaudio.ts"),l=r("./src/demux/exp-golomb.ts"),c=r("./src/demux/sample-aes.ts"),d=r("./src/events.ts"),f=r("./src/utils/mp4-tools.ts"),h=r("./src/utils/logger.ts"),_=r("./src/errors.ts"),v=r("./src/types/demuxer.ts");function m(){return m=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},m.apply(this,arguments)}var y=function(){function e(e,t,r){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=t,this.typeSupported=r}e.probe=function(data){return 71===data[0]&&71===data[188]},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:f.RemuxerTrackIdConfig[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}};var t=e.prototype;return t.resetInitSegment=function(t,r,n,o){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video"),this._audioTrack=e.createTrack("audio",o),this._id3Track=e.createTrack("id3"),this._txtTrack=e.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=r,this.videoCodec=n,this._duration=o},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._avcTrack,r=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null},t.demux=function(data,e,t,r){var n;void 0===t&&(t=!1),void 0===r&&(r=!1),t||(this.sampleAes=null);var o=this._avcTrack,l=this._audioTrack,c=this._id3Track,v=this._txtTrack,m=o.pid,y=o.pesData,E=l.pid,L=c.pid,I=l.pesData,A=c.pesData,x=null,M=this.pmtParsed,k=this._pmtId,w=data.length;if(this.remainderData&&(w=(data=Object(f.appendUint8Array)(this.remainderData,data)).length,this.remainderData=null),w<188&&!r)return this.remainderData=data,{audioTrack:l,videoTrack:o,id3Track:c,textTrack:v};(w-=w%188)<data.byteLength&&!r&&(this.remainderData=new Uint8Array(data.buffer,w,data.buffer.byteLength-w));for(var N=0,R=0;R<w;R+=188)if(71===data[R]){var O=!!(64&data[R+1]),C=((31&data[R+1])<<8)+data[R+2],P=void 0;if((48&data[R+3])>>4>1){if((P=R+5+data[R+4])===R+188)continue}else P=R+4;switch(C){case m:O&&(y&&(n=D(y))&&this.parseAVCPES(o,v,n,!1),y={data:[],size:0}),y&&(y.data.push(data.subarray(P,R+188)),y.size+=R+188-P);break;case E:if(O){if(I&&(n=D(I)))switch(l.segmentCodec){case"aac":this.parseAACPES(l,n);break;case"mp3":this.parseMPEGPES(l,n)}I={data:[],size:0}}I&&(I.data.push(data.subarray(P,R+188)),I.size+=R+188-P);break;case L:O&&(A&&(n=D(A))&&this.parseID3PES(c,n),A={data:[],size:0}),A&&(A.data.push(data.subarray(P,R+188)),A.size+=R+188-P);break;case 0:O&&(P+=data[P]+1),k=this._pmtId=T(data,P);break;case k:O&&(P+=data[P]+1);var j=S(data,P,this.typeSupported,t);(m=j.avc)>0&&(o.pid=m),(E=j.audio)>0&&(l.pid=E,l.segmentCodec=j.segmentCodec),(L=j.id3)>0&&(c.pid=L),null===x||M||(h.logger.log("unknown PID '"+x+"' in TS found"),x=null),M=this.pmtParsed=!0;break;case 17:case 8191:break;default:x=C}}else N++;N>0&&this.observer.emit(d.Events.ERROR,d.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"Found "+N+" TS packet/s that do not start with 0x47"}),o.pesData=y,l.pesData=I,c.pesData=A;var F={audioTrack:l,videoTrack:o,id3Track:c,textTrack:v};return r&&this.extractRemainingSamples(F),F},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,r=e.audioTrack,n=e.videoTrack,o=e.id3Track,l=e.textTrack,c=n.pesData,d=r.pesData,f=o.pesData;if(c&&(t=D(c))?(this.parseAVCPES(n,l,t,!0),n.pesData=null):n.pesData=c,d&&(t=D(d))){switch(r.segmentCodec){case"aac":this.parseAACPES(r,t);break;case"mp3":this.parseMPEGPES(r,t)}r.pesData=null}else null!=d&&d.size&&h.logger.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=d;f&&(t=D(f))?(this.parseID3PES(o,t),o.pesData=null):o.pesData=f},t.demuxSampleAes=function(data,e,t){var r=this.demux(data,t,!0,!this.config.progressive),n=this.sampleAes=new c.default(this.observer,this.config,e);return this.decrypt(r,n)},t.decrypt=function(e,t){return new Promise((function(r){var n=e.audioTrack,o=e.videoTrack;n.samples&&"aac"===n.segmentCodec?t.decryptAacSamples(n.samples,0,(function(){o.samples?t.decryptAvcSamples(o.samples,0,0,(function(){r(e)})):r(e)})):o.samples&&t.decryptAvcSamples(o.samples,0,0,(function(){r(e)}))}))},t.destroy=function(){this._duration=0},t.parseAVCPES=function(track,e,t,r){var n,o=this,c=this.parseAVCNALu(track,t.data),d=this.avcSample,h=!1;t.data=null,d&&c.length&&!track.audFound&&(L(d,track),d=this.avcSample=E(!1,t.pts,t.dts,"")),c.forEach((function(r){switch(r.type){case 1:n=!0,d||(d=o.avcSample=E(!0,t.pts,t.dts,"")),d.frame=!0;var data=r.data;if(h&&data.length>4){var c=new l.default(data).readSliceType();2!==c&&4!==c&&7!==c&&9!==c||(d.key=!0)}break;case 5:n=!0,d||(d=o.avcSample=E(!0,t.pts,t.dts,"")),d.key=!0,d.frame=!0;break;case 6:n=!0,Object(f.parseSEIMessageFromNALu)(I(r.data),t.pts,e.samples);break;case 7:if(n=!0,h=!0,!track.sps){var _=new l.default(r.data).readSPS();track.width=_.width,track.height=_.height,track.pixelRatio=_.pixelRatio,track.sps=[r.data],track.duration=o._duration;for(var v=r.data.subarray(1,4),m="avc1.",i=0;i<3;i++){var y=v[i].toString(16);y.length<2&&(y="0"+y),m+=y}track.codec=m}break;case 8:n=!0,track.pps||(track.pps=[r.data]);break;case 9:n=!1,track.audFound=!0,d&&L(d,track),d=o.avcSample=E(!1,t.pts,t.dts,"");break;case 12:n=!0;break;default:n=!1,d&&(d.debug+="unknown NAL "+r.type+" ")}d&&n&&d.units.push(r)})),r&&d&&(L(d,track),this.avcSample=null)},t.getLastNalUnit=function(e){var t,r,n=this.avcSample;if(n&&0!==n.units.length||(n=e[e.length-1]),null!==(t=n)&&void 0!==t&&t.units){var o=n.units;r=o[o.length-1]}return r},t.parseAVCNALu=function(track,e){var t,r,n=e.byteLength,o=track.naluState||0,l=o,c=[],i=0,d=-1,f=0;for(-1===o&&(d=0,f=31&e[0],o=0,i=1);i<n;)if(t=e[i++],o)if(1!==o)if(t)if(1===t){if(d>=0){var h={data:e.subarray(d,i-o-1),type:f};c.push(h)}else{var _=this.getLastNalUnit(track.samples);if(_&&(l&&i<=4-l&&_.state&&(_.data=_.data.subarray(0,_.data.byteLength-l)),(r=i-o-1)>0)){var v=new Uint8Array(_.data.byteLength+r);v.set(_.data,0),v.set(e.subarray(0,r),_.data.byteLength),_.data=v,_.state=0}}i<n?(d=i,f=31&e[i],o=0):o=-1}else o=0;else o=3;else o=t?0:2;else o=t?0:1;if(d>=0&&o>=0){var m={data:e.subarray(d,n),type:f,state:o};c.push(m)}if(0===c.length){var y=this.getLastNalUnit(track.samples);if(y){var E=new Uint8Array(y.data.byteLength+e.byteLength);E.set(y.data,0),E.set(e,y.data.byteLength),y.data=E}}return track.naluState=o,c},t.parseAACPES=function(track,e){var t,r,o,l,c,f=0,v=this.aacOverFlow,data=e.data;if(v){this.aacOverFlow=null;var m=v.missing,y=v.sample.unit.byteLength;if(-1===m){var E=new Uint8Array(y+data.byteLength);E.set(v.sample.unit,0),E.set(data,y),data=E}else{var T=y-m;v.sample.unit.set(data.subarray(0,m),T),track.samples.push(v.sample),f=v.missing}}for(t=f,r=data.length;t<r-1&&!n.isHeader(data,t);t++);if(t===f||(t<r-1?(o="AAC PES did not start with ADTS header,offset:"+t,l=!1):(o="no ADTS header found in AAC PES",l=!0),h.logger.warn("parsing error:"+o),this.observer.emit(d.Events.ERROR,d.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,fatal:l,reason:o}),!l)){if(n.initTrackConfig(track,this.observer,data,t,this.audioCodec),void 0!==e.pts)c=e.pts;else{if(!v)return void h.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var S=n.getFrameDuration(track.samplerate);c=v.sample.pts+S}for(var D,L=0;t<r;){if(t+=(D=n.appendFrame(track,data,t,c,L)).length,D.missing){this.aacOverFlow=D;break}for(L++;t<r-1&&!n.isHeader(data,t);t++);}}},t.parseMPEGPES=function(track,e){var data=e.data,t=data.length,r=0,n=0,l=e.pts;if(void 0!==l)for(;n<t;)if(o.isHeader(data,n)){var c=o.appendFrame(track,data,n,l,r);if(!c)break;n+=c.length,r++}else n++;else h.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")},t.parseID3PES=function(e,t){if(void 0!==t.pts){var r=m({},t,{type:this._avcTrack?v.MetadataSchema.emsg:v.MetadataSchema.audioId3});e.samples.push(r)}else h.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")},e}();function E(e,t,r,n){return{key:e,frame:!1,pts:t,dts:r,units:[],debug:n,length:0}}function T(data,e){return(31&data[e+10])<<8|data[e+11]}function S(data,e,t,r){var n={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},o=e+3+((15&data[e+1])<<8|data[e+2])-4;for(e+=12+((15&data[e+10])<<8|data[e+11]);e<o;){var l=(31&data[e+1])<<8|data[e+2];switch(data[e]){case 207:if(!r){h.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===n.audio&&(n.audio=l);break;case 21:-1===n.id3&&(n.id3=l);break;case 219:if(!r){h.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===n.avc&&(n.avc=l);break;case 3:case 4:!0!==t.mpeg&&!0!==t.mp3?h.logger.log("MPEG audio found, not supported in this browser"):-1===n.audio&&(n.audio=l,n.segmentCodec="mp3");break;case 36:h.logger.warn("Unsupported HEVC stream type found")}e+=5+((15&data[e+3])<<8|data[e+4])}return n}function D(e){var t,r,n,o,l,i=0,data=e.data;if(!e||0===e.size)return null;for(;data[0].length<19&&data.length>1;){var c=new Uint8Array(data[0].length+data[1].length);c.set(data[0]),c.set(data[1],data[0].length),data[0]=c,data.splice(1,1)}if(1===((t=data[0])[0]<<16)+(t[1]<<8)+t[2]){if((r=(t[4]<<8)+t[5])&&r>e.size-6)return null;var d=t[7];192&d&&(o=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&d?o-(l=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(h.logger.warn(Math.round((o-l)/9e4)+"s delta between PTS and DTS, align them"),o=l):l=o);var f=(n=t[8])+9;if(e.size<=f)return null;e.size-=f;for(var _=new Uint8Array(e.size),v=0,m=data.length;v<m;v++){var y=(t=data[v]).byteLength;if(f){if(f>y){f-=y;continue}t=t.subarray(f),y-=f,f=0}_.set(t,i),i+=y}return r&&(r-=n+3),{data:_,pts:o,dts:l,len:r}}return null}function L(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var r=t.samples,n=r.length;if(!n)return void t.dropped++;var o=r[n-1];e.pts=o.pts,e.dts=o.dts}t.samples.push(e)}e.debug.length&&h.logger.log(e.pts+"/"+e.dts+":"+e.debug)}function I(data){for(var e=data.byteLength,t=[],i=1;i<e-2;)0===data[i]&&0===data[i+1]&&3===data[i+2]?(t.push(i+2),i+=2):i++;
2if(0===t.length)return data;var r=e-t.length,n=new Uint8Array(r),o=0;for(i=0;i<r;o++,i++)o===t[0]&&(o++,t.shift()),n[i]=data[o];return n}t.default=y},
2"./src/errors.ts":function(e,t,r){"use strict";var n,o;r.r(t),r.d(t,"ErrorTypes",(function(){return n})),r.d(t,"ErrorDetails",(function(){return o})),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(n||(n={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown"}(o||(o={}))},
2"./src/events.ts":function(e,t,r){"use strict";var n;r.r(t),r.d(t,"Events",(function(){return n})),function(e){e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached"}(n||(n={}))},
vendor: 10,120 bytes, line 2
2"./src/hls.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return L}));var n=r("./node_modules/url-toolkit/src/url-toolkit.js"),o=r("./src/loader/playlist-loader.ts"),l=r("./src/loader/key-loader.ts"),c=r("./src/controller/id3-track-controller.ts"),d=r("./src/controller/latency-controller.ts"),f=r("./src/controller/level-controller.ts"),h=r("./src/controller/fragment-tracker.ts"),_=r("./src/controller/stream-controller.ts"),v=r("./src/is-supported.ts"),m=r("./src/utils/logger.ts"),y=r("./src/config.ts"),E=r("./node_modules/eventemitter3/index.js"),T=r("./src/events.ts"),S=r("./src/errors.ts");function D(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var L=function(){function e(t){void 0===t&&(t={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new E.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var r=this.config=Object(y.mergeConfig)(e.DefaultConfig,t);this.userConfig=t,Object(m.enableLogs)(r.debug),this._autoLevelCapping=-1,r.progressive&&Object(y.enableStreamingMode)(r);var n=r.abrController,v=r.bufferController,T=r.capLevelController,S=r.fpsController,D=this.abrController=new n(this),L=this.bufferController=new v(this),I=this.capLevelController=new T(this),A=new S(this),x=new o.default(this),M=new l.default(this),k=new c.default(this),w=this.levelController=new f.default(this),N=new h.FragmentTracker(this),R=this.streamController=new _.default(this,N);I.setStreamController(R),A.setStreamController(R);var O=[x,M,w,R];this.networkControllers=O;var C=[D,L,I,A,k,N];this.audioTrackController=this.createController(r.audioTrackController,null,O),this.createController(r.audioStreamController,N,O),this.subtitleTrackController=this.createController(r.subtitleTrackController,null,O),this.createController(r.subtitleStreamController,N,O),this.createController(r.timelineController,null,C),this.emeController=this.createController(r.emeController,null,C),this.cmcdController=this.createController(r.cmcdController,null,C),this.latencyController=this.createController(d.default,null,C),this.coreComponents=C}e.isSupported=function(){return Object(v.isSupported)()};var t,r,L,I=e.prototype;return I.createController=function(e,t,r){if(e){var n=t?new e(this,t):new e(this);return r&&r.push(n),n}return null},I.on=function(e,t,r){void 0===r&&(r=this),this._emitter.on(e,t,r)},I.once=function(e,t,r){void 0===r&&(r=this),this._emitter.once(e,t,r)},I.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},I.off=function(e,t,r,n){void 0===r&&(r=this),this._emitter.off(e,t,r,n)},I.listeners=function(e){return this._emitter.listeners(e)},I.emit=function(e,t,r){return this._emitter.emit(e,t,r)},I.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){m.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.trigger(T.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,error:t})}return!1},I.listenerCount=function(e){return this._emitter.listenerCount(e)},I.destroy=function(){m.logger.log("destroy"),this.trigger(T.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(component){return component.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(component){return component.destroy()})),this.coreComponents.length=0},I.attachMedia=function(e){m.logger.log("attachMedia"),this._media=e,this.trigger(T.Events.MEDIA_ATTACHING,{media:e})},I.detachMedia=function(){m.logger.log("detachMedia"),this.trigger(T.Events.MEDIA_DETACHING,void 0),this._media=null},I.loadSource=function(e){this.stopLoad();var t=this.media,r=this.url,o=this.url=n.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});m.logger.log("loadSource:"+o),t&&r&&r!==o&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(t)),this.trigger(T.Events.MANIFEST_LOADING,{url:e})},I.startLoad=function(e){void 0===e&&(e=-1),m.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},I.stopLoad=function(){m.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},I.swapAudioCodec=function(){m.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},I.recoverMediaError=function(){m.logger.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},I.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},t=e,L=[{key:"version",get:function(){return"1.2.3"}},{key:"Events",get:function(){return T.Events}},{key:"ErrorTypes",get:function(){return S.ErrorTypes}},{key:"ErrorDetails",get:function(){return S.ErrorDetails}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:y.hlsDefaultConfig},set:function(t){e.defaultConfig=t}}],(r=[{key:"levels",get:function(){var e=this.levelController.levels;return e||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){m.logger.log("set currentLevel:"+e),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){m.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){m.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){m.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){m.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(m.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e)}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var r=e.length,i=0;i<r;i++)if(e[i].maxBitrate>=t)return i;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}])&&D(t.prototype,r),L&&D(t,L),Object.defineProperty(t,"prototype",{writable:!1}),e}();L.defaultConfig=void 0},"./src/is-supported.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"isSupported",(function(){return l})),r.d(t,"changeTypeSupported",(function(){return c}));var n=r("./src/utils/mediasource-helper.ts");function o(){return self.SourceBuffer||self.WebKitSourceBuffer}function l(){var e=Object(n.getMediaSource)();if(!e)return!1;var t=o(),r=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),l=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!r&&!!l}function c(){var e,t=o();return"function"==typeof(null==t||null===(e=t.prototype)||void 0===e?void 0:e.changeType)}},
2"./src/loader/date-range.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"DateRangeAttribute",(function(){return n})),r.d(t,"DateRange",(function(){return h}));var n,o=r("./src/polyfills/number.ts"),l=r("./src/utils/attr-list.ts"),c=r("./src/utils/logger.ts");function d(){return d=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},d.apply(this,arguments)}function f(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.ID="ID",e.CLASS="CLASS",e.START_DATE="START-DATE",e.DURATION="DURATION",e.END_DATE="END-DATE",e.END_ON_NEXT="END-ON-NEXT",e.PLANNED_DURATION="PLANNED-DURATION",e.SCTE35_OUT="SCTE35-OUT",e.SCTE35_IN="SCTE35-IN"}(n||(n={}));var h=function(){function e(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){var r=t.attr;for(var f in r)if(Object.prototype.hasOwnProperty.call(e,f)&&e[f]!==r[f]){c.logger.warn('DATERANGE tag attribute: "'+f+'" does not match for tags with ID: "'+e.ID+'"'),this._badValueForSameId=f;break}e=d(new l.AttrList({}),r,e)}if(this.attr=e,this._startDate=new Date(e[n.START_DATE]),n.END_DATE in this.attr){var h=new Date(this.attr[n.END_DATE]);Object(o.isFiniteNumber)(h.getTime())&&(this._endDate=h)}}var t,r,h;return t=e,(r=[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}},{key:"duration",get:function(){if(n.DURATION in this.attr){var e=this.attr.decimalFloatingPoint(n.DURATION);if(Object(o.isFiniteNumber)(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return n.PLANNED_DURATION in this.attr?this.attr.decimalFloatingPoint(n.PLANNED_DURATION):null}},{key:"endOnNext",get:function(){return this.attr.bool(n.END_ON_NEXT)}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&Object(o.isFiniteNumber)(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}])&&f(t.prototype,r),h&&f(t,h),Object.defineProperty(t,"prototype",{writable:!1}),e}()},
vendor: 15,896 bytes, line 2
2"./src/loader/fragment-loader.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return v})),r.d(t,"LoadError",(function(){return y}));var n=r("./src/polyfills/number.ts"),o=r("./src/errors.ts");function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,h(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)},l(e)}function c(e,t,r){return c=d()?Reflect.construct.bind():function(e,t,r){var a=[null];a.push.apply(a,t);var n=new(Function.bind.apply(e,a));return r&&f(n,r.prototype),n},c.apply(null,arguments)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function f(e,p){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},f(e,p)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var _=Math.pow(2,17),v=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var r=this,n=e.url;if(!n)return Promise.reject(new y({type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(n?"part list":"url")));this.abort();var l=this.config,c=l.fLoader,d=l.loader;return new Promise((function(n,f){r.loader&&r.loader.destroy();var h=r.loader=e.loader=c?new c(l):new d(l),v=m(e),E={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:"initSegment"===e.sn?1/0:_};e.stats=h.stats,h.load(v,E,{onSuccess:function(t,o,l,c){r.resetLoader(e,h),n({frag:e,part:null,payload:t.data,networkDetails:c})},onError:function(t,n,l){r.resetLoader(e,h),f(new y({type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:l}))},onAbort:function(t,n,l){r.resetLoader(e,h),f(new y({type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:l}))},onTimeout:function(t,n,l){r.resetLoader(e,h),f(new y({type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:l}))},onProgress:function(r,n,data,o){t&&t({frag:e,part:null,payload:data,networkDetails:o})}})}))},t.loadPart=function(e,t,r){var n=this;this.abort();var l=this.config,c=l.fLoader,d=l.loader;return new Promise((function(f,h){n.loader&&n.loader.destroy();var v=n.loader=e.loader=c?new c(l):new d(l),E=m(e,t),T={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:_};t.stats=v.stats,v.load(E,T,{onSuccess:function(o,l,c,d){n.resetLoader(e,v),n.updateStatsFromPart(e,t);var h={frag:e,part:t,payload:o.data,networkDetails:d};r(h),f(h)},onError:function(r,l,c){n.resetLoader(e,v),h(new y({type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:r,networkDetails:c}))},onAbort:function(r,l,c){e.stats.aborted=t.stats.aborted,n.resetLoader(e,v),h(new y({type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:c}))},onTimeout:function(r,l,c){n.resetLoader(e,v),h(new y({type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:c}))}})}))},t.updateStatsFromPart=function(e,t){var r=e.stats,n=t.stats,o=n.total;if(r.loaded+=n.loaded,o){var l=Math.round(e.duration/t.duration),c=Math.min(Math.round(r.loaded/o),l),d=(l-c)*Math.round(r.loaded/c);r.total=r.loaded+d}else r.total=Math.max(r.loaded,r.total);var f=r.loading,h=n.loading;f.start?f.first+=h.first-h.start:(f.start=h.start,f.first=h.first),f.end=h.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function m(e,t){void 0===t&&(t=null);var r=t||e,o={frag:e,part:t,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},l=r.byteRangeStartOffset,c=r.byteRangeEndOffset;return Object(n.isFiniteNumber)(l)&&Object(n.isFiniteNumber)(c)&&(o.rangeStart=l,o.rangeEnd=c),o}var y=function(e){var t,r;function n(data){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).data=void 0,t.data=data,t}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,f(t,r),n}(l(Error))},"./src/loader/fragment.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"ElementaryStreamTypes",(function(){return n})),r.d(t,"BaseSegment",(function(){return y})),r.d(t,"Fragment",(function(){return E})),r.d(t,"Part",(function(){return T}));var n,o=r("./src/polyfills/number.ts"),l=r("./node_modules/url-toolkit/src/url-toolkit.js"),c=r("./src/utils/logger.ts"),d=r("./src/loader/level-key.ts"),f=r("./src/loader/load-stats.ts");function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_(e,t)}function _(e,p){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},_(e,p)}function v(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}!function(e){e.AUDIO="audio",e.VIDEO="video",e.AUDIOVIDEO="audiovideo"}(n||(n={}));var y=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[n.AUDIO]=null,t[n.VIDEO]=null,t[n.AUDIOVIDEO]=null,t),this.baseurl=e}return e.prototype.setByteRange=function(e,t){var r=e.split("@",2),n=[];1===r.length?n[0]=t?t.byteRangeEndOffset:0:n[0]=parseInt(r[1]),n[1]=parseInt(r[0])+n[0],this._byteRange=n},m(e,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(l.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),e}(),E=function(e){function t(t,r){var n;return(n=e.call(this,r)||this)._decryptdata=null,n.rawProgramDateTime=null,n.programDateTime=null,n.tagList=[],n.duration=0,n.sn=0,n.levelkey=void 0,n.type=void 0,n.loader=null,n.level=-1,n.cc=0,n.startPTS=void 0,n.endPTS=void 0,n.appendedPTS=void 0,n.startDTS=void 0,n.endDTS=void 0,n.start=0,n.deltaPTS=void 0,n.maxStartPTS=void 0,n.minEndPTS=void 0,n.stats=new f.LoadStats,n.urlId=0,n.data=void 0,n.bitrateTest=!1,n.title=null,n.initSegment=null,n.type=t,n}h(t,e);var r=t.prototype;return r.createInitializationVector=function(e){for(var t=new Uint8Array(16),i=12;i<16;i++)t[i]=e>>8*(15-i)&255;return t},r.setDecryptDataFromLevelKey=function(e,t){var r=e;return"AES-128"===(null==e?void 0:e.method)&&e.uri&&!e.iv&&((r=d.LevelKey.fromURI(e.uri)).method=e.method,r.iv=this.createInitializationVector(t),r.keyFormat="identity"),r},r.setElementaryStreamInfo=function(e,t,r,n,o,l){void 0===l&&(l=!1);var c=this.elementaryStreams,d=c[e];d?(d.startPTS=Math.min(d.startPTS,t),d.endPTS=Math.max(d.endPTS,r),d.startDTS=Math.min(d.startDTS,n),d.endDTS=Math.max(d.endDTS,o)):c[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:o,partial:l}},r.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[n.AUDIO]=null,e[n.VIDEO]=null,e[n.AUDIOVIDEO]=null},m(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&c.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(o.isFiniteNumber)(this.programDateTime))return null;var e=Object(o.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;return!(null===(e=this.decryptdata)||void 0===e||!e.keyFormat||!this.decryptdata.uri)}}]),t}(y),T=function(e){function t(t,r,n,o,l){var c;(c=e.call(this,n)||this).fragOffset=0,c.duration=0,c.gap=!1,c.independent=!1,c.relurl=void 0,c.fragment=void 0,c.index=void 0,c.stats=new f.LoadStats,c.duration=t.decimalFloatingPoint("DURATION"),c.gap=t.bool("GAP"),c.independent=t.bool("INDEPENDENT"),c.relurl=t.enumeratedString("URI"),c.fragment=r,c.index=o;var d=t.enumeratedString("BYTERANGE");return d&&c.setByteRange(d,l),l&&(c.fragOffset=l.fragOffset+l.duration),c}return h(t,e),m(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(y)},"./src/loader/key-loader.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return c}));var n=r("./src/events.ts"),o=r("./src/errors.ts"),l=r("./src/utils/logger.ts"),c=function(){function e(e){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=e,this.registerListeners()}var t=e.prototype;return t.startLoad=function(e){},t.stopLoad=function(){this.destroyInternalLoaders()},t.registerListeners=function(){this.hls.on(n.Events.KEY_LOADING,this.onKeyLoading,this)},t.unregisterListeners=function(){this.hls.off(n.Events.KEY_LOADING,this.onKeyLoading)},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onKeyLoading=function(e,data){var t=data.frag,r=t.type,o=this.loaders[r];if(t.decryptdata){var c=t.decryptdata.uri;if(c!==this.decrypturl||null===this.decryptkey){var d=this.hls.config;if(o&&(l.logger.warn("abort previous key loader for type:"+r),o.abort()),!c)return void l.logger.warn("key uri is falsy");var f=d.loader,h=t.loader=this.loaders[r]=new f(d);this.decrypturl=c,this.decryptkey=null;var _={url:c,frag:t,responseType:"arraybuffer"},v={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};h.load(_,v,m)}else this.decryptkey&&(t.decryptdata.key=this.decryptkey,this.hls.trigger(n.Events.KEY_LOADED,{frag:t}))}else l.logger.warn("Missing decryption data on fragment in onKeyLoading")},t.loadsuccess=function(e,t,r){var o=r.frag;o.decryptdata?(this.decryptkey=o.decryptdata.key=new Uint8Array(e.data),o.loader=null,delete this.loaders[o.type],this.hls.trigger(n.Events.KEY_LOADED,{frag:o})):l.logger.error("after key load, decryptdata unset")},t.loaderror=function(e,t){var r=t.frag,l=r.loader;l&&l.abort(),delete this.loaders[r.type],this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:e})},t.loadtimeout=function(e,t){var r=t.frag,l=r.loader;l&&l.abort(),delete this.loaders[r.type],this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},e}()},"./src/loader/level-details.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"LevelDetails",(function(){return l}));var n=r("./src/polyfills/number.ts");function o(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.dateRanges={},this.url=e}var t,r,l;return e.prototype.reloaded=function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,r=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!r||!!t,this.advanced=this.endSN>e.endSN||t>0||0===t&&r>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(r=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(n.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&o(t.prototype,r),l&&o(t,l),Object.defineProperty(t,"prototype",{writable:!1}),e}()},"./src/loader/level-key.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"LevelKey",(function(){return l}));var n=r("./node_modules/url-toolkit/src/url-toolkit.js");function o(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(e,t){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,this._uri=t?Object(n.buildAbsoluteURL)(e,t,{alwaysNormalize:!0}):e}var t,r,l;return e.fromURL=function(t,r){return new e(t,r)},e.fromURI=function(t){return new e(t)},t=e,(r=[{key:"uri",get:function(){return this._uri}}])&&o(t.prototype,r),l&&o(t,l),Object.defineProperty(t,"prototype",{writable:!1}),e}()},
2"./src/loader/load-stats.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"LoadStats",(function(){return n}));var n=function(){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}}},
vendor: 7,977 bytes, line 2
2"./src/loader/m3u8-parser.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return D}));var n=r("./src/polyfills/number.ts"),o=r("./node_modules/url-toolkit/src/url-toolkit.js"),l=r("./src/loader/date-range.ts"),c=r("./src/loader/fragment.ts"),d=r("./src/loader/level-details.ts"),f=r("./src/loader/level-key.ts"),h=r("./src/utils/attr-list.ts"),_=r("./src/utils/logger.ts"),v=r("./src/utils/codecs.ts"),m=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,y=/#EXT-X-MEDIA:(.*)/g,E=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),T=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),S=/\.(mp4|m4s|m4v|m4a)$/i,D=function(){function e(){}return e.findGroup=function(e,t){for(var i=0;i<e.length;i++){var r=e[i];if(r.id===t)return r}},e.convertAVC1ToAVCOTI=function(e){var t=e.split(".");if(t.length>2){var r=t.shift()+".";return r+=parseInt(t.shift()).toString(16),r+=("000"+parseInt(t.shift()).toString(16)).slice(-4)}return e},e.resolve=function(e,t){return o.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,r){var n,o=[],l={},c=!1;for(m.lastIndex=0;null!=(n=m.exec(t));)if(n[1]){var d=new h.AttrList(n[1]),f={attrs:d,bitrate:d.decimalInteger("AVERAGE-BANDWIDTH")||d.decimalInteger("BANDWIDTH"),name:d.NAME,url:e.resolve(n[2],r)},_=d.decimalResolution("RESOLUTION");_&&(f.width=_.width,f.height=_.height),L((d.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),f),f.videoCodec&&-1!==f.videoCodec.indexOf("avc1")&&(f.videoCodec=e.convertAVC1ToAVCOTI(f.videoCodec)),o.push(f)}else if(n[3]){var v=new h.AttrList(n[3]);v["DATA-ID"]&&(c=!0,l[v["DATA-ID"]]=v)}return{levels:o,sessionData:c?l:null}},e.parseMasterPlaylistMedia=function(t,r,n,o){var l;void 0===o&&(o=[]);var c=[],d=0;for(y.lastIndex=0;null!==(l=y.exec(t));){var f=new h.AttrList(l[1]);if(f.TYPE===n){var _={attrs:f,bitrate:0,id:d++,groupId:f["GROUP-ID"],instreamId:f["INSTREAM-ID"],name:f.NAME||f.LANGUAGE||"",type:n,default:f.bool("DEFAULT"),autoselect:f.bool("AUTOSELECT"),forced:f.bool("FORCED"),lang:f.LANGUAGE,url:f.URI?e.resolve(f.URI,r):""};if(o.length){var v=e.findGroup(o,_.groupId)||o[0];I(_,v,"audioCodec"),I(_,v,"textCodec")}c.push(_)}}return c},e.parseLevelPlaylist=function(e,t,r,v,m){var y,i,D,L=new d.LevelDetails(t),I=L.fragments,M=null,k=0,w=0,N=0,R=0,O=null,C=new c.Fragment(v,t),P=-1,j=!1;for(E.lastIndex=0,L.m3u8=e;null!==(y=E.exec(e));){j&&(j=!1,(C=new c.Fragment(v,t)).start=N,C.sn=k,C.cc=R,C.level=r,M&&(C.initSegment=M,C.rawProgramDateTime=M.rawProgramDateTime,M.rawProgramDateTime=null));var F=y[1];if(F){C.duration=parseFloat(F);var title=(" "+y[2]).slice(1);C.title=title||null,C.tagList.push(title?["INF",F,title]:["INF",F])}else if(y[3])Object(n.isFiniteNumber)(C.duration)&&(C.start=N,D&&(C.levelkey=D),C.sn=k,C.level=r,C.cc=R,C.urlId=m,I.push(C),C.relurl=(" "+y[3]).slice(1),A(C,O),O=C,N+=C.duration,k++,w=0,j=!0);else if(y[4]){var data=(" "+y[4]).slice(1);O?C.setByteRange(data,O):C.setByteRange(data)}else if(y[5])C.rawProgramDateTime=(" "+y[5]).slice(1),C.tagList.push(["PROGRAM-DATE-TIME",C.rawProgramDateTime]),-1===P&&(P=I.length);else{if(!(y=y[0].match(T))){_.logger.warn("No matches on slow regex match for level playlist!");continue}for(i=1;i<y.length&&void 0===y[i];i++);var U=(" "+y[i]).slice(1),B=(" "+y[i+1]).slice(1),G=y[i+2]?(" "+y[i+2]).slice(1):"";switch(U){case"PLAYLIST-TYPE":L.type=B.toUpperCase();break;case"MEDIA-SEQUENCE":k=L.startSN=parseInt(B);break;case"SKIP":var z=new h.AttrList(B),H=z.decimalInteger("SKIPPED-SEGMENTS");if(Object(n.isFiniteNumber)(H)){L.skippedSegments=H;for(var Y=H;Y--;)I.unshift(null);k+=H}var V=z.enumeratedString("RECENTLY-REMOVED-DATERANGES");V&&(L.recentlyRemovedDateranges=V.split("\t"));break;case"TARGETDURATION":L.targetduration=parseFloat(B);break;case"VERSION":L.version=parseInt(B);break;case"EXTM3U":break;case"ENDLIST":L.live=!1;break;case"#":(B||G)&&C.tagList.push(G?[B,G]:[B]);break;case"DISCONTINUITY":R++,C.tagList.push(["DIS"]);break;case"GAP":C.tagList.push([U]);break;case"BITRATE":C.tagList.push([U,B]);break;case"DATERANGE":var W=new h.AttrList(B),Z=new l.DateRange(W,L.dateRanges[W.ID]);Z.isValid||L.skippedSegments?L.dateRanges[Z.id]=Z:_.logger.warn('Ignoring invalid DATERANGE tag: "'+B+'"'),C.tagList.push(["EXT-X-DATERANGE",B]);break;case"DISCONTINUITY-SEQUENCE":R=parseInt(B);break;case"KEY":var K,Q=new h.AttrList(B),X=Q.enumeratedString("METHOD"),J=Q.URI,$=Q.hexadecimalInteger("IV"),ee=Q.enumeratedString("KEYFORMATVERSIONS"),te=Q.enumeratedString("KEYID"),ie=null!=(K=Q.enumeratedString("KEYFORMAT"))?K:"identity";if(["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"].indexOf(ie)>-1){_.logger.warn("Keyformat "+ie+" is not supported from the manifest");continue}if("identity"!==ie)continue;X&&(D=f.LevelKey.fromURL(t,J),J&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(D.method=X,D.keyFormat=ie,te&&(D.keyID=te),ee&&(D.keyFormatVersions=ee),D.iv=$));break;case"START":var re=new h.AttrList(B).decimalFloatingPoint("TIME-OFFSET");Object(n.isFiniteNumber)(re)&&(L.startTimeOffset=re);break;case"MAP":var ne=new h.AttrList(B);if(C.duration){var oe=new c.Fragment(v,t);x(oe,ne,r,D),M=oe,C.initSegment=M,M.rawProgramDateTime&&!C.rawProgramDateTime&&(C.rawProgramDateTime=M.rawProgramDateTime)}else x(C,ne,r,D),M=C,j=!0;break;case"SERVER-CONTROL":var ae=new h.AttrList(B);L.canBlockReload=ae.bool("CAN-BLOCK-RELOAD"),L.canSkipUntil=ae.optionalFloat("CAN-SKIP-UNTIL",0),L.canSkipDateRanges=L.canSkipUntil>0&&ae.bool("CAN-SKIP-DATERANGES"),L.partHoldBack=ae.optionalFloat("PART-HOLD-BACK",0),L.holdBack=ae.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var se=new h.AttrList(B);L.partTarget=se.decimalFloatingPoint("PART-TARGET");break;case"PART":var ue=L.partList;ue||(ue=L.partList=[]);var le=w>0?ue[ue.length-1]:void 0,ce=w++,de=new c.Part(new h.AttrList(B),C,t,ce,le);ue.push(de),C.duration+=de.duration;break;case"PRELOAD-HINT":var fe=new h.AttrList(B);L.preloadHint=fe;break;case"RENDITION-REPORT":var he=new h.AttrList(B);L.renditionReports=L.renditionReports||[],L.renditionReports.push(he);break;default:_.logger.warn("line parsed but not handled: "+y)}}}O&&!O.relurl?(I.pop(),N-=O.duration,L.partList&&(L.fragmentHint=O)):L.partList&&(A(C,O),C.cc=R,L.fragmentHint=C);var _e=I.length,ve=I[0],pe=I[_e-1];if((N+=L.skippedSegments*L.targetduration)>0&&_e&&pe){L.averagetargetduration=N/_e;var ge=pe.sn;L.endSN="initSegment"!==ge?ge:0,ve&&(L.startCC=ve.cc,ve.initSegment||L.fragments.every((function(e){return e.relurl&&(t=e.relurl,S.test(null!=(r=null===(n=o.parseURL(t))||void 0===n?void 0:n.path)?r:""));var t,r,n}))&&(_.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(C=new c.Fragment(v,t)).relurl=pe.relurl,C.level=r,C.sn="initSegment",ve.initSegment=C,L.needSidxRanges=!0))}else L.endSN=0,L.startCC=0;return L.fragmentHint&&(N+=L.fragmentHint.duration),L.totalduration=N,L.endCC=R,P>0&&function(e,t){for(var r=e[t],i=t;i--;){var n=e[i];if(!n)return;n.programDateTime=r.programDateTime-1e3*n.duration,r=n}}(I,P),L},e}();function L(e,t){["video","audio","text"].forEach((function(r){var n=e.filter((function(e){return Object(v.isCodecType)(e,r)}));if(n.length){var o=n.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[r+"Codec"]=o.length>0?o[0]:n[0],e=e.filter((function(e){return-1===n.indexOf(e)}))}})),t.unknownCodecs=e}function I(e,t,r){var n=t[r];
2n&&(e[r]=n)}function A(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(n.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function x(e,t,r,n){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=r,e.sn="initSegment",n&&(e.levelkey=n),e.initSegment=null}},
vendor: 9,463 bytes, line 2
2"./src/loader/playlist-loader.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/polyfills/number.ts"),o=r("./src/events.ts"),l=r("./src/errors.ts"),c=r("./src/utils/logger.ts"),d=r("./src/utils/mp4-tools.ts"),f=r("./src/loader/m3u8-parser.ts"),h=r("./src/types/loader.ts"),_=r("./src/utils/attr-list.ts");function v(e,t){var r=e.url;return void 0!==r&&0!==r.indexOf("data:")||(r=t.url),r}var m=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.startLoad=function(e){},t.stopLoad=function(){this.destroyInternalLoaders()},t.registerListeners=function(){var e=this.hls;e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(o.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(o.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(o.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,r=t.pLoader,n=t.loader,o=new(r||n)(t);return e.loader=o,this.loaders[e.type]=o,o},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,data){var t=data.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:h.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},t.onLevelLoading=function(e,data){var t=data.id,r=data.level,n=data.url,o=data.deliveryDirectives;this.load({id:t,groupId:null,level:r,responseType:"text",type:h.PlaylistContextType.LEVEL,url:n,deliveryDirectives:o})},t.onAudioTrackLoading=function(e,data){var t=data.id,r=data.groupId,n=data.url,o=data.deliveryDirectives;this.load({id:t,groupId:r,level:null,responseType:"text",type:h.PlaylistContextType.AUDIO_TRACK,url:n,deliveryDirectives:o})},t.onSubtitleTrackLoading=function(e,data){var t=data.id,r=data.groupId,n=data.url,o=data.deliveryDirectives;this.load({id:t,groupId:r,level:null,responseType:"text",type:h.PlaylistContextType.SUBTITLE_TRACK,url:n,deliveryDirectives:o})},t.load=function(e){var t,r,n,o,l,d,f=this.hls.config,_=this.getInternalLoader(e);if(_){var v=_.context;if(v&&v.url===e.url)return void c.logger.trace("[playlist-loader]: playlist request ongoing");c.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),_.abort()}switch(e.type){case h.PlaylistContextType.MANIFEST:r=f.manifestLoadingMaxRetry,n=f.manifestLoadingTimeOut,o=f.manifestLoadingRetryDelay,l=f.manifestLoadingMaxRetryTimeout;break;case h.PlaylistContextType.LEVEL:case h.PlaylistContextType.AUDIO_TRACK:case h.PlaylistContextType.SUBTITLE_TRACK:r=0,n=f.levelLoadingTimeOut;break;default:r=f.levelLoadingMaxRetry,n=f.levelLoadingTimeOut,o=f.levelLoadingRetryDelay,l=f.levelLoadingMaxRetryTimeout}if(_=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===h.PlaylistContextType.LEVEL&&null!==e.level?d=this.hls.levels[e.level].details:e.type===h.PlaylistContextType.AUDIO_TRACK&&null!==e.id?d=this.hls.audioTracks[e.id].details:e.type===h.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(d=this.hls.subtitleTracks[e.id].details),d)){var m=d.partTarget,y=d.targetduration;m&&y&&(n=Math.min(1e3*Math.max(3*m,.8*y),n))}var E={timeout:n,maxRetry:r,retryDelay:o,maxRetryDelay:l,highWaterMark:0},T={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};_.load(e,E,T)},t.loadsuccess=function(e,t,r,n){if(void 0===n&&(n=null),r.isSidxRequest)return this.handleSidxRequest(e,r),void this.handlePlaylistLoaded(e,t,r,n);this.resetInternalLoader(r.type);var o=e.data;0===o.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),o.indexOf("#EXTINF:")>0||o.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,r,n):this.handleMasterPlaylist(e,t,r,n)):this.handleManifestParsingError(e,r,"no EXTM3U delimiter",n)},t.loaderror=function(e,t,r){void 0===r&&(r=null),this.handleNetworkError(t,r,!1,e)},t.loadtimeout=function(e,t,r){void 0===r&&(r=null),this.handleNetworkError(t,r,!0)},t.handleMasterPlaylist=function(e,t,r,n){var l=this.hls,d=e.data,h=v(e,r),m=f.default.parseMasterPlaylist(d,h),y=m.levels,E=m.sessionData;if(y.length){var T=y.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),S=y.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),D=f.default.parseMasterPlaylistMedia(d,h,"AUDIO",T),L=f.default.parseMasterPlaylistMedia(d,h,"SUBTITLES",S),I=f.default.parseMasterPlaylistMedia(d,h,"CLOSED-CAPTIONS");D.length&&(D.some((function(e){return!e.url}))||!y[0].audioCodec||y[0].attrs.AUDIO||(c.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),D.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new _.AttrList({}),bitrate:0,url:""}))),l.trigger(o.Events.MANIFEST_LOADED,{levels:y,audioTracks:D,subtitles:L,captions:I,url:h,stats:t,networkDetails:n,sessionData:E})}else this.handleManifestParsingError(e,r,"no level found in manifest",n)},t.handleTrackOrLevelPlaylist=function(e,t,r,c){var d=this.hls,m=r.id,y=r.level,E=r.type,T=v(e,r),S=Object(n.isFiniteNumber)(m)?m:0,D=Object(n.isFiniteNumber)(y)?y:S,L=function(e){switch(e.type){case h.PlaylistContextType.AUDIO_TRACK:return h.PlaylistLevelType.AUDIO;case h.PlaylistContextType.SUBTITLE_TRACK:return h.PlaylistLevelType.SUBTITLE;default:return h.PlaylistLevelType.MAIN}}(r),I=f.default.parseLevelPlaylist(e.data,T,D,L,S);if(I.fragments.length){if(E===h.PlaylistContextType.MANIFEST){var A={attrs:new _.AttrList({}),bitrate:0,details:I,name:"",url:T};d.trigger(o.Events.MANIFEST_LOADED,{levels:[A],audioTracks:[],url:T,stats:t,networkDetails:c,sessionData:null})}if(t.parsing.end=performance.now(),I.needSidxRanges){var x,M=null===(x=I.fragments[0].initSegment)||void 0===x?void 0:x.url;this.load({url:M,isSidxRequest:!0,type:E,level:y,levelDetails:I,id:m,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else r.levelDetails=I,this.handlePlaylistLoaded(e,t,r,c)}else d.trigger(o.Events.ERROR,{type:l.ErrorTypes.NETWORK_ERROR,details:l.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:T,reason:"no fragments found in level",level:"number"==typeof r.level?r.level:void 0})},t.handleSidxRequest=function(e,t){var data=new Uint8Array(e.data),r=Object(d.findBox)(data,["sidx"])[0];if(r){var n=Object(d.parseSegmentIndex)(r);if(n){var o=n.references,l=t.levelDetails;o.forEach((function(e,t){var r=e.info,n=l.fragments[t];if(0===n.byteRange.length&&n.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),n.initSegment){var o=Object(d.findBox)(data,["moov"])[0],c=o?o.length:null;n.initSegment.setByteRange(String(c)+"@0")}}))}}},t.handleManifestParsingError=function(e,t,r,n){this.hls.trigger(o.Events.ERROR,{type:l.ErrorTypes.NETWORK_ERROR,details:l.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===h.PlaylistContextType.MANIFEST,url:e.url,reason:r,response:e,context:t,networkDetails:n})},t.handleNetworkError=function(e,t,r,n){void 0===r&&(r=!1),c.logger.warn("[playlist-loader]: A network "+(r?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var details=l.ErrorDetails.UNKNOWN,d=!1,f=this.getInternalLoader(e);switch(e.type){case h.PlaylistContextType.MANIFEST:details=r?l.ErrorDetails.MANIFEST_LOAD_TIMEOUT:l.ErrorDetails.MANIFEST_LOAD_ERROR,d=!0;break;case h.PlaylistContextType.LEVEL:details=r?l.ErrorDetails.LEVEL_LOAD_TIMEOUT:l.ErrorDetails.LEVEL_LOAD_ERROR,d=!1;break;case h.PlaylistContextType.AUDIO_TRACK:details=r?l.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,d=!1;break;case h.PlaylistContextType.SUBTITLE_TRACK:details=r?l.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:l.ErrorDetails.SUBTITLE_LOAD_ERROR,d=!1}f&&this.resetInternalLoader(e.type);var _={type:l.ErrorTypes.NETWORK_ERROR,details:details,fatal:d,url:e.url,loader:f,context:e,networkDetails:t};n&&(_.response=n),this.hls.trigger(o.Events.ERROR,_)},t.handlePlaylistLoaded=function(e,t,r,n){var l=r.type,c=r.level,d=r.id,f=r.groupId,_=r.loader,v=r.levelDetails,m=r.deliveryDirectives;if(null!=v&&v.targetduration){if(_)switch(v.live&&(_.getCacheAge&&(v.ageHeader=_.getCacheAge()||0),_.getCacheAge&&!isNaN(v.ageHeader)||(v.ageHeader=0)),l){case h.PlaylistContextType.MANIFEST:case h.PlaylistContextType.LEVEL:this.hls.trigger(o.Events.LEVEL_LOADED,{details:v,level:c||0,id:d||0,stats:t,networkDetails:n,deliveryDirectives:m});break;case h.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(o.Events.AUDIO_TRACK_LOADED,{details:v,id:d||0,groupId:f||"",stats:t,networkDetails:n,deliveryDirectives:m});break;case h.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(o.Events.SUBTITLE_TRACK_LOADED,{details:v,id:d||0,groupId:f||"",stats:t,networkDetails:n,deliveryDirectives:m})}}else this.handleManifestParsingError(e,r,"invalid target duration",n)},e}();t.default=m},
2"./src/polyfills/number.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"isFiniteNumber",(function(){return n})),r.d(t,"MAX_SAFE_INTEGER",(function(){return o}));var n=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},o=Number.MAX_SAFE_INTEGER||9007199254740991},
2"./src/remux/aac-helper.ts":function(e,t,r){"use strict";r.r(t);var n=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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(6===t)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(1===t)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(2===t)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(3===t)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])}},e}();t.default=n},
vendor: 7,084 bytes, line 2
2"./src/remux/mp4-generator.ts":function(e,t,r){"use strict";r.r(t);var n=Math.pow(2,32)-1,o=function(){function e(){}return e.init=function(){var i;for(i in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(i)&&(e.types[i]=[i.charCodeAt(0),i.charCodeAt(1),i.charCodeAt(2),i.charCodeAt(3)]);var t=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]),r=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]);e.HDLR_TYPES={video:t,audio:r};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=o,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var l=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,l,d,l,c),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,n))},e.box=function(e){for(var t=8,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];for(var i=n.length,l=i;i--;)t+=n[i].byteLength;var c=new Uint8Array(t);for(c[0]=t>>24&255,c[1]=t>>16&255,c[2]=t>>8&255,c[3]=255&t,c.set(e,4),i=0,t=8;i<l;i++)c.set(n[i],t),t+=n[i].byteLength;return c},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(data){return e.box(e.types.mdat,data)},e.mdhd=function(t,r){r*=t;var o=Math.floor(r/(n+1)),l=Math.floor(r%(n+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,o>>24,o>>16&255,o>>8&255,255&o,l>>24,l>>16&255,l>>8&255,255&l,85,196,0,0]))},e.mdia=function(track){return e.box(e.types.mdia,e.mdhd(track.timescale,track.duration),e.hdlr(track.type),e.minf(track))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(track){return"audio"===track.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(track)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(track))},e.moof=function(t,r,track){return e.box(e.types.moof,e.mfhd(t),e.traf(track,r))},e.moov=function(t){for(var i=t.length,r=[];i--;)r[i]=e.trak(t[i]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var i=t.length,r=[];i--;)r[i]=e.trex(t[i]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,r){r*=t;var o=Math.floor(r/(n+1)),l=Math.floor(r%(n+1)),c=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,o>>24,o>>16&255,o>>8&255,255&o,l>>24,l>>16&255,l>>8&255,255&l,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,c)},e.sdtp=function(track){var i,t,r=track.samples||[],n=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)t=r[i].flags,n[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return e.box(e.types.sdtp,n)},e.stbl=function(track){return e.box(e.types.stbl,e.stsd(track),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(track){var i,data,t,r=[],n=[];for(i=0;i<track.sps.length;i++)t=(data=track.sps[i]).byteLength,r.push(t>>>8&255),r.push(255&t),r=r.concat(Array.prototype.slice.call(data));for(i=0;i<track.pps.length;i++)t=(data=track.pps[i]).byteLength,n.push(t>>>8&255),n.push(255&t),n=n.concat(Array.prototype.slice.call(data));var o=e.box(e.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|track.sps.length].concat(r).concat([track.pps.length]).concat(n))),l=track.width,c=track.height,d=track.pixelRatio[0],f=track.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,c>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,f>>24,f>>16&255,f>>8&255,255&f])))},e.esds=function(track){var e=track.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(track.config).concat([6,1,2]))},e.mp4a=function(track){var t=track.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,track.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0]),e.box(e.types.esds,e.esds(track)))},e.mp3=function(track){var t=track.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,track.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0]))},e.stsd=function(track){return"audio"===track.type?"mp3"===track.segmentCodec&&"mp3"===track.codec?e.box(e.types.stsd,e.STSD,e.mp3(track)):e.box(e.types.stsd,e.STSD,e.mp4a(track)):e.box(e.types.stsd,e.STSD,e.avc1(track))},e.tkhd=function(track){var t=track.id,r=track.duration*track.timescale,o=track.width,l=track.height,c=Math.floor(r/(n+1)),d=Math.floor(r%(n+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d,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,o>>8&255,255&o,0,0,l>>8&255,255&l,0,0]))},e.traf=function(track,t){var r=e.sdtp(track),o=track.id,l=Math.floor(t/(n+1)),c=Math.floor(t%(n+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,l>>24,l>>16&255,l>>8&255,255&l,c>>24,c>>16&255,c>>8&255,255&c])),e.trun(track,r.length+16+20+8+16+8+8),r)},e.trak=function(track){return track.duration=track.duration||4294967295,e.box(e.types.trak,e.tkhd(track),e.mdia(track))},e.trex=function(track){var t=track.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(track,t){var i,r,n,o,l,c,d=track.samples||[],f=d.length,h=12+16*f,_=new Uint8Array(h);for(t+=8+h,_.set(["video"===track.type?1:0,0,15,1,f>>>24&255,f>>>16&255,f>>>8&255,255&f,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),i=0;i<f;i++)n=(r=d[i]).duration,o=r.size,l=r.flags,c=r.cts,_.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.paddingValue<<1|l.isNonSync,61440&l.degradPrio,15&l.degradPrio,c>>>24&255,c>>>16&255,c>>>8&255,255&c],12+16*i);return e.box(e.types.trun,_)}
2,e.initSegment=function(t){e.types||e.init();var r=e.moov(t),n=new Uint8Array(e.FTYP.byteLength+r.byteLength);return n.set(e.FTYP),n.set(r,e.FTYP.byteLength),n},e}();o.types=void 0,o.HDLR_TYPES=void 0,o.STTS=void 0,o.STSC=void 0,o.STCO=void 0,o.STSZ=void 0,o.VMHD=void 0,o.SMHD=void 0,o.STSD=void 0,o.FTYP=void 0,o.DINF=void 0,t.default=o},
vendor: 14,713 bytes, line 2
2"./src/remux/mp4-remuxer.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return E})),r.d(t,"normalizePts",(function(){return T})),r.d(t,"flushTextTrackMetadataCueSamples",(function(){return S})),r.d(t,"flushTextTrackUserdataCueSamples",(function(){return D}));var n=r("./src/polyfills/number.ts"),o=r("./src/remux/aac-helper.ts"),l=r("./src/remux/mp4-generator.ts"),c=r("./src/events.ts"),d=r("./src/errors.ts"),f=r("./src/utils/logger.ts"),h=r("./src/types/loader.ts"),_=r("./src/utils/timescale-conversion.ts");function v(){return v=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},v.apply(this,arguments)}var m=null,y=null,E=function(){function e(e,t,r,n){if(void 0===n&&(n=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=t,this.typeSupported=r,this.ISGenerated=!1,null===m){var o=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);m=o?parseInt(o[1]):0}if(null===y){var l=navigator.userAgent.match(/Safari\/(\d+)/i);y=l?parseInt(l[1]):0}}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){f.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},t.resetNextTimestamp=function(){f.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},t.resetInitSegment=function(){f.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},t.getVideoStartPts=function(e){var t=!1,r=e.reduce((function(e,r){var n=r.pts-e;return n<-4294967296?(t=!0,T(e,r.pts)):n>0?e:r.pts}),e[0].pts);return t&&f.logger.debug("PTS rollover detected"),r},t.remux=function(e,t,r,n,o,l,c,d){var video,audio,_,text,v,m,y=o,E=o,L=e.pid>-1,I=t.pid>-1,A=t.samples.length,x=e.samples.length>0,M=c&&A>0||A>1;if((!L||x)&&(!I||M)||this.ISGenerated||c){this.ISGenerated||(_=this.generateIS(e,t,o));var k,w=this.isVideoContiguous,N=-1;if(M&&(N=function(e){for(var i=0;i<e.length;i++)if(e[i].key)return i;return-1}(t.samples),!w&&this.config.forceKeyFrameOnDiscontinuity))if(m=!0,N>0){f.logger.warn("[mp4-remuxer]: Dropped "+N+" out of "+A+" video samples due to a missing keyframe");var R=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(N),t.dropped+=N,k=E+=(t.samples[0].pts-R)/t.inputTimeScale}else-1===N&&(f.logger.warn("[mp4-remuxer]: No keyframe found out of "+A+" video samples"),m=!1);if(this.ISGenerated){if(x&&M){var O=this.getVideoStartPts(t.samples),C=(T(e.samples[0].pts,O)-O)/t.inputTimeScale;y+=Math.max(0,C),E+=Math.max(0,-C)}if(x){if(e.samplerate||(f.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),_=this.generateIS(e,t,o)),audio=this.remuxAudio(e,y,this.isAudioContiguous,l,I||M||d===h.PlaylistLevelType.AUDIO?E:void 0),M){var P=audio?audio.endPTS-audio.startPTS:0;t.inputTimeScale||(f.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),_=this.generateIS(e,t,o)),video=this.remuxVideo(t,E,w,P)}}else M&&(video=this.remuxVideo(t,E,w,0));video&&(video.firstKeyFrame=N,video.independent=-1!==N,video.firstKeyFramePTS=k)}}return this.ISGenerated&&(r.samples.length&&(v=S(r,o,this._initPTS,this._initDTS)),n.samples.length&&(text=D(n,o,this._initPTS))),{audio:audio,video:video,initSegment:_,independent:m,text:text,id3:v}},t.generateIS=function(e,t,r){var o,c,d,f=e.samples,h=t.samples,_=this.typeSupported,v={},m=!Object(n.isFiniteNumber)(this._initPTS),y="audio/mp4";if(m&&(o=c=1/0),e.config&&f.length&&(e.timescale=e.samplerate,"mp3"===e.segmentCodec&&(_.mpeg?(y="audio/mpeg",e.codec=""):_.mp3&&(e.codec="mp3")),v.audio={id:"audio",container:y,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&_.mpeg?new Uint8Array(0):l.default.initSegment([e]),metadata:{channelCount:e.channelCount}},m&&(d=e.inputTimeScale,o=c=f[0].pts-Math.round(d*r))),t.sps&&t.pps&&h.length&&(t.timescale=t.inputTimeScale,v.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:l.default.initSegment([t]),metadata:{width:t.width,height:t.height}},m)){d=t.inputTimeScale;var E=this.getVideoStartPts(h),S=Math.round(d*r);c=Math.min(c,T(h[0].dts,E)-S),o=Math.min(o,E-S)}if(Object.keys(v).length)return this.ISGenerated=!0,m&&(this._initPTS=o,this._initDTS=c),{tracks:v,initPTS:o,timescale:d}},t.remuxVideo=function(track,e,t,r){var n,o,h=track.inputTimeScale,E=track.samples,S=[],D=E.length,I=this._initPTS,A=this.nextAvcDts,x=8,M=this.videoSampleDuration,k=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,N=!1;t&&null!==A||(A=e*h-(E[0].pts-T(E[0].dts,E[0].pts)));for(var i=0;i<D;i++){var R=E[i];R.pts=T(R.pts-I,A),R.dts=T(R.dts-I,A),R.dts<E[i>0?i-1:i].dts&&(N=!0)}N&&E.sort((function(a,b){var e=a.dts-b.dts,t=a.pts-b.pts;return e||t})),n=E[0].dts;var O=(o=E[E.length-1].dts)-n,C=O?Math.round(O/(D-1)):M||track.inputTimeScale/30;if(t){var P=n-A,j=P>C;if(j||P<-1){j?f.logger.warn("AVC: "+Object(_.toMsFromMpegTsClock)(P,!0)+" ms ("+P+"dts) hole between fragments detected, filling it"):f.logger.warn("AVC: "+Object(_.toMsFromMpegTsClock)(-P,!0)+" ms ("+P+"dts) overlapping between fragments detected"),n=A;var F=E[0].pts-P;E[0].dts=n,E[0].pts=F,f.logger.log("Video: First PTS/DTS adjusted: "+Object(_.toMsFromMpegTsClock)(F,!0)+"/"+Object(_.toMsFromMpegTsClock)(n,!0)+", delta: "+Object(_.toMsFromMpegTsClock)(P,!0)+" ms")}}n=Math.max(0,n);for(var U=0,B=0,G=0;G<D;G++){for(var z=E[G],H=z.units,Y=H.length,V=0,W=0;W<Y;W++)V+=H[W].data.length;B+=V,U+=Y,z.length=V,z.dts=Math.max(z.dts,n),k=Math.min(z.pts,k),w=Math.max(z.pts,w)}o=E[D-1].dts;var Z,K=B+4*U+8;try{Z=new Uint8Array(K)}catch(e){return void this.observer.emit(c.Events.ERROR,c.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:K,reason:"fail allocating video mdat "+K})}var view=new DataView(Z.buffer);view.setUint32(0,K),Z.set(l.default.types.mdat,4);for(var Q=!1,X=Number.POSITIVE_INFINITY,J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY,ee=Number.NEGATIVE_INFINITY,te=0;te<D;te++){for(var ie=E[te],re=ie.units,ne=0,oe=0,ae=re.length;oe<ae;oe++){var se=re[oe],ue=se.data,le=se.data.byteLength;view.setUint32(x,le),x+=4,Z.set(ue,x),x+=le,ne+=4+le}var ce=void 0;if(te<D-1)M=E[te+1].dts-ie.dts,ce=E[te+1].pts-ie.pts;else{var de=this.config,fe=te>0?ie.dts-E[te-1].dts:C;if(ce=te>0?ie.pts-E[te-1].pts:C,de.stretchShortVideoTrack&&null!==this.nextAudioPts){var he=Math.floor(de.maxBufferHole*h),_e=(r?k+r*h:this.nextAudioPts)-ie.pts;_e>he?((M=_e-fe)<0?M=fe:Q=!0,f.logger.log("[mp4-remuxer]: It is approximately "+_e/90+" ms to the next segment; using duration "+M/90+" ms for the last video frame.")):M=fe}else M=fe}var ve=Math.round(ie.pts-ie.dts);X=Math.min(X,M),$=Math.max($,M),J=Math.min(J,ce),ee=Math.max(ee,ce),S.push(new L(ie.key,M,ne,ve))}if(S.length)if(m){if(m<70){var pe=S[0].flags;pe.dependsOn=2,pe.isNonSync=0}}else if(y&&ee-J<$-X&&C/$<.025&&0===S[0].cts){f.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var ge=n,me=0,ye=S.length;me<ye;me++){var be=ge+S[me].duration,Ee=ge+S[me].cts;if(me<ye-1){var Te=be+S[me+1].cts;S[me].duration=Te-Ee}else S[me].duration=me?S[me-1].duration:C;S[me].cts=0,ge=be}}console.assert(null!==M,"mp4SampleDuration must be computed"),M=Q||!M?C:M,this.nextAvcDts=A=o+M,this.videoSampleDuration=M,this.isVideoContiguous=!0;var data={data1:l.default.moof(track.sequenceNumber++,n,v({},track,{samples:S})),data2:Z,startPTS:k/h,endPTS:(w+M)/h,startDTS:n/h,endDTS:A/h,type:"video",hasAudio:!1,hasVideo:!0,nb:S.length,dropped:track.dropped};return track.samples=[],track.dropped=0,console.assert(Z.length,"MDAT length must not be zero"),data},t.remuxAudio=function(track,e,t,r,n){var h=track.inputTimeScale,_=h/(track.samplerate?track.samplerate:h),m="aac"===track.segmentCodec?1024:1152,y=m*_,E=this._initPTS,S="mp3"===track.segmentCodec&&this.typeSupported.mpeg,D=[],I=void 0!==n,A=track.samples,x=S?0:8,M=this.nextAudioPts||-1,k=e*h;if(this.isAudioContiguous=t=t||A.length&&M>0&&(r&&Math.abs(k-M)<9e3||Math.abs(T(A[0].pts-E,k)-M)<20*y),A.forEach((function(e){e.pts=T(e.pts-E,k)})),!t||M<0){if(A=A.filter((function(e){return e.pts>=0})),!A.length)return;M=0===n?0:r&&!I?Math.max(0,k):A[0].pts}if("aac"===track.segmentCodec)for(var w=this.config.maxAudioFramesDrift,i=0,N=M;i<A.length;i++){var R=A[i],O=R.pts,C=O-N,P=Math.abs(1e3*C/h);if(C<=-w*y&&I)0===i&&(f.logger.warn("Audio frame @ "+(O/h).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*C/h)+" ms."),this.nextAudioPts=M=N=O);else if(C>=w*y&&P<1e4&&I){var j=Math.round(C/y);(N=O-j*y)<0&&(j--,N+=y),0===i&&(this.nextAudioPts=M=N),f.logger.warn("[mp4-remuxer]: Injecting "+j+" audio frame @ "+(N/h).toFixed(3)+"s due to "+Math.round(1e3*C/h)+" ms gap.");for(var F=0;F<j;F++){var U=Math.max(N,0),B=o.default.getSilentFrame(track.manifestCodec||track.codec,track.channelCount);B||(f.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),B=R.unit.subarray()),A.splice(i,0,{unit:B,pts:U}),N+=y,i++}}R.pts=N,N+=y}for(var G,z=null,H=null,Y=0,V=A.length;V--;)Y+=A[V].unit.byteLength;for(var W=0,Z=A.length;W<Z;W++){var K=A[W],Q=K.unit,X=K.pts;if(null!==H)D[W-1].duration=Math.round((X-H)/_);else{if(t&&"aac"===track.segmentCodec&&(X=M),z=X,!(Y>0))return;Y+=x;try{G=new Uint8Array(Y)}catch(e){return void this.observer.emit(c.Events.ERROR,c.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Y,reason:"fail allocating audio mdat "+Y})}S||(new DataView(G.buffer).setUint32(0,Y),G.set(l.default.types.mdat,4))}G.set(Q,x);var J=Q.byteLength;x+=J,D.push(new L(!0,m,J,0)),H=X}var $=D.length;if($){var ee=D[D.length-1];this.nextAudioPts=M=H+_*ee.duration;var te=S?new Uint8Array(0):l.default.moof(track.sequenceNumber++,z/_,v({},track,{samples:D}));track.samples=[];var ie=z/h,re=M/h,ne={data1:te,data2:G,startPTS:ie,endPTS:re,startDTS:ie,endDTS:re,type:"audio",hasAudio:!0,hasVideo:!1,nb:$};return this.isAudioContiguous=!0,console.assert(G.length,"MDAT length must not be zero"),ne}},t.remuxEmptyAudio=function(track,e,t,r){var n=track.inputTimeScale,l=n/(track.samplerate?track.samplerate:n),c=this.nextAudioPts,d=(null!==c?c:r.startDTS*n)+this._initDTS,h=r.endDTS*n+this._initDTS,_=1024*l,v=Math.ceil((h-d)/_),m=o.default.getSilentFrame(track.manifestCodec||track.codec,track.channelCount);if(f.logger.warn("[mp4-remuxer]: remux empty Audio"),m){for(var y=[],i=0;i<v;i++){var E=d+i*_;y.push({unit:m,pts:E,dts:E})}return track.samples=y,this.remuxAudio(track,e,t,!1)}f.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},e}();function T(e,t){var r;if(null===t)return e;for(r=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=r;return e}function S(track,e,t,r){var n=track.samples.length;if(n){for(var o=track.inputTimeScale,l=0;l<n;l++){var c=track.samples[l];c.pts=T(c.pts-t,e*o)/o,c.dts=T(c.dts-r,e*o)/o}var d=track.samples;return track.samples=[],{samples:d}}}function D(track,e,t){var r=track.samples.length;if(r){for(var n=track.inputTimeScale,o=0;o<r;o++){var l=track.samples[o];l.pts=T(l.pts-t,e*n)/n}track.samples.sort((function(a,b){return a.pts-b.pts}));var c=track.samples;return track.samples=[],{samples:c}}}var L=function(e,t,r,n){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=r,this.cts=n,this.flags=new I(e)},I=function(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}},"./src/remux/passthrough-remuxer.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/polyfills/number.ts"),o=r("./src/remux/mp4-remuxer.ts"),l=r("./src/utils/mp4-tools.ts"),c=r("./src/loader/fragment.ts"),d=r("./src/utils/logger.ts"),f=function(){function e(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndTime=null}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndTime=null},t.resetNextTimestamp=function(){this.lastEndTime=null},t.resetInitSegment=function(e,t,r){this.audioCodec=t,this.videoCodec=r,this.generateInitSegment(e),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,r=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var n=this.initData=Object(l.parseInitSegment)(e);t||(t=h(n.audio,c.ElementaryStreamTypes.AUDIO)),r||(r=h(n.video,c.ElementaryStreamTypes.VIDEO));var o={};n.audio&&n.video?o.audiovideo={container:"video/mp4",codec:t+","+r,initSegment:e,id:"main"}:n.audio?o.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:n.video?o.video={container:"video/mp4",codec:r,initSegment:e,id:"main"}:d.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=o},t.remux=function(e,t,r,c,f){var h,_=this.initPTS,v=this.lastEndTime,m={audio:void 0,video:void 0,text:c,id3:r,initSegment:void 0};Object(n.isFiniteNumber)(v)||(v=this.lastEndTime=f||0);var data=t.samples;if(!data||!data.length)return m;var y={initPTS:void 0,timescale:1},E=this.initData;if(E&&E.length||(this.generateInitSegment(data),E=this.initData),!E||!E.length)return d.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),m;this.emitInitSegment&&(y.tracks=this.initTracks,this.emitInitSegment=!1);var T=Object(l.getStartDTS)(E,data);Object(n.isFiniteNumber)(_)||(this.initPTS=y.initPTS=_=T-f);var S=Object(l.getDuration)(data,E),D=e?T-_:v,L=D+S;Object(l.offsetStartDTS)(E,data,_),S>0?this.lastEndTime=L:(d.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var I=!!E.audio,A=!!E.video,x="";I&&(x+="audio"),A&&(x+="video");var track={data1:data,startPTS:D,startDTS:D,endPTS:L,endDTS:L,type:x,hasAudio:I,hasVideo:A,nb:1,dropped:0};m.audio="audio"===track.type?track:void 0,m.video="audio"!==track.type?track:void 0,m.initSegment=y;var M=null!=(h=this.initPTS)?h:0;return m.id3=Object(o.flushTextTrackMetadataCueSamples)(r,f,M,M),c.samples.length&&(m.text=Object(o.flushTextTrackUserdataCueSamples)(c,f,M)),m},e}();function h(track,e){var t=null==track?void 0:track.codec;return t&&t.length>4?t:"hvc1"===t||"hev1"===t?"hvc1.1.c.L120.90":"av01"===t?"av01.0.04M.08":"avc1"===t||e===c.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}t.default=f},
vendor: 1,195 bytes, line 2
2"./src/task-loop.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return n}));var n=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}()},
2"./src/types/cmcd.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"CMCDVersion",(function(){return c})),r.d(t,"CMCDObjectType",(function(){return n})),r.d(t,"CMCDStreamingFormat",(function(){return o})),r.d(t,"CMCDStreamType",(function(){return l}));var n,o,l,c=1;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(n||(n={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(o||(o={})),function(e){e.VOD="v",e.LIVE="l"}(l||(l={}))},
2"./src/types/demuxer.ts":function(e,t,r){"use strict";var n;r.r(t),r.d(t,"MetadataSchema",(function(){return n})),function(e){e.audioId3="org.id3",e.dateRange="com.apple.quicktime.HLS",e.emsg="https://aomedia.org/emsg/ID3"}(n||(n={}))},
vendor: 2,230 bytes, line 2
2"./src/types/level.ts":function(e,t,r){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o;function l(details,e){var t=details.canSkipUntil,r=details.canSkipDateRanges,n=details.endSN;return t&&(void 0!==e?e-n:0)<t?r?o.v2:o.Yes:o.No}r.r(t),r.d(t,"HlsSkip",(function(){return o})),r.d(t,"getSkipValue",(function(){return l})),r.d(t,"HlsUrlParameters",(function(){return c})),r.d(t,"Level",(function(){return d})),function(e){e.No="",e.Yes="YES",e.v2="v2"}(o||(o={}));var c=function(){function e(e,t,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=r}return e.prototype.addDirectives=function(e){var t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.toString()},e}(),d=function(){function e(data){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[data.url],this.attrs=data.attrs,this.bitrate=data.bitrate,data.details&&(this.details=data.details),this.id=data.id||0,this.name=data.name,this.width=data.width||0,this.height=data.height||0,this.audioCodec=data.audioCodec,this.videoCodec=data.videoCodec,this.unknownCodecs=data.unknownCodecs,this.codecSet=[data.videoCodec,data.audioCodec].filter((function(e){return e})).join(",").replace(/\.[^.,]+/g,"")}var t,r,o;return t=e,(r=[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(e){var t=e%this.url.length;this._urlId!==t&&(this.details=void 0,this._urlId=t)}}])&&n(t.prototype,r),o&&n(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}()},
2"./src/types/loader.ts":function(e,t,r){"use strict";var n,o;r.r(t),r.d(t,"PlaylistContextType",(function(){return n})),r.d(t,"PlaylistLevelType",(function(){return o})),function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(n||(n={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(o||(o={}))},
2"./src/types/transmuxer.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"ChunkMetadata",(function(){return n}));var n=function(e,t,r,n,o,l){void 0===n&&(n=0),void 0===o&&(o=-1),void 0===l&&(l=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=r,this.size=n,this.part=o,this.partial=l}},
vendor: 2,690 bytes, line 2
2"./src/utils/attr-list.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"AttrList",(function(){return l}));var n=/^(\d+)x(\d+)$/,o=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,l=function(){function e(t){for(var r in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(r)&&(this[r]=t[r])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var r=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)r[i]=parseInt(t.slice(2*i,2*i+2),16);return r}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var r=this[e];return r?parseFloat(r):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=n.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(input){var e,t={};for(o.lastIndex=0;null!==(e=o.exec(input));){var r=e[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),t[e[1]]=r}return t},e}()},"./src/utils/binary-search.ts":function(e,t,r){"use strict";r.r(t),t.default={search:function(e,t){for(var r=0,n=e.length-1,o=null,l=null;r<=n;){var c=t(l=e[o=(r+n)/2|0]);if(c>0)r=o+1;else{if(!(c<0))return l;n=o-1}}return null}}},"./src/utils/buffer-helper.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"BufferHelper",(function(){return l}));var n=r("./src/utils/logger.ts"),o={length:0,start:function(){return 0},end:function(){return 0}},l=function(){function e(){}return e.isBuffered=function(t,r){try{if(t)for(var n=e.getBuffered(t),i=0;i<n.length;i++)if(r>=n.start(i)&&r<=n.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,r,n){try{if(t){var i,o=e.getBuffered(t),l=[];for(i=0;i<o.length;i++)l.push({start:o.start(i),end:o.end(i)});return this.bufferedInfo(l,r,n)}}catch(e){}return{len:0,start:r,end:r,nextStart:void 0}},e.bufferedInfo=function(e,t,r){t=Math.max(0,t),e.sort((function(a,b){var e=a.start-b.start;return e||b.end-a.end}));var n=[];if(r)for(var i=0;i<e.length;i++){var o=n.length;if(o){var l=n[o-1].end;e[i].start-l<r?e[i].end>l&&(n[o-1].end=e[i].end):n.push(e[i])}else n.push(e[i])}else n=e;for(var c,d=0,f=t,h=t,_=0;_<n.length;_++){var v=n[_].start,m=n[_].end;if(t+r>=v&&t<m)f=v,d=(h=m)-t;else if(t+r<v){c=v;break}}return{len:d,start:f||0,end:h||0,nextStart:c}},e.getBuffered=function(e){try{return e.buffered}catch(e){return n.logger.log("failed to get media.buffered",e),o}},e}()},
vendor: 6,609 bytes, line 2
2"./src/utils/cea-608-parser.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"Row",(function(){return L})),r.d(t,"CaptionScreen",(function(){return I}));var n,o=r("./src/utils/logger.ts"),l={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},c=function(e){var t=e;return l.hasOwnProperty(e)&&(t=l[e]),String.fromCharCode(t)},d=15,f=100,h={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},_={17:2,18:4,21:6,22:8,23:10,19:13,20:15},v={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},m={25:2,26:4,29:6,30:8,31:10,27:13,28:15},y=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(n||(n={}));var E=function(){function e(){this.time=null,this.verboseLevel=n.ERROR}return e.prototype.log=function(e,t){this.verboseLevel>=e&&o.logger.log(this.time+" ["+e+"] "+t)},e}(),T=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].toString(16));return t},S=function(){function e(e,t,r,n,o){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=r||!1,this.background=n||"black",this.flash=o||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],i=0;i<t.length;i++){var style=t[i];e.hasOwnProperty(style)&&(this[style]=e[style])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),D=function(){function e(e,t,r,n,o,l){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new S(t,r,n,o,l)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),L=function(){function e(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var i=0;i<f;i++)this.chars.push(new D);this.logger=e,this.pos=0,this.currPenState=new S}var t=e.prototype;return t.equals=function(e){for(var t=!0,i=0;i<f;i++)if(!this.chars[i].equals(e.chars[i])){t=!1;break}return t},t.copy=function(e){for(var i=0;i<f;i++)this.chars[i].copy(e.chars[i])},t.isEmpty=function(){for(var e=!0,i=0;i<f;i++)if(!this.chars[i].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(n.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>f&&(this.logger.log(n.DEBUG,"Too large cursor position "+this.pos),this.pos=f)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var i=this.pos+1;i<t+1;i++)this.chars[i].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){e>=144&&this.backSpace();var t=c(e);this.pos>=f?this.logger.log(n.ERROR,"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var i;for(i=e;i<f;i++)this.chars[i].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,i=0;i<f;i++){var r=this.chars[i].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),I=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var i=0;i<d;i++)this.rows.push(new L(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var i=0;i<d;i++)this.rows[i].clear();this.currRow=14},t.equals=function(e){for(var t=!0,i=0;i<d;i++)if(!this.rows[i].equals(e.rows[i])){t=!1;break}return t},t.copy=function(e){for(var i=0;i<d;i++)this.rows[i].copy(e.rows[i])},t.isEmpty=function(){for(var e=!0,i=0;i<d;i++)if(!this.rows[i].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(n.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(n.INFO,"pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var i=0;i<d;i++)this.rows[i].clear();var r=this.currRow+1-this.nrRollUpRows,o=this.lastOutputScreen;if(o){var l=o.rows[r].cueStartTime,time=this.logger.time;if(l&&null!==time&&l<time)for(var c=0;c<this.nrRollUpRows;
vendor: 6,357 bytes, line 2
2c++)this.rows[t-this.nrRollUpRows+c+1].copy(o.rows[r+c])}}this.currRow=t;var f=this.rows[this.currRow];if(null!==e.indent){var h=e.indent,_=Math.max(h-1,0);f.setCursor(e.indent),e.color=f.chars[_].penState.foreground}var v={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(v)},t.setBkgData=function(e){this.logger.log(n.INFO,"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){if(null!==this.nrRollUpRows){this.logger.log(n.TEXT,this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(n.INFO,"Rolling up")}else this.logger.log(n.DEBUG,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],text="",r=-1,i=0;i<d;i++){var n=this.rows[i].getTextString();n&&(r=i+1,e?t.push("Row "+r+": '"+n+"'"):t.push(n.trim()))}return t.length>0&&(text=e?"["+t.join(" | ")+"]":t.join("\n")),text},t.getTextAndFormat=function(){return this.rows},e}(),A=function(){function e(e,t,r){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new I(r),this.nonDisplayedMemory=new I(r),this.lastOutputScreen=new I(r),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(n.INFO,"MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var i=0;i<e.length;i++)this.writeScreen.insertChar(e[i]);var t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(n.INFO,t+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(n.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(n.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(n.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){this.logger.log(n.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(n.INFO,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(n.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(n.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(n.INFO,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(n.INFO,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(n.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(n.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(n.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(this.logger.log(n.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(n.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(n.INFO,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var r=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}this.logger.log(n.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var time=this.logger.time;null!==time&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,time,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:time):this.cueStartTime=time,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),x=function(){function e(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var n=new E;this.channels=[null,new A(e,t,n),new A(e+1,r,n)],this.cmdHistory={a:null,b:null},this.logger=n}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(time,e){var t,a,b,r=!1;this.logger.time=time;for(var i=0;i<e.length;i+=2)if(a=127&e[i],b=127&e[i+1],0!==a||0!==b){if(this.logger.log(n.DATA,"["+T([e[i],e[i+1]])+"] -> ("+T([a,b])+")"),(t=this.parseCmd(a,b))||(t=this.parseMidrow(a,b)),t||(t=this.parsePAC(a,b)),t||(t=this.parseBackgroun
vendor: 2,959 bytes, line 2
2dAttributes(a,b)),!t&&(r=this.parseChars(a,b))){var o=this.currentChannel;o&&o>0?this.channels[o].insertChars(r):this.logger.log(n.WARNING,"No channel found yet. TEXT-MODE?")}t||r||this.logger.log(n.WARNING,"Couldn't parse cleaned data "+T([a,b])+" orig: "+T([e[i],e[i+1]]))}},t.parseCmd=function(a,b){var e=this.cmdHistory;if(!((20===a||28===a||21===a||29===a)&&b>=32&&b<=47||(23===a||31===a)&&b>=33&&b<=35))return!1;if(k(a,b,e))return M(null,null,e),this.logger.log(n.DEBUG,"Repeated command ("+T([a,b])+") is dropped"),!0;var t=20===a||21===a||23===a?1:2,r=this.channels[t];return 20===a||21===a||28===a||29===a?32===b?r.ccRCL():33===b?r.ccBS():34===b?r.ccAOF():35===b?r.ccAON():36===b?r.ccDER():37===b?r.ccRU(2):38===b?r.ccRU(3):39===b?r.ccRU(4):40===b?r.ccFON():41===b?r.ccRDC():42===b?r.ccTR():43===b?r.ccRTD():44===b?r.ccEDM():45===b?r.ccCR():46===b?r.ccENM():47===b&&r.ccEOC():r.ccTO(b-32),M(a,b,e),this.currentChannel=t,!0},t.parseMidrow=function(a,b){var e=0;if((17===a||25===a)&&b>=32&&b<=47){if((e=17===a?1:2)!==this.currentChannel)return this.logger.log(n.ERROR,"Mismatch channel in midrow parsing"),!1;var t=this.channels[e];return!!t&&(t.ccMIDROW(b),this.logger.log(n.DEBUG,"MIDROW ("+T([a,b])+")"),!0)}return!1},t.parsePAC=function(a,b){var e,t=this.cmdHistory;if(!((a>=17&&a<=23||a>=25&&a<=31)&&b>=64&&b<=127||(16===a||24===a)&&b>=64&&b<=95))return!1;if(k(a,b,t))return M(null,null,t),!0;var r=a<=23?1:2;e=b>=64&&b<=95?1===r?h[a]:v[a]:1===r?_[a]:m[a];var n=this.channels[r];return!!n&&(n.setPAC(this.interpretPAC(e,b)),M(a,b,t),this.currentChannel=r,!0)},t.interpretPAC=function(e,t){var r,n={color:null,italics:!1,indent:null,underline:!1,row:e};return r=t>95?t-96:t-64,n.underline=1==(1&r),r<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(n.italics=!0,n.color="white"):n.indent=4*Math.floor((r-16)/2),n},t.parseChars=function(a,b){var e,t,r=null,o=null;if(a>=25?(e=2,o=a-8):(e=1,o=a),o>=17&&o<=19?(t=17===o?b+80:18===o?b+112:b+144,this.logger.log(n.INFO,"Special char '"+c(t)+"' in channel "+e),r=[t]):a>=32&&a<=127&&(r=0===b?[a]:[a,b]),r){var l=T(r);this.logger.log(n.DEBUG,"Char codes =  "+l.join(",")),M(a,b,this.cmdHistory)}return r},t.parseBackgroundAttributes=function(a,b){var e;if(!((16===a||24===a)&&b>=32&&b<=47||(23===a||31===a)&&b>=45&&b<=47))return!1;var t={};16===a||24===a?(e=Math.floor((b-32)/2),t.background=y[e],b%2==1&&(t.background=t.background+"_semi")):45===b?t.background="transparent":(t.foreground="black",47===b&&(t.underline=!0));var r=a<=23?1:2;return this.channels[r].setBkgData(t),M(a,b,this.cmdHistory),!0},t.reset=function(){for(var i=0;i<Object.keys(this.channels).length;i++){var e=this.channels[i];e&&e.reset()}this.cmdHistory={a:null,b:null}},t.cueSplitAtTime=function(e){for(var i=0;i<this.channels.length;i++){var t=this.channels[i];t&&t.cueSplitAtTime(e)}},e}();function M(a,b,e){e.a=a,e.b=b}function k(a,b,e){return e.a===a&&e.b===b}t.default=x},
2"./src/utils/codecs.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"isCodecType",(function(){return o})),r.d(t,"isCodecSupportedInMp4",(function(){return l}));var n={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function o(e,t){var r=n[t];return!!r&&!0===r[e.slice(0,4)]}function l(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}},
vendor: 5,059 bytes, line 2
2"./src/utils/cues.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/utils/vttparser.ts"),o=r("./src/utils/webvtt-parser.ts"),l=r("./src/utils/texttrack-utils.ts"),c=/\s/,d={newCue:function(track,e,t,r){for(var d,f,h,_,text,v=[],m=self.VTTCue||self.TextTrackCue,y=0;y<r.rows.length;y++)if(h=!0,_=0,text="",!(d=r.rows[y]).isEmpty()){for(var E=0;E<d.chars.length;E++)c.test(d.chars[E].uchar)&&h?_++:(text+=d.chars[E].uchar,h=!1);d.cueStartTime=e,e===t&&(t+=1e-4),_>=16?_--:_++;var T=Object(n.fixLineBreaks)(text.trim()),S=Object(o.generateCueId)(e,t,T);track&&track.cues&&track.cues.getCueById(S)||((f=new m(e,t,T)).id=S,f.line=y+1,f.align="left",f.position=10+Math.min(80,10*Math.floor(8*_/32)),v.push(f))}return track&&v.length&&(v.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),v.forEach((function(e){return Object(l.addCueToTrack)(track,e)}))),v}};t.default=d},"./src/utils/discontinuities.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"findFirstFragWithCC",(function(){return c})),r.d(t,"shouldAlignOnDiscontinuities",(function(){return d})),r.d(t,"findDiscontinuousReferenceFrag",(function(){return f})),r.d(t,"adjustSlidingStart",(function(){return _})),r.d(t,"alignStream",(function(){return v})),r.d(t,"alignPDT",(function(){return m})),r.d(t,"alignFragmentByPDTDelta",(function(){return y})),r.d(t,"alignMediaPlaylistByPDT",(function(){return E}));var n=r("./src/polyfills/number.ts"),o=r("./src/utils/logger.ts"),l=r("./src/controller/level-helper.ts");function c(e,t){for(var r=null,i=0,n=e.length;i<n;i++){var o=e[i];if(o&&o.cc===t){r=o;break}}return r}function d(e,t,details){return!(!t.details||!(details.endCC>details.startCC||e&&e.cc<details.startCC))}function f(e,t){var r=e.fragments,n=t.fragments;if(n.length&&r.length){var l=c(r,n[0].cc);if(l&&(!l||l.startPTS))return l;o.logger.log("No frag in previous level to align on")}else o.logger.log("No fragments to align")}function h(e,t){if(e){var r=e.start+t;e.start=e.startPTS=r,e.endPTS=r+e.duration}}function _(e,details){for(var t=details.fragments,i=0,r=t.length;i<r;i++)h(t[i],e);details.fragmentHint&&h(details.fragmentHint,e),details.alignedSliding=!0}function v(e,t,details){t&&(function(e,details,t){if(d(e,t,details)){var r=f(t.details,details);r&&Object(n.isFiniteNumber)(r.start)&&(o.logger.log("Adjusting PTS using last level due to CC increase within current level "+details.url),_(r.start,details))}}(e,details,t),!details.alignedSliding&&t.details&&m(details,t.details),details.alignedSliding||!t.details||details.skippedSegments||Object(l.adjustSliding)(t.details,details))}function m(details,e){if(e.fragments.length&&details.hasProgramDateTime&&e.hasProgramDateTime){var t=e.fragments[0].programDateTime,r=details.fragments[0].programDateTime,l=(r-t)/1e3+e.fragments[0].start;l&&Object(n.isFiniteNumber)(l)&&(o.logger.log("Adjusting PTS using programDateTime delta "+(r-t)+"ms, sliding:"+l.toFixed(3)+" "+details.url+" "),_(l,details))}}function y(e,t){var r=e.programDateTime;if(r){var n=(r-t)/1e3;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function E(details,e){if(e.fragments.length&&details.hasProgramDateTime&&e.hasProgramDateTime){var t=e.fragments[0].programDateTime-1e3*e.fragments[0].start;details.fragments.forEach((function(e){y(e,t)})),details.fragmentHint&&y(details.fragmentHint,t),details.alignedSliding=!0}}},"./src/utils/ewma-bandwidth-estimator.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/utils/ewma.ts"),o=function(){function e(e,t,r){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new n.default(e),this.fast_=new n.default(t)}var t=e.prototype;return t.update=function(e,t){var r=this.slow_,o=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new n.default(e,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==t&&(this.fast_=new n.default(t,o.getEstimate(),o.getTotalWeight()))},t.sample=function(e,t){var r=(e=Math.max(e,this.minDelayMs_))/1e3,n=8*t/r;this.fast_.sample(r,n),this.slow_.sample(r,n)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();t.default=o},"./src/utils/ewma.ts":function(e,t,r){"use strict";r.r(t);var n=function(){function e(e,t,r){void 0===t&&(t=0),void 0===r&&(r=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_=r}var t=e.prototype;return t.sample=function(e,t){var r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}();t.default=n},
vendor: 4,613 bytes, line 2
2"./src/utils/fetch-loader.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"fetchSupported",(function(){return m}));var n=r("./src/polyfills/number.ts"),o=r("./src/loader/load-stats.ts"),l=r("./src/demux/chunk-cache.ts");function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,_(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,e)},c(e)}function d(e,t,r){return d=f()?Reflect.construct.bind():function(e,t,r){var a=[null];a.push.apply(a,t);var n=new(Function.bind.apply(e,a));return r&&h(n,r.prototype),n},d.apply(null,arguments)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function h(e,p){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},h(e,p)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},v.apply(this,arguments)}function m(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}var y=function(){function e(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||E,this.controller=new self.AbortController,this.stats=new o.LoadStats}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},t.abortInternal=function(){var e=this.response;e&&e.ok||(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},t.load=function(e,t,r){var o=this,l=this.stats;if(l.loading.start)throw new Error("Loader can only be used once.");l.loading.start=self.performance.now();var c=function(e,t){var r={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(v({},e.headers))};return e.rangeEnd&&r.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),r}(e,this.controller.signal),d=r.onProgress,f="arraybuffer"===e.responseType,h=f?"byteLength":"length";this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,c),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){o.abortInternal(),r.onTimeout(l,e,o.response)}),t.timeout),self.fetch(this.request).then((function(r){if(o.response=o.loader=r,!r.ok){var c=r.status,h=r.statusText;throw new T(h||"fetch, bad network response",c,r)}return l.loading.first=Math.max(self.performance.now(),l.loading.start),l.total=parseInt(r.headers.get("Content-Length")||"0"),d&&Object(n.isFiniteNumber)(t.highWaterMark)?o.loadProgressively(r,l,e,t.highWaterMark,d):f?r.arrayBuffer():r.text()})).then((function(c){var f=o.response;self.clearTimeout(o.requestTimeout),l.loading.end=Math.max(self.performance.now(),l.loading.first),l.loaded=l.total=c[h];var _={url:f.url,data:c};d&&!Object(n.isFiniteNumber)(t.highWaterMark)&&d(l,e,c,f),r.onSuccess(_,l,e,f)})).catch((function(t){if(self.clearTimeout(o.requestTimeout),!l.aborted){var code=t&&t.code||0,text=t?t.message:null;r.onError({code:code,text:text},e,t?t.details:null)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.loadProgressively=function(e,t,r,n,o){void 0===n&&(n=0);var c=new l.default,d=e.body.getReader();return function l(){return d.read().then((function(data){if(data.done)return c.dataLength&&o(t,r,c.flush(),e),Promise.resolve(new ArrayBuffer(0));var d=data.value,f=d.length;return t.loaded+=f,f<n||c.dataLength?(c.push(d),c.dataLength>=n&&o(t,r,c.flush(),e)):o(t,r,d,e),l()})).catch((function(){return Promise.reject()}))}()},e}();
2function E(e,t){return new self.Request(e.url,t)}var T=function(e){var t,r;function n(t,code,details){var r;return(r=e.call(this,t)||this).code=void 0,r.details=void 0,r.code=code,r.details=details,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,h(t,r),n}(c(Error));t.default=y},
2"./src/utils/imsc1-ttml-parser.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"IMSC1_CODEC",(function(){return _})),r.d(t,"parseIMSC1",(function(){return E}));var n=r("./src/utils/mp4-tools.ts"),o=r("./src/utils/vttparser.ts"),l=r("./src/utils/vttcue.ts"),c=r("./src/demux/id3.ts"),d=r("./src/utils/timescale-conversion.ts"),f=r("./src/utils/webvtt-parser.ts");function h(){return h=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},h.apply(this,arguments)}var _="stpp.ttml.im1t",v=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,m=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,y={left:"start",center:"center",right:"end",start:"start",end:"end"};function E(e,t,r,o,_){var v=Object(n.findBox)(new Uint8Array(e),["mdat"]);if(0!==v.length){var m=v.map((function(e){return Object(c.utf8ArrayToStr)(e)})),E=Object(d.toTimescaleFromScale)(t,1,r);try{m.forEach((function(e){return o(function(e,t){var r=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");var n={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},o=Object.keys(n).reduce((function(e,t){return e[t]=r.getAttribute("ttp:"+t)||n[t],e}),{}),c="preserve"!==r.getAttribute("xml:space"),d=S(T(r,"styling","style")),_=S(T(r,"layout","region")),v=T(r,"body","[begin]");return[].map.call(v,(function(e){var r=D(e,c);if(!r||!e.hasAttribute("begin"))return null;var n=A(e.getAttribute("begin"),o),v=A(e.getAttribute("dur"),o),m=A(e.getAttribute("end"),o);if(null===n)throw I(e);if(null===m){if(null===v)throw I(e);m=n+v}var E=new l.default(n-t,m-t,r);E.id=Object(f.generateCueId)(E.startTime,E.endTime,E.text);var T=_[e.getAttribute("region")],style=d[e.getAttribute("style")];E.position=10,E.size=80;var S=function(e,style,t){var r="http://www.w3.org/ns/ttml#styling",n=null,o=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],l=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;return l&&t.hasOwnProperty(l)&&(n=t[l]),o.reduce((function(t,o){var l=L(style,r,o)||L(e,r,o)||L(n,r,o);return l&&(t[o]=l),t}),{})}(T,style,d),x=S.textAlign;if(x){var M=y[x];M&&(E.lineAlign=M),E.align=x}return h(E,S),E})).filter((function(e){return null!==e}))}(e,E))}))}catch(e){_(e)}}else _(new Error("Could not parse IMSC1 mdat"))}function T(e,t,r){var n=e.getElementsByTagName(t)[0];return n?[].slice.call(n.querySelectorAll(r)):[]}function S(e){return e.reduce((function(e,element){var t=element.getAttribute("xml:id");return t&&(e[t]=element),e}),{})}function D(element,e){return[].slice.call(element.childNodes).reduce((function(t,r,i){var n;return"br"===r.nodeName&&i?t+"\n":null!==(n=r.childNodes)&&void 0!==n&&n.length?D(r,e):e?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent}),"")}function L(element,e,t){return element&&element.hasAttributeNS(e,t)?element.getAttributeNS(e,t):null}function I(e){return new Error("Could not parse ttml timestamp "+e)}function A(e,t){if(!e)return null;var r=Object(o.parseTimeStamp)(e);return null===r&&(v.test(e)?r=function(e,t){var r=v.exec(e),n=(0|r[4])+(0|r[5])/t.subFrameRate;return 3600*(0|r[1])+60*(0|r[2])+(0|r[3])+n/t.frameRate}(e,t):m.test(e)&&(r=function(e,t){var r=m.exec(e),n=Number(r[1]);switch(r[2]){case"h":return 3600*n;case"m":return 60*n;case"ms":return 1e3*n;case"f":return n/t.frameRate;case"t":return n/t.tickRate}return n}(e,t))),r}},
vendor: 585 bytes, line 2
2"./src/utils/logger.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"enableLogs",(function(){return d})),r.d(t,"logger",(function(){return f}));var n=function(){},o={trace:n,debug:n,log:n,warn:n,info:n,error:n},l=o;function c(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):n}function d(e){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];r.forEach((function(t){l[t]=e[t]?e[t].bind(e):c(t)}))}(e,"debug","log","info","warn","error");try{l.log()}catch(e){l=o}}else l=o}var f=o},
2"./src/utils/mediakeys-helper.ts":function(e,t,r){"use strict";var n;r.r(t),r.d(t,"KeySystems",(function(){return n})),r.d(t,"requestMediaKeySystemAccess",(function(){return o})),function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(n||(n={}));var o="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null},
2"./src/utils/mediasource-helper.ts":function(e,t,r){"use strict";function n(){return self.MediaSource||self.WebKitMediaSource}r.r(t),r.d(t,"getMediaSource",(function(){return n}))},
vendor: 7,974 bytes, line 2
2"./src/utils/mp4-tools.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"RemuxerTrackIdConfig",(function(){return f})),r.d(t,"bin2str",(function(){return h})),r.d(t,"readUint16",(function(){return _})),r.d(t,"readUint32",(function(){return v})),r.d(t,"readSint32",(function(){return m})),r.d(t,"writeUint32",(function(){return y})),r.d(t,"findBox",(function(){return E})),r.d(t,"parseSegmentIndex",(function(){return T})),r.d(t,"parseInitSegment",(function(){return S})),r.d(t,"getStartDTS",(function(){return D})),r.d(t,"getDuration",(function(){return L})),r.d(t,"computeRawDurationFromSamples",(function(){return I})),r.d(t,"offsetStartDTS",(function(){return A})),r.d(t,"segmentValidRange",(function(){return x})),r.d(t,"appendUint8Array",(function(){return M})),r.d(t,"parseSamples",(function(){return k})),r.d(t,"parseSEIMessageFromNALu",(function(){return N})),r.d(t,"parseEmsg",(function(){return R}));var n=r("./src/utils/typed-array.ts"),o=r("./src/loader/fragment.ts"),l=r("./src/demux/id3.ts"),c=Math.pow(2,32)-1,d=[].push,f={video:1,audio:2,id3:3,text:4};function h(data){return String.fromCharCode.apply(null,data)}function _(e,t){var r=e[t]<<8|e[t+1];return r<0?65536+r:r}function v(e,t){var r=m(e,t);return r<0?4294967296+r:r}function m(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function y(e,t,r){e[t]=r>>24,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function E(data,path){var e=[];if(!path.length)return e;for(var t=data.byteLength,i=0;i<t;){var r=v(data,i),n=r>1?i+r:t;if(h(data.subarray(i+4,i+8))===path[0])if(1===path.length)e.push(data.subarray(i+8,n));else{var o=E(data.subarray(i+8,n),path.slice(1));o.length&&d.apply(e,o)}i=n}return e}function T(e){var t=[],r=e[0],n=8,o=v(e,n);n+=4,n+=0===r?8:16,n+=2;var l=e.length+0,c=_(e,n);n+=2;for(var i=0;i<c;i++){var d=n,f=v(e,d);d+=4;var h=2147483647&f;if(1==(2147483648&f)>>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var m=v(e,d);d+=4,t.push({referenceSize:h,subsegmentDuration:m,info:{duration:m/o,start:l,end:l+h-1}}),l+=h,n=d+=4}return{earliestPresentationTime:0,timescale:o,version:r,referencesCount:c,references:t}}function S(e){for(var t=[],r=E(e,["moov","trak"]),i=0;i<r.length;i++){var n=r[i],l=E(n,["tkhd"])[0];if(l){var c=l[0],d=0===c?12:20,f=v(l,d),_=E(n,["mdia","mdhd"])[0];if(_){var m=v(_,d=0===(c=_[0])?12:20),y=E(n,["mdia","hdlr"])[0];if(y){var T=h(y.subarray(8,12)),S={soun:o.ElementaryStreamTypes.AUDIO,vide:o.ElementaryStreamTypes.VIDEO}[T];if(S){var D=E(n,["mdia","minf","stbl","stsd"])[0],L=void 0;D&&(L=h(D.subarray(12,16))),t[f]={timescale:m,type:S},t[S]={timescale:m,id:f,codec:L}}}}}}return E(e,["moov","mvex","trex"]).forEach((function(e){var r=v(e,4),track=t[r];track&&(track.default={duration:v(e,12),flags:v(e,20)})})),t}function D(e,t){return E(t,["moof","traf"]).reduce((function(t,r){var n=E(r,["tfdt"])[0],o=n[0],l=E(r,["tfhd"]).reduce((function(t,r){var l=v(r,4),track=e[l];if(track){var c=v(n,4);1===o&&(c*=Math.pow(2,32),c+=v(n,8));var d=c/(track.timescale||9e4);if(isFinite(d)&&(null===t||d<t))return d}return t}),null);return null!==l&&isFinite(l)&&(null===t||l<t)?l:t}),null)||0}function L(data,e){for(var t=0,r=0,n=0,l=E(data,["moof","traf"]),i=0;i<l.length;i++){var c=l[i],d=E(c,["tfhd"])[0],track=e[v(d,4)];if(track){var f=track.default,h=v(d,0)|(null==f?void 0:f.flags),_=null==f?void 0:f.duration;8&h&&(_=v(d,2&h?12:8));for(var m=track.timescale||9e4,y=E(c,["trun"]),S=0;S<y.length;S++)!(t=I(y[S]))&&_&&(t=_*v(y[S],4)),track.type===o.ElementaryStreamTypes.VIDEO?r+=t/m:track.type===o.ElementaryStreamTypes.AUDIO&&(n+=t/m)}}if(0===r&&0===n){for(var D=0,L=E(data,["sidx"]),A=0;A<L.length;A++){var x=T(L[A]);null!=x&&x.references&&(D+=x.references.reduce((function(e,t){return e+t.info.duration||0}),0))}return D}return r||n}function I(e){var t=v(e,0),r=8;1&t&&(r+=4),4&t&&(r+=4);for(var n=0,o=v(e,4),i=0;i<o;i++)256&t&&(n+=v(e,r),r+=4),512&t&&(r+=4),1024&t&&(r+=4),2048&t&&(r+=4);return n}function A(e,t,r){E(t,["moof","traf"]).forEach((function(t){E(t,["tfhd"]).forEach((function(n){var o=v(n,4),track=e[o];if(track){var l=track.timescale||9e4;E(t,["tfdt"]).forEach((function(e){var t=e[0],n=v(e,4);if(0===t)n-=r*l,y(e,4,n=Math.max(n,0));else{n*=Math.pow(2,32),n+=v(e,8),n-=r*l,n=Math.max(n,0);var o=Math.floor(n/(c+1)),d=Math.floor(n%(c+1));y(e,4,o),y(e,8,d)}}))}}))}))}function x(data){var e={valid:null,remainder:null},t=E(data,["moof"]);if(!t)return e;if(t.length<2)return e.remainder=data,e;var r=t[t.length-1];return e.valid=Object(n.sliceUint8)(data,0,r.byteOffset-8),e.remainder=Object(n.sliceUint8)(data,r.byteOffset-8),e}function M(e,t){var r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function k(e,track){var t=[],r=track.samples,n=track.timescale,l=track.id,c=!1;return E(r,["moof"]).map((function(d){var f=d.byteOffset-8;E(d,["traf"]).map((function(d){var h=E(d,["tfdt"]).map((function(e){var t=e[0],r=v(e,4);return 1===t&&(r*=Math.pow(2,32),r+=v(e,8)),r/n}))[0];return void 0!==h&&(e=h),E(d,["tfhd"]).map((function(h){var _=v(h,4),y=16777215&v(h,0),T=0,S=0!=(16&y),D=0,L=0!=(32&y),I=8;_===l&&(0!=(1&y)&&(I+=8),0!=(2&y)&&(I+=4),0!=(8&y)&&(T=v(h,I),I+=4),S&&(D=v(h,I),I+=4),L&&(I+=4),"video"===track.type&&(c=function(e){if(!e)return!1;var t=e.indexOf("."),r=t<0?e:e.substring(0,t);return"hvc1"===r||"hev1"===r||"dvh1"===r||"dvhe"===r}(track.codec)),E(d,["trun"]).map((function(l){var d=l[0],h=16777215&v(l,0),_=0!=(1&h),y=0,E=0!=(4&h),S=0!=(256&h),L=0,I=0!=(512&h),A=0,x=0!=(1024&h),M=0!=(2048&h),k=0,R=v(l,4),O=8;_&&(y=v(l,O),O+=4),E&&(O+=4);for(var C=y+f,P=0;P<R;P++){if(S?(L=v(l,O),O+=4):L=T,I?(A=v(l,O),O+=4):A=D,x&&(O+=4),M&&(k=0===d?v(l,O):m(l,O),O+=4),track.type===o.ElementaryStreamTypes.VIDEO)for(var j=0;j<A;){var F=v(r,C),U=31&r[C+=4];w(c,U)&&N(r.subarray(C,C+F),e+k/n,t),C+=F,j+=F+4}e+=L/n}})))}))}))})),t}function w(e,t){return e?39===t||40===t:6===t}function N(e,t,r){var data=function(data){for(var e=data.byteLength,t=[],i=1;i<e-2;)0===data[i]&&0===data[i+1]&&3===data[i+2]?(t.push(i+2),i+=2):i++;if(0===t.length)return data;var r=e-t.length,n=new Uint8Array(r),o=0;for(i=0;i<r;o++,i++)o===t[0]&&(o++,t.shift()),n[i]=data[o];return n}(e),n=0;n++;for(var o=0,c=0,d=!1,b=0;n<data.length;){o=0;do{if(n>=data.length)break;o+=b=data[n++]}while(255===b);c=0;do{if(n>=data.length)break;c+=b=data[n++]}while(255===b);var f=data.length-n;if(!d&&4===o&&n<data.length){if(d=!0,181===data[n++]){var h=_(data,n);if(n+=2,49===h){var m=v(data,n);if(n+=4,1195456820===m){var y=data[n++];if(3===y){var E=data[n++],T=64&E,S=T?2+3*(31&E):0,D=new Uint8Array(S);if(T){D[0]=E;for(var i=1;i<S;i++)D[i]=data[n++]}r.push({type:y,payloadType:o,pts:t,bytes:D})}}}}}else if(5===o&&c<f){if(d=!0,c>16){for(var L=[],I=0;I<16;I++){var A=data[n++].toString(16);L.push(1==A.length?"0"+A:A),3!==I&&5!==I&&7!==I&&9!==I||L.push("-")}for(var x=c-16,M=new Uint8Array(x),k=0;k<x;k++)M[k]=data[n++];r.push({payloadType:o,pts:t,uuid:L.join(""),userData:Object(l.utf8ArrayToStr)(M),userDataBytes:M})}}else if(c<f)n+=c;else if(c>f)break}}function R(data){var e=data[0],t="",r="",n=0,o=0,l=0,c=0,d=0,f=0;if(0===e){for(;"\0"!==h(data.subarray(f,f+1));)t+=h(data.subarray(f,f+1)),f+=1;for(t+=h(data.subarray(f,f+1)),f+=1;"\0"!==h(data.subarray(f,f+1));)r+=h(data.subarray(f,f+1)),f+=1;r+=h(data.subarray(f,f+1)),f+=1,n=v(data,12),o=v(data,16),c=v(data,20),d=v(data,24),f=28}else if(1===e){n=v(data,f+=4);var _=v(data,f+=4),m=v(data,f+=4);for(f+=4,l=Math.pow(2,32)*_+m,Number.isSafeInteger(l)||(l=Number.MAX_SAFE_INTEGER,console.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),c=v(data,f),d=v(data,f+=4),f+=4;"\0"!==h(data.subarray(f,f+1));)t+=h(data.subarray(f,f+1)),f+=1;for(t+=h(data.subarray(f,f+1)),f+=1;"\0"!==h(data.subarray(f,f+1));)r+=h(data.subarray(f,f+1)),f+=1;r+=h(data.subarray(f,f+1)),f+=1}return{schemeIdUri:t,value:r,timeScale:n,presentationTime:l,presentationTimeDelta:o,eventDuration:c,id:d,payload:data.subarray(f,data.byteLength)}}},
vendor: 749 bytes, line 2
2"./src/utils/output-filter.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return n}));var n=function(){function e(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},t.newCue=function(e,t,r){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[],this.startTime=null},e}()},
vendor: 1,737 bytes, line 2
2"./src/utils/texttrack-utils.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"sendAddTrackEvent",(function(){return o})),r.d(t,"addCueToTrack",(function(){return l})),r.d(t,"clearCurrentCues",(function(){return c})),r.d(t,"removeCuesInRange",(function(){return d})),r.d(t,"getCuesInRange",(function(){return f}));var n=r("./src/utils/logger.ts");function o(track,e){var t;try{t=new Event("addtrack")}catch(e){(t=document.createEvent("Event")).initEvent("addtrack",!1,!1)}t.track=track,e.dispatchEvent(t)}function l(track,e){var t=track.mode;if("disabled"===t&&(track.mode="hidden"),track.cues&&!track.cues.getCueById(e.id))try{if(track.addCue(e),!track.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(t){n.logger.debug("[texttrack-utils]: "+t);var r=new self.TextTrackCue(e.startTime,e.endTime,e.text);r.id=e.id,track.addCue(r)}"disabled"===t&&(track.mode=t)}function c(track){var e=track.mode;if("disabled"===e&&(track.mode="hidden"),track.cues)for(var i=track.cues.length;i--;)track.removeCue(track.cues[i]);"disabled"===e&&(track.mode=e)}function d(track,e,t,r){var n=track.mode;if("disabled"===n&&(track.mode="hidden"),track.cues&&track.cues.length>0)for(var o=f(track.cues,e,t),i=0;i<o.length;i++)r&&!r(o[i])||track.removeCue(o[i]);"disabled"===n&&(track.mode=n)}function f(e,t,r){var n=[],o=function(e,time){if(time<e[0].startTime)return 0;var t=e.length-1;if(time>e[t].endTime)return-1;for(var r=0,n=t;r<=n;){var o=Math.floor((n+r)/2);if(time<e[o].startTime)n=o-1;else{if(!(time>e[o].startTime&&r<t))return o;r=o+1}}return e[r].startTime-time<time-e[n].startTime?r:n}(e,t);if(o>-1)for(var i=o,l=e.length;i<l;i++){var c=e[i];if(c.startTime>=t&&c.endTime<=r)n.push(c);else if(c.startTime>r)return n}return n}},
2"./src/utils/time-ranges.ts":function(e,t,r){"use strict";r.r(t),t.default={toString:function(e){for(var t="",r=e.length,i=0;i<r;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}}},
vendor: 575 bytes, line 2
2"./src/utils/timescale-conversion.ts":function(e,t,r){"use strict";function n(e,t,r,n){void 0===r&&(r=1),void 0===n&&(n=!1);var o=e*t*r;return n?Math.round(o):o}function o(e,t,r,o){return void 0===r&&(r=1),void 0===o&&(o=!1),n(e,t,1/r,o)}function l(e,t){return void 0===t&&(t=!1),n(e,1e3,1/9e4,t)}function c(e,t){return void 0===t&&(t=1),n(e,9e4,1/t)}r.r(t),r.d(t,"toTimescaleFromBase",(function(){return n})),r.d(t,"toTimescaleFromScale",(function(){return o})),r.d(t,"toMsFromMpegTsClock",(function(){return l})),r.d(t,"toMpegTsClockFromTimescale",(function(){return c}))},
2"./src/utils/typed-array.ts":function(e,t,r){"use strict";function n(e,t,r){return Uint8Array.prototype.slice?e.slice(t,r):new Uint8Array(Array.prototype.slice.call(e,t,r))}r.r(t),r.d(t,"sliceUint8",(function(){return n}))},
vendor: 7,410 bytes, line 2
2"./src/utils/vttcue.ts":function(e,t,r){"use strict";r.r(t),t.default=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var e=["","lr","rl"],t=["start","middle","end","left","right"];function r(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;var r=t.toLowerCase();return!!~e.indexOf(r)&&r}function n(e){return r(t,e)}function o(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var p in o)e[p]=o[p]}return e}function l(t,l,text){var c=this,d={enumerable:!0};c.hasBeenReset=!1;var f="",h=!1,_=t,v=l,m=text,y=null,E="",T=!0,S="auto",D="start",L=50,I="middle",A=50,x="middle";Object.defineProperty(c,"id",o({},d,{get:function(){return f},set:function(e){f=""+e}})),Object.defineProperty(c,"pauseOnExit",o({},d,{get:function(){return h},set:function(e){h=!!e}})),Object.defineProperty(c,"startTime",o({},d,{get:function(){return _},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",o({},d,{get:function(){return v},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",o({},d,{get:function(){return m},set:function(e){m=""+e,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",o({},d,{get:function(){return y},set:function(e){y=e,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",o({},d,{get:function(){return E},set:function(t){var n=function(t){return r(e,t)}(t);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");E=n,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",o({},d,{get:function(){return T},set:function(e){T=!!e,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",o({},d,{get:function(){return S},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");S=e,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",o({},d,{get:function(){return D},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");D=t,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",o({},d,{get:function(){return L},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");L=e,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",o({},d,{get:function(){return I},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");I=t,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",o({},d,{get:function(){return A},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");A=e,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",o({},d,{get:function(){return x},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");x=t,this.hasBeenReset=!0}})),c.displayState=void 0}return l.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},l}()},"./src/utils/vttparser.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"parseTimeStamp",(function(){return l})),r.d(t,"fixLineBreaks",(function(){return v})),r.d(t,"VTTParser",(function(){return m}));var n=r("./src/utils/vttcue.ts"),o=function(){function e(){}return e.prototype.decode=function(data,e){if(!data)return"";if("string"!=typeof data)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(data))},e}();function l(input){function e(e,t,s,r){return 3600*(0|e)+60*(0|t)+(0|s)+parseFloat(r||0)}var t=input.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}var c=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,a){for(var r=0;r<a.length;++r)if(t===a[r]){this.set(e,t);break}},t.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},t.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var r=parseFloat(t);if(r>=0&&r<=100)return this.set(e,r),!0}return!1},e}();function d(input,e,t,r){var n=r?input.split(r):[input];for(var i in n)if("string"==typeof n[i]){var o=n[i].split(t);2===o.length&&e(o[0],o[1])}}var f=new n.default(0,0,""),h="middle"===f.align?"middle":"center";function _(input,e,t){var r=input;function n(){var e=l(input);if(null===e)throw new Error("Malformed timestamp: "+r);return input=input.replace(/^[^\sa-zA-Z-]+/,""),e}function o(){input=input.replace(/^\s+/,"")}if(o(),e.startTime=n(),o(),"--\x3e"!==input.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);input=input.slice(3),o(),e.endTime=n(),o(),function(input,e){var r=new c;d(input,(function(e,n){var o;switch(e){case"region":for(var i=t.length-1;i>=0;i--)if(t[i].id===n){r.set(e,t[i].region);break}break;case"vertical":r.alt(e,n,["rl","lr"]);break;case"line":o=n.split(","),r.integer(e,o[0]),r.percent(e,o[0])&&r.set("snapToLines",!1),r.alt(e,o[0],["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start",h,"end"]);break;case"position":o=n.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start",h,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,n);break;case"align":r.alt(e,n,["start",h,"end","left","right"])}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical","");var line=r.get("line","auto");"auto"===line&&-1===f.line&&(line=-1),e.line=line,e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align",h);var n=r.get("position","auto");"auto"===n&&50===f.position&&(n="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=n}(input,e)}function v(input){return input.replace(/<br(?: \/)?>/gi,"\n")}var m=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new o,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(data){var e=this;function t(){var t=e.buffer,r=0;for(t=v(t);r<t.length&&"\r"!==t[r]&&"\n"!==t[r];)++r;var line=t.slice(0,r);return"\r"===t[r]&&++r,"\n"===t[r]&&++r,e.buffer=t.slice(r),line}data&&(e.buffer+=e.decoder.decode(data,{stream:!0}));try{var line="";if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var r=(line=t()).match(/^()?WEBVTT([ \t].*)?$/);if(!r||!r[0])throw new Error("Malformed WebVTT signature.");e.state="HEADER"}for(var o=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(o?o=!1:line=t(),e.state){case"HEADER":/:/.test(line)?d(line,(function(e,t){}),/:/):line||(e.state="ID");continue;case"NOTE":line||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(line)){e.state="NOTE";break}if(!line)continue;if(e.cue=new n.default(0,0,""),e.state="CUE",-1===line.indexOf("--\x3e")){e.cue.id=line;continue}case"CUE":if(!e.cue){e.state="BADCUE";continue}try{_(line,e.cue,e.regionList)}catch(t){e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var l=-1!==line.indexOf("--\x3e");
vendor: 611 bytes, line 2
2if(!line||l&&(o=!0)){e.oncue&&e.cue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}if(null===e.cue)continue;e.cue.text&&(e.cue.text+="\n"),e.cue.text+=line;continue;case"BADCUE":line||(e.state="ID")}}}catch(t){"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},t.flush=function(){var e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this},e}()},
vendor: 1,538 bytes, line 2
2"./src/utils/webvtt-parser.ts":function(e,t,r){"use strict";r.r(t),r.d(t,"generateCueId",(function(){return v})),r.d(t,"parseWebVTT",(function(){return m}));var n=r("./src/polyfills/number.ts"),o=r("./src/utils/vttparser.ts"),l=r("./src/demux/id3.ts"),c=r("./src/utils/timescale-conversion.ts"),d=r("./src/remux/mp4-remuxer.ts"),f=/\r\n|\n\r|\n|\r/g,h=function(e,t,r){return void 0===r&&(r=0),e.slice(r,r+t.length)===t},_=function(text){for(var e=5381,i=text.length;i;)e=33*e^text.charCodeAt(--i);return(e>>>0).toString()};function v(e,t,text){return _(e.toString())+_(t.toString())+_(text)}function m(e,t,r,_,m,y,E,T){var S,D=new o.VTTParser,L=Object(l.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(f,"\n").split("\n"),I=[],A=Object(c.toMpegTsClockFromTimescale)(t,r),x="00:00.000",M=0,k=0,w=!0;D.oncue=function(e){var t=_[m],r=_.ccOffset,n=(M-A)/9e4;null!=t&&t.new&&(void 0!==k?r=_.ccOffset=t.start:function(e,t,r){var n=e[t],o=e[n.prevCC];if(!o||!o.new&&n.new)return e.ccOffset=e.presentationOffset=n.start,void(n.new=!1);for(;null!==(l=o)&&void 0!==l&&l.new;){var l;e.ccOffset+=n.start-o.start,n.new=!1,o=e[(n=o).prevCC]}e.presentationOffset=r}(_,m,n)),n&&(r=n-_.presentationOffset);var o=e.endTime-e.startTime,l=Object(d.normalizePts)(9e4*(e.startTime+r-k),9e4*y)/9e4;e.startTime=Math.max(l,0),e.endTime=Math.max(l+o,0);var text=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(text)),e.id||(e.id=v(e.startTime,e.endTime,text)),e.endTime>0&&I.push(e)},D.onparsingerror=function(e){S=e},D.onflush=function(){S?T(S):E(I)}
vendor: 628 bytes, line 2
2,L.forEach((function(line){if(w){if(h(line,"X-TIMESTAMP-MAP=")){w=!1,line.slice(16).split(",").forEach((function(e){h(e,"LOCAL:")?x=e.slice(6):h(e,"MPEGTS:")&&(M=parseInt(e.slice(7)))}));try{k=function(e){var t=parseInt(e.slice(-3)),r=parseInt(e.slice(-6,-4)),o=parseInt(e.slice(-9,-7)),l=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(Object(n.isFiniteNumber)(t)&&Object(n.isFiniteNumber)(r)&&Object(n.isFiniteNumber)(o)&&Object(n.isFiniteNumber)(l)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*r,(t+=6e4*o)+36e5*l}(x)/1e3}catch(e){S=e}return}""===line&&(w=!1)}D.parse(line+"\n")})),D.flush()}},
vendor: 3,711 bytes, line 2
2"./src/utils/xhr-loader.ts":function(e,t,r){"use strict";r.r(t);var n=r("./src/utils/logger.ts"),o=r("./src/loader/load-stats.ts"),l=/^age:\s*[\d.]+\s*$/m,c=function(){function e(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e?e.xhrSetup:null,this.stats=new o.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=r,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var r=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0;var o=this.xhrSetup;try{if(o)try{o(r,t.url)}catch(e){r.open("GET",t.url,!0),o(r,t.url)}r.readyState||r.open("GET",t.url,!0);var l=this.context.headers;if(l)for(var header in l)r.setRequestHeader(header,l[header])}catch(e){return void this.callbacks.onError({code:r.status,text:e.message},t,r)}t.rangeEnd&&r.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),r.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,r=this.stats;if(e&&t){var o=t.readyState,l=this.config;if(!r.aborted&&o>=2)if(self.clearTimeout(this.requestTimeout),0===r.loading.first&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),4===o){t.onreadystatechange=null,t.onprogress=null;var c=t.status;if(c>=200&&c<300){var data,d;if(r.loading.end=Math.max(self.performance.now(),r.loading.first),d="arraybuffer"===e.responseType?(data=t.response).byteLength:(data=t.responseText).length,r.loaded=r.total=d,!this.callbacks)return;var f=this.callbacks.onProgress;if(f&&f(r,e,data,t),!this.callbacks)return;var h={url:t.responseURL,data:data};this.callbacks.onSuccess(h,r,e,t)}else r.retry>=l.maxRetry||c>=400&&c<499?(n.logger.error(c+" while loading "+e.url),this.callbacks.onError({code:c,text:t.statusText},e,t)):(n.logger.warn(c+" while loading "+e.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,l.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),l.timeout)}},t.loadtimeout=function(){n.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&l.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();t.default=c}
vendor: 4,672 bytes, line 2
2}).default},e.exports=t())},828:t=>{"use strict";t.exports=e},609:(e,t,r)=>{var n=r(425).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,l=r.hasOwnProperty,c="function"==typeof Symbol?Symbol:{},d=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",h=c.toStringTag||"@@toStringTag";function _(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{_({},"")}catch(e){_=function(e,t,r){return e[t]=r}}function v(e,t,r,n){var o=t&&t.prototype instanceof E?t:E,l=Object.create(o.prototype),c=new R(n||[]);return l._invoke=function(e,t,r){var n="suspendedStart";return function(o,l){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw l;return{value:void 0,done:!0}}for(r.method=o,r.arg=l;;){var c=r.delegate;if(c){var d=k(c,r);if(d){if(d===y)continue;return d}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var f=m(e,t,r);if("normal"===f.type){if(n=r.done?"completed":"suspendedYield",f.arg===y)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n="completed",r.method="throw",r.arg=f.arg)}}}(e,r,c),l}function m(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=v;var y={};function E(){}function T(){}function S(){}var D={};_(D,d,(function(){return this}));var L=Object.getPrototypeOf,I=L&&L(L(O([])));I&&I!==r&&l.call(I,d)&&(D=I);var A=S.prototype=E.prototype=Object.create(D);function x(e){["next","throw","return"].forEach((function(t){_(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(o,c,d,f){var h=m(e[o],e,c);if("throw"!==h.type){var _=h.arg,v=_.value;return v&&"object"==n(v)&&l.call(v,"__await")?t.resolve(v.__await).then((function(e){r("next",e,d,f)}),(function(e){r("throw",e,d,f)})):t.resolve(v).then((function(e){_.value=e,d(_)}),(function(e){return r("throw",e,d,f)}))}f(h.arg)}var o;this._invoke=function(e,n){function l(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(l,l):l()}}function k(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return y;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var n=m(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,y;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,y):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function O(e){if(e){var t=e[d];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(l.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:C}}function C(){return{value:void 0,done:!0}}return T.prototype=S,_(A,"constructor",S),_(S,"constructor",T),T.displayName=_(S,h,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,_(e,h,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},x(M.prototype),_(M.prototype,f,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,o,l){void 0===l&&(l=Promise);var c=new M(v(e,r,n,o),l);return t.isGeneratorFunction(r)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},x(A),_(A,h,"Generator"),_(A,d,(function(){return this})),_(A,"toString",(function(){return"[object Generator]"})),t.keys=function(object){var e=[];for(var t in object)e.push(t);return e.reverse(),function t(){for(;e.length;){var r=e.pop();if(r in object)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=O,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
vendor: 7,251 bytes, line 2
2h(N),!e)for(var t in this)"t"===t.charAt(0)&&l.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i],o=n.completion;if("root"===n.tryLoc)return r("end");if(n.tryLoc<=this.prev){var c=l.call(n,"catchLoc"),d=l.call(n,"finallyLoc");if(c&&d){if(this.prev<n.catchLoc)return r(n.catchLoc,!0);if(this.prev<n.finallyLoc)return r(n.finallyLoc)}else if(c){if(this.prev<n.catchLoc)return r(n.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return r(n.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var o=n?n.completion:{};return o.type=e,o.arg=t,n?(this.method="next",this.next=n.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var i=this.tryEntries.length-1;i>=0;--i){var t=this.tryEntries[i];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),N(t),y}},catch:function(e){for(var i=this.tryEntries.length-1;i>=0;--i){var t=this.tryEntries[i];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var n=r.arg;N(t)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),y}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},425:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},841:(e,t,r)=>{var n=r(609)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var l=r[e]={exports:{}};return t[e].call(l.exports,l,l.exports,n),l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";function e(e,t,r,n,o,l,c){try{var d=e[l](c),f=d.value}catch(e){return void r(e)}d.done?t(f):Promise.resolve(f).then(n,o)}function t(t){return function(){var r=this,n=arguments;return new Promise((function(o,l){var c=t.apply(r,n);function d(t){e(c,o,l,d,f,"next",t)}function f(t){e(c,o,l,d,f,"throw",t)}d(void 0)}))}}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function h(object,e){for(;!Object.prototype.hasOwnProperty.call(object,e)&&null!==(object=f(object)););return object}function _(){return _="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var base=h(e,t);if(base){var desc=Object.getOwnPropertyDescriptor(base,t);return desc.get?desc.get.call(arguments.length<3?e:r):desc.value}},_.apply(this,arguments)}function v(e,p){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,p){return e.__proto__=p,e},v(e,p)}function m(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}n.r(o),n.d(o,{Hls:()=>w(),default:()=>V,plugin:()=>Y});var E,T,S,D,L,I,A=n(841),x=n.n(A),M=n(828),k=n(711),w=n.n(k);!function(e){e.ILLEGAL_PLUGIN_OPTIONS="[Hls-plugin] Illegal plugin options. Must be a object. Typeof your options is",e.VIDEO_REF_NOT_EXIST="[Hls-plugin] videoRef not found. maybe UVP render timing issue.",e.FETCH_ERROR="[Hls-plugin] Fetch failed. CANNOT set resolution list.",e.M3U8_PARSE_ERROR="[Hls-plugin] M3U8 file Parse error. CANNOT set resolution list.",e.INVALID_M3U8_FILE="[Hls-plugin] Get invalid M3U8 file data.",e.CANNOT_SET_RESOLUTION_LIST="[Hls-plugin] Because Native Hls is used, resolution cannot be set. Please use plugin resolutionList options.",e.CANNOT_MATCH_SRC_LEVEL="[Hls-plugin] TargetLevel and parsed list of m3u8 files does not match. You entered an incorrect value.",e.INVALID_RESOLUTION_TYPE="[Hls-plugin] Invalid resolutionList type."}(E||(E={})),function(e){e.CANNOT_PLAY="[Hls-plugin] Hls.js not supported. Your browser is not supporting MediaSource Extensions."}(T||(T={})),function(e){e.BROWSER_HAVE_NATIVE_CODEC="[Hls-plugin] Since the m3u8 codec can be executed in this browser, it runs as Native video(Hls.js is unused)."}(S||(S={})),function(e){e.APPLE_NATIVE="application/vnd.apple.mpegurl"}(D||(D={})),function(e){e.M3U8=".m3u8"}(L||(L={})),function(e){e.SYMBOL="#",e.EXTM3U="#EXTM3U",e.STREAM_INFO="#EXT-X-STREAM-INF",e.BANDWIDTH="BANDWIDTH",e.RESOLUTION="RESOLUTION",e.NAME="NAME"}(I||(I={}));var N,R="Auto";function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}function C(e,i){return function(e){if(Array.isArray(e))return e}(e)||function(e,i){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o=[],l=!0,c=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(o.push(r.value),!i||o.length!==i);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==t.return||t.return()}finally{if(c)throw n}}return o}}(e,i)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}
2(e,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(e){e.HLS="hls",e.IS_NATIVE_HLS="isNativeHls",e.IS_READY="isReady",e.PARSED_DATA="parsedData",e.PARSED="parsed"}(N||(N={}));var P=function(){var e=t(x().mark((function e(t){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),console.error(E.FETCH_ERROR),console.error(e.t0),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),j=function(e){var t=e.split("\n").filter((function(e){return e}));if(!t[0].includes(I.EXTM3U))throw new Error("".concat(E.INVALID_M3U8_FILE,' CANNOT FIND "').concat(I.EXTM3U,'"'));return t},F=function(e,t){var r=t.substring(0,t.lastIndexOf("/")+1),n=[],o=e.reduce((function(e,t){if(function(e){return!e.includes(I.SYMBOL)}(t))return n.push("".concat(r).concat(t)),e;if(!t.startsWith(I.STREAM_INFO))return e;var o=function(e){return e.reduce((function(e,t){return t.match("=")?e.push(t):e[e.length-1]+=",".concat(t),e}),[])}(t.replace("".concat(I.STREAM_INFO,":"),"").replaceAll('"',"").trim().split(",")),data=function(e){return e.reduce((function(e,t){var r=C(t.split("="),2),n=r[0],o=r[1];if(n===I.NAME||n===I.RESOLUTION){var l=n===I.NAME?o:"".concat(o.split("x")[1],"p");return e.name=l,e}return e[n]=o,e}),{})}(o);return function(data){if(!data[I.BANDWIDTH])throw new Error("".concat(E.INVALID_M3U8_FILE," CANNOT FIND ").concat(I.BANDWIDTH));if(!data.name)throw new Error("".concat(E.INVALID_M3U8_FILE," CANNOT FIND ").concat(I.NAME," or ").concat(I.RESOLUTION))}(data),e.push(data),e}),[]);return n.push(t),{protocolDataList:o,urlList:n}},U=function(e,t){var r=F(e,t),n=function(e,t){var r=e.map((function(data){var e=t.shift();if(!e)throw new Error("".concat(E.INVALID_M3U8_FILE," CANNOT match ").concat(I.STREAM_INFO," and URL count."));return data.src=e,data}));return r.sort((function(e,t){return Number(t[I.BANDWIDTH])-Number(e[I.BANDWIDTH])})),r}(r.protocolDataList,r.urlList),o=function(e){return e.map((function(t,r){return{name:t.name,selected:!1,src:t.src,detail:{level:e.length-r-1}}}))}(n);return o.push({name:R,selected:!0,src:t,detail:{level:-1}}),o};function B(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function G(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?B(Object(source),!0).forEach((function(t){y(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):B(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=f(e);if(t){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}var H=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(C,e);var n,o,h,m,I,A,M,k,O=z(C);function C(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(l(this,C),y(d(t=O.call(this,e,C,n)),"isOnSelectResolutionSet",!1),y(d(t),"originOptions",{}),"object"!==r(n))throw new Error("".concat(E.ILLEGAL_PLUGIN_OPTIONS," ").concat(r(n)));return t.originOptions=n,t.uvp.on("videoComponentMounted",(function(e){var r=e.videoRef;if(!r)throw new Error(E.VIDEO_REF_NOT_EXIST);r.canPlayType(D.APPLE_NATIVE)?t.nativeSetup():w().isSupported()?t.hlsSetup(r):console.warn(T.CANNOT_PLAY)})),t}return n=C,o=[{key:"hlsSetup",value:function(e){var t=this,n=this.originOptions,o=n.hlsConfig,l=n.resolutionList,c=new(w())(o);this.setState((function(e){return G(G({},e),{},{hls:c,resolutionList:l})})),c.attachMedia(e),c.loadSource(this.uvp.getSrc()),l?c.on(w().Events.MANIFEST_LOADED,(function(){"object"===r(l)?t.makeResolutionList(c,l):t.makeAutoResolutionList()})):this.setReady()}},{key:"nativeSetup",value:(k=t(x().mark((function e(){var t,r,n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.info(S.BROWSER_HAVE_NATIVE_CODEC),t=this.uvp.getSrc(),this.setState((function(e){return G(G({},e),{},y({},N.IS_NATIVE_HLS,!0))})),t.includes(L.M3U8)){e.next=6;break}return this.setReady(),e.abrupt("return");case 6:return e.next=8,this.parseSourceData();case 8:if(r=e.sent){e.next=11;break}return e.abrupt("return");case 11:if(this.setState((function(e){return G(G({},e),{},y({},N.PARSED_DATA,r))})),this.event.emit(N.PARSED),!0!==(n=this.originOptions.resolutionList)){e.next=19;break}return e.next=17,this.makeAutoNativeResolutionList();case 17:e.next=25;break;case 19:if(!(Array.isArray(n)&&n.length>0)){e.next=24;break}return e.next=22,this.makeNativeResolutionList(n);case 22:e.next=25;break;case 24:this.setReady();case 25:case"end":return e.stop()}}),e,this)}))),function(){return k.apply(this,arguments)})},{key:"parseSourceData",value:(M=t(x().mark((function e(){var t,r,n,o,l;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.uvp.getSrc(),e.next=3,P(t);case 3:if(r=e.sent){e.next=6;break}return e.abrupt("return",!1);case 6:return e.prev=6,e.next=9,r.text();case 9:return n=e.sent,o=j(n),l=U(o,t),e.abrupt("return",l);case 15:return e.prev=15,e.t0=e.catch(6),console.error(E.M3U8_PARSE_ERROR),console.error(e.t0),e.abrupt("return",!1);case 20:case"end":return e.stop()}}),e,this,[[6,15]])}))),function(){return M.apply(this,arguments)})},{key:"makeAutoNativeResolutionList",value:(A=t(x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.getState(N.PARSED_DATA),this.uvp.setResolutionList(t),this.setReady();case 3:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"makeNativeResolutionList",value:(I=t(x().mark((function e(t){var n=this;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Array.isArray(t)){e.next=2;break}throw new Error("".concat(E.INVALID_RESOLUTION_TYPE," This type is ").concat(r(t)));case 2:if(this.getState(N.PARSED_DATA)){e.next=6;break}return this.event.on(N.PARSED,(function(){return n.setNativeMergedList(t)})),e.abrupt("return");case 6:this.setNativeMergedList(t);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"setNativeMergedList",value:function(e){var t=!1,r=this.getState(N.PARSED_DATA),n=e.map((function(e){var n=e.name,o=e.detail,l=e.targetLevel,c=e.selected,d=r.find((function(data){return data.detail.level===l}));if(!d)throw new Error(E.CANNOT_MATCH_SRC_LEVEL);return-1===l&&(t=!0),{name:n,selected:!!c,src:d.src,detail:G({},o)}}));t||n.push({name:R,src:this.uvp.getSrc()}),this.uvp.setResolutionList(n),this.setReady()}}
2,{key:"setReady",value:function(){this.getState(N.IS_READY)||(this.setState((function(e){return G(G({},e),{},y({},N.IS_READY,!0))})),this.event.emit(N.IS_READY))}},{key:"makeAutoResolutionList",value:function(){var e=this.getState(N.HLS).levels.map((function(e,t){var r;return{name:null!==(r=e.name)&&void 0!==r?r:"".concat(e.height,"p"),detail:{level:e,nextLevel:t},selected:!1}}));e.push({name:R,selected:!0}),this.uvp.setResolutionList(e),this.setReady(),this.onSelectResolution()}},{key:"onSelectResolution",value:function(){if(!this.isOnSelectResolutionSet){this.isOnSelectResolutionSet=!0;var e=this.getState(N.HLS);this.event.on("selectResolution",(function(param){var t=param.selectedItem,r=t.detail,n=t.name===R?-1:r.nextLevel;e.nextLevel=n}))}}},{key:"setResolutionList",value:function(e){var t=this;this.uvp.getComponentRef("videoContainer").then((function(){return t.handleResolutionList(e)})).catch((function(e){return console.error(e)}))}},{key:"getHls",value:function(){return this.getState(N.HLS)}},{key:"isReady",value:function(){return this.getState(N.IS_READY)}},{key:"deactivate",value:function(){try{return this.uvp.setResolutionList([]),this.getHls().destroy(),_(f(C.prototype),"deactivate",this).call(this),!0}catch(e){return console.error(e),!1}}},{key:"handleResolutionList",value:(m=t(x().mark((function e(r){var n,o,l=this;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.getState(N.IS_READY),o=function(){var e=t(x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.getState(N.IS_NATIVE_HLS)){e.next=5;break}return e.next=4,l.makeNativeResolutionList(r);case 4:return e.abrupt("return");case 5:t=l.getState(N.HLS),l.makeResolutionList(t,r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n){e.next=5;break}return this.event.on(N.IS_READY,o,{once:!0}),e.abrupt("return");case 5:return e.next=7,o();case 7:case"end":return e.stop()}}),e,this)}))),function(e){return m.apply(this,arguments)})},{key:"makeResolutionList",value:function(e,t){var r=!1,n=t.map((function(t){var n=t.name,o=t.detail,l=t.targetLevel,c=t.selected;return-1===l&&(r=!0),{name:n,selected:!!c,detail:G(G({},o),{},{level:e.levels[l],nextLevel:l})}}));r||n.push({name:R}),this.uvp.setResolutionList(n),this.setReady(),this.onSelectResolution()}}],o&&c(n.prototype,o),h&&c(n,h),Object.defineProperty(n,"prototype",{writable:!1}),C}(M.Plugin);y(H,"version","3.6.0"),y(H,"pluginName","UvpHlsPlugin"),y(H,"defaultState",y({},N.IS_READY,!1));var Y=H;const V=H})(),o})(),e.exports=n(r(380))},412:function(e,t,r){var content=r(1310);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(84).default)("18821e58",content,!0,{sourceMap:!1})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.