From 5eb4c93bea75bdef6684beb05f68618c166c11b1 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 26 Dec 2025 18:45:54 +0100 Subject: [PATCH] wait #7917 @4 --- js/libs/fluidbook/fluidbook.keyboard.js | 32 +++++++- js/libs/videojs/lang/ar.js | 63 +++++++++------- js/libs/videojs/lang/ar.json | 63 +++++++++------- js/libs/videojs/lang/az.js | 97 ++++++++++++++++++++++++ js/libs/videojs/lang/az.json | 97 ++++++++++++++++++++++++ js/libs/videojs/lang/ba.js | 2 +- js/libs/videojs/lang/ba.json | 2 +- js/libs/videojs/lang/bg.js | 2 +- js/libs/videojs/lang/bg.json | 2 +- js/libs/videojs/lang/bn.js | 90 ++++++++++++++++++++++ js/libs/videojs/lang/bn.json | 90 ++++++++++++++++++++++ js/libs/videojs/lang/ca.js | 99 +++++++++++++++++++++---- js/libs/videojs/lang/ca.json | 99 +++++++++++++++++++++---- js/libs/videojs/lang/cs.js | 14 ++-- js/libs/videojs/lang/cs.json | 14 ++-- js/libs/videojs/lang/cy.js | 4 +- js/libs/videojs/lang/cy.json | 4 +- js/libs/videojs/lang/da.js | 2 +- js/libs/videojs/lang/da.json | 2 +- js/libs/videojs/lang/de.js | 18 +++-- js/libs/videojs/lang/de.json | 18 +++-- js/libs/videojs/lang/el.js | 51 ++++++++++++- js/libs/videojs/lang/el.json | 51 ++++++++++++- js/libs/videojs/lang/en-GB.js | 3 + js/libs/videojs/lang/en-GB.json | 4 + js/libs/videojs/lang/en.js | 14 +++- js/libs/videojs/lang/en.json | 14 +++- js/libs/videojs/lang/es.js | 17 +++-- js/libs/videojs/lang/es.json | 17 +++-- js/libs/videojs/lang/et.js | 89 ++++++++++++++++++++++ js/libs/videojs/lang/et.json | 89 ++++++++++++++++++++++ js/libs/videojs/lang/eu.js | 89 ++++++++++++++++++++++ js/libs/videojs/lang/eu.json | 89 ++++++++++++++++++++++ js/libs/videojs/lang/fa.js | 64 +++++++++------- js/libs/videojs/lang/fa.json | 64 +++++++++------- js/libs/videojs/lang/fi.js | 2 +- js/libs/videojs/lang/fi.json | 2 +- js/libs/videojs/lang/fr.js | 22 ++++-- js/libs/videojs/lang/fr.json | 22 ++++-- js/libs/videojs/lang/gd.js | 4 +- js/libs/videojs/lang/gd.json | 4 +- js/libs/videojs/lang/gl.js | 4 +- js/libs/videojs/lang/gl.json | 4 +- js/libs/videojs/lang/he.js | 4 +- js/libs/videojs/lang/he.json | 4 +- js/libs/videojs/lang/hi.js | 6 +- js/libs/videojs/lang/hi.json | 6 +- js/libs/videojs/lang/hr.js | 2 +- js/libs/videojs/lang/hr.json | 2 +- js/libs/videojs/lang/hu.js | 4 +- js/libs/videojs/lang/hu.json | 4 +- js/libs/videojs/lang/it.js | 87 +++++++++++++++++++--- js/libs/videojs/lang/it.json | 91 ++++++++++++++++++++--- js/libs/videojs/lang/ja.js | 76 ++++++++++++++++++- js/libs/videojs/lang/ja.json | 76 ++++++++++++++++++- js/libs/videojs/lang/ko.js | 76 ++++++++++++++++++- js/libs/videojs/lang/ko.json | 76 ++++++++++++++++++- js/libs/videojs/lang/lv.js | 91 +++++++++++++++++++++++ js/libs/videojs/lang/lv.json | 91 +++++++++++++++++++++++ js/libs/videojs/lang/mr.js | 97 ++++++++++++++++++++++++ js/libs/videojs/lang/mr.json | 98 ++++++++++++++++++++++++ js/libs/videojs/lang/nb.js | 16 +++- js/libs/videojs/lang/nb.json | 16 +++- js/libs/videojs/lang/nl.js | 58 +++++++++------ js/libs/videojs/lang/nl.json | 60 +++++++++------ js/libs/videojs/lang/nn.js | 4 +- js/libs/videojs/lang/nn.json | 4 +- js/libs/videojs/lang/np.js | 89 ++++++++++++++++++++++ js/libs/videojs/lang/np.json | 90 ++++++++++++++++++++++ js/libs/videojs/lang/oc.js | 16 +++- js/libs/videojs/lang/oc.json | 16 +++- js/libs/videojs/lang/pl.js | 86 +++++++++++++++++---- js/libs/videojs/lang/pl.json | 86 +++++++++++++++++---- js/libs/videojs/lang/pt-BR.js | 6 +- js/libs/videojs/lang/pt-BR.json | 6 +- js/libs/videojs/lang/pt-PT.js | 6 +- js/libs/videojs/lang/pt-PT.json | 8 +- js/libs/videojs/lang/ro.js | 2 +- js/libs/videojs/lang/ro.json | 2 +- js/libs/videojs/lang/ru.js | 36 +++++---- js/libs/videojs/lang/ru.json | 36 +++++---- js/libs/videojs/lang/sk.js | 2 +- js/libs/videojs/lang/sk.json | 2 +- js/libs/videojs/lang/sl.js | 4 +- js/libs/videojs/lang/sl.json | 4 +- js/libs/videojs/lang/sr.js | 2 +- js/libs/videojs/lang/sr.json | 2 +- js/libs/videojs/lang/sv.js | 4 +- js/libs/videojs/lang/sv.json | 4 +- js/libs/videojs/lang/te.js | 89 ++++++++++++++++++++++ js/libs/videojs/lang/te.json | 89 ++++++++++++++++++++++ js/libs/videojs/lang/th.js | 4 +- js/libs/videojs/lang/th.json | 6 +- js/libs/videojs/lang/tr.js | 60 +++++++++------ js/libs/videojs/lang/tr.json | 60 +++++++++------ js/libs/videojs/lang/uk.js | 2 +- js/libs/videojs/lang/uk.json | 2 +- js/libs/videojs/lang/vi.js | 2 +- js/libs/videojs/lang/vi.json | 2 +- js/libs/videojs/lang/zh-CN.js | 13 +++- js/libs/videojs/lang/zh-CN.json | 13 +++- js/libs/videojs/lang/zh-Hans.js | 13 +++- js/libs/videojs/lang/zh-Hans.json | 13 +++- js/libs/videojs/lang/zh-Hant.js | 56 ++++++++------ js/libs/videojs/lang/zh-Hant.json | 56 ++++++++------ js/libs/videojs/lang/zh-TW.js | 56 ++++++++------ js/libs/videojs/lang/zh-TW.json | 56 ++++++++------ js/libs/videojs/video.min.js | 42 +++++------ 108 files changed, 3127 insertions(+), 598 deletions(-) create mode 100644 js/libs/videojs/lang/az.js create mode 100644 js/libs/videojs/lang/az.json create mode 100644 js/libs/videojs/lang/bn.js create mode 100644 js/libs/videojs/lang/bn.json create mode 100644 js/libs/videojs/lang/en-GB.js create mode 100644 js/libs/videojs/lang/en-GB.json create mode 100644 js/libs/videojs/lang/et.js create mode 100644 js/libs/videojs/lang/et.json create mode 100644 js/libs/videojs/lang/eu.js create mode 100644 js/libs/videojs/lang/eu.json create mode 100644 js/libs/videojs/lang/lv.js create mode 100644 js/libs/videojs/lang/lv.json create mode 100644 js/libs/videojs/lang/mr.js create mode 100644 js/libs/videojs/lang/mr.json create mode 100644 js/libs/videojs/lang/np.js create mode 100644 js/libs/videojs/lang/np.json create mode 100644 js/libs/videojs/lang/te.js create mode 100644 js/libs/videojs/lang/te.json diff --git a/js/libs/fluidbook/fluidbook.keyboard.js b/js/libs/fluidbook/fluidbook.keyboard.js index ccc8d673..bb547ef4 100644 --- a/js/libs/fluidbook/fluidbook.keyboard.js +++ b/js/libs/fluidbook/fluidbook.keyboard.js @@ -2,6 +2,7 @@ function FluidbookKeyboard(fluidbook) { this.fluidbook = fluidbook; this.shortcuts = []; this.initKeyboardShortcuts(); + this.debug = true; /* @@ -168,6 +169,7 @@ FluidbookKeyboard.prototype = { }, tabNavigation: function (selector, dir, loop, switchList) { + let $this = this; if (switchList === undefined) { switchList = false; } @@ -181,20 +183,42 @@ FluidbookKeyboard.prototype = { } else { elements = $(selector).find(focusableElementsString); } + var list = []; $(elements).each(function () { if (parseInt($(this).attr('tabindex')) < 0) { + if ($this.debug) { + console.log('skip tabindex <0', this); + } + return; + } + if (!$(this).is(':visible')) { + if ($this.debug) { + console.log('skip hidden', this); + } return; } - if ($(this).parents('[tabindex="-1"],.ignore-tab-children').length === 0 && $(this).is(':visible')) { - list.push(this); + let pt = $(this).parents('[tabindex="-1"]:not(.video-js)'); + if (pt.length > 0) { + if ($this.debug) { + console.log('skip parent tabindex -1', pt, this); + } + return; + } + pt = $(this).parents('.ignore-tab-children'); + if (pt.length > 0) { + if ($this.debug) { + console.log('skip parent ignore tab children', pt, this); + } + return; } + list.push(this); }); + console.log(selector, list, elements); if (list.length === 0) { return false; } - let res = this._navigate(list, dir, ['focus'], loop, switchList); - return res; + return this._navigate(list, dir, ['focus'], loop, switchList); }, _navigate: function (list, dir, actions, loop, switchList) { diff --git a/js/libs/videojs/lang/ar.js b/js/libs/videojs/lang/ar.js index b8a449e3..f98893f5 100644 --- a/js/libs/videojs/lang/ar.js +++ b/js/libs/videojs/lang/ar.js @@ -2,51 +2,52 @@ videojs.addLanguage('ar', { "Play": "تشغيل", "Pause": "إيقاف", "Current Time": "الوقت الحالي", - "Duration": "مدة", + "Duration": "المدة", "Remaining Time": "الوقت المتبقي", "Stream Type": "نوع التيار", "LIVE": "مباشر", "Loaded": "تم التحميل", "Progress": "التقدم", "Fullscreen": "ملء الشاشة", - "Non-Fullscreen": "تعطيل ملء الشاشة", - "Mute": "صامت", - "Unmute": "غير الصامت", - "Playback Rate": "معدل التشغيل", + "Exit Fullscreen": "تعطيل ملء الشاشة", + "Mute": "كتم", + "Unmute": "إلغاء الكتم", + "Playback Rate": "سرعة التشغيل", "Subtitles": "الترجمة", "subtitles off": "إيقاف الترجمة", - "Captions": "التعليقات", - "captions off": "إيقاف التعليقات", - "Chapters": "فصول", + "Captions": "التسمية التوضيحية", + "captions off": "إيقاف التسمية التوضيحية", + "Chapters": "الفصول", "You aborted the media playback": "لقد ألغيت تشغيل الفيديو", "A network error caused the media download to fail part-way.": "تسبب خطأ في الشبكة بفشل تحميل الفيديو بالكامل.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "لا يمكن تحميل الفيديو بسبب فشل في الخادوم أو الشبكة ، أو فشل بسبب عدم إمكانية قراءة تنسيق الفيديو.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "تم إيقاف تشغيل الفيديو بسبب مشكلة فساد أو لأن الفيديو المستخدم يستخدم ميزات غير مدعومة من متصفحك.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "لا يمكن تحميل الفيديو بسبب فشل في الخادم أو الشبكة ، أو بسبب عدم إمكانية قراءة تنسيق الفيديو.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "تم إيقاف تشغيل الفيديو بسبب عدم صلاحية الفيديو أو لأن الفيديو المستخدم يستخدم ميزات غير مدعومة من متصفحك.", "No compatible source was found for this media.": "فشل العثور على أي مصدر متوافق مع هذا الفيديو.", "Play Video": "تشغيل الفيديو", "Close": "أغلق", - "Modal Window": "نافذة مشروطة", - "This is a modal window": "هذه نافذة مشروطة", - "This modal can be closed by pressing the Escape key or activating the close button.": "يمكن غلق هذه النافذة المشروطة عن طريق الضغط على زر الخروج أو تفعيل زر الإغلاق", - ", opens captions settings dialog": ", تفتح نافذة خيارات التعليقات", - ", opens subtitles settings dialog": ", تفتح نافذة خيارات الترجمة", + "Modal Window": "النافذة", + "This is a modal window": "هذه نافذة", + "This modal can be closed by pressing the Escape key or activating the close button.": "يمكن غلق هذه النافذة عن طريق الضغط على زر الخروج أو تفعيل زر الإغلاق", + ", opens captions settings dialog": ", تفتح نافذة خيارات التسمية التوضيحية", + ", opens subtitles settings dialog": ", تفتح نافذة خيارات الترجمة", ", selected": ", مختار", "Audio Player": "مشغل الصوت", "Video Player": "مشغل الفيديو", "Replay": "إعادة التشغيل", - "Seek to live, currently behind live": "ذهاب إلى نقطة البث المباشر، متأخر عن البث المباشر حاليًا", - "Seek to live, currently playing live": "ذهاب إلى نقطة البث المباشر، البث المباشر قيد التشغيل حاليًا", + "Seek to live, currently behind live": "الذهاب إلى نقطة البث المباشر، متأخر عن البث المباشر حاليًا", + "Seek to live, currently playing live": "الذهاب إلى نقطة البث المباشر، البث المباشر قيد التشغيل حاليًا", "Progress Bar": "شريط التقدم", - "Descriptions": "الأوصاف", - "descriptions off": "إخفاء الأوصاف", + "progress bar timing: currentTime={1} duration={2}": "{1} من {2}", + "Descriptions": "الوصف", + "descriptions off": "إخفاء الوصف", "Audio Track": "المسار الصوتي", "Volume Level": "مستوى الصوت", "The media is encrypted and we do not have the keys to decrypt it.": "الوسائط مشفرة وليس لدينا الرموز اللازمة لفك شفرتها.", "Close Modal Dialog": "إغلاق مربع الحوار المشروط", - ", opens descriptions settings dialog": "، يفتح مربع حوار إعدادات الأوصاف", + ", opens descriptions settings dialog": "، يفتح نافذة إعدادات الوصف", "captions settings": "إعدادات التعليقات التوضيحية", "subtitles settings": "إعدادات الترجمات", - "descriptions settings": "إعدادات الأوصاف", + "descriptions settings": "إعدادات الوصف", "Text": "النص", "White": "أبيض", "Black": "أسود", @@ -67,7 +68,7 @@ videojs.addLanguage('ar', { "Raised": "بارز", "Depressed": "منخفض", "Uniform": "منتظم", - "Dropshadow": "ظل خلفي", + "Drop shadow": "الظل", "Font Family": "عائلة الخطوط", "Proportional Sans-Serif": "Proportional Sans-Serif", "Monospace Sans-Serif": "Monospace Sans-Serif", @@ -79,8 +80,18 @@ videojs.addLanguage('ar', { "Reset": "إعادة الضبط", "restore all settings to the default values": "استعادة كل الإعدادات إلى القيم الافتراضية", "Done": "تم", - "Caption Settings Dialog": "مربع حوار إعدادات التعليقات التوضيحية", - "Beginning of dialog window. Escape will cancel and close the window.": "بداية نافذة مربع حوار. الضغط على زر \"Escape\" سيؤدي إلى الإلغاء وإغلاق النافذة.", - "End of dialog window.": "نهاية نافذة مربع حوار.", - "{1} is loading.": "{1} قيد التحميل." + "Caption Settings Dialog": "نافذة إعدادات التعليقات التوضيحية", + "Beginning of dialog window. Escape will cancel and close the window.": "بداية النافذة. الضغط على زر \"Escape\" سيؤدي إلى الإلغاء وإغلاق النافذة.", + "End of dialog window.": ".نهاية النافذة", + "{1} is loading.": "{1} قيد التحميل.", + "Exit Picture-in-Picture": "الخروج من وضع صورة داخل صورة", + "Picture-in-Picture": "صورة داخل صورة", + "No content": "لا يوجد محتوى", + "Color": "اللون", + "Opacity": "معدل الشفافية", + "Text Background": "خلفية النص", + "Caption Area Background": "خلفية منطقة التسمية التوضيحية", + "Playing in Picture-in-Picture": "صورة داخل صورة قيد التشغيل", + "Skip forward {1} seconds": "التخطي للأمام {1}", + "Skip backward {1} seconds": "الرجوع للخلف {1}" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/ar.json b/js/libs/videojs/lang/ar.json index ef59ae82..01c9ce17 100644 --- a/js/libs/videojs/lang/ar.json +++ b/js/libs/videojs/lang/ar.json @@ -2,51 +2,52 @@ "Play": "تشغيل", "Pause": "إيقاف", "Current Time": "الوقت الحالي", - "Duration": "مدة", + "Duration": "المدة", "Remaining Time": "الوقت المتبقي", "Stream Type": "نوع التيار", "LIVE": "مباشر", "Loaded": "تم التحميل", "Progress": "التقدم", "Fullscreen": "ملء الشاشة", - "Non-Fullscreen": "تعطيل ملء الشاشة", - "Mute": "صامت", - "Unmute": "غير الصامت", - "Playback Rate": "معدل التشغيل", + "Exit Fullscreen": "تعطيل ملء الشاشة", + "Mute": "كتم", + "Unmute":"إلغاء الكتم", + "Playback Rate": "سرعة التشغيل", "Subtitles": "الترجمة", "subtitles off": "إيقاف الترجمة", - "Captions": "التعليقات", - "captions off": "إيقاف التعليقات", - "Chapters": "فصول", + "Captions": "التسمية التوضيحية", + "captions off": "إيقاف التسمية التوضيحية", + "Chapters": "الفصول", "You aborted the media playback": "لقد ألغيت تشغيل الفيديو", "A network error caused the media download to fail part-way.": "تسبب خطأ في الشبكة بفشل تحميل الفيديو بالكامل.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "لا يمكن تحميل الفيديو بسبب فشل في الخادوم أو الشبكة ، أو فشل بسبب عدم إمكانية قراءة تنسيق الفيديو.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "تم إيقاف تشغيل الفيديو بسبب مشكلة فساد أو لأن الفيديو المستخدم يستخدم ميزات غير مدعومة من متصفحك.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "لا يمكن تحميل الفيديو بسبب فشل في الخادم أو الشبكة ، أو بسبب عدم إمكانية قراءة تنسيق الفيديو.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "تم إيقاف تشغيل الفيديو بسبب عدم صلاحية الفيديو أو لأن الفيديو المستخدم يستخدم ميزات غير مدعومة من متصفحك.", "No compatible source was found for this media.": "فشل العثور على أي مصدر متوافق مع هذا الفيديو.", "Play Video": "تشغيل الفيديو", "Close": "أغلق", - "Modal Window": "نافذة مشروطة", - "This is a modal window": "هذه نافذة مشروطة", - "This modal can be closed by pressing the Escape key or activating the close button.": "يمكن غلق هذه النافذة المشروطة عن طريق الضغط على زر الخروج أو تفعيل زر الإغلاق", - ", opens captions settings dialog": ", تفتح نافذة خيارات التعليقات", - ", opens subtitles settings dialog": ", تفتح نافذة خيارات الترجمة", + "Modal Window": "النافذة", + "This is a modal window": "هذه نافذة", + "This modal can be closed by pressing the Escape key or activating the close button.": "يمكن غلق هذه النافذة عن طريق الضغط على زر الخروج أو تفعيل زر الإغلاق", + ", opens captions settings dialog": ", تفتح نافذة خيارات التسمية التوضيحية", + ", opens subtitles settings dialog": ", تفتح نافذة خيارات الترجمة", ", selected": ", مختار", "Audio Player": "مشغل الصوت", "Video Player": "مشغل الفيديو", "Replay": "إعادة التشغيل", - "Seek to live, currently behind live": "ذهاب إلى نقطة البث المباشر، متأخر عن البث المباشر حاليًا", - "Seek to live, currently playing live": "ذهاب إلى نقطة البث المباشر، البث المباشر قيد التشغيل حاليًا", + "Seek to live, currently behind live": "الذهاب إلى نقطة البث المباشر، متأخر عن البث المباشر حاليًا", + "Seek to live, currently playing live": "الذهاب إلى نقطة البث المباشر، البث المباشر قيد التشغيل حاليًا", "Progress Bar": "شريط التقدم", - "Descriptions": "الأوصاف", - "descriptions off": "إخفاء الأوصاف", + "progress bar timing: currentTime={1} duration={2}": "{1} من {2}", + "Descriptions": "الوصف", + "descriptions off": "إخفاء الوصف", "Audio Track": "المسار الصوتي", "Volume Level": "مستوى الصوت", "The media is encrypted and we do not have the keys to decrypt it.": "الوسائط مشفرة وليس لدينا الرموز اللازمة لفك شفرتها.", "Close Modal Dialog": "إغلاق مربع الحوار المشروط", - ", opens descriptions settings dialog": "، يفتح مربع حوار إعدادات الأوصاف", + ", opens descriptions settings dialog": "، يفتح نافذة إعدادات الوصف", "captions settings": "إعدادات التعليقات التوضيحية", "subtitles settings": "إعدادات الترجمات", - "descriptions settings": "إعدادات الأوصاف", + "descriptions settings": "إعدادات الوصف", "Text": "النص", "White": "أبيض", "Black": "أسود", @@ -67,7 +68,7 @@ "Raised": "بارز", "Depressed": "منخفض", "Uniform": "منتظم", - "Dropshadow": "ظل خلفي", + "Drop shadow": "الظل", "Font Family": "عائلة الخطوط", "Proportional Sans-Serif": "Proportional Sans-Serif", "Monospace Sans-Serif": "Monospace Sans-Serif", @@ -79,8 +80,18 @@ "Reset": "إعادة الضبط", "restore all settings to the default values": "استعادة كل الإعدادات إلى القيم الافتراضية", "Done": "تم", - "Caption Settings Dialog": "مربع حوار إعدادات التعليقات التوضيحية", - "Beginning of dialog window. Escape will cancel and close the window.": "بداية نافذة مربع حوار. الضغط على زر \"Escape\" سيؤدي إلى الإلغاء وإغلاق النافذة.", - "End of dialog window.": "نهاية نافذة مربع حوار.", - "{1} is loading.": "{1} قيد التحميل." + "Caption Settings Dialog":"نافذة إعدادات التعليقات التوضيحية", + "Beginning of dialog window. Escape will cancel and close the window.": "بداية النافذة. الضغط على زر \"Escape\" سيؤدي إلى الإلغاء وإغلاق النافذة.", + "End of dialog window.": ".نهاية النافذة", + "{1} is loading.": "{1} قيد التحميل.", + "Exit Picture-in-Picture": "الخروج من وضع صورة داخل صورة", + "Picture-in-Picture": "صورة داخل صورة", + "No content": "لا يوجد محتوى", + "Color": "اللون", + "Opacity": "معدل الشفافية", + "Text Background": "خلفية النص", + "Caption Area Background": "خلفية منطقة التسمية التوضيحية", + "Playing in Picture-in-Picture": "صورة داخل صورة قيد التشغيل", + "Skip forward {1} seconds": "التخطي للأمام {1}", + "Skip backward {1} seconds": "الرجوع للخلف {1}" } diff --git a/js/libs/videojs/lang/az.js b/js/libs/videojs/lang/az.js new file mode 100644 index 00000000..74b19115 --- /dev/null +++ b/js/libs/videojs/lang/az.js @@ -0,0 +1,97 @@ +videojs.addLanguage('az', { + "Audio Player": "Audiopleyer", + "Video Player": "Videopleyer", + "Play": "Oynat", + "Pause": "Pauza", + "Replay": "Yenidən oynat", + "Current Time": "Cari Vaxt", + "Duration": "Müddət", + "Remaining Time": "Qalan vaxt", + "Stream Type": "Yayım növü", + "LIVE": "CANLI", + "Seek to live, currently behind live": "Canlı yayım axtarışı, hal-hazırda canlı yayımdan geridədir", + "Seek to live, currently playing live": "Canlı yayım axtarışı, hal-hazırda canlı yayım göstərilir", + "Loaded": "Yükləndi", + "Progress": "Yüklənmə", + "Progress Bar": "Yüklənmə göstəricisi", + "progress bar timing: currentTime={1} duration={2}": "{1} / {2}", + "Fullscreen": "Tam ekran", + "Exit Fullscreen": "Tam ekrandan çıx", + "Mute": "Səssizi qoş", + "Unmute": "Səssizi söndür", + "Playback Rate": "Oynatma sürəti", + "Subtitles": "Alt yazılar", + "subtitles off": "Alt yazıları söndür", + "Captions": "Başlıqlar", + "captions off": "Başlıqları söndür", + "Chapters": "Fəsillər", + "Descriptions": "Təsvirlər", + "descriptions off": "Təsvirləri söndür", + "Audio Track": "Audio Trek", + "Volume Level": "Səs Səviyyəsi", + "You aborted the media playback": "Siz medianın oxudulmasını dayandırdınız", + "A network error caused the media download to fail part-way.": "Şəbəkə xətası səbəbindən medianın endirilməsi yarıda qaldı.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Yükləmə xətası.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Media faylının korlanması səbəbilə və ya media faylın brauzerinizin dəstəkləmədiyi funksiyalardan istifadə etdiyinə görə medianın oxudulması dayandırılıb.", + "No compatible source was found for this media.": "Bu media üçün uyğun mənbə tapılmadı.", + "The media is encrypted and we do not have the keys to decrypt it.": "Media faylı şifrələnib və onun şifrəsini açmaq üçün açarlar yoxdur.", + "Play Video": "Videonu oynat", + "Close": "Bağla", + "Close Modal Dialog": "Modal dialoqunu bağla", + "Modal Window": "Modal pəncərəsi", + "This is a modal window": "Bu modal pəncərəsidir", + "This modal can be closed by pressing the Escape key or activating the close button.": "Bu modal Escape düyməsini basmaqla və ya bağlama düyməsini sıxmaqla bağlana bilər.", + ", opens captions settings dialog": ", başlıq parametrləri dialoqunu açır", + ", opens subtitles settings dialog": ", altyazı parametrləri dialoqunu açır", + ", opens descriptions settings dialog": ", təsvir parametrləri dialoqunu açır", + ", selected": ", seçilmiş", + "captions settings": "başlıq parametrləri", + "subtitles settings": "altyazı parametrləri", + "descriptions settings": "təsvir parametrləri", + "Text": "Tekst", + "White": "Ağ", + "Black": "Qara", + "Red": "Qırmızı", + "Green": "Yaşıl", + "Blue": "Göy", + "Yellow": "Sarı", + "Magenta": "Bənövşəyi", + "Cyan": "Mavi", + "Background": "Fon", + "Window": "Pəncərə", + "Transparent": "Şəffaf", + "Semi-Transparent": "Yarım-Şəffaf", + "Opaque": "Qeyri-şəffaf", + "Font Size": "Şrift Ölçüsü", + "Text Edge Style": "Mətnin kənarlarının üslubu", + "None": "Heç biri", + "Raised": "Artırılmış", + "Depressed": "Azaldılmış", + "Uniform": "Ümumiləşdirilmiş", + "Drop shadow": "Arxa kölgə", + "Font Family": "Şrift Ailəsi", + "Proportional Sans-Serif": "Proporsional Sans-Serif", + "Monospace Sans-Serif": "Birenli Sans-Serif", + "Proportional Serif": "Proporsional Serif", + "Monospace Serif": "Birenli Serif", + "Casual": "Gündəlik", + "Script": "Skript", + "Small Caps": "Kiçik böyük hərflər", + "Reset": "Sıfırla", + "restore all settings to the default values": "bütün parametrləri susmaya görə bərpa edin", + "Done": "Bitdi", + "Caption Settings Dialog": "Başlıq Parametrləri Dialoqu", + "Beginning of dialog window. Escape will cancel and close the window.": "Dialoq pəncərəsinin başlanğıcı. Escape düyməsi ləğv edəcək və pəncərəni bağlayacaq.", + "End of dialog window.": "Dialoq pəncərəsinin sonu.", + "{1} is loading.": "{1} yüklənir.", + "Exit Picture-in-Picture": "Şəkil içində şəkil rejimindən çıxın", + "Picture-in-Picture": "Şəkil içində şəkil rejimi", + "No content": "Məzmun yoxdur", + "Color": "Rəng", + "Opacity": "Qeyri-şəffaflıq", + "Text Background": "Tekst Fonu", + "Caption Area Background": "Başlıq Sahəsinin Fonu", + "Playing in Picture-in-Picture": "Şəkil içində şəkil rejimində oynayır", + "Skip backward {1} seconds": "{1} saniyə geriyə keçin", + "Skip forward {1} seconds": "{1} saniyə qabağa keçin" +}); \ No newline at end of file diff --git a/js/libs/videojs/lang/az.json b/js/libs/videojs/lang/az.json new file mode 100644 index 00000000..37e4a982 --- /dev/null +++ b/js/libs/videojs/lang/az.json @@ -0,0 +1,97 @@ +{ + "Audio Player": "Audiopleyer", + "Video Player": "Videopleyer", + "Play": "Oynat", + "Pause": "Pauza", + "Replay": "Yenidən oynat", + "Current Time": "Cari Vaxt", + "Duration": "Müddət", + "Remaining Time": "Qalan vaxt", + "Stream Type": "Yayım növü", + "LIVE": "CANLI", + "Seek to live, currently behind live": "Canlı yayım axtarışı, hal-hazırda canlı yayımdan geridədir", + "Seek to live, currently playing live": "Canlı yayım axtarışı, hal-hazırda canlı yayım göstərilir", + "Loaded": "Yükləndi", + "Progress": "Yüklənmə", + "Progress Bar": "Yüklənmə göstəricisi", + "progress bar timing: currentTime={1} duration={2}": "{1} / {2}", + "Fullscreen": "Tam ekran", + "Exit Fullscreen": "Tam ekrandan çıx", + "Mute": "Səssizi qoş", + "Unmute": "Səssizi söndür", + "Playback Rate": "Oynatma sürəti", + "Subtitles": "Alt yazılar", + "subtitles off": "Alt yazıları söndür", + "Captions": "Başlıqlar", + "captions off": "Başlıqları söndür", + "Chapters": "Fəsillər", + "Descriptions": "Təsvirlər", + "descriptions off": "Təsvirləri söndür", + "Audio Track": "Audio Trek", + "Volume Level": "Səs Səviyyəsi", + "You aborted the media playback": "Siz medianın oxudulmasını dayandırdınız", + "A network error caused the media download to fail part-way.": "Şəbəkə xətası səbəbindən medianın endirilməsi yarıda qaldı.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Yükləmə xətası.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Media faylının korlanması səbəbilə və ya media faylın brauzerinizin dəstəkləmədiyi funksiyalardan istifadə etdiyinə görə medianın oxudulması dayandırılıb.", + "No compatible source was found for this media.": "Bu media üçün uyğun mənbə tapılmadı.", + "The media is encrypted and we do not have the keys to decrypt it.": "Media faylı şifrələnib və onun şifrəsini açmaq üçün açarlar yoxdur.", + "Play Video": "Videonu oynat", + "Close": "Bağla", + "Close Modal Dialog": "Modal dialoqunu bağla", + "Modal Window": "Modal pəncərəsi", + "This is a modal window": "Bu modal pəncərəsidir", + "This modal can be closed by pressing the Escape key or activating the close button.": "Bu modal Escape düyməsini basmaqla və ya bağlama düyməsini sıxmaqla bağlana bilər.", + ", opens captions settings dialog": ", başlıq parametrləri dialoqunu açır", + ", opens subtitles settings dialog": ", altyazı parametrləri dialoqunu açır", + ", opens descriptions settings dialog": ", təsvir parametrləri dialoqunu açır", + ", selected": ", seçilmiş", + "captions settings": "başlıq parametrləri", + "subtitles settings": "altyazı parametrləri", + "descriptions settings": "təsvir parametrləri", + "Text": "Tekst", + "White": "Ağ", + "Black": "Qara", + "Red": "Qırmızı", + "Green": "Yaşıl", + "Blue": "Göy", + "Yellow": "Sarı", + "Magenta": "Bənövşəyi", + "Cyan": "Mavi", + "Background": "Fon", + "Window": "Pəncərə", + "Transparent": "Şəffaf", + "Semi-Transparent": "Yarım-Şəffaf", + "Opaque": "Qeyri-şəffaf", + "Font Size": "Şrift Ölçüsü", + "Text Edge Style": "Mətnin kənarlarının üslubu", + "None": "Heç biri", + "Raised": "Artırılmış", + "Depressed": "Azaldılmış", + "Uniform": "Ümumiləşdirilmiş", + "Drop shadow": "Arxa kölgə", + "Font Family": "Şrift Ailəsi", + "Proportional Sans-Serif": "Proporsional Sans-Serif", + "Monospace Sans-Serif": "Birenli Sans-Serif", + "Proportional Serif": "Proporsional Serif", + "Monospace Serif": "Birenli Serif", + "Casual": "Gündəlik", + "Script": "Skript", + "Small Caps": "Kiçik böyük hərflər", + "Reset": "Sıfırla", + "restore all settings to the default values": "bütün parametrləri susmaya görə bərpa edin", + "Done": "Bitdi", + "Caption Settings Dialog": "Başlıq Parametrləri Dialoqu", + "Beginning of dialog window. Escape will cancel and close the window.": "Dialoq pəncərəsinin başlanğıcı. Escape düyməsi ləğv edəcək və pəncərəni bağlayacaq.", + "End of dialog window.": "Dialoq pəncərəsinin sonu.", + "{1} is loading.": "{1} yüklənir.", + "Exit Picture-in-Picture": "Şəkil içində şəkil rejimindən çıxın", + "Picture-in-Picture": "Şəkil içində şəkil rejimi", + "No content": "Məzmun yoxdur", + "Color": "Rəng", + "Opacity": "Qeyri-şəffaflıq", + "Text Background": "Tekst Fonu", + "Caption Area Background": "Başlıq Sahəsinin Fonu", + "Playing in Picture-in-Picture": "Şəkil içində şəkil rejimində oynayır", + "Skip backward {1} seconds": "{1} saniyə geriyə keçin", + "Skip forward {1} seconds": "{1} saniyə qabağa keçin" + } \ No newline at end of file diff --git a/js/libs/videojs/lang/ba.js b/js/libs/videojs/lang/ba.js index 0705eb40..298dd505 100644 --- a/js/libs/videojs/lang/ba.js +++ b/js/libs/videojs/lang/ba.js @@ -9,7 +9,7 @@ videojs.addLanguage('ba', { "Loaded": "Učitan", "Progress": "Progres", "Fullscreen": "Puni ekran", - "Non-Fullscreen": "Mali ekran", + "Exit Fullscreen": "Mali ekran", "Mute": "Prigušen", "Unmute": "Ne-prigušen", "Playback Rate": "Stopa reprodukcije", diff --git a/js/libs/videojs/lang/ba.json b/js/libs/videojs/lang/ba.json index 32e1763f..da6b2a76 100644 --- a/js/libs/videojs/lang/ba.json +++ b/js/libs/videojs/lang/ba.json @@ -9,7 +9,7 @@ "Loaded": "Učitan", "Progress": "Progres", "Fullscreen": "Puni ekran", - "Non-Fullscreen": "Mali ekran", + "Exit Fullscreen": "Mali ekran", "Mute": "Prigušen", "Unmute": "Ne-prigušen", "Playback Rate": "Stopa reprodukcije", diff --git a/js/libs/videojs/lang/bg.js b/js/libs/videojs/lang/bg.js index 6285df20..9f9fb2a8 100644 --- a/js/libs/videojs/lang/bg.js +++ b/js/libs/videojs/lang/bg.js @@ -9,7 +9,7 @@ videojs.addLanguage('bg', { "Loaded": "Заредено", "Progress": "Прогрес", "Fullscreen": "Цял екран", - "Non-Fullscreen": "Спиране на цял екран", + "Exit Fullscreen": "Спиране на цял екран", "Mute": "Без звук", "Unmute": "Със звук", "Playback Rate": "Скорост на възпроизвеждане", diff --git a/js/libs/videojs/lang/bg.json b/js/libs/videojs/lang/bg.json index 372e8293..92d99b40 100644 --- a/js/libs/videojs/lang/bg.json +++ b/js/libs/videojs/lang/bg.json @@ -9,7 +9,7 @@ "Loaded": "Заредено", "Progress": "Прогрес", "Fullscreen": "Цял екран", - "Non-Fullscreen": "Спиране на цял екран", + "Exit Fullscreen": "Спиране на цял екран", "Mute": "Без звук", "Unmute": "Със звук", "Playback Rate": "Скорост на възпроизвеждане", diff --git a/js/libs/videojs/lang/bn.js b/js/libs/videojs/lang/bn.js new file mode 100644 index 00000000..c715bfa0 --- /dev/null +++ b/js/libs/videojs/lang/bn.js @@ -0,0 +1,90 @@ +videojs.addLanguage('bn', { + "Audio Player": "অডিও প্লেয়ার", + "Video Player": "ভিডিও প্লেয়ার", + "Play": "প্লে করুন", + "Pause": "বিরাম", + "Replay": "রিপ্লে করুন", + "Current Time": "বর্তমান সময়", + "Duration": "ব্যাপ্তিকাল", + "Remaining Time": "অবশিষ্ট সময়", + "Stream Type": "স্ট্রিমের ধরন", + "LIVE": "লাইভ", + "Seek to live, currently behind live": "লাইভ দেখুন, বর্তমানে লাইভের পিছনে আছে", + "Seek to live, currently playing live": "লাইভ দেখুন, বর্তমানে লাইভে আছে", + "Loaded": "লোড হয়েছে", + "Progress": "প্রোগ্রেস", + "Progress Bar": "প্রোগ্রেস বার", + "progress bar timing: currentTime={1} duration={2}": "{2} এর {1}", + "Fullscreen": "পূর্ণ স্ক্রীন", + "Non-Fullscreen": "পূর্ণ স্ক্রীন থেকে প্রস্থান করুন", + "Mute": "মিউট", + "Unmute": "আনমিউট", + "Playback Rate": "প্লেব্যাক রেট", + "Subtitles": "সাবটাইটেল", + "subtitles off": "সাবটাইটেল বন্ধ করুন", + "Captions": "ক্যাপশন", + "captions off": "ক্যাপশন বন্ধ করুন", + "Chapters": "অধ্যায়", + "Descriptions": "বর্ণনা", + "descriptions off": "বর্ণনা বন্ধ করুন", + "Audio Track": "অডিও গান", + "Volume Level": "ভলিউম লেভেল", + "You aborted the media playback": "আপনি মিডিয়া প্লেব্যাক বাতিল করেছেন", + "A network error caused the media download to fail part-way.": "একটি নেটওয়ার্ক ত্রুটির কারণে মিডিয়া ডাউনলোড আংশিকভাবে ব্যর্থ হয়েছে৷", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "মিডিয়া লোড করা যায়নি, হয় সার্ভার বা নেটওয়ার্ক ব্যর্থ হওয়ার কারণে বা ফর্ম্যাটটি সমর্থিত নয়।", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "মিডিয়া প্লেব্যাক একটি সমস্যার কারণে বা মিডিয়া ব্যবহার করা বৈশিষ্ট্যগুলি আপনার ব্রাউজার সমর্থন করে না বলে বাতিল করা হয়েছে৷", + "No compatible source was found for this media.": "এই মিডিয়ার জন্য কোন সামঞ্জস্যপূর্ণ উৎস পাওয়া যায়নি.", + "The media is encrypted and we do not have the keys to decrypt it.": "মিডিয়া এনক্রিপ্ট করা হয়েছে এবং এটি ডিক্রিপ্ট করার সমাধান আমাদের কাছে নেই।", + "Play Video": "ভিডিও প্লে করুন", + "Close": "বন্ধ করুন", + "Close Modal Dialog": "মোডাল ডায়ালগ বন্ধ করুন", + "Modal Window": "মোডাল উইন্ডো", + "This is a modal window": "এটি একটি মোডাল উইন্ডো", + "This modal can be closed by pressing the Escape key or activating the close button.": "Esc কী চেপে বা ক্লোজ বাটনটি সক্রিয় করে এই মডেলটি বন্ধ করা যেতে পারে।", + ", opens captions settings dialog": ", ক্যাপশন সেটিংস ডায়ালগ খোলে", + ", opens subtitles settings dialog": ", সাবটাইটেল সেটিংস ডায়ালগ খোলে", + ", opens descriptions settings dialog": ", বর্ণনা সেটিংস ডায়ালগ খোলে", + ", selected": ", নির্বাচিত", + "captions settings": "ক্যাপশন সেটিংস", + "subtitles settings": "সাবটাইটেল সেটিংস ", + "descriptions settings": "বর্ণনা সেটিংস", + "Text": "টেক্সট", + "White": "সাদা", + "Black": "কালো", + "Red": "লাল", + "Green": "সবুজ", + "Blue": "নীল", + "Yellow": "হলুদ", + "Magenta": "ম্যাজেন্টা", + "Cyan": "নীল সবুজ", + "Background": "পটভূমি", + "Window": "উইন্ডো", + "Transparent": "স্বচ্ছ", + "Semi-Transparent": "আধা-স্বচ্ছ", + "Opaque": "অস্বচ্ছ", + "Font Size": "অক্ষরের আকার", + "Text Edge Style": "টেক্সট এজ স্টাইল", + "None": "কোনোটিই নয়", + "Raised": "বাড়ানো হয়েছে", + "Depressed": "নামানো হয়েছে", + "Uniform": "ইউনিফর্ম", + "Drop shadow": "ড্রপশ্যাডো", + "Font Family": "অক্ষরের পরিবার", + "Proportional Sans-Serif": "সমানুপাতিক সানস-সেরিফ", + "Monospace Sans-Serif": "মনোস্পেস সানস-সেরিফ", + "Proportional Serif": "সমানুপাতিক সেরিফ", + "Monospace Serif": "মনোস্পেস সেরিফ", + "Casual": "ক্যাজুয়াল", + "Script": "স্ক্রিপ্ট", + "Small Caps": "ছোট ক্যাপস", + "Reset": "রিসেট", + "restore all settings to the default values": "সমস্ত সেটিংস ডিফল্ট মানগুলিতে পুনরুদ্ধার করুন", + "Done": "সম্পন্ন", + "Caption Settings Dialog": "ক্যাপশন সেটিংস ডায়ালগ", + "Beginning of dialog window. Escape will cancel and close the window.": "ডায়লগ উইন্ডোর শুরু। Esc কী বাতিল করবে এবং উইন্ডো বন্ধ করবে।", + "End of dialog window.": "ডায়ালগ উইন্ডোর শেষ।", + "{1} is loading.": "{1} লোড হচ্ছে.", + "Exit Picture-in-Picture": "পিকচার-ইন-পিকচার থেকে প্রস্থান করুন", + "Picture-in-Picture": "পিকচার-ইন-পিকচার", + "No content": "কোন বিষয়বস্তু নেই" +}); \ No newline at end of file diff --git a/js/libs/videojs/lang/bn.json b/js/libs/videojs/lang/bn.json new file mode 100644 index 00000000..0164c9df --- /dev/null +++ b/js/libs/videojs/lang/bn.json @@ -0,0 +1,90 @@ +{ + "Audio Player": "অডিও প্লেয়ার", + "Video Player": "ভিডিও প্লেয়ার", + "Play": "প্লে করুন", + "Pause": "বিরাম", + "Replay": "রিপ্লে করুন", + "Current Time": "বর্তমান সময়", + "Duration": "ব্যাপ্তিকাল", + "Remaining Time": "অবশিষ্ট সময়", + "Stream Type": "স্ট্রিমের ধরন", + "LIVE": "লাইভ", + "Seek to live, currently behind live": "লাইভ দেখুন, বর্তমানে লাইভের পিছনে আছে", + "Seek to live, currently playing live": "লাইভ দেখুন, বর্তমানে লাইভে আছে", + "Loaded": "লোড হয়েছে", + "Progress": "প্রোগ্রেস", + "Progress Bar": "প্রোগ্রেস বার", + "progress bar timing: currentTime={1} duration={2}": "{2} এর {1}", + "Fullscreen": "পূর্ণ স্ক্রীন", + "Non-Fullscreen": "পূর্ণ স্ক্রীন থেকে প্রস্থান করুন", + "Mute": "মিউট", + "Unmute": "আনমিউট", + "Playback Rate": "প্লেব্যাক রেট", + "Subtitles": "সাবটাইটেল", + "subtitles off": "সাবটাইটেল বন্ধ করুন", + "Captions": "ক্যাপশন", + "captions off": "ক্যাপশন বন্ধ করুন", + "Chapters": "অধ্যায়", + "Descriptions": "বর্ণনা", + "descriptions off": "বর্ণনা বন্ধ করুন", + "Audio Track": "অডিও গান", + "Volume Level": "ভলিউম লেভেল", + "You aborted the media playback": "আপনি মিডিয়া প্লেব্যাক বাতিল করেছেন", + "A network error caused the media download to fail part-way.": "একটি নেটওয়ার্ক ত্রুটির কারণে মিডিয়া ডাউনলোড আংশিকভাবে ব্যর্থ হয়েছে৷", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "মিডিয়া লোড করা যায়নি, হয় সার্ভার বা নেটওয়ার্ক ব্যর্থ হওয়ার কারণে বা ফর্ম্যাটটি সমর্থিত নয়।", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "মিডিয়া প্লেব্যাক একটি সমস্যার কারণে বা মিডিয়া ব্যবহার করা বৈশিষ্ট্যগুলি আপনার ব্রাউজার সমর্থন করে না বলে বাতিল করা হয়েছে৷", + "No compatible source was found for this media.": "এই মিডিয়ার জন্য কোন সামঞ্জস্যপূর্ণ উৎস পাওয়া যায়নি.", + "The media is encrypted and we do not have the keys to decrypt it.": "মিডিয়া এনক্রিপ্ট করা হয়েছে এবং এটি ডিক্রিপ্ট করার সমাধান আমাদের কাছে নেই।", + "Play Video": "ভিডিও প্লে করুন", + "Close": "বন্ধ করুন", + "Close Modal Dialog": "মোডাল ডায়ালগ বন্ধ করুন", + "Modal Window": "মোডাল উইন্ডো", + "This is a modal window": "এটি একটি মোডাল উইন্ডো", + "This modal can be closed by pressing the Escape key or activating the close button.": "Esc কী চেপে বা ক্লোজ বাটনটি সক্রিয় করে এই মডেলটি বন্ধ করা যেতে পারে।", + ", opens captions settings dialog": ", ক্যাপশন সেটিংস ডায়ালগ খোলে", + ", opens subtitles settings dialog": ", সাবটাইটেল সেটিংস ডায়ালগ খোলে", + ", opens descriptions settings dialog": ", বর্ণনা সেটিংস ডায়ালগ খোলে", + ", selected": ", নির্বাচিত", + "captions settings": "ক্যাপশন সেটিংস", + "subtitles settings": "সাবটাইটেল সেটিংস ", + "descriptions settings": "বর্ণনা সেটিংস", + "Text": "টেক্সট", + "White": "সাদা", + "Black": "কালো", + "Red": "লাল", + "Green": "সবুজ", + "Blue": "নীল", + "Yellow": "হলুদ", + "Magenta": "ম্যাজেন্টা", + "Cyan": "নীল সবুজ", + "Background": "পটভূমি", + "Window": "উইন্ডো", + "Transparent": "স্বচ্ছ", + "Semi-Transparent": "আধা-স্বচ্ছ", + "Opaque": "অস্বচ্ছ", + "Font Size": "অক্ষরের আকার", + "Text Edge Style": "টেক্সট এজ স্টাইল", + "None": "কোনোটিই নয়", + "Raised": "বাড়ানো হয়েছে", + "Depressed": "নামানো হয়েছে", + "Uniform": "ইউনিফর্ম", + "Drop shadow": "ড্রপশ্যাডো", + "Font Family": "অক্ষরের পরিবার", + "Proportional Sans-Serif": "সমানুপাতিক সানস-সেরিফ", + "Monospace Sans-Serif": "মনোস্পেস সানস-সেরিফ", + "Proportional Serif": "সমানুপাতিক সেরিফ", + "Monospace Serif": "মনোস্পেস সেরিফ", + "Casual": "ক্যাজুয়াল", + "Script": "স্ক্রিপ্ট", + "Small Caps": "ছোট ক্যাপস", + "Reset": "রিসেট", + "restore all settings to the default values": "সমস্ত সেটিংস ডিফল্ট মানগুলিতে পুনরুদ্ধার করুন", + "Done": "সম্পন্ন", + "Caption Settings Dialog": "ক্যাপশন সেটিংস ডায়ালগ", + "Beginning of dialog window. Escape will cancel and close the window.": "ডায়লগ উইন্ডোর শুরু। Esc কী বাতিল করবে এবং উইন্ডো বন্ধ করবে।", + "End of dialog window.": "ডায়ালগ উইন্ডোর শেষ।", + "{1} is loading.": "{1} লোড হচ্ছে.", + "Exit Picture-in-Picture": "পিকচার-ইন-পিকচার থেকে প্রস্থান করুন", + "Picture-in-Picture": "পিকচার-ইন-পিকচার", + "No content": "কোন বিষয়বস্তু নেই" +} \ No newline at end of file diff --git a/js/libs/videojs/lang/ca.js b/js/libs/videojs/lang/ca.js index 1fcdab84..8b076455 100644 --- a/js/libs/videojs/lang/ca.js +++ b/js/libs/videojs/lang/ca.js @@ -1,26 +1,97 @@ videojs.addLanguage('ca', { - "Play": "Reproducció", + "Audio Player": "Reproductor d'àudio", + "Video Player": "Reproductor de vídeo", + "Play": "Reproduir", "Pause": "Pausa", - "Current Time": "Temps reproduït", - "Duration": "Durada total", + "Replay": "Repetir", + "Current Time": "Temps actual", + "Duration": "Durada", "Remaining Time": "Temps restant", - "Stream Type": "Tipus de seqüència", + "Stream Type": "Tipus d'emissió", "LIVE": "EN DIRECTE", + "Seek to live, currently behind live": "Anar en directe, actualment darrere de la retransmissió en directe", + "Seek to live, currently playing live": "Anar en directe, actualment en directe", "Loaded": "Carregat", "Progress": "Progrés", + "Progress Bar": "Barra de progrés", + "progress bar timing: currentTime={1} duration={2}": "{1} de {2}", "Fullscreen": "Pantalla completa", - "Non-Fullscreen": "Pantalla no completa", - "Mute": "Silencia", - "Unmute": "Amb so", + "Exit Fullscreen": "Sortir de pantalla completa", + "Mute": "Silenciar", + "Unmute": "Activar el so", "Playback Rate": "Velocitat de reproducció", "Subtitles": "Subtítols", - "subtitles off": "Subtítols desactivats", + "subtitles off": "Desactivar subtítols", "Captions": "Llegendes", - "captions off": "Llegendes desactivades", + "captions off": "Desactivar llegendes", "Chapters": "Capítols", - "You aborted the media playback": "Heu interromput la reproducció del vídeo.", - "A network error caused the media download to fail part-way.": "Un error de la xarxa ha interromput la baixada del vídeo.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "No s'ha pogut carregar el vídeo perquè el servidor o la xarxa han fallat, o bé perquè el seu format no és compatible.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "La reproducció de vídeo s'ha interrumput per un problema de corrupció de dades o bé perquè el vídeo demanava funcions que el vostre navegador no ofereix.", - "No compatible source was found for this media.": "No s'ha trobat cap font compatible amb el vídeo." + "Descriptions": "Descripcions", + "descriptions off": "Desactivar descripcions", + "Audio Track": "Pista d'àudio", + "Volume Level": "Nivell de volum", + "You aborted the media playback": "Has interromput la reproducció del contingut", + "A network error caused the media download to fail part-way.": "Un error de xarxa ha interromput la descàrrega del contingut.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "No s'ha pogut carregar el contingut, ja sigui perquè el servidor o la xarxa han fallat o perquè el format no està suportat.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "La reproducció del contingut s'ha interromput a causa d'un problema de corrupció o perquè el contingut fa servir funcions que el teu navegador no suporta.", + "No compatible source was found for this media.": "No s'ha trobat una font compatible per a aquest contingut.", + "The media is encrypted and we do not have the keys to decrypt it.": "El contingut està xifrat i no disposem de les claus per desxifrar-lo.", + "Play Video": "Reproduir vídeo", + "Close": "Tancar", + "Close Modal Dialog": "Tancar el diàleg modal", + "Modal Window": "Finestra modal", + "This is a modal window": "Aquesta és una finestra modal", + "This modal can be closed by pressing the Escape key or activating the close button.": "Aquesta finestra es pot tancar prement la tecla Escape o activant el botó de tancar.", + ", opens captions settings dialog": ", obre el diàleg de configuració de subtítols", + ", opens subtitles settings dialog": ", obre el diàleg de configuració de subtítols", + ", opens descriptions settings dialog": ", obre el diàleg de configuració de descripcions", + ", selected": ", seleccionat", + "captions settings": "configuració de subtítols", + "subtitles settings": "configuració de subtítols", + "descriptions settings": "configuració de descripcions", + "Text": "Text", + "White": "Blanc", + "Black": "Negre", + "Red": "Vermell", + "Green": "Verd", + "Blue": "Blau", + "Yellow": "Groc", + "Magenta": "Magenta", + "Cyan": "Cian", + "Background": "Fons", + "Window": "Finestra", + "Transparent": "Transparent", + "Semi-Transparent": "Semi-transparent", + "Opaque": "Opac", + "Font Size": "Mida de la lletra", + "Text Edge Style": "Estil de la vora del text", + "None": "Cap", + "Raised": "Rellevat", + "Depressed": "Premut", + "Uniform": "Uniforme", + "Drop shadow": "Ombra", + "Font Family": "Família tipogràfica", + "Proportional Sans-Serif": "Sense serif proporcional", + "Monospace Sans-Serif": "Monoespaiada sense serif", + "Proportional Serif": "Serif proporcional", + "Monospace Serif": "Monoespaiada amb serif", + "Casual": "Desenfadada", + "Script": "Script", + "Small Caps": "Minúscules", + "Reset": "Restablir", + "restore all settings to the default values": "restaurar totes les configuracions als valors predeterminats", + "Done": "Fet", + "Caption Settings Dialog": "Diàleg de configuració de subtítols", + "Beginning of dialog window. Escape will cancel and close the window.": "Inici del diàleg. L'Escape cancel·larà i tancarà la finestra.", + "End of dialog window.": "Fi del diàleg.", + "{1} is loading.": "S'està carregant {1}.", + "Exit Picture-in-Picture": "Sortir de la imatge en imatge", + "Picture-in-Picture": "Imatge en imatge", + "No content": "Sense contingut", + "Color": "Color", + "Opacity": "Opacitat", + "Text Background": "Fons del text", + "Caption Area Background": "Fons de l'àrea de subtítols", + "Playing in Picture-in-Picture": "Reproduint en imatge en imatge", + "Skip backward {1} seconds": "Salta enrere {1} segons", + "Skip forward {1} seconds": "Salta endavant {1} segons" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/ca.json b/js/libs/videojs/lang/ca.json index 8ef0c040..7a118e5d 100644 --- a/js/libs/videojs/lang/ca.json +++ b/js/libs/videojs/lang/ca.json @@ -1,26 +1,97 @@ { - "Play": "Reproducció", + "Audio Player": "Reproductor d'àudio", + "Video Player": "Reproductor de vídeo", + "Play": "Reproduir", "Pause": "Pausa", - "Current Time": "Temps reproduït", - "Duration": "Durada total", + "Replay": "Repetir", + "Current Time": "Temps actual", + "Duration": "Durada", "Remaining Time": "Temps restant", - "Stream Type": "Tipus de seqüència", + "Stream Type": "Tipus d'emissió", "LIVE": "EN DIRECTE", + "Seek to live, currently behind live": "Anar en directe, actualment darrere de la retransmissió en directe", + "Seek to live, currently playing live": "Anar en directe, actualment en directe", "Loaded": "Carregat", "Progress": "Progrés", + "Progress Bar": "Barra de progrés", + "progress bar timing: currentTime={1} duration={2}": "{1} de {2}", "Fullscreen": "Pantalla completa", - "Non-Fullscreen": "Pantalla no completa", - "Mute": "Silencia", - "Unmute": "Amb so", + "Exit Fullscreen": "Sortir de pantalla completa", + "Mute": "Silenciar", + "Unmute": "Activar el so", "Playback Rate": "Velocitat de reproducció", "Subtitles": "Subtítols", - "subtitles off": "Subtítols desactivats", + "subtitles off": "Desactivar subtítols", "Captions": "Llegendes", - "captions off": "Llegendes desactivades", + "captions off": "Desactivar llegendes", "Chapters": "Capítols", - "You aborted the media playback": "Heu interromput la reproducció del vídeo.", - "A network error caused the media download to fail part-way.": "Un error de la xarxa ha interromput la baixada del vídeo.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "No s'ha pogut carregar el vídeo perquè el servidor o la xarxa han fallat, o bé perquè el seu format no és compatible.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "La reproducció de vídeo s'ha interrumput per un problema de corrupció de dades o bé perquè el vídeo demanava funcions que el vostre navegador no ofereix.", - "No compatible source was found for this media.": "No s'ha trobat cap font compatible amb el vídeo." + "Descriptions": "Descripcions", + "descriptions off": "Desactivar descripcions", + "Audio Track": "Pista d'àudio", + "Volume Level": "Nivell de volum", + "You aborted the media playback": "Has interromput la reproducció del contingut", + "A network error caused the media download to fail part-way.": "Un error de xarxa ha interromput la descàrrega del contingut.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "No s'ha pogut carregar el contingut, ja sigui perquè el servidor o la xarxa han fallat o perquè el format no està suportat.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "La reproducció del contingut s'ha interromput a causa d'un problema de corrupció o perquè el contingut fa servir funcions que el teu navegador no suporta.", + "No compatible source was found for this media.": "No s'ha trobat una font compatible per a aquest contingut.", + "The media is encrypted and we do not have the keys to decrypt it.": "El contingut està xifrat i no disposem de les claus per desxifrar-lo.", + "Play Video": "Reproduir vídeo", + "Close": "Tancar", + "Close Modal Dialog": "Tancar el diàleg modal", + "Modal Window": "Finestra modal", + "This is a modal window": "Aquesta és una finestra modal", + "This modal can be closed by pressing the Escape key or activating the close button.": "Aquesta finestra es pot tancar prement la tecla Escape o activant el botó de tancar.", + ", opens captions settings dialog": ", obre el diàleg de configuració de subtítols", + ", opens subtitles settings dialog": ", obre el diàleg de configuració de subtítols", + ", opens descriptions settings dialog": ", obre el diàleg de configuració de descripcions", + ", selected": ", seleccionat", + "captions settings": "configuració de subtítols", + "subtitles settings": "configuració de subtítols", + "descriptions settings": "configuració de descripcions", + "Text": "Text", + "White": "Blanc", + "Black": "Negre", + "Red": "Vermell", + "Green": "Verd", + "Blue": "Blau", + "Yellow": "Groc", + "Magenta": "Magenta", + "Cyan": "Cian", + "Background": "Fons", + "Window": "Finestra", + "Transparent": "Transparent", + "Semi-Transparent": "Semi-transparent", + "Opaque": "Opac", + "Font Size": "Mida de la lletra", + "Text Edge Style": "Estil de la vora del text", + "None": "Cap", + "Raised": "Rellevat", + "Depressed": "Premut", + "Uniform": "Uniforme", + "Drop shadow": "Ombra", + "Font Family": "Família tipogràfica", + "Proportional Sans-Serif": "Sense serif proporcional", + "Monospace Sans-Serif": "Monoespaiada sense serif", + "Proportional Serif": "Serif proporcional", + "Monospace Serif": "Monoespaiada amb serif", + "Casual": "Desenfadada", + "Script": "Script", + "Small Caps": "Minúscules", + "Reset": "Restablir", + "restore all settings to the default values": "restaurar totes les configuracions als valors predeterminats", + "Done": "Fet", + "Caption Settings Dialog": "Diàleg de configuració de subtítols", + "Beginning of dialog window. Escape will cancel and close the window.": "Inici del diàleg. L'Escape cancel·larà i tancarà la finestra.", + "End of dialog window.": "Fi del diàleg.", + "{1} is loading.": "S'està carregant {1}.", + "Exit Picture-in-Picture": "Sortir de la imatge en imatge", + "Picture-in-Picture": "Imatge en imatge", + "No content": "Sense contingut", + "Color": "Color", + "Opacity": "Opacitat", + "Text Background": "Fons del text", + "Caption Area Background": "Fons de l'àrea de subtítols", + "Playing in Picture-in-Picture": "Reproduint en imatge en imatge", + "Skip backward {1} seconds": "Salta enrere {1} segons", + "Skip forward {1} seconds": "Salta endavant {1} segons" } diff --git a/js/libs/videojs/lang/cs.js b/js/libs/videojs/lang/cs.js index 7164e086..69b8571e 100644 --- a/js/libs/videojs/lang/cs.js +++ b/js/libs/videojs/lang/cs.js @@ -2,8 +2,8 @@ videojs.addLanguage('cs', { "Audio Player": "Audio Přehravač", "Video Player": "Video Přehravač", "Play": "Přehrát", - "Pause": "Pauza", - "Replay": "Spustit znovu", + "Pause": "Pozastavit", + "Replay": "Přehrát znovu", "Current Time": "Aktuální čas", "Duration": "Doba trvání", "Remaining Time": "Zbývající čas", @@ -14,14 +14,14 @@ videojs.addLanguage('cs', { "Progress Bar": "Ukazatel průběhu", "progress bar timing: currentTime={1} duration={2}": "{1} z {2}", "Fullscreen": "Celá obrazovka", - "Non-Fullscreen": "Běžné zobrazení", - "Mute": "Ztlumit zvuk", - "Unmute": "Zapnout zvuk", + "Exit Fullscreen": "Běžné zobrazení", + "Mute": "Ztlumit", + "Unmute": "Zrušit ztlumení", "Playback Rate": "Rychlost přehrávání", "Subtitles": "Titulky", "subtitles off": "Bez titulků", "Captions": "Popisky", - "captions off": "Popisky vypnuty", + "captions off": "Popisky vypnuté", "Chapters": "Kapitoly", "Descriptions": "Popisy", "descriptions off": "Bez popisů", @@ -66,7 +66,7 @@ videojs.addLanguage('cs', { "Raised": "Zvýšený", "Depressed": "Propadlý", "Uniform": "Rovnoměrný", - "Dropshadow": "Stínovaný", + "Drop shadow": "Stínovaný", "Font Family": "Rodina písma", "Proportional Sans-Serif": "Proporcionální bezpatkové", "Monospace Sans-Serif": "Monospace bezpatkové", diff --git a/js/libs/videojs/lang/cs.json b/js/libs/videojs/lang/cs.json index 02d30cdf..be449a6f 100644 --- a/js/libs/videojs/lang/cs.json +++ b/js/libs/videojs/lang/cs.json @@ -2,8 +2,8 @@ "Audio Player": "Audio Přehravač", "Video Player": "Video Přehravač", "Play": "Přehrát", - "Pause": "Pauza", - "Replay": "Spustit znovu", + "Pause": "Pozastavit", + "Replay": "Přehrát znovu", "Current Time": "Aktuální čas", "Duration": "Doba trvání", "Remaining Time": "Zbývající čas", @@ -14,14 +14,14 @@ "Progress Bar": "Ukazatel průběhu", "progress bar timing: currentTime={1} duration={2}": "{1} z {2}", "Fullscreen": "Celá obrazovka", - "Non-Fullscreen": "Běžné zobrazení", - "Mute": "Ztlumit zvuk", - "Unmute": "Zapnout zvuk", + "Exit Fullscreen": "Běžné zobrazení", + "Mute": "Ztlumit", + "Unmute": "Zrušit ztlumení", "Playback Rate": "Rychlost přehrávání", "Subtitles": "Titulky", "subtitles off": "Bez titulků", "Captions": "Popisky", - "captions off": "Popisky vypnuty", + "captions off": "Popisky vypnuté", "Chapters": "Kapitoly", "Descriptions": "Popisy", "descriptions off": "Bez popisů", @@ -66,7 +66,7 @@ "Raised": "Zvýšený", "Depressed": "Propadlý", "Uniform": "Rovnoměrný", - "Dropshadow": "Stínovaný", + "Drop shadow": "Stínovaný", "Font Family": "Rodina písma", "Proportional Sans-Serif": "Proporcionální bezpatkové", "Monospace Sans-Serif": "Monospace bezpatkové", diff --git a/js/libs/videojs/lang/cy.js b/js/libs/videojs/lang/cy.js index c33ca577..4d250fe5 100644 --- a/js/libs/videojs/lang/cy.js +++ b/js/libs/videojs/lang/cy.js @@ -14,7 +14,7 @@ videojs.addLanguage('cy', { "Progress Bar": "Bar Cynnydd", "progress bar timing: currentTime={1} duration={2}": "{1} o {2}", "Fullscreen": "Sgrîn Lawn", - "Non-Fullscreen": "Ffenestr", + "Exit Fullscreen": "Ffenestr", "Mute": "Pylu", "Unmute": "Dad-bylu", "Playback Rate": "Cyfradd Chwarae", @@ -66,7 +66,7 @@ videojs.addLanguage('cy', { "Raised": "Uwch", "Depressed": "Is", "Uniform": "Unffurf", - "Dropshadow": "Cysgod cefn", + "Drop shadow": "Cysgod cefn", "Font Family": "Teulu y Ffont", "Proportional Sans-Serif": "Heb-Seriff Cyfraneddol", "Monospace Sans-Serif": "Heb-Seriff Unlled", diff --git a/js/libs/videojs/lang/cy.json b/js/libs/videojs/lang/cy.json index f1e00a07..9d3d9b7b 100644 --- a/js/libs/videojs/lang/cy.json +++ b/js/libs/videojs/lang/cy.json @@ -14,7 +14,7 @@ "Progress Bar":"Bar Cynnydd", "progress bar timing: currentTime={1} duration={2}":"{1} o {2}", "Fullscreen":"Sgrîn Lawn", - "Non-Fullscreen":"Ffenestr", + "Exit Fullscreen":"Ffenestr", "Mute":"Pylu", "Unmute":"Dad-bylu", "Playback Rate":"Cyfradd Chwarae", @@ -66,7 +66,7 @@ "Raised":"Uwch", "Depressed":"Is", "Uniform":"Unffurf", - "Dropshadow":"Cysgod cefn", + "Drop shadow":"Cysgod cefn", "Font Family":"Teulu y Ffont", "Proportional Sans-Serif":"Heb-Seriff Cyfraneddol", "Monospace Sans-Serif":"Heb-Seriff Unlled", diff --git a/js/libs/videojs/lang/da.js b/js/libs/videojs/lang/da.js index 9be95a95..b0ddbccd 100644 --- a/js/libs/videojs/lang/da.js +++ b/js/libs/videojs/lang/da.js @@ -9,7 +9,7 @@ videojs.addLanguage('da', { "Loaded": "Indlæst", "Progress": "Status", "Fullscreen": "Fuldskærm", - "Non-Fullscreen": "Luk fuldskærm", + "Exit Fullscreen": "Luk fuldskærm", "Mute": "Uden lyd", "Unmute": "Med lyd", "Playback Rate": "Afspilningsrate", diff --git a/js/libs/videojs/lang/da.json b/js/libs/videojs/lang/da.json index eeb298d6..58267850 100644 --- a/js/libs/videojs/lang/da.json +++ b/js/libs/videojs/lang/da.json @@ -9,7 +9,7 @@ "Loaded": "Indlæst", "Progress": "Status", "Fullscreen": "Fuldskærm", - "Non-Fullscreen": "Luk fuldskærm", + "Exit Fullscreen": "Luk fuldskærm", "Mute": "Uden lyd", "Unmute": "Med lyd", "Playback Rate": "Afspilningsrate", diff --git a/js/libs/videojs/lang/de.js b/js/libs/videojs/lang/de.js index 23b253cc..3e809d18 100644 --- a/js/libs/videojs/lang/de.js +++ b/js/libs/videojs/lang/de.js @@ -10,9 +10,9 @@ videojs.addLanguage('de', { "Loaded": "Geladen", "Progress": "Status", "Fullscreen": "Vollbild", - "Non-Fullscreen": "Vollbildmodus beenden", - "Mute": "Ton aus", - "Unmute": "Ton ein", + "Exit Fullscreen": "Vollbildmodus beenden", + "Mute": "Stumm schalten", + "Unmute": "Ton einschalten", "Playback Rate": "Wiedergabegeschwindigkeit", "Subtitles": "Untertitel", "subtitles off": "Untertitel aus", @@ -61,7 +61,7 @@ videojs.addLanguage('de', { "Raised": "Erhoben", "Depressed": "Gedrückt", "Uniform": "Uniform", - "Dropshadow": "Schlagschatten", + "Drop shadow": "Schlagschatten", "Font Family": "Schriftfamilie", "Proportional Sans-Serif": "Proportionale Sans-Serif", "Monospace Sans-Serif": "Monospace Sans-Serif", @@ -85,5 +85,13 @@ videojs.addLanguage('de', { "Seek to live, currently behind live": "Zur Live-Übertragung wechseln. Aktuell wird es nicht live abgespielt.", "Seek to live, currently playing live": "Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.", "Exit Picture-in-Picture": "Bild-im-Bild-Modus beenden", - "Picture-in-Picture": "Bild-im-Bild-Modus" + "Picture-in-Picture": "Bild-im-Bild-Modus", + "No content": "Kein Inhalt", + "Color": "Farbe", + "Opacity": "Deckkraft", + "Text Background": "Texthintergrund", + "Caption Area Background": "Hintergrund des Untertitelbereichs", + "Playing in Picture-in-Picture": "Wird im Bild-im-Bild-Modus wiedergegeben", + "Skip forward {1} seconds": "{1} Sekunden vorwärts", + "Skip backward {1} seconds": "{1} Sekunden zurück" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/de.json b/js/libs/videojs/lang/de.json index 42b6768b..3c5cfd41 100644 --- a/js/libs/videojs/lang/de.json +++ b/js/libs/videojs/lang/de.json @@ -10,9 +10,9 @@ "Loaded": "Geladen", "Progress": "Status", "Fullscreen": "Vollbild", - "Non-Fullscreen": "Vollbildmodus beenden", - "Mute": "Ton aus", - "Unmute": "Ton ein", + "Exit Fullscreen": "Vollbildmodus beenden", + "Mute": "Stumm schalten", + "Unmute": "Ton einschalten", "Playback Rate": "Wiedergabegeschwindigkeit", "Subtitles": "Untertitel", "subtitles off": "Untertitel aus", @@ -61,7 +61,7 @@ "Raised": "Erhoben", "Depressed": "Gedrückt", "Uniform": "Uniform", - "Dropshadow": "Schlagschatten", + "Drop shadow": "Schlagschatten", "Font Family": "Schriftfamilie", "Proportional Sans-Serif": "Proportionale Sans-Serif", "Monospace Sans-Serif": "Monospace Sans-Serif", @@ -85,6 +85,14 @@ "Seek to live, currently behind live": "Zur Live-Übertragung wechseln. Aktuell wird es nicht live abgespielt.", "Seek to live, currently playing live": "Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.", "Exit Picture-in-Picture": "Bild-im-Bild-Modus beenden", - "Picture-in-Picture": "Bild-im-Bild-Modus" + "Picture-in-Picture": "Bild-im-Bild-Modus", + "No content": "Kein Inhalt", + "Color": "Farbe", + "Opacity": "Deckkraft", + "Text Background": "Texthintergrund", + "Caption Area Background": "Hintergrund des Untertitelbereichs", + "Playing in Picture-in-Picture": "Wird im Bild-im-Bild-Modus wiedergegeben", + "Skip forward {1} seconds": "{1} Sekunden vorwärts", + "Skip backward {1} seconds": "{1} Sekunden zurück" } diff --git a/js/libs/videojs/lang/el.js b/js/libs/videojs/lang/el.js index 795b430d..ce6863c2 100644 --- a/js/libs/videojs/lang/el.js +++ b/js/libs/videojs/lang/el.js @@ -1,6 +1,9 @@ videojs.addLanguage('el', { + "Audio Player": "Αναπαραγωγέας Ήχου", + "Video Player": "Αναπαραγωγέας Βίντεο", "Play": "Aναπαραγωγή", "Pause": "Παύση", + "Replay": "Επανάληψη", "Current Time": "Τρέχων χρόνος", "Duration": "Συνολικός χρόνος", "Remaining Time": "Υπολοιπόμενος χρόνος", @@ -8,8 +11,9 @@ videojs.addLanguage('el', { "LIVE": "ΖΩΝΤΑΝΑ", "Loaded": "Φόρτωση επιτυχής", "Progress": "Πρόοδος", + "Progress Bar": "Μπάρα Προόδου", "Fullscreen": "Πλήρης οθόνη", - "Non-Fullscreen": "Έξοδος από πλήρη οθόνη", + "Exit Fullscreen": "Έξοδος από πλήρη οθόνη", "Mute": "Σίγαση", "Unmute": "Kατάργηση σίγασης", "Playback Rate": "Ρυθμός αναπαραγωγής", @@ -18,10 +22,11 @@ videojs.addLanguage('el', { "Captions": "Λεζάντες", "captions off": "απόκρυψη λεζάντων", "Chapters": "Κεφάλαια", - "Close Modal Dialog": "Κλείσιμο παραθύρου", + "Close Modal Dialog": "Κλείσιμο Αναδυόμενου Παραθύρου", "Descriptions": "Περιγραφές", "descriptions off": "απόκρυψη περιγραφών", "Audio Track": "Ροή ήχου", + "Volume Level": "Επίπεδο Ήχου", "You aborted the media playback": "Ακυρώσατε την αναπαραγωγή", "A network error caused the media download to fail part-way.": "Ένα σφάλμα δικτύου προκάλεσε την αποτυχία μεταφόρτωσης του αρχείου προς αναπαραγωγή.", "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Το αρχείο προς αναπαραγωγή δεν ήταν δυνατό να φορτωθεί είτε γιατί υπήρξε σφάλμα στον διακομιστή ή το δίκτυο, είτε γιατί ο τύπος του αρχείου δεν υποστηρίζεται.", @@ -36,5 +41,45 @@ videojs.addLanguage('el', { ", opens captions settings dialog": ", εμφανίζει τις ρυθμίσεις για τις λεζάντες", ", opens subtitles settings dialog": ", εμφανίζει τις ρυθμίσεις για τους υπότιτλους", ", opens descriptions settings dialog": ", εμφανίζει τις ρυθμίσεις για τις περιγραφές", - ", selected": ", επιλεγμένο" + ", selected": ", επιλεγμένο", + "captions settings": "ρυμθίσεις λεζάντας", + "subtitles settings": "ρυθμίσεις υποτίτλων", + "descriptions settings": "ρυθμίσεις περιγραφών", + "Text": "Κείμενο", + "White": "Λευκό", + "Black": "Μαύρο", + "Red": "Κόκκινο", + "Green": "Πράσινο", + "Blue": "Μπλέ", + "Yellow": "Κίτρινο", + "Magenta": "Ματζέντα", + "Cyan": "Κυανό", + "Background": "Φόντο", + "Window": "Παράθυρο", + "Transparent": "Διάφανο", + "Semi-Transparent": "Ημιδιάφανο", + "Opaque": "Αδιαφανές", + "Font Size": "Μέγεθος Γραμματοσειράς", + "Text Edge Style": "Στυλ Περιθωρίου Κειμένου", + "None": "Κανένα", + "Uniform": "Ομοιόμορφο", + "Drop shadow": "Σκίαση", + "Font Family": "Οικογένεια Γραμματοσειράς", + "Reset": "Επαναφορά", + "restore all settings to the default values": "επαναφορά όλων των ρυθμίσεων στις προεπιλεγμένες τιμές", + "Done": "Ολοκληρώθηκε", + "Caption Settings Dialog": "Διάλογος Ρυθμίσεων Λεζάντας", + "Beginning of dialog window. Escape will cancel and close the window.": "Αρχή του παραθύρου διαλόγου. Το Escape θα ακυρώσει και θα κλείσει το παράθυρο.", + "End of dialog window.": "Τέλος του παραθύρου διαλόγου.", + "{1} is loading.": "{1} φορτώνει.", + "Exit Picture-in-Picture": "Έξοδος από την Εικόνα-μέσα-σε-Εικόνα", + "Picture-in-Picture": "Εικόνα-μέσα-σε-Εικόνα", + "No content": "Χωρίς περιεχόμενο", + "Color": "Χρώμα", + "Opacity": "Αδιαφάνεια", + "Text Background": "Φόντο Κειμένου", + "Caption Area Background": "Φόντο Περιοχής Λεζάντας", + "Playing in Picture-in-Picture": "Αναπαραγωγή σε Εικόνα-μέσα-σε-Εικόνα", + "Skip backward {1} seconds": "Μεταβείτε πίσω {1} δευτερόλεπτα", + "Skip forward {1} seconds": "Μεταβείτε μπροστά {1} δευτερόλεπτα" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/el.json b/js/libs/videojs/lang/el.json index 16b48b83..bd5a3d32 100644 --- a/js/libs/videojs/lang/el.json +++ b/js/libs/videojs/lang/el.json @@ -1,6 +1,9 @@ { + "Audio Player" : "Αναπαραγωγέας Ήχου", + "Video Player": "Αναπαραγωγέας Βίντεο", "Play": "Aναπαραγωγή", "Pause": "Παύση", + "Replay": "Επανάληψη", "Current Time": "Τρέχων χρόνος", "Duration": "Συνολικός χρόνος", "Remaining Time": "Υπολοιπόμενος χρόνος", @@ -8,8 +11,9 @@ "LIVE": "ΖΩΝΤΑΝΑ", "Loaded": "Φόρτωση επιτυχής", "Progress": "Πρόοδος", + "Progress Bar": "Μπάρα Προόδου", "Fullscreen": "Πλήρης οθόνη", - "Non-Fullscreen": "Έξοδος από πλήρη οθόνη", + "Exit Fullscreen": "Έξοδος από πλήρη οθόνη", "Mute": "Σίγαση", "Unmute": "Kατάργηση σίγασης", "Playback Rate": "Ρυθμός αναπαραγωγής", @@ -18,10 +22,11 @@ "Captions": "Λεζάντες", "captions off": "απόκρυψη λεζάντων", "Chapters": "Κεφάλαια", - "Close Modal Dialog": "Κλείσιμο παραθύρου", + "Close Modal Dialog": "Κλείσιμο Αναδυόμενου Παραθύρου", "Descriptions": "Περιγραφές", "descriptions off": "απόκρυψη περιγραφών", "Audio Track": "Ροή ήχου", + "Volume Level": "Επίπεδο Ήχου", "You aborted the media playback": "Ακυρώσατε την αναπαραγωγή", "A network error caused the media download to fail part-way.": "Ένα σφάλμα δικτύου προκάλεσε την αποτυχία μεταφόρτωσης του αρχείου προς αναπαραγωγή.", "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Το αρχείο προς αναπαραγωγή δεν ήταν δυνατό να φορτωθεί είτε γιατί υπήρξε σφάλμα στον διακομιστή ή το δίκτυο, είτε γιατί ο τύπος του αρχείου δεν υποστηρίζεται.", @@ -36,5 +41,45 @@ ", opens captions settings dialog": ", εμφανίζει τις ρυθμίσεις για τις λεζάντες", ", opens subtitles settings dialog": ", εμφανίζει τις ρυθμίσεις για τους υπότιτλους", ", opens descriptions settings dialog": ", εμφανίζει τις ρυθμίσεις για τις περιγραφές", - ", selected": ", επιλεγμένο" + ", selected": ", επιλεγμένο", + "captions settings": "ρυμθίσεις λεζάντας", + "subtitles settings": "ρυθμίσεις υποτίτλων", + "descriptions settings": "ρυθμίσεις περιγραφών", + "Text": "Κείμενο", + "White": "Λευκό", + "Black": "Μαύρο", + "Red": "Κόκκινο", + "Green": "Πράσινο", + "Blue": "Μπλέ", + "Yellow": "Κίτρινο", + "Magenta": "Ματζέντα", + "Cyan": "Κυανό", + "Background": "Φόντο", + "Window": "Παράθυρο", + "Transparent": "Διάφανο", + "Semi-Transparent": "Ημιδιάφανο", + "Opaque": "Αδιαφανές", + "Font Size": "Μέγεθος Γραμματοσειράς", + "Text Edge Style": "Στυλ Περιθωρίου Κειμένου", + "None": "Κανένα", + "Uniform": "Ομοιόμορφο", + "Drop shadow": "Σκίαση", + "Font Family": "Οικογένεια Γραμματοσειράς", + "Reset": "Επαναφορά", + "restore all settings to the default values": "επαναφορά όλων των ρυθμίσεων στις προεπιλεγμένες τιμές", + "Done": "Ολοκληρώθηκε", + "Caption Settings Dialog": "Διάλογος Ρυθμίσεων Λεζάντας", + "Beginning of dialog window. Escape will cancel and close the window.": "Αρχή του παραθύρου διαλόγου. Το Escape θα ακυρώσει και θα κλείσει το παράθυρο.", + "End of dialog window.": "Τέλος του παραθύρου διαλόγου.", + "{1} is loading.": "{1} φορτώνει.", + "Exit Picture-in-Picture": "Έξοδος από την Εικόνα-μέσα-σε-Εικόνα", + "Picture-in-Picture": "Εικόνα-μέσα-σε-Εικόνα", + "No content": "Χωρίς περιεχόμενο", + "Color": "Χρώμα", + "Opacity": "Αδιαφάνεια", + "Text Background": "Φόντο Κειμένου", + "Caption Area Background": "Φόντο Περιοχής Λεζάντας", + "Playing in Picture-in-Picture": "Αναπαραγωγή σε Εικόνα-μέσα-σε-Εικόνα", + "Skip backward {1} seconds": "Μεταβείτε πίσω {1} δευτερόλεπτα", + "Skip forward {1} seconds": "Μεταβείτε μπροστά {1} δευτερόλεπτα" } diff --git a/js/libs/videojs/lang/en-GB.js b/js/libs/videojs/lang/en-GB.js new file mode 100644 index 00000000..73653fb6 --- /dev/null +++ b/js/libs/videojs/lang/en-GB.js @@ -0,0 +1,3 @@ +videojs.addLanguage('en-GB', { + "Color": "Colour" +}); \ No newline at end of file diff --git a/js/libs/videojs/lang/en-GB.json b/js/libs/videojs/lang/en-GB.json new file mode 100644 index 00000000..7010b643 --- /dev/null +++ b/js/libs/videojs/lang/en-GB.json @@ -0,0 +1,4 @@ +{ + "Color": "Colour" +} + diff --git a/js/libs/videojs/lang/en.js b/js/libs/videojs/lang/en.js index ef630d1a..c227dc9b 100644 --- a/js/libs/videojs/lang/en.js +++ b/js/libs/videojs/lang/en.js @@ -16,7 +16,7 @@ videojs.addLanguage('en', { "Progress Bar": "Progress Bar", "progress bar timing: currentTime={1} duration={2}": "{1} of {2}", "Fullscreen": "Fullscreen", - "Non-Fullscreen": "Exit Fullscreen", + "Exit Fullscreen": "Exit Fullscreen", "Mute": "Mute", "Unmute": "Unmute", "Playback Rate": "Playback Rate", @@ -68,7 +68,7 @@ videojs.addLanguage('en', { "Raised": "Raised", "Depressed": "Depressed", "Uniform": "Uniform", - "Dropshadow": "Dropshadow", + "Drop shadow": "Drop shadow", "Font Family": "Font Family", "Proportional Sans-Serif": "Proportional Sans-Serif", "Monospace Sans-Serif": "Monospace Sans-Serif", @@ -85,5 +85,13 @@ videojs.addLanguage('en', { "End of dialog window.": "End of dialog window.", "{1} is loading.": "{1} is loading.", "Exit Picture-in-Picture": "Exit Picture-in-Picture", - "Picture-in-Picture": "Picture-in-Picture" + "Picture-in-Picture": "Picture-in-Picture", + "No content": "No content", + "Color": "Color", + "Opacity": "Opacity", + "Text Background": "Text Background", + "Caption Area Background": "Caption Area Background", + "Playing in Picture-in-Picture": "Playing in Picture-in-Picture", + "Skip backward {1} seconds": "Skip backward {1} seconds", + "Skip forward {1} seconds": "Skip forward {1} seconds" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/en.json b/js/libs/videojs/lang/en.json index 649120c5..ba96366c 100644 --- a/js/libs/videojs/lang/en.json +++ b/js/libs/videojs/lang/en.json @@ -16,7 +16,7 @@ "Progress Bar": "Progress Bar", "progress bar timing: currentTime={1} duration={2}": "{1} of {2}", "Fullscreen": "Fullscreen", - "Non-Fullscreen": "Exit Fullscreen", + "Exit Fullscreen": "Exit Fullscreen", "Mute": "Mute", "Unmute": "Unmute", "Playback Rate": "Playback Rate", @@ -68,7 +68,7 @@ "Raised": "Raised", "Depressed": "Depressed", "Uniform": "Uniform", - "Dropshadow": "Dropshadow", + "Drop shadow": "Drop shadow", "Font Family": "Font Family", "Proportional Sans-Serif": "Proportional Sans-Serif", "Monospace Sans-Serif": "Monospace Sans-Serif", @@ -85,5 +85,13 @@ "End of dialog window.": "End of dialog window.", "{1} is loading.": "{1} is loading.", "Exit Picture-in-Picture": "Exit Picture-in-Picture", - "Picture-in-Picture": "Picture-in-Picture" + "Picture-in-Picture": "Picture-in-Picture", + "No content": "No content", + "Color": "Color", + "Opacity": "Opacity", + "Text Background": "Text Background", + "Caption Area Background": "Caption Area Background", + "Playing in Picture-in-Picture": "Playing in Picture-in-Picture", + "Skip backward {1} seconds": "Skip backward {1} seconds", + "Skip forward {1} seconds": "Skip forward {1} seconds" } diff --git a/js/libs/videojs/lang/es.js b/js/libs/videojs/lang/es.js index 8656b790..55a6b6d3 100644 --- a/js/libs/videojs/lang/es.js +++ b/js/libs/videojs/lang/es.js @@ -10,9 +10,9 @@ videojs.addLanguage('es', { "Loaded": "Cargado", "Progress": "Progreso", "Fullscreen": "Pantalla completa", - "Non-Fullscreen": "Pantalla no completa", - "Mute": "Silenciar", - "Unmute": "No silenciado", + "Exit Fullscreen": "Pantalla no completa", + "Mute": "Desactivar el sonido", + "Unmute": "Activar el sonido", "Playback Rate": "Velocidad de reproducción", "Subtitles": "Subtítulos", "subtitles off": "Subtítulos desactivados", @@ -68,7 +68,7 @@ videojs.addLanguage('es', { "Raised": "En relieve", "Depressed": "Hundido", "Uniform": "Uniforme", - "Dropshadow": "Sombra paralela", + "Drop shadow": "Sombra paralela", "Font Family": "Familia de fuente", "Proportional Sans-Serif": "Sans-Serif proporcional", "Monospace Sans-Serif": "Sans-Serif monoespacio", @@ -85,5 +85,12 @@ videojs.addLanguage('es', { "End of dialog window.": "Final de la ventana de diálogo.", "{1} is loading.": "{1} se está cargando.", "Exit Picture-in-Picture": "Salir de imagen sobre imagen", - "Picture-in-Picture": "Imagen sobre imagen" + "Picture-in-Picture": "Imagen sobre imagen", + "No content": "Sin contenido", + "Color": "Color", + "Opacity": "Opacidad", + "Text Background": "Fondo del texto", + "Caption Area Background": "Fondo del área de subtítulos", + "Skip forward {1} seconds": "Avanza {1} segundos", + "Skip backward {1} seconds": "Retrocede {1} segundos" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/es.json b/js/libs/videojs/lang/es.json index cd0b11cc..91d30ffc 100644 --- a/js/libs/videojs/lang/es.json +++ b/js/libs/videojs/lang/es.json @@ -10,9 +10,9 @@ "Loaded": "Cargado", "Progress": "Progreso", "Fullscreen": "Pantalla completa", - "Non-Fullscreen": "Pantalla no completa", - "Mute": "Silenciar", - "Unmute": "No silenciado", + "Exit Fullscreen": "Pantalla no completa", + "Mute": "Desactivar el sonido", + "Unmute": "Activar el sonido", "Playback Rate": "Velocidad de reproducción", "Subtitles": "Subtítulos", "subtitles off": "Subtítulos desactivados", @@ -68,7 +68,7 @@ "Raised": "En relieve", "Depressed": "Hundido", "Uniform": "Uniforme", - "Dropshadow": "Sombra paralela", + "Drop shadow": "Sombra paralela", "Font Family": "Familia de fuente", "Proportional Sans-Serif": "Sans-Serif proporcional", "Monospace Sans-Serif": "Sans-Serif monoespacio", @@ -85,5 +85,12 @@ "End of dialog window.": "Final de la ventana de diálogo.", "{1} is loading.": "{1} se está cargando.", "Exit Picture-in-Picture": "Salir de imagen sobre imagen", - "Picture-in-Picture": "Imagen sobre imagen" + "Picture-in-Picture": "Imagen sobre imagen", + "No content": "Sin contenido", + "Color": "Color", + "Opacity": "Opacidad", + "Text Background": "Fondo del texto", + "Caption Area Background": "Fondo del área de subtítulos", + "Skip forward {1} seconds": "Avanza {1} segundos", + "Skip backward {1} seconds": "Retrocede {1} segundos" } diff --git a/js/libs/videojs/lang/et.js b/js/libs/videojs/lang/et.js new file mode 100644 index 00000000..8ae72093 --- /dev/null +++ b/js/libs/videojs/lang/et.js @@ -0,0 +1,89 @@ +videojs.addLanguage('et', { + "Audio Player": "Heliesitaja", + "Video Player": "Videoesitaja", + "Play": "Esita", + "Pause": "Paus", + "Replay": "Esita uuesti", + "Current Time": "Praegune aeg", + "Duration": "Kestus", + "Remaining Time": "Järelejäänud aeg", + "Stream Type": "Voo tüüp", + "LIVE": "OTSE", + "Seek to live, currently behind live": "Mine üle otseedastusle, praegu reaalajast taga", + "Seek to live, currently playing live": "Mine üle otseedastusle, praegu reaalajas ", + "Loaded": "Laaditud", + "Progress": "Edenemine", + "Progress Bar": "Edenemisriba ", + "progress bar timing: currentTime={1} duration={2}": "{1} / {2}", + "Fullscreen": "Täisekraan", + "Exit Fullscreen": "Välju täisekraanist", + "Mute": "Vaigista", + "Unmute": "Lõpeta vaigistus", + "Playback Rate": "Taasesituse kiirus", + "Subtitles": "Subtiitrid", + "subtitles off": "subtiitrid väljas", + "Captions": "Pealdised", + "captions off": "pealdised väljas", + "Chapters": "Peatükid", + "Descriptions": "Kirjeldused", + "descriptions off": "kirjeldused väljas", + "Audio Track": "Helirada", + "Volume Level": "Helitugevuse tase", + "You aborted the media playback": "Katkestasid taasesituse", + "A network error caused the media download to fail part-way.": "Võrguvea tõttu nurjus meediumifaili allalaadimine poole pealt.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Seda meediumifaili ei õnnestunud laadida, kuna serveris või võrgus esines tõrge või kuna vormingut ei toetata.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Meediumifaili taasesitamine katkestati, kuna fail on rikutud või see kasutab funktsiooni, mida sinu brauser ei toeta.", + "No compatible source was found for this media.": "Ei leitud selle meediumifailiga ühilduvat allikat.", + "The media is encrypted and we do not have the keys to decrypt it.": "See meediumifail on krüpteeritud ja meil pole dekrüpteerimiseks vajalikku võtit.", + "Play Video": "Esita video", + "Close": "Sule", + "Close Modal Dialog": "Sule modaaldialoog", + "Modal Window": "Modaalaken", + "This is a modal window": "See on modaalaken", + "This modal can be closed by pressing the Escape key or activating the close button.": "Saad selle modaalelemendi sulgeda, vajutades paoklahvi või tehes sulgemisnupu aktiivseks.", + ", opens captions settings dialog": ", avab pealdiste sätete dialoogi", + ", opens subtitles settings dialog": ", avab subtiitrite sätete dialoogi", + ", opens descriptions settings dialog": ", avab kirjelduste sätete dialoogi", + ", selected": ", valitud", + "captions settings": "pealdiste sätted", + "subtitles settings": "subtiitrite sätted", + "descriptions settings": "kirjelduste sätted", + "Text": "Tekst", + "White": "Valge", + "Black": "Must", + "Red": "Punane", + "Green": "Roheline", + "Blue": "Sinine", + "Yellow": "Kollane", + "Magenta": "Magneta", + "Cyan": "Tsüaan", + "Background": "Taust", + "Window": "Aken", + "Transparent": "Läbipaistev", + "Semi-Transparent": "Poolläbipaistev", + "Opaque": "Läbipaistmatu", + "Font Size": "Fondi suurus", + "Text Edge Style": "Tekstiserva stiil", + "None": "Puudub", + "Raised": "Kõrgem", + "Depressed": "Madalam", + "Uniform": "Ühtlane", + "Drop shadow": "Langeva varjuga", + "Font Family": "Fondipere", + "Proportional Sans-Serif": "Seriifideta proportsionaalkiri", + "Monospace Sans-Serif": "Seriifideta püsisammkiri", + "Proportional Serif": "Seriifidega proportsionaalkiri", + "Monospace Serif": "Seriifidega püsisammkiri", + "Casual": "Sidumata kiri", + "Script": "Käsikirjaline kiri", + "Small Caps": "Kapiteelkiri", + "Reset": "Lähtesta", + "restore all settings to the default values": "taasta kõigi sätete vaikeväärtused", + "Done": "Valmis", + "Caption Settings Dialog": "Pealdiste sätete dialoog", + "Beginning of dialog window. Escape will cancel and close the window.": "Dialoogiakna algus. Paoklahv loobub aknast ja suleb selle.", + "End of dialog window.": "Dialoogiakna lõpp.", + "{1} is loading.": "{1} laadimisel.", + "Exit Picture-in-Picture": "Välju funktsioonist pilt pildis", + "Picture-in-Picture": "Pilt pildis" +}); \ No newline at end of file diff --git a/js/libs/videojs/lang/et.json b/js/libs/videojs/lang/et.json new file mode 100644 index 00000000..1554589c --- /dev/null +++ b/js/libs/videojs/lang/et.json @@ -0,0 +1,89 @@ +{ + "Audio Player": "Heliesitaja", + "Video Player": "Videoesitaja", + "Play": "Esita", + "Pause": "Paus", + "Replay": "Esita uuesti", + "Current Time": "Praegune aeg", + "Duration": "Kestus", + "Remaining Time": "Järelejäänud aeg", + "Stream Type": "Voo tüüp", + "LIVE": "OTSE", + "Seek to live, currently behind live": "Mine üle otseedastusle, praegu reaalajast taga", + "Seek to live, currently playing live": "Mine üle otseedastusle, praegu reaalajas ", + "Loaded": "Laaditud", + "Progress": "Edenemine", + "Progress Bar": "Edenemisriba ", + "progress bar timing: currentTime={1} duration={2}": "{1} / {2}", + "Fullscreen": "Täisekraan", + "Exit Fullscreen": "Välju täisekraanist", + "Mute": "Vaigista", + "Unmute": "Lõpeta vaigistus", + "Playback Rate": "Taasesituse kiirus", + "Subtitles": "Subtiitrid", + "subtitles off": "subtiitrid väljas", + "Captions": "Pealdised", + "captions off": "pealdised väljas", + "Chapters": "Peatükid", + "Descriptions": "Kirjeldused", + "descriptions off": "kirjeldused väljas", + "Audio Track": "Helirada", + "Volume Level": "Helitugevuse tase", + "You aborted the media playback": "Katkestasid taasesituse", + "A network error caused the media download to fail part-way.": "Võrguvea tõttu nurjus meediumifaili allalaadimine poole pealt.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Seda meediumifaili ei õnnestunud laadida, kuna serveris või võrgus esines tõrge või kuna vormingut ei toetata.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Meediumifaili taasesitamine katkestati, kuna fail on rikutud või see kasutab funktsiooni, mida sinu brauser ei toeta.", + "No compatible source was found for this media.": "Ei leitud selle meediumifailiga ühilduvat allikat.", + "The media is encrypted and we do not have the keys to decrypt it.": "See meediumifail on krüpteeritud ja meil pole dekrüpteerimiseks vajalikku võtit.", + "Play Video": "Esita video", + "Close": "Sule", + "Close Modal Dialog": "Sule modaaldialoog", + "Modal Window": "Modaalaken", + "This is a modal window": "See on modaalaken", + "This modal can be closed by pressing the Escape key or activating the close button.": "Saad selle modaalelemendi sulgeda, vajutades paoklahvi või tehes sulgemisnupu aktiivseks.", + ", opens captions settings dialog": ", avab pealdiste sätete dialoogi", + ", opens subtitles settings dialog": ", avab subtiitrite sätete dialoogi", + ", opens descriptions settings dialog": ", avab kirjelduste sätete dialoogi", + ", selected": ", valitud", + "captions settings": "pealdiste sätted", + "subtitles settings": "subtiitrite sätted", + "descriptions settings": "kirjelduste sätted", + "Text": "Tekst", + "White": "Valge", + "Black": "Must", + "Red": "Punane", + "Green": "Roheline", + "Blue": "Sinine", + "Yellow": "Kollane", + "Magenta": "Magneta", + "Cyan": "Tsüaan", + "Background": "Taust", + "Window": "Aken", + "Transparent": "Läbipaistev", + "Semi-Transparent": "Poolläbipaistev", + "Opaque": "Läbipaistmatu", + "Font Size": "Fondi suurus", + "Text Edge Style": "Tekstiserva stiil", + "None": "Puudub", + "Raised": "Kõrgem", + "Depressed": "Madalam", + "Uniform": "Ühtlane", + "Drop shadow": "Langeva varjuga", + "Font Family": "Fondipere", + "Proportional Sans-Serif": "Seriifideta proportsionaalkiri", + "Monospace Sans-Serif": "Seriifideta püsisammkiri", + "Proportional Serif": "Seriifidega proportsionaalkiri", + "Monospace Serif": "Seriifidega püsisammkiri", + "Casual": "Sidumata kiri", + "Script": "Käsikirjaline kiri", + "Small Caps": "Kapiteelkiri", + "Reset": "Lähtesta", + "restore all settings to the default values": "taasta kõigi sätete vaikeväärtused", + "Done": "Valmis", + "Caption Settings Dialog": "Pealdiste sätete dialoog", + "Beginning of dialog window. Escape will cancel and close the window.": "Dialoogiakna algus. Paoklahv loobub aknast ja suleb selle.", + "End of dialog window.": "Dialoogiakna lõpp.", + "{1} is loading.": "{1} laadimisel.", + "Exit Picture-in-Picture": "Välju funktsioonist pilt pildis", + "Picture-in-Picture": "Pilt pildis" +} diff --git a/js/libs/videojs/lang/eu.js b/js/libs/videojs/lang/eu.js new file mode 100644 index 00000000..2f08b5c0 --- /dev/null +++ b/js/libs/videojs/lang/eu.js @@ -0,0 +1,89 @@ +videojs.addLanguage('eu', { + "Audio Player": "Audio jogailua", + "Video Player": "Bideo jogailua", + "Play": "Hasi", + "Pause": "Gelditu", + "Replay": "Berriz hasi", + "Current Time": "Uneko denbora", + "Duration": "Iraupena", + "Remaining Time": "Gelditzen den denbora", + "Stream Type": "Jario mota", + "LIVE": "ZUZENEAN", + "Seek to live, currently behind live": "Zuzenekora joan, orain zuzenekoaren atzetik", + "Seek to live, currently playing live": "Zuzenekora joan, orain zuzenean ari da", + "Loaded": "Kargatuta", + "Progress": "Aurrerapena", + "Progress Bar": "Aurrerapen barra", + "progress bar timing: currentTime={1} duration={2}": "{1} / {2}", + "Fullscreen": "Pantaila osoa", + "Exit Fullscreen": "Irten pantaila osotik", + "Mute": "Ixildu", + "Unmute": "Soinua jarri", + "Playback Rate": "Abiadura", + "Subtitles": "Azpitituluak", + "subtitles off": "azpitituluak kenduta", + "Captions": "Oharrak", + "captions off": "oharrak kenduta", + "Chapters": "Kapituluak", + "Descriptions": "Deskribapenak", + "descriptions off": "deskribapenak kenduta", + "Audio Track": "Audio pista", + "Volume Level": "Bolumen maila", + "You aborted the media playback": "Bertan behera utzi duzu", + "A network error caused the media download to fail part-way.": "Sare errore batek deskargak huts egitea eragin du.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Media ezin izan da kargatu, zerbitzariak edo sareak huts egin duelako edo formatu horretako media erabili ezin delako.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Bertan behera gelditu da fitxategia ondo ez dagoelako edo zure nabigatzailean erabili ezin diren ezaugarriak dituelako.", + "No compatible source was found for this media.": "Ez dago media honentzako iturburu bateragarririk.", + "The media is encrypted and we do not have the keys to decrypt it.": "Media zifratuta dago eta ez ditugu beharrezko gakoak.", + "Play Video": "Bideoa hasi", + "Close": "Itxi", + "Close Modal Dialog": "Leihoa itxi", + "Modal Window": "Leihoa", + "This is a modal window": "Hau leiho modal bat da", + "This modal can be closed by pressing the Escape key or activating the close button.": "Leiho modal hau zure teklatuko Escape tekla sakatuz edo ixteko botoia sakatuz itxi daiteke.", + ", opens captions settings dialog": ", oharren ezarpenen leihoa irekitzen du", + ", opens subtitles settings dialog": ", azpitituluen ezarpenen leihoa irekitzen du", + ", opens descriptions settings dialog": ", deskribapenen ezarpenen leihoa irekitzen du", + ", selected": ", aukeratuta", + "captions settings": "oharren ezarpenak", + "subtitles settings": "azpitituluen ezarpenak", + "descriptions settings": "deskribapenen ezarpenak", + "Text": "Testua", + "White": "Zuria", + "Black": "Beltza", + "Red": "Gorria", + "Green": "Berdea", + "Blue": "Urdina", + "Yellow": "Horia", + "Magenta": "Magenta", + "Cyan": "Cyan (urdina)", + "Background": "Atzeko planoa", + "Window": "Leihoa", + "Transparent": "Gardena", + "Semi-Transparent": "Erdi-gardena", + "Opaque": "Opaku", + "Font Size": "Letra-tamaina", + "Text Edge Style": "Tesuaren etzen estiloa", + "None": "Bat ere ez", + "Raised": "Jasoa", + "Depressed": "Hondoratua", + "Uniform": "Uniformea", + "Drop shadow": "Itzalduna", + "Font Family": "Letra-tipoa", + "Proportional Sans-Serif": "Sans-Serif proportzionala", + "Monospace Sans-Serif": "Tarte berdineko Sans-Serif", + "Proportional Serif": "Serif proporzionala", + "Monospace Serif": "Tarte berdineko Serif", + "Casual": "Informala", + "Script": "Eskuz idatzitakoa", + "Small Caps": "letra xeheak", + "Reset": "Berrezarri", + "restore all settings to the default values": "berrezarri ezarpen guztiak defektuzko balioetara", + "Done": "Eginda", + "Caption Settings Dialog": "Oharren ezarpenen leihoa", + "Beginning of dialog window. Escape will cancel and close the window.": "Leihoaren hasiera. Escapeta teklak leihoa itxi egingo du.", + "End of dialog window.": "Leihoaren amaiera.", + "{1} is loading.": "{1} kargatzen ari da.", + "Exit Picture-in-Picture": "Irten irudiz-irudiztik", + "Picture-in-Picture": "Irudiz-irudi" +}); \ No newline at end of file diff --git a/js/libs/videojs/lang/eu.json b/js/libs/videojs/lang/eu.json new file mode 100644 index 00000000..d9fc5d98 --- /dev/null +++ b/js/libs/videojs/lang/eu.json @@ -0,0 +1,89 @@ +{ + "Audio Player": "Audio jogailua", + "Video Player": "Bideo jogailua", + "Play": "Hasi", + "Pause": "Gelditu", + "Replay": "Berriz hasi", + "Current Time": "Uneko denbora", + "Duration": "Iraupena", + "Remaining Time": "Gelditzen den denbora", + "Stream Type": "Jario mota", + "LIVE": "ZUZENEAN", + "Seek to live, currently behind live": "Zuzenekora joan, orain zuzenekoaren atzetik", + "Seek to live, currently playing live": "Zuzenekora joan, orain zuzenean ari da", + "Loaded": "Kargatuta", + "Progress": "Aurrerapena", + "Progress Bar": "Aurrerapen barra", + "progress bar timing: currentTime={1} duration={2}": "{1} / {2}", + "Fullscreen": "Pantaila osoa", + "Exit Fullscreen": "Irten pantaila osotik", + "Mute": "Ixildu", + "Unmute": "Soinua jarri", + "Playback Rate": "Abiadura", + "Subtitles": "Azpitituluak", + "subtitles off": "azpitituluak kenduta", + "Captions": "Oharrak", + "captions off": "oharrak kenduta", + "Chapters": "Kapituluak", + "Descriptions": "Deskribapenak", + "descriptions off": "deskribapenak kenduta", + "Audio Track": "Audio pista", + "Volume Level": "Bolumen maila", + "You aborted the media playback": "Bertan behera utzi duzu", + "A network error caused the media download to fail part-way.": "Sare errore batek deskargak huts egitea eragin du.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Media ezin izan da kargatu, zerbitzariak edo sareak huts egin duelako edo formatu horretako media erabili ezin delako.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Bertan behera gelditu da fitxategia ondo ez dagoelako edo zure nabigatzailean erabili ezin diren ezaugarriak dituelako.", + "No compatible source was found for this media.": "Ez dago media honentzako iturburu bateragarririk.", + "The media is encrypted and we do not have the keys to decrypt it.": "Media zifratuta dago eta ez ditugu beharrezko gakoak.", + "Play Video": "Bideoa hasi", + "Close": "Itxi", + "Close Modal Dialog": "Leihoa itxi", + "Modal Window": "Leihoa", + "This is a modal window": "Hau leiho modal bat da", + "This modal can be closed by pressing the Escape key or activating the close button.": "Leiho modal hau zure teklatuko Escape tekla sakatuz edo ixteko botoia sakatuz itxi daiteke.", + ", opens captions settings dialog": ", oharren ezarpenen leihoa irekitzen du", + ", opens subtitles settings dialog": ", azpitituluen ezarpenen leihoa irekitzen du", + ", opens descriptions settings dialog": ", deskribapenen ezarpenen leihoa irekitzen du", + ", selected": ", aukeratuta", + "captions settings": "oharren ezarpenak", + "subtitles settings": "azpitituluen ezarpenak", + "descriptions settings": "deskribapenen ezarpenak", + "Text": "Testua", + "White": "Zuria", + "Black": "Beltza", + "Red": "Gorria", + "Green": "Berdea", + "Blue": "Urdina", + "Yellow": "Horia", + "Magenta": "Magenta", + "Cyan": "Cyan (urdina)", + "Background": "Atzeko planoa", + "Window": "Leihoa", + "Transparent": "Gardena", + "Semi-Transparent": "Erdi-gardena", + "Opaque": "Opaku", + "Font Size": "Letra-tamaina", + "Text Edge Style": "Tesuaren etzen estiloa", + "None": "Bat ere ez", + "Raised": "Jasoa", + "Depressed": "Hondoratua", + "Uniform": "Uniformea", + "Drop shadow": "Itzalduna", + "Font Family": "Letra-tipoa", + "Proportional Sans-Serif": "Sans-Serif proportzionala", + "Monospace Sans-Serif": "Tarte berdineko Sans-Serif", + "Proportional Serif": "Serif proporzionala", + "Monospace Serif": "Tarte berdineko Serif", + "Casual": "Informala", + "Script": "Eskuz idatzitakoa", + "Small Caps": "letra xeheak", + "Reset": "Berrezarri", + "restore all settings to the default values": "berrezarri ezarpen guztiak defektuzko balioetara", + "Done": "Eginda", + "Caption Settings Dialog": "Oharren ezarpenen leihoa", + "Beginning of dialog window. Escape will cancel and close the window.": "Leihoaren hasiera. Escapeta teklak leihoa itxi egingo du.", + "End of dialog window.": "Leihoaren amaiera.", + "{1} is loading.": "{1} kargatzen ari da.", + "Exit Picture-in-Picture": "Irten irudiz-irudiztik", + "Picture-in-Picture": "Irudiz-irudi" +} diff --git a/js/libs/videojs/lang/fa.js b/js/libs/videojs/lang/fa.js index fa79f68f..00225f96 100644 --- a/js/libs/videojs/lang/fa.js +++ b/js/libs/videojs/lang/fa.js @@ -1,6 +1,6 @@ videojs.addLanguage('fa', { - "Audio Player": "پخش کننده صوت", - "Video Player": "پخش کننده ویدیو", + "Audio Player": "پخش‌کنندهٔ صوت", + "Video Player": "پخش‌کنندهٔ ویدیو", "Play": "پخش", "Pause": "توقف", "Replay": "پخش مجدد", @@ -9,18 +9,18 @@ videojs.addLanguage('fa', { "Remaining Time": "زمان باقی‌مانده", "Stream Type": "نوع استریم", "LIVE": "زنده", - "Seek to live, currently behind live": "پخش زنده، هم اکنون عقب تر از پخش زنده", + "Seek to live, currently behind live": "پخش زنده، هم‌اکنون عقب‌تر از پخش زنده", "Seek to live, currently playing live": "پخش زنده، در حال پخش زنده", - "Loaded": "بارگیری شده", + "Loaded": "بارگیری‌شده", "Progress": "پیشرفت", "Progress Bar": "نوار پیشرفت", "progress bar timing: currentTime={1} duration={2}": "{1} از {2}", "Fullscreen": "تمام‌صفحه", - "Non-Fullscreen": "غیر تمام‌صفحه", - "Mute": "بی صدا", + "Exit Fullscreen": "غیر تمام‌صفحه", + "Mute": "بی‌صدا", "Unmute": "صدادار", "Playback Rate": "سرعت پخش", - "Subtitles": "زیرنویس ها", + "Subtitles": "زیرنویس‌ها", "subtitles off": "بدون زیرنویس", "Captions": "توضیحات", "captions off": "بدون توضیحات", @@ -31,19 +31,19 @@ videojs.addLanguage('fa', { "Volume Level": "سطح صدا", "You aborted the media playback": "شما پخش رسانه را قطع نمودید", "A network error caused the media download to fail part-way.": "وقوع مشکلی در شبکه باعث اختلال در دانلود رسانه شد.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": ".رسانه قابل بارگیری نیست. ممکن است مشکلی در شبکه یا سرور رخ داده باشد یا فرمت رسانه در دستگاه شما پشتیبانی نشود", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "پخش رسانه به علت اشکال در آن یا عدم پشتیبانی مرورگر شما قطع شد.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "رسانه قابل بارگیری نیست. ممکن است مشکلی در شبکه یا سرور رخ داده باشد یا قالب رسانه در دستگاه شما پشتیبانی نشود.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "پخش رسانه به‌علت اشکال در آن یا عدم پشتیبانی مرورگر شما قطع شد.", "No compatible source was found for this media.": "هیچ منبع سازگاری برای پخش این رسانه پیدا نشد.", - "The media is encrypted and we do not have the keys to decrypt it.": "این رسانه رمزنگاری شده است و کلیدهای رمزگشایی آن موجود نیست.", + "The media is encrypted and we do not have the keys to decrypt it.": "این رسانه رمزنگاری شده‌است و کلیدهای رمزگشایی آن موجود نیست.", "Play Video": "پخش ویدیو", "Close": "بستن", "Close Modal Dialog": "بستن پنجره", - "Modal Window": "پنجره محاوره", + "Modal Window": "پنجرهٔ محاوره", "This is a modal window": "این پنجره قابل بستن است", - "This modal can be closed by pressing the Escape key or activating the close button.": "این پنجره با کلید Escape یا دکمه بستن قابل بسته شدن میباشد.", - ", opens captions settings dialog": ", تنظیمات توضیجات را باز میکند", - ", opens subtitles settings dialog": ", تنظیمات زیرنویس را باز میکند", - ", opens descriptions settings dialog": ", تنظیمات توصیفات را باز میکند", + "This modal can be closed by pressing the Escape key or activating the close button.": "این پنجره با کلید Escape یا دکمهٔ بستن قابل بسته‌شدن است.", + ", opens captions settings dialog": "، تنظیمات توضیجات را باز می‌کند", + ", opens subtitles settings dialog": "، تنظیمات زیرنویس را باز می‌کند", + ", opens descriptions settings dialog": "، تنظیمات توصیفات را باز می‌کند", ", selected": "، انتخاب شد", "captions settings": "تنظیمات توضیحات", "subtitles settings": "تنظیمات زیرنویس", @@ -57,33 +57,41 @@ videojs.addLanguage('fa', { "Yellow": "زرد", "Magenta": "ارغوانی", "Cyan": "فیروزه‌ای", - "Background": "پس زمینه", + "Background": "پس‌زمینه", "Window": "پنجره", "Transparent": "شفاف", - "Semi-Transparent": "نیمه شفاف", + "Semi-Transparent": "نیمه‌شفاف", "Opaque": "مات", - "Font Size": "اندازه قلم", - "Text Edge Style": "سبک لبه متن", + "Font Size": "اندازهٔ قلم", + "Text Edge Style": "سبک لبهٔ متن", "None": "هیچ", "Raised": "برجسته", "Depressed": "فرورفته", "Uniform": "یکنواخت", - "Dropshadow": "سایه دار", + "Drop shadow": "سایه‌دار", "Font Family": "نوع قلم", "Proportional Sans-Serif": "Sans-Serif متناسب", - "Monospace Sans-Serif": "Sans-Serif هم عرض", + "Monospace Sans-Serif": "Sans-Serif هم‌عرض", "Proportional Serif": "Serif متناسب", - "Monospace Serif": "Serif هم عرض", + "Monospace Serif": "Serif هم‌عرض", "Casual": "فانتزی", - "Script": "دست خط", + "Script": "دست‌خط", "Small Caps": "حروف بزرگ کوچک", "Reset": "تنظیم مجدد", - "restore all settings to the default values": "بازنشانی همه تنظیمات به مقادیر پیش‌فرض", + "restore all settings to the default values": "بازنشانی همهٔ تنظیمات به مقادیر پیش‌فرض", "Done": "انجام", - "Caption Settings Dialog": "پنجره تنظیمات توضیحات", - "Beginning of dialog window. Escape will cancel and close the window.": "شروع پنجره محاوره‌ای. دکمه Escape عملیات را لغو کرده و پنجره را میبندد.", - "End of dialog window.": "پایان پنجره محاوره‌ای.", + "Caption Settings Dialog": "پنجرهٔ تنظیمات توضیحات", + "Beginning of dialog window. Escape will cancel and close the window.": "شروع پنجرهٔ محاوره‌ای. دکمهٔ Escape عملیات را لغو کرده و پنجره را می‌بندد.", + "End of dialog window.": "پایان پنجرهٔ محاوره‌ای.", "{1} is loading.": "{1} در حال بارگیری است.", "Exit Picture-in-Picture": "خروج از حالت تصویر در تصویر", - "Picture-in-Picture": "تصویر در تصویر" + "Picture-in-Picture": "تصویر در تصویر", + "Skip forward {1} seconds": "{1} ثانیه بعد", + "Skip backward {1} seconds": "{1} ثانیه قبل", + "No content": "بدون محتوا", + "Color": "رنگ", + "Opacity": "شفافیت", + "Text Background": "رنگ پس زمینه", + "Caption Area Background": "رنگ پس زمینه عنوان", + "Playing in Picture-in-Picture": "پخش در حالت تصویر در تصویر" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/fa.json b/js/libs/videojs/lang/fa.json index 0ddd8514..b7f4d66e 100644 --- a/js/libs/videojs/lang/fa.json +++ b/js/libs/videojs/lang/fa.json @@ -1,6 +1,6 @@ { - "Audio Player": "پخش کننده صوت", - "Video Player": "پخش کننده ویدیو", + "Audio Player": "پخش‌کنندهٔ صوت", + "Video Player": "پخش‌کنندهٔ ویدیو", "Play": "پخش", "Pause": "توقف", "Replay": "پخش مجدد", @@ -9,18 +9,18 @@ "Remaining Time": "زمان باقی‌مانده", "Stream Type": "نوع استریم", "LIVE": "زنده", - "Seek to live, currently behind live": "پخش زنده، هم اکنون عقب تر از پخش زنده", + "Seek to live, currently behind live": "پخش زنده، هم‌اکنون عقب‌تر از پخش زنده", "Seek to live, currently playing live": "پخش زنده، در حال پخش زنده", - "Loaded": "بارگیری شده", + "Loaded": "بارگیری‌شده", "Progress": "پیشرفت", "Progress Bar": "نوار پیشرفت", "progress bar timing: currentTime={1} duration={2}": "{1} از {2}", "Fullscreen": "تمام‌صفحه", - "Non-Fullscreen": "غیر تمام‌صفحه", - "Mute": "بی صدا", + "Exit Fullscreen": "غیر تمام‌صفحه", + "Mute": "بی‌صدا", "Unmute": "صدادار", "Playback Rate": "سرعت پخش", - "Subtitles": "زیرنویس ها", + "Subtitles": "زیرنویس‌ها", "subtitles off": "بدون زیرنویس", "Captions": "توضیحات", "captions off": "بدون توضیحات", @@ -31,19 +31,19 @@ "Volume Level": "سطح صدا", "You aborted the media playback": "شما پخش رسانه را قطع نمودید", "A network error caused the media download to fail part-way.": "وقوع مشکلی در شبکه باعث اختلال در دانلود رسانه شد.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": ".رسانه قابل بارگیری نیست. ممکن است مشکلی در شبکه یا سرور رخ داده باشد یا فرمت رسانه در دستگاه شما پشتیبانی نشود", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "پخش رسانه به علت اشکال در آن یا عدم پشتیبانی مرورگر شما قطع شد.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "رسانه قابل بارگیری نیست. ممکن است مشکلی در شبکه یا سرور رخ داده باشد یا قالب رسانه در دستگاه شما پشتیبانی نشود.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "پخش رسانه به‌علت اشکال در آن یا عدم پشتیبانی مرورگر شما قطع شد.", "No compatible source was found for this media.": "هیچ منبع سازگاری برای پخش این رسانه پیدا نشد.", - "The media is encrypted and we do not have the keys to decrypt it.": "این رسانه رمزنگاری شده است و کلیدهای رمزگشایی آن موجود نیست.", + "The media is encrypted and we do not have the keys to decrypt it.": "این رسانه رمزنگاری شده‌است و کلیدهای رمزگشایی آن موجود نیست.", "Play Video": "پخش ویدیو", "Close": "بستن", "Close Modal Dialog": "بستن پنجره", - "Modal Window": "پنجره محاوره", + "Modal Window": "پنجرهٔ محاوره", "This is a modal window": "این پنجره قابل بستن است", - "This modal can be closed by pressing the Escape key or activating the close button.": "این پنجره با کلید Escape یا دکمه بستن قابل بسته شدن میباشد.", - ", opens captions settings dialog": ", تنظیمات توضیجات را باز میکند", - ", opens subtitles settings dialog": ", تنظیمات زیرنویس را باز میکند", - ", opens descriptions settings dialog": ", تنظیمات توصیفات را باز میکند", + "This modal can be closed by pressing the Escape key or activating the close button.": "این پنجره با کلید Escape یا دکمهٔ بستن قابل بسته‌شدن است.", + ", opens captions settings dialog": "، تنظیمات توضیجات را باز می‌کند", + ", opens subtitles settings dialog": "، تنظیمات زیرنویس را باز می‌کند", + ", opens descriptions settings dialog": "، تنظیمات توصیفات را باز می‌کند", ", selected": "، انتخاب شد", "captions settings": "تنظیمات توضیحات", "subtitles settings": "تنظیمات زیرنویس", @@ -57,33 +57,41 @@ "Yellow": "زرد", "Magenta": "ارغوانی", "Cyan": "فیروزه‌ای", - "Background": "پس زمینه", + "Background": "پس‌زمینه", "Window": "پنجره", "Transparent": "شفاف", - "Semi-Transparent": "نیمه شفاف", + "Semi-Transparent": "نیمه‌شفاف", "Opaque": "مات", - "Font Size": "اندازه قلم", - "Text Edge Style": "سبک لبه متن", + "Font Size": "اندازهٔ قلم", + "Text Edge Style": "سبک لبهٔ متن", "None": "هیچ", "Raised": "برجسته", "Depressed": "فرورفته", "Uniform": "یکنواخت", - "Dropshadow": "سایه دار", + "Drop shadow": "سایه‌دار", "Font Family": "نوع قلم", "Proportional Sans-Serif": "Sans-Serif متناسب", - "Monospace Sans-Serif": "Sans-Serif هم عرض", + "Monospace Sans-Serif": "Sans-Serif هم‌عرض", "Proportional Serif": "Serif متناسب", - "Monospace Serif": "Serif هم عرض", + "Monospace Serif": "Serif هم‌عرض", "Casual": "فانتزی", - "Script": "دست خط", + "Script": "دست‌خط", "Small Caps": "حروف بزرگ کوچک", "Reset": "تنظیم مجدد", - "restore all settings to the default values": "بازنشانی همه تنظیمات به مقادیر پیش‌فرض", + "restore all settings to the default values": "بازنشانی همهٔ تنظیمات به مقادیر پیش‌فرض", "Done": "انجام", - "Caption Settings Dialog": "پنجره تنظیمات توضیحات", - "Beginning of dialog window. Escape will cancel and close the window.": "شروع پنجره محاوره‌ای. دکمه Escape عملیات را لغو کرده و پنجره را میبندد.", - "End of dialog window.": "پایان پنجره محاوره‌ای.", + "Caption Settings Dialog": "پنجرهٔ تنظیمات توضیحات", + "Beginning of dialog window. Escape will cancel and close the window.": "شروع پنجرهٔ محاوره‌ای. دکمهٔ Escape عملیات را لغو کرده و پنجره را می‌بندد.", + "End of dialog window.": "پایان پنجرهٔ محاوره‌ای.", "{1} is loading.": "{1} در حال بارگیری است.", "Exit Picture-in-Picture": "خروج از حالت تصویر در تصویر", - "Picture-in-Picture": "تصویر در تصویر" + "Picture-in-Picture": "تصویر در تصویر", + "Skip forward {1} seconds": "{1} ثانیه بعد", + "Skip backward {1} seconds": "{1} ثانیه قبل", + "No content": "بدون محتوا", + "Color": "رنگ", + "Opacity": "شفافیت", + "Text Background": "رنگ پس زمینه", + "Caption Area Background": "رنگ پس زمینه عنوان", + "Playing in Picture-in-Picture": "پخش در حالت تصویر در تصویر" } diff --git a/js/libs/videojs/lang/fi.js b/js/libs/videojs/lang/fi.js index e14fb8c9..95549bb8 100644 --- a/js/libs/videojs/lang/fi.js +++ b/js/libs/videojs/lang/fi.js @@ -9,7 +9,7 @@ videojs.addLanguage('fi', { "Loaded": "Ladattu", "Progress": "Edistyminen", "Fullscreen": "Koko näyttö", - "Non-Fullscreen": "Koko näyttö pois", + "Exit Fullscreen": "Koko näyttö pois", "Mute": "Ääni pois", "Unmute": "Ääni päällä", "Playback Rate": "Toistonopeus", diff --git a/js/libs/videojs/lang/fi.json b/js/libs/videojs/lang/fi.json index 9cd419b0..d9bd4757 100644 --- a/js/libs/videojs/lang/fi.json +++ b/js/libs/videojs/lang/fi.json @@ -9,7 +9,7 @@ "Loaded": "Ladattu", "Progress": "Edistyminen", "Fullscreen": "Koko näyttö", - "Non-Fullscreen": "Koko näyttö pois", + "Exit Fullscreen": "Koko näyttö pois", "Mute": "Ääni pois", "Unmute": "Ääni päällä", "Playback Rate": "Toistonopeus", diff --git a/js/libs/videojs/lang/fr.js b/js/libs/videojs/lang/fr.js index cf5b57ce..b254399b 100644 --- a/js/libs/videojs/lang/fr.js +++ b/js/libs/videojs/lang/fr.js @@ -9,14 +9,16 @@ videojs.addLanguage('fr', { "Remaining Time": "Temps restant", "Stream Type": "Type de flux", "LIVE": "EN DIRECT", + "Seek to live, currently behind live": "Rechercher le direct, actuellement après le direct", + "Seek to live, currently playing live": "Rechercher le direct, le direct actuellement en cours de lecture", "Loaded": "Chargé", "Progress": "Progression", "Progress Bar": "Barre de progression", "progress bar timing: currentTime={1} duration={2}": "{1} de {2}", "Fullscreen": "Plein écran", - "Non-Fullscreen": "Fenêtré", - "Mute": "Sourdine", - "Unmute": "Son activé", + "Exit Fullscreen": "Fenêtré", + "Mute": "Mettre en sourdine", + "Unmute": "Activer le son", "Playback Rate": "Vitesse de lecture", "Subtitles": "Sous-titres", "subtitles off": "Sous-titres désactivés", @@ -66,7 +68,7 @@ videojs.addLanguage('fr', { "Raised": "Élevé", "Depressed": "Enfoncé", "Uniform": "Uniforme", - "Dropshadow": "Ombre portée", + "Drop shadow": "Ombre portée", "Font Family": "Famille de polices", "Proportional Sans-Serif": "Polices à chasse variable sans empattement (Proportional Sans-Serif)", "Monospace Sans-Serif": "Polices à chasse fixe sans empattement (Monospace Sans-Serif)", @@ -80,5 +82,15 @@ videojs.addLanguage('fr', { "Done": "Terminé", "Caption Settings Dialog": "Boîte de dialogue des paramètres des sous-titres transcrits", "Beginning of dialog window. Escape will cancel and close the window.": "Début de la fenêtre de dialogue. La touche d'échappement annulera et fermera la fenêtre.", - "End of dialog window.": "Fin de la fenêtre de dialogue." + "End of dialog window.": "Fin de la fenêtre de dialogue.", + "Exit Picture-in-Picture": "Quitter le mode image dans l'image", + "Picture-in-Picture": "Image dans l'image", + "{1} is loading.": "{1} en cours de chargement.", + "No content": "Aucun contenu", + "Color": "Couleur", + "Opacity": "Opacité", + "Text Background": "Arrière-plan du texte", + "Caption Area Background": "Arrière-plan de la zone de sous-titre", + "Skip backward {1} seconds": "Reculer de {1} secondes", + "Skip forward {1} seconds": "Avancer de {1} secondes" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/fr.json b/js/libs/videojs/lang/fr.json index 8bfeafde..513b64c5 100644 --- a/js/libs/videojs/lang/fr.json +++ b/js/libs/videojs/lang/fr.json @@ -9,14 +9,16 @@ "Remaining Time": "Temps restant", "Stream Type": "Type de flux", "LIVE": "EN DIRECT", + "Seek to live, currently behind live": "Rechercher le direct, actuellement après le direct", + "Seek to live, currently playing live": "Rechercher le direct, le direct actuellement en cours de lecture", "Loaded": "Chargé", "Progress": "Progression", "Progress Bar": "Barre de progression", "progress bar timing: currentTime={1} duration={2}": "{1} de {2}", "Fullscreen": "Plein écran", - "Non-Fullscreen": "Fenêtré", - "Mute": "Sourdine", - "Unmute": "Son activé", + "Exit Fullscreen": "Fenêtré", + "Mute": "Mettre en sourdine", + "Unmute": "Activer le son", "Playback Rate": "Vitesse de lecture", "Subtitles": "Sous-titres", "subtitles off": "Sous-titres désactivés", @@ -66,7 +68,7 @@ "Raised": "Élevé", "Depressed": "Enfoncé", "Uniform": "Uniforme", - "Dropshadow": "Ombre portée", + "Drop shadow": "Ombre portée", "Font Family": "Famille de polices", "Proportional Sans-Serif": "Polices à chasse variable sans empattement (Proportional Sans-Serif)", "Monospace Sans-Serif": "Polices à chasse fixe sans empattement (Monospace Sans-Serif)", @@ -80,5 +82,15 @@ "Done": "Terminé", "Caption Settings Dialog": "Boîte de dialogue des paramètres des sous-titres transcrits", "Beginning of dialog window. Escape will cancel and close the window.": "Début de la fenêtre de dialogue. La touche d'échappement annulera et fermera la fenêtre.", - "End of dialog window.": "Fin de la fenêtre de dialogue." + "End of dialog window.": "Fin de la fenêtre de dialogue.", + "Exit Picture-in-Picture": "Quitter le mode image dans l'image", + "Picture-in-Picture": "Image dans l'image", + "{1} is loading.": "{1} en cours de chargement.", + "No content": "Aucun contenu", + "Color": "Couleur", + "Opacity": "Opacité", + "Text Background": "Arrière-plan du texte", + "Caption Area Background": "Arrière-plan de la zone de sous-titre", + "Skip backward {1} seconds": "Reculer de {1} secondes", + "Skip forward {1} seconds": "Avancer de {1} secondes" } diff --git a/js/libs/videojs/lang/gd.js b/js/libs/videojs/lang/gd.js index 51ba7e77..c0b4ca70 100644 --- a/js/libs/videojs/lang/gd.js +++ b/js/libs/videojs/lang/gd.js @@ -16,7 +16,7 @@ videojs.addLanguage('gd', { "Progress Bar": "Bàr adhartais", "progress bar timing: currentTime={1} duration={2}": "{1} à {2}", "Fullscreen": "Làn-sgrìn", - "Non-Fullscreen": "Fàg modh làn-sgrìn", + "Exit Fullscreen": "Fàg modh làn-sgrìn", "Mute": "Mùch", "Unmute": "Dì-mhùch", "Playback Rate": "Reat na cluiche", @@ -68,7 +68,7 @@ videojs.addLanguage('gd', { "Raised": "Àrdaichte", "Depressed": "Air a bhrùthadh", "Uniform": "Cunbhalach", - "Dropshadow": "Sgàil", + "Drop shadow": "Sgàil", "Font Family": "Teaghlach a’ chrutha-chlò", "Proportional Sans-Serif": "Sans-serif co-rèireach", "Monospace Sans-Serif": "Sans-serif aon-leud", diff --git a/js/libs/videojs/lang/gd.json b/js/libs/videojs/lang/gd.json index 76a598c4..6d068436 100644 --- a/js/libs/videojs/lang/gd.json +++ b/js/libs/videojs/lang/gd.json @@ -16,7 +16,7 @@ "Progress Bar": "Bàr adhartais", "progress bar timing: currentTime={1} duration={2}": "{1} à {2}", "Fullscreen": "Làn-sgrìn", - "Non-Fullscreen": "Fàg modh làn-sgrìn", + "Exit Fullscreen": "Fàg modh làn-sgrìn", "Mute": "Mùch", "Unmute": "Dì-mhùch", "Playback Rate": "Reat na cluiche", @@ -68,7 +68,7 @@ "Raised": "Àrdaichte", "Depressed": "Air a bhrùthadh", "Uniform": "Cunbhalach", - "Dropshadow": "Sgàil", + "Drop shadow": "Sgàil", "Font Family": "Teaghlach a’ chrutha-chlò", "Proportional Sans-Serif": "Sans-serif co-rèireach", "Monospace Sans-Serif": "Sans-serif aon-leud", diff --git a/js/libs/videojs/lang/gl.js b/js/libs/videojs/lang/gl.js index fcef9ed1..afe2cd87 100644 --- a/js/libs/videojs/lang/gl.js +++ b/js/libs/videojs/lang/gl.js @@ -16,7 +16,7 @@ videojs.addLanguage('gl', { "Progress Bar": "Barra de progreso", "progress bar timing: currentTime={1} duration={2}": "{1} de {2}", "Fullscreen": "Pantalla completa", - "Non-Fullscreen": "Xanela", + "Exit Fullscreen": "Xanela", "Mute": "Silenciar", "Unmute": "Son activado", "Playback Rate": "Velocidade de reprodución", @@ -68,7 +68,7 @@ videojs.addLanguage('gl', { "Raised": "Érguida", "Depressed": "Caída", "Uniform": "Uniforme", - "Dropshadow": "Sombra caída", + "Drop shadow": "Sombra caída", "Font Family": "Familia de letras", "Proportional Sans-Serif": "Sans-Serif proporcional", "Monospace Sans-Serif": "Sans-Serif monoespazo (caixa fixa)", diff --git a/js/libs/videojs/lang/gl.json b/js/libs/videojs/lang/gl.json index b777c6c4..9b0d7b12 100644 --- a/js/libs/videojs/lang/gl.json +++ b/js/libs/videojs/lang/gl.json @@ -16,7 +16,7 @@ "Progress Bar": "Barra de progreso", "progress bar timing: currentTime={1} duration={2}": "{1} de {2}", "Fullscreen": "Pantalla completa", - "Non-Fullscreen": "Xanela", + "Exit Fullscreen": "Xanela", "Mute": "Silenciar", "Unmute": "Son activado", "Playback Rate": "Velocidade de reprodución", @@ -68,7 +68,7 @@ "Raised": "Érguida", "Depressed": "Caída", "Uniform": "Uniforme", - "Dropshadow": "Sombra caída", + "Drop shadow": "Sombra caída", "Font Family": "Familia de letras", "Proportional Sans-Serif": "Sans-Serif proporcional", "Monospace Sans-Serif": "Sans-Serif monoespazo (caixa fixa)", diff --git a/js/libs/videojs/lang/he.js b/js/libs/videojs/lang/he.js index bc246895..f2a807fb 100644 --- a/js/libs/videojs/lang/he.js +++ b/js/libs/videojs/lang/he.js @@ -14,7 +14,7 @@ videojs.addLanguage('he', { "Progress Bar": "סרגל התקדמות", "progress bar timing: currentTime={1} duration={2}": "{1} מתוך {2}", "Fullscreen": "מסך מלא", - "Non-Fullscreen": "מסך לא מלא", + "Exit Fullscreen": "מסך לא מלא", "Mute": "השתק", "Unmute": "בטל השתקה", "Playback Rate": "קצב ניגון", @@ -66,7 +66,7 @@ videojs.addLanguage('he', { "Raised": "מורם", "Depressed": "מורד", "Uniform": "אחיד", - "Dropshadow": "הטלת צל", + "Drop shadow": "הטלת צל", "Font Family": "משפחת גופן", "Proportional Sans-Serif": "פרופורציוני וללא תגיות (Proportional Sans-Serif)", "Monospace Sans-Serif": "ברוחב אחיד וללא תגיות (Monospace Sans-Serif)", diff --git a/js/libs/videojs/lang/he.json b/js/libs/videojs/lang/he.json index 7bfb0d56..834bd5ef 100644 --- a/js/libs/videojs/lang/he.json +++ b/js/libs/videojs/lang/he.json @@ -14,7 +14,7 @@ "Progress Bar": "סרגל התקדמות", "progress bar timing: currentTime={1} duration={2}": "{1} מתוך {2}", "Fullscreen": "מסך מלא", - "Non-Fullscreen": "מסך לא מלא", + "Exit Fullscreen": "מסך לא מלא", "Mute": "השתק", "Unmute": "בטל השתקה", "Playback Rate": "קצב ניגון", @@ -66,7 +66,7 @@ "Raised": "מורם", "Depressed": "מורד", "Uniform": "אחיד", - "Dropshadow": "הטלת צל", + "Drop shadow": "הטלת צל", "Font Family": "משפחת גופן", "Proportional Sans-Serif": "פרופורציוני וללא תגיות (Proportional Sans-Serif)", "Monospace Sans-Serif": "ברוחב אחיד וללא תגיות (Monospace Sans-Serif)", diff --git a/js/libs/videojs/lang/hi.js b/js/libs/videojs/lang/hi.js index 87b7d5f2..d6bf0e8f 100644 --- a/js/libs/videojs/lang/hi.js +++ b/js/libs/videojs/lang/hi.js @@ -16,7 +16,7 @@ videojs.addLanguage('hi', { "Progress Bar": "प्रोगेस बार", "progress bar timing: currentTime={1} duration={2}": "{2} में से {1}", "Fullscreen": "फ़ुल स्क्रीन", - "Non-Fullscreen": "फ़ुल स्क्रीन से बाहर निकलें", + "Exit Fullscreen": "फ़ुल स्क्रीन से बाहर निकलें", "Mute": "म्यूट करें", "Unmute": "अनम्यूट करें", "Playback Rate": "चलाने की दर", @@ -67,8 +67,8 @@ videojs.addLanguage('hi', { "None": "कोई नहीं", "Raised": "उठा हुआ", "Depressed": "उदास", - "Uniform": "वर्दी", - "Dropshadow": "परछाई", + "Uniform": "समान", + "Drop shadow": "परछाई", "Font Family": "फॉण्ट परिवार", "Proportional Sans-Serif": "प्रोपोरशनल साँस-सेरिफ", "Monospace Sans-Serif": "मोनोस्पास साँस-सेरिफ", diff --git a/js/libs/videojs/lang/hi.json b/js/libs/videojs/lang/hi.json index 2825f64c..ffe859d5 100644 --- a/js/libs/videojs/lang/hi.json +++ b/js/libs/videojs/lang/hi.json @@ -16,7 +16,7 @@ "Progress Bar": "प्रोगेस बार", "progress bar timing: currentTime={1} duration={2}": "{2} में से {1}", "Fullscreen": "फ़ुल स्क्रीन", - "Non-Fullscreen": "फ़ुल स्क्रीन से बाहर निकलें", + "Exit Fullscreen": "फ़ुल स्क्रीन से बाहर निकलें", "Mute": "म्यूट करें", "Unmute": "अनम्यूट करें", "Playback Rate": "चलाने की दर", @@ -67,8 +67,8 @@ "None": "कोई नहीं", "Raised": "उठा हुआ", "Depressed": "उदास", - "Uniform": "वर्दी", - "Dropshadow": "परछाई", + "Uniform": "समान", + "Drop shadow": "परछाई", "Font Family": "फॉण्ट परिवार", "Proportional Sans-Serif": "प्रोपोरशनल साँस-सेरिफ", "Monospace Sans-Serif": "मोनोस्पास साँस-सेरिफ", diff --git a/js/libs/videojs/lang/hr.js b/js/libs/videojs/lang/hr.js index 2606362a..79a6463a 100644 --- a/js/libs/videojs/lang/hr.js +++ b/js/libs/videojs/lang/hr.js @@ -9,7 +9,7 @@ videojs.addLanguage('hr', { "Loaded": "Učitan", "Progress": "Progres", "Fullscreen": "Puni ekran", - "Non-Fullscreen": "Mali ekran", + "Exit Fullscreen": "Mali ekran", "Mute": "Prigušen", "Unmute": "Ne-prigušen", "Playback Rate": "Stopa reprodukcije", diff --git a/js/libs/videojs/lang/hr.json b/js/libs/videojs/lang/hr.json index 32e1763f..da6b2a76 100644 --- a/js/libs/videojs/lang/hr.json +++ b/js/libs/videojs/lang/hr.json @@ -9,7 +9,7 @@ "Loaded": "Učitan", "Progress": "Progres", "Fullscreen": "Puni ekran", - "Non-Fullscreen": "Mali ekran", + "Exit Fullscreen": "Mali ekran", "Mute": "Prigušen", "Unmute": "Ne-prigušen", "Playback Rate": "Stopa reprodukcije", diff --git a/js/libs/videojs/lang/hu.js b/js/libs/videojs/lang/hu.js index 5b3bc828..57f31b9f 100644 --- a/js/libs/videojs/lang/hu.js +++ b/js/libs/videojs/lang/hu.js @@ -9,7 +9,7 @@ videojs.addLanguage('hu', { "Loaded": "Betöltve", "Progress": "Állapot", "Fullscreen": "Teljes képernyő", - "Non-Fullscreen": "Normál méret", + "Exit Fullscreen": "Normál méret", "Mute": "Némítás", "Unmute": "Némítás kikapcsolva", "Playback Rate": "Lejátszási sebesség", @@ -61,7 +61,7 @@ videojs.addLanguage('hu', { "Text Edge Style": "Szövegél stílus", "This is a modal window": "Ez egy felugró ablak", "Cyan": "Cián", - "Dropshadow": "Árnyék", + "Drop shadow": "Árnyék", "End of dialog window.": "Párbeszédablak vége.", "Progress Bar": "Folyamatjelző sáv", "Beginning of dialog window. Escape will cancel and close the window.": "Párbeszédablak eleje. Az Escape gomb befejezi és bezárja az ablakot.", diff --git a/js/libs/videojs/lang/hu.json b/js/libs/videojs/lang/hu.json index 6362af7a..d9c39482 100644 --- a/js/libs/videojs/lang/hu.json +++ b/js/libs/videojs/lang/hu.json @@ -9,7 +9,7 @@ "Loaded": "Betöltve", "Progress": "Állapot", "Fullscreen": "Teljes képernyő", - "Non-Fullscreen": "Normál méret", + "Exit Fullscreen": "Normál méret", "Mute": "Némítás", "Unmute": "Némítás kikapcsolva", "Playback Rate": "Lejátszási sebesség", @@ -61,7 +61,7 @@ "Text Edge Style": "Szövegél stílus", "This is a modal window": "Ez egy felugró ablak", "Cyan": "Cián", - "Dropshadow": "Árnyék", + "Drop shadow": "Árnyék", "End of dialog window.": "Párbeszédablak vége.", "Progress Bar": "Folyamatjelző sáv", "Beginning of dialog window. Escape will cancel and close the window.": "Párbeszédablak eleje. Az Escape gomb befejezi és bezárja az ablakot.", diff --git a/js/libs/videojs/lang/it.js b/js/libs/videojs/lang/it.js index 18a1c4c1..dfea383f 100644 --- a/js/libs/videojs/lang/it.js +++ b/js/libs/videojs/lang/it.js @@ -1,26 +1,89 @@ videojs.addLanguage('it', { + "Audio Player": "Lettore audio", + "Video Player": "Lettore video", "Play": "Play", "Pause": "Pausa", + "Replay": "Replay", "Current Time": "Orario attuale", "Duration": "Durata", "Remaining Time": "Tempo rimanente", - "Stream Type": "Tipo del Streaming", + "Stream Type": "Tipo di streaming", "LIVE": "LIVE", "Loaded": "Caricato", "Progress": "Stato", + "Progress Bar": "Barra di avanzamento", + "progress bar timing: currentTime={1} duration={2}": "{1} di {2}", "Fullscreen": "Schermo intero", - "Non-Fullscreen": "Chiudi schermo intero", - "Mute": "Muto", - "Unmute": "Audio", - "Playback Rate": "Tasso di riproduzione", + "Exit Fullscreen": "Chiudi Schermo intero", + "Mute": "Disattiva l’audio", + "Unmute": "Attiva l’audio", + "Playback Rate": "Velocità di riproduzione", "Subtitles": "Sottotitoli", "subtitles off": "Senza sottotitoli", - "Captions": "Sottotitoli non udenti", - "captions off": "Senza sottotitoli non udenti", + "Captions": "Didascalie", + "captions off": "Senza didascalie", "Chapters": "Capitolo", - "You aborted the media playback": "La riproduzione del filmato è stata interrotta.", - "A network error caused the media download to fail part-way.": "Il download del filmato è stato interrotto a causa di un problema rete.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Il filmato non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "La riproduzione del filmato è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.", - "No compatible source was found for this media.": "Non ci sono fonti compatibili per questo filmato." + "Descriptions": "Descrizioni", + "descriptions off": "Descrizioni disattivate", + "Audio Track": "Traccia audio", + "Volume Level": "Livello del volume", + "You aborted the media playback": "La riproduzione del contenuto multimediale è stata interrotta.", + "A network error caused the media download to fail part-way.": "Il download del contenuto multimediale è stato interrotto a causa di un problema rete.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Il contenuto multimediale non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "La riproduzione del contenuto multimediale è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.", + "No compatible source was found for this media.": "Non ci sono fonti compatibili per questo contenuto multimediale.", + "The media is encrypted and we do not have the keys to decrypt it.": "Il contenuto multimediale è criptato e non disponiamo delle chiavi per decifrarlo.", + "Play Video": "Riproduci il video", + "Close": "Chiudi", + "Close Modal Dialog": "Chiudi la finestra di dialogo", + "Modal Window": "Finestra di dialogo", + "This is a modal window": "Questa è una finestra di dialogo", + "This modal can be closed by pressing the Escape key or activating the close button.": "Questa finestra di dialogo può essere chiusa premendo sul tasto Esc o attivando il pulsante di chiusura.", + ", opens captions settings dialog": ", aprire le impostazioni delle didascalie", + ", opens subtitles settings dialog": ", aprire le impostazioni dei sottotitoli", + ", opens descriptions settings dialog": ", aprire le impostazioni delle descrizioni", + ", selected": ", selezionato", + "captions settings": "Impostazioni didascalie", + "subtitles settings": "Impostazioni sottotitoli", + "descriptions settings": "Impostazioni descrizioni", + "Text": "Testo", + "White": "Bianco", + "Black": "Nero", + "Red": "Rosso", + "Green": "Verde", + "Blue": "Blu", + "Yellow": "Giallo", + "Magenta": "Magenta", + "Cyan": "Ciano", + "Background": "Sfondo", + "Window": "Finestra", + "Transparent": "Trasparente", + "Semi-Transparent": "Semi-Trasparente", + "Opaque": "Opaco", + "Font Size": "Dimensione dei caratteri", + "Text Edge Style": "Stile dei bordi del testo", + "None": "Nessuno", + "Uniform": "Uniforme", + "Drop shadow": "Ombra", + "Font Family": "Carattere", + "Proportional Sans-Serif": "Sans-Serif proporzionale", + "Monospace Sans-Serif": "Sans-Serif monospaziato", + "Proportional Serif": "Serif proporzionale", + "Monospace Serif": "Serif monospaziato", + "Small Caps": "Maiuscoletto", + "Reset": "Reinizializza", + "restore all settings to the default values": "Ripristina i valori predefiniti per tutti i parametri", + "Done": "Fatto", + "Caption Settings Dialog": "Finestra di dialogo dei parametri della trascrizione dei sottotitoli", + "Beginning of dialog window. Escape will cancel and close the window.": "Inizio della finestra di dialogo. Il tasto Esc annullerà l’operazione e chiuderà la finestra.", + "End of dialog window.": "Fine della finestra di dialogo.", + "{1} is loading.": "{1} in fase di caricamento.", + "Exit Picture-in-Picture": "Esci dalla modalità Picture-in-Picture", + "Picture-in-Picture": "Picture-in-Picture", + "Color": "Colore", + "Opacity": "Opacità", + "Text Background": "Sfondo testo", + "Caption Area Background": "Sfondo area sottotitoli", + "Skip forward {1} seconds": "Avanti {1} secondi", + "Skip backward {1} seconds": "Indietro {1} secondi" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/it.json b/js/libs/videojs/lang/it.json index 19f5a785..8091ce02 100644 --- a/js/libs/videojs/lang/it.json +++ b/js/libs/videojs/lang/it.json @@ -1,26 +1,93 @@ { + "Audio Player": "Lettore audio", + "Video Player": "Lettore video", "Play": "Play", "Pause": "Pausa", + "Replay": "Replay", "Current Time": "Orario attuale", "Duration": "Durata", "Remaining Time": "Tempo rimanente", - "Stream Type": "Tipo del Streaming", + "Stream Type": "Tipo di streaming", "LIVE": "LIVE", "Loaded": "Caricato", "Progress": "Stato", + "Progress Bar": "Barra di avanzamento", + "progress bar timing: currentTime={1} duration={2}": "{1} di {2}", "Fullscreen": "Schermo intero", - "Non-Fullscreen": "Chiudi schermo intero", - "Mute": "Muto", - "Unmute": "Audio", - "Playback Rate": "Tasso di riproduzione", + "Exit Fullscreen": "Chiudi Schermo intero", + "Mute": "Disattiva l’audio", + "Unmute": "Attiva l’audio", + "Playback Rate": "Velocità di riproduzione", "Subtitles": "Sottotitoli", "subtitles off": "Senza sottotitoli", - "Captions": "Sottotitoli non udenti", - "captions off": "Senza sottotitoli non udenti", + "Captions": "Didascalie", + "captions off": "Senza didascalie", "Chapters": "Capitolo", - "You aborted the media playback": "La riproduzione del filmato è stata interrotta.", - "A network error caused the media download to fail part-way.": "Il download del filmato è stato interrotto a causa di un problema rete.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Il filmato non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "La riproduzione del filmato è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.", - "No compatible source was found for this media.": "Non ci sono fonti compatibili per questo filmato." + "Descriptions": "Descrizioni", + "descriptions off": "Descrizioni disattivate", + "Audio Track": "Traccia audio", + "Volume Level": "Livello del volume", + "You aborted the media playback": "La riproduzione del contenuto multimediale è stata interrotta.", + "A network error caused the media download to fail part-way.": "Il download del contenuto multimediale è stato interrotto a causa di un problema rete.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": + "Il contenuto multimediale non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": + "La riproduzione del contenuto multimediale è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.", + "No compatible source was found for this media.": "Non ci sono fonti compatibili per questo contenuto multimediale.", + "The media is encrypted and we do not have the keys to decrypt it.": "Il contenuto multimediale è criptato e non disponiamo delle chiavi per decifrarlo.", + "Play Video": "Riproduci il video", + "Close": "Chiudi", + "Close Modal Dialog": "Chiudi la finestra di dialogo", + "Modal Window": "Finestra di dialogo", + "This is a modal window": "Questa è una finestra di dialogo", + "This modal can be closed by pressing the Escape key or activating the close button.": + "Questa finestra di dialogo può essere chiusa premendo sul tasto Esc o attivando il pulsante di chiusura.", + ", opens captions settings dialog": ", aprire le impostazioni delle didascalie", + ", opens subtitles settings dialog": ", aprire le impostazioni dei sottotitoli", + ", opens descriptions settings dialog": ", aprire le impostazioni delle descrizioni", + ", selected": ", selezionato", + "captions settings": "Impostazioni didascalie", + "subtitles settings": "Impostazioni sottotitoli", + "descriptions settings": "Impostazioni descrizioni", + "Text": "Testo", + "White": "Bianco", + "Black": "Nero", + "Red": "Rosso", + "Green": "Verde", + "Blue": "Blu", + "Yellow": "Giallo", + "Magenta": "Magenta", + "Cyan": "Ciano", + "Background": "Sfondo", + "Window": "Finestra", + "Transparent": "Trasparente", + "Semi-Transparent": "Semi-Trasparente", + "Opaque": "Opaco", + "Font Size": "Dimensione dei caratteri", + "Text Edge Style": "Stile dei bordi del testo", + "None": "Nessuno", + "Uniform": "Uniforme", + "Drop shadow": "Ombra", + "Font Family": "Carattere", + "Proportional Sans-Serif": "Sans-Serif proporzionale", + "Monospace Sans-Serif": "Sans-Serif monospaziato", + "Proportional Serif": "Serif proporzionale", + "Monospace Serif": "Serif monospaziato", + "Small Caps": "Maiuscoletto", + "Reset": "Reinizializza", + "restore all settings to the default values": "Ripristina i valori predefiniti per tutti i parametri", + "Done": "Fatto", + "Caption Settings Dialog": "Finestra di dialogo dei parametri della trascrizione dei sottotitoli", + "Beginning of dialog window. Escape will cancel and close the window.": + "Inizio della finestra di dialogo. Il tasto Esc annullerà l’operazione e chiuderà la finestra.", + "End of dialog window.": "Fine della finestra di dialogo.", + "{1} is loading.": "{1} in fase di caricamento.", + "Exit Picture-in-Picture": "Esci dalla modalità Picture-in-Picture", + "Picture-in-Picture": "Picture-in-Picture", + "Color": "Colore", + "Opacity": "Opacità", + "Text Background": "Sfondo testo", + "Caption Area Background": "Sfondo area sottotitoli", + "Skip forward {1} seconds": "Avanti {1} secondi", + "Skip backward {1} seconds": "Indietro {1} secondi" } diff --git a/js/libs/videojs/lang/ja.js b/js/libs/videojs/lang/ja.js index 7d71cd10..a306a748 100644 --- a/js/libs/videojs/lang/ja.js +++ b/js/libs/videojs/lang/ja.js @@ -1,26 +1,96 @@ videojs.addLanguage('ja', { + "Audio Player": "オーディオプレイヤー", + "Video Player": "ビデオプレイヤー", "Play": "再生", "Pause": "一時停止", + "Replay": "もう一度見る", "Current Time": "現在の時間", "Duration": "長さ", "Remaining Time": "残りの時間", "Stream Type": "ストリームの種類", "LIVE": "ライブ", + "Seek to live, currently behind live": "ライブまで再生位置を指定、現在ライブが遅れています。", + "Seek to live, currently playing live": "ライブまで再生位置を指定、現在ライブ中。", "Loaded": "ロード済み", "Progress": "進行状況", + "Progress Bar": "シークバー", + "progress bar timing: currentTime={1} duration={2}": "{2}の{1}", "Fullscreen": "フルスクリーン", - "Non-Fullscreen": "フルスクリーン以外", + "Exit Fullscreen": "フルスクリーン以外", "Mute": "ミュート", - "Unmute": "ミュート解除", + "Unmute": "サウンドをオン", "Playback Rate": "再生レート", "Subtitles": "サブタイトル", "subtitles off": "サブタイトル オフ", "Captions": "キャプション", "captions off": "キャプション オフ", "Chapters": "チャプター", + "Descriptions": "ディスクリプション", + "descriptions off": "ディスクリプションオフ", + "Audio Track": "音声トラック", + "Volume Level": "ボリュームレベル", "You aborted the media playback": "動画再生を中止しました", "A network error caused the media download to fail part-way.": "ネットワーク エラーにより動画のダウンロードが途中で失敗しました", "The media could not be loaded, either because the server or network failed or because the format is not supported.": "サーバーまたはネットワークのエラー、またはフォーマットがサポートされていないため、動画をロードできませんでした", "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "破損の問題、またはお使いのブラウザがサポートしていない機能が動画に使用されていたため、動画の再生が中止されました", - "No compatible source was found for this media.": "この動画に対して互換性のあるソースが見つかりませんでした" + "No compatible source was found for this media.": "この動画に対して互換性のあるソースが見つかりませんでした", + "The media is encrypted and we do not have the keys to decrypt it.": "メディアは暗号化されており、解読するためのキーがありません。", + "Play Video": "ビデオを再生する", + "Close": "閉じる", + "Close Modal Dialog": "ダイアログボックスを閉じる", + "Modal Window": "ダイアログボックス", + "This is a modal window": "これはダイアログボックスです", + "This modal can be closed by pressing the Escape key or activating the close button.": "このダイアログボックスは、Escキーを押すか、閉じるボタンを押して閉じることができま", + ", opens captions settings dialog": ", 書き起こし字幕の設定を開く", + ", opens subtitles settings dialog": ", 字幕の設定を開く", + ", opens descriptions settings dialog": ", ディスクリプションの設定を開く", + ", selected": ", 選択済み", + "captions settings": "書き起こし字幕の設定", + "subtitles settings": "字幕の設定", + "descriptions settings": "ディスクリプションの設定", + "Text": "テキスト", + "White": "白", + "Black": "黒", + "Red": "赤", + "Green": "緑", + "Blue": "青", + "Yellow": "黄", + "Magenta": "赤紫", + "Cyan": "シアン", + "Background": "背景", + "Window": "ウィンドウ", + "Transparent": "透明", + "Semi-Transparent": "半透明", + "Opaque": "不透明", + "Font Size": "文字サイズ", + "Text Edge Style": "テキストのアウトラインのスタイル", + "None": "なし", + "Raised": "浮き出し", + "Depressed": "浮き彫り", + "Uniform": "均一", + "Drop shadow": "影付き", + "Font Family": "フォントの種類", + "Proportional Sans-Serif": "セリフなし可変幅フォント", + "Monospace Sans-Serif": "セリフなし等幅フォント", + "Proportional Serif": "セリフあり可変幅フォント", + "Monospace Serif": "セリフあり等幅フォント", + "Casual": "カジュアル", + "Script": "スクリプト", + "Small Caps": "スモールキャピタル", + "Reset": "リセット", + "restore all settings to the default values": "すべての設定をデフォルト値に戻す", + "Done": "終了", + "Caption Settings Dialog": "書き起こし字幕設定ダイアログ", + "Beginning of dialog window. Escape will cancel and close the window.": "ダイアログボックスの開始。Escキーでキャンセルしてウィンドウを閉じます。", + "End of dialog window.": "ダイアログボックスの終了", + "{1} is loading.": "{1}は読み込み中です。", + "Exit Picture-in-Picture": "ピクチャーインピクチャー機能の終了", + "Picture-in-Picture": "ピクチャーインピクチャー", + "No content": "コンテンツなし", + "Color": "色", + "Opacity": "不透明度", + "Text Background": "テキスト背景", + "Caption Area Background": "キャプション領域背景", + "Skip forward {1} seconds": "{1}秒進む", + "Skip backward {1} seconds": "{1}秒戻る" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/ja.json b/js/libs/videojs/lang/ja.json index df5b6cf0..116fb13f 100644 --- a/js/libs/videojs/lang/ja.json +++ b/js/libs/videojs/lang/ja.json @@ -1,26 +1,96 @@ { + "Audio Player": "オーディオプレイヤー", + "Video Player": "ビデオプレイヤー", "Play": "再生", "Pause": "一時停止", + "Replay": "もう一度見る", "Current Time": "現在の時間", "Duration": "長さ", "Remaining Time": "残りの時間", "Stream Type": "ストリームの種類", "LIVE": "ライブ", + "Seek to live, currently behind live": "ライブまで再生位置を指定、現在ライブが遅れています。", + "Seek to live, currently playing live": "ライブまで再生位置を指定、現在ライブ中。", "Loaded": "ロード済み", "Progress": "進行状況", + "Progress Bar": "シークバー", + "progress bar timing: currentTime={1} duration={2}": "{2}の{1}", "Fullscreen": "フルスクリーン", - "Non-Fullscreen": "フルスクリーン以外", + "Exit Fullscreen": "フルスクリーン以外", "Mute": "ミュート", - "Unmute": "ミュート解除", + "Unmute": "サウンドをオン", "Playback Rate": "再生レート", "Subtitles": "サブタイトル", "subtitles off": "サブタイトル オフ", "Captions": "キャプション", "captions off": "キャプション オフ", "Chapters": "チャプター", + "Descriptions": "ディスクリプション", + "descriptions off": "ディスクリプションオフ", + "Audio Track": "音声トラック", + "Volume Level": "ボリュームレベル", "You aborted the media playback": "動画再生を中止しました", "A network error caused the media download to fail part-way.": "ネットワーク エラーにより動画のダウンロードが途中で失敗しました", "The media could not be loaded, either because the server or network failed or because the format is not supported.": "サーバーまたはネットワークのエラー、またはフォーマットがサポートされていないため、動画をロードできませんでした", "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "破損の問題、またはお使いのブラウザがサポートしていない機能が動画に使用されていたため、動画の再生が中止されました", - "No compatible source was found for this media.": "この動画に対して互換性のあるソースが見つかりませんでした" + "No compatible source was found for this media.": "この動画に対して互換性のあるソースが見つかりませんでした", + "The media is encrypted and we do not have the keys to decrypt it.": "メディアは暗号化されており、解読するためのキーがありません。", + "Play Video": "ビデオを再生する", + "Close": "閉じる", + "Close Modal Dialog": "ダイアログボックスを閉じる", + "Modal Window": "ダイアログボックス", + "This is a modal window": "これはダイアログボックスです", + "This modal can be closed by pressing the Escape key or activating the close button.": "このダイアログボックスは、Escキーを押すか、閉じるボタンを押して閉じることができま", + ", opens captions settings dialog": ", 書き起こし字幕の設定を開く", + ", opens subtitles settings dialog": ", 字幕の設定を開く", + ", opens descriptions settings dialog": ", ディスクリプションの設定を開く", + ", selected": ", 選択済み", + "captions settings": "書き起こし字幕の設定", + "subtitles settings": "字幕の設定", + "descriptions settings": "ディスクリプションの設定", + "Text": "テキスト", + "White": "白", + "Black": "黒", + "Red": "赤", + "Green": "緑", + "Blue": "青", + "Yellow": "黄", + "Magenta": "赤紫", + "Cyan": "シアン", + "Background": "背景", + "Window": "ウィンドウ", + "Transparent": "透明", + "Semi-Transparent": "半透明", + "Opaque": "不透明", + "Font Size": "文字サイズ", + "Text Edge Style": "テキストのアウトラインのスタイル", + "None": "なし", + "Raised": "浮き出し", + "Depressed": "浮き彫り", + "Uniform": "均一", + "Drop shadow": "影付き", + "Font Family": "フォントの種類", + "Proportional Sans-Serif": "セリフなし可変幅フォント", + "Monospace Sans-Serif": "セリフなし等幅フォント", + "Proportional Serif": "セリフあり可変幅フォント", + "Monospace Serif": "セリフあり等幅フォント", + "Casual": "カジュアル", + "Script": "スクリプト", + "Small Caps": "スモールキャピタル", + "Reset": "リセット", + "restore all settings to the default values": "すべての設定をデフォルト値に戻す", + "Done": "終了", + "Caption Settings Dialog": "書き起こし字幕設定ダイアログ", + "Beginning of dialog window. Escape will cancel and close the window.": "ダイアログボックスの開始。Escキーでキャンセルしてウィンドウを閉じます。", + "End of dialog window.": "ダイアログボックスの終了", + "{1} is loading.": "{1}は読み込み中です。", + "Exit Picture-in-Picture": "ピクチャーインピクチャー機能の終了", + "Picture-in-Picture": "ピクチャーインピクチャー", + "No content": "コンテンツなし", + "Color": "色", + "Opacity": "不透明度", + "Text Background": "テキスト背景", + "Caption Area Background": "キャプション領域背景", + "Skip forward {1} seconds": "{1}秒進む", + "Skip backward {1} seconds": "{1}秒戻る" } diff --git a/js/libs/videojs/lang/ko.js b/js/libs/videojs/lang/ko.js index 74048c9b..efe05675 100644 --- a/js/libs/videojs/lang/ko.js +++ b/js/libs/videojs/lang/ko.js @@ -1,26 +1,94 @@ videojs.addLanguage('ko', { + "Audio Player": "오디오 플레이어", + "Video Player": "비디오 플레이어", "Play": "재생", "Pause": "일시중지", + "Replay": "다시 재생", "Current Time": "현재 시간", "Duration": "지정 기간", "Remaining Time": "남은 시간", "Stream Type": "스트리밍 유형", "LIVE": "라이브", + "Seek to live, currently behind live": "Seek to Live, 현재 생중계보다 뒤처짐", + "Seek to live, currently playing live": "Seek to Live, 현재 생중계 스트리밍 중", "Loaded": "로드됨", "Progress": "진행", + "Progress Bar": "진행 표시줄", + "progress bar timing: currentTime={1} duration={2}": "{2} 중 {1}", "Fullscreen": "전체 화면", - "Non-Fullscreen": "전체 화면 해제", + "Exit Fullscreen": "전체 화면 해제", "Mute": "음소거", - "Unmute": "음소거 해제", - "Playback Rate": "재생 비율", + "Unmute": "소리 활성화하기", + "Playback Rate": "재생 속도", "Subtitles": "서브타이틀", "subtitles off": "서브타이틀 끄기", "Captions": "자막", "captions off": "자막 끄기", "Chapters": "챕터", + "Descriptions": "제품 설명", + "descriptions off": "제품 설명 끄기", + "Audio Track": "오디오 트랙", + "Volume Level": "볼륨 레벨", "You aborted the media playback": "비디오 재생을 취소했습니다.", "A network error caused the media download to fail part-way.": "네트워크 오류로 인하여 비디오 일부를 다운로드하지 못 했습니다.", "The media could not be loaded, either because the server or network failed or because the format is not supported.": "비디오를 로드할 수 없습니다. 서버 혹은 네트워크 오류 때문이거나 지원되지 않는 형식 때문일 수 있습니다.", "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "비디오 재생이 취소됐습니다. 비디오가 손상되었거나 비디오가 사용하는 기능을 브라우저에서 지원하지 않는 것 같습니다.", - "No compatible source was found for this media.": "비디오에 호환되지 않는 소스가 있습니다." + "No compatible source was found for this media.": "비디오에 호환되지 않는 소스가 있습니다.", + "The media is encrypted and we do not have the keys to decrypt it.": "미디어는 암호화되어 있으며 이를 해독할 키를 갖고 있지 않습니다.", + "Play Video": "영상 재생", + "Close": "닫기", + "Close Modal Dialog": "대화 상자 닫기", + "Modal Window": "모달 창", + "This is a modal window": "모달 창입니다", + "This modal can be closed by pressing the Escape key or activating the close button.": "이 모달은 Esc 키를 누르거나 닫기 버튼을 활성화하여 닫을 수 있습니다.", + ", opens captions settings dialog": ", 캡션 설정 대화 상자가 열립니다", + ", opens subtitles settings dialog": ", 자막 설정 대화 상자가 열립니다", + ", opens descriptions settings dialog": ", 설명 설정 대화 상자가 열립니다", + ", selected": ", 선택됨", + "captions settings": "캡션 설정", + "subtitles settings": "자막 설정", + "descriptions settings": "설명 설정", + "Text": "텍스트", + "White": "화이트", + "Black": "블랙", + "Red": "레드", + "Green": "그린", + "Blue": "블루", + "Yellow": "옐로우", + "Magenta": "마젠타", + "Cyan": "씨엉", + "Background": "배경", + "Window": "창", + "Transparent": "투명", + "Semi-Transparent": "반투명", + "Opaque": "불투명", + "Font Size": "폰트 크기", + "Text Edge Style": "텍스트 가장자리 스타일", + "None": "없음", + "Raised": "글자 위치 올림", + "Depressed": "글자 위치 내림", + "Uniform": "균일", + "Drop shadow": "그림자 효과 넣기", + "Font Family": "폰트 모음", + "Proportional Sans-Serif": "비례 산세리프체", + "Monospace Sans-Serif": "고정폭 산세리프체", + "Proportional Serif": "비례 세리프체", + "Monospace Serif": "고정폭 세리프체", + "Casual": "캐주얼", + "Script": "스크립트", + "Small Caps": "소문자", + "Reset": "리셋", + "restore all settings to the default values": "모든 설정을 기본값으로 복원", + "Done": "완료", + "Caption Settings Dialog": "캡션 설정 대화 상자", + "Beginning of dialog window. Escape will cancel and close the window.": "대화창 시작. Esc 키를 누르면 취소되고 창이 닫힙니다.", + "End of dialog window.": "대화창 종료", + "{1} is loading.": "{1}이(가) 로딩 중입니다.", + "Exit Picture-in-Picture": "Picture-in-Picture 종료", + "Picture-in-Picture": "Picture-in-Picture", + "No content": "콘텐츠 없음", + "Color": "색상", + "Opacity": "투명도", + "Text Background": "텍스트 배경", + "Caption Area Background": "자막 배경" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/ko.json b/js/libs/videojs/lang/ko.json index 879edaff..d7700b4b 100644 --- a/js/libs/videojs/lang/ko.json +++ b/js/libs/videojs/lang/ko.json @@ -1,26 +1,94 @@ { + "Audio Player": "오디오 플레이어", + "Video Player": "비디오 플레이어", "Play": "재생", "Pause": "일시중지", + "Replay": "다시 재생", "Current Time": "현재 시간", "Duration": "지정 기간", "Remaining Time": "남은 시간", "Stream Type": "스트리밍 유형", "LIVE": "라이브", + "Seek to live, currently behind live": "Seek to Live, 현재 생중계보다 뒤처짐", + "Seek to live, currently playing live": "Seek to Live, 현재 생중계 스트리밍 중", "Loaded": "로드됨", "Progress": "진행", + "Progress Bar": "진행 표시줄", + "progress bar timing: currentTime={1} duration={2}": "{2} 중 {1}", "Fullscreen": "전체 화면", - "Non-Fullscreen": "전체 화면 해제", + "Exit Fullscreen": "전체 화면 해제", "Mute": "음소거", - "Unmute": "음소거 해제", - "Playback Rate": "재생 비율", + "Unmute": "소리 활성화하기", + "Playback Rate": "재생 속도", "Subtitles": "서브타이틀", "subtitles off": "서브타이틀 끄기", "Captions": "자막", "captions off": "자막 끄기", "Chapters": "챕터", + "Descriptions": "제품 설명", + "descriptions off": "제품 설명 끄기", + "Audio Track": "오디오 트랙", + "Volume Level": "볼륨 레벨", "You aborted the media playback": "비디오 재생을 취소했습니다.", "A network error caused the media download to fail part-way.": "네트워크 오류로 인하여 비디오 일부를 다운로드하지 못 했습니다.", "The media could not be loaded, either because the server or network failed or because the format is not supported.": "비디오를 로드할 수 없습니다. 서버 혹은 네트워크 오류 때문이거나 지원되지 않는 형식 때문일 수 있습니다.", "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "비디오 재생이 취소됐습니다. 비디오가 손상되었거나 비디오가 사용하는 기능을 브라우저에서 지원하지 않는 것 같습니다.", - "No compatible source was found for this media.": "비디오에 호환되지 않는 소스가 있습니다." + "No compatible source was found for this media.": "비디오에 호환되지 않는 소스가 있습니다.", + "The media is encrypted and we do not have the keys to decrypt it.": "미디어는 암호화되어 있으며 이를 해독할 키를 갖고 있지 않습니다.", + "Play Video": "영상 재생", + "Close": "닫기", + "Close Modal Dialog": "대화 상자 닫기", + "Modal Window": "모달 창", + "This is a modal window": "모달 창입니다", + "This modal can be closed by pressing the Escape key or activating the close button.": "이 모달은 Esc 키를 누르거나 닫기 버튼을 활성화하여 닫을 수 있습니다.", + ", opens captions settings dialog": ", 캡션 설정 대화 상자가 열립니다", + ", opens subtitles settings dialog": ", 자막 설정 대화 상자가 열립니다", + ", opens descriptions settings dialog": ", 설명 설정 대화 상자가 열립니다", + ", selected": ", 선택됨", + "captions settings": "캡션 설정", + "subtitles settings": "자막 설정", + "descriptions settings": "설명 설정", + "Text": "텍스트", + "White": "화이트", + "Black": "블랙", + "Red": "레드", + "Green": "그린", + "Blue": "블루", + "Yellow": "옐로우", + "Magenta": "마젠타", + "Cyan": "씨엉", + "Background": "배경", + "Window": "창", + "Transparent": "투명", + "Semi-Transparent": "반투명", + "Opaque": "불투명", + "Font Size": "폰트 크기", + "Text Edge Style": "텍스트 가장자리 스타일", + "None": "없음", + "Raised": "글자 위치 올림", + "Depressed": "글자 위치 내림", + "Uniform": "균일", + "Drop shadow": "그림자 효과 넣기", + "Font Family": "폰트 모음", + "Proportional Sans-Serif": "비례 산세리프체", + "Monospace Sans-Serif": "고정폭 산세리프체", + "Proportional Serif": "비례 세리프체", + "Monospace Serif": "고정폭 세리프체", + "Casual": "캐주얼", + "Script": "스크립트", + "Small Caps": "소문자", + "Reset": "리셋", + "restore all settings to the default values": "모든 설정을 기본값으로 복원", + "Done": "완료", + "Caption Settings Dialog": "캡션 설정 대화 상자", + "Beginning of dialog window. Escape will cancel and close the window.": "대화창 시작. Esc 키를 누르면 취소되고 창이 닫힙니다.", + "End of dialog window.": "대화창 종료", + "{1} is loading.": "{1}이(가) 로딩 중입니다.", + "Exit Picture-in-Picture": "Picture-in-Picture 종료", + "Picture-in-Picture": "Picture-in-Picture", + "No content": "콘텐츠 없음", + "Color": "색상", + "Opacity": "투명도", + "Text Background": "텍스트 배경", + "Caption Area Background": "자막 배경" } diff --git a/js/libs/videojs/lang/lv.js b/js/libs/videojs/lang/lv.js new file mode 100644 index 00000000..1cf82ab0 --- /dev/null +++ b/js/libs/videojs/lang/lv.js @@ -0,0 +1,91 @@ +videojs.addLanguage('lv', { + "Audio Player": "Audio atskaņotājs", + "Video Player": "Video atskaņotājs", + "Play": "Atskaņot", + "Pause": "Pauzēt", + "Replay": "Atkārtot", + "Current Time": "Esošais laiks", + "Duration": "Ilgums", + "Remaining Time": "Atlikušais laiks", + "Stream Type": "Straumes veids", + "LIVE": "LIVE", + "Seek to live, currently behind live": "Pāriet uz tiešraidi", + "Seek to live, currently playing live": "Pāriet uz tiešraidi", + "Loaded": "Ielādēts", + "Progress": "Progress", + "Progress Bar": "Progresa josla", + "progress bar timing: currentTime={1} duration={2}": "{1} no {2}", + "Fullscreen": "Pilnekrāna režīms", + "Exit Fullscreen": "Iziet no pilnekrāna režīma", + "Mute": "Izslēgt skaņu", + "Unmute": "Ieslēgt skaņu", + "Playback Rate": "Atskaņošanas ātrums", + "Subtitles": "Subtitri", + "subtitles off": "Izslēgt subtitrus", + "Captions": "Paraksti", + "captions off": "Izslēgt parakstus", + "Chapters": "Temati", + "Descriptions": "Apraksti", + "descriptions off": "Izslēgt aprakstus", + "Audio Track": "Audio celiņš", + "Volume Level": "Skaļums", + "You aborted the media playback": "Atskaņošana atcelta", + "A network error caused the media download to fail part-way.": "Tīkla kļūdas dēļ, multivides lejupielāde neizdevās.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Neizdevās ielādēt multividi, iespējams severa, vai tīkla kļūmes dēļ, vai neatbalstīta formāta dēļ.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Atskaņošana tika pārtraukta tīkla kļūmes dēļ vai pārlūkprogrammas iespēju trūkuma dēļ.", + "No compatible source was found for this media.": "Netika atrasts atbilstošs multivides avots.", + "The media is encrypted and we do not have the keys to decrypt it.": "Multividi nevar atskaņot, jo tas ir kriptēts un nav pieejama dekriptēšanas atslēga.", + "Play Video": "Atskaņot video", + "Close": "Aizvērt", + "Close Modal Dialog": "Aizvērt logu", + "Modal Window": "Logs", + "This is a modal window": "Logs", + "This modal can be closed by pressing the Escape key or activating the close button.": "Šo logu var aizvērt, nospiežot uz aizvēršanas pogas vai taustiņa ESC.", + ", opens captions settings dialog": ", atvērs parakstu logu", + ", opens subtitles settings dialog": ", atvērs subtitru logu", + ", opens descriptions settings dialog": ", atvērs aprakstu logu", + ", selected": ", izvēlēts", + "captions settings": "parakstu iestatījumi", + "subtitles settings": "subtitru iestatījumi", + "descriptions settings": "aprakstu iestatījumi", + "Text": "Teksts", + "White": "Balts", + "Black": "Melns", + "Red": "Sarkans", + "Green": "Zaļš", + "Blue": "Zils", + "Yellow": "Dzeltens", + "Magenta": "Purpursarkana", + "Cyan": "Ciāna", + "Background": "Fons", + "Window": "Logs", + "Transparent": "Caurspīdīgs", + "Semi-Transparent": "Daļēji caurspīdīgs", + "Opaque": "Necaurspīdīgs", + "Font Size": "Šrifta izmērs", + "Text Edge Style": "Teksta ēnas stils", + "None": "Neviens", + "Raised": "Izvirzīts", + "Depressed": "Samazināts", + "Uniform": "Vienmērīgs", + "Drop shadow": "Ēnots", + "Font Family": "Šrifts", + "Proportional Sans-Serif": "Proportional Sans-Serif", + "Monospace Sans-Serif": "Monospace Sans-Serif", + "Proportional Serif": "Proportional Serif", + "Monospace Serif": "Monospace Serif", + "Casual": "Casual", + "Script": "Script", + "Small Caps": "Small Caps", + "Reset": "Atiestatīt", + "restore all settings to the default values": "atiestatīt iestatījumu uz noklusējumu", + "Done": "Gatavs", + "Caption Settings Dialog": "Parakstu iestatījumi", + "Beginning of dialog window. Escape will cancel and close the window.": "Paraksta iestatījumu sākums. Lai aizvērtu, spiediet ESC taustiņu.", + "End of dialog window.": "Parakstu iestatījumu loga beigas", + "{1} is loading.": "{1} ielādē.", + "Exit Picture-in-Picture": "Iziet no Attēls attēlā", + "Picture-in-Picture": "Attēls attēlā", + "Skip forward {1} seconds": "Pārtīt uz priekšu {1} sekundes", + "Skip backward {1} seconds": "Pārtīt atpakaļ {1} sekundes" +}); \ No newline at end of file diff --git a/js/libs/videojs/lang/lv.json b/js/libs/videojs/lang/lv.json new file mode 100644 index 00000000..19f9f68c --- /dev/null +++ b/js/libs/videojs/lang/lv.json @@ -0,0 +1,91 @@ +{ + "Audio Player": "Audio atskaņotājs", + "Video Player": "Video atskaņotājs", + "Play": "Atskaņot", + "Pause": "Pauzēt", + "Replay": "Atkārtot", + "Current Time": "Esošais laiks", + "Duration": "Ilgums", + "Remaining Time": "Atlikušais laiks", + "Stream Type": "Straumes veids", + "LIVE": "LIVE", + "Seek to live, currently behind live": "Pāriet uz tiešraidi", + "Seek to live, currently playing live": "Pāriet uz tiešraidi", + "Loaded": "Ielādēts", + "Progress": "Progress", + "Progress Bar": "Progresa josla", + "progress bar timing: currentTime={1} duration={2}": "{1} no {2}", + "Fullscreen": "Pilnekrāna režīms", + "Exit Fullscreen": "Iziet no pilnekrāna režīma", + "Mute": "Izslēgt skaņu", + "Unmute": "Ieslēgt skaņu", + "Playback Rate": "Atskaņošanas ātrums", + "Subtitles": "Subtitri", + "subtitles off": "Izslēgt subtitrus", + "Captions": "Paraksti", + "captions off": "Izslēgt parakstus", + "Chapters": "Temati", + "Descriptions": "Apraksti", + "descriptions off": "Izslēgt aprakstus", + "Audio Track": "Audio celiņš", + "Volume Level": "Skaļums", + "You aborted the media playback": "Atskaņošana atcelta", + "A network error caused the media download to fail part-way.": "Tīkla kļūdas dēļ, multivides lejupielāde neizdevās.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Neizdevās ielādēt multividi, iespējams severa, vai tīkla kļūmes dēļ, vai neatbalstīta formāta dēļ.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Atskaņošana tika pārtraukta tīkla kļūmes dēļ vai pārlūkprogrammas iespēju trūkuma dēļ.", + "No compatible source was found for this media.": "Netika atrasts atbilstošs multivides avots.", + "The media is encrypted and we do not have the keys to decrypt it.": "Multividi nevar atskaņot, jo tas ir kriptēts un nav pieejama dekriptēšanas atslēga.", + "Play Video": "Atskaņot video", + "Close": "Aizvērt", + "Close Modal Dialog": "Aizvērt logu", + "Modal Window": "Logs", + "This is a modal window": "Logs", + "This modal can be closed by pressing the Escape key or activating the close button.": "Šo logu var aizvērt, nospiežot uz aizvēršanas pogas vai taustiņa ESC.", + ", opens captions settings dialog": ", atvērs parakstu logu", + ", opens subtitles settings dialog": ", atvērs subtitru logu", + ", opens descriptions settings dialog": ", atvērs aprakstu logu", + ", selected": ", izvēlēts", + "captions settings": "parakstu iestatījumi", + "subtitles settings": "subtitru iestatījumi", + "descriptions settings": "aprakstu iestatījumi", + "Text": "Teksts", + "White": "Balts", + "Black": "Melns", + "Red": "Sarkans", + "Green": "Zaļš", + "Blue": "Zils", + "Yellow": "Dzeltens", + "Magenta": "Purpursarkana", + "Cyan": "Ciāna", + "Background": "Fons", + "Window": "Logs", + "Transparent": "Caurspīdīgs", + "Semi-Transparent": "Daļēji caurspīdīgs", + "Opaque": "Necaurspīdīgs", + "Font Size": "Šrifta izmērs", + "Text Edge Style": "Teksta ēnas stils", + "None": "Neviens", + "Raised": "Izvirzīts", + "Depressed": "Samazināts", + "Uniform": "Vienmērīgs", + "Drop shadow": "Ēnots", + "Font Family": "Šrifts", + "Proportional Sans-Serif": "Proportional Sans-Serif", + "Monospace Sans-Serif": "Monospace Sans-Serif", + "Proportional Serif": "Proportional Serif", + "Monospace Serif": "Monospace Serif", + "Casual": "Casual", + "Script": "Script", + "Small Caps": "Small Caps", + "Reset": "Atiestatīt", + "restore all settings to the default values": "atiestatīt iestatījumu uz noklusējumu", + "Done": "Gatavs", + "Caption Settings Dialog": "Parakstu iestatījumi", + "Beginning of dialog window. Escape will cancel and close the window.": "Paraksta iestatījumu sākums. Lai aizvērtu, spiediet ESC taustiņu.", + "End of dialog window.": "Parakstu iestatījumu loga beigas", + "{1} is loading.": "{1} ielādē.", + "Exit Picture-in-Picture": "Iziet no Attēls attēlā", + "Picture-in-Picture": "Attēls attēlā", + "Skip forward {1} seconds": "Pārtīt uz priekšu {1} sekundes", + "Skip backward {1} seconds": "Pārtīt atpakaļ {1} sekundes" +} diff --git a/js/libs/videojs/lang/mr.js b/js/libs/videojs/lang/mr.js new file mode 100644 index 00000000..c1df1af4 --- /dev/null +++ b/js/libs/videojs/lang/mr.js @@ -0,0 +1,97 @@ +videojs.addLanguage('mr', { + "Audio Player": "ध्वनि वादक", + "Video Player": "चित्रवाणी वादक", + "Play": "वाजवा", + "Pause": "थांबा", + "Replay": "पुन्हा वाजवा", + "Current Time": "वर्तमान वेळ", + "Duration": "कालावधी", + "Remaining Time": "उर्वरित वेळ", + "Stream Type": "प्रवाह प्रकार", + "LIVE": "थेट प्रसारण", + "Seek to live, currently behind live": "थेट प्रसारणकडे जा, चालू क्षणाला थेट प्रसारण पासुन मागे आहे", + "Seek to live, currently playing live": "थेट प्रसारणकडे जा, चालू क्षणाला थेट प्रसारण आहे", + "Loaded": "सज्ज", + "Progress": "प्रगती", + "Progress Bar": "प्रगती पट्टा", + "progress bar timing: currentTime={1} duration={2}": "{2} पैकी {1}", + "Fullscreen": "संपूर्ण पडदा", + "Exit Fullscreen": "संपूर्ण पडद्यातून बाहेर पडा", + "Mute": "मुक", + "Unmute": "अमूक", + "Playback Rate": "प्लेबॅक दर", + "Subtitles": "उपशीर्षके", + "subtitles off": "उपशीर्षके बंद", + "Captions": "मथळे", + "captions off": "मथळे बंद", + "Chapters": "अध्याय", + "Descriptions": "वर्णने", + "descriptions off": "वर्णने बंद", + "Audio Track": "ध्वनि मार्ग", + "Volume Level": "आवाज पातळी", + "You aborted the media playback": "तुम्ही मीडिया प्लेबॅक रद्द केला", + "A network error caused the media download to fail part-way.": "नेटवर्क त्रुटीमुळे मीडिया डाउनलोड अर्ध्यात अयशस्वी झाला.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "मीडिया लोड करता आला नाही, एकतर सर्व्हर किंवा नेटवर्क अयशस्वी झाल्यामुळे किंवा फॉरमॅट समर्थित नसल्यामुळे.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "मीडिया प्लेबॅक भ्रष्टाचाराच्या समस्येमुळे किंवा मीडियाने वापरलेल्या वैशिष्ट्यांमुळे तुमचा ब्राउझर सपोर्ट करत नसल्यामुळे रद्द करण्यात आला.", + "No compatible source was found for this media.": "या मीडियासाठी कोणताही सुसंगत स्रोत सापडला नाही.", + "The media is encrypted and we do not have the keys to decrypt it.": "मीडिया एन्क्रिप्ट केलेला आहे आणि तो डिक्रिप्ट करण्यासाठी आमच्याकडे कळा नाहीत.", + "Play Video": "चित्रवाणी वाजवा", + "Close": "बंद", + "Close Modal Dialog": "संवादी प्रलेखन बंद करा", + "Modal Window": "संवादी प्रलेखन", + "This is a modal window": "हे एक संवादी प्रलेखन आहे", + "This modal can be closed by pressing the Escape key or activating the close button.": "एस्केप कळ दाबून किंवा बंद कळ सक्रिय करून हे संवादी प्रलेखन बंद केले जाऊ शकते.", + ", opens captions settings dialog": ", मथळे नियंत्रण संवाद प्रलेखन उघडतो", + ", opens subtitles settings dialog": ", उपशीर्षक नियंत्रण संवाद प्रलेखन उघडतो", + ", opens descriptions settings dialog": ", वर्णन नियंत्रण संवाद प्रलेखन उघडतो", + ", selected": ", निवडले", + "captions settings": "मथळे नियंत्रण", + "subtitles settings": "उपशीर्षक नियंत्रण", + "descriptions settings": "वर्णन नियंत्रण", + "Text": "मजकूर", + "White": "पांढरा", + "Black": "काळा", + "Red": "लाल", + "Green": "हिरवा", + "Blue": "निळा", + "Yellow": "पिवळा", + "Magenta": "किरमिजी तांबडा", + "Cyan": "निळसर", + "Background": "पृष्ठभाग", + "Window": "चौकट", + "Transparent": "पारदर्शक", + "Semi-Transparent": "अर्ध-पारदर्शक", + "Opaque": "अपारदर्शक", + "Font Size": "अक्षराचा आकार", + "Text Edge Style": "मजकूर एज शैली", + "None": "काहीही नाही", + "Raised": "वाढवले", + "Depressed": "न दाबलेले", + "Uniform": "एकसमान", + "Drop shadow": "सावली सोडा", + "Font Family": "अक्षर कुटुंब", + "Proportional Sans-Serif": "आनुपातिक सॅन्स-सेरिफ", + "Monospace Sans-Serif": "मोनोस्पेस सॅन्स-सेरिफ", + "Proportional Serif": "आनुपातिक सेरिफ", + "Monospace Serif": "मोनोस्पेस सेरिफ", + "Casual": "प्रासंगिक", + "Script": "लेख", + "Small Caps": "लहान अक्षरे", + "Reset": "पुन्हा कर", + "restore all settings to the default values": "सर्व नियंत्रण डीफॉल्ट मूल्यांवर पुनर्संचयित करा", + "Done": "झाले", + "Caption Settings Dialog": "मथळा नियंत्रण संवाद प्रलेखन", + "Beginning of dialog window. Escape will cancel and close the window.": "डायलॉग विंडोची सुरुवात. Escape रद्द करेल आणि विंडो बंद करेल.", + "End of dialog window.": "डायलॉग विंडोचा शेवट.", + "{1} is loading.": "{1} लोड होत आहे.", + "Exit Picture-in-Picture": "पिक्चर-इन-पिक्चरमधून बाहेर पडा", + "Picture-in-Picture": "पिक्चर-इन-पिक्चर", + "No content": "सामग्री नाही", + "Color": "रंग", + "Opacity": "अपारदर्शकता", + "Text Background": "मजकूर पार्श्वभूमी", + "Caption Area Background": "मथळा क्षेत्र पार्श्वभूमी", + "Playing in Picture-in-Picture": "पिक्चर-इन-पिक्चरमध्ये वाजवत आहे", + "Skip backward {1} seconds": "मागे जा {1} सेकंद", + "Skip forward {1} seconds": "पुढे जा {1} सेकंद" +}); \ No newline at end of file diff --git a/js/libs/videojs/lang/mr.json b/js/libs/videojs/lang/mr.json new file mode 100644 index 00000000..6e0a3524 --- /dev/null +++ b/js/libs/videojs/lang/mr.json @@ -0,0 +1,98 @@ +{ + "Audio Player": "ध्वनि वादक", + "Video Player": "चित्रवाणी वादक", + "Play": "वाजवा", + "Pause": "थांबा", + "Replay": "पुन्हा वाजवा", + "Current Time": "वर्तमान वेळ", + "Duration": "कालावधी", + "Remaining Time": "उर्वरित वेळ", + "Stream Type": "प्रवाह प्रकार", + "LIVE": "थेट प्रसारण", + "Seek to live, currently behind live": "थेट प्रसारणकडे जा, चालू क्षणाला थेट प्रसारण पासुन मागे आहे", + "Seek to live, currently playing live": "थेट प्रसारणकडे जा, चालू क्षणाला थेट प्रसारण आहे", + "Loaded": "सज्ज", + "Progress": "प्रगती", + "Progress Bar": "प्रगती पट्टा", + "progress bar timing: currentTime={1} duration={2}": "{2} पैकी {1}", + "Fullscreen": "संपूर्ण पडदा", + "Exit Fullscreen": "संपूर्ण पडद्यातून बाहेर पडा", + "Mute": "मुक", + "Unmute": "अमूक", + "Playback Rate": "प्लेबॅक दर", + "Subtitles": "उपशीर्षके", + "subtitles off": "उपशीर्षके बंद", + "Captions": "मथळे", + "captions off": "मथळे बंद", + "Chapters": "अध्याय", + "Descriptions": "वर्णने", + "descriptions off": "वर्णने बंद", + "Audio Track": "ध्वनि मार्ग", + "Volume Level": "आवाज पातळी", + "You aborted the media playback": "तुम्ही मीडिया प्लेबॅक रद्द केला", + "A network error caused the media download to fail part-way.": "नेटवर्क त्रुटीमुळे मीडिया डाउनलोड अर्ध्यात अयशस्वी झाला.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "मीडिया लोड करता आला नाही, एकतर सर्व्हर किंवा नेटवर्क अयशस्वी झाल्यामुळे किंवा फॉरमॅट समर्थित नसल्यामुळे.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "मीडिया प्लेबॅक भ्रष्टाचाराच्या समस्येमुळे किंवा मीडियाने वापरलेल्या वैशिष्ट्यांमुळे तुमचा ब्राउझर सपोर्ट करत नसल्यामुळे रद्द करण्यात आला.", + "No compatible source was found for this media.": "या मीडियासाठी कोणताही सुसंगत स्रोत सापडला नाही.", + "The media is encrypted and we do not have the keys to decrypt it.": "मीडिया एन्क्रिप्ट केलेला आहे आणि तो डिक्रिप्ट करण्यासाठी आमच्याकडे कळा नाहीत.", + "Play Video": "चित्रवाणी वाजवा", + "Close": "बंद", + "Close Modal Dialog": "संवादी प्रलेखन बंद करा", + "Modal Window": "संवादी प्रलेखन", + "This is a modal window": "हे एक संवादी प्रलेखन आहे", + "This modal can be closed by pressing the Escape key or activating the close button.": "एस्केप कळ दाबून किंवा बंद कळ सक्रिय करून हे संवादी प्रलेखन बंद केले जाऊ शकते.", + ", opens captions settings dialog": ", मथळे नियंत्रण संवाद प्रलेखन उघडतो", + ", opens subtitles settings dialog": ", उपशीर्षक नियंत्रण संवाद प्रलेखन उघडतो", + ", opens descriptions settings dialog": ", वर्णन नियंत्रण संवाद प्रलेखन उघडतो", + ", selected": ", निवडले", + "captions settings": "मथळे नियंत्रण", + "subtitles settings": "उपशीर्षक नियंत्रण", + "descriptions settings": "वर्णन नियंत्रण", + "Text": "मजकूर", + "White": "पांढरा", + "Black": "काळा", + "Red": "लाल", + "Green": "हिरवा", + "Blue": "निळा", + "Yellow": "पिवळा", + "Magenta": "किरमिजी तांबडा", + "Cyan": "निळसर", + "Background": "पृष्ठभाग", + "Window": "चौकट", + "Transparent": "पारदर्शक", + "Semi-Transparent": "अर्ध-पारदर्शक", + "Opaque": "अपारदर्शक", + "Font Size": "अक्षराचा आकार", + "Text Edge Style": "मजकूर एज शैली", + "None": "काहीही नाही", + "Raised": "वाढवले", + "Depressed": "न दाबलेले", + "Uniform": "एकसमान", + "Drop shadow": "सावली सोडा", + "Font Family": "अक्षर कुटुंब", + "Proportional Sans-Serif": "आनुपातिक सॅन्स-सेरिफ", + "Monospace Sans-Serif": "मोनोस्पेस सॅन्स-सेरिफ", + "Proportional Serif": "आनुपातिक सेरिफ", + "Monospace Serif": "मोनोस्पेस सेरिफ", + "Casual": "प्रासंगिक", + "Script": "लेख", + "Small Caps": "लहान अक्षरे", + "Reset": "पुन्हा कर", + "restore all settings to the default values": "सर्व नियंत्रण डीफॉल्ट मूल्यांवर पुनर्संचयित करा", + "Done": "झाले", + "Caption Settings Dialog": "मथळा नियंत्रण संवाद प्रलेखन", + "Beginning of dialog window. Escape will cancel and close the window.": "डायलॉग विंडोची सुरुवात. Escape रद्द करेल आणि विंडो बंद करेल.", + "End of dialog window.": "डायलॉग विंडोचा शेवट.", + "{1} is loading.": "{1} लोड होत आहे.", + "Exit Picture-in-Picture": "पिक्चर-इन-पिक्चरमधून बाहेर पडा", + "Picture-in-Picture": "पिक्चर-इन-पिक्चर", + "No content": "सामग्री नाही", + "Color": "रंग", + "Opacity": "अपारदर्शकता", + "Text Background": "मजकूर पार्श्वभूमी", + "Caption Area Background": "मथळा क्षेत्र पार्श्वभूमी", + "Playing in Picture-in-Picture": "पिक्चर-इन-पिक्चरमध्ये वाजवत आहे", + "Skip backward {1} seconds": "मागे जा {1} सेकंद", + "Skip forward {1} seconds": "पुढे जा {1} सेकंद" + } + \ No newline at end of file diff --git a/js/libs/videojs/lang/nb.js b/js/libs/videojs/lang/nb.js index 2acc4fe4..b0887bca 100644 --- a/js/libs/videojs/lang/nb.js +++ b/js/libs/videojs/lang/nb.js @@ -16,7 +16,7 @@ videojs.addLanguage('nb', { "Progress Bar": "Framdriftsviser", "progress bar timing: currentTime={1} duration={2}": "{1} av {2}", "Fullscreen": "Fullskjerm", - "Non-Fullscreen": "Lukk fullskjerm", + "Exit Fullscreen": "Lukk fullskjerm", "Mute": "Lyd av", "Unmute": "Lyd på", "Playback Rate": "Avspillingshastighet", @@ -68,7 +68,7 @@ videojs.addLanguage('nb', { "Raised": "Uthevet", "Depressed": "Nedtrykt", "Uniform": "Enkel", - "Dropshadow": "Skygge", + "Drop shadow": "Skygge", "Font Family": "Skrifttype", "Proportional Sans-Serif": "Proporsjonal skrift uten seriffer", "Monospace Sans-Serif": "Fastbreddeskrift uten seriffer", @@ -83,5 +83,15 @@ videojs.addLanguage('nb', { "Caption Settings Dialog": "Innstillingsvindu for teksting for hørselshemmede", "Beginning of dialog window. Escape will cancel and close the window.": "Begynnelse på dialogvindu. Trykk Escape for å avbryte og lukke vinduet.", "End of dialog window.": "Avslutning på dialogvindu.", - "{1} is loading.": "{1} laster." + "{1} is loading.": "{1} laster.", + "Exit Picture-in-Picture": "Avslutt bilde-i-bilde", + "Picture-in-Picture": "Bilde-i-bilde", + "No content": "Ingen innhold", + "Color": "Farge", + "Opacity": "Gjennomsiktighet", + "Text Background": "Tekstbakgrunn", + "Caption Area Background": "Undertekstbakgrunn", + "Playing in Picture-in-Picture": "Spiller av i bilde-i-bilde", + "Skip backward {1} seconds": "Hopp tilbake {1} sekunder", + "Skip forward {1} seconds": "Hopp frem {1} sekunder" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/nb.json b/js/libs/videojs/lang/nb.json index a2c843d1..e2a6400f 100644 --- a/js/libs/videojs/lang/nb.json +++ b/js/libs/videojs/lang/nb.json @@ -16,7 +16,7 @@ "Progress Bar": "Framdriftsviser", "progress bar timing: currentTime={1} duration={2}": "{1} av {2}", "Fullscreen": "Fullskjerm", - "Non-Fullscreen": "Lukk fullskjerm", + "Exit Fullscreen": "Lukk fullskjerm", "Mute": "Lyd av", "Unmute": "Lyd på", "Playback Rate": "Avspillingshastighet", @@ -68,7 +68,7 @@ "Raised": "Uthevet", "Depressed": "Nedtrykt", "Uniform": "Enkel", - "Dropshadow": "Skygge", + "Drop shadow": "Skygge", "Font Family": "Skrifttype", "Proportional Sans-Serif": "Proporsjonal skrift uten seriffer", "Monospace Sans-Serif": "Fastbreddeskrift uten seriffer", @@ -83,5 +83,15 @@ "Caption Settings Dialog": "Innstillingsvindu for teksting for hørselshemmede", "Beginning of dialog window. Escape will cancel and close the window.": "Begynnelse på dialogvindu. Trykk Escape for å avbryte og lukke vinduet.", "End of dialog window.": "Avslutning på dialogvindu.", - "{1} is loading.": "{1} laster." + "{1} is loading.": "{1} laster.", + "Exit Picture-in-Picture": "Avslutt bilde-i-bilde", + "Picture-in-Picture": "Bilde-i-bilde", + "No content": "Ingen innhold", + "Color": "Farge", + "Opacity": "Gjennomsiktighet", + "Text Background": "Tekstbakgrunn", + "Caption Area Background": "Undertekstbakgrunn", + "Playing in Picture-in-Picture": "Spiller av i bilde-i-bilde", + "Skip backward {1} seconds": "Hopp tilbake {1} sekunder", + "Skip forward {1} seconds": "Hopp frem {1} sekunder" } diff --git a/js/libs/videojs/lang/nl.js b/js/libs/videojs/lang/nl.js index 0d043e92..fb7c35b1 100644 --- a/js/libs/videojs/lang/nl.js +++ b/js/libs/videojs/lang/nl.js @@ -9,43 +9,45 @@ videojs.addLanguage('nl', { "Remaining Time": "Resterende tijd", "Stream Type": "Streamtype", "LIVE": "LIVE", + "Seek to live, currently behind live": "Zoek naar live, momenteel achter op live", + "Seek to live, currently playing live": "Zoek naar live, momenteel live", "Loaded": "Geladen", "Progress": "Voortgang", "Progress Bar": "Voortgangsbalk", "progress bar timing: currentTime={1} duration={2}": "{1} van {2}", "Fullscreen": "Volledig scherm", - "Non-Fullscreen": "Geen volledig scherm", + "Exit Fullscreen": "Volledig scherm uit", "Mute": "Dempen", - "Unmute": "Niet dempen", + "Unmute": "Dempen uit", "Playback Rate": "Afspeelsnelheid", "Subtitles": "Ondertiteling", "subtitles off": "ondertiteling uit", - "Captions": "Bijschriften", - "captions off": "bijschriften uit", + "Captions": "Ondertiteling (CC)", + "captions off": "ondertiteling (CC) uit", "Chapters": "Hoofdstukken", "Descriptions": "Beschrijvingen", "descriptions off": "beschrijvingen uit", "Audio Track": "Audiospoor", - "Volume Level": "Geluidsniveau", + "Volume Level": "Volume", "You aborted the media playback": "U heeft het afspelen van de media afgebroken", - "A network error caused the media download to fail part-way.": "Een netwerkfout heeft ervoor gezorgd dat het downloaden van de media halverwege is mislukt.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "De media kon niet worden geladen, dit komt doordat of de server of het netwerk mislukt of doordat het formaat niet wordt ondersteund.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Het afspelen van de media is afgebroken door een probleem met beschadeigde gegevens of doordat de media functies gebruikt die uw browser niet ondersteund.", - "No compatible source was found for this media.": "Er is geen geschikte bron voor deze media gevonden.", - "The media is encrypted and we do not have the keys to decrypt it.": "De media is versleuteld en we hebben de sleutels niet om deze te ontsleutelen.", + "A network error caused the media download to fail part-way.": "Een netwerkfout heeft ervoor gezorgd dat het downloaden van de media is mislukt.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "De media kon niet worden geladen, doordat de server of het netwerk faalde of doordat het formaat niet wordt ondersteund.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Het afspelen van de media werd afgebroken vanwege een corruptieprobleem of omdat de uw browser de gebruikte mediafuncties niet ondersteund.", + "No compatible source was found for this media.": "Er is geen geschikte bron gevonden voor dit medium.", + "The media is encrypted and we do not have the keys to decrypt it.": "De media is gecodeerd en we hebben niet de sleutels om het te decoderen.", "Play Video": "Video afspelen", "Close": "Sluiten", "Close Modal Dialog": "Extra venster sluiten", "Modal Window": "Extra venster", "This is a modal window": "Dit is een extra venster", - "This modal can be closed by pressing the Escape key or activating the close button.": "Dit venster kan worden gesloten door op de Escape-toets te drukken of door de sluiten-knop te activeren.", - ", opens captions settings dialog": ", opent instellingen-venster voor bijschriften", - ", opens subtitles settings dialog": ", opent instellingen-venster voor ondertitelingen", - ", opens descriptions settings dialog": ", opent instellingen-venster voor beschrijvingen", + "This modal can be closed by pressing the Escape key or activating the close button.": "Dit venster kan worden gesloten door op de Escape-toets te drukken of door de sluit-knop te activeren.", + ", opens captions settings dialog": ", opent instellingen venster voor ondertitelingen", + ", opens subtitles settings dialog": ", opent instellingen venster voor ondertitelingen", + ", opens descriptions settings dialog": ", opent instellingen venster voor beschrijvingen", ", selected": ", geselecteerd", - "captions settings": "bijschriften-instellingen", - "subtitles settings": "ondertiteling-instellingen", - "descriptions settings": "beschrijvingen-instellingen", + "captions settings": "ondertiteling instellingen", + "subtitles settings": "ondertiteling instellingen", + "descriptions settings": "beschrijvingen instellingen", "Text": "Tekst", "White": "Wit", "Black": "Zwart", @@ -66,19 +68,29 @@ videojs.addLanguage('nl', { "Raised": "Verhoogd", "Depressed": "Ingedrukt", "Uniform": "Uniform", - "Dropshadow": "Schaduw", + "Drop shadow": "Schaduw", "Font Family": "Lettertype", "Proportional Sans-Serif": "Proportioneel sans-serif", "Monospace Sans-Serif": "Monospace sans-serif", "Proportional Serif": "Proportioneel serif", "Monospace Serif": "Monospace serif", - "Casual": "Luchtig", + "Casual": "Informeel", "Script": "Script", - "Small Caps": "Kleine hoofdletters", + "Small Caps": "Kleine Hoofdletters", "Reset": "Herstellen", - "restore all settings to the default values": "alle instellingen naar de standaardwaarden herstellen", - "Done": "Klaar", + "restore all settings to the default values": "alle instellingen herstellen naar de standaardwaarden", + "Done": "Gereed", "Caption Settings Dialog": "Venster voor bijschriften-instellingen", "Beginning of dialog window. Escape will cancel and close the window.": "Begin van dialoogvenster. Escape zal annuleren en het venster sluiten.", - "End of dialog window.": "Einde van dialoogvenster." + "End of dialog window.": "Einde van dialoogvenster.", + "{1} is loading.": "{1} wordt geladen.", + "Exit Picture-in-Picture": "Picture-in-Picture uit", + "Picture-in-Picture": "Picture-in-Picture", + "No content": "Geen inhoud", + "Color": "Kleur", + "Opacity": "Transparantie", + "Text Background": "Tekst Achtergrond", + "Caption Area Background": "Achtergrond voor Ondertiteling", + "Skip forward {1} seconds": "{1} seconden vooruit", + "Skip backward {1} seconds": "{1} seconden terug" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/nl.json b/js/libs/videojs/lang/nl.json index c7d0b731..92c9aec5 100644 --- a/js/libs/videojs/lang/nl.json +++ b/js/libs/videojs/lang/nl.json @@ -9,43 +9,45 @@ "Remaining Time": "Resterende tijd", "Stream Type": "Streamtype", "LIVE": "LIVE", + "Seek to live, currently behind live": "Zoek naar live, momenteel achter op live", + "Seek to live, currently playing live": "Zoek naar live, momenteel live", "Loaded": "Geladen", "Progress": "Voortgang", "Progress Bar": "Voortgangsbalk", "progress bar timing: currentTime={1} duration={2}": "{1} van {2}", "Fullscreen": "Volledig scherm", - "Non-Fullscreen": "Geen volledig scherm", + "Exit Fullscreen": "Volledig scherm uit", "Mute": "Dempen", - "Unmute": "Niet dempen", + "Unmute": "Dempen uit", "Playback Rate": "Afspeelsnelheid", "Subtitles": "Ondertiteling", "subtitles off": "ondertiteling uit", - "Captions": "Bijschriften", - "captions off": "bijschriften uit", + "Captions": "Ondertiteling (CC)", + "captions off": "ondertiteling (CC) uit", "Chapters": "Hoofdstukken", "Descriptions": "Beschrijvingen", "descriptions off": "beschrijvingen uit", "Audio Track": "Audiospoor", - "Volume Level": "Geluidsniveau", + "Volume Level": "Volume", "You aborted the media playback": "U heeft het afspelen van de media afgebroken", - "A network error caused the media download to fail part-way.": "Een netwerkfout heeft ervoor gezorgd dat het downloaden van de media halverwege is mislukt.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "De media kon niet worden geladen, dit komt doordat of de server of het netwerk mislukt of doordat het formaat niet wordt ondersteund.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Het afspelen van de media is afgebroken door een probleem met beschadeigde gegevens of doordat de media functies gebruikt die uw browser niet ondersteund.", - "No compatible source was found for this media.": "Er is geen geschikte bron voor deze media gevonden.", - "The media is encrypted and we do not have the keys to decrypt it.": "De media is versleuteld en we hebben de sleutels niet om deze te ontsleutelen.", + "A network error caused the media download to fail part-way.": "Een netwerkfout heeft ervoor gezorgd dat het downloaden van de media is mislukt.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "De media kon niet worden geladen, doordat de server of het netwerk faalde of doordat het formaat niet wordt ondersteund.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Het afspelen van de media werd afgebroken vanwege een corruptieprobleem of omdat de uw browser de gebruikte mediafuncties niet ondersteund.", + "No compatible source was found for this media.": "Er is geen geschikte bron gevonden voor dit medium.", + "The media is encrypted and we do not have the keys to decrypt it.": "De media is gecodeerd en we hebben niet de sleutels om het te decoderen.", "Play Video": "Video afspelen", "Close": "Sluiten", "Close Modal Dialog": "Extra venster sluiten", "Modal Window": "Extra venster", "This is a modal window": "Dit is een extra venster", - "This modal can be closed by pressing the Escape key or activating the close button.": "Dit venster kan worden gesloten door op de Escape-toets te drukken of door de sluiten-knop te activeren.", - ", opens captions settings dialog": ", opent instellingen-venster voor bijschriften", - ", opens subtitles settings dialog": ", opent instellingen-venster voor ondertitelingen", - ", opens descriptions settings dialog": ", opent instellingen-venster voor beschrijvingen", + "This modal can be closed by pressing the Escape key or activating the close button.": "Dit venster kan worden gesloten door op de Escape-toets te drukken of door de sluit-knop te activeren.", + ", opens captions settings dialog": ", opent instellingen venster voor ondertitelingen", + ", opens subtitles settings dialog": ", opent instellingen venster voor ondertitelingen", + ", opens descriptions settings dialog": ", opent instellingen venster voor beschrijvingen", ", selected": ", geselecteerd", - "captions settings": "bijschriften-instellingen", - "subtitles settings": "ondertiteling-instellingen", - "descriptions settings": "beschrijvingen-instellingen", + "captions settings": "ondertiteling instellingen", + "subtitles settings": "ondertiteling instellingen", + "descriptions settings": "beschrijvingen instellingen", "Text": "Tekst", "White": "Wit", "Black": "Zwart", @@ -66,19 +68,29 @@ "Raised": "Verhoogd", "Depressed": "Ingedrukt", "Uniform": "Uniform", - "Dropshadow": "Schaduw", + "Drop shadow": "Schaduw", "Font Family": "Lettertype", "Proportional Sans-Serif": "Proportioneel sans-serif", "Monospace Sans-Serif": "Monospace sans-serif", "Proportional Serif": "Proportioneel serif", "Monospace Serif": "Monospace serif", - "Casual": "Luchtig", + "Casual": "Informeel", "Script": "Script", - "Small Caps": "Kleine hoofdletters", + "Small Caps": "Kleine Hoofdletters", "Reset": "Herstellen", - "restore all settings to the default values": "alle instellingen naar de standaardwaarden herstellen", - "Done": "Klaar", + "restore all settings to the default values": "alle instellingen herstellen naar de standaardwaarden", + "Done": "Gereed", "Caption Settings Dialog": "Venster voor bijschriften-instellingen", "Beginning of dialog window. Escape will cancel and close the window.": "Begin van dialoogvenster. Escape zal annuleren en het venster sluiten.", - "End of dialog window.": "Einde van dialoogvenster." -} \ No newline at end of file + "End of dialog window.": "Einde van dialoogvenster.", + "{1} is loading.": "{1} wordt geladen.", + "Exit Picture-in-Picture": "Picture-in-Picture uit", + "Picture-in-Picture": "Picture-in-Picture", + "No content": "Geen inhoud", + "Color": "Kleur", + "Opacity": "Transparantie", + "Text Background": "Tekst Achtergrond", + "Caption Area Background": "Achtergrond voor Ondertiteling", + "Skip forward {1} seconds": "{1} seconden vooruit", + "Skip backward {1} seconds": "{1} seconden terug" +} diff --git a/js/libs/videojs/lang/nn.js b/js/libs/videojs/lang/nn.js index 5823ca16..ed5b17ec 100644 --- a/js/libs/videojs/lang/nn.js +++ b/js/libs/videojs/lang/nn.js @@ -16,7 +16,7 @@ videojs.addLanguage('nn', { "Progress Bar": "Framdriftsvisar", "progress bar timing: currentTime={1} duration={2}": "{1} av {2}", "Fullscreen": "Fullskjerm", - "Non-Fullscreen": "Stenga fullskjerm", + "Exit Fullscreen": "Stenga fullskjerm", "Mute": "Lyd av", "Unmute": "Lyd på", "Playback Rate": "Avspelingshastigheit", @@ -68,7 +68,7 @@ videojs.addLanguage('nn', { "Raised": "Utheva", "Depressed": "Nedtrykt", "Uniform": "Enkel", - "Dropshadow": "Skugge", + "Drop shadow": "Skugge", "Font Family": "Skrifttype", "Proportional Sans-Serif": "Proporsjonal skrift utan seriffar", "Monospace Sans-Serif": "Fastbreddeskrift utan seriffar", diff --git a/js/libs/videojs/lang/nn.json b/js/libs/videojs/lang/nn.json index f02c064b..e22711fa 100644 --- a/js/libs/videojs/lang/nn.json +++ b/js/libs/videojs/lang/nn.json @@ -16,7 +16,7 @@ "Progress Bar": "Framdriftsvisar", "progress bar timing: currentTime={1} duration={2}": "{1} av {2}", "Fullscreen": "Fullskjerm", - "Non-Fullscreen": "Stenga fullskjerm", + "Exit Fullscreen": "Stenga fullskjerm", "Mute": "Lyd av", "Unmute": "Lyd på", "Playback Rate": "Avspelingshastigheit", @@ -68,7 +68,7 @@ "Raised": "Utheva", "Depressed": "Nedtrykt", "Uniform": "Enkel", - "Dropshadow": "Skugge", + "Drop shadow": "Skugge", "Font Family": "Skrifttype", "Proportional Sans-Serif": "Proporsjonal skrift utan seriffar", "Monospace Sans-Serif": "Fastbreddeskrift utan seriffar", diff --git a/js/libs/videojs/lang/np.js b/js/libs/videojs/lang/np.js new file mode 100644 index 00000000..a2098420 --- /dev/null +++ b/js/libs/videojs/lang/np.js @@ -0,0 +1,89 @@ +videojs.addLanguage('np', { + "Audio Player": "ऑडियो प्लेयर", + "Video Player": "भिडियो प्लेयर", + "Play": "चलाउनु", + "Pause": "रोक्नु", + "Replay": "फेरि चलाउनु", + "Current Time": "हालको समय", + "Duration": "अवधि", + "Remaining Time": "बाँकी समय", + "Stream Type": "स्ट्रीम प्रकार", + "LIVE": "लाइव", + "Seek to live, currently behind live": "लाइभ भागमा सार्नुहोस्, हालको अवस्थामा यो लाइभबाट पछाडी छ", + "Seek to live, currently playing live": "लाइभ भागमा सार्नुहोस्, हालको अवस्थामा यो लाइभमा छ", + "Loaded": "लोड भएको छ", + "Progress": "प्रगति", + "Progress Bar": "प्रोगेस बार", + "progress bar timing: currentTime={1} duration={2}": "प्रगति बार को समय: {2} मध्ये {1}", + "Fullscreen": "फ़ुल स्क्रीन", + "Exit Fullscreen": "फ़ुल स्क्रीनबाट बाहिर निस्कनुहोस्", + "Mute": "म्यूट गर्नुहोस्", + "Unmute": "अनम्यूट गर्नुहोस्", + "Playback Rate": "प्लेब्याक दर", + "Subtitles": "उपशीर्षक", + "subtitles off": "उपशीर्षक बंद", + "Captions": "कैप्शन", + "captions off": "कैप्शन बंद", + "Chapters": "अध्याय", + "Descriptions": "विवरण", + "descriptions off": "विवरण बंद", + "Audio Track": "ऑडियो ट्रैक", + "Volume Level": "वॉल्यूम स्तर", + "You aborted the media playback": "तपाईंले मिडिया प्लेब्याक रद्द गर्नुभयो", + "A network error caused the media download to fail part-way.": "नेटवर्क त्रुटिले मिडिया डाउनलोडलाई आधा मार्गमा असफल गर्यो।", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "मिडिया लोड गर्न सकिएन, या तो नेटवर्क विफल भयो वा त्यसको प्रारूप समर्थित भएन।", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "मिडिया प्लेबैक अवरुद्ध गरियो, कारण यो हुन सक्छ कि मिडिया खराब भयो वा मिडिया तपाईंको ब्राउजरद्वारा समर्थित भएन।", + "No compatible source was found for this media.": "यस मिडियाका लागि कुनै समर्थित स्रोत फेला परेन।", + "The media is encrypted and we do not have the keys to decrypt it.": "मिडिया एन्क्रिप्ट गरिएको छ र हामीले त्यसो डिक्रिप्ट गर्ने कुनै किसिमका कुञ्जीहरू छैनन्।", + "Play Video": "भिडियो चलाउनुहोस्", + "Close": "बन्द गर्नुहोस्", + "Close Modal Dialog": "मोडल डायलग बन्द गर्नुहोस्", + "Modal Window": "मोडल विंडो", + "This is a modal window": "यो एक मोडल विन्डो हो।", + "This modal can be closed by pressing the Escape key or activating the close button.": "यस मोडललाई बन्द गर्न तपाईंले Escape की बटन थिच्न सक्नुहुन्छ वा बन्द गर्ने बटन थिच्न सक्नुहुन्छ।", + ", opens captions settings dialog": ", कैप्शन सेटिंग डायलॉग खोलिनेछ", + ", opens subtitles settings dialog": ", उपशीर्षक सेटिंग्स संवाद खोलिनेछ", + ", opens descriptions settings dialog": ", विवरण सेटिंग संवाद खोलिनेछ", + ", selected": ", चयन गरियो", + "captions settings": "कैप्शन सेटिंग", + "subtitles settings": "उपशीर्षक सेटिंग", + "descriptions settings": "विवरण सेटिंग", + "Text": "टेक्स्ट", + "White": "सेतो", + "Black": "कालो", + "Red": "रातो", + "Green": "हरियो", + "Blue": "नीलो", + "Yellow": "पहेलो", + "Magenta": "मैजेंटा", + "Cyan": "सियान", + "Background": "बैकग्राउंड", + "Window": "विंडो", + "Transparent": "पारदर्शी", + "Semi-Transparent": "अर्द्ध पारदर्शी", + "Opaque": "अपारदर्शी", + "Font Size": "फ़ॉन्ट आकार", + "Text Edge Style": "टेक्स्ट एज स्टाइल", + "None": "कुनै होइन", + "Raised": "उठाइएको", + "Depressed": "निराश", + "Uniform": "समान", + "Dropshadow": "छाया", + "Font Family": "फॉण्ट परिवार", + "Proportional Sans-Serif": "प्रोपोरशनल साँस-सेरिफ", + "Monospace Sans-Serif": "मोनोस्पास साँस-सेरिफ", + "Proportional Serif": "प्रोपोरशनल सेरिफ", + "Monospace Serif": "मोनोस्पास सेरिफ", + "Casual": "अनौपचारिक", + "Script": "स्क्रिप्ट", + "Small Caps": "छोटो अक्षर", + "Reset": "रीसेट गरौ", + "restore all settings to the default values": "सबै सेटिङहरूलाई मूल्यमा पुन: स्थापित गर्नुहोस्।", + "Done": "पूर्ण", + "Caption Settings Dialog": "कैप्शन सेटिंग्स डायलॉग", + "Beginning of dialog window. Escape will cancel and close the window.": "वार्ता विन्डोको प्रारम्भिक भाग।। Escape बटनले रद्द गर्दछ र विन्डोलाई बन्द गर्दछ।", + "End of dialog window.": "विन्डोको समाप्ति।", + "{1} is loading.": "{1} लोड हुँदैछ।", + "Exit Picture-in-Picture": "पिक्चर-इन-पिक्चर बाट बाहिर निस्कौ।", + "Picture-in-Picture": "पिक्चर-इन-पिक्चर" +}); \ No newline at end of file diff --git a/js/libs/videojs/lang/np.json b/js/libs/videojs/lang/np.json new file mode 100644 index 00000000..324f56bf --- /dev/null +++ b/js/libs/videojs/lang/np.json @@ -0,0 +1,90 @@ + +{ + "Audio Player": "ऑडियो प्लेयर", + "Video Player": "भिडियो प्लेयर", + "Play": "चलाउनु", + "Pause": "रोक्नु", + "Replay": "फेरि चलाउनु", + "Current Time": "हालको समय", + "Duration": "अवधि", + "Remaining Time": "बाँकी समय", + "Stream Type": "स्ट्रीम प्रकार", + "LIVE": "लाइव", + "Seek to live, currently behind live": "लाइभ भागमा सार्नुहोस्, हालको अवस्थामा यो लाइभबाट पछाडी छ", + "Seek to live, currently playing live": "लाइभ भागमा सार्नुहोस्, हालको अवस्थामा यो लाइभमा छ", + "Loaded": "लोड भएको छ", + "Progress": "प्रगति", + "Progress Bar": "प्रोगेस बार", + "progress bar timing: currentTime={1} duration={2}": "प्रगति बार को समय: {2} मध्ये {1}", + "Fullscreen": "फ़ुल स्क्रीन", + "Exit Fullscreen": "फ़ुल स्क्रीनबाट बाहिर निस्कनुहोस्", + "Mute": "म्यूट गर्नुहोस्", + "Unmute": "अनम्यूट गर्नुहोस्", + "Playback Rate": "प्लेब्याक दर", + "Subtitles": "उपशीर्षक", + "subtitles off": "उपशीर्षक बंद", + "Captions": "कैप्शन", + "captions off": "कैप्शन बंद", + "Chapters": "अध्याय", + "Descriptions": "विवरण", + "descriptions off": "विवरण बंद", + "Audio Track": "ऑडियो ट्रैक", + "Volume Level": "वॉल्यूम स्तर", + "You aborted the media playback": "तपाईंले मिडिया प्लेब्याक रद्द गर्नुभयो", + "A network error caused the media download to fail part-way.": "नेटवर्क त्रुटिले मिडिया डाउनलोडलाई आधा मार्गमा असफल गर्यो।", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "मिडिया लोड गर्न सकिएन, या तो नेटवर्क विफल भयो वा त्यसको प्रारूप समर्थित भएन।", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "मिडिया प्लेबैक अवरुद्ध गरियो, कारण यो हुन सक्छ कि मिडिया खराब भयो वा मिडिया तपाईंको ब्राउजरद्वारा समर्थित भएन।", + "No compatible source was found for this media.": "यस मिडियाका लागि कुनै समर्थित स्रोत फेला परेन।", + "The media is encrypted and we do not have the keys to decrypt it.": "मिडिया एन्क्रिप्ट गरिएको छ र हामीले त्यसो डिक्रिप्ट गर्ने कुनै किसिमका कुञ्जीहरू छैनन्।", + "Play Video": "भिडियो चलाउनुहोस्", + "Close": "बन्द गर्नुहोस्", + "Close Modal Dialog": "मोडल डायलग बन्द गर्नुहोस्", + "Modal Window": "मोडल विंडो", + "This is a modal window": "यो एक मोडल विन्डो हो।", + "This modal can be closed by pressing the Escape key or activating the close button.": "यस मोडललाई बन्द गर्न तपाईंले Escape की बटन थिच्न सक्नुहुन्छ वा बन्द गर्ने बटन थिच्न सक्नुहुन्छ।", + ", opens captions settings dialog": ", कैप्शन सेटिंग डायलॉग खोलिनेछ", + ", opens subtitles settings dialog": ", उपशीर्षक सेटिंग्स संवाद खोलिनेछ", + ", opens descriptions settings dialog": ", विवरण सेटिंग संवाद खोलिनेछ", + ", selected": ", चयन गरियो", + "captions settings": "कैप्शन सेटिंग", + "subtitles settings": "उपशीर्षक सेटिंग", + "descriptions settings": "विवरण सेटिंग", + "Text": "टेक्स्ट", + "White": "सेतो", + "Black": "कालो", + "Red": "रातो", + "Green": "हरियो", + "Blue": "नीलो", + "Yellow": "पहेलो", + "Magenta": "मैजेंटा", + "Cyan": "सियान", + "Background": "बैकग्राउंड", + "Window": "विंडो", + "Transparent": "पारदर्शी", + "Semi-Transparent": "अर्द्ध पारदर्शी", + "Opaque": "अपारदर्शी", + "Font Size": "फ़ॉन्ट आकार", + "Text Edge Style": "टेक्स्ट एज स्टाइल", + "None": "कुनै होइन", + "Raised": "उठाइएको", + "Depressed": "निराश", + "Uniform": "समान", + "Dropshadow": "छाया", + "Font Family": "फॉण्ट परिवार", + "Proportional Sans-Serif": "प्रोपोरशनल साँस-सेरिफ", + "Monospace Sans-Serif": "मोनोस्पास साँस-सेरिफ", + "Proportional Serif": "प्रोपोरशनल सेरिफ", + "Monospace Serif": "मोनोस्पास सेरिफ", + "Casual": "अनौपचारिक", + "Script": "स्क्रिप्ट", + "Small Caps": "छोटो अक्षर", + "Reset": "रीसेट गरौ", + "restore all settings to the default values": "सबै सेटिङहरूलाई मूल्यमा पुन: स्थापित गर्नुहोस्।", + "Done": "पूर्ण", + "Caption Settings Dialog": "कैप्शन सेटिंग्स डायलॉग", + "Beginning of dialog window. Escape will cancel and close the window.": "वार्ता विन्डोको प्रारम्भिक भाग।। Escape बटनले रद्द गर्दछ र विन्डोलाई बन्द गर्दछ।", + "End of dialog window.": "विन्डोको समाप्ति।", + "{1} is loading.": "{1} लोड हुँदैछ।", + "Exit Picture-in-Picture": "पिक्चर-इन-पिक्चर बाट बाहिर निस्कौ।", + "Picture-in-Picture": "पिक्चर-इन-पिक्चर" +} diff --git a/js/libs/videojs/lang/oc.js b/js/libs/videojs/lang/oc.js index d86b8a73..c58cd9e0 100644 --- a/js/libs/videojs/lang/oc.js +++ b/js/libs/videojs/lang/oc.js @@ -16,7 +16,7 @@ videojs.addLanguage('oc', { "Progress Bar": "Barra de progression", "progress bar timing: currentTime={1} duration={2}": "{1} sus {2}", "Fullscreen": "Ecran complèt", - "Non-Fullscreen": "Pas en ecran complèt", + "Exit Fullscreen": "Pas en ecran complèt", "Mute": "Copar lo son", "Unmute": "Restablir lo son", "Playback Rate": "Velocitat de lectura", @@ -68,7 +68,7 @@ videojs.addLanguage('oc', { "Raised": "Naut", "Depressed": "Enfonsat", "Uniform": "Unifòrme", - "Dropshadow": "Ombrat", + "Drop shadow": "Ombrat", "Font Family": "Familha de polissa", "Proportional Sans-Serif": "Sans-Serif proporcionala", "Monospace Sans-Serif": "Monospace Sans-Serif", @@ -83,5 +83,15 @@ videojs.addLanguage('oc', { "Caption Settings Dialog": "Fenèstra de paramètres de legenda", "Beginning of dialog window. Escape will cancel and close the window.": "Debuta de la fenèstra. Escapar anullarà e tamparà la fenèstra", "End of dialog window.": "Fin de la fenèstra.", - "{1} is loading.": "{1} es a cargar." + "{1} is loading.": "{1} es a cargar.", + "Exit Picture-in-Picture": "Sortir de la vidèo incrustada", + "Picture-in-Picture": "Vidèo incrustada", + "No content": "Cap de contengut", + "Color": "Color", + "Opacity": "Opacitat", + "Text Background": "Rèireplan del tèxte", + "Caption Area Background": "Rèireplan de la zòna de la legenda", + "Playing in Picture-in-Picture": "Lectura en vidèo incrustada", + "Skip backward {1} seconds": "Avançar de {1} segondas", + "Skip forward {1} seconds": "Recular de {1} segondas" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/oc.json b/js/libs/videojs/lang/oc.json index db9e8d76..7ffd11a8 100644 --- a/js/libs/videojs/lang/oc.json +++ b/js/libs/videojs/lang/oc.json @@ -16,7 +16,7 @@ "Progress Bar": "Barra de progression", "progress bar timing: currentTime={1} duration={2}": "{1} sus {2}", "Fullscreen": "Ecran complèt", - "Non-Fullscreen": "Pas en ecran complèt", + "Exit Fullscreen": "Pas en ecran complèt", "Mute": "Copar lo son", "Unmute": "Restablir lo son", "Playback Rate": "Velocitat de lectura", @@ -68,7 +68,7 @@ "Raised": "Naut", "Depressed": "Enfonsat", "Uniform": "Unifòrme", - "Dropshadow": "Ombrat", + "Drop shadow": "Ombrat", "Font Family": "Familha de polissa", "Proportional Sans-Serif": "Sans-Serif proporcionala", "Monospace Sans-Serif": "Monospace Sans-Serif", @@ -83,5 +83,15 @@ "Caption Settings Dialog": "Fenèstra de paramètres de legenda", "Beginning of dialog window. Escape will cancel and close the window.": "Debuta de la fenèstra. Escapar anullarà e tamparà la fenèstra", "End of dialog window.": "Fin de la fenèstra.", - "{1} is loading.": "{1} es a cargar." + "{1} is loading.": "{1} es a cargar.", + "Exit Picture-in-Picture": "Sortir de la vidèo incrustada", + "Picture-in-Picture": "Vidèo incrustada", + "No content": "Cap de contengut", + "Color": "Color", + "Opacity": "Opacitat", + "Text Background": "Rèireplan del tèxte", + "Caption Area Background": "Rèireplan de la zòna de la legenda", + "Playing in Picture-in-Picture": "Lectura en vidèo incrustada", + "Skip backward {1} seconds": "Avançar de {1} segondas", + "Skip forward {1} seconds": "Recular de {1} segondas" } diff --git a/js/libs/videojs/lang/pl.js b/js/libs/videojs/lang/pl.js index 789f3ab5..ae39d559 100644 --- a/js/libs/videojs/lang/pl.js +++ b/js/libs/videojs/lang/pl.js @@ -1,34 +1,90 @@ videojs.addLanguage('pl', { - "Play": "Odtwarzaj", - "Pause": "Pauza", + "Audio Player": "Odtwarzacz audio", + "Video Player": "Odtwarzacz wideo", + "Play": "Odtwórz", + "Pause": "Wstrzymaj", + "Replay": "Odtwórz ponownie", "Current Time": "Aktualny czas", "Duration": "Czas trwania", "Remaining Time": "Pozostały czas", "Stream Type": "Typ strumienia", "LIVE": "NA ŻYWO", + "Seek to live, currently behind live": "Przejdź do transmisji na żywo, obecnie trwa odtwarzanie z archiwum", + "Seek to live, currently playing live": "Przejdż do transmisji na żywo, obecnie trwa odtwarzanie na żywo", "Loaded": "Załadowany", "Progress": "Status", + "Progress Bar": "Pasek postępu", + "progress bar timing: currentTime={1} duration={2}": "{1} z {2}", "Fullscreen": "Pełny ekran", - "Non-Fullscreen": "Pełny ekran niedostępny", - "Mute": "Wyłącz dźwięk", - "Unmute": "Włącz dźwięk", - "Playback Rate": "Szybkość odtwarzania", + "Exit Fullscreen": "Pełny ekran niedostępny", + "Mute": "Wycisz", + "Unmute": "Wyłącz wyciszenie", + "Playback Rate": "Prędkość odtwarzania", "Subtitles": "Napisy", "subtitles off": "Napisy wyłączone", "Captions": "Transkrypcja", "captions off": "Transkrypcja wyłączona", "Chapters": "Rozdziały", + "Descriptions": "Opisy", + "descriptions off": "Opisy wyłączone", + "Audio Track": "Ścieżka audio", + "Volume Level": "Poziom głośności", "You aborted the media playback": "Odtwarzanie zostało przerwane", - "A network error caused the media download to fail part-way.": "Problemy z siecią spowodowały błąd przy pobieraniu materiału wideo.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Materiał wideo nie może być załadowany, ponieważ wystąpił problem z siecią lub format nie jest obsługiwany", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Odtwarzanie materiału wideo zostało przerwane z powodu uszkodzonego pliku wideo lub z powodu błędu funkcji, które nie są wspierane przez przeglądarkę.", - "No compatible source was found for this media.": "Dla tego materiału wideo nie znaleziono kompatybilnego źródła.", - "Play Video": "Odtwarzaj wideo", + "A network error caused the media download to fail part-way.": "Błąd sieci spowodował częściowe niepowodzenie pobierania materiału wideo.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Materiał wideo nie może zostać załadowany, ponieważ wystąpił problem z serwerem lub siecią albo format materiału wideo nie jest obsługiwany", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Odtwarzanie materiału wideo zostało przerwane z powodu uszkodzonego pliku wideo lub z powodu użycia funkcji multimediów nieobsługiwanych przez Twoją przeglądarkę.", + "No compatible source was found for this media.": "Nie znaleziono kompatybilnego źródła dla tego typu materiału wideo.", + "The media is encrypted and we do not have the keys to decrypt it.": "Materiał jest zaszyfrowany, a nie mamy kluczy do jego odszyfrowania.", + "Play Video": "Odtwórz wideo", "Close": "Zamknij", - "Modal Window": "Okno Modala", - "This is a modal window": "To jest okno modala", - "This modal can be closed by pressing the Escape key or activating the close button.": "Ten modal możesz zamknąć naciskając przycisk Escape albo wybierając przycisk Zamknij.", + "Close Modal Dialog": "Zamknij okno modalne", + "Modal Window": "Okno modalne", + "This is a modal window": "To jest okno modalne", + "This modal can be closed by pressing the Escape key or activating the close button.": "To okno modalne możesz zamknąć, naciskając klawisz Escape albo wybierając przycisk Zamknij.", ", opens captions settings dialog": ", otwiera okno dialogowe ustawień transkrypcji", ", opens subtitles settings dialog": ", otwiera okno dialogowe napisów", - ", selected": ", zaznaczone" + ", opens descriptions settings dialog": ", otwiera okno dialogowe opisów", + ", selected": ", zaznaczone", + "captions settings": "ustawienia transkrypcji", + "subtitles settings": "ustawienia napisów", + "descriptions settings": "ustawienia opisów", + "Text": "Tekst", + "White": "Biały", + "Black": "Czarny", + "Red": "Czerwony", + "Green": "Zielony", + "Blue": "Niebieski", + "Yellow": "Żółty", + "Magenta": "Karmazynowy", + "Cyan": "Cyjanowy", + "Background": "Tło", + "Window": "Okno", + "Transparent": "Przezroczysty", + "Semi-Transparent": "Półprzezroczysty", + "Opaque": "Nieprzezroczysty", + "Font Size": "Rozmiar czcionki", + "Text Edge Style": "Styl krawędzi tekstu", + "None": "Brak", + "Raised": "Podniesiony", + "Depressed": "Obniżony", + "Uniform": "Równomierny", + "Dropshadow": "Cień", + "Font Family": "Krój czcionki", + "Proportional Sans-Serif": "Bezszeryfowa, proporcjonalna", + "Monospace Sans-Serif": "Bezszeryfowa, stała odległość znaków", + "Proportional Serif": "Szeryfowa, proporcjonalna", + "Monospace Serif": "Szeryfowa, stała odległość znaków", + "Casual": "Casual", + "Script": "Script", + "Small Caps": "Kapitaliki", + "Reset": "Ustawienia domyślne", + "restore all settings to the default values": "zresetuj wszystkie ustawienia do domyślnych wartości", + "Done": "Gotowe", + "Caption Settings Dialog": "Okno dialogowe ustawień transkrypcji", + "Beginning of dialog window. Escape will cancel and close the window.": "Początek okna dialogowego. Klawisz Escape anuluje i zamyka okno.", + "End of dialog window.": "Koniec okna dialogowego.", + "{1} is loading.": "Wczytywanie pliku {1}.", + "Exit Picture-in-Picture": "Wyjdź z trybu obraz w obrazie", + "Picture-in-Picture": "Obraz w obrazie", + "No content": "Brak zawartości" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/pl.json b/js/libs/videojs/lang/pl.json index e22c36c0..8881b861 100644 --- a/js/libs/videojs/lang/pl.json +++ b/js/libs/videojs/lang/pl.json @@ -1,34 +1,90 @@ { - "Play": "Odtwarzaj", - "Pause": "Pauza", + "Audio Player": "Odtwarzacz audio", + "Video Player": "Odtwarzacz wideo", + "Play": "Odtwórz", + "Pause": "Wstrzymaj", + "Replay": "Odtwórz ponownie", "Current Time": "Aktualny czas", "Duration": "Czas trwania", "Remaining Time": "Pozostały czas", "Stream Type": "Typ strumienia", "LIVE": "NA ŻYWO", + "Seek to live, currently behind live": "Przejdź do transmisji na żywo, obecnie trwa odtwarzanie z archiwum", + "Seek to live, currently playing live": "Przejdż do transmisji na żywo, obecnie trwa odtwarzanie na żywo", "Loaded": "Załadowany", "Progress": "Status", + "Progress Bar": "Pasek postępu", + "progress bar timing: currentTime={1} duration={2}": "{1} z {2}", "Fullscreen": "Pełny ekran", - "Non-Fullscreen": "Pełny ekran niedostępny", - "Mute": "Wyłącz dźwięk", - "Unmute": "Włącz dźwięk", - "Playback Rate": "Szybkość odtwarzania", + "Exit Fullscreen": "Pełny ekran niedostępny", + "Mute": "Wycisz", + "Unmute": "Wyłącz wyciszenie", + "Playback Rate": "Prędkość odtwarzania", "Subtitles": "Napisy", "subtitles off": "Napisy wyłączone", "Captions": "Transkrypcja", "captions off": "Transkrypcja wyłączona", "Chapters": "Rozdziały", + "Descriptions": "Opisy", + "descriptions off": "Opisy wyłączone", + "Audio Track": "Ścieżka audio", + "Volume Level": "Poziom głośności", "You aborted the media playback": "Odtwarzanie zostało przerwane", - "A network error caused the media download to fail part-way.": "Problemy z siecią spowodowały błąd przy pobieraniu materiału wideo.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Materiał wideo nie może być załadowany, ponieważ wystąpił problem z siecią lub format nie jest obsługiwany", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Odtwarzanie materiału wideo zostało przerwane z powodu uszkodzonego pliku wideo lub z powodu błędu funkcji, które nie są wspierane przez przeglądarkę.", - "No compatible source was found for this media.": "Dla tego materiału wideo nie znaleziono kompatybilnego źródła.", - "Play Video": "Odtwarzaj wideo", + "A network error caused the media download to fail part-way.": "Błąd sieci spowodował częściowe niepowodzenie pobierania materiału wideo.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Materiał wideo nie może zostać załadowany, ponieważ wystąpił problem z serwerem lub siecią albo format materiału wideo nie jest obsługiwany", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Odtwarzanie materiału wideo zostało przerwane z powodu uszkodzonego pliku wideo lub z powodu użycia funkcji multimediów nieobsługiwanych przez Twoją przeglądarkę.", + "No compatible source was found for this media.": "Nie znaleziono kompatybilnego źródła dla tego typu materiału wideo.", + "The media is encrypted and we do not have the keys to decrypt it.": "Materiał jest zaszyfrowany, a nie mamy kluczy do jego odszyfrowania.", + "Play Video": "Odtwórz wideo", "Close": "Zamknij", - "Modal Window": "Okno Modala", - "This is a modal window": "To jest okno modala", - "This modal can be closed by pressing the Escape key or activating the close button.": "Ten modal możesz zamknąć naciskając przycisk Escape albo wybierając przycisk Zamknij.", + "Close Modal Dialog": "Zamknij okno modalne", + "Modal Window": "Okno modalne", + "This is a modal window": "To jest okno modalne", + "This modal can be closed by pressing the Escape key or activating the close button.": "To okno modalne możesz zamknąć, naciskając klawisz Escape albo wybierając przycisk Zamknij.", ", opens captions settings dialog": ", otwiera okno dialogowe ustawień transkrypcji", ", opens subtitles settings dialog": ", otwiera okno dialogowe napisów", - ", selected": ", zaznaczone" + ", opens descriptions settings dialog": ", otwiera okno dialogowe opisów", + ", selected": ", zaznaczone", + "captions settings": "ustawienia transkrypcji", + "subtitles settings": "ustawienia napisów", + "descriptions settings": "ustawienia opisów", + "Text": "Tekst", + "White": "Biały", + "Black": "Czarny", + "Red": "Czerwony", + "Green": "Zielony", + "Blue": "Niebieski", + "Yellow": "Żółty", + "Magenta": "Karmazynowy", + "Cyan": "Cyjanowy", + "Background": "Tło", + "Window": "Okno", + "Transparent": "Przezroczysty", + "Semi-Transparent": "Półprzezroczysty", + "Opaque": "Nieprzezroczysty", + "Font Size": "Rozmiar czcionki", + "Text Edge Style": "Styl krawędzi tekstu", + "None": "Brak", + "Raised": "Podniesiony", + "Depressed": "Obniżony", + "Uniform": "Równomierny", + "Dropshadow": "Cień", + "Font Family": "Krój czcionki", + "Proportional Sans-Serif": "Bezszeryfowa, proporcjonalna", + "Monospace Sans-Serif": "Bezszeryfowa, stała odległość znaków", + "Proportional Serif": "Szeryfowa, proporcjonalna", + "Monospace Serif": "Szeryfowa, stała odległość znaków", + "Casual": "Casual", + "Script": "Script", + "Small Caps": "Kapitaliki", + "Reset": "Ustawienia domyślne", + "restore all settings to the default values": "zresetuj wszystkie ustawienia do domyślnych wartości", + "Done": "Gotowe", + "Caption Settings Dialog": "Okno dialogowe ustawień transkrypcji", + "Beginning of dialog window. Escape will cancel and close the window.": "Początek okna dialogowego. Klawisz Escape anuluje i zamyka okno.", + "End of dialog window.": "Koniec okna dialogowego.", + "{1} is loading.": "Wczytywanie pliku {1}.", + "Exit Picture-in-Picture": "Wyjdź z trybu obraz w obrazie", + "Picture-in-Picture": "Obraz w obrazie", + "No content": "Brak zawartości" } diff --git a/js/libs/videojs/lang/pt-BR.js b/js/libs/videojs/lang/pt-BR.js index 582f84a8..184b2e89 100644 --- a/js/libs/videojs/lang/pt-BR.js +++ b/js/libs/videojs/lang/pt-BR.js @@ -14,9 +14,9 @@ videojs.addLanguage('pt-BR', { "Progress Bar": "Barra de progresso", "progress bar timing: currentTime={1} duration={2}": "{1} de {2}", "Fullscreen": "Tela Cheia", - "Non-Fullscreen": "Tela Normal", + "Exit Fullscreen": "Tela Normal", "Mute": "Mudo", - "Unmute": "Habilitar Som", + "Unmute": "Ativar o som", "Playback Rate": "Velocidade", "Subtitles": "Legendas", "subtitles off": "Sem Legendas", @@ -66,7 +66,7 @@ videojs.addLanguage('pt-BR', { "Raised": "Elevado", "Depressed": "Acachapado", "Uniform": "Uniforme", - "Dropshadow": "Sombra de projeção", + "Drop shadow": "Sombra de projeção", "Font Family": "Família da Fonte", "Proportional Sans-Serif": "Sans-Serif(Sem serifa) Proporcional", "Monospace Sans-Serif": "Sans-Serif(Sem serifa) Monoespaçada", diff --git a/js/libs/videojs/lang/pt-BR.json b/js/libs/videojs/lang/pt-BR.json index 0ce4e54c..8b8a31dd 100644 --- a/js/libs/videojs/lang/pt-BR.json +++ b/js/libs/videojs/lang/pt-BR.json @@ -14,9 +14,9 @@ "Progress Bar": "Barra de progresso", "progress bar timing: currentTime={1} duration={2}": "{1} de {2}", "Fullscreen": "Tela Cheia", - "Non-Fullscreen": "Tela Normal", + "Exit Fullscreen": "Tela Normal", "Mute": "Mudo", - "Unmute": "Habilitar Som", + "Unmute": "Ativar o som", "Playback Rate": "Velocidade", "Subtitles": "Legendas", "subtitles off": "Sem Legendas", @@ -67,7 +67,7 @@ "Raised": "Elevado", "Depressed": "Acachapado", "Uniform": "Uniforme", - "Dropshadow": "Sombra de projeção", + "Drop shadow": "Sombra de projeção", "Font Family": "Família da Fonte", "Proportional Sans-Serif": "Sans-Serif(Sem serifa) Proporcional", "Monospace Sans-Serif": "Sans-Serif(Sem serifa) Monoespaçada", diff --git a/js/libs/videojs/lang/pt-PT.js b/js/libs/videojs/lang/pt-PT.js index ed85f68e..86882a0e 100644 --- a/js/libs/videojs/lang/pt-PT.js +++ b/js/libs/videojs/lang/pt-PT.js @@ -10,7 +10,7 @@ videojs.addLanguage('pt-PT', { "Loaded": "Carregado", "Progress": "Progresso", "Fullscreen": "Ecrã inteiro", - "Non-Fullscreen": "Ecrã normal", + "Exit Fullscreen": "Ecrã normal", "Mute": "Desativar som", "Unmute": "Ativar som", "Playback Rate": "Velocidade de reprodução", @@ -37,5 +37,7 @@ videojs.addLanguage('pt-PT', { ", opens captions settings dialog": ", abre janela com definições de legendas", ", opens subtitles settings dialog": ", abre janela com definições de legendas", ", opens descriptions settings dialog": ", abre janela com definições de descrições", - ", selected": ", seleccionado" + ", selected": ", seleccionado", + "Skip backward {1} seconds": "Recuar de {1} segundos", + "Skip forward {1} seconds": "Avançar de {1} segundos" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/pt-PT.json b/js/libs/videojs/lang/pt-PT.json index 39d8c664..66af48b1 100644 --- a/js/libs/videojs/lang/pt-PT.json +++ b/js/libs/videojs/lang/pt-PT.json @@ -10,7 +10,7 @@ "Loaded": "Carregado", "Progress": "Progresso", "Fullscreen": "Ecrã inteiro", - "Non-Fullscreen": "Ecrã normal", + "Exit Fullscreen": "Ecrã normal", "Mute": "Desativar som", "Unmute": "Ativar som", "Playback Rate": "Velocidade de reprodução", @@ -37,5 +37,7 @@ ", opens captions settings dialog": ", abre janela com definições de legendas", ", opens subtitles settings dialog": ", abre janela com definições de legendas", ", opens descriptions settings dialog": ", abre janela com definições de descrições", - ", selected": ", seleccionado" -} \ No newline at end of file + ", selected": ", seleccionado", + "Skip backward {1} seconds": "Recuar de {1} segundos", + "Skip forward {1} seconds": "Avançar de {1} segundos" +} diff --git a/js/libs/videojs/lang/ro.js b/js/libs/videojs/lang/ro.js index 824d89e8..2d66b469 100644 --- a/js/libs/videojs/lang/ro.js +++ b/js/libs/videojs/lang/ro.js @@ -16,7 +16,7 @@ videojs.addLanguage('ro', { "Progress Bar": "Bară de progres", "progress bar timing: currentTime={1} duration={2}": "{1} din {2}", "Fullscreen": "Ecran complet", - "Non-Fullscreen": "Ecran parțial", + "Exit Fullscreen": "Ecran parțial", "Mute": "Suprimare sunet", "Unmute": "Activare sunet", "Playback Rate": "Rată de redare", diff --git a/js/libs/videojs/lang/ro.json b/js/libs/videojs/lang/ro.json index bed65d61..a4a60de7 100644 --- a/js/libs/videojs/lang/ro.json +++ b/js/libs/videojs/lang/ro.json @@ -16,7 +16,7 @@ "Progress Bar": "Bară de progres", "progress bar timing: currentTime={1} duration={2}": "{1} din {2}", "Fullscreen": "Ecran complet", - "Non-Fullscreen": "Ecran parțial", + "Exit Fullscreen": "Ecran parțial", "Mute": "Suprimare sunet", "Unmute": "Activare sunet", "Playback Rate": "Rată de redare", diff --git a/js/libs/videojs/lang/ru.js b/js/libs/videojs/lang/ru.js index 973daf3f..67833641 100644 --- a/js/libs/videojs/lang/ru.js +++ b/js/libs/videojs/lang/ru.js @@ -1,6 +1,6 @@ videojs.addLanguage('ru', { - "Audio Player": "Аудио проигрыватель", - "Video Player": "Видео проигрыватель", + "Audio Player": "Аудиоплеер", + "Video Player": "Видеоплеер", "Play": "Воспроизвести", "Pause": "Приостановить", "Replay": "Воспроизвести снова", @@ -8,13 +8,15 @@ videojs.addLanguage('ru', { "Duration": "Продолжительность", "Remaining Time": "Оставшееся время", "Stream Type": "Тип потока", - "LIVE": "ОНЛАЙН", + "LIVE": "ПРЯМОЙ ЭФИР", + "Seek to live, currently behind live": "Переход к прямому эфиру (воспроизведение идёт с отставанием)", + "Seek to live, currently playing live": "Переход к прямому эфиру (воспроизведение идёт без отставания)", "Loaded": "Загрузка", "Progress": "Прогресс", "Progress Bar": "Индикатор загрузки", "progress bar timing: currentTime={1} duration={2}": "{1} из {2}", "Fullscreen": "Полноэкранный режим", - "Non-Fullscreen": "Неполноэкранный режим", + "Exit Fullscreen": "Неполноэкранный режим", "Mute": "Без звука", "Unmute": "Со звуком", "Playback Rate": "Скорость воспроизведения", @@ -28,11 +30,11 @@ videojs.addLanguage('ru', { "Audio Track": "Звуковая дорожка", "Volume Level": "Уровень громкости", "You aborted the media playback": "Вы прервали воспроизведение видео", - "A network error caused the media download to fail part-way.": "Ошибка сети вызвала сбой во время загрузки видео.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Невозможно загрузить видео из-за сетевого или серверного сбоя либо формат не поддерживается.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Воспроизведение видео было приостановлено из-за повреждения либо в связи с тем, что видео использует функции, неподдерживаемые вашим браузером.", + "A network error caused the media download to fail part-way.": "Ошибка сети вызвала сбой во время загрузки.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Не удалось загрузить видео из-за сетевого или серверного сбоя либо неподдерживаемого формата видео.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Воспроизведение прервано из-за повреждения либо в связи с тем, что видео использует функции, неподдерживаемые вашим браузером.", "No compatible source was found for this media.": "Совместимые источники для этого видео отсутствуют.", - "The media is encrypted and we do not have the keys to decrypt it.": "Видео в зашифрованном виде, и у нас нет ключей для расшифровки.", + "The media is encrypted and we do not have the keys to decrypt it.": "Видео зашифровано, а у нас нет ключей для его расшифровки.", "Play Video": "Воспроизвести видео", "Close": "Закрыть", "Close Modal Dialog": "Закрыть модальное окно", @@ -66,20 +68,24 @@ videojs.addLanguage('ru', { "Raised": "Поднятый", "Depressed": "Пониженный", "Uniform": "Одинаковый", - "Dropshadow": "Тень", + "Drop shadow": "Тень", "Font Family": "Шрифт", "Proportional Sans-Serif": "Пропорциональный без засечек", "Monospace Sans-Serif": "Моноширинный без засечек", "Proportional Serif": "Пропорциональный с засечками", "Monospace Serif": "Моноширинный с засечками", - "Casual": "Случайный", - "Script": "Письменный", - "Small Caps": "Малые прописные", + "Casual": "Казуальный", + "Script": "Рукописный", + "Small Caps": "Капитель", "Reset": "Сбросить", - "restore all settings to the default values": "сбросить все найстройки по умолчанию", + "restore all settings to the default values": "сбросить все настройки на значения по умолчанию", "Done": "Готово", "Caption Settings Dialog": "Диалог настроек подписи", - "Beginning of dialog window. Escape will cancel and close the window.": "Начало диалоговго окна. Кнопка Escape закроет или отменит окно", + "Beginning of dialog window. Escape will cancel and close the window.": "Начало диалогового окна. Нажмите Escape для отмены и закрытия окна", "End of dialog window.": "Конец диалогового окна.", - "{1} is loading.": "{1} загружается." + "{1} is loading.": "{1} загружается.", + "Exit Picture-in-Picture": "Закрыть картинку в картинке", + "Picture-in-Picture": "Картинка в картинке", + "Skip forward {1} seconds": "На {1} секунд вперед", + "Skip backward {1} seconds": "На {1} секунд назад" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/ru.json b/js/libs/videojs/lang/ru.json index eb6b33f8..004cbd34 100644 --- a/js/libs/videojs/lang/ru.json +++ b/js/libs/videojs/lang/ru.json @@ -1,6 +1,6 @@ { - "Audio Player": "Аудио проигрыватель", - "Video Player": "Видео проигрыватель", + "Audio Player": "Аудиоплеер", + "Video Player": "Видеоплеер", "Play": "Воспроизвести", "Pause": "Приостановить", "Replay": "Воспроизвести снова", @@ -8,13 +8,15 @@ "Duration": "Продолжительность", "Remaining Time": "Оставшееся время", "Stream Type": "Тип потока", - "LIVE": "ОНЛАЙН", + "LIVE": "ПРЯМОЙ ЭФИР", + "Seek to live, currently behind live": "Переход к прямому эфиру (воспроизведение идёт с отставанием)", + "Seek to live, currently playing live": "Переход к прямому эфиру (воспроизведение идёт без отставания)", "Loaded": "Загрузка", "Progress": "Прогресс", "Progress Bar": "Индикатор загрузки", "progress bar timing: currentTime={1} duration={2}": "{1} из {2}", "Fullscreen": "Полноэкранный режим", - "Non-Fullscreen": "Неполноэкранный режим", + "Exit Fullscreen": "Неполноэкранный режим", "Mute": "Без звука", "Unmute": "Со звуком", "Playback Rate": "Скорость воспроизведения", @@ -28,11 +30,11 @@ "Audio Track": "Звуковая дорожка", "Volume Level": "Уровень громкости", "You aborted the media playback": "Вы прервали воспроизведение видео", - "A network error caused the media download to fail part-way.": "Ошибка сети вызвала сбой во время загрузки видео.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Невозможно загрузить видео из-за сетевого или серверного сбоя либо формат не поддерживается.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Воспроизведение видео было приостановлено из-за повреждения либо в связи с тем, что видео использует функции, неподдерживаемые вашим браузером.", + "A network error caused the media download to fail part-way.": "Ошибка сети вызвала сбой во время загрузки.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Не удалось загрузить видео из-за сетевого или серверного сбоя либо неподдерживаемого формата видео.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Воспроизведение прервано из-за повреждения либо в связи с тем, что видео использует функции, неподдерживаемые вашим браузером.", "No compatible source was found for this media.": "Совместимые источники для этого видео отсутствуют.", - "The media is encrypted and we do not have the keys to decrypt it.": "Видео в зашифрованном виде, и у нас нет ключей для расшифровки.", + "The media is encrypted and we do not have the keys to decrypt it.": "Видео зашифровано, а у нас нет ключей для его расшифровки.", "Play Video": "Воспроизвести видео", "Close": "Закрыть", "Close Modal Dialog": "Закрыть модальное окно", @@ -66,20 +68,24 @@ "Raised": "Поднятый", "Depressed": "Пониженный", "Uniform": "Одинаковый", - "Dropshadow": "Тень", + "Drop shadow": "Тень", "Font Family": "Шрифт", "Proportional Sans-Serif": "Пропорциональный без засечек", "Monospace Sans-Serif": "Моноширинный без засечек", "Proportional Serif": "Пропорциональный с засечками", "Monospace Serif": "Моноширинный с засечками", - "Casual": "Случайный", - "Script": "Письменный", - "Small Caps": "Малые прописные", + "Casual": "Казуальный", + "Script": "Рукописный", + "Small Caps": "Капитель", "Reset": "Сбросить", - "restore all settings to the default values": "сбросить все найстройки по умолчанию", + "restore all settings to the default values": "сбросить все настройки на значения по умолчанию", "Done": "Готово", "Caption Settings Dialog": "Диалог настроек подписи", - "Beginning of dialog window. Escape will cancel and close the window.": "Начало диалоговго окна. Кнопка Escape закроет или отменит окно", + "Beginning of dialog window. Escape will cancel and close the window.": "Начало диалогового окна. Нажмите Escape для отмены и закрытия окна", "End of dialog window.": "Конец диалогового окна.", - "{1} is loading.": "{1} загружается." + "{1} is loading.": "{1} загружается.", + "Exit Picture-in-Picture": "Закрыть картинку в картинке", + "Picture-in-Picture": "Картинка в картинке", + "Skip forward {1} seconds": "На {1} секунд вперед", + "Skip backward {1} seconds": "На {1} секунд назад" } diff --git a/js/libs/videojs/lang/sk.js b/js/libs/videojs/lang/sk.js index e3f9d800..5926628f 100644 --- a/js/libs/videojs/lang/sk.js +++ b/js/libs/videojs/lang/sk.js @@ -14,7 +14,7 @@ videojs.addLanguage('sk', { "Progress Bar": "Ukazovateľ priebehu", "progress bar timing: currentTime={1} duration={2}": "časovanie ukazovateľa priebehu: currentTime={1} duration={2}", "Fullscreen": "Režim celej obrazovky", - "Non-Fullscreen": "Režim normálnej obrazovky", + "Exit Fullscreen": "Režim normálnej obrazovky", "Mute": "Stlmiť", "Unmute": "Zrušiť stlmenie", "Playback Rate": "Rýchlosť prehrávania", diff --git a/js/libs/videojs/lang/sk.json b/js/libs/videojs/lang/sk.json index 9c3f560a..b2ec8e23 100644 --- a/js/libs/videojs/lang/sk.json +++ b/js/libs/videojs/lang/sk.json @@ -14,7 +14,7 @@ "Progress Bar": "Ukazovateľ priebehu", "progress bar timing: currentTime={1} duration={2}": "časovanie ukazovateľa priebehu: currentTime={1} duration={2}", "Fullscreen": "Režim celej obrazovky", - "Non-Fullscreen": "Režim normálnej obrazovky", + "Exit Fullscreen": "Režim normálnej obrazovky", "Mute": "Stlmiť", "Unmute": "Zrušiť stlmenie", "Playback Rate": "Rýchlosť prehrávania", diff --git a/js/libs/videojs/lang/sl.js b/js/libs/videojs/lang/sl.js index f0284d3e..423f2b53 100644 --- a/js/libs/videojs/lang/sl.js +++ b/js/libs/videojs/lang/sl.js @@ -16,7 +16,7 @@ videojs.addLanguage('sl', { "Progress Bar": "Vrstica napredka", "progress bar timing: currentTime={1} duration={2}": "{1} od {2}", "Fullscreen": "Celozaslonski prikaz", - "Non-Fullscreen": "Prikaz na delu zaslona", + "Exit Fullscreen": "Prikaz na delu zaslona", "Mute": "Izključi zvok", "Unmute": "Vključi zvok", "Playback Rate": "Hitrost predvajanja", @@ -68,7 +68,7 @@ videojs.addLanguage('sl', { "Raised": "Dvignjeno", "Depressed": "Vtisnjeno", "Uniform": "Enakomerno", - "Dropshadow": "S senco", + "Drop shadow": "S senco", "Font Family": "Družina pisave", "Small Caps": "Male črke", "Reset": "Ponastavi", diff --git a/js/libs/videojs/lang/sl.json b/js/libs/videojs/lang/sl.json index 0ddc50cb..6a705d41 100644 --- a/js/libs/videojs/lang/sl.json +++ b/js/libs/videojs/lang/sl.json @@ -16,7 +16,7 @@ "Progress Bar": "Vrstica napredka", "progress bar timing: currentTime={1} duration={2}": "{1} od {2}", "Fullscreen": "Celozaslonski prikaz", - "Non-Fullscreen": "Prikaz na delu zaslona", + "Exit Fullscreen": "Prikaz na delu zaslona", "Mute": "Izključi zvok", "Unmute": "Vključi zvok", "Playback Rate": "Hitrost predvajanja", @@ -68,7 +68,7 @@ "Raised": "Dvignjeno", "Depressed": "Vtisnjeno", "Uniform": "Enakomerno", - "Dropshadow": "S senco", + "Drop shadow": "S senco", "Font Family": "Družina pisave", "Small Caps": "Male črke", "Reset": "Ponastavi", diff --git a/js/libs/videojs/lang/sr.js b/js/libs/videojs/lang/sr.js index ba81d4dd..3071b78b 100644 --- a/js/libs/videojs/lang/sr.js +++ b/js/libs/videojs/lang/sr.js @@ -9,7 +9,7 @@ videojs.addLanguage('sr', { "Loaded": "Učitan", "Progress": "Progres", "Fullscreen": "Pun ekran", - "Non-Fullscreen": "Mali ekran", + "Exit Fullscreen": "Mali ekran", "Mute": "Prigušen", "Unmute": "Ne-prigušen", "Playback Rate": "Stopa reprodukcije", diff --git a/js/libs/videojs/lang/sr.json b/js/libs/videojs/lang/sr.json index 512466c8..87884ba4 100644 --- a/js/libs/videojs/lang/sr.json +++ b/js/libs/videojs/lang/sr.json @@ -9,7 +9,7 @@ "Loaded": "Učitan", "Progress": "Progres", "Fullscreen": "Pun ekran", - "Non-Fullscreen": "Mali ekran", + "Exit Fullscreen": "Mali ekran", "Mute": "Prigušen", "Unmute": "Ne-prigušen", "Playback Rate": "Stopa reprodukcije", diff --git a/js/libs/videojs/lang/sv.js b/js/libs/videojs/lang/sv.js index 71422ef0..8ce24f20 100644 --- a/js/libs/videojs/lang/sv.js +++ b/js/libs/videojs/lang/sv.js @@ -21,7 +21,7 @@ videojs.addLanguage('sv', { "Depressed": "Deprimerad", "Descriptions": "Beskrivningar", "Done": "Klar", - "Dropshadow": "DropSkugga", + "Drop shadow": "DropSkugga", "Duration": "Total tid", "End of dialog window.": "Slutet av dialogfönster.", "Font Family": "Typsnittsfamilj", @@ -36,7 +36,7 @@ videojs.addLanguage('sv', { "Monospace Serif": "Monospace Serif", "Mute": "Ljud av", "No compatible source was found for this media.": "Det gick inte att hitta någon kompatibel källa för den här videon.", - "Non-Fullscreen": "Ej fullskärm", + "Exit Fullscreen": "Ej fullskärm", "None": "Ingen", "Opaque": "Opak", "Pause": "Pausa", diff --git a/js/libs/videojs/lang/sv.json b/js/libs/videojs/lang/sv.json index dc020f2f..889269c7 100644 --- a/js/libs/videojs/lang/sv.json +++ b/js/libs/videojs/lang/sv.json @@ -21,7 +21,7 @@ "Depressed": "Deprimerad", "Descriptions": "Beskrivningar", "Done": "Klar", - "Dropshadow": "DropSkugga", + "Drop shadow": "DropSkugga", "Duration": "Total tid", "End of dialog window.": "Slutet av dialogfönster.", "Font Family": "Typsnittsfamilj", @@ -36,7 +36,7 @@ "Monospace Serif": "Monospace Serif", "Mute": "Ljud av", "No compatible source was found for this media.": "Det gick inte att hitta någon kompatibel källa för den här videon.", - "Non-Fullscreen": "Ej fullskärm", + "Exit Fullscreen": "Ej fullskärm", "None": "Ingen", "Opaque": "Opak", "Pause": "Pausa", diff --git a/js/libs/videojs/lang/te.js b/js/libs/videojs/lang/te.js new file mode 100644 index 00000000..1b2db336 --- /dev/null +++ b/js/libs/videojs/lang/te.js @@ -0,0 +1,89 @@ +videojs.addLanguage('te', { + "Audio Player": "ఆడియో ప్లేయర్", + "Video Player": "వీడియో ప్లేయర్", + "Play": "ప్లే", + "Pause": "పాజ్", + "Replay": "రీప్లే", + "Current Time": "ప్రస్తుత సమయం", + "Duration": "వ్యవధి", + "Remaining Time": "మిగిలిన సమయం", + "Stream Type": "స్ట్రీమ్ రకం", + "LIVE": "లైవ్", + "Seek to live, currently behind live": "ప్రత్యక్ష ప్రసారానికి వెళ్ళండి, ప్రస్తుతం ప్రత్యక్ష ప్రసారానికి వెనుకబడి ఉంది", + "Seek to live, currently playing live": "ప్రత్యక్ష ప్రసారానికి వెళ్ళండి, ప్రస్తుతం ప్రత్యక్ష ప్రసారం అవుతోంది", + "Loaded": "లోడ్ చేయబడింది", + "Progress": "పురోగతి", + "Progress Bar": "ప్రోగ్రెస్ బార్", + "progress bar timing: currentTime={1} duration={2}": "{1} యొక్క {2}", + "Fullscreen": "పూర్తి స్క్రీన్", + "Exit Fullscreen": "పూర్తి స్క్రీన్ నుండి నిష్క్రమించండి", + "Mute": "మ్యూట్", + "Unmute": "అన్మ్యూట్ చేయండి", + "Playback Rate": "ప్లేబ్యాక్ రేట్", + "Subtitles": "ఉపశీర్షికలు", + "subtitles off": "ఉపశీర్షికలు ఆఫ్ చేయండి", + "Captions": "శీర్షికలు", + "captions off": "శీర్షికలు ఆఫ్ చేయండి", + "Chapters": "అధ్యాయాలు", + "Descriptions": "వివరణలు", + "descriptions off": "వివరణలు ఆఫ్ చేయండి", + "Audio Track": "ఆడియో ట్రాక్", + "Volume Level": "వాల్యూమ్ స్థాయి", + "You aborted the media playback": "మీరు మీడియా ప్లేబ్యాక్‌ను రద్దు చేశారు", + "A network error caused the media download to fail part-way.": "నెట్‌వర్క్ లోపం వలన మీడియా డౌన్‌లోడ్ విఫలమైంది.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "సర్వర్ లేదా నెట్‌వర్క్ విఫలమైనందున లేదా ఫార్మాట్‌కు మద్దతు లేనందున మీడియాను లోడ్ చేయడం సాధ్యం కాలేదు.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "అవినీతి సమస్య కారణంగా లేదా మీ బ్రౌజర్ మద్దతు ఇవ్వని లక్షణాలను మీడియా ఉపయోగించినందున మీడియా ప్లేబ్యాక్ నిలిపివేయబడింది.", + "No compatible source was found for this media.": "ఈ మీడియాకు అనుకూలమైన మూలం కనుగొనబడలేదు.", + "The media is encrypted and we do not have the keys to decrypt it.": "మీడియా గుప్తీకరించబడింది మరియు దానిని డీక్రిప్ట్ చేయడానికి మాకు కీలు లేవు.", + "Play Video": "వీడియో ప్లే చేయండి", + "Close": "మూసివేయండి", + "Close Modal Dialog": "మోడల్ డైలాగ్‌ను మూసివేయండి", + "Modal Window": "మోడల్ విండో", + "This is a modal window": "ఇది మోడల్ విండో", + "This modal can be closed by pressing the Escape key or activating the close button.": "ఎస్కేప్ కీని నొక్కడం ద్వారా లేదా క్లోజ్ బటన్‌ను యాక్టివేట్ చేయడం ద్వారా ఈ మోడల్‌ను మూసివేయవచ్చు.", + ", opens captions settings dialog": ", శీర్షికల సెట్టింగ్‌ల డైలాగ్‌ను తెరుస్తుంది", + ", opens subtitles settings dialog": ", ఉపశీర్షికల సెట్టింగుల డైలాగ్‌ను తెరుస్తుంది", + ", opens descriptions settings dialog": ", వివరణల సెట్టింగుల డైలాగ్‌ను తెరుస్తుంది", + ", selected": ", ఎంచుకోబడింది", + "captions settings": "శీర్షికల సెట్టింగులు", + "subtitles settings": "ఉపశీర్షికల సెట్టింగులు", + "descriptions settings": "వివరణల సెట్టింగులు", + "Text": "వచనం", + "White": "తెలుపు", + "Black": "నలుపు", + "Red": "ఎరుపు", + "Green": "ఆకుపచ్చ", + "Blue": "నీలం", + "Yellow": "పసుపు", + "Magenta": "మెజెంటా", + "Cyan": "సియాన్", + "Background": "నేపధ్యం", + "Window": "కిటికీ", + "Transparent": "పారదర్శక", + "Semi-Transparent": "సెమీ-పారదర్శక", + "Opaque": "అపారదర్శక", + "Font Size": "ఫాంట్ పరిమాణం", + "Text Edge Style": "టెక్స్ట్ ఎడ్జ్ శైలి", + "None": "ఏదీ లేదు", + "Raised": "పెంచబడింది", + "Depressed": "అణగారిన", + "Uniform": "ఏకరీతి", + "Drop shadow": "డ్రాప్‌షాడో", + "Font Family": "ఫాంట్ కుటుంబం", + "Proportional Sans-Serif": "ప్రొపోర్షన్ సాన్స్-సెరిఫ్", + "Monospace Sans-Serif": "మోనోస్పేస్ సాన్స్-సెరిఫ్", + "Proportional Serif": "ప్రొపోర్షన్ సెరిఫ్", + "Monospace Serif": "మోనోస్పేస్ సెరిఫ్", + "Casual": "సాధారణ", + "Script": "స్క్రిప్ట్", + "Small Caps": "చిన్న క్యాప్స్", + "Reset": "రీసెట్ చేయండి", + "restore all settings to the default values": "అన్ని సెట్టింగులను డిఫాల్ట్ విలువలకు పునరుద్ధరించండి", + "Done": "పూర్తయింది", + "Caption Settings Dialog": "శీర్షిక సెట్టింగ్‌ల డైలాగ్", + "Beginning of dialog window. Escape will cancel and close the window.": "డైలాగ్ విండో ప్రారంభం. ఎస్కేప్ విండోను రద్దు చేస్తుంది మరియు మూసివేస్తుంది.", + "End of dialog window.": "డైలాగ్ విండో ముగింపు.", + "{1} is loading.": "{1} లోడ్ అవుతోంది.", + "Exit Picture-in-Picture": "పిక్చర్-ఇన్-పిక్చర్ నుండి నిష్క్రమించండి", + "Picture-in-Picture": "పిక్చర్-ఇన్-పిక్చర్" +}); \ No newline at end of file diff --git a/js/libs/videojs/lang/te.json b/js/libs/videojs/lang/te.json new file mode 100644 index 00000000..39de7083 --- /dev/null +++ b/js/libs/videojs/lang/te.json @@ -0,0 +1,89 @@ +{ + "Audio Player": "ఆడియో ప్లేయర్", + "Video Player": "వీడియో ప్లేయర్", + "Play": "ప్లే", + "Pause": "పాజ్", + "Replay": "రీప్లే", + "Current Time": "ప్రస్తుత సమయం", + "Duration": "వ్యవధి", + "Remaining Time": "మిగిలిన సమయం", + "Stream Type": "స్ట్రీమ్ రకం", + "LIVE": "లైవ్", + "Seek to live, currently behind live": "ప్రత్యక్ష ప్రసారానికి వెళ్ళండి, ప్రస్తుతం ప్రత్యక్ష ప్రసారానికి వెనుకబడి ఉంది", + "Seek to live, currently playing live": "ప్రత్యక్ష ప్రసారానికి వెళ్ళండి, ప్రస్తుతం ప్రత్యక్ష ప్రసారం అవుతోంది", + "Loaded": "లోడ్ చేయబడింది", + "Progress": "పురోగతి", + "Progress Bar": "ప్రోగ్రెస్ బార్", + "progress bar timing: currentTime={1} duration={2}": "{1} యొక్క {2}", + "Fullscreen": "పూర్తి స్క్రీన్", + "Exit Fullscreen": "పూర్తి స్క్రీన్ నుండి నిష్క్రమించండి", + "Mute": "మ్యూట్", + "Unmute": "అన్మ్యూట్ చేయండి", + "Playback Rate": "ప్లేబ్యాక్ రేట్", + "Subtitles": "ఉపశీర్షికలు", + "subtitles off": "ఉపశీర్షికలు ఆఫ్ చేయండి", + "Captions": "శీర్షికలు", + "captions off": "శీర్షికలు ఆఫ్ చేయండి", + "Chapters": "అధ్యాయాలు", + "Descriptions": "వివరణలు", + "descriptions off": "వివరణలు ఆఫ్ చేయండి", + "Audio Track": "ఆడియో ట్రాక్", + "Volume Level": "వాల్యూమ్ స్థాయి", + "You aborted the media playback": "మీరు మీడియా ప్లేబ్యాక్‌ను రద్దు చేశారు", + "A network error caused the media download to fail part-way.": "నెట్‌వర్క్ లోపం వలన మీడియా డౌన్‌లోడ్ విఫలమైంది.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "సర్వర్ లేదా నెట్‌వర్క్ విఫలమైనందున లేదా ఫార్మాట్‌కు మద్దతు లేనందున మీడియాను లోడ్ చేయడం సాధ్యం కాలేదు.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "అవినీతి సమస్య కారణంగా లేదా మీ బ్రౌజర్ మద్దతు ఇవ్వని లక్షణాలను మీడియా ఉపయోగించినందున మీడియా ప్లేబ్యాక్ నిలిపివేయబడింది.", + "No compatible source was found for this media.": "ఈ మీడియాకు అనుకూలమైన మూలం కనుగొనబడలేదు.", + "The media is encrypted and we do not have the keys to decrypt it.": "మీడియా గుప్తీకరించబడింది మరియు దానిని డీక్రిప్ట్ చేయడానికి మాకు కీలు లేవు.", + "Play Video": "వీడియో ప్లే చేయండి", + "Close": "మూసివేయండి", + "Close Modal Dialog": "మోడల్ డైలాగ్‌ను మూసివేయండి", + "Modal Window": "మోడల్ విండో", + "This is a modal window": "ఇది మోడల్ విండో", + "This modal can be closed by pressing the Escape key or activating the close button.": "ఎస్కేప్ కీని నొక్కడం ద్వారా లేదా క్లోజ్ బటన్‌ను యాక్టివేట్ చేయడం ద్వారా ఈ మోడల్‌ను మూసివేయవచ్చు.", + ", opens captions settings dialog": ", శీర్షికల సెట్టింగ్‌ల డైలాగ్‌ను తెరుస్తుంది", + ", opens subtitles settings dialog": ", ఉపశీర్షికల సెట్టింగుల డైలాగ్‌ను తెరుస్తుంది", + ", opens descriptions settings dialog": ", వివరణల సెట్టింగుల డైలాగ్‌ను తెరుస్తుంది", + ", selected": ", ఎంచుకోబడింది", + "captions settings": "శీర్షికల సెట్టింగులు", + "subtitles settings": "ఉపశీర్షికల సెట్టింగులు", + "descriptions settings": "వివరణల సెట్టింగులు", + "Text": "వచనం", + "White": "తెలుపు", + "Black": "నలుపు", + "Red": "ఎరుపు", + "Green": "ఆకుపచ్చ", + "Blue": "నీలం", + "Yellow": "పసుపు", + "Magenta": "మెజెంటా", + "Cyan": "సియాన్", + "Background": "నేపధ్యం", + "Window": "కిటికీ", + "Transparent": "పారదర్శక", + "Semi-Transparent": "సెమీ-పారదర్శక", + "Opaque": "అపారదర్శక", + "Font Size": "ఫాంట్ పరిమాణం", + "Text Edge Style": "టెక్స్ట్ ఎడ్జ్ శైలి", + "None": "ఏదీ లేదు", + "Raised": "పెంచబడింది", + "Depressed": "అణగారిన", + "Uniform": "ఏకరీతి", + "Drop shadow": "డ్రాప్‌షాడో", + "Font Family": "ఫాంట్ కుటుంబం", + "Proportional Sans-Serif": "ప్రొపోర్షన్ సాన్స్-సెరిఫ్", + "Monospace Sans-Serif": "మోనోస్పేస్ సాన్స్-సెరిఫ్", + "Proportional Serif": "ప్రొపోర్షన్ సెరిఫ్", + "Monospace Serif": "మోనోస్పేస్ సెరిఫ్", + "Casual": "సాధారణ", + "Script": "స్క్రిప్ట్", + "Small Caps": "చిన్న క్యాప్స్", + "Reset": "రీసెట్ చేయండి", + "restore all settings to the default values": "అన్ని సెట్టింగులను డిఫాల్ట్ విలువలకు పునరుద్ధరించండి", + "Done": "పూర్తయింది", + "Caption Settings Dialog": "శీర్షిక సెట్టింగ్‌ల డైలాగ్", + "Beginning of dialog window. Escape will cancel and close the window.": "డైలాగ్ విండో ప్రారంభం. ఎస్కేప్ విండోను రద్దు చేస్తుంది మరియు మూసివేస్తుంది.", + "End of dialog window.": "డైలాగ్ విండో ముగింపు.", + "{1} is loading.": "{1} లోడ్ అవుతోంది.", + "Exit Picture-in-Picture": "పిక్చర్-ఇన్-పిక్చర్ నుండి నిష్క్రమించండి", + "Picture-in-Picture": "పిక్చర్-ఇన్-పిక్చర్" +} diff --git a/js/libs/videojs/lang/th.js b/js/libs/videojs/lang/th.js index 63ac6886..44dbdea2 100644 --- a/js/libs/videojs/lang/th.js +++ b/js/libs/videojs/lang/th.js @@ -16,7 +16,7 @@ videojs.addLanguage('th', { "Progress Bar": "แถบแสดงความคืบหน้า", "progress bar timing: currentTime={1} duration={2}": "{1} ของ {2}", "Fullscreen": "แบบเต็มหน้าจอ", - "Non-Fullscreen": "ไม่ใช่แบบเต็มหน้าจอ", + "Exit Fullscreen": "ไม่ใช่แบบเต็มหน้าจอ", "Mute": "ปิดเสียง", "Unmute": "ยกเลิกการปิดเสียง", "Playback Rate": "อัตราการเล่น", @@ -68,7 +68,7 @@ videojs.addLanguage('th', { "Raised": "ยกขึ้น", "Depressed": "ปล่อยออก", "Uniform": "รูปแบบ", - "Dropshadow": "เพิ่มเงา", + "Drop shadow": "เพิ่มเงา", "Font Family": "ตระกูลแบบอักษร", "Proportional Sans-Serif": "Sans-Serif ตามสัดส่วน", "Monospace Sans-Serif": "Sans-Serif ช่องว่างเดี่ยว", diff --git a/js/libs/videojs/lang/th.json b/js/libs/videojs/lang/th.json index 2347145f..fd97e087 100644 --- a/js/libs/videojs/lang/th.json +++ b/js/libs/videojs/lang/th.json @@ -16,7 +16,7 @@ "Progress Bar": "แถบแสดงความคืบหน้า", "progress bar timing: currentTime={1} duration={2}": "{1} ของ {2}", "Fullscreen": "แบบเต็มหน้าจอ", - "Non-Fullscreen": "ไม่ใช่แบบเต็มหน้าจอ", + "Exit Fullscreen": "ไม่ใช่แบบเต็มหน้าจอ", "Mute": "ปิดเสียง", "Unmute": "ยกเลิกการปิดเสียง", "Playback Rate": "อัตราการเล่น", @@ -68,7 +68,7 @@ "Raised": "ยกขึ้น", "Depressed": "ปล่อยออก", "Uniform": "รูปแบบ", - "Dropshadow": "เพิ่มเงา", + "Drop shadow": "เพิ่มเงา", "Font Family": "ตระกูลแบบอักษร", "Proportional Sans-Serif": "Sans-Serif ตามสัดส่วน", "Monospace Sans-Serif": "Sans-Serif ช่องว่างเดี่ยว", @@ -86,4 +86,4 @@ "{1} is loading.": "กำลังโหลด {1}", "Exit Picture-in-Picture": "ออกจากการเล่นภาพควบคู่", "Picture-in-Picture": "การเล่นภาพควบคู่" -} \ No newline at end of file +} diff --git a/js/libs/videojs/lang/tr.js b/js/libs/videojs/lang/tr.js index f9edfeb7..c5b74253 100644 --- a/js/libs/videojs/lang/tr.js +++ b/js/libs/videojs/lang/tr.js @@ -1,4 +1,6 @@ videojs.addLanguage('tr', { + "Audio Player": "Ses Oynatıcısı", + "Video Player": "Video Oynatıcısı", "Play": "Oynat", "Pause": "Duraklat", "Replay": "Yeniden Oynat", @@ -7,33 +9,38 @@ videojs.addLanguage('tr', { "Remaining Time": "Kalan Süre", "Stream Type": "Yayın Tipi", "LIVE": "CANLI", + "Seek to live, currently behind live": "Canlıya git, şu anda canlının gerisinde", + "Seek to live, currently playing live": "Canlıya git, şu anda canlı oynuyor", "Loaded": "Yüklendi", "Progress": "Yükleniyor", + "Progress Bar": "İlerleme Çubuğu", + "progress bar timing: currentTime={1} duration={2}": "{1}/{2}", "Fullscreen": "Tam Ekran", - "Non-Fullscreen": "Küçük Ekran", - "Mute": "Ses Kapa", - "Unmute": "Ses Aç", + "Exit Fullscreen": "Tam Ekrandan Çık", + "Mute": "Sessiz", + "Unmute": "Sesi Aç", "Playback Rate": "Oynatma Hızı", - "Subtitles": "Altyazı", + "Subtitles": "Altyazılar", "subtitles off": "Altyazı Kapalı", - "Captions": "Altyazı", + "Captions": "Altyazılar", "captions off": "Altyazı Kapalı", "Chapters": "Bölümler", - "Close Modal Dialog": "Dialogu Kapat", + "Close Modal Dialog": "Etkileşim Penceresini Kapat", "Descriptions": "Açıklamalar", - "descriptions off": "Açıklamalar kapalı", - "Audio Track": "Ses Dosyası", - "You aborted the media playback": "Video oynatmayı iptal ettiniz", - "A network error caused the media download to fail part-way.": "Video indirilirken bağlantı sorunu oluştu.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Video oynatılamadı, ağ ya da sunucu hatası veya belirtilen format desteklenmiyor.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Tarayıcınız desteklemediği için videoda hata oluştu.", - "No compatible source was found for this media.": "Video için kaynak bulunamadı.", - "The media is encrypted and we do not have the keys to decrypt it.": "Video, şifrelenmiş bir kaynaktan geliyor ve oynatmak için gerekli anahtar bulunamadı.", + "descriptions off": "açıklamalar kapalı", + "Audio Track": "Ses Parçası", + "Volume Level": "Ses Düzeyi", + "You aborted the media playback": "Medyayı oynatmayı iptal ettiniz", + "A network error caused the media download to fail part-way.": "Medya indirme işleminin kısmen başarısız olmasına neden olan bir ağ sorunu oluştu.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Sunucu veya ağ hatasından ya da biçim desteklenmediğinden medya yüklenemedi.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Medya oynatma, bir bozulma sorunu nedeniyle veya medya, tarayıcınızın desteklemediği özellikleri kullandığı için durduruldu.", + "No compatible source was found for this media.": "Bu medya için uyumlu bir kaynak bulunamadı.", + "The media is encrypted and we do not have the keys to decrypt it.": "Medya, şifrelenmiş bir kaynaktan geliyor ve oynatmak için gerekli anahtar bulunamadı.", "Play Video": "Videoyu Oynat", "Close": "Kapat", - "Modal Window": "Modal Penceresi", - "This is a modal window": "Bu bir modal penceresidir", - "This modal can be closed by pressing the Escape key or activating the close button.": "Bu modal ESC tuşuna basarak ya da kapata tıklanarak kapatılabilir.", + "Modal Window": "Etkileşim Penceresi", + "This is a modal window": "Bu bir etkileşim penceresidir", + "This modal can be closed by pressing the Escape key or activating the close button.": "Bu etkileşim penceresi ESC tuşuna basarak ya da kapat butonuna tıklanarak kapatılabilir.", ", opens captions settings dialog": ", altyazı ayarları menüsünü açar", ", opens subtitles settings dialog": ", altyazı ayarları menüsünü açar", ", opens descriptions settings dialog": ", açıklama ayarları menüsünü açar", @@ -41,7 +48,7 @@ videojs.addLanguage('tr', { "captions settings": "altyazı ayarları", "subtitles settings": "altyazı ayarları", "descriptions settings": "açıklama ayarları", - "Text": "Yazı", + "Text": "Metin", "White": "Beyaz", "Black": "Siyah", "Red": "Kırmızı", @@ -55,13 +62,13 @@ videojs.addLanguage('tr', { "Transparent": "Saydam", "Semi-Transparent": "Yarı-Saydam", "Opaque": "Mat", - "Font Size": "Yazı Boyutu", - "Text Edge Style": "Yazı Kenarlıkları", + "Font Size": "Metin Boyutu", + "Text Edge Style": "Metin Kenar Stili", "None": "Hiçbiri", - "Raised": "Kabartılmış", + "Raised": "Kabarık", "Depressed": "Yassı", "Uniform": "Düz", - "Dropshadow": "Gölgeli", + "Drop shadow": "Gölgeli", "Font Family": "Yazı Tipi", "Proportional Sans-Serif": "Orantılı Sans-Serif", "Monospace Sans-Serif": "Eşaralıklı Sans-Serif", @@ -70,7 +77,14 @@ videojs.addLanguage('tr', { "Casual": "Gündelik", "Script": "El Yazısı", "Small Caps": "Küçük Boyutlu Büyük Harfli", + "Reset": "Sıfırla", + "restore all settings to the default values": "tüm ayarları varsayılan değerlere geri yükler", "Done": "Tamam", "Caption Settings Dialog": "Altyazı Ayarları Menüsü", - "Beginning of dialog window. Escape will cancel and close the window.": "Diyalog penceresinin başlangıcı. ESC tuşu işlemi iptal edip pencereyi kapatacaktır." + "Beginning of dialog window. Escape will cancel and close the window.": "Etkileşim penceresinin başlangıcı. ESC tuşu işlemi iptal edip pencereyi kapatacaktır.", + "End of dialog window.": "Etkileşim penceresinin sonu.", + "{1} is loading.": "{1} yükleniyor.", + "Exit Picture-in-Picture": "Mini oynatıcıdan çık", + "Picture-in-Picture": "Mini oynatıcı", + "No content": "İçerik yok" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/tr.json b/js/libs/videojs/lang/tr.json index 07e18370..352f5a96 100644 --- a/js/libs/videojs/lang/tr.json +++ b/js/libs/videojs/lang/tr.json @@ -1,4 +1,6 @@ { + "Audio Player": "Ses Oynatıcısı", + "Video Player": "Video Oynatıcısı", "Play": "Oynat", "Pause": "Duraklat", "Replay": "Yeniden Oynat", @@ -7,33 +9,38 @@ "Remaining Time": "Kalan Süre", "Stream Type": "Yayın Tipi", "LIVE": "CANLI", + "Seek to live, currently behind live": "Canlıya git, şu anda canlının gerisinde", + "Seek to live, currently playing live": "Canlıya git, şu anda canlı oynuyor", "Loaded": "Yüklendi", "Progress": "Yükleniyor", + "Progress Bar": "İlerleme Çubuğu", + "progress bar timing: currentTime={1} duration={2}": "{1}/{2}", "Fullscreen": "Tam Ekran", - "Non-Fullscreen": "Küçük Ekran", - "Mute": "Ses Kapa", - "Unmute": "Ses Aç", + "Exit Fullscreen": "Tam Ekrandan Çık", + "Mute": "Sessiz", + "Unmute": "Sesi Aç", "Playback Rate": "Oynatma Hızı", - "Subtitles": "Altyazı", + "Subtitles": "Altyazılar", "subtitles off": "Altyazı Kapalı", - "Captions": "Altyazı", + "Captions": "Altyazılar", "captions off": "Altyazı Kapalı", "Chapters": "Bölümler", - "Close Modal Dialog": "Dialogu Kapat", + "Close Modal Dialog": "Etkileşim Penceresini Kapat", "Descriptions": "Açıklamalar", - "descriptions off": "Açıklamalar kapalı", - "Audio Track": "Ses Dosyası", - "You aborted the media playback": "Video oynatmayı iptal ettiniz", - "A network error caused the media download to fail part-way.": "Video indirilirken bağlantı sorunu oluştu.", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Video oynatılamadı, ağ ya da sunucu hatası veya belirtilen format desteklenmiyor.", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Tarayıcınız desteklemediği için videoda hata oluştu.", - "No compatible source was found for this media.": "Video için kaynak bulunamadı.", - "The media is encrypted and we do not have the keys to decrypt it.": "Video, şifrelenmiş bir kaynaktan geliyor ve oynatmak için gerekli anahtar bulunamadı.", + "descriptions off": "açıklamalar kapalı", + "Audio Track": "Ses Parçası", + "Volume Level": "Ses Düzeyi", + "You aborted the media playback": "Medyayı oynatmayı iptal ettiniz", + "A network error caused the media download to fail part-way.": "Medya indirme işleminin kısmen başarısız olmasına neden olan bir ağ sorunu oluştu.", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Sunucu veya ağ hatasından ya da biçim desteklenmediğinden medya yüklenemedi.", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Medya oynatma, bir bozulma sorunu nedeniyle veya medya, tarayıcınızın desteklemediği özellikleri kullandığı için durduruldu.", + "No compatible source was found for this media.": "Bu medya için uyumlu bir kaynak bulunamadı.", + "The media is encrypted and we do not have the keys to decrypt it.": "Medya, şifrelenmiş bir kaynaktan geliyor ve oynatmak için gerekli anahtar bulunamadı.", "Play Video": "Videoyu Oynat", "Close": "Kapat", - "Modal Window": "Modal Penceresi", - "This is a modal window": "Bu bir modal penceresidir", - "This modal can be closed by pressing the Escape key or activating the close button.": "Bu modal ESC tuşuna basarak ya da kapata tıklanarak kapatılabilir.", + "Modal Window": "Etkileşim Penceresi", + "This is a modal window": "Bu bir etkileşim penceresidir", + "This modal can be closed by pressing the Escape key or activating the close button.": "Bu etkileşim penceresi ESC tuşuna basarak ya da kapat butonuna tıklanarak kapatılabilir.", ", opens captions settings dialog": ", altyazı ayarları menüsünü açar", ", opens subtitles settings dialog": ", altyazı ayarları menüsünü açar", ", opens descriptions settings dialog": ", açıklama ayarları menüsünü açar", @@ -41,7 +48,7 @@ "captions settings": "altyazı ayarları", "subtitles settings": "altyazı ayarları", "descriptions settings": "açıklama ayarları", - "Text": "Yazı", + "Text": "Metin", "White": "Beyaz", "Black": "Siyah", "Red": "Kırmızı", @@ -55,13 +62,13 @@ "Transparent": "Saydam", "Semi-Transparent": "Yarı-Saydam", "Opaque": "Mat", - "Font Size": "Yazı Boyutu", - "Text Edge Style": "Yazı Kenarlıkları", + "Font Size": "Metin Boyutu", + "Text Edge Style": "Metin Kenar Stili", "None": "Hiçbiri", - "Raised": "Kabartılmış", + "Raised": "Kabarık", "Depressed": "Yassı", "Uniform": "Düz", - "Dropshadow": "Gölgeli", + "Drop shadow": "Gölgeli", "Font Family": "Yazı Tipi", "Proportional Sans-Serif": "Orantılı Sans-Serif", "Monospace Sans-Serif": "Eşaralıklı Sans-Serif", @@ -70,7 +77,14 @@ "Casual": "Gündelik", "Script": "El Yazısı", "Small Caps": "Küçük Boyutlu Büyük Harfli", + "Reset": "Sıfırla", + "restore all settings to the default values": "tüm ayarları varsayılan değerlere geri yükler", "Done": "Tamam", "Caption Settings Dialog": "Altyazı Ayarları Menüsü", - "Beginning of dialog window. Escape will cancel and close the window.": "Diyalog penceresinin başlangıcı. ESC tuşu işlemi iptal edip pencereyi kapatacaktır." + "Beginning of dialog window. Escape will cancel and close the window.": "Etkileşim penceresinin başlangıcı. ESC tuşu işlemi iptal edip pencereyi kapatacaktır.", + "End of dialog window.": "Etkileşim penceresinin sonu.", + "{1} is loading.": "{1} yükleniyor.", + "Exit Picture-in-Picture": "Mini oynatıcıdan çık", + "Picture-in-Picture": "Mini oynatıcı", + "No content": "İçerik yok" } diff --git a/js/libs/videojs/lang/uk.js b/js/libs/videojs/lang/uk.js index 2d801feb..29eb8704 100644 --- a/js/libs/videojs/lang/uk.js +++ b/js/libs/videojs/lang/uk.js @@ -14,7 +14,7 @@ videojs.addLanguage('uk', { "Progress Bar": "Індикатор завантаження", "progress bar timing: currentTime={1} duration={2}": "{1} з {2}", "Fullscreen": "Повноекранний режим", - "Non-Fullscreen": "Неповноекранний режим", + "Exit Fullscreen": "Неповноекранний режим", "Mute": "Без звуку", "Unmute": "Зі звуком", "Playback Rate": "Швидкість відтворення", diff --git a/js/libs/videojs/lang/uk.json b/js/libs/videojs/lang/uk.json index 17a840d8..c96081c3 100644 --- a/js/libs/videojs/lang/uk.json +++ b/js/libs/videojs/lang/uk.json @@ -14,7 +14,7 @@ "Progress Bar": "Індикатор завантаження", "progress bar timing: currentTime={1} duration={2}": "{1} з {2}", "Fullscreen": "Повноекранний режим", - "Non-Fullscreen": "Неповноекранний режим", + "Exit Fullscreen": "Неповноекранний режим", "Mute": "Без звуку", "Unmute": "Зі звуком", "Playback Rate": "Швидкість відтворення", diff --git a/js/libs/videojs/lang/vi.js b/js/libs/videojs/lang/vi.js index be0772e0..c226255e 100644 --- a/js/libs/videojs/lang/vi.js +++ b/js/libs/videojs/lang/vi.js @@ -14,7 +14,7 @@ videojs.addLanguage('vi', { "Progress Bar": "Thanh tiến trình", "progress bar timing: currentTime={1} duration={2}": "{1} của {2}", "Fullscreen": "Toàn màn hình", - "Non-Fullscreen": "Thoát toàn màn hình", + "Exit Fullscreen": "Thoát toàn màn hình", "Mute": "Tắt tiếng", "Unmute": "Bật âm thanh", "Playback Rate": "Tỉ lệ phát lại", diff --git a/js/libs/videojs/lang/vi.json b/js/libs/videojs/lang/vi.json index 5e95b533..bb6ccfe8 100644 --- a/js/libs/videojs/lang/vi.json +++ b/js/libs/videojs/lang/vi.json @@ -14,7 +14,7 @@ "Progress Bar": "Thanh tiến trình", "progress bar timing: currentTime={1} duration={2}": "{1} của {2}", "Fullscreen": "Toàn màn hình", - "Non-Fullscreen": "Thoát toàn màn hình", + "Exit Fullscreen": "Thoát toàn màn hình", "Mute": "Tắt tiếng", "Unmute": "Bật âm thanh", "Playback Rate": "Tỉ lệ phát lại", diff --git a/js/libs/videojs/lang/zh-CN.js b/js/libs/videojs/lang/zh-CN.js index dcd07817..ab070318 100644 --- a/js/libs/videojs/lang/zh-CN.js +++ b/js/libs/videojs/lang/zh-CN.js @@ -9,11 +9,11 @@ videojs.addLanguage('zh-CN', { "Loaded": "加载完成", "Progress": "进度", "Fullscreen": "全屏", - "Non-Fullscreen": "退出全屏", + "Exit Fullscreen": "退出全屏", "Picture-in-Picture": "画中画", "Exit Picture-in-Picture": "退出画中画", "Mute": "静音", - "Unmute": "取消静音", + "Unmute": "开启音效", "Playback Rate": "播放速度", "Subtitles": "字幕", "subtitles off": "关闭字幕", @@ -85,5 +85,12 @@ videojs.addLanguage('zh-CN', { "Seek to live, currently behind live": "尝试直播,当前为延时播放", "Seek to live, currently playing live": "尝试直播,当前为实时播放", "progress bar timing: currentTime={1} duration={2}": "{1}/{2}", - "{1} is loading.": "正在加载 {1}。" + "{1} is loading.": "正在加载 {1}。", + "No content": "无内容", + "Color": "颜色", + "Opacity": "不透明度", + "Text Background": "文本背景", + "Caption Area Background": "字幕区域背景", + "Skip forward {1} seconds": "快进 {1} 秒", + "Skip backward {1} seconds": "快退 {1} 秒" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/zh-CN.json b/js/libs/videojs/lang/zh-CN.json index 976bec11..0ecfccff 100644 --- a/js/libs/videojs/lang/zh-CN.json +++ b/js/libs/videojs/lang/zh-CN.json @@ -9,11 +9,11 @@ "Loaded": "加载完成", "Progress": "进度", "Fullscreen": "全屏", - "Non-Fullscreen": "退出全屏", + "Exit Fullscreen": "退出全屏", "Picture-in-Picture": "画中画", "Exit Picture-in-Picture": "退出画中画", "Mute": "静音", - "Unmute": "取消静音", + "Unmute": "开启音效", "Playback Rate": "播放速度", "Subtitles": "字幕", "subtitles off": "关闭字幕", @@ -85,5 +85,12 @@ "Seek to live, currently behind live": "尝试直播,当前为延时播放", "Seek to live, currently playing live": "尝试直播,当前为实时播放", "progress bar timing: currentTime={1} duration={2}": "{1}/{2}", - "{1} is loading.": "正在加载 {1}。" + "{1} is loading.": "正在加载 {1}。", + "No content": "无内容", + "Color": "颜色", + "Opacity": "不透明度", + "Text Background": "文本背景", + "Caption Area Background": "字幕区域背景", + "Skip forward {1} seconds": "快进 {1} 秒", + "Skip backward {1} seconds": "快退 {1} 秒" } diff --git a/js/libs/videojs/lang/zh-Hans.js b/js/libs/videojs/lang/zh-Hans.js index c95f9dc2..236f9817 100644 --- a/js/libs/videojs/lang/zh-Hans.js +++ b/js/libs/videojs/lang/zh-Hans.js @@ -9,11 +9,11 @@ videojs.addLanguage('zh-Hans', { "Loaded": "加载完成", "Progress": "进度", "Fullscreen": "全屏", - "Non-Fullscreen": "退出全屏", + "Exit Fullscreen": "退出全屏", "Picture-in-Picture": "画中画", "Exit Picture-in-Picture": "退出画中画", "Mute": "静音", - "Unmute": "取消静音", + "Unmute": "开启音效", "Playback Rate": "播放速度", "Subtitles": "字幕", "subtitles off": "关闭字幕", @@ -85,5 +85,12 @@ videojs.addLanguage('zh-Hans', { "Seek to live, currently behind live": "尝试直播,当前为延时播放", "Seek to live, currently playing live": "尝试直播,当前为实时播放", "progress bar timing: currentTime={1} duration={2}": "{1}/{2}", - "{1} is loading.": "正在加载 {1}。" + "{1} is loading.": "正在加载 {1}。", + "No content": "无内容", + "Color": "颜色", + "Opacity": "不透明度", + "Text Background": "文本背景", + "Caption Area Background": "字幕区域背景", + "Skip forward {1} seconds": "快进 {1} 秒", + "Skip backward {1} seconds": "快退 {1} 秒" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/zh-Hans.json b/js/libs/videojs/lang/zh-Hans.json index 976bec11..0ecfccff 100644 --- a/js/libs/videojs/lang/zh-Hans.json +++ b/js/libs/videojs/lang/zh-Hans.json @@ -9,11 +9,11 @@ "Loaded": "加载完成", "Progress": "进度", "Fullscreen": "全屏", - "Non-Fullscreen": "退出全屏", + "Exit Fullscreen": "退出全屏", "Picture-in-Picture": "画中画", "Exit Picture-in-Picture": "退出画中画", "Mute": "静音", - "Unmute": "取消静音", + "Unmute": "开启音效", "Playback Rate": "播放速度", "Subtitles": "字幕", "subtitles off": "关闭字幕", @@ -85,5 +85,12 @@ "Seek to live, currently behind live": "尝试直播,当前为延时播放", "Seek to live, currently playing live": "尝试直播,当前为实时播放", "progress bar timing: currentTime={1} duration={2}": "{1}/{2}", - "{1} is loading.": "正在加载 {1}。" + "{1} is loading.": "正在加载 {1}。", + "No content": "无内容", + "Color": "颜色", + "Opacity": "不透明度", + "Text Background": "文本背景", + "Caption Area Background": "字幕区域背景", + "Skip forward {1} seconds": "快进 {1} 秒", + "Skip backward {1} seconds": "快退 {1} 秒" } diff --git a/js/libs/videojs/lang/zh-Hant.js b/js/libs/videojs/lang/zh-Hant.js index cac064df..1a15e3f4 100644 --- a/js/libs/videojs/lang/zh-Hant.js +++ b/js/libs/videojs/lang/zh-Hant.js @@ -9,9 +9,9 @@ videojs.addLanguage('zh-Hant', { "Loaded": "載入完畢", "Progress": "進度", "Fullscreen": "全螢幕", - "Non-Fullscreen": "退出全螢幕", + "Exit Fullscreen": "退出全螢幕", "Mute": "靜音", - "Unmute": "取消靜音", + "Unmute": "開啟音效", "Playback Rate": " 播放速率", "Subtitles": "字幕", "subtitles off": "關閉字幕", @@ -24,24 +24,24 @@ videojs.addLanguage('zh-Hant', { "Audio Track": "音軌", "You aborted the media playback": "影片播放已終止", "A network error caused the media download to fail part-way.": "網路錯誤導致影片下載失敗。", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "影片因格式不支援或者伺服器或網路的問題無法載入。", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能,播放終止。", - "No compatible source was found for this media.": "無法找到相容此影片的來源。", - "The media is encrypted and we do not have the keys to decrypt it.": "影片已加密,無法解密。", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "因格式不支援、伺服器或網路的問題無法載入媒體。", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能,已終止播放媒體。", + "No compatible source was found for this media.": "無法找到相容此媒體的來源。", + "The media is encrypted and we do not have the keys to decrypt it.": "媒體已加密,無法解密。", "Play Video": "播放影片", "Close": "關閉", - "Modal Window": "對話框", - "This is a modal window": "這是一個對話框", - "This modal can be closed by pressing the Escape key or activating the close button.": "可以按ESC按鍵或啟用關閉按鈕來關閉此對話框。", + "Modal Window": "強制回應視窗", + "This is a modal window": "此為強制回應視窗", + "This modal can be closed by pressing the Escape key or activating the close button.": "可以按ESC按鍵或關閉按鈕來關閉此視窗。", ", opens captions settings dialog": ", 開啟標題設定對話框", ", opens subtitles settings dialog": ", 開啟字幕設定對話框", ", opens descriptions settings dialog": ", 開啟描述設定對話框", ", selected": ", 選擇", "captions settings": "字幕設定", - "Audio Player": "音頻播放器", - "Video Player": "視頻播放器", + "Audio Player": "音訊播放器", + "Video Player": "視訊播放器", "Replay": "重播", - "Progress Bar": "進度小節", + "Progress Bar": "進度列", "Volume Level": "音量", "subtitles settings": "字幕設定", "descriptions settings": "描述設定", @@ -65,23 +65,33 @@ videojs.addLanguage('zh-Hant', { "Raised": "浮雕", "Depressed": "壓低", "Uniform": "均勻", - "Dropshadow": "下陰影", - "Font Family": "字型庫", - "Proportional Sans-Serif": "比例無細體", - "Monospace Sans-Serif": "單間隔無細體", - "Proportional Serif": "比例細體", - "Monospace Serif": "單間隔細體", + "Drop shadow": "下陰影", + "Font Family": "字型系列", + "Proportional Sans-Serif": "調和間距無襯線字型", + "Monospace Sans-Serif": "等寬無襯線字型", + "Proportional Serif": "調和間距襯線字型", + "Monospace Serif": "等寬襯線字型", "Casual": "輕便的", "Script": "手寫體", "Small Caps": "小型大寫字體", "Reset": "重置", "restore all settings to the default values": "恢復全部設定至預設值", "Done": "完成", - "Caption Settings Dialog": "字幕設定視窗", - "Beginning of dialog window. Escape will cancel and close the window.": "開始對話視窗。離開會取消及關閉視窗", + "Caption Settings Dialog": "字幕設定對話框", + "Beginning of dialog window. Escape will cancel and close the window.": "開始對話視窗。離開會取消並關閉視窗", "End of dialog window.": "結束對話視窗", - "Seek to live, currently behind live": "試圖直播,目前延時播放", - "Seek to live, currently playing live": "試圖直播,目前即時播放", + "Seek to live, currently behind live": "快轉至直播,目前為稍早畫面", + "Seek to live, currently playing live": "快轉至直播,目前為現場畫面", "progress bar timing: currentTime={1} duration={2}": "{1}/{2}", - "{1} is loading.": "{1} 正在載入。" + "{1} is loading.": "{1} 正在載入。", + "Exit Picture-in-Picture": "離開子母畫面", + "Playing in Picture-in-Picture": "在子母畫面中播放", + "Picture-in-Picture": "子母畫面", + "No content": "沒有內容", + "Color": "顏色", + "Opacity": "不透明度", + "Text Background": "文字背景", + "Caption Area Background": "字幕區域背景", + "Skip forward {1} seconds": "快轉 {1} 秒", + "Skip backward {1} seconds": "倒轉 {1} 秒" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/zh-Hant.json b/js/libs/videojs/lang/zh-Hant.json index c2cd0f89..3853dbe1 100644 --- a/js/libs/videojs/lang/zh-Hant.json +++ b/js/libs/videojs/lang/zh-Hant.json @@ -9,9 +9,9 @@ "Loaded": "載入完畢", "Progress": "進度", "Fullscreen": "全螢幕", - "Non-Fullscreen": "退出全螢幕", + "Exit Fullscreen": "退出全螢幕", "Mute": "靜音", - "Unmute": "取消靜音", + "Unmute": "開啟音效", "Playback Rate": " 播放速率", "Subtitles": "字幕", "subtitles off": "關閉字幕", @@ -24,24 +24,24 @@ "Audio Track": "音軌", "You aborted the media playback": "影片播放已終止", "A network error caused the media download to fail part-way.": "網路錯誤導致影片下載失敗。", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "影片因格式不支援或者伺服器或網路的問題無法載入。", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能,播放終止。", - "No compatible source was found for this media.": "無法找到相容此影片的來源。", - "The media is encrypted and we do not have the keys to decrypt it.": "影片已加密,無法解密。", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "因格式不支援、伺服器或網路的問題無法載入媒體。", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能,已終止播放媒體。", + "No compatible source was found for this media.": "無法找到相容此媒體的來源。", + "The media is encrypted and we do not have the keys to decrypt it.": "媒體已加密,無法解密。", "Play Video": "播放影片", "Close": "關閉", - "Modal Window": "對話框", - "This is a modal window": "這是一個對話框", - "This modal can be closed by pressing the Escape key or activating the close button.": "可以按ESC按鍵或啟用關閉按鈕來關閉此對話框。", + "Modal Window": "強制回應視窗", + "This is a modal window": "此為強制回應視窗", + "This modal can be closed by pressing the Escape key or activating the close button.": "可以按ESC按鍵或關閉按鈕來關閉此視窗。", ", opens captions settings dialog": ", 開啟標題設定對話框", ", opens subtitles settings dialog": ", 開啟字幕設定對話框", ", opens descriptions settings dialog": ", 開啟描述設定對話框", ", selected": ", 選擇", "captions settings": "字幕設定", - "Audio Player": "音頻播放器", - "Video Player": "視頻播放器", + "Audio Player": "音訊播放器", + "Video Player": "視訊播放器", "Replay": "重播", - "Progress Bar": "進度小節", + "Progress Bar": "進度列", "Volume Level": "音量", "subtitles settings": "字幕設定", "descriptions settings": "描述設定", @@ -65,23 +65,33 @@ "Raised": "浮雕", "Depressed": "壓低", "Uniform": "均勻", - "Dropshadow": "下陰影", - "Font Family": "字型庫", - "Proportional Sans-Serif": "比例無細體", - "Monospace Sans-Serif": "單間隔無細體", - "Proportional Serif": "比例細體", - "Monospace Serif": "單間隔細體", + "Drop shadow": "下陰影", + "Font Family": "字型系列", + "Proportional Sans-Serif": "調和間距無襯線字型", + "Monospace Sans-Serif": "等寬無襯線字型", + "Proportional Serif": "調和間距襯線字型", + "Monospace Serif": "等寬襯線字型", "Casual": "輕便的", "Script": "手寫體", "Small Caps": "小型大寫字體", "Reset": "重置", "restore all settings to the default values": "恢復全部設定至預設值", "Done": "完成", - "Caption Settings Dialog": "字幕設定視窗", - "Beginning of dialog window. Escape will cancel and close the window.": "開始對話視窗。離開會取消及關閉視窗", + "Caption Settings Dialog": "字幕設定對話框", + "Beginning of dialog window. Escape will cancel and close the window.": "開始對話視窗。離開會取消並關閉視窗", "End of dialog window.": "結束對話視窗", - "Seek to live, currently behind live": "試圖直播,目前延時播放", - "Seek to live, currently playing live": "試圖直播,目前即時播放", + "Seek to live, currently behind live": "快轉至直播,目前為稍早畫面", + "Seek to live, currently playing live": "快轉至直播,目前為現場畫面", "progress bar timing: currentTime={1} duration={2}": "{1}/{2}", - "{1} is loading.": "{1} 正在載入。" + "{1} is loading.": "{1} 正在載入。", + "Exit Picture-in-Picture": "離開子母畫面", + "Playing in Picture-in-Picture": "在子母畫面中播放", + "Picture-in-Picture": "子母畫面", + "No content": "沒有內容", + "Color": "顏色", + "Opacity": "不透明度", + "Text Background": "文字背景", + "Caption Area Background": "字幕區域背景", + "Skip forward {1} seconds": "快轉 {1} 秒", + "Skip backward {1} seconds": "倒轉 {1} 秒" } diff --git a/js/libs/videojs/lang/zh-TW.js b/js/libs/videojs/lang/zh-TW.js index a816c0fa..9761f147 100644 --- a/js/libs/videojs/lang/zh-TW.js +++ b/js/libs/videojs/lang/zh-TW.js @@ -9,9 +9,9 @@ videojs.addLanguage('zh-TW', { "Loaded": "載入完畢", "Progress": "進度", "Fullscreen": "全螢幕", - "Non-Fullscreen": "退出全螢幕", + "Exit Fullscreen": "退出全螢幕", "Mute": "靜音", - "Unmute": "取消靜音", + "Unmute": "開啟音效", "Playback Rate": " 播放速率", "Subtitles": "字幕", "subtitles off": "關閉字幕", @@ -24,24 +24,24 @@ videojs.addLanguage('zh-TW', { "Audio Track": "音軌", "You aborted the media playback": "影片播放已終止", "A network error caused the media download to fail part-way.": "網路錯誤導致影片下載失敗。", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "影片因格式不支援或者伺服器或網路的問題無法載入。", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能,播放終止。", - "No compatible source was found for this media.": "無法找到相容此影片的來源。", - "The media is encrypted and we do not have the keys to decrypt it.": "影片已加密,無法解密。", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "因格式不支援、伺服器或網路的問題無法載入媒體。", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能,已終止播放媒體。", + "No compatible source was found for this media.": "無法找到相容此媒體的來源。", + "The media is encrypted and we do not have the keys to decrypt it.": "媒體已加密,無法解密。", "Play Video": "播放影片", "Close": "關閉", - "Modal Window": "對話框", - "This is a modal window": "這是一個對話框", - "This modal can be closed by pressing the Escape key or activating the close button.": "可以按ESC按鍵或啟用關閉按鈕來關閉此對話框。", + "Modal Window": "強制回應視窗", + "This is a modal window": "此為強制回應視窗", + "This modal can be closed by pressing the Escape key or activating the close button.": "可以按ESC按鍵或關閉按鈕來關閉此視窗。", ", opens captions settings dialog": ", 開啟標題設定對話框", ", opens subtitles settings dialog": ", 開啟字幕設定對話框", ", opens descriptions settings dialog": ", 開啟描述設定對話框", ", selected": ", 選擇", "captions settings": "字幕設定", - "Audio Player": "音頻播放器", - "Video Player": "視頻播放器", + "Audio Player": "音訊播放器", + "Video Player": "視訊播放器", "Replay": "重播", - "Progress Bar": "進度小節", + "Progress Bar": "進度列", "Volume Level": "音量", "subtitles settings": "字幕設定", "descriptions settings": "描述設定", @@ -65,23 +65,33 @@ videojs.addLanguage('zh-TW', { "Raised": "浮雕", "Depressed": "壓低", "Uniform": "均勻", - "Dropshadow": "下陰影", - "Font Family": "字型庫", - "Proportional Sans-Serif": "比例無細體", - "Monospace Sans-Serif": "單間隔無細體", - "Proportional Serif": "比例細體", - "Monospace Serif": "單間隔細體", + "Drop shadow": "下陰影", + "Font Family": "字型系列", + "Proportional Sans-Serif": "調和間距無襯線字型", + "Monospace Sans-Serif": "等寬無襯線字型", + "Proportional Serif": "調和間距襯線字型", + "Monospace Serif": "等寬襯線字型", "Casual": "輕便的", "Script": "手寫體", "Small Caps": "小型大寫字體", "Reset": "重置", "restore all settings to the default values": "恢復全部設定至預設值", "Done": "完成", - "Caption Settings Dialog": "字幕設定視窗", - "Beginning of dialog window. Escape will cancel and close the window.": "開始對話視窗。離開會取消及關閉視窗", + "Caption Settings Dialog": "字幕設定對話框", + "Beginning of dialog window. Escape will cancel and close the window.": "開始對話視窗。離開會取消並關閉視窗", "End of dialog window.": "結束對話視窗", - "Seek to live, currently behind live": "試圖直播,目前延時播放", - "Seek to live, currently playing live": "試圖直播,目前即時播放", + "Seek to live, currently behind live": "快轉至直播,目前為稍早畫面", + "Seek to live, currently playing live": "快轉至直播,目前為現場畫面", "progress bar timing: currentTime={1} duration={2}": "{1}/{2}", - "{1} is loading.": "{1} 正在載入。" + "{1} is loading.": "{1} 正在載入。", + "Exit Picture-in-Picture": "離開子母畫面", + "Playing in Picture-in-Picture": "在子母畫面中播放", + "Picture-in-Picture": "子母畫面", + "No content": "沒有內容", + "Color": "顏色", + "Opacity": "不透明度", + "Text Background": "文字背景", + "Caption Area Background": "字幕區域背景", + "Skip forward {1} seconds": "快轉 {1} 秒", + "Skip backward {1} seconds": "倒轉 {1} 秒" }); \ No newline at end of file diff --git a/js/libs/videojs/lang/zh-TW.json b/js/libs/videojs/lang/zh-TW.json index c2cd0f89..3853dbe1 100644 --- a/js/libs/videojs/lang/zh-TW.json +++ b/js/libs/videojs/lang/zh-TW.json @@ -9,9 +9,9 @@ "Loaded": "載入完畢", "Progress": "進度", "Fullscreen": "全螢幕", - "Non-Fullscreen": "退出全螢幕", + "Exit Fullscreen": "退出全螢幕", "Mute": "靜音", - "Unmute": "取消靜音", + "Unmute": "開啟音效", "Playback Rate": " 播放速率", "Subtitles": "字幕", "subtitles off": "關閉字幕", @@ -24,24 +24,24 @@ "Audio Track": "音軌", "You aborted the media playback": "影片播放已終止", "A network error caused the media download to fail part-way.": "網路錯誤導致影片下載失敗。", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "影片因格式不支援或者伺服器或網路的問題無法載入。", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能,播放終止。", - "No compatible source was found for this media.": "無法找到相容此影片的來源。", - "The media is encrypted and we do not have the keys to decrypt it.": "影片已加密,無法解密。", + "The media could not be loaded, either because the server or network failed or because the format is not supported.": "因格式不支援、伺服器或網路的問題無法載入媒體。", + "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能,已終止播放媒體。", + "No compatible source was found for this media.": "無法找到相容此媒體的來源。", + "The media is encrypted and we do not have the keys to decrypt it.": "媒體已加密,無法解密。", "Play Video": "播放影片", "Close": "關閉", - "Modal Window": "對話框", - "This is a modal window": "這是一個對話框", - "This modal can be closed by pressing the Escape key or activating the close button.": "可以按ESC按鍵或啟用關閉按鈕來關閉此對話框。", + "Modal Window": "強制回應視窗", + "This is a modal window": "此為強制回應視窗", + "This modal can be closed by pressing the Escape key or activating the close button.": "可以按ESC按鍵或關閉按鈕來關閉此視窗。", ", opens captions settings dialog": ", 開啟標題設定對話框", ", opens subtitles settings dialog": ", 開啟字幕設定對話框", ", opens descriptions settings dialog": ", 開啟描述設定對話框", ", selected": ", 選擇", "captions settings": "字幕設定", - "Audio Player": "音頻播放器", - "Video Player": "視頻播放器", + "Audio Player": "音訊播放器", + "Video Player": "視訊播放器", "Replay": "重播", - "Progress Bar": "進度小節", + "Progress Bar": "進度列", "Volume Level": "音量", "subtitles settings": "字幕設定", "descriptions settings": "描述設定", @@ -65,23 +65,33 @@ "Raised": "浮雕", "Depressed": "壓低", "Uniform": "均勻", - "Dropshadow": "下陰影", - "Font Family": "字型庫", - "Proportional Sans-Serif": "比例無細體", - "Monospace Sans-Serif": "單間隔無細體", - "Proportional Serif": "比例細體", - "Monospace Serif": "單間隔細體", + "Drop shadow": "下陰影", + "Font Family": "字型系列", + "Proportional Sans-Serif": "調和間距無襯線字型", + "Monospace Sans-Serif": "等寬無襯線字型", + "Proportional Serif": "調和間距襯線字型", + "Monospace Serif": "等寬襯線字型", "Casual": "輕便的", "Script": "手寫體", "Small Caps": "小型大寫字體", "Reset": "重置", "restore all settings to the default values": "恢復全部設定至預設值", "Done": "完成", - "Caption Settings Dialog": "字幕設定視窗", - "Beginning of dialog window. Escape will cancel and close the window.": "開始對話視窗。離開會取消及關閉視窗", + "Caption Settings Dialog": "字幕設定對話框", + "Beginning of dialog window. Escape will cancel and close the window.": "開始對話視窗。離開會取消並關閉視窗", "End of dialog window.": "結束對話視窗", - "Seek to live, currently behind live": "試圖直播,目前延時播放", - "Seek to live, currently playing live": "試圖直播,目前即時播放", + "Seek to live, currently behind live": "快轉至直播,目前為稍早畫面", + "Seek to live, currently playing live": "快轉至直播,目前為現場畫面", "progress bar timing: currentTime={1} duration={2}": "{1}/{2}", - "{1} is loading.": "{1} 正在載入。" + "{1} is loading.": "{1} 正在載入。", + "Exit Picture-in-Picture": "離開子母畫面", + "Playing in Picture-in-Picture": "在子母畫面中播放", + "Picture-in-Picture": "子母畫面", + "No content": "沒有內容", + "Color": "顏色", + "Opacity": "不透明度", + "Text Background": "文字背景", + "Caption Area Background": "字幕區域背景", + "Skip forward {1} seconds": "快轉 {1} 秒", + "Skip backward {1} seconds": "倒轉 {1} 秒" } diff --git a/js/libs/videojs/video.min.js b/js/libs/videojs/video.min.js index 9d5095b8..06474a27 100644 --- a/js/libs/videojs/video.min.js +++ b/js/libs/videojs/video.min.js @@ -1,6 +1,6 @@ /** * @license - * Video.js 8.22.0 + * Video.js 8.23.4 * Copyright Brightcove, Inc. * Available under Apache License Version 2.0 * @@ -9,7 +9,7 @@ * Available under Apache License Version 2.0 * */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).videojs=t()}(this,function(){var M="8.22.0";let U={},B=function(e,t){return U[e]=U[e]||[],t&&(U[e]=U[e].concat(t)),U[e]};function F(e,t){return!((t=B(e).indexOf(t))<=-1||(U[e]=U[e].slice(),U[e].splice(t,1),0))}let q={prefixed:!0};var j=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],H=j[0];let V;for(let e=0;e{var e,i=d.levels[i],r=new RegExp(`^(${i})$`);let n=l;if("log"!==t&&s.unshift(t.toUpperCase()+":"),h&&(n="%c"+l,s.unshift(h)),s.unshift(n+":"),z&&(z.push([].concat(s)),e=z.length-1e3,z.splice(0,0s(r+` ${t=void 0!==t?t:n} `+e,t,void 0!==i?i:a),o.createNewLogger=(e,t,i)=>s(e,t,i),o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:t},o.level=e=>{if("string"==typeof e){if(!o.levels.hasOwnProperty(e))throw new Error(`"${e}" in not a valid log level`);t=e}return t},(o.history=()=>z?[].concat(z):[]).filter=t=>(z||[]).filter(e=>new RegExp(`.*${t}.*`).test(e[0])),o.history.clear=()=>{z&&(z.length=0)},o.history.disable=()=>{null!==z&&(z.length=0,z=null)},o.history.enable=()=>{null===z&&(z=[])},o.error=(...e)=>i("error",t,e),o.warn=(...e)=>i("warn",t,e),o.debug=(...e)=>i("debug",t,e),o}("VIDEOJS"),W=o.createLogger,G=Object.prototype.toString;function X(t,i){$(t).forEach(e=>i(t[e],e))}function K(i,s,e=0){return $(i).reduce((e,t)=>s(e,i[t],t),e)}function Y(e){return!!e&&"object"==typeof e}function Q(e){return Y(e)&&"[object Object]"===G.call(e)&&e.constructor===Object}function d(...e){let i={};return e.forEach(e=>{e&&X(e,(e,t)=>{Q(e)?(Q(i[t])||(i[t]={}),i[t]=d(i[t],e)):i[t]=e})}),i}function J(e={}){var t,i,s=[];for(t in e)e.hasOwnProperty(t)&&(i=e[t],s.push(i));return s}function Z(t,i,s,e=!0){let r=e=>Object.defineProperty(t,i,{value:e,enumerable:!0,writable:!0});var n={configurable:!0,enumerable:!0,get(){var e=s();return r(e),e}};return e&&(n.set=r),Object.defineProperty(t,i,n)}let ee=Object.freeze({__proto__:null,each:X,reduce:K,isObject:Y,isPlain:Q,merge:d,values:J,defineLazyProperty:Z}),te=!1,ie=null,se=!1,re,ne=!1,ae=!1,oe=!1,le=!1,de=null,he=null;var e=Boolean(window.cast&&window.cast.framework&&window.cast.framework.CastReceiverContext);let ue=null,ce=!1,pe=!1,me=!1,ge=!1,fe=!1,ye=!1,_e=!1,ve=Boolean(Ee()&&("ontouchstart"in window||window.navigator.maxTouchPoints||window.DocumentTouch&&window.document instanceof window.DocumentTouch));var be,t=window.navigator&&window.navigator.userAgentData;if(t&&t.platform&&t.brands&&(se="Android"===t.platform,ae=Boolean(t.brands.find(e=>"Microsoft Edge"===e.brand)),oe=Boolean(t.brands.find(e=>"Chromium"===e.brand)),le=!ae&&oe,de=he=(t.brands.find(e=>"Chromium"===e.brand)||{}).version||null,pe="Windows"===t.platform),!oe){let i=window.navigator&&window.navigator.userAgent||"";te=/iPod/i.test(i),ie=(t=i.match(/OS (\d+)_/i))&&t[1]?t[1]:null,se=/Android/i.test(i),re=(t=i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i))?(vi=t[1]&&parseFloat(t[1]),be=t[2]&&parseFloat(t[2]),vi&&be?parseFloat(t[1]+"."+t[2]):vi||null):null,ne=/Firefox/i.test(i),ae=/Edg/i.test(i),oe=/Chrome/i.test(i)||/CriOS/i.test(i),le=!ae&&oe,de=he=(be=i.match(/(Chrome|CriOS)\/(\d+)/))&&be[2]?parseFloat(be[2]):null,ue=function(){var e=/MSIE\s(\d+)\.\d/.exec(i);let t=e&&parseFloat(e[1]);return t=!t&&/Trident\/7.0/i.test(i)&&/rv:11.0/.test(i)?11:t}(),fe=/Tizen/i.test(i),ye=/Web0S/i.test(i),_e=fe||ye,ce=/Safari/i.test(i)&&!le&&!se&&!ae&&!_e,pe=/Windows/i.test(i),me=/iPad/i.test(i)||ce&&ve&&!/iPhone/i.test(i),ge=/iPhone/i.test(i)&&!me}let u=ge||me||te,Te=(ce||u)&&!le;var Se=Object.freeze({__proto__:null,get IS_IPOD(){return te},get IOS_VERSION(){return ie},get IS_ANDROID(){return se},get ANDROID_VERSION(){return re},get IS_FIREFOX(){return ne},get IS_EDGE(){return ae},get IS_CHROMIUM(){return oe},get IS_CHROME(){return le},get CHROMIUM_VERSION(){return de},get CHROME_VERSION(){return he},IS_CHROMECAST_RECEIVER:e,get IE_VERSION(){return ue},get IS_SAFARI(){return ce},get IS_WINDOWS(){return pe},get IS_IPAD(){return me},get IS_IPHONE(){return ge},get IS_TIZEN(){return fe},get IS_WEBOS(){return ye},get IS_SMART_TV(){return _e},TOUCH_ENABLED:ve,IS_IOS:u,IS_ANY_SAFARI:Te});function we(e){return"string"==typeof e&&Boolean(e.trim())}function Ee(){return document===window.document}function Ce(e){return Y(e)&&1===e.nodeType}function ke(){try{return window.parent!==window.self}catch(e){return!0}}function Ie(i){return function(e,t){return we(e)?(t=Ce(t=we(t)?document.querySelector(t):t)?t:document)[i]&&t[i](e):document[i](null)}}function l(e="div",i={},t={},s){let r=document.createElement(e);return Object.getOwnPropertyNames(i).forEach(function(e){var t=i[e];"textContent"===e?xe(r,t):r[e]===t&&"tabIndex"!==e||(r[e]=t)}),Object.getOwnPropertyNames(t).forEach(function(e){r.setAttribute(e,t[e])}),s&&Ge(r,s),r}function xe(e,t){return"undefined"==typeof e.textContent?e.innerText=t:e.textContent=t,e}function Ae(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function De(e,t){if(0<=t.indexOf(" "))throw new Error("class has illegal whitespace characters");return e.classList.contains(t)}function Pe(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\s+/)),[])),e}function Le(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\s+/)),[])),e):(o.warn("removeClass was called with an element that doesn't exist"),null)}function Oe(t,e,i){return"boolean"!=typeof(i="function"==typeof i?i(t,e):i)&&(i=void 0),e.split(/\s+/).forEach(e=>t.classList.toggle(e,i)),t}function Re(i,s){Object.getOwnPropertyNames(s).forEach(function(e){var t=s[e];null===t||"undefined"==typeof t||!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})}function Ne(e){var i={},s=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(e&&e.attributes&&0{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(Je(e,"height"))),i.width||(i.width=parseFloat(Je(e,"width"))),i}}function He(e){if(!e||!e.offsetParent)return{left:0,top:0,width:0,height:0};var t=e.offsetWidth,i=e.offsetHeight;let s=0,r=0;for(;e.offsetParent&&e!==document[q.fullscreenElement];)s+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:s,top:r,width:t,height:i}}function Ve(t,e){var i={x:0,y:0};if(u){let e=t;for(;e&&"html"!==e.nodeName.toLowerCase();){var s,r=Je(e,"transform");/^matrix/.test(r)?(s=r.slice(7,-1).split(/,\s/).map(Number),i.x+=s[4],i.y+=s[5]):/^matrix3d/.test(r)&&(s=r.slice(9,-1).split(/,\s/).map(Number),i.x+=s[12],i.y+=s[13]),e.assignedSlot&&e.assignedSlot.parentElement&&window.WebKitCSSMatrix&&(r=window.getComputedStyle(e.assignedSlot.parentElement).transform,r=new window.WebKitCSSMatrix(r),i.x+=r.m41,i.y+=r.m42),e=e.parentNode||e.host}}var n={},a=He(e.target),t=He(t),o=t.width,l=t.height;let d=e.offsetY-(t.top-a.top),h=e.offsetX-(t.left-a.left);return e.changedTouches&&(h=e.changedTouches[0].pageX-t.left,d=e.changedTouches[0].pageY+t.top,u)&&(h-=i.x,d-=i.y),n.y=1-Math.max(0,Math.min(1,d/l)),n.x=Math.max(0,Math.min(1,h/o)),n}function ze(e){return Y(e)&&3===e.nodeType}function $e(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function We(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>Ce(e="function"==typeof e?e():e)||ze(e)?e:"string"==typeof e&&/\S/.test(e)?document.createTextNode(e):void 0).filter(e=>e)}function Ge(t,e){return We(e).forEach(e=>t.appendChild(e)),t}function Xe(e,t){return Ge($e(e),t)}function Ke(e){return void 0===e.button&&void 0===e.buttons||0===e.button&&void 0===e.buttons||"mouseup"===e.type&&0===e.button&&0===e.buttons||"mousedown"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}let Ye=Ie("querySelector"),Qe=Ie("querySelectorAll");function Je(t,i){if(!t||!i)return"";if("function"!=typeof window.getComputedStyle)return"";{let e;try{e=window.getComputedStyle(t)}catch(e){return""}return e?e.getPropertyValue(i)||e[i]:""}}function Ze(s){[...document.styleSheets].forEach(t=>{try{var i=[...t.cssRules].map(e=>e.cssText).join(""),e=document.createElement("style");e.textContent=i,s.document.head.appendChild(e)}catch(e){i=document.createElement("link");i.rel="stylesheet",i.type=t.type,i.media=t.media.mediaText,i.href=t.href,s.document.head.appendChild(i)}})}var et=Object.freeze({__proto__:null,isReal:Ee,isEl:Ce,isInFrame:ke,createEl:l,textContent:xe,prependTo:Ae,hasClass:De,addClass:Pe,removeClass:Le,toggleClass:Oe,setAttributes:Re,getAttributes:Ne,getAttribute:Me,setAttribute:Ue,removeAttribute:Be,blockTextSelection:Fe,unblockTextSelection:qe,getBoundingClientRect:je,findPosition:He,getPointerPosition:Ve,isTextNode:ze,emptyEl:$e,normalizeContent:We,appendContent:Ge,insertContent:Xe,isSingleLeftClick:Ke,$:Ye,$$:Qe,computedStyle:Je,copyStyleSheetsToWindow:Ze});function tt(){if(!1!==st.options.autoSetup){var e=Array.prototype.slice.call(document.getElementsByTagName("video")),t=Array.prototype.slice.call(document.getElementsByTagName("audio")),i=Array.prototype.slice.call(document.getElementsByTagName("video-js")),s=e.concat(t,i);if(s&&0=s&&(i(...e),r=t)}}function bt(s,r,n,a=window){let o;function e(){let e=this,t=arguments,i=function(){o=null,i=null,n||s.apply(e,t)};!o&&n&&s.apply(e,t),a.clearTimeout(o),o=a.setTimeout(i,r)}return e.cancel=()=>{a.clearTimeout(o),o=null},e}let Tt=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:30,bind_:p,throttle:vt,debounce:bt}),St;class wt{on(e,t){var i=this.addEventListener;this.addEventListener=()=>{},mt(this,e,t),this.addEventListener=i}off(e,t){c(this,e,t)}one(e,t){var i=this.addEventListener;this.addEventListener=()=>{},ft(this,e,t),this.addEventListener=i}any(e,t){var i=this.addEventListener;this.addEventListener=()=>{},yt(this,e,t),this.addEventListener=i}trigger(e){var t=e.type||e;e=ut(e="string"==typeof e?{type:t}:e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),gt(this,e)}queueTrigger(e){St=St||new Map;let t=e.type||e,i=St.get(this);i||(i=new Map,St.set(this,i));var s=i.get(t),s=(i.delete(t),window.clearTimeout(s),window.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,St.delete(this)),this.trigger(e)},0));i.set(t,s)}}wt.prototype.allowedEvents_={},wt.prototype.addEventListener=wt.prototype.on,wt.prototype.removeEventListener=wt.prototype.off,wt.prototype.dispatchEvent=wt.prototype.trigger;let Et=e=>"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_||(e.constructor&&e.constructor.name?e.constructor.name:typeof e),Ct=t=>t instanceof wt||!!t.eventBusEl_&&["on","one","off","trigger"].every(e=>"function"==typeof t[e]),kt=e=>"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,It=(e,t,i)=>{if(!e||!e.nodeName&&!Ct(e))throw new Error(`Invalid target for ${Et(t)}#${i}; must be a DOM node or evented object.`)},xt=(e,t,i)=>{if(!kt(e))throw new Error(`Invalid event type for ${Et(t)}#${i}; must be a non-empty string or array.`)},At=(e,t,i)=>{if("function"!=typeof e)throw new Error(`Invalid listener for ${Et(t)}#${i}; must be a function.`)},Dt=(e,t,i)=>{var s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let r,n,a;return s?(r=e.eventBusEl_,3<=t.length&&t.shift(),[n,a]=t):(r=t[0],n=t[1],a=t[2]),It(r,e,i),xt(n,e,i),At(a,e,i),a=p(e,a),{isTargetingSelf:s,target:r,type:n,listener:a}},Pt=(e,t,i,s)=>{It(e,e,t),e.nodeName?_t[t](e,i,s):e[t](i,s)},Lt={on(...t){let{isTargetingSelf:e,target:i,type:s,listener:r}=Dt(this,t,"on");if(Pt(i,"on",s,r),!e){let e=()=>this.off(i,s,r);e.guid=r.guid;t=()=>this.off("dispose",e);t.guid=r.guid,Pt(this,"on","dispose",e),Pt(i,"on","dispose",t)}},one(...e){let{isTargetingSelf:t,target:i,type:s,listener:r}=Dt(this,e,"one");if(t)Pt(i,"one",s,r);else{let t=(...e)=>{this.off(i,s,t),r.apply(null,e)};t.guid=r.guid,Pt(i,"one",s,t)}},any(...e){let{isTargetingSelf:t,target:i,type:s,listener:r}=Dt(this,e,"any");if(t)Pt(i,"any",s,r);else{let t=(...e)=>{this.off(i,s,t),r.apply(null,e)};t.guid=r.guid,Pt(i,"any",s,t)}},off(e,t,i){!e||kt(e)?c(this.eventBusEl_,e,t):(e=e,t=t,It(e,this,"off"),xt(t,this,"off"),At(i,this,"off"),i=p(this,i),this.off("dispose",i),e.nodeName?(c(e,t,i),c(e,"dispose",i)):Ct(e)&&(e.off(t,i),e.off("dispose",i)))},trigger(e,t){It(this.eventBusEl_,this,"trigger");var i=e&&"string"!=typeof e?e.type:e;if(kt(i))return gt(this.eventBusEl_,e,t);throw new Error(`Invalid event type for ${Et(this)}#trigger; `+"must be a non-empty string or object with a type key that has a non-empty value.")}};function Ot(e,t={}){t=t.eventBusKey;if(t){if(!e[t].nodeName)throw new Error(`The eventBusKey "${t}" does not refer to an element.`);e.eventBusEl_=e[t]}else e.eventBusEl_=l("span",{className:"vjs-event-bus"});Object.assign(e,Lt),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on("dispose",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach(function(e){e&&h.has(e)&&h.delete(e)}),window.setTimeout(()=>{e.eventBusEl_=null},0)})}let Rt={state:{},setState(e){"function"==typeof e&&(e=e());let i;return X(e,(e,t)=>{this.state[t]!==e&&((i=i||{})[t]={from:this.state[t],to:e}),this.state[t]=e}),i&&Ct(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function Nt(e,t){Object.assign(e,Rt),e.state=Object.assign({},e.state,t),"function"==typeof e.handleStateChanged&&Ct(e)&&e.on("statechanged",e.handleStateChanged)}function Mt(e){return"string"!=typeof e?e:e.replace(/./,e=>e.toLowerCase())}function m(e){return"string"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())}function Ut(e,t){return m(e)===m(t)}let Bt=Object.freeze({__proto__:null,toLowerCase:Mt,toTitleCase:m,titleCaseEquals:Ut});class g{constructor(e,t,i){!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=d({},this.options_),t=this.options_=d(this.options_,t),this.id_=t.id||t.el&&t.el.id,this.id_||(e=e&&e.id&&e.id()||"no_player",this.id_=e+"_component_"+lt++),this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(e=>this.addClass(e)),["on","off","one","any","trigger"].forEach(e=>{this[e]=void 0}),!1!==t.evented&&(Ot(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Nt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,(this.clearingTimersOnDispose_=!1)!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;0<=e;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e&&(this.options_=d(this.options_,e)),this.options_}el(){return this.el_}createEl(e,t,i){return l(e,t,i)}localize(e,s,t=e){var i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),n=r&&r[i],i=i&&i.split("-")[0],r=r&&r[i];let a=t;return n&&n[e]?a=n[e]:r&&r[e]&&(a=r[e]),a=s?a.replace(/\{(\d+)\}/g,function(e,t){t=s[t-1];let i="undefined"==typeof t?e:t;return i}):a}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...t){t=t.reduce((e,t)=>e.concat(t),[]);let i=this;for(let e=0;e{let t,i;return i="string"==typeof e?(t=e,r[t]||this.options_[t]||{}):(t=e.name,e),{name:t,opts:i}}).filter(e=>{e=g.getComponent(e.opts.componentClass||m(e.name));return e&&!t.isTech(e)}).forEach(e=>{var t=e.name;let i=e.opts;!1!==(i=void 0!==s[t]?s[t]:i)&&((i=!0===i?{}:i).playerOptions=this.options_.playerOptions,e=this.addChild(t,i))&&(this[t]=e)})}}buildCSSClass(){return""}ready(e,t=!1){e&&(this.isReady_?t?e.call(this):this.setTimeout(e,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e)))}triggerReady(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&0{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),window.clearTimeout(e)),e}setInterval(e,t){e=p(this,e),this.clearTimersOnDispose_();e=window.setInterval(e,t);return this.setIntervalIds_.add(e),e}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),window.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=p(this,e),t=window.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=p(this,t);var i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),window.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,i])=>{this[e].forEach((e,t)=>this[i](t))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return 0<=(e||this.el_).tabIndex&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){var e=window.getComputedStyle(e,null),t=e.getPropertyValue("visibility");return"none"!==e.getPropertyValue("display")&&!["hidden","collapse"].includes(t)}var i;return!(!function(t){if(t.offsetWidth+t.offsetHeight+t.getBoundingClientRect().height+t.getBoundingClientRect().width!==0){var i={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2};if(!(i.x<0||i.x>(document.documentElement.clientWidth||window.innerWidth)||i.y<0||i.y>(document.documentElement.clientHeight||window.innerHeight))){let e=document.elementFromPoint(i.x,i.y);for(;e;){if(e===t)return 1;if(!e.parentNode)return;e=e.parentNode}}}}(e=e||this.el())||!t((i=e).parentElement)||!t(i)||"0"===i.style.opacity||"0px"===window.getComputedStyle(i).height||"0px"===window.getComputedStyle(i).width||e.parentElement&&!(0<=e.tabIndex))}static registerComponent(t,e){if("string"!=typeof t||!t)throw new Error(`Illegal component name, "${t}"; must be a non-empty string.`);var i=g.getComponent("Tech"),i=i&&i.isTech(e),s=g===e||g.prototype.isPrototypeOf(e.prototype);if(i||!s){let e;throw e=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error(`Illegal component, "${t}"; ${e}.`)}t=m(t),g.components_||(g.components_={});s=g.getComponent("Player");if("Player"===t&&s&&s.players){var r=s.players,n=Object.keys(r);if(r&&0(e||[]).values()),t}function jt(e,t){return Array.isArray(e)?qt(e):void 0===e||void 0===t?qt():qt([[e,t]])}g.registerComponent("Component",g);function Ht(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),r=Math.floor(e/3600);var n=Math.floor(t/60%60),t=Math.floor(t/3600);return r=0<(r=!isNaN(e)&&e!==1/0?r:s=i="-")||0i&&(n=i),s+=n-r;return s/i}function i(e){if(e instanceof i)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:Y(e)&&("number"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=i.defaultMessages[this.code]||"")}function Xt(e){return null!=e&&"function"==typeof e.then}function Kt(e){Xt(e)&&e.then(null,e=>{})}i.prototype.code=0,i.prototype.message="",i.prototype.status=null,i.prototype.metadata=null,i.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],i.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},i.MEDIA_ERR_CUSTOM=0,i.prototype.MEDIA_ERR_CUSTOM=0,i.MEDIA_ERR_ABORTED=1,i.prototype.MEDIA_ERR_ABORTED=1,i.MEDIA_ERR_NETWORK=2,i.prototype.MEDIA_ERR_NETWORK=2,i.MEDIA_ERR_DECODE=3,i.prototype.MEDIA_ERR_DECODE=3,i.MEDIA_ERR_SRC_NOT_SUPPORTED=4,i.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,i.MEDIA_ERR_ENCRYPTED=5,i.prototype.MEDIA_ERR_ENCRYPTED=5;function Yt(s){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((e,t,i)=>(s[t]&&(e[t]=s[t]),e),{cues:s.cues&&Array.prototype.map.call(s.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})}var Qt,Jt=function(e){var t=e.$$("track");let i=Array.prototype.map.call(t,e=>e.track);return Array.prototype.map.call(t,function(e){var t=Yt(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(Yt))},Zt=function(e,i){return e.forEach(function(e){let t=i.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>t.addCue(e))}),i.textTracks()};Yt;let ei="vjs-modal-dialog";class ti extends g{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=l("div",{className:ei+"-content"},{role:"document"}),this.descEl_=l("p",{className:ei+"-description vjs-control-text",id:this.el().getAttribute("aria-describedby")}),xe(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return ei+" vjs-hidden "+super.buildCSSClass()}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){var e;this.opened_?this.options_.fillAlways&&this.fill():(e=this.player(),this.trigger("beforemodalopen"),this.opened_=!0,!this.options_.fillAlways&&(this.hasBeenOpened_||this.hasBeenFilled_)||this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0)}opened(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_}close(){var e;this.opened_&&(e=this.player(),this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary)&&this.dispose()}closeable(t){if("boolean"==typeof t){var i,t=this.closeable_=!!t;let e=this.getChild("closeButton");t&&!e&&(i=this.contentEl_,this.contentEl_=this.el_,e=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,this.on(e,"close",this.close_)),!t&&e&&(this.off(e,"close",this.close_),this.removeChild(e),e.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){var t=this.contentEl(),i=t.parentNode,s=t.nextSibling,e=(this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),Xe(t,e),this.trigger("modalfill"),s?i.insertBefore(t,s):i.appendChild(t),this.getChild("closeButton"));e&&i.appendChild(e.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),$e(this.contentEl()),this.trigger("modalempty")}content(e){return"undefined"!=typeof e&&(this.content_=e),this.content_}conditionalFocus_(){var e=document.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,!t.contains(e)&&t!==e||(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),"Escape"===e.key&&this.closeable())e.preventDefault(),this.close();else if("Tab"===e.key){var i=this.focusableEls_(),s=this.el_.querySelector(":focus");let t;for(let e=0;e(e instanceof window.HTMLAnchorElement||e instanceof window.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof window.HTMLInputElement||e instanceof window.HTMLSelectElement||e instanceof window.HTMLTextAreaElement||e instanceof window.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof window.HTMLIFrameElement||e instanceof window.HTMLObjectElement||e instanceof window.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable"))}}ti.prototype.options_={pauseOnOpen:!0,temporary:!0},g.registerComponent("ModalDialog",ti);class ii extends wt{constructor(t=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let e=0;e{this.trigger({track:e,type:"labelchange",target:this})},Ct(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(i){let s;for(let e=0,t=this.length;e{this.changing_||(this.changing_=!0,si(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}function ni(t,i){for(let e=0;e{this.changing_||(this.changing_=!0,ni(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class oi extends ii{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_)&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_)}}class li{constructor(e){li.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){var t=this.length||0;let i=0;function s(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})}var r=e.length;this.cues_=e,this.length_=e.length;if(t=e.length?{done:!0}:{done:!1,value:e[i++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ki(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);io.error(e)),window.console)&&window.console.groupEnd&&window.console.groupEnd(),i.flush()}function Ui(e,s){var t={uri:e};(e=fi(e))&&(t.cors=e),(e="use-credentials"===s.tech_.crossOrigin())&&(t.withCredentials=e),Di(t,p(this,function(e,t,i){if(e)return o.error(e,t);s.loaded_=!0,"function"!=typeof window.WebVTT?s.tech_&&s.tech_.any(["vttjsloaded","vttjserror"],e=>{if("vttjserror"!==e.type)return Mi(i,s);o.error("vttjs failed to load, stopping trying to process "+s.src)}):Mi(i,s)}))}class Bi extends pi{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");e=d(e,{kind:ui[e.kind]||"subtitles",language:e.language||e.srclang||""});let t=ci[e.mode]||"disabled",i=e.default,s=("metadata"!==e.kind&&"chapters"!==e.kind||(t="hidden"),super(e),this.tech_=e.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks,new li(this.cues_)),n=new li(this.activeCues_),a=!1;this.timeupdateHandler=p(this,function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_&&(this.activeCues=this.activeCues,a)&&(this.trigger("cuechange"),a=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});this.tech_.one("dispose",()=>{this.stopTracking()}),"disabled"!==t&&this.startTracking(),Object.defineProperties(this,{default:{get(){return i},set(){}},mode:{get(){return t},set(e){ci[e]&&t!==e&&(t=e,this.preload_||"disabled"===t||0!==this.cues.length||Ui(this.src,this),this.stopTracking(),"disabled"!==t&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?s:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0!==this.cues.length){var i=this.tech_.currentTime(),s=[];for(let e=0,t=this.cues.length;e{t=ji.LOADED,this.trigger({type:"load",target:this})})}}ji.prototype.allowedEvents_={load:"load"},ji.NONE=0,ji.LOADING=1,ji.LOADED=2,ji.ERROR=3;let Hi={audio:{ListClass:ri,TrackClass:Fi,capitalName:"Audio"},video:{ListClass:ai,TrackClass:qi,capitalName:"Video"},text:{ListClass:oi,TrackClass:Bi,capitalName:"Text"}},Vi=(Object.keys(Hi).forEach(function(e){Hi[e].getterName=e+"Tracks",Hi[e].privateName=e+"Tracks_"}),{remoteText:{ListClass:oi,TrackClass:Bi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:class{constructor(i=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let e=0,t=i.length;e]*>?)?/))[1]||o[2],t=t.substr(o.length),o):null);)"<"===o[0]?"/"===o[1]?h.length&&h[h.length-1]===o.substr(2).replace(">","")&&(h.pop(),d=d.parentNode):(s=Xi(o.substr(1,o.length-2)))?(i=e.document.createProcessingInstruction("timestamp",s),d.appendChild(i)):(s=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/))&&(r=s[1],n=s[3],a=void 0,a=Ji[r],i=a?(a=e.document.createElement(a),(r=es[r])&&n&&(a[r]=n.trim()),a):null)&&(r=d,ts[(n=i).localName]&&ts[n.localName]!==r.localName||(s[2]&&((a=s[2].split(".")).forEach(function(e){var t=/^bg_/.test(e),e=t?e.slice(3):e;Zi.hasOwnProperty(e)&&(e=Zi[e],i.style[t?"background-color":"color"]=e)}),i.className=a.join(" ")),h.push(s[1]),d.appendChild(i),d=i)):d.appendChild(e.document.createTextNode((n=o,Qi.innerHTML=n,n=Qi.textContent,Qi.textContent="",n)));return l}var ss=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function rs(e){var t=[],i="";if(e&&e.childNodes)for(n(t,e);i=function e(t){var i,s,r;return t&&t.length?(s=(i=t.pop()).textContent||i.innerText)?(r=s.match(/^.*(\n|\r)/))?r[t.length=0]:s:"ruby"===i.tagName?e(t):i.childNodes?(n(t,i),e(t)):void 0:null}(t);)for(var s=0;s=i[0]&&e<=i[1])return 1}}(i.charCodeAt(s)))return"rtl";return"ltr";function n(e,t){for(var i=t.childNodes.length-1;0<=i;i--)e.push(t.childNodes[i])}}function ns(){}function as(e,t,i){ns.call(this),this.cue=t,this.cueDiv=is(e,t.text);this.applyStyles({color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"},this.cueDiv),this.div=e.document.createElement("div"),e={direction:rs(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(e),this.div.appendChild(this.cueDiv);var s=0;switch(t.positionAlign){case"start":case"line-left":s=t.position;break;case"center":s=t.position-t.size/2;break;case"end":case"line-right":s=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function _(e){var t,i,s,r;e.div&&(t=e.div.offsetHeight,i=e.div.offsetWidth,s=e.div.offsetTop,r=(r=(r=e.div.childNodes)&&r[0])&&r.getClientRects&&r.getClientRects(),e=e.div.getBoundingClientRect(),r=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0),this.left=e.left,this.right=e.right,this.top=e.top||s,this.height=e.height||t,this.bottom=e.bottom||s+(e.height||t),this.width=e.width||i,this.lineHeight=void 0!==r?r:e.lineHeight}function os(e,t,o,l){var i,s=new _(t),r=t.cue,n=function(e){if("number"==typeof e.line&&(e.snapToLines||0<=e.line&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,r=0;ru&&(h=h<0?-1:1,h*=Math.ceil(u/d)*d),n<0&&(h+=""===r.vertical?o.height:o.width,a=a.reverse()),s.move(c,h)}else{var p=s.lineHeight/o.height*100;switch(r.lineAlign){case"center":n-=p/2;break;case"end":n-=p}switch(r.vertical){case"":t.applyStyles({top:t.formatStyle(n,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(n,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(n,"%")})}a=["+y","-x","+x","-y"],s=new _(t)}u=function(e,t){for(var i,s=new _(e),r=1,n=0;ne.left&&this.tope.top},_.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},_.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},_.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},_.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},_.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},ls.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},ls.convertCueToDOMTree=function(e,t){return e&&t?is(e,t):null};ls.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement("div");if(s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top="0",s.style.bottom="0",s.style.margin="1.5%",i.appendChild(s),function(e){for(var t=0;tthis.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),a.names.forEach(e=>{e=a[e];t&&t[e.getterName]&&(this[e.privateName]=t[e.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(e=>{!1===t[`native${e}Tracks`]&&(this[`featuresNative${e}Tracks`]=!1)}),!1===t.nativeCaptions||!1===t.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==t.preloadTextTracks,this.autoRemoteTextTracks_=new a.text.ListClass,this.initTrackListeners(),t.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(p(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),1===(this.bufferedPercent_=e)&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return jt(0,0)}bufferedPercent(){return Gt(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(Hi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach(e=>{var t=this[e+"Tracks"]()||[];let i=t.length;for(;i--;){var s=t[i];"text"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}})}cleanupAutoTextTracks(){var e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){var i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new i(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?jt(0,0):jt()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Hi.names.forEach(e=>{var t=Hi[e];let i=()=>{this.trigger(e+"trackchange")},s=this[t.getterName]();s.addEventListener("removetrack",i),s.addEventListener("addtrack",i),this.on("dispose",()=>{s.removeEventListener("removetrack",i),s.removeEventListener("addtrack",i)})})}addWebVttScript_(){if(!window.WebVTT)if(document.body.contains(this.el()))if(!this.options_["vtt.js"]&&Q(_s)&&0{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),window.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){let i=this.textTracks(),e=this.remoteTextTracks(),t=e=>i.addTrack(e.track),s=e=>i.removeTrack(e.track),r=(e.on("addtrack",t),e.on("removetrack",s),this.addWebVttScript_(),()=>this.trigger("texttrackchange")),n=()=>{r();for(let e=0;ethis.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){let t=lt++;return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return v.canPlayType(e.type)}static isTech(e){return e.prototype instanceof v||e instanceof v||e===v}static registerTech(e,t){if(v.techs_||(v.techs_={}),!v.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!v.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(v.canPlaySource)return e=m(e),v.techs_[e]=t,v.techs_[Mt(e)]=t,"Tech"!==e&&v.defaultTechOrder_.push(e),t;throw new Error("Techs must have a static canPlaySource method on them")}static getTech(e){if(e)return v.techs_&&v.techs_[e]?v.techs_[e]:(e=m(e),window&&window.videojs&&window.videojs[e]?(o.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),window.videojs[e]):void 0)}}a.names.forEach(function(e){let t=a[e];v.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),v.prototype.featuresVolumeControl=!0,v.prototype.featuresMuteControl=!0,v.prototype.featuresFullscreenResize=!1,v.prototype.featuresPlaybackRate=!1,v.prototype.featuresProgressEvents=!1,v.prototype.featuresSourceset=!1,v.prototype.featuresTimeupdateEvents=!1,v.prototype.featuresNativeTextTracks=!1,v.prototype.featuresVideoFrameCallback=!1,v.withSourceHandlers=function(r){r.registerSourceHandler=function(e,t){let i=r.sourceHandlers;i=i||(r.sourceHandlers=[]),void 0===t&&(t=i.length),i.splice(t,0,e)},r.canPlayType=function(t){var i,s=r.sourceHandlers||[];for(let e=0;efunction s(r={},e=[],n,a,o=[],l=!1){let[t,...d]=e;if("string"==typeof t)s(r,vs[t],n,a,o,l);else if(t){let i=xs(a,t);if(!i.setSource)return o.push(i),s(r,d,n,a,o,l);i.setSource(Object.assign({},r),function(e,t){if(e)return s(r,d,n,a,o,l);o.push(i),s(t,r.type===t.type?d:vs[t.type],n,a,o,l)})}else d.length?s(r,d,n,a,o,l):l?n(r,o):s(r,vs["*"],n,a,o,!0)}(t,vs[t.type],i,e),1)}function ws(e,t,i,s=null){var r="call"+m(i),r=e.reduce(Is(r),s),s=r===Ts,t=s?null:t[i](r),n=e,a=i,o=t,l=s;for(let e=n.length-1;0<=e;e--){var d=n[e];d[a]&&d[a](l,o)}return t}let Es={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Cs={setCurrentTime:1,setMuted:1,setVolume:1},ks={play:1,pause:1};function Is(i){return(e,t)=>e===Ts?Ts:t[i]?t[i](e):e}function xs(e,t){var i=bs[e.id()];let s=null;if(null==i)s=t(e),bs[e.id()]=[[t,s]];else{for(let e=0;e{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(1{if(e.hasOwnProperty("el_")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void i.push(e);e.hasOwnProperty("children_")&&0{i.push({name:()=>"ModalButton"+(e+1),el:()=>t,getPositions:()=>{var e=t.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>t.focus()})})}),this.focusableComponents=i,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;ee!==s&&this.isInDirection_(t.boundingClientRect,e.getPositions().boundingClientRect,i)),e=this.findBestCandidate_(t.center,e,i);e?this.focus(e):this.trigger({type:"endOfFocusableComponents",direction:i,focusedComponent:s})}}findBestCandidate_(e,t,i){let s=1/0,r=null;for(var n of t){var a=n.getPositions().center,a=this.calculateDistance_(e,a,i);a=e.right;case"left":return t.right<=e.left;case"down":return t.top>=e.bottom;case"up":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;ethis.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&o.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;e=l(e,t,i);return this.player_.options_.experimentalSvgIcons||e.appendChild(l("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(e),e}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=l("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,xe(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)}buildCSSClass(){return"vjs-control vjs-button "+super.buildCSSClass()}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}g.registerComponent("ClickableComponent",Ms);class Us extends Ms{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return l("div",{className:"vjs-poster"})}crossOrigin(e){if("undefined"==typeof e)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null!==e&&"anonymous"!==e&&"use-credentials"!==e?this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`):this.$("img")&&(this.$("img").crossOrigin=e)}update(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$("img")||this.el_.appendChild(l("picture",{className:"vjs-poster",tabIndex:-1},{},l("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e):this.el_.textContent=""}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Kt(this.player_.play()):this.player_.pause())}}Us.prototype.crossorigin=Us.prototype.crossOrigin,g.registerComponent("PosterImage",Us);let Bs={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Fs(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function qs(e,t,i){try{e.style[t]=i}catch(e){}}function js(e){return e?e+"px":""}class Hs extends g{constructor(s,e,t){super(s,e,t);let r=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};s.on("loadstart",e=>this.toggleDisplay(e)),s.on("texttrackchange",e=>this.updateDisplay(e)),s.on("loadedmetadata",e=>{this.updateDisplayOverlay(),this.preselectTrack(e)}),s.ready(p(this,function(){if(s.tech_&&s.tech_.featuresNativeTextTracks)this.hide();else{s.on("fullscreenchange",r),s.on("playerresize",r);let e=window.screen.orientation||window,t=window.screen.orientation?"change":"orientationchange";e.addEventListener(t,r),s.on("dispose",()=>e.removeEventListener(t,r));var i=this.options_.playerOptions.tracks||[];for(let e=0;e{var t;e.style.inset&&3===(t=e.style.inset.split(" ")).length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:"unset"})}))}}updateDisplayOverlay(){if(this.player_.videoHeight()&&window.CSS.supports("inset-inline: 10px")){var i=this.player_.currentWidth(),s=this.player_.currentHeight(),r=i/s,n=this.player_.videoWidth()/this.player_.videoHeight();let e=0,t=0;.1!e.activeCues)){var t=[];for(let e=0;ethis.handleMouseDown(e))}buildCSSClass(){return"vjs-big-play-button"}handleClick(t){var i=this.player_.play();if(this.mouseused_&&"clientX"in t&&"clientY"in t)Kt(i),this.player_.tech(!0)&&this.player_.tech(!0).focus();else{var t=this.player_.getChild("controlBar");let e=t&&t.getChild("playToggle");e?(t=()=>e.focus(),Xt(i)?i.then(t,()=>{}):this.setTimeout(t,1)):this.player_.tech(!0).focus()}}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}zs.prototype.controlText_="Play Video",g.registerComponent("BigPlayButton",zs);class $s extends s{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return"vjs-close-button "+super.buildCSSClass()}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}g.registerComponent("CloseButton",$s);class Ws extends s{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon("play"),this.on(e,"play",e=>this.handlePlay(e)),this.on(e,"pause",e=>this.handlePause(e)),t.replay&&this.on(e,"ended",e=>this.handleEnded(e))}buildCSSClass(){return"vjs-play-control "+super.buildCSSClass()}handleClick(e){this.player_.paused()?Kt(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",e=>this.handleSeeked(e))}}Ws.prototype.controlText_="Play",g.registerComponent("PlayToggle",Ws);class Gs extends g{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],e=>this.update(e)),this.updateTextNode_()}createEl(){var e=this.buildCSSClass(),t=super.createEl("div",{className:e+" vjs-time-control vjs-control"}),i=l("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return t.appendChild(i),this.contentEl_=l("span",{className:e+"-display"},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&"seeking"===e.type||this.updateContent(e)}updateTextNode_(e=0){e=Wt(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(this.contentEl_){let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,o.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=document.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}}))}updateContent(e){}}Gs.prototype.labelText_="Time",Gs.prototype.controlText_="Time",g.registerComponent("TimeDisplay",Gs);class Xs extends Gs{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Xs.prototype.labelText_="Current Time",Xs.prototype.controlText_="Current Time",g.registerComponent("CurrentTimeDisplay",Xs);class Ks extends Gs{constructor(e,t){super(e,t);t=e=>this.updateContent(e);this.on(e,"durationchange",t),this.on(e,"loadstart",t),this.on(e,"loadedmetadata",t)}buildCSSClass(){return"vjs-duration"}updateContent(e){var t=this.player_.duration();this.updateTextNode_(t)}}Ks.prototype.labelText_="Duration",Ks.prototype.controlText_="Duration",g.registerComponent("DurationDisplay",Ks);class Ys extends g{createEl(){var e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}}g.registerComponent("TimeDivider",Ys);class Qs extends Gs{constructor(e,t){super(e,t),this.on(e,"durationchange",e=>this.updateContent(e))}buildCSSClass(){return"vjs-remaining-time"}createEl(){var e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(l("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if("number"==typeof this.player_.duration()){let e;e=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(e)}}}Qs.prototype.labelText_="Remaining Time",Qs.prototype.controlText_="Remaining Time",g.registerComponent("RemainingTimeDisplay",Qs);class Js extends g{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",e=>this.updateShowing(e))}createEl(){var e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=l("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(l("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(document.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}g.registerComponent("LiveDisplay",Js);class Zs extends s{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){var e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=l("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function er(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}Zs.prototype.controlText_="Seek to live, currently playing live",g.registerComponent("SeekToLive",Zs);zi=Object.freeze({__proto__:null,clamp:er});class tr extends g{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){var e;this.enabled()&&(e=this.bar.el_.ownerDocument,this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1)}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||le||e.preventDefault(),Fe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){var t=this.bar.el_.ownerDocument;qe(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(this.el_&&this.bar){let t=this.getProgress();return t!==this.progress_&&(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",()=>{var e=this.vertical()?"height":"width";this.bar.el().style[e]=(100*t).toFixed(2)+"%"})),t}}getProgress(){return Number(er(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){e=Ve(this.el_,e);return this.vertical()?e.y:e.x}handleKeyDown(e){var t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,t=t&&t.horizontalSeek;i?t&&"ArrowLeft"===e.key||!t&&"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):t&&"ArrowRight"===e.key||!t&&"ArrowUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e):"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):"ArrowUp"===e.key||"ArrowRight"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}g.registerComponent("Slider",tr);let ir=(e,t)=>er(e/t*100,0,100).toFixed(2)+"%";class sr extends g{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",e=>this.update(e))}createEl(){var e=super.createEl("div",{className:"vjs-load-progress"}),t=l("span",{className:"vjs-control-text"}),i=l("span",{textContent:this.localize("Loaded")}),s=document.createTextNode(": ");return this.percentageEl_=l("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{var e=this.player_.liveTracker,i=this.player_.buffered(),e=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),r=this.partEls_,e=ir(s,e);this.percent_!==e&&(this.el_.style.width=e,xe(this.percentageEl_,e),this.percent_=e);for(let t=0;ti.length;e--)this.el_.removeChild(r[e-1]);r.length=i.length})}}g.registerComponent("LoadProgressBar",sr);class rr extends g{constructor(e,t){super(e,t),this.update=vt(p(this,this.update),30)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(s,r,n){var a=He(this.el_),o=je(this.player_.el()),r=s.width*r;if(o&&a){let e=s.left-o.left+r,t=s.width-r+(o.right-s.right),i=(t||(t=s.width-r,e=r),a.width/2);ea.width&&(i=a.width),i=Math.round(i),this.el_.style.right=`-${i}px`,this.write(n)}}write(e){xe(this.el_,e)}updateTime(r,n,a,o){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let e;var t,i,s=this.player_.duration();e=this.player_.liveTracker&&this.player_.liveTracker.isLive()?((i=(t=this.player_.liveTracker.liveWindow())-n*t)<1?"":"-")+Wt(i,t):Wt(a,s),this.update(r,n,e),o&&o()})}}g.registerComponent("TimeTooltip",rr);class nr extends g{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=vt(p(this,this.update),30)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t){var i,s=this.getChild("timeTooltip");s&&(i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),s.updateTime(e,t,i))}}nr.prototype.options_={children:[]},u||se||nr.prototype.options_.children.push("timeTooltip"),g.registerComponent("PlayProgressBar",nr);class ar extends g{constructor(e,t){super(e,t),this.update=vt(p(this,this.update),30)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){var i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+"px"})}}ar.prototype.options_={children:["timeTooltip"]},g.registerComponent("MouseTimeDisplay",ar);class or extends tr{constructor(e,t){(t=d(or.prototype.options_,t)).children=[...t.children];var i=e.options_.disableSeekWhileScrubbingOnMobile&&(u||se);(u||se)&&!i||t.children.splice(1,0,"mouseTimeDisplay"),super(e,t),this.shouldDisableSeekWhileScrubbingOnMobile_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=p(this,this.update),this.update=vt(this.update_,30),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in document&&"visibilityState"in document&&this.on(document,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===document.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if("hidden"!==document.visibilityState){let s=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{var e=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),t=this.player_.liveTracker;let i=this.player_.duration();t&&t.isLive()&&(i=this.player_.liveTracker.liveCurrentTime()),this.percent_!==s&&(this.el_.setAttribute("aria-valuenow",(100*s).toFixed(2)),this.percent_=s),this.currentTime_===e&&this.duration_===i||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Wt(e,i),Wt(i,i)],"{1} of {2}")),this.currentTime_=e,this.duration_=i),this.bar&&this.bar.update(je(this.el()),this.getProgress())}),s}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){if(this.pendingSeekTime_)return this.pendingSeekTime_/this.player_.duration();var e=this.getCurrentTime_();let t;var i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){Ke(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbingOnMobile_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(t,i=!1){if(Ke(t)&&!isNaN(this.player_.duration())){i||this.player_.scrubbing()||this.player_.scrubbing(!0);let e;i=this.calculateDistance(t),t=this.player_.liveTracker;if(t&&t.isLive()){if(.99<=i)return void t.seekToLiveEdge();var s=t.seekableStart(),r=t.liveCurrentTime();if((e=(e=(e=s+i*t.liveWindow())>=r?r:e)<=s?s+.1:e)===1/0)return}else(e=i*this.player_.duration())===this.player_.duration()&&(e-=.1);this.shouldDisableSeekWhileScrubbingOnMobile_?this.pendingSeekTime_=e:this.userSeek_(e),this.player_.options_.enableSmoothSeeking&&this.update()}}enable(){super.enable();var e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();var e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime_&&(this.userSeek_(this.pendingSeekTime_),this.pendingSeekTime_=null),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Kt(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){var t,i=this.player_.liveTracker;" "===e.key||"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),this.handleAction(e)):"Home"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(0)):"End"===e.key?(e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration())):/^[0-9]$/.test(e.key)?(e.preventDefault(),e.stopPropagation(),t=.1*parseInt(e.key,10),i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*t):this.userSeek_(this.player_.duration()*t)):"PageDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):"PageUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in document&&"visibilityState"in document&&this.off(document,"visibilitychange",this.toggleVisibility_),super.dispose()}}or.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},g.registerComponent("SeekBar",or);class lr extends g{constructor(e,t){super(e,t),this.handleMouseMove=vt(p(this,this.handleMouseMove),30),this.throttledHandleMouseSeek=vt(p(this,this.handleMouseSeek),30),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){var t,i,s,r,n=this.getChild("seekBar");n&&(t=n.getChild("playProgressBar"),i=n.getChild("mouseTimeDisplay"),t||i)&&(s=He(r=n.el()),r=er(r=Ve(r,e).x,0,1),i&&i.update(s,r),t)&&t.update(s,n.getProgress())}handleMouseSeek(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){var e;this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())&&(e=this.getChild("seekBar"),this.player_.scrubbing(!1),e.videoWasPlaying)&&Kt(this.player_.play())}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}lr.prototype.options_={children:["seekBar"]},g.registerComponent("ProgressControl",lr);class dr extends s{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],e=>this.handlePictureInPictureChange(e)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return"vjs-picture-in-picture-control vjs-hidden "+super.buildCSSClass()}handlePictureInPictureAudioModeChange(){"audio"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){document.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in window?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){"function"==typeof document.exitPictureInPicture&&super.show()}}dr.prototype.controlText_="Picture-in-Picture",g.registerComponent("PictureInPictureToggle",dr);class hr extends s{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",e=>this.handleFullscreenChange(e)),!1===document[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return"vjs-fullscreen-control "+super.buildCSSClass()}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}hr.prototype.controlText_="Fullscreen",g.registerComponent("FullscreenToggle",hr);class ur extends g{createEl(){var e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}g.registerComponent("VolumeLevel",ur);class cr extends g{constructor(e,t){super(e,t),this.update=vt(p(this,this.update),30)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(t,i,s,e){if(!s){var s=je(this.el_),r=je(this.player_.el()),i=t.width*i;if(!r||!s)return;var n=t.left-r.left+i,i=t.width-i+(r.right-t.right);let e=s.width/2;ns.width&&(e=s.width),this.el_.style.right=`-${e}px`}this.write(e+"%")}write(e){xe(this.el_,e)}updateVolume(e,t,i,s,r){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,t,i,s.toFixed(0)),r&&r()})}}g.registerComponent("VolumeLevelTooltip",cr);class pr extends g{constructor(e,t){super(e,t),this.update=vt(p(this,this.update),30)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){var s=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,s,()=>{i?this.el_.style.bottom=e.height*t+"px":this.el_.style.left=e.width*t+"px"})}}pr.prototype.options_={children:["volumeLevelTooltip"]},g.registerComponent("MouseVolumeLevelDisplay",pr);class mr extends tr{constructor(e,t){super(e,t),this.on("slideractive",e=>this.updateLastVolume_(e)),this.on(e,"volumechange",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){Ke(e)&&super.handleMouseDown(e)}handleMouseMove(e){var t,i,s,r=this.getChild("mouseVolumeLevelDisplay");r&&(t=je(s=this.el()),i=this.vertical(),s=Ve(s,e),s=er(s=i?s.y:s.x,0,1),r.update(t,s,i)),Ke(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){let e=this.player_.volume();this.one("sliderinactive",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}mr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},u||se||mr.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),mr.prototype.playerEvent="volumechange",g.registerComponent("VolumeBar",mr);class gr extends g{constructor(e,t={}){var i,s;t.vertical=t.vertical||!1,"undefined"!=typeof t.volumeBar&&!Q(t.volumeBar)||(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),i=this,(s=e).tech_&&!s.tech_.featuresVolumeControl&&i.addClass("vjs-hidden"),i.on(s,"loadstart",function(){s.tech_.featuresVolumeControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")}),this.throttledHandleMouseMove=vt(p(this,this.handleMouseMove),30),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",e=>this.handleMouseDown(e)),this.on("touchstart",e=>this.handleMouseDown(e)),this.on("mousemove",e=>this.handleMouseMove(e)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:"vjs-volume-control vjs-control "+e})}handleMouseDown(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}gr.prototype.options_={children:["volumeBar"]},g.registerComponent("VolumeControl",gr);class fr extends s{constructor(e,t){var i,s;super(e,t),i=this,(s=e).tech_&&!s.tech_.featuresMuteControl&&i.addClass("vjs-hidden"),i.on(s,"loadstart",function(){s.tech_.featuresMuteControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")}),this.on(e,["loadstart","volumechange"],e=>this.update(e))}buildCSSClass(){return"vjs-mute-control "+super.buildCSSClass()}handleClick(e){var t=this.player_.volume(),i=this.player_.lastVolume_();0===t?(this.player_.volume(i<.1?.1:i),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){var e=this.player_.volume();let t=3;this.setIcon("volume-high"),u&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),Le(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?" ":""}vjs-vol-`+t,"")),Pe(this.el_,"vjs-vol-"+t)}updateControlText_(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)}}fr.prototype.controlText_="Mute",g.registerComponent("MuteToggle",fr);class yr extends g{constructor(e,t={}){"undefined"!=typeof t.inline?t.inline=t.inline:t.inline=!0,"undefined"!=typeof t.volumeControl&&!Q(t.volumeControl)||(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,"keyup",e=>this.handleKeyPress(e)),this.on(this.volumeControl,"keyup",e=>this.handleVolumeControlKeyUp(e)),this.on("keydown",e=>this.handleKeyPress(e)),this.on("mouseover",e=>this.handleMouseOver(e)),this.on("mouseout",e=>this.handleMouseOut(e)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:"vjs-volume-panel vjs-control "+e})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){"Escape"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),mt(document,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),c(document,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){"Escape"===e.key&&this.handleMouseOut()}}yr.prototype.options_={children:["muteToggle","volumeControl"]},g.registerComponent("VolumePanel",yr);class _r extends s{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon("forward-"+this.skipTime),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){var e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} `+super.buildCSSClass()}handleClick(e){if(!isNaN(this.player_.duration())){var t=this.player_.currentTime(),i=this.player_.liveTracker,i=i&&i.isLive()?i.seekableEnd():this.player_.duration();let e;e=t+this.skipTime<=i?t+this.skipTime:i,this.player_.currentTime(e)}}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}_r.prototype.controlText_="Skip Forward",g.registerComponent("SkipForward",_r);class vr extends s{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon("replay-"+this.skipTime),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){var e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} `+super.buildCSSClass()}handleClick(e){var t=this.player_.currentTime(),i=this.player_.liveTracker,i=i&&i.isLive()&&i.seekableStart();let s;s=i&&t-this.skipTime<=i?i:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(s)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}vr.prototype.controlText_="Skip Backward",g.registerComponent("SkipBackward",vr);class br extends g{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof g&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof g&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){e=this.addChild(e);e&&this.addEventListenerForItem(e)}createEl(){var e=this.options_.contentElType||"ul",e=(this.contentEl_=l(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu"),super.createEl("div",{append:this.contentEl_,className:"vjs-menu"}));return e.appendChild(this.contentEl_),mt(e,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),e}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){let t=e.relatedTarget||document.activeElement;this.children().some(e=>e.el()===t)||(e=this.menuButton_)&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}handleTapClick(t){var e;this.menuButton_&&(this.menuButton_.unpressButton(),e=this.children(),Array.isArray(e))&&(e=e.filter(e=>e.el()===t.target)[0])&&"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus()}handleKeyDown(e){"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),0this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",t),this.on(this.menuButton_,"click",t),this.on(this.menuButton_,"keydown",e=>this.handleKeyDown(e)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),mt(document,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",e=>this.handleMouseLeave(e)),this.on("keydown",e=>this.handleSubmenuKeyDown(e))}update(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){var e,t=new br(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title&&(e=l("li",{className:"vjs-menu-title",textContent:m(this.options_.title),tabIndex:-1}),e=new g(this.player_,{el:e}),t.addItem(e)),this.items=this.createItems(),this.items)for(let e=0;e{this.handleTracksChange.apply(this,e)}),n=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on(["loadstart","texttrackchange"],r),s.addEventListener("change",r),s.addEventListener("selectedlanguagechange",n),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],r),s.removeEventListener("change",r),s.removeEventListener("selectedlanguagechange",n)}),void 0===s.onchange){let e;this.on(["tap","click"],function(){if("object"!=typeof window.Event)try{e=new window.Event("change")}catch(e){}e||(e=document.createEvent("Event")).initEvent("change",!0,!0),s.dispatchEvent(e)})}this.handleTracksChange()}handleClick(e){var t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return"vjs-chapters-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-chapters-button "+super.buildWrapperCSSClass()}update(e){e&&e.track&&"chapters"!==e.track.kind||((e=this.findChaptersTrack())!==this.track_?(this.setTrack(e),super.update()):(!this.items||e&&e.cues&&e.cues.length!==this.items.length)&&super.update())}setTrack(e){var t;this.track_!==e&&(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_&&((t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_))&&t.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null),this.track_=e,this.track_)&&(this.track_.mode="hidden",(t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_))&&t.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_))}findChaptersTrack(){var t=this.player_.textTracks()||[];for(let e=t.length-1;0<=e;e--){var i=t[e];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(m(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){var i=[];if(this.track_){var s=this.track_.cues;if(s)for(let e=0,t=s.length;e{this.handleTracksChange.apply(this,e)});s.addEventListener("change",r),this.on("dispose",()=>{s.removeEventListener("change",r)})}createEl(e,t,i){e=super.createEl(e,t,i),t=e.querySelector(".vjs-menu-item-text");return 0<=["main-desc","descriptions"].indexOf(this.options_.track.kind)&&(t.appendChild(l("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),t.appendChild(l("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),e}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){var t=this.player_.audioTracks();for(let e=0;ethis.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Ur.prototype.contentElType="button",g.registerComponent("PlaybackRateMenuItem",Ur);class Br extends Tr{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",e=>this.updateVisibility(e)),this.on(e,"ratechange",e=>this.updateLabel(e)),this.on(e,"playbackrateschange",e=>this.handlePlaybackRateschange(e))}createEl(){var e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=l("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return"vjs-playback-rate "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-playback-rate "+super.buildWrapperCSSClass()}createItems(){var t=this.playbackRates(),i=[];for(let e=t.length-1;0<=e;e--)i.push(new Ur(this.player(),{rate:t[e]+"x"}));return i}handlePlaybackRateschange(e){this.update()}playbackRates(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0{this.open(e)})}buildCSSClass(){return"vjs-error-display "+super.buildCSSClass()}content(){var e=this.player().error();return e?this.localize(e.message):""}}Hr.prototype.options_=Object.assign({},ti.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),g.registerComponent("ErrorDisplay",Hr);class Vr extends g{constructor(e,t={}){super(e,t),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),l("select",{id:this.options_.id},{},this.options_.SelectOptions.map(e=>{var t=(this.options_.labelId||"vjs-track-option-"+lt++)+"-"+e[1].replace(/\W+/g,""),e=l("option",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return e.setAttribute("aria-labelledby",this.selectLabelledbyIds+" "+t),e}))}}g.registerComponent("TextTrackSelect",Vr);class zr extends g{constructor(t,e={}){super(t,e);var i,e=l("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId}),e=(this.el().appendChild(e),this.options_.selects);for(i of e){var s=this.options_.selectConfigs[i],r=s.className,n=s.id.replace("%s",this.options_.id_);let e=null;var a="vjs_select_"+lt++,r=("colors"===this.options_.type&&(e=l("span",{className:r}),(r=l("label",{id:n,className:"vjs-label",textContent:this.localize(s.label)})).setAttribute("for",a),e.appendChild(r)),new Vr(t,{SelectOptions:s.options,legendId:this.options_.legendId,id:a,labelId:n}));this.addChild(r),"colors"===this.options_.type&&(e.appendChild(r.el()),this.el().appendChild(e))}}createEl(){return l("fieldset",{className:this.options_.className})}}g.registerComponent("TextTrackFieldset",zr);class $r extends g{constructor(e,t={}){super(e,t);var t=this.options_.textTrackComponentid,i=new zr(e,{id_:t,legendId:"captions-text-legend-"+t,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"}),i=(this.addChild(i),new zr(e,{id_:t,legendId:"captions-background-"+t,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"})),i=(this.addChild(i),new zr(e,{id_:t,legendId:"captions-window-"+t,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"}));this.addChild(i)}createEl(){return l("div",{className:"vjs-track-settings-colors"})}}g.registerComponent("TextTrackSettingsColors",$r);class Wr extends g{constructor(e,t={}){super(e,t);var t=this.options_.textTrackComponentid,i=new zr(e,{id_:t,legendId:"captions-font-size-"+t,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"}),i=(this.addChild(i),new zr(e,{id_:t,legendId:"captions-edge-style-"+t,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"})),i=(this.addChild(i),new zr(e,{id_:t,legendId:"captions-font-family-"+t,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"}));this.addChild(i)}createEl(){return l("div",{className:"vjs-track-settings-font"})}}g.registerComponent("TextTrackSettingsFont",Wr);class Gr extends g{constructor(e,t={}){super(e,t);var t=this.localize("restore all settings to the default values"),i=new s(e,{controlText:t,className:"vjs-default-button"}),i=(i.el().classList.remove("vjs-control","vjs-button"),i.el().textContent=this.localize("Reset"),this.addChild(i),new s(e,{controlText:t,className:"vjs-done-button"}));i.el().classList.remove("vjs-control","vjs-button"),i.el().textContent=this.localize("Done"),this.addChild(i)}createEl(){return l("div",{className:"vjs-track-settings-controls"})}}g.registerComponent("TrackSettingsControls",Gr);let Xr="vjs-text-track-settings";var e=["#000","Black"],Ii=["#00F","Blue"],Kr=["#0FF","Cyan"],Yr=["#0F0","Green"],r=["#F0F","Magenta"],Qr=["#F00","Red"],Jr=["#FFF","White"],n=["#FF0","Yellow"],Zr=["1","Opaque"],en=["0.5","Semi-Transparent"],tn=["0","Transparent"];let sn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[e,Jr,Qr,Yr,Ii,n,r,Kr],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[Zr,en,tn],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Jr,e,Qr,Yr,Ii,n,r,Kr],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[Zr,en],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[tn,en,Zr],className:"vjs-window-opacity vjs-opacity"}};function rn(e,t){if((e=t?t(e):e)&&"none"!==e)return e}sn.windowColor.options=sn.backgroundColor.options;class nn extends ti{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=l("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){var t=new $r(e,{textTrackComponentid:this.id_,selectConfigs:sn,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]}),t=(this.addChild(t),new Wr(e,{textTrackComponentid:this.id_,selectConfigs:sn,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]})),t=(this.addChild(t),new Gr(e));this.addChild(t)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),X(sn,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return K(sn,(e,t,i)=>{s=this.$(t.selector),t=t.parser;var s=rn(s.options[s.options.selectedIndex].value,t);return void 0!==s&&(e[i]=s),e},{})}setValues(n){X(sn,(e,t)=>{var i=this.$(e.selector),s=n[t],r=e.parser;if(s)for(let e=0;e{var t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(window.localStorage.getItem(Xr))}catch(e){o.warn(e)}e&&this.setValues(e)}saveSettings(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?window.localStorage.setItem(Xr,JSON.stringify(e)):window.localStorage.removeItem(Xr)}catch(e){o.warn(e)}}}updateDisplay(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}g.registerComponent("TextTrackSettings",nn);class an extends g{constructor(e,t){let i=t.ResizeObserver||window.ResizeObserver;super(e,d({createEl:!(i=null===t.ResizeObserver?!1:i),reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||window.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=bt(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(this.el_&&this.el_.contentWindow){let e=this.debouncedHandler_,t=this.unloadListener_=function(){c(this,"resize",e),c(this,"unload",t),t=null};mt(this.el_.contentWindow,"unload",t),mt(this.el_.contentWindow,"resize",e)}},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}g.registerComponent("ResizeManager",an);let on={trackingThreshold:20,liveTolerance:15};class ln extends g{constructor(e,t){super(e,d(on,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",e=>this.handleDurationchange(e)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){var t=this.player_.seekable();if(t&&t.length){var t=Number(window.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3,t=(this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i,this.liveCurrentTime()),i=this.player_.currentTime();let e=this.player_.paused()||this.seekedBehindLive_||Math.abs(t-i)>this.options_.liveTolerance;(e=this.timeupdateSeen_&&t!==1/0?e:!1)!==this.behindLiveEdge_&&(this.behindLiveEdge_=e,this.trigger("liveedgechange"))}}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&2this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:l("div",{className:"vjs-title-bar-title",id:"vjs-title-bar-title-"+lt++}),description:l("div",{className:"vjs-title-bar-description",id:"vjs-title-bar-description-"+lt++})},l("div",{className:"vjs-title-bar"},{},J(this.els))}updateDom_(){var e=this.player_.tech_;let s=e&&e.el_,r={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(e=>{var t=this.state[e],i=this.els[e],e=r[e];$e(i),t&&xe(i,t),s&&(s.removeAttribute(e),t)&&s.setAttribute(e,i.id)}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){var e=this.player_.tech_,e=e&&e.el_;e&&(e.removeAttribute("aria-labelledby"),e.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}g.registerComponent("TitleBar",dn);let hn={initialDisplay:4e3,position:[],takeFocus:!1};class un extends s{constructor(e,t){super(e,t=d(hn,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],e=>{this.removeClass("force-display")})}buildCSSClass(){return"vjs-transient-button focus-visible "+this.options_.position.map(e=>"vjs-"+e).join(" ")}createEl(){var e=l("button",{},{type:"button",class:this.buildCSSClass()},l("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}g.registerComponent("TransientButton",un);function cn(s){let r=s.el();if(!r.resetSourceWatch_){let t={},e=yn(s),i=t=>(...e)=>{e=t.apply(r,e);return mn(s),e};["append","appendChild","insertAdjacentHTML"].forEach(e=>{r[e]&&(t[e]=r[e],r[e]=i(t[e]))}),Object.defineProperty(r,"innerHTML",d(e,{set:i(e.set)})),r.resetSourceWatch_=()=>{r.resetSourceWatch_=null,Object.keys(t).forEach(e=>{r[e]=t[e]}),Object.defineProperty(r,"innerHTML",e)},s.one("sourceset",r.resetSourceWatch_)}}function pn(n){if(n.featuresSourceset){let r=n.el();if(!r.resetSourceset_){e=n;let t=fn([e.el(),window.HTMLMediaElement.prototype,_n],"src");var e;let i=r.setAttribute,s=r.load;Object.defineProperty(r,"src",d(t,{set:e=>{e=t.set.call(r,e);return n.triggerSourceset(r.src),e}})),r.setAttribute=(e,t)=>{t=i.call(r,e,t);return/src/i.test(e)&&n.triggerSourceset(r.src),t},r.load=()=>{var e=s.call(r);return mn(n)||(n.triggerSourceset(""),cn(n)),e},r.currentSrc?n.triggerSourceset(r.currentSrc):mn(n)||cn(n),r.resetSourceset_=()=>{r.resetSourceset_=null,r.load=s,r.setAttribute=i,Object.defineProperty(r,"src",t),r.resetSourceWatch_&&r.resetSourceWatch_()}}}}let mn=t=>{var e=t.el();if(e.hasAttribute("src"))t.triggerSourceset(e.src);else{var i=t.$$("source"),s=[];let e="";if(!i.length)return!1;for(let e=0;e{let s={};for(let e=0;efn([e.el(),window.HTMLMediaElement.prototype,window.Element.prototype,gn],"innerHTML"),_n=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?gi(window.Element.prototype.getAttribute.call(this,"src")):""},set(e){return window.Element.prototype.setAttribute.call(this,"src",e),e}});class b extends v{constructor(e,t){super(e,t);t=e.source;let i=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,t&&(this.el_.currentSrc!==t.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(t):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){var s=this.el_.childNodes;let e=s.length;for(var r=[];e--;){var n=s[e];"track"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),i||this.el_.hasAttribute("crossorigin")||!fi(n.src)||(i=!0)):r.push(n))}for(let e=0;e{s=[];for(let e=0;ei.removeEventListener("change",e)),()=>{for(let e=0;e{i.removeEventListener("change",e),i.removeEventListener("change",r),i.addEventListener("change",r)}),this.on("webkitendfullscreen",()=>{i.removeEventListener("change",e),i.addEventListener("change",e),i.removeEventListener("change",r)})}overrideNative_(e,i){if(i===this[`featuresNative${e}Tracks`]){let t=e.toLowerCase();this[t+"TracksListeners_"]&&Object.keys(this[t+"TracksListeners_"]).forEach(e=>{this.el()[t+"Tracks"].removeEventListener(e,this[t+"TracksListeners_"][e])}),this[`featuresNative${e}Tracks`]=!i,this[t+"TracksListeners_"]=null,this.proxyNativeTracksForType_(t)}}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(i){var s=Hi[i];let r=this.el()[s.getterName],n=this[s.getterName]();if(this[`featuresNative${s.capitalName}Tracks`]&&r&&r.addEventListener){let e={change:e=>{var t={type:"change",target:n,currentTarget:n,srcElement:n};n.trigger(t),"text"===i&&this[Vi.remoteText.getterName]().trigger(t)},addtrack(e){n.addTrack(e.track)},removetrack(e){n.removeTrack(e.track)}},t=function(){var e=[];for(let i=0;i{let i=e[t];r.addEventListener(t,i),this.on("dispose",e=>r.removeEventListener(t,i))}),this.on("loadstart",t),this.on("dispose",e=>this.off("loadstart",t))}}proxyNativeTracks_(){Hi.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let t=this.options_.tag;t&&(this.options_.playerElIngest||this.movingMediaElementInDOM)||(t?(e=t.cloneNode(!0),t.parentNode&&t.parentNode.insertBefore(e,t),b.disposeMediaElement(t),t=e):(t=document.createElement("video"),e=d({},this.options_.tag&&Ne(this.options_.tag)),ve&&!0===this.options_.nativeControlsForTouch||delete e.controls,Re(t,Object.assign(e,{id:this.options_.techId,class:"vjs-tech"}))),t.playerId=this.options_.playerId),"undefined"!=typeof this.options_.preload&&Ue(t,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(t.disablePictureInPicture=this.options_.disablePictureInPicture);var e,i=["loop","muted","playsinline","autoplay"];for(let e=0;e{0{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)})}}supportsFullScreen(){return"function"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){let e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Kt(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){return e?(e={src:e},t&&(e.type=t),t=l("source",{},e),this.el_.appendChild(t),!0):(o.error("Invalid source URL."),!1)}removeSourceElement(e){if(e){var t;for(t of this.el_.querySelectorAll("source"))if(t.src===e)return this.el_.removeChild(t),!0;o.warn("No matching source element found with src: "+e)}else o.error("Source URL is required to remove the source element.");return!1}reset(){b.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){var t;return this.featuresNativeTextTracks?(t=document.createElement("track"),e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t):super.createRemoteTextTrack(e)}addRemoteTextTrack(e,t){e=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(e),e}removeRemoteTextTrack(t){if(super.removeRemoteTextTrack(t),this.featuresNativeTextTracks){var i=this.$$("track");let e=i.length;for(;e--;)t!==i[e]&&t!==i[e].track||this.el().removeChild(i[e])}}getVideoPlaybackQuality(){var e;return"function"==typeof this.el().getVideoPlaybackQuality?this.el().getVideoPlaybackQuality():(e={},"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),window.performance&&(e.creationTime=window.performance.now()),e)}}Z(b,"TEST_VID",function(){var e,t;if(Ee())return e=document.createElement("video"),(t=document.createElement("track")).kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}),b.isSupported=function(){try{b.TEST_VID.volume=.5}catch(e){return!1}return!(!b.TEST_VID||!b.TEST_VID.canPlayType)},b.canPlayType=function(e){return b.TEST_VID.canPlayType(e)},b.canPlaySource=function(e,t){return b.canPlayType(e.type)},b.canControlVolume=function(){try{let e=b.TEST_VID.volume;b.TEST_VID.volume=e/2+.1;var t=e!==b.TEST_VID.volume;return t&&u?(window.setTimeout(()=>{b&&b.prototype&&(b.prototype.featuresVolumeControl=e!==b.TEST_VID.volume)}),!1):t}catch(e){return!1}},b.canMuteVolume=function(){try{var e=b.TEST_VID.muted;return b.TEST_VID.muted=!e,b.TEST_VID.muted?Ue(b.TEST_VID,"muted","muted"):Be(b.TEST_VID,"muted"),e!==b.TEST_VID.muted}catch(e){return!1}},b.canControlPlaybackRate=function(){if(se&&le&&he<58)return!1;try{var e=b.TEST_VID.playbackRate;return b.TEST_VID.playbackRate=e/2+.1,e!==b.TEST_VID.playbackRate}catch(e){return!1}},b.canOverrideAttributes=function(){try{var e=()=>{};Object.defineProperty(document.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(document.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(document.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(document.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},b.supportsNativeTextTracks=function(){return Te||u&&le},b.supportsNativeVideoTracks=function(){return!(!b.TEST_VID||!b.TEST_VID.videoTracks)},b.supportsNativeAudioTracks=function(){return!(!b.TEST_VID||!b.TEST_VID.audioTracks)},b.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([e,t]){Z(b.prototype,e,()=>b[t](),!0)}),b.prototype.featuresVolumeControl=b.canControlVolume(),b.prototype.movingMediaElementInDOM=!u,b.prototype.featuresFullscreenResize=!0,b.prototype.featuresProgressEvents=!0,b.prototype.featuresTimeupdateEvents=!0,b.prototype.featuresVideoFrameCallback=!(!b.TEST_VID||!b.TEST_VID.requestVideoFrameCallback),b.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);if(e.removeAttribute("src"),"function"==typeof e.load)try{e.load()}catch(e){}}},b.resetMediaElement=function(t){if(t){var i=t.querySelectorAll("source");let e=i.length;for(;e--;)t.removeChild(i[e]);if(t.removeAttribute("src"),"function"==typeof t.load)try{t.load()}catch(e){}}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){b.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){b.prototype["set"+m(t)]=function(e){(this.el_[t]=e)?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(e){b.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(t){b.prototype["set"+m(t)]=function(e){this.el_[t]=e}}),["pause","load","play"].forEach(function(e){b.prototype[e]=function(){return this.el_[e]()}}),v.withSourceHandlers(b),b.nativeSourceHandler={},b.nativeSourceHandler.canPlayType=function(e){try{return b.TEST_VID.canPlayType(e)}catch(e){return""}},b.nativeSourceHandler.canHandleSource=function(e,t){return e.type?b.nativeSourceHandler.canPlayType(e.type):e.src?(e=yi(e.src),b.nativeSourceHandler.canPlayType("video/"+e)):""},b.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},b.nativeSourceHandler.dispose=function(){},b.registerSourceHandler(b.nativeSourceHandler),v.registerTech("Html5",b);let vn=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],bn={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Tn=["tiny","xsmall","small","medium","large","xlarge","huge"],Sn={},wn=(Tn.forEach(e=>{var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Sn[e]="vjs-layout-"+t}),{tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0});class T extends g{constructor(e,i,t){if(e.id=e.id||i.id||"vjs_video_"+lt++,(i=Object.assign(T.getTagSettings(e),i)).initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,i.language||(s=e.closest("[lang]"))&&(i.language=s.getAttribute("lang")),super(null,i,t),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=W(this.id_),this.fsApi_=q,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Ne(e),this.language(this.options_.language),i.languages){let t={};Object.getOwnPropertyNames(i.languages).forEach(function(e){t[e.toLowerCase()]=i.languages[e]}),this.languages_=t}else this.languages_=T.prototype.options_.languages;this.resetCache_(),this.poster_=i.poster||"",this.controls_=!!i.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach(e=>{if("function"!=typeof this[e])throw new Error(`plugin "${e}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),Ot(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(mt(document,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);var s=d(this.options_),t=(i.plugins&&Object.keys(i.plugins).forEach(e=>{this[e](i.plugins[e])}),i.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(i.playbackRates),i.experimentalSvgIcons&&((t=(new window.DOMParser).parseFromString('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',"image/svg+xml")).querySelector("parsererror")?(o.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null):((s=t.documentElement).style.display="none",this.el_.appendChild(s),this.addClass("vjs-svg-icons-enabled"))),this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),i.spatialNavigation&&i.spatialNavigation.enabled&&(this.spatialNavigation=new Rs(this),this.addClass("vjs-spatial-navigation-enabled")),ve&&this.addClass("vjs-touch-enabled"),u||this.addClass("vjs-workinghover"),T.players[this.id_]=this,M.split(".")[0]);this.addClass("vjs-v"+t),this.userActive(!0),this.reportUserActivity(),this.one("play",e=>this.listenForUserActivity_(e)),this.on("keydown",e=>this.handleKeyDown(e)),this.on("languagechange",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){var e;this.trigger("dispose"),this.off("dispose"),c(document,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),c(document,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),T.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,bs.hasOwnProperty(e.id())&&delete bs[e.id()],a.names.forEach(e=>{e=this[a[e].getterName]();e&&e.off&&e.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let t=this.tag,i,e=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),s="video-js"===this.tag.tagName.toLowerCase(),r=(e?i=this.el_=t.parentNode:s||(i=this.el_=super.createEl("div")),Ne(t));if(s){for(i=this.el_=t,t=this.tag=document.createElement("video");i.children.length;)t.appendChild(i.firstChild);De(i,"video-js")||Pe(i,"video-js"),i.appendChild(t),e=this.playerElIngest_=i,Object.keys(i).forEach(e=>{try{t[e]=i[e]}catch(e){}})}t.setAttribute("tabindex","-1"),r.tabindex="-1",le&&pe&&(t.setAttribute("role","application"),r.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in r&&delete r.width,"height"in r&&delete r.height,Object.getOwnPropertyNames(r).forEach(function(e){s&&"class"===e||i.setAttribute(e,r[e]),s&&t.setAttribute(e,r[e])}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",(t.player=i.player=this).addClass("vjs-paused");var n,a=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(e=>Se[e]).map(e=>"vjs-device-"+e.substring(3).toLowerCase().replace(/\_/g,"-")),o=(this.addClass(...a),!0!==window.VIDEOJS_NO_DYNAMIC_STYLE&&(this.styleEl_=at("vjs-styles-dimensions"),a=Ye(".vjs-styles-defaults"),(n=Ye("head")).insertBefore(this.styleEl_,a?a.nextSibling:n.firstChild)),this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin),t.getElementsByTagName("a"));for(let e=0;e{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)},Ct(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===window.VIDEOJS_NO_DYNAMIC_STYLE){let e="number"==typeof this.width_?this.width_:this.options_.width,t="number"==typeof this.height_?this.height_:this.options_.height;var r=this.tech_&&this.tech_.el();void(r&&(0<=e&&(r.width=e),0<=t)&&(r.height=t))}else{let e,t,i,s;r=(i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0{var e,i=d.levels[i],r=new RegExp(`^(${i})$`);let n=l;if("log"!==t&&s.unshift(t.toUpperCase()+":"),h&&(n="%c"+l,s.unshift(h)),s.unshift(n+":"),z&&(z.push([].concat(s)),e=z.length-1e3,z.splice(0,0s(r+` ${t=void 0!==t?t:n} `+e,t,void 0!==i?i:a),o.createNewLogger=(e,t,i)=>s(e,t,i),o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:t},o.level=e=>{if("string"==typeof e){if(!o.levels.hasOwnProperty(e))throw new Error(`"${e}" in not a valid log level`);t=e}return t},(o.history=()=>z?[].concat(z):[]).filter=t=>(z||[]).filter(e=>new RegExp(`.*${t}.*`).test(e[0])),o.history.clear=()=>{z&&(z.length=0)},o.history.disable=()=>{null!==z&&(z.length=0,z=null)},o.history.enable=()=>{null===z&&(z=[])},o.error=(...e)=>i("error",t,e),o.warn=(...e)=>i("warn",t,e),o.debug=(...e)=>i("debug",t,e),o}("VIDEOJS"),W=o.createLogger,G=Object.prototype.toString;function X(t,i){$(t).forEach(e=>i(t[e],e))}function K(i,s,e=0){return $(i).reduce((e,t)=>s(e,i[t],t),e)}function Y(e){return!!e&&"object"==typeof e}function Q(e){return Y(e)&&"[object Object]"===G.call(e)&&e.constructor===Object}function d(...e){let i={};return e.forEach(e=>{e&&X(e,(e,t)=>{Q(e)?(Q(i[t])||(i[t]={}),i[t]=d(i[t],e)):i[t]=e})}),i}function J(e={}){var t,i,s=[];for(t in e)e.hasOwnProperty(t)&&(i=e[t],s.push(i));return s}function Z(t,i,s,e=!0){let r=e=>Object.defineProperty(t,i,{value:e,enumerable:!0,writable:!0});var n={configurable:!0,enumerable:!0,get(){var e=s();return r(e),e}};return e&&(n.set=r),Object.defineProperty(t,i,n)}let ee=Object.freeze({__proto__:null,each:X,reduce:K,isObject:Y,isPlain:Q,merge:d,values:J,defineLazyProperty:Z}),te=!1,ie=null,se=!1,re,ne=!1,ae=!1,oe=!1,le=!1,de=null,he=null;var e=Boolean(window.cast&&window.cast.framework&&window.cast.framework.CastReceiverContext);let ue=null,ce=!1,pe=!1,me=!1,ge=!1,fe=!1,ye=!1,_e=!1,ve=Boolean(Ee()&&("ontouchstart"in window||window.navigator.maxTouchPoints||window.DocumentTouch&&window.document instanceof window.DocumentTouch));var be,t=window.navigator&&window.navigator.userAgentData;if(t&&t.platform&&t.brands&&(se="Android"===t.platform,ae=Boolean(t.brands.find(e=>"Microsoft Edge"===e.brand)),oe=Boolean(t.brands.find(e=>"Chromium"===e.brand)),le=!ae&&oe,de=he=(t.brands.find(e=>"Chromium"===e.brand)||{}).version||null,pe="Windows"===t.platform),!oe){let i=window.navigator&&window.navigator.userAgent||"";te=/iPod/i.test(i),ie=(t=i.match(/OS (\d+)_/i))&&t[1]?t[1]:null,se=/Android/i.test(i),re=(t=i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i))?(bi=t[1]&&parseFloat(t[1]),be=t[2]&&parseFloat(t[2]),bi&&be?parseFloat(t[1]+"."+t[2]):bi||null):null,ne=/Firefox/i.test(i),ae=/Edg/i.test(i),oe=/Chrome/i.test(i)||/CriOS/i.test(i),le=!ae&&oe,de=he=(be=i.match(/(Chrome|CriOS)\/(\d+)/))&&be[2]?parseFloat(be[2]):null,ue=function(){var e=/MSIE\s(\d+)\.\d/.exec(i);let t=e&&parseFloat(e[1]);return t=!t&&/Trident\/7.0/i.test(i)&&/rv:11.0/.test(i)?11:t}(),fe=/Tizen/i.test(i),ye=/Web0S/i.test(i),_e=fe||ye,ce=/Safari/i.test(i)&&!le&&!se&&!ae&&!_e,pe=/Windows/i.test(i),me=/iPad/i.test(i)||ce&&ve&&!/iPhone/i.test(i),ge=/iPhone/i.test(i)&&!me}let u=ge||me||te,Te=(ce||u)&&!le;var Se=Object.freeze({__proto__:null,get IS_IPOD(){return te},get IOS_VERSION(){return ie},get IS_ANDROID(){return se},get ANDROID_VERSION(){return re},get IS_FIREFOX(){return ne},get IS_EDGE(){return ae},get IS_CHROMIUM(){return oe},get IS_CHROME(){return le},get CHROMIUM_VERSION(){return de},get CHROME_VERSION(){return he},IS_CHROMECAST_RECEIVER:e,get IE_VERSION(){return ue},get IS_SAFARI(){return ce},get IS_WINDOWS(){return pe},get IS_IPAD(){return me},get IS_IPHONE(){return ge},get IS_TIZEN(){return fe},get IS_WEBOS(){return ye},get IS_SMART_TV(){return _e},TOUCH_ENABLED:ve,IS_IOS:u,IS_ANY_SAFARI:Te});function we(e){return"string"==typeof e&&Boolean(e.trim())}function Ee(){return document===window.document}function Ce(e){return Y(e)&&1===e.nodeType}function ke(){try{return window.parent!==window.self}catch(e){return!0}}function Ie(i){return function(e,t){return we(e)?(t=Ce(t=we(t)?document.querySelector(t):t)?t:document)[i]&&t[i](e):document[i](null)}}function l(e="div",i={},t={},s){let r=document.createElement(e);return Object.getOwnPropertyNames(i).forEach(function(e){var t=i[e];"textContent"===e?xe(r,t):r[e]===t&&"tabIndex"!==e||(r[e]=t)}),Object.getOwnPropertyNames(t).forEach(function(e){r.setAttribute(e,t[e])}),s&&Ge(r,s),r}function xe(e,t){return"undefined"==typeof e.textContent?e.innerText=t:e.textContent=t,e}function Ae(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function De(e,t){if(0<=t.indexOf(" "))throw new Error("class has illegal whitespace characters");return e.classList.contains(t)}function Pe(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\s+/)),[])),e}function Le(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\s+/)),[])),e):(o.warn("removeClass was called with an element that doesn't exist"),null)}function Oe(t,e,i){return"boolean"!=typeof(i="function"==typeof i?i(t,e):i)&&(i=void 0),e.split(/\s+/).forEach(e=>t.classList.toggle(e,i)),t}function Re(i,s){Object.getOwnPropertyNames(s).forEach(function(e){var t=s[e];null===t||"undefined"==typeof t||!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})}function Ne(e){var i={},s=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(e&&e.attributes&&0{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(Je(e,"height"))),i.width||(i.width=parseFloat(Je(e,"width"))),i}}function Ve(e){if(!e||!e.offsetParent)return{left:0,top:0,width:0,height:0};var t=e.offsetWidth,i=e.offsetHeight;let s=0,r=0;for(;e.offsetParent&&e!==document[q.fullscreenElement];)s+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:s,top:r,width:t,height:i}}function He(t,e){var i={x:0,y:0};if(u){let e=t;for(;e&&"html"!==e.nodeName.toLowerCase();){var s,r=Je(e,"transform");/^matrix/.test(r)?(s=r.slice(7,-1).split(/,\s/).map(Number),i.x+=s[4],i.y+=s[5]):/^matrix3d/.test(r)&&(s=r.slice(9,-1).split(/,\s/).map(Number),i.x+=s[12],i.y+=s[13]),e.assignedSlot&&e.assignedSlot.parentElement&&window.WebKitCSSMatrix&&(r=window.getComputedStyle(e.assignedSlot.parentElement).transform,r=new window.WebKitCSSMatrix(r),i.x+=r.m41,i.y+=r.m42),e=e.parentNode||e.host}}var n={},a=Ve(e.target),t=Ve(t),o=t.width,l=t.height;let d=e.offsetY-(t.top-a.top),h=e.offsetX-(t.left-a.left);return e.changedTouches&&(h=e.changedTouches[0].pageX-t.left,d=e.changedTouches[0].pageY+t.top,u)&&(h-=i.x,d-=i.y),n.y=1-Math.max(0,Math.min(1,d/l)),n.x=Math.max(0,Math.min(1,h/o)),n}function ze(e){return Y(e)&&3===e.nodeType}function $e(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function We(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>Ce(e="function"==typeof e?e():e)||ze(e)?e:"string"==typeof e&&/\S/.test(e)?document.createTextNode(e):void 0).filter(e=>e)}function Ge(t,e){return We(e).forEach(e=>t.appendChild(e)),t}function Xe(e,t){return Ge($e(e),t)}function Ke(e){return void 0===e.button&&void 0===e.buttons||0===e.button&&void 0===e.buttons||"mouseup"===e.type&&0===e.button&&0===e.buttons||"mousedown"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}let Ye=Ie("querySelector"),Qe=Ie("querySelectorAll");function Je(t,i){if(!t||!i)return"";if("function"!=typeof window.getComputedStyle)return"";{let e;try{e=window.getComputedStyle(t)}catch(e){return""}return e?e.getPropertyValue(i)||e[i]:""}}function Ze(s){[...document.styleSheets].forEach(t=>{try{var i=[...t.cssRules].map(e=>e.cssText).join(""),e=document.createElement("style");e.textContent=i,s.document.head.appendChild(e)}catch(e){i=document.createElement("link");i.rel="stylesheet",i.type=t.type,i.media=t.media.mediaText,i.href=t.href,s.document.head.appendChild(i)}})}var et=Object.freeze({__proto__:null,isReal:Ee,isEl:Ce,isInFrame:ke,createEl:l,textContent:xe,prependTo:Ae,hasClass:De,addClass:Pe,removeClass:Le,toggleClass:Oe,setAttributes:Re,getAttributes:Ne,getAttribute:Me,setAttribute:Ue,removeAttribute:Be,blockTextSelection:Fe,unblockTextSelection:qe,getBoundingClientRect:je,findPosition:Ve,getPointerPosition:He,isTextNode:ze,emptyEl:$e,normalizeContent:We,appendContent:Ge,insertContent:Xe,isSingleLeftClick:Ke,$:Ye,$$:Qe,computedStyle:Je,copyStyleSheetsToWindow:Ze});function tt(){if(!1!==st.options.autoSetup){var e=Array.prototype.slice.call(document.getElementsByTagName("video")),t=Array.prototype.slice.call(document.getElementsByTagName("audio")),i=Array.prototype.slice.call(document.getElementsByTagName("video-js")),s=e.concat(t,i);if(s&&0=s&&(i(...e),r=t)}}function bt(s,r,n,a=window){let o;function e(){let e=this,t=arguments,i=function(){o=null,i=null,n||s.apply(e,t)};!o&&n&&s.apply(e,t),a.clearTimeout(o),o=a.setTimeout(i,r)}return e.cancel=()=>{a.clearTimeout(o),o=null},e}let Tt=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:30,bind_:p,throttle:vt,debounce:bt}),St;class wt{on(e,t){var i=this.addEventListener;this.addEventListener=()=>{},mt(this,e,t),this.addEventListener=i}off(e,t){c(this,e,t)}one(e,t){var i=this.addEventListener;this.addEventListener=()=>{},ft(this,e,t),this.addEventListener=i}any(e,t){var i=this.addEventListener;this.addEventListener=()=>{},yt(this,e,t),this.addEventListener=i}trigger(e){var t=e.type||e;e=ut(e="string"==typeof e?{type:t}:e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),gt(this,e)}queueTrigger(e){St=St||new Map;let t=e.type||e,i=St.get(this);i||(i=new Map,St.set(this,i));var s=i.get(t),s=(i.delete(t),window.clearTimeout(s),window.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,St.delete(this)),this.trigger(e)},0));i.set(t,s)}}wt.prototype.allowedEvents_={},wt.prototype.addEventListener=wt.prototype.on,wt.prototype.removeEventListener=wt.prototype.off,wt.prototype.dispatchEvent=wt.prototype.trigger;let Et=e=>"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_||(e.constructor&&e.constructor.name?e.constructor.name:typeof e),Ct=t=>t instanceof wt||!!t.eventBusEl_&&["on","one","off","trigger"].every(e=>"function"==typeof t[e]),kt=e=>"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,It=(e,t,i)=>{if(!e||!e.nodeName&&!Ct(e))throw new Error(`Invalid target for ${Et(t)}#${i}; must be a DOM node or evented object.`)},xt=(e,t,i)=>{if(!kt(e))throw new Error(`Invalid event type for ${Et(t)}#${i}; must be a non-empty string or array.`)},At=(e,t,i)=>{if("function"!=typeof e)throw new Error(`Invalid listener for ${Et(t)}#${i}; must be a function.`)},Dt=(e,t,i)=>{var s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let r,n,a;return s?(r=e.eventBusEl_,3<=t.length&&t.shift(),[n,a]=t):(r=t[0],n=t[1],a=t[2]),It(r,e,i),xt(n,e,i),At(a,e,i),a=p(e,a),{isTargetingSelf:s,target:r,type:n,listener:a}},Pt=(e,t,i,s)=>{It(e,e,t),e.nodeName?_t[t](e,i,s):e[t](i,s)},Lt={on(...t){let{isTargetingSelf:e,target:i,type:s,listener:r}=Dt(this,t,"on");if(Pt(i,"on",s,r),!e){let e=()=>this.off(i,s,r);e.guid=r.guid;t=()=>this.off("dispose",e);t.guid=r.guid,Pt(this,"on","dispose",e),Pt(i,"on","dispose",t)}},one(...e){let{isTargetingSelf:t,target:i,type:s,listener:r}=Dt(this,e,"one");if(t)Pt(i,"one",s,r);else{let t=(...e)=>{this.off(i,s,t),r.apply(null,e)};t.guid=r.guid,Pt(i,"one",s,t)}},any(...e){let{isTargetingSelf:t,target:i,type:s,listener:r}=Dt(this,e,"any");if(t)Pt(i,"any",s,r);else{let t=(...e)=>{this.off(i,s,t),r.apply(null,e)};t.guid=r.guid,Pt(i,"any",s,t)}},off(e,t,i){!e||kt(e)?c(this.eventBusEl_,e,t):(e=e,t=t,It(e,this,"off"),xt(t,this,"off"),At(i,this,"off"),i=p(this,i),this.off("dispose",i),e.nodeName?(c(e,t,i),c(e,"dispose",i)):Ct(e)&&(e.off(t,i),e.off("dispose",i)))},trigger(e,t){It(this.eventBusEl_,this,"trigger");var i=e&&"string"!=typeof e?e.type:e;if(kt(i))return gt(this.eventBusEl_,e,t);throw new Error(`Invalid event type for ${Et(this)}#trigger; `+"must be a non-empty string or object with a type key that has a non-empty value.")}};function Ot(e,t={}){t=t.eventBusKey;if(t){if(!e[t].nodeName)throw new Error(`The eventBusKey "${t}" does not refer to an element.`);e.eventBusEl_=e[t]}else e.eventBusEl_=l("span",{className:"vjs-event-bus"});Object.assign(e,Lt),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on("dispose",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach(function(e){e&&h.has(e)&&h.delete(e)}),window.setTimeout(()=>{e.eventBusEl_=null},0)})}let Rt={state:{},setState(e){"function"==typeof e&&(e=e());let i;return X(e,(e,t)=>{this.state[t]!==e&&((i=i||{})[t]={from:this.state[t],to:e}),this.state[t]=e}),i&&Ct(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function Nt(e,t){Object.assign(e,Rt),e.state=Object.assign({},e.state,t),"function"==typeof e.handleStateChanged&&Ct(e)&&e.on("statechanged",e.handleStateChanged)}function Mt(e){return"string"!=typeof e?e:e.replace(/./,e=>e.toLowerCase())}function m(e){return"string"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())}function Ut(e,t){return m(e)===m(t)}let Bt=Object.freeze({__proto__:null,toLowerCase:Mt,toTitleCase:m,titleCaseEquals:Ut});class g{constructor(e,t,i){!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=d({},this.options_),t=this.options_=d(this.options_,t),this.id_=t.id||t.el&&t.el.id,this.id_||(e=e&&e.id&&e.id()||"no_player",this.id_=e+"_component_"+lt++),this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(e=>this.addClass(e)),["on","off","one","any","trigger"].forEach(e=>{this[e]=void 0}),!1!==t.evented&&(Ot(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Nt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,(this.clearingTimersOnDispose_=!1)!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;0<=e;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e&&(this.options_=d(this.options_,e)),this.options_}el(){return this.el_}createEl(e,t,i){return l(e,t,i)}localize(e,s,t=e){var i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),n=r&&r[i],i=i&&i.split("-")[0],r=r&&r[i];let a=t;return n&&n[e]?a=n[e]:r&&r[e]&&(a=r[e]),a=s?a.replace(/\{(\d+)\}/g,function(e,t){t=s[t-1];let i="undefined"==typeof t?e:t;return i}):a}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...t){t=t.reduce((e,t)=>e.concat(t),[]);let i=this;for(let e=0;e{let t,i;return i="string"==typeof e?(t=e,r[t]||this.options_[t]||{}):(t=e.name,e),{name:t,opts:i}}).filter(e=>{e=g.getComponent(e.opts.componentClass||m(e.name));return e&&!t.isTech(e)}).forEach(e=>{var t=e.name;let i=e.opts;!1!==(i=void 0!==s[t]?s[t]:i)&&((i=!0===i?{}:i).playerOptions=this.options_.playerOptions,e=this.addChild(t,i))&&(this[t]=e)})}}buildCSSClass(){return""}ready(e,t=!1){e&&(this.isReady_?t?e.call(this):this.setTimeout(e,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e)))}triggerReady(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&0{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),window.clearTimeout(e)),e}setInterval(e,t){e=p(this,e),this.clearTimersOnDispose_();e=window.setInterval(e,t);return this.setIntervalIds_.add(e),e}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),window.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=p(this,e),t=window.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=p(this,t);var i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),window.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,i])=>{this[e].forEach((e,t)=>this[i](t))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return 0<=(e||this.el_).tabIndex&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){var e=window.getComputedStyle(e,null),t=e.getPropertyValue("visibility");return"none"!==e.getPropertyValue("display")&&!["hidden","collapse"].includes(t)}var i;return!(!function(t){if(t.offsetWidth+t.offsetHeight+t.getBoundingClientRect().height+t.getBoundingClientRect().width!==0){var i={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2};if(!(i.x<0||i.x>(document.documentElement.clientWidth||window.innerWidth)||i.y<0||i.y>(document.documentElement.clientHeight||window.innerHeight))){let e=document.elementFromPoint(i.x,i.y);for(;e;){if(e===t)return 1;if(!e.parentNode)return;e=e.parentNode}}}}(e=e||this.el())||!t((i=e).parentElement)||!t(i)||"0"===i.style.opacity||"0px"===window.getComputedStyle(i).height||"0px"===window.getComputedStyle(i).width||e.parentElement&&!(0<=e.tabIndex))}static registerComponent(t,e){if("string"!=typeof t||!t)throw new Error(`Illegal component name, "${t}"; must be a non-empty string.`);var i=g.getComponent("Tech"),i=i&&i.isTech(e),s=g===e||g.prototype.isPrototypeOf(e.prototype);if(i||!s){let e;throw e=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error(`Illegal component, "${t}"; ${e}.`)}t=m(t),g.components_||(g.components_={});s=g.getComponent("Player");if("Player"===t&&s&&s.players){var r=s.players,n=Object.keys(r);if(r&&0(e||[]).values()),t}function jt(e,t){return Array.isArray(e)?qt(e):void 0===e||void 0===t?qt():qt([[e,t]])}g.registerComponent("Component",g);function Vt(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),r=Math.floor(e/3600);var n=Math.floor(t/60%60),t=Math.floor(t/3600);return r=0<(r=!isNaN(e)&&e!==1/0?r:s=i="-")||0i&&(n=i),s+=n-r;return s/i}function i(e){if(e instanceof i)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:Y(e)&&("number"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=i.defaultMessages[this.code]||"")}function Xt(e){return null!=e&&"function"==typeof e.then}function Kt(e){Xt(e)&&e.then(null,e=>{})}i.prototype.code=0,i.prototype.message="",i.prototype.status=null,i.prototype.metadata=null,i.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],i.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},i.MEDIA_ERR_CUSTOM=0,i.prototype.MEDIA_ERR_CUSTOM=0,i.MEDIA_ERR_ABORTED=1,i.prototype.MEDIA_ERR_ABORTED=1,i.MEDIA_ERR_NETWORK=2,i.prototype.MEDIA_ERR_NETWORK=2,i.MEDIA_ERR_DECODE=3,i.prototype.MEDIA_ERR_DECODE=3,i.MEDIA_ERR_SRC_NOT_SUPPORTED=4,i.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,i.MEDIA_ERR_ENCRYPTED=5,i.prototype.MEDIA_ERR_ENCRYPTED=5;function Yt(s){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((e,t,i)=>(s[t]&&(e[t]=s[t]),e),{cues:s.cues&&Array.prototype.map.call(s.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})}var Qt,Jt=function(e){var t=e.$$("track");let i=Array.prototype.map.call(t,e=>e.track);return Array.prototype.map.call(t,function(e){var t=Yt(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(Yt))},Zt=function(e,i){return e.forEach(function(e){let t=i.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>t.addCue(e))}),i.textTracks()},ei=Yt;let ti="vjs-modal-dialog";class ii extends g{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=l("div",{className:ti+"-content"},{role:"document"}),this.descEl_=l("p",{className:ti+"-description vjs-control-text",id:this.el().getAttribute("aria-describedby")}),xe(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return ti+" vjs-hidden "+super.buildCSSClass()}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){var e;this.opened_?this.options_.fillAlways&&this.fill():(e=this.player(),this.trigger("beforemodalopen"),this.opened_=!0,!this.options_.fillAlways&&(this.hasBeenOpened_||this.hasBeenFilled_)||this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0)}opened(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_}close(){var e;this.opened_&&(e=this.player(),this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary)&&this.dispose()}closeable(t){if("boolean"==typeof t){var i,t=this.closeable_=!!t;let e=this.getChild("closeButton");t&&!e&&(i=this.contentEl_,this.contentEl_=this.el_,e=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,this.on(e,"close",this.close_)),!t&&e&&(this.off(e,"close",this.close_),this.removeChild(e),e.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){var t=this.contentEl(),i=t.parentNode,s=t.nextSibling,e=(this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),Xe(t,e),this.trigger("modalfill"),s?i.insertBefore(t,s):i.appendChild(t),this.getChild("closeButton"));e&&i.appendChild(e.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),$e(this.contentEl()),this.trigger("modalempty")}content(e){return"undefined"!=typeof e&&(this.content_=e),this.content_}conditionalFocus_(){var e=document.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,!t.contains(e)&&t!==e||(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),"Escape"===e.key&&this.closeable())e.preventDefault(),this.close();else if("Tab"===e.key){var i=this.focusableEls_(),s=this.el_.querySelector(":focus");let t;for(let e=0;e(e instanceof window.HTMLAnchorElement||e instanceof window.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof window.HTMLInputElement||e instanceof window.HTMLSelectElement||e instanceof window.HTMLTextAreaElement||e instanceof window.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof window.HTMLIFrameElement||e instanceof window.HTMLObjectElement||e instanceof window.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable"))}}ii.prototype.options_={pauseOnOpen:!0,temporary:!0},g.registerComponent("ModalDialog",ii);class si extends wt{constructor(t=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let e=0;e{this.trigger({track:e,type:"labelchange",target:this})},Ct(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(i){let s;for(let e=0,t=this.length;e{this.changing_||(this.changing_=!0,ri(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}function ai(t,i){for(let e=0;e{this.changing_||(this.changing_=!0,ai(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class li extends si{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_)&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_)}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class di{constructor(e){di.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){var t=this.length||0;let i=0;function s(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})}var r=e.length;this.cues_=e,this.length_=e.length;if(t=e.length?{done:!0}:{done:!1,value:e[i++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ii(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);io.error(e)),window.console)&&window.console.groupEnd&&window.console.groupEnd(),i.flush()}function Bi(e,s){var t={uri:e};(e=yi(e))&&(t.cors=e),(e="use-credentials"===s.tech_.crossOrigin())&&(t.withCredentials=e),Pi(t,p(this,function(e,t,i){if(e)return o.error(e,t);s.loaded_=!0,"function"!=typeof window.WebVTT?s.tech_&&s.tech_.any(["vttjsloaded","vttjserror"],e=>{if("vttjserror"!==e.type)return Ui(i,s);o.error("vttjs failed to load, stopping trying to process "+s.src)}):Ui(i,s)}))}class Fi extends mi{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");e=d(e,{kind:ci[e.kind]||"subtitles",language:e.language||e.srclang||""});let t=pi[e.mode]||"disabled",i=e.default,s=("metadata"!==e.kind&&"chapters"!==e.kind||(t="hidden"),super(e),this.tech_=e.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks,new di(this.cues_)),n=new di(this.activeCues_),a=!1;this.timeupdateHandler=p(this,function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_&&(this.activeCues=this.activeCues,a)&&(this.trigger("cuechange"),a=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});this.tech_.one("dispose",()=>{this.stopTracking()}),"disabled"!==t&&this.startTracking(),Object.defineProperties(this,{default:{get(){return i},set(){}},mode:{get(){return t},set(e){pi[e]&&t!==e&&(t=e,this.preload_||"disabled"===t||0!==this.cues.length||Bi(this.src,this),this.stopTracking(),"disabled"!==t&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?s:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0!==this.cues.length){var i=this.tech_.currentTime(),s=[];for(let e=0,t=this.cues.length;e{t=Vi.LOADED,this.trigger({type:"load",target:this})})}}Vi.prototype.allowedEvents_={load:"load"},Vi.NONE=0,Vi.LOADING=1,Vi.LOADED=2,Vi.ERROR=3;let Hi={audio:{ListClass:ni,TrackClass:qi,capitalName:"Audio"},video:{ListClass:oi,TrackClass:ji,capitalName:"Video"},text:{ListClass:li,TrackClass:Fi,capitalName:"Text"}},zi=(Object.keys(Hi).forEach(function(e){Hi[e].getterName=e+"Tracks",Hi[e].privateName=e+"Tracks_"}),{remoteText:{ListClass:li,TrackClass:Fi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:class{constructor(i=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let e=0,t=i.length;e]*>?)?/))[1]||o[2],t=t.substr(o.length),o):null);)"<"===o[0]?"/"===o[1]?h.length&&h[h.length-1]===o.substr(2).replace(">","")&&(h.pop(),d=d.parentNode):(s=Ki(o.substr(1,o.length-2)))?(i=e.document.createProcessingInstruction("timestamp",s),d.appendChild(i)):(s=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/))&&(r=s[1],n=s[3],a=void 0,a=Zi[r],i=a?(a=e.document.createElement(a),(r=ts[r])&&n&&(a[r]=n.trim()),a):null)&&(r=d,is[(n=i).localName]&&is[n.localName]!==r.localName||(s[2]&&((a=s[2].split(".")).forEach(function(e){var t=/^bg_/.test(e),e=t?e.slice(3):e;es.hasOwnProperty(e)&&(e=es[e],i.style[t?"background-color":"color"]=e)}),i.className=a.join(" ")),h.push(s[1]),d.appendChild(i),d=i)):d.appendChild(e.document.createTextNode((n=o,Ji.innerHTML=n,n=Ji.textContent,Ji.textContent="",n)));return l}var rs=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function ns(e){var t=[],i="";if(e&&e.childNodes)for(n(t,e);i=function e(t){var i,s,r;return t&&t.length?(s=(i=t.pop()).textContent||i.innerText)?(r=s.match(/^.*(\n|\r)/))?r[t.length=0]:s:"ruby"===i.tagName?e(t):i.childNodes?(n(t,i),e(t)):void 0:null}(t);)for(var s=0;s=i[0]&&e<=i[1])return 1}}(i.charCodeAt(s)))return"rtl";return"ltr";function n(e,t){for(var i=t.childNodes.length-1;0<=i;i--)e.push(t.childNodes[i])}}function as(){}function os(e,t,i){as.call(this),this.cue=t,this.cueDiv=ss(e,t.text);this.applyStyles({color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"},this.cueDiv),this.div=e.document.createElement("div"),e={direction:ns(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(e),this.div.appendChild(this.cueDiv);var s=0;switch(t.positionAlign){case"start":case"line-left":s=t.position;break;case"center":s=t.position-t.size/2;break;case"end":case"line-right":s=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function _(e){var t,i,s,r;e.div&&(t=e.div.offsetHeight,i=e.div.offsetWidth,s=e.div.offsetTop,r=(r=(r=e.div.childNodes)&&r[0])&&r.getClientRects&&r.getClientRects(),e=e.div.getBoundingClientRect(),r=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0),this.left=e.left,this.right=e.right,this.top=e.top||s,this.height=e.height||t,this.bottom=e.bottom||s+(e.height||t),this.width=e.width||i,this.lineHeight=void 0!==r?r:e.lineHeight}function ls(e,t,o,l){var i,s=new _(t),r=t.cue,n=function(e){if("number"==typeof e.line&&(e.snapToLines||0<=e.line&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,r=0;ru&&(h=h<0?-1:1,h*=Math.ceil(u/d)*d),n<0&&(h+=""===r.vertical?o.height:o.width,a=a.reverse()),s.move(c,h)}else{var p=s.lineHeight/o.height*100;switch(r.lineAlign){case"center":n-=p/2;break;case"end":n-=p}switch(r.vertical){case"":t.applyStyles({top:t.formatStyle(n,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(n,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(n,"%")})}a=["+y","-x","+x","-y"],s=new _(t)}u=function(e,t){for(var i,s=new _(e),r=1,n=0;ne.left&&this.tope.top},_.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},_.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},_.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},_.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},_.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},ds.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},ds.convertCueToDOMTree=function(e,t){return e&&t?ss(e,t):null};ds.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement("div");if(s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top="0",s.style.bottom="0",s.style.margin="1.5%",i.appendChild(s),function(e){for(var t=0;tthis.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),a.names.forEach(e=>{e=a[e];t&&t[e.getterName]&&(this[e.privateName]=t[e.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(e=>{!1===t[`native${e}Tracks`]&&(this[`featuresNative${e}Tracks`]=!1)}),!1===t.nativeCaptions||!1===t.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==t.preloadTextTracks,this.autoRemoteTextTracks_=new a.text.ListClass,this.initTrackListeners(),t.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(p(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),1===(this.bufferedPercent_=e)&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return jt(0,0)}bufferedPercent(){return Gt(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(Hi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach(e=>{var t=this[e+"Tracks"]()||[];let i=t.length;for(;i--;){var s=t[i];"text"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}})}cleanupAutoTextTracks(){var e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){var i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new i(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?jt(0,0):jt()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Hi.names.forEach(e=>{var t=Hi[e];let i=()=>{this.trigger(e+"trackchange")},s=this[t.getterName]();s.addEventListener("removetrack",i),s.addEventListener("addtrack",i),this.on("dispose",()=>{s.removeEventListener("removetrack",i),s.removeEventListener("addtrack",i)})})}addWebVttScript_(){if(!window.WebVTT)if(document.body.contains(this.el()))if(!this.options_["vtt.js"]&&Q(vs)&&0{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),window.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){let i=this.textTracks(),e=this.remoteTextTracks(),t=e=>i.addTrack(e.track),s=e=>i.removeTrack(e.track),r=(e.on("addtrack",t),e.on("removetrack",s),this.addWebVttScript_(),()=>this.trigger("texttrackchange")),n=()=>{r();for(let e=0;ethis.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){let t=lt++;return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return v.canPlayType(e.type)}static isTech(e){return e.prototype instanceof v||e instanceof v||e===v}static registerTech(e,t){if(v.techs_||(v.techs_={}),!v.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!v.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(v.canPlaySource)return e=m(e),v.techs_[e]=t,v.techs_[Mt(e)]=t,"Tech"!==e&&v.defaultTechOrder_.push(e),t;throw new Error("Techs must have a static canPlaySource method on them")}static getTech(e){if(e)return v.techs_&&v.techs_[e]?v.techs_[e]:(e=m(e),window&&window.videojs&&window.videojs[e]?(o.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),window.videojs[e]):void 0)}}a.names.forEach(function(e){let t=a[e];v.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),v.prototype.featuresVolumeControl=!0,v.prototype.featuresMuteControl=!0,v.prototype.featuresFullscreenResize=!1,v.prototype.featuresPlaybackRate=!1,v.prototype.featuresProgressEvents=!1,v.prototype.featuresSourceset=!1,v.prototype.featuresTimeupdateEvents=!1,v.prototype.featuresNativeTextTracks=!1,v.prototype.featuresVideoFrameCallback=!1,v.withSourceHandlers=function(r){r.registerSourceHandler=function(e,t){let i=r.sourceHandlers;i=i||(r.sourceHandlers=[]),void 0===t&&(t=i.length),i.splice(t,0,e)},r.canPlayType=function(t){var i,s=r.sourceHandlers||[];for(let e=0;efunction s(r={},e=[],n,a,o=[],l=!1){let[t,...d]=e;if("string"==typeof t)s(r,bs[t],n,a,o,l);else if(t){let i=As(a,t);if(!i.setSource)return o.push(i),s(r,d,n,a,o,l);i.setSource(Object.assign({},r),function(e,t){if(e)return s(r,d,n,a,o,l);o.push(i),s(t,r.type===t.type?d:bs[t.type],n,a,o,l)})}else d.length?s(r,d,n,a,o,l):l?n(r,o):s(r,bs["*"],n,a,o,!0)}(t,bs[t.type],i,e),1)}function Es(e,t,i,s=null){var r="call"+m(i),r=e.reduce(xs(r),s),s=r===Ss,t=s?null:t[i](r),n=e,a=i,o=t,l=s;for(let e=n.length-1;0<=e;e--){var d=n[e];d[a]&&d[a](l,o)}return t}let Cs={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},ks={setCurrentTime:1,setMuted:1,setVolume:1},Is={play:1,pause:1};function xs(i){return(e,t)=>e===Ss?Ss:t[i]?t[i](e):e}function As(e,t){var i=Ts[e.id()];let s=null;if(null==i)s=t(e),Ts[e.id()]=[[t,s]];else{for(let e=0;e{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(1{if(e.hasOwnProperty("el_")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void i.push(e);e.hasOwnProperty("children_")&&0{i.push({name:()=>"ModalButton"+(e+1),el:()=>t,getPositions:()=>{var e=t.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>t.focus()})})}),this.focusableComponents=i,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;ee!==s&&this.isInDirection_(t.boundingClientRect,e.getPositions().boundingClientRect,i)),e=this.findBestCandidate_(t.center,e,i);e?this.focus(e):this.trigger({type:"endOfFocusableComponents",direction:i,focusedComponent:s})}}findBestCandidate_(e,t,i){let s=1/0,r=null;for(var n of t){var a=n.getPositions().center,a=this.calculateDistance_(e,a,i);a=e.right;case"left":return t.right<=e.left;case"down":return t.top>=e.bottom;case"up":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;ethis.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&o.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;e=l(e,t,i);return this.player_.options_.experimentalSvgIcons||e.appendChild(l("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(e),e}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=l("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,xe(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)}buildCSSClass(){return"vjs-control vjs-button "+super.buildCSSClass()}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}g.registerComponent("ClickableComponent",Us);class Bs extends Us{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return l("div",{className:"vjs-poster"})}crossOrigin(e){if("undefined"==typeof e)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null!==e&&"anonymous"!==e&&"use-credentials"!==e?this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`):this.$("img")&&(this.$("img").crossOrigin=e)}update(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$("img")||this.el_.appendChild(l("picture",{className:"vjs-poster",tabIndex:-1},{},l("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e):this.el_.textContent=""}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Kt(this.player_.play()):this.player_.pause())}}Bs.prototype.crossorigin=Bs.prototype.crossOrigin,g.registerComponent("PosterImage",Bs);let Fs={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function qs(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function js(e,t,i){try{e.style[t]=i}catch(e){}}function Vs(e){return e?e+"px":""}class Hs extends g{constructor(s,e,t){super(s,e,t);e=e=>this.updateDisplay(e);let r=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};s.on("loadstart",e=>this.toggleDisplay(e)),s.on("useractive",e),s.on("userinactive",e),s.on("texttrackchange",e),s.on("loadedmetadata",e=>{this.updateDisplayOverlay(),this.preselectTrack(e)}),s.ready(p(this,function(){if(s.tech_&&s.tech_.featuresNativeTextTracks)this.hide();else{s.on("fullscreenchange",r),s.on("playerresize",r);let e=window.screen.orientation||window,t=window.screen.orientation?"change":"orientationchange";e.addEventListener(t,r),s.on("dispose",()=>e.removeEventListener(t,r));var i=this.options_.playerOptions.tracks||[];for(let e=0;e{var t;e.style.inset&&3===(t=e.style.inset.split(" ")).length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:"unset"})}))}}updateDisplayOverlay(){if(this.player_.videoHeight()&&window.CSS.supports("inset-inline: 10px")){var i=this.player_.currentWidth(),s=this.player_.currentHeight(),r=i/s,n=this.player_.videoWidth()/this.player_.videoHeight();let e=0,t=0;.1!e.activeCues)){var t=[];for(let e=0;ethis.handleMouseDown(e))}buildCSSClass(){return"vjs-big-play-button"}handleClick(t){var i=this.player_.play();if("tap"===t.type||this.mouseused_&&"clientX"in t&&"clientY"in t)Kt(i),this.player_.tech(!0)&&this.player_.tech(!0).focus();else{var t=this.player_.getChild("controlBar");let e=t&&t.getChild("playToggle");e?(t=()=>e.focus(),Xt(i)?i.then(t,()=>{}):this.setTimeout(t,1)):this.player_.tech(!0).focus()}}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}$s.prototype.controlText_="Play Video",g.registerComponent("BigPlayButton",$s);class Ws extends s{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return"vjs-close-button "+super.buildCSSClass()}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}g.registerComponent("CloseButton",Ws);class Gs extends s{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon("play"),this.on(e,"play",e=>this.handlePlay(e)),this.on(e,"pause",e=>this.handlePause(e)),t.replay&&this.on(e,"ended",e=>this.handleEnded(e))}buildCSSClass(){return"vjs-play-control "+super.buildCSSClass()}handleClick(e){this.player_.paused()?Kt(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",e=>this.handleSeeked(e))}}Gs.prototype.controlText_="Play",g.registerComponent("PlayToggle",Gs);class Xs extends g{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],e=>this.update(e)),this.updateTextNode_()}createEl(){var e=this.buildCSSClass(),t=super.createEl("div",{className:e+" vjs-time-control vjs-control"}),i=l("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return t.appendChild(i),this.contentEl_=l("span",{className:e+"-display"},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&"seeking"===e.type||this.updateContent(e)}updateTextNode_(e=0){e=Wt(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(this.contentEl_){let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,o.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=document.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}}))}updateContent(e){}}Xs.prototype.labelText_="Time",Xs.prototype.controlText_="Time",g.registerComponent("TimeDisplay",Xs);class Ks extends Xs{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&"function"==typeof e.target.pendingSeekTime?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Ks.prototype.labelText_="Current Time",Ks.prototype.controlText_="Current Time",g.registerComponent("CurrentTimeDisplay",Ks);class Ys extends Xs{constructor(e,t){super(e,t);t=e=>this.updateContent(e);this.on(e,"durationchange",t),this.on(e,"loadstart",t),this.on(e,"loadedmetadata",t)}buildCSSClass(){return"vjs-duration"}updateContent(e){var t=this.player_.duration();this.updateTextNode_(t)}}Ys.prototype.labelText_="Duration",Ys.prototype.controlText_="Duration",g.registerComponent("DurationDisplay",Ys);class Qs extends g{createEl(){var e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}}g.registerComponent("TimeDivider",Qs);class Js extends Xs{constructor(e,t){super(e,t),this.on(e,"durationchange",e=>this.updateContent(e))}buildCSSClass(){return"vjs-remaining-time"}createEl(){var e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(l("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if("number"==typeof this.player_.duration()){let e;e=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(e)}}}Js.prototype.labelText_="Remaining Time",Js.prototype.controlText_="Remaining Time",g.registerComponent("RemainingTimeDisplay",Js);class Zs extends g{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",e=>this.updateShowing(e))}createEl(){var e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=l("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(l("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(document.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}g.registerComponent("LiveDisplay",Zs);class er extends s{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){var e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=l("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function tr(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}er.prototype.controlText_="Seek to live, currently playing live",g.registerComponent("SeekToLive",er);$i=Object.freeze({__proto__:null,clamp:tr});class ir extends g{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){var e;this.enabled()&&(e=this.bar.el_.ownerDocument,this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1)}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||le||e.preventDefault(),Fe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){var t=this.bar.el_.ownerDocument;qe(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(this.el_&&this.bar){let t=this.getProgress();return t!==this.progress_&&(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",()=>{var e=this.vertical()?"height":"width";this.bar.el().style[e]=(100*t).toFixed(2)+"%"})),t}}getProgress(){return Number(tr(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){e=He(this.el_,e);return this.vertical()?e.y:e.x}handleKeyDown(e){var t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,t=t&&t.horizontalSeek;i?t&&"ArrowLeft"===e.key||!t&&"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):t&&"ArrowRight"===e.key||!t&&"ArrowUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):"ArrowUp"===e.key||"ArrowRight"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}g.registerComponent("Slider",ir);let sr=(e,t)=>tr(e/t*100,0,100).toFixed(2)+"%";class rr extends g{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",e=>this.update(e))}createEl(){var e=super.createEl("div",{className:"vjs-load-progress"}),t=l("span",{className:"vjs-control-text"}),i=l("span",{textContent:this.localize("Loaded")}),s=document.createTextNode(": ");return this.percentageEl_=l("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{var e=this.player_.liveTracker,i=this.player_.buffered(),e=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),r=this.partEls_,e=sr(s,e);this.percent_!==e&&(this.el_.style.width=e,xe(this.percentageEl_,e),this.percent_=e);for(let t=0;ti.length;e--)this.el_.removeChild(r[e-1]);r.length=i.length})}}g.registerComponent("LoadProgressBar",rr);class nr extends g{constructor(e,t){super(e,t),this.update=vt(p(this,this.update),30)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(s,r,n){var a=Ve(this.el_),o=je(this.player_.el()),r=s.width*r;if(o&&a){let e=s.left-o.left+r,t=s.width-r+(o.right-s.right),i=(t||(t=s.width-r,e=r),a.width/2);ea.width&&(i=a.width),i=Math.round(i),this.el_.style.right=`-${i}px`,this.write(n)}}write(e){xe(this.el_,e)}updateTime(r,n,a,o){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let e;var t,i,s=this.player_.duration();e=this.player_.liveTracker&&this.player_.liveTracker.isLive()?((i=(t=this.player_.liveTracker.liveWindow())-n*t)<1?"":"-")+Wt(i,t):Wt(a,s),this.update(r,n,e),o&&o()})}}g.registerComponent("TimeTooltip",nr);class ar extends g{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=vt(p(this,this.update),30)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t,i){var s=this.getChild("timeTooltip");s&&(i=i&&i.target&&"function"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),s.updateTime(e,t,i))}}ar.prototype.options_={children:[]},u||se||ar.prototype.options_.children.push("timeTooltip"),g.registerComponent("PlayProgressBar",ar);class or extends g{constructor(e,t){super(e,t),this.update=vt(p(this,this.update),30)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){var i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+"px"})}}or.prototype.options_={children:["timeTooltip"]},g.registerComponent("MouseTimeDisplay",or);class lr extends ir{constructor(e,t){(t=d(lr.prototype.options_,t)).children=[...t.children];var i=e.options_.disableSeekWhileScrubbingOnMobile&&(u||se)||e.options_.disableSeekWhileScrubbingOnSTV;(u||se)&&!i||t.children.splice(1,0,"mouseTimeDisplay"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=p(this,this.update),this.update=vt(this.update_,30),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in document&&"visibilityState"in document&&this.on(document,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===document.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(r){if("hidden"!==document.visibilityState){let s=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{var e=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),t=this.player_.liveTracker;let i=this.player_.duration();t&&t.isLive()&&(i=this.player_.liveTracker.liveCurrentTime()),this.percent_!==s&&(this.el_.setAttribute("aria-valuenow",(100*s).toFixed(2)),this.percent_=s),this.currentTime_===e&&this.duration_===i||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Wt(e,i),Wt(i,i)],"{1} of {2}")),this.currentTime_=e,this.duration_=i),this.bar&&this.bar.update(je(this.el()),this.getProgress(),r)}),s}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){var t;return void 0!==e&&(null!==e?(t=this.player_.duration(),this.pendingSeekTime_=Math.max(0,Math.min(e,t))):this.pendingSeekTime_=null),this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();var e=this.getCurrentTime_();let t;var i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){Ke(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(t,i=!1){if(Ke(t)&&!isNaN(this.player_.duration())){i||this.player_.scrubbing()||this.player_.scrubbing(!0);let e;i=this.calculateDistance(t),t=this.player_.liveTracker;if(t&&t.isLive()){if(.99<=i)return void t.seekToLiveEdge();var s=t.seekableStart(),r=t.liveCurrentTime();if((e=(e=(e=s+i*t.liveWindow())>=r?r:e)<=s?s+.1:e)===1/0)return}else(e=i*this.player_.duration())===this.player_.duration()&&(e-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(e):this.userSeek_(e),this.player_.options_.enableSmoothSeeking&&this.update()}}enable(){super.enable();var e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();var e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Kt(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();var t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){var t,i=this.player_.liveTracker;" "===e.key||"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),this.handleAction(e)):"Home"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(0)):"End"===e.key?(e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration())):/^[0-9]$/.test(e.key)?(e.preventDefault(),e.stopPropagation(),t=.1*parseInt(e.key,10),i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*t):this.userSeek_(this.player_.duration()*t)):"PageDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):"PageUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in document&&"visibilityState"in document&&this.off(document,"visibilitychange",this.toggleVisibility_),super.dispose()}}lr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},g.registerComponent("SeekBar",lr);class dr extends g{constructor(e,t){super(e,t),this.handleMouseMove=vt(p(this,this.handleMouseMove),30),this.throttledHandleMouseSeek=vt(p(this,this.handleMouseSeek),30),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){var t,i,s,r,n=this.getChild("seekBar");n&&(t=n.getChild("playProgressBar"),i=n.getChild("mouseTimeDisplay"),t||i)&&(s=Ve(r=n.el()),r=tr(r=He(r,e).x,0,1),i&&i.update(s,r),t)&&t.update(s,n.getProgress())}handleMouseSeek(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){var e;this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())&&(e=this.getChild("seekBar"),this.player_.scrubbing(!1),e.videoWasPlaying)&&Kt(this.player_.play())}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}dr.prototype.options_={children:["seekBar"]},g.registerComponent("ProgressControl",dr);class hr extends s{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],e=>this.handlePictureInPictureChange(e)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return"vjs-picture-in-picture-control vjs-hidden "+super.buildCSSClass()}handlePictureInPictureAudioModeChange(){"audio"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){document.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in window?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){"function"==typeof document.exitPictureInPicture&&super.show()}}hr.prototype.controlText_="Picture-in-Picture",g.registerComponent("PictureInPictureToggle",hr);class ur extends s{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",e=>this.handleFullscreenChange(e)),!1===document[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return"vjs-fullscreen-control "+super.buildCSSClass()}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}ur.prototype.controlText_="Fullscreen",g.registerComponent("FullscreenToggle",ur);class cr extends g{createEl(){var e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}g.registerComponent("VolumeLevel",cr);class pr extends g{constructor(e,t){super(e,t),this.update=vt(p(this,this.update),30)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(t,i,s,e){if(!s){var s=je(this.el_),r=je(this.player_.el()),i=t.width*i;if(!r||!s)return;var n=t.left-r.left+i,i=t.width-i+(r.right-t.right);let e=s.width/2;ns.width&&(e=s.width),this.el_.style.right=`-${e}px`}this.write(e+"%")}write(e){xe(this.el_,e)}updateVolume(e,t,i,s,r){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,t,i,s.toFixed(0)),r&&r()})}}g.registerComponent("VolumeLevelTooltip",pr);class mr extends g{constructor(e,t){super(e,t),this.update=vt(p(this,this.update),30)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){var s=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,s,()=>{i?this.el_.style.bottom=e.height*t+"px":this.el_.style.left=e.width*t+"px"})}}mr.prototype.options_={children:["volumeLevelTooltip"]},g.registerComponent("MouseVolumeLevelDisplay",mr);class gr extends ir{constructor(e,t){super(e,t),this.on("slideractive",e=>this.updateLastVolume_(e)),this.on(e,"volumechange",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){Ke(e)&&super.handleMouseDown(e)}handleMouseMove(e){var t,i,s,r=this.getChild("mouseVolumeLevelDisplay");r&&(t=je(s=this.el()),i=this.vertical(),s=He(s,e),s=tr(s=i?s.y:s.x,0,1),r.update(t,s,i)),Ke(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){let e=this.player_.volume();this.one("sliderinactive",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}gr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},u||se||gr.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),gr.prototype.playerEvent="volumechange",g.registerComponent("VolumeBar",gr);class fr extends g{constructor(e,t={}){var i,s;t.vertical=t.vertical||!1,"undefined"!=typeof t.volumeBar&&!Q(t.volumeBar)||(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),i=this,(s=e).tech_&&!s.tech_.featuresVolumeControl&&i.addClass("vjs-hidden"),i.on(s,"loadstart",function(){s.tech_.featuresVolumeControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")}),this.throttledHandleMouseMove=vt(p(this,this.handleMouseMove),30),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",e=>this.handleMouseDown(e)),this.on("touchstart",e=>this.handleMouseDown(e)),this.on("mousemove",e=>this.handleMouseMove(e)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:"vjs-volume-control vjs-control "+e})}handleMouseDown(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}fr.prototype.options_={children:["volumeBar"]},g.registerComponent("VolumeControl",fr);class yr extends s{constructor(e,t){var i,s;super(e,t),i=this,(s=e).tech_&&!s.tech_.featuresMuteControl&&i.addClass("vjs-hidden"),i.on(s,"loadstart",function(){s.tech_.featuresMuteControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")}),this.on(e,["loadstart","volumechange"],e=>this.update(e))}buildCSSClass(){return"vjs-mute-control "+super.buildCSSClass()}handleClick(e){var t=this.player_.volume(),i=this.player_.lastVolume_();0===t?(this.player_.volume(i<.1?.1:i),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){var e=this.player_.volume();let t=3;this.setIcon("volume-high"),u&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),Le(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?" ":""}vjs-vol-`+t,"")),Pe(this.el_,"vjs-vol-"+t)}updateControlText_(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)}}yr.prototype.controlText_="Mute",g.registerComponent("MuteToggle",yr);class _r extends g{constructor(e,t={}){"undefined"!=typeof t.inline?t.inline=t.inline:t.inline=!0,"undefined"!=typeof t.volumeControl&&!Q(t.volumeControl)||(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,"keyup",e=>this.handleKeyPress(e)),this.on(this.volumeControl,"keyup",e=>this.handleVolumeControlKeyUp(e)),this.on("keydown",e=>this.handleKeyPress(e)),this.on("mouseover",e=>this.handleMouseOver(e)),this.on("mouseout",e=>this.handleMouseOut(e)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:"vjs-volume-panel vjs-control "+e})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){"Escape"===e.key&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),mt(document,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),c(document,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){"Escape"===e.key&&this.handleMouseOut()}}_r.prototype.options_={children:["muteToggle","volumeControl"]},g.registerComponent("VolumePanel",_r);class vr extends s{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon("forward-"+this.skipTime),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){var e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} `+super.buildCSSClass()}handleClick(e){if(!isNaN(this.player_.duration())){var t=this.player_.currentTime(),i=this.player_.liveTracker,i=i&&i.isLive()?i.seekableEnd():this.player_.duration();let e;e=t+this.skipTime<=i?t+this.skipTime:i,this.player_.currentTime(e)}}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}vr.prototype.controlText_="Skip Forward",g.registerComponent("SkipForward",vr);class br extends s{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon("replay-"+this.skipTime),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){var e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} `+super.buildCSSClass()}handleClick(e){var t=this.player_.currentTime(),i=this.player_.liveTracker,i=i&&i.isLive()&&i.seekableStart();let s;s=i&&t-this.skipTime<=i?i:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(s)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}br.prototype.controlText_="Skip Backward",g.registerComponent("SkipBackward",br);class Tr extends g{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof g&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof g&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){e=this.addChild(e);e&&this.addEventListenerForItem(e)}createEl(){var e=this.options_.contentElType||"ul",e=(this.contentEl_=l(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu"),super.createEl("div",{append:this.contentEl_,className:"vjs-menu"}));return e.appendChild(this.contentEl_),mt(e,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),e}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){let t=e.relatedTarget||document.activeElement;this.children().some(e=>e.el()===t)||(e=this.menuButton_)&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}handleTapClick(t){var e;this.menuButton_&&(this.menuButton_.unpressButton(),e=this.children(),Array.isArray(e))&&(e=e.filter(e=>e.el()===t.target)[0])&&"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus()}handleKeyDown(e){"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),0this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",t),this.on(this.menuButton_,"click",t),this.on(this.menuButton_,"keydown",e=>this.handleKeyDown(e)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),mt(document,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",e=>this.handleMouseLeave(e)),this.on("keydown",e=>this.handleSubmenuKeyDown(e))}update(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){var e,t=new Tr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title&&(e=l("li",{className:"vjs-menu-title",textContent:m(this.options_.title),tabIndex:-1}),e=new g(this.player_,{el:e}),t.addItem(e)),this.items=this.createItems(),this.items)for(let e=0;e{this.handleTracksChange.apply(this,e)}),n=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on(["loadstart","texttrackchange"],r),s.addEventListener("change",r),s.addEventListener("selectedlanguagechange",n),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],r),s.removeEventListener("change",r),s.removeEventListener("selectedlanguagechange",n)}),void 0===s.onchange){let e;this.on(["tap","click"],function(){if("object"!=typeof window.Event)try{e=new window.Event("change")}catch(e){}e||(e=document.createEvent("Event")).initEvent("change",!0,!0),s.dispatchEvent(e)})}this.handleTracksChange()}handleClick(e){var t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return"vjs-chapters-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-chapters-button "+super.buildWrapperCSSClass()}update(e){e&&e.track&&"chapters"!==e.track.kind||((e=this.findChaptersTrack())!==this.track_?(this.setTrack(e),super.update()):(!this.items||e&&e.cues&&e.cues.length!==this.items.length)&&super.update())}setTrack(e){var t;this.track_!==e&&(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_&&((t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_))&&t.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null),this.track_=e,this.track_)&&(this.track_.mode="hidden",(t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_))&&t.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_))}findChaptersTrack(){var t=this.player_.textTracks()||[];for(let e=t.length-1;0<=e;e--){var i=t[e];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(m(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){var i=[];if(this.track_){var s=this.track_.cues;if(s)for(let e=0,t=s.length;e{this.handleTracksChange.apply(this,e)});s.addEventListener("change",r),this.on("dispose",()=>{s.removeEventListener("change",r)})}createEl(e,t,i){e=super.createEl(e,t,i),t=e.querySelector(".vjs-menu-item-text");return 0<=["main-desc","descriptions"].indexOf(this.options_.track.kind)&&(t.appendChild(l("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),t.appendChild(l("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),e}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){var t=this.player_.audioTracks();for(let e=0;ethis.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Br.prototype.contentElType="button",g.registerComponent("PlaybackRateMenuItem",Br);class Fr extends Sr{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",e=>this.updateVisibility(e)),this.on(e,"ratechange",e=>this.updateLabel(e)),this.on(e,"playbackrateschange",e=>this.handlePlaybackRateschange(e))}createEl(){var e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=l("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return"vjs-playback-rate "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-playback-rate "+super.buildWrapperCSSClass()}createItems(){var t=this.playbackRates(),i=[];for(let e=t.length-1;0<=e;e--)i.push(new Br(this.player(),{rate:t[e]+"x"}));return i}handlePlaybackRateschange(e){this.update()}playbackRates(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0{this.open(e)})}buildCSSClass(){return"vjs-error-display "+super.buildCSSClass()}content(){var e=this.player().error();return e?this.localize(e.message):""}}Hr.prototype.options_=Object.assign({},ii.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),g.registerComponent("ErrorDisplay",Hr);class zr extends g{constructor(e,t={}){super(e,t),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),l("select",{id:this.options_.id},{},this.options_.SelectOptions.map(e=>{var t=(this.options_.labelId||"vjs-track-option-"+lt++)+"-"+e[1].replace(/\W+/g,""),e=l("option",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return e.setAttribute("aria-labelledby",this.selectLabelledbyIds+" "+t),e}))}}g.registerComponent("TextTrackSelect",zr);class $r extends g{constructor(t,e={}){super(t,e);var i,e=l("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId}),e=(this.el().appendChild(e),this.options_.selects);for(i of e){var s=this.options_.selectConfigs[i],r=s.className,n=s.id.replace("%s",this.options_.id_);let e=null;var a="vjs_select_"+lt++,r=("colors"===this.options_.type&&(e=l("span",{className:r}),(r=l("label",{id:n,className:"vjs-label",textContent:this.localize(s.label)})).setAttribute("for",a),e.appendChild(r)),new zr(t,{SelectOptions:s.options,legendId:this.options_.legendId,id:a,labelId:n}));this.addChild(r),"colors"===this.options_.type&&(e.appendChild(r.el()),this.el().appendChild(e))}}createEl(){return l("fieldset",{className:this.options_.className})}}g.registerComponent("TextTrackFieldset",$r);class Wr extends g{constructor(e,t={}){super(e,t);var t=this.options_.textTrackComponentid,i=new $r(e,{id_:t,legendId:"captions-text-legend-"+t,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"}),i=(this.addChild(i),new $r(e,{id_:t,legendId:"captions-background-"+t,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"})),i=(this.addChild(i),new $r(e,{id_:t,legendId:"captions-window-"+t,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"}));this.addChild(i)}createEl(){return l("div",{className:"vjs-track-settings-colors"})}}g.registerComponent("TextTrackSettingsColors",Wr);class Gr extends g{constructor(e,t={}){super(e,t);var t=this.options_.textTrackComponentid,i=new $r(e,{id_:t,legendId:"captions-font-size-"+t,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"}),i=(this.addChild(i),new $r(e,{id_:t,legendId:"captions-edge-style-"+t,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"})),i=(this.addChild(i),new $r(e,{id_:t,legendId:"captions-font-family-"+t,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"}));this.addChild(i)}createEl(){return l("div",{className:"vjs-track-settings-font"})}}g.registerComponent("TextTrackSettingsFont",Gr);class Xr extends g{constructor(e,t={}){super(e,t);t=new s(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"}),t.el().classList.remove("vjs-control","vjs-button"),t.el().textContent=this.localize("Reset"),this.addChild(t),t=this.localize("Done"),e=new s(e,{controlText:t,className:"vjs-done-button"});e.el().classList.remove("vjs-control","vjs-button"),e.el().textContent=t,this.addChild(e)}createEl(){return l("div",{className:"vjs-track-settings-controls"})}}g.registerComponent("TrackSettingsControls",Xr);let Kr="vjs-text-track-settings";var e=["#000","Black"],xi=["#00F","Blue"],Yr=["#0FF","Cyan"],Qr=["#0F0","Green"],r=["#F0F","Magenta"],Jr=["#F00","Red"],Zr=["#FFF","White"],n=["#FF0","Yellow"],en=["1","Opaque"],tn=["0.5","Semi-Transparent"],sn=["0","Transparent"];let rn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[e,Zr,Jr,Qr,xi,n,r,Yr],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[en,tn,sn],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Zr,e,Jr,Qr,xi,n,r,Yr],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[en,tn],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[sn,tn,en],className:"vjs-window-opacity vjs-opacity"}};function nn(e,t){if((e=t?t(e):e)&&"none"!==e)return e}rn.windowColor.options=rn.backgroundColor.options;class an extends ii{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=l("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){var t=new Wr(e,{textTrackComponentid:this.id_,selectConfigs:rn,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]}),t=(this.addChild(t),new Gr(e,{textTrackComponentid:this.id_,selectConfigs:rn,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]})),t=(this.addChild(t),new Xr(e));this.addChild(t)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),X(rn,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return K(rn,(e,t,i)=>{s=this.$(t.selector),t=t.parser;var s=nn(s.options[s.options.selectedIndex].value,t);return void 0!==s&&(e[i]=s),e},{})}setValues(n){X(rn,(e,t)=>{var i=this.$(e.selector),s=n[t],r=e.parser;if(s)for(let e=0;e{var t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(window.localStorage.getItem(Kr))}catch(e){o.warn(e)}e&&this.setValues(e)}saveSettings(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?window.localStorage.setItem(Kr,JSON.stringify(e)):window.localStorage.removeItem(Kr)}catch(e){o.warn(e)}}}updateDisplay(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}g.registerComponent("TextTrackSettings",an);class on extends g{constructor(e,t){let i=t.ResizeObserver||window.ResizeObserver;super(e,d({createEl:!(i=null===t.ResizeObserver?!1:i),reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||window.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=bt(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(this.el_&&this.el_.contentWindow){let e=this.debouncedHandler_,t=this.unloadListener_=function(){c(this,"resize",e),c(this,"unload",t),t=null};mt(this.el_.contentWindow,"unload",t),mt(this.el_.contentWindow,"resize",e)}},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}g.registerComponent("ResizeManager",on);let ln={trackingThreshold:20,liveTolerance:15};class dn extends g{constructor(e,t){super(e,d(ln,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",e=>this.handleDurationchange(e)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){var t=this.player_.seekable();if(t&&t.length){var t=Number(window.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3,t=(this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i,this.liveCurrentTime()),i=this.player_.currentTime();let e=this.player_.paused()||this.seekedBehindLive_||Math.abs(t-i)>this.options_.liveTolerance;(e=this.timeupdateSeen_&&t!==1/0?e:!1)!==this.behindLiveEdge_&&(this.behindLiveEdge_=e,this.trigger("liveedgechange"))}}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&2this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:l("div",{className:"vjs-title-bar-title",id:"vjs-title-bar-title-"+lt++}),description:l("div",{className:"vjs-title-bar-description",id:"vjs-title-bar-description-"+lt++})},l("div",{className:"vjs-title-bar"},{},J(this.els))}updateDom_(){var e=this.player_.tech_;let s=e&&e.el_,r={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(e=>{var t=this.state[e],i=this.els[e],e=r[e];$e(i),t&&xe(i,t),s&&(s.removeAttribute(e),t)&&s.setAttribute(e,i.id)}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){var e=this.player_.tech_,e=e&&e.el_;e&&(e.removeAttribute("aria-labelledby"),e.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}g.registerComponent("TitleBar",hn);let un={initialDisplay:4e3,position:[],takeFocus:!1};class cn extends s{constructor(e,t){super(e,t=d(un,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],e=>{this.removeClass("force-display")})}buildCSSClass(){return"vjs-transient-button focus-visible "+this.options_.position.map(e=>"vjs-"+e).join(" ")}createEl(){var e=l("button",{},{type:"button",class:this.buildCSSClass()},l("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}g.registerComponent("TransientButton",cn);function pn(s){let r=s.el();if(!r.resetSourceWatch_){let t={},e=_n(s),i=t=>(...e)=>{e=t.apply(r,e);return gn(s),e};["append","appendChild","insertAdjacentHTML"].forEach(e=>{r[e]&&(t[e]=r[e],r[e]=i(t[e]))}),Object.defineProperty(r,"innerHTML",d(e,{set:i(e.set)})),r.resetSourceWatch_=()=>{r.resetSourceWatch_=null,Object.keys(t).forEach(e=>{r[e]=t[e]}),Object.defineProperty(r,"innerHTML",e)},s.one("sourceset",r.resetSourceWatch_)}}function mn(n){if(n.featuresSourceset){let r=n.el();if(!r.resetSourceset_){e=n;let t=yn([e.el(),window.HTMLMediaElement.prototype,vn],"src");var e;let i=r.setAttribute,s=r.load;Object.defineProperty(r,"src",d(t,{set:e=>{e=t.set.call(r,e);return n.triggerSourceset(r.src),e}})),r.setAttribute=(e,t)=>{t=i.call(r,e,t);return/src/i.test(e)&&n.triggerSourceset(r.src),t},r.load=()=>{var e=s.call(r);return gn(n)||(n.triggerSourceset(""),pn(n)),e},r.currentSrc?n.triggerSourceset(r.currentSrc):gn(n)||pn(n),r.resetSourceset_=()=>{r.resetSourceset_=null,r.load=s,r.setAttribute=i,Object.defineProperty(r,"src",t),r.resetSourceWatch_&&r.resetSourceWatch_()}}}}let gn=t=>{var e=t.el();if(e.hasAttribute("src"))t.triggerSourceset(e.src);else{var i=t.$$("source"),s=[];let e="";if(!i.length)return!1;for(let e=0;e{let s={};for(let e=0;eyn([e.el(),window.HTMLMediaElement.prototype,window.Element.prototype,fn],"innerHTML"),vn=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?fi(window.Element.prototype.getAttribute.call(this,"src")):""},set(e){return window.Element.prototype.setAttribute.call(this,"src",e),e}});class b extends v{constructor(e,t){super(e,t);t=e.source;let i=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,t&&(this.el_.currentSrc!==t.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(t):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){var s=this.el_.childNodes;let e=s.length;for(var r=[];e--;){var n=s[e];"track"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),i||this.el_.hasAttribute("crossorigin")||!yi(n.src)||(i=!0)):r.push(n))}for(let e=0;e{s=[];for(let e=0;ei.removeEventListener("change",e)),()=>{for(let e=0;e{i.removeEventListener("change",e),i.removeEventListener("change",r),i.addEventListener("change",r)}),this.on("webkitendfullscreen",()=>{i.removeEventListener("change",e),i.addEventListener("change",e),i.removeEventListener("change",r)})}overrideNative_(e,i){if(i===this[`featuresNative${e}Tracks`]){let t=e.toLowerCase();this[t+"TracksListeners_"]&&Object.keys(this[t+"TracksListeners_"]).forEach(e=>{this.el()[t+"Tracks"].removeEventListener(e,this[t+"TracksListeners_"][e])}),this[`featuresNative${e}Tracks`]=!i,this[t+"TracksListeners_"]=null,this.proxyNativeTracksForType_(t)}}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(i){var s=Hi[i];let r=this.el()[s.getterName],n=this[s.getterName]();if(this[`featuresNative${s.capitalName}Tracks`]&&r&&r.addEventListener){let e={change:e=>{var t={type:"change",target:n,currentTarget:n,srcElement:n};n.trigger(t),"text"===i&&this[zi.remoteText.getterName]().trigger(t)},addtrack(e){n.addTrack(e.track)},removetrack(e){n.removeTrack(e.track)}},t=function(){var e=[];for(let i=0;i{let i=e[t];r.addEventListener(t,i),this.on("dispose",e=>r.removeEventListener(t,i))}),this.on("loadstart",t),this.on("dispose",e=>this.off("loadstart",t))}}proxyNativeTracks_(){Hi.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let t=this.options_.tag;t&&(this.options_.playerElIngest||this.movingMediaElementInDOM)||(t?(e=t.cloneNode(!0),t.parentNode&&t.parentNode.insertBefore(e,t),b.disposeMediaElement(t),t=e):(t=document.createElement("video"),e=d({},this.options_.tag&&Ne(this.options_.tag)),ve&&!0===this.options_.nativeControlsForTouch||delete e.controls,Re(t,Object.assign(e,{id:this.options_.techId,class:"vjs-tech"}))),t.playerId=this.options_.playerId),"undefined"!=typeof this.options_.preload&&Ue(t,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(t.disablePictureInPicture=this.options_.disablePictureInPicture);var e,i=["loop","muted","playsinline","autoplay"];for(let e=0;e{0{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)})}}supportsFullScreen(){return"function"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){let e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Kt(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){return e?(e={src:e},t&&(e.type=t),t=l("source",{},e),this.el_.appendChild(t),!0):(o.error("Invalid source URL."),!1)}removeSourceElement(e){if(e){var t;for(t of this.el_.querySelectorAll("source"))if(t.src===e)return this.el_.removeChild(t),!0;o.warn("No matching source element found with src: "+e)}else o.error("Source URL is required to remove the source element.");return!1}reset(){b.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){var t;return this.featuresNativeTextTracks?(t=document.createElement("track"),e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t):super.createRemoteTextTrack(e)}addRemoteTextTrack(e,t){e=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(e),e}removeRemoteTextTrack(t){if(super.removeRemoteTextTrack(t),this.featuresNativeTextTracks){var i=this.$$("track");let e=i.length;for(;e--;)t!==i[e]&&t!==i[e].track||this.el().removeChild(i[e])}}getVideoPlaybackQuality(){var e;return"function"==typeof this.el().getVideoPlaybackQuality?this.el().getVideoPlaybackQuality():(e={},"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),window.performance&&(e.creationTime=window.performance.now()),e)}}Z(b,"TEST_VID",function(){var e,t;if(Ee())return e=document.createElement("video"),(t=document.createElement("track")).kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}),b.isSupported=function(){try{b.TEST_VID.volume=.5}catch(e){return!1}return!(!b.TEST_VID||!b.TEST_VID.canPlayType)},b.canPlayType=function(e){return b.TEST_VID.canPlayType(e)},b.canPlaySource=function(e,t){return b.canPlayType(e.type)},b.canControlVolume=function(){try{let e=b.TEST_VID.volume;b.TEST_VID.volume=e/2+.1;var t=e!==b.TEST_VID.volume;return t&&u?(window.setTimeout(()=>{b&&b.prototype&&(b.prototype.featuresVolumeControl=e!==b.TEST_VID.volume)}),!1):t}catch(e){return!1}},b.canMuteVolume=function(){try{var e=b.TEST_VID.muted;return b.TEST_VID.muted=!e,b.TEST_VID.muted?Ue(b.TEST_VID,"muted","muted"):Be(b.TEST_VID,"muted"),e!==b.TEST_VID.muted}catch(e){return!1}},b.canControlPlaybackRate=function(){if(se&&le&&he<58)return!1;try{var e=b.TEST_VID.playbackRate;return b.TEST_VID.playbackRate=e/2+.1,e!==b.TEST_VID.playbackRate}catch(e){return!1}},b.canOverrideAttributes=function(){try{var e=()=>{};Object.defineProperty(document.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(document.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(document.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(document.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},b.supportsNativeTextTracks=function(){return Te||u&&le},b.supportsNativeVideoTracks=function(){return!(!b.TEST_VID||!b.TEST_VID.videoTracks)},b.supportsNativeAudioTracks=function(){return!(!b.TEST_VID||!b.TEST_VID.audioTracks)},b.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([e,t]){Z(b.prototype,e,()=>b[t](),!0)}),b.prototype.featuresVolumeControl=b.canControlVolume(),b.prototype.movingMediaElementInDOM=!u,b.prototype.featuresFullscreenResize=!0,b.prototype.featuresProgressEvents=!0,b.prototype.featuresTimeupdateEvents=!0,b.prototype.featuresVideoFrameCallback=!(!b.TEST_VID||!b.TEST_VID.requestVideoFrameCallback),b.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);if(e.removeAttribute("src"),"function"==typeof e.load)try{e.load()}catch(e){}}},b.resetMediaElement=function(t){if(t){var i=t.querySelectorAll("source");let e=i.length;for(;e--;)t.removeChild(i[e]);if(t.removeAttribute("src"),"function"==typeof t.load)try{t.load()}catch(e){}}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){b.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){b.prototype["set"+m(t)]=function(e){(this.el_[t]=e)?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(e){b.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(t){b.prototype["set"+m(t)]=function(e){this.el_[t]=e}}),["pause","load","play"].forEach(function(e){b.prototype[e]=function(){return this.el_[e]()}}),v.withSourceHandlers(b),b.nativeSourceHandler={},b.nativeSourceHandler.canPlayType=function(e){try{return b.TEST_VID.canPlayType(e)}catch(e){return""}},b.nativeSourceHandler.canHandleSource=function(e,t){return e.type?b.nativeSourceHandler.canPlayType(e.type):e.src?(e=_i(e.src),b.nativeSourceHandler.canPlayType("video/"+e)):""},b.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},b.nativeSourceHandler.dispose=function(){},b.registerSourceHandler(b.nativeSourceHandler),v.registerTech("Html5",b);let bn=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Tn={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Sn=["tiny","xsmall","small","medium","large","xlarge","huge"],wn={},En=(Sn.forEach(e=>{var t="x"===e.charAt(0)?"x-"+e.substring(1):e;wn[e]="vjs-layout-"+t}),{tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0});class T extends g{constructor(e,i,t){if(e.id=e.id||i.id||"vjs_video_"+lt++,(i=Object.assign(T.getTagSettings(e),i)).initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,i.language||(s=e.closest("[lang]"))&&(i.language=s.getAttribute("lang")),super(null,i,t),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=W(this.id_),this.fsApi_=q,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Ne(e),this.language(this.options_.language),i.languages){let t={};Object.getOwnPropertyNames(i.languages).forEach(function(e){t[e.toLowerCase()]=i.languages[e]}),this.languages_=t}else this.languages_=T.prototype.options_.languages;this.resetCache_(),this.poster_=i.poster||"",this.controls_=!!i.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach(e=>{if("function"!=typeof this[e])throw new Error(`plugin "${e}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),Ot(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(mt(document,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);var s=d(this.options_),t=(i.plugins&&Object.keys(i.plugins).forEach(e=>{this[e](i.plugins[e])}),i.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(i.playbackRates),i.experimentalSvgIcons&&((t=(new window.DOMParser).parseFromString('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',"image/svg+xml")).querySelector("parsererror")?(o.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null):((s=t.documentElement).style.display="none",this.el_.appendChild(s),this.addClass("vjs-svg-icons-enabled"))),this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),i.spatialNavigation&&i.spatialNavigation.enabled&&(this.spatialNavigation=new Ns(this),this.addClass("vjs-spatial-navigation-enabled")),ve&&this.addClass("vjs-touch-enabled"),u||this.addClass("vjs-workinghover"),T.players[this.id_]=this,M.split(".")[0]);this.addClass("vjs-v"+t),this.userActive(!0),this.reportUserActivity(),this.one("play",e=>this.listenForUserActivity_(e)),this.on("keydown",e=>this.handleKeyDown(e)),this.on("languagechange",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){var e;this.trigger("dispose"),this.off("dispose"),c(document,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),c(document,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),T.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,Ts.hasOwnProperty(e.id())&&delete Ts[e.id()],a.names.forEach(e=>{e=this[a[e].getterName]();e&&e.off&&e.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let t=this.tag,i,e=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),s="video-js"===this.tag.tagName.toLowerCase(),r=(e?i=this.el_=t.parentNode:s||(i=this.el_=super.createEl("div")),Ne(t));if(s){for(i=this.el_=t,t=this.tag=document.createElement("video");i.children.length;)t.appendChild(i.firstChild);De(i,"video-js")||Pe(i,"video-js"),i.appendChild(t),e=this.playerElIngest_=i,Object.keys(i).forEach(e=>{try{t[e]=i[e]}catch(e){}})}t.setAttribute("tabindex","-1"),r.tabindex="-1",le&&pe&&(t.setAttribute("role","application"),r.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in r&&delete r.width,"height"in r&&delete r.height,Object.getOwnPropertyNames(r).forEach(function(e){s&&"class"===e||i.setAttribute(e,r[e]),s&&t.setAttribute(e,r[e])}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",(t.player=i.player=this).addClass("vjs-paused");var n,a=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(e=>Se[e]).map(e=>"vjs-device-"+e.substring(3).toLowerCase().replace(/\_/g,"-")),o=(this.addClass(...a),!0!==window.VIDEOJS_NO_DYNAMIC_STYLE&&(this.styleEl_=at("vjs-styles-dimensions"),a=Ye(".vjs-styles-defaults"),(n=Ye("head")).insertBefore(this.styleEl_,a?a.nextSibling:n.firstChild)),this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin),t.getElementsByTagName("a"));for(let e=0;e{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)},Ct(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===window.VIDEOJS_NO_DYNAMIC_STYLE){let e="number"==typeof this.width_?this.width_:this.options_.width,t="number"==typeof this.height_?this.height_:this.options_.height;var r=this.tech_&&this.tech_.el();void(r&&(0<=e&&(r.width=e),0<=t)&&(r.height=t))}else{let e,t,i,s;r=(i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0{e=a[e];n[e.getterName]=this[e.privateName]}),Object.assign(n,this.options_[i]),Object.assign(n,this.options_[s]),Object.assign(n,this.options_[e.toLowerCase()]),this.tag&&(n.tag=this.tag),t&&t.src===this.cache_.src&&0{this.on(this.tech_,t,e=>this[`handleTech${m(t)}_`](e))}),Object.keys(bn).forEach(t=>{this.on(this.tech_,t,e=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${bn[t]}_`].bind(this),event:e}):this[`handleTech${bn[t]}_`](e)})}),this.on(this.tech_,"loadstart",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,"sourceset",e=>this.handleTechSourceset_(e)),this.on(this.tech_,"waiting",e=>this.handleTechWaiting_(e)),this.on(this.tech_,"ended",e=>this.handleTechEnded_(e)),this.on(this.tech_,"seeking",e=>this.handleTechSeeking_(e)),this.on(this.tech_,"play",e=>this.handleTechPlay_(e)),this.on(this.tech_,"pause",e=>this.handleTechPause_(e)),this.on(this.tech_,"durationchange",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,"fullscreenchange",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,"fullscreenerror",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,"enterpictureinpicture",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,"leavepictureinpicture",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,"error",e=>this.handleTechError_(e)),this.on(this.tech_,"posterchange",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,"textdata",e=>this.handleTechTextData_(e)),this.on(this.tech_,"ratechange",e=>this.handleTechRateChange_(e)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||Ae(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){a.names.forEach(e=>{e=a[e];this[e.privateName]=this[e.getterName]()}),this.textTracksJson_=Jt(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&o.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_}version(){return{"video.js":M}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()&&this.hasStarted(!1),this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(t){if(this.tech_&&"string"==typeof t){var i=()=>{let e=this.muted(),t=(this.muted(!0),()=>{this.muted(e)});this.playTerminatedQueue_.push(t);var i=this.play();if(Xt(i))return i.catch(e=>{throw t(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))})};let e;if("any"!==t||this.muted()?e="muted"!==t||this.muted()?this.play():i():Xt(e=this.play())&&(e=e.catch(i)),Xt(e))return e.then(()=>{this.trigger({type:"autoplay-success",autoplay:t})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:t})})}}updateSourceCaches_(e=""){let t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;var s=e.$$("source");for(let e=0;ee.src&&e.src===t),s=[],r=this.$$("source"),n=[];for(let e=0;ethis.updateSourceCaches_(e);var i=this.currentSource().src,s=t.src;(e=!i||/^blob:/.test(i)||!/^blob:/.test(s)||this.lastSource_&&(this.lastSource_.tech===s||this.lastSource_.player===i)?e:()=>{})(s),t.src||this.tech_.any(["sourceset","loadstart"],e=>{"sourceset"!==e.type&&(e=this.techGet_("currentSrc"),this.lastSource_.tech=e,this.updateSourceCaches_(e))})}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){0e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");let e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){!this.controls_||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Kt(this.play()):this.pause())}handleTechDoubleClick_(t){!this.controls_||Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),e=>e.contains(t.target))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,t):this.isInPictureInPicture()&&!document.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(t){t=t.target.player;if(!t||t===this){t=this.el();let e=document[this.fsApi_.fullscreenElement]===t;!e&&t.matches&&(e=t.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(e)}}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){var e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=1{this.play_(e)})}play_(e=Kt){this.playCallbacks_.push(e);var t,e=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Te||u);this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),this.isReady_&&e?(t=this.techGet_("play"),i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===t?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(t)):(this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!e&&i&&this.load())}runPlayTerminatedQueue_(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})}runPlayCallbacks_(t){var e=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],e.forEach(function(e){e(t)})}pause(){this.techCall_("pause")}paused(){return!1!==this.techGet_("paused")}played(){return this.techGet_("played")||jt(0,0)}scrubbing(e){if("undefined"==typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(void 0===e)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=(e=parseFloat(e))<0?1/0:e)!==this.cache_.duration&&((this.cache_.duration=e)===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return e=e&&e.length?e:jt(0,0)}seekable(){let e=this.techGet_("seekable");return e=e&&e.length?e:jt(0,0)}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return Gt(this.buffered(),this.duration())}bufferedEnd(){var e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i=i>t?t:i}volume(e){let t;if(void 0===e)return t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t;t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),0{function s(){o.off("fullscreenerror",r),o.off("fullscreenchange",t)}function t(){s(),e()}function r(e,t){s(),i(t)}o.one("fullscreenchange",t),o.one("fullscreenerror",r);var n=o.requestFullscreenHelper_(a);n&&(n.then(s,s),n.then(e,i))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen)return(e=this.el_[this.fsApi_.requestFullscreen](t))&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e;this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){let a=this;return new Promise((e,i)=>{function s(){a.off("fullscreenerror",r),a.off("fullscreenchange",t)}function t(){s(),e()}function r(e,t){s(),i(t)}a.one("fullscreenchange",t),a.one("fullscreenerror",r);var n=a.exitFullscreenHelper_();n&&(n.then(s,s),n.then(e,i))})}exitFullscreenHelper_(){var e;if(this.fsApi_.requestFullscreen)return(e=document[this.fsApi_.exitFullscreen]())&&Kt(e.then(()=>this.isFullscreen(!1))),e;this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=document.documentElement.style.overflow,mt(document,"keydown",this.boundFullWindowOnEscKey_),document.documentElement.style.overflow="hidden",Pe(document.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){"Escape"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,c(document,"keydown",this.boundFullWindowOnEscKey_),document.documentElement.style.overflow=this.docOrigOverflow,Le(document.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(void 0===e)return!!this.isInPictureInPicture_;this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_()}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&window.documentPictureInPicture){let t=document.createElement(this.el().tagName);return t.classList=this.el().classList,t.classList.add("vjs-pip-container"),this.posterImage&&t.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&t.appendChild(this.titleBar.el().cloneNode(!0)),t.appendChild(l("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),window.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(e=>(Ze(e),this.el_.parentNode.insertBefore(t,this.el_),e.document.body.appendChild(this.el_),e.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:e}),e.addEventListener("pagehide",e=>{e=e.target.querySelector(".video-js");t.parentNode.replaceChild(e,t),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),e))}return"pictureInPictureEnabled"in document&&!1===this.disablePictureInPicture()?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){return window.documentPictureInPicture&&window.documentPictureInPicture.window?(window.documentPictureInPicture.window.close(),Promise.resolve()):"pictureInPictureEnabled"in document?document.exitPictureInPicture():void 0}handleKeyDown(e){var t,i,s=this.options_.userActions;s&&s.hotkeys&&(t=this.el_.ownerDocument.activeElement,i=t.tagName.toLowerCase(),t.isContentEditable||("input"===i?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type):-1!==["textarea"].indexOf(i))||("function"==typeof s.hotkeys?s.hotkeys.call(this,e):this.handleHotkeys(e)))}handleHotkeys(t){var{fullscreenKey:e=e=>"f"===t.key.toLowerCase(),muteKey:i=e=>"m"===t.key.toLowerCase(),playPauseKey:s=e=>"k"===t.key.toLowerCase()||" "===t.key.toLowerCase()}=this.options_.userActions?this.options_.userActions.hotkeys:{};e.call(this,t)?(t.preventDefault(),t.stopPropagation(),e=g.getComponent("FullscreenToggle"),!1!==document[this.fsApi_.fullscreenEnabled]&&e.prototype.handleClick.call(this,t)):i.call(this,t)?(t.preventDefault(),t.stopPropagation(),g.getComponent("MuteToggle").prototype.handleClick.call(this,t)):s.call(this,t)&&(t.preventDefault(),t.stopPropagation(),g.getComponent("PlayToggle").prototype.handleClick.call(this,t))}canPlayType(s){var r;for(let t=0,i=this.options_.techOrder;ti.some(e=>{if(r=s(t,e))return!0})),r}var i=this.options_.techOrder.map(e=>[e,v.getTech(e)]).filter(([e,t])=>t?t.isSupported():(o.error(`The "${e}" tech is undefined. Skipped browser support check for that tech.`),!1));let s;var r,n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};return(s=this.options_.sourceOrder?t(e,i,(r=n,(e,t)=>r(t,e))):t(i,e,n))||!1}handleSrc_(e,s){if("undefined"==typeof e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();let r=As(e);if(r.length){if(this.changingSrc_=!0,s||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),Ss(this,r[0],(e,t)=>{var i;if(this.middleware_=t,s||(this.cache_.sources=r),this.updateSourceCaches_(e),this.src_(e))return 1e.setTech&&e.setTech(i))}),1{this.error(null),this.handleSrc_(r.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)}src(e){return this.handleSrc_(e,!1)}src_(e){var t=this.selectSource([e]);return!t||(Ut(t.tech,this.techName_)?this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1})),!1)}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")}reset(){this.paused()?this.doReset_():Kt(this.play().then(()=>this.doReset_()))}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Ct(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);var{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},i=(i||{}).seekBar;e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),i&&(i.update(),i.loadProgressBar)&&i.loadProgressBar.update()}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(void 0===e)return this.techGet_("preload");this.techCall_("setPreload",e),this.options_.preload=e}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t="undefined"==typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return void 0!==e&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(void 0===e)return this.techGet_("loop");this.techCall_("setLoop",e),this.options_.loop=e}poster(e){if(void 0===e)return this.poster_;(e=e||"")!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){var e;(!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster&&(e=this.tech_.poster()||"")!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}controls(e){if(void 0===e)return!!this.controls_;this.controls_!==(e=!!e)&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;this.usingNativeControls_!==(e=!!e)&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(t){if(void 0===t)return this.error_||null;if(B("beforeerror").forEach(e=>{e=e(this,t);Y(e)&&!Array.isArray(e)||"string"==typeof e||"number"==typeof e||null===e?t=e:this.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&t&&4===t.code){let e=function(){this.error(t)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],e),void this.one("loadstart",function(){this.off(["click","touchstart"],e)})}else null===t?(this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close()):(this.error_=new i(t),this.addClass("vjs-error"),o.error(`(CODE:${this.error_.code} ${i.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),B("error").forEach(e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;(e=!!e)!==this.userActive_&&(this.userActive_=e,this.userActive_?(this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")))}listenForUserActivity_(){let t,i,s,r=p(this,this.reportUserActivity);function e(e){r(),this.clearInterval(t)}this.on("mousedown",function(){r(),this.clearInterval(t),t=this.setInterval(r,250)}),this.on("mousemove",function(e){e.screenX===i&&e.screenY===s||(i=e.screenX,s=e.screenY,r())}),this.on("mouseup",e),this.on("mouseleave",e);var n=this.getChild("controlBar");!n||u||se||(n.on("mouseenter",function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),n.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",r),this.on("keyup",r);let a;this.setInterval(function(){var e;this.userActivity_&&(this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a),(e=this.options_.inactivityTimeout)<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e)))},250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){var e=this.getChild("ControlBar");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");var e=this.children();let t=this.getChild("ControlBar");var i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){return"boolean"!=typeof e||e===this.audioOnlyMode_?this.audioOnlyMode_:(this.audioOnlyMode_=e)?(e=[],this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())):Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return"boolean"!=typeof e||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e)?(this.audioOnlyMode()?this.audioOnlyMode(!1):Promise.resolve()).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let t=e.track;if(t=t||e,this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Ct(this))&&this.trigger("languagechange")}languages(){return d(T.prototype.options_.languages,this.languages_)}toJSON(){var t=d(this.options_),i=t.tracks;t.tracks=[];for(let e=0;e{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(this.responsive()){var t=this.currentBreakpoint(),i=this.currentWidth();for(let e=0;ethis.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:l,description:r||e||""}),this.ready(t))}getMedia(){var e,t;return this.cache_.media?d(this.cache_.media):(e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src}))},e&&(t.poster=e,t.artwork=[{src:t.poster,type:Ps(t.poster)}]),t)}static getTagSettings(e){var i={sources:[],tracks:[]},t=Ne(e),s=t["data-setup"];if(De(e,"vjs-fill")&&(t.fill=!0),De(e,"vjs-fluid")&&(t.fluid=!0),null!==s)try{Object.assign(t,JSON.parse(s||"{}"))}catch(e){o.error("data-setup",e)}if(Object.assign(i,t),e.hasChildNodes()){var r=e.childNodes;for(let e=0,t=r.length;e"number"==typeof e)&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}a.names.forEach(function(e){let t=a[e];T.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),T.prototype.crossorigin=T.prototype.crossOrigin,T.players={};Jr=window.navigator;T.prototype.options_={techOrder:v.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Jr&&(Jr.languages&&Jr.languages[0]||Jr.userLanguage||Jr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1},vn.forEach(function(e){T.prototype[`handleTech${m(e)}_`]=function(){return this.trigger(e)}}),g.registerComponent("Player",T);function En(t,i){function s(){Pn(this,{name:t,plugin:i,instance:null},!0);var e=i.apply(this,arguments);return Dn(this,t),Pn(this,{name:t,plugin:i,instance:e}),e}return Object.keys(i).forEach(function(e){s[e]=i[e]}),s}let Cn="plugin",kn="activePlugins_",In={},xn=e=>In.hasOwnProperty(e),An=e=>xn(e)?In[e]:void 0,Dn=(e,t)=>{e[kn]=e[kn]||{},e[kn][t]=!0},Pn=(e,t,i)=>{i=(i?"before":"")+"pluginsetup";e.trigger(i,t),e.trigger(i+":"+t.name,t)},Ln=(i,s)=>(s.prototype.name=i,function(...e){Pn(this,{name:i,plugin:s,instance:null},!0);let t=new s(this,...e);return this[i]=()=>t,Pn(this,t.getEventHash()),t});class On{constructor(e){if(this.constructor===On)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Ot(this),delete this.trigger,Nt(this,this.constructor.defaultState),Dn(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return gt(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){var{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[kn][e]=!1,this.player=this.state=null,t[e]=Ln(e,In[e])}static isBasic(e){e="string"==typeof e?An(e):e;return"function"==typeof e&&!On.prototype.isPrototypeOf(e.prototype)}static registerPlugin(e,t){if("string"!=typeof e)throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(xn(e))o.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(T.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if("function"!=typeof t)throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return In[e]=t,e!==Cn&&(On.isBasic(t)?T.prototype[e]=En(e,t):T.prototype[e]=Ln(e,t)),t}static deregisterPlugin(e){if(e===Cn)throw new Error("Cannot de-register base plugin.");xn(e)&&(delete In[e],delete T.prototype[e])}static getPlugins(e=Object.keys(In)){let i;return e.forEach(e=>{var t=An(e);t&&((i=i||{})[e]=t)}),i}static getPluginVersion(e){e=An(e);return e&&e.VERSION||""}}function Rn(e,i,s,r){{var n=i+` is deprecated and will be removed in ${e}.0; please use ${s} instead.`,a=r;let t=!1;return function(...e){return t||o.warn(n),t=!0,a.apply(this,e)}}}On.getPlugin=An,On.BASE_PLUGIN_NAME=Cn,On.registerPlugin(Cn,On),T.prototype.usingPlugin=function(e){return!!this[kn]&&!0===this[kn][e]},T.prototype.hasPlugin=function(e){return!!xn(e)};let Nn=e=>0===e.indexOf("#")?e.slice(1):e;function E(e,i,s){let r=E.getPlayer(e);if(r)i&&o.warn(`Player "${e}" is already initialised. Options will not be applied.`),s&&r.ready(s);else{let t="string"==typeof e?Ye("#"+Nn(e)):e;if(!Ce(t))throw new TypeError("The element or ID supplied is not valid. (videojs)");e="getRootNode"in t&&t.getRootNode()instanceof window.ShadowRoot?t.getRootNode():t.ownerDocument.body,e=(t.ownerDocument.defaultView&&e.contains(t)||o.warn("The element supplied is not included in the DOM"),!0===(i=i||{}).restoreEl&&(i.restoreEl=(t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player")?t.parentNode:t).cloneNode(!0)),B("beforesetup").forEach(e=>{e=e(t,d(i));!Y(e)||Array.isArray(e)?o.error("please return an object in beforesetup hooks"):i=d(i,e)}),g.getComponent("Player"));r=new e(t,i,s),B("setup").forEach(e=>e(r))}return r}E.hooks_=U,E.hooks=B,E.hook=function(e,t){B(e,t)},E.hookOnce=function(s,e){B(s,[].concat(e).map(t=>{let i=(...e)=>(F(s,i),t(...e));return i}))},E.removeHook=F,!0!==window.VIDEOJS_NO_DYNAMIC_STYLE&&Ee()&&!(e=Ye(".vjs-styles-defaults"))&&(e=at("vjs-styles-defaults"),(Qr=Ye("head"))&&Qr.insertBefore(e,Qr.firstChild),ot(e,` + `)}}loadTech_(e,t){this.tech_&&this.unloadTech_();var i=m(e),s=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(v.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let r=this.autoplay(),n={source:t,autoplay:r="string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay?!1:r,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+`_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};a.names.forEach(e=>{e=a[e];n[e.getterName]=this[e.privateName]}),Object.assign(n,this.options_[i]),Object.assign(n,this.options_[s]),Object.assign(n,this.options_[e.toLowerCase()]),this.tag&&(n.tag=this.tag),t&&t.src===this.cache_.src&&0{this.on(this.tech_,t,e=>this[`handleTech${m(t)}_`](e))}),Object.keys(Tn).forEach(t=>{this.on(this.tech_,t,e=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${Tn[t]}_`].bind(this),event:e}):this[`handleTech${Tn[t]}_`](e)})}),this.on(this.tech_,"loadstart",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,"sourceset",e=>this.handleTechSourceset_(e)),this.on(this.tech_,"waiting",e=>this.handleTechWaiting_(e)),this.on(this.tech_,"ended",e=>this.handleTechEnded_(e)),this.on(this.tech_,"seeking",e=>this.handleTechSeeking_(e)),this.on(this.tech_,"play",e=>this.handleTechPlay_(e)),this.on(this.tech_,"pause",e=>this.handleTechPause_(e)),this.on(this.tech_,"durationchange",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,"fullscreenchange",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,"fullscreenerror",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,"enterpictureinpicture",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,"leavepictureinpicture",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,"error",e=>this.handleTechError_(e)),this.on(this.tech_,"posterchange",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,"textdata",e=>this.handleTechTextData_(e)),this.on(this.tech_,"ratechange",e=>this.handleTechRateChange_(e)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||Ae(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){a.names.forEach(e=>{e=a[e];this[e.privateName]=this[e.getterName]()}),this.textTracksJson_=Jt(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&o.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_}version(){return{"video.js":M}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()&&this.hasStarted(!1),this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(t){if(this.tech_&&"string"==typeof t){var i=()=>{let e=this.muted(),t=(this.muted(!0),()=>{this.muted(e)});this.playTerminatedQueue_.push(t);var i=this.play();if(Xt(i))return i.catch(e=>{throw t(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))})};let e;if("any"!==t||this.muted()?e="muted"!==t||this.muted()?this.play():i():Xt(e=this.play())&&(e=e.catch(i)),Xt(e))return e.then(()=>{this.trigger({type:"autoplay-success",autoplay:t})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:t})})}}updateSourceCaches_(e=""){let t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;var s=e.$$("source");for(let e=0;ee.src&&e.src===t),s=[],r=this.$$("source"),n=[];for(let e=0;ethis.updateSourceCaches_(e);var i=this.currentSource().src,s=t.src;(e=!i||/^blob:/.test(i)||!/^blob:/.test(s)||this.lastSource_&&(this.lastSource_.tech===s||this.lastSource_.player===i)?e:()=>{})(s),t.src||this.tech_.any(["sourceset","loadstart"],e=>{"sourceset"!==e.type&&(e=this.techGet_("currentSrc"),this.lastSource_.tech=e,this.updateSourceCaches_(e))})}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){0e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");let e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){!this.controls_||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Kt(this.play()):this.pause())}handleTechDoubleClick_(t){!this.controls_||Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),e=>e.contains(t.target))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,t):this.isInPictureInPicture()&&!document.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(t){t=t.target.player;if(!t||t===this){t=this.el();let e=document[this.fsApi_.fullscreenElement]===t;!e&&t.matches&&(e=t.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(e)}}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){var e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=1{this.play_(e)})}play_(e=Kt){this.playCallbacks_.push(e);var t,e=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Te||u);this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),this.isReady_&&e?(t=this.techGet_("play"),i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===t?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(t)):(this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!e&&i&&this.load())}runPlayTerminatedQueue_(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})}runPlayCallbacks_(t){var e=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],e.forEach(function(e){e(t)})}pause(){this.techCall_("pause")}paused(){return!1!==this.techGet_("paused")}played(){return this.techGet_("played")||jt(0,0)}scrubbing(e){if("undefined"==typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(void 0===e)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=(e=parseFloat(e))<0?1/0:e)!==this.cache_.duration&&((this.cache_.duration=e)===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return e=e&&e.length?e:jt(0,0)}seekable(){let e=this.techGet_("seekable");return e=e&&e.length?e:jt(0,0)}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return Gt(this.buffered(),this.duration())}bufferedEnd(){var e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i=i>t?t:i}volume(e){let t;if(void 0===e)return t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t;t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),0{function s(){o.off("fullscreenerror",r),o.off("fullscreenchange",t)}function t(){s(),e()}function r(e,t){s(),i(t)}o.one("fullscreenchange",t),o.one("fullscreenerror",r);var n=o.requestFullscreenHelper_(a);n&&(n.then(s,s),n.then(e,i))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen)return(e=this.el_[this.fsApi_.requestFullscreen](t))&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e;this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){let a=this;return new Promise((e,i)=>{function s(){a.off("fullscreenerror",r),a.off("fullscreenchange",t)}function t(){s(),e()}function r(e,t){s(),i(t)}a.one("fullscreenchange",t),a.one("fullscreenerror",r);var n=a.exitFullscreenHelper_();n&&(n.then(s,s),n.then(e,i))})}exitFullscreenHelper_(){var e;if(this.fsApi_.requestFullscreen)return(e=document[this.fsApi_.exitFullscreen]())&&Kt(e.then(()=>this.isFullscreen(!1))),e;this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=document.documentElement.style.overflow,mt(document,"keydown",this.boundFullWindowOnEscKey_),document.documentElement.style.overflow="hidden",Pe(document.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){"Escape"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,c(document,"keydown",this.boundFullWindowOnEscKey_),document.documentElement.style.overflow=this.docOrigOverflow,Le(document.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(void 0===e)return!!this.isInPictureInPicture_;this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_()}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&window.documentPictureInPicture){let t=document.createElement(this.el().tagName);return t.classList=this.el().classList,t.classList.add("vjs-pip-container"),this.posterImage&&t.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&t.appendChild(this.titleBar.el().cloneNode(!0)),t.appendChild(l("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),window.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(e=>(Ze(e),this.el_.parentNode.insertBefore(t,this.el_),e.document.body.appendChild(this.el_),e.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:e}),e.addEventListener("pagehide",e=>{e=e.target.querySelector(".video-js");t.parentNode.replaceChild(e,t),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),e))}return"pictureInPictureEnabled"in document&&!1===this.disablePictureInPicture()?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){return window.documentPictureInPicture&&window.documentPictureInPicture.window?(window.documentPictureInPicture.window.close(),Promise.resolve()):"pictureInPictureEnabled"in document?document.exitPictureInPicture():void 0}handleKeyDown(e){var t,i,s=this.options_.userActions;s&&s.hotkeys&&(t=this.el_.ownerDocument.activeElement,i=t.tagName.toLowerCase(),t.isContentEditable||("input"===i?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type):-1!==["textarea"].indexOf(i))||("function"==typeof s.hotkeys?s.hotkeys.call(this,e):this.handleHotkeys(e)))}handleHotkeys(t){var{fullscreenKey:e=e=>"f"===t.key.toLowerCase(),muteKey:i=e=>"m"===t.key.toLowerCase(),playPauseKey:s=e=>"k"===t.key.toLowerCase()||" "===t.key.toLowerCase()}=this.options_.userActions?this.options_.userActions.hotkeys:{};e.call(this,t)?(t.preventDefault(),t.stopPropagation(),e=g.getComponent("FullscreenToggle"),!1!==document[this.fsApi_.fullscreenEnabled]&&e.prototype.handleClick.call(this,t)):i.call(this,t)?(t.preventDefault(),t.stopPropagation(),g.getComponent("MuteToggle").prototype.handleClick.call(this,t)):s.call(this,t)&&(t.preventDefault(),t.stopPropagation(),g.getComponent("PlayToggle").prototype.handleClick.call(this,t))}canPlayType(s){var r;for(let t=0,i=this.options_.techOrder;ti.some(e=>{if(r=s(t,e))return!0})),r}var i=this.options_.techOrder.map(e=>[e,v.getTech(e)]).filter(([e,t])=>t?t.isSupported():(o.error(`The "${e}" tech is undefined. Skipped browser support check for that tech.`),!1));let s;var r,n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};return(s=this.options_.sourceOrder?t(e,i,(r=n,(e,t)=>r(t,e))):t(i,e,n))||!1}handleSrc_(e,s){if("undefined"==typeof e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();let r=Ds(e);if(r.length){if(this.changingSrc_=!0,s||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),ws(this,r[0],(e,t)=>{var i;if(this.middleware_=t,s||(this.cache_.sources=r),this.updateSourceCaches_(e),this.src_(e))return 1e.setTech&&e.setTech(i))}),1{this.error(null),this.handleSrc_(r.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)}src(e){return this.handleSrc_(e,!1)}src_(e){var t=this.selectSource([e]);return!t||(Ut(t.tech,this.techName_)?this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1})),!1)}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")}reset(){this.paused()?this.doReset_():Kt(this.play().then(()=>this.doReset_()))}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Ct(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);var{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},i=(i||{}).seekBar;e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),i&&(i.update(),i.loadProgressBar)&&i.loadProgressBar.update()}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(void 0===e)return this.techGet_("preload");this.techCall_("setPreload",e),this.options_.preload=e}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t="undefined"==typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return void 0!==e&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(void 0===e)return this.techGet_("loop");this.techCall_("setLoop",e),this.options_.loop=e}poster(e){if(void 0===e)return this.poster_;(e=e||"")!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){var e;(!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster&&(e=this.tech_.poster()||"")!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}controls(e){if(void 0===e)return!!this.controls_;this.controls_!==(e=!!e)&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;this.usingNativeControls_!==(e=!!e)&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(t){if(void 0===t)return this.error_||null;if(B("beforeerror").forEach(e=>{e=e(this,t);Y(e)&&!Array.isArray(e)||"string"==typeof e||"number"==typeof e||null===e?t=e:this.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&t&&4===t.code){let e=function(){this.error(t)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],e),void this.one("loadstart",function(){this.off(["click","touchstart"],e)})}else null===t?(this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close()):(this.error_=new i(t),this.addClass("vjs-error"),o.error(`(CODE:${this.error_.code} ${i.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),B("error").forEach(e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;(e=!!e)!==this.userActive_&&(this.userActive_=e,this.userActive_?(this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")))}listenForUserActivity_(){let t,i,s,r=p(this,this.reportUserActivity);function e(e){r(),this.clearInterval(t)}this.on("mousedown",function(){r(),this.clearInterval(t),t=this.setInterval(r,250)}),this.on("mousemove",function(e){e.screenX===i&&e.screenY===s||(i=e.screenX,s=e.screenY,r())}),this.on("mouseup",e),this.on("mouseleave",e);var n=this.getChild("controlBar");!n||u||se||(n.on("mouseenter",function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),n.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",r),this.on("keyup",r);let a;this.setInterval(function(){var e;this.userActivity_&&(this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a),(e=this.options_.inactivityTimeout)<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e)))},250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){var e=this.getChild("ControlBar");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");var e=this.children();let t=this.getChild("ControlBar");var i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){return"boolean"!=typeof e||e===this.audioOnlyMode_?this.audioOnlyMode_:(this.audioOnlyMode_=e)?(e=[],this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())):Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return"boolean"!=typeof e||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e)?(this.audioOnlyMode()?this.audioOnlyMode(!1):Promise.resolve()).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let t=e.track;if(t=t||e,this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Ct(this))&&this.trigger("languagechange")}languages(){return d(T.prototype.options_.languages,this.languages_)}toJSON(){var t=d(this.options_),i=t.tracks;t.tracks=[];for(let e=0;e{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(this.responsive()){var t=this.currentBreakpoint(),i=this.currentWidth();for(let e=0;ethis.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:l,description:r||e||""}),this.ready(t))}getMedia(){var e,t;return this.cache_.media?d(this.cache_.media):(e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src}))},e&&(t.poster=e,t.artwork=[{src:t.poster,type:Ls(t.poster)}]),t)}static getTagSettings(e){var i={sources:[],tracks:[]},t=Ne(e),s=t["data-setup"];if(De(e,"vjs-fill")&&(t.fill=!0),De(e,"vjs-fluid")&&(t.fluid=!0),null!==s)try{Object.assign(t,JSON.parse(s||"{}"))}catch(e){o.error("data-setup",e)}if(Object.assign(i,t),e.hasChildNodes()){var r=e.childNodes;for(let e=0,t=r.length;e"number"==typeof e)&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}T.prototype.videoTracks=()=>{},T.prototype.audioTracks=()=>{},T.prototype.textTracks=()=>{},T.prototype.remoteTextTracks=()=>{},T.prototype.remoteTextTrackEls=()=>{},a.names.forEach(function(e){let t=a[e];T.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),T.prototype.crossorigin=T.prototype.crossOrigin,T.players={};Zr=window.navigator;T.prototype.options_={techOrder:v.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Zr&&(Zr.languages&&Zr.languages[0]||Zr.userLanguage||Zr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},bn.forEach(function(e){T.prototype[`handleTech${m(e)}_`]=function(){return this.trigger(e)}}),g.registerComponent("Player",T);function Cn(t,i){function s(){Ln(this,{name:t,plugin:i,instance:null},!0);var e=i.apply(this,arguments);return Pn(this,t),Ln(this,{name:t,plugin:i,instance:e}),e}return Object.keys(i).forEach(function(e){s[e]=i[e]}),s}let kn="plugin",In="activePlugins_",xn={},An=e=>xn.hasOwnProperty(e),Dn=e=>An(e)?xn[e]:void 0,Pn=(e,t)=>{e[In]=e[In]||{},e[In][t]=!0},Ln=(e,t,i)=>{i=(i?"before":"")+"pluginsetup";e.trigger(i,t),e.trigger(i+":"+t.name,t)},On=(i,s)=>(s.prototype.name=i,function(...e){Ln(this,{name:i,plugin:s,instance:null},!0);let t=new s(this,...e);return this[i]=()=>t,Ln(this,t.getEventHash()),t});class Rn{constructor(e){if(this.constructor===Rn)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Ot(this),delete this.trigger,Nt(this,this.constructor.defaultState),Pn(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return gt(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){var{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[In][e]=!1,this.player=this.state=null,t[e]=On(e,xn[e])}static isBasic(e){e="string"==typeof e?Dn(e):e;return"function"==typeof e&&!Rn.prototype.isPrototypeOf(e.prototype)}static registerPlugin(e,t){if("string"!=typeof e)throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(An(e))o.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(T.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if("function"!=typeof t)throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return xn[e]=t,e!==kn&&(Rn.isBasic(t)?T.prototype[e]=Cn(e,t):T.prototype[e]=On(e,t)),t}static deregisterPlugin(e){if(e===kn)throw new Error("Cannot de-register base plugin.");An(e)&&(delete xn[e],delete T.prototype[e])}static getPlugins(e=Object.keys(xn)){let i;return e.forEach(e=>{var t=Dn(e);t&&((i=i||{})[e]=t)}),i}static getPluginVersion(e){e=Dn(e);return e&&e.VERSION||""}}function Nn(e,i,s,r){{var n=i+` is deprecated and will be removed in ${e}.0; please use ${s} instead.`,a=r;let t=!1;return function(...e){return t||o.warn(n),t=!0,a.apply(this,e)}}}Rn.getPlugin=Dn,Rn.BASE_PLUGIN_NAME=kn,Rn.registerPlugin(kn,Rn),T.prototype.usingPlugin=function(e){return!!this[In]&&!0===this[In][e]},T.prototype.hasPlugin=function(e){return!!An(e)};let Mn=e=>0===e.indexOf("#")?e.slice(1):e;function E(e,i,s){let r=E.getPlayer(e);if(r)i&&o.warn(`Player "${e}" is already initialised. Options will not be applied.`),s&&r.ready(s);else{let t="string"==typeof e?Ye("#"+Mn(e)):e;if(!Ce(t))throw new TypeError("The element or ID supplied is not valid. (videojs)");e="getRootNode"in t&&t.getRootNode()instanceof window.ShadowRoot?t.getRootNode():t.ownerDocument.body,e=(t.ownerDocument.defaultView&&e.contains(t)||o.warn("The element supplied is not included in the DOM"),!0===(i=i||{}).restoreEl&&(i.restoreEl=(t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player")?t.parentNode:t).cloneNode(!0)),B("beforesetup").forEach(e=>{e=e(t,d(i));!Y(e)||Array.isArray(e)?o.error("please return an object in beforesetup hooks"):i=d(i,e)}),g.getComponent("Player"));r=new e(t,i,s),B("setup").forEach(e=>e(r))}return r}E.hooks_=U,E.hooks=B,E.hook=function(e,t){B(e,t)},E.hookOnce=function(s,e){B(s,[].concat(e).map(t=>{let i=(...e)=>(F(s,i),t(...e));return i}))},E.removeHook=F,!0!==window.VIDEOJS_NO_DYNAMIC_STYLE&&Ee()&&!(e=Ye(".vjs-styles-defaults"))&&(e=at("vjs-styles-defaults"),(Jr=Ye("head"))&&Jr.insertBefore(e,Jr.firstChild),ot(e,` .video-js { width: 300px; height: 150px; @@ -27,27 +27,27 @@ .vjs-fluid:not(.vjs-audio-only-mode) { padding-top: 56.25% } - `)),rt(1,E),E.VERSION=M,E.options=T.prototype.options_,E.getPlayers=()=>T.players,E.getPlayer=e=>{var t=T.players;let i;if("string"==typeof e){var s=Nn(e),r=t[s];if(r)return r;i=Ye("#"+s)}else i=e;if(Ce(i)){var{player:r,playerId:s}=i;if(r||t[s])return r||t[s]}},E.getAllPlayers=()=>Object.keys(T.players).map(e=>T.players[e]).filter(Boolean),E.players=T.players,E.getComponent=g.getComponent,E.registerComponent=(e,t)=>(v.isTech(t)&&o.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),g.registerComponent.call(g,e,t)),E.getTech=v.getTech,E.registerTech=v.registerTech,E.use=function(e,t){vs[e]=vs[e]||[],vs[e].push(t)},Object.defineProperty(E,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(E.middleware,"TERMINATOR",{value:Ts,writeable:!1,enumerable:!0}),E.browser=Se,E.obj=ee,E.mergeOptions=Rn(9,"videojs.mergeOptions","videojs.obj.merge",d),E.defineLazyProperty=Rn(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Z),E.bind=Rn(9,"videojs.bind","native Function.prototype.bind",p),E.registerPlugin=On.registerPlugin,E.deregisterPlugin=On.deregisterPlugin,E.plugin=(e,t)=>(o.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),On.registerPlugin(e,t)),E.getPlugins=On.getPlugins,E.getPlugin=On.getPlugin,E.getPluginVersion=On.getPluginVersion,E.addLanguage=function(e,t){return e=(""+e).toLowerCase(),E.options.languages=d(E.options.languages,{[e]:t}),E.options.languages[e]},E.log=o,E.createLogger=W,E.time=t,E.createTimeRange=Rn(9,"videojs.createTimeRange","videojs.time.createTimeRanges",jt),E.createTimeRanges=Rn(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",jt),E.formatTime=Rn(9,"videojs.formatTime","videojs.time.formatTime",Wt),E.setFormatTime=Rn(9,"videojs.setFormatTime","videojs.time.setFormatTime",zt),E.resetFormatTime=Rn(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",$t),E.parseUrl=Rn(9,"videojs.parseUrl","videojs.url.parseUrl",mi),E.isCrossOrigin=Rn(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",fi),E.EventTarget=wt,E.any=yt,E.on=mt,E.one=ft,E.off=c,E.trigger=gt,E.xhr=Di,E.TextTrack=Bi,E.AudioTrack=Fi,E.VideoTrack=qi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(e=>{E[e]=function(){return o.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),et[e].apply(null,arguments)}}),E.computedStyle=Rn(9,"videojs.computedStyle","videojs.dom.computedStyle",Je),E.dom=et,E.fn=Tt,E.num=zi,E.str=Bt,E.url=_i,E.Error={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"},bi(function(e,t){ - /*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */ - e.exports=function(e){function t(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var i=t(e);class s{constructor(e){let t=this;t.id=e.id;t.label=t.id;t.width=e.width;t.height=e.height;t.bitrate=e.bandwidth;t.frameRate=e.frameRate;t.enabled_=e.enabled;Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(e){t.enabled_(e)}});return t}}class n extends i["default"].EventTarget{constructor(){super();let e=this;e.levels_=[];e.selectedIndex_=-1;Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}});Object.defineProperty(e,"length",{get(){return e.levels_.length}});e[Symbol.iterator]=()=>e.levels_.values();return e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;t=new s(e);if(!(""+i in this))Object.defineProperty(this,i,{get(){return this.levels_[i]}});this.levels_.push(t);this.trigger({qualityLevel:t,type:"addqualitylevel"});return t}removeQualityLevel(i){let s=null;for(let e=0,t=this.length;ee)this.selectedIndex_--;break}if(s)this.trigger({qualityLevel:i,type:"removequalitylevel"});return s}getQualityLevelById(i){for(let e=0,t=this.length;es;e.qualityLevels.VERSION=a;return s},o=function(e){return r(this,i["default"].obj.merge({},e))};return i["default"].registerPlugin("qualityLevels",o),o.VERSION=a,o}(E)});function Mn(e){return window.atob?window.atob(e):Buffer.from(e,"base64").toString("binary")}var Un="https://example.com",Bn=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=window.location&&window.location.href||"");var i=/^\/\//.test(e),s=!window.location&&!/\/\//i.test(e),t=(e=new window.URL(e,window.location||Un),new URL(t,e));return s?t.href.slice(Un.length):i?t.href.slice(t.protocol.length):t.href},Yr=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){return!!this.listeners[e]&&(t=this.listeners[e].indexOf(t),this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(t,1),-1{var e=e.split("x"),t={};return e[0]&&(t.width=parseInt(e[0],10)),e[1]&&(t.height=parseInt(e[1],10)),t};class $n extends Yr{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(i){let a,o;0!==(i=i.trim()).length&&("#"!==i[0]?this.trigger("data",{type:"uri",uri:i}):this.tagMappers.reduce((e,t)=>{t=t(i);return t===i?e:e.concat([t])},[i]).forEach(t=>{for(let e=0;ee),this.customParsers.push(e=>{if(t.exec(e))return this.trigger("data",{type:"custom",data:s(e),customType:i,segment:r}),!0})}addTagMapper({expression:t,map:i}){this.tagMappers.push(e=>t.test(e)?i(e):e)}}function Wn(t){let i={};return Object.keys(t).forEach(function(e){i[e.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase())]=t[e]}),i}function Gn(e){var t,i,s,r,n,{serverControl:e,targetDuration:a,partTargetDuration:o}=e;e&&(t="#EXT-X-SERVER-CONTROL",i="holdBack",s="partHoldBack",r=a&&3*a,n=o&&2*o,a&&!e.hasOwnProperty(i)&&(e[i]=r,this.trigger("info",{message:t+` defaulting HOLD-BACK to targetDuration * 3 (${r}).`})),r&&e[i]{o.uri||!o.parts&&!o.preloadHints||(!o.map&&l&&(o.map=l),!o.key&&d&&(o.key=d),o.timeline||"number"!=typeof c||(o.timeline=c),this.manifest.preloadSegment=o)}),this.parseStream.on("data",function(n){let t,i;if(r.manifest.definitions)for(var e in r.manifest.definitions)if(n.uri&&(n.uri=n.uri.replace(`{$${e}}`,r.manifest.definitions[e])),n.attributes)for(var s in n.attributes)"string"==typeof n.attributes[s]&&(n.attributes[s]=n.attributes[s].replace(`{$${e}}`,r.manifest.definitions[e]));({tag(){({version(){n.version&&(this.manifest.version=n.version)},"allow-cache"(){this.manifest.allowCache=n.allowed,"allowed"in n||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){var e={};"length"in n&&((o.byterange=e).length=n.length,"offset"in n||(n.offset=p)),"offset"in n&&((o.byterange=e).offset=n.offset),p=e.offset+e.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),n.title&&(o.title=n.title),0(t.programDateTime=e-1e3*t.duration,t.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(n.duration)||n.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+n.duration}):(this.manifest.targetDuration=n.duration,Gn.call(this,this.manifest))},start(){!n.attributes||isNaN(n.attributes["TIME-OFFSET"])?this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"}):this.manifest.start={timeOffset:n.attributes["TIME-OFFSET"],precise:n.attributes.PRECISE}},"cue-out"(){o.cueOut=n.data},"cue-out-cont"(){o.cueOutCont=n.data},"cue-in"(){o.cueIn=n.data},skip(){this.manifest.skip=Wn(n.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",n.attributes,["SKIPPED-SEGMENTS"])},part(){h=!0;var e=this.manifest.segments.length,t=Wn(n.attributes),t=(o.parts=o.parts||[],o.parts.push(t),t.byterange&&(t.byterange.hasOwnProperty("offset")||(t.byterange.offset=m),m=t.byterange.offset+t.byterange.length),o.parts.length-1);this.warnOnMissingAttributes_(`#EXT-X-PART #${t} for segment #`+e,n.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},"server-control"(){var e=this.manifest.serverControl=Wn(n.attributes);e.hasOwnProperty("canBlockReload")||(e.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Gn.call(this,this.manifest),e.canSkipDateranges&&!e.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){var t=this.manifest.segments.length,i=Wn(n.attributes),e=i.type&&"PART"===i.type,s=(o.preloadHints=o.preloadHints||[],o.preloadHints.push(i),!i.byterange||i.byterange.hasOwnProperty("offset")||(i.byterange.offset=e?m:0,e&&(m=i.byterange.offset+i.byterange.length)),o.preloadHints.length-1);if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${s} for segment #`+t,n.attributes,["TYPE","URI"]),i.type)for(let e=0;ee.id===t.id);this.manifest.dateRanges[e]=f(this.manifest.dateRanges[e],t),g[t.id]=f(g[t.id],t),this.manifest.dateRanges.pop()}else g[t.id]=t},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=Wn(n.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",n.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};var e,t=(e,t)=>{e in this.manifest.definitions?this.trigger("error",{message:"EXT-X-DEFINE: Duplicate name "+e}):this.manifest.definitions[e]=t};return"QUERYPARAM"in n.attributes?"NAME"in n.attributes||"IMPORT"in n.attributes?void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"}):(e=this.params.get(n.attributes.QUERYPARAM))?void t(n.attributes.QUERYPARAM,decodeURIComponent(e)):void this.trigger("error",{message:"EXT-X-DEFINE: No query param "+n.attributes.QUERYPARAM}):"NAME"in n.attributes?"IMPORT"in n.attributes?void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"}):"VALUE"in n.attributes&&"string"==typeof n.attributes.VALUE?void t(n.attributes.NAME,n.attributes.VALUE):void this.trigger("error",{message:"EXT-X-DEFINE: No value for "+n.attributes.NAME}):"IMPORT"in n.attributes?this.mainDefinitions[n.attributes.IMPORT]?void t(n.attributes.IMPORT,this.mainDefinitions[n.attributes.IMPORT]):void this.trigger("error",{message:`EXT-X-DEFINE: No value ${n.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:n.attributes,uri:n.uri,timeline:c}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",n.attributes,["BANDWIDTH","URI"])}}[n.tagType]||function(){}).call(r)},uri(){o.uri=n.uri,a.push(o),!this.manifest.targetDuration||"duration"in o||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),d&&(o.key=d),o.timeline=c,l&&(o.map=l),m=0,null!==this.lastProgramDateTime&&(o.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*o.duration),o={}},comment(){},custom(){n.segment?(o.custom=o.custom||{},o.custom[n.customType]=n.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[n.customType]=n.data)}})[n.type].call(r)})}requiredCompatibilityversion(e,t){(e=e.length&&t.call(e,function(e,t){return e===(n[t]?n[t]&i[r+t]:i[r+t])})},ya=function(r,e,n){e.forEach(function(e){for(var t in r.mediaGroups[e])for(var i in r.mediaGroups[e][t]){var s=r.mediaGroups[e][t][i];n(s,e,t,i)}})};function _a(e,t){return(t=void 0===t?Object:t)&&"function"==typeof t.freeze?t.freeze(e):e}var va=_a({HTML:"text/html",isHTML:function(e){return e===va.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),ba=_a({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===ba.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"}),Ta={assign:function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},find:function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"==typeof i.find)return i.find.call(e,t);for(var s=0;s"==e&&">")||("&"==e?"&":'"'==e&&""")||"&#"+e.charCodeAt()+";"}function qa(e,t){if(t(e))return 1;if(e=e.firstChild)do{if(qa(e,t))return 1}while(e=e.nextSibling)}function ja(){this.ownerDocument=this}function Ha(e,t,i){e&&e._inc++,i.namespaceURI===wa.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function Va(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var r=t.firstChild,n=0;r;)r=(s[n++]=r).nextSibling;s.length=n,delete s[s.length]}}}function za(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,Va(e.ownerDocument,e),t}function $a(e){return e&&e.nodeType===x.DOCUMENT_TYPE_NODE}function Wa(e){return e&&e.nodeType===x.ELEMENT_NODE}function Ga(e){return e&&e.nodeType===x.TEXT_NODE}function Xa(e,t){var i,e=e.childNodes||[];if(!Sa(e,Wa)&&!$a(t))return i=Sa(e,$a),!(t&&i&&e.indexOf(i)>e.indexOf(t))}function Ka(e,t){var i,e=e.childNodes||[];if(!Sa(e,function(e){return Wa(e)&&e!==t}))return i=Sa(e,$a),!(t&&i&&e.indexOf(i)>e.indexOf(t))}function Ya(e,t,i){if(!(s=e)||s.nodeType!==x.DOCUMENT_NODE&&s.nodeType!==x.DOCUMENT_FRAGMENT_NODE&&s.nodeType!==x.ELEMENT_NODE)throw new I(Aa,"Unexpected parent node type "+e.nodeType);var s;if(i&&i.parentNode!==e)throw new I(Da,"child not in parent");if(!(s=t)||!(Wa(s)||Ga(s)||$a(s)||s.nodeType===x.DOCUMENT_FRAGMENT_NODE||s.nodeType===x.COMMENT_NODE||s.nodeType===x.PROCESSING_INSTRUCTION_NODE)||$a(t)&&e.nodeType!==x.DOCUMENT_NODE)throw new I(Aa,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Qa(e,t,i){var s=e.childNodes||[],r=t.childNodes||[];if(t.nodeType===x.DOCUMENT_FRAGMENT_NODE){var n=r.filter(Wa);if(1"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):yo(o,t,i,s,r.slice()),o=o.nextSibling;else for(;o;)yo(o,t,i,s,r.slice()),o=o.nextSibling;t.push("")}else t.push("/>");return;case 9:case 11:for(o=e.firstChild;o;)yo(o,t,i,s,r.slice()),o=o.nextSibling;return;case 2:return fo(t,e.name,e.value);case 3:return t.push(e.data.replace(/[<&>]/g,Fa));case 4:return t.push("");case 8:return t.push("\x3c!--",e.data,"--\x3e");case 10:var _=e.publicId,v=e.systemId;return t.push("")):v&&"."!=v?t.push(" SYSTEM ",v,">"):((_=e.internalSubset)&&t.push(" [",_,"]"),t.push(">")));case 7:return t.push("");case 5:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function _o(e,t,i){e[t]=i}r.INVALID_STATE_ERR=(k[11]="Invalid state",11),r.SYNTAX_ERR=(k[12]="Syntax error",12),r.INVALID_MODIFICATION_ERR=(k[13]="Invalid modification",13),r.NAMESPACE_ERR=(k[14]="Invalid namespace",14),r.INVALID_ACCESS_ERR=(k[15]="Invalid access",15),I.prototype=Error.prototype,Ia(r,I),Pa.prototype={length:0,item:function(e){return 0<=e&&e",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES}),bo=(vo.XML_ENTITIES,Ta.NAMESPACE),tn=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,en=new RegExp("[\\-\\.0-9"+tn.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),To=new RegExp("^"+tn.source+en.source+"*(?::"+tn.source+en.source+"*)?$"),So=0,wo=1,Eo=2,Co=3,ko=4,Io=5,xo=6,Ao=7;function Do(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Do)}function Po(){}function Lo(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function Oo(e,t,i){for(var s=e.tagName,r=null,n=e.length;n--;){var a=e[n],o=a.qName,l=a.value,o=0<(h=o.indexOf(":"))?(d=a.prefix=o.slice(0,h),u=o.slice(h+1),"xmlns"===d&&u):(d=null,"xmlns"===(u=o)&&"");a.localName=u,!1!==o&&(null==r&&(r={},Ro(i,i={})),i[o]=r[o]=l,a.uri=bo.XMLNS,t.startPrefixMapping(o,l))}for(var d,n=e.length;n--;)(d=(a=e[n]).prefix)&&("xml"===d&&(a.uri=bo.XML),"xmlns"!==d)&&(a.uri=i[d||""]);var h,u=0<(h=s.indexOf(":"))?(d=e.prefix=s.slice(0,h),e.localName=s.slice(h+1)):(d=null,e.localName=s),c=e.uri=i[d||""];if(t.startElement(c,u,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=r,1;if(t.endElement(c,u,s),r)for(d in r)Object.prototype.hasOwnProperty.call(r,d)&&t.endPrefixMapping(d)}function Ro(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function No(){this.attributeNames={}}(Do.prototype=new Error).name=Do.name,Po.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),Ro(t,t={}),function(i,e,s,r,n){function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(s,t)?s[t]:"#"===t.charAt(0)?65535<(t=parseInt(t.substr(1).replace("x","0x")))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):String.fromCharCode(t):(n.error("entity not found:"+e),e)}function t(e){var t;m",y+3),v=i.substring(y+2,_).replace(/[ \t\n\r]+$/g,""),b=c.pop(),T=(_<0?(v=i.substring(y+2).replace(/[\s<].*/,""),n.error("end tag name: "+v+" is not complete:"+b.tagName),_=y+1+v.length):v.match(/\s",t);if(s){e=e.substring(t,s).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(e)return e[0].length,i.processingInstruction(e[1],e[2]),s+2}return-1}(i,y,r);break;case"!":u&&o(y),_=function(e,t,i,s){{if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(n=e.indexOf("--\x3e",t+4),t",t+9),i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3;var r,s=function(e,t){var i,s=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;i=r.exec(e);)if(s.push(i),i[1])return s}(e,t),n=s.length;if(1":switch(d){case So:s.setTagName(e.slice(t,l));case Io:case xo:case Ao:break;case ko:case wo:"/"===(u=e.slice(t,l)).slice(-1)&&(s.closed=!0,u=u.slice(0,-1));case Eo:d===Eo&&(u=o),d==ko?(n.warning('attribute "'+u+'" missed quot(")!'),a(o,u,t)):(bo.isHTML(i[""])&&u.match(/^(?:disabled|checked|selected)$/i)||n.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),a(u,u,t));break;case Co:throw new Error("attribute value missed!!")}return l;case"€":h=" ";default:if(h<=" ")switch(d){case So:s.setTagName(e.slice(t,l)),d=xo;break;case wo:o=e.slice(t,l),d=Eo;break;case ko:var u=e.slice(t,l);n.warning('attribute "'+u+'" missed quot(")!!'),a(o,u,t);case Io:d=xo}else switch(d){case Eo:s.tagName,bo.isHTML(i[""])&&o.match(/^(?:disabled|checked|selected)$/i)||n.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),a(o,o,t),t=l,d=wo;break;case Io:n.warning('attribute space is required"'+o+'"!!');case xo:d=wo,t=l;break;case Co:d=ko,t=l;break;case Ao:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}(i,y,E,C,a,n),k=E.length;if(!E.closed&&function(e,t,i,s){var r=s[i];null==r&&((r=e.lastIndexOf(""))",t),e=e.substring(t+1,n);if(/[&<]/.test(e))return/^script$/i.test(i)?r.characters(e,0,e.length):(e=e.replace(/&#?\w+;/g,s),r.characters(e,0,e.length)),n}return t+1}(i,_,E.tagName,a,r):_++}}catch(e){if(e instanceof Do)throw e;n.error("element parse error: "+e),_=-1}m<_?m=_:t(Math.max(y,m)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},No.prototype={setTagName:function(e){if(!To.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!To.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};var Zr={XMLReader:Po,ParseError:Do},Mo=Kr.DOMImplementation,Uo=Ta.NAMESPACE,Bo=Zr.ParseError,Fo=Zr.XMLReader;function qo(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function jo(e){this.options=e||{locator:{}}}function Ho(){this.cdata=!1}function Vo(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function zo(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function $o(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function Wo(e,t){(e.currentElement||e.doc).appendChild(t)}jo.prototype.parseFromString=function(e,t){var i=this.options,s=new Fo,r=i.domBuilder||new Ho,n=i.errorHandler,a=i.locator,o=i.xmlns||{},t=/\/x?html?$/.test(t),l=t?vo.HTML_ENTITIES:vo.XML_ENTITIES,n=(a&&r.setDocumentLocator(a),s.errorHandler=function(s,e,r){if(!s){if(e instanceof Ho)return e;s=e}var n={},a=s instanceof Function;function t(t){var i=s[t];!i&&a&&(i=2==s.length?function(e){s(t,e)}:s),n[t]=i?function(e){i("[xmldom "+t+"]\t"+e+zo(r))}:function(){}}return r=r||{},t("warning"),t("error"),t("fatalError"),n}(n,r,a),s.domBuilder=i.domBuilder||r,t&&(o[""]=Uo.HTML),o.xml=o.xml||Uo.XML,i.normalizeLineEndings||qo);return e&&"string"==typeof e?s.parse(n(e),o,l):s.errorHandler.error("invalid doc source"),r.doc},Ho.prototype={startDocument:function(){this.doc=(new Mo).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var r=this.doc,n=r.createElementNS(e,i||t),a=s.length;Wo(this,n),this.currentElement=n,this.locator&&Vo(this.locator,n);for(var o=0;o!!e&&"object"==typeof e,A=(...e)=>e.reduce((t,i)=>("object"==typeof i&&Object.keys(i).forEach(e=>{Array.isArray(t[e])&&Array.isArray(i[e])?t[e]=t[e].concat(i[e]):Xo(t[e])&&Xo(i[e])?t[e]=A(t[e],i[e]):t[e]=i[e]}),t),{}),Ko=t=>Object.keys(t).map(e=>t[e]),Yo=(t,i)=>{var s=[];for(let e=t;ee.reduce((e,t)=>e.concat(t),[]),Jo=t=>{if(!t.length)return[];var i=[];for(let e=0;ee.reduce((e,t,i)=>(t[s]&&e.push(i),e),[]),el=(e,i)=>Ko(e.reduce((t,e)=>(e.forEach(e=>{t[i(e)]=e}),t),{}));var tl={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};let il=({baseUrl:s="",source:r="",range:n="",indexRange:a=""})=>{s={uri:r,resolvedUri:Bn(s||"",r)};if(n||a){r=(n||a).split("-");let e=window.BigInt?window.BigInt(r[0]):parseInt(r[0],10),t=window.BigInt?window.BigInt(r[1]):parseInt(r[1],10);e{let t;return t="bigint"==typeof e.offset||"bigint"==typeof e.length?window.BigInt(e.offset)+window.BigInt(e.length)-window.BigInt(1):e.offset+e.length-1,e.offset+"-"+t},rl=e=>(e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),nl={static(e){var{duration:t,timescale:i=1,sourceDuration:s,periodDuration:r}=e,e=rl(e.endNumber),t=t/i;return"number"==typeof e?{start:0,end:e}:"number"==typeof r?{start:0,end:r/t}:{start:0,end:s/t}},dynamic(e){var{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:r=1,duration:n,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,e=rl(e.endNumber),t=(t+i)/1e3,i=s+a,s=Math.ceil((t+o-i)*r/n),a=Math.floor((t-i-l)*r/n),o=Math.floor((t-i)*r/n);return{start:Math.max(0,a),end:"number"==typeof e?e:Math.min(s,o)}}},al=n=>e=>{var{duration:t,timescale:i=1,periodStart:s,startNumber:r=1}=n;return{number:r+e,duration:t/i,timeline:s,time:e*t}},ol=e=>{var{type:t,duration:i,timescale:s=1,periodDuration:r,sourceDuration:n}=e,{start:a,end:o}=nl[t](e),a=Yo(a,o).map(al(e));return"static"===t&&(a[o=a.length-1].duration=("number"==typeof r?r:n)-i/s*o),a},ll=e=>{var{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:r="",periodStart:n,presentationTime:a,number:o=0,duration:l}=e;if(t)return i=il({baseUrl:t,source:i.sourceURL,range:i.range}),(t=il({baseUrl:t,source:t,indexRange:r})).map=i,l?(r=ol(e)).length&&(t.duration=r[0].duration,t.timeline=r[0].timeline):s&&(t.duration=s,t.timeline=n),t.presentationTime=a||n,t.number=o,[t];throw new Error(tl.NO_BASE_URL)},dl=(e,i,s)=>{var r=e.sidx.map||null,n=e.sidx.duration,a=e.timeline||0,t=e.sidx.byterange,t=t.offset+t.length,o=i.timescale,l=i.references.filter(e=>1!==e.referenceType),d=[],h=e.endList?"static":"dynamic",u=e.sidx.timeline;let c=u,p=e.mediaSequence||0,m;m="bigint"==typeof i.firstOffset?window.BigInt(t)+i.firstOffset:t+i.firstOffset;for(let t=0;tel(e,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),pl=(t,i)=>{for(let e=0;e{let r=[];return ya(e,hl,(e,t,i,s)=>{r=r.concat(e.playlists||[])}),r},gl=({playlist:i,mediaSequence:e})=>{i.mediaSequence=e,i.segments.forEach((e,t)=>{e.number=i.mediaSequence+t})},fl=({oldPlaylists:t,newPlaylists:e,timelineStarts:r})=>{e.forEach(i=>{i.discontinuitySequence=r.findIndex(function({timeline:e}){return e===i.timeline});var e=pl(t,i.attributes.NAME);if(e&&!i.sidx){let t=i.segments[0];var s=e.segments.findIndex(function(e){return Math.abs(e.presentationTime-t.presentationTime)e.timeline||e.segments.length&&i.timeline>e.segments[e.segments.length-1].timeline)&&i.discontinuitySequence--):(e.segments[s].discontinuity&&!t.discontinuity&&(t.discontinuity=!0,i.discontinuityStarts.unshift(0),i.discontinuitySequence--),gl({playlist:i,mediaSequence:e.segments[s].number}))}})},yl=({oldManifest:e,newManifest:t})=>{var i=e.playlists.concat(ml(e)),s=t.playlists.concat(ml(t));return t.timelineStarts=cl([e.timelineStarts,t.timelineStarts]),fl({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},_l=e=>e&&e.uri+"-"+sl(e.byterange),vl=e=>{e=e.reduce(function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e},{});let t=[];return Object.values(e).forEach(e=>{e=Ko(e.reduce((e,t)=>{var i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));t=t.concat(e)}),t.map(e=>(e.discontinuityStarts=Zo(e.segments||[],"discontinuity"),e))},bl=(e,t)=>{var i=_l(e.sidx),t=i&&t[i]&&t[i].sidx;return t&&dl(e,t,e.sidx.resolvedUri),e},Tl=(e,t={})=>{if(Object.keys(t).length)for(var i in e)e[i]=bl(e[i],t);return e},Sl=({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:r,discontinuityStarts:n},a)=>{r={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:r,discontinuityStarts:n,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(r.contentProtection=e.contentProtection),e.serviceLocation&&(r.attributes.serviceLocation=e.serviceLocation),i&&(r.sidx=i),a&&(r.attributes.AUDIO="audio",r.attributes.SUBTITLES="subs"),r},wl=({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:r})=>{"undefined"==typeof t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);var n={NAME:e.id,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1},n=(e.codecs&&(n.CODECS=e.codecs),{attributes:n,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:r,mediaSequence:i,segments:t});return e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),n},El=(e,n={},a=!1)=>{let o;e=e.reduce((e,t)=>{var i=t.attributes.role&&t.attributes.role.value||"",s=t.attributes.lang||"";let r=t.attributes.label||"main";e[r=s&&!t.attributes.label?t.attributes.lang+(i?` (${i})`:""):r]||(e[r]={language:s,autoselect:!0,default:"main"===i,playlists:[],uri:""});s=bl(Sl(t,a),n);return e[r].playlists.push(s),"undefined"==typeof o&&"main"===i&&((o=t).default=!0),e},{});return o||(e[Object.keys(e)[0]].default=!0),e},Cl=(e,r={})=>e.reduce((e,t)=>{var i=t.attributes.label||t.attributes.lang||"text",s=t.attributes.lang||"und";return e[i]||(e[i]={language:s,default:!1,autoselect:!1,playlists:[],uri:""}),e[i].playlists.push(bl(wl(t),r)),e},{}),kl=e=>e.reduce((s,e)=>(e&&e.forEach(e=>{var{channel:t,language:i}=e;s[i]={autoselect:!1,default:!1,instreamId:t,language:i},e.hasOwnProperty("aspectRatio")&&(s[i].aspectRatio=e.aspectRatio),e.hasOwnProperty("easyReader")&&(s[i].easyReader=e.easyReader),e.hasOwnProperty("3D")&&(s[i]["3D"]=e["3D"])}),s),{}),Il=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{s={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(s.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(s.contentProtection=e.contentProtection),e.serviceLocation&&(s.attributes.serviceLocation=e.serviceLocation),i&&(s.sidx=i),s},xl=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,Al=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,Dl=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,Pl=(e,i)=>{e.forEach(t=>{t.mediaSequence=0,t.discontinuitySequence=i.findIndex(function({timeline:e}){return e===t.timeline}),t.segments&&t.segments.forEach((e,t)=>{e.number=t})})},Ll=i=>i?Object.keys(i).reduce((e,t)=>{t=i[t];return e.concat(t.playlists)},[]):[],Ol=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:r,eventStream:n})=>{var a,o,l,d,h,u,c;return e.length?({sourceDuration:d,type:u,suggestedPresentationDelay:c,minimumUpdatePeriod:h}=e[0].attributes,a=vl(e.filter(xl)).map(Il),o=vl(e.filter(Al)),l=vl(e.filter(Dl)),e=e.map(e=>e.attributes.captionServices).filter(Boolean),d={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:d,playlists:Tl(a,s)},0<=h&&(d.minimumUpdatePeriod=1e3*h),t&&(d.locations=t),i&&(d.contentSteering=i),"dynamic"===u&&(d.suggestedPresentationDelay=c),n&&0e),d.timelineStarts=cl(c),Pl(u,d.timelineStarts),t&&(d.mediaGroups.AUDIO.audio=t),i&&(d.mediaGroups.SUBTITLES.subs=i),e.length&&(d.mediaGroups["CLOSED-CAPTIONS"].cc=kl(e)),r?yl({oldManifest:r,newManifest:d}):d):{}},Rl=(e,t,i)=>{var{NOW:e,clientOffset:s,availabilityStartTime:r,timescale:n=1,periodStart:a=0,minimumUpdatePeriod:o=0}=e;return Math.ceil((((e+s)/1e3+o-(r+a))*n-t)/i)},Nl=(s,r)=>{var{type:n,minimumUpdatePeriod:a=0,media:o="",sourceDuration:l,timescale:d=1,startNumber:h=1,periodStart:u}=s,c=[];let p=-1;for(let i=0;ip&&(p=m);let e;e=f<0?(m=i+1)===r.length?"dynamic"===n&&0(e,t,i,s)=>{return"$$"===e?"$":"undefined"==typeof r[t]?e:(e=""+r[t],"RepresentationID"===t||(s=i?parseInt(s,10):1)<=e.length?e:new Array(s-e.length+1).join("0")+e)},Bl=(e,t)=>e.replace(Ml,Ul(t)),Fl=(e,t)=>e.duration||t?e.duration?ol(e):Nl(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}],ql=(s,e)=>{let r={RepresentationID:s.id,Bandwidth:s.bandwidth||0};var{initialization:t={sourceURL:"",range:""}}=s;let n=il({baseUrl:s.baseUrl,source:Bl(t.sourceURL,r),range:t.range});return Fl(s,e).map(e=>{r.Number=e.number,r.Time=e.time;var t=Bl(s.media||"",r),i=s.timescale||1,i=s.periodStart+(e.time-(s.presentationTimeOffset||0))/i;return{uri:t,timeline:e.timeline,duration:e.duration,resolvedUri:Bn(s.baseUrl||"",t),map:n,number:e.number,presentationTime:i}})},jl=(e,t)=>{var{baseUrl:e,initialization:i={}}=e,i=il({baseUrl:e,source:i.sourceURL,range:i.range}),e=il({baseUrl:e,source:t.media,range:t.mediaRange});return e.map=i,e},Hl=(r,e)=>{let{duration:t,segmentUrls:i=[],periodStart:n}=r;if(!t&&!e||t&&e)throw new Error(tl.SEGMENT_TIME_UNSPECIFIED);let a=i.map(e=>jl(r,e)),s;return t&&(s=ol(r)),(s=e?Nl(r,e):s).map((e,t)=>{var i,s;if(a[t])return t=a[t],i=r.timescale||1,s=r.presentationTimeOffset||0,t.timeline=e.timeline,t.duration=e.duration,t.number=e.number,t.presentationTime=n+(e.time-s)/i,t}).filter(e=>e)},Vl=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=ql,i=A(e,t.template)):t.base?(s=ll,i=A(e,t.base)):t.list&&(s=Hl,i=A(e,t.list));var r,n,a,e={attributes:e};return s&&(r=s(i,t.segmentTimeline),i.duration?({duration:n,timescale:a=1}=i,i.duration=n/a):r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0,e.attributes=i,e.segments=r,t.base)&&i.indexRange&&(e.sidx=r[0],e.segments=[]),e},zl=e=>e.map(Vl),D=(e,t)=>Jo(e.childNodes).filter(({tagName:e})=>e===t),$l=e=>e.textContent.trim(),Wl=e=>{var t,i,s,r,n,e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);return e?([e,t,i,s,r,n]=e.slice(1),31536e3*parseFloat(e||0)+2592e3*parseFloat(t||0)+86400*parseFloat(i||0)+3600*parseFloat(s||0)+60*parseFloat(r||0)+parseFloat(n||0)):0},Gl={mediaPresentationDuration(e){return Wl(e)},availabilityStartTime(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=e)&&(e+="Z"),Date.parse(e)/1e3},minimumUpdatePeriod(e){return Wl(e)},suggestedPresentationDelay(e){return Wl(e)},type(e){return e},timeShiftBufferDepth(e){return Wl(e)},start(e){return Wl(e)},width(e){return parseInt(e,10)},height(e){return parseInt(e,10)},bandwidth(e){return parseInt(e,10)},frameRate(e){return parseFloat(e.split("/").reduce((e,t)=>e/t))},startNumber(e){return parseInt(e,10)},timescale(e){return parseInt(e,10)},presentationTimeOffset(e){return parseInt(e,10)},duration(e){var t=parseInt(e,10);return isNaN(t)?Wl(e):t},d(e){return parseInt(e,10)},t(e){return parseInt(e,10)},r(e){return parseInt(e,10)},presentationTime(e){return parseInt(e,10)},DEFAULT(e){return e}},P=e=>e&&e.attributes?Jo(e.attributes).reduce((e,t)=>{var i=Gl[t.name]||Gl.DEFAULT;return e[t.name]=i(t.value),e},{}):{},Xl={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},Kl=(e,t)=>t.length?Qo(e.map(function(s){return t.map(function(e){var t=$l(e),i=Bn(s.baseUrl,t),e=A(P(e),{baseUrl:i});return i!==t&&!e.serviceLocation&&s.serviceLocation&&(e.serviceLocation=s.serviceLocation),e})})):e,Yl=e=>{var t=D(e,"SegmentTemplate")[0],i=D(e,"SegmentList")[0],s=i&&D(i,"SegmentURL").map(e=>A({tag:"SegmentURL"},P(e))),e=D(e,"SegmentBase")[0],r=i||t,r=r&&D(r,"SegmentTimeline")[0],n=i||e||t,n=n&&D(n,"Initialization")[0],t=t&&P(t);t&&n?t.initialization=n&&P(n):t&&t.initialization&&(t.initialization={sourceURL:t.initialization});let a={template:t,segmentTimeline:r&&D(r,"S").map(e=>P(e)),list:i&&A(P(i),{segmentUrls:s,initialization:P(n)}),base:e&&A(P(e),{initialization:P(n)})};return Object.keys(a).forEach(e=>{a[e]||delete a[e]}),a},Ql=(r,n,a)=>e=>{var t=D(e,"BaseURL"),t=Kl(n,t);let i=A(r,P(e)),s=Yl(e);return t.map(e=>({segmentInfo:A(a,s),attributes:A(i,e)}))},Jl=e=>e.reduce((e,t)=>{var i=P(t),s=(i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase()),Xl[i.schemeIdUri]);return s&&(e[s]={attributes:i},i=D(t,"cenc:pssh")[0])&&(t=$l(i),e[s].pssh=t&&Fn(t)),e},{}),Zl=e=>{return"urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri?("string"!=typeof e.value?[]:e.value.split(";")).map(e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}}):"urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri?("string"!=typeof e.value?[]:e.value.split(";")).map(e=>{let i={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};var t,s;return/=/.test(e)?([t,s=""]=e.split("="),i.channel=t,i.language=e,s.split(",").forEach(e=>{var[e,t]=e.split(":");"lang"===e?i.language=t:"er"===e?i.easyReader=Number(t):"war"===e?i.aspectRatio=Number(t):"3D"===e&&(i["3D"]=Number(t))})):i.language=e,i.channel&&(i.channel="SERVICE"+i.channel),i}):void 0},ed=o=>Qo(D(o.node,"EventStream").map(e=>{let n=P(e),a=n.schemeIdUri;return D(e,"Event").map(e=>{var t=P(e),i=t.presentationTime||0,s=n.timescale||1,r=t.duration||0,i=i/s+o.attributes.start;return{schemeIdUri:a,value:n.value,id:t.id,start:i,end:i+r/s,messageData:$l(e)||t.messageData,contentEncoding:n.contentEncoding,presentationTimeOffset:n.presentationTimeOffset||0}})})),td=(n,a,o)=>e=>{var t=P(e),i=Kl(a,D(e,"BaseURL")),s=D(e,"Role")[0],s={role:P(s)};let r=A(n,t,s);t=D(e,"Accessibility")[0],s=Zl(P(t)),s&&(r=A(r,{captionServices:s})),t=D(e,"Label")[0],t&&t.childNodes.length&&(s=t.childNodes[0].nodeValue.trim(),r=A(r,{label:s})),t=Jl(D(e,"ContentProtection")),Object.keys(t).length&&(r=A(r,{contentProtection:t})),s=Yl(e),t=D(e,"Representation"),e=A(o,s);return Qo(t.map(Ql(r,i,e)))},id=(n,a)=>(e,t)=>{var i=Kl(a,D(e.node,"BaseURL")),s=A(n,{periodStart:e.attributes.start}),r=("number"==typeof e.attributes.duration&&(s.periodDuration=e.attributes.duration),D(e.node,"AdaptationSet")),e=Yl(e.node);return Qo(r.map(td(s,i,e)))},sd=(e,t)=>{return 1"number"==typeof e.start?e.start:t&&"number"==typeof t.start&&"number"==typeof t.duration?t.start+t.duration:t||"static"!==i?null:0,nd=(e,t={})=>{var{manifestUri:t="",NOW:i=Date.now(),clientOffset:s=0,eventHandler:r=function(){}}=t,n=D(e,"Period");if(!n.length)throw new Error(tl.INVALID_NUMBER_OF_PERIOD);var a=D(e,"Location");let o=P(e);t=Kl([{baseUrl:t}],D(e,"BaseURL")),e=D(e,"ContentSteering");o.type=o.type||"static",o.sourceDuration=o.mediaPresentationDuration||0,o.NOW=i,o.clientOffset=s,a.length&&(o.locations=a.map($l));let l=[];return n.forEach((e,t)=>{var i=P(e),t=l[t-1];i.start=rd({attributes:i,priorPeriodAttributes:t?t.attributes:null,mpdType:o.type}),l.push({node:e,attributes:i})}),{locations:o.locations,contentSteeringInfo:sd(e,r),representationInfo:Qo(l.map(id(o,t))),eventStream:Qo(l.map(ed))}},ad=e=>{if(""===e)throw new Error(tl.DASH_EMPTY_MANIFEST);var t,i=new Go;let s;try{t=i.parseFromString(e,"application/xml"),s=t&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!s||s&&0(e=>{e=D(e,"UTCTiming")[0];if(!e)return null;var t=P(e);switch(t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT",t.value=Date.parse(t.value);break;default:throw new Error(tl.UNSUPPORTED_UTC_TIMING_SCHEME)}return t})(ad(e));function ld(e,t){var i,s,r;return void 0===t&&(t=0),(e=S(e)).length-t<10||!C(e,gd,{offset:t})?t:(t+=(void 0===(s=t)&&(s=0),r=(i=S(i=e))[s+5],i=i[s+6]<<21|i[s+7]<<14|i[s+8]<<7|i[s+9],(16&r)>>4?20+i:10+i),ld(e,t))}function dd(e,t,i){var s;return i>=t.length?t.length:(s=Sd(t,i,!1),C(e.bytes,s.bytes)?i:dd(e,t,i+(e=Sd(t,i+s.length)).length+e.value+s.length))}function hd(e,t){i=t,t=Array.isArray(i)?i.map(function(e){return wd(e)}):[wd(i)],e=S(e);var i,s=[];if(t.length)for(var r=0;re.length?e.length:o+a.value),o=e.subarray(o,l);C(t[0],n.bytes)&&(1===t.length?s.push(o):s=s.concat(hd(o,t.slice(1)))),r+=n.length+a.length+o.length}return s}function ud(e,t,i,s){void 0===s&&(s=1/0),e=S(e),i=[].concat(i);for(var r,n=0,a=0;n>1&63),-1!==i.indexOf(l)&&(r=n+o),n+=o+("h264"===t?1:2)}else n++}return e.subarray(0,0)}var cd=Math.pow(2,32),pd=function(e){var t,e=new DataView(e.buffer,e.byteOffset,e.byteLength);return e.getBigUint64?(t=e.getBigUint64(0))>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i},gd=S([73,68,51]),fd=function(e){return"string"==typeof e?fa(e):e},yd=function(e){return Array.isArray(e)?e.map(function(e){return fd(e)}):[fd(e)]},_d=function e(t,i,s){void 0===s&&(s=!1),i=yd(i),t=S(t);var r=[];if(i.length)for(var n=0;n>>0,o=t.subarray(n+4,n+8);if(0==a)break;a=n+a;if(a>t.length){if(s)break;a=t.length}var l=t.subarray(n+8,a);C(o,i[0])&&(1===i.length?r.push(l):r.push.apply(r,e(l,i.slice(1),s))),n=a}return r},vd={EBML:S([26,69,223,163]),DocType:S([66,130]),Segment:S([24,83,128,103]),SegmentInfo:S([21,73,169,102]),Tracks:S([22,84,174,107]),Track:S([174]),TrackNumber:S([215]),DefaultDuration:S([35,227,131]),TrackEntry:S([174]),TrackType:S([131]),FlagDefault:S([136]),CodecID:S([134]),CodecPrivate:S([99,162]),VideoTrack:S([224]),AudioTrack:S([225]),Cluster:S([31,67,182,117]),Timestamp:S([231]),TimestampScale:S([42,215,177]),BlockGroup:S([160]),BlockDuration:S([155]),Block:S([161]),SimpleBlock:S([163])},bd=[128,64,32,16,8,4,2,1],Td=function(e){for(var t=1,i=0;it&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Ud=e=>E.log.debug?E.log.debug.bind(E,"VHS:",e+" >"):function(){};function L(...e){var t=E.obj||E;return(t.merge||t.mergeOptions).apply(t,e)}function O(...e){var t=E.time||E;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}function Bd(e,i){return Wd(e,function(e,t){return e-$d<=i&&t+$d>=i})}function Fd(e,t){return Wd(e,function(e){return e-zd>=t})}function qd(e){if(e&&e.length&&e.end)return e.end(e.length-1)}function jd(t,i){let s=0;if(t&&t.length)for(let e=0;e{var i=[];if(!t||!t.length)return"";for(let e=0;e "+t.end(e));return i.join(", ")},Xd=t=>{var i=[];for(let e=0;e{if(!e.preload)return e.duration;let i=0;return(e.parts||[]).forEach(function(e){i+=e.duration}),(e.preloadHints||[]).forEach(function(e){"PART"===e.type&&(i+=t.partTargetDuration)}),i},Yd=e=>(e.segments||[]).reduce((i,s,r)=>(s.parts?s.parts.forEach(function(e,t){i.push({duration:e.duration,segmentIndex:r,partIndex:t,part:e,segment:s})}):i.push({duration:s.duration,segmentIndex:r,partIndex:null,segment:s,part:null}),i),[]),Qd=e=>{e=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return e&&e.parts||[]},Jd=({preloadSegment:e})=>{var t;if(e)return{parts:e,preloadHints:t}=e,(t||[]).reduce((e,t)=>e+("PART"===t.type?1:0),0)+(e&&e.length?e.length:0)},Zd=(e,t)=>{return t.endList?0:e&&e.suggestedPresentationDelay?e.suggestedPresentationDelay:(e=0Date.now()}function nh(e){return e.excludeUntil&&e.excludeUntil===1/0}function ah(e){var t=rh(e);return!e.disabled&&!t}function oh(e,t){return t.attributes&&t.attributes[e]}function lh(e,t){var i,s=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let r=!1;for(i in s){for(var n in s[i])if(r=t(s[i][n]))break;if(r)break}return!!r}let dh=(e,t)=>{if(1===e.playlists.length)return!0;let i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!ah(e)&&(e.attributes.BANDWIDTH||0)!(!e&&!t||!e&&t||e&&!t||e!==t&&(!e.id||!t.id||e.id!==t.id)&&(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)&&(!e.uri||!t.uri||e.uri!==t.uri)),uh=i=>{if(!i||!i.playlists||!i.playlists.length)return lh(i,e=>e.playlists&&e.playlists.length||e.uri);for(let e=0;eKn(e))){s=lh(i,e=>hh(t,e));if(!s)return!1}}return!0};var ch={liveEdgeDelay:Zd,duration:sh,seekable:function(e,t,i){var s=t||0;let r=Vd(e,t,!0,i);return null===r?O():O(s,r=rzd),m=0===o,p=p&&0<=o+zd;if(!m&&!p||e===l.length-1){if(a){if(0e+"-"+t,gh=(e,t,i)=>`placeholder-uri-${e}-${t}-`+i,fh=(r,n)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(e=>{if(r.mediaGroups[e])for(var t in r.mediaGroups[e])for(var i in r.mediaGroups[e][t]){var s=r.mediaGroups[e][t][i];n(s,e,t,i)}})},yh=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},_h=(o,e,l=gh)=>{o.uri=e;for(let e=0;e{if(!e.playlists||!e.playlists.length){if(i&&"AUDIO"===r&&!e.uri)for(let e=0;e{let t=e.playlists.length;for(;t--;){var i=e.playlists[t];yh({playlist:i,id:mh(t,i.uri)}),i.resolvedUri=Nd(e.uri,i.uri),e.playlists[i.id]=i,(e.playlists[i.uri]=i).attributes.BANDWIDTH||ph.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}})(o),s=o,fh(s,e=>{e.uri&&(e.resolvedUri=Nd(s.uri,e.uri))})};class vh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){null===this.offset_&&e.length&&([e]=e,void 0!==e.programDateTime)&&(this.offset_=e.programDateTime/1e3)}setPendingDateRanges(e=[]){var t;e.length&&([t]=e,t=t.startDate.getTime(),this.trimProcessedDateRanges_(t),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map))}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];let i={},s=[];this.pendingDateRanges_.forEach((e,t)=>{this.processedDateRanges_.has(t)||(e.startTime=e.startDate.getTime()/1e3-this.offset_,e.processDateRange=()=>this.processDateRange(e),s.push(e),e.class&&(i[e.class]?(t=i[e.class].push(e),e.classListIndex=t-1):(i[e.class]=[e],e.classListIndex=0)))});for(var e of s){var t=i[e.class]||[];e.endDate?e.endTime=e.endDate.getTime()/1e3-this.offset_:e.endOnNext&&t[e.classListIndex+1]?e.endTime=t[e.classListIndex+1].startTime:e.duration?e.endTime=e.startTime+e.duration:e.plannedDuration?e.endTime=e.startTime+e.plannedDuration:e.endTime=e.startTime}return s}trimProcessedDateRanges_(i){new Map(this.processedDateRanges_).forEach((e,t)=>{e.startDate.getTime(){if(!Ch(e,t))return!0;var i,t=t.attributes||{},s=e.mediaGroups.AUDIO[t.AUDIO];for(i in s)if(!s[i].uri&&!s[i].playlists)return!0;return!1})(e,t)||(t=kh(function(e,t){if(e.mediaGroups.AUDIO&&t){var i=e.mediaGroups.AUDIO[t];if(i)for(var s in i){s=i[s];if(s.default&&s.playlists)return na(s.playlists[0].attributes.CODECS)}}return null}(e,i.AUDIO)||[])).audio&&(s.audio=t.audio),s}let wh=({requestType:e,request:t,error:i,parseFailure:s})=>{var r=t.status<200||299{t=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&t.AUDIO&&e.mediaGroups.AUDIO[t.AUDIO]},kh=function(e){let s={};return e.forEach(({mediaType:e,type:t,details:i})=>{s[e]=s[e]||[],s[e].push(ra(""+t+i))}),Object.keys(s).forEach(function(e){1{if(!t)return i;var s=L(t,i);if(t.preloadHints&&!i.preloadHints&&delete s.preloadHints,t.parts&&!i.parts)delete s.parts;else if(t.parts&&i.parts)for(let e=0;e{!e.resolvedUri&&e.uri&&(e.resolvedUri=Nd(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Nd(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Nd(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Nd(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=Nd(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=Nd(t,e.uri))})},Dh=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Ph=(e,r,t=Dh)=>{var i=L(e,{}),s=i.playlists[r.id];if(!s)return null;if(t(s,r))return null;r.segments=Ih(r);let n=L(s,r);if(n.preloadSegment&&!r.preloadSegment&&delete n.preloadSegment,s.segments){if(r.skip){r.segments=r.segments||[];for(let e=0;e{var s=e.slice(),r=t.slice(),n=(i=i||0,[]);let a;for(let e=0;e{Ah(e,n.resolvedUri)});for(let e=0;e{if(t.playlists)for(let e=0;e{var i=e.segments||[],i=i[i.length-1],s=i&&i.parts&&i.parts[i.parts.length-1],s=s&&s.duration||i&&i.duration;return t&&s?1e3*s:500*(e.partTargetDuration||e.targetDuration||10)},Oh=(e,t,i)=>{if(e){let r=[];return e.forEach(e=>{var t,i,s;e.attributes&&({BANDWIDTH:t,RESOLUTION:i,CODECS:s}=e.attributes,r.push({id:e.id,bandwidth:t,resolution:i,codecs:s}))}),{type:t,isLive:i,renditions:r}}};class Rh extends Jr{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Ud("PlaylistLoader");var{withCredentials:s=!1}=i,e=(this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack,t.options_);this.customTagParsers=e&&e.customTagParsers||[],this.customTagMappers=e&&e.customTagMappers||[],this.llhls=e&&e.llhls,this.dateRangesStorage_=new vh,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){var e=this.media();e&&(this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges),(e=this.dateRangesStorage_.getDateRangesToProcess()).length)&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(e)}handleMediaupdatetimeout_(){if("HAVE_METADATA"===this.state){var t=this.media();let e=Nd(this.main.uri,t.uri);this.llhls&&(e=((e,t)=>{if(!t.endList&&t.serverControl){let i={};if(t.serverControl.canBlockReload){var s,r=t.preloadSegment;let e=t.mediaSequence+t.segments.length;r&&(r=r.parts||[],-1<(s=Jd(t)-1)&&s!=r.length-1&&(i._HLS_part=s),-1{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}}playlistRequestError(e,t,i){var{uri:t,id:s}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[s],status:e.status,message:`HLS playlist request error at URL: ${t}.`,responseText:e.responseText,code:500<=e.status?4:2,metadata:wh({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:t,manifestString:e}){try{var i=(({onwarn:t,oninfo:e,manifestString:i,customTagParsers:s=[],customTagMappers:r=[],llhls:n})=>{let a=new Xn,o=(t&&a.on("warn",t),e&&a.on("info",e),s.forEach(e=>a.addParser(e)),r.forEach(e=>a.addTagMapper(e)),a.push(i),a.end(),a.manifest);if(n||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(e){o.hasOwnProperty(e)&&delete o[e]}),o.segments&&o.segments.forEach(function(t){["parts","preloadHints"].forEach(function(e){t.hasOwnProperty(e)&&delete t[e]})})),!o.targetDuration){let e=10;o.segments&&o.segments.length&&(e=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),t&&t({message:"manifest has no targetDuration defaulting to "+e}),o.targetDuration=e}e=Qd(o);return e.length&&!o.partTargetDuration&&(s=e.reduce((e,t)=>Math.max(e,t.duration),0),t&&(t({message:"manifest has no partTargetDuration defaulting to "+s}),ph.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=s),o})({onwarn:({message:e})=>this.logger_(`m3u8-parser warn for ${t}: `+e),oninfo:({message:e})=>this.logger_(`m3u8-parser info for ${t}: `+e),manifestString:e,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length&&this.excludeAudioOnlyVariants(i.playlists),i}catch(e){this.error=e,this.error.metadata={errorType:E.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){let t=e=>{var{width:t,height:i}=(e.attributes||{}).RESOLUTION||{};return!(!t||!i)||(t=bh(e)||[],i=kh(t),Boolean(i.video))};e.some(t)&&e.forEach(e=>{t(e)||(e.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state="HAVE_METADATA";var r={playlistInfo:{type:"media",uri:i}},t=(this.trigger({type:"playlistparsestart",metadata:r}),t||this.parseManifest_({url:i,manifestString:e})),e=(t.lastRequest=Date.now(),yh({playlist:t,uri:i,id:s}),Ph(this.main,t));this.targetDuration=t.partTargetDuration||t.targetDuration,this.pendingMedia_=null,e?(this.main=e,this.media_=this.main.playlists[s]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Lh(this.media(),!!e)),r.parsedPlaylist=Oh(this.main.playlists,r.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:r}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),window.clearTimeout(this.mediaUpdateTimeout),window.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new vh,this.off()}stopRequest(){var e;this.request&&(e=this.request,this.request=null,e.onreadystatechange=null,e.abort())}media(r,e){if(!r)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof r){if(!this.main.playlists[r])throw new Error("Unknown playlist URI: "+r);r=this.main.playlists[r]}if(window.clearTimeout(this.finalRenditionTimeout),e)e=(r.partTargetDuration||r.targetDuration)/2*1e3||5e3,this.finalRenditionTimeout=window.setTimeout(this.media.bind(this,r,!1),e);else{let s=this.state;var e=!this.media_||r.id!==this.media_.id,t=this.main.playlists[r.id];if(t&&t.endList||r.endList&&r.segments.length)this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=r,e&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===s?this.trigger("loadedmetadata"):this.trigger("mediachange"));else if(this.updateMediaUpdateTimeout_(Lh(r,!0)),e){if(this.state="SWITCHING_MEDIA",this.request){if(r.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging");let i={playlistInfo:{type:"media",uri:(this.pendingMedia_=r).uri}};this.trigger({type:"playlistrequeststart",metadata:i}),this.request=this.vhs_.xhr({uri:r.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(e,t)=>{if(this.request){if(r.lastRequest=Date.now(),r.resolvedUri=Md(r.resolvedUri,t),e)return this.playlistRequestError(this.request,r,s);this.trigger({type:"playlistrequestcomplete",metadata:i}),this.haveMetadata({playlistString:t.responseText,url:r.uri,id:r.id}),"HAVE_MAIN_MANIFEST"===s?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}}}pause(){this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var t=this.media();e?(e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3,this.mediaUpdateTimeout=window.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e)):this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=window.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,"object"==typeof this.src)this.src.uri||(this.src.uri=window.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);else{let i={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:i}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(e,t)=>{if(this.request){if(this.request=null,e)return this.error={status:t.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:t.responseText,code:2,metadata:wh({requestType:t.requestType,request:t,error:e})},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:i}),this.src=Md(this.src,t),this.trigger({type:"playlistparsestart",metadata:i});e=this.parseManifest_({manifestString:t.responseText,url:this.src});i.parsedPlaylist=Oh(e.playlists,i.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:i}),this.setupInitialPlaylist(e)}})}}srcUri(){return"string"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){var t,i,s,r;this.state="HAVE_MAIN_MANIFEST",e.playlists?(this.main=e,_h(this.main,this.srcUri()),e.playlists.forEach(t=>{t.segments=Ih(t),t.segments.forEach(e=>{Ah(e,t.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0])):(t=this.srcUri()||window.location.href,this.main=(i=t,s=mh(0,i),(r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:window.location.href,resolvedUri:window.location.href,playlists:[{uri:i,id:s,resolvedUri:i,attributes:{}}]}).playlists[s]=r.playlists[0],r.playlists[i]=r.playlists[0],r),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata"))}updateOrDeleteClone(e,t){var i=this.main,s=e.ID;let r=i.playlists.length;for(;r--;){var n,a,o,l,d,h=i.playlists[r];h.attributes["PATHWAY-ID"]===s&&(n=h.resolvedUri,a=h.id,t?(o=this.createCloneURI_(h.resolvedUri,e),l=mh(s,o),d=this.createCloneAttributes_(s,h.attributes),h=this.createClonePlaylist_(h,l,e,d),i.playlists[r]=h,i.playlists[l]=h,i.playlists[o]=h):i.playlists.splice(r,1),delete i.playlists[a],delete i.playlists[n])}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){let s=this.main,r=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{if(s.mediaGroups[e]&&s.mediaGroups[e][r])for(var t in s.mediaGroups[e])if(t===r){for(var i in s.mediaGroups[e][t])s.mediaGroups[e][t][i].playlists.forEach((e,t)=>{var e=s.playlists[e.id],i=e.id,e=e.resolvedUri;delete s.playlists[i],delete s.playlists[e]});delete s.mediaGroups[e][t]}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){var i=this.main,s=i.playlists.length,r=this.createCloneURI_(t.resolvedUri,e),n=mh(e.ID,r),a=this.createCloneAttributes_(e.ID,t.attributes),t=this.createClonePlaylist_(t,n,e,a);i.playlists[s]=t,i.playlists[n]=t,i.playlists[r]=t,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(l){let d=l.ID,s=l["BASE-ID"],h=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(o=>{if(h.mediaGroups[o]&&!h.mediaGroups[o][d])for(var e in h.mediaGroups[o])if(e===s){h.mediaGroups[o][d]={};for(let a in h.mediaGroups[o][e]){var t=h.mediaGroups[o][e][a];h.mediaGroups[o][d][a]=f({},t);let n=h.mediaGroups[o][d][a];var i=this.createCloneURI_(t.resolvedUri,l);n.resolvedUri=i,n.uri=i,n.playlists=[],t.playlists.forEach((e,t)=>{var i,s=h.playlists[e.id],r=gh(o,d,a),r=mh(d,r);s&&!h.playlists[r]&&(i=(s=this.createClonePlaylist_(s,r,l)).resolvedUri,h.playlists[r]=s,h.playlists[i]=s),n.playlists[t]=this.createClonePlaylist_(e,r,l)})}}})}createClonePlaylist_(e,t,i,s){i=this.createCloneURI_(e.resolvedUri,i),i={resolvedUri:i,uri:i,id:t};return e.segments&&(i.segments=[]),s&&(i.attributes=s),L(e,i)}createCloneURI_(e,t){var i,s=new URL(e),r=(s.hostname=t["URI-REPLACEMENT"].HOST,t["URI-REPLACEMENT"].PARAMS);for(i of Object.keys(r))s.searchParams.set(i,r[i]);return s.href}createCloneAttributes_(t,i){let s={"PATHWAY-ID":t};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{i[e]&&(s[e]=t)}),s}getKeyIdSet(e){if(e.contentProtection){var t,i=new Set;for(t in e.contentProtection){var s=e.contentProtection[t].attributes.keyId;s&&i.add(s.toLowerCase())}return i}}}function Nh(e,t,i,s){var r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),s(t=t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode?t:new Error("XHR Failed with a response of: "+(e&&(r||e.responseText))),e)}function Mh(){function d(e,a){e=L({timeout:45e3},e);var t=d.beforeRequest||E.Vhs.xhr.beforeRequest,i=d._requestCallbackSet||E.Vhs.xhr._requestCallbackSet||new Set;let o=d._responseCallbackSet||E.Vhs.xhr._responseCallbackSet;t&&"function"==typeof t&&(E.log.warn("beforeRequest is deprecated, use onRequest instead."),i.add(t));var s=(!0===E.Vhs.xhr.original?E:E.Vhs).xhr,r=((e,i)=>{if(e&&e.size){let t=i;return e.forEach(e=>{t=e(t)}),t}})(i,e);i.delete(t);let l=s(r||e,function(e,t){var i,s,r,n;return i=o,s=l,r=e,n=t,i&&i.size&&i.forEach(e=>{e(s,r,n)}),Nh(l,e,t,a)}),n=l.abort;return l.abort=function(){return l.aborted=!0,n.apply(l,arguments)},l.uri=e.uri,l.requestType=e.requestType,l.requestTime=Date.now(),l}return d.original=!0,d}function Uh(e){var t={};return e.byterange&&(t.Range=function(e){let t;return"bytes="+e.offset+"-"+(t="bigint"==typeof e.offset||"bigint"==typeof e.length?window.BigInt(e.offset)+window.BigInt(e.length)-window.BigInt(1):e.offset+e.length-1)}(e.byterange)),t}function Bh(e,t){return e=e.toString(16),"00".substring(0,2-e.length)+e+(t%2?" ":"")}function Fh(e){return 32<=e&&e<126?String.fromCharCode(e):"."}function qh(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")}function jh(e){return e.resolvedUri}let Hh=function(i){let s={};return Object.keys(i).forEach(e=>{var t=i[e];ca(t)?s[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:s[e]=t}),s},Vh=e=>{var t,i,s=Array.prototype.slice.call(e);let r="";for(let e=0;eVh(e),textRanges:e=>{let t="",i;for(i=0;ie.transmuxedPresentationEnd-e.transmuxedPresentationStart-e.transmuxerPrependedSeconds,Wh=({playlist:e,time:t=void 0,callback:i})=>{var s,r;if(i)return e&&void 0!==t?(e=((t,i)=>{if(!i||!i.segments||0===i.segments.length)return null;let s=0,r;for(let e=0;es){if(t>s+e.duration*zh)return null;r=e}return{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:s-r.duration,type:r.videoTimingInfo?"accurate":"estimate"}})(t,e))?"estimate"===e.type?i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:e.estimatedStart}):(s={mediaSeconds:t},t=t,(r=(e=e.segment).dateTimeObject?(r=e.videoTimingInfo.transmuxerPrependedSeconds,t=t-(e.videoTimingInfo.transmuxedPresentationStart+r),new Date(e.dateTimeObject.getTime()+1e3*t)):null)&&(s.programDateTime=r.toISOString()),i(null,s)):i({message:"valid programTime was not found"}):i({message:"getProgramTime: playlist and time must be provided"});throw new Error("getProgramTime: callback must be provided")},Gh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:r=!0,tech:n,callback:a})=>{var o,l,d;if(a)return"undefined"!=typeof e&&t&&s?t.endList||n.hasStarted_?(t=>{if(!t.segments||0===t.segments.length)return!1;for(let e=0;e{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(ia?null:{segment:s=i>new Date(n)?e:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:ch.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?"accurate":"estimate"}})(e,t))?(l=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}e=i.getTime();return(s.getTime()-e)/1e3})((o=d.segment).dateTimeObject,e),"estimate"===d.type?0===i?a({message:e+" is not buffered yet. Try again"}):(s(d.estimatedStart+l),void n.one("seeked",()=>{Gh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:r,tech:n,callback:a})})):(d=o.start+l,n.one("seeked",()=>a(null,n.currentTime())),r&&n.pause(),void s(d))):a({message:e+" was not found in the stream"}):a({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri}):a({message:"player must be playing a live stream to start buffering"}):a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});throw new Error("seekToProgramTime: callback must be provided")},Xh=(e,t)=>{if(4===e.readyState)return t()},Kh=(e,t,r,s)=>{function n(e,t,i,s){return t.abort(),l=!0,r(e,t,i,s)}function i(e,t){var i;if(!l)return e?(e.metadata=wh({requestType:s,request:t,error:e}),n(e,t,"",a)):(i=t.responseText.substring(a&&a.byteLength||0,t.responseText.length),a=function(){for(var e,t,i,s=arguments.length,r=new Array(s),n=0;nn(e,t,"",a)):n(null,t,i,a))}let a=[],o,l=!1;let d=t({uri:e,beforeSend(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",function({}){return Nh(e,null,{statusCode:e.status},i)})}},function(e,t){return Nh(d,e,t,i)});return d};e=E.EventTarget;function Yh(t,i){if(!Dh(t,i))return!1;if(t.sidx&&i.sidx&&(t.sidx.offset!==i.sidx.offset||t.sidx.length!==i.sidx.length))return!1;if(!t.sidx&&i.sidx||t.sidx&&!i.sidx)return!1;if(t.segments&&!i.segments||!t.segments&&i.segments)return!1;if(t.segments||i.segments)for(let e=0;e{return`placeholder-uri-${e}-${t}-`+(s.attributes.NAME||i)},Jh=({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:r})=>{e=e,i={manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:r},e=nd(ad(e),i),s=zl(e.representationInfo);r=Ol({dashPlaylists:s,locations:e.locations,contentSteering:e.contentSteeringInfo,sidxMapping:i.sidxMapping,previousManifest:i.previousManifest,eventStream:e.eventStream});return _h(r,t,Qh),r},Zh=(e,t,i)=>{let a=!0,o=L(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e{var r,n;e.playlists&&e.playlists.length&&(r=e.playlists[0].id,n=Ph(o,e.playlists[0],Yh))&&(s in(o=n).mediaGroups[t][i]||(o.mediaGroups[t][i][s]=e),o.mediaGroups[t][i][s].playlists[0]=o.playlists[r],a=!1)}),n=o,l=t,fh(n,(e,t,i,s)=>{l.mediaGroups[t][i]&&s in l.mediaGroups[t][i]||delete n.mediaGroups[t][i][s]}),(a=t.minimumUpdatePeriod===e.minimumUpdatePeriod&&a)?null:o},eu=(e,t)=>{return(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},tu=(e,t)=>{var i,s={};for(i in e){var r=e[i].sidx;if(r){var n=_l(r);if(!t[n])break;var a=t[n].sidxInfo;eu(a,r)&&(s[n]=t[n])}}return s};class iu extends e{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);var{withCredentials:s=!1}=i;if(this.vhs_=t,this.withCredentials=s,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=Ud("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)}addSidxSegments_(l,r,n){let d=l.sidx&&_l(l.sidx);if(l.sidx&&d&&!this.mainPlaylistLoader_.sidxMapping_[d]){let a=Md(l.sidx.resolvedUri),o=(t,i)=>{if(!this.requestErrored_(t,i,r)){var t=this.mainPlaylistLoader_.sidxMapping_,s=i.requestType;let e;try{e=md(S(i.response).subarray(8))}catch(e){return e.metadata=wh({requestType:s,request:i,parseFailure:!0}),void this.requestErrored_(e,i,r)}return t[d]={sidxInfo:l.sidx,sidx:e},dl(l,e,l.sidx.resolvedUri),n(!0)}};this.request=Kh(a,this.vhs_.xhr,(e,t,i,s)=>{var r,n;return e?o(e,t):i&&"mp4"===i?({offset:r,length:n}=l.sidx.byterange,s.length>=n+r?o(e,{response:s.subarray(r,r+n),status:t.status,uri:t.uri}):void(this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:Uh({byterange:l.sidx.byterange})},o))):(e=i||"unknown",o({status:t.status,message:`Unsupported ${e} container type for sidx segment at URL: `+a,response:"",playlist:l,internal:!0,playlistExclusionDuration:1/0,code:2},t))},"dash-sidx")}else window.clearTimeout(this.mediaRequest_),this.mediaRequest_=window.setTimeout(()=>n(!1),0)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},window.clearTimeout(this.minimumUpdatePeriodTimeout_),window.clearTimeout(this.mediaRequest_),window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){var e;this.request&&(e=this.request,this.request=null,e.onreadystatechange=null,e.abort())}media(t){if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);let i=this.state;if("string"==typeof t){if(!this.mainPlaylistLoader_.main.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.mainPlaylistLoader_.main.playlists[t]}var e=!this.media_||t.id!==this.media_.id;e&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList?(this.state="HAVE_METADATA",this.media_=t,e&&(this.trigger("mediachanging"),this.trigger("mediachange"))):e&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(t,i,e=>{this.haveMetadata({startingState:i,playlist:t})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,window.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MAIN_MANIFEST"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(window.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var t=this.media();e?(e=t?t.targetDuration/2*1e3:5e3,this.mediaUpdateTimeout=window.setTimeout(()=>this.load(),e)):this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){this.started=!0,this.isMain_?this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}):(window.clearTimeout(this.mediaRequest_),this.mediaRequest_=window.setTimeout(()=>this.haveMain_(),0))}requestMain_(s){let r={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:r}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(e,t)=>{var i;if(e&&(i=t.requestType,e.metadata=wh({requestType:i,request:t,error:e})),this.requestErrored_(e,t))"HAVE_NOTHING"===this.state&&(this.started=!1);else{this.trigger({type:"manifestrequestcomplete",metadata:r});let e=t.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=t.responseText,t.responseHeaders&&t.responseHeaders.date?this.mainLoaded_=Date.parse(t.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=Md(this.mainPlaylistLoader_.srcUrl,t),!e)return s(t,e);this.handleMain_(),this.syncClientServerClock_(()=>s(t,e))}})}syncClientServerClock_(r){let n=od(this.mainPlaylistLoader_.mainXml_);return null===n?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),r()):"DIRECT"===n.method?(this.mainPlaylistLoader_.clientOffset_=n.value-Date.now(),r()):void(this.request=this.vhs_.xhr({uri:Nd(this.mainPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(t,i)=>{if(this.request){var s;if(t)return s=i.requestType,this.error.metadata=wh({requestType:s,request:i,error:t}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),r();let e;e="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):this.mainLoaded_:Date.parse(i.responseText),this.mainPlaylistLoader_.clientOffset_=e-Date.now(),r()}}))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){window.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;var e=this.mainPlaylistLoader_.main,i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:i});let s;try{s=Jh({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:E.Error.StreamingDashManifestParserError,error:e},this.trigger("error")}e&&(s=Zh(e,s,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=s||e;var r=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(r&&r!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=r),(!e||s&&s.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(s),s){var{duration:r,endList:e}=s;let t=[];s.playlists.forEach(e=>{t.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})});r={duration:r,isLive:!e,renditions:t};i.parsedManifest=r,this.trigger({type:"manifestparsecomplete",metadata:i})}return Boolean(s)}updateMinimumUpdatePeriodTimeout_(){var e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(window.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){let t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=window.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,r)=>{let n=tu(e.playlists,r);return fh(e,(e,t,i,s)=>{e.playlists&&e.playlists.length&&(e=e.playlists,n=L(n,tu(e,r)))}),n})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();var t=this.mainPlaylistLoader_.main.playlists;let i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){let e=()=>{this.media().endList||(this.mediaUpdateTimeout=window.setTimeout(()=>{this.trigger("mediaupdatetimeout"),e()},Lh(this.media(),Boolean(i))))};e()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){e&&this.mainPlaylistLoader_.main.eventStream&&(e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]})),this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration))}getKeyIdSet(e){if(e.contentProtection){var t,i=new Set;for(t in e.contentProtection){var s=e.contentProtection[t].attributes["cenc:default_KID"];s&&i.add(s.replace(/-/g,"").toLowerCase())}return i}}}var R={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};function su(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e}let ru=t=>{var i=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},X=function(e){return l(d.hdlr,re[e])},G=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),l(d.mdhd,t)},W=function(e){return l(d.mdia,G(e),X(e.type),q(e))},F=function(e){return l(d.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},q=function(e){return l(d.minf,"video"===e.type?l(d.vmhd,ne):l(d.smhd,ae),M(),Y(e))},H=function(e){for(var t=e.length,i=[];t--;)i[t]=Z(e[t]);return l.apply(null,[d.mvex].concat(i))},V=function(e){e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return l(d.mvhd,e)},K=function(e){for(var t,i=e.samples||[],s=new Uint8Array(4+i.length),r=0;r>>8),n.push(255&s[o].byteLength),n=n.concat(Array.prototype.slice.call(s[o]));for(o=0;o>>8),a.push(255&r[o].byteLength),a=a.concat(Array.prototype.slice.call(r[o]));return t=[d.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l(d.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([s.length],n,[r.length],a))),l(d.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio&&(i=e.sarRatio[0],e=e.sarRatio[1],t.push(l(d.pasp,new Uint8Array([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])))),l.apply(null,t)},pe=function(e){return l(d.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),U(e))},$=function(e){e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return l(d.tkhd,e)},J=function(e){var t,i=l(d.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(e.baseMediaDecodeTime/ve),r=Math.floor(e.baseMediaDecodeTime%ve),s=l(d.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,r>>>24&255,r>>>16&255,r>>>8&255,255&r]));return"audio"===e.type?(t=ee(e,92),l(d.traf,i,s,t)):(r=K(e),t=ee(e,r.length+92),l(d.traf,i,s,t,r))},z=function(e){return e.duration=e.duration||4294967295,l(d.trak,$(e),W(e))},Z=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),l(d.trex,t)},me=function(e,t){var i=0,s=0,r=0,n=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset)&&(n=8),[0,0,i|s|r|n,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},ge=function(e,t){var i,s,r,n,a=e.samples||[];for(t+=20+16*a.length,e=me(a,t),(s=new Uint8Array(e.length+16*a.length)).set(e),i=e.length,n=0;n>>24,s[i++]=(16711680&r.duration)>>>16,s[i++]=(65280&r.duration)>>>8,s[i++]=255&r.duration,s[i++]=(4278190080&r.size)>>>24,s[i++]=(16711680&r.size)>>>16,s[i++]=(65280&r.size)>>>8,s[i++]=255&r.size,s[i++]=r.flags.isLeading<<2|r.flags.dependsOn,s[i++]=r.flags.isDependedOn<<6|r.flags.hasRedundancy<<4|r.flags.paddingValue<<1|r.flags.isNonSyncSample,s[i++]=61440&r.flags.degradationPriority,s[i++]=15&r.flags.degradationPriority,s[i++]=(4278190080&r.compositionTimeOffset)>>>24,s[i++]=(16711680&r.compositionTimeOffset)>>>16,s[i++]=(65280&r.compositionTimeOffset)>>>8,s[i++]=255&r.compositionTimeOffset;return l(d.trun,s)},fe=function(e,t){var i,s,r,n,a=e.samples||[];for(t+=20+8*a.length,e=me(a,t),(i=new Uint8Array(e.length+8*a.length)).set(e),s=e.length,n=0;n>>24,i[s++]=(16711680&r.duration)>>>16,i[s++]=(65280&r.duration)>>>8,i[s++]=255&r.duration,i[s++]=(4278190080&r.size)>>>24,i[s++]=(16711680&r.size)>>>16,i[s++]=(65280&r.size)>>>8,i[s++]=255&r.size;return l(d.trun,i)},ee=function(e,t){return("audio"===e.type?fe:ge)(e,t)};function be(e,t){var i=xe();return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i}function r(e){for(var t=[];e--;)t.push(0);return t}function n(e){e=e||{},n.prototype.init.call(this),this.parse708captions_="boolean"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new m(0,0),new m(0,1),new m(1,0),new m(1,1)],this.parse708captions_&&(this.cc708Stream_=new p({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))}function Te(e){return 32<=e&&e<=127||160<=e&&e<=255}function a(e){this.windowNum=e,this.reset()}function Se(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new a(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)}function we(e){return null===e?"":(e=qe[e]||e,String.fromCharCode(e))}function o(){for(var e=[],t=je+1;t--;)e.push({text:"",indent:0,offset:0});return e}function Ee(e,t){var i=1;for(t$e;)e+=i*ze;return e}function Ce(e){var t,i;Ce.prototype.init.call(this),this.type_=e||"shared",this.push=function(e){"metadata"===e.type?this.trigger("data",e):"shared"!==this.type_&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=Ee(e.dts,i),e.pts=Ee(e.pts,i),t=e.dts,this.trigger("data",e))},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){t=i=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}}var ke,Ie={ftyp:B=function(){return l(d.ftyp,te,ie,te,se)},mdat:function(e){return l(d.mdat,e)},moof:function(e,t){for(var i=[],s=t.length;s--;)i[s]=J(t[s]);return l.apply(null,[d.moof,F(e)].concat(i))},moov:j=function(e){for(var t=e.length,i=[];t--;)i[t]=z(e[t]);return l.apply(null,[d.moov,V(4294967295)].concat(i).concat(H(e)))},initSegment:function(e){var t=B(),e=j(e),i=new Uint8Array(t.byteLength+e.byteLength);return i.set(t),i.set(e,t.byteLength),i}},xe=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Ae={groupNalsIntoFrames:function(e){var t,i,s=[],r=[];for(r.byteLength=0,r.nalCount=0,t=s.byteLength=r.duration=0;tMe.ONE_SECOND_IN_TS/2))){for(a=(a=Ne()[e.samplerate])||t[0].data,o=0;o=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){for(var t=[],i=0;i=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),0this.virtualRowCount;)this.rows.shift(),this.rowIdx--},a.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},a.prototype.addText=function(e){this.rows[this.rowIdx]+=e},a.prototype.backspace=function(){var e;this.isEmpty()||(e=this.rows[this.rowIdx],this.rows[this.rowIdx]=e.substr(0,e.length-1))},Se.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new a(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},Se.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Se.prototype.createTextDecoder=function(t){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(t)}catch(e){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+t+" encoding. "+e})}},function(e){e=e||{},p.prototype.init.call(this);var t,i=this,s=e.captionServices||{},r={};Object.keys(s).forEach(e=>{t=s[e],/^SERVICE/.test(e)&&(r[e]=t.encoding)}),this.serviceEncodings=r,this.current708Packet=null,this.services={},this.push=function(e){(3===e.type||null===i.current708Packet)&&i.new708Packet(),i.add708Bytes(e)}}),qe=(p.prototype=new c,p.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},p.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,t=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(t)},p.prototype.push708Packet=function(){var e,t=this.current708Packet,i=t.data,s=null,r=0,n=i[r++];for(t.seq=n>>6,t.sizeCode=63&n;r>5)&&0("0"+(255&e).toString(16)).slice(-2)).join(""),String.fromCharCode(parseInt(n,16))):(t=Fe[r=a|o]||r,4096&r&&r===t?"":String.fromCharCode(t)),l.pendingNewLine&&!l.isEmpty()&&l.newLine(this.getPts(e)),l.pendingNewLine=!1,l.addText(i),e},p.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1];return e=Te(s)&&Te(i[e+2])?this.handleText(++e,t,{isMultiByte:!0}):e},p.prototype.setCurrentWindow=function(e,t){var i=this.current708Packet.data[e];return t.setCurrentWindow(7&i),e},p.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],t=(t.setCurrentWindow(7&s),t.currentWindow),s=i[++e];return t.visible=(32&s)>>5,t.rowLock=(16&s)>>4,t.columnLock=(8&s)>>3,t.priority=7&s,s=i[++e],t.relativePositioning=(128&s)>>7,t.anchorVertical=127&s,s=i[++e],t.anchorHorizontal=s,s=i[++e],t.anchorPoint=(240&s)>>4,t.rowCount=15&s,s=i[++e],t.columnCount=63&s,s=i[++e],t.windowStyle=(56&s)>>3,t.penStyle=7&s,t.virtualRowCount=t.rowCount+1,e},p.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,t=(i[e],t.currentWindow.winAttr),s=i[++e];return t.fillOpacity=(192&s)>>6,t.fillRed=(48&s)>>4,t.fillGreen=(12&s)>>2,t.fillBlue=3&s,s=i[++e],t.borderType=(192&s)>>6,t.borderRed=(48&s)>>4,t.borderGreen=(12&s)>>2,t.borderBlue=3&s,s=i[++e],t.borderType+=(128&s)>>5,t.wordWrap=(64&s)>>6,t.printDirection=(48&s)>>4,t.scrollDirection=(12&s)>>2,t.justify=3&s,s=i[++e],t.effectSpeed=(240&s)>>4,t.effectDirection=(12&s)>>2,t.displayEffect=3&s,e},p.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},p.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},p.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var r=0;r<8;r++)i&1<>4,t.offset=(12&s)>>2,t.penSize=3&s,s=i[++e],t.italics=(128&s)>>7,t.underline=(64&s)>>6,t.edgeType=(56&s)>>3,t.fontStyle=7&s,e},p.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,t=(i[e],t.currentWindow.penColor),s=i[++e];return t.fgOpacity=(192&s)>>6,t.fgRed=(48&s)>>4,t.fgGreen=(12&s)>>2,t.fgBlue=3&s,s=i[++e],t.bgOpacity=(192&s)>>6,t.bgRed=(48&s)>>4,t.bgGreen=(12&s)>>2,t.bgBlue=3&s,s=i[++e],t.edgeRed=(48&s)>>4,t.edgeGreen=(12&s)>>2,t.edgeBlue=3&s,e},p.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=(i[e],t.currentWindow.penLoc);return t.currentWindow.pendingNewLine=!0,t=i[++e],s.row=15&t,t=i[++e],s.column=63&t,e},p.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)},{42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496}),je=14,He=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],m=function(e,t){m.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,r,n=32639&e.ccData;n===this.lastControlCode_?this.lastControlCode_=null:(4096==(61440&n)?this.lastControlCode_=n:n!==this.PADDING_&&(this.lastControlCode_=null),t=n>>>8,i=255&n,n!==this.PADDING_&&(n===this.RESUME_CAPTION_LOADING_?this.mode_="popOn":n===this.END_OF_CAPTION_?(this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),r=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=r,this.startPts_=e.pts):n===this.ROLL_UP_2_ROWS_?(this.rollUpRows_=2,this.setRollUp(e.pts)):n===this.ROLL_UP_3_ROWS_?(this.rollUpRows_=3,this.setRollUp(e.pts)):n===this.ROLL_UP_4_ROWS_?(this.rollUpRows_=4,this.setRollUp(e.pts)):n===this.CARRIAGE_RETURN_?(this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts):n===this.BACKSPACE_?"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1):n===this.ERASE_DISPLAYED_MEMORY_?(this.flushDisplayed(e.pts),this.displayed_=o()):n===this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=o():n===this.RESUME_DIRECT_CAPTIONING_?("paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=o()),this.mode_="paintOn",this.startPts_=e.pts):this.isSpecialCharacter(t,i)?(s=we((t=(3&t)<<8)|i),this[this.mode_](e.pts,s),this.column_++):this.isExtCharacter(t,i)?("popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),s=we((t=(3&t)<<8)|i),this[this.mode_](e.pts,s),this.column_++):this.isMidRowCode(t,i)?(this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"])):this.isOffsetControlCode(t,i)?(this.nonDisplayed_[this.row_].offset=r=3&i,this.column_+=r):this.isPAC(t,i)?(r=He.indexOf(7968&n),"rollUp"===this.mode_&&(r-this.rollUpRows_+1<0&&(r=this.rollUpRows_-1),this.setRollUp(e.pts,r)),r!==this.row_&&0<=r&&r<=14&&(this.clearFormatting(e.pts),this.row_=r),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&n)&&(this.column_=4*(r=(14&n)>>1),this.nonDisplayed_[this.row_].indent+=r),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])):this.isNormalChar(t)&&(0===i&&(i=null),s=we(t),s+=we(i),this[this.mode_](e.pts,s),this.column_+=s.length)))}},c=(m.prototype=new c,m.prototype.flushDisplayed=function(e){let i=e=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+e+"."})},s=[];this.displayed_.forEach((e,t)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){i(t)}e.text.length&&s.push({text:e.text,line:t+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&i(t)}),s.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,content:s,stream:this.name_})},m.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=o(),this.nonDisplayed_=o(),this.lastControlCode_=null,this.column_=0,this.row_=je,this.rollUpRows_=2,this.formatting_=[]},m.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},m.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&48<=t&&t<=63},m.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&32<=t&&t<=63},m.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&32<=t&&t<=47},m.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&33<=t&&t<=35},m.prototype.isPAC=function(e,t){return e>=this.BASE_&&e"},"");this[this.mode_](e,t)},m.prototype.clearFormatting=function(e){var t;this.formatting_.length&&(t=this.formatting_.reverse().reduce(function(e,t){return e+""},""),this.formatting_=[],this[this.mode_](e,t))},m.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;this.nonDisplayed_[this.row_].text=i+=t},m.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;this.displayed_[this.row_].text=i+=t},m.prototype.shiftRowsUp_=function(){for(var e=0;e{if(e)for(var s=i;s>>2,o.timeStamp=a=(a*=4)+(3&n[7]),void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)),t.frames.push(o),(i=i+10+s)>>4&&(i+=e[i]+1),0===t.pid)t.type="pat",s(e.subarray(i),t),this.trigger("data",t);else if(t.pid===this.pmtPid)for(t.type="pmt",s(e.subarray(i),t),this.trigger("data",t);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,i,t]):this.processPes_(e,i,t)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=S.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=S.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new st,Ge.STREAM_TYPES={h264:27,adts:15},(Xe=function(){function s(e,t,i){var s,r=new Uint8Array(e.size),n={type:t},a=0,o=0;if(e.data.length&&!(e.size<9)){for(n.trackId=e.data[0].pid,a=0;a>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i)&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1),t.data=e.subarray(9+e[8]))};Xe.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var e,t;switch(i.streamType){case S.H264_STREAM_TYPE:e=n,t="video";break;case S.ADTS_STREAM_TYPE:e=a,t="audio";break;case S.METADATA_STREAM_TYPE:e=o,t="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&s(e,t,!0),e.data.push(i),e.size+=i.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]};null!==(t=i.programMapTable).video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),r=!0,l.trigger("data",e)}})[i.type]()},this.reset=function(){n.size=0,n.data.length=0,a.size=0,a.data.length=0,this.trigger("reset")},this.flushStreams_=function(){s(n,"video"),s(a,"audio"),s(o,"timed-metadata")},this.flush=function(){var e;!r&&t&&(e={type:"metadata",tracks:[]},null!==t.video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),l.trigger("data",e)),r=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new st,{PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:rt,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:g,CaptionStream:T.CaptionStream,Cea608Stream:T.Cea608Stream,Cea708Stream:T.Cea708Stream,MetadataStream:v});for(Ke in S)S.hasOwnProperty(Ke)&&(nt[Ke]=S[Ke]);var at,ot,st=nt,g=t,lt=u.ONE_SECOND_IN_TS,dt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],ht=function(l){var d,h=0;ht.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:`adts skiping bytes ${e} to ${t} in frame ${h} outside syncword`})},this.push=function(e){var t,i,s,r,n,a,o=0;if(l||(h=0),"audio"===e.type){for(d&&d.length?(s=d,(d=new Uint8Array(s.byteLength+e.data.byteLength)).set(s),d.set(e.data,s.byteLength)):d=e.data;o+7>5,n=(r=1024*(1+(3&d[o+6])))*lt/dt[(60&d[o+2])>>>2],d.byteLength-o>>6&3),channelcount:(1&d[o+2])<<2|(192&d[o+3])>>>6,samplerate:dt[(60&d[o+2])>>>2],samplingfrequencyindex:(60&d[o+2])>>>2,samplesize:16,data:d.subarray(o+7+i,o+t)}),h++,o+=t}"number"==typeof a&&(this.skipWarn_(a,o),a=null),d=d.subarray(o)}},this.flush=function(){h=0,this.trigger("done")},this.reset=function(){d=void 0,this.trigger("reset")},this.endTimeline=function(){d=void 0,this.trigger("endedtimeline")}},T=(ht.prototype=new g,ht),v=t,ut=function(s){var r=s.byteLength,n=0,a=0;this.length=function(){return 8*r},this.bitsAvailable=function(){return 8*r+a},this.loadWord=function(){var e=s.byteLength-r,t=new Uint8Array(4),i=Math.min(4,r);if(0===i)throw new Error("no bytes available");t.set(s.subarray(e,e+i)),n=new DataView(t.buffer).getUint32(0),a=8*i,r-=i},this.skipBits=function(e){var t;e>>32-t;return 0<(a-=t)?n<<=t:0>>e))return n<<=e,a-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},ct=function(){var s,r,n=0;ct.prototype.init.call(this),this.push=function(e){for(var t,i=(r=r?((t=new Uint8Array(r.byteLength+e.data.byteLength)).set(r),t.set(e.data,r.byteLength),t):e.data).byteLength;n>4?20+i:10+i},ft=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=gt(e,t),ft(e,t))},yt=function(e,t,i){for(var s="",r=t;r=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:gt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5;return 6144&e[t+3]|e[t+4]<<3|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5>>2];t++}return null},parseAacTimestamp:function(e){var t,i=10;64&e[5]&&(i=(i+=4)+pt(e.subarray(10,14)));do{if((t=pt(e.subarray(i+4,i+8)))<1)return null;if("PRIV"===String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]))for(var s,r,n=e.subarray(i+10,i+t+10),a=0;a>>2,(r*=4)+(3&s[7]);break}}while((i=i+10+t)n.length)break;t={type:"timed-metadata",data:n.subarray(r,r+s)},this.trigger("data",t),r+=s}else if(255==(255&n[r])&&240==(240&n[r+1])){if(n.length-r<7)break;if(r+(s=vt.parseAdtsSize(n,r))>n.length)break;t={type:"audio",data:n.subarray(r,r+s),pts:a,dts:a},this.trigger("data",t),r+=s}else r++;n=0=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(a=this.videoTrack.timelineStartInfo.pts,Ut.forEach(function(e){n.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(a=this.audioTrack.timelineStartInfo.pts,Mt.forEach(function(e){n.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?n.type=this.pendingTracks[0].type:n.type="combined",this.emittedTracks+=this.pendingTracks.length,e=It.initSegment(this.pendingTracks),n.initSegment=new Uint8Array(e.byteLength),n.initSegment.set(e),n.data=new Uint8Array(this.pendingBytes),s=0;s=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},kt.prototype.setRemux=function(e){this.remuxTracks=e},(Ct=function(s){var r,n,a=this,i=!0;Ct.prototype.init.call(this),s=s||{},this.baseMediaDecodeTime=s.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};(this.transmuxPipeline_=t).type="aac",t.metadataStream=new E.MetadataStream,t.aacStream=new Ot,t.audioTimestampRolloverStream=new E.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new E.TimestampRolloverStream("timed-metadata"),t.adtsStream=new Pt,t.coalesceStream=new kt(s,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(e){"timed-metadata"!==e.type&&"audio"!==e.type||t.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:a.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new Ft(n,s),t.audioSegmentStream.on("log",a.getLogTrigger_("audioSegmentStream")),t.audioSegmentStream.on("timingInfo",a.trigger.bind(a,"audioTimingInfo")),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream),a.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!r}))}),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done")),Tt(this,t)},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new E.MetadataStream,i.packetStream=new E.TransportPacketStream,i.parseStream=new E.TransportParseStream,i.elementaryStream=new E.ElementaryStream,i.timestampRolloverStream=new E.TimestampRolloverStream,i.adtsStream=new Pt,i.h264Stream=new Lt,i.captionStream=new E.CaptionStream(s),i.coalesceStream=new kt(s,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(e){var t;if("metadata"===e.type){for(t=e.tracks.length;t--;)r||"video"!==e.tracks[t].type?n||"audio"!==e.tracks[t].type||((n=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=a.baseMediaDecodeTime):(r=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=a.baseMediaDecodeTime;r&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new Et(r,s),i.videoSegmentStream.on("log",a.getLogTrigger_("videoSegmentStream")),i.videoSegmentStream.on("timelineStartInfo",function(e){n&&!s.keepOriginalTimestamps&&(n.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts-a.baseMediaDecodeTime))}),i.videoSegmentStream.on("processedGopsInfo",a.trigger.bind(a,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",a.trigger.bind(a,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),i.videoSegmentStream.on("timingInfo",a.trigger.bind(a,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Ft(n,s),i.audioSegmentStream.on("log",a.getLogTrigger_("audioSegmentStream")),i.audioSegmentStream.on("timingInfo",a.trigger.bind(a,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",a.trigger.bind(a,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),a.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!r})}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",function(e){e.dispatchType=i.metadataStream.dispatchType,a.trigger("id3Frame",e)}),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done")),Tt(this,i)},this.setBaseMediaDecodeTime=function(e){var t=this.transmuxPipeline_;s.keepOriginalTimestamps||(this.baseMediaDecodeTime=e),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,w.clearDtsInfo(n),t.audioTimestampRolloverStream)&&t.audioTimestampRolloverStream.discontinuity(),r&&(t.videoSegmentStream&&(t.videoSegmentStream.gopCache_=[]),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,w.clearDtsInfo(r),t.captionStream.reset()),t.timestampRolloverStream&&t.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(e){var t=this.transmuxPipeline_;s.remux=e,t&&t.coalesceStream&&t.coalesceStream.setRemux(e)},this.alignGopsWith=function(e){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(t){var i=this;return function(e){e.stream=t,i.trigger("log",e)}},this.push=function(e){var t;i&&((t=Rt(e))&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1),this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new _t;function qt(e){var t="";return(t+=String.fromCharCode(e[0]))+String.fromCharCode(e[1])+String.fromCharCode(e[2])+String.fromCharCode(e[3])}function jt(e,t){var i,s,r,n=[];if(!t.length)return null;for(i=0;i>>0},Pe=function(e){return("00"+e.toString(16)).slice(-2)},Wt=t,Gt=qt,Xt=t,Kt=i.getUint64,Yt=i.getUint64,Qt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Jt=i.getUint64,Zt=qt,k={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:I(e.subarray(78,e.byteLength))}},avcC:function(e){for(var t,i,s=new DataView(e.buffer,e.byteOffset,e.byteLength),r={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},n=31&e[5],a=6,o=0;o>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={majorBrand:Zt(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},s=8;sMALFORMED DATA");else switch(31&e[r]){case 1:s.push("slice_layer_without_partitioning_rbsp");break;case 5:s.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:s.push("sei_rbsp");break;case 7:s.push("seq_parameter_set_rbsp");break;case 8:s.push("pic_parameter_set_rbsp");break;case 9:s.push("access_unit_delimiter_rbsp");break;default:s.push("UNKNOWN NAL - "+e[r]&31)}return s}(e)}},mdhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,e={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===e.version?(e.creationTime=C(t.getUint32(i+=4)),e.modificationTime=C(t.getUint32(i+=8)),e.timescale=t.getUint32(i+=4),e.duration=t.getUint32(i+=8)):(e.creationTime=C(t.getUint32(i)),e.modificationTime=C(t.getUint32(i+=4)),e.timescale=t.getUint32(i+=4),e.duration=t.getUint32(i+=4)),t=t.getUint16(i+=4),e.language+=String.fromCharCode(96+(t>>10)),e.language+=String.fromCharCode(96+((992&t)>>5)),e.language+=String.fromCharCode(96+(31&t)),e},mdia:function(e){return{boxes:I(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:I(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),t={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return 28>4,isDependedOn:(12&e[i])>>2,hasRedundancy:3&e[i]});return t},sidx:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12,r=(0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Yt(e.subarray(s)),i.firstOffset=Yt(e.subarray(s+8)),s+=16),t.getUint16(s+=2));for(s+=2;0>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:I(e)}},ctts:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),compositionOffsets:[]},s=t.getUint32(4),r=8;s;r+=8,s--)i.compositionOffsets.push({sampleCount:t.getUint32(r),sampleOffset:t[0===i.version?"getUint32":"getInt32"](r+4)});return i},stss:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),syncSamples:[]},s=t.getUint32(4),r=8;s;r+=4,s--)i.syncSamples.push(t.getUint32(r));return i},stco:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},s=t.getUint32(4),r=8;s;r+=4,s--)i.chunkOffsets.push(t.getUint32(r));return i},stsc:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=t.getUint32(4),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]},r=8;i;r+=12,i--)s.sampleToChunks.push({firstChunk:t.getUint32(r),samplesPerChunk:t.getUint32(r+4),sampleDescriptionIndex:t.getUint32(r+8)});return s},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:I(e.subarray(8))}},stsz:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:t.getUint32(4),entries:[]},s=12;s>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:zt,"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}},I=function(e){for(var t,i,s,r,n,a=0,o=[],l=new ArrayBuffer(e.length),d=new Uint8Array(l),h=0;h":i+"<\n"+t.map(function(e){return r+" "+e}).join("\n")+"\n"+r+" >":i+"<>":i+JSON.stringify(e,null,2).split("\n").map(function(e,t){return 0===t?e:r+" "+e}).join("\n")}).join("\n")+(s.boxes?"\n"+ei(s.boxes,t+1):"")}).join("\n")},Le={inspect:I,textify:ei,parseType:Zt,findBox:jt,parseTraf:k.traf,parseTfdt:k.tfdt,parseHdlr:k.hdlr,parseTfhd:k.tfhd,parseTrun:k.trun,parseSidx:k.sidx},ti=function(e){for(var t=0,i=String.fromCharCode(e[t]),s="";"\0"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},ii=i.getUint64,si=function(e){return void 0!==e||null!==e},st="undefined"!=typeof window?window:"undefined"!=typeof ye?ye:"undefined"!=typeof self?self:{},T=st,ri=t,ni=Pe,x=jt,A=qt,ai={parseEmsgBox:function(e){var t,i,s,r,n,a,o,l=4,d=e[0],h=(0===d?(l=(l+=(r=ti(e.subarray(l))).length)+(n=ti(e.subarray(l))).length,s=(h=new DataView(e.buffer)).getUint32(l),o=h.getUint32(l+=4),t=h.getUint32(l+=4),i=h.getUint32(l+=4),l+=4):1===d&&(s=(h=new DataView(e.buffer)).getUint32(l),a=ii(e.subarray(l+=4)),t=h.getUint32(l+=8),i=h.getUint32(l+=4),l=(l=(l+=4)+(r=ti(e.subarray(l))).length)+(n=ti(e.subarray(l))).length),{scheme_id_uri:r,value:n,timescale:s||1,presentation_time:a,presentation_time_delta:o,event_duration:t,id:i,message_data:new Uint8Array(e.subarray(l,e.byteLength))});return n="\0"!==(r=h).scheme_id_uri,a=0===(s=d)&&si(r.presentation_time_delta)&&n,o=1===s&&si(r.presentation_time)&&n,!(1>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase()),x(e,["mdia","mdhd"])[0]);s&&(i.timescale=pi(s)),n.push(i)}),n},getTimescaleFromMediaHeader:pi,getEmsgID3:function(e,i=0){return x(e,["emsg"]).map(e=>{var e=ai.parseEmsgBox(new Uint8Array(e)),t=ci(e.message_data);return{cueTime:ai.scaleTime(e.presentation_time,e.timescale,e.presentation_time_delta,i),duration:ai.scaleTime(e.event_duration,e.timescale),frames:t}})}};let gi=Le.parseTrun,fi=mi.findBox;var yi=T,g={getMdatTrafPairs:function(e){var i=fi(e,["moof","traf"]),e=fi(e,["mdat"]),s=[];return e.forEach(function(e,t){t=i[t];s.push({mdat:e,traf:t})}),s},parseSamples:function(e,t,i){var s=t,r=i.defaultSampleDuration||0,n=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach(function(e){e=gi(e).samples;e.forEach(function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=n),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof s?(e.pts=s+yi.BigInt(e.compositionTimeOffset),s+=yi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)}),o=o.concat(e)}),o}},_i=Re.discardEmulationPreventionBytes,vi=c.CaptionStream,bi=jt,Ti=Ht,Si=Vt,{getMdatTrafPairs:wi,parseSamples:Ei}=g,Ci=function(e,t){for(var i=e,s=0;s>>4&&(t+=e[4]+1),t}function Mi(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}}var Ui=function(){let d=9e4;this.init=function(e){e=D(e,["moov","trak","mdia","mdhd"])[0];e&&(d=Di(e))},this.parseSegment=function(e){let l=[];e=Li(e);let n=0;return e.forEach(function(e){let i=e.mdat;var e=e.traf,s=D(e,["tfdt"])[0],r=D(e,["tfhd"])[0],e=D(e,["trun"]);if(s&&(s=Ai(s),n=s.baseMediaDecodeTime),e.length&&r){s=Pi(e,n,r);let t=0;s.forEach(function(a){let o=new TextDecoder("utf-8");var e=i.slice(t,t+a.size);D(e,["vtte"])[0]||D(e,["vttc"]).forEach(function(e){var t=D(e,["payl"])[0],e=D(e,["sttg"])[0],i=a.pts/d,s=(a.pts+a.duration)/d;let r,n;if(t)try{r=o.decode(t)}catch(e){}if(e)try{n=o.decode(e)}catch(e){}a.duration&&r&&l.push({cueText:r,start:i,end:s,settings:n})}),t+=a.size})}}),l}},Bi=Ve,Fi=Ve,P=Ye,L={},O=(L.ts={parseType:function(e,t){e=Oi(e);return 0===e?"pat":e===t?"pmt":t?"pes":null},parsePat:function(e){var t=Ri(e),i=4+Ni(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ri(e),s=4+Ni(e);if(i&&(s+=e[s]+1),1&e[s+5]){for(var r=3+((15&e[s+1])<<8|e[s+2])-4,n=12+((15&e[s+10])<<8|e[s+11]);n=e.byteLength?null:(i=null,192&(s=e[t+7])&&((i={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&s)&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1),i)},videoPacketContainsKeyFrame:function(e){for(var t=4+Ni(e),i=e.subarray(t),s=0,r=0,n=!1;re.length?s=!0:(null===a&&(t=e.subarray(l,l+o),a=L.aac.parseAacTimestamp(t)),l+=o);break;case"audio":e.length-l<7?s=!0:(o=L.aac.parseAdtsSize(e,l))>e.length?s=!0:(null===n&&(t=e.subarray(l,l+o),n=L.aac.parseSampleRate(t)),r++,l+=o);break;default:l++}if(s)return null}return null===n||null===a?null:{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*(i=O/n),pts:a+1024*r*i}]}}:function(e){var t,i={pid:null,table:null},s={};for(t in qi(e,i),i.table)if(i.table.hasOwnProperty(t))switch(i.table[t]){case Fi.H264_STREAM_TYPE:s.video=[],Hi(e,i,s),0===s.video.length&&delete s.video;break;case Fi.ADTS_STREAM_TYPE:s.audio=[],ji(e,i,s),0===s.audio.length&&delete s.audio}return s})(e);return e&&(e.audio||e.video)?(t=t,(i=e).audio&&i.audio.length&&("undefined"!=typeof(s=t)&&!isNaN(s)||(s=i.audio[0].dts),i.audio.forEach(function(e){e.dts=P(e.dts,s),e.pts=P(e.pts,s),e.dtsTime=e.dts/O,e.ptsTime=e.pts/O})),i.video&&i.video.length&&("undefined"!=typeof(r=t)&&!isNaN(r)||(r=i.video[0].dts),i.video.forEach(function(e){e.dts=P(e.dts,r),e.pts=P(e.pts,r),e.dtsTime=e.dts/O,e.ptsTime=e.pts/O}),i.firstKeyFrame)&&((t=i.firstKeyFrame).dts=P(t.dts,r),t.pts=P(t.pts,r),t.dtsTime=t.dts/O,t.ptsTime=t.pts/O),e):null};class zi{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){var i,e;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new $t(this.options),i=this.self,(e=this.transmuxer).on("data",function(e){var t=e.initSegment,t=(e.initSegment={data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength},e.data);e.data=t.buffer,i.postMessage({action:"data",segment:e,byteOffset:t.byteOffset,byteLength:t.byteLength},[e.data])}),e.on("done",function(e){i.postMessage({action:"done"})}),e.on("gopInfo",function(e){i.postMessage({action:"gopInfo",gopInfo:e})}),e.on("videoSegmentTimingInfo",function(e){var t={start:{decode:u.videoTsToSeconds(e.start.dts),presentation:u.videoTsToSeconds(e.start.pts)},end:{decode:u.videoTsToSeconds(e.end.dts),presentation:u.videoTsToSeconds(e.end.pts)},baseMediaDecodeTime:u.videoTsToSeconds(e.baseMediaDecodeTime)};e.prependedContentDuration&&(t.prependedContentDuration=u.videoTsToSeconds(e.prependedContentDuration)),i.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}),e.on("audioSegmentTimingInfo",function(e){var t={start:{decode:u.videoTsToSeconds(e.start.dts),presentation:u.videoTsToSeconds(e.start.pts)},end:{decode:u.videoTsToSeconds(e.end.dts),presentation:u.videoTsToSeconds(e.end.pts)},baseMediaDecodeTime:u.videoTsToSeconds(e.baseMediaDecodeTime)};e.prependedContentDuration&&(t.prependedContentDuration=u.videoTsToSeconds(e.prependedContentDuration)),i.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:t})}),e.on("id3Frame",function(e){i.postMessage({action:"id3Frame",id3Frame:e})}),e.on("caption",function(e){i.postMessage({action:"caption",caption:e})}),e.on("trackinfo",function(e){i.postMessage({action:"trackinfo",trackInfo:e})}),e.on("audioTimingInfo",function(e){i.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:u.videoTsToSeconds(e.start),end:u.videoTsToSeconds(e.end)}})}),e.on("videoTimingInfo",function(e){i.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:u.videoTsToSeconds(e.start),end:u.videoTsToSeconds(e.end)}})}),e.on("log",function(e){i.postMessage({action:"log",log:e})})}pushMp4Captions(e){this.captionParser||(this.captionParser=new xi,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),e=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:e&&e.captions||[],logs:e&&e.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Ui);e=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(e)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Ui);var e=new Uint8Array(e.data,e.byteOffset,e.byteLength),t=this.webVttParser.parseSegment(e);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:t||[],data:e.buffer},[e.buffer])}probeMp4StartTime({timescales:e,data:t}){e=mi.startTime(e,t);this.self.postMessage({action:"probeMp4StartTime",startTime:e,data:t},[t.buffer])}probeMp4Tracks({data:e}){var t=mi.tracks(e);this.self.postMessage({action:"probeMp4Tracks",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){t=mi.getEmsgID3(e,t);this.self.postMessage({action:"probeEmsgID3",id3Frames:t,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){t="number"!=typeof t||isNaN(t)?void 0:t*u.ONE_SECOND_IN_TS,t=Vi(e,t);let i=null;t&&((i={hasVideo:t.video&&2===t.video.length||!1,hasAudio:t.audio&&2===t.audio.length||!1}).hasVideo&&(i.videoStart=t.video[0].ptsTime),i.hasAudio)&&(i.audioStart=t.audio[0].ptsTime),this.self.postMessage({action:"probeTs",result:i,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){e=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(e)}reset(){this.transmuxer.reset()}setTimestampOffset(e){e=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(u.secondsToVideoTs(e)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(u.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new zi(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new zi(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));let du=(e,t,i)=>{var{type:s,initSegment:r,captions:n,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:d}=e.data.segment,t=(t.buffer.push({captions:n,captionStreams:a,metadata:o}),e.data.segment.boxes||{data:e.data.segment.data}),n={type:s,data:new Uint8Array(t.data,t.data.byteOffset,t.data.byteLength),initSegment:new Uint8Array(r.data,r.byteOffset,r.byteLength)};"undefined"!=typeof l&&(n.videoFrameDtsTime=l),"undefined"!=typeof d&&(n.videoFramePtsTime=d),i(n)},hu=({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)},uu=(e,t)=>{t.gopInfo=e.data.gopInfo},cu=t=>{let{transmuxer:i,bytes:e,audioAppendStart:s,gopsToAlignWith:r,remux:n,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:d,onVideoSegmentTimingInfo:h,onAudioSegmentTimingInfo:u,onId3:c,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:_,triggerSegmentEventFn:v}=t,b={buffer:[]},T=y;var S,w;i.onmessage=e=>{i.currentTransmux!==t||("data"===e.data.action&&du(e,b,a),"trackinfo"===e.data.action&&o(e.data.trackInfo),"gopInfo"===e.data.action&&uu(e,b),"audioTimingInfo"===e.data.action&&l(e.data.audioTimingInfo),"videoTimingInfo"===e.data.action&&d(e.data.videoTimingInfo),"videoSegmentTimingInfo"===e.data.action&&h(e.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===e.data.action&&u(e.data.audioSegmentTimingInfo),"id3Frame"===e.data.action&&c([e.data.id3Frame],e.data.id3Frame.dispatchType),"caption"===e.data.action&&p(e.data.caption),"endedtimeline"===e.data.action&&(T=!1,g()),"log"===e.data.action&&f(e.data.log),"transmuxed"!==e.data.type)||T||(i.onmessage=null,hu({transmuxedData:b,callback:m}),pu(i))},i.onerror=()=>{var e={message:"Received an error message from the transmuxer worker",metadata:{errorType:E.Error.StreamingFailedToTransmuxSegment,segmentInfo:tc({segment:_})}};m(null,e)},s&&i.postMessage({action:"setAudioAppendStart",appendStart:s}),Array.isArray(r)&&i.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),"undefined"!=typeof n&&i.postMessage({action:"setRemux",remux:n}),e.byteLength&&(S=e instanceof ArrayBuffer?e:e.buffer,w=e instanceof ArrayBuffer?0:e.byteOffset,v({type:"segmenttransmuxingstart",segment:_}),i.postMessage({action:"push",data:S,byteOffset:w,byteLength:e.byteLength},[S])),y&&i.postMessage({action:"endTimeline"}),i.postMessage({action:"flush"})},pu=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():cu(e.currentTransmux))},mu=(e,t)=>{e.postMessage({action:t}),pu(e)},gu=(e,t)=>{t.currentTransmux?t.transmuxQueue.push(mu.bind(null,t,e)):(t.currentTransmux=e,mu(t,e))};let fu=e=>{e.transmuxer.currentTransmux?e.transmuxer.transmuxQueue.push(e):(e.transmuxer.currentTransmux=e,cu(e))};var yu=e=>{gu("reset",e)},_u=(fu,e=>{let t=new lu,i=(t.currentTransmux=null,t.transmuxQueue=[],t.terminate);return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:"init",options:e}),t});function vu(e,t){return(e=e&&window.getComputedStyle(e))?e[t]:""}function bu(e,t){let i,s;return i=(i=e.attributes.BANDWIDTH?e.attributes.BANDWIDTH:i)||window.Number.MAX_VALUE,s=(s=t.attributes.BANDWIDTH?t.attributes.BANDWIDTH:s)||window.Number.MAX_VALUE,i-s}let Tu=function(t){let i=t.transmuxer,s=t.endAction||t.action,r=t.callback;var e,n=f({},t,{endAction:null,transmuxer:null,callback:null});let a=e=>{e.data.action===s&&(i.removeEventListener("message",a),e.data.data&&(e.data.data=new Uint8Array(e.data.data,t.byteOffset||0,t.byteLength||e.data.data.byteLength),t.data)&&(t.data=e.data.data),r(e.data))};i.addEventListener("message",a),t.data?(e=t.data instanceof ArrayBuffer,n.byteOffset=e?0:t.data.byteOffset,n.byteLength=t.data.byteLength,e=[e?t.data:t.data.buffer],i.postMessage(n,e)):i.postMessage(n)},Su={FAILURE:2,TIMEOUT:-101,ABORTED:-102},wu="wvtt",Eu=e=>{e.forEach(e=>{e.abort()})},Cu=e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}),ku=e=>{var t=e.target,t={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return t.bytesReceived=e.loaded,t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3),t},Iu=(e,t)=>{var i=t.requestType,i=wh({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Su.TIMEOUT,xhr:t,metadata:i}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Su.ABORTED,xhr:t,metadata:i}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Su.FAILURE,xhr:t,metadata:i}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Su.FAILURE,xhr:t,metadata:i}:null},xu=(r,n,a,o)=>(e,t)=>{var i=t.response,e=Iu(e,t);if(e)return a(e,r);if(16!==i.byteLength)return a({status:t.status,message:"Invalid HLS key at URL: "+t.uri,code:Su.FAILURE,xhr:t},r);var e=new DataView(i),s=new Uint32Array([e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12)]);for(let e=0;e{t===wu&&e.transmuxer.postMessage({action:"initMp4WebVttParser",data:e.map.bytes})},Du=(i,e,s)=>{e===wu&&Tu({action:"getMp4WebVttText",data:i.bytes,transmuxer:i.transmuxer,callback:({data:e,mp4VttCues:t})=>{i.bytes=e,s(null,i,{mp4VttCues:t})}})},Pu=(i,s)=>{var e,t=Ld(i.map.bytes);if("mp4"!==t)return e=i.map.resolvedUri||i.map.uri,s({internal:!0,message:`Found unsupported ${t=t||"unknown"} container for initialization segment at URL: `+e,code:Su.FAILURE,metadata:{mediaType:t}});Tu({action:"probeMp4Tracks",data:i.map.bytes,transmuxer:i.transmuxer,callback:({tracks:e,data:t})=>(i.map.bytes=t,e.forEach(function(e){i.map.tracks=i.map.tracks||{},i.map.tracks[e.type]||("number"==typeof(i.map.tracks[e.type]=e).id&&e.timescale&&(i.map.timescales=i.map.timescales||{},i.map.timescales[e.id]=e.timescale),"text"===e.type&&Au(i,e.codec))}),s(null))})},Lu=({segment:i,bytes:t,trackInfoFn:s,timingInfoFn:e,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:h,doneFn:u,onTransmuxerLog:c,triggerSegmentEventFn:p})=>{var m=i.map&&i.map.tracks||{};let g=Boolean(m.audio&&m.video),f=e.bind(null,i,"audio","start"),y=e.bind(null,i,"audio","end"),_=e.bind(null,i,"video","start"),v=e.bind(null,i,"video","end");Tu({action:"probeTs",transmuxer:i.transmuxer,data:t,baseStartTime:i.baseStartTime,callback:e=>{i.bytes=t=e.data;e=e.result;e&&(s(i,{hasAudio:e.hasAudio,hasVideo:e.hasVideo,isMuxed:g}),s=null),fu({bytes:t,transmuxer:i.transmuxer,audioAppendStart:i.audioAppendStart,gopsToAlignWith:i.gopsToAlignWith,remux:g,onData:e=>{e.type="combined"===e.type?"video":e.type,h(i,e)},onTrackInfo:e=>{s&&(g&&(e.isMuxed=!0),s(i,e))},onAudioTimingInfo:e=>{f&&"undefined"!=typeof e.start&&(f(e.start),f=null),y&&"undefined"!=typeof e.end&&y(e.end)},onVideoTimingInfo:e=>{_&&"undefined"!=typeof e.start&&(_(e.start),_=null),v&&"undefined"!=typeof e.end&&v(e.end)},onVideoSegmentTimingInfo:e=>{var t={pts:{start:e.start.presentation,end:e.end.presentation},dts:{start:e.start.decode,end:e.end.decode}};p({type:"segmenttransmuxingtiminginfoavailable",segment:i,timingInfo:t}),r(e)},onAudioSegmentTimingInfo:e=>{var t={pts:{start:e.start.pts,end:e.end.pts},dts:{start:e.start.dts,end:e.end.dts}};p({type:"segmenttransmuxingtiminginfoavailable",segment:i,timingInfo:t}),n(e)},onId3:(e,t)=>{a(i,e,t)},onCaptions:e=>{o(i,[e])},isEndOfTimeline:l,onEndedTimeline:()=>{d()},onTransmuxerLog:c,onDone:(e,t)=>{u&&(e.type="combined"===e.type?"video":e.type,p({type:"segmenttransmuxingcomplete",segment:i}),u(t,i,e))},segment:i,triggerSegmentEventFn:p})}})},Ou=({segment:n,bytes:a,trackInfoFn:e,timingInfoFn:o,videoSegmentTimingInfoFn:t,audioSegmentTimingInfoFn:i,id3Fn:l,captionsFn:d,isEndOfTimeline:s,endedTimelineFn:r,dataFn:h,doneFn:u,onTransmuxerLog:c,triggerSegmentEventFn:p})=>{let m=new Uint8Array(a);if(Od(m)){n.isFmp4=!0;let i=n.map.tracks;if(i.text&&(!i.audio||!i.video))return h(n,{data:m,type:"text"}),void Du(n,i.text.codec,u);let s={isFmp4:!0,hasVideo:!!i.video,hasAudio:!!i.audio},r=(i.audio&&i.audio.codec&&"enca"!==i.audio.codec&&(s.audioCodec=i.audio.codec),i.video&&i.video.codec&&"encv"!==i.video.codec&&(s.videoCodec=i.video.codec),i.video&&i.audio&&(s.isMuxed=!0),e(n,s),(e,t)=>{h(n,{data:m,type:s.hasAudio&&!s.isMuxed?"audio":"video"}),t&&t.length&&l(n,t),e&&e.length&&d(n,e),u(null,n,{})});void Tu({action:"probeMp4StartTime",timescales:n.map.timescales,data:m,transmuxer:n.transmuxer,callback:({data:e,startTime:t})=>{a=e.buffer,n.bytes=m=e,s.hasAudio&&!s.isMuxed&&o(n,"audio","start",t),s.hasVideo&&o(n,"video","start",t),Tu({action:"probeEmsgID3",data:m,transmuxer:n.transmuxer,offset:t,callback:({emsgData:e,id3Frames:t})=>{a=e.buffer,n.bytes=m=e,i.video&&e.byteLength&&n.transmuxer?Tu({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:n.transmuxer,data:m,timescales:n.map.timescales,trackIds:[i.video.id],callback:e=>{a=e.data.buffer,n.bytes=m=e.data,e.logs.forEach(function(e){c(L(e,{stream:"mp4CaptionParser"}))}),r(e.captions,t)}}):r(void 0,t)}})}})}else n.transmuxer?("undefined"==typeof n.container&&(n.container=Ld(m)),"ts"!==n.container&&"aac"!==n.container?(e(n,{hasAudio:!1,hasVideo:!1}),u(null,n,{})):Lu({segment:n,bytes:a,trackInfoFn:e,timingInfoFn:o,videoSegmentTimingInfoFn:t,audioSegmentTimingInfoFn:i,id3Fn:l,captionsFn:d,isEndOfTimeline:s,endedTimelineFn:r,dataFn:h,doneFn:u,onTransmuxerLog:c,triggerSegmentEventFn:p})):u(null,n,{})},Ru=function({id:t,key:e,encryptedBytes:i,decryptionWorker:s,segment:r,doneFn:n},a){let o=e=>{e.data.source===t&&(s.removeEventListener("message",o),e=e.data.decrypted,a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength)))};s.onerror=()=>{var e="An error occurred in the decryption worker",t=tc({segment:r}),e={message:e,metadata:{error:new Error(e),errorType:E.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:r.key.resolvedUri||r.map.key.resolvedUri}}};n(e,r)},s.addEventListener("message",o);let l;l=e.bytes.slice?e.bytes.slice():new Uint32Array(Array.prototype.slice.call(e.bytes)),s.postMessage(Hh({source:t,encrypted:i,key:l,iv:e.iv}),[i.buffer,l.buffer])},Nu=({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:h,doneFn:u,onTransmuxerLog:c,triggerSegmentEventFn:p})=>{p({type:"segmentdecryptionstart"}),Ru({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},e=>{t.bytes=e,p({type:"segmentdecryptioncomplete",segment:t}),Ou({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:h,doneFn:u,onTransmuxerLog:c,triggerSegmentEventFn:p})})},Mu=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:r,progressFn:n,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:h,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{let _=[];var v,b,T,S,w,E,C,k,I,i=(({activeXhrs:s,decryptionWorker:r,trackInfoFn:n,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:d,captionsFn:h,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:m,onTransmuxerLog:g,triggerSegmentEventFn:f})=>{let t=0,y=!1;return(e,i)=>{if(!y){if(e)return y=!0,Eu(s),m(e,i);if((t+=1)===s.length){let t=function(){if(i.encryptedBytes)return Nu({decryptionWorker:r,segment:i,trackInfoFn:n,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:d,captionsFn:h,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:m,onTransmuxerLog:g,triggerSegmentEventFn:f});Ou({segment:i,bytes:i.bytes,trackInfoFn:n,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:d,captionsFn:h,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:m,onTransmuxerLog:g,triggerSegmentEventFn:f})};if(i.endOfAllRequests=Date.now(),i.map&&i.map.encryptedBytes&&!i.map.bytes)return f({type:"segmentdecryptionstart",segment:i}),Ru({decryptionWorker:r,id:i.requestId+"-init",encryptedBytes:i.map.encryptedBytes,key:i.map.key,segment:i,doneFn:m},e=>{i.map.bytes=e,f({type:"segmentdecryptioncomplete",segment:i}),Pu(i,e=>{if(e)return Eu(s),m(e,i);t()})});t()}}}})({activeXhrs:_,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:h,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y}),f=(s.key&&!s.key.bytes&&(a=[s.key],s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&a.push(s.map.key),o=L(t,{uri:s.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),l=xu(s,a,i,y),y({type:"segmentkeyloadstart",segment:s,keyInfo:{uri:s.key.resolvedUri}}),d=e(o,l),_.push(d)),s.map&&!s.map.bytes&&(!s.map.key||s.key&&s.key.resolvedUri===s.map.key.resolvedUri||(h=L(t,{uri:s.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),u=xu(s,[s.map.key],i,y),y({type:"segmentkeyloadstart",segment:s,keyInfo:{uri:s.map.key.resolvedUri}}),c=e(h,u),_.push(c)),p=L(t,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:Uh(s.map),requestType:"segment-media-initialization"}),{segment:v,finishProcessingFn:b,triggerSegmentEventFn:T}=[{segment:s,finishProcessingFn:i,triggerSegmentEventFn:y}][0],m=(e,t)=>{var e=Iu(e,t);return e?b(e,v):(e=new Uint8Array(t.response),T({type:"segmentloaded",segment:v}),v.map.key?(v.map.encryptedBytes=e,b(null,v)):(v.map.bytes=e,void Pu(v,function(e){if(e)return e.xhr=t,e.status=t.status,b(e,v);b(null,v)})))},y({type:"segmentloadstart",segment:s}),g=e(p,m),_.push(g)),L(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:"arraybuffer",headers:Uh(s),requestType:"segment"})),a=({segment:S,finishProcessingFn:w,responseType:E,triggerSegmentEventFn:C}=[{segment:s,finishProcessingFn:i,responseType:f.responseType,triggerSegmentEventFn:y}][0],(e,t)=>{e=Iu(e,t);if(e)return w(e,S);C({type:"segmentloaded",segment:S});e="arraybuffer"!==E&&t.responseText?ru(t.responseText.substring(S.lastReachedChar||0)):t.response;return S.stats=Cu(t),S.key?S.encryptedBytes=new Uint8Array(e):S.bytes=new Uint8Array(e),w(null,S)}),o=(y({type:"segmentloadstart",segment:s}),e(f,a));o.addEventListener("progress",({segment:k,progressFn:I}=[{segment:s,progressFn:n}][0],e=>{var t=e.target;if(!t.aborted)return k.stats=L(k.stats,ku(e)),!k.stats.firstBytesReceivedAt&&k.stats.bytesReceived&&(k.stats.firstBytesReceivedAt=Date.now()),I(e,k)})),_.push(o);let x={};return _.forEach(e=>{var t,i;e.addEventListener("loadend",({loadendState:t,abortFn:i}=[{loadendState:x,abortFn:r}][0],e=>{e.target.aborted&&i&&!t.calledAbortFn&&(i(),t.calledAbortFn=!0)}))}),()=>Eu(_)},Uu=Ud("PlaylistSelector"),Bu=function(e){var t;if(e&&e.playlist)return t=e.playlist,JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},Fu=function(e,s){let r=e.slice();e.sort(function(e,t){var i=s(e,t);return 0===i?r.indexOf(e)-r.indexOf(t):i})};function qu(l){let{main:t,bandwidth:i,playerWidth:d,playerHeight:h,playerObjectFit:u,limitRenditionByPlayerDimensions:s,playlistController:c}=l;if(t){l={bandwidth:i,width:d,height:h,limitRenditionByPlayerDimensions:s};let e=t.playlists,n=(ch.isAudioOnly(t)&&(e=c.getAudioTrackPlaylists_(),l.audioOnly=!0),e.map(e=>{var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,s=e.attributes&&e.attributes.BANDWIDTH;return{bandwidth:s||window.Number.MAX_VALUE,width:t,height:i,playlist:e}})),a=(Fu(n,(e,t)=>e.bandwidth-t.bandwidth),(n=n.filter(e=>!ch.isIncompatible(e.playlist))).filter(e=>ch.isEnabled(e.playlist)));var p=(a=a.length?a:n.filter(e=>!ch.isDisabled(e.playlist))).filter(e=>e.bandwidth*R.BANDWIDTH_VARIANCEe.bandwidth===o.bandwidth)[0];if(!1===s){let t=m||a[0]||n[0];if(t&&t.playlist){let e=m?"bandwidthBestRep":"sortedPlaylistReps";return a[0]&&(e="enabledPlaylistReps"),Uu(`choosing ${Bu(t)} using ${e} with options`,l),t.playlist}}else{var g,p=p.filter(e=>e.width&&e.height),f=(Fu(p,(e,t)=>e.width-t.width),p.filter(e=>e.width===d&&e.height===h)),f=(o=f[f.length-1],f.filter(e=>e.bandwidth===o.bandwidth)[0]);let t,i;f||(g=(t=p.filter(e=>"cover"===u?e.width>d&&e.height>h:e.width>d||e.height>h)).filter(e=>e.width===t[0].width&&e.height===t[0].height),o=g[g.length-1],i=g.filter(e=>e.bandwidth===o.bandwidth)[0]);let s,r=(c.leastPixelDiffSelector&&(g=p.map(e=>(e.pixelDiff=Math.abs(e.width-d)+Math.abs(e.height-h),e)),Fu(g,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),s=g[0]),s||i||f||m||a[0]||n[0]);if(r&&r.playlist){let e="sortedPlaylistReps";return s?e="leastPixelDiffRep":i?e="resolutionPlusOneRep":f?e="resolutionBestRep":m?e="bandwidthBestRep":a[0]&&(e="enabledPlaylistReps"),Uu(`choosing ${Bu(r)} using ${e} with options`,l),r.playlist}}return Uu("could not choose a playlist with options",l),null}}function ju(){let e=this.useDevicePixelRatio&&window.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),qu({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(vu(this.tech_.el(),"width"),10)*e,playerHeight:parseInt(vu(this.tech_.el(),"height"),10)*e,playerObjectFit:this.usePlayerObjectFit?vu(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}function Hu(e){try{return new URL(e).pathname.split("/").slice(-2).join("/")}catch(e){return""}}function Vu(e,t,i){let s;var r;if(i&&i.cues)for(s=i.cues.length;s--;)(r=i.cues[s]).startTime>=e&&r.endTime<=t&&i.removeCue(r)}let zu=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:o})=>{if(t){let r=window.WebKitDataCue||window.VTTCue,a=e.metadataTrack_;if(a&&(t.forEach(e=>{let s=e.cueTime+i;!("number"!=typeof s||window.isNaN(s)||s<0)&&s<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{var t,i=new r(s,s,e.value||e.url||e.data||"");i.frame=e,i.value=e,t=i,Object.defineProperties(t.frame,{id:{get(){return E.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get(){return E.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get(){return E.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}}),a.addCue(i)})}),a.cues)&&a.cues.length){var s=a.cues,l=[];for(let e=0;e{var i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),n=Object.keys(r).sort((e,t)=>Number(e)-Number(t));n.forEach((e,t)=>{var i=r[e],e=isFinite(o)?o:e;let s=Number(n[t+1])||e;i.forEach(e=>{e.endTime=s})})}}},$u={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},Wu=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),Gu=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,E.browser.IS_ANY_SAFARI)||(e.metadataTrack_.inBandMetadataTrackDispatchType=t)},Xu=e=>"number"==typeof e&&isFinite(e),Ku=e=>{var{startOfSegment:t,duration:i,segment:s,part:r,playlist:{mediaSequence:n,id:a,segments:o=[]},mediaIndex:l,partIndex:d,timeline:h}=e,o=o.length-1;let u="mediaIndex/partIndex increment";e.getMediaInfoForTime?u=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(u="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(u+=" with independent "+e.independent);var c="number"==typeof d,e=e.segment.uri?"segment":"pre-segment",p=c?Jd({preloadSegment:s})-1:0;return e+` [${n+l}/${n+o}]`+(c?` part [${d}/${p}]`:"")+` segment start/end [${s.start} => ${s.end}]`+(c?` part start/end [${r.start} => ${r.end}]`:"")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${h}]`+` selected by [${u}]`+` playlist [${a}]`},Yu=e=>e+"TimingInfo",Qu=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:r})=>{return!(t===i||("audio"===s?(t=e.lastTimelineChange({type:"main"}))&&t.to===i:"main"!==s||!r||(t=e.pendingTimelineChange({type:"audio"}))&&t.to===i))},Ju=e=>{var t,i,s,r=e.pendingSegment_;r&&Qu({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:r.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&!!((r=e.timelineChangeController_)&&(t=r.pendingTimelineChange({type:"audio"}),r=r.pendingTimelineChange({type:"main"}),s=(i=t&&r)&&t.to!==r.to,i)&&-1!==t.from&&-1!==r.from&&s)&&(t=(i=e).timelineChangeController_.pendingTimelineChange({type:"audio"}),i=i.timelineChangeController_.pendingTimelineChange({type:"main"}),t&&i&&t.to!!e&&Math.round(e)>t+zd,ec=(e,t)=>{var i,s,r;return"hls"===t&&(t=(e=>{let s=0;return["video","audio"].forEach(function(t){t=e[t+"TimingInfo"];if(t){var{start:t,end:i}=t;let e;"bigint"==typeof t||"bigint"==typeof i?e=window.BigInt(i)-window.BigInt(t):"number"==typeof t&&"number"==typeof i&&(e=i-t),"undefined"!=typeof e&&e>s&&(s=e)}}),s="bigint"==typeof s&&s{var i,s,r;if(t)return i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),r=void 0===t.startOfSegment?t.start:t.startOfSegment,{type:e||t.type,uri:t.resolvedUri||t.uri,start:r,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class ic extends E.EventTarget{constructor(e,t=0){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Ud(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Ju(this)}),this.sourceUpdater_.on("codecschange",e=>{this.trigger(f({type:"codecschange"},e))}),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Ju(this)}),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",e=>{this.trigger(f({type:"timelinechange"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():Ju(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Ju(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return _u({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){"WAITING"!==this.state?(this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_)):(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_())}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,window.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return"undefined"!=typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&yu(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return O();if("main"===this.loaderType_){var{hasAudio:e,hasVideo:t,isMuxed:i}=e;if(t&&e&&!this.audioDisabled_&&!i)return this.sourceUpdater_.buffered();if(t)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;var i=qh(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;var i=jh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});t={resolvedUri:(s||e).resolvedUri};return s&&(t.bytes=s.bytes),t}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(t,i={}){if(t&&!(this.playlist_&&this.playlist_.endList&&t.endList&&this.playlist_.uri===t.uri)){var s,r=this.playlist_,n=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=i,"INIT"===this.state&&(t.syncInfo={mediaSequence:t.mediaSequence,time:0},"main"===this.loaderType_)&&this.syncController_.setDateTimeMappingForStart(t);let e=null;if(r&&(r.id?e=r.id:r.uri&&(e=r.uri)),this.logger_(`playlist update [${e} => ${t.id||t.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(t,this.currentTime_()),this.logger_(`Playlist update: + `)),rt(1,E),E.VERSION=M,E.options=T.prototype.options_,E.getPlayers=()=>T.players,E.getPlayer=e=>{var t=T.players;let i;if("string"==typeof e){var s=Mn(e),r=t[s];if(r)return r;i=Ye("#"+s)}else i=e;if(Ce(i)){var{player:r,playerId:s}=i;if(r||t[s])return r||t[s]}},E.getAllPlayers=()=>Object.keys(T.players).map(e=>T.players[e]).filter(Boolean),E.players=T.players,E.getComponent=g.getComponent,E.registerComponent=(e,t)=>(v.isTech(t)&&o.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),g.registerComponent.call(g,e,t)),E.getTech=v.getTech,E.registerTech=v.registerTech,E.use=function(e,t){bs[e]=bs[e]||[],bs[e].push(t)},Object.defineProperty(E,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(E.middleware,"TERMINATOR",{value:Ss,writeable:!1,enumerable:!0}),E.browser=Se,E.obj=ee,E.mergeOptions=Nn(9,"videojs.mergeOptions","videojs.obj.merge",d),E.defineLazyProperty=Nn(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Z),E.bind=Nn(9,"videojs.bind","native Function.prototype.bind",p),E.registerPlugin=Rn.registerPlugin,E.deregisterPlugin=Rn.deregisterPlugin,E.plugin=(e,t)=>(o.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Rn.registerPlugin(e,t)),E.getPlugins=Rn.getPlugins,E.getPlugin=Rn.getPlugin,E.getPluginVersion=Rn.getPluginVersion,E.addLanguage=function(e,t){return e=(""+e).toLowerCase(),E.options.languages=d(E.options.languages,{[e]:t}),E.options.languages[e]},E.log=o,E.createLogger=W,E.time=t,E.createTimeRange=Nn(9,"videojs.createTimeRange","videojs.time.createTimeRanges",jt),E.createTimeRanges=Nn(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",jt),E.formatTime=Nn(9,"videojs.formatTime","videojs.time.formatTime",Wt),E.setFormatTime=Nn(9,"videojs.setFormatTime","videojs.time.setFormatTime",zt),E.resetFormatTime=Nn(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",$t),E.parseUrl=Nn(9,"videojs.parseUrl","videojs.url.parseUrl",gi),E.isCrossOrigin=Nn(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",yi),E.EventTarget=wt,E.any=yt,E.on=mt,E.one=ft,E.off=c,E.trigger=gt,E.xhr=Pi,E.TrackList=si,E.TextTrack=Fi,E.TextTrackList=li,E.AudioTrack=qi,E.AudioTrackList=ni,E.VideoTrack=ji,E.VideoTrackList=oi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(e=>{E[e]=function(){return o.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),et[e].apply(null,arguments)}}),E.computedStyle=Nn(9,"videojs.computedStyle","videojs.dom.computedStyle",Je),E.dom=et,E.fn=Tt,E.num=$i,E.str=Bt,E.url=vi,E.Error={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"},Ti(function(e,t){ +/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */ +e.exports=function(e){function t(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var i=t(e);class s{constructor(e){let t=this;t.id=e.id;t.label=t.id;t.width=e.width;t.height=e.height;t.bitrate=e.bandwidth;t.frameRate=e.frameRate;t.enabled_=e.enabled;Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(e){t.enabled_(e)}});return t}}class n extends i["default"].EventTarget{constructor(){super();let e=this;e.levels_=[];e.selectedIndex_=-1;Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}});Object.defineProperty(e,"length",{get(){return e.levels_.length}});e[Symbol.iterator]=()=>e.levels_.values();return e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;t=new s(e);if(!(""+i in this))Object.defineProperty(this,i,{get(){return this.levels_[i]}});this.levels_.push(t);this.trigger({qualityLevel:t,type:"addqualitylevel"});return t}removeQualityLevel(i){let s=null;for(let e=0,t=this.length;ee)this.selectedIndex_--;break}if(s)this.trigger({qualityLevel:i,type:"removequalitylevel"});return s}getQualityLevelById(i){for(let e=0,t=this.length;es;e.qualityLevels.VERSION=a;return s},o=function(e){return r(this,i["default"].obj.merge({},e))};return i["default"].registerPlugin("qualityLevels",o),o.VERSION=a,o}(E)});function Un(e){return window.atob?window.atob(e):Buffer.from(e,"base64").toString("binary")}var Bn="https://example.com",Fn=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=window.location&&window.location.href||"");var i=/^\/\//.test(e),s=!window.location&&!/\/\//i.test(e),t=(e=new window.URL(e,window.location||Bn),new URL(t,e));return s?t.href.slice(Bn.length):i?t.href.slice(t.protocol.length):t.href},Qr=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){return!!this.listeners[e]&&(t=this.listeners[e].indexOf(t),this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(t,1),-1{var e=e.split("x"),t={};return e[0]&&(t.width=parseInt(e[0],10)),e[1]&&(t.height=parseInt(e[1],10)),t};class Wn extends Qr{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(i){let a,o;0!==(i=i.trim()).length&&("#"!==i[0]?this.trigger("data",{type:"uri",uri:i}):this.tagMappers.reduce((e,t)=>{t=t(i);return t===i?e:e.concat([t])},[i]).forEach(t=>{for(let e=0;ee),this.customParsers.push(e=>{if(t.exec(e))return this.trigger("data",{type:"custom",data:s(e),customType:i,segment:r}),!0})}addTagMapper({expression:t,map:i}){this.tagMappers.push(e=>t.test(e)?i(e):e)}}function Gn(t){let i={};return Object.keys(t).forEach(function(e){i[e.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase())]=t[e]}),i}function Xn(e){var t,i,s,r,n,{serverControl:e,targetDuration:a,partTargetDuration:o}=e;e&&(t="#EXT-X-SERVER-CONTROL",i="holdBack",s="partHoldBack",r=a&&3*a,n=o&&2*o,a&&!e.hasOwnProperty(i)&&(e[i]=r,this.trigger("info",{message:t+` defaulting HOLD-BACK to targetDuration * 3 (${r}).`})),r&&e[i]{o.uri||!o.parts&&!o.preloadHints||(!o.map&&l&&(o.map=l),!o.key&&d&&(o.key=d),o.timeline||"number"!=typeof c||(o.timeline=c),this.manifest.preloadSegment=o)}),this.parseStream.on("data",function(n){let t,i;if(r.manifest.definitions)for(var e in r.manifest.definitions)if(n.uri&&(n.uri=n.uri.replace(`{$${e}}`,r.manifest.definitions[e])),n.attributes)for(var s in n.attributes)"string"==typeof n.attributes[s]&&(n.attributes[s]=n.attributes[s].replace(`{$${e}}`,r.manifest.definitions[e]));({tag(){({version(){n.version&&(this.manifest.version=n.version)},"allow-cache"(){this.manifest.allowCache=n.allowed,"allowed"in n||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){var e={};"length"in n&&((o.byterange=e).length=n.length,"offset"in n||(n.offset=p)),"offset"in n&&((o.byterange=e).offset=n.offset),p=e.offset+e.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),n.title&&(o.title=n.title),0(t.programDateTime=e-1e3*t.duration,t.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(n.duration)||n.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+n.duration}):(this.manifest.targetDuration=n.duration,Xn.call(this,this.manifest))},start(){!n.attributes||isNaN(n.attributes["TIME-OFFSET"])?this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"}):this.manifest.start={timeOffset:n.attributes["TIME-OFFSET"],precise:n.attributes.PRECISE}},"cue-out"(){o.cueOut=n.data},"cue-out-cont"(){o.cueOutCont=n.data},"cue-in"(){o.cueIn=n.data},skip(){this.manifest.skip=Gn(n.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",n.attributes,["SKIPPED-SEGMENTS"])},part(){h=!0;var e=this.manifest.segments.length,t=Gn(n.attributes),t=(o.parts=o.parts||[],o.parts.push(t),t.byterange&&(t.byterange.hasOwnProperty("offset")||(t.byterange.offset=m),m=t.byterange.offset+t.byterange.length),o.parts.length-1);this.warnOnMissingAttributes_(`#EXT-X-PART #${t} for segment #`+e,n.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},"server-control"(){var e=this.manifest.serverControl=Gn(n.attributes);e.hasOwnProperty("canBlockReload")||(e.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Xn.call(this,this.manifest),e.canSkipDateranges&&!e.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){var t=this.manifest.segments.length,i=Gn(n.attributes),e=i.type&&"PART"===i.type,s=(o.preloadHints=o.preloadHints||[],o.preloadHints.push(i),!i.byterange||i.byterange.hasOwnProperty("offset")||(i.byterange.offset=e?m:0,e&&(m=i.byterange.offset+i.byterange.length)),o.preloadHints.length-1);if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${s} for segment #`+t,n.attributes,["TYPE","URI"]),i.type)for(let e=0;ee.id===t.id);this.manifest.dateRanges[e]=f(this.manifest.dateRanges[e],t),g[t.id]=f(g[t.id],t),this.manifest.dateRanges.pop()}else g[t.id]=t},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=Gn(n.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",n.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};var e,t=(e,t)=>{e in this.manifest.definitions?this.trigger("error",{message:"EXT-X-DEFINE: Duplicate name "+e}):this.manifest.definitions[e]=t};return"QUERYPARAM"in n.attributes?"NAME"in n.attributes||"IMPORT"in n.attributes?void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"}):(e=this.params.get(n.attributes.QUERYPARAM))?void t(n.attributes.QUERYPARAM,decodeURIComponent(e)):void this.trigger("error",{message:"EXT-X-DEFINE: No query param "+n.attributes.QUERYPARAM}):"NAME"in n.attributes?"IMPORT"in n.attributes?void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"}):"VALUE"in n.attributes&&"string"==typeof n.attributes.VALUE?void t(n.attributes.NAME,n.attributes.VALUE):void this.trigger("error",{message:"EXT-X-DEFINE: No value for "+n.attributes.NAME}):"IMPORT"in n.attributes?this.mainDefinitions[n.attributes.IMPORT]?void t(n.attributes.IMPORT,this.mainDefinitions[n.attributes.IMPORT]):void this.trigger("error",{message:`EXT-X-DEFINE: No value ${n.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:n.attributes,uri:n.uri,timeline:c}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",n.attributes,["BANDWIDTH","URI"])}}[n.tagType]||function(){}).call(r)},uri(){o.uri=n.uri,a.push(o),!this.manifest.targetDuration||"duration"in o||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),d&&(o.key=d),o.timeline=c,l&&(o.map=l),m=0,null!==this.lastProgramDateTime&&(o.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*o.duration),o={}},comment(){},custom(){n.segment?(o.custom=o.custom||{},o.custom[n.customType]=n.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[n.customType]=n.data)}})[n.type].call(r)})}requiredCompatibilityversion(e,t){(e=e.length&&t.call(e,function(e,t){return e===(n[t]?n[t]&i[r+t]:i[r+t])})},_a=function(r,e,n){e.forEach(function(e){for(var t in r.mediaGroups[e])for(var i in r.mediaGroups[e][t]){var s=r.mediaGroups[e][t][i];n(s,e,t,i)}})};function va(e,t){return(t=void 0===t?Object:t)&&"function"==typeof t.freeze?t.freeze(e):e}var ba=va({HTML:"text/html",isHTML:function(e){return e===ba.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Ta=va({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===Ta.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"}),Sa={assign:function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},find:function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"==typeof i.find)return i.find.call(e,t);for(var s=0;s"==e&&">")||("&"==e?"&":'"'==e&&""")||"&#"+e.charCodeAt()+";"}function ja(e,t){if(t(e))return 1;if(e=e.firstChild)do{if(ja(e,t))return 1}while(e=e.nextSibling)}function Va(){this.ownerDocument=this}function Ha(e,t,i){e&&e._inc++,i.namespaceURI===Ea.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function za(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var r=t.firstChild,n=0;r;)r=(s[n++]=r).nextSibling;s.length=n,delete s[s.length]}}}function $a(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,za(e.ownerDocument,e),t}function Wa(e){return e&&e.nodeType===x.DOCUMENT_TYPE_NODE}function Ga(e){return e&&e.nodeType===x.ELEMENT_NODE}function Xa(e){return e&&e.nodeType===x.TEXT_NODE}function Ka(e,t){var i,e=e.childNodes||[];if(!wa(e,Ga)&&!Wa(t))return i=wa(e,Wa),!(t&&i&&e.indexOf(i)>e.indexOf(t))}function Ya(e,t){var i,e=e.childNodes||[];if(!wa(e,function(e){return Ga(e)&&e!==t}))return i=wa(e,Wa),!(t&&i&&e.indexOf(i)>e.indexOf(t))}function Qa(e,t,i){if(!(s=e)||s.nodeType!==x.DOCUMENT_NODE&&s.nodeType!==x.DOCUMENT_FRAGMENT_NODE&&s.nodeType!==x.ELEMENT_NODE)throw new I(Da,"Unexpected parent node type "+e.nodeType);var s;if(i&&i.parentNode!==e)throw new I(Pa,"child not in parent");if(!(s=t)||!(Ga(s)||Xa(s)||Wa(s)||s.nodeType===x.DOCUMENT_FRAGMENT_NODE||s.nodeType===x.COMMENT_NODE||s.nodeType===x.PROCESSING_INSTRUCTION_NODE)||Wa(t)&&e.nodeType!==x.DOCUMENT_NODE)throw new I(Da,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Ja(e,t,i){var s=e.childNodes||[],r=t.childNodes||[];if(t.nodeType===x.DOCUMENT_FRAGMENT_NODE){var n=r.filter(Ga);if(1"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):_o(o,t,i,s,r.slice()),o=o.nextSibling;else for(;o;)_o(o,t,i,s,r.slice()),o=o.nextSibling;t.push("")}else t.push("/>");return;case 9:case 11:for(o=e.firstChild;o;)_o(o,t,i,s,r.slice()),o=o.nextSibling;return;case 2:return yo(t,e.name,e.value);case 3:return t.push(e.data.replace(/[<&>]/g,qa));case 4:return t.push("");case 8:return t.push("\x3c!--",e.data,"--\x3e");case 10:var _=e.publicId,v=e.systemId;return t.push("")):v&&"."!=v?t.push(" SYSTEM ",v,">"):((_=e.internalSubset)&&t.push(" [",_,"]"),t.push(">")));case 7:return t.push("");case 5:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function vo(e,t,i){e[t]=i}r.INVALID_STATE_ERR=(k[11]="Invalid state",11),r.SYNTAX_ERR=(k[12]="Syntax error",12),r.INVALID_MODIFICATION_ERR=(k[13]="Invalid modification",13),r.NAMESPACE_ERR=(k[14]="Invalid namespace",14),r.INVALID_ACCESS_ERR=(k[15]="Invalid access",15),I.prototype=Error.prototype,xa(r,I),La.prototype={length:0,item:function(e){return 0<=e&&e",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES}),To=(bo.XML_ENTITIES,Sa.NAMESPACE),sn=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,tn=new RegExp("[\\-\\.0-9"+sn.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),So=new RegExp("^"+sn.source+tn.source+"*(?::"+sn.source+tn.source+"*)?$"),wo=0,Eo=1,Co=2,ko=3,Io=4,xo=5,Ao=6,Do=7;function Po(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Po)}function Lo(){}function Oo(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function Ro(e,t,i){for(var s=e.tagName,r=null,n=e.length;n--;){var a=e[n],o=a.qName,l=a.value,o=0<(h=o.indexOf(":"))?(d=a.prefix=o.slice(0,h),u=o.slice(h+1),"xmlns"===d&&u):(d=null,"xmlns"===(u=o)&&"");a.localName=u,!1!==o&&(null==r&&(r={},No(i,i={})),i[o]=r[o]=l,a.uri=To.XMLNS,t.startPrefixMapping(o,l))}for(var d,n=e.length;n--;)(d=(a=e[n]).prefix)&&("xml"===d&&(a.uri=To.XML),"xmlns"!==d)&&(a.uri=i[d||""]);var h,u=0<(h=s.indexOf(":"))?(d=e.prefix=s.slice(0,h),e.localName=s.slice(h+1)):(d=null,e.localName=s),c=e.uri=i[d||""];if(t.startElement(c,u,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=r,1;if(t.endElement(c,u,s),r)for(d in r)Object.prototype.hasOwnProperty.call(r,d)&&t.endPrefixMapping(d)}function No(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function Mo(){this.attributeNames={}}(Po.prototype=new Error).name=Po.name,Lo.prototype={parse:function(e,t,i){var s=this.domBuilder;s.startDocument(),No(t,t={}),function(i,e,s,r,n){function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(s,t)?s[t]:"#"===t.charAt(0)?65535<(t=parseInt(t.substr(1).replace("x","0x")))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):String.fromCharCode(t):(n.error("entity not found:"+e),e)}function t(e){var t;m",y+3),v=i.substring(y+2,_).replace(/[ \t\n\r]+$/g,""),b=c.pop(),T=(_<0?(v=i.substring(y+2).replace(/[\s<].*/,""),n.error("end tag name: "+v+" is not complete:"+b.tagName),_=y+1+v.length):v.match(/\s",t);if(s){e=e.substring(t,s).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(e)return e[0].length,i.processingInstruction(e[1],e[2]),s+2}return-1}(i,y,r);break;case"!":u&&o(y),_=function(e,t,i,s){{if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(n=e.indexOf("--\x3e",t+4),t",t+9),i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3;var r,s=function(e,t){var i,s=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;i=r.exec(e);)if(s.push(i),i[1])return s}(e,t),n=s.length;if(1":switch(d){case wo:s.setTagName(e.slice(t,l));case xo:case Ao:case Do:break;case Io:case Eo:"/"===(u=e.slice(t,l)).slice(-1)&&(s.closed=!0,u=u.slice(0,-1));case Co:d===Co&&(u=o),d==Io?(n.warning('attribute "'+u+'" missed quot(")!'),a(o,u,t)):(To.isHTML(i[""])&&u.match(/^(?:disabled|checked|selected)$/i)||n.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),a(u,u,t));break;case ko:throw new Error("attribute value missed!!")}return l;case"€":h=" ";default:if(h<=" ")switch(d){case wo:s.setTagName(e.slice(t,l)),d=Ao;break;case Eo:o=e.slice(t,l),d=Co;break;case Io:var u=e.slice(t,l);n.warning('attribute "'+u+'" missed quot(")!!'),a(o,u,t);case xo:d=Ao}else switch(d){case Co:s.tagName,To.isHTML(i[""])&&o.match(/^(?:disabled|checked|selected)$/i)||n.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),a(o,o,t),t=l,d=Eo;break;case xo:n.warning('attribute space is required"'+o+'"!!');case Ao:d=Eo,t=l;break;case ko:d=Io,t=l;break;case Do:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}(i,y,E,C,a,n),k=E.length;if(!E.closed&&function(e,t,i,s){var r=s[i];null==r&&((r=e.lastIndexOf(""))",t),e=e.substring(t+1,n);if(/[&<]/.test(e))return/^script$/i.test(i)?r.characters(e,0,e.length):(e=e.replace(/&#?\w+;/g,s),r.characters(e,0,e.length)),n}return t+1}(i,_,E.tagName,a,r):_++}}catch(e){if(e instanceof Po)throw e;n.error("element parse error: "+e),_=-1}m<_?m=_:t(Math.max(y,m)+1)}}(e,t,i,s,this.errorHandler),s.endDocument()}},Mo.prototype={setTagName:function(e){if(!So.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!So.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};var en={XMLReader:Lo,ParseError:Po},Uo=Yr.DOMImplementation,Bo=Sa.NAMESPACE,Fo=en.ParseError,qo=en.XMLReader;function jo(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function Vo(e){this.options=e||{locator:{}}}function Ho(){this.cdata=!1}function zo(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function $o(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function Wo(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function Go(e,t){(e.currentElement||e.doc).appendChild(t)}Vo.prototype.parseFromString=function(e,t){var i=this.options,s=new qo,r=i.domBuilder||new Ho,n=i.errorHandler,a=i.locator,o=i.xmlns||{},t=/\/x?html?$/.test(t),l=t?bo.HTML_ENTITIES:bo.XML_ENTITIES,n=(a&&r.setDocumentLocator(a),s.errorHandler=function(s,e,r){if(!s){if(e instanceof Ho)return e;s=e}var n={},a=s instanceof Function;function t(t){var i=s[t];!i&&a&&(i=2==s.length?function(e){s(t,e)}:s),n[t]=i?function(e){i("[xmldom "+t+"]\t"+e+$o(r))}:function(){}}return r=r||{},t("warning"),t("error"),t("fatalError"),n}(n,r,a),s.domBuilder=i.domBuilder||r,t&&(o[""]=Bo.HTML),o.xml=o.xml||Bo.XML,i.normalizeLineEndings||jo);return e&&"string"==typeof e?s.parse(n(e),o,l):s.errorHandler.error("invalid doc source"),r.doc},Ho.prototype={startDocument:function(){this.doc=(new Uo).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var r=this.doc,n=r.createElementNS(e,i||t),a=s.length;Go(this,n),this.currentElement=n,this.locator&&zo(this.locator,n);for(var o=0;o!!e&&"object"==typeof e,A=(...e)=>e.reduce((t,i)=>("object"==typeof i&&Object.keys(i).forEach(e=>{Array.isArray(t[e])&&Array.isArray(i[e])?t[e]=t[e].concat(i[e]):Ko(t[e])&&Ko(i[e])?t[e]=A(t[e],i[e]):t[e]=i[e]}),t),{}),Yo=t=>Object.keys(t).map(e=>t[e]),Qo=(t,i)=>{var s=[];for(let e=t;ee.reduce((e,t)=>e.concat(t),[]),Zo=t=>{if(!t.length)return[];var i=[];for(let e=0;ee.reduce((e,t,i)=>(t[s]&&e.push(i),e),[]),tl=(e,i)=>Yo(e.reduce((t,e)=>(e.forEach(e=>{t[i(e)]=e}),t),{}));var il={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};let sl=({baseUrl:s="",source:r="",range:n="",indexRange:a=""})=>{s={uri:r,resolvedUri:Fn(s||"",r)};if(n||a){r=(n||a).split("-");let e=window.BigInt?window.BigInt(r[0]):parseInt(r[0],10),t=window.BigInt?window.BigInt(r[1]):parseInt(r[1],10);e{let t;return t="bigint"==typeof e.offset||"bigint"==typeof e.length?window.BigInt(e.offset)+window.BigInt(e.length)-window.BigInt(1):e.offset+e.length-1,e.offset+"-"+t},nl=e=>(e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),al={static(e){var{duration:t,timescale:i=1,sourceDuration:s,periodDuration:r}=e,e=nl(e.endNumber),t=t/i;return"number"==typeof e?{start:0,end:e}:"number"==typeof r?{start:0,end:r/t}:{start:0,end:s/t}},dynamic(e){var{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:r=1,duration:n,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,e=nl(e.endNumber),t=(t+i)/1e3,i=s+a,s=Math.ceil((t+o-i)*r/n),a=Math.floor((t-i-l)*r/n),o=Math.floor((t-i)*r/n);return{start:Math.max(0,a),end:"number"==typeof e?e:Math.min(s,o)}}},ol=n=>e=>{var{duration:t,timescale:i=1,periodStart:s,startNumber:r=1}=n;return{number:r+e,duration:t/i,timeline:s,time:e*t}},ll=e=>{var{type:t,duration:i,timescale:s=1,periodDuration:r,sourceDuration:n}=e,{start:a,end:o}=al[t](e),a=Qo(a,o).map(ol(e));return"static"===t&&(a[o=a.length-1].duration=("number"==typeof r?r:n)-i/s*o),a},dl=e=>{var{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:r="",periodStart:n,presentationTime:a,number:o=0,duration:l}=e;if(t)return i=sl({baseUrl:t,source:i.sourceURL,range:i.range}),(t=sl({baseUrl:t,source:t,indexRange:r})).map=i,l?(r=ll(e)).length&&(t.duration=r[0].duration,t.timeline=r[0].timeline):s&&(t.duration=s,t.timeline=n),t.presentationTime=a||n,t.number=o,[t];throw new Error(il.NO_BASE_URL)},hl=(e,i,s)=>{var r=e.sidx.map||null,n=e.sidx.duration,a=e.timeline||0,t=e.sidx.byterange,t=t.offset+t.length,o=i.timescale,l=i.references.filter(e=>1!==e.referenceType),d=[],h=e.endList?"static":"dynamic",u=e.sidx.timeline;let c=u,p=e.mediaSequence||0,m;m="bigint"==typeof i.firstOffset?window.BigInt(t)+i.firstOffset:t+i.firstOffset;for(let t=0;ttl(e,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),ml=(t,i)=>{for(let e=0;e{let r=[];return _a(e,ul,(e,t,i,s)=>{r=r.concat(e.playlists||[])}),r},fl=({playlist:i,mediaSequence:e})=>{i.mediaSequence=e,i.segments.forEach((e,t)=>{e.number=i.mediaSequence+t})},yl=({oldPlaylists:t,newPlaylists:e,timelineStarts:r})=>{e.forEach(i=>{i.discontinuitySequence=r.findIndex(function({timeline:e}){return e===i.timeline});var e=ml(t,i.attributes.NAME);if(e&&!i.sidx){let t=i.segments[0];var s=e.segments.findIndex(function(e){return Math.abs(e.presentationTime-t.presentationTime)e.timeline||e.segments.length&&i.timeline>e.segments[e.segments.length-1].timeline)&&i.discontinuitySequence--):(e.segments[s].discontinuity&&!t.discontinuity&&(t.discontinuity=!0,i.discontinuityStarts.unshift(0),i.discontinuitySequence--),fl({playlist:i,mediaSequence:e.segments[s].number}))}})},_l=({oldManifest:e,newManifest:t})=>{var i=e.playlists.concat(gl(e)),s=t.playlists.concat(gl(t));return t.timelineStarts=pl([e.timelineStarts,t.timelineStarts]),yl({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},vl=e=>e&&e.uri+"-"+rl(e.byterange),bl=e=>{e=e.reduce(function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e},{});let t=[];return Object.values(e).forEach(e=>{e=Yo(e.reduce((e,t)=>{var i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));t=t.concat(e)}),t.map(e=>(e.discontinuityStarts=el(e.segments||[],"discontinuity"),e))},Tl=(e,t)=>{var i=vl(e.sidx),t=i&&t[i]&&t[i].sidx;return t&&hl(e,t,e.sidx.resolvedUri),e},Sl=(e,t={})=>{if(Object.keys(t).length)for(var i in e)e[i]=Tl(e[i],t);return e},wl=({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:r,discontinuityStarts:n},a)=>{r={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:r,discontinuityStarts:n,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(r.contentProtection=e.contentProtection),e.serviceLocation&&(r.attributes.serviceLocation=e.serviceLocation),i&&(r.sidx=i),a&&(r.attributes.AUDIO="audio",r.attributes.SUBTITLES="subs"),r},El=({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:r})=>{"undefined"==typeof t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);var n={NAME:e.id,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1},n=(e.codecs&&(n.CODECS=e.codecs),{attributes:n,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:r,mediaSequence:i,segments:t});return e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),n},Cl=(e,n={},a=!1)=>{let o;e=e.reduce((e,t)=>{var i=t.attributes.role&&t.attributes.role.value||"",s=t.attributes.lang||"";let r=t.attributes.label||"main";e[r=s&&!t.attributes.label?t.attributes.lang+(i?` (${i})`:""):r]||(e[r]={language:s,autoselect:!0,default:"main"===i,playlists:[],uri:""});s=Tl(wl(t,a),n);return e[r].playlists.push(s),"undefined"==typeof o&&"main"===i&&((o=t).default=!0),e},{});return o||(e[Object.keys(e)[0]].default=!0),e},kl=(e,r={})=>e.reduce((e,t)=>{var i=t.attributes.label||t.attributes.lang||"text",s=t.attributes.lang||"und";return e[i]||(e[i]={language:s,default:!1,autoselect:!1,playlists:[],uri:""}),e[i].playlists.push(Tl(El(t),r)),e},{}),Il=e=>e.reduce((s,e)=>(e&&e.forEach(e=>{var{channel:t,language:i}=e;s[i]={autoselect:!1,default:!1,instreamId:t,language:i},e.hasOwnProperty("aspectRatio")&&(s[i].aspectRatio=e.aspectRatio),e.hasOwnProperty("easyReader")&&(s[i].easyReader=e.easyReader),e.hasOwnProperty("3D")&&(s[i]["3D"]=e["3D"])}),s),{}),xl=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{s={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(s.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(s.contentProtection=e.contentProtection),e.serviceLocation&&(s.attributes.serviceLocation=e.serviceLocation),i&&(s.sidx=i),s},Al=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,Dl=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,Pl=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,Ll=(e,i)=>{e.forEach(t=>{t.mediaSequence=0,t.discontinuitySequence=i.findIndex(function({timeline:e}){return e===t.timeline}),t.segments&&t.segments.forEach((e,t)=>{e.number=t})})},Ol=i=>i?Object.keys(i).reduce((e,t)=>{t=i[t];return e.concat(t.playlists)},[]):[],Rl=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:r,eventStream:n})=>{var a,o,l,d,h,u,c;return e.length?({sourceDuration:d,type:u,suggestedPresentationDelay:c,minimumUpdatePeriod:h}=e[0].attributes,a=bl(e.filter(Al)).map(xl),o=bl(e.filter(Dl)),l=bl(e.filter(Pl)),e=e.map(e=>e.attributes.captionServices).filter(Boolean),d={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:d,playlists:Sl(a,s)},0<=h&&(d.minimumUpdatePeriod=1e3*h),t&&(d.locations=t),i&&(d.contentSteering=i),"dynamic"===u&&(d.suggestedPresentationDelay=c),n&&0e),d.timelineStarts=pl(c),Ll(u,d.timelineStarts),t&&(d.mediaGroups.AUDIO.audio=t),i&&(d.mediaGroups.SUBTITLES.subs=i),e.length&&(d.mediaGroups["CLOSED-CAPTIONS"].cc=Il(e)),r?_l({oldManifest:r,newManifest:d}):d):{}},Nl=(e,t,i)=>{var{NOW:e,clientOffset:s,availabilityStartTime:r,timescale:n=1,periodStart:a=0,minimumUpdatePeriod:o=0}=e;return Math.ceil((((e+s)/1e3+o-(r+a))*n-t)/i)},Ml=(s,r)=>{var{type:n,minimumUpdatePeriod:a=0,media:o="",sourceDuration:l,timescale:d=1,startNumber:h=1,periodStart:u}=s,c=[];let p=-1;for(let i=0;ip&&(p=m);let e;e=f<0?(m=i+1)===r.length?"dynamic"===n&&0(e,t,i,s)=>{return"$$"===e?"$":"undefined"==typeof r[t]?e:(e=""+r[t],"RepresentationID"===t||(s=i?parseInt(s,10):1)<=e.length?e:new Array(s-e.length+1).join("0")+e)},Fl=(e,t)=>e.replace(Ul,Bl(t)),ql=(e,t)=>e.duration||t?e.duration?ll(e):Ml(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}],jl=(s,e)=>{let r={RepresentationID:s.id,Bandwidth:s.bandwidth||0};var{initialization:t={sourceURL:"",range:""}}=s;let n=sl({baseUrl:s.baseUrl,source:Fl(t.sourceURL,r),range:t.range});return ql(s,e).map(e=>{r.Number=e.number,r.Time=e.time;var t=Fl(s.media||"",r),i=s.timescale||1,i=s.periodStart+(e.time-(s.presentationTimeOffset||0))/i;return{uri:t,timeline:e.timeline,duration:e.duration,resolvedUri:Fn(s.baseUrl||"",t),map:n,number:e.number,presentationTime:i}})},Vl=(e,t)=>{var{baseUrl:e,initialization:i={}}=e,i=sl({baseUrl:e,source:i.sourceURL,range:i.range}),e=sl({baseUrl:e,source:t.media,range:t.mediaRange});return e.map=i,e},Hl=(r,e)=>{let{duration:t,segmentUrls:i=[],periodStart:n}=r;if(!t&&!e||t&&e)throw new Error(il.SEGMENT_TIME_UNSPECIFIED);let a=i.map(e=>Vl(r,e)),s;return t&&(s=ll(r)),(s=e?Ml(r,e):s).map((e,t)=>{var i,s;if(a[t])return t=a[t],i=r.timescale||1,s=r.presentationTimeOffset||0,t.timeline=e.timeline,t.duration=e.duration,t.number=e.number,t.presentationTime=n+(e.time-s)/i,t}).filter(e=>e)},zl=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=jl,i=A(e,t.template)):t.base?(s=dl,i=A(e,t.base)):t.list&&(s=Hl,i=A(e,t.list));var r,n,a,e={attributes:e};return s&&(r=s(i,t.segmentTimeline),i.duration?({duration:n,timescale:a=1}=i,i.duration=n/a):r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0,e.attributes=i,e.segments=r,t.base)&&i.indexRange&&(e.sidx=r[0],e.segments=[]),e},$l=e=>e.map(zl),D=(e,t)=>Zo(e.childNodes).filter(({tagName:e})=>e===t),Wl=e=>e.textContent.trim(),Gl=e=>{var t,i,s,r,n,e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);return e?([e,t,i,s,r,n]=e.slice(1),31536e3*parseFloat(e||0)+2592e3*parseFloat(t||0)+86400*parseFloat(i||0)+3600*parseFloat(s||0)+60*parseFloat(r||0)+parseFloat(n||0)):0},Xl={mediaPresentationDuration(e){return Gl(e)},availabilityStartTime(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=e)&&(e+="Z"),Date.parse(e)/1e3},minimumUpdatePeriod(e){return Gl(e)},suggestedPresentationDelay(e){return Gl(e)},type(e){return e},timeShiftBufferDepth(e){return Gl(e)},start(e){return Gl(e)},width(e){return parseInt(e,10)},height(e){return parseInt(e,10)},bandwidth(e){return parseInt(e,10)},frameRate(e){return parseFloat(e.split("/").reduce((e,t)=>e/t))},startNumber(e){return parseInt(e,10)},timescale(e){return parseInt(e,10)},presentationTimeOffset(e){return parseInt(e,10)},duration(e){var t=parseInt(e,10);return isNaN(t)?Gl(e):t},d(e){return parseInt(e,10)},t(e){return parseInt(e,10)},r(e){return parseInt(e,10)},presentationTime(e){return parseInt(e,10)},DEFAULT(e){return e}},P=e=>e&&e.attributes?Zo(e.attributes).reduce((e,t)=>{var i=Xl[t.name]||Xl.DEFAULT;return e[t.name]=i(t.value),e},{}):{},Kl={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},Yl=(e,t)=>t.length?Jo(e.map(function(s){return t.map(function(e){var t=Wl(e),i=Fn(s.baseUrl,t),e=A(P(e),{baseUrl:i});return i!==t&&!e.serviceLocation&&s.serviceLocation&&(e.serviceLocation=s.serviceLocation),e})})):e,Ql=e=>{var t=D(e,"SegmentTemplate")[0],i=D(e,"SegmentList")[0],s=i&&D(i,"SegmentURL").map(e=>A({tag:"SegmentURL"},P(e))),e=D(e,"SegmentBase")[0],r=i||t,r=r&&D(r,"SegmentTimeline")[0],n=i||e||t,n=n&&D(n,"Initialization")[0],t=t&&P(t);t&&n?t.initialization=n&&P(n):t&&t.initialization&&(t.initialization={sourceURL:t.initialization});let a={template:t,segmentTimeline:r&&D(r,"S").map(e=>P(e)),list:i&&A(P(i),{segmentUrls:s,initialization:P(n)}),base:e&&A(P(e),{initialization:P(n)})};return Object.keys(a).forEach(e=>{a[e]||delete a[e]}),a},Jl=(r,n,a)=>e=>{var t=D(e,"BaseURL"),t=Yl(n,t);let i=A(r,P(e)),s=Ql(e);return t.map(e=>({segmentInfo:A(a,s),attributes:A(i,e)}))},Zl=e=>e.reduce((e,t)=>{var i=P(t),s=(i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase()),Kl[i.schemeIdUri]);return s&&(e[s]={attributes:i},i=D(t,"cenc:pssh")[0])&&(t=Wl(i),e[s].pssh=t&&qn(t)),e},{}),ed=e=>{return"urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri?("string"!=typeof e.value?[]:e.value.split(";")).map(e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}}):"urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri?("string"!=typeof e.value?[]:e.value.split(";")).map(e=>{let i={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};var t,s;return/=/.test(e)?([t,s=""]=e.split("="),i.channel=t,i.language=e,s.split(",").forEach(e=>{var[e,t]=e.split(":");"lang"===e?i.language=t:"er"===e?i.easyReader=Number(t):"war"===e?i.aspectRatio=Number(t):"3D"===e&&(i["3D"]=Number(t))})):i.language=e,i.channel&&(i.channel="SERVICE"+i.channel),i}):void 0},td=o=>Jo(D(o.node,"EventStream").map(e=>{let n=P(e),a=n.schemeIdUri;return D(e,"Event").map(e=>{var t=P(e),i=t.presentationTime||0,s=n.timescale||1,r=t.duration||0,i=i/s+o.attributes.start;return{schemeIdUri:a,value:n.value,id:t.id,start:i,end:i+r/s,messageData:Wl(e)||t.messageData,contentEncoding:n.contentEncoding,presentationTimeOffset:n.presentationTimeOffset||0}})})),id=(n,a,o)=>e=>{var t=P(e),i=Yl(a,D(e,"BaseURL")),s=D(e,"Role")[0],s={role:P(s)};let r=A(n,t,s);t=D(e,"Accessibility")[0],s=ed(P(t)),s&&(r=A(r,{captionServices:s})),t=D(e,"Label")[0],t&&t.childNodes.length&&(s=t.childNodes[0].nodeValue.trim(),r=A(r,{label:s})),t=Zl(D(e,"ContentProtection")),Object.keys(t).length&&(r=A(r,{contentProtection:t})),s=Ql(e),t=D(e,"Representation"),e=A(o,s);return Jo(t.map(Jl(r,i,e)))},sd=(n,a)=>(e,t)=>{var i=Yl(a,D(e.node,"BaseURL")),s=A(n,{periodStart:e.attributes.start}),r=("number"==typeof e.attributes.duration&&(s.periodDuration=e.attributes.duration),D(e.node,"AdaptationSet")),e=Ql(e.node);return Jo(r.map(id(s,i,e)))},rd=(e,t)=>{return 1"number"==typeof e.start?e.start:t&&"number"==typeof t.start&&"number"==typeof t.duration?t.start+t.duration:t||"static"!==i?null:0,ad=(e,t={})=>{var{manifestUri:t="",NOW:i=Date.now(),clientOffset:s=0,eventHandler:r=function(){}}=t,n=D(e,"Period");if(!n.length)throw new Error(il.INVALID_NUMBER_OF_PERIOD);var a=D(e,"Location");let o=P(e);t=Yl([{baseUrl:t}],D(e,"BaseURL")),e=D(e,"ContentSteering");o.type=o.type||"static",o.sourceDuration=o.mediaPresentationDuration||0,o.NOW=i,o.clientOffset=s,a.length&&(o.locations=a.map(Wl));let l=[];return n.forEach((e,t)=>{var i=P(e),t=l[t-1];i.start=nd({attributes:i,priorPeriodAttributes:t?t.attributes:null,mpdType:o.type}),l.push({node:e,attributes:i})}),{locations:o.locations,contentSteeringInfo:rd(e,r),representationInfo:Jo(l.map(sd(o,t))),eventStream:Jo(l.map(td))}},od=e=>{if(""===e)throw new Error(il.DASH_EMPTY_MANIFEST);var t,i=new Xo;let s;try{t=i.parseFromString(e,"application/xml"),s=t&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!s||s&&0(e=>{e=D(e,"UTCTiming")[0];if(!e)return null;var t=P(e);switch(t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT",t.value=Date.parse(t.value);break;default:throw new Error(il.UNSUPPORTED_UTC_TIMING_SCHEME)}return t})(od(e));function dd(e,t){var i,s,r;return void 0===t&&(t=0),(e=S(e)).length-t<10||!C(e,fd,{offset:t})?t:(t+=(void 0===(s=t)&&(s=0),r=(i=S(i=e))[s+5],i=i[s+6]<<21|i[s+7]<<14|i[s+8]<<7|i[s+9],(16&r)>>4?20+i:10+i),dd(e,t))}function hd(e,t,i){var s;return i>=t.length?t.length:(s=wd(t,i,!1),C(e.bytes,s.bytes)?i:hd(e,t,i+(e=wd(t,i+s.length)).length+e.value+s.length))}function ud(e,t){i=t,t=Array.isArray(i)?i.map(function(e){return Ed(e)}):[Ed(i)],e=S(e);var i,s=[];if(t.length)for(var r=0;re.length?e.length:o+a.value),o=e.subarray(o,l);C(t[0],n.bytes)&&(1===t.length?s.push(o):s=s.concat(ud(o,t.slice(1)))),r+=n.length+a.length+o.length}return s}function cd(e,t,i,s){void 0===s&&(s=1/0),e=S(e),i=[].concat(i);for(var r,n=0,a=0;n>1&63),-1!==i.indexOf(l)&&(r=n+o),n+=o+("h264"===t?1:2)}else n++}return e.subarray(0,0)}var pd=Math.pow(2,32),md=function(e){var t,e=new DataView(e.buffer,e.byteOffset,e.byteLength);return e.getBigUint64?(t=e.getBigUint64(0))>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i},fd=S([73,68,51]),yd=function(e){return"string"==typeof e?ya(e):e},_d=function(e){return Array.isArray(e)?e.map(function(e){return yd(e)}):[yd(e)]},vd=function e(t,i,s){void 0===s&&(s=!1),i=_d(i),t=S(t);var r=[];if(i.length)for(var n=0;n>>0,o=t.subarray(n+4,n+8);if(0==a)break;a=n+a;if(a>t.length){if(s)break;a=t.length}var l=t.subarray(n+8,a);C(o,i[0])&&(1===i.length?r.push(l):r.push.apply(r,e(l,i.slice(1),s))),n=a}return r},bd={EBML:S([26,69,223,163]),DocType:S([66,130]),Segment:S([24,83,128,103]),SegmentInfo:S([21,73,169,102]),Tracks:S([22,84,174,107]),Track:S([174]),TrackNumber:S([215]),DefaultDuration:S([35,227,131]),TrackEntry:S([174]),TrackType:S([131]),FlagDefault:S([136]),CodecID:S([134]),CodecPrivate:S([99,162]),VideoTrack:S([224]),AudioTrack:S([225]),Cluster:S([31,67,182,117]),Timestamp:S([231]),TimestampScale:S([42,215,177]),BlockGroup:S([160]),BlockDuration:S([155]),Block:S([161]),SimpleBlock:S([163])},Td=[128,64,32,16,8,4,2,1],Sd=function(e){for(var t=1,i=0;it&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Bd=e=>E.log.debug?E.log.debug.bind(E,"VHS:",e+" >"):function(){};function L(...e){var t=E.obj||E;return(t.merge||t.mergeOptions).apply(t,e)}function O(...e){var t=E.time||E;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}function Fd(e,i){return Gd(e,function(e,t){return e-Wd<=i&&t+Wd>=i})}function qd(e,t){return Gd(e,function(e){return e-$d>=t})}function jd(e){if(e&&e.length&&e.end)return e.end(e.length-1)}function Vd(t,i){let s=0;if(t&&t.length)for(let e=0;e{var i=[];if(!t||!t.length)return"";for(let e=0;e "+t.end(e));return i.join(", ")},Kd=t=>{var i=[];for(let e=0;e{if(!e.preload)return e.duration;let i=0;return(e.parts||[]).forEach(function(e){i+=e.duration}),(e.preloadHints||[]).forEach(function(e){"PART"===e.type&&(i+=t.partTargetDuration)}),i},Qd=e=>(e.segments||[]).reduce((i,s,r)=>(s.parts?s.parts.forEach(function(e,t){i.push({duration:e.duration,segmentIndex:r,partIndex:t,part:e,segment:s})}):i.push({duration:s.duration,segmentIndex:r,partIndex:null,segment:s,part:null}),i),[]),Jd=e=>{e=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return e&&e.parts||[]},Zd=({preloadSegment:e})=>{var t;if(e)return{parts:e,preloadHints:t}=e,(t||[]).reduce((e,t)=>e+("PART"===t.type?1:0),0)+(e&&e.length?e.length:0)},eh=(e,t)=>{return t.endList?0:e&&e.suggestedPresentationDelay?e.suggestedPresentationDelay:(e=0Date.now()}function ah(e){return e.excludeUntil&&e.excludeUntil===1/0}function oh(e){var t=nh(e);return!e.disabled&&!t}function lh(e,t){return t.attributes&&t.attributes[e]}function dh(e,t){var i,s=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let r=!1;for(i in s){for(var n in s[i])if(r=t(s[i][n]))break;if(r)break}return!!r}let hh=(e,t)=>{if(1===e.playlists.length)return!0;let i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!oh(e)&&(e.attributes.BANDWIDTH||0)!(!e&&!t||!e&&t||e&&!t||e!==t&&(!e.id||!t.id||e.id!==t.id)&&(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)&&(!e.uri||!t.uri||e.uri!==t.uri)),ch=i=>{if(!i||!i.playlists||!i.playlists.length)return dh(i,e=>e.playlists&&e.playlists.length||e.uri);for(let e=0;eYn(e))){s=dh(i,e=>uh(t,e));if(!s)return!1}}return!0};var ph={liveEdgeDelay:eh,duration:rh,seekable:function(e,t,i){var s=t||0;let r=zd(e,t,!0,i);return null===r?O():O(s,r=r$d),m=0===o,p=p&&0<=o+$d;if(!m&&!p||e===l.length-1){if(a){if(0e+"-"+t,fh=(e,t,i)=>`placeholder-uri-${e}-${t}-`+i,yh=(r,n)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(e=>{if(r.mediaGroups[e])for(var t in r.mediaGroups[e])for(var i in r.mediaGroups[e][t]){var s=r.mediaGroups[e][t][i];n(s,e,t,i)}})},_h=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},vh=(o,e,l=fh)=>{o.uri=e;for(let e=0;e{if(!e.playlists||!e.playlists.length){if(i&&"AUDIO"===r&&!e.uri)for(let e=0;e{let t=e.playlists.length;for(;t--;){var i=e.playlists[t];_h({playlist:i,id:gh(t,i.uri)}),i.resolvedUri=Md(e.uri,i.uri),e.playlists[i.id]=i,(e.playlists[i.uri]=i).attributes.BANDWIDTH||mh.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}})(o),s=o,yh(s,e=>{e.uri&&(e.resolvedUri=Md(s.uri,e.uri))})};class bh{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){null===this.offset_&&e.length&&([e]=e,void 0!==e.programDateTime)&&(this.offset_=e.programDateTime/1e3)}setPendingDateRanges(e=[]){var t;e.length&&([t]=e,t=t.startDate.getTime(),this.trimProcessedDateRanges_(t),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map))}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];let i={},s=[];this.pendingDateRanges_.forEach((e,t)=>{this.processedDateRanges_.has(t)||(e.startTime=e.startDate.getTime()/1e3-this.offset_,e.processDateRange=()=>this.processDateRange(e),s.push(e),e.class&&(i[e.class]?(t=i[e.class].push(e),e.classListIndex=t-1):(i[e.class]=[e],e.classListIndex=0)))});for(var e of s){var t=i[e.class]||[];e.endDate?e.endTime=e.endDate.getTime()/1e3-this.offset_:e.endOnNext&&t[e.classListIndex+1]?e.endTime=t[e.classListIndex+1].startTime:e.duration?e.endTime=e.startTime+e.duration:e.plannedDuration?e.endTime=e.startTime+e.plannedDuration:e.endTime=e.startTime}return s}trimProcessedDateRanges_(i){new Map(this.processedDateRanges_).forEach((e,t)=>{e.startDate.getTime(){if(!kh(e,t))return!0;var i,t=t.attributes||{},s=e.mediaGroups.AUDIO[t.AUDIO];for(i in s)if(!s[i].uri&&!s[i].playlists)return!0;return!1})(e,t)||(t=Ih(function(e,t){if(e.mediaGroups.AUDIO&&t){var i=e.mediaGroups.AUDIO[t];if(i)for(var s in i){s=i[s];if(s.default&&s.playlists)return aa(s.playlists[0].attributes.CODECS)}}return null}(e,i.AUDIO)||[])).audio&&(s.audio=t.audio),s}let Eh=({requestType:e,request:t,error:i,parseFailure:s})=>{var r=t.status<200||299{t=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&t.AUDIO&&e.mediaGroups.AUDIO[t.AUDIO]},Ih=function(e){let s={};return e.forEach(({mediaType:e,type:t,details:i})=>{s[e]=s[e]||[],s[e].push(na(""+t+i))}),Object.keys(s).forEach(function(e){1{if(!t)return i;var s=L(t,i);if(t.preloadHints&&!i.preloadHints&&delete s.preloadHints,t.parts&&!i.parts)delete s.parts;else if(t.parts&&i.parts)for(let e=0;e{!e.resolvedUri&&e.uri&&(e.resolvedUri=Md(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Md(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Md(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Md(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=Md(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=Md(t,e.uri))})},Ph=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Lh=(e,r,t=Ph)=>{var i=L(e,{}),s=i.playlists[r.id];if(!s)return null;if(t(s,r))return null;r.segments=xh(r);let n=L(s,r);if(n.preloadSegment&&!r.preloadSegment&&delete n.preloadSegment,s.segments){if(r.skip){r.segments=r.segments||[];for(let e=0;e{var s=e.slice(),r=t.slice(),n=(i=i||0,[]);let a;for(let e=0;e{Dh(e,n.resolvedUri)});for(let e=0;e{if(t.playlists)for(let e=0;e{var i=e.segments||[],i=i[i.length-1],s=i&&i.parts&&i.parts[i.parts.length-1],s=s&&s.duration||i&&i.duration;return t&&s?1e3*s:500*(e.partTargetDuration||e.targetDuration||10)},Rh=(e,t,i)=>{if(e){let r=[];return e.forEach(e=>{var t,i,s;e.attributes&&({BANDWIDTH:t,RESOLUTION:i,CODECS:s}=e.attributes,r.push({id:e.id,bandwidth:t,resolution:i,codecs:s}))}),{type:t,isLive:i,renditions:r}}};class Nh extends Zr{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Bd("PlaylistLoader");var{withCredentials:s=!1}=i,e=(this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack,t.options_);this.customTagParsers=e&&e.customTagParsers||[],this.customTagMappers=e&&e.customTagMappers||[],this.llhls=e&&e.llhls,this.dateRangesStorage_=new bh,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){var e=this.media();e&&(this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges),(e=this.dateRangesStorage_.getDateRangesToProcess()).length)&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(e)}handleMediaupdatetimeout_(){if("HAVE_METADATA"===this.state){var t=this.media();let e=Md(this.main.uri,t.uri);this.llhls&&(e=((e,t)=>{if(!t.endList&&t.serverControl){let i={};if(t.serverControl.canBlockReload){var s,r=t.preloadSegment;let e=t.mediaSequence+t.segments.length;r&&(r=r.parts||[],-1<(s=Zd(t)-1)&&s!=r.length-1&&(i._HLS_part=s),-1{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}}playlistRequestError(e,t,i){var{uri:t,id:s}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[s],status:e.status,message:`HLS playlist request error at URL: ${t}.`,responseText:e.responseText,code:500<=e.status?4:2,metadata:Eh({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:t,manifestString:e}){try{var i=(({onwarn:t,oninfo:e,manifestString:i,customTagParsers:s=[],customTagMappers:r=[],llhls:n})=>{let a=new Kn,o=(t&&a.on("warn",t),e&&a.on("info",e),s.forEach(e=>a.addParser(e)),r.forEach(e=>a.addTagMapper(e)),a.push(i),a.end(),a.manifest);if(n||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(e){o.hasOwnProperty(e)&&delete o[e]}),o.segments&&o.segments.forEach(function(t){["parts","preloadHints"].forEach(function(e){t.hasOwnProperty(e)&&delete t[e]})})),!o.targetDuration){let e=10;o.segments&&o.segments.length&&(e=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),t&&t({message:"manifest has no targetDuration defaulting to "+e}),o.targetDuration=e}e=Jd(o);return e.length&&!o.partTargetDuration&&(s=e.reduce((e,t)=>Math.max(e,t.duration),0),t&&(t({message:"manifest has no partTargetDuration defaulting to "+s}),mh.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=s),o})({onwarn:({message:e})=>this.logger_(`m3u8-parser warn for ${t}: `+e),oninfo:({message:e})=>this.logger_(`m3u8-parser info for ${t}: `+e),manifestString:e,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length&&this.excludeAudioOnlyVariants(i.playlists),i}catch(e){this.error=e,this.error.metadata={errorType:E.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){let t=e=>{var{width:t,height:i}=(e.attributes||{}).RESOLUTION||{};return!(!t||!i)||(t=Th(e)||[],i=Ih(t),Boolean(i.video))};e.some(t)&&e.forEach(e=>{t(e)||(e.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state="HAVE_METADATA";var r={playlistInfo:{type:"media",uri:i}},t=(this.trigger({type:"playlistparsestart",metadata:r}),t||this.parseManifest_({url:i,manifestString:e})),e=(t.lastRequest=Date.now(),_h({playlist:t,uri:i,id:s}),Lh(this.main,t));this.targetDuration=t.partTargetDuration||t.targetDuration,this.pendingMedia_=null,e?(this.main=e,this.media_=this.main.playlists[s]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Oh(this.media(),!!e)),r.parsedPlaylist=Rh(this.main.playlists,r.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:r}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),window.clearTimeout(this.mediaUpdateTimeout),window.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new bh,this.off()}stopRequest(){var e;this.request&&(e=this.request,this.request=null,e.onreadystatechange=null,e.abort())}media(r,e){if(!r)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof r){if(!this.main.playlists[r])throw new Error("Unknown playlist URI: "+r);r=this.main.playlists[r]}if(window.clearTimeout(this.finalRenditionTimeout),e)e=(r.partTargetDuration||r.targetDuration)/2*1e3||5e3,this.finalRenditionTimeout=window.setTimeout(this.media.bind(this,r,!1),e);else{let s=this.state;var e=!this.media_||r.id!==this.media_.id,t=this.main.playlists[r.id];if(t&&t.endList||r.endList&&r.segments.length)this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=r,e&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===s?this.trigger("loadedmetadata"):this.trigger("mediachange"));else if(this.updateMediaUpdateTimeout_(Oh(r,!0)),e){if(this.state="SWITCHING_MEDIA",this.request){if(r.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging");let i={playlistInfo:{type:"media",uri:(this.pendingMedia_=r).uri}};this.trigger({type:"playlistrequeststart",metadata:i}),this.request=this.vhs_.xhr({uri:r.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(e,t)=>{if(this.request){if(r.lastRequest=Date.now(),r.resolvedUri=Ud(r.resolvedUri,t),e)return this.playlistRequestError(this.request,r,s);this.trigger({type:"playlistrequestcomplete",metadata:i}),this.haveMetadata({playlistString:t.responseText,url:r.uri,id:r.id}),"HAVE_MAIN_MANIFEST"===s?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}}}pause(){this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var t=this.media();e?(e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3,this.mediaUpdateTimeout=window.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e)):this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=window.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,"object"==typeof this.src)this.src.uri||(this.src.uri=window.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);else{let i={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:i}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(e,t)=>{if(this.request){if(this.request=null,e)return this.error={status:t.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:t.responseText,code:2,metadata:Eh({requestType:t.requestType,request:t,error:e})},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:i}),this.src=Ud(this.src,t),this.trigger({type:"playlistparsestart",metadata:i});e=this.parseManifest_({manifestString:t.responseText,url:this.src});i.parsedPlaylist=Rh(e.playlists,i.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:i}),this.setupInitialPlaylist(e)}})}}srcUri(){return"string"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){var t,i,s,r;this.state="HAVE_MAIN_MANIFEST",e.playlists?(this.main=e,vh(this.main,this.srcUri()),e.playlists.forEach(t=>{t.segments=xh(t),t.segments.forEach(e=>{Dh(e,t.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0])):(t=this.srcUri()||window.location.href,this.main=(i=t,s=gh(0,i),(r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:window.location.href,resolvedUri:window.location.href,playlists:[{uri:i,id:s,resolvedUri:i,attributes:{}}]}).playlists[s]=r.playlists[0],r.playlists[i]=r.playlists[0],r),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata"))}updateOrDeleteClone(e,t){var i=this.main,s=e.ID;let r=i.playlists.length;for(;r--;){var n,a,o,l,d,h=i.playlists[r];h.attributes["PATHWAY-ID"]===s&&(n=h.resolvedUri,a=h.id,t?(o=this.createCloneURI_(h.resolvedUri,e),l=gh(s,o),d=this.createCloneAttributes_(s,h.attributes),h=this.createClonePlaylist_(h,l,e,d),i.playlists[r]=h,i.playlists[l]=h,i.playlists[o]=h):i.playlists.splice(r,1),delete i.playlists[a],delete i.playlists[n])}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){let s=this.main,r=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{if(s.mediaGroups[e]&&s.mediaGroups[e][r])for(var t in s.mediaGroups[e])if(t===r){for(var i in s.mediaGroups[e][t])s.mediaGroups[e][t][i].playlists.forEach((e,t)=>{var e=s.playlists[e.id],i=e.id,e=e.resolvedUri;delete s.playlists[i],delete s.playlists[e]});delete s.mediaGroups[e][t]}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){var i=this.main,s=i.playlists.length,r=this.createCloneURI_(t.resolvedUri,e),n=gh(e.ID,r),a=this.createCloneAttributes_(e.ID,t.attributes),t=this.createClonePlaylist_(t,n,e,a);i.playlists[s]=t,i.playlists[n]=t,i.playlists[r]=t,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(l){let d=l.ID,s=l["BASE-ID"],h=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(o=>{if(h.mediaGroups[o]&&!h.mediaGroups[o][d])for(var e in h.mediaGroups[o])if(e===s){h.mediaGroups[o][d]={};for(let a in h.mediaGroups[o][e]){var t=h.mediaGroups[o][e][a];h.mediaGroups[o][d][a]=f({},t);let n=h.mediaGroups[o][d][a];var i=this.createCloneURI_(t.resolvedUri,l);n.resolvedUri=i,n.uri=i,n.playlists=[],t.playlists.forEach((e,t)=>{var i,s=h.playlists[e.id],r=fh(o,d,a),r=gh(d,r);s&&!h.playlists[r]&&(i=(s=this.createClonePlaylist_(s,r,l)).resolvedUri,h.playlists[r]=s,h.playlists[i]=s),n.playlists[t]=this.createClonePlaylist_(e,r,l)})}}})}createClonePlaylist_(e,t,i,s){i=this.createCloneURI_(e.resolvedUri,i),i={resolvedUri:i,uri:i,id:t};return e.segments&&(i.segments=[]),s&&(i.attributes=s),L(e,i)}createCloneURI_(e,t){var i,s=new URL(e),r=(s.hostname=t["URI-REPLACEMENT"].HOST,t["URI-REPLACEMENT"].PARAMS);for(i of Object.keys(r))s.searchParams.set(i,r[i]);return s.href}createCloneAttributes_(t,i){let s={"PATHWAY-ID":t};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{i[e]&&(s[e]=t)}),s}getKeyIdSet(e){var t=new Set;if(e&&e.contentProtection)for(var i in e.contentProtection)e.contentProtection[i]&&e.contentProtection[i].attributes&&e.contentProtection[i].attributes.keyId&&(i=e.contentProtection[i].attributes.keyId,t.add(i.toLowerCase()));return t}}function Mh(e,t,i,s){var r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),s(t=t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode?t:new Error("XHR Failed with a response of: "+(e&&(r||e.responseText))),e)}function Uh(){function d(e,a){e=L({timeout:45e3},e);var t=d.beforeRequest||E.Vhs.xhr.beforeRequest,i=d._requestCallbackSet||E.Vhs.xhr._requestCallbackSet||new Set;let o=d._responseCallbackSet||E.Vhs.xhr._responseCallbackSet;t&&"function"==typeof t&&(E.log.warn("beforeRequest is deprecated, use onRequest instead."),i.add(t));var s=(!0===E.Vhs.xhr.original?E:E.Vhs).xhr,r=((e,i)=>{if(e&&e.size){let t=i;return e.forEach(e=>{t=e(t)}),t}})(i,e);i.delete(t);let l=s(r||e,function(e,t){var i,s,r,n;return i=o,s=l,r=e,n=t,i&&i.size&&i.forEach(e=>{e(s,r,n)}),Mh(l,e,t,a)}),n=l.abort;return l.abort=function(){return l.aborted=!0,n.apply(l,arguments)},l.uri=e.uri,l.requestType=e.requestType,l.requestTime=Date.now(),l}return d.original=!0,d}function Bh(e){var t={};return e.byterange&&(t.Range=function(e){let t;return"bytes="+e.offset+"-"+(t="bigint"==typeof e.offset||"bigint"==typeof e.length?window.BigInt(e.offset)+window.BigInt(e.length)-window.BigInt(1):e.offset+e.length-1)}(e.byterange)),t}function Fh(e,t){return e=e.toString(16),"00".substring(0,2-e.length)+e+(t%2?" ":"")}function qh(e){return 32<=e&&e<126?String.fromCharCode(e):"."}function jh(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")}function Vh(e){return e.resolvedUri}let Hh=function(i){let s={};return Object.keys(i).forEach(e=>{var t=i[e];pa(t)?s[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:s[e]=t}),s},zh=e=>{var t,i,s=Array.prototype.slice.call(e);let r="";for(let e=0;ezh(e),textRanges:e=>{let t="",i;for(i=0;ie.transmuxedPresentationEnd-e.transmuxedPresentationStart-e.transmuxerPrependedSeconds,Gh=({playlist:e,time:t=void 0,callback:i})=>{var s,r;if(i)return e&&void 0!==t?(e=((t,i)=>{if(!i||!i.segments||0===i.segments.length)return null;let s=0,r;for(let e=0;es){if(t>s+e.duration*$h)return null;r=e}return{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:s-r.duration,type:r.videoTimingInfo?"accurate":"estimate"}})(t,e))?"estimate"===e.type?i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:e.estimatedStart}):(s={mediaSeconds:t},t=t,(r=(e=e.segment).dateTimeObject?(r=e.videoTimingInfo.transmuxerPrependedSeconds,t=t-(e.videoTimingInfo.transmuxedPresentationStart+r),new Date(e.dateTimeObject.getTime()+1e3*t)):null)&&(s.programDateTime=r.toISOString()),i(null,s)):i({message:"valid programTime was not found"}):i({message:"getProgramTime: playlist and time must be provided"});throw new Error("getProgramTime: callback must be provided")},Xh=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:r=!0,tech:n,callback:a})=>{var o,l,d;if(a)return"undefined"!=typeof e&&t&&s?t.endList||n.hasStarted_?(t=>{if(!t.segments||0===t.segments.length)return!1;for(let e=0;e{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(ia?null:{segment:s=i>new Date(n)?e:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:ph.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?"accurate":"estimate"}})(e,t))?(l=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}e=i.getTime();return(s.getTime()-e)/1e3})((o=d.segment).dateTimeObject,e),"estimate"===d.type?0===i?a({message:e+" is not buffered yet. Try again"}):(s(d.estimatedStart+l),void n.one("seeked",()=>{Xh({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:r,tech:n,callback:a})})):(d=o.start+l,n.one("seeked",()=>a(null,n.currentTime())),r&&n.pause(),void s(d))):a({message:e+" was not found in the stream"}):a({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri}):a({message:"player must be playing a live stream to start buffering"}):a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});throw new Error("seekToProgramTime: callback must be provided")},Kh=(e,t)=>{if(4===e.readyState)return t()},Yh=(e,t,r,s)=>{function n(e,t,i,s){return t.abort(),l=!0,r(e,t,i,s)}function i(e,t){var i;if(!l)return e?(e.metadata=Eh({requestType:s,request:t,error:e}),n(e,t,"",a)):(i=t.responseText.substring(a&&a.byteLength||0,t.responseText.length),a=function(){for(var e,t,i,s=arguments.length,r=new Array(s),n=0;nn(e,t,"",a)):n(null,t,i,a))}let a=[],o,l=!1;let d=t({uri:e,beforeSend(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",function({}){return Mh(e,null,{statusCode:e.status},i)})}},function(e,t){return Mh(d,e,t,i)});return d};e=E.EventTarget;function Qh(t,i){if(!Ph(t,i))return!1;if(t.sidx&&i.sidx&&(t.sidx.offset!==i.sidx.offset||t.sidx.length!==i.sidx.length))return!1;if(!t.sidx&&i.sidx||t.sidx&&!i.sidx)return!1;if(t.segments&&!i.segments||!t.segments&&i.segments)return!1;if(t.segments||i.segments)for(let e=0;e{return`placeholder-uri-${e}-${t}-`+(s.attributes.NAME||i)},Zh=({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:r})=>{e=e,i={manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:r},e=ad(od(e),i),s=$l(e.representationInfo);r=Rl({dashPlaylists:s,locations:e.locations,contentSteering:e.contentSteeringInfo,sidxMapping:i.sidxMapping,previousManifest:i.previousManifest,eventStream:e.eventStream});return vh(r,t,Jh),r},eu=(e,t,i)=>{let a=!0,o=L(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e{var r,n;e.playlists&&e.playlists.length&&(r=e.playlists[0].id,n=Lh(o,e.playlists[0],Qh))&&(s in(o=n).mediaGroups[t][i]||(o.mediaGroups[t][i][s]=e),o.mediaGroups[t][i][s].playlists[0]=o.playlists[r],a=!1)}),n=o,l=t,yh(n,(e,t,i,s)=>{l.mediaGroups[t][i]&&s in l.mediaGroups[t][i]||delete n.mediaGroups[t][i][s]}),(a=t.minimumUpdatePeriod===e.minimumUpdatePeriod&&a)?null:o},tu=(e,t)=>{return(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},iu=(e,t)=>{var i,s={};for(i in e){var r=e[i].sidx;if(r){var n=vl(r);if(!t[n])break;var a=t[n].sidxInfo;tu(a,r)&&(s[n]=t[n])}}return s};class su extends e{constructor(e,t,i={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);var{withCredentials:s=!1}=i;if(this.vhs_=t,this.withCredentials=s,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=Bd("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)}addSidxSegments_(l,r,n){let d=l.sidx&&vl(l.sidx);if(l.sidx&&d&&!this.mainPlaylistLoader_.sidxMapping_[d]){let a=Ud(l.sidx.resolvedUri),o=(t,i)=>{if(!this.requestErrored_(t,i,r)){var t=this.mainPlaylistLoader_.sidxMapping_,s=i.requestType;let e;try{e=gd(S(i.response).subarray(8))}catch(e){return e.metadata=Eh({requestType:s,request:i,parseFailure:!0}),void this.requestErrored_(e,i,r)}return t[d]={sidxInfo:l.sidx,sidx:e},hl(l,e,l.sidx.resolvedUri),n(!0)}};this.request=Yh(a,this.vhs_.xhr,(e,t,i,s)=>{var r,n;return e?o(e,t):i&&"mp4"===i?({offset:r,length:n}=l.sidx.byterange,s.length>=n+r?o(e,{response:s.subarray(r,r+n),status:t.status,uri:t.uri}):void(this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:Bh({byterange:l.sidx.byterange})},o))):(e=i||"unknown",o({status:t.status,message:`Unsupported ${e} container type for sidx segment at URL: `+a,response:"",playlist:l,internal:!0,playlistExclusionDuration:1/0,code:2},t))},"dash-sidx")}else window.clearTimeout(this.mediaRequest_),this.mediaRequest_=window.setTimeout(()=>n(!1),0)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},window.clearTimeout(this.minimumUpdatePeriodTimeout_),window.clearTimeout(this.mediaRequest_),window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){var e;this.request&&(e=this.request,this.request=null,e.onreadystatechange=null,e.abort())}media(t){if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);let i=this.state;if("string"==typeof t){if(!this.mainPlaylistLoader_.main.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.mainPlaylistLoader_.main.playlists[t]}var e=!this.media_||t.id!==this.media_.id;e&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList?(this.state="HAVE_METADATA",this.media_=t,e&&(this.trigger("mediachanging"),this.trigger("mediachange"))):e&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(t,i,e=>{this.haveMetadata({startingState:i,playlist:t})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,window.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MAIN_MANIFEST"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(window.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var t=this.media();e?(e=t?t.targetDuration/2*1e3:5e3,this.mediaUpdateTimeout=window.setTimeout(()=>this.load(),e)):this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){this.started=!0,this.isMain_?this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}):(window.clearTimeout(this.mediaRequest_),this.mediaRequest_=window.setTimeout(()=>this.haveMain_(),0))}requestMain_(s){let r={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:r}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(e,t)=>{var i;if(e&&(i=t.requestType,e.metadata=Eh({requestType:i,request:t,error:e})),this.requestErrored_(e,t))"HAVE_NOTHING"===this.state&&(this.started=!1);else{this.trigger({type:"manifestrequestcomplete",metadata:r});let e=t.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=t.responseText,t.responseHeaders&&t.responseHeaders.date?this.mainLoaded_=Date.parse(t.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=Ud(this.mainPlaylistLoader_.srcUrl,t),!e)return s(t,e);this.handleMain_(),this.syncClientServerClock_(()=>s(t,e))}})}syncClientServerClock_(r){let n=ld(this.mainPlaylistLoader_.mainXml_);return null===n?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),r()):"DIRECT"===n.method?(this.mainPlaylistLoader_.clientOffset_=n.value-Date.now(),r()):void(this.request=this.vhs_.xhr({uri:Md(this.mainPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(t,i)=>{if(this.request){var s;if(t)return s=i.requestType,this.error.metadata=Eh({requestType:s,request:i,error:t}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),r();let e;e="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):this.mainLoaded_:Date.parse(i.responseText),this.mainPlaylistLoader_.clientOffset_=e-Date.now(),r()}}))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){window.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;var e=this.mainPlaylistLoader_.main,i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:i});let s;try{s=Zh({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:E.Error.StreamingDashManifestParserError,error:e},this.trigger("error")}e&&(s=eu(e,s,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=s||e;var r=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(r&&r!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=r),(!e||s&&s.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(s),s){var{duration:r,endList:e}=s;let t=[];s.playlists.forEach(e=>{t.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})});r={duration:r,isLive:!e,renditions:t};i.parsedManifest=r,this.trigger({type:"manifestparsecomplete",metadata:i})}return Boolean(s)}updateMinimumUpdatePeriodTimeout_(){var e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(window.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){let t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=window.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,r)=>{let n=iu(e.playlists,r);return yh(e,(e,t,i,s)=>{e.playlists&&e.playlists.length&&(e=e.playlists,n=L(n,iu(e,r)))}),n})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();var t=this.mainPlaylistLoader_.main.playlists;let i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){let e=()=>{this.media().endList||(this.mediaUpdateTimeout=window.setTimeout(()=>{this.trigger("mediaupdatetimeout"),e()},Oh(this.media(),Boolean(i))))};e()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){e&&this.mainPlaylistLoader_.main.eventStream&&(e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]})),this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration))}getKeyIdSet(e){if(e.contentProtection){var t,i=new Set;for(t in e.contentProtection){var s=e.contentProtection[t].attributes["cenc:default_KID"];s&&i.add(s.replace(/-/g,"").toLowerCase())}return i}}}var R={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};function ru(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e}let nu=t=>{var i=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},X=function(e){return l(d.hdlr,re[e])},G=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),l(d.mdhd,t)},W=function(e){return l(d.mdia,G(e),X(e.type),q(e))},F=function(e){return l(d.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},q=function(e){return l(d.minf,"video"===e.type?l(d.vmhd,ne):l(d.smhd,ae),M(),Y(e))},V=function(e){for(var t=e.length,i=[];t--;)i[t]=Z(e[t]);return l.apply(null,[d.mvex].concat(i))},H=function(e){e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return l(d.mvhd,e)},K=function(e){for(var t,i=e.samples||[],s=new Uint8Array(4+i.length),r=0;r>>8),n.push(255&s[o].byteLength),n=n.concat(Array.prototype.slice.call(s[o]));for(o=0;o>>8),a.push(255&r[o].byteLength),a=a.concat(Array.prototype.slice.call(r[o]));return t=[d.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l(d.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([s.length],n,[r.length],a))),l(d.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio&&(i=e.sarRatio[0],e=e.sarRatio[1],t.push(l(d.pasp,new Uint8Array([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])))),l.apply(null,t)},pe=function(e){return l(d.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),U(e))},$=function(e){e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return l(d.tkhd,e)},J=function(e){var t,i=l(d.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(e.baseMediaDecodeTime/ve),r=Math.floor(e.baseMediaDecodeTime%ve),s=l(d.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,r>>>24&255,r>>>16&255,r>>>8&255,255&r]));return"audio"===e.type?(t=ee(e,92),l(d.traf,i,s,t)):(r=K(e),t=ee(e,r.length+92),l(d.traf,i,s,t,r))},z=function(e){return e.duration=e.duration||4294967295,l(d.trak,$(e),W(e))},Z=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),l(d.trex,t)},me=function(e,t){var i=0,s=0,r=0,n=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset)&&(n=8),[0,0,i|s|r|n,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},ge=function(e,t){var i,s,r,n,a=e.samples||[];for(t+=20+16*a.length,e=me(a,t),(s=new Uint8Array(e.length+16*a.length)).set(e),i=e.length,n=0;n>>24,s[i++]=(16711680&r.duration)>>>16,s[i++]=(65280&r.duration)>>>8,s[i++]=255&r.duration,s[i++]=(4278190080&r.size)>>>24,s[i++]=(16711680&r.size)>>>16,s[i++]=(65280&r.size)>>>8,s[i++]=255&r.size,s[i++]=r.flags.isLeading<<2|r.flags.dependsOn,s[i++]=r.flags.isDependedOn<<6|r.flags.hasRedundancy<<4|r.flags.paddingValue<<1|r.flags.isNonSyncSample,s[i++]=61440&r.flags.degradationPriority,s[i++]=15&r.flags.degradationPriority,s[i++]=(4278190080&r.compositionTimeOffset)>>>24,s[i++]=(16711680&r.compositionTimeOffset)>>>16,s[i++]=(65280&r.compositionTimeOffset)>>>8,s[i++]=255&r.compositionTimeOffset;return l(d.trun,s)},fe=function(e,t){var i,s,r,n,a=e.samples||[];for(t+=20+8*a.length,e=me(a,t),(i=new Uint8Array(e.length+8*a.length)).set(e),s=e.length,n=0;n>>24,i[s++]=(16711680&r.duration)>>>16,i[s++]=(65280&r.duration)>>>8,i[s++]=255&r.duration,i[s++]=(4278190080&r.size)>>>24,i[s++]=(16711680&r.size)>>>16,i[s++]=(65280&r.size)>>>8,i[s++]=255&r.size;return l(d.trun,i)},ee=function(e,t){return("audio"===e.type?fe:ge)(e,t)};function be(e,t){var i=xe();return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i}function r(e){for(var t=[];e--;)t.push(0);return t}function n(e){e=e||{},n.prototype.init.call(this),this.parse708captions_="boolean"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new m(0,0),new m(0,1),new m(1,0),new m(1,1)],this.parse708captions_&&(this.cc708Stream_=new p({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))}function Te(e){return 32<=e&&e<=127||160<=e&&e<=255}function a(e){this.windowNum=e,this.reset()}function Se(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new a(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)}function we(e){return null===e?"":(e=qe[e]||e,String.fromCharCode(e))}function o(){for(var e=[],t=je+1;t--;)e.push({text:"",indent:0,offset:0});return e}function Ee(e,t){var i=1;for(t$e;)e+=i*ze;return e}function Ce(e){var t,i;Ce.prototype.init.call(this),this.type_=e||"shared",this.push=function(e){"metadata"===e.type?this.trigger("data",e):"shared"!==this.type_&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=Ee(e.dts,i),e.pts=Ee(e.pts,i),t=e.dts,this.trigger("data",e))},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){t=i=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}}var ke,Ie={ftyp:B=function(){return l(d.ftyp,te,ie,te,se)},mdat:function(e){return l(d.mdat,e)},moof:function(e,t){for(var i=[],s=t.length;s--;)i[s]=J(t[s]);return l.apply(null,[d.moof,F(e)].concat(i))},moov:j=function(e){for(var t=e.length,i=[];t--;)i[t]=z(e[t]);return l.apply(null,[d.moov,H(4294967295)].concat(i).concat(V(e)))},initSegment:function(e){var t=B(),e=j(e),i=new Uint8Array(t.byteLength+e.byteLength);return i.set(t),i.set(e,t.byteLength),i}},xe=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Ae={groupNalsIntoFrames:function(e){var t,i,s=[],r=[];for(r.byteLength=0,r.nalCount=0,t=s.byteLength=r.duration=0;tMe.ONE_SECOND_IN_TS/2))){for(a=(a=Ne()[e.samplerate])||t[0].data,o=0;o=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){for(var t=[],i=0;i=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),0this.virtualRowCount;)this.rows.shift(),this.rowIdx--},a.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},a.prototype.addText=function(e){this.rows[this.rowIdx]+=e},a.prototype.backspace=function(){var e;this.isEmpty()||(e=this.rows[this.rowIdx],this.rows[this.rowIdx]=e.substr(0,e.length-1))},Se.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new a(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},Se.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Se.prototype.createTextDecoder=function(t){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(t)}catch(e){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+t+" encoding. "+e})}},function(e){e=e||{},p.prototype.init.call(this);var t,i=this,s=e.captionServices||{},r={};Object.keys(s).forEach(e=>{t=s[e],/^SERVICE/.test(e)&&(r[e]=t.encoding)}),this.serviceEncodings=r,this.current708Packet=null,this.services={},this.push=function(e){(3===e.type||null===i.current708Packet)&&i.new708Packet(),i.add708Bytes(e)}}),qe=(p.prototype=new c,p.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},p.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,t=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(t)},p.prototype.push708Packet=function(){var e,t=this.current708Packet,i=t.data,s=null,r=0,n=i[r++];for(t.seq=n>>6,t.sizeCode=63&n;r>5)&&0("0"+(255&e).toString(16)).slice(-2)).join(""),String.fromCharCode(parseInt(n,16))):(t=Fe[r=a|o]||r,4096&r&&r===t?"":String.fromCharCode(t)),l.pendingNewLine&&!l.isEmpty()&&l.newLine(this.getPts(e)),l.pendingNewLine=!1,l.addText(i),e},p.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1];return e=Te(s)&&Te(i[e+2])?this.handleText(++e,t,{isMultiByte:!0}):e},p.prototype.setCurrentWindow=function(e,t){var i=this.current708Packet.data[e];return t.setCurrentWindow(7&i),e},p.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],t=(t.setCurrentWindow(7&s),t.currentWindow),s=i[++e];return t.visible=(32&s)>>5,t.rowLock=(16&s)>>4,t.columnLock=(8&s)>>3,t.priority=7&s,s=i[++e],t.relativePositioning=(128&s)>>7,t.anchorVertical=127&s,s=i[++e],t.anchorHorizontal=s,s=i[++e],t.anchorPoint=(240&s)>>4,t.rowCount=15&s,s=i[++e],t.columnCount=63&s,s=i[++e],t.windowStyle=(56&s)>>3,t.penStyle=7&s,t.virtualRowCount=t.rowCount+1,e},p.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,t=(i[e],t.currentWindow.winAttr),s=i[++e];return t.fillOpacity=(192&s)>>6,t.fillRed=(48&s)>>4,t.fillGreen=(12&s)>>2,t.fillBlue=3&s,s=i[++e],t.borderType=(192&s)>>6,t.borderRed=(48&s)>>4,t.borderGreen=(12&s)>>2,t.borderBlue=3&s,s=i[++e],t.borderType+=(128&s)>>5,t.wordWrap=(64&s)>>6,t.printDirection=(48&s)>>4,t.scrollDirection=(12&s)>>2,t.justify=3&s,s=i[++e],t.effectSpeed=(240&s)>>4,t.effectDirection=(12&s)>>2,t.displayEffect=3&s,e},p.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},p.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},p.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var r=0;r<8;r++)i&1<>4,t.offset=(12&s)>>2,t.penSize=3&s,s=i[++e],t.italics=(128&s)>>7,t.underline=(64&s)>>6,t.edgeType=(56&s)>>3,t.fontStyle=7&s,e},p.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,t=(i[e],t.currentWindow.penColor),s=i[++e];return t.fgOpacity=(192&s)>>6,t.fgRed=(48&s)>>4,t.fgGreen=(12&s)>>2,t.fgBlue=3&s,s=i[++e],t.bgOpacity=(192&s)>>6,t.bgRed=(48&s)>>4,t.bgGreen=(12&s)>>2,t.bgBlue=3&s,s=i[++e],t.edgeRed=(48&s)>>4,t.edgeGreen=(12&s)>>2,t.edgeBlue=3&s,e},p.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=(i[e],t.currentWindow.penLoc);return t.currentWindow.pendingNewLine=!0,t=i[++e],s.row=15&t,t=i[++e],s.column=63&t,e},p.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)},{42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496}),je=14,Ve=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],m=function(e,t){m.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,r,n=32639&e.ccData;n===this.lastControlCode_?this.lastControlCode_=null:(4096==(61440&n)?this.lastControlCode_=n:n!==this.PADDING_&&(this.lastControlCode_=null),t=n>>>8,i=255&n,n!==this.PADDING_&&(n===this.RESUME_CAPTION_LOADING_?this.mode_="popOn":n===this.END_OF_CAPTION_?(this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),r=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=r,this.startPts_=e.pts):n===this.ROLL_UP_2_ROWS_?(this.rollUpRows_=2,this.setRollUp(e.pts)):n===this.ROLL_UP_3_ROWS_?(this.rollUpRows_=3,this.setRollUp(e.pts)):n===this.ROLL_UP_4_ROWS_?(this.rollUpRows_=4,this.setRollUp(e.pts)):n===this.CARRIAGE_RETURN_?(this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts):n===this.BACKSPACE_?"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1):n===this.ERASE_DISPLAYED_MEMORY_?(this.flushDisplayed(e.pts),this.displayed_=o()):n===this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=o():n===this.RESUME_DIRECT_CAPTIONING_?("paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=o()),this.mode_="paintOn",this.startPts_=e.pts):this.isSpecialCharacter(t,i)?(s=we((t=(3&t)<<8)|i),this[this.mode_](e.pts,s),this.column_++):this.isExtCharacter(t,i)?("popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),s=we((t=(3&t)<<8)|i),this[this.mode_](e.pts,s),this.column_++):this.isMidRowCode(t,i)?(this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"])):this.isOffsetControlCode(t,i)?(this.nonDisplayed_[this.row_].offset=r=3&i,this.column_+=r):this.isPAC(t,i)?(r=Ve.indexOf(7968&n),"rollUp"===this.mode_&&(r-this.rollUpRows_+1<0&&(r=this.rollUpRows_-1),this.setRollUp(e.pts,r)),r!==this.row_&&0<=r&&r<=14&&(this.clearFormatting(e.pts),this.row_=r),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&n)&&(this.column_=4*(r=(14&n)>>1),this.nonDisplayed_[this.row_].indent+=r),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])):this.isNormalChar(t)&&(0===i&&(i=null),s=we(t),s+=we(i),this[this.mode_](e.pts,s),this.column_+=s.length)))}},c=(m.prototype=new c,m.prototype.flushDisplayed=function(e){let i=e=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+e+"."})},s=[];this.displayed_.forEach((e,t)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){i(t)}e.text.length&&s.push({text:e.text,line:t+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&i(t)}),s.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,content:s,stream:this.name_})},m.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=o(),this.nonDisplayed_=o(),this.lastControlCode_=null,this.column_=0,this.row_=je,this.rollUpRows_=2,this.formatting_=[]},m.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},m.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&48<=t&&t<=63},m.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&32<=t&&t<=63},m.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&32<=t&&t<=47},m.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&33<=t&&t<=35},m.prototype.isPAC=function(e,t){return e>=this.BASE_&&e"},"");this[this.mode_](e,t)},m.prototype.clearFormatting=function(e){var t;this.formatting_.length&&(t=this.formatting_.reverse().reduce(function(e,t){return e+""},""),this.formatting_=[],this[this.mode_](e,t))},m.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;this.nonDisplayed_[this.row_].text=i+=t},m.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;this.displayed_[this.row_].text=i+=t},m.prototype.shiftRowsUp_=function(){for(var e=0;e{if(e)for(var s=i;s>>2,o.timeStamp=a=(a*=4)+(3&n[7]),void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)),t.frames.push(o),(i=i+10+s)>>4&&(i+=e[i]+1),0===t.pid)t.type="pat",s(e.subarray(i),t),this.trigger("data",t);else if(t.pid===this.pmtPid)for(t.type="pmt",s(e.subarray(i),t),this.trigger("data",t);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,i,t]):this.processPes_(e,i,t)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=S.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=S.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new st,Ge.STREAM_TYPES={h264:27,adts:15},(Xe=function(){function s(e,t,i){var s,r=new Uint8Array(e.size),n={type:t},a=0,o=0;if(e.data.length&&!(e.size<9)){for(n.trackId=e.data[0].pid,a=0;a>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i)&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1),t.data=e.subarray(9+e[8]))};Xe.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var e,t;switch(i.streamType){case S.H264_STREAM_TYPE:e=n,t="video";break;case S.ADTS_STREAM_TYPE:e=a,t="audio";break;case S.METADATA_STREAM_TYPE:e=o,t="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&s(e,t,!0),e.data.push(i),e.size+=i.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]};null!==(t=i.programMapTable).video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),r=!0,l.trigger("data",e)}})[i.type]()},this.reset=function(){n.size=0,n.data.length=0,a.size=0,a.data.length=0,this.trigger("reset")},this.flushStreams_=function(){s(n,"video"),s(a,"audio"),s(o,"timed-metadata")},this.flush=function(){var e;!r&&t&&(e={type:"metadata",tracks:[]},null!==t.video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),l.trigger("data",e)),r=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new st,{PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:rt,TransportParseStream:Ge,ElementaryStream:Xe,TimestampRolloverStream:g,CaptionStream:T.CaptionStream,Cea608Stream:T.Cea608Stream,Cea708Stream:T.Cea708Stream,MetadataStream:v});for(Ke in S)S.hasOwnProperty(Ke)&&(nt[Ke]=S[Ke]);var at,ot,st=nt,g=t,lt=u.ONE_SECOND_IN_TS,dt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],ht=function(l){var d,h=0;ht.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:`adts skiping bytes ${e} to ${t} in frame ${h} outside syncword`})},this.push=function(e){var t,i,s,r,n,a,o=0;if(l||(h=0),"audio"===e.type){for(d&&d.length?(s=d,(d=new Uint8Array(s.byteLength+e.data.byteLength)).set(s),d.set(e.data,s.byteLength)):d=e.data;o+7>5,n=(r=1024*(1+(3&d[o+6])))*lt/dt[(60&d[o+2])>>>2],d.byteLength-o>>6&3),channelcount:(1&d[o+2])<<2|(192&d[o+3])>>>6,samplerate:dt[(60&d[o+2])>>>2],samplingfrequencyindex:(60&d[o+2])>>>2,samplesize:16,data:d.subarray(o+7+i,o+t)}),h++,o+=t}"number"==typeof a&&(this.skipWarn_(a,o),a=null),d=d.subarray(o)}},this.flush=function(){h=0,this.trigger("done")},this.reset=function(){d=void 0,this.trigger("reset")},this.endTimeline=function(){d=void 0,this.trigger("endedtimeline")}},T=(ht.prototype=new g,ht),v=t,ut=function(s){var r=s.byteLength,n=0,a=0;this.length=function(){return 8*r},this.bitsAvailable=function(){return 8*r+a},this.loadWord=function(){var e=s.byteLength-r,t=new Uint8Array(4),i=Math.min(4,r);if(0===i)throw new Error("no bytes available");t.set(s.subarray(e,e+i)),n=new DataView(t.buffer).getUint32(0),a=8*i,r-=i},this.skipBits=function(e){var t;e>>32-t;return 0<(a-=t)?n<<=t:0>>e))return n<<=e,a-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},ct=function(){var s,r,n=0;ct.prototype.init.call(this),this.push=function(e){for(var t,i=(r=r?((t=new Uint8Array(r.byteLength+e.data.byteLength)).set(r),t.set(e.data,r.byteLength),t):e.data).byteLength;n>4?20+i:10+i},ft=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=gt(e,t),ft(e,t))},yt=function(e,t,i){for(var s="",r=t;r=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:gt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5;return 6144&e[t+3]|e[t+4]<<3|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5>>2];t++}return null},parseAacTimestamp:function(e){var t,i=10;64&e[5]&&(i=(i+=4)+pt(e.subarray(10,14)));do{if((t=pt(e.subarray(i+4,i+8)))<1)return null;if("PRIV"===String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]))for(var s,r,n=e.subarray(i+10,i+t+10),a=0;a>>2,(r*=4)+(3&s[7]);break}}while((i=i+10+t)n.length)break;t={type:"timed-metadata",data:n.subarray(r,r+s)},this.trigger("data",t),r+=s}else if(255==(255&n[r])&&240==(240&n[r+1])){if(n.length-r<7)break;if(r+(s=vt.parseAdtsSize(n,r))>n.length)break;t={type:"audio",data:n.subarray(r,r+s),pts:a,dts:a},this.trigger("data",t),r+=s}else r++;n=0=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(a=this.videoTrack.timelineStartInfo.pts,Ut.forEach(function(e){n.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(a=this.audioTrack.timelineStartInfo.pts,Mt.forEach(function(e){n.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?n.type=this.pendingTracks[0].type:n.type="combined",this.emittedTracks+=this.pendingTracks.length,e=It.initSegment(this.pendingTracks),n.initSegment=new Uint8Array(e.byteLength),n.initSegment.set(e),n.data=new Uint8Array(this.pendingBytes),s=0;s=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},kt.prototype.setRemux=function(e){this.remuxTracks=e},(Ct=function(s){var r,n,a=this,i=!0;Ct.prototype.init.call(this),s=s||{},this.baseMediaDecodeTime=s.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};(this.transmuxPipeline_=t).type="aac",t.metadataStream=new E.MetadataStream,t.aacStream=new Ot,t.audioTimestampRolloverStream=new E.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new E.TimestampRolloverStream("timed-metadata"),t.adtsStream=new Pt,t.coalesceStream=new kt(s,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(e){"timed-metadata"!==e.type&&"audio"!==e.type||t.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:a.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new Ft(n,s),t.audioSegmentStream.on("log",a.getLogTrigger_("audioSegmentStream")),t.audioSegmentStream.on("timingInfo",a.trigger.bind(a,"audioTimingInfo")),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream),a.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!r}))}),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done")),Tt(this,t)},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new E.MetadataStream,i.packetStream=new E.TransportPacketStream,i.parseStream=new E.TransportParseStream,i.elementaryStream=new E.ElementaryStream,i.timestampRolloverStream=new E.TimestampRolloverStream,i.adtsStream=new Pt,i.h264Stream=new Lt,i.captionStream=new E.CaptionStream(s),i.coalesceStream=new kt(s,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(e){var t;if("metadata"===e.type){for(t=e.tracks.length;t--;)r||"video"!==e.tracks[t].type?n||"audio"!==e.tracks[t].type||((n=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=a.baseMediaDecodeTime):(r=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=a.baseMediaDecodeTime;r&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new Et(r,s),i.videoSegmentStream.on("log",a.getLogTrigger_("videoSegmentStream")),i.videoSegmentStream.on("timelineStartInfo",function(e){n&&!s.keepOriginalTimestamps&&(n.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts-a.baseMediaDecodeTime))}),i.videoSegmentStream.on("processedGopsInfo",a.trigger.bind(a,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",a.trigger.bind(a,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),i.videoSegmentStream.on("timingInfo",a.trigger.bind(a,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Ft(n,s),i.audioSegmentStream.on("log",a.getLogTrigger_("audioSegmentStream")),i.audioSegmentStream.on("timingInfo",a.trigger.bind(a,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",a.trigger.bind(a,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),a.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!r})}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",function(e){e.dispatchType=i.metadataStream.dispatchType,a.trigger("id3Frame",e)}),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done")),Tt(this,i)},this.setBaseMediaDecodeTime=function(e){var t=this.transmuxPipeline_;s.keepOriginalTimestamps||(this.baseMediaDecodeTime=e),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,w.clearDtsInfo(n),t.audioTimestampRolloverStream)&&t.audioTimestampRolloverStream.discontinuity(),r&&(t.videoSegmentStream&&(t.videoSegmentStream.gopCache_=[]),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,w.clearDtsInfo(r),t.captionStream.reset()),t.timestampRolloverStream&&t.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(e){var t=this.transmuxPipeline_;s.remux=e,t&&t.coalesceStream&&t.coalesceStream.setRemux(e)},this.alignGopsWith=function(e){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(t){var i=this;return function(e){e.stream=t,i.trigger("log",e)}},this.push=function(e){var t;i&&((t=Rt(e))&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1),this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new _t;function qt(e){var t="";return(t+=String.fromCharCode(e[0]))+String.fromCharCode(e[1])+String.fromCharCode(e[2])+String.fromCharCode(e[3])}function jt(e,t){var i,s,r,n=[];if(!t.length)return null;for(i=0;i>>0},Pe=function(e){return("00"+e.toString(16)).slice(-2)},Wt=t,Gt=qt,Xt=t,Kt=i.getUint64,Yt=i.getUint64,Qt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Jt=i.getUint64,Zt=qt,k={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:I(e.subarray(78,e.byteLength))}},avcC:function(e){for(var t,i,s=new DataView(e.buffer,e.byteOffset,e.byteLength),r={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},n=31&e[5],a=6,o=0;o>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={majorBrand:Zt(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},s=8;sMALFORMED DATA");else switch(31&e[r]){case 1:s.push("slice_layer_without_partitioning_rbsp");break;case 5:s.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:s.push("sei_rbsp");break;case 7:s.push("seq_parameter_set_rbsp");break;case 8:s.push("pic_parameter_set_rbsp");break;case 9:s.push("access_unit_delimiter_rbsp");break;default:s.push("UNKNOWN NAL - "+e[r]&31)}return s}(e)}},mdhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,e={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===e.version?(e.creationTime=C(t.getUint32(i+=4)),e.modificationTime=C(t.getUint32(i+=8)),e.timescale=t.getUint32(i+=4),e.duration=t.getUint32(i+=8)):(e.creationTime=C(t.getUint32(i)),e.modificationTime=C(t.getUint32(i+=4)),e.timescale=t.getUint32(i+=4),e.duration=t.getUint32(i+=4)),t=t.getUint16(i+=4),e.language+=String.fromCharCode(96+(t>>10)),e.language+=String.fromCharCode(96+((992&t)>>5)),e.language+=String.fromCharCode(96+(31&t)),e},mdia:function(e){return{boxes:I(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:I(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),t={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return 28>4,isDependedOn:(12&e[i])>>2,hasRedundancy:3&e[i]});return t},sidx:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12,r=(0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=Yt(e.subarray(s)),i.firstOffset=Yt(e.subarray(s+8)),s+=16),t.getUint16(s+=2));for(s+=2;0>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:I(e)}},ctts:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),compositionOffsets:[]},s=t.getUint32(4),r=8;s;r+=8,s--)i.compositionOffsets.push({sampleCount:t.getUint32(r),sampleOffset:t[0===i.version?"getUint32":"getInt32"](r+4)});return i},stss:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),syncSamples:[]},s=t.getUint32(4),r=8;s;r+=4,s--)i.syncSamples.push(t.getUint32(r));return i},stco:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},s=t.getUint32(4),r=8;s;r+=4,s--)i.chunkOffsets.push(t.getUint32(r));return i},stsc:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=t.getUint32(4),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]},r=8;i;r+=12,i--)s.sampleToChunks.push({firstChunk:t.getUint32(r),samplesPerChunk:t.getUint32(r+4),sampleDescriptionIndex:t.getUint32(r+8)});return s},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:I(e.subarray(8))}},stsz:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:t.getUint32(4),entries:[]},s=12;s>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:zt,"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}},I=function(e){for(var t,i,s,r,n,a=0,o=[],l=new ArrayBuffer(e.length),d=new Uint8Array(l),h=0;h":i+"<\n"+t.map(function(e){return r+" "+e}).join("\n")+"\n"+r+" >":i+"<>":i+JSON.stringify(e,null,2).split("\n").map(function(e,t){return 0===t?e:r+" "+e}).join("\n")}).join("\n")+(s.boxes?"\n"+ei(s.boxes,t+1):"")}).join("\n")},Le={inspect:I,textify:ei,parseType:Zt,findBox:jt,parseTraf:k.traf,parseTfdt:k.tfdt,parseHdlr:k.hdlr,parseTfhd:k.tfhd,parseTrun:k.trun,parseSidx:k.sidx},ti=function(e){for(var t=0,i=String.fromCharCode(e[t]),s="";"\0"!==i;)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i},ii=i.getUint64,si=function(e){return void 0!==e||null!==e},st="undefined"!=typeof window?window:"undefined"!=typeof ye?ye:"undefined"!=typeof self?self:{},T=st,ri=t,ni=Pe,x=jt,A=qt,ai={parseEmsgBox:function(e){var t,i,s,r,n,a,o,l=4,d=e[0],h=(0===d?(l=(l+=(r=ti(e.subarray(l))).length)+(n=ti(e.subarray(l))).length,s=(h=new DataView(e.buffer)).getUint32(l),o=h.getUint32(l+=4),t=h.getUint32(l+=4),i=h.getUint32(l+=4),l+=4):1===d&&(s=(h=new DataView(e.buffer)).getUint32(l),a=ii(e.subarray(l+=4)),t=h.getUint32(l+=8),i=h.getUint32(l+=4),l=(l=(l+=4)+(r=ti(e.subarray(l))).length)+(n=ti(e.subarray(l))).length),{scheme_id_uri:r,value:n,timescale:s||1,presentation_time:a,presentation_time_delta:o,event_duration:t,id:i,message_data:new Uint8Array(e.subarray(l,e.byteLength))});return n="\0"!==(r=h).scheme_id_uri,a=0===(s=d)&&si(r.presentation_time_delta)&&n,o=1===s&&si(r.presentation_time)&&n,!(1>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase()),x(e,["mdia","mdhd"])[0]);s&&(i.timescale=pi(s)),n.push(i)}),n},getTimescaleFromMediaHeader:pi,getEmsgID3:function(e,i=0){return x(e,["emsg"]).map(e=>{var e=ai.parseEmsgBox(new Uint8Array(e)),t=ci(e.message_data);return{cueTime:ai.scaleTime(e.presentation_time,e.timescale,e.presentation_time_delta,i),duration:ai.scaleTime(e.event_duration,e.timescale),frames:t}})}};let gi=Le.parseTrun,fi=mi.findBox;var yi=T,g={getMdatTrafPairs:function(e){var i=fi(e,["moof","traf"]),e=fi(e,["mdat"]),s=[];return e.forEach(function(e,t){t=i[t];s.push({mdat:e,traf:t})}),s},parseSamples:function(e,t,i){var s=t,r=i.defaultSampleDuration||0,n=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach(function(e){e=gi(e).samples;e.forEach(function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=n),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof s?(e.pts=s+yi.BigInt(e.compositionTimeOffset),s+=yi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)}),o=o.concat(e)}),o}},_i=Re.discardEmulationPreventionBytes,vi=c.CaptionStream,bi=jt,Ti=Vt,Si=Ht,{getMdatTrafPairs:wi,parseSamples:Ei}=g,Ci=function(e,t){for(var i=e,s=0;s>>4&&(t+=e[4]+1),t}function Mi(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}}var Ui=function(){let d=9e4;this.init=function(e){e=D(e,["moov","trak","mdia","mdhd"])[0];e&&(d=Di(e))},this.parseSegment=function(e){let l=[];e=Li(e);let n=0;return e.forEach(function(e){let i=e.mdat;var e=e.traf,s=D(e,["tfdt"])[0],r=D(e,["tfhd"])[0],e=D(e,["trun"]);if(s&&(s=Ai(s),n=s.baseMediaDecodeTime),e.length&&r){s=Pi(e,n,r);let t=0;s.forEach(function(a){let o=new TextDecoder("utf-8");var e=i.slice(t,t+a.size);D(e,["vtte"])[0]||D(e,["vttc"]).forEach(function(e){var t=D(e,["payl"])[0],e=D(e,["sttg"])[0],i=a.pts/d,s=(a.pts+a.duration)/d;let r,n;if(t)try{r=o.decode(t)}catch(e){}if(e)try{n=o.decode(e)}catch(e){}a.duration&&r&&l.push({cueText:r,start:i,end:s,settings:n})}),t+=a.size})}}),l}},Bi=He,Fi=He,P=Ye,L={},O=(L.ts={parseType:function(e,t){e=Oi(e);return 0===e?"pat":e===t?"pmt":t?"pes":null},parsePat:function(e){var t=Ri(e),i=4+Ni(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ri(e),s=4+Ni(e);if(i&&(s+=e[s]+1),1&e[s+5]){for(var r=3+((15&e[s+1])<<8|e[s+2])-4,n=12+((15&e[s+10])<<8|e[s+11]);n=e.byteLength?null:(i=null,192&(s=e[t+7])&&((i={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&s)&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1),i)},videoPacketContainsKeyFrame:function(e){for(var t=4+Ni(e),i=e.subarray(t),s=0,r=0,n=!1;re.length?s=!0:(null===a&&(t=e.subarray(l,l+o),a=L.aac.parseAacTimestamp(t)),l+=o);break;case"audio":e.length-l<7?s=!0:(o=L.aac.parseAdtsSize(e,l))>e.length?s=!0:(null===n&&(t=e.subarray(l,l+o),n=L.aac.parseSampleRate(t)),r++,l+=o);break;default:l++}if(s)return null}return null===n||null===a?null:{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*(i=O/n),pts:a+1024*r*i}]}}:function(e){var t,i={pid:null,table:null},s={};for(t in qi(e,i),i.table)if(i.table.hasOwnProperty(t))switch(i.table[t]){case Fi.H264_STREAM_TYPE:s.video=[],Vi(e,i,s),0===s.video.length&&delete s.video;break;case Fi.ADTS_STREAM_TYPE:s.audio=[],ji(e,i,s),0===s.audio.length&&delete s.audio}return s})(e);return e&&(e.audio||e.video)?(t=t,(i=e).audio&&i.audio.length&&("undefined"!=typeof(s=t)&&!isNaN(s)||(s=i.audio[0].dts),i.audio.forEach(function(e){e.dts=P(e.dts,s),e.pts=P(e.pts,s),e.dtsTime=e.dts/O,e.ptsTime=e.pts/O})),i.video&&i.video.length&&("undefined"!=typeof(r=t)&&!isNaN(r)||(r=i.video[0].dts),i.video.forEach(function(e){e.dts=P(e.dts,r),e.pts=P(e.pts,r),e.dtsTime=e.dts/O,e.ptsTime=e.pts/O}),i.firstKeyFrame)&&((t=i.firstKeyFrame).dts=P(t.dts,r),t.pts=P(t.pts,r),t.dtsTime=t.dts/O,t.ptsTime=t.pts/O),e):null};class zi{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){var i,e;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new $t(this.options),i=this.self,(e=this.transmuxer).on("data",function(e){var t=e.initSegment,t=(e.initSegment={data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength},e.data);e.data=t.buffer,i.postMessage({action:"data",segment:e,byteOffset:t.byteOffset,byteLength:t.byteLength},[e.data])}),e.on("done",function(e){i.postMessage({action:"done"})}),e.on("gopInfo",function(e){i.postMessage({action:"gopInfo",gopInfo:e})}),e.on("videoSegmentTimingInfo",function(e){var t={start:{decode:u.videoTsToSeconds(e.start.dts),presentation:u.videoTsToSeconds(e.start.pts)},end:{decode:u.videoTsToSeconds(e.end.dts),presentation:u.videoTsToSeconds(e.end.pts)},baseMediaDecodeTime:u.videoTsToSeconds(e.baseMediaDecodeTime)};e.prependedContentDuration&&(t.prependedContentDuration=u.videoTsToSeconds(e.prependedContentDuration)),i.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}),e.on("audioSegmentTimingInfo",function(e){var t={start:{decode:u.videoTsToSeconds(e.start.dts),presentation:u.videoTsToSeconds(e.start.pts)},end:{decode:u.videoTsToSeconds(e.end.dts),presentation:u.videoTsToSeconds(e.end.pts)},baseMediaDecodeTime:u.videoTsToSeconds(e.baseMediaDecodeTime)};e.prependedContentDuration&&(t.prependedContentDuration=u.videoTsToSeconds(e.prependedContentDuration)),i.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:t})}),e.on("id3Frame",function(e){i.postMessage({action:"id3Frame",id3Frame:e})}),e.on("caption",function(e){i.postMessage({action:"caption",caption:e})}),e.on("trackinfo",function(e){i.postMessage({action:"trackinfo",trackInfo:e})}),e.on("audioTimingInfo",function(e){i.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:u.videoTsToSeconds(e.start),end:u.videoTsToSeconds(e.end)}})}),e.on("videoTimingInfo",function(e){i.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:u.videoTsToSeconds(e.start),end:u.videoTsToSeconds(e.end)}})}),e.on("log",function(e){i.postMessage({action:"log",log:e})})}pushMp4Captions(e){this.captionParser||(this.captionParser=new xi,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),e=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:e&&e.captions||[],logs:e&&e.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Ui);e=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(e)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Ui);var e=new Uint8Array(e.data,e.byteOffset,e.byteLength),t=this.webVttParser.parseSegment(e);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:t||[],data:e.buffer},[e.buffer])}probeMp4StartTime({timescales:e,data:t}){e=mi.startTime(e,t);this.self.postMessage({action:"probeMp4StartTime",startTime:e,data:t},[t.buffer])}probeMp4Tracks({data:e}){var t=mi.tracks(e);this.self.postMessage({action:"probeMp4Tracks",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){t=mi.getEmsgID3(e,t);this.self.postMessage({action:"probeEmsgID3",id3Frames:t,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){t="number"!=typeof t||isNaN(t)?void 0:t*u.ONE_SECOND_IN_TS,t=Hi(e,t);let i=null;t&&((i={hasVideo:t.video&&2===t.video.length||!1,hasAudio:t.audio&&2===t.audio.length||!1}).hasVideo&&(i.videoStart=t.video[0].ptsTime),i.hasAudio)&&(i.audioStart=t.audio[0].ptsTime),this.self.postMessage({action:"probeTs",result:i,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){e=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(e)}reset(){this.transmuxer.reset()}setTimestampOffset(e){e=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(u.secondsToVideoTs(e)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(u.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new zi(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new zi(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));let hu=(e,t,i)=>{var{type:s,initSegment:r,captions:n,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:d}=e.data.segment,t=(t.buffer.push({captions:n,captionStreams:a,metadata:o}),e.data.segment.boxes||{data:e.data.segment.data}),n={type:s,data:new Uint8Array(t.data,t.data.byteOffset,t.data.byteLength),initSegment:new Uint8Array(r.data,r.byteOffset,r.byteLength)};"undefined"!=typeof l&&(n.videoFrameDtsTime=l),"undefined"!=typeof d&&(n.videoFramePtsTime=d),i(n)},uu=({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)},cu=(e,t)=>{t.gopInfo=e.data.gopInfo},pu=t=>{let{transmuxer:i,bytes:e,audioAppendStart:s,gopsToAlignWith:r,remux:n,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:d,onVideoSegmentTimingInfo:h,onAudioSegmentTimingInfo:u,onId3:c,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y,segment:_,triggerSegmentEventFn:v}=t,b={buffer:[]},T=y;var S,w;i.onmessage=e=>{i.currentTransmux!==t||("data"===e.data.action&&hu(e,b,a),"trackinfo"===e.data.action&&o(e.data.trackInfo),"gopInfo"===e.data.action&&cu(e,b),"audioTimingInfo"===e.data.action&&l(e.data.audioTimingInfo),"videoTimingInfo"===e.data.action&&d(e.data.videoTimingInfo),"videoSegmentTimingInfo"===e.data.action&&h(e.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===e.data.action&&u(e.data.audioSegmentTimingInfo),"id3Frame"===e.data.action&&c([e.data.id3Frame],e.data.id3Frame.dispatchType),"caption"===e.data.action&&p(e.data.caption),"endedtimeline"===e.data.action&&(T=!1,g()),"log"===e.data.action&&f(e.data.log),"transmuxed"!==e.data.type)||T||(i.onmessage=null,uu({transmuxedData:b,callback:m}),mu(i))},i.onerror=()=>{var e={message:"Received an error message from the transmuxer worker",metadata:{errorType:E.Error.StreamingFailedToTransmuxSegment,segmentInfo:ic({segment:_})}};m(null,e)},s&&i.postMessage({action:"setAudioAppendStart",appendStart:s}),Array.isArray(r)&&i.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),"undefined"!=typeof n&&i.postMessage({action:"setRemux",remux:n}),e.byteLength&&(S=e instanceof ArrayBuffer?e:e.buffer,w=e instanceof ArrayBuffer?0:e.byteOffset,v({type:"segmenttransmuxingstart",segment:_}),i.postMessage({action:"push",data:S,byteOffset:w,byteLength:e.byteLength},[S])),y&&i.postMessage({action:"endTimeline"}),i.postMessage({action:"flush"})},mu=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():pu(e.currentTransmux))},gu=(e,t)=>{e.postMessage({action:t}),mu(e)},fu=(e,t)=>{t.currentTransmux?t.transmuxQueue.push(gu.bind(null,t,e)):(t.currentTransmux=e,gu(t,e))};let yu=e=>{e.transmuxer.currentTransmux?e.transmuxer.transmuxQueue.push(e):(e.transmuxer.currentTransmux=e,pu(e))};var _u=e=>{fu("reset",e)},vu=(yu,e=>{let t=new du,i=(t.currentTransmux=null,t.transmuxQueue=[],t.terminate);return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:"init",options:e}),t});function bu(e,t){return(e=e&&window.getComputedStyle(e))?e[t]:""}function Tu(e,t){let i,s;return i=(i=e.attributes.BANDWIDTH?e.attributes.BANDWIDTH:i)||window.Number.MAX_VALUE,s=(s=t.attributes.BANDWIDTH?t.attributes.BANDWIDTH:s)||window.Number.MAX_VALUE,i-s}let Su=function(t){let i=t.transmuxer,s=t.endAction||t.action,r=t.callback;var e,n=f({},t,{endAction:null,transmuxer:null,callback:null});let a=e=>{e.data.action===s&&(i.removeEventListener("message",a),e.data.data&&(e.data.data=new Uint8Array(e.data.data,t.byteOffset||0,t.byteLength||e.data.data.byteLength),t.data)&&(t.data=e.data.data),r(e.data))};i.addEventListener("message",a),t.data?(e=t.data instanceof ArrayBuffer,n.byteOffset=e?0:t.data.byteOffset,n.byteLength=t.data.byteLength,e=[e?t.data:t.data.buffer],i.postMessage(n,e)):i.postMessage(n)},wu={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Eu="wvtt",Cu=e=>{e.forEach(e=>{e.abort()})},ku=e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}),Iu=e=>{var t=e.target,t={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return t.bytesReceived=e.loaded,t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3),t},xu=(e,t)=>{var i=t.requestType,i=Eh({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:wu.TIMEOUT,xhr:t,metadata:i}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:wu.ABORTED,xhr:t,metadata:i}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:wu.FAILURE,xhr:t,metadata:i}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:wu.FAILURE,xhr:t,metadata:i}:null},Au=(r,n,a,o)=>(e,t)=>{var i=t.response,e=xu(e,t);if(e)return a(e,r);if(16!==i.byteLength)return a({status:t.status,message:"Invalid HLS key at URL: "+t.uri,code:wu.FAILURE,xhr:t},r);var e=new DataView(i),s=new Uint32Array([e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12)]);for(let e=0;e{t===Eu&&e.transmuxer.postMessage({action:"initMp4WebVttParser",data:e.map.bytes})},Pu=(i,e,s)=>{e===Eu&&Su({action:"getMp4WebVttText",data:i.bytes,transmuxer:i.transmuxer,callback:({data:e,mp4VttCues:t})=>{i.bytes=e,s(null,i,{mp4VttCues:t})}})},Lu=(i,s)=>{var e,t=Od(i.map.bytes);if("mp4"!==t)return e=i.map.resolvedUri||i.map.uri,s({internal:!0,message:`Found unsupported ${t=t||"unknown"} container for initialization segment at URL: `+e,code:wu.FAILURE,metadata:{mediaType:t}});Su({action:"probeMp4Tracks",data:i.map.bytes,transmuxer:i.transmuxer,callback:({tracks:e,data:t})=>(i.map.bytes=t,e.forEach(function(e){i.map.tracks=i.map.tracks||{},i.map.tracks[e.type]||("number"==typeof(i.map.tracks[e.type]=e).id&&e.timescale&&(i.map.timescales=i.map.timescales||{},i.map.timescales[e.id]=e.timescale),"text"===e.type&&Du(i,e.codec))}),s(null))})},Ou=({segment:i,bytes:t,trackInfoFn:s,timingInfoFn:e,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:h,doneFn:u,onTransmuxerLog:c,triggerSegmentEventFn:p})=>{var m=i.map&&i.map.tracks||{};let g=Boolean(m.audio&&m.video),f=e.bind(null,i,"audio","start"),y=e.bind(null,i,"audio","end"),_=e.bind(null,i,"video","start"),v=e.bind(null,i,"video","end");Su({action:"probeTs",transmuxer:i.transmuxer,data:t,baseStartTime:i.baseStartTime,callback:e=>{i.bytes=t=e.data;e=e.result;e&&(s(i,{hasAudio:e.hasAudio,hasVideo:e.hasVideo,isMuxed:g}),s=null),yu({bytes:t,transmuxer:i.transmuxer,audioAppendStart:i.audioAppendStart,gopsToAlignWith:i.gopsToAlignWith,remux:g,onData:e=>{e.type="combined"===e.type?"video":e.type,h(i,e)},onTrackInfo:e=>{s&&(g&&(e.isMuxed=!0),s(i,e))},onAudioTimingInfo:e=>{f&&"undefined"!=typeof e.start&&(f(e.start),f=null),y&&"undefined"!=typeof e.end&&y(e.end)},onVideoTimingInfo:e=>{_&&"undefined"!=typeof e.start&&(_(e.start),_=null),v&&"undefined"!=typeof e.end&&v(e.end)},onVideoSegmentTimingInfo:e=>{var t={pts:{start:e.start.presentation,end:e.end.presentation},dts:{start:e.start.decode,end:e.end.decode}};p({type:"segmenttransmuxingtiminginfoavailable",segment:i,timingInfo:t}),r(e)},onAudioSegmentTimingInfo:e=>{var t={pts:{start:e.start.pts,end:e.end.pts},dts:{start:e.start.dts,end:e.end.dts}};p({type:"segmenttransmuxingtiminginfoavailable",segment:i,timingInfo:t}),n(e)},onId3:(e,t)=>{a(i,e,t)},onCaptions:e=>{o(i,[e])},isEndOfTimeline:l,onEndedTimeline:()=>{d()},onTransmuxerLog:c,onDone:(e,t)=>{u&&(e.type="combined"===e.type?"video":e.type,p({type:"segmenttransmuxingcomplete",segment:i}),u(t,i,e))},segment:i,triggerSegmentEventFn:p})}})},Ru=({segment:n,bytes:a,trackInfoFn:e,timingInfoFn:o,videoSegmentTimingInfoFn:t,audioSegmentTimingInfoFn:i,id3Fn:l,captionsFn:d,isEndOfTimeline:s,endedTimelineFn:r,dataFn:h,doneFn:u,onTransmuxerLog:c,triggerSegmentEventFn:p})=>{let m=new Uint8Array(a);if(Rd(m)){n.isFmp4=!0;let i=n.map.tracks;if(i.text&&(!i.audio||!i.video))return h(n,{data:m,type:"text"}),void Pu(n,i.text.codec,u);let s={isFmp4:!0,hasVideo:!!i.video,hasAudio:!!i.audio},r=(i.audio&&i.audio.codec&&"enca"!==i.audio.codec&&(s.audioCodec=i.audio.codec),i.video&&i.video.codec&&"encv"!==i.video.codec&&(s.videoCodec=i.video.codec),i.video&&i.audio&&(s.isMuxed=!0),e(n,s),(e,t)=>{h(n,{data:m,type:s.hasAudio&&!s.isMuxed?"audio":"video"}),t&&t.length&&l(n,t),e&&e.length&&d(n,e),u(null,n,{})});void Su({action:"probeMp4StartTime",timescales:n.map.timescales,data:m,transmuxer:n.transmuxer,callback:({data:e,startTime:t})=>{a=e.buffer,n.bytes=m=e,s.hasAudio&&!s.isMuxed&&o(n,"audio","start",t),s.hasVideo&&o(n,"video","start",t),Su({action:"probeEmsgID3",data:m,transmuxer:n.transmuxer,offset:t,callback:({emsgData:e,id3Frames:t})=>{a=e.buffer,n.bytes=m=e,i.video&&e.byteLength&&n.transmuxer?Su({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:n.transmuxer,data:m,timescales:n.map.timescales,trackIds:[i.video.id],callback:e=>{a=e.data.buffer,n.bytes=m=e.data,e.logs.forEach(function(e){c(L(e,{stream:"mp4CaptionParser"}))}),r(e.captions,t)}}):r(void 0,t)}})}})}else n.transmuxer?("undefined"==typeof n.container&&(n.container=Od(m)),"ts"!==n.container&&"aac"!==n.container?(e(n,{hasAudio:!1,hasVideo:!1}),u(null,n,{})):Ou({segment:n,bytes:a,trackInfoFn:e,timingInfoFn:o,videoSegmentTimingInfoFn:t,audioSegmentTimingInfoFn:i,id3Fn:l,captionsFn:d,isEndOfTimeline:s,endedTimelineFn:r,dataFn:h,doneFn:u,onTransmuxerLog:c,triggerSegmentEventFn:p})):u(null,n,{})},Nu=function({id:t,key:e,encryptedBytes:i,decryptionWorker:s,segment:r,doneFn:n},a){let o=e=>{e.data.source===t&&(s.removeEventListener("message",o),e=e.data.decrypted,a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength)))};s.onerror=()=>{var e="An error occurred in the decryption worker",t=ic({segment:r}),e={message:e,metadata:{error:new Error(e),errorType:E.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:r.key.resolvedUri||r.map.key.resolvedUri}}};n(e,r)},s.addEventListener("message",o);let l;l=e.bytes.slice?e.bytes.slice():new Uint32Array(Array.prototype.slice.call(e.bytes)),s.postMessage(Hh({source:t,encrypted:i,key:l,iv:e.iv}),[i.buffer,l.buffer])},Mu=({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:h,doneFn:u,onTransmuxerLog:c,triggerSegmentEventFn:p})=>{p({type:"segmentdecryptionstart"}),Nu({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},e=>{t.bytes=e,p({type:"segmentdecryptioncomplete",segment:t}),Ru({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:h,doneFn:u,onTransmuxerLog:c,triggerSegmentEventFn:p})})},Uu=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:r,progressFn:n,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:h,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y})=>{let _=[];var v,b,T,S,w,E,C,k,I,i=(({activeXhrs:s,decryptionWorker:r,trackInfoFn:n,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:d,captionsFn:h,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:m,onTransmuxerLog:g,triggerSegmentEventFn:f})=>{let t=0,y=!1;return(e,i)=>{if(!y){if(e)return y=!0,Cu(s),m(e,i);if((t+=1)===s.length){let t=function(){if(i.encryptedBytes)return Mu({decryptionWorker:r,segment:i,trackInfoFn:n,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:d,captionsFn:h,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:m,onTransmuxerLog:g,triggerSegmentEventFn:f});Ru({segment:i,bytes:i.bytes,trackInfoFn:n,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:d,captionsFn:h,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:m,onTransmuxerLog:g,triggerSegmentEventFn:f})};if(i.endOfAllRequests=Date.now(),i.map&&i.map.encryptedBytes&&!i.map.bytes)return f({type:"segmentdecryptionstart",segment:i}),Nu({decryptionWorker:r,id:i.requestId+"-init",encryptedBytes:i.map.encryptedBytes,key:i.map.key,segment:i,doneFn:m},e=>{i.map.bytes=e,f({type:"segmentdecryptioncomplete",segment:i}),Lu(i,e=>{if(e)return Cu(s),m(e,i);t()})});t()}}}})({activeXhrs:_,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:h,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f,triggerSegmentEventFn:y}),f=(s.key&&!s.key.bytes&&(a=[s.key],s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&a.push(s.map.key),o=L(t,{uri:s.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),l=Au(s,a,i,y),y({type:"segmentkeyloadstart",segment:s,keyInfo:{uri:s.key.resolvedUri}}),d=e(o,l),_.push(d)),s.map&&!s.map.bytes&&(!s.map.key||s.key&&s.key.resolvedUri===s.map.key.resolvedUri||(h=L(t,{uri:s.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),u=Au(s,[s.map.key],i,y),y({type:"segmentkeyloadstart",segment:s,keyInfo:{uri:s.map.key.resolvedUri}}),c=e(h,u),_.push(c)),p=L(t,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:Bh(s.map),requestType:"segment-media-initialization"}),{segment:v,finishProcessingFn:b,triggerSegmentEventFn:T}=[{segment:s,finishProcessingFn:i,triggerSegmentEventFn:y}][0],m=(e,t)=>{var e=xu(e,t);return e?b(e,v):(e=new Uint8Array(t.response),T({type:"segmentloaded",segment:v}),v.map.key?(v.map.encryptedBytes=e,b(null,v)):(v.map.bytes=e,void Lu(v,function(e){if(e)return e.xhr=t,e.status=t.status,b(e,v);b(null,v)})))},y({type:"segmentloadstart",segment:s}),g=e(p,m),_.push(g)),L(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:"arraybuffer",headers:Bh(s),requestType:"segment"})),a=({segment:S,finishProcessingFn:w,responseType:E,triggerSegmentEventFn:C}=[{segment:s,finishProcessingFn:i,responseType:f.responseType,triggerSegmentEventFn:y}][0],(e,t)=>{e=xu(e,t);if(e)return w(e,S);C({type:"segmentloaded",segment:S});e="arraybuffer"!==E&&t.responseText?nu(t.responseText.substring(S.lastReachedChar||0)):t.response;return S.stats=ku(t),S.key?S.encryptedBytes=new Uint8Array(e):S.bytes=new Uint8Array(e),w(null,S)}),o=(y({type:"segmentloadstart",segment:s}),e(f,a));o.addEventListener("progress",({segment:k,progressFn:I}=[{segment:s,progressFn:n}][0],e=>{var t=e.target;if(!t.aborted)return k.stats=L(k.stats,Iu(e)),!k.stats.firstBytesReceivedAt&&k.stats.bytesReceived&&(k.stats.firstBytesReceivedAt=Date.now()),I(e,k)})),_.push(o);let x={};return _.forEach(e=>{var t,i;e.addEventListener("loadend",({loadendState:t,abortFn:i}=[{loadendState:x,abortFn:r}][0],e=>{e.target.aborted&&i&&!t.calledAbortFn&&(i(),t.calledAbortFn=!0)}))}),()=>Cu(_)},Bu=Bd("PlaylistSelector"),Fu=function(e){var t;if(e&&e.playlist)return t=e.playlist,JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},qu=function(e,s){let r=e.slice();e.sort(function(e,t){var i=s(e,t);return 0===i?r.indexOf(e)-r.indexOf(t):i})};function ju(l){let{main:t,bandwidth:i,playerWidth:d,playerHeight:h,playerObjectFit:u,limitRenditionByPlayerDimensions:s,playlistController:c}=l;if(t){l={bandwidth:i,width:d,height:h,limitRenditionByPlayerDimensions:s};let e=t.playlists,n=(ph.isAudioOnly(t)&&(e=c.getAudioTrackPlaylists_(),l.audioOnly=!0),e.map(e=>{var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,s=e.attributes&&e.attributes.BANDWIDTH;return{bandwidth:s||window.Number.MAX_VALUE,width:t,height:i,playlist:e}})),a=(qu(n,(e,t)=>e.bandwidth-t.bandwidth),(n=n.filter(e=>!ph.isIncompatible(e.playlist))).filter(e=>ph.isEnabled(e.playlist)));var p=(a=a.length?a:n.filter(e=>!ph.isDisabled(e.playlist))).filter(e=>e.bandwidth*R.BANDWIDTH_VARIANCEe.bandwidth===o.bandwidth)[0];if(!1===s){let t=m||a[0]||n[0];if(t&&t.playlist){let e=m?"bandwidthBestRep":"sortedPlaylistReps";return a[0]&&(e="enabledPlaylistReps"),Bu(`choosing ${Fu(t)} using ${e} with options`,l),t.playlist}}else{var g,p=p.filter(e=>e.width&&e.height),f=(qu(p,(e,t)=>e.width-t.width),p.filter(e=>e.width===d&&e.height===h)),f=(o=f[f.length-1],f.filter(e=>e.bandwidth===o.bandwidth)[0]);let t,i;f||(g=(t=p.filter(e=>"cover"===u?e.width>d&&e.height>h:e.width>d||e.height>h)).filter(e=>e.width===t[0].width&&e.height===t[0].height),o=g[g.length-1],i=g.filter(e=>e.bandwidth===o.bandwidth)[0]);let s,r=(c.leastPixelDiffSelector&&(g=p.map(e=>(e.pixelDiff=Math.abs(e.width-d)+Math.abs(e.height-h),e)),qu(g,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),s=g[0]),s||i||f||m||a[0]||n[0]);if(r&&r.playlist){let e="sortedPlaylistReps";return s?e="leastPixelDiffRep":i?e="resolutionPlusOneRep":f?e="resolutionBestRep":m?e="bandwidthBestRep":a[0]&&(e="enabledPlaylistReps"),Bu(`choosing ${Fu(r)} using ${e} with options`,l),r.playlist}}return Bu("could not choose a playlist with options",l),null}}function Vu(){let e=this.useDevicePixelRatio&&window.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),ju({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(bu(this.tech_.el(),"width"),10)*e,playerHeight:parseInt(bu(this.tech_.el(),"height"),10)*e,playerObjectFit:this.usePlayerObjectFit?bu(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}function Hu(e){try{return new URL(e).pathname.split("/").slice(-2).join("/")}catch(e){return""}}function zu(e,t,i){let s;var r;if(i&&i.cues)for(s=i.cues.length;s--;)(r=i.cues[s]).startTime>=e&&r.endTime<=t&&i.removeCue(r)}let $u=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:o})=>{if(t){let r=window.WebKitDataCue||window.VTTCue,a=e.metadataTrack_;if(a&&(t.forEach(e=>{let s=e.cueTime+i;!("number"!=typeof s||window.isNaN(s)||s<0)&&s<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{var t,i=new r(s,s,e.value||e.url||e.data||"");i.frame=e,i.value=e,t=i,Object.defineProperties(t.frame,{id:{get(){return E.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get(){return E.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get(){return E.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}}),a.addCue(i)})}),a.cues)&&a.cues.length){var s=a.cues,l=[];for(let e=0;e{var i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),n=Object.keys(r).sort((e,t)=>Number(e)-Number(t));n.forEach((e,t)=>{var i=r[e],e=isFinite(o)?o:e;let s=Number(n[t+1])||e;i.forEach(e=>{e.endTime=s})})}}},Wu={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},Gu=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),Xu=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,E.browser.IS_ANY_SAFARI)||(e.metadataTrack_.inBandMetadataTrackDispatchType=t)},Ku=e=>"number"==typeof e&&isFinite(e),Yu=e=>{var{startOfSegment:t,duration:i,segment:s,part:r,playlist:{mediaSequence:n,id:a,segments:o=[]},mediaIndex:l,partIndex:d,timeline:h}=e,o=o.length-1;let u="mediaIndex/partIndex increment";e.getMediaInfoForTime?u=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(u="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(u+=" with independent "+e.independent);var c="number"==typeof d,e=e.segment.uri?"segment":"pre-segment",p=c?Zd({preloadSegment:s})-1:0;return e+` [${n+l}/${n+o}]`+(c?` part [${d}/${p}]`:"")+` segment start/end [${s.start} => ${s.end}]`+(c?` part start/end [${r.start} => ${r.end}]`:"")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${h}]`+` selected by [${u}]`+` playlist [${a}]`},Qu=e=>e+"TimingInfo",Ju=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:r})=>{return!(t===i||("audio"===s?(t=e.lastTimelineChange({type:"main"}))&&t.to===i:"main"!==s||!r||(t=e.pendingTimelineChange({type:"audio"}))&&t.to===i))},Zu=e=>{var t,i,s,r=e.pendingSegment_;r&&Ju({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:r.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&!!((r=e.timelineChangeController_)&&(t=r.pendingTimelineChange({type:"audio"}),r=r.pendingTimelineChange({type:"main"}),s=(i=t&&r)&&t.to!==r.to,i)&&-1!==t.from&&-1!==r.from&&s)&&(t=(i=e).timelineChangeController_.pendingTimelineChange({type:"audio"}),i=i.timelineChangeController_.pendingTimelineChange({type:"main"}),t&&i&&t.to!!e&&Math.round(e)>t+$d,tc=(e,t)=>{var i,s,r;return"hls"===t&&(t=(e=>{let s=0;return["video","audio"].forEach(function(t){t=e[t+"TimingInfo"];if(t){var{start:t,end:i}=t;let e;"bigint"==typeof t||"bigint"==typeof i?e=window.BigInt(i)-window.BigInt(t):"number"==typeof t&&"number"==typeof i&&(e=i-t),"undefined"!=typeof e&&e>s&&(s=e)}}),s="bigint"==typeof s&&s{var i,s,r;if(t)return i=Boolean(t.key||t.map&&t.map.ke),s=Boolean(t.map&&!t.map.bytes),r=void 0===t.startOfSegment?t.start:t.startOfSegment,{type:e||t.type,uri:t.resolvedUri||t.uri,start:r,duration:t.duration,isEncrypted:i,isMediaInitialization:s}};class sc extends E.EventTarget{constructor(e,t=0){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Bd(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Zu(this)}),this.sourceUpdater_.on("codecschange",e=>{this.trigger(f({type:"codecschange"},e))}),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Zu(this)}),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",e=>{this.trigger(f({type:"timelinechange"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():Zu(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Zu(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return vu({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){"WAITING"!==this.state?(this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_)):(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_())}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,window.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return"undefined"!=typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&_u(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return O();if("main"===this.loaderType_){var{hasAudio:e,hasVideo:t,isMuxed:i}=e;if(t&&e&&!this.audioDisabled_&&!i)return this.sourceUpdater_.buffered();if(t)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;var i=jh(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;var i=Vh(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});t={resolvedUri:(s||e).resolvedUri};return s&&(t.bytes=s.bytes),t}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(t,i={}){if(t&&!(this.playlist_&&this.playlist_.endList&&t.endList&&this.playlist_.uri===t.uri)){var s,r=this.playlist_,n=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=i,"INIT"===this.state&&(t.syncInfo={mediaSequence:t.mediaSequence,time:0},"main"===this.loaderType_)&&this.syncController_.setDateTimeMappingForStart(t);let e=null;if(r&&(r.id?e=r.id:r.uri&&(e=r.uri)),this.logger_(`playlist update [${e} => ${t.id||t.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(t,this.currentTime_()),this.logger_(`Playlist update: currentTime: ${this.currentTime_()} -bufferedEnd: ${qd(this.buffered_())} -`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();r&&r.uri===t.uri?(i=t.mediaSequence-r.mediaSequence,this.logger_(`live window shift [${i}]`),null!==this.mediaIndex&&(this.mediaIndex-=i,this.mediaIndex<0?(this.mediaIndex=null,this.partIndex=null):(s=this.playlist_.segments[this.mediaIndex],!this.partIndex||s.parts&&s.parts.length&&s.parts[this.partIndex]||(s=this.mediaIndex,this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=s))),n&&(n.mediaIndex-=i,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(0<=n.mediaIndex&&(n.segment=t.segments[n.mediaIndex]),0<=n.partIndex&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(r,t)):(null!==this.mediaIndex&&(!t.endList&&"number"==typeof t.partTargetDuration?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate"))}}pause(){this.checkBufferTimeout_&&(window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&yu(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;var e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;"hls"!==this.sourceType_||e||(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(t,i,s=()=>{},r=!1){if((i=i===1/0?this.duration_():i)<=t)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){let e=1;var n,a=()=>{0===--e&&s()};for(n in!r&&this.audioDisabled_||(e++,this.sourceUpdater_.removeAudio(t,i,a)),!r&&"main"!==this.loaderType_||(this.gopBuffer_=((t,i,e,s)=>{var r=Math.ceil((i-s)*Rd),n=Math.ceil((e-s)*Rd),i=t.slice();let a=t.length;for(;a--&&!(t[a].pts<=n););if(-1!==a){let e=a+1;for(;e--&&!(t[e].pts<=r););e=Math.max(e,0),i.splice(e,a-e+1)}return i})(this.gopBuffer_,t,i,this.timeMapping_),e++,this.sourceUpdater_.removeVideo(t,i,a)),this.inbandTextTracks_)Vu(t,i,this.inbandTextTracks_[n]);Vu(t,i,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")}monitorBuffer_(){this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){var e,t;this.sourceUpdater_.updating()||(e=this.chooseNextRequest_())&&(t={segmentInfo:tc({type:this.loaderType_,segment:e})},this.trigger({type:"segmentselected",metadata:t}),"number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){var s;return!(!t||!this.mediaSource_)&&(s="number"==typeof e&&t.segments[e],e=e+1===t.segments.length,i=!s||!s.parts||i+1===s.parts.length,t.endList)&&"open"===this.mediaSource_.readyState&&e&&i}chooseNextRequest_(){var e=this.buffered_(),s=qd(e)||0,e=jd(e,this.currentTime_()),r=!this.hasPlayed_()&&1<=e,n=e>=this.goalBufferLength_(),t=this.playlist_.segments;if(!t.length||r||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);r={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(r.isSyncRequest)r.mediaIndex=function(t,i,s){i=i||[];var r=[];let n=0;for(let e=0;es))return e}return 0===r.length?0:r[r.length-1]}(this.currentTimeline_,t,s),this.logger_("choose next request. Can not find sync point. Fallback to media Index: "+r.mediaIndex);else if(null!==this.mediaIndex){var n=t[this.mediaIndex],a="number"==typeof this.partIndex?this.partIndex:-1;r.startOfSegment=n.end||s,n.parts&&n.parts[a+1]?(r.mediaIndex=this.mediaIndex,r.partIndex=a+1):r.mediaIndex=this.mediaIndex+1}else{let e,t,i;n=this.fetchAtBuffer_?s:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch: +bufferedEnd: ${jd(this.buffered_())} +`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();r&&r.uri===t.uri?(i=t.mediaSequence-r.mediaSequence,this.logger_(`live window shift [${i}]`),null!==this.mediaIndex&&(this.mediaIndex-=i,this.mediaIndex<0?(this.mediaIndex=null,this.partIndex=null):(s=this.playlist_.segments[this.mediaIndex],!this.partIndex||s.parts&&s.parts.length&&s.parts[this.partIndex]||(s=this.mediaIndex,this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=s))),n&&(n.mediaIndex-=i,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(0<=n.mediaIndex&&(n.segment=t.segments[n.mediaIndex]),0<=n.partIndex&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(r,t)):(null!==this.mediaIndex&&(!t.endList&&"number"==typeof t.partTargetDuration?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate"))}}pause(){this.checkBufferTimeout_&&(window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&_u(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;var e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;"hls"!==this.sourceType_||e||(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(t,i,s=()=>{},r=!1){if((i=i===1/0?this.duration_():i)<=t)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){let e=1;var n,a=()=>{0===--e&&s()};for(n in!r&&this.audioDisabled_||(e++,this.sourceUpdater_.removeAudio(t,i,a)),!r&&"main"!==this.loaderType_||(this.gopBuffer_=((t,i,e,s)=>{var r=Math.ceil((i-s)*Nd),n=Math.ceil((e-s)*Nd),i=t.slice();let a=t.length;for(;a--&&!(t[a].pts<=n););if(-1!==a){let e=a+1;for(;e--&&!(t[e].pts<=r););e=Math.max(e,0),i.splice(e,a-e+1)}return i})(this.gopBuffer_,t,i,this.timeMapping_),e++,this.sourceUpdater_.removeVideo(t,i,a)),this.inbandTextTracks_)zu(t,i,this.inbandTextTracks_[n]);zu(t,i,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")}monitorBuffer_(){this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window.setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){var e,t;this.sourceUpdater_.updating()||(e=this.chooseNextRequest_())&&(t={segmentInfo:ic({type:this.loaderType_,segment:e})},this.trigger({type:"segmentselected",metadata:t}),"number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){var s;return!(!t||!this.mediaSource_)&&(s="number"==typeof e&&t.segments[e],e=e+1===t.segments.length,i=!s||!s.parts||i+1===s.parts.length,t.endList)&&"open"===this.mediaSource_.readyState&&e&&i}chooseNextRequest_(){var e=this.buffered_(),s=jd(e)||0,e=Vd(e,this.currentTime_()),r=!this.hasPlayed_()&&1<=e,n=e>=this.goalBufferLength_(),t=this.playlist_.segments;if(!t.length||r||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);r={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(r.isSyncRequest)r.mediaIndex=function(t,i,s){i=i||[];var r=[];let n=0;for(let e=0;es))return e}return 0===r.length?0:r[r.length-1]}(this.currentTimeline_,t,s),this.logger_("choose next request. Can not find sync point. Fallback to media Index: "+r.mediaIndex);else if(null!==this.mediaIndex){var n=t[this.mediaIndex],a="number"==typeof this.partIndex?this.partIndex:-1;r.startOfSegment=n.end||s,n.parts&&n.parts[a+1]?(r.mediaIndex=this.mediaIndex,r.partIndex=a+1):r.mediaIndex=this.mediaIndex+1}else{let e,t,i;n=this.fetchAtBuffer_?s:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch: For TargetTime: ${n}. CurrentTime: ${this.currentTime_()} BufferedEnd: ${s} Fetch At Buffer: ${this.fetchAtBuffer_} -`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){a=this.getSyncInfoFromMediaSequenceSync_(n);if(!a)return this.error({message:s="No sync info found while using media sequence sync",metadata:{errorType:E.Error.StreamingFailedToSelectNextSegment,error:new Error(s)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null;this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${a.start} --> ${a.end})`),e=a.segmentIndex,t=a.partIndex,i=a.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");s=ch.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=s.segmentIndex,t=s.partIndex,i=s.startTime}r.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+n:"currentTime "+n,r.mediaIndex=e,r.startOfSegment=i,r.partIndex=t,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${r.mediaIndex} `)}a=t[r.mediaIndex];let i=a&&"number"==typeof r.partIndex&&a.parts&&a.parts[r.partIndex];if(!a||"number"==typeof r.partIndex&&!i)return null;"number"!=typeof r.partIndex&&a.parts&&(r.partIndex=0,i=a.parts[0]);s=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments,e||!i||s||i.independent||(0===r.partIndex?(e=(n=t[r.mediaIndex-1]).parts&&n.parts.length&&n.parts[n.parts.length-1])&&e.independent&&(--r.mediaIndex,r.partIndex=n.parts.length-1,r.independent="previous segment"):a.parts[r.partIndex-1].independent&&(--r.partIndex,r.independent="previous part")),s=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return r.mediaIndex>=t.length-1&&s&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,r.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(r))}getSyncInfoFromMediaSequenceSync_(e){var t;return this.mediaSequenceSync_&&(e!==(t=Math.max(e,this.mediaSequenceSync_.start))&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to `+t),e=this.mediaSequenceSync_.getSyncInfoForTime(t))?e.isAppended?(t=this.mediaSequenceSync_.getSyncInfoForTime(e.end))?(t.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),t):null:e:null}generateSegmentInfo_(e){var{independent:e,playlist:t,mediaIndex:i,startOfSegment:s,isSyncRequest:r,partIndex:n,forceTimestampOffset:a,getMediaInfoForTime:o}=e,l=t.segments[i],d="number"==typeof n&&l.parts[n],i={requestId:"segment-loader-"+Math.random(),uri:d&&d.resolvedUri||l.resolvedUri,mediaIndex:i,partIndex:d?n:null,isSyncRequest:r,startOfSegment:s,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:l.timeline,duration:d&&d.duration||l.duration,segment:l,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:o,independent:e},n="undefined"!=typeof a?a:this.isPendingTimestampOffset_,r=(i.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:l.timeline,currentTimeline:this.currentTimeline_,startOfSegment:s,buffered:this.buffered_(),overrideCheck:n}),qd(this.sourceUpdater_.audioBuffered()));return"number"==typeof r&&(i.audioAppendStart=r-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(i.gopsToAlignWith=((e,t,i)=>{if("undefined"==typeof t||null===t||!e.length)return[];var s=Math.ceil((t-i+3)*Rd);let r;for(r=0;rs);r++);return e.slice(r)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),i}timestampOffsetForSegment_(e){return{segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:r}=[e][0],r||e!==t?!(e!ch.isIncompatible(e));let d=e.filter(ch.isEnabled);var e=(d=d.length?d:e.filter(e=>!ch.isDisabled(e))).filter(ch.hasAttribute.bind(null,"BANDWIDTH")).map(e=>{var t=l.getSyncPoint(e,r,o,i)?1:2;return{playlist:e,rebufferingImpact:ch.estimateSegmentRequestTime(n,s,e)*t-a}}),h=e.filter(e=>e.rebufferingImpact<=0);return Fu(h,(e,t)=>bu(t.playlist,e.playlist)),h.length?h[0]:(Fu(e,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),e[0]||null)}({main:this.vhs_.playlists.main,currentTime:e,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(n){var a=t-r-n.rebufferingImpact;let e=.5;r<=zd&&(e=1),!n.playlist||n.playlist.uri===this.playlist_.uri||a{a[e.stream]=a[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=a[e.stream];t.startTime=Math.min(t.startTime,e.startTime+n),t.endTime=Math.max(t.endTime,e.endTime+n),t.captions.push(e)}),Object.keys(a).forEach(e=>{var{startTime:t,endTime:i,captions:s}=a[e],r=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${i} for `+e),function(r,n,a){if(!r[a]){n.trigger({type:"usage",name:"vhs-608"});let s=a;/^cc708_/.test(a)&&(s="SERVICE"+a.split("_")[1]);var o=n.textTracks().getTrackById(s);if(o)r[a]=o;else{let e=a,t=a,i=!1;o=(n.options_.vhs&&n.options_.vhs.captionServices||{})[s];o&&(e=o.label,t=o.language,i=o.default),r[a]=n.addRemoteTextTrack({kind:"captions",id:s,default:i,label:e,language:t},!1).track}}}(r,this.vhs_.tech_,e),Vu(t,i,r[e]),function({inbandTextTracks:n,captionArray:e,timestampOffset:a}){if(e){let r=window.WebKitDataCue||window.VTTCue;e.forEach(i=>{let s=i.stream;i.content?i.content.forEach(e=>{var t=new r(i.startTime+a,i.endTime+a,e.text);t.line=e.line,t.align="left",t.position=e.position,t.positionAlign="line-left",n[s].addCue(t)}):n[s].addCue(new r(i.startTime+a,i.endTime+a,i.text))})}}({captionArray:s,inbandTextTracks:r,timestampOffset:n})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t))}handleId3_(e,t,i){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||(this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i)))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){var e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){var e;return"audio"!==this.loaderType_||!(!(e=this.pendingSegment_)||this.getCurrentMediaInfo_()&&Qu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){var e,t,i,s;return!!this.sourceUpdater_.ready()&&!(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_||(e=this.pendingSegment_,t=this.getCurrentMediaInfo_(),!e)||!t||({hasAudio:t,hasVideo:i,isMuxed:s}=t,i&&!e.videoTimingInfo)||t&&!this.audioDisabled_&&!s&&!e.audioTimingInfo||Qu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(t,e){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId))if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())Ju(this),this.callQueue_.push(this.handleData_.bind(this,t,e));else{var i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(t.map&&(t.map=this.initSegmentForMap(t.map,!0),i.segment.map=t.map),t.key&&this.segmentKey(t.key,!0),i.isFmp4=t.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Yu(e.type)].start;else{t=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&t&&t.hasVideo;let e;t&&(e=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:e,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,e.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});t=this.chooseNextRequest_();if(t.mediaIndex!==i.mediaIndex||t.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,e)}}}updateAppendInitSegmentStatus(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){var r=qh(i);if(this.activeInitSegmentId_===r)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=r}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){var r=this.sourceUpdater_.audioBuffered(),n=this.sourceUpdater_.videoBuffered(),a=(1{this.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=window.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3)},!0))}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22===s.code?this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}):(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",s),this.error({message:`${t} append of ${i.length}b failed for segment `+`#${e.mediaIndex} in playlist `+e.playlist.id,metadata:{errorType:E.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:r}){if(!r){var n=[s];let e=s.byteLength;i&&(n.unshift(i),e+=i.byteLength),r=(e=>{let t=0,i;return e.bytes&&(i=new Uint8Array(e.bytes),e.segments.forEach(e=>{i.set(e,t),t+=e.byteLength})),i})({bytes:e,segments:n})}s={segmentInfo:tc({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:s}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:r},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:r}))}handleSegmentTimingInfo_(e,t,i){this.pendingSegment_&&t===this.pendingSegment_.requestId&&((t=this.pendingSegment_.segment)[e=e+"TimingInfo"]||(t[e]={}),t[e].transmuxerPrependedSeconds=i.prependedContentDuration||0,t[e].transmuxedPresentationStart=i.start.presentation,t[e].transmuxedDecodeStart=i.start.decode,t[e].transmuxedPresentationEnd=i.end.presentation,t[e].transmuxedDecodeEnd=i.end.decode,t[e].baseMediaDecodeTime=i.baseMediaDecodeTime)}appendData_(e,t){var{type:i,data:s}=t;s&&s.byteLength&&("audio"===i&&this.audioDisabled_||(t=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null}),this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:t,data:s})))}loadSegment_(t){this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),"number"==typeof t.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(t):(Ju(this),this.loadQueue_.push(()=>{var e=f({},t,{forceTimestampOffset:!0});f(t,this.generateSegmentInfo_(e)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(t)}))}updateTransmuxerAndRequestSegment_(s){this.shouldUpdateTransmuxerTimestampOffset_(s.timestampOffset)&&(this.gopBuffer_.length=0,s.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:s.timestampOffset}));var e=this.createSimplifiedSegmentObj_(s),t=this.isEndOfStream_(s.mediaIndex,s.playlist,s.partIndex),i=null!==this.mediaIndex,r=s.timeline!==this.currentTimeline_&&0 ${a.end})`),e=a.segmentIndex,t=a.partIndex,i=a.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");s=ph.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:n,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=s.segmentIndex,t=s.partIndex,i=s.startTime}r.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+n:"currentTime "+n,r.mediaIndex=e,r.startOfSegment=i,r.partIndex=t,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${r.mediaIndex} `)}a=t[r.mediaIndex];let i=a&&"number"==typeof r.partIndex&&a.parts&&a.parts[r.partIndex];if(!a||"number"==typeof r.partIndex&&!i)return null;"number"!=typeof r.partIndex&&a.parts&&(r.partIndex=0,i=a.parts[0]);s=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments,e||!i||s||i.independent||(0===r.partIndex?(e=(n=t[r.mediaIndex-1]).parts&&n.parts.length&&n.parts[n.parts.length-1])&&e.independent&&(--r.mediaIndex,r.partIndex=n.parts.length-1,r.independent="previous segment"):a.parts[r.partIndex-1].independent&&(--r.partIndex,r.independent="previous part")),s=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return r.mediaIndex>=t.length-1&&s&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,r.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(r))}getSyncInfoFromMediaSequenceSync_(e){var t;return this.mediaSequenceSync_&&(e!==(t=Math.max(e,this.mediaSequenceSync_.start))&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to `+t),e=this.mediaSequenceSync_.getSyncInfoForTime(t))?e.isAppended?(t=this.mediaSequenceSync_.getSyncInfoForTime(e.end))?(t.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),t):null:e:null}generateSegmentInfo_(e){var{independent:e,playlist:t,mediaIndex:i,startOfSegment:s,isSyncRequest:r,partIndex:n,forceTimestampOffset:a,getMediaInfoForTime:o}=e,l=t.segments[i],d="number"==typeof n&&l.parts[n],i={requestId:"segment-loader-"+Math.random(),uri:d&&d.resolvedUri||l.resolvedUri,mediaIndex:i,partIndex:d?n:null,isSyncRequest:r,startOfSegment:s,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:l.timeline,duration:d&&d.duration||l.duration,segment:l,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:o,independent:e},n="undefined"!=typeof a?a:this.isPendingTimestampOffset_,r=(i.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:l.timeline,currentTimeline:this.currentTimeline_,startOfSegment:s,buffered:this.buffered_(),overrideCheck:n}),jd(this.sourceUpdater_.audioBuffered()));return"number"==typeof r&&(i.audioAppendStart=r-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(i.gopsToAlignWith=((e,t,i)=>{if("undefined"==typeof t||null===t||!e.length)return[];var s=Math.ceil((t-i+3)*Nd);let r;for(r=0;rs);r++);return e.slice(r)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),i}timestampOffsetForSegment_(e){return{segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:r}=[e][0],r||e!==t?!(e!ph.isIncompatible(e));let d=e.filter(ph.isEnabled);var e=(d=d.length?d:e.filter(e=>!ph.isDisabled(e))).filter(ph.hasAttribute.bind(null,"BANDWIDTH")).map(e=>{var t=l.getSyncPoint(e,r,o,i)?1:2;return{playlist:e,rebufferingImpact:ph.estimateSegmentRequestTime(n,s,e)*t-a}}),h=e.filter(e=>e.rebufferingImpact<=0);return qu(h,(e,t)=>Tu(t.playlist,e.playlist)),h.length?h[0]:(qu(e,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),e[0]||null)}({main:this.vhs_.playlists.main,currentTime:e,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(n){var a=t-r-n.rebufferingImpact;let e=.5;r<=$d&&(e=1),!n.playlist||n.playlist.uri===this.playlist_.uri||a{a[e.stream]=a[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=a[e.stream];t.startTime=Math.min(t.startTime,e.startTime+n),t.endTime=Math.max(t.endTime,e.endTime+n),t.captions.push(e)}),Object.keys(a).forEach(e=>{var{startTime:t,endTime:i,captions:s}=a[e],r=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${i} for `+e),function(r,n,a){if(!r[a]){n.trigger({type:"usage",name:"vhs-608"});let s=a;/^cc708_/.test(a)&&(s="SERVICE"+a.split("_")[1]);var o=n.textTracks().getTrackById(s);if(o)r[a]=o;else{let e=a,t=a,i=!1;o=(n.options_.vhs&&n.options_.vhs.captionServices||{})[s];o&&(e=o.label,t=o.language,i=o.default),r[a]=n.addRemoteTextTrack({kind:"captions",id:s,default:i,label:e,language:t},!1).track}}}(r,this.vhs_.tech_,e),zu(t,i,r[e]),function({inbandTextTracks:n,captionArray:e,timestampOffset:a}){if(e){let r=window.WebKitDataCue||window.VTTCue;e.forEach(i=>{let s=i.stream;i.content?i.content.forEach(e=>{var t=new r(i.startTime+a,i.endTime+a,e.text);t.line=e.line,t.align="left",t.position=e.position,t.positionAlign="line-left",n[s].addCue(t)}):n[s].addCue(new r(i.startTime+a,i.endTime+a,i.text))})}}({captionArray:s,inbandTextTracks:r,timestampOffset:n})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t))}handleId3_(e,t,i){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||(this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i)))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){var e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){var e;return"audio"!==this.loaderType_||!(!(e=this.pendingSegment_)||this.getCurrentMediaInfo_()&&Ju({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){var e,t,i,s;return!!this.sourceUpdater_.ready()&&!(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_||(e=this.pendingSegment_,t=this.getCurrentMediaInfo_(),!e)||!t||({hasAudio:t,hasVideo:i,isMuxed:s}=t,i&&!e.videoTimingInfo)||t&&!this.audioDisabled_&&!s&&!e.audioTimingInfo||Ju({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(t,e){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId))if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())Zu(this),this.callQueue_.push(this.handleData_.bind(this,t,e));else{var i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(t.map&&(t.map=this.initSegmentForMap(t.map,!0),i.segment.map=t.map),t.key&&this.segmentKey(t.key,!0),i.isFmp4=t.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Qu(e.type)].start;else{t=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&t&&t.hasVideo;let e;t&&(e=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:e,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,e.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});t=this.chooseNextRequest_();if(t.mediaIndex!==i.mediaIndex||t.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,e)}}}updateAppendInitSegmentStatus(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){var r=jh(i);if(this.activeInitSegmentId_===r)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=r}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){var r=this.sourceUpdater_.audioBuffered(),n=this.sourceUpdater_.videoBuffered(),a=(1{this.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=window.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3)},!0))}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22===s.code?this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}):(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",s),this.error({message:`${t} append of ${i.length}b failed for segment `+`#${e.mediaIndex} in playlist `+e.playlist.id,metadata:{errorType:E.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:r}){if(!r){var n=[s];let e=s.byteLength;i&&(n.unshift(i),e+=i.byteLength),r=(e=>{let t=0,i;return e.bytes&&(i=new Uint8Array(e.bytes),e.segments.forEach(e=>{i.set(e,t),t+=e.byteLength})),i})({bytes:e,segments:n})}s={segmentInfo:ic({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:s}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:r},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:r}))}handleSegmentTimingInfo_(e,t,i){this.pendingSegment_&&t===this.pendingSegment_.requestId&&((t=this.pendingSegment_.segment)[e=e+"TimingInfo"]||(t[e]={}),t[e].transmuxerPrependedSeconds=i.prependedContentDuration||0,t[e].transmuxedPresentationStart=i.start.presentation,t[e].transmuxedDecodeStart=i.start.decode,t[e].transmuxedPresentationEnd=i.end.presentation,t[e].transmuxedDecodeEnd=i.end.decode,t[e].baseMediaDecodeTime=i.baseMediaDecodeTime)}appendData_(e,t){var{type:i,data:s}=t;s&&s.byteLength&&("audio"===i&&this.audioDisabled_||(t=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null}),this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:t,data:s})))}loadSegment_(t){this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),"number"==typeof t.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(t):(Zu(this),this.loadQueue_.push(()=>{var e=f({},t,{forceTimestampOffset:!0});f(t,this.generateSegmentInfo_(e)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(t)}))}updateTransmuxerAndRequestSegment_(s){this.shouldUpdateTransmuxerTimestampOffset_(s.timestampOffset)&&(this.gopBuffer_.length=0,s.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:s.timestampOffset}));var e=this.createSimplifiedSegmentObj_(s),t=this.isEndOfStream_(s.mediaIndex,s.playlist,s.partIndex),i=null!==this.mediaIndex,r=s.timeline!==this.currentTimeline_&&0{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:e,level:t,stream:i})=>{this.logger_(Ku(s)+` logged from transmuxer stream ${i} as a ${t}: `+e)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:r})=>{t={segmentInfo:tc({segment:t})};i&&(t.keyInfo=i),s&&(t.trackInfo=s),r&&(t.timingInfo=r),this.trigger({type:e,metadata:t})}})}trimBackBuffer_(e){var t=((e,t,i)=>{let s=t-R.BACK_BUFFER_LENGTH;return e.length&&(s=Math.max(s,e.start(0))),Math.min(t-i,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);0{if(!t.length)return e;if(i)return t.slice();var s=t[0].pts;let r=0;for(r;r=s);r++);return e.slice(0,r).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(e)}}setTimeMapping_(e){e=this.syncController_.mappingForTimeline(e);null!==e&&(this.timeMapping_=e)}updateMediaSecondsLoaded_(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:r,useVideoTimingInfo:n,videoTimingInfo:a,audioTimingInfo:o}){return"undefined"!=typeof e?e:n?(e=t.segments[i-1],0!==i&&e&&"undefined"!=typeof e.start&&e.end===s+r?a.start:s):o.start}waitForAppendsToComplete_(e){var t,i,s=this.getCurrentMediaInfo_(e);s?({hasAudio:s,hasVideo:i,isMuxed:t}=s,i="main"===this.loaderType_&&i,s=!this.audioDisabled_&&s&&!t,e.waitingOnAppends=0,e.hasAppendedData_?(i&&e.waitingOnAppends++,s&&e.waitingOnAppends++,i&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))):(e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e))):(this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error"))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){i=this.loaderType_,t=this.getCurrentMediaInfo_(),e=e;var t,i="main"===i&&t&&e?e.hasAudio||e.hasVideo?t.hasVideo&&!e.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&e.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null;return!!i&&(this.error({message:i,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(t){if(null!==t.timestampOffset&&"number"==typeof t.timingInfo.start&&!t.changedTimestampOffset&&"main"===this.loaderType_){let e=!1;t.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:t.segment.videoTimingInfo,audioTimingInfo:t.segment.audioTimingInfo,timingInfo:t.timingInfo}),t.changedTimestampOffset=!0,t.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(t.timestampOffset),e=!0),t.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(t.timestampOffset),e=!0),e&&this.trigger("timestampoffset")}}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&"number"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),t="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end="number"==typeof t.end?t.end:t.start+e.duration)}handleAppendsDone_(){var e,t,i;this.pendingSegment_&&(e={segmentInfo:tc({type:this.loaderType_,segment:this.pendingSegment_})},this.trigger({type:"appendsdone",metadata:e})),this.pendingSegment_?((e=this.pendingSegment_).part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_}),(t=ec(e,this.sourceType_))&&("warn"===t.severity?E.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)?this.logger_("Throwing away un-appended sync request "+Ku(e)):(this.logger_("Appended "+Ku(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t=e.segment,i=e.part,t=t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration,i=i&&i.end&&this.currentTime_()-i.end>3*e.playlist.partTargetDuration,t||i?(this.logger_(`bad ${t?"segment":"part"} `+Ku(e)),this.resetEverything()):(null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()))):(this.state="READY",this.paused()||this.monitorBuffer_())}recordThroughput_(e){var t,i;e.duration<1/60?this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60):(t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,e=Math.floor(e.byteLength/i*8*1e3),this.throughput.rate+=(e-t)/++this.throughput.count)}addSegmentMetadataCue_(e){var t,i,s,r;this.segmentMetadataTrack_&&(t=(r=e.segment).start,i=r.end,Xu(t))&&Xu(i)&&(Vu(t,i,this.segmentMetadataTrack_),s=window.WebKitDataCue||window.VTTCue,r={custom:r.custom,dateTimeObject:r.dateTimeObject,dateTimeString:r.dateTimeString,programDateTime:r.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:t,end:i},(e=new s(t,i,JSON.stringify(r))).value=r,this.segmentMetadataTrack_.addCue(e))}}function sc(){}function rc(e){return"string"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())}let nc=["video","audio"],ac=(e,t)=>{var i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]},oc=(i,s)=>{if(0!==s.queue.length){let e=0,t=s.queue[e];if("mediaSource"===t.type)s.updating()||"closed"===s.mediaSource.readyState||(s.queue.shift(),t.action(s),t.doneFn&&t.doneFn(),oc("audio",s),oc("video",s));else if("mediaSource"!==i&&s.ready()&&"closed"!==s.mediaSource.readyState&&!ac(i,s)){if(t.type!==i){if(null===(e=((t,i)=>{for(let e=0;e{var i=t[e+"Buffer"],s=rc(e);i&&(i.removeEventListener("updateend",t[`on${s}UpdateEnd_`]),i.removeEventListener("error",t[`on${s}Error_`]),t.codecs[e]=null,t[e+"Buffer"]=null)},dc=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),hc={appendBuffer:(s,r,n)=>(t,i)=>{var e=i[t+"Buffer"];if(dc(i.mediaSource,e)){i.logger_(`Appending segment ${r.mediaIndex}'s ${s.length} bytes to ${t}Buffer`);try{e.appendBuffer(s)}catch(e){i.logger_(`Error with code ${e.code} `+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${r.mediaIndex} to ${t}Buffer`),i.queuePending[t]=null,n(e)}}},remove:(s,r)=>(t,i)=>{var e=i[t+"Buffer"];if(dc(i.mediaSource,e)){i.logger_(`Removing ${s} to ${r} from ${t}Buffer`);try{e.remove(s,r)}catch(e){i.logger_(`Remove ${s} to ${r} from ${t}Buffer failed`)}}},timestampOffset:s=>(e,t)=>{var i=t[e+"Buffer"];dc(t.mediaSource,i)&&(t.logger_(`Setting ${e}timestampOffset to `+s),i.timestampOffset=s)},callback:i=>(e,t)=>{i()},endOfStream:t=>e=>{if("open"===e.mediaSource.readyState){e.logger_(`Calling mediaSource endOfStream(${t||""})`);try{e.mediaSource.endOfStream(t)}catch(e){E.log.warn("Failed to call media source endOfStream",e)}}},duration:t=>e=>{e.logger_("Setting mediaSource duration to "+t);try{e.mediaSource.duration=t}catch(e){E.log.warn("Failed to set media source duration",e)}},abort:()=>(t,e)=>{if("open"===e.mediaSource.readyState){var i=e[t+"Buffer"];if(dc(e.mediaSource,i)){e.logger_(`calling abort on ${t}Buffer`);try{i.abort()}catch(e){E.log.warn(`Failed to abort on ${t}Buffer`,e)}}}},addSourceBuffer:(s,r)=>e=>{var t=rc(s),i=aa(r),i=(e.logger_(`Adding ${s}Buffer with codec ${r} to mediaSource`),e.mediaSource.addSourceBuffer(i));i.addEventListener("updateend",e[`on${t}UpdateEnd_`]),i.addEventListener("error",e[`on${t}Error_`]),e.codecs[s]=r,e[s+"Buffer"]=i},removeSourceBuffer:i=>e=>{var t=e[i+"Buffer"];if(lc(i,e),dc(e.mediaSource,t)){e.logger_(`Removing ${i}Buffer with codec ${e.codecs[i]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(t)}catch(e){E.log.warn(`Failed to removeSourceBuffer ${i}Buffer`,e)}}},changeType:o=>(t,i)=>{var e=i[t+"Buffer"],s=aa(o);if(dc(i.mediaSource,e)){var r=o.substring(0,o.indexOf(".")),n=i.codecs[t],a=n.substring(0,n.indexOf("."));if(a!==r){a={codecsChangeInfo:{from:n,to:o}};i.trigger({type:"codecschange",metadata:a}),i.logger_(`changing ${t}Buffer codec from ${n} to `+o);try{e.changeType(s),i.codecs[t]=o}catch(e){a.errorType=E.Error.StreamingCodecsChangeError,(a.error=e).metadata=a,i.error_=e,i.trigger("error"),E.log.warn(`Failed to changeType on ${t}Buffer`,e)}}}}},uc=({type:e,sourceUpdater:t,action:i,doneFn:s,name:r})=>{t.queue.push({type:e,action:i,doneFn:s,name:r}),oc(e,t)},cc=(i,s)=>e=>{var t=function(t){if(0===t.length)return"Buffered Ranges are empty";let i="Buffered Ranges: \n";for(let e=0;e ${r}. Duration (${r-s}) -`}return i}(s[i+"Buffered"]());s.logger_(`received "updateend" event for ${i} Source Buffer: `,t),s.queuePending[i]&&(t=s.queuePending[i].doneFn,s.queuePending[i]=null,t)&&t(s[i+"Error_"]),oc(i,s)};class pc extends E.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>oc("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Ud("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=cc("video",this),this.onAudioUpdateEnd_=cc("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){uc({type:"mediaSource",sourceUpdater:this,action:hc.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){uc({type:e,sourceUpdater:this,action:hc.abort(e),name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?uc({type:"mediaSource",sourceUpdater:this,action:hc.removeSourceBuffer(e),name:"removeSourceBuffer"}):E.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!E.browser.IS_FIREFOX&&window.MediaSource&&window.MediaSource.prototype&&"function"==typeof window.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return window.SourceBuffer&&window.SourceBuffer.prototype&&"function"==typeof window.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?uc({type:e,sourceUpdater:this,action:hc.changeType(t),name:"changeType"}):E.log.error("changeType is not supported!")}addOrChangeSourceBuffers(i){if(!i||"object"!=typeof i||0===Object.keys(i).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(i).forEach(e=>{var t=i[e];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(e,t);this.canChangeType()&&this.changeType(e,t)})}appendBuffer(e,t){var{segmentInfo:i,type:s,bytes:r}=e;this.processedAppend_=!0,"audio"===s&&this.videoBuffer&&!this.videoAppendQueued_?(this.delayedAudioAppendQueue_.push([e,t]),this.logger_(`delayed audio append of ${r.length} until video append`)):(e=t,uc({type:s,sourceUpdater:this,action:hc.appendBuffer(r,i||{mediaIndex:-1},e),doneFn:t,name:"appendBuffer"}),"video"===s&&(this.videoAppendQueued_=!0,this.delayedAudioAppendQueue_.length)&&(r=this.delayedAudioAppendQueue_.slice(),this.logger_(`queuing delayed audio ${r.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,r.forEach(e=>{this.appendBuffer.apply(this,e)})))}audioBuffered(){return dc(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered||O()}videoBuffered(){return dc(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered||O()}buffered(){var e=dc(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=dc(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,r=0;var n=[],a=[];if(!(e&&e.length&&t&&t.length))return O();let o=e.length;for(;o--;)n.push({time:e.start(o),type:"start"}),n.push({time:e.end(o),type:"end"});for(o=t.length;o--;)n.push({time:t.start(o),type:"start"}),n.push({time:t.end(o),type:"end"});for(n.sort(function(e,t){return e.time-t.time}),o=0;o{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[e+"QueueCallback"](()=>lc(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}let mc=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),gc=new Uint8Array("\n\n".split("").map(e=>e.charCodeAt(0)));class fc extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class yc extends ic{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){var e;return this.subtitlesTrack_&&this.subtitlesTrack_.cues&&this.subtitlesTrack_.cues.length?O([[(e=this.subtitlesTrack_.cues)[0].startTime,e[e.length-1].startTime]]):O()}initSegmentForMap(e,t=!1){if(!e)return null;var i=qh(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(t=gc.byteLength+e.bytes.byteLength,(t=new Uint8Array(t)).set(e.bytes),t.set(gc,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:t}),s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return"undefined"!=typeof e&&(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_())&&this.init_(),this.subtitlesTrack_}remove(e,t){Vu(e,t,this.subtitlesTrack_)}fillBuffer_(){var e=this.chooseNextRequest_();e&&(null===this.syncController_.timestampOffsetForTimeline(e.timeline)?(this.syncController_.one("timestampoffset",()=>{this.state="READY",this.paused()||this.monitorBuffer_()}),this.state="WAITING_ON_TIMELINE"):this.loadSegment_(e))}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(this.subtitlesTrack_)if(this.saveTransferStats_(t.stats),this.pendingSegment_)if(e)e.code===Su.TIMEOUT&&this.handleTimeout_(),e.code===Su.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);else{var s=this.pendingSegment_,r=i.mp4VttCues&&i.mp4VttCues.length,n=(r&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending"),s.segment);if(n.map&&(n.map.bytes=t.map.bytes),s.bytes=t.bytes,"function"!=typeof window.WebVTT&&"function"==typeof this.loadVttJs)this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:"Error loading vtt.js"}));else{n.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:E.Error.StreamingVttParserError,error:e}})}r||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest?(this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY"):(s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=n.duration,s.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new window.VTTCue(e.startTime,e.endTime,e.text):e)}),function(t){var i=t.cues;if(i){var s={};for(let e=i.length-1;0<=e;e--){var r=i[e],n=r.startTime+`-${r.endTime}-`+r.text;s[n]?t.removeCue(r):s[n]=r}}}(this.subtitlesTrack_),this.handleAppendsDone_())}}else this.state="READY",this.mediaRequestsAborted+=1;else this.state="READY"}handleData_(e,t){var i=e&&"vtt"===e.type,s=t&&"text"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(r){let n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();r.mp4VttCues.forEach(e=>{var t=e.start+n,i=e.end+n;let s=new window.VTTCue(t,i,e.cueText);e.settings&&e.settings.split(" ").forEach(e=>{var e=e.split(":"),t=e[0],e=e[1];s[t]=isNaN(e)?e:Number(e)}),r.cues.push(s)})}parseVTTCues_(t){let i,s=!1;if("function"!=typeof window.WebVTT)throw new fc;if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},t.mp4VttCues)this.parseMp4VttCues_(t);else{"function"==typeof window.TextDecoder?i=new window.TextDecoder("utf8"):(i=window.WebVTT.StringDecoder(),s=!0);var r=new window.WebVTT.Parser(window,window.vttjs,i);if(r.oncue=t.cues.push.bind(t.cues),r.ontimestampmap=e=>{t.timestampmap=e},r.onparsingerror=e=>{E.log.warn("Error encountered when parsing cues: "+e.message)},t.segment.map){let e=t.segment.map.bytes;s&&(e=mc(e)),r.parse(e)}let e=t.bytes;s&&(e=mc(e)),r.parse(e),r.flush()}}updateTimeMapping_(e,r,t){var i=e.segment;if(r)if(e.cues.length){var{MPEGTS:n,LOCAL:a}=e.timestampmap;let s=n/Rd-a+r.mapping;e.cues.forEach(e=>{var t=e.endTime-e.startTime,i=this.handleRollover_(e.startTime+s,r.time);e.startTime=Math.max(i,0),e.endTime=Math.max(i+t,0)}),t.syncInfo||(n=e.cues[0].startTime,a=e.cues[e.cues.length-1].startTime,t.syncInfo={mediaSequence:t.mediaSequence+e.mediaIndex,time:Math.min(n,a-i.duration)})}else i.empty=!0}handleRollover_(e,t){if(null===t)return e;let i=e*Rd;var s=t*Rd;let r;for(r=s=this.start&&ee.resetAppendedStatus())}}class bc{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){var{mediaSequence:e,segments:i}=e;if(this.isReliable_=this.isReliablePlaylist_(e,i),this.isReliable_)return this.updateStorage_(i,e,this.calculateBaseTime_(e,i,t))}getSyncInfoForTime(e){for(var{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(var s of i)if(s.isInRange(e))return s}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){let d=new Map,h="\n",u=i,c=t;this.start_=u,e.forEach((e,a)=>{let o=this.storage_.get(c);var t=u,i=t+e.duration,s=Boolean(o&&o.segmentSyncInfo&&o.segmentSyncInfo.isAppended),r=new _c({start:t,end:i,appended:s,segmentIndex:a});e.syncInfo=r;let l=u;var n=(e.parts||[]).map((e,t)=>{var i=l,s=l+e.duration,r=Boolean(o&&o.partsSyncInfo&&o.partsSyncInfo[t]&&o.partsSyncInfo[t].isAppended),n=new _c({start:i,end:s,appended:r,segmentIndex:a,partIndex:t});return l=s,h+=`Media Sequence: ${c}.${t} | Range: ${i} --> ${s} | Appended: ${r} -`,e.syncInfo=n});d.set(c,new vc(r,n)),h+=`${Hu(e.resolvedUri)} | Media Sequence: ${c} | Range: ${t} --> ${i} | Appended: ${s}\n`,c++,u=i}),this.end_=u,this.storage_=d,this.diagnostics_=h}calculateBaseTime_(e,i,t){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;var s=Math.min(...this.storage_.keys());if(e{return i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null}},{name:"MediaSequence",run:(e,t,i,s,r,n)=>{e=e.getMediaSequenceSync(n);return e&&e.isReliable&&(n=e.getSyncInfoForTime(r))?{time:n.start,partIndex:n.partIndex,segmentIndex:n.segmentIndex}:null}},{name:"ProgramDateTime",run:(t,i,e,s,r)=>{if(!Object.keys(t.timelineToDatetimeMappings).length)return null;let n=null,a=null;var o=Yd(i);r=r||0;for(let e=0;e{let n=null,a=null;r=r||0;var o=Yd(t);for(let e=0;e=d)&&(a=d,n={time:h,segmentIndex:l.segmentIndex,partIndex:l.partIndex})}}return n}},{name:"Discontinuity",run:(i,s,e,t,r)=>{let n=null;if(r=r||0,s.discontinuityStarts&&s.discontinuityStarts.length){let t=null;for(let e=0;e=l)&&(t=l,n={time:o.time,segmentIndex:a,partIndex:null})}}}return n}},{name:"Playlist",run:(e,t,i,s,r)=>{return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}];class wc extends E.EventTarget{constructor(e=0){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};var t=new bc,i=new Tc(t),s=new Tc(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Ud("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,r){if(t!==1/0)return Sc.find(({name:e})=>"VOD"===e).run(this,e,t);var n,t=this.runStrategies_(e,t,i,s,r);if(!t.length)return null;for(n of t){var{syncPoint:a,strategy:o}=n,{segmentIndex:l,time:d}=a;if(!(l<0)){var h=d+e.segments[l].duration;if(this.logger_(`Strategy: ${o}. Current time: ${s}. selected segment: ${l}. Time: [${d} -> ${h}]}`),d<=s&&so){let e;e=a<0?s.start-Hd({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:t.mediaIndex,endIndex:r}):s.end+Hd({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:t.mediaIndex+1,endIndex:r}),this.discontinuities[n]={time:e,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class Ec extends E.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return"number"==typeof t&&"number"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){return"number"==typeof t&&"number"==typeof i&&(this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e],this.trigger({type:"timelinechange",metadata:{timelineChangeInfo:{from:t,to:i}}})),this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}var Cc=nu(au(ou(function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){return!!this.listeners[e]&&(t=this.listeners[e].indexOf(t),this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(t,1),-1>7))^n]=n;for(a=o=0;!s[a];a^=l||1,o=p[o]||1)for(u=(u=o^o<<1^o<<2^o<<3^o<<4)>>8^255&u^99,h=c[d=c[l=c[r[s[a]=u]=a]]],g=16843009*h^65537*d^257*l^16843008*a,m=257*c[u]^16843008*u,n=0;n<4;n++)t[n][a]=m=m<<24^m>>>8,i[n][u]=g=g<<24^g>>>8;for(n=0;n<5;n++)t[n]=t[n].slice(0),i[n]=i[n].slice(0);return e}(),this._tables=[[h[0][0].slice(),h[0][1].slice(),h[0][2].slice(),h[0][3].slice(),h[0][4].slice()],[h[1][0].slice(),h[1][1].slice(),h[1][2].slice(),h[1][3].slice(),h[1][4].slice()]];let t,i,s;var r=this._tables[0][4],n=this._tables[1],a=e.length;let o=1;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size");var l=e.slice(0),d=[];for(this._key=[l,d],t=a;t<4*a+28;t++)s=l[t-1],(t%a==0||8===a&&t%a==4)&&(s=r[s>>>24]<<24^r[s>>16&255]<<16^r[s>>8&255]<<8^r[255&s],t%a==0)&&(s=s<<8^s>>>24^o<<24,o=o<<1^283*(o>>7)),l[t]=l[t-a]^s;for(i=0;t;i++,t--)s=l[3&i?t:t-4],t<=4||i<4?d[i]=s:d[i]=n[0][r[s>>>24]]^n[1][r[s>>16&255]]^n[2][r[s>>8&255]]^n[3][r[255&s]]}decrypt(e,t,i,s,r,n){var a,o,l=this._key[1];let d=e^l[0],h=s^l[1],u=i^l[2],c=t^l[3],p;var m=l.length/4-2;let g,f=4;var e=this._tables[1],y=e[0],_=e[1],v=e[2],b=e[3],T=e[4];for(g=0;g>>24]^_[h>>16&255]^v[u>>8&255]^b[255&c]^l[f],a=y[h>>>24]^_[u>>16&255]^v[c>>8&255]^b[255&d]^l[f+1],o=y[u>>>24]^_[c>>16&255]^v[d>>8&255]^b[255&h]^l[f+2],c=y[c>>>24]^_[d>>16&255]^v[h>>8&255]^b[255&u]^l[f+3],f+=4,d=p,h=a,u=o;for(g=0;g<4;g++)r[(3&-g)+n]=T[d>>>24]<<24^T[h>>16&255]<<16^T[u>>8&255]<<8^T[255&c]^l[f++],p=d,d=h,h=u,u=c,c=p}}class l extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}function f(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}class d{constructor(e,t,i,s){var r=d.STEP,n=new Int32Array(e.buffer);let a=new Uint8Array(e.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(n.subarray(o,o+r),t,i,a)),o=r;o>2),l=new g(Array.prototype.slice.call(t)),t=new Uint8Array(e.byteLength),d=new Int32Array(t.buffer);let h,u,c,p,m;for(h=i[0],u=i[1],c=i[2],p=i[3],m=0;m{var t,i=s[e];t=i,("function"===ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer)?r[e]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:r[e]=i}),r}self.onmessage=function(e){let i=e.data;var e=new Uint8Array(i.encrypted.bytes,i.encrypted.byteOffset,i.encrypted.byteLength),t=new Uint32Array(i.key.bytes,i.key.byteOffset,i.key.byteLength/4),s=new Uint32Array(i.iv.bytes,i.iv.byteOffset,i.iv.byteLength/4);new d(e,t,s,function(e,t){self.postMessage(r({source:i.source,decrypted:t}),[t.buffer])})}})));let kc=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Ic=(e,t)=>{(t.activePlaylistLoader=e).load()},xc={AUDIO:(a,o)=>()=>{var{mediaTypes:{[a]:e},excludePlaylist:t}=o,i=e.activeTrack(),s=e.activeGroup(),s=(s.filter(e=>e.default)[0]||s[0]).id,r=e.tracks[s];if(i===r)t({error:{message:"Problem encountered loading the default audio track."}});else{for(var n in E.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),e.tracks)e.tracks[n].enabled=e.tracks[n]===r;e.onTrackChanged()}},SUBTITLES:(i,s)=>()=>{var{[i]:e}=s.mediaTypes,t=(E.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),e.activeTrack());t&&(t.mode="disabled"),e.onTrackChanged()}},Ac={AUDIO:(e,t,i)=>{if(!t)return;let{tech:s,requestOptions:r,segmentLoaders:{[e]:n}}=i;t.on("loadedmetadata",()=>{var e=t.media();n.playlist(e,r),(!s.paused()||e.endList&&"none"!==s.preload())&&n.load()}),t.on("loadedplaylist",()=>{n.playlist(t.media(),r),s.paused()||n.load()}),t.on("error",xc[e](e,i))},SUBTITLES:(e,t,i)=>{let{tech:s,requestOptions:r,segmentLoaders:{[e]:n},mediaTypes:{[e]:a}}=i;t.on("loadedmetadata",()=>{var e=t.media();n.playlist(e,r),n.track(a.activeTrack()),(!s.paused()||e.endList&&"none"!==s.preload())&&n.load()}),t.on("loadedplaylist",()=>{n.playlist(t.media(),r),s.paused()||n.load()}),t.on("error",xc[e](e,i))}},Dc={AUDIO:(i,s)=>{var r,n,{vhs:a,sourceType:o,segmentLoaders:{[i]:e},requestOptions:l,main:{mediaGroups:d},mediaTypes:{[i]:{groups:h,tracks:u,logger_:c}},mainPlaylistLoader:p}=s,m=uh(p.main);for(r in d[i]&&0!==Object.keys(d[i]).length||(d[i]={main:{default:{default:!0}}},m&&(d[i].main.default.playlists=p.main.playlists)),d[i])for(var g in h[r]||(h[r]=[]),d[i][r]){let e=d[i][r][g],t;t=m?(c(`AUDIO group '${r}' label '${g}' is a main playlist`),e.isMainPlaylist=!0,null):"vhs-json"===o&&e.playlists?new Rh(e.playlists[0],a,l):e.resolvedUri?new Rh(e.resolvedUri,a,l):e.playlists&&"dash"===o?new iu(e.playlists[0],a,l,p):null,e=L({id:g,playlistLoader:t},e),Ac[i](i,e.playlistLoader,s),h[r].push(e),"undefined"==typeof u[g]&&(n=new E.AudioTrack({id:g,kind:(e=>{let t=e.default?"main":"alternative";return t=e.characteristics&&0<=e.characteristics.indexOf("public.accessibility.describes-video")?"main-desc":t})(e),enabled:!1,language:e.language,default:e.default,label:g}),u[g]=n)}e.on("error",xc[i](i,s))},SUBTITLES:(i,s)=>{var r,n,{tech:a,vhs:o,sourceType:l,segmentLoaders:{[i]:e},requestOptions:d,main:{mediaGroups:h},mediaTypes:{[i]:{groups:u,tracks:c}},mainPlaylistLoader:p}=s;for(r in h[i])for(var m in u[r]||(u[r]=[]),h[i][r])if(o.options_.useForcedSubtitles||!h[i][r][m].forced){let e=h[i][r][m],t;if("hls"===l)t=new Rh(e.resolvedUri,o,d);else if("dash"===l){if(!e.playlists.filter(e=>e.excludeUntil!==1/0).length)return;t=new iu(e.playlists[0],o,d,p)}else"vhs-json"===l&&(t=new Rh(e.playlists?e.playlists[0]:e.resolvedUri,o,d));e=L({id:m,playlistLoader:t},e),Ac[i](i,e.playlistLoader,s),u[r].push(e),"undefined"==typeof c[m]&&(n=a.addRemoteTextTrack({id:m,kind:"subtitles",default:e.default&&e.autoselect,language:e.language,label:m},!1).track,c[m]=n)}e.on("error",xc[i](i,s))},"CLOSED-CAPTIONS":(e,t)=>{var i,{tech:s,main:{mediaGroups:r},mediaTypes:{[e]:{groups:n,tracks:a}}}=t;for(i in r[e])for(var o in n[i]||(n[i]=[]),r[e][i]){var l=r[e][i][o];if(/^(?:CC|SERVICE)/.test(l.instreamId)){var d=s.options_.vhs&&s.options_.vhs.captionServices||{};let e={label:o,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};void 0===(e=d[e.instreamId]?L(e,d[e.instreamId]):e).default&&delete e.default,n[i].push(L({id:o},l)),"undefined"==typeof a[o]&&(d=s.addRemoteTextTrack({id:e.instreamId,kind:"captions",default:e.default,language:e.language,label:e.label},!1).track,a[o]=d)}}}},Pc=(t,i)=>{for(let e=0;e()=>{var e,{[i]:{tracks:t}}=s.mediaTypes;for(e in t)if(t[e].enabled)return t[e];return null},SUBTITLES:(i,s)=>()=>{var e,{[i]:{tracks:t}}=s.mediaTypes;for(e in t)if("showing"===t[e].mode||"hidden"===t[e].mode)return t[e];return null}},Oc=n=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{Dc[e](e,n)});let{mediaTypes:a,mainPlaylistLoader:e,tech:t,vhs:i,segmentLoaders:{AUDIO:s,main:r}}=n;["AUDIO","SUBTITLES"].forEach(e=>{var o,l,d,h,i,s,u,c,t,r;a[e].activeGroup=(o=e,l=n,t=>{var{mainPlaylistLoader:e,mediaTypes:{[o]:{groups:i}}}=l,s=e.media();if(!s)return null;let r=null;s.attributes[o]&&(r=i[s.attributes[o]]);var n=Object.keys(i);if(!r)if("AUDIO"===o&&1e.id===t.id)[0]||null}),a[e].activeTrack=Lc[e](e,n),a[e].onGroupChanged=(d=e,h=n,()=>{var{segmentLoaders:{[d]:e,main:t},mediaTypes:{[d]:i}}=h,s=i.activeTrack(),r=i.getActiveGroup(),n=i.activePlaylistLoader,a=i.lastGroup_;r&&a&&r.id===a.id||(i.lastGroup_=r,i.lastTrack_=s,kc(e,i),r&&!r.isMainPlaylist&&(r.playlistLoader?(e.resyncLoader(),Ic(r.playlistLoader,i)):n&&t.resetEverything()))}),a[e].onGroupChanging=(i=e,s=n,()=>{var{segmentLoaders:{[i]:e},mediaTypes:{[i]:t}}=s;t.lastGroup_=null,e.abort(),e.pause()}),a[e].onTrackChanged=(u=e,c=n,()=>{var e,t,{mainPlaylistLoader:i,segmentLoaders:{[u]:s,main:r},mediaTypes:{[u]:n}}=c,a=n.activeTrack(),o=n.getActiveGroup(),l=n.activePlaylistLoader,d=n.lastTrack_;if((!d||!a||d.id!==a.id)&&(n.lastGroup_=o,n.lastTrack_=a,kc(s,n),o)){if(o.isMainPlaylist)return!a||!d||a.id===d.id||(t=(e=c.vhs.playlistController_).selectPlaylist(),e.media()===t)?void 0:(n.logger_(`track change. Switching main audio from ${d.id} to `+a.id),i.pause(),r.resetEverything(),void e.fastQualityChange_(t));if("AUDIO"===u){if(!o.playlistLoader)return r.setAudio(!0),void r.resetEverything();s.setAudio(!0),r.setAudio(!1)}l===o.playlistLoader||(s.track&&s.track(a),s.resetEverything()),Ic(o.playlistLoader,n)}}),a[e].getActiveGroup=([t,r]=[e,n.mediaTypes],()=>{var e=r[t].activeTrack();return e?r[t].activeGroup(e):null})});var o,l=a.AUDIO.activeGroup();l&&(l=(l.filter(e=>e.default)[0]||l[0]).id,a.AUDIO.tracks[l].enabled=!0,a.AUDIO.onGroupChanged(),a.AUDIO.onTrackChanged(),(a.AUDIO.getActiveGroup().playlistLoader?(r.setAudio(!1),s):r).setAudio(!0)),e.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(e=>a[e].onGroupChanged())}),e.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(e=>a[e].onGroupChanging())});let d=()=>{a.AUDIO.onTrackChanged(),t.trigger({type:"usage",name:"vhs-audio-change"})};for(o in t.audioTracks().addEventListener("change",d),t.remoteTextTracks().addEventListener("change",a.SUBTITLES.onTrackChanged),i.on("dispose",()=>{t.audioTracks().removeEventListener("change",d),t.remoteTextTracks().removeEventListener("change",a.SUBTITLES.onTrackChanged)}),t.clearTracks("audio"),a.AUDIO.tracks)t.audioTracks().addTrack(a.AUDIO.tracks[o])};class Rc{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=Nd(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Nc extends E.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Rc,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Ud("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";var i=t.serverUri||t.serverURL;i?i.startsWith("data:")?this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1)):(this.steeringManifest.reloadUri=Nd(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")):(this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),this.trigger("error"))}requestSteeringManifest(e){var t=this.steeringManifest.reloadUri;if(t){let r=e?t:this.getRequestURI(t);if(r){let s={contentSteeringInfo:{uri:r}};this.trigger({type:"contentsteeringloadstart",metadata:s}),this.request_=this.xhr_({uri:r,requestType:"content-steering-manifest"},(e,t)=>{if(e)return 410===t.status?(this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${r} this session.`),void this.excludedSteeringManifestURLs.add(r)):429===t.status?(t=t.responseHeaders["retry-after"],this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${t} seconds.`),void this.startTTLTimeout_(parseInt(t,10))):(this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_());this.trigger({type:"contentsteeringloadcomplete",metadata:s});let i;try{i=JSON.parse(this.request_.responseText)}catch(e){t={errorType:E.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:"error",metadata:t})}this.assignSteeringProperties_(i);e={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:e}),this.startTTLTimeout_()})}else this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose()}}setProxyServerUrl_(e){var e=new window.URL(e),t=new window.URL(this.proxyServerUrl_);return t.searchParams.set("url",encodeURI(e.toString())),this.setSteeringParams_(t.toString())}decodeDataUriManifest_(e){e=JSON.parse(window.atob(e));this.assignSteeringProperties_(e)}setSteeringParams_(e){var t,e=new window.URL(e),i=this.getPathway(),s=this.getBandwidth_();return i&&(t=`_${this.manifestType_}_pathway`,e.searchParams.set(t,i)),s&&(t=`_${this.manifestType_}_throughput`,e.searchParams.set(t,s)),e.toString()}assignSteeringProperties_(e){var t;this.steeringManifest.version=e.VERSION,this.steeringManifest.version?(this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose()),t=(e=>{for(var t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority),this.currentPathway!==t&&(this.currentPathway=t,this.trigger("content-steering"))):(this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;var t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){var i=this.setProxyServerUrl_(e);if(!t(i))return i}i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){this.ttlTimeout_=window.setTimeout(()=>{this.requestSteeringManifest()},1e3*e)}clearTTLTimeout_(){window.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Rc}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(Nd(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Mc,Uc=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"];class Bc extends E.EventTarget{constructor(e){super(),this.fastQualityChange_=((t,i)=>{let s=null;return(...e)=>{clearTimeout(s),s=setTimeout(()=>{t.apply(null,e)},i)}})(this.fastQualityChange_.bind(this),100);let{src:t,withCredentials:i,tech:r,bandwidth:s,externVhs:n,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:d,cacheEncryptionKeys:h,bufferBasedABR:u,leastPixelDiffSelector:c,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let g=e.maxPlaylistRetries;null!==g&&"undefined"!=typeof g||(g=1/0),Mc=n,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(c),this.withCredentials=i,this.tech_=r,this.vhs_=r.vhs,this.player_=e.player_,this.sourceType_=d,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=(()=>{let t={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:sc,activeTrack:sc,getActiveGroup:sc,onGroupChanged:sc,onTrackChanged:sc,lastTrack_:null,logger_:Ud(`MediaGroups[${e}]`)}}),t})(),m&&window.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new window.ManagedMediaSource,this.usingManagedMediaSource_=!0,E.log("Using ManagedMediaSource")):window.MediaSource&&(this.mediaSource=new window.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=O(),this.hasPlayed_=!1,this.syncController_=new wc(e),this.segmentMetadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new Cc,this.sourceUpdater_=new pc(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Ec,this.keyStatusMap_=new Map;var f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:h,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)},f=(this.mainPlaylistLoader_="dash"===this.sourceType_?new iu(t,this.vhs_,L(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Rh(t,this.vhs_,L(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new ic(L(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new ic(L(f,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new yc(L(f,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){r.off("vttjserror",s),e()}function s(){r.off("vttjsloaded",i),t()}r.one("vttjsloaded",i),r.one("vttjserror",s),r.addWebVttScript_()})}),e),this.contentSteeringController_=new Nc(this.vhs_.xhr,()=>this.mainSegmentLoader_.bandwidth),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),Uc.forEach(e=>{this[e+"_"]=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]}.bind(this,e)}),this.logger_=Ud("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1,"none"===this.tech_.preload()?"play":"loadstart");this.tech_.one(f,()=>{let e=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){var t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){var s=this.media(),s=s&&(s.id||s.uri),r=e&&(e.id||e.uri);s&&s!==r&&(this.logger_(`switch media ${s} -> ${r} from `+t),s={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t},this.trigger({type:"renditionselected",metadata:s}),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{var t=this.mediaTypes_[e],t=t?t.activeGroup():null;let i=this.contentSteeringController_.getPathway();t&&i&&(t=(t.length?t[0]:t).playlists.filter(e=>e.attributes.serviceLocation===i)).length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=window.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(window.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){var t=this.main(),e=t&&t.playlists||[];if(!t||!t.mediaGroups||!t.mediaGroups.AUDIO)return e;var i=t.mediaGroups.AUDIO,s=Object.keys(i);let r;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)r=this.mediaTypes_.AUDIO.activeTrack();else{var n,a=i.main||s.length&&i[s[0]];for(n in a)if(a[n].default){r={label:n};break}}if(!r)return e;var o,l=[];for(o in i)if(i[o][r.label]){var d=i[o][r.label];if(d.playlists&&d.playlists.length)l.push.apply(l,d.playlists);else if(d.uri)l.push(d);else if(t.playlists.length)for(let e=0;e{var e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;dh(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Oc({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let t=this.mainPlaylistLoader_.media();if(!t){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let e;if(!(e=(e=this.enableLowInitialPlaylist?this.selectInitialPlaylist():e)||this.selectPlaylist())||!this.shouldSwitchToMedia_(e))return;if(this.initialMedia_=e,this.switchMedia_(this.initialMedia_,"initial"),!("vhs-json"===this.sourceType_&&this.initialMedia_.segments))return;t=this.initialMedia_}this.handleUpdatedMediaPlaylist(t)}),this.mainPlaylistLoader_.on("error",()=>{var e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{var e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;dh(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,"dash"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{var e=this.mainPlaylistLoader_.media();"playlist-unchanged"!==e.lastExcludeReason_&&this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})});["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(e=>{this.mainPlaylistLoader_.on(e,e=>{this.player_.trigger(f({},e))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){var i=e.mediaGroups||{};let s=!0;var r,e=Object.keys(i.AUDIO);for(r in i.AUDIO)for(var n in i.AUDIO[r])i.AUDIO[r][n].uri||(s=!1);s&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Mc.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),e.length&&1 `+s.id;if(!e)return l(d+" as current playlist is not set"),!0;if(s.id!==e.id){var h=Boolean(Bd(t,i).length);if(!e.endList)return h||"number"!=typeof e.partTargetDuration?(l(d+" as current playlist is live"),!0):(l(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);h=jd(t,i),t=o?R.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:R.MAX_BUFFER_LOW_WATER_LINE;if(a= bufferLowWaterLine (${h} >= ${r})`;return o&&(e+=` and next bandwidth > current bandwidth (${i} > ${a})`),l(e),!0}l(`not ${d} as no switching criteria met`)}}else E.log.warn("We received no playlist to switch to. Please check your stream.");return!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:r,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{var e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{var e=this.audioSegmentLoader_.pendingSegment_;e&&e.segment&&e.segment.syncInfo&&(e=e.segment.syncInfo.end+.01,this.tech_.setCurrentTime(e))}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:10}))});var e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();var e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()});["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(e=>{this.mainSegmentLoader_.on(e,e=>{this.player_.trigger(f({},e))}),this.audioSegmentLoader_.on(e,e=>{this.player_.trigger(f({},e))}),this.subtitleSegmentLoader_.on(e,e=>{this.player_.trigger(f({},e))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){var e;if(!this.setupFirstPlay())return this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load(),e=this.tech_.seekable(),this.tech_.duration()===1/0&&this.tech_.currentTime(){}),this.trigger("sourceopen")}handleSourceEnded_(){var e,t;this.inbandTextTracks_.metadataTrack_&&(e=this.inbandTextTracks_.metadataTrack_.cues)&&e.length&&(t=this.duration(),e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t)}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;var t;this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.mainSegmentLoader_.getCurrentMediaInfo_(),e=(t&&!t.hasVideo||e)&&this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){var t,i;return!!this.seekable().length&&null!==(t=this.syncController_.getExpiredTime(e,this.duration()))&&(e=Mc.Playlist.playlistEnd(e,t),t=this.tech_.currentTime(),(i=this.tech_.buffered()).length?(i=i.end(i.length-1))-t<=$d&&e-i<=$d:e-t<=$d)}excludePlaylist({playlistToExclude:s=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(s=s||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,s){s.playlistErrors_++;var r=this.mainPlaylistLoader_.main.playlists,n=r.filter(ah),n=1===n.length&&n[0]===s;if(1===r.length&&i!==1/0)return E.log.warn(`Problem encountered with playlist ${s.id}. `+"Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(n);if(n){if(this.main().contentSteering){let e=this.pathwayAttribute_(s);var a=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(e),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(e)},a)}let i=!1;r.forEach(e=>{var t;e!==s&&"undefined"!=typeof(t=e.excludeUntil)&&t!==1/0&&(i=!0,delete e.excludeUntil)}),i&&(E.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let e;e=s.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,s.excludeUntil=e,t.reason&&(s.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});a=this.selectPlaylist();if(a)return(t.internal?this.logger_:E.log.warn)(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${s.id}.`+(t.message?" "+t.message:"")+` Switching to playlist ${a.id}.`),a.attributes.AUDIO!==s.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),a.attributes.SUBTITLES!==s.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]),r=a.targetDuration/2*1e3||5e3,i="number"==typeof a.lastRequest&&Date.now()-a.lastRequest<=r,this.switchMedia_(a,"exclude",n||i);this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error")}else this.error=t,"open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network")}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(i,e){let s=[];var t="all"===i,r=(!t&&"main"!==i||s.push(this.mainPlaylistLoader_),[]);!t&&"audio"!==i||r.push("AUDIO"),!t&&"subtitle"!==i||(r.push("CLOSED-CAPTIONS"),r.push("SUBTITLES")),r.forEach(e=>{e=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;e&&s.push(e)}),["main","audio","subtitle"].forEach(e=>{var t=this[e+"SegmentLoader_"];!t||i!==e&&"all"!==i||s.push(t)}),s.forEach(t=>e.forEach(e=>{"function"==typeof t[e]&&t[e]()}))}setCurrentTime(e){var t=Bd(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){var e;return this.mainPlaylistLoader_&&(e=this.mainPlaylistLoader_.media())?e.endList?this.mediaSource?this.mediaSource.duration:Mc.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){var i,s,e=e.media();return e?(t=this.syncController_.getMediaSequenceSync(t))&&t.isReliable?(s=t.start,t=t.end,isFinite(s)&&isFinite(t)?(i=Mc.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,e),O([[s,Math.max(s,t-i)]])):null):null!==(s=this.syncController_.getExpiredTime(e,this.duration()))&&(t=Mc.Playlist.seekable(e,s,Mc.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,e))).length?t:null:null}computeFinalSeekable_(e,t){var i,s,r;return!t||(i=e.start(0),s=e.end(0),r=t.start(0),t=t.end(0),s{var t,i=this.mediaTypes_[e].groups;for(t in i)i[t].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),e=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return t&&e}getCodecsOrExclude_(){let n={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},a=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();n.video=n.main;var e=Sh(this.main(),a);let o={};var t=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(n.main.hasVideo&&(o.video=e.video||n.main.videoCodec||"avc1.4d400d"),n.main.isMuxed&&(o.video+=","+(e.audio||n.main.audioCodec||oa)),(n.main.hasAudio&&!n.main.isMuxed||n.audio.hasAudio||t)&&(o.audio=e.audio||n.main.audioCodec||n.audio.audioCodec||oa,n.audio.isFmp4=(n.main.hasAudio&&!n.main.isMuxed?n.main:n.audio).isFmp4),o.audio||o.video){let i=(e,t)=>e?Qn(t,this.usingManagedMediaSource_):Jn(t),s={},r;if(["video","audio"].forEach(function(e){var t;o.hasOwnProperty(e)&&!i(n[e].isFmp4,o[e])&&(t=n[e].isFmp4?"browser":"muxer",s[t]=s[t]||[],s[t].push(o[e]),"audio"===e)&&(r=t)}),t&&r&&a.attributes.AUDIO){let t=a.attributes.AUDIO;this.main().playlists.forEach(e=>{(e.attributes&&e.attributes.AUDIO)===t&&e!==a&&(e.excludeUntil=1/0)}),this.logger_(`excluding audio group ${t} as ${r} does not support codec(s): "${o.audio}"`)}if(!Object.keys(s).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){let s=[];if(["video","audio"].forEach(e=>{var t=(na(this.sourceUpdater_.codecs[e]||"")[0]||{}).type,i=(na(o[e]||"")[0]||{}).type;t&&i&&t.toLowerCase()!==i.toLowerCase()&&s.push(`"${this.sourceUpdater_.codecs[e]}" -> "${o[e]}"`)}),s.length)return void this.excludePlaylist({playlistToExclude:a,error:{message:`Codec switching not supported: ${s.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return o}e=Object.keys(s).reduce((e,t)=>(e&&(e+=", "),e+=`${t} does not support codec(s): "${s[t].join(",")}"`),"")+".",this.excludePlaylist({playlistToExclude:a,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}else this.excludePlaylist({playlistToExclude:a,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0})}tryToCreateSourceBuffers_(){var e;"open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers()||this.areMediaTypesKnown_()&&(e=this.getCodecsOrExclude_())&&(this.sourceUpdater_.createSourceBuffers(e),e=[e.video,e.audio].filter(Boolean).join(","),this.excludeIncompatibleVariants_(e))}excludeUnsupportedVariants_(){let s=this.main().playlists,r=[];Object.keys(s).forEach(e=>{var t,i,e=s[e];-1===r.indexOf(e.id)&&(r.push(e.id),i=[],!(t=Sh(this.main,e)).audio||Jn(t.audio)||Qn(t.audio,this.usingManagedMediaSource_)||i.push("audio codec "+t.audio),!t.video||Jn(t.video)||Qn(t.video,this.usingManagedMediaSource_)||i.push("video codec "+t.video),t.text&&"stpp.ttml.im1t"===t.text&&i.push("text codec "+t.text),i.length)&&(e.excludeUntil=1/0,this.logger_(`excluding ${e.id} for unsupported: `+i.join(", ")))})}excludeIncompatibleVariants_(e){let r=[],n=this.main().playlists;e=kh(na(e));let a=Th(e),o=e.video&&na(e.video)[0]||null,l=e.audio&&na(e.audio)[0]||null;Object.keys(n).forEach(e=>{var t,i,s,e=n[e];-1===r.indexOf(e.id)&&e.excludeUntil!==1/0&&(r.push(e.id),t=[],s=Sh(this.mainPlaylistLoader_.main,e),i=Th(s),s.audio||s.video)&&(i!==a&&t.push(`codec count "${i}" !== "${a}"`),this.sourceUpdater_.canChangeType()||(i=s.video&&na(s.video)[0]||null,s=s.audio&&na(s.audio)[0]||null,i&&o&&i.type.toLowerCase()!==o.type.toLowerCase()&&t.push(`video codec "${i.type}" !== "${o.type}"`),s&&l&&s.type.toLowerCase()!==l.type.toLowerCase()&&t.push(`audio codec "${s.type}" !== "${l.type}"`)),t.length)&&(e.excludeUntil=1/0,this.logger_(`excluding ${e.id}: `+t.join(" && ")))})}updateAdCues_(e){let t=0;var i=this.seekable();i.length&&(t=i.start(0)),function(s,r,e=0){if(s.segments){let t=e,i;for(let e=0;e=s.adStartTime&&t<=s.adEndTime)return s}return null}(r,t+o.duration/2)){if("cueIn"in o){i.endTime=t,i.adEndTime=t,t+=o.duration,i=null;continue}if(t{let r=e.metadataTrack_;if(r){let s=window.WebKitDataCue||window.VTTCue;t.forEach(e=>{for(var t of Object.keys(e)){var i;Wu.has(t)||((i=new s(e.startTime,e.endTime,"")).id=e.id,i.type="com.apple.quicktime.HLS",i.value={key:$u[t],data:e[t]},"scte35Out"!==t&&"scte35In"!==t||(i.value.data=new Uint8Array(i.value.data.match(/[\da-f]{2}/gi)).buffer),r.addCue(i))}e.processDateRange()})}})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){var s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Gu(this.inbandTextTracks_,e,this.tech_),zu({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){var e=this.main();if(e.contentSteering){for(var t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this));["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(e=>{this.contentSteeringController_.on(e,e=>{this.trigger(f({},e))})}),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{let r=this.main();(this.contentSteeringController_.didDASHTagChange(r.uri,r.contentSteering)||(()=>{var e,t=this.contentSteeringController_.getAvailablePathways(),i=[];for(e of r.playlists){var s=e.attributes.serviceLocation;if(s&&(i.push(s),!t.has(s)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){let a=this.contentSteeringController_.getPathway();if(a){this.handlePathwayClones_();let s=this.main().playlists,r=new Set,n=!1;Object.keys(s).forEach(e=>{var e=s[e],t=this.pathwayAttribute_(e),t=t&&a!==t,i=(e.excludeUntil===1/0&&"content-steering"===e.lastExcludeReason_&&!t&&(delete e.excludeUntil,delete e.lastExcludeReason_,n=!0),!e.excludeUntil&&e.excludeUntil!==1/0);!r.has(e.id)&&t&&i&&(r.add(e.id),e.excludeUntil=1/0,e.lastExcludeReason_="content-steering",this.logger_(`excluding ${e.id} for `+e.lastExcludeReason_))}),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(e=>{var e=this.mediaTypes_[e];e.activePlaylistLoader&&(e=e.activePlaylistLoader.media_)&&e.attributes.serviceLocation!==a&&(n=!0)}),n&&this.changeSegmentPathway_()}}handlePathwayClones_(){var i=this.main().playlists,s=this.contentSteeringController_.currentPathwayClones,r=this.contentSteeringController_.nextPathwayClones;if(s&&s.size||r&&r.size){for(var[e,t]of s.entries())r.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(t),this.contentSteeringController_.excludePathway(e));for(let[e,t]of r.entries()){var n=s.get(e);n?this.equalPathwayClones_(n,t)||(this.mainPlaylistLoader_.updateOrDeleteClone(t,!0),this.contentSteeringController_.addAvailablePathway(e)):(i.filter(e=>e.attributes["PATHWAY-ID"]===t["BASE-ID"]).forEach(e=>{this.mainPlaylistLoader_.addClonePathway(t,e)}),this.contentSteeringController_.addAvailablePathway(e))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...r])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;var i,s,r=e["URI-REPLACEMENT"].PARAMS,n=t["URI-REPLACEMENT"].PARAMS;for(i in r)if(r[i]!==n[i])return!1;for(s in n)if(r[s]!==n[s])return!1;return!0}changeSegmentPathway_(){var e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.main){let r=0,n="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(s=>{var e=this.mainPlaylistLoader_.getKeyIdSet(s);e&&e.size&&e.forEach(e=>{var t="usable",t=this.keyStatusMap_.has(e)&&this.keyStatusMap_.get(e)===t,i=s.lastExcludeReason_===n&&s.excludeUntil===1/0;t?i&&(delete s.excludeUntil,delete s.lastExcludeReason_,this.logger_(`enabling playlist ${s.id} because key ID ${e} is usable`)):(s.excludeUntil!==1/0&&s.lastExcludeReason_!==n&&(s.excludeUntil=1/0,s.lastExcludeReason_=n,this.logger_(`excluding playlist ${s.id} because the key ID ${e} doesn't exist in the keyStatusMap or is not usable`)),r++)})}),r>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{var t=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,i=e.excludeUntil===1/0&&e.lastExcludeReason_===n;t&&i&&(delete e.excludeUntil,E.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${n} key IDs`))})}}addKeyStatus_(e,t){e=("string"==typeof e?e:(e=>{e=new Uint8Array(e);return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${e} added to the keyStatusMap`),this.keyStatusMap_.set(e,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class Fc{constructor(e,t,i){var s,n,a,o,r=e.playlistController_,l=r.fastQualityChange_.bind(r);t.attributes&&(s=t.attributes.RESOLUTION,this.width=s&&s.width,this.height=s&&s.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]),this.codecs=Sh(r.main(),t),this.playlist=t,this.id=i,this.enabled=(n=e.playlists,a=t.id,o=l,e=>{var t=n.main.playlists[a],i=nh(t),s=ah(t);if("undefined"==typeof e)return s;e?delete t.disabled:t.disabled=!0;var r={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:"fast-quality"};return e===s||i||(e?(o(t),n.trigger({type:"renditionenabled",metadata:r})):n.trigger({type:"renditiondisabled",metadata:r})),e})}}let qc=["seeking","seeked","pause","playing","error"];class jc extends E.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Ud("PlaybackWatcher"),this.logger_("initialize");let t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),r=()=>this.resetTimeUpdate_(),n=this.playlistController_,a=["main","subtitle","audio"],o={},l=(a.forEach(e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},n[e+"SegmentLoader_"].on("appendsdone",o[e].updateend),n[e+"SegmentLoader_"].on("playlistupdate",o[e].reset),this.tech_.on(["seeked","seeking"],o[e].reset)}),t=>{["main","audio"].forEach(e=>{n[e+"SegmentLoader_"][t]("appended",this.seekingAppendCheck_)})});this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l("off"))},this.clearSeekingAppendCheck_=()=>l("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(qc,r),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(qc,r),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),a.forEach(e=>{n[e+"SegmentLoader_"].off("appendsdone",o[e].updateend),n[e+"SegmentLoader_"].off("playlistupdate",o[e].reset),this.tech_.off(["seeked","seeking"],o[e].reset)}),this.checkCurrentTimeTimeout_&&window.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&window.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=window.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){var t=this.playlistController_[e+"SegmentLoader_"];0=t.end(t.length-1))?this.techWaiting_():void(5<=this.consecutiveUpdates&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.playedRanges_.push(O([this.lastRecordedTime,e])),t={playedRanges:this.playedRanges_},this.playlistController_.trigger({type:"playedrangeschanged",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e))}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;var e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(s=e.end(e.length-1),i=s),this.beforeSeekableWindow_(e,t)&&(s=e.start(0),i=s+(s===e.end(0)?0:$d)),"undefined"!=typeof i)this.logger_(`Trying to seek outside of seekable at time ${t} with `+`seekable range ${Gd(e)}. Seeking to `+i+".");else{var s=this.playlistController_.sourceUpdater_,e=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,s=s.videoBuffer?s.videoBuffered():null,n=this.media(),a=n.partTargetDuration||2*(n.targetDuration-zd),o=[r,s];for(let e=0;e ${t.end(0)}]. Attempting to resume `+"playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})))}techWaiting_(){var e,t=this.seekable(),i=this.tech_.currentTime();return!!this.tech_.seeking()||(this.beforeSeekableWindow_(t,i)?(t=t.end(t.length-1),this.logger_(`Fell out of live window at time ${i}. Seeking to `+"live point (seekable end) "+t),this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0):(t=this.tech_.vhs.playlistController_.sourceUpdater_,e=this.tech_.buffered(),this.videoUnderflow_({audioBuffered:t.audioBuffered(),videoBuffered:t.videoBuffered(),currentTime:i})?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0):0<(t=Fd(e,i)).length&&(this.logger_(`Stopped at ${i} and seeking to `+t.start(0)),this.resetTimeUpdate_(),this.skipTheGap_(i),!0)))}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let r=e.end(e.length-1)+$d;var n=!i.endList;return t>(r=n&&("number"==typeof i.partTargetDuration||s)?e.end(e.length-1)+3*i.targetDuration:r)}beforeSeekableWindow_(e,t){return!!(e.length&&0{t.trigger({type:"usage",name:"vhs-error-reload-initialized"})}),function(){a&&t.currentTime(a)});t.on("error",s),t.on("dispose",r),t.reloadSourceOnError=function(e){r(),Vc(t,e)}};function zc(t,e){var i=e.media();let s=-1;for(let e=0;ebu(e,t)),e.filter(e=>!!Sh(this.playlists.main,e).video));return e[0]||null},lastBandwidthSelector:ju,movingAverageBandwidthSelector:function(t){let i=-1,s=-1;if(t<0||1{Object.defineProperty(N,t,{get(){return E.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),R[t]},set(e){E.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),"number"!=typeof e||e<0?E.log.warn(`value of Vhs.${t} must be greater than or equal to 0`):R[t]=e}})}),"videojs-vhs"),Wc=(N.canPlaySource=function(){return E.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},({player:s,sourceKeySystems:e,audioMedia:t,mainPlaylists:i})=>{if(!s.eme.initializeMediaKeys)return Promise.resolve();var r,t=t?i.concat([t]):i,t=(i=t,r=Object.keys(e),i.reduce((e,s)=>{var t;return s.contentProtection&&(t=r.reduce((e,t)=>{var i=s.contentProtection[t];return i&&i.pssh&&(e[t]={pssh:i.pssh}),e},{}),Object.keys(t).length)&&e.push(t),e},[]));let n=[],a=[];return t.forEach(e=>{a.push(new Promise((e,t)=>{s.tech_.one("keysessioncreated",e)})),n.push(new Promise((t,i)=>{s.eme.initializeMediaKeys({keySystems:e},e=>{e?i(e):t()})}))}),Promise.race([Promise.all(n),Promise.race(a)])}),Gc=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{t=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=kh(na(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);var r,n=aa(s.video),a=aa(s.audio),o={};for(r in e)o[r]={},a&&(o[r].audioContentType=a),n&&(o[r].videoContentType=n),t.contentProtection&&t.contentProtection[r]&&t.contentProtection[r].pssh&&(o[r].pssh=t.contentProtection[r].pssh),"string"==typeof e[r]&&(o[r].url=e[r]);return L(e,o)})(t,i,s);return!(!t||(e.currentSource().keySystems=t)&&!e.eme&&(E.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1))},Xc=()=>{if(!window.localStorage)return null;var e=window.localStorage.getItem($c);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},Kc=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},Yc=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},Qc=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},Jc=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};N.supportsNativeHls=function(){if(!document||!document.createElement)return!1;let t=document.createElement("video");return!!E.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(e){return/maybe|probably/i.test(t.canPlayType(e))})}(),N.supportsNativeDash=!!(document&&document.createElement&&E.getTech("Html5").isSupported())&&/maybe|probably/i.test(document.createElement("video").canPlayType("application/dash+xml")),N.supportsTypeNatively=e=>"hls"===e?N.supportsNativeHls:"dash"===e&&N.supportsNativeDash,N.isSupported=function(){return E.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},N.xhr.onRequest=function(e){Kc(N.xhr,e)},N.xhr.onResponse=function(e){Yc(N.xhr,e)},N.xhr.offRequest=function(e){Qc(N.xhr,e)},N.xhr.offResponse=function(e){Jc(N.xhr,e)};t=E.getComponent("Component");class Zc extends t{constructor(e,t,i){if(super(t,i.vhs),"number"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Ud("VhsHandler"),t.options_&&t.options_.playerId&&(i=E.getPlayer(t.options_.playerId),this.player_=i),this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(document,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],e=>{var t=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){this.options_=L(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage="undefined"!=typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi="undefined"==typeof this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage&&((e=Xc())&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e)&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"})),"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=R.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===R.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(e=>{"undefined"!=typeof this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;e=this.options_.customPixelRatio;"number"==typeof e&&0<=e&&(this.customPixelRatio=e)}setOptions(e={}){this.setOptions_(e)}src(e,t){e&&(this.setOptions_(),this.options_.src=0===(e=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(e.substring(e.indexOf(",")+1)):e,this.options_.tech=this.tech_,this.options_.externVhs=N,this.options_.sourceType=Zn(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Bc(this.options_),e=L({liveRangeSafeTimeDelta:$d},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_}),this.playbackWatcher_=new jc(e),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{var e=E.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}),t=this.options_.bufferBasedABR?N.movingAverageBandwidthSelector(.55):N.STANDARD_PLAYLIST_SELECTOR,this.playlistController_.selectPlaylist=(this.selectPlaylist||t).bind(this),this.playlistController_.selectInitialPlaylist=N.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;var t=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection;return this.options_.useNetworkInformationApi&&t&&(t=1e3*t.downlink*1e3,e=1e7<=t&&1e7<=e?Math.max(e,t):t),e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){var e=1/(this.bandwidth||1);let t;return t=0this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Xd(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Xd(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{if(this.options_.useBandwidthFromLocalStorage){var e={bandwidth:this.bandwidth,throughput:Math.round(this.throughput)};if(window.localStorage){var t=(t=Xc())?L(t,e):e;try{window.localStorage.setItem($c,JSON.stringify(t))}catch(e){return}}}}),this.playlistController_.on("selectedinitialmedia",()=>{var i;(i=this).representations=()=>{var e=i.playlistController_.main(),e=uh(e)?i.playlistController_.getAudioTrackPlaylists_():e.playlists;return e?e.filter(e=>!nh(e)).map((e,t)=>new Fc(i,e,e.id)):[]}}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el())&&(this.mediaSourceUrl_=window.URL.createObjectURL(this.playlistController_.mediaSource),(E.browser.IS_ANY_SAFARI||E.browser.IS_IOS)&&this.options_.overrideNative&&"hls"===this.options_.sourceType&&"function"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){var e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Wc({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){var e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,e=Gc({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),e?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){var e=E.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{var t,e;t=this.qualityLevels_,(e=this).representations().forEach(e=>{t.addQualityLevel(e)}),zc(t,e.playlists)}),this.playlists.on("mediachange",()=>{zc(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":"3.17.0","mux.js":"7.1.0","mpd-parser":"1.3.1","m3u8-parser":"7.2.0","aes-decrypter":"4.0.2"}}version(){return this.constructor.version()}canChangeType(){return pc.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&window.URL.revokeObjectURL&&(window.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Wh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Gh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{Kc(this.xhr,e)},this.xhr.onResponse=e=>{Yc(this.xhr,e)},this.xhr.offRequest=e=>{Qc(this.xhr,e)},this.xhr.offResponse=e=>{Jc(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(e=>{this.playlistController_.on(e,e=>{this.player_.trigger(f({},e))})}),["gapjumped","playedrangeschanged"].forEach(e=>{this.playbackWatcher_.on(e,e=>{this.player_.trigger(f({},e))})})}}let ep={name:"videojs-http-streaming",VERSION:"3.17.0",canHandleSource(e,t={}){t=L(E.options,t);return!(!t.vhs.experimentalUseMMS&&!Qn("avc1.4d400d,mp4a.40.2",!1))&&ep.canPlayType(e.type,t)},handleSource(e,t,i={}){i=L(E.options,i);return t.vhs=new Zc(e,t,i),t.vhs.xhr=Mh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){e=Zn(e);return e&&(t=ep.getOverrideNative(t),!N.supportsTypeNatively(e)||t)?"maybe":""},getOverrideNative(e={}){var{vhs:e={}}=e,t=!(E.browser.IS_ANY_SAFARI||E.browser.IS_IOS),{overrideNative:e=t}=e;return e}};return Qn("avc1.4d400d,mp4a.40.2",!0)&&E.getTech("Html5").registerSourceHandler(ep,0),E.VhsHandler=Zc,E.VhsSourceHandler=ep,E.Vhs=N,E.use||E.registerComponent("Vhs",N),E.options.vhs=E.options.vhs||{},E.getPlugin&&E.getPlugin("reloadSourceOnError")||E.registerPlugin("reloadSourceOnError",function(e){Vc(this,e)}),E}); \ No newline at end of file +`+Yu(s)),e.map&&!e.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),s.abortRequests=Uu({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:e,abortFn:this.handleAbort_.bind(this,s),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",s.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",s.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:t,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:e,level:t,stream:i})=>{this.logger_(Yu(s)+` logged from transmuxer stream ${i} as a ${t}: `+e)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:s,timingInfo:r})=>{t={segmentInfo:ic({segment:t})};i&&(t.keyInfo=i),s&&(t.trackInfo=s),r&&(t.timingInfo=r),this.trigger({type:e,metadata:t})}})}trimBackBuffer_(e){var t=((e,t,i)=>{let s=t-R.BACK_BUFFER_LENGTH;return e.length&&(s=Math.max(s,e.start(0))),Math.min(t-i,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);0{if(!t.length)return e;if(i)return t.slice();var s=t[0].pts;let r=0;for(r;r=s);r++);return e.slice(0,r).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(e)}}setTimeMapping_(e){e=this.syncController_.mappingForTimeline(e);null!==e&&(this.timeMapping_=e)}updateMediaSecondsLoaded_(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:r,useVideoTimingInfo:n,videoTimingInfo:a,audioTimingInfo:o}){return"undefined"!=typeof e?e:n?(e=t.segments[i-1],0!==i&&e&&"undefined"!=typeof e.start&&e.end===s+r?a.start:s):o.start}waitForAppendsToComplete_(e){var t,i,s=this.getCurrentMediaInfo_(e);s?({hasAudio:s,hasVideo:i,isMuxed:t}=s,i="main"===this.loaderType_&&i,s=!this.audioDisabled_&&s&&!t,e.waitingOnAppends=0,e.hasAppendedData_?(i&&e.waitingOnAppends++,s&&e.waitingOnAppends++,i&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))):(e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e))):(this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error"))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){i=this.loaderType_,t=this.getCurrentMediaInfo_(),e=e;var t,i="main"===i&&t&&e?e.hasAudio||e.hasVideo?t.hasVideo&&!e.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&e.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null;return!!i&&(this.error({message:i,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(t){if(null!==t.timestampOffset&&"number"==typeof t.timingInfo.start&&!t.changedTimestampOffset&&"main"===this.loaderType_){let e=!1;t.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:t.segment.videoTimingInfo,audioTimingInfo:t.segment.audioTimingInfo,timingInfo:t.timingInfo}),t.changedTimestampOffset=!0,t.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(t.timestampOffset),e=!0),t.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(t.timestampOffset),e=!0),e&&this.trigger("timestampoffset")}}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&"number"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),t="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end="number"==typeof t.end?t.end:t.start+e.duration)}handleAppendsDone_(){var e,t,i;this.pendingSegment_&&(e={segmentInfo:ic({type:this.loaderType_,segment:this.pendingSegment_})},this.trigger({type:"appendsdone",metadata:e})),this.pendingSegment_?((e=this.pendingSegment_).part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_}),(t=tc(e,this.sourceType_))&&("warn"===t.severity?E.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)?this.logger_("Throwing away un-appended sync request "+Yu(e)):(this.logger_("Appended "+Yu(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t=e.segment,i=e.part,t=t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration,i=i&&i.end&&this.currentTime_()-i.end>3*e.playlist.partTargetDuration,t||i?(this.logger_(`bad ${t?"segment":"part"} `+Yu(e)),this.resetEverything()):(null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()))):(this.state="READY",this.paused()||this.monitorBuffer_())}recordThroughput_(e){var t,i;e.duration<1/60?this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60):(t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,e=Math.floor(e.byteLength/i*8*1e3),this.throughput.rate+=(e-t)/++this.throughput.count)}addSegmentMetadataCue_(e){var t,i,s,r;this.segmentMetadataTrack_&&(t=(r=e.segment).start,i=r.end,Ku(t))&&Ku(i)&&(zu(t,i,this.segmentMetadataTrack_),s=window.WebKitDataCue||window.VTTCue,r={custom:r.custom,dateTimeObject:r.dateTimeObject,dateTimeString:r.dateTimeString,programDateTime:r.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:t,end:i},(e=new s(t,i,JSON.stringify(r))).value=r,this.segmentMetadataTrack_.addCue(e))}}function rc(){}function nc(e){return"string"!=typeof e?e:e.replace(/./,e=>e.toUpperCase())}let ac=["video","audio"],oc=(e,t)=>{var i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]},lc=(i,s)=>{if(0!==s.queue.length){let e=0,t=s.queue[e];if("mediaSource"===t.type)s.updating()||"closed"===s.mediaSource.readyState||(s.queue.shift(),t.action(s),t.doneFn&&t.doneFn(),lc("audio",s),lc("video",s));else if("mediaSource"!==i&&s.ready()&&"closed"!==s.mediaSource.readyState&&!oc(i,s)){if(t.type!==i){if(null===(e=((t,i)=>{for(let e=0;e{var i=t[e+"Buffer"],s=nc(e);i&&(i.removeEventListener("updateend",t[`on${s}UpdateEnd_`]),i.removeEventListener("error",t[`on${s}Error_`]),t.codecs[e]=null,t[e+"Buffer"]=null)},hc=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),uc={appendBuffer:(s,r,n)=>(t,i)=>{var e=i[t+"Buffer"];if(hc(i.mediaSource,e)){i.logger_(`Appending segment ${r.mediaIndex}'s ${s.length} bytes to ${t}Buffer`);try{e.appendBuffer(s)}catch(e){i.logger_(`Error with code ${e.code} `+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${r.mediaIndex} to ${t}Buffer`),i.queuePending[t]=null,n(e)}}},remove:(s,r)=>(t,i)=>{var e=i[t+"Buffer"];if(hc(i.mediaSource,e)){i.logger_(`Removing ${s} to ${r} from ${t}Buffer`);try{e.remove(s,r)}catch(e){i.logger_(`Remove ${s} to ${r} from ${t}Buffer failed`)}}},timestampOffset:s=>(e,t)=>{var i=t[e+"Buffer"];hc(t.mediaSource,i)&&(t.logger_(`Setting ${e}timestampOffset to `+s),i.timestampOffset=s)},callback:i=>(e,t)=>{i()},endOfStream:t=>e=>{if("open"===e.mediaSource.readyState){e.logger_(`Calling mediaSource endOfStream(${t||""})`);try{e.mediaSource.endOfStream(t)}catch(e){E.log.warn("Failed to call media source endOfStream",e)}}},duration:t=>e=>{e.logger_("Setting mediaSource duration to "+t);try{e.mediaSource.duration=t}catch(e){E.log.warn("Failed to set media source duration",e)}},abort:()=>(t,e)=>{if("open"===e.mediaSource.readyState){var i=e[t+"Buffer"];if(hc(e.mediaSource,i)){e.logger_(`calling abort on ${t}Buffer`);try{i.abort()}catch(e){E.log.warn(`Failed to abort on ${t}Buffer`,e)}}}},addSourceBuffer:(s,r)=>e=>{var t=nc(s),i=oa(r),i=(e.logger_(`Adding ${s}Buffer with codec ${r} to mediaSource`),e.mediaSource.addSourceBuffer(i));i.addEventListener("updateend",e[`on${t}UpdateEnd_`]),i.addEventListener("error",e[`on${t}Error_`]),e.codecs[s]=r,e[s+"Buffer"]=i},removeSourceBuffer:i=>e=>{var t=e[i+"Buffer"];if(dc(i,e),hc(e.mediaSource,t)){e.logger_(`Removing ${i}Buffer with codec ${e.codecs[i]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(t)}catch(e){E.log.warn(`Failed to removeSourceBuffer ${i}Buffer`,e)}}},changeType:o=>(t,i)=>{var e=i[t+"Buffer"],s=oa(o);if(hc(i.mediaSource,e)){var r=o.substring(0,o.indexOf(".")),n=i.codecs[t],a=n.substring(0,n.indexOf("."));if(a!==r){a={codecsChangeInfo:{from:n,to:o}};i.trigger({type:"codecschange",metadata:a}),i.logger_(`changing ${t}Buffer codec from ${n} to `+o);try{e.changeType(s),i.codecs[t]=o}catch(e){a.errorType=E.Error.StreamingCodecsChangeError,(a.error=e).metadata=a,i.error_=e,i.trigger("error"),E.log.warn(`Failed to changeType on ${t}Buffer`,e)}}}}},cc=({type:e,sourceUpdater:t,action:i,doneFn:s,name:r})=>{t.queue.push({type:e,action:i,doneFn:s,name:r}),lc(e,t)},pc=(i,s)=>e=>{var t=function(t){if(0===t.length)return"Buffered Ranges are empty";let i="Buffered Ranges: \n";for(let e=0;e ${r}. Duration (${r-s}) +`}return i}(s[i+"Buffered"]());s.logger_(`received "updateend" event for ${i} Source Buffer: `,t),s.queuePending[i]&&(t=s.queuePending[i].doneFn,s.queuePending[i]=null,t)&&t(s[i+"Error_"]),lc(i,s)};class mc extends E.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>lc("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Bd("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=pc("video",this),this.onAudioUpdateEnd_=pc("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){cc({type:"mediaSource",sourceUpdater:this,action:uc.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){cc({type:e,sourceUpdater:this,action:uc.abort(e),name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?cc({type:"mediaSource",sourceUpdater:this,action:uc.removeSourceBuffer(e),name:"removeSourceBuffer"}):E.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!E.browser.IS_FIREFOX&&window.MediaSource&&window.MediaSource.prototype&&"function"==typeof window.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return window.SourceBuffer&&window.SourceBuffer.prototype&&"function"==typeof window.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?cc({type:e,sourceUpdater:this,action:uc.changeType(t),name:"changeType"}):E.log.error("changeType is not supported!")}addOrChangeSourceBuffers(i){if(!i||"object"!=typeof i||0===Object.keys(i).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(i).forEach(e=>{var t=i[e];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(e,t);this.canChangeType()&&this.changeType(e,t)})}appendBuffer(e,t){var{segmentInfo:i,type:s,bytes:r}=e;this.processedAppend_=!0,"audio"===s&&this.videoBuffer&&!this.videoAppendQueued_?(this.delayedAudioAppendQueue_.push([e,t]),this.logger_(`delayed audio append of ${r.length} until video append`)):(e=t,cc({type:s,sourceUpdater:this,action:uc.appendBuffer(r,i||{mediaIndex:-1},e),doneFn:t,name:"appendBuffer"}),"video"===s&&(this.videoAppendQueued_=!0,this.delayedAudioAppendQueue_.length)&&(r=this.delayedAudioAppendQueue_.slice(),this.logger_(`queuing delayed audio ${r.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,r.forEach(e=>{this.appendBuffer.apply(this,e)})))}audioBuffered(){return hc(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered||O()}videoBuffered(){return hc(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered||O()}buffered(){var e=hc(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=hc(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,r=0;var n=[],a=[];if(!(e&&e.length&&t&&t.length))return O();let o=e.length;for(;o--;)n.push({time:e.start(o),type:"start"}),n.push({time:e.end(o),type:"end"});for(o=t.length;o--;)n.push({time:t.start(o),type:"start"}),n.push({time:t.end(o),type:"end"});for(n.sort(function(e,t){return e.time-t.time}),o=0;o{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[e+"QueueCallback"](()=>dc(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}let gc=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),fc=new Uint8Array("\n\n".split("").map(e=>e.charCodeAt(0)));class yc extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class _c extends sc{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){var e;return this.subtitlesTrack_&&this.subtitlesTrack_.cues&&this.subtitlesTrack_.cues.length?O([[(e=this.subtitlesTrack_.cues)[0].startTime,e[e.length-1].startTime]]):O()}initSegmentForMap(e,t=!1){if(!e)return null;var i=jh(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(t=fc.byteLength+e.bytes.byteLength,(t=new Uint8Array(t)).set(e.bytes),t.set(fc,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:t}),s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return"undefined"!=typeof e&&(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_())&&this.init_(),this.subtitlesTrack_}remove(e,t){zu(e,t,this.subtitlesTrack_)}fillBuffer_(){var e=this.chooseNextRequest_();e&&(null===this.syncController_.timestampOffsetForTimeline(e.timeline)?(this.syncController_.one("timestampoffset",()=>{this.state="READY",this.paused()||this.monitorBuffer_()}),this.state="WAITING_ON_TIMELINE"):this.loadSegment_(e))}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(this.subtitlesTrack_)if(this.saveTransferStats_(t.stats),this.pendingSegment_)if(e)e.code===wu.TIMEOUT&&this.handleTimeout_(),e.code===wu.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);else{var s=this.pendingSegment_,r=i.mp4VttCues&&i.mp4VttCues.length,n=(r&&(s.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending"),s.segment);if(n.map&&(n.map.bytes=t.map.bytes),s.bytes=t.bytes,"function"!=typeof window.WebVTT&&"function"==typeof this.loadVttJs)this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:"Error loading vtt.js"}));else{n.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:E.Error.StreamingVttParserError,error:e}})}r||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest?(this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY"):(s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=n.duration,s.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new window.VTTCue(e.startTime,e.endTime,e.text):e)}),function(t){var i=t.cues;if(i){var s={};for(let e=i.length-1;0<=e;e--){var r=i[e],n=r.startTime+`-${r.endTime}-`+r.text;s[n]?t.removeCue(r):s[n]=r}}}(this.subtitlesTrack_),this.handleAppendsDone_())}}else this.state="READY",this.mediaRequestsAborted+=1;else this.state="READY"}handleData_(e,t){var i=e&&"vtt"===e.type,s=t&&"text"===t.type;i&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(r){let n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();r.mp4VttCues.forEach(e=>{var t=e.start+n,i=e.end+n;let s=new window.VTTCue(t,i,e.cueText);e.settings&&e.settings.split(" ").forEach(e=>{var e=e.split(":"),t=e[0],e=e[1];s[t]=isNaN(e)?e:Number(e)}),r.cues.push(s)})}parseVTTCues_(t){let i,s=!1;if("function"!=typeof window.WebVTT)throw new yc;if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},t.mp4VttCues)this.parseMp4VttCues_(t);else{"function"==typeof window.TextDecoder?i=new window.TextDecoder("utf8"):(i=window.WebVTT.StringDecoder(),s=!0);var r=new window.WebVTT.Parser(window,window.vttjs,i);if(r.oncue=t.cues.push.bind(t.cues),r.ontimestampmap=e=>{t.timestampmap=e},r.onparsingerror=e=>{E.log.warn("Error encountered when parsing cues: "+e.message)},t.segment.map){let e=t.segment.map.bytes;s&&(e=gc(e)),r.parse(e)}let e=t.bytes;s&&(e=gc(e)),r.parse(e),r.flush()}}updateTimeMapping_(e,r,t){var i=e.segment;if(r)if(e.cues.length){var{MPEGTS:n,LOCAL:a}=e.timestampmap;let s=n/Nd-a+r.mapping;e.cues.forEach(e=>{var t=e.endTime-e.startTime,i=this.handleRollover_(e.startTime+s,r.time);e.startTime=Math.max(i,0),e.endTime=Math.max(i+t,0)}),t.syncInfo||(n=e.cues[0].startTime,a=e.cues[e.cues.length-1].startTime,t.syncInfo={mediaSequence:t.mediaSequence+e.mediaIndex,time:Math.min(n,a-i.duration)})}else i.empty=!0}handleRollover_(e,t){if(null===t)return e;let i=e*Nd;var s=t*Nd;let r;for(r=s=this.start&&ee.resetAppendedStatus())}}class Tc{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){var{mediaSequence:e,segments:i}=e;if(this.isReliable_=this.isReliablePlaylist_(e,i),this.isReliable_)return this.updateStorage_(i,e,this.calculateBaseTime_(e,i,t))}getSyncInfoForTime(e){for(var{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(var s of i)if(s.isInRange(e))return s}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){let d=new Map,h="\n",u=i,c=t;this.start_=u,e.forEach((e,a)=>{let o=this.storage_.get(c);var t=u,i=t+e.duration,s=Boolean(o&&o.segmentSyncInfo&&o.segmentSyncInfo.isAppended),r=new vc({start:t,end:i,appended:s,segmentIndex:a});e.syncInfo=r;let l=u;var n=(e.parts||[]).map((e,t)=>{var i=l,s=l+e.duration,r=Boolean(o&&o.partsSyncInfo&&o.partsSyncInfo[t]&&o.partsSyncInfo[t].isAppended),n=new vc({start:i,end:s,appended:r,segmentIndex:a,partIndex:t});return l=s,h+=`Media Sequence: ${c}.${t} | Range: ${i} --> ${s} | Appended: ${r} +`,e.syncInfo=n});d.set(c,new bc(r,n)),h+=`${Hu(e.resolvedUri)} | Media Sequence: ${c} | Range: ${t} --> ${i} | Appended: ${s}\n`,c++,u=i}),this.end_=u,this.storage_=d,this.diagnostics_=h}calculateBaseTime_(e,i,t){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;var s=Math.min(...this.storage_.keys());if(e{return i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null}},{name:"MediaSequence",run:(e,t,i,s,r,n)=>{e=e.getMediaSequenceSync(n);return e&&e.isReliable&&(n=e.getSyncInfoForTime(r))?{time:n.start,partIndex:n.partIndex,segmentIndex:n.segmentIndex}:null}},{name:"ProgramDateTime",run:(t,i,e,s,r)=>{if(!Object.keys(t.timelineToDatetimeMappings).length)return null;let n=null,a=null;var o=Qd(i);r=r||0;for(let e=0;e{let n=null,a=null;r=r||0;var o=Qd(t);for(let e=0;e=d)&&(a=d,n={time:h,segmentIndex:l.segmentIndex,partIndex:l.partIndex})}}return n}},{name:"Discontinuity",run:(i,s,e,t,r)=>{let n=null;if(r=r||0,s.discontinuityStarts&&s.discontinuityStarts.length){let t=null;for(let e=0;e=l)&&(t=l,n={time:o.time,segmentIndex:a,partIndex:null})}}}return n}},{name:"Playlist",run:(e,t,i,s,r)=>{return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}];class Ec extends E.EventTarget{constructor(e=0){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};var t=new Tc,i=new Sc(t),s=new Sc(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:s},this.logger_=Bd("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,s,r){if(t!==1/0)return wc.find(({name:e})=>"VOD"===e).run(this,e,t);var n,t=this.runStrategies_(e,t,i,s,r);if(!t.length)return null;for(n of t){var{syncPoint:a,strategy:o}=n,{segmentIndex:l,time:d}=a;if(!(l<0)){var h=d+e.segments[l].duration;if(this.logger_(`Strategy: ${o}. Current time: ${s}. selected segment: ${l}. Time: [${d} -> ${h}]}`),d<=s&&so){let e;e=a<0?s.start-Hd({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:t.mediaIndex,endIndex:r}):s.end+Hd({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:t.mediaIndex+1,endIndex:r}),this.discontinuities[n]={time:e,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class Cc extends E.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return"number"==typeof t&&"number"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){return"number"==typeof t&&"number"==typeof i&&(this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e],this.trigger({type:"timelinechange",metadata:{timelineChangeInfo:{from:t,to:i}}})),this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}var kc=au(ou(lu(function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){return!!this.listeners[e]&&(t=this.listeners[e].indexOf(t),this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(t,1),-1>7))^n]=n;for(a=o=0;!s[a];a^=l||1,o=p[o]||1)for(u=(u=o^o<<1^o<<2^o<<3^o<<4)>>8^255&u^99,h=c[d=c[l=c[r[s[a]=u]=a]]],g=16843009*h^65537*d^257*l^16843008*a,m=257*c[u]^16843008*u,n=0;n<4;n++)t[n][a]=m=m<<24^m>>>8,i[n][u]=g=g<<24^g>>>8;for(n=0;n<5;n++)t[n]=t[n].slice(0),i[n]=i[n].slice(0);return e}(),this._tables=[[h[0][0].slice(),h[0][1].slice(),h[0][2].slice(),h[0][3].slice(),h[0][4].slice()],[h[1][0].slice(),h[1][1].slice(),h[1][2].slice(),h[1][3].slice(),h[1][4].slice()]];let t,i,s;var r=this._tables[0][4],n=this._tables[1],a=e.length;let o=1;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size");var l=e.slice(0),d=[];for(this._key=[l,d],t=a;t<4*a+28;t++)s=l[t-1],(t%a==0||8===a&&t%a==4)&&(s=r[s>>>24]<<24^r[s>>16&255]<<16^r[s>>8&255]<<8^r[255&s],t%a==0)&&(s=s<<8^s>>>24^o<<24,o=o<<1^283*(o>>7)),l[t]=l[t-a]^s;for(i=0;t;i++,t--)s=l[3&i?t:t-4],t<=4||i<4?d[i]=s:d[i]=n[0][r[s>>>24]]^n[1][r[s>>16&255]]^n[2][r[s>>8&255]]^n[3][r[255&s]]}decrypt(e,t,i,s,r,n){var a,o,l=this._key[1];let d=e^l[0],h=s^l[1],u=i^l[2],c=t^l[3],p;var m=l.length/4-2;let g,f=4;var e=this._tables[1],y=e[0],_=e[1],v=e[2],b=e[3],T=e[4];for(g=0;g>>24]^_[h>>16&255]^v[u>>8&255]^b[255&c]^l[f],a=y[h>>>24]^_[u>>16&255]^v[c>>8&255]^b[255&d]^l[f+1],o=y[u>>>24]^_[c>>16&255]^v[d>>8&255]^b[255&h]^l[f+2],c=y[c>>>24]^_[d>>16&255]^v[h>>8&255]^b[255&u]^l[f+3],f+=4,d=p,h=a,u=o;for(g=0;g<4;g++)r[(3&-g)+n]=T[d>>>24]<<24^T[h>>16&255]<<16^T[u>>8&255]<<8^T[255&c]^l[f++],p=d,d=h,h=u,u=c,c=p}}class l extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}function f(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}class d{constructor(e,t,i,s){var r=d.STEP,n=new Int32Array(e.buffer);let a=new Uint8Array(e.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(n.subarray(o,o+r),t,i,a)),o=r;o>2),l=new g(Array.prototype.slice.call(t)),t=new Uint8Array(e.byteLength),d=new Int32Array(t.buffer);let h,u,c,p,m;for(h=i[0],u=i[1],c=i[2],p=i[3],m=0;m{var t,i=s[e];t=i,("function"===ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer)?r[e]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:r[e]=i}),r}self.onmessage=function(e){let i=e.data;var e=new Uint8Array(i.encrypted.bytes,i.encrypted.byteOffset,i.encrypted.byteLength),t=new Uint32Array(i.key.bytes,i.key.byteOffset,i.key.byteLength/4),s=new Uint32Array(i.iv.bytes,i.iv.byteOffset,i.iv.byteLength/4);new d(e,t,s,function(e,t){self.postMessage(r({source:i.source,decrypted:t}),[t.buffer])})}})));let Ic=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},xc=(e,t)=>{(t.activePlaylistLoader=e).load()},Ac={AUDIO:(a,o)=>()=>{var{mediaTypes:{[a]:e},excludePlaylist:t}=o,i=e.activeTrack(),s=e.activeGroup(),s=(s.filter(e=>e.default)[0]||s[0]).id,r=e.tracks[s];if(i===r)t({error:{message:"Problem encountered loading the default audio track."}});else{for(var n in E.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),e.tracks)e.tracks[n].enabled=e.tracks[n]===r;e.onTrackChanged()}},SUBTITLES:(i,s)=>()=>{var{[i]:e}=s.mediaTypes,t=(E.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),e.activeTrack());t&&(t.mode="disabled"),e.onTrackChanged()}},Dc={AUDIO:(e,t,i)=>{if(!t)return;let{tech:s,requestOptions:r,segmentLoaders:{[e]:n}}=i;t.on("loadedmetadata",()=>{var e=t.media();n.playlist(e,r),(!s.paused()||e.endList&&"none"!==s.preload())&&n.load()}),t.on("loadedplaylist",()=>{n.playlist(t.media(),r),s.paused()||n.load()}),t.on("error",Ac[e](e,i))},SUBTITLES:(e,t,i)=>{let{tech:s,requestOptions:r,segmentLoaders:{[e]:n},mediaTypes:{[e]:a}}=i;t.on("loadedmetadata",()=>{var e=t.media();n.playlist(e,r),n.track(a.activeTrack()),(!s.paused()||e.endList&&"none"!==s.preload())&&n.load()}),t.on("loadedplaylist",()=>{n.playlist(t.media(),r),s.paused()||n.load()}),t.on("error",Ac[e](e,i))}},Pc={AUDIO:(i,s)=>{var r,n,{vhs:a,sourceType:o,segmentLoaders:{[i]:e},requestOptions:l,main:{mediaGroups:d},mediaTypes:{[i]:{groups:h,tracks:u,logger_:c}},mainPlaylistLoader:p}=s,m=ch(p.main);for(r in d[i]&&0!==Object.keys(d[i]).length||(d[i]={main:{default:{default:!0}}},m&&(d[i].main.default.playlists=p.main.playlists)),d[i])for(var g in h[r]||(h[r]=[]),d[i][r]){let e=d[i][r][g],t;t=m?(c(`AUDIO group '${r}' label '${g}' is a main playlist`),e.isMainPlaylist=!0,null):"vhs-json"===o&&e.playlists?new Nh(e.playlists[0],a,l):e.resolvedUri?new Nh(e.resolvedUri,a,l):e.playlists&&"dash"===o?new su(e.playlists[0],a,l,p):null,e=L({id:g,playlistLoader:t},e),Dc[i](i,e.playlistLoader,s),h[r].push(e),"undefined"==typeof u[g]&&(n=new E.AudioTrack({id:g,kind:(e=>{let t=e.default?"main":"alternative";return t=e.characteristics&&0<=e.characteristics.indexOf("public.accessibility.describes-video")?"main-desc":t})(e),enabled:!1,language:e.language,default:e.default,label:g}),u[g]=n)}e.on("error",Ac[i](i,s))},SUBTITLES:(i,s)=>{var r,n,{tech:a,vhs:o,sourceType:l,segmentLoaders:{[i]:e},requestOptions:d,main:{mediaGroups:h},mediaTypes:{[i]:{groups:u,tracks:c}},mainPlaylistLoader:p}=s;for(r in h[i])for(var m in u[r]||(u[r]=[]),h[i][r])if(o.options_.useForcedSubtitles||!h[i][r][m].forced){let e=h[i][r][m],t;if("hls"===l)t=new Nh(e.resolvedUri,o,d);else if("dash"===l){if(!e.playlists.filter(e=>e.excludeUntil!==1/0).length)return;t=new su(e.playlists[0],o,d,p)}else"vhs-json"===l&&(t=new Nh(e.playlists?e.playlists[0]:e.resolvedUri,o,d));e=L({id:m,playlistLoader:t},e),Dc[i](i,e.playlistLoader,s),u[r].push(e),"undefined"==typeof c[m]&&(n=a.addRemoteTextTrack({id:m,kind:"subtitles",default:e.default&&e.autoselect,language:e.language,label:m},!1).track,c[m]=n)}e.on("error",Ac[i](i,s))},"CLOSED-CAPTIONS":(e,t)=>{var i,{tech:s,main:{mediaGroups:r},mediaTypes:{[e]:{groups:n,tracks:a}}}=t;for(i in r[e])for(var o in n[i]||(n[i]=[]),r[e][i]){var l=r[e][i][o];if(/^(?:CC|SERVICE)/.test(l.instreamId)){var d=s.options_.vhs&&s.options_.vhs.captionServices||{};let e={label:o,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};void 0===(e=d[e.instreamId]?L(e,d[e.instreamId]):e).default&&delete e.default,n[i].push(L({id:o},l)),"undefined"==typeof a[o]&&(d=s.addRemoteTextTrack({id:e.instreamId,kind:"captions",default:e.default,language:e.language,label:e.label},!1).track,a[o]=d)}}}},Lc=(t,i)=>{for(let e=0;e()=>{var e,{[i]:{tracks:t}}=s.mediaTypes;for(e in t)if(t[e].enabled)return t[e];return null},SUBTITLES:(i,s)=>()=>{var e,{[i]:{tracks:t}}=s.mediaTypes;for(e in t)if("showing"===t[e].mode||"hidden"===t[e].mode)return t[e];return null}},Rc=n=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{Pc[e](e,n)});let{mediaTypes:a,mainPlaylistLoader:e,tech:t,vhs:i,segmentLoaders:{AUDIO:s,main:r}}=n;["AUDIO","SUBTITLES"].forEach(e=>{var o,l,d,h,i,s,u,c,t,r;a[e].activeGroup=(o=e,l=n,t=>{var{mainPlaylistLoader:e,mediaTypes:{[o]:{groups:i}}}=l,s=e.media();if(!s)return null;let r=null;s.attributes[o]&&(r=i[s.attributes[o]]);var n=Object.keys(i);if(!r)if("AUDIO"===o&&1e.id===t.id)[0]||null}),a[e].activeTrack=Oc[e](e,n),a[e].onGroupChanged=(d=e,h=n,()=>{var{segmentLoaders:{[d]:e,main:t},mediaTypes:{[d]:i}}=h,s=i.activeTrack(),r=i.getActiveGroup(),n=i.activePlaylistLoader,a=i.lastGroup_;r&&a&&r.id===a.id||(i.lastGroup_=r,i.lastTrack_=s,Ic(e,i),r&&!r.isMainPlaylist&&(r.playlistLoader?(e.resyncLoader(),xc(r.playlistLoader,i)):n&&t.resetEverything()))}),a[e].onGroupChanging=(i=e,s=n,()=>{var{segmentLoaders:{[i]:e},mediaTypes:{[i]:t}}=s;t.lastGroup_=null,e.abort(),e.pause()}),a[e].onTrackChanged=(u=e,c=n,()=>{var e,t,{mainPlaylistLoader:i,segmentLoaders:{[u]:s,main:r},mediaTypes:{[u]:n}}=c,a=n.activeTrack(),o=n.getActiveGroup(),l=n.activePlaylistLoader,d=n.lastTrack_;if((!d||!a||d.id!==a.id)&&(n.lastGroup_=o,n.lastTrack_=a,Ic(s,n),o)){if(o.isMainPlaylist)return!a||!d||a.id===d.id||(t=(e=c.vhs.playlistController_).selectPlaylist(),e.media()===t)?void 0:(n.logger_(`track change. Switching main audio from ${d.id} to `+a.id),i.pause(),r.resetEverything(),void e.fastQualityChange_(t));if("AUDIO"===u){if(!o.playlistLoader)return r.setAudio(!0),void r.resetEverything();s.setAudio(!0),r.setAudio(!1)}l===o.playlistLoader||(s.track&&s.track(a),s.resetEverything()),xc(o.playlistLoader,n)}}),a[e].getActiveGroup=([t,r]=[e,n.mediaTypes],()=>{var e=r[t].activeTrack();return e?r[t].activeGroup(e):null})});var o,l=a.AUDIO.activeGroup();l&&(l=(l.filter(e=>e.default)[0]||l[0]).id,a.AUDIO.tracks[l].enabled=!0,a.AUDIO.onGroupChanged(),a.AUDIO.onTrackChanged(),(a.AUDIO.getActiveGroup().playlistLoader?(r.setAudio(!1),s):r).setAudio(!0)),e.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(e=>a[e].onGroupChanged())}),e.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(e=>a[e].onGroupChanging())});let d=()=>{a.AUDIO.onTrackChanged(),t.trigger({type:"usage",name:"vhs-audio-change"})};for(o in t.audioTracks().addEventListener("change",d),t.remoteTextTracks().addEventListener("change",a.SUBTITLES.onTrackChanged),i.on("dispose",()=>{t.audioTracks().removeEventListener("change",d),t.remoteTextTracks().removeEventListener("change",a.SUBTITLES.onTrackChanged)}),t.clearTracks("audio"),a.AUDIO.tracks)t.audioTracks().addTrack(a.AUDIO.tracks[o])};class Nc{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=Md(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Mc extends E.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Nc,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Bd("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";var i=t.serverUri||t.serverURL;i?i.startsWith("data:")?this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1)):(this.steeringManifest.reloadUri=Md(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")):(this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),this.trigger("error"))}requestSteeringManifest(e){var t=this.steeringManifest.reloadUri;if(t){let r=e?t:this.getRequestURI(t);if(r){let s={contentSteeringInfo:{uri:r}};this.trigger({type:"contentsteeringloadstart",metadata:s}),this.request_=this.xhr_({uri:r,requestType:"content-steering-manifest"},(e,t)=>{if(e)return 410===t.status?(this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${r} this session.`),void this.excludedSteeringManifestURLs.add(r)):429===t.status?(t=t.responseHeaders["retry-after"],this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${t} seconds.`),void this.startTTLTimeout_(parseInt(t,10))):(this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_());this.trigger({type:"contentsteeringloadcomplete",metadata:s});let i;try{i=JSON.parse(this.request_.responseText)}catch(e){t={errorType:E.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:"error",metadata:t})}this.assignSteeringProperties_(i);e={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:e}),this.startTTLTimeout_()})}else this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose()}}setProxyServerUrl_(e){var e=new window.URL(e),t=new window.URL(this.proxyServerUrl_);return t.searchParams.set("url",encodeURI(e.toString())),this.setSteeringParams_(t.toString())}decodeDataUriManifest_(e){e=JSON.parse(window.atob(e));this.assignSteeringProperties_(e)}setSteeringParams_(e){var t,e=new window.URL(e),i=this.getPathway(),s=this.getBandwidth_();return i&&(t=`_${this.manifestType_}_pathway`,e.searchParams.set(t,i)),s&&(t=`_${this.manifestType_}_throughput`,e.searchParams.set(t,s)),e.toString()}assignSteeringProperties_(e){var t;this.steeringManifest.version=e.VERSION,this.steeringManifest.version?(this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose()),t=(e=>{for(var t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority),this.currentPathway!==t&&(this.currentPathway=t,this.trigger("content-steering"))):(this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;var t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){var i=this.setProxyServerUrl_(e);if(!t(i))return i}i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){this.ttlTimeout_=window.setTimeout(()=>{this.requestSteeringManifest()},1e3*e)}clearTTLTimeout_(){window.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Nc}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(Md(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let Uc,Bc=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"];class Fc extends E.EventTarget{constructor(e){super(),this.fastQualityChange_=((t,i)=>{let s=null;return(...e)=>{clearTimeout(s),s=setTimeout(()=>{t.apply(null,e)},i)}})(this.fastQualityChange_.bind(this),100);let{src:t,withCredentials:i,tech:r,bandwidth:s,externVhs:n,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:d,cacheEncryptionKeys:h,bufferBasedABR:u,leastPixelDiffSelector:c,captionServices:p,experimentalUseMMS:m}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let g=e.maxPlaylistRetries;null!==g&&"undefined"!=typeof g||(g=1/0),Uc=n,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(c),this.withCredentials=i,this.tech_=r,this.vhs_=r.vhs,this.player_=e.player_,this.sourceType_=d,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=(()=>{let t={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:rc,activeTrack:rc,getActiveGroup:rc,onGroupChanged:rc,onTrackChanged:rc,lastTrack_:null,logger_:Bd(`MediaGroups[${e}]`)}}),t})(),m&&window.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new window.ManagedMediaSource,this.usingManagedMediaSource_=!0,E.log("Using ManagedMediaSource")):window.MediaSource&&(this.mediaSource=new window.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=O(),this.hasPlayed_=!1,this.syncController_=new Ec(e),this.segmentMetadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new kc,this.sourceUpdater_=new mc(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Cc,this.keyStatusMap_=new Map;var f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:h,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)},f=(this.mainPlaylistLoader_="dash"===this.sourceType_?new su(t,this.vhs_,L(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Nh(t,this.vhs_,L(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new sc(L(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new sc(L(f,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new _c(L(f,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){r.off("vttjserror",s),e()}function s(){r.off("vttjsloaded",i),t()}r.one("vttjsloaded",i),r.one("vttjserror",s),r.addWebVttScript_()})}),e),this.contentSteeringController_=new Mc(this.vhs_.xhr,()=>this.mainSegmentLoader_.bandwidth),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),Bc.forEach(e=>{this[e+"_"]=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]}.bind(this,e)}),this.logger_=Bd("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1,"none"===this.tech_.preload()?"play":"loadstart");this.tech_.one(f,()=>{let e=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){var t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){var s=this.media(),s=s&&(s.id||s.uri),r=e&&(e.id||e.uri);s&&s!==r&&(this.logger_(`switch media ${s} -> ${r} from `+t),s={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t},this.trigger({type:"renditionselected",metadata:s}),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{var t=this.mediaTypes_[e],t=t?t.activeGroup():null;let i=this.contentSteeringController_.getPathway();t&&i&&(t=(t.length?t[0]:t).playlists.filter(e=>e.attributes.serviceLocation===i)).length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=window.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(window.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){var t=this.main(),e=t&&t.playlists||[];if(!t||!t.mediaGroups||!t.mediaGroups.AUDIO)return e;var i=t.mediaGroups.AUDIO,s=Object.keys(i);let r;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)r=this.mediaTypes_.AUDIO.activeTrack();else{var n,a=i.main||s.length&&i[s[0]];for(n in a)if(a[n].default){r={label:n};break}}if(!r)return e;var o,l=[];for(o in i)if(i[o][r.label]){var d=i[o][r.label];if(d.playlists&&d.playlists.length)l.push.apply(l,d.playlists);else if(d.uri)l.push(d);else if(t.playlists.length)for(let e=0;e{var e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;hh(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Rc({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let t=this.mainPlaylistLoader_.media();if(!t){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let e;if(!(e=(e=this.enableLowInitialPlaylist?this.selectInitialPlaylist():e)||this.selectPlaylist())||!this.shouldSwitchToMedia_(e))return;if(this.initialMedia_=e,this.switchMedia_(this.initialMedia_,"initial"),!("vhs-json"===this.sourceType_&&this.initialMedia_.segments))return;t=this.initialMedia_}this.handleUpdatedMediaPlaylist(t)}),this.mainPlaylistLoader_.on("error",()=>{var e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{var e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;hh(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,"dash"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{var e=this.mainPlaylistLoader_.media();"playlist-unchanged"!==e.lastExcludeReason_&&this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})});["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(e=>{this.mainPlaylistLoader_.on(e,e=>{this.player_.trigger(f({},e))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){var i=e.mediaGroups||{};let s=!0;var r,e=Object.keys(i.AUDIO);for(r in i.AUDIO)for(var n in i.AUDIO[r])i.AUDIO[r][n].uri||(s=!1);s&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Uc.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),e.length&&1 `+s.id;if(!e)return l(d+" as current playlist is not set"),!0;if(s.id!==e.id){var h=Boolean(Fd(t,i).length);if(!e.endList)return h||"number"!=typeof e.partTargetDuration?(l(d+" as current playlist is live"),!0):(l(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);h=Vd(t,i),t=o?R.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:R.MAX_BUFFER_LOW_WATER_LINE;if(a= bufferLowWaterLine (${h} >= ${r})`;return o&&(e+=` and next bandwidth > current bandwidth (${i} > ${a})`),l(e),!0}l(`not ${d} as no switching criteria met`)}}else E.log.warn("We received no playlist to switch to. Please check your stream.");return!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:r,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{var e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{var e=this.audioSegmentLoader_.pendingSegment_;e&&e.segment&&e.segment.syncInfo&&(e=e.segment.syncInfo.end+.01,this.tech_.setCurrentTime(e))}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:10}))});var e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();var e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()});["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(e=>{this.mainSegmentLoader_.on(e,e=>{this.player_.trigger(f({},e))}),this.audioSegmentLoader_.on(e,e=>{this.player_.trigger(f({},e))}),this.subtitleSegmentLoader_.on(e,e=>{this.player_.trigger(f({},e))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){var e;if(!this.setupFirstPlay())return this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load(),e=this.tech_.seekable(),this.tech_.duration()===1/0&&this.tech_.currentTime(){}),this.trigger("sourceopen")}handleSourceEnded_(){var e,t;this.inbandTextTracks_.metadataTrack_&&(e=this.inbandTextTracks_.metadataTrack_.cues)&&e.length&&(t=this.duration(),e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t)}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;var t;this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.mainSegmentLoader_.getCurrentMediaInfo_(),e=(t&&!t.hasVideo||e)&&this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){var t,i;return!!this.seekable().length&&null!==(t=this.syncController_.getExpiredTime(e,this.duration()))&&(e=Uc.Playlist.playlistEnd(e,t),t=this.tech_.currentTime(),(i=this.tech_.buffered()).length?(i=i.end(i.length-1))-t<=Wd&&e-i<=Wd:e-t<=Wd)}excludePlaylist({playlistToExclude:s=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(s=s||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,s){s.playlistErrors_++;var r=this.mainPlaylistLoader_.main.playlists,n=r.filter(oh),n=1===n.length&&n[0]===s;if(1===r.length&&i!==1/0)return E.log.warn(`Problem encountered with playlist ${s.id}. `+"Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(n);if(n){if(this.main().contentSteering){let e=this.pathwayAttribute_(s);var a=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(e),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(e)},a)}let i=!1;r.forEach(e=>{var t;e!==s&&"undefined"!=typeof(t=e.excludeUntil)&&t!==1/0&&(i=!0,delete e.excludeUntil)}),i&&(E.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let e;e=s.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,s.excludeUntil=e,t.reason&&(s.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});a=this.selectPlaylist();if(a)return(t.internal?this.logger_:E.log.warn)(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${s.id}.`+(t.message?" "+t.message:"")+` Switching to playlist ${a.id}.`),a.attributes.AUDIO!==s.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),a.attributes.SUBTITLES!==s.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]),r=a.targetDuration/2*1e3||5e3,i="number"==typeof a.lastRequest&&Date.now()-a.lastRequest<=r,this.switchMedia_(a,"exclude",n||i);this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error")}else this.error=t,"open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network")}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(i,e){let s=[];var t="all"===i,r=(!t&&"main"!==i||s.push(this.mainPlaylistLoader_),[]);!t&&"audio"!==i||r.push("AUDIO"),!t&&"subtitle"!==i||(r.push("CLOSED-CAPTIONS"),r.push("SUBTITLES")),r.forEach(e=>{e=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;e&&s.push(e)}),["main","audio","subtitle"].forEach(e=>{var t=this[e+"SegmentLoader_"];!t||i!==e&&"all"!==i||s.push(t)}),s.forEach(t=>e.forEach(e=>{"function"==typeof t[e]&&t[e]()}))}setCurrentTime(e){var t=Fd(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){var e;return this.mainPlaylistLoader_&&(e=this.mainPlaylistLoader_.media())?e.endList?this.mediaSource?this.mediaSource.duration:Uc.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){var i,s,e=e.media();return e?(t=this.syncController_.getMediaSequenceSync(t))&&t.isReliable?(s=t.start,t=t.end,isFinite(s)&&isFinite(t)?(i=Uc.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,e),O([[s,Math.max(s,t-i)]])):null):null!==(s=this.syncController_.getExpiredTime(e,this.duration()))&&(t=Uc.Playlist.seekable(e,s,Uc.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,e))).length?t:null:null}computeFinalSeekable_(e,t){var i,s,r;return!t||(i=e.start(0),s=e.end(0),r=t.start(0),t=t.end(0),s{var t,i=this.mediaTypes_[e].groups;for(t in i)i[t].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),e=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return t&&e}getCodecsOrExclude_(){let n={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},a=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();n.video=n.main;var e=wh(this.main(),a);let o={};var t=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(n.main.hasVideo&&(o.video=e.video||n.main.videoCodec||"avc1.4d400d"),n.main.isMuxed&&(o.video+=","+(e.audio||n.main.audioCodec||la)),(n.main.hasAudio&&!n.main.isMuxed||n.audio.hasAudio||t)&&(o.audio=e.audio||n.main.audioCodec||n.audio.audioCodec||la,n.audio.isFmp4=(n.main.hasAudio&&!n.main.isMuxed?n.main:n.audio).isFmp4),o.audio||o.video){let i=(e,t)=>e?Jn(t,this.usingManagedMediaSource_):Zn(t),s={},r;if(["video","audio"].forEach(function(e){var t;o.hasOwnProperty(e)&&!i(n[e].isFmp4,o[e])&&(t=n[e].isFmp4?"browser":"muxer",s[t]=s[t]||[],s[t].push(o[e]),"audio"===e)&&(r=t)}),t&&r&&a.attributes.AUDIO){let t=a.attributes.AUDIO;this.main().playlists.forEach(e=>{(e.attributes&&e.attributes.AUDIO)===t&&e!==a&&(e.excludeUntil=1/0)}),this.logger_(`excluding audio group ${t} as ${r} does not support codec(s): "${o.audio}"`)}if(!Object.keys(s).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){let s=[];if(["video","audio"].forEach(e=>{var t=(aa(this.sourceUpdater_.codecs[e]||"")[0]||{}).type,i=(aa(o[e]||"")[0]||{}).type;t&&i&&t.toLowerCase()!==i.toLowerCase()&&s.push(`"${this.sourceUpdater_.codecs[e]}" -> "${o[e]}"`)}),s.length)return void this.excludePlaylist({playlistToExclude:a,error:{message:`Codec switching not supported: ${s.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return o}e=Object.keys(s).reduce((e,t)=>(e&&(e+=", "),e+=`${t} does not support codec(s): "${s[t].join(",")}"`),"")+".",this.excludePlaylist({playlistToExclude:a,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}else this.excludePlaylist({playlistToExclude:a,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0})}tryToCreateSourceBuffers_(){var e;"open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers()||this.areMediaTypesKnown_()&&(e=this.getCodecsOrExclude_())&&(this.sourceUpdater_.createSourceBuffers(e),e=[e.video,e.audio].filter(Boolean).join(","),this.excludeIncompatibleVariants_(e))}excludeUnsupportedVariants_(){let s=this.main().playlists,r=[];Object.keys(s).forEach(e=>{var t,i,e=s[e];-1===r.indexOf(e.id)&&(r.push(e.id),i=[],!(t=wh(this.main,e)).audio||Zn(t.audio)||Jn(t.audio,this.usingManagedMediaSource_)||i.push("audio codec "+t.audio),!t.video||Zn(t.video)||Jn(t.video,this.usingManagedMediaSource_)||i.push("video codec "+t.video),t.text&&"stpp.ttml.im1t"===t.text&&i.push("text codec "+t.text),i.length)&&(e.excludeUntil=1/0,this.logger_(`excluding ${e.id} for unsupported: `+i.join(", ")))})}excludeIncompatibleVariants_(e){let r=[],n=this.main().playlists;e=Ih(aa(e));let a=Sh(e),o=e.video&&aa(e.video)[0]||null,l=e.audio&&aa(e.audio)[0]||null;Object.keys(n).forEach(e=>{var t,i,s,e=n[e];-1===r.indexOf(e.id)&&e.excludeUntil!==1/0&&(r.push(e.id),t=[],s=wh(this.mainPlaylistLoader_.main,e),i=Sh(s),s.audio||s.video)&&(i!==a&&t.push(`codec count "${i}" !== "${a}"`),this.sourceUpdater_.canChangeType()||(i=s.video&&aa(s.video)[0]||null,s=s.audio&&aa(s.audio)[0]||null,i&&o&&i.type.toLowerCase()!==o.type.toLowerCase()&&t.push(`video codec "${i.type}" !== "${o.type}"`),s&&l&&s.type.toLowerCase()!==l.type.toLowerCase()&&t.push(`audio codec "${s.type}" !== "${l.type}"`)),t.length)&&(e.excludeUntil=1/0,this.logger_(`excluding ${e.id}: `+t.join(" && ")))})}updateAdCues_(e){let t=0;var i=this.seekable();i.length&&(t=i.start(0)),function(s,r,e=0){if(s.segments){let t=e,i;for(let e=0;e=s.adStartTime&&t<=s.adEndTime)return s}return null}(r,t+o.duration/2)){if("cueIn"in o){i.endTime=t,i.adEndTime=t,t+=o.duration,i=null;continue}if(t{let r=e.metadataTrack_;if(r){let s=window.WebKitDataCue||window.VTTCue;t.forEach(e=>{for(var t of Object.keys(e)){var i;Gu.has(t)||((i=new s(e.startTime,e.endTime,"")).id=e.id,i.type="com.apple.quicktime.HLS",i.value={key:Wu[t],data:e[t]},"scte35Out"!==t&&"scte35In"!==t||(i.value.data=new Uint8Array(i.value.data.match(/[\da-f]{2}/gi)).buffer),r.addCue(i))}e.processDateRange()})}})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){var s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Xu(this.inbandTextTracks_,e,this.tech_),$u({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){var e=this.main();if(e.contentSteering){for(var t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this));["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(e=>{this.contentSteeringController_.on(e,e=>{this.trigger(f({},e))})}),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{let r=this.main();(this.contentSteeringController_.didDASHTagChange(r.uri,r.contentSteering)||(()=>{var e,t=this.contentSteeringController_.getAvailablePathways(),i=[];for(e of r.playlists){var s=e.attributes.serviceLocation;if(s&&(i.push(s),!t.has(s)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){let a=this.contentSteeringController_.getPathway();if(a){this.handlePathwayClones_();let s=this.main().playlists,r=new Set,n=!1;Object.keys(s).forEach(e=>{var e=s[e],t=this.pathwayAttribute_(e),t=t&&a!==t,i=(e.excludeUntil===1/0&&"content-steering"===e.lastExcludeReason_&&!t&&(delete e.excludeUntil,delete e.lastExcludeReason_,n=!0),!e.excludeUntil&&e.excludeUntil!==1/0);!r.has(e.id)&&t&&i&&(r.add(e.id),e.excludeUntil=1/0,e.lastExcludeReason_="content-steering",this.logger_(`excluding ${e.id} for `+e.lastExcludeReason_))}),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(e=>{var e=this.mediaTypes_[e];e.activePlaylistLoader&&(e=e.activePlaylistLoader.media_)&&e.attributes.serviceLocation!==a&&(n=!0)}),n&&this.changeSegmentPathway_()}}handlePathwayClones_(){var i=this.main().playlists,s=this.contentSteeringController_.currentPathwayClones,r=this.contentSteeringController_.nextPathwayClones;if(s&&s.size||r&&r.size){for(var[e,t]of s.entries())r.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(t),this.contentSteeringController_.excludePathway(e));for(let[e,t]of r.entries()){var n=s.get(e);n?this.equalPathwayClones_(n,t)||(this.mainPlaylistLoader_.updateOrDeleteClone(t,!0),this.contentSteeringController_.addAvailablePathway(e)):(i.filter(e=>e.attributes["PATHWAY-ID"]===t["BASE-ID"]).forEach(e=>{this.mainPlaylistLoader_.addClonePathway(t,e)}),this.contentSteeringController_.addAvailablePathway(e))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...r])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;var i,s,r=e["URI-REPLACEMENT"].PARAMS,n=t["URI-REPLACEMENT"].PARAMS;for(i in r)if(r[i]!==n[i])return!1;for(s in n)if(r[s]!==n[s])return!1;return!0}changeSegmentPathway_(){var e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.main){let r=0,n="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(s=>{var e=this.mainPlaylistLoader_.getKeyIdSet(s);e&&e.size&&e.forEach(e=>{var t="usable",t=this.keyStatusMap_.has(e)&&this.keyStatusMap_.get(e)===t,i=s.lastExcludeReason_===n&&s.excludeUntil===1/0;t?i&&(delete s.excludeUntil,delete s.lastExcludeReason_,this.logger_(`enabling playlist ${s.id} because key ID ${e} is usable`)):(s.excludeUntil!==1/0&&s.lastExcludeReason_!==n&&(s.excludeUntil=1/0,s.lastExcludeReason_=n,this.logger_(`excluding playlist ${s.id} because the key ID ${e} doesn't exist in the keyStatusMap or is not usable`)),r++)})}),r>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{var t=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,i=e.excludeUntil===1/0&&e.lastExcludeReason_===n;t&&i&&(delete e.excludeUntil,E.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${n} key IDs`))})}}addKeyStatus_(e,t){e=("string"==typeof e?e:(e=>{e=new Uint8Array(e);return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${e} added to the keyStatusMap`),this.keyStatusMap_.set(e,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class qc{constructor(e,t,i){var s,n,a,o,r=e.playlistController_,l=r.fastQualityChange_.bind(r);t.attributes&&(s=t.attributes.RESOLUTION,this.width=s&&s.width,this.height=s&&s.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]),this.codecs=wh(r.main(),t),this.playlist=t,this.id=i,this.enabled=(n=e.playlists,a=t.id,o=l,e=>{var t=n.main.playlists[a],i=ah(t),s=oh(t);if("undefined"==typeof e)return s;e?delete t.disabled:t.disabled=!0;var r={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:"fast-quality"};return e===s||i||(e?(o(t),n.trigger({type:"renditionenabled",metadata:r})):n.trigger({type:"renditiondisabled",metadata:r})),e})}}let jc=["seeking","seeked","pause","playing","error"];class Vc extends E.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Bd("PlaybackWatcher"),this.logger_("initialize");let t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),r=()=>this.resetTimeUpdate_(),n=this.playlistController_,a=["main","subtitle","audio"],o={},l=(a.forEach(e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},n[e+"SegmentLoader_"].on("appendsdone",o[e].updateend),n[e+"SegmentLoader_"].on("playlistupdate",o[e].reset),this.tech_.on(["seeked","seeking"],o[e].reset)}),t=>{["main","audio"].forEach(e=>{n[e+"SegmentLoader_"][t]("appended",this.seekingAppendCheck_)})});this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l("off"))},this.clearSeekingAppendCheck_=()=>l("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(jc,r),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(jc,r),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),a.forEach(e=>{n[e+"SegmentLoader_"].off("appendsdone",o[e].updateend),n[e+"SegmentLoader_"].off("playlistupdate",o[e].reset),this.tech_.off(["seeked","seeking"],o[e].reset)}),this.checkCurrentTimeTimeout_&&window.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&window.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=window.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){var t=this.playlistController_[e+"SegmentLoader_"];0=t.end(t.length-1))?this.techWaiting_():void(5<=this.consecutiveUpdates&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.playedRanges_.push(O([this.lastRecordedTime,e])),t={playedRanges:this.playedRanges_},this.playlistController_.trigger({type:"playedrangeschanged",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e))}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;var e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(s=e.end(e.length-1),i=s),this.beforeSeekableWindow_(e,t)&&(s=e.start(0),i=s+(s===e.end(0)?0:Wd)),"undefined"!=typeof i)this.logger_(`Trying to seek outside of seekable at time ${t} with `+`seekable range ${Xd(e)}. Seeking to `+i+".");else{var s=this.playlistController_.sourceUpdater_,e=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,s=s.videoBuffer?s.videoBuffered():null,n=this.media(),a=n.partTargetDuration||2*(n.targetDuration-$d),o=[r,s];for(let e=0;e ${t.end(0)}]. Attempting to resume `+"playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})))}techWaiting_(){var e,t=this.seekable(),i=this.tech_.currentTime();return!!this.tech_.seeking()||(this.beforeSeekableWindow_(t,i)?(t=t.end(t.length-1),this.logger_(`Fell out of live window at time ${i}. Seeking to `+"live point (seekable end) "+t),this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0):(t=this.tech_.vhs.playlistController_.sourceUpdater_,e=this.tech_.buffered(),this.videoUnderflow_({audioBuffered:t.audioBuffered(),videoBuffered:t.videoBuffered(),currentTime:i})?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0):0<(t=qd(e,i)).length&&(this.logger_(`Stopped at ${i} and seeking to `+t.start(0)),this.resetTimeUpdate_(),this.skipTheGap_(i),!0)))}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let r=e.end(e.length-1)+Wd;var n=!i.endList;return t>(r=n&&("number"==typeof i.partTargetDuration||s)?e.end(e.length-1)+3*i.targetDuration:r)}beforeSeekableWindow_(e,t){return!!(e.length&&0{t.trigger({type:"usage",name:"vhs-error-reload-initialized"})}),function(){a&&t.currentTime(a)});t.on("error",s),t.on("dispose",r),t.reloadSourceOnError=function(e){r(),zc(t,e)}};function $c(t,e){var i=e.media();let s=-1;for(let e=0;eTu(e,t)),e.filter(e=>!!wh(this.playlists.main,e).video));return e[0]||null},lastBandwidthSelector:Vu,movingAverageBandwidthSelector:function(t){let i=-1,s=-1;if(t<0||1{Object.defineProperty(N,t,{get(){return E.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),R[t]},set(e){E.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),"number"!=typeof e||e<0?E.log.warn(`value of Vhs.${t} must be greater than or equal to 0`):R[t]=e}})}),"videojs-vhs"),Gc=(N.canPlaySource=function(){return E.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},({player:s,sourceKeySystems:e,audioMedia:t,mainPlaylists:i})=>{if(!s.eme.initializeMediaKeys)return Promise.resolve();var r,t=t?i.concat([t]):i,t=(i=t,r=Object.keys(e),i.reduce((e,s)=>{var t;return s.contentProtection&&(t=r.reduce((e,t)=>{var i=s.contentProtection[t];return i&&i.pssh&&(e[t]={pssh:i.pssh}),e},{}),Object.keys(t).length)&&e.push(t),e},[]));let n=[],a=[];return t.forEach(e=>{a.push(new Promise((e,t)=>{s.tech_.one("keysessioncreated",e)})),n.push(new Promise((t,i)=>{s.eme.initializeMediaKeys({keySystems:e},e=>{e?i(e):t()})}))}),Promise.race([Promise.all(n),Promise.race(a)])}),Xc=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{t=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=Ih(aa(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);var r,n=oa(s.video),a=oa(s.audio),o={};for(r in e)o[r]={},a&&(o[r].audioContentType=a),n&&(o[r].videoContentType=n),t.contentProtection&&t.contentProtection[r]&&t.contentProtection[r].pssh&&(o[r].pssh=t.contentProtection[r].pssh),"string"==typeof e[r]&&(o[r].url=e[r]);return L(e,o)})(t,i,s);return!(!t||(e.currentSource().keySystems=t)&&!e.eme&&(E.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1))},Kc=()=>{if(!window.localStorage)return null;var e=window.localStorage.getItem(Wc);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},Yc=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},Qc=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},Jc=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},Zc=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};N.supportsNativeHls=function(){if(!document||!document.createElement)return!1;let t=document.createElement("video");return!!E.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(e){return/maybe|probably/i.test(t.canPlayType(e))})}(),N.supportsNativeDash=!!(document&&document.createElement&&E.getTech("Html5").isSupported())&&/maybe|probably/i.test(document.createElement("video").canPlayType("application/dash+xml")),N.supportsTypeNatively=e=>"hls"===e?N.supportsNativeHls:"dash"===e&&N.supportsNativeDash,N.isSupported=function(){return E.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},N.xhr.onRequest=function(e){Yc(N.xhr,e)},N.xhr.onResponse=function(e){Qc(N.xhr,e)},N.xhr.offRequest=function(e){Jc(N.xhr,e)},N.xhr.offResponse=function(e){Zc(N.xhr,e)};t=E.getComponent("Component");class ep extends t{constructor(e,t,i){if(super(t,i.vhs),"number"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Bd("VhsHandler"),t.options_&&t.options_.playerId&&(i=E.getPlayer(t.options_.playerId),this.player_=i),this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(document,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],e=>{var t=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){this.options_=L(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage="undefined"!=typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi="undefined"==typeof this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage&&((e=Kc())&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e)&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"})),"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=R.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===R.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(e=>{"undefined"!=typeof this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;e=this.options_.customPixelRatio;"number"==typeof e&&0<=e&&(this.customPixelRatio=e)}setOptions(e={}){this.setOptions_(e)}src(e,t){e&&(this.setOptions_(),this.options_.src=0===(e=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(e.substring(e.indexOf(",")+1)):e,this.options_.tech=this.tech_,this.options_.externVhs=N,this.options_.sourceType=ea(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Fc(this.options_),e=L({liveRangeSafeTimeDelta:Wd},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_}),this.playbackWatcher_=new Vc(e),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{var e=E.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}),t=this.options_.bufferBasedABR?N.movingAverageBandwidthSelector(.55):N.STANDARD_PLAYLIST_SELECTOR,this.playlistController_.selectPlaylist=(this.selectPlaylist||t).bind(this),this.playlistController_.selectInitialPlaylist=N.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;var t=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection;return this.options_.useNetworkInformationApi&&t&&(t=1e3*t.downlink*1e3,e=1e7<=t&&1e7<=e?Math.max(e,t):t),e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){var e=1/(this.bandwidth||1);let t;return t=0this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Kd(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Kd(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{if(this.options_.useBandwidthFromLocalStorage){var e={bandwidth:this.bandwidth,throughput:Math.round(this.throughput)};if(window.localStorage){var t=(t=Kc())?L(t,e):e;try{window.localStorage.setItem(Wc,JSON.stringify(t))}catch(e){return}}}}),this.playlistController_.on("selectedinitialmedia",()=>{var i;(i=this).representations=()=>{var e=i.playlistController_.main(),e=ch(e)?i.playlistController_.getAudioTrackPlaylists_():e.playlists;return e?e.filter(e=>!ah(e)).map((e,t)=>new qc(i,e,e.id)):[]}}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el())&&(this.mediaSourceUrl_=window.URL.createObjectURL(this.playlistController_.mediaSource),(E.browser.IS_ANY_SAFARI||E.browser.IS_IOS)&&this.options_.overrideNative&&"hls"===this.options_.sourceType&&"function"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){var e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Gc({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){var e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,e=Xc({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),e?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){var e=E.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{var t,e;t=this.qualityLevels_,(e=this).representations().forEach(e=>{t.addQualityLevel(e)}),$c(t,e.playlists)}),this.playlists.on("mediachange",()=>{$c(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":"3.17.2","mux.js":"7.1.0","mpd-parser":"1.3.1","m3u8-parser":"7.2.0","aes-decrypter":"4.0.2"}}version(){return this.constructor.version()}canChangeType(){return mc.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&window.URL.revokeObjectURL&&(window.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Gh({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return Xh({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{Yc(this.xhr,e)},this.xhr.onResponse=e=>{Qc(this.xhr,e)},this.xhr.offRequest=e=>{Jc(this.xhr,e)},this.xhr.offResponse=e=>{Zc(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(e=>{this.playlistController_.on(e,e=>{this.player_.trigger(f({},e))})}),["gapjumped","playedrangeschanged"].forEach(e=>{this.playbackWatcher_.on(e,e=>{this.player_.trigger(f({},e))})})}}let tp={name:"videojs-http-streaming",VERSION:"3.17.2",canHandleSource(e,t={}){t=L(E.options,t);return!(!t.vhs.experimentalUseMMS&&!Jn("avc1.4d400d,mp4a.40.2",!1))&&tp.canPlayType(e.type,t)},handleSource(e,t,i={}){i=L(E.options,i);return t.vhs=new ep(e,t,i),t.vhs.xhr=Uh(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){e=ea(e);return e&&(t=tp.getOverrideNative(t),!N.supportsTypeNatively(e)||t)?"maybe":""},getOverrideNative(e={}){var{vhs:e={}}=e,t=!(E.browser.IS_ANY_SAFARI||E.browser.IS_IOS),{overrideNative:e=t}=e;return e}};return Jn("avc1.4d400d,mp4a.40.2",!0)&&E.getTech("Html5").registerSourceHandler(tp,0),E.VhsHandler=ep,E.VhsSourceHandler=tp,E.Vhs=N,E.use||E.registerComponent("Vhs",N),E.options.vhs=E.options.vhs||{},E.getPlugin&&E.getPlugin("reloadSourceOnError")||E.registerPlugin("reloadSourceOnError",function(e){zc(this,e)}),E}); \ No newline at end of file -- 2.39.5