hr-design-system-handlebars 1.121.0 → 1.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/assets/index.css +18 -20
- package/dist/assets/vendor/ardplayer/ardplayer-hr-7.7.0.074b3034.css +1 -0
- package/dist/assets/vendor/ardplayer/ardplayer-hr-7.7.0.eeb199f0.js +1 -0
- package/dist/assets/vendor/ardplayer/ardplayer-libimsc.e88e8ba8.chunk.js +12 -0
- package/dist/assets/vendor/ardplayer/ardplayer-pluginchromecast.280aebab.chunk.js +1 -0
- package/dist/assets/vendor/ardplayer/ardplayer-plugindash.e096df69.chunk.js +10 -0
- package/dist/assets/vendor/ardplayer/ardplayer-pluginhls.33094be9.chunk.js +1 -0
- package/dist/assets/vendor/ardplayer/ardplayer-pluginhtmla.084c4a0c.chunk.js +1 -0
- package/dist/assets/vendor/ardplayer/ardplayer-pluginhtmlv.b0dd7eb3.chunk.js +1 -0
- package/dist/assets/vendor/ardplayer/assets/c1bd5269b4ca32e4e463-ardplayer-audio.woff +0 -0
- package/dist/assets/vendor/ardplayer/assets/e672be94f918ce5743ed-ardplayer.woff +0 -0
- package/dist/assets/vendor/ardplayer/assets/img/3sat-316aa089.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/alpha-aa80e0b1.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/ard-7c1adb6a.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/arte-78b35a1c.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/br-91122637.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/daserste-b4a7fce0.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/deutschlandradio-8ae68d1e.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/dw-b25a6e21.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/funk-14d5562d.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/hr-f8858d2d.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/kika-cc093c6d.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/mdr-d2d11760.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/ndr-b942fbbe.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/one-bfd695dd.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/phoenix-25ae77e8.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/radiobremen-c9a22aec.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/rbb-857d0436.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/sportschau-66955185.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/sr-4d2bb786.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/swr-151e2af6.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/tagesschau24-4a1c7ee6.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/wdr-be1aba5e.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/zdf-ebb6d646.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/zdfinfo-90fdcd3b.svg +1 -0
- package/dist/assets/vendor/ardplayer/assets/img/zdfneo-2fba1e20.svg +1 -0
- package/dist/views/components/content/copytext/components/audio.hbs +2 -2
- package/dist/views/components/content/copytext/components/audioeventlivestream.hbs +2 -2
- package/dist/views/components/content/copytext/components/common/paragraphbox_wrapper.hbs +1 -1
- package/dist/views/components/content/copytext/components/gallery/gallery.hbs +1 -1
- package/dist/views/components/content/copytext/components/image/image.hbs +6 -6
- package/dist/views/components/content/copytext/components/podcastepisode.hbs +1 -1
- package/dist/views/components/content/copytext/components/posterteaser.hbs +1 -1
- package/dist/views/components/content/copytext/components/video/video.hbs +2 -2
- package/dist/views/components/content/copytext/components/videolivestream.hbs +2 -2
- package/dist/views/components/external-service/external_service.hbs +1 -1
- package/dist/views/components/external-service/external_service_with_datapolicy_check.hbs +1 -1
- package/dist/views/components/forms/components/backgroundBox.hbs +1 -1
- package/dist/views/components/forms/webform.hbs +1 -1
- package/dist/views/components/newsletter/newsletter.hbs +1 -1
- package/dist/views/components/ticker/ticker_item/content_footer_ticker_item.hbs +1 -1
- package/dist/views_static/components/content/copytext/components/audio.hbs +2 -2
- package/dist/views_static/components/content/copytext/components/audioeventlivestream.hbs +2 -2
- package/dist/views_static/components/content/copytext/components/common/paragraphbox_wrapper.hbs +1 -1
- package/dist/views_static/components/content/copytext/components/gallery/gallery.hbs +1 -1
- package/dist/views_static/components/content/copytext/components/image/image.hbs +6 -6
- package/dist/views_static/components/content/copytext/components/podcastepisode.hbs +1 -1
- package/dist/views_static/components/content/copytext/components/posterteaser.hbs +1 -1
- package/dist/views_static/components/content/copytext/components/video/video.hbs +2 -2
- package/dist/views_static/components/content/copytext/components/videolivestream.hbs +2 -2
- package/dist/views_static/components/external-service/external_service.hbs +1 -1
- package/dist/views_static/components/external-service/external_service_with_datapolicy_check.hbs +1 -1
- package/dist/views_static/components/forms/components/backgroundBox.hbs +1 -1
- package/dist/views_static/components/forms/webform.hbs +1 -1
- package/dist/views_static/components/newsletter/newsletter.hbs +1 -1
- package/dist/views_static/components/ticker/ticker_item/content_footer_ticker_item.hbs +1 -1
- package/package.json +1 -1
- package/src/assets/fixtures/audio/audios.inc.json +8 -8
- package/src/assets/fixtures/content/copytext/copytext_audio.json +110 -3
- package/src/assets/fixtures/content/copytext/copytext_audio_livestream.json +109 -3
- package/src/assets/fixtures/content/copytext/copytext_externalservice.json +18 -0
- package/src/assets/fixtures/content/copytext/copytext_gallery.json +8 -5
- package/src/assets/fixtures/content/copytext/copytext_image.json +15 -0
- package/src/assets/fixtures/content/copytext/copytext_livestream.json +118 -6
- package/src/assets/fixtures/content/copytext/copytext_newsletter.json +35 -0
- package/src/assets/fixtures/content/copytext/copytext_video.json +126 -6
- package/src/assets/fixtures/content/copytext/copytext_webform.json +32 -30
- package/src/assets/fixtures/page/podcast/podcast_player_episode.json +4 -4
- package/src/assets/fixtures/video/videos.inc.json +8 -8
- package/src/assets/vendor/ardplayer/ardplayer-hr-7.7.0.074b3034.css +1 -0
- package/src/assets/vendor/ardplayer/ardplayer-hr-7.7.0.eeb199f0.js +1 -0
- package/src/assets/vendor/ardplayer/ardplayer-libimsc.e88e8ba8.chunk.js +12 -0
- package/src/assets/vendor/ardplayer/ardplayer-pluginchromecast.280aebab.chunk.js +1 -0
- package/src/assets/vendor/ardplayer/ardplayer-plugindash.e096df69.chunk.js +10 -0
- package/src/assets/vendor/ardplayer/ardplayer-pluginhls.33094be9.chunk.js +1 -0
- package/src/assets/vendor/ardplayer/ardplayer-pluginhtmla.084c4a0c.chunk.js +1 -0
- package/src/assets/vendor/ardplayer/ardplayer-pluginhtmlv.b0dd7eb3.chunk.js +1 -0
- package/src/assets/vendor/ardplayer/assets/c1bd5269b4ca32e4e463-ardplayer-audio.woff +0 -0
- package/src/assets/vendor/ardplayer/assets/e672be94f918ce5743ed-ardplayer.woff +0 -0
- package/src/assets/vendor/ardplayer/assets/img/3sat-316aa089.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/alpha-aa80e0b1.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/ard-7c1adb6a.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/arte-78b35a1c.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/br-91122637.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/daserste-b4a7fce0.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/deutschlandradio-8ae68d1e.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/dw-b25a6e21.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/funk-14d5562d.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/hr-f8858d2d.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/kika-cc093c6d.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/mdr-d2d11760.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/ndr-b942fbbe.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/one-bfd695dd.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/phoenix-25ae77e8.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/radiobremen-c9a22aec.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/rbb-857d0436.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/sportschau-66955185.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/sr-4d2bb786.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/swr-151e2af6.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/tagesschau24-4a1c7ee6.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/wdr-be1aba5e.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/zdf-ebb6d646.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/zdfinfo-90fdcd3b.svg +1 -0
- package/src/assets/vendor/ardplayer/assets/img/zdfneo-2fba1e20.svg +1 -0
- package/src/stories/views/components/content/copytext/components/audio.hbs +2 -2
- package/src/stories/views/components/content/copytext/components/audioeventlivestream.hbs +2 -2
- package/src/stories/views/components/content/copytext/components/common/paragraphbox_wrapper.hbs +1 -1
- package/src/stories/views/components/content/copytext/components/gallery/gallery.hbs +1 -1
- package/src/stories/views/components/content/copytext/components/image/image.hbs +6 -6
- package/src/stories/views/components/content/copytext/components/podcastepisode.hbs +1 -1
- package/src/stories/views/components/content/copytext/components/posterteaser.hbs +1 -1
- package/src/stories/views/components/content/copytext/components/video/video.hbs +2 -2
- package/src/stories/views/components/content/copytext/components/videolivestream.hbs +2 -2
- package/src/stories/views/components/content/copytext/copytext-newsletter.stories.js +20 -20
- package/src/stories/views/components/content/copytext/fixtures/copytext_audio-livestream.json +8 -8
- package/src/stories/views/components/content/copytext/fixtures/copytext_audio.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_audio_livestream.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_externalservice.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_gallery.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_image.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_livestream.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_media_components.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_newsletter.json +1 -18
- package/src/stories/views/components/content/copytext/fixtures/copytext_non_media_components.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_podcastepisode.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_video.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_video_vertical.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_webform.json +1 -1
- package/src/stories/views/components/external-service/external_service.hbs +1 -1
- package/src/stories/views/components/external-service/external_service_with_datapolicy_check.hbs +1 -1
- package/src/stories/views/components/forms/components/backgroundBox.hbs +1 -1
- package/src/stories/views/components/forms/webform.hbs +1 -1
- package/src/stories/views/components/mediaplayer/fixtures/mediaplayer.json +1 -1
- package/src/stories/views/components/mediaplayer/fixtures/mediaplayer_snapshots.json +1 -1
- package/src/stories/views/components/newsletter/newsletter.hbs +1 -1
- package/src/stories/views/components/page/fixtures/page.json +1 -1
- package/src/stories/views/components/page/podcast/fixtures/podcast_player_episode.json +1 -1
- package/src/stories/views/components/page/podcast/fixtures/podcast_player_playlist.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story_with_audio.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story_with_label.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story_with_livestream.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story_with_square_image.json +1 -1
- package/src/stories/views/components/page/story/fixtures/story_with_video.json +1 -1
- package/src/stories/views/components/pagination/fixtures/page_pagination.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_alternative_av.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_cluster.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_group_100.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_group_100_highlight.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_group_100_highlight_2.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_group_related_content_100.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_index.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_podcast.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_podcast_50.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_podcast_playlist.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_podcast_playlist_50.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_podcast_playlist_filter.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_standard_av.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_tabbox.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_ticker_alternative.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_ticker_standard.json +1 -1
- package/src/stories/views/components/teaser/fixtures/teaser_vertical_video.json +1 -1
- package/src/stories/views/components/ticker/ticker_item/content_footer_ticker_item.hbs +1 -1
- package/src/stories/views/components/voting/fixtures/voting.json +1 -1
- package/src/stories/views/components/voting/fixtures/voting_media_audio_horizontal.json +1 -1
- package/src/stories/views/components/voting/fixtures/voting_media_audio_vertical.json +1 -1
- package/src/stories/views/components/voting/fixtures/voting_media_video_horizontal.json +1 -1
- package/src/stories/views/components/voting/fixtures/voting_media_video_vertical.json +1 -1
- package/dist/assets/vendor/ardplayer/ardplayer-hr-7.2.0.07145e1b.js +0 -1
- package/dist/assets/vendor/ardplayer/ardplayer-hr-7.2.0.bdf782df.css +0 -1
- package/dist/assets/vendor/ardplayer/ardplayer-libimsc.34d59351.chunk.js +0 -12
- package/dist/assets/vendor/ardplayer/ardplayer-pluginchromecast.017a470e.chunk.js +0 -1
- package/dist/assets/vendor/ardplayer/ardplayer-plugindash.6abc107d.chunk.js +0 -10
- package/dist/assets/vendor/ardplayer/ardplayer-pluginhls.e7b33d74.chunk.js +0 -1
- package/dist/assets/vendor/ardplayer/ardplayer-pluginhtmla.7a21b373.chunk.js +0 -1
- package/dist/assets/vendor/ardplayer/ardplayer-pluginhtmlv.8e08609e.chunk.js +0 -1
- package/dist/assets/vendor/ardplayer/assets/47bf64197ce0a282ef55-ardplayer-audio.woff +0 -0
- package/dist/assets/vendor/ardplayer/assets/553e21224d0386ee58f0-ardplayer.woff +0 -0
- package/dist/assets/vendor/ardplayer/assets/img/3sat-97c7c01a.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/alpha-29b57b3e.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/ard-b0376fe1.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/arte-8a174832.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/br-1a782a5d.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/daserste-d6363449.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/deutschlandradio-100cce3c.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/dw-00fab9c1.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/funk-605fd714.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/hr-f06b736c.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/kika-5a7ddc5f.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/mdr-147ffd56.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/ndr-af21bb92.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/one-7594520c.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/phoenix-49a512ab.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/radiobremen-6ffa63ff.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/rbb-6653f6ea.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/sportschau-eaa739f1.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/sr-f5ae5aae.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/swr-3573dc63.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/tagesschau24-51c2e8ef.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/wdr-db5a40ca.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/zdf-2d26a61f.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/zdfinfo-47a13356.svg +0 -1
- package/dist/assets/vendor/ardplayer/assets/img/zdfneo-41061594.svg +0 -1
- package/src/assets/vendor/ardplayer/ardplayer-hr-7.2.0.07145e1b.js +0 -1
- package/src/assets/vendor/ardplayer/ardplayer-hr-7.2.0.bdf782df.css +0 -1
- package/src/assets/vendor/ardplayer/ardplayer-libimsc.34d59351.chunk.js +0 -12
- package/src/assets/vendor/ardplayer/ardplayer-pluginchromecast.017a470e.chunk.js +0 -1
- package/src/assets/vendor/ardplayer/ardplayer-plugindash.6abc107d.chunk.js +0 -10
- package/src/assets/vendor/ardplayer/ardplayer-pluginhls.e7b33d74.chunk.js +0 -1
- package/src/assets/vendor/ardplayer/ardplayer-pluginhtmla.7a21b373.chunk.js +0 -1
- package/src/assets/vendor/ardplayer/ardplayer-pluginhtmlv.8e08609e.chunk.js +0 -1
- package/src/assets/vendor/ardplayer/assets/47bf64197ce0a282ef55-ardplayer-audio.woff +0 -0
- package/src/assets/vendor/ardplayer/assets/553e21224d0386ee58f0-ardplayer.woff +0 -0
- package/src/assets/vendor/ardplayer/assets/img/3sat-97c7c01a.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/alpha-29b57b3e.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/ard-b0376fe1.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/arte-8a174832.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/br-1a782a5d.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/daserste-d6363449.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/deutschlandradio-100cce3c.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/dw-00fab9c1.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/funk-605fd714.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/hr-f06b736c.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/kika-5a7ddc5f.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/mdr-147ffd56.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/ndr-af21bb92.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/one-7594520c.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/phoenix-49a512ab.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/radiobremen-6ffa63ff.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/rbb-6653f6ea.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/sportschau-eaa739f1.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/sr-f5ae5aae.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/swr-3573dc63.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/tagesschau24-51c2e8ef.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/wdr-db5a40ca.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/zdf-2d26a61f.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/zdfinfo-47a13356.svg +0 -1
- package/src/assets/vendor/ardplayer/assets/img/zdfneo-41061594.svg +0 -1
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
(globalThis.webpackChunkardplayer=globalThis.webpackChunkardplayer||[]).push([[356],{21852:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=s(t),a=o[0],l=o[1],u=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,l)),f=0,c=l>0?a-4:a;for(n=0;n<c;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===l&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,u[f++]=255&e);1===l&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=16383,s=0,u=r-i;s<u;s+=a)o.push(l(t,s,s+a>u?u:s+a));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,r){for(var i,o,a=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},84030:(t,e,n)=>{"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* The buffer module from node.js, for the browser.
|
|
4
|
-
*
|
|
5
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
6
|
-
* @license MIT
|
|
7
|
-
*/var r=n(21852),i=n(48821),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},e.INSPECT_MAX_BYTES=50;var a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|g(t,e),r=s(n),i=r.write(t,e);i!==n&&(r=r.slice(0,i));return r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(j(t,Uint8Array)){var e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(j(t,ArrayBuffer)||t&&j(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(j(t,SharedArrayBuffer)||t&&j(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return l.from(r,e,n);var i=function(t){if(l.isBuffer(t)){var e=0|d(t.length),n=s(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||W(t.length)?s(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return f(t),s(t<0?0:0|d(t))}function h(t){for(var e=t.length<0?0:0|d(t.length),n=s(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function p(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,l.prototype),r}function d(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function g(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(i)return r?-1:U(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return L(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),W(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,r)),l.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){var o,a=1,s=t.length,l=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=n;o<s;o++)if(u(t,o)===u(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===l)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var c=!0,h=0;h<l;h++)if(u(t,o+h)!==u(e,h)){c=!1;break}if(c)return o}return-1}function w(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(W(s))return a;t[n+a]=s}return a}function _(t,e,n,r){return q(U(e,t.length-n),t,n,r)}function E(t,e,n,r){return q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function T(t,e,n,r){return q(B(e),t,n,r)}function N(t,e,n,r){return q(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function A(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,l,u=t[i],f=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c<=n)switch(c){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)>127&&(f=l);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(f=l);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(f=l)}null===f?(f=65533,c=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=c}return function(t){var e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=x));return n}(r)}e.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,n){return u(t,e,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(t,e,n){return function(t,e,n){return f(t),t<=0?s(t):void 0!==e?"string"==typeof n?s(t).fill(e,n):s(t).fill(e):s(t)}(t,e,n)},l.allocUnsafe=function(t){return c(t)},l.allocUnsafeSlow=function(t){return c(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(j(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),j(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=l.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(j(o,Uint8Array))i+o.length>r.length?l.from(o).copy(r,i):Uint8Array.prototype.set.call(r,o,i);else{if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},l.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?S(this,0,t):y.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(t,e,n,r,i){if(j(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(r,i),f=t.slice(e,n),c=0;c<s;++c)if(u[c]!==f[c]){o=u[c],a=f[c];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},l.prototype.indexOf=function(t,e,n){return b(this,t,e,n,!0)},l.prototype.lastIndexOf=function(t,e,n){return b(this,t,e,n,!1)},l.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":case"latin1":case"binary":return E(this,t,e,n);case"base64":return T(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function L(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function C(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function R(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=V[t[o]];return i}function I(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,n,r,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function D(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,o){return e=+e,n>>>=0,o||D(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,o){return e=+e,n>>>=0,o||D(t,0,n,8),i.write(t,e,n,r,52,8),n+8}l.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r=this.subarray(t,e);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},l.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||k(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||k(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,r){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},l.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var i=t.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=l.isBuffer(t)?t:l.from(t,r),s=a.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var P=/[^+/0-9A-Za-z-_]/g;function U(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function B(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function W(t){return t!=t}var V=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)e[r+i]=t[n]+t[i];return e}()},64250:module=>{"use strict";var t,e="object"==typeof Reflect?Reflect:null,n=e&&"function"==typeof e.apply?e.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};t=e&&"function"==typeof e.ownKeys?e.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function i(){i.init.call(this)}module.exports=i,module.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}d(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&d(t,"error",e,n)}(t,i,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function s(t){return void 0===t._maxListeners?i.defaultMaxListeners:t._maxListeners}function l(t,e,n,r){var i,o,l,u;if(a(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),l=o[e]),void 0===l)l=o[e]=n,++t._eventsCount;else if("function"==typeof l?l=o[e]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),(i=s(t))>0&&l.length>i&&!l.warned){l.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=l.length,u=f,console&&console.warn&&console.warn(u)}return t}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function c(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):p(i,i.length)}function h(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function d(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){r.once&&t.removeEventListener(e,i),n(o)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t||t<0||r(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");o=t}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||r(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[t];if(void 0===l)return!1;if("function"==typeof l)n(l,this,e);else{var u=l.length,f=p(l,u);for(r=0;r<u;++r)n(f[r],this,e)}return!0},i.prototype.addListener=function(t,e){return l(this,t,e,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(t,e){return l(this,t,e,!0)},i.prototype.once=function(t,e){return a(e),this.on(t,f(this,t,e)),this},i.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,f(this,t,e)),this},i.prototype.removeListener=function(t,e){var n,r,i,o,s;if(a(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},i.prototype.listeners=function(t){return c(this,t,!0)},i.prototype.rawListeners=function(t){return c(this,t,!1)},i.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},48821:(t,e)=>{
|
|
8
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9
|
-
e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,u=l>>1,f=-7,c=n?i-1:0,h=n?-1:1,p=t[e+c];for(c+=h,o=p&(1<<-f)-1,p>>=-f,f+=s;f>0;o=256*o+t[e+c],c+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+t[e+c],c+=h,f-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=u}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,l,u=8*o-i-1,f=(1<<u)-1,c=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+c>=1?h/l:h*Math.pow(2,1-c))*l>=2&&(a++,l/=2),a+c>=f?(s=0,a=f):a+c>=1?(s=(e*l-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[n+p]=255&a,p+=d,a/=256,u-=8);t[n+p-d]|=128*g}},51773:(t,e,n)=>{!function(t,e,n,r,i){function o(t){if("contents"in t)for(var e=("styleAttrs"in t?t.styleAttrs[r.byName.ruby.qname]:null),n="span"===t.kind&&("container"===e||"textContainer"===e||"baseContainer"===e),i=t.contents.length-1;i>=0;i--)!n||"styleAttrs"in t.contents[i]&&r.byName.ruby.qname in t.contents[i].styleAttrs?o(t.contents[i]):delete t.contents[i]}function a(t,e,n,r){var i=r&&"seq"===r.timeContainer,o=0;r&&(o=i&&n?n.end:r.begin),e.begin=e.explicit_begin?e.explicit_begin+o:o;var s=e.begin,l=null;if("sets"in e)for(var u=0;u<e.sets.length;u++)a(t,e.sets[u],l,e),s="seq"===e.timeContainer?e.sets[u].end:Math.max(s,e.sets[u].end),l=e.sets[u];if("contents"in e){if("contents"in e)for(var f=0;f<e.contents.length;f++)a(t,e.contents[f],l,e),s="seq"===e.timeContainer?e.contents[f].end:Math.max(s,e.contents[f].end),l=e.contents[f]}else s=i?e.begin:Number.POSITIVE_INFINITY;null!==e.explicit_end&&null!==e.explicit_dur?e.end=Math.min(e.begin+e.explicit_dur,o+e.explicit_end):null===e.explicit_end&&null!==e.explicit_dur?e.end=e.begin+e.explicit_dur:null!==e.explicit_end&&null===e.explicit_dur?e.end=o+e.explicit_end:e.end=s,delete e.explicit_begin,delete e.explicit_dur,delete e.explicit_end,t._registerEvent(e)}function s(t){this.node=t}function l(){this.events=[],this.head=new u,this.body=null}function u(){this.styling=new f,this.layout=new p}function f(){this.styles={},this.initials={}}function c(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function h(){this.styleAttrs=null}function p(){this.regions={}}function d(t,e){g.call(this,"image"),this.src=t,this.type=e}function g(t){this.kind=t}function y(t){this.id=t}function m(t){this.regionID=t}function b(t){this.styleAttrs=t}function v(t){this.sets=t}function w(t){this.contents=t}function _(t,e,n){this.explicit_begin=t,this.explicit_end=e,this.explicit_dur=n}function E(){g.call(this,"body")}function T(){g.call(this,"div")}function N(){g.call(this,"p")}function A(){g.call(this,"span")}function S(){g.call(this,"span")}function x(){g.call(this,"br")}function L(){}function C(){}function R(t){return t&&"xml:id"in t.attributes&&t.attributes["xml:id"].value||null}function I(t){return t&&"style"in t.attributes?t.attributes.style.value.split(" "):[]}function O(t,e){var n={};if(null!==t)for(var i in t.attributes){var o=t.attributes[i].uri+" "+t.attributes[i].local,a=r.byQName[o];if(void 0!==a){var s=a.parse(t.attributes[i].value);null!==s?(n[o]=s,a===r.byName.zIndex&&U(e,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):B(e,"Cannot parse styling attribute "+o+" --\x3e "+t.attributes[i].value)}}return n}function k(t,e,n){for(var r in t.attributes)if(t.attributes[r].uri===e&&t.attributes[r].local===n)return t.attributes[r].value;return null}function D(t,e,n){var r,i=null;return null!==(r=/^(\d+(?:\.\d+)?)f$/.exec(n))?null!==e&&(i=parseFloat(r[1])/e):null!==(r=/^(\d+(?:\.\d+)?)t$/.exec(n))?null!==t&&(i=parseFloat(r[1])/t):null!==(r=/^(\d+(?:\.\d+)?)ms$/.exec(n))?i=parseFloat(r[1])/1e3:null!==(r=/^(\d+(?:\.\d+)?)s$/.exec(n))?i=parseFloat(r[1]):null!==(r=/^(\d+(?:\.\d+)?)h$/.exec(n))?i=3600*parseFloat(r[1]):null!==(r=/^(\d+(?:\.\d+)?)m$/.exec(n))?i=60*parseFloat(r[1]):null!==(r=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(n))?i=3600*parseInt(r[1])+60*parseInt(r[2])+parseFloat(r[3]):null!==(r=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(n))&&null!==e&&(i=3600*parseInt(r[1])+60*parseInt(r[2])+parseInt(r[3])+(null===r[4]?0:parseInt(r[4])/e)),i}function M(t,e,n){for(;e.styleRefs.length>0;){var r=e.styleRefs.pop();r in t.styles?(M(t,t.styles[r],n),P(t.styles[r].styleAttrs,e.styleAttrs)):B(n,"Non-existant style id referenced")}}function F(t,e,n,r){for(var i=e.length-1;i>=0;i--){var o=e[i];o in t.styles?P(t.styles[o].styleAttrs,n):B(r,"Non-existant style id referenced")}}function P(t,e){for(var n in t)t.hasOwnProperty(n)&&(n in e||(e[n]=t[n]))}function U(t,e){if(t&&t.warn&&t.warn(e))throw e}function B(t,e){if(t&&t.error&&t.error(e))throw e}function q(t,e){throw t&&t.fatal&&t.fatal(e),e}function j(t,e){for(var n,r=0,i=t.length-1;r<=i;){var o=t[n=Math.floor((r+i)/2)];if(o<e)r=n+1;else{if(!(o>e))return{found:!0,index:n};i=n-1}}return{found:!1,index:r}}t.fromXML=function(t,i,g){var y=e.parser(!0,{xmlns:!0}),m=[],b=[],v=[],w=0,_=null;y.onclosetag=function(t){if(m[0]instanceof L)null!==_.head&&null!==_.head.styling&&F(_.head.styling,m[0].styleRefs,m[0].styleAttrs,i),delete m[0].styleRefs;else if(m[0]instanceof f)for(var e in m[0].styles)m[0].styles.hasOwnProperty(e)&&M(m[0],m[0].styles[e],i);else if(m[0]instanceof N||m[0]instanceof A){if(m[0].contents.length>1){var r,o=[m[0].contents[0]];for(r=1;r<m[0].contents.length;r++)m[0].contents[r]instanceof S&&o[o.length-1]instanceof S?o[o.length-1].text+=m[0].contents[r].text:o.push(m[0].contents[r]);m[0].contents=o}m[0]instanceof A&&1===m[0].contents.length&&m[0].contents[0]instanceof S&&(m[0].text=m[0].contents[0].text,delete m[0].contents)}else m[0]instanceof s&&(m[0].node.uri===n.ns_tt&&"metadata"===m[0].node.local?w--:w>0&&g&&"onCloseTag"in g&&g.onCloseTag());v.shift(),b.shift(),m.shift()},y.ontext=function(t){if(void 0===m[0]);else if(m[0]instanceof A||m[0]instanceof N){if(m[0]instanceof A){var e=m[0].styleAttrs[r.byName.ruby.qname];if("container"===e||"textContainer"===e||"baseContainer"===e)return}var n=new S;n.initFromText(_,m[0],t,b[0],v[0],i),m[0].contents.push(n)}else m[0]instanceof s&&w>0&&g&&"onText"in g&&g.onText(t)},y.onopentag=function(t){var e=t.attributes["xml:space"];e?v.unshift(e.value):0===v.length?v.unshift("default"):v.unshift(v[0]);var o=t.attributes["xml:lang"];if(o?b.unshift(o.value):0===b.length?b.unshift(""):b.unshift(b[0]),t.uri===n.ns_tt)if("tt"===t.local)null!==_&&q(i,"Two <tt> elements at ("+this.line+","+this.column+")"),(_=new l).initFromNode(t,b[0],i),m.unshift(_);else if("head"===t.local)m[0]instanceof l||q(i,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),m.unshift(_.head);else if("styling"===t.local)m[0]instanceof u||q(i,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),m.unshift(_.head.styling);else if("style"===t.local){var a;m[0]instanceof f?((a=new c).initFromNode(t,i),a.id?_.head.styling.styles[a.id]=a:B(i,"<style> element missing @id attribute"),m.unshift(a)):m[0]instanceof L?((a=new c).initFromNode(t,i),P(a.styleAttrs,m[0].styleAttrs),m.unshift(a)):q(i,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("initial"===t.local){var y;if(m[0]instanceof f){for(var S in(y=new h).initFromNode(t,i),y.styleAttrs)y.styleAttrs.hasOwnProperty(S)&&(_.head.styling.initials[S]=y.styleAttrs[S]);m.unshift(y)}else q(i,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if("layout"===t.local)m[0]instanceof u||q(i,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),m.unshift(_.head.layout);else if("region"===t.local){m[0]instanceof p||q(i,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var R=new L;R.initFromNode(_,t,b[0],i),!R.id||R.id in _.head.layout.regions?B(i,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):_.head.layout.regions[R.id]=R,m.unshift(R)}else if("body"===t.local){m[0]instanceof l||q(i,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==_.body&&q(i,"Second <body> element at "+this.line+","+this.column+")");var I=new E;I.initFromNode(_,t,b[0],i),_.body=I,m.unshift(I)}else if("div"===t.local){m[0]instanceof T||m[0]instanceof E||q(i,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var O=new T;O.initFromNode(_,m[0],t,b[0],i);var k=O.styleAttrs[r.byName.backgroundImage.qname];k&&(O.contents.push(new d(k)),delete O.styleAttrs[r.byName.backgroundImage.qname]),m[0].contents.push(O),m.unshift(O)}else if("image"===t.local){m[0]instanceof T||q(i,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var D=new d;D.initFromNode(_,m[0],t,b[0],i),m[0].contents.push(D),m.unshift(D)}else if("p"===t.local){m[0]instanceof T||q(i,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var M=new N;M.initFromNode(_,m[0],t,b[0],i),m[0].contents.push(M),m.unshift(M)}else if("span"===t.local){m[0]instanceof A||m[0]instanceof N||q(i,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var F=new A;F.initFromNode(_,m[0],t,b[0],v[0],i),m[0].contents.push(F),m.unshift(F)}else if("br"===t.local){m[0]instanceof A||m[0]instanceof N||q(i,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var U=new x;U.initFromNode(_,m[0],t,b[0],i),m[0].contents.push(U),m.unshift(U)}else if("set"===t.local){m[0]instanceof A||m[0]instanceof N||m[0]instanceof T||m[0]instanceof E||m[0]instanceof L||m[0]instanceof x||q(i,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var j=new C;j.initFromNode(_,m[0],t,i),m[0].sets.push(j),m.unshift(j)}else m.unshift(new s(t));else m.unshift(new s(t));if(m[0]instanceof s)if(t.uri===n.ns_tt&&"metadata"===t.local)w++;else if(w>0&&g&&"onOpenTag"in g){var W=[];for(var V in t.attributes)W[t.attributes[V].uri+" "+t.attributes[V].local]={uri:t.attributes[V].uri,local:t.attributes[V].local,value:t.attributes[V].value};g.onOpenTag(t.uri,t.local,W)}},y.write(t).close(),delete _.head.styling.styles;var R=!1;for(var I in _.head.layout.regions)if(_.head.layout.regions.hasOwnProperty(I)){R=!0;break}if(!R){var O=L.prototype.createDefaultRegion(_.lang);_.head.layout.regions[O.id]=O}for(var k in _.head.layout.regions)_.head.layout.regions.hasOwnProperty(k)&&a(_,_.head.layout.regions[k],null,null);return _.body&&a(_,_.body,null,null),_.body&&o(_.body),_},l.prototype.initFromNode=function(t,e,r){var o=function(t,e){var r=k(t,n.ns_ttp,"cellResolution"),i=15,o=32;if(null!==r){var a=/(\d+) (\d+)/.exec(r);null!==a?(o=parseInt(a[1]),i=parseInt(a[2])):U(e,"Malformed cellResolution value (using initial value instead)")}return{w:o,h:i}}(t,r);this.cellLength={h:new i.ComputedLength(0,1/o.h),w:new i.ComputedLength(1/o.w,0)};var a=function(t,e){var r,i=k(t,n.ns_ttp,"frameRate"),o=30;if(null!==i){null!==(r=/(\d+)/.exec(i))?o=parseInt(r[1]):U(e,"Malformed frame rate attribute (using initial value instead)")}var a=k(t,n.ns_ttp,"frameRateMultiplier"),s=1;if(null!==a){null!==(r=/(\d+) (\d+)/.exec(a))?s=parseInt(r[1])/parseInt(r[2]):U(e,"Malformed frame rate multiplier attribute (using initial value instead)")}var l=s*o,u=1,f=k(t,n.ns_ttp,"tickRate");if(null===f)null!==i&&(u=l);else{null!==(r=/(\d+)/.exec(f))?u=parseInt(r[1]):U(e,"Malformed tick rate attribute (using initial value instead)")}return{effectiveFrameRate:l,tickRate:u}}(t,r);this.effectiveFrameRate=a.effectiveFrameRate,this.tickRate=a.tickRate,this.aspectRatio=function(t,e){var r=k(t,n.ns_ittp,"aspectRatio");null===r&&(r=k(t,n.ns_ttp,"displayAspectRatio"));var i=null;if(null!==r){var o=/(\d+)\s+(\d+)/.exec(r);if(null!==o){var a=parseInt(o[1]),s=parseInt(o[2]);0!==a&&0!==s?i=a/s:B(e,"Illegal aspectRatio values (ignoring)")}else B(e,"Malformed aspectRatio attribute (ignoring)")}return i}(t,r);var s=k(t,n.ns_ttp,"timeBase");null!==s&&"media"!==s&&q(r,"Unsupported time base");var l=function(t,e){var r=k(t,n.ns_tts,"extent");if(null===r)return null;var o=r.split(" ");if(2!==o.length)return U(e,"Malformed extent (ignoring)"),null;var a=i.parseLength(o[0]),s=i.parseLength(o[1]);if(!s||!a)return U(e,"Malformed extent values (ignoring)"),null;return{h:s,w:a}}(t,r);null===l?this.pxLength={h:null,w:null}:("px"===l.h.unit&&"px"===l.w.unit||q(r,"Extent on TT must be in px or absent"),this.pxLength={h:new i.ComputedLength(0,1/l.h.value),w:new i.ComputedLength(1/l.w.value,0)}),this.dimensions={h:new i.ComputedLength(0,1),w:new i.ComputedLength(1,0)},this.lang=e},l.prototype._registerEvent=function(t){if(!(t.end<=t.begin)){var e=j(this.events,t.begin);if(e.found||this.events.splice(e.index,0,t.begin),t.end!==Number.POSITIVE_INFINITY){var n=j(this.events,t.end);n.found||this.events.splice(n.index,0,t.end)}}},l.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},l.prototype.getMediaTimeEvents=function(){return this.events},c.prototype.initFromNode=function(t,e){this.id=R(t),this.styleAttrs=O(t,e),this.styleRefs=I(t)},h.prototype.initFromNode=function(t,e){for(var r in this.styleAttrs={},t.attributes)if(t.attributes[r].uri===n.ns_itts||t.attributes[r].uri===n.ns_ebutts||t.attributes[r].uri===n.ns_tts){var i=t.attributes[r].uri+" "+t.attributes[r].local;this.styleAttrs[i]=t.attributes[r].value}},d.prototype.initFromNode=function(t,e,n,r,i){this.src="src"in n.attributes?n.attributes.src.value:null,this.src||B(i,"Invalid image@src attribute"),this.type="type"in n.attributes?n.attributes.type.value:null,this.type||B(i,"Invalid image@type attribute"),b.prototype.initFromNode.call(this,t,e,n,i),_.prototype.initFromNode.call(this,t,e,n,i),v.prototype.initFromNode.call(this,t,e,n,i),m.prototype.initFromNode.call(this,t,e,n,i),this.lang=r},y.prototype.initFromNode=function(t,e,n,r){this.id=R(n)},m.prototype.initFromNode=function(t,e,n,r){this.regionID=function(t){return t&&"region"in t.attributes?t.attributes.region.value:""}(n)},b.prototype.initFromNode=function(t,e,n,r){this.styleAttrs=O(n,r),null!==t.head&&null!==t.head.styling&&F(t.head.styling,I(n),this.styleAttrs,r)},v.prototype.initFromNode=function(t,e,n,r){this.sets=[]},w.prototype.initFromNode=function(t,e,n,r){this.contents=[]},_.prototype.initFromNode=function(t,e,n,r){var i=function(t,e,n,r){var i=null;n&&"begin"in n.attributes&&null===(i=D(t.tickRate,t.effectiveFrameRate,n.attributes.begin.value))&&U(r,"Malformed begin value "+n.attributes.begin.value+" (using 0)");var o=null;n&&"dur"in n.attributes&&null===(o=D(t.tickRate,t.effectiveFrameRate,n.attributes.dur.value))&&U(r,"Malformed dur value "+n.attributes.dur.value+" (ignoring)");var a=null;n&&"end"in n.attributes&&null===(a=D(t.tickRate,t.effectiveFrameRate,n.attributes.end.value))&&U(r,"Malformed end value (ignoring)");return{explicit_begin:i,explicit_end:a,explicit_dur:o}}(t,0,n,r);this.explicit_begin=i.explicit_begin,this.explicit_end=i.explicit_end,this.explicit_dur=i.explicit_dur,this.timeContainer=function(t,e){var n=t&&"timeContainer"in t.attributes?t.attributes.timeContainer.value:null;return n&&"par"!==n?"seq"===n?"seq":(B(e,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}(n,r)},E.prototype.initFromNode=function(t,e,n,r){b.prototype.initFromNode.call(this,t,null,e,r),_.prototype.initFromNode.call(this,t,null,e,r),v.prototype.initFromNode.call(this,t,null,e,r),m.prototype.initFromNode.call(this,t,null,e,r),w.prototype.initFromNode.call(this,t,null,e,r),this.lang=n},T.prototype.initFromNode=function(t,e,n,r,i){b.prototype.initFromNode.call(this,t,e,n,i),_.prototype.initFromNode.call(this,t,e,n,i),v.prototype.initFromNode.call(this,t,e,n,i),m.prototype.initFromNode.call(this,t,e,n,i),w.prototype.initFromNode.call(this,t,e,n,i),this.lang=r},N.prototype.initFromNode=function(t,e,n,r,i){b.prototype.initFromNode.call(this,t,e,n,i),_.prototype.initFromNode.call(this,t,e,n,i),v.prototype.initFromNode.call(this,t,e,n,i),m.prototype.initFromNode.call(this,t,e,n,i),w.prototype.initFromNode.call(this,t,e,n,i),this.lang=r},A.prototype.initFromNode=function(t,e,n,r,i,o){b.prototype.initFromNode.call(this,t,e,n,o),_.prototype.initFromNode.call(this,t,e,n,o),v.prototype.initFromNode.call(this,t,e,n,o),m.prototype.initFromNode.call(this,t,e,n,o),w.prototype.initFromNode.call(this,t,e,n,o),this.space=i,this.lang=r},S.prototype.initFromText=function(t,e,n,r,i,o){_.prototype.initFromNode.call(this,t,e,null,o),this.text=n,this.space=i,this.lang=r},x.prototype.initFromNode=function(t,e,n,r,i){m.prototype.initFromNode.call(this,t,e,n,i),_.prototype.initFromNode.call(this,t,e,n,i),this.lang=r},L.prototype.createDefaultRegion=function(t){var e=new L;return y.call(e,""),b.call(e,{}),v.call(e,[]),_.call(e,0,Number.POSITIVE_INFINITY,null),this.lang=t,e},L.prototype.initFromNode=function(t,e,n,r){y.prototype.initFromNode.call(this,t,null,e,r),_.prototype.initFromNode.call(this,t,null,e,r),v.prototype.initFromNode.call(this,t,null,e,r),this.styleAttrs=O(e,r),this.styleRefs=I(e),this.lang=n},C.prototype.initFromNode=function(t,e,n,r){_.prototype.initFromNode.call(this,t,e,n,r);var i=O(n,r);for(var o in this.qname=null,this.value=null,i)if(i.hasOwnProperty(o)){if(this.qname){B(r,"More than one style specified on set");break}this.qname=o,this.value=i[o]}}}(e,"undefined"==typeof sax?n(20321):sax,"undefined"==typeof imscNames?n(26899):imscNames,"undefined"==typeof imscStyles?n(86665):imscStyles,"undefined"==typeof imscUtils?n(13874):imscUtils)},14618:(t,e,n)=>{var r=/firefox/i.test(navigator.userAgent);!function(t,e,n){function i(t,e,c,p){var d;if("region"===c.kind)(d=document.createElement("div")).style.position="absolute";else if("body"===c.kind)d=document.createElement("div");else if("div"===c.kind)d=document.createElement("div");else if("image"===c.kind){if(d=document.createElement("img"),null!==t.imgResolver&&null!==c.src){var m=t.imgResolver(c.src,d);m&&(d.src=m),d.height=t.regionH,d.width=t.regionW}}else if("p"===c.kind)d=document.createElement("p");else if("span"===c.kind)if("container"===c.styleAttrs[n.byName.ruby.qname])d=document.createElement("ruby"),t.ruby=!0;else if("base"===c.styleAttrs[n.byName.ruby.qname])d=document.createElement("span");else if("text"===c.styleAttrs[n.byName.ruby.qname])d=document.createElement("rt");else if("baseContainer"===c.styleAttrs[n.byName.ruby.qname])d=document.createElement("rbc");else if("textContainer"===c.styleAttrs[n.byName.ruby.qname])d=document.createElement("rtc");else{if("delimiter"===c.styleAttrs[n.byName.ruby.qname])return;d=document.createElement("span")}else"br"===c.kind&&(d=document.createElement("br"));if(d){if(c.lang&&("region"!==c.kind&&c.lang===p.lang||(d.lang=c.lang)),e.appendChild(d),d.style.margin="0","region"===c.kind){var w=c.styleAttrs[n.byName.writingMode.qname];"lrtb"===w||"lr"===w?(t.ipd="lr",t.bpd="tb"):"rltb"===w||"rl"===w?(t.ipd="rl",t.bpd="tb"):"tblr"===w?(t.ipd="tb",t.bpd="lr"):"tbrl"!==w&&"tb"!==w||(t.ipd="tb",t.bpd="rl")}else if("p"===c.kind&&"tb"===t.bpd){var _=c.styleAttrs[n.byName.direction.qname];t.ipd="ltr"===_?"lr":"rl"}for(var E=0;E<h.length;E++){var T=h[E],N=c.styleAttrs[T.qname];void 0!==N&&null!==T.map&&T.map(t,d,c,N)}var A=d,S=c.styleAttrs[n.byName.linePadding.qname];if(S&&!S.isZero()){var x=S.toUsedLength(t.w,t.h);if(x>0){var L=Math.ceil(x)+"px";"tb"===t.bpd?(A.style.paddingLeft=L,A.style.paddingRight=L):(A.style.paddingTop=L,A.style.paddingBottom=L),t.lp=S}}var C=c.styleAttrs[n.byName.multiRowAlign.qname];if(C&&"auto"!==C){var R=document.createElement("span");R.style.display="inline-block",R.style.textAlign=C,d.appendChild(R),A=R,t.mra=C}var I=c.styleAttrs[n.byName.rubyReserve.qname];if(I&&"none"!==I[0]&&(t.rubyReserve=I),c.styleAttrs[n.byName.fillLineGap.qname]&&(t.flg=!0),"span"===c.kind&&c.text){var O=c.styleAttrs[n.byName.textEmphasis.qname];if(O&&"none"!==O.style&&(t.textEmphasis=!0),n.byName.textCombine.qname in c.styleAttrs&&"all"===c.styleAttrs[n.byName.textCombine.qname])d.textContent=c.text,d._isd_element=c,O&&f(t,d,c,O);else for(var k="",D=0;D<c.text.length;D++){k+=c.text.charAt(D);var M=c.text.charCodeAt(D);if(M<55296||M>56319||D===c.text.length-1){var F=document.createElement("span");F.textContent=k,O&&f(t,F,c,O),d.appendChild(F),k="",F._isd_element=c}}}if("contents"in c)for(var P=0;P<c.contents.length;P++)i(t,A,c.contents[P],c);var U=[];if("p"===c.kind&&(u(t,A,U,null),t.rubyReserve&&(!function(t,e){for(var n=0;n<t.length;n++){var r,i,o=document.createElement("ruby"),a=document.createElement("span");a.textContent="",o.appendChild(a);var s,l=e.rubyReserve[1].toUsedLength(e.w,e.h)+"px";if("both"===e.rubyReserve[0]||"outside"===e.rubyReserve[0]&&1==t.length)(r=document.createElement("rtc")).style[y]=g?"after":"under",r.textContent="",r.style.fontSize=l,(i=document.createElement("rtc")).style[y]=g?"before":"over",i.textContent="",i.style.fontSize=l,o.appendChild(r),o.appendChild(i);else(r=document.createElement("rtc")).textContent="",r.style.fontSize=l,s="after"===e.rubyReserve[0]||"outside"===e.rubyReserve[0]&&n>0?g?"after":"tb"===e.bpd||"rl"===e.bpd?"under":"over":g?"before":"tb"===e.bpd||"rl"===e.bpd?"over":"under",r.style[y]=s,o.appendChild(r);for(var u=null,f=0;f<t[n].rbc.length;f++)if("ruby"===t[n].rbc[f].localName){u=t[n].rbc[f];for(var c=0;c<u.style.length;c++)o.style.setProperty(u.style.item(c),u.style.getPropertyValue(u.style.item(c)));break}(u=u||t[n].elements[0].node).parentElement.insertBefore(o,u)}}(U,t),t.rubyReserve=null),(t.ruby||t.rubyReserve)&&(!function(t,e){for(var n=0;n<t.length;n++)for(var r=0;r<t[n].rbc.length;r++){var i;if(!t[n].rbc[r].style[y])i=g?0===n?"before":"after":"tb"===e.bpd||"rl"===e.bpd?0===n?"over":"under":0===n?"under":"over",t[n].rbc[r].style[y]=i}}(U,t),t.ruby=null),t.textEmphasis&&(!function(t,e){for(var n=0;n<t.length;n++)for(var r=0;r<t[n].te.length;r++){var i;if(!t[n].te[r].style[b]||"none"===t[n].te[r].style[b])i="tb"===e.bpd?0===n?"left over":"left under":"rl"===e.bpd?0===n?"right under":"left under":0===n?"left under":"right under",t[n].te[r].style[b]=i}}(U,t),t.textEmphasis=null),t.mra&&(!function(t){for(var e=0;e<t.length-1;e++){var n=t[e].elements.length;if(0!==n&&!1===t[e].br){var r=document.createElement("br"),i=t[e].elements[n-1].node;i.parentElement.insertBefore(r,i.nextSibling)}}}(U),t.mra=null),t.lp&&(!function(t,e,n){if(null===t)return;for(var i=0;i<t.length;i++){var o=t[i].elements.length,a=Math.ceil(e)+"px",s="-"+Math.ceil(e)+"px";if(0!==o){var l=t[i].elements[t[i].start_elem],u=t[i].elements[t[i].end_elem];if(l===u){var f=l.node.getBoundingClientRect();if(0==f.width||0==f.height)continue}"lr"===n.ipd?(l.node.style.marginLeft=s,l.node.style.paddingLeft=a):"rl"===n.ipd?(l.node.style.paddingRight=a,l.node.style.marginRight=s):"tb"===n.ipd&&(l.node.style.paddingTop=a,l.node.style.marginTop=s),"lr"===n.ipd?(r||(u.node.style.marginRight=s),u.node.style.paddingRight=a):"rl"===n.ipd?(u.node.style.paddingLeft=a,r||(u.node.style.marginLeft=s)):"tb"===n.ipd&&(u.node.style.paddingBottom=a,u.node.style.marginBottom=s)}}}(U,t.lp.toUsedLength(t.w,t.h),t),t.lp=null),function(t,e){for(var n=0;n<t.length;n++)for(var r=t[n],i=1;i<r.elements.length;){var s=r.elements[i-1],l=r.elements[i];a(s.node,l.node,e)?r.elements.splice(i,1):i++}for(var u,f,c=[],h=0;h<t.length;h++)for(var p=0;p<t[h].elements.length;p++)(f=o(u=t[h].elements[p].node,c,!1))&&(u.style.backgroundColor=f);for(var d=0;d<c.length;d++)c[d].style.backgroundColor=""}(U,t),t.flg)){var B=l(A.getBoundingClientRect(),t);!function(t,e,n,r,i){for(var o=Math.sign(n-e),a=0;a<=t.length;a++){var s,l,u,f;if(s=0===a?Math.round(e):a===t.length?Math.round(n):Math.round((t[a-1].after+t[a].before)/2),a>0&&t[a-1])for(u=0;u<t[a-1].elements.length;u++)l=o*(s-(f=t[a-1].elements[u]).after)+"px","lr"===r.bpd?f.node.style.paddingRight=l:"rl"===r.bpd?f.node.style.paddingLeft=l:"tb"===r.bpd&&(f.node.style.paddingBottom=l);if(a<t.length)for(u=0;u<t[a].elements.length;u++)l=o*((f=t[a].elements[u]).before-s)+"px","lr"===r.bpd?f.node.style.paddingLeft=l:"rl"===r.bpd?f.node.style.paddingRight=l:"tb"===r.bpd&&(f.node.style.paddingTop=l)}}(U,B.before,B.after,t),t.flg=null}if("region"===c.kind&&"tb"===t.bpd&&t.enableRollUp&&c.contents.length>0&&"after"===c.styleAttrs[n.byName.displayAlign.qname]){u(t,A,U,null);var q=new s(""===c.id?"_":c.id,U);if(t.currentISDState[q.id]=q,t.previousISDState&&q.id in t.previousISDState&&t.previousISDState[q.id].plist.length>0&&q.plist.length>1&&q.plist[q.plist.length-2].text===t.previousISDState[q.id].plist[t.previousISDState[q.id].plist.length-1].text){var j=d.firstElementChild,W=q.plist[q.plist.length-1].after-q.plist[q.plist.length-1].before;j.style.bottom="-"+W+"px",j.style.transition="transform 0.4s",j.style.position="relative",j.style.transform="translateY(-"+W+"px)"}}}else v(t.errorHandler,"Error processing ISD element kind: "+c.kind)}function o(t,e,n){return t.style.backgroundColor?(n&&!e.includes(t)&&e.push(t),t.style.backgroundColor):"SPAN"===t.parentElement.nodeName||"RUBY"===t.parentElement.nodeName||"RBC"===t.parentElement.nodeName||"RTC"===t.parentElement.nodeName||"RT"===t.parentElement.nodeName?o(t.parentElement,e,!0):void 0}function a(t,e,n){if("SPAN"===t.tagName&&"SPAN"===e.tagName&&t._isd_element===e._isd_element){if(!t._isd_element)return v(n.errorHandler,"Internal error: HTML span is not linked to a source element; cannot merge spans."),!1;t.textContent+=e.textContent;for(var r=0;r<e.style.length;r++){var i=e.style[r];(i.indexOf("border")>=0||i.indexOf("padding")>=0||i.indexOf("margin")>=0)&&(t.style[i]=e.style[i])}return e.parentElement.removeChild(e),!0}return!1}function s(t,e){this.id=t,this.plist=e}function l(t,e){var n={before:null,after:null,start:null,end:null};return"tb"===e.bpd?(n.before=t.top,n.after=t.bottom,"lr"===e.ipd?(n.start=t.left,n.end=t.right):(n.start=t.right,n.end=t.left)):"lr"===e.bpd?(n.before=t.left,n.after=t.right,n.start=t.top,n.end=t.bottom):"rl"===e.bpd&&(n.before=t.right,n.after=t.left,n.start=t.top,n.end=t.bottom),n}function u(t,e,n,r){if("rt"!==e.localName&&"rtc"!==e.localName){var i,o,a,s,f=e.style.backgroundColor||r;if(0===e.childElementCount)if("span"===e.localName||"rb"===e.localName){var c=l(e.getBoundingClientRect(),t);if(0!==n.length&&(i=c.before,o=c.after,a=n[n.length-1].before,s=n[n.length-1].after,o<s&&i>a||s<=o&&a>=i)){var h=Math.sign(c.after-c.before),p=Math.sign(c.end-c.start);h*(c.before-n[n.length-1].before)<0&&(n[n.length-1].before=c.before),h*(c.after-n[n.length-1].after)>0&&(n[n.length-1].after=c.after),p*(c.start-n[n.length-1].start)<0&&(n[n.length-1].start=c.start,n[n.length-1].start_elem=n[n.length-1].elements.length),p*(c.end-n[n.length-1].end)>0&&(n[n.length-1].end=c.end,n[n.length-1].end_elem=n[n.length-1].elements.length)}else n.push({before:c.before,after:c.after,start:c.start,end:c.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});n[n.length-1].text+=e.textContent,n[n.length-1].elements.push({node:e,bgcolor:f,before:c.before,after:c.after})}else"br"===e.localName&&0!==n.length&&(n[n.length-1].br=!0);else for(var d=e.firstChild;d;)d.nodeType===Node.ELEMENT_NODE&&(u(t,d,n,f),"ruby"===d.localName||"rtc"===d.localName?n.length>0&&n[n.length-1].rbc.push(d):"span"===d.localName&&d.style[m]&&"none"!==d.style[m]&&n.length>0&&n[n.length-1].te.push(d)),d=d.nextSibling}}function f(t,e,n,r){var i;"none"!==r.style&&("auto"===r.style?e.style[m]="filled":e.style[m]=r.style+" "+r.symbol,("before"===r.position||"after"===r.position)&&(i="tb"===t.bpd?"before"===r.position?"left over":"left under":"rl"===t.bpd?"before"===r.position?"right under":"left under":"before"===r.position?"left under":"right under",e.style[b]=i))}function c(t,e){this.qname=t,this.map=e}t.render=function(t,e,n,r,o,a,s,l,u){var f=r||e.clientHeight,c=o||e.clientWidth;if(null!==t.aspectRatio){var h=f*t.aspectRatio;h>c?f=Math.round(c/t.aspectRatio):c=h}var p=document.createElement("div");p.style.position="relative",p.style.width=c+"px",p.style.height=f+"px",p.style.margin="auto",p.style.top=0,p.style.bottom=0,p.style.left=0,p.style.right=0,p.style.zIndex=0;var d={h:f,w:c,regionH:null,regionW:null,imgResolver:n,displayForcedOnlyMode:a||!1,isd:t,errorHandler:s,previousISDState:l,enableRollUp:u||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};if(e.appendChild(p),"contents"in t)for(var g=0;g<t.contents.length;g++)i(d,p,t.contents[g],t);return d.currentISDState};for(var h=[new c("http://www.w3.org/ns/ttml#styling backgroundColor",(function(t,e,n,r){0!==r[3]&&(e.style.backgroundColor="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")")})),new c("http://www.w3.org/ns/ttml#styling color",(function(t,e,n,r){e.style.color="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")"})),new c("http://www.w3.org/ns/ttml#styling direction",(function(t,e,n,r){e.style.direction=r})),new c("http://www.w3.org/ns/ttml#styling display",(function(t,e,n,r){})),new c("http://www.w3.org/ns/ttml#styling displayAlign",(function(t,e,n,r){e.style.display="flex",e.style.flexDirection="column","before"===r?e.style.justifyContent="flex-start":"center"===r?e.style.justifyContent="center":"after"===r&&(e.style.justifyContent="flex-end")})),new c("http://www.w3.org/ns/ttml#styling extent",(function(t,e,n,r){t.regionH=r.h.toUsedLength(t.w,t.h),t.regionW=r.w.toUsedLength(t.w,t.h);var i=0,o=0,a=n.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];a&&(i=a[0].toUsedLength(t.w,t.h)+a[2].toUsedLength(t.w,t.h),o=a[1].toUsedLength(t.w,t.h)+a[3].toUsedLength(t.w,t.h)),e.style.height=t.regionH-i+"px",e.style.width=t.regionW-o+"px"})),new c("http://www.w3.org/ns/ttml#styling fontFamily",(function(t,e,n,r){for(var i=[],o=0;o<r.length;o++)r[o]=r[o].trim(),"monospaceSerif"===r[o]?(i.push("Courier New"),i.push('"Liberation Mono"'),i.push("Courier"),i.push("monospace")):"proportionalSansSerif"===r[o]?(i.push("Arial"),i.push("Helvetica"),i.push('"Liberation Sans"'),i.push("sans-serif")):"monospace"===r[o]?i.push("monospace"):"sansSerif"===r[o]?i.push("sans-serif"):"serif"===r[o]?i.push("serif"):"monospaceSansSerif"===r[o]?(i.push("Consolas"),i.push("monospace")):"proportionalSerif"===r[o]?i.push("serif"):i.push(r[o]);if(i.length>0){for(var a=[i[0]],s=1;s<i.length;s++)-1==a.indexOf(i[s])&&a.push(i[s]);i=a}e.style.fontFamily=i.join(",")})),new c("http://www.w3.org/ns/ttml#styling shear",(function(t,e,n,r){if(0!==r){var i=-.9*r;"tb"===t.bpd?e.style.transform="skewX("+i+"deg)":e.style.transform="skewY("+i+"deg)"}})),new c("http://www.w3.org/ns/ttml#styling fontSize",(function(t,e,n,r){e.style.fontSize=r.toUsedLength(t.w,t.h)+"px"})),new c("http://www.w3.org/ns/ttml#styling fontStyle",(function(t,e,n,r){e.style.fontStyle=r})),new c("http://www.w3.org/ns/ttml#styling fontWeight",(function(t,e,n,r){e.style.fontWeight=r})),new c("http://www.w3.org/ns/ttml#styling lineHeight",(function(t,e,n,r){e.style.lineHeight="normal"===r?"normal":r.toUsedLength(t.w,t.h)+"px"})),new c("http://www.w3.org/ns/ttml#styling opacity",(function(t,e,n,r){e.style.opacity=r})),new c("http://www.w3.org/ns/ttml#styling origin",(function(t,e,n,r){e.style.top=r.h.toUsedLength(t.w,t.h)+"px",e.style.left=r.w.toUsedLength(t.w,t.h)+"px"})),new c("http://www.w3.org/ns/ttml#styling overflow",(function(t,e,n,r){e.style.overflow=r})),new c("http://www.w3.org/ns/ttml#styling padding",(function(t,e,n,r){var i=[];i[0]=r[0].toUsedLength(t.w,t.h)+"px",i[1]=r[3].toUsedLength(t.w,t.h)+"px",i[2]=r[2].toUsedLength(t.w,t.h)+"px",i[3]=r[1].toUsedLength(t.w,t.h)+"px",e.style.padding=i.join(" ")})),new c("http://www.w3.org/ns/ttml#styling position",(function(t,e,n,r){e.style.top=r.h.toUsedLength(t.w,t.h)+"px",e.style.left=r.w.toUsedLength(t.w,t.h)+"px"})),new c("http://www.w3.org/ns/ttml#styling rubyAlign",(function(t,e,n,r){e.style.rubyAlign="spaceAround"===r?"space-around":"center"})),new c("http://www.w3.org/ns/ttml#styling rubyPosition",(function(t,e,n,r){var i;"before"!==r&&"after"!==r||(i=g?r:"tb"===t.bpd||"rl"===t.bpd?"before"===r?"over":"under":"before"===r?"under":"over",e.parentElement.style[y]=i)})),new c("http://www.w3.org/ns/ttml#styling showBackground",null),new c("http://www.w3.org/ns/ttml#styling textAlign",(function(t,e,n,r){var i;i="start"===r?"rl"===t.ipd?"right":"left":"end"===r?"rl"===t.ipd?"left":"right":r,e.style.textAlign=i})),new c("http://www.w3.org/ns/ttml#styling textDecoration",(function(t,e,n,r){e.style.textDecoration=r.join(" ").replace("lineThrough","line-through")})),new c("http://www.w3.org/ns/ttml#styling textOutline",(function(t,e,n,r){})),new c("http://www.w3.org/ns/ttml#styling textShadow",(function(t,e,r,i){var o=r.styleAttrs[n.byName.textOutline.qname];if("none"===i&&"none"===o)e.style.textShadow="";else{var a=[];if("none"!==o){var s="rgba("+o.color[0].toString()+","+o.color[1].toString()+","+o.color[2].toString()+","+(o.color[3]/255).toString()+")";a.push("1px 1px 1px "+s),a.push("-1px 1px 1px "+s),a.push("1px -1px 1px "+s),a.push("-1px -1px 1px "+s)}if("none"!==i)for(var l=0;l<i.length;l++)a.push(i[l].x_off.toUsedLength(t.w,t.h)+"px "+i[l].y_off.toUsedLength(t.w,t.h)+"px "+i[l].b_radius.toUsedLength(t.w,t.h)+"px rgba("+i[l].color[0].toString()+","+i[l].color[1].toString()+","+i[l].color[2].toString()+","+(i[l].color[3]/255).toString()+")");e.style.textShadow=a.join(",")}})),new c("http://www.w3.org/ns/ttml#styling textCombine",(function(t,e,n,r){e.style.textCombineUpright=r})),new c("http://www.w3.org/ns/ttml#styling textEmphasis",(function(t,e,n,r){})),new c("http://www.w3.org/ns/ttml#styling unicodeBidi",(function(t,e,n,r){var i;i="bidiOverride"===r?"bidi-override":r,e.style.unicodeBidi=i})),new c("http://www.w3.org/ns/ttml#styling visibility",(function(t,e,n,r){e.style.visibility=r})),new c("http://www.w3.org/ns/ttml#styling wrapOption",(function(t,e,n,r){"wrap"===r?"preserve"===n.space?e.style.whiteSpace="pre-wrap":e.style.whiteSpace="normal":"preserve"===n.space?e.style.whiteSpace="pre":e.style.whiteSpace="noWrap"})),new c("http://www.w3.org/ns/ttml#styling writingMode",(function(t,e,n,r){"lrtb"===r||"lr"===r||"rltb"===r||"rl"===r?e.style.writingMode="horizontal-tb":"tblr"===r?e.style.writingMode="vertical-lr":"tbrl"!==r&&"tb"!==r||(e.style.writingMode="vertical-rl")})),new c("http://www.w3.org/ns/ttml#styling zIndex",(function(t,e,n,r){e.style.zIndex=r})),new c("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",(function(t,e,n,r){t.displayForcedOnlyMode&&!1===r&&(e.style.visibility="hidden")}))],p={},d=0;d<h.length;d++)p[h[d].qname]=h[d];var g="webkitRubyPosition"in window.getComputedStyle(document.documentElement),y=g?"webkitRubyPosition":"rubyPosition",m="webkitTextEmphasisStyle"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisStyle":"textEmphasisStyle",b="webkitTextEmphasisPosition"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisPosition":"textEmphasisPosition";function v(t,e){if(t&&t.error&&t.error(e))throw e}}(e,"undefined"==typeof imscNames?n(26899):imscNames,"undefined"==typeof imscStyles?n(86665):imscStyles,"undefined"==typeof imscUtils?n(13874):imscUtils)},79215:(t,e,n)=>{!function(t,e,n,r){t.generateISD=function(t,e,r){var i=new l(t),a={},s={},u={},f=t.head.styling.initials[n.byName.showBackground.qname],c=t.head.styling.initials[n.byName.backgroundColor.qname];for(var h in t.head.layout.regions)if(t.head.layout.regions.hasOwnProperty(h)){var p=t.head.layout.regions[h],d=p.styleAttrs[n.byName.showBackground.qname]||f,g=p.styleAttrs[n.byName.backgroundColor.qname]||c;u[p.id]=("always"===d||void 0===d)&&void 0!==g&&!(e<p.begin||e>=p.end)}for(var y in t.body&&t.body.regionID&&(u[t.body.regionID]=!0),s=null!==t.body?function t(e,n){if(n.contents){var r={};for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i]);return r.contents=[],n.contents.filter((function(t){return!(e<t.begin||e>=t.end)})).forEach((function(n){var i=t(e,n);i.regionID&&(u[i.regionID]=!0),null!==i&&r.contents.push(i)})),r}return n}(e,t.body):null,void 0!==u[""]&&(u[""]=!0),u)if(u[y]){var m=o(t,e,t.head.layout.regions[y],s,null,"",t.head.layout.regions[y],r,a);null!==m&&i.contents.push(m.element)}return i};var i=[n.byName.color.qname,n.byName.textCombine.qname,n.byName.textDecoration.qname,n.byName.textEmphasis.qname,n.byName.textOutline.qname,n.byName.textShadow.qname];function o(t,e,l,c,h,p,d,g,y){if(e<d.begin||e>=d.end)return null;var m="regionID"in d&&""!==d.regionID?d.regionID:p;if(null!==h&&m!==l.id&&(!("contents"in d)||"contents"in d&&0===d.contents.length||""!==m))return null;var b=new u(d);if("sets"in d)for(var v=0;v<d.sets.length;v++)e<d.sets[v].begin||e>=d.sets[v].end||(b.styleAttrs[d.sets[v].qname]=d.sets[v].value);var w={};for(var _ in b.styleAttrs)if(b.styleAttrs.hasOwnProperty(_)&&(w[_]=!0,"region"===b.kind&&_===n.byName.writingMode.qname&&!(n.byName.direction.qname in b.styleAttrs))){var E=b.styleAttrs[_];"lrtb"===E||"lr"===E?b.styleAttrs[n.byName.direction.qname]="ltr":"rltb"!==E&&"rl"!==E||(b.styleAttrs[n.byName.direction.qname]="rtl")}if(null!==h)for(var T=0;T<n.all.length;T++){var N=n.all[T];if(N.qname===n.byName.textDecoration.qname){var A=h.styleAttrs[N.qname],S=b.styleAttrs[N.qname],x=[];void 0===S?x=A:-1===S.indexOf("none")?((-1===S.indexOf("noUnderline")&&-1!==A.indexOf("underline")||-1!==S.indexOf("underline"))&&x.push("underline"),(-1===S.indexOf("noLineThrough")&&-1!==A.indexOf("lineThrough")||-1!==S.indexOf("lineThrough"))&&x.push("lineThrough"),(-1===S.indexOf("noOverline")&&-1!==A.indexOf("overline")||-1!==S.indexOf("overline"))&&x.push("overline")):x.push("none"),b.styleAttrs[N.qname]=x}else if(N.qname!==n.byName.fontSize.qname||N.qname in b.styleAttrs||"span"!==b.kind||"textContainer"!==b.styleAttrs[n.byName.ruby.qname])if(N.qname!==n.byName.fontSize.qname||N.qname in b.styleAttrs||"span"!==b.kind||"text"!==b.styleAttrs[n.byName.ruby.qname])N.inherit&&N.qname in h.styleAttrs&&!(N.qname in b.styleAttrs)&&(b.styleAttrs[N.qname]=h.styleAttrs[N.qname]);else{var L=h.styleAttrs[n.byName.fontSize.qname];"textContainer"===h.styleAttrs[n.byName.ruby.qname]?b.styleAttrs[N.qname]=L:b.styleAttrs[N.qname]=new r.ComputedLength(.5*L.rw,.5*L.rh)}else{var C=h.styleAttrs[n.byName.fontSize.qname];b.styleAttrs[N.qname]=new r.ComputedLength(.5*C.rw,.5*C.rh)}}for(var R=0;R<n.all.length;R++){var I=n.all[R];if(!(I.qname in b.styleAttrs)&&!(I.qname===n.byName.position.qname&&n.byName.origin.qname in b.styleAttrs||I.qname===n.byName.origin.qname&&n.byName.position.qname in b.styleAttrs)){var O=t.head.styling.initials[I.qname]||I.initial;if(null!==O&&("region"===b.kind||!1===I.inherit&&null!==O)){var k=I.parse(O);null!==k?(b.styleAttrs[I.qname]=k,w[I.qname]=!0):f(g,"Invalid initial value for '"+I.qname+"' on element '"+b.kind)}}}for(var D=0;D<n.all.length;D++){var M=n.all[D];if(M.qname in w&&null!==M.compute){var F=M.compute(t,h,b,b.styleAttrs[M.qname],y);null!==F?b.styleAttrs[M.qname]=F:(b.styleAttrs[M.qname]=M.compute(t,h,b,M.parse(M.initial),y),f(g,"Style '"+M.qname+"' on element '"+b.kind+"' cannot be computed"))}}if("none"===b.styleAttrs[n.byName.display.qname])return null;var P=null;null===h?P=null===c?[]:[c]:"contents"in d&&(P=d.contents);for(var U=0;null!==P&&U<P.length;U++){var B=o(t,e,l,c,b,m,P[U],g,y);null!==B&&b.contents.push(B.element)}for(var q in b.styleAttrs)if(b.styleAttrs.hasOwnProperty(q)){var j=!1;if("span"===b.kind){var W=b.styleAttrs[n.byName.ruby.qname];(j=("container"===W||"textContainer"===W||"baseContainer"===W)&&-1!==i.indexOf(q))||(j="container"!==W&&q===n.byName.rubyAlign.qname),j||(j=!("textContainer"===W||"text"===W)&&q===n.byName.rubyPosition.qname)}if(!j){var V=n.byQName[q];"applies"in V&&(j=-1===V.applies.indexOf(b.kind))}j&&delete b.styleAttrs[q]}var G=b.styleAttrs[n.byName.ruby.qname];if("p"===b.kind||"span"===b.kind&&("textContainer"===G||"text"===G)){var H=[];a(b,H),function(t){function e(t){return"br"===t.kind||/[\r\n\t ]$/.test(t.text)}function n(t){return"br"===t.kind||"preserve"===t.space&&/^[\r\n]/.test(t.text)}for(var r,i=0;i<t.length;)if("br"!==(r=t[i]).kind&&"preserve"!==r.space){var o=r.text.replace(/[\t\r\n ]+/g," ");/^[ ]/.test(o)&&(0===i||e(t[i-1]))&&(o=o.substring(1)),r.text=o,0===o.length?t.splice(i,1):i++}else i++;for(i=0;i<t.length;i++)"br"!==(r=t[i]).kind&&"preserve"!==r.space?/[ ]$/.test(r.text)&&(i===t.length-1||n(t[i+1]))&&(r.text=r.text.slice(0,-1)):i++}(H),s(b)}return"div"===b.kind&&n.byName.backgroundImage.qname in b.styleAttrs||"br"===b.kind||"image"===b.kind||"contents"in b&&b.contents.length>0||"span"===b.kind&&null!==b.text||"region"===b.kind&&"always"===b.styleAttrs[n.byName.showBackground.qname]?{region_id:m,element:b}:null}function a(t,e){if("contents"in t)for(var r=0;r<t.contents.length;r++){var i=t.contents[r],o=i.styleAttrs[n.byName.ruby.qname];("span"!==i.kind||"textContainer"!==o&&"text"!==o)&&("contents"in i?a(i,e):("span"===i.kind&&0!==i.text.length||"br"===i.kind)&&e.push(i))}}function s(t){if("br"===t.kind)return!1;if("text"in t)return 0===t.text.length;if("contents"in t){for(var e=t.contents.length;e--;)s(t.contents[e])&&t.contents.splice(e,1);return 0===t.contents.length}}function l(t){this.contents=[],this.aspectRatio=t.aspectRatio,this.lang=t.lang}function u(t){for(var e in this.kind=t.kind||"region",this.lang=t.lang,t.id&&(this.id=t.id),this.styleAttrs={},t.styleAttrs)t.styleAttrs.hasOwnProperty(e)&&(this.styleAttrs[e]=t.styleAttrs[e]);"src"in t&&(this.src=t.src),"type"in t&&(this.type=t.type),"text"in t?this.text=t.text:("region"===this.kind||"contents"in t)&&(this.contents=[]),"space"in t&&(this.space=t.space)}function f(t,e){if(t&&t.error&&t.error(e))throw e}}(e,"undefined"==typeof imscNames?n(26899):imscNames,"undefined"==typeof imscStyles?n(86665):imscStyles,"undefined"==typeof imscUtils?n(13874):imscUtils)},87298:(t,e,n)=>{e.generateISD=n(79215).generateISD,e.fromXML=n(51773).fromXML,e.renderHTML=n(14618).render},26899:(t,e)=>{!function(t){t.ns_tt="http://www.w3.org/ns/ttml",t.ns_tts="http://www.w3.org/ns/ttml#styling",t.ns_ttp="http://www.w3.org/ns/ttml#parameter",t.ns_xml="http://www.w3.org/XML/1998/namespace",t.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",t.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",t.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",t.ns_ebutts="urn:ebu:tt:style"}(e)},86665:(t,e,n)=>{!function(t,e,n){function r(t,e,n,r,i,o,a,s){this.name=e,this.ns=t,this.qname=t+" "+e,this.inherit=i,this.animatable=o,this.initial=n,this.applies=r,this.parse=a,this.compute=s}for(var i in t.all=[new r(e.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,n.parseColor,null),new r(e.ns_tts,"color","white",["span"],!0,!0,n.parseColor,null),new r(e.ns_tts,"direction","ltr",["p","span"],!0,!0,(function(t){return t}),null),new r(e.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,(function(t){return t}),null),new r(e.ns_tts,"displayAlign","before",["region"],!1,!0,(function(t){return t}),null),new r(e.ns_tts,"extent","auto",["tt","region"],!1,!0,(function(t){if("auto"===t)return t;var e=t.split(" ");if(2!==e.length)return null;var r=n.parseLength(e[0]),i=n.parseLength(e[1]);return i&&r?{h:i,w:r}:null}),(function(t,e,r,i,o){var a,s;if("auto"===i)a=new n.ComputedLength(0,1);else if(null===(a=n.toComputedLength(i.h.value,i.h.unit,null,t.dimensions.h,null,t.pxLength.h)))return null;if("auto"===i)s=new n.ComputedLength(1,0);else if(null===(s=n.toComputedLength(i.w.value,i.w.unit,null,t.dimensions.w,null,t.pxLength.w)))return null;return{h:a,w:s}})),new r(e.ns_tts,"fontFamily","default",["span","p"],!0,!0,(function(t){for(var e=t.split(","),n=[],r=0;r<e.length;r++)e[r]=e[r].trim(),"'"!==e[r].charAt(0)&&'"'!==e[r].charAt(0)&&"default"===e[r]?n.push("monospaceSerif"):n.push(e[r]);return n}),null),new r(e.ns_tts,"shear","0%",["p"],!0,!0,n.parseLength,(function(t,e,n,r){return"%"!==r.unit?null:Math.abs(r.value)>100?100*Math.sign(r.value):r.value})),new r(e.ns_tts,"fontSize","1c",["span","p"],!0,!0,n.parseLength,(function(e,r,i,o,a){return n.toComputedLength(o.value,o.unit,null!==r?r.styleAttrs[t.byName.fontSize.qname]:e.cellLength.h,null!==r?r.styleAttrs[t.byName.fontSize.qname]:e.cellLength.h,e.cellLength.h,e.pxLength.h)})),new r(e.ns_tts,"fontStyle","normal",["span","p"],!0,!0,(function(t){return t}),null),new r(e.ns_tts,"fontWeight","normal",["span","p"],!0,!0,(function(t){return t}),null),new r(e.ns_tts,"lineHeight","normal",["p"],!0,!0,(function(t){return"normal"===t?t:n.parseLength(t)}),(function(e,r,i,o,a){var s;if("normal"===o)s=o;else if(null===(s=n.toComputedLength(o.value,o.unit,i.styleAttrs[t.byName.fontSize.qname],i.styleAttrs[t.byName.fontSize.qname],e.cellLength.h,e.pxLength.h)))return null;return s})),new r(e.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new r(e.ns_tts,"origin","auto",["region"],!1,!0,(function(t){if("auto"===t)return t;var e=t.split(" ");if(2!==e.length)return null;var r=n.parseLength(e[0]),i=n.parseLength(e[1]);return i&&r?{h:i,w:r}:null}),(function(t,e,r,i,o){var a,s;if("auto"===i)a=new n.ComputedLength(0,0);else if(null===(a=n.toComputedLength(i.h.value,i.h.unit,null,t.dimensions.h,null,t.pxLength.h)))return null;if("auto"===i)s=new n.ComputedLength(0,0);else if(null===(s=n.toComputedLength(i.w.value,i.w.unit,null,t.dimensions.w,null,t.pxLength.w)))return null;return{h:a,w:s}})),new r(e.ns_tts,"overflow","hidden",["region"],!1,!0,(function(t){return t}),null),new r(e.ns_tts,"padding","0px",["region"],!1,!0,(function(t){var e=t.split(" ");if(e.length>4)return null;for(var r=[],i=0;i<e.length;i++){var o=n.parseLength(e[i]);if(!o)return null;r.push(o)}return r}),(function(e,r,i,o,a){var s;if(1===o.length)s=[o[0],o[0],o[0],o[0]];else if(2===o.length)s=[o[0],o[1],o[0],o[1]];else if(3===o.length)s=[o[0],o[1],o[2],o[1]];else{if(4!==o.length)return null;s=[o[0],o[1],o[2],o[3]]}var l=i.styleAttrs[t.byName.writingMode.qname];if("lrtb"===l||"lr"===l)s=[s[0],s[3],s[2],s[1]];else if("rltb"===l||"rl"===l)s=[s[0],s[1],s[2],s[3]];else if("tblr"===l)s=[s[3],s[0],s[1],s[2]];else{if("tbrl"!==l&&"tb"!==l)return null;s=[s[3],s[2],s[1],s[0]]}for(var u=[],f=0;f<s.length;f++)if(0===s[f].value)u[f]=new n.ComputedLength(0,0);else if(u[f]=n.toComputedLength(s[f].value,s[f].unit,i.styleAttrs[t.byName.fontSize.qname],0===f||2===f?i.styleAttrs[t.byName.extent.qname].h:i.styleAttrs[t.byName.extent.qname].w,0===f||2===f?e.cellLength.h:e.cellLength.w,0===f||2===f?e.pxLength.h:e.pxLength.w),null===u[f])return null;return u})),new r(e.ns_tts,"position","top left",["region"],!1,!0,(function(t){return n.parsePosition(t)}),(function(e,r,i,o){var a,s;return null===(a=n.toComputedLength(o.v.offset.value,o.v.offset.unit,null,new n.ComputedLength(-i.styleAttrs[t.byName.extent.qname].h.rw,e.dimensions.h.rh-i.styleAttrs[t.byName.extent.qname].h.rh),null,e.pxLength.h))?null:("bottom"===o.v.edge&&(a=new n.ComputedLength(-a.rw-i.styleAttrs[t.byName.extent.qname].h.rw,e.dimensions.h.rh-a.rh-i.styleAttrs[t.byName.extent.qname].h.rh)),s=n.toComputedLength(o.h.offset.value,o.h.offset.unit,null,new n.ComputedLength(e.dimensions.w.rw-i.styleAttrs[t.byName.extent.qname].w.rw,-i.styleAttrs[t.byName.extent.qname].w.rh),null,e.pxLength.w),null===a?null:("right"===o.h.edge&&(s=new n.ComputedLength(e.dimensions.w.rw-s.rw-i.styleAttrs[t.byName.extent.qname].w.rw,-s.rh-i.styleAttrs[t.byName.extent.qname].w.rh)),{h:a,w:s}))})),new r(e.ns_tts,"ruby","none",["span"],!1,!0,(function(t){return t}),null),new r(e.ns_tts,"rubyAlign","center",["span"],!0,!0,(function(t){return"center"!==t&&"spaceAround"!==t?null:t}),null),new r(e.ns_tts,"rubyPosition","outside",["span"],!0,!0,(function(t){return t}),null),new r(e.ns_tts,"rubyReserve","none",["p"],!0,!0,(function(t){var e=t.split(" "),r=[null,null];if(0===e.length||e.length>2)return null;if("none"!==e[0]&&"both"!==e[0]&&"after"!==e[0]&&"before"!==e[0]&&"outside"!==e[0])return null;if(r[0]=e[0],2===e.length&&"none"!==e[0]){var i=n.parseLength(e[1]);if(!i)return null;r[1]=i}return r}),(function(e,r,i,o,a){if("none"===o[0])return o;var s=null;return null===(s=null===o[1]?new n.ComputedLength(.5*i.styleAttrs[t.byName.fontSize.qname].rw,.5*i.styleAttrs[t.byName.fontSize.qname].rh):n.toComputedLength(o[1].value,o[1].unit,i.styleAttrs[t.byName.fontSize.qname],i.styleAttrs[t.byName.fontSize.qname],e.cellLength.h,e.pxLength.h))?null:[o[0],s]})),new r(e.ns_tts,"showBackground","always",["region"],!1,!0,(function(t){return t}),null),new r(e.ns_tts,"textAlign","start",["p"],!0,!0,(function(t){return t}),(function(t,e,n,r,i){return"left"===r?"start":"right"===r?"end":r})),new r(e.ns_tts,"textCombine","none",["span"],!0,!0,(function(t){return"none"===t||"all"===t?t:null}),null),new r(e.ns_tts,"textDecoration","none",["span"],!0,!0,(function(t){return t.split(" ")}),null),new r(e.ns_tts,"textEmphasis","none",["span"],!0,!0,(function(t){for(var e=t.split(" "),r={style:null,symbol:null,color:null,position:null},i=0;i<e.length;i++)if("none"===e[i]||"auto"===e[i])r.style=e[i];else if("filled"===e[i]||"open"===e[i])r.style=e[i];else if("circle"===e[i]||"dot"===e[i]||"sesame"===e[i])r.symbol=e[i];else if("current"===e[i])r.color=e[i];else if("outside"===e[i]||"before"===e[i]||"after"===e[i])r.position=e[i];else if(r.color=n.parseColor(e[i]),null===r.color)return null;return null==r.style&&null==r.symbol?r.style="auto":(r.symbol=r.symbol||"circle",r.style=r.style||"filled"),r.position=r.position||"outside",r.color=r.color||"current",r}),null),new r(e.ns_tts,"textOutline","none",["span"],!0,!0,(function(t){if("none"===t)return t;var e={},r=t.split(" ");if(0===r.length||r.length>2)return null;var i=n.parseColor(r[0]);if(e.color=i,null!==i&&r.shift(),1!==r.length)return null;var o=n.parseLength(r[0]);return o?(e.thickness=o,e):null}),(function(e,r,i,o,a){if("none"===o)return o;var s={};return null===o.color?s.color=i.styleAttrs[t.byName.color.qname]:s.color=o.color,s.thickness=n.toComputedLength(o.thickness.value,o.thickness.unit,i.styleAttrs[t.byName.fontSize.qname],i.styleAttrs[t.byName.fontSize.qname],e.cellLength.h,e.pxLength.h),null===s.thickness?null:s})),new r(e.ns_tts,"textShadow","none",["span"],!0,!0,n.parseTextShadow,(function(e,r,i,o){if("none"===o)return o;for(var a=[],s=0;s<o.length;s++){var l={};if(l.x_off=n.toComputedLength(o[s][0].value,o[s][0].unit,null,i.styleAttrs[t.byName.fontSize.qname],null,e.pxLength.w),null===l.x_off)return null;if(l.y_off=n.toComputedLength(o[s][1].value,o[s][1].unit,null,i.styleAttrs[t.byName.fontSize.qname],null,e.pxLength.h),null===l.y_off)return null;if(null===o[s][2])l.b_radius=0;else if(l.b_radius=n.toComputedLength(o[s][2].value,o[s][2].unit,null,i.styleAttrs[t.byName.fontSize.qname],null,e.pxLength.h),null===l.b_radius)return null;null===o[s][3]?l.color=i.styleAttrs[t.byName.color.qname]:l.color=o[s][3],a.push(l)}return a})),new r(e.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,(function(t){return t}),null),new r(e.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,(function(t){return t}),null),new r(e.ns_tts,"wrapOption","wrap",["span"],!0,!0,(function(t){return t}),null),new r(e.ns_tts,"writingMode","lrtb",["region"],!1,!0,(function(t){return t}),null),new r(e.ns_tts,"zIndex","auto",["region"],!1,!0,(function(t){var e;return"auto"===t?e=t:(e=parseInt(t),isNaN(e)&&(e=null)),e}),null),new r(e.ns_ebutts,"linePadding","0c",["p"],!0,!1,n.parseLength,(function(t,e,r,i,o){return n.toComputedLength(i.value,i.unit,null,null,t.cellLength.w,null)})),new r(e.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,(function(t){return t}),null),new r(e.ns_smpte,"backgroundImage",null,["div"],!1,!1,(function(t){return t}),null),new r(e.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,(function(t){return"true"===t}),null),new r(e.ns_itts,"fillLineGap","false",["p"],!0,!0,(function(t){return"true"===t}),null)],t.byQName={},t.all)t.byQName[t.all[i].qname]=t.all[i];for(var o in t.byName={},t.all)t.byName[t.all[o].name]=t.all[o]}(e,"undefined"==typeof imscNames?n(26899):imscNames,"undefined"==typeof imscUtils?n(13874):imscUtils)},13874:(t,e)=>{!function(t){var e=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,n=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,r=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,i={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};t.parseColor=function(t){var o,a=null,s=i[t.toLowerCase()];return void 0!==s?a=s:null!==(o=e.exec(t))?a=[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16),void 0!==o[4]?parseInt(o[4],16):255]:null!==(o=n.exec(t))?a=[parseInt(o[1]),parseInt(o[2]),parseInt(o[3]),255]:null!==(o=r.exec(t))&&(a=[parseInt(o[1]),parseInt(o[2]),parseInt(o[3]),parseInt(o[4])]),a};var o=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%|rh|rw)$/;t.parseLength=function(t){var e,n=null;return null!==(e=o.exec(t))&&(n={value:parseFloat(e[1]),unit:e[2]}),n},t.parseTextShadow=function(e){for(var n=e.match(/([^\(,\)]|\([^\)]+\))+/g),r=[],i=0;i<n.length;i++){var o=n[i].split(" ");if(1===o.length&&"none"===o[0])return"none";if(o.length>1&&o.length<5){var a=[null,null,null,null],s=t.parseLength(o.shift());if(null===s)return null;if(a[0]=s,null===(s=t.parseLength(o.shift())))return null;if(a[1]=s,0===o.length){r.push(a);continue}if(null!==(s=t.parseLength(o[0]))&&(a[2]=s,o.shift()),0===o.length){r.push(a);continue}var l=t.parseColor(o[0]);if(null===l)return null;a[3]=l,r.push(a)}}return r},t.parsePosition=function(e){var n=e.split(" "),r=function(t){return"center"===t||"left"===t||"top"===t||"bottom"===t||"right"===t};if(n.length>4)return null;for(var i=0;i<n.length;i++)if(!r(n[i])){var o=t.parseLength(n[i]);if(null===o)return null;n[i]=o}for(var a={h:{edge:"left",offset:{value:50,unit:"%"}},v:{edge:"top",offset:{value:50,unit:"%"}}},s=0;s<n.length;){var l=n[s++];if(r(l)){var u={value:0,unit:"%"};2!==n.length&&s<n.length&&!r(n[s])&&(u=n[s++]),"right"===l?(a.h.edge=l,a.h.offset=u):"bottom"===l?(a.v.edge=l,a.v.offset=u):"left"===l?a.h.offset=u:"top"===l&&(a.v.offset=u)}else{if(1!==n.length&&2!==n.length)return null;1===s?a.h.offset=l:a.v.offset=l}}return a},t.ComputedLength=function(t,e){this.rw=t,this.rh=e},t.ComputedLength.prototype.toUsedLength=function(t,e){return t*this.rw+e*this.rh},t.ComputedLength.prototype.isZero=function(){return 0===this.rw&&0===this.rh},t.toComputedLength=function(e,n,r,i,o,a){return"%"===n&&i?new t.ComputedLength(i.rw*e/100,i.rh*e/100):"em"===n&&r?new t.ComputedLength(r.rw*e,r.rh*e):"c"===n&&o?new t.ComputedLength(e*o.rw,e*o.rh):"px"===n&&a?new t.ComputedLength(e*a.rw,e*a.rh):"rh"===n?new t.ComputedLength(0,e/100):"rw"===n?new t.ComputedLength(e/100,0):null}}(e)},10778:module=>{"function"==typeof Object.create?module.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:module.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},65566:module=>{"use strict";var t={};function e(e,n,r){r||(r=Error);var i=function(t){var e,r;function i(e,r,i){return t.call(this,function(t,e,r){return"string"==typeof n?n:n(t,e,r)}(e,r,i))||this}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function n(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}e("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),e("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,a,s;if("string"==typeof e&&(o="not ",e.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var l=function(t,e,n){return"number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(l," ").concat(i," ").concat(n(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),module.exports.F=t},25608:(module,t,e)=>{"use strict";var n=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};module.exports=l;var r=e(39134),i=e(87794);e(10778)(l,r);for(var o=n(i.prototype),a=0;a<o.length;a++){var s=o[a];l.prototype[s]||(l.prototype[s]=i.prototype[s])}function l(t){if(!(this instanceof l))return new l(t);r.call(this,t),i.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||process.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},27242:(module,t,e)=>{"use strict";module.exports=r;var n=e(62008);function r(t){if(!(this instanceof r))return new r(t);n.call(this,t)}e(10778)(r,n),r.prototype._transform=function(t,e,n){n(null,t)}},39134:(module,t,e)=>{"use strict";var n;module.exports=T,T.ReadableState=E;e(64250).EventEmitter;var r=function(t,e){return t.listeners(e).length},i=e(82783),o=e(84030).Buffer,a=(void 0!==e.g?e.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,l=e(71660);s=l&&l.debuglog?l.debuglog("stream"):function(){};var u,f,c,h=e(77843),p=e(73014),d=e(61033).getHighWaterMark,g=e(65566).F,y=g.ERR_INVALID_ARG_TYPE,m=g.ERR_STREAM_PUSH_AFTER_EOF,b=g.ERR_METHOD_NOT_IMPLEMENTED,v=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e(10778)(T,i);var w=p.errorOrDestroy,_=["error","close","destroy","pause","resume"];function E(t,r,i){n=n||e(25608),t=t||{},"boolean"!=typeof i&&(i=r instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=d(this,t,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(u||(u=e(68163).I),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function T(t){if(n=n||e(25608),!(this instanceof T))return new T(t);var r=this instanceof n;this._readableState=new E(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),i.call(this)}function N(t,e,n,r,i){s("readableAddChunk",e);var l,u=t._readableState;if(null===e)u.reading=!1,function(t,e){if(s("onEofChunk"),e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?L(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,C(t)))}(t,u);else if(i||(l=function(t,e){var n;r=e,o.isBuffer(r)||r instanceof a||"string"==typeof e||void 0===e||t.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],e));var r;return n}(u,e)),l)w(t,l);else if(u.objectMode||e&&e.length>0)if("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===o.prototype||(e=function(t){return o.from(t)}(e)),r)u.endEmitted?w(t,new v):A(t,u,e,!0);else if(u.ended)w(t,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!n?(e=u.decoder.write(e),u.objectMode||0!==e.length?A(t,u,e,!1):R(t,u)):A(t,u,e,!1)}else r||(u.reading=!1,R(t,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function A(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&L(t)),R(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=p.destroy,T.prototype._undestroy=p.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=o.from(t,e),e=""),n=!0),N(this,t,e,!1,n)},T.prototype.unshift=function(t){return N(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){u||(u=e(68163).I);var n=new u(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=n.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var S=1073741824;function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=S?t=S:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function L(t){var e=t._readableState;s("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(s("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(C,t))}function C(t){var e=t._readableState;s("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,M(t)}function R(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var n=e.length;if(s("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1}function O(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function k(t){s("readable nexttick read 0"),t.read(0)}function D(t,e){s("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),M(t),e.flowing&&!e.reading&&t.read(0)}function M(t){var e=t._readableState;for(s("flow",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function P(t){var e=t._readableState;s("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(U,e,t))}function U(t,e){if(s("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function B(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}T.prototype.read=function(t){s("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return s("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):L(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&P(this),null;var r,i=e.needReadable;return s("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&s("length less than watermark",i=!0),e.ended||e.reading?s("reading or ended",i=!1):i&&(s("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(n,e))),null===(r=t>0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&P(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(t){w(this,new b("_read()"))},T.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,s("pipe count=%d opts=%j",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==process.stdout&&t!==process.stderr?l:g;function a(e,r){s("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,s("cleanup"),t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",u),t.removeListener("error",h),t.removeListener("unpipe",a),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",c),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function l(){s("onend"),t.end()}i.endEmitted?process.nextTick(o):n.once("end",o),t.on("unpipe",a);var u=function(t){return function(){var e=t._readableState;s("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&r(t,"data")&&(e.flowing=!0,M(t))}}(n);t.on("drain",u);var f=!1;function c(e){s("ondata");var r=t.write(e);s("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==B(i.pipes,t))&&!f&&(s("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(e){s("onerror",e),g(),t.removeListener("error",h),0===r(t,"error")&&w(t,e)}function p(){t.removeListener("finish",d),g()}function d(){s("onfinish"),t.removeListener("close",p),g()}function g(){s("unpipe"),n.unpipe(t)}return n.on("data",c),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",h),t.once("close",p),t.once("finish",d),t.emit("pipe",n),i.flowing||(s("pipe resume"),n.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=B(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},T.prototype.on=function(t,e){var n=i.prototype.on.call(this,t,e),r=this._readableState;return"data"===t?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===t&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,s("on readable",r.length,r.reading),r.length?L(this):r.reading||process.nextTick(k,this))),n},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var n=i.prototype.removeListener.call(this,t,e);return"readable"===t&&process.nextTick(O,this),n},T.prototype.removeAllListeners=function(t){var e=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||process.nextTick(O,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(s("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(D,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(s("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(s("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<_.length;o++)t.on(_[o],this.emit.bind(this,_[o]));return this._read=function(e){s("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=e(68645)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=F,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,n){return void 0===c&&(c=e(15471)),c(T,t,n)})},62008:(module,t,e)=>{"use strict";module.exports=u;var n=e(65566).F,r=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,s=e(25608);function l(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new i);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function u(t){if(!(this instanceof u))return new u(t);s.call(this,t),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?c(this,null,null):this._flush((function(e,n){c(t,e,n)}))}function c(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new a;if(t._transformState.transforming)throw new o;return t.push(null)}e(10778)(u,s),u.prototype.push=function(t,e){return this._transformState.needTransform=!1,s.prototype.push.call(this,t,e)},u.prototype._transform=function(t,e,n){n(new r("_transform()"))},u.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},u.prototype._destroy=function(t,e){s.prototype._destroy.call(this,t,(function(t){e(t)}))}},87794:(module,t,e)=>{"use strict";function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var r;module.exports=T,T.WritableState=E;var i={deprecate:e(16698)},o=e(82783),a=e(84030).Buffer,s=(void 0!==e.g?e.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,u=e(73014),f=e(61033).getHighWaterMark,c=e(65566).F,h=c.ERR_INVALID_ARG_TYPE,p=c.ERR_METHOD_NOT_IMPLEMENTED,d=c.ERR_MULTIPLE_CALLBACK,g=c.ERR_STREAM_CANNOT_PIPE,y=c.ERR_STREAM_DESTROYED,m=c.ERR_STREAM_NULL_VALUES,b=c.ERR_STREAM_WRITE_AFTER_END,v=c.ERR_UNKNOWN_ENCODING,w=u.errorOrDestroy;function _(){}function E(t,i,o){r=r||e(25608),t=t||{},"boolean"!=typeof o&&(o=i instanceof r),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new d;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(process.nextTick(i,r),process.nextTick(C,t,e),t._writableState.errorEmitted=!0,w(t,r)):(i(r),t._writableState.errorEmitted=!0,w(t,r),C(t,e))}(t,n,r,e,i);else{var o=x(n)||t.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||S(t,n),r?process.nextTick(A,t,n,o,i):A(t,n,o,i)}}(i,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function T(t){var n=this instanceof(r=r||e(25608));if(!n&&!l.call(T,this))return new T(t);this._writableState=new E(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),o.call(this)}function N(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),C(t,e)}function S(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,o=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var s=0,l=!0;r;)o[s]=r,r.isBuf||(l=!1),r=r.next,s+=1;o.allBuffers=l,N(t,e,!0,e.length,o,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,c=r.callback;if(N(t,e,!1,e.objectMode?1:u.length,u,f,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function L(t,e){t._final((function(n){e.pendingcb--,n&&w(t,n),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var n=x(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,process.nextTick(L,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var r=t._readableState;(!r||r.autoDestroy&&r.endEmitted)&&t.destroy()}return n}e(10778)(T,o),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof E)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){w(this,new g)},T.prototype.write=function(t,e,n){var r,i=this._writableState,o=!1,l=!i.objectMode&&(r=t,a.isBuffer(r)||r instanceof s);return l&&!a.isBuffer(t)&&(t=function(t){return a.from(t)}(t)),"function"==typeof e&&(n=e,e=null),l?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=_),i.ending?function(t,e){var n=new b;w(t,n),process.nextTick(e,n)}(this,n):(l||function(t,e,n,r){var i;return null===n?i=new m:"string"==typeof n||e.objectMode||(i=new h("chunk",["string","Buffer"],n)),!i||(w(t,i),process.nextTick(r,i),!1)}(this,i,t,n))&&(i.pendingcb++,o=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=a.from(e,n));return e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var l=e.objectMode?1:r.length;e.length+=l;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else N(t,e,!1,l,r,i,o);return u}(this,i,l,t,e,n)),o},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||S(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,n){n(new p("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,n){var r=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,n){e.ending=!0,C(t,e),n&&(e.finished?process.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=u.destroy,T.prototype._undestroy=u.undestroy,T.prototype._destroy=function(t,e){e(t)}},68645:(module,t,e)=>{"use strict";var n;function r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=e(34124),o=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),u=Symbol("lastPromise"),f=Symbol("handlePromise"),c=Symbol("stream");function h(t,e){return{value:t,done:e}}function p(t){var e=t[o];if(null!==e){var n=t[c].read();null!==n&&(t[u]=null,t[o]=null,t[a]=null,e(h(n,!1)))}}function d(t){process.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((r(n={get stream(){return this[c]},next:function(){var t=this,e=this[s];if(null!==e)return Promise.reject(e);if(this[l])return Promise.resolve(h(void 0,!0));if(this[c].destroyed)return new Promise((function(e,n){process.nextTick((function(){t[s]?n(t[s]):e(h(void 0,!0))}))}));var n,r=this[u];if(r)n=new Promise(function(t,e){return function(n,r){t.then((function(){e[l]?n(h(void 0,!0)):e[f](n,r)}),r)}}(r,this));else{var i=this[c].read();if(null!==i)return Promise.resolve(h(i,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),r(n,"return",(function(){var t=this;return new Promise((function(e,n){t[c].destroy(null,(function(t){t?n(t):e(h(void 0,!0))}))}))})),n),g);module.exports=function(t){var e,n=Object.create(y,(r(e={},c,{value:t,writable:!0}),r(e,o,{value:null,writable:!0}),r(e,a,{value:null,writable:!0}),r(e,s,{value:null,writable:!0}),r(e,l,{value:t._readableState.endEmitted,writable:!0}),r(e,f,{value:function(t,e){var r=n[c].read();r?(n[u]=null,n[o]=null,n[a]=null,t(h(r,!1))):(n[o]=t,n[a]=e)},writable:!0}),e));return n[u]=null,i(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[a];return null!==e&&(n[u]=null,n[o]=null,n[a]=null,e(t)),void(n[s]=t)}var r=n[o];null!==r&&(n[u]=null,n[o]=null,n[a]=null,r(h(void 0,!0))),n[l]=!0})),t.on("readable",d.bind(null,n)),n}},77843:(module,t,e)=>{"use strict";function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function i(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function a(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var s=e(84030).Buffer,l=e(27030).inspect,u=l&&l.custom||"inspect";module.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,n,i;return e=t,(n=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,n,r,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,n=i,r=a,s.prototype.copy.call(e,n,r),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var n;return t<this.head.data.length?(n=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):n=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,n=1,r=e.data;for(t-=r.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0==(t-=o)){o===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),n=this.head,r=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var i=n.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,e}},{key:u,value:function(t,e){return l(this,r(r({},e),{},{depth:0,customInspect:!1}))}}])&&o(e.prototype,n),i&&o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},73014:module=>{"use strict";function t(t,r){n(t,r),e(t)}function e(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function n(t,e){t.emit("error",e)}module.exports={destroy:function(r,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,r)):process.nextTick(n,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,(function(n){!i&&n?o._writableState?o._writableState.errorEmitted?process.nextTick(e,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,n)):process.nextTick(t,o,n):i?(process.nextTick(e,o),i(n)):process.nextTick(e,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}}},34124:(module,t,e)=>{"use strict";var n=e(65566).F.ERR_STREAM_PREMATURE_CLOSE;function r(){}module.exports=function t(e,i,o){if("function"==typeof i)return t(e,null,i);i||(i={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r)}}}(o||r);var a=i.readable||!1!==i.readable&&e.readable,s=i.writable||!1!==i.writable&&e.writable,l=function(){e.writable||f()},u=e._writableState&&e._writableState.finished,f=function(){s=!1,u=!0,a||o.call(e)},c=e._readableState&&e._readableState.endEmitted,h=function(){a=!1,c=!0,s||o.call(e)},p=function(t){o.call(e,t)},d=function(){var t;return a&&!c?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):s&&!u?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",f)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?s&&!e._writableState&&(e.on("end",l),e.on("close",l)):(e.on("complete",f),e.on("abort",d),e.req?g():e.on("request",g)),e.on("end",h),e.on("finish",f),!1!==i.error&&e.on("error",p),e.on("close",d),function(){e.removeListener("complete",f),e.removeListener("abort",d),e.removeListener("request",g),e.req&&e.req.removeListener("finish",f),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",f),e.removeListener("end",h),e.removeListener("error",p),e.removeListener("close",d)}}},15471:module=>{module.exports=function(){throw new Error("Readable.from is not available in the browser")}},33488:(module,t,e)=>{"use strict";var n;var r=e(65566).F,i=r.ERR_MISSING_ARGS,o=r.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function s(t){t()}function l(t,e){return t.pipe(e)}module.exports=function(){for(var t=arguments.length,r=new Array(t),u=0;u<t;u++)r[u]=arguments[u];var f,c=function(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new i("streams");var h=r.map((function(t,i){var a=i<r.length-1;return function(t,r,i,a){a=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(a);var s=!1;t.on("close",(function(){s=!0})),void 0===n&&(n=e(34124)),n(t,{readable:r,writable:i},(function(t){if(t)return a(t);s=!0,a()}));var l=!1;return function(e){if(!s&&!l)return l=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void a(e||new o("pipe"))}}(t,a,i>0,(function(t){f||(f=t),t&&h.forEach(s),a||(h.forEach(s),c(f))}))}));return r.reduce(l)}},61033:(module,t,e)=>{"use strict";var n=e(65566).F.ERR_INVALID_OPT_VALUE;module.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},82783:(module,t,e)=>{module.exports=e(64250).EventEmitter},21209:(module,t,e)=>{
|
|
10
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
11
|
-
var n=e(84030),r=n.Buffer;function i(t,e){for(var n in t)e[n]=t[n]}function o(t,e,n){return r(t,e,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?module.exports=n:(i(n,t),t.Buffer=o),o.prototype=Object.create(r.prototype),i(r,o),o.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return r(t,e,n)},o.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=r(t);return void 0!==e?"string"==typeof n?i.fill(e,n):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},20321:(t,e,n)=>{var r=n(84030).Buffer;!function(t){t.parser=function(t,e){return new o(t,e)},t.SAXParser=o,t.SAXStream=s,t.createStream=function(t,e){return new s(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function o(e,n){if(!(this instanceof o))return new o(e,n);var r=this;!function(t){for(var e=0,n=i.length;e<n;e++)t[i[e]]=""}(r),r.q=r.c="",r.bufferCheckPosition=t.MAX_BUFFER_LENGTH,r.opt=n||{},r.opt.lowercase=r.opt.lowercase||r.opt.lowercasetags,r.looseCase=r.opt.lowercase?"toLowerCase":"toUpperCase",r.tags=[],r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.strict=!!e,r.noscript=!(!e&&!r.opt.noscript),r.state=L.BEGIN,r.strictEntities=r.opt.strictEntities,r.ENTITIES=r.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),r.attribList=[],r.opt.xmlns&&(r.ns=Object.create(m)),r.trackPosition=!1!==r.opt.position,r.trackPosition&&(r.position=r.line=r.column=0),R(r,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),o.prototype={end:function(){M(this)},write:function(e){var n=this;if(this.error)throw this.error;if(n.closed)return D(n,"Cannot write after close. Assign an onready handler.");if(null===e)return M(n);"object"==typeof e&&(e=e.toString());var r=0,o="";for(;o=G(e,r++),n.c=o,o;)switch(n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++),n.state){case L.BEGIN:if(n.state=L.BEGIN_WHITESPACE,"\ufeff"===o)continue;V(n,o);continue;case L.BEGIN_WHITESPACE:V(n,o);continue;case L.TEXT:if(n.sawRoot&&!n.closedRoot){for(var a=r-1;o&&"<"!==o&&"&"!==o;)(o=G(e,r++))&&n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++);n.textNode+=e.substring(a,r-1)}"<"!==o||n.sawRoot&&n.closedRoot&&!n.strict?(!N(l,o)||n.sawRoot&&!n.closedRoot||F(n,"Text data outside of root node."),"&"===o?n.state=L.TEXT_ENTITY:n.textNode+=o):(n.state=L.OPEN_WAKA,n.startTagPosition=n.position);continue;case L.SCRIPT:"<"===o?n.state=L.SCRIPT_ENDING:n.script+=o;continue;case L.SCRIPT_ENDING:"/"===o?n.state=L.CLOSE_TAG:(n.script+="<"+o,n.state=L.SCRIPT);continue;case L.OPEN_WAKA:if("!"===o)n.state=L.SGML_DECL,n.sgmlDecl="";else if(T(l,o));else if(T(b,o))n.state=L.OPEN_TAG,n.tagName=o;else if("/"===o)n.state=L.CLOSE_TAG,n.tagName="";else if("?"===o)n.state=L.PROC_INST,n.procInstName=n.procInstBody="";else{if(F(n,"Unencoded <"),n.startTagPosition+1<n.position){var s=n.position-n.startTagPosition;o=new Array(s).join(" ")+o}n.textNode+="<"+o,n.state=L.TEXT}continue;case L.SGML_DECL:(n.sgmlDecl+o).toUpperCase()===p?(I(n,"onopencdata"),n.state=L.CDATA,n.sgmlDecl="",n.cdata=""):n.sgmlDecl+o==="--"?(n.state=L.COMMENT,n.comment="",n.sgmlDecl=""):(n.sgmlDecl+o).toUpperCase()===d?(n.state=L.DOCTYPE,(n.doctype||n.sawRoot)&&F(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===o?(I(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=L.TEXT):T(c,o)?(n.state=L.SGML_DECL_QUOTED,n.sgmlDecl+=o):n.sgmlDecl+=o;continue;case L.SGML_DECL_QUOTED:o===n.q&&(n.state=L.SGML_DECL,n.q=""),n.sgmlDecl+=o;continue;case L.DOCTYPE:">"===o?(n.state=L.TEXT,I(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=o,"["===o?n.state=L.DOCTYPE_DTD:T(c,o)&&(n.state=L.DOCTYPE_QUOTED,n.q=o));continue;case L.DOCTYPE_QUOTED:n.doctype+=o,o===n.q&&(n.q="",n.state=L.DOCTYPE);continue;case L.DOCTYPE_DTD:n.doctype+=o,"]"===o?n.state=L.DOCTYPE:T(c,o)&&(n.state=L.DOCTYPE_DTD_QUOTED,n.q=o);continue;case L.DOCTYPE_DTD_QUOTED:n.doctype+=o,o===n.q&&(n.state=L.DOCTYPE_DTD,n.q="");continue;case L.COMMENT:"-"===o?n.state=L.COMMENT_ENDING:n.comment+=o;continue;case L.COMMENT_ENDING:"-"===o?(n.state=L.COMMENT_ENDED,n.comment=k(n.opt,n.comment),n.comment&&I(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+o,n.state=L.COMMENT);continue;case L.COMMENT_ENDED:">"!==o?(F(n,"Malformed comment"),n.comment+="--"+o,n.state=L.COMMENT):n.state=L.TEXT;continue;case L.CDATA:"]"===o?n.state=L.CDATA_ENDING:n.cdata+=o;continue;case L.CDATA_ENDING:"]"===o?n.state=L.CDATA_ENDING_2:(n.cdata+="]"+o,n.state=L.CDATA);continue;case L.CDATA_ENDING_2:">"===o?(n.cdata&&I(n,"oncdata",n.cdata),I(n,"onclosecdata"),n.cdata="",n.state=L.TEXT):"]"===o?n.cdata+="]":(n.cdata+="]]"+o,n.state=L.CDATA);continue;case L.PROC_INST:"?"===o?n.state=L.PROC_INST_ENDING:T(l,o)?n.state=L.PROC_INST_BODY:n.procInstName+=o;continue;case L.PROC_INST_BODY:if(!n.procInstBody&&T(l,o))continue;"?"===o?n.state=L.PROC_INST_ENDING:n.procInstBody+=o;continue;case L.PROC_INST_ENDING:">"===o?(I(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=L.TEXT):(n.procInstBody+="?"+o,n.state=L.PROC_INST_BODY);continue;case L.OPEN_TAG:T(v,o)?n.tagName+=o:(P(n),">"===o?q(n):"/"===o?n.state=L.OPEN_TAG_SLASH:(N(l,o)&&F(n,"Invalid character in tag name"),n.state=L.ATTRIB));continue;case L.OPEN_TAG_SLASH:">"===o?(q(n,!0),j(n)):(F(n,"Forward-slash in opening tag not followed by >"),n.state=L.ATTRIB);continue;case L.ATTRIB:if(T(l,o))continue;">"===o?q(n):"/"===o?n.state=L.OPEN_TAG_SLASH:T(b,o)?(n.attribName=o,n.attribValue="",n.state=L.ATTRIB_NAME):F(n,"Invalid attribute name");continue;case L.ATTRIB_NAME:"="===o?n.state=L.ATTRIB_VALUE:">"===o?(F(n,"Attribute without value"),n.attribValue=n.attribName,B(n),q(n)):T(l,o)?n.state=L.ATTRIB_NAME_SAW_WHITE:T(v,o)?n.attribName+=o:F(n,"Invalid attribute name");continue;case L.ATTRIB_NAME_SAW_WHITE:if("="===o)n.state=L.ATTRIB_VALUE;else{if(T(l,o))continue;F(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",I(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===o?q(n):T(b,o)?(n.attribName=o,n.state=L.ATTRIB_NAME):(F(n,"Invalid attribute name"),n.state=L.ATTRIB)}continue;case L.ATTRIB_VALUE:if(T(l,o))continue;T(c,o)?(n.q=o,n.state=L.ATTRIB_VALUE_QUOTED):(F(n,"Unquoted attribute value"),n.state=L.ATTRIB_VALUE_UNQUOTED,n.attribValue=o);continue;case L.ATTRIB_VALUE_QUOTED:if(o!==n.q){"&"===o?n.state=L.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=o;continue}B(n),n.q="",n.state=L.ATTRIB_VALUE_CLOSED;continue;case L.ATTRIB_VALUE_CLOSED:T(l,o)?n.state=L.ATTRIB:">"===o?q(n):"/"===o?n.state=L.OPEN_TAG_SLASH:T(b,o)?(F(n,"No whitespace between attributes"),n.attribName=o,n.attribValue="",n.state=L.ATTRIB_NAME):F(n,"Invalid attribute name");continue;case L.ATTRIB_VALUE_UNQUOTED:if(N(h,o)){"&"===o?n.state=L.ATTRIB_VALUE_ENTITY_U:n.attribValue+=o;continue}B(n),">"===o?q(n):n.state=L.ATTRIB;continue;case L.CLOSE_TAG:if(n.tagName)">"===o?j(n):T(v,o)?n.tagName+=o:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=L.SCRIPT):(N(l,o)&&F(n,"Invalid tagname in closing tag"),n.state=L.CLOSE_TAG_SAW_WHITE);else{if(T(l,o))continue;N(b,o)?n.script?(n.script+="</"+o,n.state=L.SCRIPT):F(n,"Invalid tagname in closing tag."):n.tagName=o}continue;case L.CLOSE_TAG_SAW_WHITE:if(T(l,o))continue;">"===o?j(n):F(n,"Invalid characters in closing tag");continue;case L.TEXT_ENTITY:case L.ATTRIB_VALUE_ENTITY_Q:case L.ATTRIB_VALUE_ENTITY_U:var u,f;switch(n.state){case L.TEXT_ENTITY:u=L.TEXT,f="textNode";break;case L.ATTRIB_VALUE_ENTITY_Q:u=L.ATTRIB_VALUE_QUOTED,f="attribValue";break;case L.ATTRIB_VALUE_ENTITY_U:u=L.ATTRIB_VALUE_UNQUOTED,f="attribValue"}";"===o?(n[f]+=W(n),n.entity="",n.state=u):T(n.entity.length?_:w,o)?n.entity+=o:(F(n,"Invalid character in entity name"),n[f]+="&"+n.entity+o,n.entity="",n.state=u);continue;default:throw new Error(n,"Unknown state: "+n.state)}n.position>=n.bufferCheckPosition&&function(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),r=0,o=0,a=i.length;o<a;o++){var s=e[i[o]].length;if(s>n)switch(i[o]){case"textNode":O(e);break;case"cdata":I(e,"oncdata",e.cdata),e.cdata="";break;case"script":I(e,"onscript",e.script),e.script="";break;default:D(e,"Max buffer length exceeded: "+i[o])}r=Math.max(r,s)}var l=t.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=l+e.position}(n);return n}
|
|
12
|
-
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;O(t=this),""!==t.cdata&&(I(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(I(t,"onscript",t.script),t.script="")}};try{e=n(12106).Stream}catch(t){e=function(){}}var a=t.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function s(t,n){if(!(this instanceof s))return new s(t,n);e.apply(this),this._parser=new o(t,n),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(t){r.emit("error",t),r._parser.error=null},this._decoder=null,a.forEach((function(t){Object.defineProperty(r,"on"+t,{get:function(){return r._parser["on"+t]},set:function(e){if(!e)return r.removeAllListeners(t),r._parser["on"+t]=e,e;r.on(t,e)},enumerable:!0,configurable:!1})}))}s.prototype=Object.create(e.prototype,{constructor:{value:s}}),s.prototype.write=function(t){if("function"==typeof r&&"function"==typeof r.isBuffer&&r.isBuffer(t)){if(!this._decoder){var e=n(68163).I;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},s.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},s.prototype.on=function(t,n){var r=this;return r._parser["on"+t]||-1===a.indexOf(t)||(r._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),r.emit.apply(r,e)}),e.prototype.on.call(r,t,n)};var l="\r\n\t ",u="0124356789",f="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",c="'\"",h=l+">",p="[CDATA[",d="DOCTYPE",g="http://www.w3.org/XML/1998/namespace",y="http://www.w3.org/2000/xmlns/",m={xml:g,xmlns:y};l=E(l),u=E(u),f=E(f);var b=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,v=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,w=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,_=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;function E(t){return t.split("").reduce((function(t,e){return t[e]=!0,t}),{})}function T(t,e){return function(t){return"[object RegExp]"===Object.prototype.toString.call(t)}(t)?!!e.match(t):t[e]}function N(t,e){return!T(t,e)}c=E(c),h=E(h);var A,S,x,L=0;for(var C in t.STATE={BEGIN:L++,BEGIN_WHITESPACE:L++,TEXT:L++,TEXT_ENTITY:L++,OPEN_WAKA:L++,SGML_DECL:L++,SGML_DECL_QUOTED:L++,DOCTYPE:L++,DOCTYPE_QUOTED:L++,DOCTYPE_DTD:L++,DOCTYPE_DTD_QUOTED:L++,COMMENT_STARTING:L++,COMMENT:L++,COMMENT_ENDING:L++,COMMENT_ENDED:L++,CDATA:L++,CDATA_ENDING:L++,CDATA_ENDING_2:L++,PROC_INST:L++,PROC_INST_BODY:L++,PROC_INST_ENDING:L++,OPEN_TAG:L++,OPEN_TAG_SLASH:L++,ATTRIB:L++,ATTRIB_NAME:L++,ATTRIB_NAME_SAW_WHITE:L++,ATTRIB_VALUE:L++,ATTRIB_VALUE_QUOTED:L++,ATTRIB_VALUE_CLOSED:L++,ATTRIB_VALUE_UNQUOTED:L++,ATTRIB_VALUE_ENTITY_Q:L++,ATTRIB_VALUE_ENTITY_U:L++,CLOSE_TAG:L++,CLOSE_TAG_SAW_WHITE:L++,SCRIPT:L++,SCRIPT_ENDING:L++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r})),t.STATE)t.STATE[t.STATE[C]]=C;function R(t,e,n){t[e]&&t[e](n)}function I(t,e,n){t.textNode&&O(t),R(t,e,n)}function O(t){t.textNode=k(t.opt,t.textNode),t.textNode&&R(t,"ontext",t.textNode),t.textNode=""}function k(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function D(t,e){return O(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,R(t,"onerror",e),t}function M(t){return t.sawRoot&&!t.closedRoot&&F(t,"Unclosed root tag"),t.state!==L.BEGIN&&t.state!==L.BEGIN_WHITESPACE&&t.state!==L.TEXT&&D(t,"Unexpected end"),O(t),t.c="",t.closed=!0,R(t,"onend"),o.call(t,t.strict,t.opt),t}function F(t,e){if("object"!=typeof t||!(t instanceof o))throw new Error("bad call to strictFail");t.strict&&D(t,e)}function P(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,I(t,"onopentagstart",n)}function U(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],i=n[1];return e&&"xmlns"===t&&(r="xmlns",i=""),{prefix:r,local:i}}function B(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=U(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==g)F(t,"xml: prefix must be bound to "+g+"\nActual: "+t.attribValue);else if("xmlns"===r&&t.attribValue!==y)F(t,"xmlns: prefix must be bound to "+y+"\nActual: "+t.attribValue);else{var i=t.tag,o=t.tags[t.tags.length-1]||t;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,I(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function q(t,e){if(t.opt.xmlns){var n=t.tag,r=U(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(F(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var i=t.tags[t.tags.length-1]||t;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(e){I(t,"onopennamespace",{prefix:e,uri:n.ns[e]})}));for(var o=0,a=t.attribList.length;o<a;o++){var s=t.attribList[o],l=s[0],u=s[1],f=U(l,!0),c=f.prefix,h=f.local,p=""===c?"":n.ns[c]||"",d={name:l,value:u,prefix:c,local:h,uri:p};c&&"xmlns"!==c&&!p&&(F(t,"Unbound namespace prefix: "+JSON.stringify(c)),d.uri=c),t.tag.attributes[l]=d,I(t,"onattribute",d)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),I(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=L.TEXT:t.state=L.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function j(t){if(!t.tagName)return F(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=L.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=L.SCRIPT);I(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--;){if(t.tags[e].name===r)break;F(t,"Unexpected close tag")}if(e<0)return F(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=L.TEXT);t.tagName=n;for(var i=t.tags.length;i-- >e;){var o=t.tag=t.tags.pop();t.tagName=t.tag.name,I(t,"onclosetag",t.tagName);var a={};for(var s in o.ns)a[s]=o.ns[s];var l=t.tags[t.tags.length-1]||t;t.opt.xmlns&&o.ns!==l.ns&&Object.keys(o.ns).forEach((function(e){var n=o.ns[e];I(t,"onclosenamespace",{prefix:e,uri:n})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=L.TEXT}function W(t){var e,n=t.entity,r=n.toLowerCase(),i="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),i.toLowerCase()!==n?(F(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function V(t,e){"<"===e?(t.state=L.OPEN_WAKA,t.startTagPosition=t.position):N(l,e)&&(F(t,"Non-whitespace before first tag."),t.textNode=e,t.state=L.TEXT)}function G(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}L=t.STATE,String.fromCodePoint||(A=String.fromCharCode,S=Math.floor,x=function(){var t,e,n=[],r=-1,i=arguments.length;if(!i)return"";for(var o="";++r<i;){var a=Number(arguments[r]);if(!isFinite(a)||a<0||a>1114111||S(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?n.push(a):(t=55296+((a-=65536)>>10),e=a%1024+56320,n.push(t,e)),(r+1===i||n.length>16384)&&(o+=A.apply(null,n),n.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:x,configurable:!0,writable:!0}):String.fromCodePoint=x)}(e)},12106:(module,t,e)=>{module.exports=r;var n=e(64250).EventEmitter;function r(){n.call(this)}e(10778)(r,n),r.Readable=e(39134),r.Writable=e(87794),r.Duplex=e(25608),r.Transform=e(62008),r.PassThrough=e(27242),r.finished=e(34124),r.pipeline=e(33488),r.Stream=r,r.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",l));var a=!1;function s(){a||(a=!0,t.end())}function l(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(f(),0===n.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",l),r.removeListener("error",u),t.removeListener("error",u),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",u),t.on("error",u),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},68163:(t,e,n)=>{"use strict";var r=n(21209).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=c,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function f(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.I=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=a(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=a(e[r]),i>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=a(e[r]),i>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},16698:(module,t,e)=>{function n(t){try{if(!e.g.localStorage)return!1}catch(t){return!1}var n=e.g.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}module.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},27030:()=>{},71660:()=>{}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunkardplayer=globalThis.webpackChunkardplayer||[]).push([[421],{17964:(e,t,i)=>{i.r(t),i.d(t,{default:()=>k});var a,s=i(96789),r=i(20738),n=i(39906),o=i(5677),l=i(29020),h=function(e,t,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(e):a?a.value:t.get(e)},d=function(e,t,i,a,s){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?s.call(e,i):s?s.value=i:t.set(e,i),i};const u="urn:x-cast:de.swr.ardplayer.caf.player-events";class c extends s.F{constructor(e,t){var i;super(e,t),this.lastState="",this.currentMediaStream=null,this.currentTime=0,this.dvrTime=0,this.dvrLeft=0,this.dvrRight=0,this.onCustomChannelMessage=(e,t)=>{this.log("got message from receiver",e,t);try{if(e===u){const e=JSON.parse(t);this.onEventChannelMessage(e)}}catch(e){this.error("could not parse custom channel message",e,t)}},a.set(this,!1),1!==this.model.playbackRate&&(this.model.playbackRate=1,this.player.loop.dispatchEvent(n.a.PLAYBACK_RATE_CHANGE,{rate:1})),t.ctrl=this,null===(i=this.session)||void 0===i||i.addMessageListener(u,this.onCustomChannelMessage)}get isRemotePlayback(){return!0}applyVideoScale(e){}get castAddon(){var e;return null!==(e=this.player.addons.find((e=>"AddonChromecast"===e.ID)))&&void 0!==e?e:null}removeEventListeners(){var e;super.removeEventListeners(),this.vc.toggleForceControlsVisible("ChromeCast",!1),this.vc.playerView.classList.remove("ardplayer-state-casting-volumecontrol"),null===(e=this.session)||void 0===e||e.removeMessageListener(u,this.onCustomChannelMessage)}addEventListeners(){var e,t,i;this._dvrModeEnabled=!1,this._dvrWindow=0,this._dvrIsLive=!1,this.dvrTime=-1,this.vc.toggleForceControlsVisible("ChromeCast",!0);const a=this.castAddon;if(null!==(t=null===(e=a.remotePlayer)||void 0===e?void 0:e.canControlVolume)&&void 0!==t&&t&&this.vc.playerView.classList.add("ardplayer-state-casting-volumecontrol"),this.remotePlayer=a.remotePlayer,this.remotePlayerController=a.remotePlayerController,!this.remotePlayerController)throw Error("could not get remote player controller");this.session=null===(i=a.remoteCtx)||void 0===i?void 0:i.getCurrentSession(),this.emap.map(this.remotePlayerController,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.onTimeUpdate,this),this.emap.map(this.remotePlayerController,cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED,this.onStateChange,this),this.emap.map(this.remotePlayerController,cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,this.onMuteChange,this),this.emap.map(this.remotePlayerController,cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,this.onVolumeChange,this),this.emap.map(this.remotePlayerController,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,this.onMediaInfoChange,this),this.emap.map(this.remotePlayerController,cast.framework.RemotePlayerEventType.DURATION_CHANGED,this.onDurationChange,this),this.emap.map(this.remotePlayerController,cast.framework.RemotePlayerEventType.LIVE_SEEKABLE_RANGE_CHANGED,this.onLiveSeekableRangeChanged,this)}onEventChannelMessage(e){var t;"CONNECT_HANDSHAKE"===e.type?null===(t=this.session)||void 0===t||t.sendMessage(u,{type:"CONNECT_HANDSHAKE"}).catch(this.error):"ERROR"===e.type?this.player.safeTimeout((()=>{var t;this.lastState="ERROR",null===(t=this.player.errorCtrl)||void 0===t||t.throwStreamError("chromecast playback error\n"+JSON.stringify(e))})):this.info("further info",e)}onMediaInfoChange(e){this.log(e),this.mediaElement.updateCurrentSubtitleIdFromRemote()}onMuteChange(e){this.player.loop.dispatchEvent("Player.EXTERNAL_VOLUME_UPDATE",{volume:100*this.mediaElement.volume,muted:e.value,track:!1})}onVolumeChange(e){this.player.loop.dispatchEvent("Player.EXTERNAL_VOLUME_UPDATE",{volume:100*e.value,muted:this.mediaElement.muted,track:!1})}onStateChange(e){switch(this.log("statechange",e.value),e.value){case"PLAYING":this.onPlay();break;case"PAUSED":this.onPause(null);break;case"BUFFERING":this.bufferingEventHandler(!0);break;case"IDLE":"PLAYING"===this.lastState&&this.endEventHandler(null)}this.lastState=e.value}restartMedia(){null!==this.currentMediaStream&&this.loadStream(this.currentMediaStream)}onDurationChange(e){this._duration=e.value,this._ready=!0}getDuration(){return this._dvrModeEnabled?this._dvrWindow:this._duration}onTimeUpdate(e){this.currentTime=e.value}getCurrentTime(){var e,t,i;return this._pendingSeek>0?this._pendingSeek:this._dvrModeEnabled?this.dvrTime:null!==(i=null!==(t=null===(e=this.remotePlayer)||void 0===e?void 0:e.currentTime)&&void 0!==t?t:this.currentTime)&&void 0!==i?i:0}onLiveSeekableRangeChanged(e){var t,i;this._dvrModeEnabled=e.value&&e.value.end>0,e.value&&(this.dvrLeft=e.value.start,this.dvrRight=e.value.end),this._dvrWindow=this.dvrRight-this.dvrLeft,this.dvrTime=(null!==(i=null===(t=this.remotePlayer)||void 0===t?void 0:t.currentTime)&&void 0!==i?i:0)-this.dvrLeft,this.updateDVRValues()}updateDVRValues(){this.onDVRCallback(this._dvrModeEnabled,this._dvrWindow,this.currentTime>=this.getDuration())}loadStream(e){var t,i,s,d,u,c,m,p,v,E,T,y,f,g,S,k;this.log("loadStream()"),this.player.viewCtrl.hidePosterFrame(),this.mediaElement.mediaLoading(),this.model.playstate=r.R.PLAYSTATE_UNSPECIFIED,this.currentMediaStream=e;const _=this.mc.isLive;if((null===(t=this.remotePlayer)||void 0===t?void 0:t.canControlVolume)&&this.player.loop.dispatchEvent("Player.EXTERNAL_VOLUME_UPDATE",{volume:100*this.remotePlayer.volumeLevel,muted:this.remotePlayer.isMuted,track:!1}),this.stopOtherPlayingPlayers(),this.player.loop.dispatchEvent(n.a.EVENT_LOAD_STREAM,{mediaStream:e}),this._pendingSeek=this.model.time,!this._pendingSeek&&!this.mc.isLive){let e=this.pc.generic.vodInitialPlayheadSeconds;e<=0&&(e=this.pc.generic.vodStartSeconds),this._pendingSeek=e}const C=[];this.mc.subtitles.map((e=>Object.assign({},e,{sources:e.sources.filter((e=>"webvtt"===e.kind&&!(0,o.z3)(e.url)))}))).filter((e=>{var t,i;return(null!==(i=null===(t=e.sources)||void 0===t?void 0:t.length)&&void 0!==i?i:0)>0})).forEach(((e,t)=>{var i;const a=new chrome.cast.media.Track(t,chrome.cast.media.TrackType.TEXT);let s=String(null!==(i=e.sources[0].url)&&void 0!==i?i:"");s.startsWith("//")&&(s=`https:${s}`),a.trackContentId=s,a.trackContentType="text/vtt",a.subtype=chrome.cast.media.TextTrackType.SUBTITLES,a.name=`${(0,o.OT)(e.languageCode)}${"simple-language"===e.kind?" - Einfache Sprache":""}`,a.language=e.languageCode,a.customData=null,C.push(a)}));const A=new chrome.cast.media.MediaInfo(e.url,e.mimeType);A.tracks=C,A.streamType=_?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,A.duration=_?-1:null!==(i=this.mc.meta.durationSeconds)&&void 0!==i?i:0,this.player.isAudio?(A.metadata=new chrome.cast.media.MusicTrackMediaMetadata,A.metadata.songName=null!==(s=this.mc.meta.title)&&void 0!==s?s:"",A.metadata.title=null!==(d=this.mc.meta.title)&&void 0!==d?d:"",A.metadata.albumName=null!==(m=null!==(c=null!==(u=this.mc.meta.seriesTitle)&&void 0!==u?u:this.mc.meta.subHeading)&&void 0!==c?c:this.mc.meta.synopsis)&&void 0!==m?m:"",(0,o.Ed)(null===(p=this.mc.meta.publicationService)||void 0===p?void 0:p.name)&&(A.metadata.albumArtist=null===(v=this.mc.meta.publicationService)||void 0===v?void 0:v.name)):(A.metadata=new chrome.cast.media.MovieMediaMetadata,A.metadata.title=null!==(E=this.mc.meta.title)&&void 0!==E?E:"",A.metadata.subtitle=null!==(f=null!==(y=null!==(T=this.mc.meta.seriesTitle)&&void 0!==T?T:this.mc.meta.subHeading)&&void 0!==y?y:this.mc.meta.synopsis)&&void 0!==f?f:"",(0,o.Ed)(null===(g=this.mc.meta.publicationService)||void 0===g?void 0:g.name)&&(A.metadata.studio=null===(S=this.mc.meta.publicationService)||void 0===S?void 0:S.name)),!_&&(0,o.Ed)(this.mc.meta.broadcastedOnDateTime)&&(A.metadata.releaseDate=this.mc.meta.broadcastedOnDateTime);const w=(0,l.ll)([this.player.isAudio?"audio":"preview"],this.player.model);A.metadata.images=w.map((e=>({url:new URL(e.url,document.baseURI).href}))),this.mediaElement.mediaInfo=A;const b=new chrome.cast.media.LoadRequest(A);null===(k=cast.framework.CastContext.getInstance().getCurrentSession())||void 0===k||k.loadMedia(b).then((()=>{try{this.player.checkState()}catch(e){return void this.warn("aborting async",e)}h(this,a,"f")?this.error("loadMedia resolved after disposal!"):(this._ready=!0,this.evalInitialSeek(),this.mediaElement.mediaLoaded(),this.player.loop.dispatchEvent(n.a.EVENT_STREAM_LOADED,{}),this.player.loop.dispatchEvent(n.a.EVENT_INITIAL_FRAME,{}))}),(()=>this.error))}dispose(){d(this,a,!0,"f"),super.dispose()}setCurrentTime(e,t,i,a){if(void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===a&&(a=!1),this.remotePlayer&&this.remotePlayerController&&this.remotePlayer.canSeek){let i=Math.min(e,this.getDuration()-.1);this._dvrModeEnabled&&(i=this.dvrLeft+e,this.dvrTime=e),this.remotePlayer.currentTime=i,this.remotePlayerController.seek(),this.onStateChange({value:"BUFFERING"}),super.setCurrentTime(e,t,!0,a)}}updateTicker(){if(this._dvrModeEnabled)switch(this.model.playstate){case r.R.PLAYSTATE_PAUSED:case r.R.PLAYSTATE_PLAYING:this.dvrLeft+=.5,this.dvrRight+=.5}super.updateTicker()}canSeek(){return!0}getClassTypeString(){return"ChromecastCtrl"}addSource(e){this.warn("addSource not implemented for Chromecast.")}}a=new WeakMap;const m=c;var p=i(78940),v=function(e,t,i){for(var a=arguments.length>2,s=0;s<t.length;s++)i=a?t[s].call(e,i):t[s].call(e);return a?i:void 0},E=function(e,t,i,a,s,r){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=a.kind,h="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),c=!1,m=i.length-1;m>=0;m--){var p={};for(var v in a)p[v]="access"===v?{}:a[v];for(var v in a.access)p.access[v]=a.access[v];p.addInitializer=function(e){if(c)throw new TypeError("Cannot add initializers after decoration has completed");r.push(n(e||null))};var E=(0,i[m])("accessor"===l?{get:u.get,set:u.set}:u[h],p);if("accessor"===l){if(void 0===E)continue;if(null===E||"object"!=typeof E)throw new TypeError("Object expected");(o=n(E.get))&&(u.get=o),(o=n(E.set))&&(u.set=o),(o=n(E.init))&&s.unshift(o)}else(o=n(E))&&("field"===l?s.unshift(o):u[h]=o)}d&&Object.defineProperty(d,a.name,u),c=!0},T=function(e,t,i,a){return new(i||(i=Promise))((function(s,r){function n(e){try{l(a.next(e))}catch(e){r(e)}}function o(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,o)}l((a=a.apply(e,t||[])).next())}))},y=function(e,t,i,a,s){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?s.call(e,i):s?s.value=i:t.set(e,i),i},f=function(e,t,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(e):a?a.value:t.get(e)};class g{constructor(e,t,i,a){this.idNum=e,this.language=t,this.kind=i,this.mediaElement=a,this.id=String(this.idNum)}get mode(){return this.mediaElement.currentSubtitleId===this.idNum?"showing":"hidden"}set mode(e){"showing"===e?this.mediaElement.currentSubtitleId=this.idNum:this.mediaElement.currentSubtitleId===this.idNum&&(this.mediaElement.currentSubtitleId=-1)}}let S=(()=>{var e,t,i,a;let s,r=[];return e=class{constructor(){this.ctrl=(v(this,r),null),this.mediaInfo=null,t.set(this,!0),i.set(this,null),a.set(this,-1),this.videoHeight=0,this.videoWidth=0}mediaLoading(){y(this,t,!0,"f")}mediaLoaded(){y(this,t,!1,"f"),f(this,i,"f")&&(f(this,i,"f").call(this),y(this,i,null,"f"))}get remotePlayer(){var e,t;return null!==(t=null===(e=this.ctrl)||void 0===e?void 0:e.remotePlayer)&&void 0!==t?t:null}get remotePlayerController(){var e,t;return null!==(t=null===(e=this.ctrl)||void 0===e?void 0:e.remotePlayerController)&&void 0!==t?t:null}get buffered(){return{length:0,start:()=>0,end:()=>0}}get currentTime(){var e,t;return null!==(t=null===(e=this.remotePlayer)||void 0===e?void 0:e.currentTime)&&void 0!==t?t:-1}set currentTime(e){var t,i;(null===(t=this.remotePlayer)||void 0===t?void 0:t.canSeek)&&(this.remotePlayer.currentTime=e,null===(i=this.remotePlayerController)||void 0===i||i.seek())}get duration(){var e,t;return null!==(t=null===(e=this.remotePlayer)||void 0===e?void 0:e.duration)&&void 0!==t?t:-1}get textTracks(){var e,t,i,a,s;const r=null!==(s=null!==(i=null===(t=null===(e=this.remotePlayer)||void 0===e?void 0:e.mediaInfo)||void 0===t?void 0:t.tracks)&&void 0!==i?i:null===(a=this.mediaInfo)||void 0===a?void 0:a.tracks)&&void 0!==s?s:null;return null==r?[]:r.map((e=>new g(e.trackId,e.language,"subtitles",this)))}get currentSubtitleId(){return f(this,a,"f")}set currentSubtitleId(e){y(this,a,e,"f");const s=e>=0?[e]:[],r=new chrome.cast.media.EditTracksInfoRequest(s),n=()=>{var e,t;null===(t=null===(e=cast.framework.CastContext.getInstance().getCurrentSession())||void 0===e?void 0:e.getMediaSession())||void 0===t||t.editTracksInfo(r,(()=>{var e;null===(e=this.ctrl)||void 0===e||e.log("active chromecast tracks",s)}),(e=>{var t;return null===(t=this.ctrl)||void 0===t?void 0:t.log(e)}))};f(this,t,"f")?y(this,i,n,"f"):n()}updateCurrentSubtitleIdFromRemote(){var e,t,i,s,r,n,o,l;const h=null!==(i=null===(t=null===(e=cast.framework.CastContext.getInstance().getCurrentSession())||void 0===e?void 0:e.getMediaSession())||void 0===t?void 0:t.activeTrackIds)&&void 0!==i?i:null;if(null===(s=this.ctrl)||void 0===s||s.log("update subtitle state from",h),null!=h){const e=0===h.length?-1:h[0];if(e!==f(this,a,"f"))if(-1===e){const t=null!==(r=Array.from(this.textTracks).find((e=>"showing"===e.mode)))&&void 0!==r?r:null;y(this,a,e,"f"),null===(n=this.ctrl)||void 0===n||n.onTextTracksChanged({type:"modechange",track:t})}else y(this,a,e,"f"),null===(o=this.ctrl)||void 0===o||o.onTextTracksChanged({type:"modechange",track:null!==(l=Array.from(this.textTracks).find((e=>"showing"===e.mode)))&&void 0!==l?l:null})}}get muted(){var e,t;return null!==(t=null===(e=this.remotePlayer)||void 0===e?void 0:e.isMuted)&&void 0!==t&&t}set muted(e){var t;this.muted!==e&&(null===(t=this.remotePlayerController)||void 0===t||t.muteOrUnmute())}get volume(){var e,t;return null!==(t=null===(e=this.remotePlayer)||void 0===e?void 0:e.volumeLevel)&&void 0!==t?t:0}set volume(e){var t;const i=this.remotePlayer;(null==i?void 0:i.canControlVolume)&&i.volumeLevel!==e&&(i.volumeLevel=e,null===(t=this.remotePlayerController)||void 0===t||t.setVolumeLevel())}pause(){var e,t,i;!(null===(e=this.remotePlayer)||void 0===e?void 0:e.isPaused)&&(null===(t=this.remotePlayer)||void 0===t?void 0:t.canPause)&&(null===(i=this.remotePlayerController)||void 0===i||i.playOrPause())}play(){return T(this,void 0,void 0,(function*(){yield new Promise(((t,i)=>{var a,s,r,n,o;null!==(s=null===(a=this.remotePlayer)||void 0===a?void 0:a.isConnected)&&void 0!==s&&s?((null===(r=this.remotePlayer)||void 0===r?void 0:r.isPaused)&&(null===(n=this.remotePlayerController)||void 0===n||n.playOrPause()),t()):(null===(o=this.ctrl)||void 0===o||o.error("remote player not connected",this.remotePlayer),i(e.error()))}))}))}get playbackRate(){return-1}set playbackRate(t){throw e.error()}addEventListener(t,i){throw e.error()}removeEventListener(t,i){throw e.error()}get currentSrc(){throw e.error()}load(){throw e.error()}static error(){return new Error("tried to call unsupported method on chromecast media element")}},t=new WeakMap,i=new WeakMap,a=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;s=[p.Ee],E(e,null,s,{kind:"getter",name:"textTracks",static:!1,private:!1,access:{has:e=>"textTracks"in e,get:e=>e.textTracks},metadata:t},null,r),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();const k={Generator:class{execute(e,t){var i;try{null===(i=e.viewCtrl)||void 0===i||i.removeMediaCanvas()}catch(e){}t(new S)}},Controller:m}},96789:(e,t,i)=>{i.d(t,{F:()=>T});var a=i(39906),s=i(36185),r=i(55762),n=i(58732),o=i(20738),l=i(15867),h=i.n(l),d=i(78940),u=i(5677),c=function(e,t,i){for(var a=arguments.length>2,s=0;s<t.length;s++)i=a?t[s].call(e,i):t[s].call(e);return a?i:void 0},m=function(e,t,i,a,s,r){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=a.kind,h="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),c=!1,m=i.length-1;m>=0;m--){var p={};for(var v in a)p[v]="access"===v?{}:a[v];for(var v in a.access)p.access[v]=a.access[v];p.addInitializer=function(e){if(c)throw new TypeError("Cannot add initializers after decoration has completed");r.push(n(e||null))};var E=(0,i[m])("accessor"===l?{get:u.get,set:u.set}:u[h],p);if("accessor"===l){if(void 0===E)continue;if(null===E||"object"!=typeof E)throw new TypeError("Object expected");(o=n(E.get))&&(u.get=o),(o=n(E.set))&&(u.set=o),(o=n(E.init))&&s.unshift(o)}else(o=n(E))&&("field"===l?s.unshift(o):u[h]=o)}d&&Object.defineProperty(d,a.name,u),c=!0},p=function(e,t,i){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:i?"".concat(i," ",t):t})},v=function(e,t,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(e):a?a.value:t.get(e)},E=function(e,t,i,a,s){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?s.call(e,i):s?s.value=i:t.set(e,i),i};let T=(()=>{var e,t,i,l,T,y,f,g,S,k,_,C,A,w,b,P,R,L,M,N;let D,I,x,U,V,O,H,F=[d.JW],W=[],G=[];I=class{get executionContextProvider(){var e;return null!==(e=this.player)&&void 0!==e?e:null}get model(){return this.player.model}get pc(){return this.model.playerConfig}get mc(){return this.model.mediaCollection}get vc(){return this.player.viewCtrl}get videoScale(){return this.model.videoScaleMode}set videoScale(e){this.model.videoScaleMode!==e&&(this.model.videoScaleMode=e,this.applyVideoScale(e))}set remotePlaybackDevice(t){v(this,e,"f")!==t&&(this.player.loop.dispatchEvent(a.a.REMOTE_PLAYBACK_CHANGED,(0,u.cl)(t)?{isRemote:!1}:{isRemote:!0,device:t}),this.player.isLive&&!this.player.isAudio&&this.vc.setLiveInitialBufferState()),E(this,e,t,"f")}get remotePlaybackDevice(){return v(this,e,"f")}get isRemotePlayback(){return!(0,u.cl)(v(this,e,"f"))}get isPlayingSpatialAudio(){return!1}get playbackStalled(){return v(this,T,"f")}get __cumulativeDrift(){return v(this,A,"f")}constructor(s,n){this.minDisplayedLiveOffset=(c(this,G),7),this.subtitleListeners=[],this.audioTrackListeners=[],this.audioTracks=[],this.audioTrack=null,e.set(this,null),t.set(this,0),i.set(this,0),l.set(this,!1),T.set(this,!1),y.set(this,0),f.set(this,!1),g.set(this,!1),this._duration=0,this._dvrModeEnabled=!1,S.set(this,-1),k.set(this,-1),_.set(this,0),C.set(this,0),A.set(this,0),this.isAtEnd=!1,this._useAndroidInitialSeekFallback=!1,w.set(this,-1),b.set(this,-1),P.set(this,!1),this._ready=!1,this._pendingSeek=0,R.set(this,-1),L.set(this,!1),this._dvrEnabled=!1,this._dvrIsLive=!1,this._dvrWindow=0,this.expectedAudios=[],M.set(this,!1),this.pinnedDvrSync=null,this.dvrWindowUnstable=!1,this[N]=this.getClassTypeString(),this.player=s,this.mediaElement=n,this.applyVideoScale(this.videoScale),this.player.loop.dispatchEvent(a.a.EVENT_INIT,{}),this.player.loop.dispatchEvent(a.a.EVENT_STATUS_CHANGE,{status:"init"}),this.emap=new(h()),this.addEventListeners(),r.x.for(this.player).storageListeners.add(this),n instanceof HTMLMediaElement&&(n.textTracks.onaddtrack=e=>{this.onTextTracksChanged(e)},n.textTracks.onremovetrack=e=>{this.onTextTracksChanged(e)}),this.player.loop.dispatchEvent(a.a.EVENT_STATUS_CHANGE,{status:"ready"})}debugString(){return"none"}debugQualityLevel(){return[-1,1]}debugResolution(){return this.isRemotePlayback||this.player.isAudio?"-":`${this.mediaElement.videoWidth}x${this.mediaElement.videoHeight}`}debugFrames(){if(this.mediaElement instanceof HTMLVideoElement){const e=this.mediaElement.getVideoPlaybackQuality();return`${e.droppedVideoFrames} dropped of ${e.totalVideoFrames}`}return"no video info available"}get subQualities(){return this.error("using base implementation for subQuality listing!"),[{level:-1,label:"Auto",width:-1,height:-1}]}selectSubQuality(e){this.error("using base implementation for subQuality selection!")}get currentSubQuality(){return this.error("using base implementation for currentSubQuality!"),-1}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.player.console.log(`[${this.getClassTypeString()}]`,...t)}info(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.player.console.info(`[${this.getClassTypeString()}]`,...t)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.player.console.warn(`[${this.getClassTypeString()}]`,...t)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.player.console.error(`[${this.getClassTypeString()}]`,...t)}onTextTracksChanged(e){this.subtitleListeners.forEach((t=>{t.onTextTracksChanged(e)}))}addSubtitleListener(e){this.subtitleListeners.includes(e)||this.subtitleListeners.push(e)}removeSubtitleListener(e){const t=this.subtitleListeners.indexOf(e);-1!==t&&(this.subtitleListeners=this.subtitleListeners.splice(t,1))}onAudioTracksChanged(){1===this.audioTracks.length&&1===this.expectedAudios.length&&"audio-description"===this.expectedAudios[0].kind&&(this.audioTracks[0].isAudioDescription=!0),this.player.loop.dispatchEvent(a.a.AUDIO_TRACK_LIST_CHANGED,{audioTracks:this.audioTracks}),this.audioTrackListeners.forEach((e=>{e.onAudioTracksChanged(this.audioTracks)}))}addAudioTrackListener(e){this.audioTrackListeners.includes(e)||this.audioTrackListeners.push(e)}removeAudioTrackListener(e){const t=this.audioTrackListeners.indexOf(e);-1!==t&&(this.audioTrackListeners=this.audioTrackListeners.splice(t,1))}addEventListeners(){this.emap.map(this.mediaElement,"loadstart",this.onLoadStart,this),this.emap.map(this.mediaElement,"canplay",this.onCanPlay,this),this.emap.map(this.mediaElement,"play",this.onPlay,this),this.emap.map(this.mediaElement,"pause",this.onPause,this),this.emap.map(this.mediaElement,"error",this.onError,this),this.emap.map(this.mediaElement,"waiting",this.onWaiting,this),this.emap.map(this.mediaElement,"ended",this.onEnded,this),this.emap.map(this.mediaElement,"timeupdate",this.onTimeUpdate,this),this.emap.map(this.mediaElement,"seeking",this.onSeeking,this),this.emap.map(this.mediaElement,"seeked",this.onSeekEnd,this),this.emap.map(this.mediaElement,"loadedmetadata",this.onLoadedMetadata,this),this.emap.map(this.mediaElement,"loadeddata",this.onLoadedData,this),this.emap.map(this.mediaElement,"durationchange",this.onDurationChange,this),this.emap.map(this.mediaElement,"progress",this.onProgress,this),this.emap.map(this.mediaElement,"stalled",this.onStalled,this),this.emap.map(this.mediaElement,"volumechange",this.onLocalVolumeChange,this)}onLoadStart(){var e,t;s.O.isAndroidDevice&&(null!==(t=null===(e=this.mediaElement)||void 0===e?void 0:e.currentSrc)&&void 0!==t?t:"").toLowerCase().indexOf(".m3u8")>0&&(this._useAndroidInitialSeekFallback=!0)}onCanPlay(){this.mediaElement instanceof HTMLMediaElement&&!(this.mediaElement.readyState>=this.mediaElement.HAVE_FUTURE_DATA)||this.bufferingEventHandler(!1),E(this,T,!1,"f"),this.setPlaybackRate(this.model.playbackRate)}onPlay(){this.startTicker(),this.playEventHandler(),this.bufferingEventHandler(!1),this.vc.setOutDelayed()}onPause(e){this.pauseEventHandler(e,!isNaN(this.mediaElement.currentTime)&&!isNaN(this.mediaElement.duration)&&this.mediaElement.currentTime>=this.mediaElement.duration&&("ios"!==s.O.platform||!this.player.isLive))}onError(e){this.handleError(e)}onWaiting(e){this.mediaElement instanceof HTMLMediaElement&&this.bufferingEventHandler(this.mediaElement.readyState<this.mediaElement.HAVE_FUTURE_DATA),E(this,T,!0,"f")}onEnded(e){this.stopTicker(),this.mediaElement.pause(),this.endEventHandler(e),this.onTimeChange(this._duration,0)}onTimeUpdate(e){if(this.onProgress(null),this.updateTicker(),this.isSeeking()&&!v(this,P,"f")){const e=this.getCurrentTime();Math.abs(v(this,b,"f")-e)<Math.abs(v(this,w,"f")-e)&&this.onSeekEnd(null)}}onSeeking(){E(this,P,!0,"f"),v(this,f,"f")||0!==this._pendingSeek||this.player.loop.dispatchEvent(a.a.EVENT_SEEK_START,{from:v(this,w,"f"),to:v(this,b,"f")}),this.bufferingEventHandler(!0)}onSeekEnd(e){this.isSeeking()&&(v(this,f,"f")||0!==this._pendingSeek||this.player.loop.dispatchEvent(a.a.EVENT_SEEK_END,{lastPosition:v(this,w,"f"),position:this.getCurrentTime()}),E(this,f,!1,"f"),E(this,w,-1,"f"),E(this,b,-1,"f"),v(this,P,"f")||this.bufferingEventHandler(!1),E(this,P,!1,"f"),this.bufferingEventHandler(!1),this.player.clearExecutionContext(a.a.EVENT_SEEK_START,a.a.EVENT_SEEK_START_INTENT,a.a.EVENT_SEEK_END,a.a.EVENT_BUFFERING))}isSeeking(){return v(this,P,"f")||-1!==v(this,b,"f")&&-1!==v(this,w,"f")}onLoadedMetadata(){this._ready=!0,this.evalInitialSeek()}onLoadedData(){this.evalInitialSeek(),this.onProgress(null)}onDurationChange(e){const t=this.mediaElement.duration;isNaN(t)||(this._duration=t),this._ready=!0,this.onProgress(null)}onLocalVolumeChange(e){const t=this.mediaElement.muted,i=this.mediaElement.volume;this.getVolume()/100===i&&v(this,M,"f")===t||(this.player.setMutedInternal(t,!0,!1,!0,!0),this.player.setVolumeInternal(100*i,!0,!1,!1))}onProgress(e){var t;if(!this.mediaElement||"waiting"===(null==e?void 0:e.type)&&this.isSeeking())return;const i=this.getCurrentTime(),a=this.getDuration();let s=-1;const r=null===(t=this.mediaElement)||void 0===t?void 0:t.buffered;if(r)for(let e=0;e<r.length;e++)if(r.start(e)<=i&&r.end(e)>=i){s=r.end(e);break}if(-1===s)return;const n=Math.round(s/a*100);this.bufferProgressHandler(n)}onStalled(e){this.onProgress(e)}onSourceError(e){this.stopTicker(),this.handleError(e)}onTimeChange(e,t){this.model.duration!==e&&e>0&&this.model.duration>0&&null!=this.pinnedDvrSync&&(this.pinnedDvrSync=null,this.dvrWindowUnstable=!0,this.warn("DVR window unstable, disabled sync info pinning")),this.updateDuration(e),this.updateTime(Math.max(t,0))}bufferingEventHandler(e){this.onProgress(null),e&&!this.isAtEnd?this.vc.showBufferingIndicator():this.vc.hideBufferingIndicator(),e!==v(this,l,"f")&&(E(this,l,e,"f"),this.player.loop.dispatchEvent(a.a.EVENT_BUFFERING,{isBuffering:e}))}bufferProgressHandler(e){this.vc.timeline.setBufferProgress(e),E(this,y,e,"f")}playEventHandler(){var e;if(this.stopOtherPlayingPlayers(),this.model.playstate=o.R.PLAYSTATE_PLAYING,this.player.loop.dispatchEvent(a.a.EVENT_STATUS_CHANGE,{status:"play"}),this.isAtEnd){const t=this.getCurrentTimeWithoutSeek();null===(e=this.executionContextProvider)||void 0===e||e.preserveExecutionContext(a.a.EVENT_INITIAL_FRAME,500);const i=e=>{e.currentTime!==t&&(this.player.loop.dispatchEvent(a.a.EVENT_INITIAL_FRAME,{}),v(this,l,"f")||this.bufferingEventHandler(!1))},s=()=>{this.player.loop.removeEventListener(a.a.EVENT_UPDATE_STREAM_TIME,i),this.player.loop.removeEventListener(a.a.EVENT_INITIAL_FRAME,s)};this.player.loop.addEventListener(a.a.EVENT_UPDATE_STREAM_TIME,i),this.player.loop.addEventListener(a.a.EVENT_INITIAL_FRAME,s)}this.isAtEnd=!1,this.player.pixelController.replayTrigger(),this.player.pixelController.initialPlayTrigger(),this.player.loop.dispatchEvent(a.a.EVENT_PLAY_STREAM,{})}pauseEventHandler(e,t){void 0===t&&(t=!1),this.model.playstate=o.R.PLAYSTATE_PAUSED,this.player.loop.dispatchEvent(a.a.EVENT_STATUS_CHANGE,{status:"pause"}),this.player.loop.dispatchEvent(a.a.EVENT_PAUSE_STREAM,{ended:t})}endEventHandler(e){this.isAtEnd=!0,this.jumpToStart(),this.player.pixelController.triggerPixel(n.k.CLIP_ENDED),this.pauseEventHandler(e,!0),this.vc.hidePosterFrame(),this.mc.isLive||this.vc.showPlayAgain(),this.vc.hideBufferingIndicator(),"web"===s.O.platform&&this.player.setFullscreenInternal(!1),this.player.pixelController&&(this.player.pixelController._isReplay=!0),this.player.loop.dispatchEvent(a.a.EVENT_END_STREAM,{})}evalInitialSeek(){if(this._pendingSeek>0){if(this.canSeek()){E(this,f,!0,"f");const e=this._pendingSeek;this._pendingSeek=0,this.setCurrentTime(e,v(this,g,"f"),!1,!0),v(this,g,"f")||this.play()}}else v(this,g,"f")||this.play()}updateDuration(e){this.model.duration!==e&&(this.model.duration=e,this.player.loop.dispatchEvent(a.a.EVENT_UPDATE_STREAM_DURATION,{duration:e}))}restartMedia(){this.jumpToStart(),this.play()}resetStartAndEndTime(){this.pc.generic.vodStartSeconds=0,this.pc.generic.vodEndSeconds=0}updateTime(e){this.model.time=e,this.vc.updateTime(e),this.vc.updateTimeline(e,this.model.duration);const s=Date.now();if(s>=v(this,i,"f")+1e3){E(this,i,s,"f");let t=0;const a=Math.round(this.model.duration),r=Math.round(e);this.vc._dvrEnabledAndRequested&&!this.vc._dvrIsLive&&(t=Math.min(Math.round(a-e),a)),this.player.pixelController.triggerCustomPixel(n.k.SUPER_PLAYHEAD_POSITION,!1,{currentTime:r,duration:a,dvrRelativeTime:-t})}const l=this.pc.generic.vodStartSeconds,h=this.pc.generic.vodEndSeconds;if(l>0&&e<l){const i=Math.round(e);Math.abs(v(this,t,"f")-i)>3&&(this.setCurrentTime(l,!1,!1,!0),E(this,t,i,"f"))}else h>0&&e>h&&(this.setCurrentTime(l,!1,!1,!0),this.pause());this.player.loop.dispatchEvent(a.a.EVENT_UPDATE_STREAM_TIME,{currentTime:e}),window.parent!==window&&r.x.AVAILABLE&&this.model.playstate===o.R.PLAYSTATE_PLAYING&&r.x.get(r.x.SUFFIX_GLOBAL,r.x.CURRENT_PLAYERID,!0)!==this.player.getId()&&this.pause()}removeEventListeners(){this.emap.all()}dispose(){this.log("dispose()"),this.removeEventListeners(),r.x.for(this.player).storageListeners.delete(this),this.mediaElement instanceof HTMLMediaElement&&(this.mediaElement.textTracks.onaddtrack=null,this.mediaElement.textTracks.onremovetrack=null),this.mediaElement.pause(),this.subtitleListeners=[],this.audioTrackListeners=[],this.stopTicker(),this.player.loop.dispatchEvent(a.a.EVENT_STOP_STREAM,{}),v(this,g,"f")&&0===this.model.playstate&&(this.model.playstate=3),this.audioTracks=[],this.audioTrack=null}stopOtherPlayingPlayers(){r.x.add(r.x.SUFFIX_GLOBAL,r.x.CURRENT_PLAYERID,this.player.getId(),!0,!0),o.R.autoPlayerAlreadyActive=this.player.getId()}onStorageValueChanged(e,t){e===r.x.CURRENT_PLAYERID&&"string"==typeof t&&this.isPlaying()&&t!==this.player.getId()&&this.pause()}loadStream(e){if(E(this,g,1===this.model.playstate||3===this.model.playstate,"f"),this.model.playstate=o.R.PLAYSTATE_UNSPECIFIED,v(this,g,"f")||this.stopOtherPlayingPlayers(),this.player.preserveExecutionContext(a.a.EVENT_LOAD_STREAM,5e3),this.player.loop.dispatchEvent(a.a.EVENT_LOAD_STREAM,{mediaStream:e}),this._pendingSeek=this.model.time,0===this._pendingSeek&&!this.mc.isLive){let e=this.pc.generic.vodInitialPlayheadSeconds;e<=0&&(e=this.pc.generic.vodStartSeconds),this._pendingSeek=e}if(this.mediaElement instanceof HTMLMediaElement)for(;this.mediaElement.children.length>0;)this.mediaElement.removeChild(this.mediaElement.children[0]);if(this.expectedAudios=e.audios,this.addSource(e),!s.O.isEmbedded){const e=r.x.volume(this.player),t=this.pc.generic.isMuted||r.x.muted(this.player);this.player.setVolumeInternal(e,!1,!0,!0),this.player.setMutedInternal(t,!1,!0,!1,!1)}if(v(this,g,"f")){const e=()=>{this.pause(),this.mediaElement.removeEventListener("canplay",e)};this.mediaElement.addEventListener("canplay",e)}this.mediaElement.load()}startTicker(){this.stopTicker(),this.updateTicker(),E(this,R,this.player.safeInterval((()=>{this.updateTicker()}),500),"f")}stopTicker(){clearInterval(v(this,R,"f")),E(this,R,-1,"f")}updateTicker(){this.onTimeChange(this.getDuration(),this.getCurrentTime())}play(){var e;this.player.preserveExecutionContext(a.a.EVENT_PLAY_STREAM),E(this,g,!1,"f"),v(this,L,"f")?this.handleError():null===(e=this.mediaElement.play())||void 0===e||e.then((()=>{var e;try{this.player.checkState()}catch(e){return void this.warn("aborting async",e)}null===(e=this.vc)||void 0===e||e.hidePosterFrame(),this.startTicker()})).catch((e=>{var t,i,s;try{this.player.checkState()}catch(e){return void this.warn("aborting async",e)}this.error("playback failure",e),null===(t=this.player)||void 0===t||t.loop.dispatchEvent(a.a.EVENT_AUTOPLAY_STREAM_PROHIBITED,{}),null===(i=this.vc)||void 0===i||i.showPlayBtn(),null===(s=this.vc)||void 0===s||s.showPosterFrame(),this.stopTicker()}))}pause(){this.player.preserveExecutionContext(a.a.EVENT_PAUSE_STREAM),this.model.playstate=o.R.PLAYSTATE_PAUSED,this.mediaElement.pause(),this.mc.isLive&&this.mc.isDvrEnabled||(this.updateTicker(),this.stopTicker())}togglePlay(){v(this,L,"f")?this.handleError():this.isPlaying()?this.pause():this.play()}isPlaying(){return this.model.playstate===o.R.PLAYSTATE_PLAYING}setVolume(e){e>=0&&e<=100&&(this.mediaElement.volume=e/100)}getVolume(){return r.x.volume(this.player)}setMuted(e){E(this,M,e,"f"),this.mediaElement.muted=e,this.mediaElement instanceof HTMLMediaElement&&(e?this.mediaElement.setAttribute("muted","muted"):this.mediaElement.removeAttribute("muted"))}setCurrentTime(e,t,i,s){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===s&&(s=!1),this.player.preserveExecutionContext(a.a.EVENT_SEEK_START);let r=-1;this.canCalculateDvrUnixTime()&&e>=this.dvrRelToUnix(0)&&(r=e,e=this.dvrUnixToRel(e));const n=this.getDuration()>0?Math.min(e,this.getDuration()-.1):e;this.setSeekEventTimestamps(this.getCurrentTime(),n),this.setCurrentTimeRaw(n,r,t,i,s),this.player.model.time=n}setSeekEventTimestamps(e,t){E(this,w,e,"f"),E(this,b,t,"f")}setCurrentTimeRaw(e,t,i,s,r){void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===r&&(r=!1),E(this,_,0,"f"),E(this,C,0,"f"),E(this,A,0,"f");const n=this.pc.generic.vodStartSeconds,o=this.pc.generic.vodEndSeconds;if(!r&&(n>0&&e<n||o>0&&e>o)&&this.resetStartAndEndTime(),this._ready){if(!this.canSeek())return;e=Math.max(0,e),this._pendingSeek=0,this.isAtEnd&&E(this,f,!0,"f");try{this.player.preserveExecutionContextAlias(a.a.EVENT_SEEK_START,-1,a.a.EVENT_SEEK_START_INTENT,a.a.EVENT_SEEK_END,a.a.EVENT_BUFFERING),v(this,f,"f")||0!==this._pendingSeek||this.player.loop.dispatchEvent(a.a.EVENT_SEEK_START_INTENT,{from:v(this,w,"f"),to:v(this,b,"f")}),s||(this.canSeekToUnixTime&&t>0?this.setCurrentUnixTime(t):this.mediaElement.currentTime=e)}catch(t){this._pendingSeek=e}}else this._pendingSeek=e;this.updateTicker(),this.isAtEnd&&!i&&this.play()}setCurrentUnixTime(e){throw new Error("method not implemented")}seekToLive(){this.canSeek()&&this.setCurrentTime(this.getDuration())}setPlaybackRate(e){const t=this.model.playbackRate!==e||this.mediaElement.playbackRate!==e;this.model.playbackRate=e,this.mediaElement.playbackRate!==e&&(this.mediaElement.playbackRate=e),t&&this.player.loop.dispatchEvent(a.a.PLAYBACK_RATE_CHANGE,{rate:e})}getDvrToDateSync(){return null}getSmoothDvrToDateSync(e){var t,i,a;return!this.dvrWindowUnstable&&e&&this.canCalculateDvrUnixTime()?(null==this.pinnedDvrSync&&(this.pinnedDvrSync=this.getDvrToDateSync(),0!==(null===(t=this.pinnedDvrSync)||void 0===t?void 0:t.rel)&&0!==(null===(i=this.pinnedDvrSync)||void 0===i?void 0:i.real)&&0!==(null===(a=this.pinnedDvrSync)||void 0===a?void 0:a.at)||(this.pinnedDvrSync=null)),this.pinnedDvrSync):this.getDvrToDateSync()}dvrRelToUnix(e,t){void 0===t&&(t=!1);const i=this.getSmoothDvrToDateSync(t);if(null!==i){if(t&&!this.dvrWindowUnstable)return this.__dvrRelToUnixRaw(e,i)|0;let a=v(this,A,"f");if(this.isPlaying()&&!this.playbackStalled){if(0!==v(this,_,"f")){const e=this.getCurrentTime();if(isFinite(e)&&e>0){const t=this.__dvrRelToUnixRaw(e,i)-v(this,_,"f");E(this,A,v(this,A,"f")+t,"f"),a+=t,this.info("PAUSE DRIFT",t)}E(this,_,0,"f"),E(this,C,0,"f")}const e=performance.now(),t=1e3*this.__dvrRelToUnixRaw(100,i);if(-1!==v(this,S,"f")&&-1!==v(this,k,"f")){const i=t-(v(this,k,"f")+(e-v(this,S,"f")));Math.abs(i)>=10&&(E(this,A,v(this,A,"f")+i/1e3,"f"),a+=i/1e3)}E(this,S,e,"f"),E(this,k,t,"f")}else E(this,S,-1,"f"),E(this,k,-1,"f"),0===v(this,C,"f")?(E(this,C,this.getCurrentTime(),"f"),E(this,_,this.__dvrRelToUnixRaw(v(this,C,"f"),i),"f")):a+=this.__dvrRelToUnixRaw(this.getCurrentTime(),i)-v(this,_,"f");return this.__dvrRelToUnixRaw(e,i)-a|0}return t&&!this.dvrWindowUnstable||(E(this,_,0,"f"),E(this,C,0,"f"),E(this,A,0,"f")),0}__dvrRelToUnixRaw(e,t){const i=t.rel-e,a=Date.now()-t.at;return(t.real+a)/1e3-i}dvrUnixToRel(e){return e-this.dvrRelToUnix(0)}canCalculateDvrUnixTime(){const e=this.getDvrToDateSync();return null!=e&&0!==e.real&&0!==e.rel&&0!==e.at}dvrUnixToRelNullable(e){const t=this.dvrRelToUnixNullable(0);return null==t?null:e-t}dvrRelToUnixNullable(e,t){return void 0===t&&(t=!1),null==this.getSmoothDvrToDateSync(t)?null:this.dvrRelToUnix(e,t)}get canSeekToUnixTime(){return!1}getPercentBuffered(){return v(this,y,"f")}getCurrentUnixTime(){return this._dvrEnabled&&this.canCalculateDvrUnixTime()?this.dvrRelToUnix(this.getCurrentTime()):-1}getCurrentUnixTimeWindowStart(){return this._dvrEnabled&&this.canCalculateDvrUnixTime()?this.dvrRelToUnix(0):-1}getCurrentUnixTimeWindowEnd(){return this._dvrEnabled&&this.canCalculateDvrUnixTime()?this.dvrRelToUnix(this.getDuration()):-1}getCurrentTime(){if(this._pendingSeek>0)return this._pendingSeek;const e=this.mediaElement.currentTime;return isNaN(e)?this.model.time:e}getCurrentTimeWithoutSeek(){return!v(this,f,"f")&&v(this,w,"f")>=0?v(this,w,"f"):this.getCurrentTime()}setTimeByPercent(e){const t=e/100*this.getDuration();return this.setCurrentTime(t),t}getDuration(){const e=this.mediaElement.duration;return isNaN(e)?0!==this._duration?this._duration:this.model.duration:e}stop(e){if(!this.isAtEnd){this.model.playstate=o.R.PLAYSTATE_STOPPED,this.isAtEnd=!0,this.player.loop.dispatchEvent(a.a.EVENT_STOP_STREAM,{}),this.player.loop.dispatchEvent(a.a.EVENT_STATUS_CHANGE,{status:"stop"});try{this.player.checkStateStrict(),this.pause(),s.O.isEmbedded||this.jumpToStart(),this.bufferingEventHandler(!1),this.updateTicker(),this.stopTicker()}catch(e){}}}jumpToStart(){this.setCurrentTime(0,!0)}onDVRCallback(e,t,i){this._dvrEnabled=e&&t>=120,this._dvrWindow=t,this._dvrIsLive=i,this.player.viewCtrl.onDVRCallback(this._dvrEnabled,this._dvrWindow,this._dvrIsLive),this.updateTicker(),this.player.loop.dispatchEvent(a.a.EVENT_DVR_CHANGE,{dvrEnabled:this._dvrEnabled,dvrIsLive:this._dvrIsLive,dvrWindow:this._dvrWindow})}getAudioTracks(){return[]}setAudioTrack(e){}setAudioTrackById(e){}getAudioTrack(){return null}handleError(e){var t;this.stopTicker(),E(this,L,!0,"f");let i=[];e&&(this.error(e),"string"==typeof e?i=[e]:"object"==typeof e&&("type"in e&&(0,u.Ed)(e.type)&&"error"!==e.type&&i.push(String(e.type)),"name"in e&&(0,u.Ed)(e.name)&&"error"!==e.name&&i.push(String(e.name)),(0,u.Ed)(e.message)&&i.push(String(e.message)))),null===(t=this.player.errorCtrl)||void 0===t||t.throwStreamError(...i)}toJSON(){return toString()}};return e=new WeakMap,t=new WeakMap,i=new WeakMap,l=new WeakMap,T=new WeakMap,y=new WeakMap,f=new WeakMap,g=new WeakMap,S=new WeakMap,k=new WeakMap,_=new WeakMap,C=new WeakMap,A=new WeakMap,w=new WeakMap,b=new WeakMap,P=new WeakMap,R=new WeakMap,L=new WeakMap,M=new WeakMap,x=[(0,d.C6)(a.a.EVENT_PAUSE_STREAM,{type:"other",initiator:"external-playback-pause"})],U=[(0,d.C6)(a.a.EVENT_PLAY_STREAM)],V=[(0,d.kF)({type:"lifecycle",initiator:"playback-end"})],O=[(0,d.C6)(a.a.EVENT_LOAD_STREAM)],H=[(0,d.kF)({type:"other",initiator:"dvrUpdate"})],N=Symbol.toStringTag,p(I,"AbstractPlayerCtrl"),(()=>{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;m(I,null,x,{kind:"method",name:"onPause",static:!1,private:!1,access:{has:e=>"onPause"in e,get:e=>e.onPause},metadata:e},null,G),m(I,null,U,{kind:"method",name:"playEventHandler",static:!1,private:!1,access:{has:e=>"playEventHandler"in e,get:e=>e.playEventHandler},metadata:e},null,G),m(I,null,V,{kind:"method",name:"endEventHandler",static:!1,private:!1,access:{has:e=>"endEventHandler"in e,get:e=>e.endEventHandler},metadata:e},null,G),m(I,null,O,{kind:"method",name:"evalInitialSeek",static:!1,private:!1,access:{has:e=>"evalInitialSeek"in e,get:e=>e.evalInitialSeek},metadata:e},null,G),m(I,null,H,{kind:"method",name:"onDVRCallback",static:!1,private:!1,access:{has:e=>"onDVRCallback"in e,get:e=>e.onDVRCallback},metadata:e},null,G),m(null,D={value:I},F,{kind:"class",name:I.name,metadata:e},null,W),I=D.value,e&&Object.defineProperty(I,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),c(I,W)})(),I})()}}]);
|