| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4a2c9378","chunk-05420405","chunk-2d2086ab"],{"010e":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return t}))},"02fb":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,s){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});return t}))},"03ec":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){var t=/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран";return e+t},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}});return t}))},"0558":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e){return e%100===11||e%10!==1}function s(e,s,i,n){var r=e+" ";switch(i){case"s":return s||n?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?r+(s||n?"sekúndur":"sekúndum"):r+"sekúnda";case"m":return s?"mínúta":"mínútu";case"mm":return t(e)?r+(s||n?"mínútur":"mínútum"):s?r+"mínúta":r+"mínútu";case"hh":return t(e)?r+(s||n?"klukkustundir":"klukkustundum"):r+"klukkustund";case"d":return s?"dagur":n?"dag":"degi";case"dd":return t(e)?s?r+"dagar":r+(n?"daga":"dögum"):s?r+"dagur":r+(n?"dag":"degi");case"M":return s?"mánuður":n?"mánuð":"mánuði";case"MM":return t(e)?s?r+"mánuðir":r+(n?"mánuði":"mánuðum"):s?r+"mánuður":r+(n?"mánuð":"mánuði");case"y":return s||n?"ár":"ári";case"yy":return t(e)?r+(s||n?"ár":"árum"):r+(s||n?"ár":"ári")}}var i=e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:s,ss:s,m:s,mm:s,h:"klukkustund",hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i}))},"0721":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"079e":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,s){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return t}))},"0a3c":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),s="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],n=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,r=e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?s[e.month()]:t[e.month()]:t},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return r}))},"0a84":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});return t}))},"0caa":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){var n={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return i?n[s][0]:n[s][1]}var s=e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,s){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}});return s}))},"0e49":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return t}))},"0e6b":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s},week:{dow:0,doy:4}});return t}))},"0e81":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},s=e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,s){return e<12?s?"öö":"ÖÖ":s?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,s){switch(s){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var i=e%10,n=e%100-i,r=e>=100?100:null;return e+(t[i]||t[n]||t[r])}},week:{dow:1,doy:7}});return s}))},"0f14":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"0f38":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},"0ff2":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return t}))},"10e8":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,s){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}});return t}))},"13e9":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једног минута"],mm:["минут","минута","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],d:["један дан","једног дана"],dd:["дан","дана","дана"],M:["један месец","једног месеца"],MM:["месец","месеца","месеци"],y:["једну годину","једне године"],yy:["годину","године","година"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10===1?t[0]:t[1]:t[2]},translate:function(e,s,i,n){var r,a=t.words[i];return 1===i.length?"y"===i&&s?"једна година":n||s?a[0]:a[1]:(r=t.correctGrammaticalCase(e,a),"yy"===i&&s&&"годину"===r?e+" година":e+" "+r)}},s=e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var e=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return s}))},"167b":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var s=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(s="a"),e+s},week:{dow:1,doy:4}});return t}))},"1b45":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"1cfd":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},s=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},n=function(e){return function(t,n,r,a){var o=s(t),d=i[e][s(t)];return 2===o&&(d=d[n?0:1]),d.replace(/%d/i,t)}},r=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],a=e.defineLocale("ar-ly",{months:r,monthsShort:r,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,s){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:n("s"),ss:n("s"),m:n("m"),mm:n("m"),h:n("h"),hh:n("h"),d:n("d"),dd:n("d"),M:n("M"),MM:n("M"),y:n("y"),yy:n("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return a}))},"1d87":function(e,t,s){"use strict";s("3344")},"1fc1":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t){var s=e.split("_");return t%10===1&&t%100!==11?s[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?s[1]:s[2]}function s(e,s,i){var n={ss:s?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:s?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:s?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===i?s?"хвіліна":"хвіліну":"h"===i?s?"гадзіна":"гадзіну":e+" "+t(n[i],+e)}var i=e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:s,mm:s,h:s,hh:s,d:"дзень",dd:s,M:"месяц",MM:s,y:"год",yy:s},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,s){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!==2&&e%10!==3||e%100===12||e%100===13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}});return i}))},"201b":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,s){return"ი"===s?t+"ში":t+s+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20===0||e%100===0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}});return t}))},2142:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"mainBox"},[e.videoUrl?s("video",{ref:"videoElement",attrs:{controls:e.showNativeControls,muted:"",controlsList:"noplaybackrate"},domProps:{muted:!0}}):s("el-empty",{style:{height:"100%",background:"#000000",display:"flex",justifyContent:"center",alignItems:"center"},attrs:{image:e.emptyImg}},[s("span",{staticStyle:{color:"white"},attrs:{slot:"description"},slot:"description"},[e._v("当前无可播放的录像资源")])])],1)},n=[],r=s("a567"),a=s("c4bf"),o=s.n(a),d={name:"videoBox",props:{videoUrl:{type:String,default:""},showNativeControls:{type:Boolean,default:!0}},data:function(){return{emptyImg:o.a,hls:null,video:null}},mounted:function(){var e=this;this.videoUrl&&this.$nextTick((function(){e.video=e.$refs.videoElement,e.addVideoListeners(),e.initPlayer(e.videoUrl)}))},beforeDestroy:function(){this.destroyPlayer(),this.removeVideoListeners()},methods:{pausePlayback:function(){this.video&&this.video.pause()},resumePlayback:function(){this.video&&this.video.play().catch((function(e){console.warn("浏览器策略阻止了自动播放:",e)}))},play:function(e){var t=this;this.$nextTick((function(){t.$refs.videoElement?(t.video=t.$refs.videoElement,t.addVideoListeners(),t.initPlayer(e)):console.error("videoElement 尚未渲染, play 失败")}))},initPlayer:function(e){var t=this;this.destroyPlayer(),e&&this.video?(console.log("videoBox 正在初始化播放,URL:",e),r["a"].isSupported()?(this.hls=new r["a"],this.hls.loadSource(e),this.hls.attachMedia(this.video),this.hls.on(r["a"].Events.MANIFEST_PARSED,(function(){t.video.play().catch((function(e){console.warn("浏览器策略阻止了自动播放:",e)}))})),this.hls.on(r["a"].Events.ERROR,(function(e,t){t.fatal&&console.error("HLS 致命错误:",t.type,t.details)}))):this.video.canPlayType("application/vnd.apple.mpegurl")?(this.video.src=e,this.video.play().catch((function(e){console.warn("浏览器策略阻止了自动播放:",e)}))):this.$message.error("当前浏览器不支持 HLS 播放")):console.warn("initPlayer 中断: URL 或 video 元素缺失")},destroyPlayer:function(){this.hls&&(this.hls.destroy(),this.hls=null),this.video&&(this.video.pause(),this.video.src="",this.video.removeAttribute("src"))},addVideoListeners:function(){this.video&&(this.removeVideoListeners(),this.video.addEventListener("play",this.onPlay),this.video.addEventListener("pause",this.onPause),this.video.addEventListener("ratechange",this.onRateChange),this.video.addEventListener("playing",this.onPlaying),this.video.addEventListener("waiting",this.onWaiting),this.video.addEventListener("ended",this.onEnded))},removeVideoListeners:function(){var e=this.$refs.videoElement;e&&(e.removeEventListener("play",this.onPlay),e.removeEventListener("pause",this.onPause),e.removeEventListener("ratechange",this.onRateChange),e.removeEventListener("playing",this.onPlaying),e.removeEventListener("waiting",this.onWaiting),e.removeEventListener("ended",this.onEnded))},onPlay:function(){this.$emit("playStatus","play",this.video.playbackRate),this.$emit("player-ready")},onPause:function(){this.$emit("playStatus","pause")},onRateChange:function(){this.$emit("playStatus","play",this.video.playbackRate)},onPlaying:function(){this.$emit("playStatus","play",this.video.playbackRate)},onWaiting:function(){this.$emit("playStatus","pause")},onEnded:function(){this.$emit("playbackCompleted")}}},l=d,u=(s("d944"),s("2877")),h=Object(u["a"])(l,i,n,!1,null,"22153b67",null);t["default"]=h.exports},"22f8":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,s){return e<12?"오전":"오후"}});return t}))},2421:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},s={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},i=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"],n=e.defineLocale("ku",{months:i,monthsShort:i,weekdays:"یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه".split("_"),weekdaysShort:"یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره|بهیانی/,isPM:function(e){return/ئێواره/.test(e)},meridiem:function(e,t,s){return e<12?"بهیانی":"ئێواره"},calendar:{sameDay:"[ئهمرۆ كاتژمێر] LT",nextDay:"[بهیانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له %s",past:"%s",s:"چهند چركهیهك",ss:"چركه %d",m:"یهك خولهك",mm:"%d خولهك",h:"یهك كاتژمێر",hh:"%d كاتژمێر",d:"یهك ڕۆژ",dd:"%d ڕۆژ",M:"یهك مانگ",MM:"%d مانگ",y:"یهك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return s[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return n}))},25548:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){switch(s){case"m":return t?"jedna minuta":i?"jednu minutu":"jedne minute"}}function s(e,t,s){var i=e+" ";switch(s){case"ss":return i+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",i;case"mm":return i+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",i;case"h":return"jedan sat";case"hh":return i+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",i;case"dd":return i+=1===e?"dan":"dana",i;case"MM":return i+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",i;case"yy":return i+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",i}}var i=e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:s,m:t,mm:s,h:s,hh:s,d:"dan",dd:s,M:"mjesec",MM:s,y:"godinu",yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i}))},"26f9":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function s(e,t,s,i){return t?"kelios sekundės":i?"kelių sekundžių":"kelias sekundes"}function i(e,t,s,i){return t?r(s)[0]:i?r(s)[1]:r(s)[2]}function n(e){return e%10===0||e>10&&e<20}function r(e){return t[e].split("_")}function a(e,t,s,a){var o=e+" ";return 1===e?o+i(e,t,s[0],a):t?o+(n(e)?r(s)[1]:r(s)[0]):a?o+r(s)[1]:o+(n(e)?r(s)[1]:r(s)[2])}var o=e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:s,ss:a,m:i,mm:a,h:i,hh:a,d:i,dd:a,M:i,MM:a,y:i,yy:a},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});return o}))},2921:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,s){return e<12?s?"sa":"SA":s?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},"293c":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,s,i){var n=t.words[i];return 1===i.length?s?n[0]:n[1]:e+" "+t.correctGrammaticalCase(e,n)}},s=e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return s}))},"2bfb":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,s){return e<12?s?"vm":"VM":s?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return t}))},"2e8c":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}});return t}))},3344:function(e,t,s){},3886:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s}});return t}))},"39a6":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s},week:{dow:1,doy:4}});return t}))},"39bd":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},s={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function i(e,t,s,i){var n="";if(t)switch(s){case"s":n="काही सेकंद";break;case"ss":n="%d सेकंद";break;case"m":n="एक मिनिट";break;case"mm":n="%d मिनिटे";break;case"h":n="एक तास";break;case"hh":n="%d तास";break;case"d":n="एक दिवस";break;case"dd":n="%d दिवस";break;case"M":n="एक महिना";break;case"MM":n="%d महिने";break;case"y":n="एक वर्ष";break;case"yy":n="%d वर्षे";break}else switch(s){case"s":n="काही सेकंदां";break;case"ss":n="%d सेकंदां";break;case"m":n="एका मिनिटा";break;case"mm":n="%d मिनिटां";break;case"h":n="एका तासा";break;case"hh":n="%d तासां";break;case"d":n="एका दिवसा";break;case"dd":n="%d दिवसां";break;case"M":n="एका महिन्या";break;case"MM":n="%d महिन्यां";break;case"y":n="एका वर्षा";break;case"yy":n="%d वर्षां";break}return n.replace(/%d/i,e)}var n=e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){return 12===e&&(e=0),"पहाटे"===t||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,s){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}});return n}))},"3a39":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},s={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},i=e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,s){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}});return i}))},"3a6c":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,s){var i=100*e+t;return i<600?"凌晨":i<900?"早上":i<1130?"上午":i<1230?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},"3b1b":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"},s=e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,s){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var s=e%10,i=e>=100?100:null;return e+(t[e]||t[s]||t[i])},week:{dow:1,doy:7}});return s}))},"3c0d":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={standalone:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),format:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_"),isFormat:/DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/},s="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),i=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],n=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function r(e){return e>1&&e<5&&1!==~~(e/10)}function a(e,t,s,i){var n=e+" ";switch(s){case"s":return t||i?"pár sekund":"pár sekundami";case"ss":return t||i?n+(r(e)?"sekundy":"sekund"):n+"sekundami";case"m":return t?"minuta":i?"minutu":"minutou";case"mm":return t||i?n+(r(e)?"minuty":"minut"):n+"minutami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?n+(r(e)?"hodiny":"hodin"):n+"hodinami";case"d":return t||i?"den":"dnem";case"dd":return t||i?n+(r(e)?"dny":"dní"):n+"dny";case"M":return t||i?"měsíc":"měsícem";case"MM":return t||i?n+(r(e)?"měsíce":"měsíců"):n+"měsíci";case"y":return t||i?"rok":"rokem";case"yy":return t||i?n+(r(e)?"roky":"let"):n+"lety"}}var o=e.defineLocale("cs",{months:t,monthsShort:s,monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},"3de5":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},s={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},i=e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,s){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}});return i}))},"3e92":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},s={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"},i=e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,s){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}});return i}))},4057:function(e,t,s){var i=s("23e7"),n=Math.hypot,r=Math.abs,a=Math.sqrt,o=!!n&&n(1/0,NaN)!==1/0;i({target:"Math",stat:!0,arity:2,forced:o},{hypot:function(e,t){var s,i,n=0,o=0,d=arguments.length,l=0;while(o<d)s=r(arguments[o++]),l<s?(i=l/s,n=n*i*i+1,l=s):s>0?(i=s/l,n+=i*i):n+=s;return l===1/0?1/0:l*a(n)}})},"423e":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}});return t}))},"440c":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){var n={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?n[s][0]:n[s][1]}function s(e){var t=e.substr(0,e.indexOf(" "));return n(t)?"a "+e:"an "+e}function i(e){var t=e.substr(0,e.indexOf(" "));return n(t)?"viru "+e:"virun "+e}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10,s=e/10;return n(0===t?s:t)}if(e<1e4){while(e>=10)e/=10;return n(e)}return e/=1e3,n(e)}var r=e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:s,past:i,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return r}))},4678:function(e,t,s){var i={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-ps":"4c98","./ar-ps.js":"4c98","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"25548","./bs.js":"25548","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df48","./fa.js":"8df48","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b46","./gd.js":"f6b46","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku-kmr":"7558","./ku-kmr.js":"7558","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function n(e){var t=r(e);return s(t)}function r(e){if(!s.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=r,e.exports=n,n.id="4678"},"485c":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},s=e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,s){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var s=e%10,i=e%100-s,n=e>=100?100:null;return e+(t[s]||t[i]||t[n])},week:{dow:1,doy:7}});return s}))},"49ab":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,s){var i=100*e+t;return i<600?"凌晨":i<900?"早上":i<1200?"上午":1200===i?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},"4ba9":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s){var i=e+" ";switch(s){case"ss":return i+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",i;case"m":return t?"jedna minuta":"jedne minute";case"mm":return i+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",i;case"h":return t?"jedan sat":"jednog sata";case"hh":return i+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",i;case"dd":return i+=1===e?"dan":"dana",i;case"MM":return i+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",i;case"yy":return i+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",i}}var s=e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return s}))},"4c98":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},s={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},i=e.defineLocale("ar-ps",{months:"كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل".split("_"),monthsShort:"ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,s){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[٣٤٥٦٧٨٩٠]/g,(function(e){return s[e]})).split("").reverse().join("").replace(/[١٢](?![\u062a\u0643])/g,(function(e){return s[e]})).split("").reverse().join("").replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}});return i}))},5038:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,s){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}});return t}))},5120:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],s=["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],i=["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],n=["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],r=["Do","Lu","Má","Cé","Dé","A","Sa"],a=e.defineLocale("ga",{months:t,monthsShort:s,monthsParseExact:!0,weekdays:i,weekdaysShort:n,weekdaysMin:r,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return a}))},5294:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],s=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],i=e.defineLocale("ur",{months:t,monthsShort:t,weekdays:s,weekdaysShort:s,weekdaysMin:s,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,s){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return i}))},"52bd":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,s){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});return t}))},"55c9":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),s="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],n=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,r=e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?s[e.month()]:t[e.month()]:t},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}});return r}))},"576c":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s},week:{dow:1,doy:4}});return t}))},"598a":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],s=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],i=e.defineLocale("dv",{months:t,monthsShort:t,weekdays:s,weekdaysShort:s,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,s){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}});return i}))},"5aff":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"},s=e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,s){switch(s){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var i=e%10,n=e%100-i,r=e>=100?100:null;return e+(t[i]||t[n]||t[r])}},week:{dow:1,doy:7}});return s}))},"5b14":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function s(e,t,s,i){var n=e;switch(s){case"s":return i||t?"néhány másodperc":"néhány másodperce";case"ss":return n+(i||t)?" másodperc":" másodperce";case"m":return"egy"+(i||t?" perc":" perce");case"mm":return n+(i||t?" perc":" perce");case"h":return"egy"+(i||t?" óra":" órája");case"hh":return n+(i||t?" óra":" órája");case"d":return"egy"+(i||t?" nap":" napja");case"dd":return n+(i||t?" nap":" napja");case"M":return"egy"+(i||t?" hónap":" hónapja");case"MM":return n+(i||t?" hónap":" hónapja");case"y":return"egy"+(i||t?" év":" éve");case"yy":return n+(i||t?" év":" éve")}return""}function i(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}var n=e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,s){return e<12?!0===s?"de":"DE":!0===s?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return i.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return i.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},"5c3a":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,s){var i=100*e+t;return i<600?"凌晨":i<900?"早上":i<1130?"上午":i<1230?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});return t}))},"5cbb":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,s){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}});return t}))},"5fbd":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?":e":1===t||2===t?":a":":e";return e+s},week:{dow:1,doy:4}});return t}))},6117:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,s){var i=100*e+t;return i<600?"يېرىم كېچە":i<900?"سەھەر":i<1130?"چۈشتىن بۇرۇن":i<1230?"چۈش":i<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}});return t}))},6403:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,s){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},"65db":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,s){return e>11?s?"p.t.m.":"P.T.M.":s?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});return t}))},6784:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],s=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"],i=e.defineLocale("sd",{months:t,monthsShort:t,weekdays:s,weekdaysShort:s,weekdaysMin:s,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,s){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return i}))},6887:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s){var i={mm:"munutenn",MM:"miz",dd:"devezh"};return e+" "+n(i[s],e)}function s(e){switch(i(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function i(e){return e>9?i(e%10):e}function n(e,t){return 2===t?r(e):e}function r(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}var a=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],o=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,d=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,l=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,u=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],h=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],c=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i],m=e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:c,fullWeekdaysParse:u,shortWeekdaysParse:h,minWeekdaysParse:c,monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:d,monthsShortStrictRegex:l,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:s},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){var t=1===e?"añ":"vet";return e+t},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,s){return e<12?"a.m.":"g.m."}});return m}))},"688b":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},6909:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,s=e%100;return 0===e?e+"-ев":0===s?e+"-ен":s>10&&s<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t}))},"6ce3":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"én time",hh:"%d timer",d:"én dag",dd:"%d dager",w:"én uke",ww:"%d uker",M:"én måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"6d79":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},s=e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var s=e%10,i=e>=100?100:null;return e+(t[e]||t[s]||t[i])},week:{dow:1,doy:7}});return s}))},"6d83":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});return t}))},"6e98":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"6f12":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"6f50":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s},week:{dow:1,doy:4}});return t}))},7118:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),s="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),i=e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?s[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return i}))},7333:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s}});return t}))},"74dc":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});return t}))},7558:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){var n={s:["çend sanîye","çend sanîyeyan"],ss:[e+" sanîye",e+" sanîyeyan"],m:["deqîqeyek","deqîqeyekê"],mm:[e+" deqîqe",e+" deqîqeyan"],h:["saetek","saetekê"],hh:[e+" saet",e+" saetan"],d:["rojek","rojekê"],dd:[e+" roj",e+" rojan"],w:["hefteyek","hefteyekê"],ww:[e+" hefte",e+" hefteyan"],M:["mehek","mehekê"],MM:[e+" meh",e+" mehan"],y:["salek","salekê"],yy:[e+" sal",e+" salan"]};return t?n[s][0]:n[s][1]}function s(e){e=""+e;var t=e.substring(e.length-1),s=e.length>1?e.substring(e.length-2):"";return 12==s||13==s||"2"!=t&&"3"!=t&&"50"!=s&&"70"!=t&&"80"!=t?"ê":"yê"}var i=e.defineLocale("ku-kmr",{months:"Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar".split("_"),monthsShort:"Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber".split("_"),monthsParseExact:!0,weekdays:"Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî".split("_"),weekdaysShort:"Yek_Du_Sê_Çar_Pên_În_Şem".split("_"),weekdaysMin:"Ye_Du_Sê_Ça_Pê_În_Şe".split("_"),meridiem:function(e,t,s){return e<12?s?"bn":"BN":s?"pn":"PN"},meridiemParse:/bn|BN|pn|PN/,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM[a] YYYY[an]",LLL:"Do MMMM[a] YYYY[an] HH:mm",LLLL:"dddd, Do MMMM[a] YYYY[an] HH:mm",ll:"Do MMM[.] YYYY[an]",lll:"Do MMM[.] YYYY[an] HH:mm",llll:"ddd[.], Do MMM[.] YYYY[an] HH:mm"},calendar:{sameDay:"[Îro di saet] LT [de]",nextDay:"[Sibê di saet] LT [de]",nextWeek:"dddd [di saet] LT [de]",lastDay:"[Duh di saet] LT [de]",lastWeek:"dddd[a borî di saet] LT [de]",sameElse:"L"},relativeTime:{future:"di %s de",past:"berî %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,w:t,ww:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(?:yê|ê|\.)/,ordinal:function(e,t){var i=t.toLowerCase();return i.includes("w")||i.includes("m")?e+".":e+s(e)},week:{dow:1,doy:4}});return i}))},7817:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"app-container"},[s("el-row",{staticStyle:{display:"flex",width:"100%"}},[s("div",{staticClass:"tree-card",staticStyle:{display:"flex",height:"85vh",width:"20%","flex-direction":"column","min-width":"260px"}},[s("div",{staticClass:"head-container"},[s("el-input",{staticStyle:{"margin-bottom":"5px"},attrs:{placeholder:"请输入设备名称",clearable:"",size:"small","prefix-icon":"el-icon-search"},model:{value:e.searchWord,callback:function(t){e.searchWord=t},expression:"searchWord"}})],1),s("div",{staticClass:"head-container",staticStyle:{"max-height":"360px",display:"flex"}},[s("el-tabs",{attrs:{stretch:!0},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[s("el-tab-pane",{attrs:{label:"所有流通道",name:"first"}},[s("span",{attrs:{slot:"label"},slot:"label"},[s("span",[e._v("所有流通道")]),s("el-dropdown",{staticStyle:{"margin-left":"10px"},attrs:{size:"mini",trigger:"click"},on:{command:e.clickDownItem}},[s("i",{staticClass:"el-icon-refresh",staticStyle:{color:"#ffffff","font-size":"14px"}},[e._v(e._s(e.getSelectType))]),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[s("el-dropdown-item",{attrs:{icon:"el-icon-refresh",command:2}},[e._v(" 默认 ")]),s("el-dropdown-item",{attrs:{icon:"el-icon-refresh",command:1}},[e._v(" 硬存储 ")]),s("el-dropdown-item",{attrs:{icon:"el-icon-refresh",command:0}},[e._v(" 流媒体 ")])],1)],1)],1),s("el-tree",{ref:"tree1",attrs:{data:e.streamOptions,props:e.defaultProps,"expand-on-click-node":!0,"node-key":"id","filter-node-method":e.filterNode,"default-expand-all":"","highlight-current":""},on:{"node-click":e.handleNodeClick},scopedSlots:e._u([{key:"default",fn:function(t){t.node;var i=t.data;return s("span",{staticStyle:{flex:"1",display:"flex","align-items":"center","justify-content":"space-between","font-size":"14px"}},[s("div",{staticStyle:{display:"flex","align-items":"center"}},[s("v-icon",{attrs:{name:"oi-git-merge",scale:"1.2",fill:"#ffffff"}}),s("span",{staticStyle:{"font-size":"13px","margin-left":"5px"}},[e._v(e._s(i.label))])],1)])}}])})],1)],1)],1),s("div",{staticClass:"head-container",staticStyle:{display:"flex",flex:"1"}},[s("el-tabs",{attrs:{stretch:!0},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[s("el-tab-pane",{attrs:{label:"日历",name:"first"}},[s("Calendar",{key:e.calendarKey,attrs:{sundayStart:!1,value:e.calendarValue,markDate:e.markDay},on:{choseDay:e.clickDay,changeMonth:e.changeMonth}})],1)],1)],1)]),s("el-card",{staticClass:"tree-card",staticStyle:{flex:"1","margin-left":"10px"},attrs:{"body-style":{display:"flex",flexDirection:"column",height:"100%"}}},[s("div",{staticClass:"player-controls"},[s("el-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"primary",icon:"el-icon-refresh-left",size:"mini",disabled:null===e.quickPlayParam},on:{click:e.handleQuickReplay}},[e._v(" 快速回放 ")]),s("el-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"primary",icon:"el-icon-download",size:"mini"},on:{click:e.openDownloadDialog}},[e._v("下载录像")]),s("span",{staticStyle:{color:"#ffffff","margin-right":"15px","font-size":"14px"}},[e._v(" 同步回放 "),s("el-switch",{staticStyle:{"margin-left":"5px"},model:{value:e.isSyncMode,callback:function(t){e.isSyncMode=t},expression:"isSyncMode"}})],1),s("el-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"primary",icon:e.isAutoPlay?"el-icon-video-pause":"el-icon-video-play",size:"mini",disabled:!e.time},on:{click:function(t){e.isAutoPlay?e.handleGlobalPause():e.handleGlobalPlay()}}},[e._v(" "+e._s(e.isAutoPlay?"全部暂停":"全部播放")+" ")]),s("el-dropdown",{on:{command:e.changeGrid}},[s("span",{staticClass:"el-dropdown-link",staticStyle:{color:"#ffffff",cursor:"pointer"}},[e._v(" 画面布局"),s("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[s("el-dropdown-item",{attrs:{command:"1"}},[e._v("单画面")]),s("el-dropdown-item",{attrs:{command:"4"}},[e._v("四画面")]),s("el-dropdown-item",{attrs:{command:"6"}},[e._v("六画面")])],1)],1)],1),s("div",{staticClass:"player-grid",class:e.gridClass},e._l(e.players,(function(t,i){return s("div",{key:i,staticClass:"player-cell",class:{"active-player":e.activePlayerIndex===i},on:{click:function(t){return e.setActivePlayer(i)}}},[(2===t.selectType?"0"===t.equipmentInfo.isYuhang:0===t.selectType)?s("videoBox",{ref:"videoBox"+i,refInFor:!0,staticStyle:{height:"100%",width:"100%"},attrs:{videoUrl:t.videoUrl,showNativeControls:!1},on:{playStatus:function(t){var s=arguments.length,n=Array(s);while(s--)n[s]=arguments[s];return e.playStatus.apply(void 0,[i].concat(n))},playbackCompleted:function(t){return e.playbackCompleted(i)},"player-ready":function(t){return e.handlePlayerReady(i)}}}):e._e(),(2===t.selectType?"0"===t.equipmentInfo.isYuhang:0===t.selectType)&&e.activePlayerIndex===i?s("div",{staticStyle:{position:"absolute",bottom:"0",right:"0","z-index":"10",color:"white",padding:"5px",background:"rgba(0,0,0,0.3)","border-radius":"4px"}},[s("el-dropdown",{on:{command:e.handleHlsSpeedChange}},[s("span",{staticClass:"el-dropdown-link",staticStyle:{color:"white",cursor:"pointer",display:"flex","flex-direction":"column","align-items":"center",width:"40px"}},[s("v-icon",{attrs:{name:"ri-speed-fill",scale:"1.5"}}),s("div",{staticStyle:{"font-size":"12px"}},[e._v(e._s(t.hlsSpeed.toFixed(1))+"x")])],1),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[s("el-dropdown-item",{attrs:{command:"2.0"}},[e._v("2.0x")]),s("el-dropdown-item",{attrs:{command:"1.5"}},[e._v("1.5x")]),s("el-dropdown-item",{attrs:{command:"1.0"}},[e._v("1.0x")]),s("el-dropdown-item",{attrs:{command:"0.5"}},[e._v("0.5x")])],1)],1)],1):e._e(),(2===t.selectType?"1"===t.equipmentInfo.isYuhang:1===t.selectType)?s("div",{staticStyle:{height:"100%",width:"100%",overflow:"hidden",background:"#000000",position:"relative"}},[t.videoUrl?s("player",{ref:"player"+i,refInFor:!0,staticStyle:{height:"100%"},attrs:{"video-url":t.videoUrl,"show-button-box":!e.isSyncMode,fluent:"",autoplay:"",live:"","has-audio":!0},on:{autoplay:function(t){return e.setIsAutoPlay(i,t)}}}):s("el-empty",{style:{height:"100%",background:"#313131"}},[s("span",{staticStyle:{color:"white"},attrs:{slot:"description"},slot:"description"},[e._v("请选择设备和日期")])]),e.activePlayerIndex===i?s("div",{staticStyle:{position:"absolute",bottom:"0",right:"0"}},[s("el-dropdown",{on:{command:e.handleChangeSpeed}},[s("span",{staticClass:"el-dropdown-link"},[s("v-icon",{attrs:{name:"ri-speed-fill",scale:"1.5"}}),s("div",[e._v(e._s(t.jessibucaSpeed))])],1),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[s("el-dropdown-item",{attrs:{command:"4"}},[e._v("2倍速")]),s("el-dropdown-item",{attrs:{command:"6"}},[e._v("无倍速")]),s("el-dropdown-item",{attrs:{command:"5"}},[e._v("0.5倍速")])],1)],1)],1):e._e()],1):e._e(),t.equipmentInfo.id?e._e():s("el-empty",{style:{height:"100%",width:"100%",background:"#313131"}},[s("span",{staticStyle:{color:"white"},attrs:{slot:"description"},slot:"description"},[e._v("闲置窗口")])])],1)})),0),s("div",{staticStyle:{display:"flex","margin-bottom":"5px"}},[s("TimelineCanvas",{ref:"time_line",staticStyle:{"flex-grow":"1"},attrs:{"time-range":e.time,"mark-time":e.markTime,isAutoPlay:e.isAutoPlay,startMeddleTime:e.startMeddleTime},on:{change:e.changeTimeline,click:e.clickTimeline}})],1),s("el-dialog",{staticClass:"download-dialog",attrs:{title:"下载录像片段",visible:e.downloadDialogVisible,width:"600px","append-to-body":""},on:{"update:visible":function(t){e.downloadDialogVisible=t}}},[s("el-form",{attrs:{"label-width":"80px"},nativeOn:{submit:function(e){e.preventDefault()}}},[s("el-form-item",{attrs:{label:"时间范围"}},[s("el-date-picker",{staticStyle:{width:"100%","margin-bottom":"10px"},attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期时间","end-placeholder":"结束日期时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.downloadDateTimeRange,callback:function(t){e.downloadDateTimeRange=t},expression:"downloadDateTimeRange"}})],1),s("el-form-item",{attrs:{label:"下载格式"}},[s("el-select",{staticStyle:{width:"120px"},attrs:{placeholder:"选择格式"},model:{value:e.downloadFormat,callback:function(t){e.downloadFormat=t},expression:"downloadFormat"}},[s("el-option",{attrs:{label:"MP4",value:"mp4"}}),s("el-option",{attrs:{label:"AVI",value:"avi"}})],1)],1),s("el-form-item",{attrs:{label:"参考片段"}},[s("el-table",{staticClass:"download-table",attrs:{data:e.markTime,height:"180px"},on:{"row-click":e.handleSegmentClick}},[s("el-table-column",{attrs:{label:"开始时间",prop:"beginTime",align:"center"}}),s("el-table-column",{attrs:{label:"结束时间",prop:"endTime",align:"center"}}),s("el-table-column",{attrs:{label:"时长",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.calculateDuration(t.row.beginTime,t.row.endTime))+" ")]}}])}),s("div",{staticStyle:{color:"#acb3bb","text-align":"center","line-height":"180px"},attrs:{slot:"empty"},slot:"empty"},[e._v(" 当前日期无可下载的录像片段 ")])],1)],1)],1),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.downloadDialogVisible=!1}}},[e._v("取 消")]),s("el-button",{attrs:{type:"primary"},on:{click:e.handleDownloadConfirm}},[e._v("确 定 下 载")])],1)],1)],1)],1)],1)},n=[],r=s("3835"),a=s("2909"),o=s("c7eb"),d=s("1da1"),l=s("5530"),u=(s("99af"),s("4de4"),s("7db0"),s("c740"),s("a15b"),s("d81d"),s("14d9"),s("a9e3"),s("b680"),s("d3b7"),s("ac1f"),s("6062"),s("3ca3"),s("5319"),s("2ca0"),s("159b"),s("ddb0"),s("2b3d"),s("bf19"),s("9861"),s("badc")),h=s("2142"),c=s("fe1d"),m=s("ff0b"),f=s("ed08"),_=s("97a0"),g=s("bfa9"),p=s("74f3");Object(g["b"])(p["k"],p["r"]);var y={components:{videoBox:h["default"],player:u["a"],TimelineCanvas:m["a"]},data:function(){return{players:[],calendarKey:0,activePlayerIndex:0,gridSize:6,quickPlayParam:null,searchWord:"",activeName:"first",streamOptions:[],defaultProps:{children:"children",label:"label"},time:"",markTime:[],isAutoPlay:!1,startMeddleTime:"",markDay:[],downloadDialogVisible:!1,downloadDateTimeRange:[],downloadFormat:"mp4",currentSegmentStartTime:null,timeUpdateListener:null,isSyncMode:!1,masterClockInterval:null}},watch:{searchWord:function(e){this.$refs.tree1.filter(e)}},computed:{gridClass:function(){switch(this.gridSize){case 1:return"grid-1x1";case 4:return"grid-2x2";case 6:return"grid-2x3";case 9:return"grid-3x3";default:return"grid-2x3"}},getSelectType:function(){var e;if(!this.players||0===this.players.length)return"默认";var t=null===(e=this.players[this.activePlayerIndex])||void 0===e?void 0:e.selectType;switch(t){case 2:return"默认";case 1:return"硬存储";case 0:return"流媒体";default:return"默认"}},calendarValue:function(){if(!this.time)return new Date;var e=this.time,t=e.replace(/-/g,"/"),s=new Date(t);return isNaN(s.getTime())?(console.warn("为日历创建了无效日期:",this.time),new Date):s}},created:function(){this.initializePlayers(),this.getStreamOptions(),this.fetchQuickPlayParam()},methods:{initializePlayers:function(){this.players=[];for(var e=0;e<this.gridSize;e++)this.players.push({equipmentInfo:{cameraName:"",cameraId:"",app:"",id:"",isYuhang:null},videoUrl:"",isAutoPlay:!1,startMeddleTime:"",time:"",markTime:[],jessibucaSpeed:"1.0",selectType:2,endTimeMark:"",hlsSpeed:1,currentSegmentStartTime:null,currentSegmentBeginTime:null})},changeGrid:function(e){var t=parseInt(e,10),s=this.players.length;if(t!==s){if(t>s)for(var i=0;i<t-s;i++)this.players.push({equipmentInfo:{cameraName:"",cameraId:"",app:"",id:"",isYuhang:null},videoUrl:"",isAutoPlay:!1,startMeddleTime:"",time:"",markTime:[],jessibucaSpeed:"1.0",selectType:2,endTimeMark:"",hlsSpeed:1,currentSegmentStartTime:null,currentSegmentBeginTime:null});else this.players.length=t;this.gridSize=t,this.activePlayerIndex>=t?this.setActivePlayer(0):this.setActivePlayer(this.activePlayerIndex)}},setActivePlayer:function(e){if(this.players[e]){this.cleanupTimeUpdater(this.activePlayerIndex),this.activePlayerIndex=e;var t=this.players[e];this.time=t.time,this.markTime=t.markTime,this.startMeddleTime?t.startMeddleTime=this.startMeddleTime:this.startMeddleTime=t.startMeddleTime,this.currentSegmentStartTime=t.currentSegmentStartTime,t.equipmentInfo.id?this.$refs.tree1.setCurrentKey(t.equipmentInfo.id):this.$refs.tree1.setCurrentKey(null),this.updateCalendarMarks(t.time),this.time&&this.$refs.calendar&&this.$refs.calendar.ChoseMonth(this.time),this.calendarKey++,this.attachTimeUpdater(e)}},handleGlobalPlay:function(){var e=this;if(this.isAutoPlay=!0,this.players.forEach((function(t,s){if(t.videoUrl){var i=e.$refs["videoBox"+s];i&&i[0]&&i[0].resumePlayback();var n=e.$refs["player"+s];n&&n[0]&&n[0].play()}})),this.isSyncMode){if(this.masterClockInterval&&clearInterval(this.masterClockInterval),!this.startMeddleTime)return void console.error("无法启动主时钟:startMeddleTime 为空");var t=new Date(this.startMeddleTime.replace(/-/g,"/"));this.checkAndSyncAllPlayers(this.startMeddleTime),this.masterClockInterval=setInterval((function(){t.setMilliseconds(t.getMilliseconds()+500);var s=Object(f["e"])(t);e.startMeddleTime=s,e.players.forEach((function(e){e.startMeddleTime=s})),e.checkAndSyncAllPlayers(s)}),500)}else this.$refs.time_line.play()},checkAndSyncAllPlayers:function(e){var t=this;this.players.forEach((function(s,i){if(s.equipmentInfo.id){var n=!!s.videoUrl;if(s.markTime&&0!==s.markTime.length){var r=t.findSegmentForTime(s.markTime,e);if(r)n||(console.log("SYNC: 玩家 ".concat(i," 在 ").concat(e," 进入录像范围,启动播放。")),s.currentSegmentBeginTime=r.beginTime,t.getPlayUrlForPlayer(s,i,e,r.endTime));else if(n){console.log("SYNC: 玩家 ".concat(i," 在 ").concat(e," 离开录像范围,停止播放。")),t.cleanupTimeUpdater(i),s.videoUrl="",s.currentSegmentStartTime=null,s.currentSegmentBeginTime=null;var a=t.$refs["videoBox"+i];a&&a[0]&&a[0].destroyPlayer();var o=t.$refs["player"+i];o&&o[0]&&o[0].destroy()}}}}))},handleGlobalPause:function(){var e=this;this.isAutoPlay=!1,this.$refs.time_line.stop(),this.masterClockInterval&&(clearInterval(this.masterClockInterval),this.masterClockInterval=null),this.players.forEach((function(t,s){if(t.videoUrl){var i=e.$refs["videoBox"+s];i&&i[0]&&i[0].pausePlayback();var n=e.$refs["player"+s];n&&n[0]&&n[0].pause()}}))},getPlayUrl:function(e,t,s){var i=this,n=this.players[this.activePlayerIndex],r=this.activePlayerIndex;Object(c["d"])({id:e,startTime:t,endTime:s,selectType:n.selectType}).then((function(e){"string"===typeof e.data&&e.data.startsWith("http")?(n.videoUrl=e.data,n.currentSegmentStartTime=i.currentSegmentStartTime=new Date(t),i.$nextTick((function(){var t=i.$refs["videoBox"+r];t&&t[0]&&t[0].play(e.data);var s=i.$refs["player"+r];s&&s[0]&&s[0].play(e.data)}))):i.$message.error("获取播放链接失败或链接无效")}))},getPlayUrlForPlayer:function(e,t,s,i){var n=this;this.cleanupTimeUpdater(t),Object(c["d"])({id:e.equipmentInfo.id,startTime:s,endTime:i,selectType:e.selectType}).then((function(i){"string"===typeof i.data&&i.data.startsWith("http")?(e.videoUrl=i.data,e.currentSegmentStartTime=new Date(s),n.$nextTick((function(){var s=null,r=n.$refs["videoBox"+t];r&&r[0]&&(s=r[0]);var a=n.$refs["player"+t];a&&a[0]&&(s=a[0]),s&&(s.play(i.data),n.isAutoPlay||(s.pausePlayback&&s.pausePlayback(),s.pause&&s.pause()),t===n.activePlayerIndex&&(n.currentSegmentStartTime=e.currentSegmentStartTime))}))):console.error("播放器 ".concat(t," 获取链接失败"))}))},handlePlayerReady:function(e){e===this.activePlayerIndex&&this.attachTimeUpdater(e)},attachTimeUpdater:function(e){var t=this;this.cleanupTimeUpdater(e);var s=this.$refs["videoBox"+e];if(s&&s[0]){var i=s[0].$refs.videoElement;i&&(this.timeUpdateListener=function(e){return t.handleTimeUpdate(e)},i.addEventListener("timeupdate",this.timeUpdateListener))}},cleanupTimeUpdater:function(e){if(this.timeUpdateListener){var t=this.$refs["videoBox"+e];if(t&&t[0]){var s=t[0].$refs.videoElement;s&&s.removeEventListener("timeupdate",this.timeUpdateListener)}this.timeUpdateListener=null}},handleTimeUpdate:function(e){if(!this.isSyncMode&&this.currentSegmentStartTime){var t=e.target.currentTime,s=new Date(this.currentSegmentStartTime.getTime()+1e3*t),i=Object(f["e"])(s);this.startMeddleTime=i,this.players[this.activePlayerIndex]&&(this.players[this.activePlayerIndex].startMeddleTime=i)}},playStatus:function(e,t,s){this.isSyncMode},getStreamOptions:function(){var e=this;Object(_["e"])({recordShow:"1"}).then((function(t){e.streamOptions=t.data.map((function(e){return Object(l["a"])(Object(l["a"])({},e),{},{isLeaf:!0,label:e.app,key:e.id})}))}))},filterNode:function(e,t){return!e||-1!==t.label.indexOf(e)},handleNodeClick:function(e){var t=this;return Object(d["a"])(Object(o["a"])().mark((function s(){var i,n,r;return Object(o["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(e.isLeaf){s.next=2;break}return s.abrupt("return");case 2:if(i=t.players[t.activePlayerIndex],t.cleanupTimeUpdater(t.activePlayerIndex),Object.assign(i,{equipmentInfo:e,selectType:2,currentSegmentBeginTime:null}),!(t.isSyncMode&&t.time&&t.startMeddleTime)){s.next=18;break}return console.log("[SYNC] 新设备 ".concat(e.label," 加入当前同步会话,目标时间: ").concat(t.startMeddleTime)),i.time=t.time,i.startMeddleTime=t.startMeddleTime,s.next=11,t.fetchMarkTimeForDate(e.id,t.time,i.selectType);case 11:n=s.sent,i.markTime=n,r=t.findSegmentForTime(n,t.startMeddleTime),r?(i.currentSegmentBeginTime=r.beginTime,t.getPlayUrlForPlayer(i,t.activePlayerIndex,t.startMeddleTime,r.endTime),t.$message.success("设备 [".concat(e.label,"] 已同步至当前播放进度"))):(i.videoUrl="",t.$message.info("设备 [".concat(e.label,"] 在当前播放时间点无录像"))),t.updateCalendarMarks(t.time),s.next=25;break;case 18:Object.assign(i,{videoUrl:"",time:"",markTime:[],startMeddleTime:""}),t.time="",t.markTime=[],t.startMeddleTime="",t.isAutoPlay=!1,t.updateCalendarMarks(),t.calendarKey++;case 25:case"end":return s.stop()}}),s)})))()},clickDay:function(e){var t=this;return Object(d["a"])(Object(o["a"])().mark((function s(){var i,n,r,a,d,l,u;return Object(o["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(i=Object(f["e"])(e).split(" ")[0],t.isSyncMode&&t.startMeddleTime||(t.time=i),!t.isSyncMode){s.next=16;break}if(n=t.players[t.activePlayerIndex],n.equipmentInfo.id){s.next=7;break}return t.$message.warning("请先选择设备"),s.abrupt("return");case 7:return n.time=i,t.$message.info("正在加载录像数据..."),s.next=11,t.fetchMarkTimeForDate(n.equipmentInfo.id,i,n.selectType);case 11:r=s.sent,n.markTime=t.markTime=r,t.startMeddleTime?(a=t.findSegmentForTime(r,t.startMeddleTime),a?(console.log("[Sync] 日历加载完成,新窗口追赶进度: ".concat(t.startMeddleTime)),n.currentSegmentBeginTime=a.beginTime,t.getPlayUrlForPlayer(n,t.activePlayerIndex,t.startMeddleTime,a.endTime)):t.$message.info("该设备在当前播放时刻 (".concat(t.startMeddleTime,") 无录像"))):r.length>0?(t.startMeddleTime=r[0].beginTime,t.clickTimeline(r[0].beginTime)):t.$message.info("该日期无录像"),s.next=29;break;case 16:if(t.isAutoPlay=!1,t.$refs.time_line.stop(),d=t.players[t.activePlayerIndex],d.equipmentInfo.id){s.next=22;break}return t.$message.warning("请先为当前窗口选择一个设备"),s.abrupt("return");case 22:return t.cleanupTimeUpdater(t.activePlayerIndex),d.time=t.time=i,s.next=26,t.fetchMarkTimeForDate(d.equipmentInfo.id,i,d.selectType);case 26:l=s.sent,d.markTime=t.markTime=l,l.length>0?(u=l[0],d.startMeddleTime=t.startMeddleTime=u.beginTime,d.currentSegmentBeginTime=u.beginTime,t.getPlayUrl(d.equipmentInfo.id,u.beginTime,u.endTime)):(d.markTime=t.markTime=[],d.videoUrl="",d.currentSegmentBeginTime=null,t.$message.info("当天没有录像记录"));case 29:case"end":return s.stop()}}),s)})))()},updateCalendarMarks:function(e){var t=this,s=this.players[this.activePlayerIndex];if(s&&s.equipmentInfo.id){var i;if(e&&"string"===typeof e&&e.length>0){var n=e.replace(/-/g,"/"),r=new Date(n);i=isNaN(r.getTime())?new Date:r}else i=new Date;var o=Object(f["e"])(new Date(i.getFullYear(),i.getMonth(),1)),d=Object(f["e"])(new Date(i.getFullYear(),i.getMonth()+1,0,23,59,59));Object(c["c"])({id:s.equipmentInfo.id,startTime:o,endTime:d,selectType:s.selectType}).then((function(e){t.markDay=e.data?Object(a["a"])(new Set(e.data.map((function(e){return Object(f["f"])(e.Start)})))):[]}))}else this.markDay=[]},changeMonth:function(e){this.updateCalendarMarks(e),this.time=""},clickDownItem:function(e){var t=this.players[this.activePlayerIndex];t.selectType=Number(e),t.time&&this.clickDay(t.time),this.updateCalendarMarks()},findSegmentForTime:function(e,t){var s=new Date(t).getTime();return e.find((function(e){var t=new Date(e.beginTime).getTime(),i=new Date(e.endTime).getTime();return s>=t&&s<=i}))},clickTimeline:function(e){var t=this;if(this.isAutoPlay=!1,this.$refs.time_line.stop(),this.startMeddleTime=e,this.players[this.activePlayerIndex]&&(this.players[this.activePlayerIndex].startMeddleTime=e),this.isSyncMode){this.handleGlobalPause();var s=!1;this.players.forEach((function(i,n){if(i.equipmentInfo.id&&i.markTime.length>0){var r=t.findSegmentForTime(i.markTime,e);if(r)s=!0,i.currentSegmentBeginTime=r.beginTime,t.getPlayUrlForPlayer(i,n,e,r.endTime);else{var a=t.$refs["videoBox"+n];a&&a[0]&&a[0].destroyPlayer();var o=t.$refs["player"+n];o&&o[0]&&o[0].destroy(),i.videoUrl="",i.currentSegmentBeginTime=null}}})),!s&&this.players.some((function(e){return e.equipmentInfo.id}))&&this.$message.info("所有窗口在您点击的区域都没有录像")}else{var i=this.players[this.activePlayerIndex];if(!i||!i.equipmentInfo.id)return;var n=this.findSegmentForTime(this.markTime,e);n?(this.cleanupTimeUpdater(this.activePlayerIndex),i.startMeddleTime=this.startMeddleTime=e,i.currentSegmentBeginTime=n.beginTime,this.getPlayUrl(i.equipmentInfo.id,e,n.endTime)):this.$message.info("您点击的区域没有录像")}},changeTimeline:function(e){this.startMeddleTime=e,this.players[this.activePlayerIndex]&&(this.players[this.activePlayerIndex].startMeddleTime=e),this.players.forEach((function(t){t.startMeddleTime=e}))},openDownloadDialog:function(){var e=this.players[this.activePlayerIndex];if(e.equipmentInfo.id)if(this.time&&0!==this.markTime.length){var t=this.markTime[0];t&&(this.downloadDateTimeRange=[t.beginTime,t.endTime]),this.downloadDialogVisible=!0}else this.$modal.msgWarning("请先选择一个有录像记录的日期!");else this.$modal.msgWarning("请先在一个窗口中选择设备!")},handleSegmentClick:function(e){this.downloadDateTimeRange=[e.beginTime,e.endTime]},handleDownloadConfirm:function(){var e=this;if(this.downloadDateTimeRange&&2===this.downloadDateTimeRange.length){var t=this.players[this.activePlayerIndex],s=Object(r["a"])(this.downloadDateTimeRange,2),i=s[0],n=s[1],a=(new Date(n).getTime()-new Date(i).getTime())/6e4;a>120?this.$modal.msgWarning("时长大于2小时,请重新选择!"):a<1?this.$modal.msgWarning("时长低于1分钟,请重新选择!"):(this.$modal.msgSuccess("下载任务已建立,请不要关闭当前页面。"),Object(c["a"])({id:t.equipmentInfo.id,startTime:i,endTime:n,selectType:t.selectType,format:this.downloadFormat}).then((function(s){var r=document.createElement("a");r.href=s.data;var a="".concat(t.equipmentInfo.label,"_").concat(i.replace(/ /g,"_").replace(/:/g,"-"),"_").concat(n.replace(/ /g,"_").replace(/:/g,"-"),".").concat(e.downloadFormat);r.download=a,document.body.appendChild(r),r.click(),r.remove(),window.URL.revokeObjectURL(r.href)})).catch((function(t){e.$modal.msgError("下载失败,请检查后端服务。")})),this.downloadDialogVisible=!1)}else this.$modal.msgWarning("请选择一个完整的时间范围!")},calculateDuration:function(e,t){var s=new Date(t).getTime()-new Date(e).getTime();if(isNaN(s)||s<0)return"N/A";var i=Math.floor(s/36e5),n=Math.floor(s%36e5/6e4),r=Math.round(s%6e4/1e3);return[i>0?"".concat(i," 小时"):"",n>0?"".concat(n," 分"):"","".concat(r," 秒")].filter(Boolean).join(" ")},fetchQuickPlayParam:function(){var e=this;Object(c["b"])().then((function(t){200===t.code&&"number"===typeof t.data?e.quickPlayParam=t.data:e.$message.error("获取快速回放参数失败!")})).catch((function(){e.$message.error("获取快速回放参数的网络请求失败!")}))},handleQuickReplay:function(){var e=this;null!==this.quickPlayParam?(this.$message.info("正在为所有已选设备的窗口执行 ".concat(this.quickPlayParam," 分钟快速回放...")),this.players.forEach((function(t,s){t.equipmentInfo.id&&e.performReplayForPlayer(t,s)}))):this.$message.error("未能获取快速回放参数,无法执行操作!")},performReplayForPlayer:function(e,t){var s=this;return Object(d["a"])(Object(o["a"])().mark((function i(){var n,r,a,d,l,u,h,m,_,g,p,y,L;return Object(o["a"])().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.prev=0,n=new Date,r=s.quickPlayParam,a=new Date(n.getTime()-60*r*1e3),d=Object(f["e"])(a),l=Object(f["e"])(a).split(" ")[0]+" 00:00:00",i.next=8,Object(c["c"])({id:e.equipmentInfo.id,startTime:l,endTime:d,selectType:e.selectType});case 8:if(u=i.sent,!(u.data&&u.data.length>0)){i.next=16;break}m=u.data[u.data.length-1],_=new Date(m.Start),g=new Date(m.End),a>=_&&a<g?h=d:(p=new Date(g.getTime()-60*r*1e3),h=Object(f["e"])(p>_?p:_)),i.next=18;break;case 16:return s.$message.warning("通道 [".concat(e.equipmentInfo.label,"] 在指定回溯时间内没有找到录像。")),i.abrupt("return");case 18:if(y=Object(f["e"])(new Date(new Date(h).getTime()+18e5)),e.time=h.split(" ")[0],e.startMeddleTime=h,t!==s.activePlayerIndex&&s.time){i.next=26;break}return s.setActivePlayer(t),i.next=25,s.fetchMarkTimeForDate(e.equipmentInfo.id,e.time,e.selectType);case 25:s.markTime=i.sent;case 26:L=s.findSegmentForTime(s.markTime,h),L&&(e.currentSegmentBeginTime=L.beginTime),s.getPlayUrl(e.equipmentInfo.id,h,y),i.next=34;break;case 31:i.prev=31,i.t0=i["catch"](0),s.$message.error("通道 [".concat(e.equipmentInfo.label,"] 执行回放失败。"));case 34:case"end":return i.stop()}}),i,null,[[0,31]])})))()},fetchMarkTimeForDate:function(e,t,s){var i=this;return Object(d["a"])(Object(o["a"])().mark((function n(){var r,a,d;return Object(o["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,r=t+" 00:00:00",a=t+" 23:59:59",n.next=5,Object(c["c"])({id:e,startTime:r,endTime:a,selectType:s});case 5:return d=n.sent,n.abrupt("return",d.data&&d.data.length>0?d.data.map((function(e){return{beginTime:e.Start,endTime:e.End,bgColor:"#ffc05e",text:""}})):[]);case 9:return n.prev=9,n.t0=n["catch"](0),i.$message.error("获取指定日期的录像列表失败。"),n.abrupt("return",[]);case 13:case"end":return n.stop()}}),n,null,[[0,9]])})))()},setIsAutoPlay:function(e,t){this.isSyncMode||e===this.activePlayerIndex&&(this.isAutoPlay=t,t?this.$refs.time_line.play():this.$refs.time_line.stop())},playbackCompleted:function(e){if(this.isSyncMode){var t=this.players[e];if(t){t.videoUrl="",t.currentSegmentStartTime=null,t.currentSegmentBeginTime=null;var s=this.$refs["videoBox"+e];s&&s[0]&&s[0].destroyPlayer();var i=this.$refs["player"+e];i&&i[0]&&i[0].destroy()}}else{if(e!==this.activePlayerIndex)return;var n=this.players[this.activePlayerIndex];if(!n.currentSegmentBeginTime)return void this.$message.info("播放结束");var r=n.markTime.findIndex((function(e){return e.beginTime===n.currentSegmentBeginTime}));if(r>-1&&r<n.markTime.length-1){var a=n.markTime[r+1];this.$message.success("当前片段播放完毕, 自动播放下一段"),this.clickTimeline(a.beginTime)}else this.$message.info("已是当天的最后一段录像"),n.currentSegmentBeginTime=null}},handleChangeSpeed:function(e){var t=this,s=this.players[this.activePlayerIndex];if(s.equipmentInfo.id&&this.startMeddleTime){var i={4:2,5:.5,6:1};Object(c["e"])({id:s.equipmentInfo.id,startTime:this.startMeddleTime,type:e}).then((function(){s.jessibucaSpeed=i[e].toFixed(1),t.$message.success("倍速成功")}))}},handleHlsSpeedChange:function(e){var t=parseFloat(e),s=this.players[this.activePlayerIndex];if(s){s.hlsSpeed=t;var i=this.$refs["videoBox"+this.activePlayerIndex];if(i&&i[0]){var n=i[0].$refs.videoElement;n&&(n.playbackRate=t)}}}},beforeDestroy:function(){var e=this;this.players.forEach((function(t,s){e.cleanupTimeUpdater(s)}))}},L=y,M=(s("1d87"),s("cf2f"),s("2877")),T=Object(M["a"])(L,i,n,!1,null,"18f510b0",null);t["default"]=T.exports},"7be6":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),s="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function i(e){return e>1&&e<5}function n(e,t,s,n){var r=e+" ";switch(s){case"s":return t||n?"pár sekúnd":"pár sekundami";case"ss":return t||n?r+(i(e)?"sekundy":"sekúnd"):r+"sekundami";case"m":return t?"minúta":n?"minútu":"minútou";case"mm":return t||n?r+(i(e)?"minúty":"minút"):r+"minútami";case"h":return t?"hodina":n?"hodinu":"hodinou";case"hh":return t||n?r+(i(e)?"hodiny":"hodín"):r+"hodinami";case"d":return t||n?"deň":"dňom";case"dd":return t||n?r+(i(e)?"dni":"dní"):r+"dňami";case"M":return t||n?"mesiac":"mesiacom";case"MM":return t||n?r+(i(e)?"mesiace":"mesiacov"):r+"mesiacmi";case"y":return t||n?"rok":"rokom";case"yy":return t||n?r+(i(e)?"roky":"rokov"):r+"rokmi"}}var r=e.defineLocale("sk",{months:t,monthsShort:s,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return r}))},"7f33":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}});return t}))},8155:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){var n=e+" ";switch(s){case"s":return t||i?"nekaj sekund":"nekaj sekundami";case"ss":return n+=1===e?t?"sekundo":"sekundi":2===e?t||i?"sekundi":"sekundah":e<5?t||i?"sekunde":"sekundah":"sekund",n;case"m":return t?"ena minuta":"eno minuto";case"mm":return n+=1===e?t?"minuta":"minuto":2===e?t||i?"minuti":"minutama":e<5?t||i?"minute":"minutami":t||i?"minut":"minutami",n;case"h":return t?"ena ura":"eno uro";case"hh":return n+=1===e?t?"ura":"uro":2===e?t||i?"uri":"urama":e<5?t||i?"ure":"urami":t||i?"ur":"urami",n;case"d":return t||i?"en dan":"enim dnem";case"dd":return n+=1===e?t||i?"dan":"dnem":2===e?t||i?"dni":"dnevoma":t||i?"dni":"dnevi",n;case"M":return t||i?"en mesec":"enim mesecem";case"MM":return n+=1===e?t||i?"mesec":"mesecem":2===e?t||i?"meseca":"mesecema":e<5?t||i?"mesece":"meseci":t||i?"mesecev":"meseci",n;case"y":return t||i?"eno leto":"enim letom";case"yy":return n+=1===e?t||i?"leto":"letom":2===e?t||i?"leti":"letoma":e<5?t||i?"leta":"leti":t||i?"let":"leti",n}}var s=e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return s}))},"81e9":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),s=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function i(e,t,s,i){var r="";switch(s){case"s":return i?"muutaman sekunnin":"muutama sekunti";case"ss":r=i?"sekunnin":"sekuntia";break;case"m":return i?"minuutin":"minuutti";case"mm":r=i?"minuutin":"minuuttia";break;case"h":return i?"tunnin":"tunti";case"hh":r=i?"tunnin":"tuntia";break;case"d":return i?"päivän":"päivä";case"dd":r=i?"päivän":"päivää";break;case"M":return i?"kuukauden":"kuukausi";case"MM":r=i?"kuukauden":"kuukautta";break;case"y":return i?"vuoden":"vuosi";case"yy":r=i?"vuoden":"vuotta";break}return r=n(e,i)+" "+r,r}function n(e,i){return e<10?i?s[e]:t[e]:e}var r=e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return r}))},8230:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},s={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},i=e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,s){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return s[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}});return i}))},"84aa":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,s=e%100;return 0===e?e+"-ев":0===s?e+"-ен":s>10&&s<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t}))},8689:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},s={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},i=e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}});return i}))},8840:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"898b":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),s="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],n=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,r=e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?s[e.month()]:t[e.month()]:t},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"});return r}))},"8a79":function(e,t,s){"use strict";var i=s("23e7"),n=s("e330"),r=s("06cf").f,a=s("50c4"),o=s("577e"),d=s("5a34"),l=s("1d80"),u=s("ab13"),h=s("c430"),c=n("".endsWith),m=n("".slice),f=Math.min,_=u("endsWith"),g=!h&&!_&&!!function(){var e=r(String.prototype,"endsWith");return e&&!e.writable}();i({target:"String",proto:!0,forced:!g&&!_},{endsWith:function(e){var t=o(l(this));d(e);var s=arguments.length>1?arguments[1]:void 0,i=t.length,n=void 0===s?i:f(a(s),i),r=o(e);return c?c(t,r,n):m(t,n-r.length,n)===r}})},"8d47":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}var s=e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"===typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,s){return e>11?s?"μμ":"ΜΜ":s?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,s){var i=this._calendarEl[e],n=s&&s.hours();return t(i)&&(i=i.apply(s)),i.replace("{}",n%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}});return s}))},"8d57":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),s="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),i=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function n(e){return e%10<5&&e%10>1&&~~(e/10)%10!==1}function r(e,t,s){var i=e+" ";switch(s){case"ss":return i+(n(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return i+(n(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return i+(n(e)?"godziny":"godzin");case"ww":return i+(n(e)?"tygodnie":"tygodni");case"MM":return i+(n(e)?"miesiące":"miesięcy");case"yy":return i+(n(e)?"lata":"lat")}}var a=e.defineLocale("pl",{months:function(e,i){return e?/D MMMM/.test(i)?s[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:r,m:r,mm:r,h:r,hh:r,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:r,M:"miesiąc",MM:r,y:"rok",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}))},"8df48":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},s={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},i=e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,s){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return s[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}});return i}))},"8e73":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},s={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},i=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(t,s,r,a){var o=i(t),d=n[e][i(t)];return 2===o&&(d=d[s?0:1]),d.replace(/%d/i,t)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],o=e.defineLocale("ar",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,s){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return s[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return o}))},9043:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},s={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},i=e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,s){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}});return i}))},"90ea":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,s){var i=100*e+t;return i<600?"凌晨":i<900?"早上":i<1130?"上午":i<1230?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},"957c":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t){var s=e.split("_");return t%10===1&&t%100!==11?s[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?s[1]:s[2]}function s(e,s,i){var n={ss:s?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:s?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===i?s?"минута":"минуту":e+" "+t(n[i],+e)}var i=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],n=e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:s,m:s,mm:s,h:"час",hh:s,d:"день",dd:s,w:"неделя",ww:s,M:"месяц",MM:s,y:"год",yy:s},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,s){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}});return n}))},"958b":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){switch(s){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}var s=e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,s){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}});return s}))},9609:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"},s=e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var s=e%10,i=e>=100?100:null;return e+(t[e]||t[s]||t[i])},week:{dow:1,doy:7}});return s}))},9686:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},s={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},i=e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t?e<4?e:e+12:"ভোর"===t||"সকাল"===t?e:"দুপুর"===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,s){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}});return i}))},"972c":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s){var i={ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"},n=" ";return(e%100>=20||e>=100&&e%100===0)&&(n=" de "),e+n+i[s]}var s=e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}});return s}))},9797:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,s="",i=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return t>20?s=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(s=i[t]),e+s},week:{dow:1,doy:4}});return t}))},"97a0":function(e,t,s){"use strict";s.d(t,"a",(function(){return n})),s.d(t,"b",(function(){return r})),s.d(t,"f",(function(){return a})),s.d(t,"c",(function(){return o})),s.d(t,"d",(function(){return d})),s.d(t,"e",(function(){return l}));var i=s("b775");s("ed08");function n(e){return Object(i["a"])({url:"/sis/sisStreamProxy",method:"post",data:e})}function r(e){return Object(i["a"])({url:"/sis/sisStreamProxy/"+e,method:"delete"})}function a(e){return Object(i["a"])({url:"/sis/sisStreamProxy",method:"put",data:e})}function o(e){return Object(i["a"])({url:"/sis/sisStreamProxy/selectSisStreamProxyListByPage",method:"get",params:e})}function d(e){return Object(i["a"])({url:"/sis/sisStreamProxy/sisStreamProxy/selectEquId",method:"post",data:e})}function l(e){return Object(i["a"])({url:"/sis/sisStreamProxy/selectStreamProxyItem",method:"post",params:e})}},"9f26":function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,s=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,i=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],r=e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:t,monthsShortStrictRegex:s,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return r}))},a0f3:function(e,t,s){"use strict";s("f3d9")},a356:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},s={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(i,n,r,a){var o=t(i),d=s[e][t(i)];return 2===o&&(d=d[n?0:1]),d.replace(/%d/i,i)}},n=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],r=e.defineLocale("ar-dz",{months:n,monthsShort:n,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,s){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}});return r}))},a567:function(e,t,s){"use strict";function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}s.d(t,"a",(function(){return wd}));var n={exports:{}};(function(e,t){(function(t){var s=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,s){if(s=s||{},e=e.trim(),t=t.trim(),!t){if(!s.alwaysNormalize)return e;var n=a.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=a.normalizePath(n.path),a.buildURLFromParts(n)}var r=a.parseURL(t);if(!r)throw new Error("Error trying to parse relative URL.");if(r.scheme)return s.alwaysNormalize?(r.path=a.normalizePath(r.path),a.buildURLFromParts(r)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var d=i.exec(o.path);o.netLoc=d[1],o.path=d[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:r.netLoc,path:null,params:r.params,query:r.query,fragment:r.fragment};if(!r.netLoc&&(l.netLoc=o.netLoc,"/"!==r.path[0]))if(r.path){var u=o.path,h=u.substring(0,u.lastIndexOf("/")+1)+r.path;l.path=a.normalizePath(h)}else l.path=o.path,r.params||(l.params=o.params,r.query||(l.query=o.query));return null===l.path&&(l.path=s.alwaysNormalize?a.normalizePath(r.path):r.path),a.buildURLFromParts(l)},parseURL:function(e){var t=s.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){e=e.split("").reverse().join("").replace(n,"");while(e.length!==(e=e.replace(r,"")).length);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=a})()})(n);var r=n.exports;function a(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function o(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?a(Object(s),!0).forEach((function(t){u(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):a(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}function d(e,t){if("object"!=typeof e||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var i=s.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function l(e){var t=d(e,"string");return"symbol"==typeof t?t:String(t)}function u(e,t,s){return t=l(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},h.apply(this,arguments)}const c=Number.isFinite||function(e){return"number"===typeof e&&isFinite(e)},m=Number.isSafeInteger||function(e){return"number"===typeof e&&Math.abs(e)<=f},f=Number.MAX_SAFE_INTEGER||9007199254740991;let _=function(e){return e["MEDIA_ATTACHING"]="hlsMediaAttaching",e["MEDIA_ATTACHED"]="hlsMediaAttached",e["MEDIA_DETACHING"]="hlsMediaDetaching",e["MEDIA_DETACHED"]="hlsMediaDetached",e["BUFFER_RESET"]="hlsBufferReset",e["BUFFER_CODECS"]="hlsBufferCodecs",e["BUFFER_CREATED"]="hlsBufferCreated",e["BUFFER_APPENDING"]="hlsBufferAppending",e["BUFFER_APPENDED"]="hlsBufferAppended",e["BUFFER_EOS"]="hlsBufferEos",e["BUFFER_FLUSHING"]="hlsBufferFlushing",e["BUFFER_FLUSHED"]="hlsBufferFlushed",e["MANIFEST_LOADING"]="hlsManifestLoading",e["MANIFEST_LOADED"]="hlsManifestLoaded",e["MANIFEST_PARSED"]="hlsManifestParsed",e["LEVEL_SWITCHING"]="hlsLevelSwitching",e["LEVEL_SWITCHED"]="hlsLevelSwitched",e["LEVEL_LOADING"]="hlsLevelLoading",e["LEVEL_LOADED"]="hlsLevelLoaded",e["LEVEL_UPDATED"]="hlsLevelUpdated",e["LEVEL_PTS_UPDATED"]="hlsLevelPtsUpdated",e["LEVELS_UPDATED"]="hlsLevelsUpdated",e["AUDIO_TRACKS_UPDATED"]="hlsAudioTracksUpdated",e["AUDIO_TRACK_SWITCHING"]="hlsAudioTrackSwitching",e["AUDIO_TRACK_SWITCHED"]="hlsAudioTrackSwitched",e["AUDIO_TRACK_LOADING"]="hlsAudioTrackLoading",e["AUDIO_TRACK_LOADED"]="hlsAudioTrackLoaded",e["SUBTITLE_TRACKS_UPDATED"]="hlsSubtitleTracksUpdated",e["SUBTITLE_TRACKS_CLEARED"]="hlsSubtitleTracksCleared",e["SUBTITLE_TRACK_SWITCH"]="hlsSubtitleTrackSwitch",e["SUBTITLE_TRACK_LOADING"]="hlsSubtitleTrackLoading",e["SUBTITLE_TRACK_LOADED"]="hlsSubtitleTrackLoaded",e["SUBTITLE_FRAG_PROCESSED"]="hlsSubtitleFragProcessed",e["CUES_PARSED"]="hlsCuesParsed",e["NON_NATIVE_TEXT_TRACKS_FOUND"]="hlsNonNativeTextTracksFound",e["INIT_PTS_FOUND"]="hlsInitPtsFound",e["FRAG_LOADING"]="hlsFragLoading",e["FRAG_LOAD_EMERGENCY_ABORTED"]="hlsFragLoadEmergencyAborted",e["FRAG_LOADED"]="hlsFragLoaded",e["FRAG_DECRYPTED"]="hlsFragDecrypted",e["FRAG_PARSING_INIT_SEGMENT"]="hlsFragParsingInitSegment",e["FRAG_PARSING_USERDATA"]="hlsFragParsingUserdata",e["FRAG_PARSING_METADATA"]="hlsFragParsingMetadata",e["FRAG_PARSED"]="hlsFragParsed",e["FRAG_BUFFERED"]="hlsFragBuffered",e["FRAG_CHANGED"]="hlsFragChanged",e["FPS_DROP"]="hlsFpsDrop",e["FPS_DROP_LEVEL_CAPPING"]="hlsFpsDropLevelCapping",e["MAX_AUTO_LEVEL_UPDATED"]="hlsMaxAutoLevelUpdated",e["ERROR"]="hlsError",e["DESTROYING"]="hlsDestroying",e["KEY_LOADING"]="hlsKeyLoading",e["KEY_LOADED"]="hlsKeyLoaded",e["LIVE_BACK_BUFFER_REACHED"]="hlsLiveBackBufferReached",e["BACK_BUFFER_REACHED"]="hlsBackBufferReached",e["STEERING_MANIFEST_LOADED"]="hlsSteeringManifestLoaded",e}({}),g=function(e){return e["NETWORK_ERROR"]="networkError",e["MEDIA_ERROR"]="mediaError",e["KEY_SYSTEM_ERROR"]="keySystemError",e["MUX_ERROR"]="muxError",e["OTHER_ERROR"]="otherError",e}({}),p=function(e){return e["KEY_SYSTEM_NO_KEYS"]="keySystemNoKeys",e["KEY_SYSTEM_NO_ACCESS"]="keySystemNoAccess",e["KEY_SYSTEM_NO_SESSION"]="keySystemNoSession",e["KEY_SYSTEM_NO_CONFIGURED_LICENSE"]="keySystemNoConfiguredLicense",e["KEY_SYSTEM_LICENSE_REQUEST_FAILED"]="keySystemLicenseRequestFailed",e["KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED"]="keySystemServerCertificateRequestFailed",e["KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED"]="keySystemServerCertificateUpdateFailed",e["KEY_SYSTEM_SESSION_UPDATE_FAILED"]="keySystemSessionUpdateFailed",e["KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED"]="keySystemStatusOutputRestricted",e["KEY_SYSTEM_STATUS_INTERNAL_ERROR"]="keySystemStatusInternalError",e["MANIFEST_LOAD_ERROR"]="manifestLoadError",e["MANIFEST_LOAD_TIMEOUT"]="manifestLoadTimeOut",e["MANIFEST_PARSING_ERROR"]="manifestParsingError",e["MANIFEST_INCOMPATIBLE_CODECS_ERROR"]="manifestIncompatibleCodecsError",e["LEVEL_EMPTY_ERROR"]="levelEmptyError",e["LEVEL_LOAD_ERROR"]="levelLoadError",e["LEVEL_LOAD_TIMEOUT"]="levelLoadTimeOut",e["LEVEL_PARSING_ERROR"]="levelParsingError",e["LEVEL_SWITCH_ERROR"]="levelSwitchError",e["AUDIO_TRACK_LOAD_ERROR"]="audioTrackLoadError",e["AUDIO_TRACK_LOAD_TIMEOUT"]="audioTrackLoadTimeOut",e["SUBTITLE_LOAD_ERROR"]="subtitleTrackLoadError",e["SUBTITLE_TRACK_LOAD_TIMEOUT"]="subtitleTrackLoadTimeOut",e["FRAG_LOAD_ERROR"]="fragLoadError",e["FRAG_LOAD_TIMEOUT"]="fragLoadTimeOut",e["FRAG_DECRYPT_ERROR"]="fragDecryptError",e["FRAG_PARSING_ERROR"]="fragParsingError",e["FRAG_GAP"]="fragGap",e["REMUX_ALLOC_ERROR"]="remuxAllocError",e["KEY_LOAD_ERROR"]="keyLoadError",e["KEY_LOAD_TIMEOUT"]="keyLoadTimeOut",e["BUFFER_ADD_CODEC_ERROR"]="bufferAddCodecError",e["BUFFER_INCOMPATIBLE_CODECS_ERROR"]="bufferIncompatibleCodecsError",e["BUFFER_APPEND_ERROR"]="bufferAppendError",e["BUFFER_APPENDING_ERROR"]="bufferAppendingError",e["BUFFER_STALLED_ERROR"]="bufferStalledError",e["BUFFER_FULL_ERROR"]="bufferFullError",e["BUFFER_SEEK_OVER_HOLE"]="bufferSeekOverHole",e["BUFFER_NUDGE_ON_STALL"]="bufferNudgeOnStall",e["INTERNAL_EXCEPTION"]="internalException",e["INTERNAL_ABORTED"]="aborted",e["UNKNOWN"]="unknown",e}({});const y=function(){},L={trace:y,debug:y,log:y,warn:y,info:y,error:y};let M=L;function T(e){const t=self.console[e];return t?t.bind(self.console,`[${e}] >`):y}function v(e,...t){t.forEach((function(t){M[t]=e[t]?e[t].bind(e):T(t)}))}function D(e,t){if("object"===typeof console&&!0===e||"object"===typeof e){v(e,"debug","log","info","warn","error");try{M.log(`Debug logs enabled for "${t}" in hls.js version 1.5.11`)}catch(s){M=L}}else M=L}const k=M,S=/^(\d+)x(\d+)$/,w=/(.+?)=(".*?"|.*?)(?:,|$)/g;class b{constructor(e){"string"===typeof e&&(e=b.parseAttrList(e)),h(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>"X-"===e.substring(0,2))}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;const s=new Uint8Array(t.length/2);for(let e=0;e<t.length/2;e++)s[e]=parseInt(t.slice(2*e,2*e+2),16);return s}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const s=this[e];return s?parseFloat(s):t}enumeratedString(e){return this[e]}bool(e){return"YES"===this[e]}decimalResolution(e){const t=S.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const s={},i='"';w.lastIndex=0;while(null!==(t=w.exec(e))){let e=t[2];0===e.indexOf(i)&&e.lastIndexOf(i)===e.length-1&&(e=e.slice(1,-1));const n=t[1].trim();s[n]=e}return s}}function E(e){return"ID"!==e&&"CLASS"!==e&&"START-DATE"!==e&&"DURATION"!==e&&"END-DATE"!==e&&"END-ON-NEXT"!==e}function Y(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}class A{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const s=t.attr;for(const t in s)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==s[t]){k.warn(`DATERANGE tag attribute: "${t}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=t;break}e=h(new b({}),s,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const e=new Date(this.attr["END-DATE"]);c(e.getTime())&&(this._endDate=e)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(c(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&c(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class R{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var x={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class I{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[x.AUDIO]:null,[x.VIDEO]:null,[x.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,t){const s=e.split("@",2);let i;i=1===s.length?(null==t?void 0:t.byteRangeEndOffset)||0:parseInt(s[1]),this._byteRange=[i,parseInt(s[0])+i]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=r.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class P extends I{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new R,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{const e=Object.keys(this.levelkeys);if(1===e.length)return this._decryptdata=this.levelkeys[e[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(null===this.programDateTime)return null;if(!c(this.programDateTime))return null;const e=c(this.duration)?this.duration:0;return this.programDateTime+1e3*e}get encrypted(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){const e=Object.keys(this.levelkeys),t=e.length;if(t>1||1===t&&this.levelkeys[e[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()}setElementaryStreamInfo(e,t,s,i,n,r=!1){const{elementaryStreams:a}=this,o=a[e];o?(o.startPTS=Math.min(o.startPTS,t),o.endPTS=Math.max(o.endPTS,s),o.startDTS=Math.min(o.startDTS,i),o.endDTS=Math.max(o.endDTS,n)):a[e]={startPTS:t,endPTS:s,startDTS:i,endDTS:n,partial:r}}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[x.AUDIO]=null,e[x.VIDEO]=null,e[x.AUDIOVIDEO]=null}}class O extends I{constructor(e,t,s,i,n){super(s),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new R,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=i;const r=e.enumeratedString("BYTERANGE");r&&this.setByteRange(r,n),n&&(this.fragOffset=n.fragOffset+n.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}const C=10;class F{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e)return this.advanced=!0,void(this.updated=!0);const t=this.lastPartSn-e.lastPartSn,s=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!s||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&s>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return!!this.fragments.length&&c(this.fragments[this.fragments.length-1].programDateTime)}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||C}get drift(){const e=this.driftEndTime-this.driftStartTime;if(e>0){const t=this.driftEnd-this.driftStart;return 1e3*t/e}return 1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function H(e){return Uint8Array.from(atob(e),e=>e.charCodeAt(0))}function N(e){const t=B(e).subarray(0,16),s=new Uint8Array(16);return s.set(t,16-t.length),s}function j(e){const t=function(e,t,s){const i=e[t];e[t]=e[s],e[s]=i};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}function U(e){const t=e.split(":");let s=null;if("data"===t[0]&&2===t.length){const e=t[1].split(";"),i=e[e.length-1].split(",");if(2===i.length){const t="base64"===i[0],n=i[1];t?(e.splice(-1,1),s=H(n)):s=N(n)}}return s}function B(e){return Uint8Array.from(unescape(encodeURIComponent(e)),e=>e.charCodeAt(0))}const $="undefined"!==typeof self?self:void 0;var W={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},G={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function K(e){switch(e){case G.FAIRPLAY:return W.FAIRPLAY;case G.PLAYREADY:return W.PLAYREADY;case G.WIDEVINE:return W.WIDEVINE;case G.CLEARKEY:return W.CLEARKEY}}var V={WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function z(e){if(e===V.WIDEVINE)return W.WIDEVINE}function q(e){switch(e){case W.FAIRPLAY:return G.FAIRPLAY;case W.PLAYREADY:return G.PLAYREADY;case W.WIDEVINE:return G.WIDEVINE;case W.CLEARKEY:return G.CLEARKEY}}function J(e){const{drmSystems:t,widevineLicenseUrl:s}=e,i=t?[W.FAIRPLAY,W.WIDEVINE,W.PLAYREADY,W.CLEARKEY].filter(e=>!!t[e]):[];return!i[W.WIDEVINE]&&s&&i.push(W.WIDEVINE),i}const X=function(e){return null!=$&&null!=(e=$.navigator)&&e.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Q(e,t,s,i){let n;switch(e){case W.FAIRPLAY:n=["cenc","sinf"];break;case W.WIDEVINE:case W.PLAYREADY:n=["cenc"];break;case W.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+e)}return Z(n,t,s,i)}function Z(e,t,s,i){const n={initDataTypes:e,persistentState:i.persistentState||"optional",distinctiveIdentifier:i.distinctiveIdentifier||"optional",sessionTypes:i.sessionTypes||[i.sessionType||"temporary"],audioCapabilities:t.map(e=>({contentType:`audio/mp4; codecs="${e}"`,robustness:i.audioRobustness||"",encryptionScheme:i.audioEncryptionScheme||null})),videoCapabilities:s.map(e=>({contentType:`video/mp4; codecs="${e}"`,robustness:i.videoRobustness||"",encryptionScheme:i.videoEncryptionScheme||null}))};return[n]}function ee(e,t,s){return Uint8Array.prototype.slice?e.slice(t,s):new Uint8Array(Array.prototype.slice.call(e,t,s))}const te=(e,t)=>t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,se=(e,t)=>t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,ie=(e,t)=>{const s=t;let i=0;while(te(e,t)){i+=10;const s=ne(e,t+6);i+=s,se(e,t+10)&&(i+=10),t+=i}if(i>0)return e.subarray(s,s+i)},ne=(e,t)=>{let s=0;return s=(127&e[t])<<21,s|=(127&e[t+1])<<14,s|=(127&e[t+2])<<7,s|=127&e[t+3],s},re=(e,t)=>te(e,t)&&ne(e,t+6)+10<=e.length-t,ae=e=>{const t=le(e);for(let s=0;s<t.length;s++){const e=t[s];if(oe(e))return fe(e)}},oe=e=>e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info,de=e=>{const t=String.fromCharCode(e[0],e[1],e[2],e[3]),s=ne(e,4),i=10;return{type:t,size:s,data:e.subarray(i,i+s)}},le=e=>{let t=0;const s=[];while(te(e,t)){const i=ne(e,t+6);t+=10;const n=t+i;while(t+8<n){const i=de(e.subarray(t)),n=ue(i);n&&s.push(n),t+=i.size+10}se(e,t)&&(t+=10)}return s},ue=e=>"PRIV"===e.type?he(e):"W"===e.type[0]?me(e):ce(e),he=e=>{if(e.size<2)return;const t=_e(e.data,!0),s=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:s.buffer}},ce=e=>{if(e.size<2)return;if("TXXX"===e.type){let t=1;const s=_e(e.data.subarray(t),!0);t+=s.length+1;const i=_e(e.data.subarray(t));return{key:e.type,info:s,data:i}}const t=_e(e.data.subarray(1));return{key:e.type,data:t}},me=e=>{if("WXXX"===e.type){if(e.size<2)return;let t=1;const s=_e(e.data.subarray(t),!0);t+=s.length+1;const i=_e(e.data.subarray(t));return{key:e.type,info:s,data:i}}const t=_e(e.data);return{key:e.type,data:t}},fe=e=>{if(8===e.data.byteLength){const t=new Uint8Array(e.data),s=1&t[3];let i=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return i/=45,s&&(i+=47721858.84),Math.round(i)}},_e=(e,t=!1)=>{const s=pe();if(s){const i=s.decode(e);if(t){const e=i.indexOf("\0");return-1!==e?i.substring(0,e):i}return i.replace(/\0/g,"")}const i=e.length;let n,r,a,o="",d=0;while(d<i){if(n=e[d++],0===n&&t)return o;if(0!==n&&3!==n)switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(n);break;case 12:case 13:r=e[d++],o+=String.fromCharCode((31&n)<<6|63&r);break;case 14:r=e[d++],a=e[d++],o+=String.fromCharCode((15&n)<<12|(63&r)<<6|(63&a)<<0);break}}return o};let ge;function pe(){if(!navigator.userAgent.includes("PlayStation 4"))return ge||"undefined"===typeof self.TextDecoder||(ge=new self.TextDecoder("utf-8")),ge}const ye={hexDump:function(e){let t="";for(let s=0;s<e.length;s++){let i=e[s].toString(16);i.length<2&&(i="0"+i),t+=i}return t}},Le=Math.pow(2,32)-1,Me=[].push,Te={video:1,audio:2,id3:3,text:4};function ve(e){return String.fromCharCode.apply(null,e)}function De(e,t){const s=e[t]<<8|e[t+1];return s<0?65536+s:s}function ke(e,t){const s=we(e,t);return s<0?4294967296+s:s}function Se(e,t){let s=ke(e,t);return s*=Math.pow(2,32),s+=ke(e,t+4),s}function we(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function be(e,t,s){e[t]=s>>24,e[t+1]=s>>16&255,e[t+2]=s>>8&255,e[t+3]=255&s}function Ee(e){const t=e.byteLength;for(let s=0;s<t;){const i=ke(e,s);if(i>8&&109===e[s+4]&&111===e[s+5]&&111===e[s+6]&&102===e[s+7])return!0;s=i>1?s+i:t}return!1}function Ye(e,t){const s=[];if(!t.length)return s;const i=e.byteLength;for(let n=0;n<i;){const r=ke(e,n),a=ve(e.subarray(n+4,n+8)),o=r>1?n+r:i;if(a===t[0])if(1===t.length)s.push(e.subarray(n+8,o));else{const i=Ye(e.subarray(n+8,o),t.slice(1));i.length&&Me.apply(s,i)}n=o}return s}function Ae(e){const t=[],s=e[0];let i=8;const n=ke(e,i);i+=4;let r=0,a=0;0===s?(r=ke(e,i),a=ke(e,i+4),i+=8):(r=Se(e,i),a=Se(e,i+8),i+=16),i+=2;let o=e.length+a;const d=De(e,i);i+=2;for(let l=0;l<d;l++){let s=i;const r=ke(e,s);s+=4;const a=2147483647&r,d=(2147483648&r)>>>31;if(1===d)return k.warn("SIDX has hierarchical references (not supported)"),null;const l=ke(e,s);s+=4,t.push({referenceSize:a,subsegmentDuration:l,info:{duration:l/n,start:o,end:o+a-1}}),o+=a,s+=4,i=s}return{earliestPresentationTime:r,timescale:n,version:s,referencesCount:d,references:t}}function Re(e){const t=[],s=Ye(e,["moov","trak"]);for(let n=0;n<s.length;n++){const e=s[n],i=Ye(e,["tkhd"])[0];if(i){let s=i[0];const n=ke(i,0===s?12:20),r=Ye(e,["mdia","mdhd"])[0];if(r){s=r[0];const i=ke(r,0===s?12:20),a=Ye(e,["mdia","hdlr"])[0];if(a){const s=ve(a.subarray(8,12)),r={soun:x.AUDIO,vide:x.VIDEO}[s];if(r){const s=Ye(e,["mdia","minf","stbl","stsd"])[0],a=xe(s);t[n]={timescale:i,type:r},t[r]=o({timescale:i,id:n},a)}}}}}const i=Ye(e,["moov","mvex","trex"]);return i.forEach(e=>{const s=ke(e,4),i=t[s];i&&(i.default={duration:ke(e,12),flags:ke(e,20)})}),t}function xe(e){const t=e.subarray(8),s=t.subarray(86),i=ve(t.subarray(4,8));let n=i;const r="enca"===i||"encv"===i;if(r){const e=Ye(t,[i])[0],s=e.subarray("enca"===i?28:78),r=Ye(s,["sinf"]);r.forEach(e=>{const t=Ye(e,["schm"])[0];if(t){const s=ve(t.subarray(4,8));if("cbcs"===s||"cenc"===s){const t=Ye(e,["frma"])[0];t&&(n=ve(t))}}})}switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const e=Ye(s,["avcC"])[0];n+="."+Pe(e[1])+Pe(e[2])+Pe(e[3]);break}case"mp4a":{const e=Ye(t,[i])[0],s=Ye(e.subarray(28),["esds"])[0];if(s&&s.length>12){let e=4;if(3!==s[e++])break;e=Ie(s,e),e+=2;const t=s[e++];if(128&t&&(e+=2),64&t&&(e+=s[e++]),4!==s[e++])break;e=Ie(s,e);const i=s[e++];if(64!==i)break;if(n+="."+Pe(i),e+=12,5!==s[e++])break;e=Ie(s,e);const r=s[e++];let a=(248&r)>>3;31===a&&(a+=1+((7&r)<<3)+((224&s[e])>>5)),n+="."+a}break}case"hvc1":case"hev1":{const e=Ye(s,["hvcC"])[0],t=e[1],i=["","A","B","C"][t>>6],r=31&t,a=ke(e,2),o=(32&t)>>5?"H":"L",d=e[12],l=e.subarray(6,12);n+="."+i+r,n+="."+a.toString(16).toUpperCase(),n+="."+o+d;let u="";for(let s=l.length;s--;){const e=l[s];if(e||u){const t=e.toString(16).toUpperCase();u="."+t+u}}n+=u;break}case"dvh1":case"dvhe":{const e=Ye(s,["dvcC"])[0],t=e[2]>>1&127,i=e[2]<<5&32|e[3]>>3&31;n+="."+Oe(t)+"."+Oe(i);break}case"vp09":{const e=Ye(s,["vpcC"])[0],t=e[4],i=e[5],r=e[6]>>4&15;n+="."+Oe(t)+"."+Oe(i)+"."+Oe(r);break}case"av01":{const e=Ye(s,["av1C"])[0],t=e[1]>>>5,i=31&e[1],r=e[2]>>>7?"H":"M",a=(64&e[2])>>6,o=(32&e[2])>>5,d=2===t&&a?o?12:10:a?10:8,l=(16&e[2])>>4,u=(8&e[2])>>3,h=(4&e[2])>>2,c=3&e[2],m=1,f=1,_=1,g=0;n+="."+t+"."+Oe(i)+r+"."+Oe(d)+"."+l+"."+u+h+c+"."+Oe(m)+"."+Oe(f)+"."+Oe(_)+"."+g;break}}return{codec:n,encrypted:r}}function Ie(e,t){const s=t+5;while(128&e[t++]&&t<s);return t}function Pe(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function Oe(e){return(e<10?"0":"")+e}function Ce(e,t){if(!e||!t)return e;const s=t.keyId;if(s&&t.isCommonEncryption){const t=Ye(e,["moov","trak"]);t.forEach(e=>{const t=Ye(e,["mdia","minf","stbl","stsd"])[0],i=t.subarray(8);let n=Ye(i,["enca"]);const r=n.length>0;r||(n=Ye(i,["encv"])),n.forEach(e=>{const t=r?e.subarray(28):e.subarray(78),i=Ye(t,["sinf"]);i.forEach(e=>{const t=Fe(e);if(t){const e=t.subarray(8,24);e.some(e=>0!==e)||(k.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${ye.hexDump(e)} -> ${ye.hexDump(s)}`),t.set(s,8))}})})})}return e}function Fe(e){const t=Ye(e,["schm"])[0];if(t){const s=ve(t.subarray(4,8));if("cbcs"===s||"cenc"===s)return Ye(e,["schi","tenc"])[0]}return k.error("[eme] missing 'schm' box"),null}function He(e,t){return Ye(t,["moof","traf"]).reduce((t,s)=>{const i=Ye(s,["tfdt"])[0],n=i[0],r=Ye(s,["tfhd"]).reduce((t,s)=>{const r=ke(s,4),a=e[r];if(a){let e=ke(i,4);if(1===n){if(e===Le)return k.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;e*=Le+1,e+=ke(i,8)}const s=a.timescale||9e4,r=e/s;if(c(r)&&(null===t||r<t))return r}return t},null);return null!==r&&c(r)&&(null===t||r<t)?r:t},null)}function Ne(e,t){let s=0,i=0,n=0;const r=Ye(e,["moof","traf"]);for(let a=0;a<r.length;a++){const e=r[a],o=Ye(e,["tfhd"])[0],d=ke(o,4),l=t[d];if(!l)continue;const u=l.default,h=ke(o,0)|(null==u?void 0:u.flags);let c=null==u?void 0:u.duration;8&h&&(c=ke(o,2&h?12:8));const m=l.timescale||9e4,f=Ye(e,["trun"]);for(let t=0;t<f.length;t++){if(s=je(f[t]),!s&&c){const e=ke(f[t],4);s=c*e}l.type===x.VIDEO?i+=s/m:l.type===x.AUDIO&&(n+=s/m)}}if(0===i&&0===n){let t=1/0,s=0,i=0;const n=Ye(e,["sidx"]);for(let e=0;e<n.length;e++){const r=Ae(n[e]);if(null!=r&&r.references){t=Math.min(t,r.earliestPresentationTime/r.timescale);const e=r.references.reduce((e,t)=>e+t.info.duration||0,0);s=Math.max(s,e+r.earliestPresentationTime/r.timescale),i=s-t}}if(i&&c(i))return i}return i||n}function je(e){const t=ke(e,0);let s=8;1&t&&(s+=4),4&t&&(s+=4);let i=0;const n=ke(e,4);for(let r=0;r<n;r++){if(256&t){const t=ke(e,s);i+=t,s+=4}512&t&&(s+=4),1024&t&&(s+=4),2048&t&&(s+=4)}return i}function Ue(e,t,s){Ye(t,["moof","traf"]).forEach(t=>{Ye(t,["tfhd"]).forEach(i=>{const n=ke(i,4),r=e[n];if(!r)return;const a=r.timescale||9e4;Ye(t,["tfdt"]).forEach(e=>{const t=e[0],i=s*a;if(i){let s=ke(e,4);if(0===t)s-=i,s=Math.max(s,0),be(e,4,s);else{s*=Math.pow(2,32),s+=ke(e,8),s-=i,s=Math.max(s,0);const t=Math.floor(s/(Le+1)),n=Math.floor(s%(Le+1));be(e,4,t),be(e,8,n)}}})})})}function Be(e){const t={valid:null,remainder:null},s=Ye(e,["moof"]);if(s.length<2)return t.remainder=e,t;const i=s[s.length-1];return t.valid=ee(e,0,i.byteOffset-8),t.remainder=ee(e,i.byteOffset-8),t}function $e(e,t){const s=new Uint8Array(e.length+t.length);return s.set(e),s.set(t,e.length),s}function We(e,t){const s=[],i=t.samples,n=t.timescale,r=t.id;let a=!1;const o=Ye(i,["moof"]);return o.map(o=>{const d=o.byteOffset-8,l=Ye(o,["traf"]);l.map(o=>{const l=Ye(o,["tfdt"]).map(e=>{const t=e[0];let s=ke(e,4);return 1===t&&(s*=Math.pow(2,32),s+=ke(e,8)),s/n})[0];return void 0!==l&&(e=l),Ye(o,["tfhd"]).map(l=>{const u=ke(l,4),h=16777215&ke(l,0),c=0!==(1&h),m=0!==(2&h),f=0!==(8&h);let _=0;const g=0!==(16&h);let p=0;const y=0!==(32&h);let L=8;u===r&&(c&&(L+=8),m&&(L+=4),f&&(_=ke(l,L),L+=4),g&&(p=ke(l,L),L+=4),y&&(L+=4),"video"===t.type&&(a=Ge(t.codec)),Ye(o,["trun"]).map(r=>{const o=r[0],l=16777215&ke(r,0),u=0!==(1&l);let h=0;const c=0!==(4&l),m=0!==(256&l);let f=0;const g=0!==(512&l);let y=0;const L=0!==(1024&l),M=0!==(2048&l);let T=0;const v=ke(r,4);let D=8;u&&(h=ke(r,D),D+=4),c&&(D+=4);let k=h+d;for(let d=0;d<v;d++){if(m?(f=ke(r,D),D+=4):f=_,g?(y=ke(r,D),D+=4):y=p,L&&(D+=4),M&&(T=0===o?ke(r,D):we(r,D),D+=4),t.type===x.VIDEO){let t=0;while(t<y){const r=ke(i,k);if(k+=4,Ke(a,i[k])){const t=i.subarray(k,k+r);Ve(t,a?2:1,e+T/n,s)}k+=r,t+=r+4}}e+=f/n}}))})})}),s}function Ge(e){if(!e)return!1;const t=e.indexOf("."),s=t<0?e:e.substring(0,t);return"hvc1"===s||"hev1"===s||"dvh1"===s||"dvhe"===s}function Ke(e,t){if(e){const e=t>>1&63;return 39===e||40===e}{const e=31&t;return 6===e}}function Ve(e,t,s,i){const n=ze(e);let r=0;r+=t;let a=0,o=0,d=0;while(r<n.length){a=0;do{if(r>=n.length)break;d=n[r++],a+=d}while(255===d);o=0;do{if(r>=n.length)break;d=n[r++],o+=d}while(255===d);const e=n.length-r;let t=r;if(o<e)r+=o;else if(o>e){k.error(`Malformed SEI payload. ${o} is too small, only ${e} bytes left to parse.`);break}if(4===a){const e=n[t++];if(181===e){const e=De(n,t);if(t+=2,49===e){const e=ke(n,t);if(t+=4,1195456820===e){const e=n[t++];if(3===e){const r=n[t++],o=31&r,d=64&r,l=d?2+3*o:0,u=new Uint8Array(l);if(d){u[0]=r;for(let e=1;e<l;e++)u[e]=n[t++]}i.push({type:e,payloadType:a,pts:s,bytes:u})}}}}}else if(5===a&&o>16){const e=[];for(let s=0;s<16;s++){const i=n[t++].toString(16);e.push(1==i.length?"0"+i:i),3!==s&&5!==s&&7!==s&&9!==s||e.push("-")}const r=o-16,d=new Uint8Array(r);for(let s=0;s<r;s++)d[s]=n[t++];i.push({payloadType:a,pts:s,uuid:e.join(""),userData:_e(d),userDataBytes:d})}}}function ze(e){const t=e.byteLength,s=[];let i=1;while(i<t-2)0===e[i]&&0===e[i+1]&&3===e[i+2]?(s.push(i+2),i+=2):i++;if(0===s.length)return e;const n=t-s.length,r=new Uint8Array(n);let a=0;for(i=0;i<n;a++,i++)a===s[0]&&(a++,s.shift()),r[i]=e[a];return r}function qe(e){const t=e[0];let s="",i="",n=0,r=0,a=0,o=0,d=0,l=0;if(0===t){while("\0"!==ve(e.subarray(l,l+1)))s+=ve(e.subarray(l,l+1)),l+=1;s+=ve(e.subarray(l,l+1)),l+=1;while("\0"!==ve(e.subarray(l,l+1)))i+=ve(e.subarray(l,l+1)),l+=1;i+=ve(e.subarray(l,l+1)),l+=1,n=ke(e,12),r=ke(e,16),o=ke(e,20),d=ke(e,24),l=28}else if(1===t){l+=4,n=ke(e,l),l+=4;const t=ke(e,l);l+=4;const r=ke(e,l);l+=4,a=2**32*t+r,m(a)||(a=Number.MAX_SAFE_INTEGER,k.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=ke(e,l),l+=4,d=ke(e,l),l+=4;while("\0"!==ve(e.subarray(l,l+1)))s+=ve(e.subarray(l,l+1)),l+=1;s+=ve(e.subarray(l,l+1)),l+=1;while("\0"!==ve(e.subarray(l,l+1)))i+=ve(e.subarray(l,l+1)),l+=1;i+=ve(e.subarray(l,l+1)),l+=1}const u=e.subarray(l,e.byteLength);return{schemeIdUri:s,value:i,timeScale:n,presentationTime:a,presentationTimeDelta:r,eventDuration:o,id:d,payload:u}}function Je(e,...t){const s=t.length;let i=8,n=s;while(n--)i+=t[n].byteLength;const r=new Uint8Array(i);for(r[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=255&i,r.set(e,4),n=0,i=8;n<s;n++)r.set(t[n],i),i+=t[n].byteLength;return r}function Xe(e,t,s){if(16!==e.byteLength)throw new RangeError("Invalid system id");let i,n,r;if(t){i=1,n=new Uint8Array(16*t.length);for(let e=0;e<t.length;e++){const s=t[e];if(16!==s.byteLength)throw new RangeError("Invalid key");n.set(s,16*e)}}else i=0,n=new Uint8Array;i>0?(r=new Uint8Array(4),t.length>0&&new DataView(r.buffer).setUint32(0,t.length,!1)):r=new Uint8Array;const a=new Uint8Array(4);return s&&s.byteLength>0&&new DataView(a.buffer).setUint32(0,s.byteLength,!1),Je([112,115,115,104],new Uint8Array([i,0,0,0]),e,r,n,a,s||new Uint8Array)}function Qe(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;const t={version:0,systemId:"",kids:null,data:null},s=new DataView(e),i=s.getUint32(0);if(e.byteLength!==i&&i>44)return null;const n=s.getUint32(4);if(1886614376!==n)return null;if(t.version=s.getUint32(8)>>>24,t.version>1)return null;t.systemId=ye.hexDump(new Uint8Array(e,12,16));const r=s.getUint32(28);if(0===t.version){if(i-32<r)return null;t.data=new Uint8Array(e,32,r)}else if(1===t.version){t.kids=[];for(let s=0;s<r;s++)t.kids.push(new Uint8Array(e,32+16*s,16))}return t}let Ze={};class et{static clearKeyUriToKeyIdMap(){Ze={}}constructor(e,t,s,i=[1],n=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=s,this.keyFormatVersions=i,this.iv=n,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&"AES-128"!==e}isSupported(){if(this.method){if("AES-128"===this.method||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case G.FAIRPLAY:case G.WIDEVINE:case G.PLAYREADY:case G.CLEARKEY:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if("AES-128"===this.method&&this.uri&&!this.iv){"number"!==typeof e&&("AES-128"!==this.method||this.iv||k.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const t=tt(e),s=new et(this.method,this.uri,"identity",this.keyFormatVersions,t);return s}const t=U(this.uri);if(t)switch(this.keyFormat){case G.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case G.PLAYREADY:{const e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Xe(e,null,t);const s=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),i=String.fromCharCode.apply(null,Array.from(s)),n=i.substring(i.indexOf("<"),i.length),r=new DOMParser,a=r.parseFromString(n,"text/xml"),o=a.getElementsByTagName("KID")[0];if(o){const e=o.childNodes[0]?o.childNodes[0].nodeValue:o.getAttribute("VALUE");if(e){const t=H(e).subarray(0,16);j(t),this.keyId=t}}break}default:{let e=t.subarray(0,16);if(16!==e.length){const t=new Uint8Array(16);t.set(e,16-e.length),e=t}this.keyId=e;break}}if(!this.keyId||16!==this.keyId.byteLength){let e=Ze[this.uri];if(!e){const t=Object.keys(Ze).length%Number.MAX_SAFE_INTEGER;e=new Uint8Array(16);const s=new DataView(e.buffer,12,4);s.setUint32(0,t),Ze[this.uri]=e}this.keyId=e}return this}}function tt(e){const t=new Uint8Array(16);for(let s=12;s<16;s++)t[s]=e>>8*(15-s)&255;return t}const st=/\{\$([a-zA-Z0-9-_]+)\}/g;function it(e){return st.test(e)}function nt(e,t,s){if(null!==e.variableList||e.hasVariableRefs)for(let i=s.length;i--;){const n=s[i],r=t[n];r&&(t[n]=rt(e,r))}}function rt(e,t){if(null!==e.variableList||e.hasVariableRefs){const s=e.variableList;return t.replace(st,t=>{const i=t.substring(2,t.length-1),n=null==s?void 0:s[i];return void 0===n?(e.playlistParsingError||(e.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`)),t):n})}return t}function at(e,t,s){let i,n,r=e.variableList;if(r||(e.variableList=r={}),"QUERYPARAM"in t){i=t.QUERYPARAM;try{const e=new self.URL(s).searchParams;if(!e.has(i))throw new Error(`"${i}" does not match any query parameter in URI: "${s}"`);n=e.get(i)}catch(a){e.playlistParsingError||(e.playlistParsingError=new Error("EXT-X-DEFINE QUERYPARAM: "+a.message))}}else i=t.NAME,n=t.VALUE;i in r?e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${i}"`)):r[i]=n||""}function ot(e,t,s){const i=t.IMPORT;if(s&&i in s){let t=e.variableList;t||(e.variableList=t={}),t[i]=s[i]}else e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${i}"`))}function dt(e=!0){if("undefined"===typeof self)return;const t=(e||!self.MediaSource)&&self.ManagedMediaSource;return t||self.MediaSource||self.WebKitMediaSource}function lt(e){return"undefined"!==typeof self&&e===self.ManagedMediaSource}const ut={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function ht(e,t){const s=ut[t];return!!s&&!!s[e.slice(0,4)]}function ct(e,t,s=!0){return!e.split(",").some(e=>!mt(e,t,s))}function mt(e,t,s=!0){var i;const n=dt(s);return null!=(i=null==n?void 0:n.isTypeSupported(ft(e,t)))&&i}function ft(e,t){return`${t}/mp4;codecs="${e}"`}function _t(e){if(e){const t=e.substring(0,4);return ut.video[t]}return 2}function gt(e){return e.split(",").reduce((e,t)=>{const s=ut.video[t];return s?(2*s+e)/(e?3:2):(ut.audio[t]+e)/(e?2:1)},0)}const pt={};function yt(e,t=!0){if(pt[e])return pt[e];const s={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[e];for(let i=0;i<s.length;i++)if(mt(s[i],"audio",t))return pt[e]=s[i],s[i];return e}const Lt=/flac|opus/i;function Mt(e,t=!0){return e.replace(Lt,e=>yt(e.toLowerCase(),t))}function Tt(e,t){return e&&"mp4a"!==e?e:t?t.split(",")[0]:t}function vt(e){const t=e.split(".");if(t.length>2){let e=t.shift()+".";return e+=parseInt(t.shift()).toString(16),e+=("000"+parseInt(t.shift()).toString(16)).slice(-4),e}return e}const Dt=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,kt=/#EXT-X-MEDIA:(.*)/g,St=/^#EXT(?:INF|-X-TARGETDURATION):/m,wt=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),bt=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class Et{static findGroup(e,t){for(let s=0;s<e.length;s++){const i=e[s];if(i.id===t)return i}}static resolve(e,t){return r.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return St.test(e)}static parseMasterPlaylist(e,t){const s=it(e),i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:s},n=[];let r;Dt.lastIndex=0;while(null!=(r=Dt.exec(e)))if(r[1]){var a;const e=new b(r[1]);nt(i,e,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const s=rt(i,r[2]),o={attrs:e,bitrate:e.decimalInteger("BANDWIDTH")||e.decimalInteger("AVERAGE-BANDWIDTH"),name:e.NAME,url:Et.resolve(s,t)},d=e.decimalResolution("RESOLUTION");d&&(o.width=d.width,o.height=d.height),Rt(e.CODECS,o),null!=(a=o.unknownCodecs)&&a.length||n.push(o),i.levels.push(o)}else if(r[3]){const e=r[3],s=r[4];switch(e){case"SESSION-DATA":{const e=new b(s);nt(i,e,["DATA-ID","LANGUAGE","VALUE","URI"]);const t=e["DATA-ID"];t&&(null===i.sessionData&&(i.sessionData={}),i.sessionData[t]=e);break}case"SESSION-KEY":{const e=Yt(s,t,i);e.encrypted&&e.isSupported()?(null===i.sessionKeys&&(i.sessionKeys=[]),i.sessionKeys.push(e)):k.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${s}"`);break}case"DEFINE":{const e=new b(s);nt(i,e,["NAME","VALUE","QUERYPARAM"]),at(i,e,t)}break;case"CONTENT-STEERING":{const e=new b(s);nt(i,e,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:Et.resolve(e["SERVER-URI"],t),pathwayId:e["PATHWAY-ID"]||"."};break}case"START":i.startTimeOffset=At(s);break}}const o=n.length>0&&n.length<i.levels.length;return i.levels=o?n:i.levels,0===i.levels.length&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,t,s){let i;const n={},r=s.levels,a={AUDIO:r.map(e=>({id:e.attrs.AUDIO,audioCodec:e.audioCodec})),SUBTITLES:r.map(e=>({id:e.attrs.SUBTITLES,textCodec:e.textCodec})),"CLOSED-CAPTIONS":[]};let o=0;kt.lastIndex=0;while(null!==(i=kt.exec(e))){const e=new b(i[1]),r=e.TYPE;if(r){const i=a[r],d=n[r]||[];n[r]=d,nt(s,e,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const l=e.LANGUAGE,u=e["ASSOC-LANGUAGE"],h=e.CHANNELS,c=e.CHARACTERISTICS,m=e["INSTREAM-ID"],f={attrs:e,bitrate:0,id:o++,groupId:e["GROUP-ID"]||"",name:e.NAME||l||"",type:r,default:e.bool("DEFAULT"),autoselect:e.bool("AUTOSELECT"),forced:e.bool("FORCED"),lang:l,url:e.URI?Et.resolve(e.URI,t):""};if(u&&(f.assocLang=u),h&&(f.channels=h),c&&(f.characteristics=c),m&&(f.instreamId=m),null!=i&&i.length){const e=Et.findGroup(i,f.groupId)||i[0];xt(f,e,"audioCodec"),xt(f,e,"textCodec")}d.push(f)}}return n}static parseLevelPlaylist(e,t,s,i,n,r){const a=new F(t),o=a.fragments;let d,l,u,m=null,f=0,_=0,g=0,p=0,y=null,L=new P(i,t),M=-1,T=!1,v=null;wt.lastIndex=0,a.m3u8=e,a.hasVariableRefs=it(e);while(null!==(d=wt.exec(e))){T&&(T=!1,L=new P(i,t),L.start=g,L.sn=f,L.cc=p,L.level=s,m&&(L.initSegment=m,L.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null,v&&(L.setByteRange(v),v=null)));const e=d[1];if(e){L.duration=parseFloat(e);const t=(" "+d[2]).slice(1);L.title=t||null,L.tagList.push(t?["INF",e,t]:["INF",e])}else if(d[3]){if(c(L.duration)){L.start=g,u&&Ct(L,u,a),L.sn=f,L.level=s,L.cc=p,o.push(L);const e=(" "+d[3]).slice(1);L.relurl=rt(a,e),Pt(L,y),y=L,g+=L.duration,f++,_=0,T=!0}}else if(d[4]){const e=(" "+d[4]).slice(1);y?L.setByteRange(e,y):L.setByteRange(e)}else if(d[5])L.rawProgramDateTime=(" "+d[5]).slice(1),L.tagList.push(["PROGRAM-DATE-TIME",L.rawProgramDateTime]),-1===M&&(M=o.length);else{if(d=d[0].match(bt),!d){k.warn("No matches on slow regex match for level playlist!");continue}for(l=1;l<d.length;l++)if("undefined"!==typeof d[l])break;const e=(" "+d[l]).slice(1),n=(" "+d[l+1]).slice(1),g=d[l+2]?(" "+d[l+2]).slice(1):"";switch(e){case"PLAYLIST-TYPE":a.type=n.toUpperCase();break;case"MEDIA-SEQUENCE":f=a.startSN=parseInt(n);break;case"SKIP":{const e=new b(n);nt(a,e,["RECENTLY-REMOVED-DATERANGES"]);const t=e.decimalInteger("SKIPPED-SEGMENTS");if(c(t)){a.skippedSegments=t;for(let e=t;e--;)o.unshift(null);f+=t}const s=e.enumeratedString("RECENTLY-REMOVED-DATERANGES");s&&(a.recentlyRemovedDateranges=s.split("\t"));break}case"TARGETDURATION":a.targetduration=Math.max(parseInt(n),1);break;case"VERSION":a.version=parseInt(n);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":a.live=!1;break;case"#":(n||g)&&L.tagList.push(g?[n,g]:[n]);break;case"DISCONTINUITY":p++,L.tagList.push(["DIS"]);break;case"GAP":L.gap=!0,L.tagList.push([e]);break;case"BITRATE":L.tagList.push([e,n]);break;case"DATERANGE":{const e=new b(n);nt(a,e,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),nt(a,e,e.clientAttrs);const t=new A(e,a.dateRanges[e.ID]);t.isValid||a.skippedSegments?a.dateRanges[t.id]=t:k.warn(`Ignoring invalid DATERANGE tag: "${n}"`),L.tagList.push(["EXT-X-DATERANGE",n]);break}case"DEFINE":{const e=new b(n);nt(a,e,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in e?ot(a,e,r):at(a,e,t)}break;case"DISCONTINUITY-SEQUENCE":p=parseInt(n);break;case"KEY":{const e=Yt(n,t,a);if(e.isSupported()){if("NONE"===e.method){u=void 0;break}u||(u={}),u[e.keyFormat]&&(u=h({},u)),u[e.keyFormat]=e}else k.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${n}"`);break}case"START":a.startTimeOffset=At(n);break;case"MAP":{const e=new b(n);if(nt(a,e,["BYTERANGE","URI"]),L.duration){const n=new P(i,t);Ot(n,e,s,u),m=n,L.initSegment=m,m.rawProgramDateTime&&!L.rawProgramDateTime&&(L.rawProgramDateTime=m.rawProgramDateTime)}else{const t=L.byteRangeEndOffset;if(t){const e=L.byteRangeStartOffset;v=`${t-e}@${e}`}else v=null;Ot(L,e,s,u),m=L,T=!0}break}case"SERVER-CONTROL":{const e=new b(n);a.canBlockReload=e.bool("CAN-BLOCK-RELOAD"),a.canSkipUntil=e.optionalFloat("CAN-SKIP-UNTIL",0),a.canSkipDateRanges=a.canSkipUntil>0&&e.bool("CAN-SKIP-DATERANGES"),a.partHoldBack=e.optionalFloat("PART-HOLD-BACK",0),a.holdBack=e.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const e=new b(n);a.partTarget=e.decimalFloatingPoint("PART-TARGET");break}case"PART":{let e=a.partList;e||(e=a.partList=[]);const s=_>0?e[e.length-1]:void 0,i=_++,r=new b(n);nt(a,r,["BYTERANGE","URI"]);const o=new O(r,L,t,i,s);e.push(o),L.duration+=o.duration;break}case"PRELOAD-HINT":{const e=new b(n);nt(a,e,["URI"]),a.preloadHint=e;break}case"RENDITION-REPORT":{const e=new b(n);nt(a,e,["URI"]),a.renditionReports=a.renditionReports||[],a.renditionReports.push(e);break}default:k.warn("line parsed but not handled: "+d);break}}}y&&!y.relurl?(o.pop(),g-=y.duration,a.partList&&(a.fragmentHint=y)):a.partList&&(Pt(L,y),L.cc=p,a.fragmentHint=L,u&&Ct(L,u,a));const D=o.length,S=o[0],w=o[D-1];if(g+=a.skippedSegments*a.targetduration,g>0&&D&&w){a.averagetargetduration=g/D;const e=w.sn;a.endSN="initSegment"!==e?e:0,a.live||(w.endList=!0),S&&(a.startCC=S.cc)}else a.endSN=0,a.startCC=0;return a.fragmentHint&&(g+=a.fragmentHint.duration),a.totalduration=g,a.endCC=p,M>0&&It(o,M),a}}function Yt(e,t,s){var i,n;const r=new b(e);nt(s,r,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const a=null!=(i=r.METHOD)?i:"",o=r.URI,d=r.hexadecimalInteger("IV"),l=r.KEYFORMATVERSIONS,u=null!=(n=r.KEYFORMAT)?n:"identity";o&&r.IV&&!d&&k.error("Invalid IV: "+r.IV);const h=o?Et.resolve(o,t):"",c=(l||"1").split("/").map(Number).filter(Number.isFinite);return new et(a,h,u,c,d)}function At(e){const t=new b(e),s=t.decimalFloatingPoint("TIME-OFFSET");return c(s)?s:null}function Rt(e,t){let s=(e||"").split(/[ ,]+/).filter(e=>e);["video","audio","text"].forEach(e=>{const i=s.filter(t=>ht(t,e));i.length&&(t[e+"Codec"]=i.join(","),s=s.filter(e=>-1===i.indexOf(e)))}),t.unknownCodecs=s}function xt(e,t,s){const i=t[s];i&&(e[s]=i)}function It(e,t){let s=e[t];for(let i=t;i--;){const t=e[i];if(!t)return;t.programDateTime=s.programDateTime-1e3*t.duration,s=t}}function Pt(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),c(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function Ot(e,t,s,i){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=s,e.sn="initSegment",i&&(e.levelkeys=i),e.initSegment=null}function Ct(e,t,s){e.levelkeys=t;const{encryptedFragments:i}=s;i.length&&i[i.length-1].levelkeys===t||!Object.keys(t).some(e=>t[e].isCommonEncryption)||i.push(e)}var Ft={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Ht={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Nt(e){const{type:t}=e;switch(t){case Ft.AUDIO_TRACK:return Ht.AUDIO;case Ft.SUBTITLE_TRACK:return Ht.SUBTITLE;default:return Ht.MAIN}}function jt(e,t){let s=e.url;return void 0!==s&&0!==s.indexOf("data:")||(s=t.url),s}class Ut{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(_.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(_.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,s=t.pLoader,i=t.loader,n=s||i,r=new n(t);return this.loaders[e.type]=r,r}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:s}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:Ft.MANIFEST,url:s,deliveryDirectives:null})}onLevelLoading(e,t){const{id:s,level:i,pathwayId:n,url:r,deliveryDirectives:a}=t;this.load({id:s,level:i,pathwayId:n,responseType:"text",type:Ft.LEVEL,url:r,deliveryDirectives:a})}onAudioTrackLoading(e,t){const{id:s,groupId:i,url:n,deliveryDirectives:r}=t;this.load({id:s,groupId:i,level:null,responseType:"text",type:Ft.AUDIO_TRACK,url:n,deliveryDirectives:r})}onSubtitleTrackLoading(e,t){const{id:s,groupId:i,url:n,deliveryDirectives:r}=t;this.load({id:s,groupId:i,level:null,responseType:"text",type:Ft.SUBTITLE_TRACK,url:n,deliveryDirectives:r})}load(e){var t;const s=this.hls.config;let i,n=this.getInternalLoader(e);if(n){const t=n.context;if(t&&t.url===e.url&&t.level===e.level)return void k.trace("[playlist-loader]: playlist request ongoing");k.log("[playlist-loader]: aborting previous loader for type: "+e.type),n.abort()}if(i=e.type===Ft.MANIFEST?s.manifestLoadPolicy.default:h({},s.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),c(null==(t=e.deliveryDirectives)?void 0:t.part)){let t;if(e.type===Ft.LEVEL&&null!==e.level?t=this.hls.levels[e.level].details:e.type===Ft.AUDIO_TRACK&&null!==e.id?t=this.hls.audioTracks[e.id].details:e.type===Ft.SUBTITLE_TRACK&&null!==e.id&&(t=this.hls.subtitleTracks[e.id].details),t){const e=t.partTarget,s=t.targetduration;if(e&&s){const t=1e3*Math.max(3*e,.8*s);i=h({},i,{maxTimeToFirstByteMs:Math.min(t,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(t,i.maxTimeToFirstByteMs)})}}}const r=i.errorRetry||i.timeoutRetry||{},a={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:r.maxNumRetry||0,retryDelay:r.retryDelayMs||0,maxRetryDelay:r.maxRetryDelayMs||0},o={onSuccess:(e,t,s,i)=>{const n=this.getInternalLoader(s);this.resetInternalLoader(s.type);const r=e.data;0===r.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),Et.isMediaPlaylist(r)?this.handleTrackOrLevelPlaylist(e,t,s,i||null,n):this.handleMasterPlaylist(e,t,s,i)):this.handleManifestParsingError(e,s,new Error("no EXTM3U delimiter"),i||null,t)},onError:(e,t,s,i)=>{this.handleNetworkError(t,s,!1,e,i)},onTimeout:(e,t,s)=>{this.handleNetworkError(t,s,!0,void 0,e)}};n.load(e,a,o)}handleMasterPlaylist(e,t,s,i){const n=this.hls,r=e.data,a=jt(e,s),o=Et.parseMasterPlaylist(r,a);if(o.playlistParsingError)return void this.handleManifestParsingError(e,s,o.playlistParsingError,i,t);const{contentSteering:d,levels:l,sessionData:u,sessionKeys:h,startTimeOffset:c,variableList:m}=o;this.variableList=m;const{AUDIO:f=[],SUBTITLES:g,"CLOSED-CAPTIONS":p}=Et.parseMasterPlaylistMedia(r,a,o);if(f.length){const e=f.some(e=>!e.url);e||!l[0].audioCodec||l[0].attrs.AUDIO||(k.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new b({}),bitrate:0,url:""}))}n.trigger(_.MANIFEST_LOADED,{levels:l,audioTracks:f,subtitles:g,captions:p,contentSteering:d,url:a,stats:t,networkDetails:i,sessionData:u,sessionKeys:h,startTimeOffset:c,variableList:m})}handleTrackOrLevelPlaylist(e,t,s,i,n){const r=this.hls,{id:a,level:o,type:d}=s,l=jt(e,s),u=0,h=c(o)?o:c(a)?a:0,m=Nt(s),f=Et.parseLevelPlaylist(e.data,l,h,m,u,this.variableList);if(d===Ft.MANIFEST){const e={attrs:new b({}),bitrate:0,details:f,name:"",url:l};r.trigger(_.MANIFEST_LOADED,{levels:[e],audioTracks:[],url:l,stats:t,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),s.levelDetails=f,this.handlePlaylistLoaded(f,e,t,s,i,n)}handleManifestParsingError(e,t,s,i,n){this.hls.trigger(_.ERROR,{type:g.NETWORK_ERROR,details:p.MANIFEST_PARSING_ERROR,fatal:t.type===Ft.MANIFEST,url:e.url,err:s,error:s,reason:s.message,response:e,context:t,networkDetails:i,stats:n})}handleNetworkError(e,t,s=!1,i,n){let r=`A network ${s?"timeout":"error"+(i?" (status "+i.code+")":"")} occurred while loading ${e.type}`;e.type===Ft.LEVEL?r+=`: ${e.level} id: ${e.id}`:e.type!==Ft.AUDIO_TRACK&&e.type!==Ft.SUBTITLE_TRACK||(r+=` id: ${e.id} group-id: "${e.groupId}"`);const a=new Error(r);k.warn("[playlist-loader]: "+r);let d=p.UNKNOWN,l=!1;const u=this.getInternalLoader(e);switch(e.type){case Ft.MANIFEST:d=s?p.MANIFEST_LOAD_TIMEOUT:p.MANIFEST_LOAD_ERROR,l=!0;break;case Ft.LEVEL:d=s?p.LEVEL_LOAD_TIMEOUT:p.LEVEL_LOAD_ERROR,l=!1;break;case Ft.AUDIO_TRACK:d=s?p.AUDIO_TRACK_LOAD_TIMEOUT:p.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case Ft.SUBTITLE_TRACK:d=s?p.SUBTITLE_TRACK_LOAD_TIMEOUT:p.SUBTITLE_LOAD_ERROR,l=!1;break}u&&this.resetInternalLoader(e.type);const h={type:g.NETWORK_ERROR,details:d,fatal:l,url:e.url,loader:u,context:e,error:a,networkDetails:t,stats:n};if(i){const s=(null==t?void 0:t.url)||e.url;h.response=o({url:s,data:void 0},i)}this.hls.trigger(_.ERROR,h)}handlePlaylistLoaded(e,t,s,i,n,r){const a=this.hls,{type:o,level:d,id:l,groupId:u,deliveryDirectives:h}=i,c=jt(t,i),m=Nt(i),f="number"===typeof i.level&&m===Ht.MAIN?d:void 0;if(!e.fragments.length){const e=new Error("No Segments found in Playlist");return void a.trigger(_.ERROR,{type:g.NETWORK_ERROR,details:p.LEVEL_EMPTY_ERROR,fatal:!1,url:c,error:e,reason:e.message,response:t,context:i,level:f,parent:m,networkDetails:n,stats:s})}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const y=e.playlistParsingError;if(y)a.trigger(_.ERROR,{type:g.NETWORK_ERROR,details:p.LEVEL_PARSING_ERROR,fatal:!1,url:c,error:y,reason:y.message,response:t,context:i,level:f,parent:m,networkDetails:n,stats:s});else switch(e.live&&r&&(r.getCacheAge&&(e.ageHeader=r.getCacheAge()||0),r.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),o){case Ft.MANIFEST:case Ft.LEVEL:a.trigger(_.LEVEL_LOADED,{details:e,level:f||0,id:l||0,stats:s,networkDetails:n,deliveryDirectives:h});break;case Ft.AUDIO_TRACK:a.trigger(_.AUDIO_TRACK_LOADED,{details:e,id:l||0,groupId:u||"",stats:s,networkDetails:n,deliveryDirectives:h});break;case Ft.SUBTITLE_TRACK:a.trigger(_.SUBTITLE_TRACK_LOADED,{details:e,id:l||0,groupId:u||"",stats:s,networkDetails:n,deliveryDirectives:h});break}}}function Bt(e,t){let s;try{s=new Event("addtrack")}catch(i){s=document.createEvent("Event"),s.initEvent("addtrack",!1,!1)}s.track=e,t.dispatchEvent(s)}function $t(e,t){const s=e.mode;if("disabled"===s&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(i){k.debug("[texttrack-utils]: "+i);try{const s=new self.TextTrackCue(t.startTime,t.endTime,t.text);s.id=t.id,e.addCue(s)}catch(n){k.debug("[texttrack-utils]: Legacy TextTrackCue fallback failed: "+n)}}"disabled"===s&&(e.mode=s)}function Wt(e){const t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(let s=e.cues.length;s--;)e.removeCue(e.cues[s]);"disabled"===t&&(e.mode=t)}function Gt(e,t,s,i){const n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&e.cues.length>0){const n=Vt(e.cues,t,s);for(let t=0;t<n.length;t++)i&&!i(n[t])||e.removeCue(n[t])}"disabled"===n&&(e.mode=n)}function Kt(e,t){if(t<e[0].startTime)return 0;const s=e.length-1;if(t>e[s].endTime)return-1;let i=0,n=s;while(i<=n){const r=Math.floor((n+i)/2);if(t<e[r].startTime)n=r-1;else{if(!(t>e[r].startTime&&i<s))return r;i=r+1}}return e[i].startTime-t<t-e[n].startTime?i:n}function Vt(e,t,s){const i=[],n=Kt(e,t);if(n>-1)for(let r=n,a=e.length;r<a;r++){const n=e[r];if(n.startTime>=t&&n.endTime<=s)i.push(n);else if(n.startTime>s)return i}return i}function zt(e){const t=[];for(let s=0;s<e.length;s++){const i=e[s];"subtitles"!==i.kind&&"captions"!==i.kind||!i.label||t.push(e[s])}return t}var qt={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const Jt=.25;function Xt(){if("undefined"!==typeof self)return self.VTTCue||self.TextTrackCue}function Qt(e,t,s,i,n){let r=new e(t,s,"");try{r.value=i,n&&(r.type=n)}catch(a){r=new e(t,s,JSON.stringify(n?o({type:n},i):i))}return r}const Zt=(()=>{const e=Xt();try{e&&new e(0,Number.POSITIVE_INFINITY,"")}catch(t){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function es(e,t){return e.getTime()/1e3-t}function ts(e){return Uint8Array.from(e.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class ss{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(Wt(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const s=e[t];if("metadata"===s.kind&&"id3"===s.label)return Bt(s,this.media),s}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:s,enableID3MetadataCues:i}}}=this;if(!s&&!i)return;const{samples:n}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const r=Xt();if(r)for(let a=0;a<n.length;a++){const e=n[a].type;if(e===qt.emsg&&!s||!i)continue;const t=le(n[a].data);if(t){const s=n[a].pts;let i=s+n[a].duration;i>Zt&&(i=Zt);const o=i-s;o<=0&&(i=s+Jt);for(let n=0;n<t.length;n++){const a=t[n];if(!oe(a)){this.updateId3CueEnds(s,e);const t=Qt(r,s,i,a,e);t&&this.id3Track.addCue(t)}}}}}updateId3CueEnds(e,t){var s;const i=null==(s=this.id3Track)?void 0:s.cues;if(i)for(let n=i.length;n--;){const s=i[n];s.type===t&&s.startTime<e&&s.endTime===Zt&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:s,type:i}){const{id3Track:n,hls:r}=this;if(!r)return;const{config:{enableEmsgMetadataCues:a,enableID3MetadataCues:o}}=r;if(n&&(a||o)){let e;e="audio"===i?e=>e.type===qt.audioId3&&o:"video"===i?e=>e.type===qt.emsg&&a:e=>e.type===qt.audioId3&&o||e.type===qt.emsg&&a,Gt(n,t,s,e)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:s,id3Track:i}=this,{dateRanges:n}=t,r=Object.keys(n);if(i){const e=Object.keys(s).filter(e=>!r.includes(e));for(let t=e.length;t--;){const n=e[t];Object.keys(s[n].cues).forEach(e=>{i.removeCue(s[n].cues[e])}),delete s[n]}}const a=t.fragments[t.fragments.length-1];if(0===r.length||!c(null==a?void 0:a.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const o=a.programDateTime/1e3-a.start,d=Xt();for(let l=0;l<r.length;l++){const e=r[l],t=n[e],i=es(t.startDate,o),a=s[e],u=(null==a?void 0:a.cues)||{};let h=(null==a?void 0:a.durationKnown)||!1,c=Zt;const m=t.endDate;if(m)c=es(m,o),h=!0;else if(t.endOnNext&&!h){const e=r.reduce((e,s)=>{if(s!==t.id){const i=n[s];if(i.class===t.class&&i.startDate>t.startDate&&(!e||t.startDate<e.startDate))return i}return e},null);e&&(c=es(e.startDate,o),h=!0)}const f=Object.keys(t.attr);for(let s=0;s<f.length;s++){const n=f[s];if(!E(n))continue;const r=u[n];if(r)h&&!a.durationKnown&&(r.endTime=c);else if(d){let s=t.attr[n];Y(n)&&(s=ts(s));const r=Qt(d,i,c,{key:n,data:s},qt.dateRange);r&&(r.id=e,this.id3Track.addCue(r),u[n]=r)}}s[e]={cues:u,dateRange:t,durationKnown:h}}}}class is{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(null===e)return null;const{holdBack:t,partHoldBack:s,targetduration:i}=e,{liveSyncDuration:n,liveSyncDurationCount:r,lowLatencyMode:a}=this.config,o=this.hls.userConfig;let d=a&&s||t;(o.liveSyncDuration||o.liveSyncDurationCount||0===d)&&(d=void 0!==n?n:r*i);const l=i,u=1;return d+Math.min(this.stallCount*u,l)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,s=this.levelDetails;if(null===e||null===t||null===s)return null;const i=s.edge,n=e-t-this.edgeStalled,r=i-s.totalduration,a=i-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(r,n),a)}get drift(){const{levelDetails:e}=this;return null===e?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(null===e)return 0;const t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const s=e.buffered.length;return(s?e.buffered.end(s-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(_.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(_.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(_.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(_.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var s;t.details===p.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(s=this.levelDetails)&&s.live&&k.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const s=this.computeLatency();if(null===s)return;this._latency=s;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:n}=this.config;if(!i||1===n||!t.live)return;const r=this.targetLatency;if(null===r)return;const a=s-r,o=Math.min(this.maxLatency,r+t.targetduration),d=a<o;if(d&&a>.05&&this.forwardBufferLength>1){const t=Math.min(2,Math.max(1,n)),s=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;e.playbackRate=Math.min(t,Math.max(1,s))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return null===e?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return null===e?null:e-this.currentTime}}const ns=["NONE","TYPE-0","TYPE-1",null];function rs(e){return ns.indexOf(e)>-1}const as=["SDR","PQ","HLG"];function os(e){return!!e&&as.indexOf(e)>-1}var ds={No:"",Yes:"YES",v2:"v2"};function ls(e){const{canSkipUntil:t,canSkipDateRanges:s,age:i}=e,n=i<t/2;return t&&n?s?ds.v2:ds.Yes:ds.No}class us{constructor(e,t,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=s}addDirectives(e){const t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class hs{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(e=>!!e).map(e=>e.substring(0,4)).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return cs(this._audioGroups,e)}hasSubtitleGroup(e){return cs(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t)if("audio"===e){let e=this._audioGroups;e||(e=this._audioGroups=[]),-1===e.indexOf(t)&&e.push(t)}else if("text"===e){let e=this._subtitleGroups;e||(e=this._subtitleGroups=[]),-1===e.indexOf(t)&&e.push(t)}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return null==(e=this.audioGroups)?void 0:e[0]}get textGroupId(){var e;return null==(e=this.subtitleGroups)?void 0:e[0]}addFallback(){}}function cs(e,t){return!(!t||!e)&&-1!==e.indexOf(t)}function ms(e,t){const s=t.startPTS;if(c(s)){let i,n=0;t.sn>e.sn?(n=s-e.start,i=e):(n=e.start-s,i=t),i.duration!==n&&(i.duration=n)}else if(t.sn>e.sn){const s=e.cc===t.cc;s&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration}else t.start=Math.max(e.start-t.duration,0)}function fs(e,t,s,i,n,r){const a=i-s;a<=0&&(k.warn("Fragment should have a positive duration",t),i=s+t.duration,r=n+t.duration);let o=s,d=i;const l=t.startPTS,u=t.endPTS;if(c(l)){const e=Math.abs(l-s);c(t.deltaPTS)?t.deltaPTS=Math.max(e,t.deltaPTS):t.deltaPTS=e,o=Math.max(s,l),s=Math.min(s,l),n=Math.min(n,t.startDTS),d=Math.min(i,u),i=Math.max(i,u),r=Math.max(r,t.endDTS)}const h=s-t.start;0!==t.start&&(t.start=s),t.duration=i-t.start,t.startPTS=s,t.maxStartPTS=o,t.startDTS=n,t.endPTS=i,t.minEndPTS=d,t.endDTS=r;const m=t.sn;if(!e||m<e.startSN||m>e.endSN)return 0;let f;const _=m-e.startSN,g=e.fragments;for(g[_]=t,f=_;f>0;f--)ms(g[f],g[f-1]);for(f=_;f<g.length-1;f++)ms(g[f],g[f+1]);return e.fragmentHint&&ms(g[g.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,h}function _s(e,t){let s=null;const i=e.fragments;for(let d=i.length-1;d>=0;d--){const e=i[d].initSegment;if(e){s=e;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;let n,r=0;if(ys(e,t,(e,i)=>{e.relurl&&(r=e.cc-i.cc),c(e.startPTS)&&c(e.endPTS)&&(i.start=i.startPTS=e.startPTS,i.startDTS=e.startDTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.duration=e.endPTS-e.startPTS,i.duration&&(n=i),t.PTSKnown=t.alignedSliding=!0),i.elementaryStreams=e.elementaryStreams,i.loader=e.loader,i.stats=e.stats,e.initSegment&&(i.initSegment=e.initSegment,s=e.initSegment)}),s){const e=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;e.forEach(e=>{var t;!e||e.initSegment&&e.initSegment.relurl!==(null==(t=s)?void 0:t.relurl)||(e.initSegment=s)})}if(t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some(e=>!e),t.deltaUpdateFailed){k.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let e=t.skippedSegments;e--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=gs(e.dateRanges,t.dateRanges,t.recentlyRemovedDateranges));const a=t.fragments;if(r){k.warn("discontinuity sliding from playlist, take drift into account");for(let e=0;e<a.length;e++)a[e].cc+=r}t.skippedSegments&&(t.startCC=t.fragments[0].cc),ps(e.partList,t.partList,(e,t)=>{t.elementaryStreams=e.elementaryStreams,t.stats=e.stats}),n?fs(t,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):Ls(e,t),a.length&&(t.totalduration=t.edge-a[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;const o=t.advancedDateTime;if(t.advanced&&o){const e=t.edge;t.driftStart||(t.driftStartTime=o,t.driftStart=e),t.driftEndTime=o,t.driftEnd=e}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function gs(e,t,s){const i=h({},e);return s&&s.forEach(e=>{delete i[e]}),Object.keys(t).forEach(e=>{const s=new A(t[e].attr,i[e]);s.isValid?i[e]=s:k.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(t[e].attr)}"`)}),i}function ps(e,t,s){if(e&&t){let i=0;for(let n=0,r=e.length;n<=r;n++){const r=e[n],a=t[n+i];r&&a&&r.index===a.index&&r.fragment.sn===a.fragment.sn?s(r,a):i--}}}function ys(e,t,s){const i=t.skippedSegments,n=Math.max(e.startSN,t.startSN)-t.startSN,r=(e.fragmentHint?1:0)+(i?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,a=t.startSN-e.startSN,o=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,d=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;for(let l=n;l<=r;l++){const e=d[a+l];let n=o[l];i&&!n&&l<i&&(n=t.fragments[l]=e),e&&n&&s(e,n)}}function Ls(e,t){const s=t.startSN+t.skippedSegments-e.startSN,i=e.fragments;s<0||s>=i.length||Ms(t,i[s].start)}function Ms(e,t){if(t){const s=e.fragments;for(let i=e.skippedSegments;i<s.length;i++)s[i].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function Ts(e,t=1/0){let s=1e3*e.targetduration;if(e.updated){const i=e.fragments,n=4;if(i.length&&s*n>t){const e=1e3*i[i.length-1].duration;e<s&&(s=e)}}else s/=2;return Math.round(s)}function vs(e,t,s){if(null==e||!e.details)return null;const i=e.details;let n=i.fragments[t-i.startSN];return n||(n=i.fragmentHint,n&&n.sn===t?n:t<i.startSN&&s&&s.sn===t?s:null)}function Ds(e,t,s){var i;return null!=e&&e.details?ks(null==(i=e.details)?void 0:i.partList,t,s):null}function ks(e,t,s){if(e)for(let i=e.length;i--;){const n=e[i];if(n.index===s&&n.fragment.sn===t)return n}return null}function Ss(e){e.forEach((e,t)=>{const{details:s}=e;null!=s&&s.fragments&&s.fragments.forEach(e=>{e.level=t})})}function ws(e){switch(e.details){case p.FRAG_LOAD_TIMEOUT:case p.KEY_LOAD_TIMEOUT:case p.LEVEL_LOAD_TIMEOUT:case p.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function bs(e,t){const s=ws(t);return e.default[(s?"timeout":"error")+"Retry"]}function Es(e,t){const s="linear"===e.backoff?1:Math.pow(2,t);return Math.min(s*e.retryDelayMs,e.maxRetryDelayMs)}function Ys(e){return o(o({},e),{errorRetry:null,timeoutRetry:null})}function As(e,t,s,i){if(!e)return!1;const n=null==i?void 0:i.code,r=t<e.maxNumRetry&&(Rs(n)||!!s);return e.shouldRetry?e.shouldRetry(e,t,s,i,r):r}function Rs(e){return 0===e&&!1===navigator.onLine||!!e&&(e<400||e>499)}const xs={search:function(e,t){let s=0,i=e.length-1,n=null,r=null;while(s<=i){n=(s+i)/2|0,r=e[n];const a=t(r);if(a>0)s=n+1;else{if(!(a<0))return r;i=n-1}}return null}};function Is(e,t,s){if(null===t||!Array.isArray(e)||!e.length||!c(t))return null;const i=e[0].programDateTime;if(t<(i||0))return null;const n=e[e.length-1].endProgramDateTime;if(t>=(n||0))return null;s=s||0;for(let r=0;r<e.length;++r){const i=e[r];if(Fs(t,s,i))return i}return null}function Ps(e,t,s=0,i=0,n=.005){let r=null;if(e){r=t[e.sn-t[0].sn+1]||null;const i=e.endDTS-s;i>0&&i<15e-7&&(s+=15e-7)}else 0===s&&0===t[0].start&&(r=t[0]);if(r&&((!e||e.level===r.level)&&0===Cs(s,i,r)||Os(r,e,Math.min(n,i))))return r;const a=xs.search(t,Cs.bind(null,s,i));return!a||a===e&&r?r:a}function Os(e,t,s){if(t&&0===t.start&&t.level<e.level&&(t.endPTS||0)>0){const i=t.tagList.reduce((e,t)=>("INF"===t[0]&&(e+=parseFloat(t[1])),e),s);return e.start<=i}return!1}function Cs(e=0,t=0,s){if(s.start<=e&&s.start+s.duration>e)return 0;const i=Math.min(t,s.duration+(s.deltaPTS?s.deltaPTS:0));return s.start+s.duration-i<=e?1:s.start-i>e&&s.start?-1:0}function Fs(e,t,s){const i=1e3*Math.min(t,s.duration+(s.deltaPTS?s.deltaPTS:0)),n=s.endProgramDateTime||0;return n-i>e}function Hs(e,t){return xs.search(e,e=>e.cc<t?1:e.cc>t?-1:0)}var Ns={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},js={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class Us{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=k.log.bind(k,"[info]:"),this.warn=k.warn.bind(k,"[warning]:"),this.error=k.error.bind(k,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(_.ERROR,this.onError,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(_.ERROR,this.onError,this),e.off(_.ERROR,this.onErrorOut,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(null==e?void 0:e.type)===Ht.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var s,i;if(t.fatal)return;const n=this.hls,r=t.context;switch(t.details){case p.FRAG_LOAD_ERROR:case p.FRAG_LOAD_TIMEOUT:case p.KEY_LOAD_ERROR:case p.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case p.FRAG_PARSING_ERROR:if(null!=(s=t.frag)&&s.gap)return void(t.errorAction={action:Ns.DoNothing,flags:js.None});case p.FRAG_GAP:case p.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=Ns.SendAlternateToPenaltyBox);case p.LEVEL_EMPTY_ERROR:case p.LEVEL_PARSING_ERROR:{var a,o;const e=t.parent===Ht.MAIN?t.level:n.loadLevel;t.details===p.LEVEL_EMPTY_ERROR&&null!=(a=t.context)&&null!=(o=a.levelDetails)&&o.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,e):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,e))}return;case p.LEVEL_LOAD_ERROR:case p.LEVEL_LOAD_TIMEOUT:return void("number"===typeof(null==r?void 0:r.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.level)));case p.AUDIO_TRACK_LOAD_ERROR:case p.AUDIO_TRACK_LOAD_TIMEOUT:case p.SUBTITLE_LOAD_ERROR:case p.SUBTITLE_TRACK_LOAD_TIMEOUT:if(r){const e=n.levels[n.loadLevel];if(e&&(r.type===Ft.AUDIO_TRACK&&e.hasAudioGroup(r.groupId)||r.type===Ft.SUBTITLE_TRACK&&e.hasSubtitleGroup(r.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=Ns.SendAlternateToPenaltyBox,void(t.errorAction.flags=js.MoveAllAlternatesMatchingHost)}return;case p.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const e=n.levels[n.loadLevel],s=null==e?void 0:e.attrs["HDCP-LEVEL"];s?t.errorAction={action:Ns.SendAlternateToPenaltyBox,flags:js.MoveAllAlternatesMatchingHDCP,hdcpLevel:s}:this.keySystemError(t)}return;case p.BUFFER_ADD_CODEC_ERROR:case p.REMUX_ALLOC_ERROR:case p.BUFFER_APPEND_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(i=t.level)?i:n.loadLevel));case p.INTERNAL_EXCEPTION:case p.BUFFER_APPENDING_ERROR:case p.BUFFER_FULL_ERROR:case p.LEVEL_SWITCH_ERROR:case p.BUFFER_STALLED_ERROR:case p.BUFFER_SEEK_OVER_HOLE:case p.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:Ns.DoNothing,flags:js.None})}t.type===g.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const s=this.hls,i=bs(s.config.playlistLoadPolicy,e),n=this.playlistError++,r=As(i,n,ws(e),e.response);if(r)return{action:Ns.RetryRequest,flags:js.None,retryConfig:i,retryCount:n};const a=this.getLevelSwitchAction(e,t);return i&&(a.retryConfig=i,a.retryCount=n),a}getFragRetryOrSwitchAction(e){const t=this.hls,s=this.getVariantLevelIndex(e.frag),i=t.levels[s],{fragLoadPolicy:n,keyLoadPolicy:r}=t.config,a=bs(e.details.startsWith("key")?r:n,e),o=t.levels.reduce((e,t)=>e+t.fragmentError,0);if(i){e.details!==p.FRAG_GAP&&i.fragmentError++;const t=As(a,o,ws(e),e.response);if(t)return{action:Ns.RetryRequest,flags:js.None,retryConfig:a,retryCount:o}}const d=this.getLevelSwitchAction(e,s);return a&&(d.retryConfig=a,d.retryCount=o),d}getLevelSwitchAction(e,t){const s=this.hls;null!==t&&void 0!==t||(t=s.loadLevel);const i=this.hls.levels[t];if(i){var n,r;const t=e.details;i.loadError++,t===p.BUFFER_APPEND_ERROR&&i.fragmentError++;let d=-1;const{levels:l,loadLevel:u,minAutoLevel:h,maxAutoLevel:c}=s;s.autoLevelEnabled||(s.loadLevel=-1);const m=null==(n=e.frag)?void 0:n.type,f=m===Ht.AUDIO&&t===p.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(t===p.BUFFER_ADD_CODEC_ERROR||t===p.BUFFER_APPEND_ERROR),_=f&&l.some(({audioCodec:e})=>i.audioCodec!==e),g="video"===e.sourceBufferName&&(t===p.BUFFER_ADD_CODEC_ERROR||t===p.BUFFER_APPEND_ERROR),y=g&&l.some(({codecSet:e,audioCodec:t})=>i.codecSet!==e&&i.audioCodec===t),{type:L,groupId:M}=null!=(r=e.context)?r:{};for(let s=l.length;s--;){const n=(s+u)%l.length;if(n!==u&&n>=h&&n<=c&&0===l[n].loadError){var a,o;const s=l[n];if(t===p.FRAG_GAP&&m===Ht.MAIN&&e.frag){const t=l[n].details;if(t){const s=Ps(e.frag,t.fragments,e.frag.start);if(null!=s&&s.gap)continue}}else{if(L===Ft.AUDIO_TRACK&&s.hasAudioGroup(M)||L===Ft.SUBTITLE_TRACK&&s.hasSubtitleGroup(M))continue;if(m===Ht.AUDIO&&null!=(a=i.audioGroups)&&a.some(e=>s.hasAudioGroup(e))||m===Ht.SUBTITLE&&null!=(o=i.subtitleGroups)&&o.some(e=>s.hasSubtitleGroup(e))||_&&i.audioCodec===s.audioCodec||!_&&i.audioCodec!==s.audioCodec||y&&i.codecSet===s.codecSet)continue}d=n;break}}if(d>-1&&s.loadLevel!==d)return e.levelRetry=!0,this.playlistError=0,{action:Ns.SendAlternateToPenaltyBox,flags:js.None,nextAutoLevel:d}}return{action:Ns.SendAlternateToPenaltyBox,flags:js.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var s;switch(null==(s=t.errorAction)?void 0:s.action){case Ns.DoNothing:break;case Ns.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===p.FRAG_GAP?/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError()):t.fatal=!0;break;case Ns.RetryRequest:break}t.fatal&&this.hls.stopLoad()}sendAlternateToPenaltyBox(e){const t=this.hls,s=e.errorAction;if(!s)return;const{flags:i,hdcpLevel:n,nextAutoLevel:r}=s;switch(i){case js.None:this.switchLevel(e,r);break;case js.MoveAllAlternatesMatchingHDCP:n&&(t.maxHdcpLevel=ns[ns.indexOf(n)-1],s.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}s.resolved||this.switchLevel(e,r)}switchLevel(e,t){void 0!==t&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}}class Bs{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=k.log.bind(k,t+":"),this.warn=k.warn.bind(k,t+":"),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,s){const i=null==t?void 0:t.renditionReports;if(i){let r=-1;for(let s=0;s<i.length;s++){const a=i[s];let o;try{o=new self.URL(a.URI,t.url).href}catch(n){k.warn("Could not construct new URL for Rendition Report: "+n),o=a.URI||""}if(o===e){r=s;break}o===e.substring(0,o.length)&&(r=s)}if(-1!==r){const e=i[r],n=parseInt(e["LAST-MSN"])||(null==t?void 0:t.lastPartSn);let a=parseInt(e["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const e=Math.min(t.age-t.partTarget,t.targetduration);a>=0&&e>t.partTarget&&(a+=1)}const o=s&&ls(s);return new us(n,a>=0?a:void 0,o)}}}loadPlaylist(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,s){const{details:i,stats:n}=t,r=self.performance.now(),a=n.loading.first?Math.max(0,r-n.loading.first):0;if(i.advancedDateTime=Date.now()-a,i.live||null!=s&&s.live){if(i.reloaded(s),s&&this.log(`live playlist ${e} ${i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED"}`),s&&i.fragments.length>0&&_s(s,i),!this.canLoad||!i.live)return;let a,o=void 0,d=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){const e=this.hls.config.lowLatencyMode,n=i.lastPartSn,r=i.endSN,l=i.lastPartIndex,u=-1!==l,h=n===r,c=e?0:l;u?(o=h?r+1:n,d=h?c:l+1):o=r+1;const m=i.age,f=m+i.ageHeader;let _=Math.min(f-i.partTarget,1.5*i.targetduration);if(_>0){if(s&&_>s.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${s.tuneInGoal} to: ${_} with playlist age: ${i.age}`),_=0;else{const e=Math.floor(_/i.targetduration);if(o+=e,void 0!==d){const e=Math.round(_%i.targetduration/i.partTarget);d+=e}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${m.toFixed(2)}s goal: ${_} skip sn ${e} to part ${d}`)}i.tuneInGoal=_}if(a=this.getDeliveryDirectives(i,t.deliveryDirectives,o,d),e||!h)return void this.loadPlaylist(a)}else(i.canBlockReload||i.canSkipUntil)&&(a=this.getDeliveryDirectives(i,t.deliveryDirectives,o,d));const l=this.hls.mainForwardBufferInfo,u=l?l.end-l.len:0,h=1e3*(i.edge-u),c=Ts(i,h);i.updated&&r>this.requestScheduled+c&&(this.requestScheduled=n.loading.start),void 0!==o&&i.canBlockReload?this.requestScheduled=n.loading.first+c-(1e3*i.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+c<r?this.requestScheduled=r:this.requestScheduled-r<=0&&(this.requestScheduled+=c);let m=this.requestScheduled-r;m=Math.max(0,m),this.log(`reload live playlist ${e} in ${Math.round(m)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(a),m)}else this.clearTimer()}getDeliveryDirectives(e,t,s,i){let n=ls(e);return null!=t&&t.skip&&e.deltaUpdateFailed&&(s=t.msn,i=t.part,n=ds.No),new us(s,i,n)}checkRetry(e){const t=e.details,s=ws(e),i=e.errorAction,{action:n,retryCount:r=0,retryConfig:a}=i||{},o=!!i&&!!a&&(n===Ns.RetryRequest||!i.resolved&&n===Ns.SendAlternateToPenaltyBox);if(o){var d;if(this.requestScheduled=-1,r>=a.maxNumRetry)return!1;if(s&&null!=(d=e.context)&&d.deliveryDirectives)this.warn(`Retrying playlist loading ${r+1}/${a.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const e=Es(a,r);this.timer=self.setTimeout(()=>this.loadPlaylist(),e),this.warn(`Retrying playlist loading ${r+1}/${a.maxNumRetry} after "${t}" in ${e}ms`)}e.levelRetry=!0,i.resolved=!0}return o}}class $s{constructor(e,t=0,s=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=s}sample(e,t){const s=Math.pow(this.alpha_,e);this.estimate_=t*(1-s)+s*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class Ws{constructor(e,t,s,i=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=s,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new $s(e),this.fast_=new $s(t),this.defaultTTFB_=i,this.ttfb_=new $s(e)}update(e,t){const{slow_:s,fast_:i,ttfb_:n}=this;s.halfLife!==e&&(this.slow_=new $s(e,s.getEstimate(),s.getTotalWeight())),i.halfLife!==t&&(this.fast_=new $s(t,i.getEstimate(),i.getTotalWeight())),n.halfLife!==e&&(this.ttfb_=new $s(e,n.getEstimate(),n.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const s=8*t,i=e/1e3,n=s/i;this.fast_.sample(i,n),this.slow_.sample(i,n)}sampleTTFB(e){const t=e/1e3,s=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(s,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const Gs={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},Ks={};function Vs(e,t,s,i,n,r){const a=e.audioCodec?e.audioGroups:null,o=null==r?void 0:r.audioCodec,d=null==r?void 0:r.channels,l=d?parseInt(d):o?1/0:2;let u=null;if(null!=a&&a.length)try{u=1===a.length&&a[0]?t.groups[a[0]].channels:a.reduce((e,s)=>{if(s){const i=t.groups[s];if(!i)throw new Error(`Audio track group ${s} not found`);Object.keys(i.channels).forEach(t=>{e[t]=(e[t]||0)+i.channels[t]})}return e},{2:0})}catch(h){return!0}return void 0!==e.videoCodec&&(e.width>1920&&e.height>1088||e.height>1920&&e.width>1088||e.frameRate>Math.max(i,30)||"SDR"!==e.videoRange&&e.videoRange!==s||e.bitrate>Math.max(n,8e6))||!!u&&c(l)&&Object.keys(u).some(e=>parseInt(e)>l)}function zs(e,t,s){const i=e.videoCodec,n=e.audioCodec;if(!i||!n||!s)return Promise.resolve(Gs);const r={width:e.width,height:e.height,bitrate:Math.ceil(Math.max(.9*e.bitrate,e.averageBitrate)),framerate:e.frameRate||30},a=e.videoRange;"SDR"!==a&&(r.transferFunction=a.toLowerCase());const d=i.split(",").map(e=>({type:"media-source",video:o(o({},r),{},{contentType:ft(e,"video")})}));return n&&e.audioGroups&&e.audioGroups.forEach(e=>{var s;e&&(null==(s=t.groups[e])||s.tracks.forEach(t=>{if(t.groupId===e){const e=t.channels||"",s=parseFloat(e);c(s)&&s>2&&d.push.apply(d,n.split(",").map(e=>({type:"media-source",audio:{contentType:ft(e,"audio"),channels:""+s}})))}}))}),Promise.all(d.map(e=>{const t=qs(e);return Ks[t]||(Ks[t]=s.decodingInfo(e))})).then(e=>({supported:!e.some(e=>!e.supported),configurations:d,decodingInfoResults:e})).catch(e=>({supported:!1,configurations:d,decodingInfoResults:[],error:e}))}function qs(e){const{audio:t,video:s}=e,i=s||t;if(i){const e=i.contentType.split('"')[1];if(s)return`r${s.height}x${s.width}f${Math.ceil(s.framerate)}${s.transferFunction||"sd"}_${e}_${Math.ceil(s.bitrate/1e5)}`;if(t)return`c${t.channels}${t.spatialRendering?"s":"n"}_${e}`}return""}function Js(){if("function"===typeof matchMedia){const e=matchMedia("(dynamic-range: high)"),t=matchMedia("bad query");if(e.media!==t.media)return!0===e.matches}return!1}function Xs(e,t){let s=!1,i=[];return e&&(s="SDR"!==e,i=[e]),t&&(i=t.allowedVideoRanges||as.slice(0),s=void 0!==t.preferHDR?t.preferHDR:Js(),i=s?i.filter(e=>"SDR"!==e):["SDR"]),{preferHDR:s,allowedVideoRanges:i}}function Qs(e,t,s,i,n){const r=Object.keys(e),a=null==i?void 0:i.channels,o=null==i?void 0:i.audioCodec,d=a&&2===parseInt(a);let l=!0,u=!1,h=1/0,m=1/0,f=1/0,_=0,g=[];const{preferHDR:p,allowedVideoRanges:y}=Xs(t,n);for(let c=r.length;c--;){const t=e[r[c]];l=t.channels[2]>0,h=Math.min(h,t.minHeight),m=Math.min(m,t.minFramerate),f=Math.min(f,t.minBitrate);const s=y.filter(e=>t.videoRanges[e]>0);s.length>0&&(u=!0,g=s)}h=c(h)?h:0,m=c(m)?m:0;const L=Math.max(1080,h),M=Math.max(30,m);f=c(f)?f:s,s=Math.max(f,s),u||(t=void 0,g=[]);const T=r.reduce((t,i)=>{const n=e[i];if(i===t)return t;if(n.minBitrate>s)return Zs(i,`min bitrate of ${n.minBitrate} > current estimate of ${s}`),t;if(!n.hasDefaultAudio)return Zs(i,"no renditions with default or auto-select sound found"),t;if(o&&i.indexOf(o.substring(0,4))%5!==0)return Zs(i,`audio codec preference "${o}" not found`),t;if(a&&!d){if(!n.channels[a])return Zs(i,`no renditions with ${a} channel sound found (channels options: ${Object.keys(n.channels)})`),t}else if((!o||d)&&l&&0===n.channels["2"])return Zs(i,"no renditions with stereo sound found"),t;return n.minHeight>L?(Zs(i,`min resolution of ${n.minHeight} > maximum of ${L}`),t):n.minFramerate>M?(Zs(i,`min framerate of ${n.minFramerate} > maximum of ${M}`),t):g.some(e=>n.videoRanges[e]>0)?n.maxScore<_?(Zs(i,`max score of ${n.maxScore} < selected max of ${_}`),t):t&&(gt(i)>=gt(t)||n.fragmentError>e[t].fragmentError)?t:(_=n.maxScore,i):(Zs(i,`no variants with VIDEO-RANGE of ${JSON.stringify(g)} found`),t)},void 0);return{codecSet:T,videoRanges:g,preferHDR:p,minFramerate:m,minBitrate:f}}function Zs(e,t){k.log(`[abr] start candidates with "${e}" ignored because ${t}`)}function ei(e){return e.reduce((e,t)=>{let s=e.groups[t.groupId];s||(s=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),s.tracks.push(t);const i=t.channels||"2";return s.channels[i]=(s.channels[i]||0)+1,s.hasDefault=s.hasDefault||t.default,s.hasAutoSelect=s.hasAutoSelect||t.autoselect,s.hasDefault&&(e.hasDefaultAudio=!0),s.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function ti(e,t,s,i){return e.slice(s,i+1).reduce((e,s)=>{if(!s.codecSet)return e;const i=s.audioGroups;let n=e[s.codecSet];n||(e[s.codecSet]=n={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!i,fragmentError:0}),n.minBitrate=Math.min(n.minBitrate,s.bitrate);const r=Math.min(s.height,s.width);return n.minHeight=Math.min(n.minHeight,r),n.minFramerate=Math.min(n.minFramerate,s.frameRate),n.maxScore=Math.max(n.maxScore,s.score),n.fragmentError+=s.fragmentError,n.videoRanges[s.videoRange]=(n.videoRanges[s.videoRange]||0)+1,i&&i.forEach(e=>{if(!e)return;const s=t.groups[e];s&&(n.hasDefaultAudio=n.hasDefaultAudio||t.hasDefaultAudio?s.hasDefault:s.hasAutoSelect||!t.hasDefaultAudio&&!t.hasAutoSelectAudio,Object.keys(s.channels).forEach(e=>{n.channels[e]=(n.channels[e]||0)+s.channels[e]}))}),e},{})}function si(e,t,s){if("attrs"in e){const s=t.indexOf(e);if(-1!==s)return s}for(let i=0;i<t.length;i++){const n=t[i];if(ii(e,n,s))return i}return-1}function ii(e,t,s){const{groupId:i,name:n,lang:r,assocLang:a,characteristics:o,default:d}=e,l=e.forced;return(void 0===i||t.groupId===i)&&(void 0===n||t.name===n)&&(void 0===r||t.lang===r)&&(void 0===r||t.assocLang===a)&&(void 0===d||t.default===d)&&(void 0===l||t.forced===l)&&(void 0===o||ni(o,t.characteristics))&&(void 0===s||s(e,t))}function ni(e,t=""){const s=e.split(","),i=t.split(",");return s.length===i.length&&!s.some(e=>-1===i.indexOf(e))}function ri(e,t){const{audioCodec:s,channels:i}=e;return(void 0===s||(t.audioCodec||"").substring(0,4)===s.substring(0,4))&&(void 0===i||i===(t.channels||"2"))}function ai(e,t,s,i,n){const r=t[i],a=t.reduce((e,t,s)=>{const i=t.uri,n=e[i]||(e[i]=[]);return n.push(s),e},{}),o=a[r.uri];o.length>1&&(i=Math.max.apply(Math,o));const d=r.videoRange,l=r.frameRate,u=r.codecSet.substring(0,4),h=oi(t,i,t=>{if(t.videoRange!==d||t.frameRate!==l||t.codecSet.substring(0,4)!==u)return!1;const i=t.audioGroups,r=s.filter(e=>!i||-1!==i.indexOf(e.groupId));return si(e,r,n)>-1});return h>-1?h:oi(t,i,t=>{const i=t.audioGroups,r=s.filter(e=>!i||-1!==i.indexOf(e.groupId));return si(e,r,n)>-1})}function oi(e,t,s){for(let i=t;i;i--)if(s(e[i]))return i;for(let i=t+1;i<e.length;i++)if(s(e[i]))return i;return-1}class di{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:e,partCurrent:t,hls:s}=this,{autoLevelEnabled:i,media:n}=s;if(!e||!n)return;const r=performance.now(),a=t?t.stats:e.stats,o=t?t.duration:e.duration,d=r-a.loading.start,l=s.minAutoLevel;if(a.aborted||a.loaded&&a.loaded===a.total||e.level<=l)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!i||n.paused||!n.playbackRate||!n.readyState)return;const u=s.mainForwardBufferInfo;if(null===u)return;const h=this.bwEstimator.getEstimateTTFB(),m=Math.abs(n.playbackRate);if(d<=Math.max(h,o/(2*m)*1e3))return;const f=u.len/m,g=a.loading.first?a.loading.first-a.loading.start:-1,p=a.loaded&&g>-1,y=this.getBwEstimate(),L=s.levels,M=L[e.level],T=a.total||Math.max(a.loaded,Math.round(o*M.averageBitrate/8));let v=p?d-g:d;v<1&&p&&(v=Math.min(d,8*a.loaded/y));const D=p?1e3*a.loaded/v:0,S=D?(T-a.loaded)/D:8*T/y+h/1e3;if(S<=f)return;const w=D?8*D:y;let b,E=Number.POSITIVE_INFINITY;for(b=e.level-1;b>l;b--){const e=L[b].maxBitrate;if(E=this.getTimeToLoadFrag(h/1e3,w,o*e,!L[b].details),E<f)break}if(E>=S)return;if(E>10*o)return;s.nextLoadLevel=s.nextAutoLevel=b,p?this.bwEstimator.sample(d-Math.min(h,g),a.loaded):this.bwEstimator.sampleTTFB(d);const Y=L[b].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>Y&&this.resetEstimator(Y),this.clearTimer(),k.warn(`[abr] Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} is loading too slowly;\n Time to underbuffer: ${f.toFixed(3)} s\n Estimated load time for current fragment: ${S.toFixed(3)} s\n Estimated load time for down switch fragment: ${E.toFixed(3)} s\n TTFB estimate: ${0|g} ms\n Current BW estimate: ${c(y)?0|y:"Unknown"} bps\n New BW estimate: ${0|this.getBwEstimate()} bps\n Switching to level ${b} @ ${0|Y} bps`),s.trigger(_.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:a})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(k.log("setting initial bwe to "+e),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new Ws(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.FRAG_LOADING,this.onFragLoading,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this),e.on(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(_.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.FRAG_LOADING,this.onFragLoading,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this),e.off(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(_.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const s=t.frag;if(!this.ignoreFragment(s)){var i;if(!s.bitrateTest)this.fragCurrent=s,this.partCurrent=null!=(i=t.part)?i:null;this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case p.BUFFER_ADD_CODEC_ERROR:case p.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case p.FRAG_LOAD_TIMEOUT:{const e=t.frag,{fragCurrent:s,partCurrent:i}=this;if(e&&s&&e.sn===s.sn&&e.level===s.level){const t=performance.now(),s=i?i.stats:e.stats,n=t-s.loading.start,r=s.loading.first?s.loading.first-s.loading.start:-1,a=s.loaded&&r>-1;if(a){const e=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(n-Math.min(e,r),s.loaded)}else this.bwEstimator.sampleTTFB(n)}break}}}getTimeToLoadFrag(e,t,s,i){const n=e+s/t,r=i?this.lastLevelLoadSec:0;return n+r}onLevelLoaded(e,t){const s=this.hls.config,{loading:i}=t.stats,n=i.end-i.start;c(n)&&(this.lastLevelLoadSec=n/1e3),t.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:s}){const i=s?s.stats:t.stats;if(t.type===Ht.MAIN&&this.bwEstimator.sampleTTFB(i.loading.first-i.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const e=s?s.duration:t.duration,n=this.hls.levels[t.level],r=(n.loaded?n.loaded.bytes:0)+i.loaded,a=(n.loaded?n.loaded.duration:0)+e;n.loaded={bytes:r,duration:a},n.realBitrate=Math.round(8*r/a)}if(t.bitrateTest){const e={stats:i,frag:t,part:s,id:t.type};this.onFragBuffered(_.FRAG_BUFFERED,e),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:s,part:i}=t,n=null!=i&&i.stats.loaded?i.stats:s.stats;if(n.aborted)return;if(this.ignoreFragment(s))return;const r=n.parsing.end-n.loading.start-Math.min(n.loading.first-n.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(r,n.loaded),n.bwEstimate=this.getBwEstimate(),s.bitrateTest?this.bitrateTestDelay=r/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==Ht.MAIN||"initSegment"===e.sn}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,s=this.getBwEstimate(),i=this.hls.config.maxStarvationDelay,n=this.findBestLevel(s,t,e,0,i,1,1);if(n>-1)return n;const r=this.hls.firstLevel,a=Math.min(Math.max(r,t),e);return k.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${r} clamped to ${a}`),a}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,t=this.bwEstimator,s=t.canEstimate(),i=this.lastLoadedFragLevel>-1;if(-1!==e&&(!s||!i||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const n=s&&i?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){const t=this.hls.levels;if(t.length>Math.max(e,n)&&t[e].loadError<=t[n].loadError)return e}return this._nextAutoLevel=n,this.nextAutoLevelKey=this.getAutoLevelKey(),n}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:s}=this,{maxAutoLevel:i,config:n,minAutoLevel:r}=s,a=t?t.duration:e?e.duration:0,o=this.getBwEstimate(),d=this.getStarvationDelay();let l=n.abrBandWidthFactor,u=n.abrBandWidthUpFactor;if(d){const e=this.findBestLevel(o,r,i,d,0,l,u);if(e>=0)return e}let h=a?Math.min(a,n.maxStarvationDelay):n.maxStarvationDelay;if(!d){const e=this.bitrateTestDelay;if(e){const t=a?Math.min(a,n.maxLoadingDelay):n.maxLoadingDelay;h=t-e,k.info(`[abr] bitrate test took ${Math.round(1e3*e)}ms, set first fragment max fetchDuration to ${Math.round(1e3*h)} ms`),l=u=1}}const c=this.findBestLevel(o,r,i,d,h,l,u);if(k.info(`[abr] ${d?"rebuffering expected":"buffer is empty"}, optimal quality level ${c}`),c>-1)return c;const m=s.levels[r],f=s.levels[s.loadLevel];return(null==m?void 0:m.bitrate)<(null==f?void 0:f.bitrate)?r:s.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const s=t&&0!==t.playbackRate?Math.abs(t.playbackRate):1,i=e.mainForwardBufferInfo;return(i?i.len:0)/s}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,s,i,n,r,a){var o;const d=i+n,l=this.lastLoadedFragLevel,u=-1===l?this.hls.firstLevel:l,{fragCurrent:h,partCurrent:m}=this,{levels:f,allAudioTracks:_,loadLevel:g,config:p}=this.hls;if(1===f.length)return 0;const y=f[u],L=!(null==y||null==(o=y.details)||!o.live),M=-1===g||-1===l;let T,v="SDR",D=(null==y?void 0:y.frameRate)||0;const{audioPreference:S,videoPreference:w}=p,b=this.audioTracksByGroup||(this.audioTracksByGroup=ei(_));if(M){if(-1!==this.firstSelection)return this.firstSelection;const i=this.codecTiers||(this.codecTiers=ti(f,b,t,s)),n=Qs(i,v,e,S,w),{codecSet:r,videoRanges:a,minFramerate:o,minBitrate:d,preferHDR:l}=n;T=r,v=l?a[a.length-1]:a[0],D=o,e=Math.max(e,d),k.log("[abr] picked start tier "+JSON.stringify(n))}else T=null==y?void 0:y.codecSet,v=null==y?void 0:y.videoRange;const E=m?m.duration:h?h.duration:0,Y=this.bwEstimator.getEstimateTTFB()/1e3,A=[];for(let x=s;x>=t;x--){var R;const t=f[x],o=x>u;if(!t)continue;if(p.useMediaCapabilities&&!t.supportedResult&&!t.supportedPromise){const s=navigator.mediaCapabilities;"function"===typeof(null==s?void 0:s.decodingInfo)&&Vs(t,b,v,D,e,S)?(t.supportedPromise=zs(t,b,s),t.supportedPromise.then(e=>{if(!this.hls)return;t.supportedResult=e;const s=this.hls.levels,i=s.indexOf(t);e.error?k.warn(`[abr] MediaCapabilities decodingInfo error: "${e.error}" for level ${i} ${JSON.stringify(e)}`):e.supported||(k.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${i} ${JSON.stringify(e)}`),i>-1&&s.length>1&&(k.log("[abr] Removing unsupported level "+i),this.hls.removeLevel(i)))})):t.supportedResult=Gs}if(T&&t.codecSet!==T||v&&t.videoRange!==v||o&&D>t.frameRate||!o&&D>0&&D<t.frameRate||t.supportedResult&&(null==(R=t.supportedResult.decodingInfoResults)||!R[0].smooth)){A.push(x);continue}const h=t.details,_=(m?null==h?void 0:h.partTarget:null==h?void 0:h.averagetargetduration)||E;let w;w=o?a*e:r*e;const I=E&&i>=2*E&&0===n?f[x].averageBitrate:f[x].maxBitrate,P=this.getTimeToLoadFrag(Y,w,I*_,void 0===h),O=w>=I&&(x===l||0===t.loadError&&0===t.fragmentError)&&(P<=Y||!c(P)||L&&!this.bitrateTestDelay||P<d);if(O){const e=this.forcedAutoLevel;return x===g||-1!==e&&e===g||(A.length&&k.trace(`[abr] Skipped level(s) ${A.join(",")} of ${s} max with CODECS and VIDEO-RANGE:"${f[A[0]].codecs}" ${f[A[0]].videoRange}; not compatible with "${y.codecs}" ${v}`),k.info(`[abr] switch candidate:${u}->${x} adjustedbw(${Math.round(w)})-bitrate=${Math.round(w-I)} ttfb:${Y.toFixed(1)} avgDuration:${_.toFixed(1)} maxFetchDuration:${d.toFixed(1)} fetchDuration:${P.toFixed(1)} firstSelection:${M} codecSet:${T} videoRange:${v} hls.loadLevel:${g}`)),M&&(this.firstSelection=x),x}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:s}=this.hls,i=Math.min(Math.max(e,s),t);this._nextAutoLevel!==i&&(this.nextAutoLevelKey="",this._nextAutoLevel=i)}}class li{constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)}clearNextTick(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)}tick(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}var ui={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class hi{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(_.BUFFER_APPENDED,this.onBufferAppended,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.BUFFER_APPENDED,this.onBufferAppended,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const s=this.activePartLists[t];if(s)for(let i=s.length;i--;){const t=s[i];if(!t)break;const n=t.end;if(t.start<=e&&null!==n&&e<=n)return t}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:s}=this,i=Object.keys(s);for(let n=i.length;n--;){const r=s[i[n]];if((null==r?void 0:r.body.type)===t&&r.buffered){const t=r.body;if(t.start<=e&&e<=t.end)return t}}return null}detectEvictedFragments(e,t,s,i){this.timeRanges&&(this.timeRanges[e]=t);const n=(null==i?void 0:i.fragment.sn)||-1;Object.keys(this.fragments).forEach(i=>{const r=this.fragments[i];if(!r)return;if(n>=r.body.sn)return;if(!r.buffered&&!r.loaded)return void(r.body.type===s&&this.removeFragment(r.body));const a=r.range[e];a&&a.time.some(e=>{const s=!this.isTimeBuffered(e.startPTS,e.endPTS,t);return s&&this.removeFragment(r.body),s})})}detectPartialFragments(e){const t=this.timeRanges,{frag:s,part:i}=e;if(!t||"initSegment"===s.sn)return;const n=mi(s),r=this.fragments[n];if(!r||r.buffered&&s.gap)return;const a=!s.relurl;if(Object.keys(t).forEach(e=>{const n=s.elementaryStreams[e];if(!n)return;const o=t[e],d=a||!0===n.partial;r.range[e]=this.getBufferedTimes(s,i,d,o)}),r.loaded=null,Object.keys(r.range).length){r.buffered=!0;const e=r.body.endList=s.endList||r.body.endList;e&&(this.endListFragments[r.body.type]=r),ci(r)||this.removeParts(s.sn-1,s.type)}else this.removeFragment(r.body)}removeParts(e,t){const s=this.activePartLists[t];s&&(this.activePartLists[t]=s.filter(t=>t.fragment.sn>=e))}fragBuffered(e,t){const s=mi(e);let i=this.fragments[s];!i&&t&&(i=this.fragments[s]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),i&&(i.loaded=null,i.buffered=!0)}getBufferedTimes(e,t,s,i){const n={time:[],partial:s},r=e.start,a=e.end,o=e.minEndPTS||a,d=e.maxStartPTS||r;for(let l=0;l<i.length;l++){const e=i.start(l)-this.bufferPadding,t=i.end(l)+this.bufferPadding;if(d>=e&&o<=t){n.time.push({startPTS:Math.max(r,i.start(l)),endPTS:Math.min(a,i.end(l))});break}if(r<t&&a>e){const e=Math.max(r,i.start(l)),t=Math.min(a,i.end(l));t>e&&(n.partial=!0,n.time.push({startPTS:e,endPTS:t}))}else if(a<=e)break}return n}getPartialFragment(e){let t,s,i,n=null,r=0;const{bufferPadding:a,fragments:o}=this;return Object.keys(o).forEach(d=>{const l=o[d];l&&ci(l)&&(s=l.body.start-a,i=l.body.end+a,e>=s&&e<=i&&(t=Math.min(e-s,i-e),r<=t&&(n=l.body,r=t)))}),n}isEndListAppended(e){const t=this.endListFragments[e];return void 0!==t&&(t.buffered||ci(t))}getState(e){const t=mi(e),s=this.fragments[t];return s?s.buffered?ci(s)?ui.PARTIAL:ui.OK:ui.APPENDING:ui.NOT_LOADED}isTimeBuffered(e,t,s){let i,n;for(let r=0;r<s.length;r++){if(i=s.start(r)-this.bufferPadding,n=s.end(r)+this.bufferPadding,e>=i&&t<=n)return!0;if(t<=i)return!1}return!1}onFragLoaded(e,t){const{frag:s,part:i}=t;if("initSegment"===s.sn||s.bitrateTest)return;const n=i?null:t,r=mi(s);this.fragments[r]={body:s,appendedPTS:null,loaded:n,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:s,part:i,timeRanges:n}=t;if("initSegment"===s.sn)return;const r=s.type;if(i){let e=this.activePartLists[r];e||(this.activePartLists[r]=e=[]),e.push(i)}this.timeRanges=n,Object.keys(n).forEach(e=>{const t=n[e];this.detectEvictedFragments(e,t,r,i)})}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=mi(e);return!!this.fragments[t]}hasParts(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)}removeFragmentsInRange(e,t,s,i,n){i&&!this.hasGaps||Object.keys(this.fragments).forEach(r=>{const a=this.fragments[r];if(!a)return;const o=a.body;o.type!==s||i&&!o.gap||o.start<t&&o.end>e&&(a.buffered||n)&&this.removeFragment(o)})}removeFragment(e){const t=mi(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const s=this.activePartLists[e.type];if(s){const t=e.sn;this.activePartLists[e.type]=s.filter(e=>e.fragment.sn!==t)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function ci(e){var t,s,i;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(s=e.range.audio)?void 0:s.partial)||(null==(i=e.range.audiovideo)?void 0:i.partial))}function mi(e){return`${e.type}_${e.level}_${e.sn}`}const fi={length:0,start:()=>0,end:()=>0};class _i{static isBuffered(e,t){try{if(e){const s=_i.getBuffered(e);for(let e=0;e<s.length;e++)if(t>=s.start(e)&&t<=s.end(e))return!0}}catch(s){}return!1}static bufferInfo(e,t,s){try{if(e){const i=_i.getBuffered(e),n=[];let r;for(r=0;r<i.length;r++)n.push({start:i.start(r),end:i.end(r)});return this.bufferedInfo(n,t,s)}}catch(i){}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,s){t=Math.max(0,t),e.sort((function(e,t){const s=e.start-t.start;return s||t.end-e.end}));let i=[];if(s)for(let d=0;d<e.length;d++){const t=i.length;if(t){const n=i[t-1].end;e[d].start-n<s?e[d].end>n&&(i[t-1].end=e[d].end):i.push(e[d])}else i.push(e[d])}else i=e;let n,r=0,a=t,o=t;for(let d=0;d<i.length;d++){const e=i[d].start,l=i[d].end;if(t+s>=e&&t<l)a=e,o=l,r=o-t;else if(t+s<e){n=e;break}}return{len:r,start:a||0,end:o||0,nextStart:n}}static getBuffered(e){try{return e.buffered}catch(t){return k.log("failed to get media.buffered",t),fi}}}class gi{constructor(e,t,s,i=0,n=-1,r=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=pi(),this.buffering={audio:pi(),video:pi(),audiovideo:pi()},this.level=e,this.sn=t,this.id=s,this.size=i,this.part=n,this.partial=r}}function pi(){return{start:0,executeStart:0,executeEnd:0,end:0}}function yi(e,t){for(let i=0,n=e.length;i<n;i++){var s;if((null==(s=e[i])?void 0:s.cc)===t)return e[i]}return null}function Li(e,t,s){return!(!t||!(s.endCC>s.startCC||e&&e.cc<s.startCC))}function Mi(e,t){const s=e.fragments,i=t.fragments;if(!i.length||!s.length)return void k.log("No fragments to align");const n=yi(s,i[0].cc);if(n&&(!n||n.startPTS))return n;k.log("No frag in previous level to align on")}function Ti(e,t){if(e){const s=e.start+t;e.start=e.startPTS=s,e.endPTS=s+e.duration}}function vi(e,t){const s=t.fragments;for(let i=0,n=s.length;i<n;i++)Ti(s[i],e);t.fragmentHint&&Ti(t.fragmentHint,e),t.alignedSliding=!0}function Di(e,t,s){t&&(ki(e,s,t),!s.alignedSliding&&t&&Si(s,t),s.alignedSliding||!t||s.skippedSegments||Ls(t,s))}function ki(e,t,s){if(Li(e,s,t)){const e=Mi(s,t);e&&c(e.start)&&(k.log("Adjusting PTS using last level due to CC increase within current level "+t.url),vi(e.start,t))}}function Si(e,t){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;const s=e.fragments,i=t.fragments;if(!s.length||!i.length)return;let n,r;const a=Math.min(t.endCC,e.endCC);t.startCC<a&&e.startCC<a&&(n=yi(i,a),r=yi(s,a)),n&&r||(n=i[Math.floor(i.length/2)],r=yi(s,n.cc)||s[Math.floor(s.length/2)]);const o=n.programDateTime,d=r.programDateTime;if(!o||!d)return;const l=(d-o)/1e3-(r.start-n.start);vi(l,e)}const wi=Math.pow(2,17);class bi{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const s=e.url;if(!s)return Promise.reject(new Ai({type:g.NETWORK_ERROR,details:p.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(s?"part list":"url")),networkDetails:null}));this.abort();const i=this.config,n=i.fLoader,r=i.loader;return new Promise((a,d)=>{if(this.loader&&this.loader.destroy(),e.gap){if(e.tagList.some(e=>"GAP"===e[0]))return void d(Yi(e));e.gap=!1}const l=this.loader=e.loader=n?new n(i):new r(i),u=Ei(e),h=Ys(i.fragLoadPolicy.default),c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:wi};e.stats=l.stats,l.load(u,c,{onSuccess:(t,s,i,n)=>{this.resetLoader(e,l);let r=t.data;i.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(r.slice(0,16)),r=r.slice(16)),a({frag:e,part:null,payload:r,networkDetails:n})},onError:(t,i,n,r)=>{this.resetLoader(e,l),d(new Ai({type:g.NETWORK_ERROR,details:p.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:o({url:s,data:void 0},t),error:new Error(`HTTP Error ${t.code} ${t.text}`),networkDetails:n,stats:r}))},onAbort:(t,s,i)=>{this.resetLoader(e,l),d(new Ai({type:g.NETWORK_ERROR,details:p.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:i,stats:t}))},onTimeout:(t,s,i)=>{this.resetLoader(e,l),d(new Ai({type:g.NETWORK_ERROR,details:p.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:i,stats:t}))},onProgress:(s,i,n,r)=>{t&&t({frag:e,part:null,payload:n,networkDetails:r})}})})}loadPart(e,t,s){this.abort();const i=this.config,n=i.fLoader,r=i.loader;return new Promise((a,d)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap)return void d(Yi(e,t));const l=this.loader=e.loader=n?new n(i):new r(i),u=Ei(e,t),h=Ys(i.fragLoadPolicy.default),c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:wi};t.stats=l.stats,l.load(u,c,{onSuccess:(i,n,r,o)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const d={frag:e,part:t,payload:i.data,networkDetails:o};s(d),a(d)},onError:(s,i,n,r)=>{this.resetLoader(e,l),d(new Ai({type:g.NETWORK_ERROR,details:p.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:o({url:u.url,data:void 0},s),error:new Error(`HTTP Error ${s.code} ${s.text}`),networkDetails:n,stats:r}))},onAbort:(s,i,n)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),d(new Ai({type:g.NETWORK_ERROR,details:p.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:n,stats:s}))},onTimeout:(s,i,n)=>{this.resetLoader(e,l),d(new Ai({type:g.NETWORK_ERROR,details:p.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:n,stats:s}))}})})}updateStatsFromPart(e,t){const s=e.stats,i=t.stats,n=i.total;if(s.loaded+=i.loaded,n){const i=Math.round(e.duration/t.duration),r=Math.min(Math.round(s.loaded/n),i),a=i-r,o=a*Math.round(s.loaded/r);s.total=s.loaded+o}else s.total=Math.max(s.loaded,s.total);const r=s.loading,a=i.loading;r.start?r.first+=a.first-a.start:(r.start=a.start,r.first=a.first),r.end=a.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Ei(e,t=null){const s=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},n=s.byteRangeStartOffset,r=s.byteRangeEndOffset;if(c(n)&&c(r)){var a;let t=n,s=r;if("initSegment"===e.sn&&"AES-128"===(null==(a=e.decryptdata)?void 0:a.method)){const e=r-n;e%16&&(s=r+(16-e%16)),0!==n&&(i.resetIV=!0,t=n-16)}i.rangeStart=t,i.rangeEnd=s}return i}function Yi(e,t){const s=new Error(`GAP ${e.gap?"tag":"attribute"} found`),i={type:g.MEDIA_ERROR,details:p.FRAG_GAP,fatal:!1,frag:e,error:s,networkDetails:null};return t&&(i.part=t),(t||e).stats.aborted=!0,new Ai(i)}class Ai extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Ri{constructor(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}decrypt(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}class xi{constructor(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}function Ii(e){const t=e.byteLength,s=t&&new DataView(e.buffer).getUint8(t-1);return s?ee(e,0,t-s):e}class Pi{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),s=new Uint32Array(4);for(let i=0;i<4;i++)s[i]=t.getUint32(4*i);return s}initTable(){const e=this.sBox,t=this.invSBox,s=this.subMix,i=s[0],n=s[1],r=s[2],a=s[3],o=this.invSubMix,d=o[0],l=o[1],u=o[2],h=o[3],c=new Uint32Array(256);let m=0,f=0,_=0;for(_=0;_<256;_++)c[_]=_<128?_<<1:_<<1^283;for(_=0;_<256;_++){let s=f^f<<1^f<<2^f<<3^f<<4;s=s>>>8^255&s^99,e[m]=s,t[s]=m;const o=c[m],_=c[o],g=c[_];let p=257*c[s]^16843008*s;i[m]=p<<24|p>>>8,n[m]=p<<16|p>>>16,r[m]=p<<8|p>>>24,a[m]=p,p=16843009*g^65537*_^257*o^16843008*m,d[s]=p<<24|p>>>8,l[s]=p<<16|p>>>16,u[s]=p<<8|p>>>24,h[s]=p,m?(m=o^c[c[c[g^o]]],f^=c[c[f]]):m=f=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let s=!0,i=0;while(i<t.length&&s)s=t[i]===this.key[i],i++;if(s)return;this.key=t;const n=this.keySize=t.length;if(4!==n&&6!==n&&8!==n)throw new Error("Invalid aes key size="+n);const r=this.ksRows=4*(n+6+1);let a,o;const d=this.keySchedule=new Uint32Array(r),l=this.invKeySchedule=new Uint32Array(r),u=this.sBox,h=this.rcon,c=this.invSubMix,m=c[0],f=c[1],_=c[2],g=c[3];let p,y;for(a=0;a<r;a++)a<n?p=d[a]=t[a]:(y=p,a%n===0?(y=y<<8|y>>>24,y=u[y>>>24]<<24|u[y>>>16&255]<<16|u[y>>>8&255]<<8|u[255&y],y^=h[a/n|0]<<24):n>6&&a%n===4&&(y=u[y>>>24]<<24|u[y>>>16&255]<<16|u[y>>>8&255]<<8|u[255&y]),d[a]=p=(d[a-n]^y)>>>0);for(o=0;o<r;o++)a=r-o,y=3&o?d[a]:d[a-4],l[o]=o<4||a<=4?y:m[u[y>>>24]]^f[u[y>>>16&255]]^_[u[y>>>8&255]]^g[u[255&y]],l[o]=l[o]>>>0}networkToHostOrderSwap(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}decrypt(e,t,s){const i=this.keySize+6,n=this.invKeySchedule,r=this.invSBox,a=this.invSubMix,o=a[0],d=a[1],l=a[2],u=a[3],h=this.uint8ArrayToUint32Array_(s);let c=h[0],m=h[1],f=h[2],_=h[3];const g=new Int32Array(e),p=new Int32Array(g.length);let y,L,M,T,v,D,k,S,w,b,E,Y,A,R;const x=this.networkToHostOrderSwap;while(t<g.length){for(w=x(g[t]),b=x(g[t+1]),E=x(g[t+2]),Y=x(g[t+3]),v=w^n[0],D=Y^n[1],k=E^n[2],S=b^n[3],A=4,R=1;R<i;R++)y=o[v>>>24]^d[D>>16&255]^l[k>>8&255]^u[255&S]^n[A],L=o[D>>>24]^d[k>>16&255]^l[S>>8&255]^u[255&v]^n[A+1],M=o[k>>>24]^d[S>>16&255]^l[v>>8&255]^u[255&D]^n[A+2],T=o[S>>>24]^d[v>>16&255]^l[D>>8&255]^u[255&k]^n[A+3],v=y,D=L,k=M,S=T,A+=4;y=r[v>>>24]<<24^r[D>>16&255]<<16^r[k>>8&255]<<8^r[255&S]^n[A],L=r[D>>>24]<<24^r[k>>16&255]<<16^r[S>>8&255]<<8^r[255&v]^n[A+1],M=r[k>>>24]<<24^r[S>>16&255]<<16^r[v>>8&255]<<8^r[255&D]^n[A+2],T=r[S>>>24]<<24^r[v>>16&255]<<16^r[D>>8&255]<<8^r[255&k]^n[A+3],p[t]=x(y^c),p[t+1]=x(T^m),p[t+2]=x(M^f),p[t+3]=x(L^_),c=w,m=b,f=E,_=Y,t+=4}return p.buffer}}const Oi=16;class Ci{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const e=self.crypto;e&&(this.subtle=e.subtle||e.webkitSubtle)}catch(s){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const s=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Ii(s):s}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,s){return this.useSoftware?new Promise((i,n)=>{this.softwareDecrypt(new Uint8Array(e),t,s);const r=this.flush();r?i(r.buffer):n(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,s)}softwareDecrypt(e,t,s){const{currentIV:i,currentResult:n,remainderData:r}=this;this.logOnce("JS AES decrypt"),r&&(e=$e(r,e),this.remainderData=null);const a=this.getValidChunk(e);if(!a.length)return null;i&&(s=i);let o=this.softwareDecrypter;o||(o=this.softwareDecrypter=new Pi),o.expandKey(t);const d=n;return this.currentResult=o.decrypt(a.buffer,0,s),this.currentIV=ee(a,-16).buffer,d||null}webCryptoDecrypt(e,t,s){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,s));this.key=t,this.fastAesKey=new xi(this.subtle,t)}return this.fastAesKey.expandKey().then(t=>{if(!this.subtle)return Promise.reject(new Error("web crypto not initialized"));this.logOnce("WebCrypto AES decrypt");const i=new Ri(this.subtle,new Uint8Array(s));return i.decrypt(e.buffer,t)}).catch(i=>(k.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,s)))}onWebCryptoError(e,t,s){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,s);const i=this.flush();if(i)return i.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const s=e.length-e.length%Oi;return s!==e.length&&(t=ee(e,0,s),this.remainderData=ee(e,s)),t}logOnce(e){this.logEnabled&&(k.log("[decrypter]: "+e),this.logEnabled=!1)}}const Fi={toString:function(e){let t="";const s=e.length;for(let i=0;i<s;i++)t+=`[${e.start(i).toFixed(3)}-${e.end(i).toFixed(3)}]`;return t}},Hi={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class Ni extends li{constructor(e,t,s,i,n){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Hi.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=n,this.logPrefix=i,this.log=k.log.bind(k,i+":"),this.warn=k.warn.bind(k,i+":"),this.hls=e,this.fragmentLoader=new bi(e.config),this.keyLoader=s,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Ci(e.config),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Hi.STOPPED}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const s=t.partList;if(null!=s&&s.length){const e=s[s.length-1],t=_i.isBuffered(this.media,e.start+e.duration/2);return t}const i=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(i)}getLevelDetails(){var e;if(this.levels&&null!==this.levelLastLoaded)return null==(e=this.levelLastLoaded)?void 0:e.details}onMediaAttached(e,t){const s=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),s.addEventListener("seeking",this.onvseeking),s.addEventListener("ended",this.onvended);const i=this.config;this.levels&&i.autoStartLoad&&this.state===Hi.STOPPED&&this.startLoad(i.startPosition)}onMediaDetaching(){const e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:t,media:s,mediaBuffer:i,state:n}=this,r=s?s.currentTime:0,a=_i.bufferInfo(i||s,r,e.maxBufferHole);if(this.log(`media seeking to ${c(r)?r.toFixed(3):r}, state: ${n}`),this.state===Hi.ENDED)this.resetLoadingState();else if(t){const s=e.maxFragLookUpTolerance,i=t.start-s,n=t.start+t.duration+s;if(!a.len||n<a.start||i>a.end){const e=r>n;(r<i||e)&&(e&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}s&&(this.fragmentTracker.removeFragmentsInRange(r,1/0,this.playlistType,!0),this.lastCurrentTime=r),this.loadedmetadata||a.len||(this.nextLoadPosition=this.startPosition=r),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.hls.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),super.onHandlerDestroying(),this.hls=null}onHandlerDestroyed(){this.state=Hi.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,s){this._loadFragForPlayback(e,t,s)}_loadFragForPlayback(e,t,s){const i=t=>{if(this.fragContextChanged(e))return this.warn(`Fragment ${e.sn}${t.part?" p: "+t.part.index:""} of level ${e.level} was dropped during download.`),void this.fragmentTracker.removeFragment(e);e.stats.chunkCount++,this._handleFragmentLoadProgress(t)};this._doFragLoad(e,t,s,i).then(t=>{if(!t)return;const s=this.state;this.fragContextChanged(e)?(s===Hi.FRAG_LOADING||!this.fragCurrent&&s===Hi.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=Hi.IDLE):("payload"in t&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(_.FRAG_LOADED,t)),this._handleFragmentLoadComplete(t))}).catch(t=>{this.state!==Hi.STOPPED&&this.state!==Hi.ERROR&&(this.warn("Frag error: "+((null==t?void 0:t.message)||t)),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:s}=this,i=s.getState(e);if(i===ui.APPENDING){const t=e.type,i=this.getFwdBufferInfo(this.mediaBuffer,t),n=Math.max(e.duration,i?i.len:this.config.maxBufferLength),r=this.backtrackFragment,a=r?e.sn-r.sn:0;(1===a||this.reduceMaxBufferLength(n))&&s.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?s.removeAllFragments():s.hasParts(e.type)&&(s.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),s.getState(e)===ui.PARTIAL&&s.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,s=null){if(!(e-t))return;const i={startOffset:e,endOffset:t,type:s};this.hls.trigger(_.BUFFER_FLUSHING,i)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(t=>{if(!t||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return t}).then(t=>{const{hls:s}=this,{payload:i}=t,n=e.decryptdata;if(i&&i.byteLength>0&&null!=n&&n.key&&n.iv&&"AES-128"===n.method){const r=self.performance.now();return this.decrypter.decrypt(new Uint8Array(i),n.key.buffer,n.iv.buffer).catch(t=>{throw s.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t}).then(i=>{const n=self.performance.now();return s.trigger(_.FRAG_DECRYPTED,{frag:e,payload:i,stats:{tstart:r,tdecrypt:n}}),t.payload=i,this.completeInitSegmentLoad(t)})}return this.completeInitSegmentLoad(t)}).catch(t=>{this.state!==Hi.STOPPED&&this.state!==Hi.ERROR&&(this.warn(t),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const s=e.frag.stats;this.state=Hi.IDLE,e.frag.data=new Uint8Array(e.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){var s,i,n,r;const a=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===Ht.MAIN?"level":"track"} ${e.level} (frag:[${(null!=(s=e.startPTS)?s:NaN).toFixed(3)}-${(null!=(i=e.endPTS)?i:NaN).toFixed(3)}] > buffer:${a?Fi.toString(_i.getBuffered(a)):"(detached)"})`),"initSegment"!==e.sn){var o;if(e.type!==Ht.SUBTITLE){const t=e.elementaryStreams;if(!Object.keys(t).some(e=>!!t[e]))return void(this.state=Hi.IDLE)}const t=null==(o=this.levels)?void 0:o[e.level];null!=t&&t.fragmentError&&(this.log(`Resetting level fragment error count of ${t.fragmentError} on frag buffered`),t.fragmentError=0)}this.state=Hi.IDLE,a&&(!this.loadedmetadata&&e.type==Ht.MAIN&&a.buffered.length&&(null==(n=this.fragCurrent)?void 0:n.sn)===(null==(r=this.fragPrevious)?void 0:r.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:s,part:i,partsLoaded:n}=e,r=!n||0===n.length||n.some(e=>!e),a=new gi(s.level,s.sn,s.stats.chunkCount+1,0,i?i.index:-1,!r);t.flush(a)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,s=null,i){var n;const r=null==t?void 0:t.details;if(!this.levels||!r)throw new Error(`frag load aborted, missing level${r?"":" detail"}s`);let a=null;if(!e.encrypted||null!=(n=e.decryptdata)&&n.key?!e.encrypted&&r.encryptedFragments.length&&this.keyLoader.loadClear(e,r.encryptedFragments):(this.log(`Loading key for ${e.sn} of [${r.startSN}-${r.endSN}], ${"[stream-controller]"===this.logPrefix?"level":"track"} ${e.level}`),this.state=Hi.KEY_LOADING,this.fragCurrent=e,a=this.keyLoader.load(e).then(e=>{if(!this.fragContextChanged(e.frag))return this.hls.trigger(_.KEY_LOADED,e),this.state===Hi.KEY_LOADING&&(this.state=Hi.IDLE),e}),this.hls.trigger(_.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(a=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),s=Math.max(e.start,s||0),this.config.lowLatencyMode&&"initSegment"!==e.sn){const n=r.partList;if(n&&i){s>e.end&&r.fragmentHint&&(e=r.fragmentHint);const o=this.getNextPart(n,e,s);if(o>-1){const d=n[o];let l;return this.log(`Loading part sn: ${e.sn} p: ${d.index} cc: ${e.cc} of playlist [${r.startSN}-${r.endSN}] parts [0-${o}-${n.length-1}] ${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(s.toFixed(3))}`),this.nextLoadPosition=d.start+d.duration,this.state=Hi.FRAG_LOADING,l=a?a.then(s=>!s||this.fragContextChanged(s.frag)?null:this.doFragPartsLoad(e,d,t,i)).catch(e=>this.handleFragLoadError(e)):this.doFragPartsLoad(e,d,t,i).catch(e=>this.handleFragLoadError(e)),this.hls.trigger(_.FRAG_LOADING,{frag:e,part:d,targetBufferTime:s}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):l}if(!e.url||this.loadedEndOfParts(n,s))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${r?"of ["+r.startSN+"-"+r.endSN+"] ":""}${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(s.toFixed(3))}`),c(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Hi.FRAG_LOADING;const o=this.config.progressive;let d;return d=o&&a?a.then(t=>!t||this.fragContextChanged(null==t?void 0:t.frag)?null:this.fragmentLoader.load(e,i)).catch(e=>this.handleFragLoadError(e)):Promise.all([this.fragmentLoader.load(e,o?i:void 0),a]).then(([e])=>(!o&&e&&i&&i(e),e)).catch(e=>this.handleFragLoadError(e)),this.hls.trigger(_.FRAG_LOADING,{frag:e,targetBufferTime:s}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):d}doFragPartsLoad(e,t,s,i){return new Promise((n,r)=>{var a;const o=[],d=null==(a=s.details)?void 0:a.partList,l=t=>{this.fragmentLoader.loadPart(e,t,i).then(i=>{o[t.index]=i;const r=i.part;this.hls.trigger(_.FRAG_LOADED,i);const a=Ds(s,e.sn,t.index+1)||ks(d,e.sn,t.index+1);if(!a)return n({frag:e,part:r,partsLoaded:o});l(a)}).catch(r)};l(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===p.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(_.ERROR,t)}else this.hls.trigger(_.ERROR,{type:g.OTHER_ERROR,details:p.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Hi.PARSING)return void(this.fragCurrent||this.state===Hi.STOPPED||this.state===Hi.ERROR||(this.state=Hi.IDLE));const{frag:s,part:i,level:n}=t,r=self.performance.now();s.stats.parsing.end=r,i&&(i.stats.parsing.end=r),this.updateLevelTiming(s,i,n,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:s}=this,{level:i,sn:n,part:r}=e;if(null==t||!t[i])return this.warn(`Levels object was unset while buffering fragment ${n} of level ${i}. The current chunk will not be buffered.`),null;const a=t[i],o=r>-1?Ds(a,n,r):null,d=o?o.fragment:vs(a,n,s);return d?(s&&s!==d&&(d.stats=s.stats),{frag:d,part:o,level:a}):null}bufferFragmentData(e,t,s,i,n){var r;if(!e||this.state!==Hi.PARSING)return;const{data1:a,data2:o}=e;let d=a;if(a&&o&&(d=$e(a,o)),null==(r=d)||!r.length)return;const l={type:e.type,frag:t,part:s,chunkMeta:i,parent:t.type,data:d};if(this.hls.trigger(_.BUFFER_APPENDING,l),e.dropped&&e.independent&&!s){if(n)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!_i.isBuffered(t,t.currentTime))return void this.flushMainBuffer(0,e.start);const s=t.currentTime,i=_i.bufferInfo(t,s,0),n=e.duration,r=Math.min(2*this.config.maxFragLookUpTolerance,.25*n),a=Math.max(Math.min(e.start-r,i.end-r),s+r);e.start-a>r&&this.flushMainBuffer(a,e.start)}getFwdBufferInfo(e,t){const s=this.getLoadPosition();return c(s)?this.getFwdBufferInfoAtPos(e,s,t):null}getFwdBufferInfoAtPos(e,t,s){const{config:{maxBufferHole:i}}=this,n=_i.bufferInfo(e,t,i);if(0===n.len&&void 0!==n.nextStart){const r=this.fragmentTracker.getBufferedFrag(t,s);if(r&&n.nextStart<r.end)return _i.bufferInfo(e,t,Math.max(n.nextStart,i))}return n}getMaxBufferLength(e){const{config:t}=this;let s;return s=e?Math.max(8*t.maxBufferSize/e,t.maxBufferLength):t.maxBufferLength,Math.min(s,t.maxMaxBufferLength)}reduceMaxBufferLength(e){const t=this.config,s=e||t.maxBufferLength,i=t.maxMaxBufferLength/2;return i>=s&&(t.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0)}getAppendedFrag(e,t=Ht.MAIN){const s=this.fragmentTracker.getAppendedFrag(e,Ht.MAIN);return s&&"fragment"in s?s.fragment:s}getNextFragment(e,t){const s=t.fragments,i=s.length;if(!i)return null;const{config:n}=this,r=s[0].start;let a;if(t.live){const o=n.initialLiveManifestSize;if(i<o)return this.warn(`Not enough fragments to start playback (have: ${i}, need: ${o})`),null;(!t.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<r)&&(a=this.getInitialLiveFragment(t,s),this.startPosition=this.nextLoadPosition=a?this.hls.liveSyncPosition||a.start:e)}else e<=r&&(a=s[0]);if(!a){const s=n.lowLatencyMode?t.partEnd:t.fragmentEnd;a=this.getFragmentAtPosition(e,s,t)}return this.mapToInitFragWhenRequired(a)}isLoopLoading(e,t){const s=this.fragmentTracker.getState(e);return(s===ui.OK||s===ui.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,s,i,n){const r=e.gap,a=this.getNextFragment(this.nextLoadPosition,t);if(null===a)return a;if(e=a,r&&e&&!e.gap&&s.nextStart){const t=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,s.nextStart,i);if(null!==t&&s.len+t.len>=n)return this.log(`buffer full after gaps in "${i}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment}getNextPart(e,t,s){let i=-1,n=!1,r=!0;for(let a=0,o=e.length;a<o;a++){const o=e[a];if(r=r&&!o.independent,i>-1&&s<o.start)break;const d=o.loaded;d?i=-1:(n||o.independent||r)&&o.fragment===t&&(i=a),n=d}return i}loadedEndOfParts(e,t){const s=e[e.length-1];return s&&t>s.start&&s.loaded}getInitialLiveFragment(e,t){const s=this.fragPrevious;let i=null;if(s){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+s.programDateTime),i=Is(t,s.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){const n=s.sn+1;if(n>=e.startSN&&n<=e.endSN){const r=t[n-e.startSN];s.cc===r.cc&&(i=r,this.log("Live playlist, switching playlist, load frag with next SN: "+i.sn))}i||(i=Hs(t,s.cc),i&&this.log("Live playlist, switching playlist, load frag with same CC: "+i.sn))}}else{const t=this.hls.liveSyncPosition;null!==t&&(i=this.getFragmentAtPosition(t,this.bitrateTest?e.fragmentEnd:e.edge,e))}return i}getFragmentAtPosition(e,t,s){const{config:i}=this;let{fragPrevious:n}=this,{fragments:r,endSN:a}=s;const{fragmentHint:o}=s,{maxFragLookUpTolerance:d}=i,l=s.partList,u=!!(i.lowLatencyMode&&null!=l&&l.length&&o);let h;if(u&&o&&!this.bitrateTest&&(r=r.concat(o),a=o.sn),e<t){const s=e>t-d?0:d;h=Ps(n,r,e,s)}else h=r[r.length-1];if(h){const e=h.sn-s.startSN,t=this.fragmentTracker.getState(h);if((t===ui.OK||t===ui.PARTIAL&&h.gap)&&(n=h),n&&h.sn===n.sn&&(!u||l[0].fragment.sn>h.sn)){const t=n&&h.level===n.level;if(t){const t=r[e+1];h=h.sn<a&&this.fragmentTracker.getState(t)!==ui.OK?t:null}}}return h}synchronizeToLiveEdge(e){const{config:t,media:s}=this;if(!s)return;const i=this.hls.liveSyncPosition,n=s.currentTime,r=e.fragments[0].start,a=e.edge,o=n>=r-t.maxFragLookUpTolerance&&n<=a;if(null!==i&&s.duration>i&&(n<i||!o)){const r=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!o&&s.readyState<4||n<a-r)&&(this.loadedmetadata||(this.nextLoadPosition=i),s.readyState&&(this.warn(`Playback: ${n.toFixed(3)} is located too far from the end of live sliding playlist: ${a}, reset currentTime to : ${i.toFixed(3)}`),s.currentTime=i))}}alignPlaylists(e,t,s){const i=e.fragments.length;if(!i)return this.warn("No fragments in live playlist"),0;const n=e.fragments[0].start,r=!t,a=e.alignedSliding&&c(n);if(r||!a&&!n){const{fragPrevious:n}=this;Di(n,s,e);const r=e.fragments[0].start;return this.log(`Live playlist sliding: ${r.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${n?n.sn:"na"} fragments: ${i}`),r}return n}waitForCdnTuneIn(e){const t=3;return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*t)}setStartPosition(e,t){let s=this.startPosition;if(s<t&&(s=-1),-1===s||-1===this.lastCurrentTime){const i=null!==this.startTimeOffset,n=i?this.startTimeOffset:e.startTimeOffset;null!==n&&c(n)?(s=t+n,n<0&&(s+=e.totalduration),s=Math.min(Math.max(t,s),t+e.totalduration),this.log(`Start time offset ${n} found in ${i?"multivariant":"media"} playlist, adjust startPosition to ${s}`),this.startPosition=s):e.live?s=this.hls.liveSyncPosition||t:this.startPosition=s=0,this.lastCurrentTime=s}this.nextLoadPosition=s}getLoadPosition(){const{media:e}=this;let t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t}handleFragLoadAborted(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===Hi.FRAG_LOADING_WAITING_RETRY)||(this.state=Hi.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const e=this.getCurrentContext(t.chunkMeta);e&&(t.frag=e.frag)}const s=t.frag;if(!s||s.type!==e||!this.levels)return;var i;if(this.fragContextChanged(s))return void this.warn(`Frag load error must match current frag to retry ${s.url} > ${null==(i=this.fragCurrent)?void 0:i.url}`);const n=t.details===p.FRAG_GAP;n&&this.fragmentTracker.fragBuffered(s,!0);const r=t.errorAction,{action:a,retryCount:o=0,retryConfig:d}=r||{};if(r&&a===Ns.RetryRequest&&d){this.resetStartWhenNotLoaded(this.levelLastLoaded);const i=Es(d,o);this.warn(`Fragment ${s.sn} of ${e} ${s.level} errored with ${t.details}, retrying loading ${o+1}/${d.maxNumRetry} in ${i}ms`),r.resolved=!0,this.retryDate=self.performance.now()+i,this.state=Hi.FRAG_LOADING_WAITING_RETRY}else if(d&&r){if(this.resetFragmentErrors(e),!(o<d.maxNumRetry))return void k.warn(`${t.details} reached or exceeded max retry (${o})`);n||a===Ns.RemoveAlternatePermanently||(r.resolved=!0)}else(null==r?void 0:r.action)===Ns.SendAlternateToPenaltyBox?this.state=Hi.WAITING_LEVEL:this.state=Hi.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===Hi.PARSING||this.state===Hi.PARSED){const t=e.parent,s=this.getFwdBufferInfo(this.mediaBuffer,t),i=s&&s.len>.5;i&&this.reduceMaxBufferLength(s.len);const n=!i;return n&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${t} buffer`),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),n}return!1}resetFragmentErrors(e){e===Ht.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==Hi.STOPPED&&(this.state=Hi.IDLE)}afterBufferFlushed(e,t,s){if(!e)return;const i=_i.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,i,s),this.state===Hi.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Hi.IDLE}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=e?e.details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,s,i){var n;const r=s.details;if(!r)return void this.warn("level.details undefined");const a=Object.keys(e.elementaryStreams).reduce((t,n)=>{const a=e.elementaryStreams[n];if(a){const o=a.endPTS-a.startPTS;if(o<=0)return this.warn(`Could not parse fragment ${e.sn} ${n} duration reliably (${o})`),t||!1;const d=i?0:fs(r,e,a.startPTS,a.endPTS,a.startDTS,a.endDTS);return this.hls.trigger(_.LEVEL_PTS_UPDATED,{details:r,level:s,drift:d,type:n,frag:e,start:a.startPTS,end:a.endPTS}),!0}return t},!1);if(!a&&null===(null==(n=this.transmuxer)?void 0:n.error)){const t=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(0===s.fragmentError&&(s.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(t.message),this.hls.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.FRAG_PARSING_ERROR,fatal:!1,error:t,frag:e,reason:`Found no media in msn ${e.sn} of level "${s.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=Hi.PARSED,this.hls.trigger(_.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}class ji{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let s;return e.length?(s=1===e.length?e[0]:Ui(e,t),this.reset(),s):new Uint8Array(0)}reset(){this.chunks.length=0,this.dataLength=0}}function Ui(e,t){const s=new Uint8Array(t);let i=0;for(let n=0;n<e.length;n++){const t=e[n];s.set(t,i),i+=t.length}return s}function Bi(){return"function"===typeof __HLS_WORKER_BUNDLE__}function $i(){const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),s=new self.Worker(t);return{worker:s,objectURL:t}}function Wi(e){const t=new self.URL(e,self.location.href).href,s=new self.Worker(t);return{worker:s,scriptURL:t}}function Gi(e="",t=9e4){return{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class Ki{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,s,i){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,s){}demux(e,t){this.cachedData&&(e=$e(this.cachedData,e),this.cachedData=null);let s,i=ie(e,0),n=i?i.length:0;const r=this._audioTrack,a=this._id3Track,o=i?ae(i):void 0,d=e.length;(null===this.basePTS||0===this.frameIndex&&c(o))&&(this.basePTS=Vi(o,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),i&&i.length>0&&a.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:qt.audioId3,duration:Number.POSITIVE_INFINITY});while(n<d){if(this.canParse(e,n)){const t=this.appendFrame(r,e,n);t?(this.frameIndex++,this.lastPTS=t.sample.pts,n+=t.length,s=n):n=d}else re(e,n)?(i=ie(e,n),a.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:qt.audioId3,duration:Number.POSITIVE_INFINITY}),n+=i.length,s=n):n++;if(n===d&&s!==d){const t=ee(e,s);this.cachedData?this.cachedData=$e(this.cachedData,t):this.cachedData=t}}return{audioTrack:r,videoTrack:Gi(),id3Track:a,textTrack:Gi()}}demuxSampleAes(e,t,s){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Gi(),id3Track:this._id3Track,textTrack:Gi()}}destroy(){}}const Vi=(e,t,s)=>{if(c(e))return 90*e;const i=s?9e4*s.baseTime/s.timescale:0;return 9e4*t+i};function zi(e,t,s,i){let n,r,a,o;const d=navigator.userAgent.toLowerCase(),l=i,u=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];n=1+((192&t[s+2])>>>6);const h=(60&t[s+2])>>>2;if(!(h>u.length-1))return a=(1&t[s+2])<<2,a|=(192&t[s+3])>>>6,k.log(`manifest codec:${i}, ADTS type:${n}, samplingIndex:${h}`),/firefox/i.test(d)?h>=6?(n=5,o=new Array(4),r=h-3):(n=2,o=new Array(2),r=h):-1!==d.indexOf("android")?(n=2,o=new Array(2),r=h):(n=5,o=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&h>=6?r=h-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(h>=6&&1===a||/vivaldi/i.test(d))||!i&&1===a)&&(n=2,o=new Array(2)),r=h)),o[0]=n<<3,o[0]|=(14&h)>>1,o[1]|=(1&h)<<7,o[1]|=a<<3,5===n&&(o[1]|=(14&r)>>1,o[2]=(1&r)<<7,o[2]|=8,o[3]=0),{config:o,samplerate:u[h],channelCount:a,codec:"mp4a.40."+n,manifestCodec:l};{const t=new Error("invalid ADTS sampling index:"+h);e.emit(_.ERROR,_.ERROR,{type:g.MEDIA_ERROR,details:p.FRAG_PARSING_ERROR,fatal:!0,error:t,reason:t.message})}}function qi(e,t){return 255===e[t]&&240===(246&e[t+1])}function Ji(e,t){return 1&e[t+1]?7:9}function Xi(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function Qi(e,t){return t+5<e.length}function Zi(e,t){return t+1<e.length&&qi(e,t)}function en(e,t){return Qi(e,t)&&qi(e,t)&&Xi(e,t)<=e.length-t}function tn(e,t){if(Zi(e,t)){const s=Ji(e,t);if(t+s>=e.length)return!1;const i=Xi(e,t);if(i<=s)return!1;const n=t+i;return n===e.length||Zi(e,n)}return!1}function sn(e,t,s,i,n){if(!e.samplerate){const r=zi(t,s,i,n);if(!r)return;e.config=r.config,e.samplerate=r.samplerate,e.channelCount=r.channelCount,e.codec=r.codec,e.manifestCodec=r.manifestCodec,k.log(`parsed codec:${e.codec}, rate:${r.samplerate}, channels:${r.channelCount}`)}}function nn(e){return 9216e4/e}function rn(e,t){const s=Ji(e,t);if(t+s<=e.length){const i=Xi(e,t)-s;if(i>0)return{headerLength:s,frameLength:i}}}function an(e,t,s,i,n){const r=nn(e.samplerate),a=i+n*r,o=rn(t,s);let d;if(o){const{frameLength:i,headerLength:n}=o,r=n+i,l=Math.max(0,s+r-t.length);l?(d=new Uint8Array(r-n),d.set(t.subarray(s+n,t.length),0)):d=t.subarray(s+n,s+r);const u={unit:d,pts:a};return l||e.samples.push(u),{sample:u,length:r,missing:l}}const l=t.length-s;d=new Uint8Array(l),d.set(t.subarray(s,t.length),0);const u={unit:d,pts:a};return{sample:u,length:l,missing:-1}}let on=null;const dn=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],ln=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],un=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],hn=[0,1,1,4];function cn(e,t,s,i,n){if(s+24>t.length)return;const r=mn(t,s);if(r&&s+r.frameLength<=t.length){const a=9e4*r.samplesPerFrame/r.sampleRate,o=i+n*a,d={unit:t.subarray(s,s+r.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=r.channelCount,e.samplerate=r.sampleRate,e.samples.push(d),{sample:d,length:r.frameLength,missing:0}}}function mn(e,t){const s=e[t+1]>>3&3,i=e[t+1]>>1&3,n=e[t+2]>>4&15,r=e[t+2]>>2&3;if(1!==s&&0!==n&&15!==n&&3!==r){const a=e[t+2]>>1&1,o=e[t+3]>>6,d=3===s?3-i:3===i?3:4,l=1e3*dn[14*d+n-1],u=3===s?0:2===s?1:2,h=ln[3*u+r],c=3===o?1:2,m=un[s][i],f=hn[i],_=8*m*f,g=Math.floor(m*l/h+a)*f;if(null===on){const e=navigator.userAgent||"",t=e.match(/Chrome\/(\d+)/i);on=t?parseInt(t[1]):0}const p=!!on&&on<=87;return p&&2===i&&l>=224e3&&0===o&&(e[t+3]=128|e[t+3]),{sampleRate:h,channelCount:c,frameLength:g,samplesPerFrame:_}}}function fn(e,t){return 255===e[t]&&224===(224&e[t+1])&&0!==(6&e[t+1])}function _n(e,t){return t+1<e.length&&fn(e,t)}function gn(e,t){const s=4;return fn(e,t)&&s<=e.length-t}function pn(e,t){if(t+1<e.length&&fn(e,t)){const s=4,i=mn(e,t);let n=s;null!=i&&i.frameLength&&(n=i.frameLength);const r=t+n;return r===e.length||_n(e,r)}return!1}class yn extends Ki{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,s,i){super.resetInitSegment(e,t,s,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=ie(e,0);let s=(null==t?void 0:t.length)||0;if(pn(e,s))return!1;for(let i=e.length;s<i;s++)if(tn(e,s))return k.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return en(e,t)}appendFrame(e,t,s){sn(e,this.observer,t,s,e.manifestCodec);const i=an(e,t,s,this.basePTS,this.frameIndex);if(i&&0===i.missing)return i}}const Ln=/\/emsg[-/]ID3/i;class Mn{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,s,i){const n=this.videoTrack=Gi("video",1),r=this.audioTrack=Gi("audio",1),a=this.txtTrack=Gi("text",1);if(this.id3Track=Gi("id3",1),this.timeOffset=0,null==e||!e.byteLength)return;const o=Re(e);if(o.video){const{id:e,timescale:t,codec:s}=o.video;n.id=e,n.timescale=a.timescale=t,n.codec=s}if(o.audio){const{id:e,timescale:t,codec:s}=o.audio;r.id=e,r.timescale=t,r.codec=s}a.id=Te.text,n.sampleDuration=0,n.duration=r.duration=i}resetContiguity(){this.remainderData=null}static probe(e){return Ee(e)}demux(e,t){this.timeOffset=t;let s=e;const i=this.videoTrack,n=this.txtTrack;if(this.config.progressive){this.remainderData&&(s=$e(this.remainderData,e));const t=Be(s);this.remainderData=t.remainder,i.samples=t.valid||new Uint8Array}else i.samples=s;const r=this.extractID3Track(i,t);return n.samples=We(t,i),{videoTrack:i,audioTrack:this.audioTrack,id3Track:r,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,s=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const i=this.extractID3Track(t,this.timeOffset);return s.samples=We(e,t),{videoTrack:t,audioTrack:Gi(),id3Track:i,textTrack:Gi()}}extractID3Track(e,t){const s=this.id3Track;if(e.samples.length){const i=Ye(e.samples,["emsg"]);i&&i.forEach(e=>{const i=qe(e);if(Ln.test(i.schemeIdUri)){const e=c(i.presentationTime)?i.presentationTime/i.timeScale:t+i.presentationTimeDelta/i.timeScale;let n=4294967295===i.eventDuration?Number.POSITIVE_INFINITY:i.eventDuration/i.timeScale;n<=.001&&(n=Number.POSITIVE_INFINITY);const r=i.payload;s.samples.push({data:r,len:r.byteLength,dts:e,pts:e,type:qt.emsg,duration:n})}})}return s}demuxSampleAes(e,t,s){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}const Tn=(e,t)=>{let s=0,i=5;t+=i;const n=new Uint32Array(1),r=new Uint32Array(1),a=new Uint8Array(1);while(i>0){a[0]=e[t];const o=Math.min(i,8),d=8-o;r[0]=4278190080>>>24+d<<d,n[0]=(a[0]&r[0])>>d,s=s?s<<o|n[0]:n[0],t+=1,i-=o}return s};class vn extends Ki{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,s,i){super.resetInitSegment(e,t,s,i),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,s){const i=Dn(e,t,s,this.basePTS,this.frameIndex);if(-1!==i){const t=e.samples[e.samples.length-1];return{sample:t,length:i,missing:0}}}static probe(e){if(!e)return!1;const t=ie(e,0);if(!t)return!1;const s=t.length;return 11===e[s]&&119===e[s+1]&&void 0!==ae(t)&&Tn(e,s)<16}}function Dn(e,t,s,i,n){if(s+8>t.length)return-1;if(11!==t[s]||119!==t[s+1])return-1;const r=t[s+4]>>6;if(r>=3)return-1;const a=[48e3,44100,32e3],o=a[r],d=63&t[s+4],l=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920],u=2*l[3*d+r];if(s+u>t.length)return-1;const h=t[s+6]>>5;let c=0;2===h?c+=2:(1&h&&1!==h&&(c+=2),4&h&&(c+=2));const m=(t[s+6]<<8|t[s+7])>>12-c&1,f=[2,1,2,3,3,4,4,5],_=f[h]+m,g=t[s+5]>>3,p=7&t[s+5],y=new Uint8Array([r<<6|g<<1|p>>2,(3&p)<<6|h<<3|m<<2|d>>4,d<<4&224]),L=1536/o*9e4,M=i+n*L,T=t.subarray(s,s+u);return e.config=y,e.channelCount=_,e.samplerate=o,e.samples.push({unit:T,pts:M}),u}class kn{constructor(){this.VideoSample=null}createVideoSample(e,t,s,i){return{key:e,frame:!1,pts:t,dts:s,units:[],debug:i,length:0}}getLastNalUnit(e){var t;let s,i=this.VideoSample;if(i&&0!==i.units.length||(i=e[e.length-1]),null!=(t=i)&&t.units){const e=i.units;s=e[e.length-1]}return s}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){const s=t.samples,i=s.length;if(!i)return void t.dropped++;{const t=s[i-1];e.pts=t.pts,e.dts=t.dts}}t.samples.push(e)}e.debug.length&&k.log(e.pts+"/"+e.dts+":"+e.debug)}}class Sn{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,s=e.byteLength-t,i=new Uint8Array(4),n=Math.min(4,t);if(0===n)throw new Error("no bytes available");i.set(e.subarray(s,s+n)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*n,this.bytesAvailable-=n}skipBits(e){let t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const s=this.word>>>32-t;if(e>32&&k.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return t=e-t,t>0&&this.bitsAvailable?s<<t|this.readBits(t):s}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(0!==(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return 1===this.readBits(1)}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t,s=8,i=8;for(let n=0;n<e;n++)0!==i&&(t=this.readEG(),i=(s+t+256)%256),s=0===i?s:i}readSPS(){let e,t,s,i=0,n=0,r=0,a=0;const o=this.readUByte.bind(this),d=this.readBits.bind(this),l=this.readUEG.bind(this),u=this.readBoolean.bind(this),h=this.skipBits.bind(this),c=this.skipEG.bind(this),m=this.skipUEG.bind(this),f=this.skipScalingList.bind(this);o();const _=o();if(d(5),h(3),o(),m(),100===_||110===_||122===_||244===_||44===_||83===_||86===_||118===_||128===_){const e=l();if(3===e&&h(1),m(),m(),h(1),u())for(t=3!==e?8:12,s=0;s<t;s++)u()&&f(s<6?16:64)}m();const g=l();if(0===g)l();else if(1===g)for(h(1),c(),c(),e=l(),s=0;s<e;s++)c();m(),h(1);const p=l(),y=l(),L=d(1);0===L&&h(1),h(1),u()&&(i=l(),n=l(),r=l(),a=l());let M=[1,1];if(u()&&u()){const e=o();switch(e){case 1:M=[1,1];break;case 2:M=[12,11];break;case 3:M=[10,11];break;case 4:M=[16,11];break;case 5:M=[40,33];break;case 6:M=[24,11];break;case 7:M=[20,11];break;case 8:M=[32,11];break;case 9:M=[80,33];break;case 10:M=[18,11];break;case 11:M=[15,11];break;case 12:M=[64,33];break;case 13:M=[160,99];break;case 14:M=[4,3];break;case 15:M=[3,2];break;case 16:M=[2,1];break;case 255:M=[o()<<8|o(),o()<<8|o()];break}}return{width:Math.ceil(16*(p+1)-2*i-2*n),height:(2-L)*(y+1)*16-(L?2:4)*(r+a),pixelRatio:M}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class wn extends kn{parseAVCPES(e,t,s,i,n){const r=this.parseAVCNALu(e,s.data);let a,o=this.VideoSample,d=!1;s.data=null,o&&r.length&&!e.audFound&&(this.pushAccessUnit(o,e),o=this.VideoSample=this.createVideoSample(!1,s.pts,s.dts,"")),r.forEach(i=>{var r;switch(i.type){case 1:{let t=!1;a=!0;const n=i.data;if(d&&n.length>4){const e=new Sn(n).readSliceType();2!==e&&4!==e&&7!==e&&9!==e||(t=!0)}var l;if(t)null!=(l=o)&&l.frame&&!o.key&&(this.pushAccessUnit(o,e),o=this.VideoSample=null);o||(o=this.VideoSample=this.createVideoSample(!0,s.pts,s.dts,"")),o.frame=!0,o.key=t;break}case 5:a=!0,null!=(r=o)&&r.frame&&!o.key&&(this.pushAccessUnit(o,e),o=this.VideoSample=null),o||(o=this.VideoSample=this.createVideoSample(!0,s.pts,s.dts,"")),o.key=!0,o.frame=!0;break;case 6:a=!0,Ve(i.data,1,s.pts,t.samples);break;case 7:{var u,h;a=!0,d=!0;const t=i.data,s=new Sn(t),r=s.readSPS();if(!e.sps||e.width!==r.width||e.height!==r.height||(null==(u=e.pixelRatio)?void 0:u[0])!==r.pixelRatio[0]||(null==(h=e.pixelRatio)?void 0:h[1])!==r.pixelRatio[1]){e.width=r.width,e.height=r.height,e.pixelRatio=r.pixelRatio,e.sps=[t],e.duration=n;const s=t.subarray(1,4);let i="avc1.";for(let e=0;e<3;e++){let t=s[e].toString(16);t.length<2&&(t="0"+t),i+=t}e.codec=i}break}case 8:a=!0,e.pps=[i.data];break;case 9:a=!0,e.audFound=!0,o&&this.pushAccessUnit(o,e),o=this.VideoSample=this.createVideoSample(!1,s.pts,s.dts,"");break;case 12:a=!0;break;default:a=!1,o&&(o.debug+="unknown NAL "+i.type+" ");break}if(o&&a){const e=o.units;e.push(i)}}),i&&o&&(this.pushAccessUnit(o,e),this.VideoSample=null)}parseAVCNALu(e,t){const s=t.byteLength;let i=e.naluState||0;const n=i,r=[];let a,o,d,l=0,u=-1,h=0;-1===i&&(u=0,h=31&t[0],i=0,l=1);while(l<s)if(a=t[l++],i)if(1!==i)if(a)if(1===a){if(o=l-i-1,u>=0){const e={data:t.subarray(u,o),type:h};r.push(e)}else{const s=this.getLastNalUnit(e.samples);s&&(n&&l<=4-n&&s.state&&(s.data=s.data.subarray(0,s.data.byteLength-n)),o>0&&(s.data=$e(s.data,t.subarray(0,o)),s.state=0))}l<s?(d=31&t[l],u=l,h=d,i=0):i=-1}else i=0;else i=3;else i=a?0:2;else i=a?0:1;if(u>=0&&i>=0){const e={data:t.subarray(u,s),type:h,state:i};r.push(e)}if(0===r.length){const s=this.getLastNalUnit(e.samples);s&&(s.data=$e(s.data,t))}return e.naluState=i,r}}class bn{constructor(e,t,s){this.keyData=void 0,this.decrypter=void 0,this.keyData=s,this.decrypter=new Ci(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,t,s){const i=e[t].unit;if(i.length<=16)return;const n=i.subarray(16,i.length-i.length%16),r=n.buffer.slice(n.byteOffset,n.byteOffset+n.length);this.decryptBuffer(r).then(n=>{const r=new Uint8Array(n);i.set(r,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,s)})}decryptAacSamples(e,t,s){for(;;t++){if(t>=e.length)return void s();if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,s),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=16*Math.floor((e.length-48)/160)+16,s=new Int8Array(t);let i=0;for(let n=32;n<e.length-16;n+=160,i+=16)s.set(e.subarray(n,n+16),i);return s}getAvcDecryptedUnit(e,t){const s=new Uint8Array(t);let i=0;for(let n=32;n<e.length-16;n+=160,i+=16)e.set(s.subarray(i,i+16),n);return e}decryptAvcSample(e,t,s,i,n){const r=ze(n.data),a=this.getAvcEncryptedData(r);this.decryptBuffer(a.buffer).then(a=>{n.data=this.getAvcDecryptedUnit(r,a),this.decrypter.isSync()||this.decryptAvcSamples(e,t,s+1,i)})}decryptAvcSamples(e,t,s,i){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,s=0){if(t>=e.length)return void i();const n=e[t].units;for(;;s++){if(s>=n.length)break;const r=n[s];if(!(r.data.length<=48||1!==r.type&&5!==r.type)&&(this.decryptAvcSample(e,t,s,i,r),!this.decrypter.isSync()))return}}}}const En=188;class Yn{constructor(e,t,s){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=s,this.videoParser=new wn}static probe(e){const t=Yn.syncOffset(e);return t>0&&k.warn("MPEG2-TS detected but first sync word found @ offset "+t),-1!==t}static syncOffset(e){const t=e.length;let s=Math.min(5*En,t-En)+1,i=0;while(i<s){let n=!1,r=-1,a=0;for(let o=i;o<t;o+=En){if(71!==e[o]||t-o!==En&&71!==e[o+En]){if(a)return-1;break}if(a++,-1===r&&(r=o,0!==r&&(s=Math.min(r+99*En,e.length-En)+1)),n||(n=0===An(e,o)),n&&a>1&&(0===r&&a>2||o+En>s))return r}i++}return-1}static createTrack(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:Te[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}}resetInitSegment(e,t,s,i){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Yn.createTrack("video"),this._audioTrack=Yn.createTrack("audio",i),this._id3Track=Yn.createTrack("id3"),this._txtTrack=Yn.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=s,this._duration=i}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:s}=this;e&&(e.pesData=null),t&&(t.pesData=null),s&&(s.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,s=!1,i=!1){let n;s||(this.sampleAes=null);const r=this._videoTrack,a=this._audioTrack,o=this._id3Track,d=this._txtTrack;let l=r.pid,u=r.pesData,h=a.pid,c=o.pid,m=a.pesData,f=o.pesData,_=null,g=this.pmtParsed,p=this._pmtId,y=e.length;if(this.remainderData&&(e=$e(this.remainderData,e),y=e.length,this.remainderData=null),y<En&&!i)return this.remainderData=e,{audioTrack:a,videoTrack:r,id3Track:o,textTrack:d};const L=Math.max(0,Yn.syncOffset(e));y-=(y-L)%En,y<e.byteLength&&!i&&(this.remainderData=new Uint8Array(e.buffer,y,e.buffer.byteLength-y));let M=0;for(let v=L;v<y;v+=En)if(71===e[v]){const t=!!(64&e[v+1]),i=An(e,v),y=(48&e[v+3])>>4;let M;if(y>1){if(M=v+5+e[v+4],M===v+En)continue}else M=v+4;switch(i){case l:t&&(u&&(n=On(u))&&this.videoParser.parseAVCPES(r,d,n,!1,this._duration),u={data:[],size:0}),u&&(u.data.push(e.subarray(M,v+En)),u.size+=v+En-M);break;case h:if(t){if(m&&(n=On(m)))switch(a.segmentCodec){case"aac":this.parseAACPES(a,n);break;case"mp3":this.parseMPEGPES(a,n);break;case"ac3":this.parseAC3PES(a,n);break}m={data:[],size:0}}m&&(m.data.push(e.subarray(M,v+En)),m.size+=v+En-M);break;case c:t&&(f&&(n=On(f))&&this.parseID3PES(o,n),f={data:[],size:0}),f&&(f.data.push(e.subarray(M,v+En)),f.size+=v+En-M);break;case 0:t&&(M+=e[M]+1),p=this._pmtId=Rn(e,M);break;case p:{t&&(M+=e[M]+1);const i=xn(e,M,this.typeSupported,s,this.observer);l=i.videoPid,l>0&&(r.pid=l,r.segmentCodec=i.segmentVideoCodec),h=i.audioPid,h>0&&(a.pid=h,a.segmentCodec=i.segmentAudioCodec),c=i.id3Pid,c>0&&(o.pid=c),null===_||g||(k.warn(`MPEG-TS PMT found at ${v} after unknown PID '${_}'. Backtracking to sync byte @${L} to parse all TS packets.`),_=null,v=L-188),g=this.pmtParsed=!0;break}case 17:case 8191:break;default:_=i;break}}else M++;M>0&&In(this.observer,new Error(`Found ${M} TS packet/s that do not start with 0x47`)),r.pesData=u,a.pesData=m,o.pesData=f;const T={audioTrack:a,videoTrack:r,id3Track:o,textTrack:d};return i&&this.extractRemainingSamples(T),T}flush(){const{remainderData:e}=this;let t;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:s,id3Track:i,textTrack:n}=e,r=s.pesData,a=t.pesData,o=i.pesData;let d;if(r&&(d=On(r))?(this.videoParser.parseAVCPES(s,n,d,!0,this._duration),s.pesData=null):s.pesData=r,a&&(d=On(a))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,d);break;case"mp3":this.parseMPEGPES(t,d);break;case"ac3":this.parseAC3PES(t,d);break}t.pesData=null}else null!=a&&a.size&&k.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=a;o&&(d=On(o))?(this.parseID3PES(i,d),i.pesData=null):i.pesData=o}demuxSampleAes(e,t,s){const i=this.demux(e,s,!0,!this.config.progressive),n=this.sampleAes=new bn(this.observer,this.config,t);return this.decrypt(i,n)}decrypt(e,t){return new Promise(s=>{const{audioTrack:i,videoTrack:n}=e;i.samples&&"aac"===i.segmentCodec?t.decryptAacSamples(i.samples,0,()=>{n.samples?t.decryptAvcSamples(n.samples,0,0,()=>{s(e)}):s(e)}):n.samples&&t.decryptAvcSamples(n.samples,0,0,()=>{s(e)})})}destroy(){this._duration=0}parseAACPES(e,t){let s=0;const i=this.aacOverFlow;let n,r,a,o=t.data;if(i){this.aacOverFlow=null;const t=i.missing,n=i.sample.unit.byteLength;if(-1===t)o=$e(i.sample.unit,o);else{const r=n-t;i.sample.unit.set(o.subarray(0,t),r),e.samples.push(i.sample),s=i.missing}}for(n=s,r=o.length;n<r-1;n++)if(Zi(o,n))break;if(n!==s){let e;const t=n<r-1;if(e=t?"AAC PES did not start with ADTS header,offset:"+n:"No ADTS header found in AAC PES",In(this.observer,new Error(e),t),!t)return}if(sn(e,this.observer,o,n,this.audioCodec),void 0!==t.pts)a=t.pts;else{if(!i)return void k.warn("[tsdemuxer]: AAC PES unknown PTS");{const t=nn(e.samplerate);a=i.sample.pts+t}}let d,l=0;while(n<r){if(d=an(e,o,n,a,l),n+=d.length,d.missing){this.aacOverFlow=d;break}for(l++;n<r-1;n++)if(Zi(o,n))break}}parseMPEGPES(e,t){const s=t.data,i=s.length;let n=0,r=0;const a=t.pts;if(void 0!==a)while(r<i)if(_n(s,r)){const t=cn(e,s,r,a,n);if(!t)break;r+=t.length,n++}else r++;else k.warn("[tsdemuxer]: MPEG PES unknown PTS")}parseAC3PES(e,t){{const s=t.data,i=t.pts;if(void 0===i)return void k.warn("[tsdemuxer]: AC3 PES unknown PTS");const n=s.length;let r,a=0,o=0;while(o<n&&(r=Dn(e,s,o,i,a++))>0)o+=r}}parseID3PES(e,t){if(void 0===t.pts)return void k.warn("[tsdemuxer]: ID3 PES unknown PTS");const s=h({},t,{type:this._videoTrack?qt.emsg:qt.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(s)}}function An(e,t){return((31&e[t+1])<<8)+e[t+2]}function Rn(e,t){return(31&e[t+10])<<8|e[t+11]}function xn(e,t,s,i,n){const r={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},a=(15&e[t+1])<<8|e[t+2],o=t+3+a-4,d=(15&e[t+10])<<8|e[t+11];t+=12+d;while(t<o){const a=An(e,t),o=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!i){Pn("ADTS AAC");break}case 15:-1===r.audioPid&&(r.audioPid=a);break;case 21:-1===r.id3Pid&&(r.id3Pid=a);break;case 219:if(!i){Pn("H.264");break}case 27:-1===r.videoPid&&(r.videoPid=a,r.segmentVideoCodec="avc");break;case 3:case 4:s.mpeg||s.mp3?-1===r.audioPid&&(r.audioPid=a,r.segmentAudioCodec="mp3"):k.log("MPEG audio found, not supported in this browser");break;case 193:if(!i){Pn("AC-3");break}case 129:s.ac3?-1===r.audioPid&&(r.audioPid=a,r.segmentAudioCodec="ac3"):k.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===r.audioPid&&o>0){let i=t+5,n=o;while(n>2){const t=e[i];switch(t){case 106:!0!==s.ac3?k.log("AC-3 audio found, not supported in this browser for now"):(r.audioPid=a,r.segmentAudioCodec="ac3");break}const o=e[i+1]+2;i+=o,n-=o}}break;case 194:case 135:return In(n,new Error("Unsupported EC-3 in M2TS found")),r;case 36:return In(n,new Error("Unsupported HEVC in M2TS found")),r}t+=o+5}return r}function In(e,t,s){k.warn("parsing error: "+t.message),e.emit(_.ERROR,_.ERROR,{type:g.MEDIA_ERROR,details:p.FRAG_PARSING_ERROR,fatal:!1,levelRetry:s,error:t,reason:t.message})}function Pn(e){k.log(e+" with AES-128-CBC encryption found in unencrypted stream")}function On(e){let t,s,i,n,r,a=0;const o=e.data;if(!e||0===e.size)return null;while(o[0].length<19&&o.length>1)o[0]=$e(o[0],o[1]),o.splice(1,1);t=o[0];const d=(t[0]<<16)+(t[1]<<8)+t[2];if(1===d){if(s=(t[4]<<8)+t[5],s&&s>e.size-6)return null;const d=t[7];192&d&&(n=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&d?(r=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,n-r>54e5&&(k.warn(Math.round((n-r)/9e4)+"s delta between PTS and DTS, align them"),n=r)):r=n),i=t[8];let l=i+9;if(e.size<=l)return null;e.size-=l;const u=new Uint8Array(e.size);for(let e=0,s=o.length;e<s;e++){t=o[e];let s=t.byteLength;if(l){if(l>s){l-=s;continue}t=t.subarray(l),s-=l,l=0}u.set(t,a),a+=s}return s&&(s-=i+3),{data:u,pts:n,dts:r,len:s}}return null}class Cn extends Ki{resetInitSegment(e,t,s,i){super.resetInitSegment(e,t,s,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=ie(e,0);let s=(null==t?void 0:t.length)||0;if(t&&11===e[s]&&119===e[s+1]&&void 0!==ae(t)&&Tn(e,s)<=16)return!1;for(let i=e.length;s<i;s++)if(pn(e,s))return k.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return gn(e,t)}appendFrame(e,t,s){if(null!==this.basePTS)return cn(e,t,s,this.basePTS,this.frameIndex)}}class Fn{static getSilentFrame(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const Hn=Math.pow(2,32)-1;class Nn{static init(){let e;for(e in Nn.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},Nn.types)Nn.types.hasOwnProperty(e)&&(Nn.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),s=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Nn.HDLR_TYPES={video:t,audio:s};const i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);Nn.STTS=Nn.STSC=Nn.STCO=n,Nn.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Nn.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Nn.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Nn.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const r=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);Nn.FTYP=Nn.box(Nn.types.ftyp,r,o,r,a),Nn.DINF=Nn.box(Nn.types.dinf,Nn.box(Nn.types.dref,i))}static box(e,...t){let s=8,i=t.length;const n=i;while(i--)s+=t[i].byteLength;const r=new Uint8Array(s);for(r[0]=s>>24&255,r[1]=s>>16&255,r[2]=s>>8&255,r[3]=255&s,r.set(e,4),i=0,s=8;i<n;i++)r.set(t[i],s),s+=t[i].byteLength;return r}static hdlr(e){return Nn.box(Nn.types.hdlr,Nn.HDLR_TYPES[e])}static mdat(e){return Nn.box(Nn.types.mdat,e)}static mdhd(e,t){t*=e;const s=Math.floor(t/(Hn+1)),i=Math.floor(t%(Hn+1));return Nn.box(Nn.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,s>>24,s>>16&255,s>>8&255,255&s,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))}static mdia(e){return Nn.box(Nn.types.mdia,Nn.mdhd(e.timescale,e.duration),Nn.hdlr(e.type),Nn.minf(e))}static mfhd(e){return Nn.box(Nn.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}static minf(e){return"audio"===e.type?Nn.box(Nn.types.minf,Nn.box(Nn.types.smhd,Nn.SMHD),Nn.DINF,Nn.stbl(e)):Nn.box(Nn.types.minf,Nn.box(Nn.types.vmhd,Nn.VMHD),Nn.DINF,Nn.stbl(e))}static moof(e,t,s){return Nn.box(Nn.types.moof,Nn.mfhd(e),Nn.traf(s,t))}static moov(e){let t=e.length;const s=[];while(t--)s[t]=Nn.trak(e[t]);return Nn.box.apply(null,[Nn.types.moov,Nn.mvhd(e[0].timescale,e[0].duration)].concat(s).concat(Nn.mvex(e)))}static mvex(e){let t=e.length;const s=[];while(t--)s[t]=Nn.trex(e[t]);return Nn.box.apply(null,[Nn.types.mvex,...s])}static mvhd(e,t){t*=e;const s=Math.floor(t/(Hn+1)),i=Math.floor(t%(Hn+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,s>>24,s>>16&255,s>>8&255,255&s,i>>24,i>>16&255,i>>8&255,255&i,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 Nn.box(Nn.types.mvhd,n)}static sdtp(e){const t=e.samples||[],s=new Uint8Array(4+t.length);let i,n;for(i=0;i<t.length;i++)n=t[i].flags,s[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return Nn.box(Nn.types.sdtp,s)}static stbl(e){return Nn.box(Nn.types.stbl,Nn.stsd(e),Nn.box(Nn.types.stts,Nn.STTS),Nn.box(Nn.types.stsc,Nn.STSC),Nn.box(Nn.types.stsz,Nn.STSZ),Nn.box(Nn.types.stco,Nn.STCO))}static avc1(e){let t,s,i,n=[],r=[];for(t=0;t<e.sps.length;t++)s=e.sps[t],i=s.byteLength,n.push(i>>>8&255),n.push(255&i),n=n.concat(Array.prototype.slice.call(s));for(t=0;t<e.pps.length;t++)s=e.pps[t],i=s.byteLength,r.push(i>>>8&255),r.push(255&i),r=r.concat(Array.prototype.slice.call(s));const a=Nn.box(Nn.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(r))),o=e.width,d=e.height,l=e.pixelRatio[0],u=e.pixelRatio[1];return Nn.box(Nn.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,d>>8&255,255&d,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a,Nn.box(Nn.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Nn.box(Nn.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,255&l,u>>24,u>>16&255,u>>8&255,255&u])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static audioStsd(e){const t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0])}static mp4a(e){return Nn.box(Nn.types.mp4a,Nn.audioStsd(e),Nn.box(Nn.types.esds,Nn.esds(e)))}static mp3(e){return Nn.box(Nn.types[".mp3"],Nn.audioStsd(e))}static ac3(e){return Nn.box(Nn.types["ac-3"],Nn.audioStsd(e),Nn.box(Nn.types.dac3,e.config))}static stsd(e){return"audio"===e.type?"mp3"===e.segmentCodec&&"mp3"===e.codec?Nn.box(Nn.types.stsd,Nn.STSD,Nn.mp3(e)):"ac3"===e.segmentCodec?Nn.box(Nn.types.stsd,Nn.STSD,Nn.ac3(e)):Nn.box(Nn.types.stsd,Nn.STSD,Nn.mp4a(e)):Nn.box(Nn.types.stsd,Nn.STSD,Nn.avc1(e))}static tkhd(e){const t=e.id,s=e.duration*e.timescale,i=e.width,n=e.height,r=Math.floor(s/(Hn+1)),a=Math.floor(s%(Hn+1));return Nn.box(Nn.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,a>>24,a>>16&255,a>>8&255,255&a,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,n>>8&255,255&n,0,0]))}static traf(e,t){const s=Nn.sdtp(e),i=e.id,n=Math.floor(t/(Hn+1)),r=Math.floor(t%(Hn+1));return Nn.box(Nn.types.traf,Nn.box(Nn.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),Nn.box(Nn.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,r>>24,r>>16&255,r>>8&255,255&r])),Nn.trun(e,s.length+16+20+8+16+8+8),s)}static trak(e){return e.duration=e.duration||4294967295,Nn.box(Nn.types.trak,Nn.tkhd(e),Nn.mdia(e))}static trex(e){const t=e.id;return Nn.box(Nn.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const s=e.samples||[],i=s.length,n=12+16*i,r=new Uint8Array(n);let a,o,d,l,u,h;for(t+=8+n,r.set(["video"===e.type?1:0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),a=0;a<i;a++)o=s[a],d=o.duration,l=o.size,u=o.flags,h=o.cts,r.set([d>>>24&255,d>>>16&255,d>>>8&255,255&d,l>>>24&255,l>>>16&255,l>>>8&255,255&l,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.paddingValue<<1|u.isNonSync,61440&u.degradPrio,15&u.degradPrio,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*a);return Nn.box(Nn.types.trun,r)}static initSegment(e){Nn.types||Nn.init();const t=Nn.moov(e),s=$e(Nn.FTYP,t);return s}}Nn.types=void 0,Nn.HDLR_TYPES=void 0,Nn.STTS=void 0,Nn.STSC=void 0,Nn.STCO=void 0,Nn.STSZ=void 0,Nn.VMHD=void 0,Nn.SMHD=void 0,Nn.STSD=void 0,Nn.FTYP=void 0,Nn.DINF=void 0;const jn=9e4;function Un(e,t,s=1,i=!1){const n=e*t*s;return i?Math.round(n):n}function Bn(e,t,s=1,i=!1){return Un(e,t,1/s,i)}function $n(e,t=!1){return Un(e,1e3,1/jn,t)}function Wn(e,t=1){return Un(e,jn,1/t)}const Gn=1e4,Kn=1024,Vn=1152,zn=1536;let qn,Jn=null,Xn=null;class Qn{constructor(e,t,s,i=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=s,this.ISGenerated=!1,null===Jn){const e=navigator.userAgent||"",t=e.match(/Chrome\/(\d+)/i);Jn=t?parseInt(t[1]):0}if(null===Xn){const e=navigator.userAgent.match(/Safari\/(\d+)/i);Xn=e?parseInt(e[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){k.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){k.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){k.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const s=e.reduce((e,s)=>{const i=s.pts-e;return i<-4294967296?(t=!0,Zn(e,s.pts)):i>0?e:s.pts},e[0].pts);return t&&k.debug("PTS rollover detected"),s}remux(e,t,s,i,n,r,a,o){let d,l,u,h,c,m,f=n,_=n;const g=e.pid>-1,p=t.pid>-1,y=t.samples.length,L=e.samples.length>0,M=a&&y>0||y>1,T=(!g||L)&&(!p||M)||this.ISGenerated||a;if(T){if(this.ISGenerated){var v,D,S,w;const e=this.videoTrackConfig;!e||t.width===e.width&&t.height===e.height&&(null==(v=t.pixelRatio)?void 0:v[0])===(null==(D=e.pixelRatio)?void 0:D[0])&&(null==(S=t.pixelRatio)?void 0:S[1])===(null==(w=e.pixelRatio)?void 0:w[1])||this.resetInitSegment()}else u=this.generateIS(e,t,n,r);const s=this.isVideoContiguous;let i,a=-1;if(M&&(a=er(t.samples),!s&&this.config.forceKeyFrameOnDiscontinuity))if(m=!0,a>0){k.warn(`[mp4-remuxer]: Dropped ${a} out of ${y} video samples due to a missing keyframe`);const e=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(a),t.dropped+=a,_+=(t.samples[0].pts-e)/t.inputTimeScale,i=_}else-1===a&&(k.warn(`[mp4-remuxer]: No keyframe found out of ${y} video samples`),m=!1);if(this.ISGenerated){if(L&&M){const s=this.getVideoStartPts(t.samples),i=Zn(e.samples[0].pts,s)-s,n=i/t.inputTimeScale;f+=Math.max(0,n),_+=Math.max(0,-n)}if(L){if(e.samplerate||(k.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),u=this.generateIS(e,t,n,r)),l=this.remuxAudio(e,f,this.isAudioContiguous,r,p||M||o===Ht.AUDIO?_:void 0),M){const i=l?l.endPTS-l.startPTS:0;t.inputTimeScale||(k.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),u=this.generateIS(e,t,n,r)),d=this.remuxVideo(t,_,s,i)}}else M&&(d=this.remuxVideo(t,_,s,0));d&&(d.firstKeyFrame=a,d.independent=-1!==a,d.firstKeyFramePTS=i)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(s.samples.length&&(c=tr(s,n,this._initPTS,this._initDTS)),i.samples.length&&(h=sr(i,n,this._initPTS))),{audio:l,video:d,initSegment:u,independent:m,text:h,id3:c}}generateIS(e,t,s,i){const n=e.samples,r=t.samples,a=this.typeSupported,o={},d=this._initPTS;let l,u,h,c=!d||i,m="audio/mp4";if(c&&(l=u=1/0),e.config&&n.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":a.mpeg?(m="audio/mpeg",e.codec=""):a.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}o.audio={id:"audio",container:m,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&a.mpeg?new Uint8Array(0):Nn.initSegment([e]),metadata:{channelCount:e.channelCount}},c&&(h=e.inputTimeScale,d&&h===d.timescale?c=!1:l=u=n[0].pts-Math.round(h*s))}if(t.sps&&t.pps&&r.length){if(t.timescale=t.inputTimeScale,o.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Nn.initSegment([t]),metadata:{width:t.width,height:t.height}},c)if(h=t.inputTimeScale,d&&h===d.timescale)c=!1;else{const e=this.getVideoStartPts(r),t=Math.round(h*s);u=Math.min(u,Zn(r[0].dts,e)-t),l=Math.min(l,e-t)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(o).length)return this.ISGenerated=!0,c?(this._initPTS={baseTime:l,timescale:h},this._initDTS={baseTime:u,timescale:h}):l=h=void 0,{tracks:o,initPTS:l,timescale:h}}remuxVideo(e,t,s,i){const n=e.inputTimeScale,r=e.samples,a=[],o=r.length,d=this._initPTS;let l,u,c=this.nextAvcDts,m=8,f=this.videoSampleDuration,y=Number.POSITIVE_INFINITY,L=Number.NEGATIVE_INFINITY,M=!1;if(!s||null===c){const e=t*n,i=r[0].pts-Zn(r[0].dts,r[0].pts);Jn&&null!==c&&Math.abs(e-i-c)<15e3?s=!0:c=e-i}const T=d.baseTime*n/d.timescale;for(let h=0;h<o;h++){const e=r[h];e.pts=Zn(e.pts-T,c),e.dts=Zn(e.dts-T,c),e.dts<r[h>0?h-1:h].dts&&(M=!0)}M&&r.sort((function(e,t){const s=e.dts-t.dts,i=e.pts-t.pts;return s||i})),l=r[0].dts,u=r[r.length-1].dts;const v=u-l,D=v?Math.round(v/(o-1)):f||e.inputTimeScale/30;if(s){const e=l-c,s=e>D,i=e<-1;if((s||i)&&(s?k.warn(`AVC: ${$n(e,!0)} ms (${e}dts) hole between fragments detected at ${t.toFixed(3)}`):k.warn(`AVC: ${$n(-e,!0)} ms (${e}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!i||c>=r[0].pts||Jn)){l=c;const t=r[0].pts-e;if(s)r[0].dts=l,r[0].pts=t;else for(let s=0;s<r.length;s++){if(r[s].dts>t)break;r[s].dts-=e,r[s].pts-=e}k.log(`Video: Initial PTS/DTS adjusted: ${$n(t,!0)}/${$n(l,!0)}, delta: ${$n(e,!0)} ms`)}}l=Math.max(0,l);let S=0,w=0,b=l;for(let h=0;h<o;h++){const e=r[h],t=e.units,s=t.length;let i=0;for(let n=0;n<s;n++)i+=t[n].data.length;w+=i,S+=s,e.length=i,e.dts<b?(e.dts=b,b+=D/4|0||1):b=e.dts,y=Math.min(e.pts,y),L=Math.max(e.pts,L)}u=r[o-1].dts;const E=w+4*S+8;let Y;try{Y=new Uint8Array(E)}catch(N){return void this.observer.emit(_.ERROR,_.ERROR,{type:g.MUX_ERROR,details:p.REMUX_ALLOC_ERROR,fatal:!1,error:N,bytes:E,reason:"fail allocating video mdat "+E})}const A=new DataView(Y.buffer);A.setUint32(0,E),Y.set(Nn.types.mdat,4);let R=!1,x=Number.POSITIVE_INFINITY,I=Number.POSITIVE_INFINITY,P=Number.NEGATIVE_INFINITY,O=Number.NEGATIVE_INFINITY;for(let h=0;h<o;h++){const e=r[h],t=e.units;let s,d=0;for(let i=0,n=t.length;i<n;i++){const e=t[i],s=e.data,n=e.data.byteLength;A.setUint32(m,n),m+=4,Y.set(s,m),m+=n,d+=4+n}if(h<o-1)f=r[h+1].dts-e.dts,s=r[h+1].pts-e.pts;else{const t=this.config,a=h>0?e.dts-r[h-1].dts:D;if(s=h>0?e.pts-r[h-1].pts:D,t.stretchShortVideoTrack&&null!==this.nextAudioPts){const s=Math.floor(t.maxBufferHole*n),r=(i?y+i*n:this.nextAudioPts)-e.pts;r>s?(f=r-a,f<0?f=a:R=!0,k.log(`[mp4-remuxer]: It is approximately ${r/90} ms to the next segment; using duration ${f/90} ms for the last video frame.`)):f=a}else f=a}const l=Math.round(e.pts-e.dts);x=Math.min(x,f),P=Math.max(P,f),I=Math.min(I,s),O=Math.max(O,s),a.push(new ir(e.key,f,d,l))}if(a.length)if(Jn){if(Jn<70){const e=a[0].flags;e.dependsOn=2,e.isNonSync=0}}else if(Xn&&O-I<P-x&&D/P<.025&&0===a[0].cts){k.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let e=l;for(let t=0,s=a.length;t<s;t++){const i=e+a[t].duration,n=e+a[t].cts;if(t<s-1){const e=i+a[t+1].cts;a[t].duration=e-n}else a[t].duration=t?a[t-1].duration:D;a[t].cts=0,e=i}}f=R||!f?D:f,this.nextAvcDts=c=u+f,this.videoSampleDuration=f,this.isVideoContiguous=!0;const C=Nn.moof(e.sequenceNumber++,l,h({},e,{samples:a})),F="video",H={data1:C,data2:Y,startPTS:y/n,endPTS:(L+f)/n,startDTS:l/n,endDTS:c/n,type:F,hasAudio:!1,hasVideo:!0,nb:a.length,dropped:e.dropped};return e.samples=[],e.dropped=0,H}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Vn;case"ac3":return zn;default:return Kn}}remuxAudio(e,t,s,i,n){const r=e.inputTimeScale,a=e.samplerate?e.samplerate:r,o=r/a,d=this.getSamplesPerFrame(e),l=d*o,u=this._initPTS,c="mp3"===e.segmentCodec&&this.typeSupported.mpeg,m=[],f=void 0!==n;let y=e.samples,L=c?0:8,M=this.nextAudioPts||-1;const T=t*r,v=u.baseTime*r/u.timescale;if(this.isAudioContiguous=s=s||y.length&&M>0&&(i&&Math.abs(T-M)<9e3||Math.abs(Zn(y[0].pts-v,T)-M)<20*l),y.forEach((function(e){e.pts=Zn(e.pts-v,T)})),!s||M<0){if(y=y.filter(e=>e.pts>=0),!y.length)return;M=0===n?0:i&&!f?Math.max(0,T):y[0].pts}if("aac"===e.segmentCodec){const t=this.config.maxAudioFramesDrift;for(let s=0,i=M;s<y.length;s++){const n=y[s],a=n.pts,o=a-i,d=Math.abs(1e3*o/r);if(o<=-t*l&&f)0===s&&(k.warn(`Audio frame @ ${(a/r).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*o/r)} ms.`),this.nextAudioPts=M=i=a);else if(o>=t*l&&d<Gn&&f){let t=Math.round(o/l);i=a-t*l,i<0&&(t--,i+=l),0===s&&(this.nextAudioPts=M=i),k.warn(`[mp4-remuxer]: Injecting ${t} audio frame @ ${(i/r).toFixed(3)}s due to ${Math.round(1e3*o/r)} ms gap.`);for(let r=0;r<t;r++){const t=Math.max(i,0);let r=Fn.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);r||(k.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),r=n.unit.subarray()),y.splice(s,0,{unit:r,pts:t}),i+=l,s++}}n.pts=i,i+=l}}let D,S=null,w=null,b=0,E=y.length;while(E--)b+=y[E].unit.byteLength;for(let h=0,k=y.length;h<k;h++){const t=y[h],i=t.unit;let n=t.pts;if(null!==w){const e=m[h-1];e.duration=Math.round((n-w)/o)}else{if(s&&"aac"===e.segmentCodec&&(n=M),S=n,!(b>0))return;b+=L;try{D=new Uint8Array(b)}catch(C){return void this.observer.emit(_.ERROR,_.ERROR,{type:g.MUX_ERROR,details:p.REMUX_ALLOC_ERROR,fatal:!1,error:C,bytes:b,reason:"fail allocating audio mdat "+b})}if(!c){const e=new DataView(D.buffer);e.setUint32(0,b),D.set(Nn.types.mdat,4)}}D.set(i,L);const r=i.byteLength;L+=r,m.push(new ir(!0,d,r,0)),w=n}const Y=m.length;if(!Y)return;const A=m[m.length-1];this.nextAudioPts=M=w+o*A.duration;const R=c?new Uint8Array(0):Nn.moof(e.sequenceNumber++,S/o,h({},e,{samples:m}));e.samples=[];const x=S/r,I=M/r,P="audio",O={data1:R,data2:D,startPTS:x,endPTS:I,startDTS:x,endDTS:I,type:P,hasAudio:!0,hasVideo:!1,nb:Y};return this.isAudioContiguous=!0,O}remuxEmptyAudio(e,t,s,i){const n=e.inputTimeScale,r=e.samplerate?e.samplerate:n,a=n/r,o=this.nextAudioPts,d=this._initDTS,l=9e4*d.baseTime/d.timescale,u=(null!==o?o:i.startDTS*n)+l,h=i.endDTS*n+l,c=a*Kn,m=Math.ceil((h-u)/c),f=Fn.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(k.warn("[mp4-remuxer]: remux empty Audio"),!f)return void k.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");const _=[];for(let g=0;g<m;g++){const e=u+g*c;_.push({unit:f,pts:e,dts:e})}return e.samples=_,this.remuxAudio(e,t,s,!1)}}function Zn(e,t){let s;if(null===t)return e;s=t<e?-8589934592:8589934592;while(Math.abs(e-t)>4294967296)e+=s;return e}function er(e){for(let t=0;t<e.length;t++)if(e[t].key)return t;return-1}function tr(e,t,s,i){const n=e.samples.length;if(!n)return;const r=e.inputTimeScale;for(let o=0;o<n;o++){const n=e.samples[o];n.pts=Zn(n.pts-s.baseTime*r/s.timescale,t*r)/r,n.dts=Zn(n.dts-i.baseTime*r/i.timescale,t*r)/r}const a=e.samples;return e.samples=[],{samples:a}}function sr(e,t,s){const i=e.samples.length;if(!i)return;const n=e.inputTimeScale;for(let a=0;a<i;a++){const i=e.samples[a];i.pts=Zn(i.pts-s.baseTime*n/s.timescale,t*n)/n}e.samples.sort((e,t)=>e.pts-t.pts);const r=e.samples;return e.samples=[],{samples:r}}class ir{constructor(e,t,s,i){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=s,this.cts=i,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}class nr{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,s,i){this.audioCodec=t,this.videoCodec=s,this.generateInitSegment(Ce(e,i)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:s}=this;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);const i=this.initData=Re(e);i.audio&&(t=ar(i.audio,x.AUDIO)),i.video&&(s=ar(i.video,x.VIDEO));const n={};i.audio&&i.video?n.audiovideo={container:"video/mp4",codec:t+","+s,initSegment:e,id:"main"}:i.audio?n.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:i.video?n.video={container:"video/mp4",codec:s,initSegment:e,id:"main"}:k.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n}remux(e,t,s,i,n,r){var a,o;let{initPTS:d,lastEndTime:l}=this;const u={audio:void 0,video:void 0,text:i,id3:s,initSegment:void 0};c(l)||(l=this.lastEndTime=n||0);const h=t.samples;if(null==h||!h.length)return u;const m={initPTS:void 0,timescale:1};let f=this.initData;if(null!=(a=f)&&a.length||(this.generateInitSegment(h),f=this.initData),null==(o=f)||!o.length)return k.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),u;this.emitInitSegment&&(m.tracks=this.initTracks,this.emitInitSegment=!1);const _=Ne(h,f),g=He(f,h),p=null===g?n:g;(rr(d,p,n,_)||m.timescale!==d.timescale&&r)&&(m.initPTS=p-n,d&&1===d.timescale&&k.warn("Adjusting initPTS by "+(m.initPTS-d.baseTime)),this.initPTS=d={baseTime:m.initPTS,timescale:1});const y=e?p-d.baseTime/d.timescale:l,L=y+_;Ue(f,h,d.baseTime/d.timescale),_>0?this.lastEndTime=L:(k.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const M=!!f.audio,T=!!f.video;let v="";M&&(v+="audio"),T&&(v+="video");const D={data1:h,startPTS:y,startDTS:y,endPTS:L,endDTS:L,type:v,hasAudio:M,hasVideo:T,nb:1,dropped:0};return u.audio="audio"===D.type?D:void 0,u.video="audio"!==D.type?D:void 0,u.initSegment=m,u.id3=tr(s,n,d,d),i.samples.length&&(u.text=sr(i,n,d)),u}}function rr(e,t,s,i){if(null===e)return!0;const n=Math.max(i,1),r=t-e.baseTime/e.timescale;return Math.abs(r-s)>n}function ar(e,t){const s=null==e?void 0:e.codec;if(s&&s.length>4)return s;if(t===x.AUDIO){if("ec-3"===s||"ac-3"===s||"alac"===s)return s;if("fLaC"===s||"Opus"===s){const e=!1;return Mt(s,e)}const e="mp4a.40.5";return k.info(`Parsed audio codec "${s}" or audio object type not handled. Using "${e}"`),e}return k.warn(`Unhandled video codec "${s}"`),"hvc1"===s||"hev1"===s?"hvc1.1.6.L120.90":"av01"===s?"av01.0.04M.08":"avc1.42e01e"}try{qn=self.performance.now.bind(self.performance)}catch(bd){k.debug("Unable to use Performance API on this environment"),qn=null==$?void 0:$.Date.now}const or=[{demux:Mn,remux:nr},{demux:Yn,remux:Qn},{demux:yn,remux:Qn},{demux:Cn,remux:Qn}];or.splice(2,0,{demux:vn,remux:Qn});class dr{constructor(e,t,s,i,n){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=s,this.vendor=i,this.id=n}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,s,i){const n=s.transmuxing;n.executeStart=qn();let r=new Uint8Array(e);const{currentTransmuxState:a,transmuxConfig:o}=this;i&&(this.currentTransmuxState=i);const{contiguous:d,discontinuity:l,trackSwitch:u,accurateTimeOffset:h,timeOffset:c,initSegmentChange:m}=i||a,{audioCodec:f,videoCodec:y,defaultInitPts:L,duration:M,initSegmentData:T}=o,v=lr(r,t);if(v&&"AES-128"===v.method){const e=this.getDecrypter();if(!e.isSync())return this.decryptionPromise=e.webCryptoDecrypt(r,v.key.buffer,v.iv.buffer).then(e=>{const t=this.push(e,null,s);return this.decryptionPromise=null,t}),this.decryptionPromise;{let t=e.softwareDecrypt(r,v.key.buffer,v.iv.buffer);const i=s.part>-1;if(i&&(t=e.flush()),!t)return n.executeEnd=qn(),ur(s);r=new Uint8Array(t)}}const D=this.needsProbing(l,u);if(D){const e=this.configureTransmuxer(r);if(e)return k.warn("[transmuxer] "+e.message),this.observer.emit(_.ERROR,_.ERROR,{type:g.MEDIA_ERROR,details:p.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message}),n.executeEnd=qn(),ur(s)}(l||u||m||D)&&this.resetInitSegment(T,f,y,M,t),(l||m||D)&&this.resetInitialTimestamp(L),d||this.resetContiguity();const S=this.transmux(r,v,c,h,s),w=this.currentTransmuxState;return w.contiguous=!0,w.discontinuity=!1,w.trackSwitch=!1,n.executeEnd=qn(),S}flush(e){const t=e.transmuxing;t.executeStart=qn();const{decrypter:s,currentTransmuxState:i,decryptionPromise:n}=this;if(n)return n.then(()=>this.flush(e));const r=[],{timeOffset:a}=i;if(s){const t=s.flush();t&&r.push(this.push(t,null,e))}const{demuxer:o,remuxer:d}=this;if(!o||!d)return t.executeEnd=qn(),[ur(e)];const l=o.flush(a);return hr(l)?l.then(t=>(this.flushRemux(r,t,e),r)):(this.flushRemux(r,l,e),r)}flushRemux(e,t,s){const{audioTrack:i,videoTrack:n,id3Track:r,textTrack:a}=t,{accurateTimeOffset:o,timeOffset:d}=this.currentTransmuxState;k.log(`[transmuxer.ts]: Flushed fragment ${s.sn}${s.part>-1?" p: "+s.part:""} of level ${s.level}`);const l=this.remuxer.remux(i,n,r,a,d,o,!0,this.id);e.push({remuxResult:l,chunkMeta:s}),s.transmuxing.executeEnd=qn()}resetInitialTimestamp(e){const{demuxer:t,remuxer:s}=this;t&&s&&(t.resetTimeStamp(e),s.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,s,i,n){const{demuxer:r,remuxer:a}=this;r&&a&&(r.resetInitSegment(e,t,s,i),a.resetInitSegment(e,t,s,n))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,s,i,n){let r;return r=t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,s,i,n):this.transmuxUnencrypted(e,s,i,n),r}transmuxUnencrypted(e,t,s,i){const{audioTrack:n,videoTrack:r,id3Track:a,textTrack:o}=this.demuxer.demux(e,t,!1,!this.config.progressive),d=this.remuxer.remux(n,r,a,o,t,s,!1,this.id);return{remuxResult:d,chunkMeta:i}}transmuxSampleAes(e,t,s,i,n){return this.demuxer.demuxSampleAes(e,t,s).then(e=>{const t=this.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,s,i,!1,this.id);return{remuxResult:t,chunkMeta:n}})}configureTransmuxer(e){const{config:t,observer:s,typeSupported:i,vendor:n}=this;let r;for(let h=0,c=or.length;h<c;h++){var a;if(null!=(a=or[h].demux)&&a.probe(e)){r=or[h];break}}if(!r)return new Error("Failed to find demuxer by probing fragment data");const o=this.demuxer,d=this.remuxer,l=r.remux,u=r.demux;d&&d instanceof l||(this.remuxer=new l(s,t,i,n)),o&&o instanceof u||(this.demuxer=new u(s,t,i),this.probe=u.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Ci(this.config)),e}}function lr(e,t){let s=null;return e.byteLength>0&&null!=(null==t?void 0:t.key)&&null!==t.iv&&null!=t.method&&(s=t),s}const ur=e=>({remuxResult:{},chunkMeta:e});function hr(e){return"then"in e&&e.then instanceof Function}class cr{constructor(e,t,s,i,n){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=s,this.duration=i,this.defaultInitPts=n||null}}class mr{constructor(e,t,s,i,n,r){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=s,this.trackSwitch=i,this.timeOffset=n,this.initSegmentChange=r}}var fr={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,s="~";function i(){}function n(e,t,s){this.fn=e,this.context=t,this.once=s||!1}function r(e,t,i,r,a){if("function"!==typeof i)throw new TypeError("The listener must be a function");var o=new n(i,r||e,a),d=s?s+t:t;return e._events[d]?e._events[d].fn?e._events[d]=[e._events[d],o]:e._events[d].push(o):(e._events[d]=o,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new i:delete e._events[t]}function o(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(s=!1)),o.prototype.eventNames=function(){var e,i,n=[];if(0===this._eventsCount)return n;for(i in e=this._events)t.call(e,i)&&n.push(s?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},o.prototype.listeners=function(e){var t=s?s+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,a=new Array(r);n<r;n++)a[n]=i[n].fn;return a},o.prototype.listenerCount=function(e){var t=s?s+e:e,i=this._events[t];return i?i.fn?1:i.length:0},o.prototype.emit=function(e,t,i,n,r,a){var o=s?s+e:e;if(!this._events[o])return!1;var d,l,u=this._events[o],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,i),!0;case 4:return u.fn.call(u.context,t,i,n),!0;case 5:return u.fn.call(u.context,t,i,n,r),!0;case 6:return u.fn.call(u.context,t,i,n,r,a),!0}for(l=1,d=new Array(h-1);l<h;l++)d[l-1]=arguments[l];u.fn.apply(u.context,d)}else{var c,m=u.length;for(l=0;l<m;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),h){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,i);break;case 4:u[l].fn.call(u[l].context,t,i,n);break;default:if(!d)for(c=1,d=new Array(h-1);c<h;c++)d[c-1]=arguments[c];u[l].fn.apply(u[l].context,d)}}return!0},o.prototype.on=function(e,t,s){return r(this,e,t,s,!1)},o.prototype.once=function(e,t,s){return r(this,e,t,s,!0)},o.prototype.removeListener=function(e,t,i,n){var r=s?s+e:e;if(!this._events[r])return this;if(!t)return a(this,r),this;var o=this._events[r];if(o.fn)o.fn!==t||n&&!o.once||i&&o.context!==i||a(this,r);else{for(var d=0,l=[],u=o.length;d<u;d++)(o[d].fn!==t||n&&!o[d].once||i&&o[d].context!==i)&&l.push(o[d]);l.length?this._events[r]=1===l.length?l[0]:l:a(this,r)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=s?s+e:e,this._events[t]&&a(this,t)):(this._events=new i,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=s,o.EventEmitter=o,e.exports=o})(fr);var _r=fr.exports,gr=i(_r);class pr{constructor(e,t,s,i){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const n=e.config;this.hls=e,this.id=t,this.useWorker=!!n.enableWorker,this.onTransmuxComplete=s,this.onFlush=i;const r=(e,t)=>{t=t||{},t.frag=this.frag,t.id=this.id,e===_.ERROR&&(this.error=t.error),this.hls.trigger(e,t)};this.observer=new gr,this.observer.on(_.FRAG_DECRYPTED,r),this.observer.on(_.ERROR,r);const a=dt(n.preferManagedMediaSource)||{isTypeSupported:()=>!1},o={mpeg:a.isTypeSupported("audio/mpeg"),mp3:a.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:a.isTypeSupported('audio/mp4; codecs="ac-3"')};if(this.useWorker&&"undefined"!==typeof Worker){const e=n.workerPath||Bi();if(e){try{n.workerPath?(k.log(`loading Web Worker ${n.workerPath} for "${t}"`),this.workerContext=Wi(n.workerPath)):(k.log(`injecting Web Worker for "${t}"`),this.workerContext=$i()),this.onwmsg=e=>this.onWorkerMessage(e);const{worker:e}=this.workerContext;e.addEventListener("message",this.onwmsg),e.onerror=e=>{const s=new Error(`${e.message} (${e.filename}:${e.lineno})`);n.enableWorker=!1,k.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(_.ERROR,{type:g.OTHER_ERROR,details:p.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:s})},e.postMessage({cmd:"init",typeSupported:o,vendor:"",id:t,config:JSON.stringify(n)})}catch(bd){k.warn(`Error setting up "${t}" Web Worker, fallback to inline`,bd),this.resetWorker(),this.error=null,this.transmuxer=new dr(this.observer,o,n,"",t)}return}}this.transmuxer=new dr(this.observer,o,n,"",t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,s,i,n,r,a,o,d,l){var u,h;d.transmuxing.start=self.performance.now();const{transmuxer:c}=this,m=r?r.start:n.start,f=n.decryptdata,_=this.frag,g=!(_&&n.cc===_.cc),p=!(_&&d.level===_.level),y=_?d.sn-_.sn:-1,L=this.part?d.part-this.part.index:-1,M=0===y&&d.id>1&&d.id===(null==_?void 0:_.stats.chunkCount),T=!p&&(1===y||0===y&&(1===L||M&&L<=0)),v=self.performance.now();(p||y||0===n.stats.parsing.start)&&(n.stats.parsing.start=v),!r||!L&&T||(r.stats.parsing.start=v);const D=!(_&&(null==(u=n.initSegment)?void 0:u.url)===(null==(h=_.initSegment)?void 0:h.url)),S=new mr(g,T,o,p,m,D);if(!T||g||D){k.log(`[transmuxer-interface, ${n.type}]: Starting new transmux session for sn: ${d.sn} p: ${d.part} level: ${d.level} id: ${d.id}\n discontinuity: ${g}\n trackSwitch: ${p}\n contiguous: ${T}\n accurateTimeOffset: ${o}\n timeOffset: ${m}\n initSegmentChange: ${D}`);const e=new cr(s,i,t,a,l);this.configureTransmuxer(e)}if(this.frag=n,this.part=r,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:f,chunkMeta:d,state:S},e instanceof ArrayBuffer?[e]:[]);else if(c){const t=c.push(e,f,d,S);hr(t)?(c.async=!0,t.then(e=>{this.handleTransmuxComplete(e)}).catch(e=>{this.transmuxerError(e,d,"transmuxer-interface push error")})):(c.async=!1,this.handleTransmuxComplete(t))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let s=t.flush(e);const i=hr(s);i||t.async?(hr(s)||(s=Promise.resolve(s)),s.then(t=>{this.handleFlushResult(t,e)}).catch(t=>{this.transmuxerError(t,e,"transmuxer-interface flush error")})):this.handleFlushResult(s,e)}}transmuxerError(e,t,s){this.hls&&(this.error=e,this.hls.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,fatal:!1,error:e,err:e,reason:s}))}handleFlushResult(e,t){e.forEach(e=>{this.handleTransmuxComplete(e)}),this.onFlush(t)}onWorkerMessage(e){const t=e.data;if(null==t||!t.event)return void k.warn("worker message received with no "+(t?"event name":"data"));const s=this.hls;if(this.hls)switch(t.event){case"init":{var i;const e=null==(i=this.workerContext)?void 0:i.objectURL;e&&self.URL.revokeObjectURL(e);break}case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":k[t.data.logType]&&k[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,s.trigger(t.event,t.data);break}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}function yr(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(!Lr(e[s].attrs,t[s].attrs))return!1;return!0}function Lr(e,t,s){const i=e["STABLE-RENDITION-ID"];return i&&!s?i===t["STABLE-RENDITION-ID"]:!(s||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(s=>e[s]!==t[s])}function Mr(e,t){return t.label.toLowerCase()===e.name.toLowerCase()&&(!t.language||t.language.toLowerCase()===(e.lang||"").toLowerCase())}const Tr=100;class vr extends Ni{constructor(e,t,s){super(e,t,s,"[audio-stream-controller]",Ht.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(_.ERROR,this.onError,this),e.on(_.BUFFER_RESET,this.onBufferReset,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(_.ERROR,this.onError,this),e.off(_.BUFFER_RESET,this.onBufferReset,this),e.off(_.BUFFER_CREATED,this.onBufferCreated,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:s,initPTS:i,timescale:n}){if("main"===s){const e=t.cc;this.initPTS[t.cc]={baseTime:i,timescale:n},this.log(`InitPTS for cc: ${e} found from main: ${i}`),this.videoTrackCC=e,this.state===Hi.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels)return this.startPosition=e,void(this.state=Hi.STOPPED);const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(Tr),t>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t,this.state=Hi.IDLE):(this.loadedmetadata=!1,this.state=Hi.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case Hi.IDLE:this.doTickIdle();break;case Hi.WAITING_TRACK:{var e;const{levels:t,trackId:s}=this,i=null==t||null==(e=t[s])?void 0:e.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=Hi.WAITING_INIT_PTS}break}case Hi.FRAG_LOADING_WAITING_RETRY:{var t;const e=performance.now(),s=this.retryDate;if(!s||e>=s||null!=(t=this.media)&&t.seeking){const{levels:e,trackId:t}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((null==e?void 0:e[t])||null),this.state=Hi.IDLE}break}case Hi.WAITING_INIT_PTS:{const e=this.waitingData;if(e){const{frag:t,part:s,cache:i,complete:n}=e;if(void 0!==this.initPTS[t.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=Hi.FRAG_LOADING;const e=i.flush(),r={frag:t,part:s,payload:e,networkDetails:null};this._handleFragmentLoadProgress(r),n&&super._handleFragmentLoadComplete(r)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${t.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const e=this.getLoadPosition(),s=_i.bufferInfo(this.mediaBuffer,e,this.config.maxBufferHole),i=Cs(s.end,this.config.maxFragLookUpTolerance,t);i<0&&(this.log(`Waiting fragment cc (${t.cc}) @ ${t.start} cancelled because another fragment at ${s.end} is needed`),this.clearWaitingFragment())}}else this.state=Hi.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=Hi.IDLE)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:s,trackId:i}=this,n=e.config;if(!s&&(this.startFragRequested||!n.startFragPrefetch)||null==t||!t[i])return;const r=t[i],a=r.details;if(!a||a.live&&this.levelLastLoaded!==r||this.waitForCdnTuneIn(a))return void(this.state=Hi.WAITING_TRACK);const o=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&o&&(this.bufferFlushed=!1,this.afterBufferFlushed(o,x.AUDIO,Ht.AUDIO));const d=this.getFwdBufferInfo(o,Ht.AUDIO);if(null===d)return;const{bufferedTrack:l,switchingTrack:u}=this;if(!u&&this._streamEnded(d,a))return e.trigger(_.BUFFER_EOS,{type:"audio"}),void(this.state=Hi.ENDED);const h=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,Ht.MAIN),c=d.len,m=this.getMaxBufferLength(null==h?void 0:h.len),f=a.fragments,g=f[0].start;let p=this.flushing?this.getLoadPosition():d.end;if(u&&s){const e=this.getLoadPosition();l&&!Lr(u.attrs,l.attrs)&&(p=e),a.PTSKnown&&e<g&&(d.end>g||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),s.currentTime=g+.05)}if(c>=m&&!u&&p<f[f.length-1].start)return;let y=this.getNextFragment(p,a),L=!1;if(y&&this.isLoopLoading(y,p)&&(L=!!y.gap,y=this.getNextFragmentLoopLoading(y,a,d,Ht.MAIN,m)),!y)return void(this.bufferFlushed=!0);const M=h&&y.start>h.end+a.targetduration;if(M||(null==h||!h.len)&&d.len){const e=this.getAppendedFrag(y.start,Ht.MAIN);if(null===e)return;if(L||(L=!!e.gap||!!M&&0===h.len),M&&!L||L&&d.nextStart&&d.nextStart<e.end)return}this.loadFragment(y,r,p)}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.min(Math.max(t,e),this.config.maxMaxBufferLength):t}onMediaDetaching(){this.videoBuffer=null,this.bufferFlushed=this.flushing=!1,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(e=>new hs(e))}onAudioTrackSwitching(e,t){const s=!!t.url;this.trackId=t.id;const{fragCurrent:i}=this;i&&(i.abortRequests(),this.removeUnbufferedFrags(i.start)),this.resetLoadingState(),s?this.setInterval(Tr):this.resetTransmuxer(),s?(this.switchingTrack=t,this.state=Hi.IDLE,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=Hi.STOPPED),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(_.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var s;if(null==this.mainDetails)return void(this.cachedTrackLoadedData=t);const{levels:i}=this,{details:n,id:r}=t;if(!i)return void this.warn("Audio tracks were reset while loading level "+r);this.log(`Audio track ${r} loaded [${n.startSN},${n.endSN}]${n.lastPartSn?`[part-${n.lastPartSn}-${n.lastPartIndex}]`:""},duration:${n.totalduration}`);const a=i[r];let o=0;if(n.live||null!=(s=a.details)&&s.live){this.checkLiveUpdate(n);const e=this.mainDetails;if(n.deltaUpdateFailed||!e)return;var d;if(!a.details&&n.hasProgramDateTime&&e.hasProgramDateTime)Si(n,e),o=n.fragments[0].start;else o=this.alignPlaylists(n,a.details,null==(d=this.levelLastLoaded)?void 0:d.details)}a.details=n,this.levelLastLoaded=a,this.startFragRequested||!this.mainDetails&&n.live||this.setStartPosition(this.mainDetails||n,o),this.state!==Hi.WAITING_TRACK||this.waitForCdnTuneIn(n)||(this.state=Hi.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:s,part:i,payload:n}=e,{config:r,trackId:a,levels:o}=this;if(!o)return void this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${s.sn} of level ${s.level} will not be buffered`);const d=o[a];if(!d)return void this.warn("Audio track is undefined on fragment load progress");const l=d.details;if(!l)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(s.start);const u=r.defaultAudioCodec||d.audioCodec||"mp4a.40.2";let h=this.transmuxer;h||(h=this.transmuxer=new pr(this.hls,Ht.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const c=this.initPTS[s.cc],m=null==(t=s.initSegment)?void 0:t.data;if(void 0!==c){const e=!1,t=i?i.index:-1,r=-1!==t,a=new gi(s.level,s.sn,s.stats.chunkCount,n.byteLength,t,r);h.push(n,m,u,"",s,i,l.totalduration,e,a,c)}else{this.log(`Unknown video PTS for cc ${s.cc}, waiting for video PTS before demuxing audio frag ${s.sn} of [${l.startSN} ,${l.endSN}],track ${a}`);const{cache:e}=this.waitingData=this.waitingData||{frag:s,part:i,cache:new ji,complete:!1};e.push(new Uint8Array(n)),this.waitingVideoCC=this.videoTrackCC,this.state=Hi.WAITING_INIT_PTS}}_handleFragmentLoadComplete(e){this.waitingData?this.waitingData.complete=!0:super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const s=t.tracks.audio;s&&(this.mediaBuffer=s.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:s,part:i}=t;if(s.type===Ht.AUDIO)if(this.fragContextChanged(s))this.warn(`Fragment ${s.sn}${i?" p: "+i.index:""} of level ${s.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);else{if("initSegment"!==s.sn){this.fragPrevious=s;const e=this.switchingTrack;e&&(this.bufferedTrack=e,this.switchingTrack=null,this.hls.trigger(_.AUDIO_TRACK_SWITCHED,o({},e)))}this.fragBufferedComplete(s,i)}else if(!this.loadedmetadata&&s.type===Ht.MAIN){const e=this.videoBuffer||this.media;if(e){const t=_i.getBuffered(e);t.length&&(this.loadedmetadata=!0)}}}onError(e,t){var s;if(t.fatal)this.state=Hi.ERROR;else switch(t.details){case p.FRAG_GAP:case p.FRAG_PARSING_ERROR:case p.FRAG_DECRYPT_ERROR:case p.FRAG_LOAD_ERROR:case p.FRAG_LOAD_TIMEOUT:case p.KEY_LOAD_ERROR:case p.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ht.AUDIO,t);break;case p.AUDIO_TRACK_LOAD_ERROR:case p.AUDIO_TRACK_LOAD_TIMEOUT:case p.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==Hi.WAITING_TRACK||(null==(s=t.context)?void 0:s.type)!==Ft.AUDIO_TRACK||(this.state=Hi.IDLE);break;case p.BUFFER_APPEND_ERROR:case p.BUFFER_FULL_ERROR:if(!t.parent||"audio"!==t.parent)return;if(t.details===p.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case p.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==x.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==x.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Hi.ENDED&&(this.state=Hi.IDLE);const e=this.mediaBuffer||this.media;e&&(this.afterBufferFlushed(e,t,Ht.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const s="audio",{hls:i}=this,{remuxResult:n,chunkMeta:r}=e,a=this.getCurrentContext(r);if(!a)return void this.resetWhenMissingContext(r);const{frag:o,part:d,level:l}=a,{details:u}=l,{audio:c,text:m,id3:f,initSegment:g}=n;if(!this.fragContextChanged(o)&&u){if(this.state=Hi.PARSING,this.switchingTrack&&c&&this.completeAudioSwitch(this.switchingTrack),null!=g&&g.tracks){const e=o.initSegment||o;this._bufferInitSegment(l,g.tracks,e,r),i.trigger(_.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:s,tracks:g.tracks})}if(c){const{startPTS:e,endPTS:t,startDTS:s,endDTS:i}=c;d&&(d.elementaryStreams[x.AUDIO]={startPTS:e,endPTS:t,startDTS:s,endDTS:i}),o.setElementaryStreamInfo(x.AUDIO,e,t,s,i),this.bufferFragmentData(c,o,d,r)}if(null!=f&&null!=(t=f.samples)&&t.length){const e=h({id:s,frag:o,details:u},f);i.trigger(_.FRAG_PARSING_METADATA,e)}if(m){const e=h({id:s,frag:o,details:u},m);i.trigger(_.FRAG_PARSING_USERDATA,e)}}else this.fragmentTracker.removeFragment(o)}_bufferInitSegment(e,t,s,i){if(this.state!==Hi.PARSING)return;t.video&&delete t.video;const n=t.audio;if(!n)return;n.id="audio";const r=e.audioCodec;this.log(`Init audio buffer, container:${n.container}, codecs[level/parsed]=[${r}/${n.codec}]`),r&&1===r.split(",").length&&(n.levelCodec=r),this.hls.trigger(_.BUFFER_CODECS,t);const a=n.initSegment;if(null!=a&&a.byteLength){const e={type:"audio",frag:s,part:null,chunkMeta:i,parent:s.type,data:a};this.hls.trigger(_.BUFFER_APPENDING,e)}this.tickImmediate()}loadFragment(e,t,s){const i=this.fragmentTracker.getState(e);var n;if(this.fragCurrent=e,this.switchingTrack||i===ui.NOT_LOADED||i===ui.PARTIAL)if("initSegment"===e.sn)this._loadInitSegment(e,t);else if(null!=(n=t.details)&&n.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=Hi.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragments[0].start!==t.details.fragments[0].start&&Si(t.details,s)}else this.startFragRequested=!0,super.loadFragment(e,t,s);else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){const{media:t,bufferedTrack:s}=this,i=null==s?void 0:s.attrs,n=e.attrs;t&&i&&(i.CHANNELS!==n.CHANNELS||s.name!==e.name||s.lang!==e.lang)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(_.AUDIO_TRACK_SWITCHED,o({},e))}}class Dr extends Bs{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(_.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(_.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:s,groupId:i,details:n}=t,r=this.tracksInGroup[s];if(!r||r.groupId!==i)return void this.warn(`Audio track with id:${s} and group:${i} not found in active group ${null==r?void 0:r.groupId}`);const a=r.details;r.details=t.details,this.log(`Audio track ${s} "${r.name}" lang:${r.lang} group:${i} loaded [${n.startSN}-${n.endSN}]`),s===this.trackId&&this.playlistLoaded(s,t,a)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const s=t.audioGroups||null,i=this.groupIds;let n=this.currentTrack;if(!s||(null==i?void 0:i.length)!==(null==s?void 0:s.length)||null!=s&&s.some(e=>-1===(null==i?void 0:i.indexOf(e)))){this.groupIds=s,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter(e=>!s||-1!==s.indexOf(e.groupId));if(e.length)this.selectDefaultTrack&&!e.some(e=>e.default)&&(this.selectDefaultTrack=!1),e.forEach((e,t)=>{e.id=t});else if(!n&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.audioPreference;if(!n&&t){const s=si(t,e,ri);if(s>-1)n=e[s];else{const e=si(t,this.tracks);n=this.tracks[e]}}let i=this.findTrackId(n);-1===i&&n&&(i=this.findTrackId(null));const a={audioTracks:e};this.log(`Updating audio tracks, ${e.length} track(s) found in group(s): ${null==s?void 0:s.join(",")}`),this.hls.trigger(_.AUDIO_TRACKS_UPDATED,a);const o=this.trackId;if(-1!==i&&-1===o)this.setAudioTrack(i);else if(e.length&&-1===o){var r;const t=new Error(`No audio track selected for current audio group-ID(s): ${null==(r=this.groupIds)?void 0:r.join(",")} track count: ${e.length}`);this.warn(t.message),this.hls.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:t})}}else this.shouldReloadPlaylist(n)&&this.setAudioTrack(this.trackId)}onError(e,t){!t.fatal&&t.context&&(t.context.type!==Ft.AUDIO_TRACK||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||(this.requestScheduled=-1,this.checkRetry(t)))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const s=this.allAudioTracks;if(this.selectDefaultTrack=!1,s.length){const i=this.currentTrack;if(i&&ii(e,i,ri))return i;const n=si(e,this.tracksInGroup,ri);if(n>-1){const e=this.tracksInGroup[n];return this.setAudioTrack(n),e}if(i){let i=t.loadLevel;-1===i&&(i=t.firstAutoLevel);const n=ai(e,t.levels,s,i,ri);if(-1===n)return null;t.nextLoadLevel=n}if(e.channels||e.audioCodec){const t=si(e,s);if(t>-1)return s[t]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length)return void this.warn("Invalid audio track id: "+e);this.clearTimer(),this.selectDefaultTrack=!1;const s=this.currentTrack,i=t[e],n=i.details&&!i.details.live;if(e===this.trackId&&i===s&&n)return;if(this.log(`Switching to audio-track ${e} "${i.name}" lang:${i.lang} group:${i.groupId} channels:${i.channels}`),this.trackId=e,this.currentTrack=i,this.hls.trigger(_.AUDIO_TRACK_SWITCHING,o({},i)),n)return;const r=this.switchParams(i.url,null==s?void 0:s.details,i.details);this.loadPlaylist(r)}findTrackId(e){const t=this.tracksInGroup;for(let s=0;s<t.length;s++){const i=t[s];if((!this.selectDefaultTrack||i.default)&&(!e||ii(e,i,ri)))return s}if(e){const{name:s,lang:i,assocLang:n,characteristics:r,audioCodec:a,channels:o}=e;for(let e=0;e<t.length;e++){const d=t[e];if(ii({name:s,lang:i,assocLang:n,characteristics:r,audioCodec:a,channels:o},d,ri))return e}for(let d=0;d<t.length;d++){const s=t[d];if(Lr(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return d}for(let d=0;d<t.length;d++){const s=t[d];if(Lr(e.attrs,s.attrs,["LANGUAGE"]))return d}}return-1}loadPlaylist(e){const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){super.loadPlaylist();const i=t.id,n=t.groupId;let r=t.url;if(e)try{r=e.addDirectives(r)}catch(s){this.warn("Could not construct new URL with HLS Delivery Directives: "+s)}this.log(`loading audio-track playlist ${i} "${t.name}" lang:${t.lang} group:${n}`),this.clearTimer(),this.hls.trigger(_.AUDIO_TRACK_LOADING,{url:r,id:i,groupId:n,deliveryDirectives:e||null})}}}const kr=500;class Sr extends Ni{constructor(e,t,s){super(e,t,s,"[subtitle-stream-controller]",Ht.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.ERROR,this.onError,this),e.on(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(_.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(_.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.ERROR,this.onError,this),e.off(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(_.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(_.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=Hi.IDLE,this.setInterval(kr),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:s,success:i}=t;if(this.fragPrevious=s,this.state=Hi.IDLE,!i)return;const n=this.tracksBuffered[this.currentTrackId];if(!n)return;let r;const a=s.start;for(let d=0;d<n.length;d++)if(a>=n[d].start&&a<=n[d].end){r=n[d];break}const o=s.start+s.duration;r?r.end=o:(r={start:a,end:o},n.push(r)),this.fragmentTracker.fragBuffered(s),this.fragBufferedComplete(s,null)}onBufferFlushing(e,t){const{startOffset:s,endOffset:i}=t;if(0===s&&i!==Number.POSITIVE_INFINITY){const e=i-1;if(e<=0)return;t.endOffsetSubtitles=Math.max(0,e),this.tracksBuffered.forEach(t=>{for(let s=0;s<t.length;)if(t[s].end<=e)t.shift();else{if(!(t[s].start<e))break;t[s].start=e,s++}}),this.fragmentTracker.removeFragmentsInRange(s,e,Ht.SUBTITLE)}}onFragBuffered(e,t){var s;this.loadedmetadata||t.frag.type!==Ht.MAIN||null!=(s=this.media)&&s.buffered.length&&(this.loadedmetadata=!0)}onError(e,t){const s=t.frag;(null==s?void 0:s.type)===Ht.SUBTITLE&&(t.details===p.FRAG_GAP&&this.fragmentTracker.fragBuffered(s,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Hi.STOPPED&&(this.state=Hi.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){this.levels&&yr(this.levels,t)?this.levels=t.map(e=>new hs(e)):(this.tracksBuffered=[],this.levels=t.map(e=>{const t=new hs(e);return this.tracksBuffered[t.id]=[],t}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Ht.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null)}onSubtitleTrackSwitch(e,t){var s;if(this.currentTrackId=t.id,null==(s=this.levels)||!s.length||-1===this.currentTrackId)return void this.clearInterval();const i=this.levels[this.currentTrackId];null!=i&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.setInterval(kr)}onSubtitleTrackLoaded(e,t){var s;const{currentTrackId:i,levels:n}=this,{details:r,id:a}=t;if(!n)return void this.warn("Subtitle tracks were reset while loading level "+a);const o=n[a];if(a>=n.length||!o)return;this.log(`Subtitle track ${a} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""},duration:${r.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let d=0;if(r.live||null!=(s=o.details)&&s.live){const e=this.mainDetails;if(r.deltaUpdateFailed||!e)return;const t=e.fragments[0];var l;if(o.details)d=this.alignPlaylists(r,o.details,null==(l=this.levelLastLoaded)?void 0:l.details),0===d&&t&&(d=t.start,Ms(r,d));else r.hasProgramDateTime&&e.hasProgramDateTime?(Si(r,e),d=r.fragments[0].start):t&&(d=t.start,Ms(r,d))}if(o.details=r,this.levelLastLoaded=o,a===i&&(this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(this.mainDetails||r,d),this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===Hi.IDLE)){const e=Ps(null,r.fragments,this.media.currentTime,0);e||(this.warn("Subtitle playlist not aligned with playback"),o.details=void 0)}}_handleFragmentLoadComplete(e){const{frag:t,payload:s}=e,i=t.decryptdata,n=this.hls;if(!this.fragContextChanged(t)&&s&&s.byteLength>0&&null!=i&&i.key&&i.iv&&"AES-128"===i.method){const e=performance.now();this.decrypter.decrypt(new Uint8Array(s),i.key.buffer,i.iv.buffer).catch(e=>{throw n.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e}).then(s=>{const i=performance.now();n.trigger(_.FRAG_DECRYPTED,{frag:t,payload:s,stats:{tstart:e,tdecrypt:i}})}).catch(e=>{this.warn(`${e.name}: ${e.message}`),this.state=Hi.IDLE})}}doTick(){if(this.media){if(this.state===Hi.IDLE){const{currentTrackId:e,levels:t}=this,s=null==t?void 0:t[e];if(!s||!t.length||!s.details)return;const{config:i}=this,n=this.getLoadPosition(),r=_i.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],n,i.maxBufferHole),{end:a,len:o}=r,d=this.getFwdBufferInfo(this.media,Ht.MAIN),l=s.details,u=this.getMaxBufferLength(null==d?void 0:d.len)+l.levelTargetDuration;if(o>u)return;const h=l.fragments,c=h.length,m=l.edge;let f=null;const _=this.fragPrevious;if(a<m){const e=i.maxFragLookUpTolerance,t=a>m-e?0:e;f=Ps(_,h,Math.max(h[0].start,a),t),!f&&_&&_.start<h[0].start&&(f=h[0])}else f=h[c-1];if(!f)return;if(f=this.mapToInitFragWhenRequired(f),"initSegment"!==f.sn){const e=f.sn-l.startSN,t=h[e-1];t&&t.cc===f.cc&&this.fragmentTracker.getState(t)===ui.NOT_LOADED&&(f=t)}this.fragmentTracker.getState(f)===ui.NOT_LOADED&&this.loadFragment(f,s,a)}}else this.state=Hi.IDLE}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.max(t,e):t}loadFragment(e,t,s){this.fragCurrent=e,"initSegment"===e.sn?this._loadInitSegment(e,t):(this.startFragRequested=!0,super.loadFragment(e,t,s))}get mediaBufferTimeRanges(){return new wr(this.tracksBuffered[this.currentTrackId]||[])}}class wr{constructor(e){this.buffered=void 0;const t=(t,s,i)=>{if(s>>>=0,s>i-1)throw new DOMException(`Failed to execute '${t}' on 'TimeRanges': The index provided (${s}) is greater than the maximum bound (${i})`);return e[s][t]};this.buffered={get length(){return e.length},end(s){return t("end",s,e.length)},start(s){return t("start",s,e.length)}}}}class br extends Bs{constructor(e){super(e,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=null;const t=zt(this.media.textTracks);for(let i=0;i<t.length;i++)if("hidden"===t[i].mode)e=t[i];else if("showing"===t[i].mode){e=t[i];break}const s=this.findTrackForTextTrack(e);this.subtitleTrack!==s&&this.setSubtitleTrack(s)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(_.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(_.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);const e=zt(this.media.textTracks);e.forEach(e=>{Wt(e)}),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:s,groupId:i,details:n}=t,r=this.tracksInGroup[s];if(!r||r.groupId!==i)return void this.warn(`Subtitle track with id:${s} and group:${i} not found in active group ${null==r?void 0:r.groupId}`);const a=r.details;r.details=t.details,this.log(`Subtitle track ${s} "${r.name}" lang:${r.lang} group:${i} loaded [${n.startSN}-${n.endSN}]`),s===this.trackId&&this.playlistLoaded(s,t,a)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const s=t.subtitleGroups||null,i=this.groupIds;let n=this.currentTrack;if(!s||(null==i?void 0:i.length)!==(null==s?void 0:s.length)||null!=s&&s.some(e=>-1===(null==i?void 0:i.indexOf(e)))){this.groupIds=s,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter(e=>!s||-1!==s.indexOf(e.groupId));if(e.length)this.selectDefaultTrack&&!e.some(e=>e.default)&&(this.selectDefaultTrack=!1),e.forEach((e,t)=>{e.id=t});else if(!n&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.subtitlePreference;if(!n&&t){this.selectDefaultTrack=!1;const s=si(t,e);if(s>-1)n=e[s];else{const e=si(t,this.tracks);n=this.tracks[e]}}let i=this.findTrackId(n);-1===i&&n&&(i=this.findTrackId(null));const r={subtitleTracks:e};this.log(`Updating subtitle tracks, ${e.length} track(s) found in "${null==s?void 0:s.join(",")}" group-id`),this.hls.trigger(_.SUBTITLE_TRACKS_UPDATED,r),-1!==i&&-1===this.trackId&&this.setSubtitleTrack(i)}else this.shouldReloadPlaylist(n)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,s=this.selectDefaultTrack;for(let i=0;i<t.length;i++){const n=t[i];if((!s||n.default)&&(s||e)&&(!e||ii(n,e)))return i}if(e){for(let s=0;s<t.length;s++){const i=t[s];if(Lr(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return s}for(let s=0;s<t.length;s++){const i=t[s];if(Lr(e.attrs,i.attrs,["LANGUAGE"]))return s}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let s=0;s<t.length;s++){const i=t[s];if(Mr(i,e))return s}}return-1}onError(e,t){!t.fatal&&t.context&&(t.context.type!==Ft.SUBTITLE_TRACK||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const s=this.currentTrack;if(s&&ii(e,s))return s;const i=si(e,this.tracksInGroup);if(i>-1){const e=this.tracksInGroup[i];return this.setSubtitleTrack(i),e}if(s)return null;{const s=si(e,t);if(s>-1)return t[s]}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const i=t.id,n=t.groupId;let r=t.url;if(e)try{r=e.addDirectives(r)}catch(s){this.warn("Could not construct new URL with HLS Delivery Directives: "+s)}this.log("Loading subtitle playlist for id "+i),this.hls.trigger(_.SUBTITLE_TRACK_LOADING,{url:r,id:i,groupId:n,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=zt(e.textTracks),s=this.currentTrack;let i;if(s&&(i=t.filter(e=>Mr(s,e))[0],i||this.warn(`Unable to find subtitle TextTrack with name "${s.name}" and language "${s.lang}"`)),[].slice.call(t).forEach(e=>{"disabled"!==e.mode&&e!==i&&(e.mode="disabled")}),i){const e=this.subtitleDisplay?"showing":"hidden";i.mode!==e&&(i.mode=e)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media)return void(this.queuedDefaultTrack=e);if(e<-1||e>=t.length||!c(e))return void this.warn("Invalid subtitle track id: "+e);this.clearTimer(),this.selectDefaultTrack=!1;const s=this.currentTrack,i=t[e]||null;if(this.trackId=e,this.currentTrack=i,this.toggleTrackModes(),!i)return void this.hls.trigger(_.SUBTITLE_TRACK_SWITCH,{id:e});const n=!!i.details&&!i.details.live;if(e===this.trackId&&i===s&&n)return;this.log("Switching to subtitle-track "+e+(i?` "${i.name}" lang:${i.lang} group:${i.groupId}`:""));const{id:r,groupId:a="",name:o,type:d,url:l}=i;this.hls.trigger(_.SUBTITLE_TRACK_SWITCH,{id:r,groupId:a,name:o,type:d,url:l});const u=this.switchParams(i.url,null==s?void 0:s.details,i.details);this.loadPlaylist(u)}}class Er{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,s){const i=this.queues[t];i.push(e),1!==i.length||s||this.executeNext(t)}insertAbort(e,t){const s=this.queues[t];s.unshift(e),this.executeNext(t)}appendBlocker(e){let t;const s=new Promise(e=>{t=e}),i={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(i,e),s}executeNext(e){const t=this.queues[e];if(t.length){const i=t[0];try{i.execute()}catch(s){k.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${s}`),i.onError(s);const t=this.buffers[e];null!=t&&t.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const Yr=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;class Ar{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=e=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=e=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:e,mediaSource:t}=this;this.log("Media source opened"),e&&(e.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(_.MEDIA_ATTACHED,{media:e,mediaSource:t})),t&&t.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:e,_objectUrl:t}=this;e!==t&&k.error(`Media element src was set while attaching MediaSource (${t} > ${e})`)},this.hls=e;const t="[buffer-controller]";this.appendSource=lt(dt(e.config.preferManagedMediaSource)),this.log=k.log.bind(k,t),this.warn=k.warn.bind(k,t),this.error=k.error.bind(k,t),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null}registerListeners(){const{hls:e}=this;e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.BUFFER_RESET,this.onBufferReset,this),e.on(_.BUFFER_APPENDING,this.onBufferAppending,this),e.on(_.BUFFER_CODECS,this.onBufferCodecs,this),e.on(_.BUFFER_EOS,this.onBufferEos,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(_.FRAG_PARSED,this.onFragParsed,this),e.on(_.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.BUFFER_RESET,this.onBufferReset,this),e.off(_.BUFFER_APPENDING,this.onBufferAppending,this),e.off(_.BUFFER_CODECS,this.onBufferCodecs,this),e.off(_.BUFFER_EOS,this.onBufferEos,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(_.FRAG_PARSED,this.onFragParsed,this),e.off(_.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new Er(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let s=2;(t.audio&&!t.video||!t.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,this.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")}onMediaAttaching(e,t){const s=this.media=t.media,i=dt(this.appendSource);if(s&&i){var n;const e=this.mediaSource=new i;this.log("created media source: "+(null==(n=e.constructor)?void 0:n.name)),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming));const t=this._objectUrl=self.URL.createObjectURL(e);if(this.appendSource)try{s.removeAttribute("src");const i=self.ManagedMediaSource;s.disableRemotePlayback=s.disableRemotePlayback||i&&e instanceof i,Rr(s),xr(s,t),s.load()}catch(r){s.src=t}else s.src=t;s.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:s}=this;if(t){if(this.log("media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(bd){this.warn(`onMediaDetaching: ${bd.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),e&&(e.removeEventListener("emptied",this._onMediaEmptied),s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(e.removeAttribute("src"),this.appendSource&&Rr(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(_.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach(e=>{this.resetBuffer(e)}),this._initSourceBuffer()}resetBuffer(e){const t=this.sourceBuffer[e];try{var s;if(t)this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,null!=(s=this.mediaSource)&&s.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t)}catch(bd){this.warn("onBufferReset "+e,bd)}}onBufferCodecs(e,t){const s=this.getSourceBufferTypes().length,i=Object.keys(t);if(i.forEach(e=>{if(s){const s=this.tracks[e];if(s&&"function"===typeof s.buffer.changeType){var i;const{id:n,codec:r,levelCodec:a,container:o,metadata:d}=t[e],l=Tt(s.codec,s.levelCodec),u=null==l?void 0:l.replace(Yr,"$1");let h=Tt(r,a);const c=null==(i=h)?void 0:i.replace(Yr,"$1");if(h&&u!==c){"audio"===e.slice(0,5)&&(h=Mt(h,this.appendSource));const t=`${o};codecs=${h}`;this.appendChangeType(e,t),this.log(`switching codec ${l} to ${h}`),this.tracks[e]={buffer:s.buffer,codec:r,container:o,levelCodec:a,metadata:d,id:n}}}}else this.pendingTracks[e]=t[e]}),s)return;const n=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==n&&(this.log(`${n} bufferCodec event(s) expected ${i.join(",")}`),this.bufferCodecEventsExpected=n),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:s}=this,i={execute:()=>{const i=this.sourceBuffer[e];i&&(this.log(`changing ${e} sourceBuffer type to ${t}`),i.changeType(t)),s.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:t=>{this.warn(`Failed to change ${e} SourceBuffer type`,t)}};s.append(i,e,!!this.pendingTracks[e])}onBufferAppending(e,t){const{hls:s,operationQueue:i,tracks:n}=this,{data:r,type:a,frag:o,part:d,chunkMeta:l}=t,u=l.buffering[a],h=self.performance.now();u.start=h;const c=o.stats.buffering,m=d?d.stats.buffering:null;0===c.start&&(c.start=h),m&&0===m.start&&(m.start=h);const f=n.audio;let y=!1;"audio"===a&&"audio/mpeg"===(null==f?void 0:f.container)&&(y=!this.lastMpegAudioChunk||1===l.id||this.lastMpegAudioChunk.sn!==l.sn,this.lastMpegAudioChunk=l);const L=o.start,M={execute:()=>{if(u.executeStart=self.performance.now(),y){const e=this.sourceBuffer[a];if(e){const t=L-e.timestampOffset;Math.abs(t)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${L} (delta: ${t}) sn: ${o.sn})`),e.timestampOffset=L)}}this.appendExecutor(r,a)},onStart:()=>{},onComplete:()=>{const e=self.performance.now();u.executeEnd=u.end=e,0===c.first&&(c.first=e),m&&0===m.first&&(m.first=e);const{sourceBuffer:t}=this,s={};for(const i in t)s[i]=_i.getBuffered(t[i]);this.appendErrors[a]=0,"audio"===a||"video"===a?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(_.BUFFER_APPENDED,{type:a,frag:o,part:d,chunkMeta:l,parent:o.type,timeRanges:s})},onError:e=>{const t={type:g.MEDIA_ERROR,parent:o.type,details:p.BUFFER_APPEND_ERROR,sourceBufferName:a,frag:o,part:d,chunkMeta:l,error:e,err:e,fatal:!1};if(e.code===DOMException.QUOTA_EXCEEDED_ERR)t.details=p.BUFFER_FULL_ERROR;else{const e=++this.appendErrors[a];t.details=p.BUFFER_APPEND_ERROR,this.warn(`Failed ${e}/${s.config.appendErrorMaxRetry} times to append segment in "${a}" sourceBuffer`),e>=s.config.appendErrorMaxRetry&&(t.fatal=!0)}s.trigger(_.ERROR,t)}};i.append(M,a,!!this.pendingTracks[a])}onBufferFlushing(e,t){const{operationQueue:s}=this,i=e=>({execute:this.removeExecutor.bind(this,e,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(_.BUFFER_FLUSHED,{type:e})},onError:t=>{this.warn(`Failed to remove from ${e} SourceBuffer`,t)}});t.type?s.append(i(t.type),t.type):this.getSourceBufferTypes().forEach(e=>{s.append(i(e),e)})}onFragParsed(e,t){const{frag:s,part:i}=t,n=[],r=i?i.elementaryStreams:s.elementaryStreams;r[x.AUDIOVIDEO]?n.push("audiovideo"):(r[x.AUDIO]&&n.push("audio"),r[x.VIDEO]&&n.push("video"));const a=()=>{const e=self.performance.now();s.stats.buffering.end=e,i&&(i.stats.buffering.end=e);const t=i?i.stats:s.stats;this.hls.trigger(_.FRAG_BUFFERED,{frag:s,part:i,stats:t,id:s.type})};0===n.length&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${s.type} level: ${s.level} sn: ${s.sn}`),this.blockBuffers(a,n)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){const s=this.getSourceBufferTypes().reduce((e,s)=>{const i=this.sourceBuffer[s];return!i||t.type&&t.type!==s||(i.ending=!0,i.ended||(i.ended=!0,this.log(s+" sourceBuffer now EOS"))),e&&!(i&&!i.ended)},!0);s&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(e=>{const t=this.sourceBuffer[e];t&&(t.ending=!1)});const{mediaSource:e}=this;e&&"open"===e.readyState?(this.log("Calling mediaSource.endOfStream()"),e.endOfStream()):e&&this.log("Could not call mediaSource.endOfStream(). mediaSource.readyState: "+e.readyState)}))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}trimBuffers(){const{hls:e,details:t,media:s}=this;if(!s||null===t)return;const i=this.getSourceBufferTypes();if(!i.length)return;const n=e.config,r=s.currentTime,a=t.levelTargetDuration,o=t.live&&null!==n.liveBackBufferLength?n.liveBackBufferLength:n.backBufferLength;if(c(o)&&o>0){const e=Math.max(o,a),t=Math.floor(r/a)*a-e;this.flushBackBuffer(r,a,t)}if(c(n.frontBufferFlushThreshold)&&n.frontBufferFlushThreshold>0){const e=Math.max(n.maxBufferLength,n.frontBufferFlushThreshold),t=Math.max(e,a),s=Math.floor(r/a)*a+t;this.flushFrontBuffer(r,a,s)}}flushBackBuffer(e,t,s){const{details:i,sourceBuffer:n}=this,r=this.getSourceBufferTypes();r.forEach(r=>{const a=n[r];if(a){const n=_i.getBuffered(a);if(n.length>0&&s>n.start(0)){if(this.hls.trigger(_.BACK_BUFFER_REACHED,{bufferEnd:s}),null!=i&&i.live)this.hls.trigger(_.LIVE_BACK_BUFFER_REACHED,{bufferEnd:s});else if(a.ended&&n.end(n.length-1)-e<2*t)return void this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);this.hls.trigger(_.BUFFER_FLUSHING,{startOffset:0,endOffset:s,type:r})}}})}flushFrontBuffer(e,t,s){const{sourceBuffer:i}=this,n=this.getSourceBufferTypes();n.forEach(n=>{const r=i[n];if(r){const i=_i.getBuffered(r),a=i.length;if(a<2)return;const o=i.start(a-1),d=i.end(a-1);if(s>o||e>=o&&e<=d)return;if(r.ended&&e-d<2*t)return void this.log(`Cannot flush ${n} front buffer while SourceBuffer is in ended state`);this.hls.trigger(_.BUFFER_FLUSHING,{startOffset:o,endOffset:1/0,type:n})}})}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||"open"!==this.mediaSource.readyState)return;const{details:e,hls:t,media:s,mediaSource:i}=this,n=e.fragments[0].start+e.totalduration,r=s.duration,a=c(i.duration)?i.duration:0;e.live&&t.config.liveDurationInfinity?(i.duration=1/0,this.updateSeekableRange(e)):(n>a&&n>r||!c(r))&&(this.log("Updating Media Source duration to "+n.toFixed(3)),i.duration=n)}updateSeekableRange(e){const t=this.mediaSource,s=e.fragments,i=s.length;if(i&&e.live&&null!=t&&t.setLiveSeekableRange){const i=Math.max(0,s[0].start),n=Math.max(i,i+e.totalduration);this.log(`Media Source duration is set to ${t.duration}. Setting seekable range to ${i}-${n}.`),t.setLiveSeekableRange(i,n)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:s}=this,i=Object.keys(s).length;if(i&&(!e||2===i||"audiovideo"in s)){this.createSourceBuffers(s),this.pendingTracks={};const e=this.getSourceBufferTypes();if(e.length)this.hls.trigger(_.BUFFER_CREATED,{tracks:this.tracks}),e.forEach(e=>{t.executeNext(e)});else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:s}=this;if(!s)throw Error("createSourceBuffers called when mediaSource was null");for(const n in e)if(!t[n]){var i;const r=e[n];if(!r)throw Error(`source buffer exists for track ${n}, however track does not`);let a=-1===(null==(i=r.levelCodec)?void 0:i.indexOf(","))?r.levelCodec:r.codec;a&&"audio"===n.slice(0,5)&&(a=Mt(a,this.appendSource));const o=`${r.container};codecs=${a}`;this.log(`creating sourceBuffer(${o})`);try{const e=t[n]=s.addSourceBuffer(o),i=n;this.addBufferListener(i,"updatestart",this._onSBUpdateStart),this.addBufferListener(i,"updateend",this._onSBUpdateEnd),this.addBufferListener(i,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(i,"bufferedchange",(e,t)=>{const s=t.removedRanges;null!=s&&s.length&&this.hls.trigger(_.BUFFER_FLUSHED,{type:n})}),this.tracks[n]={buffer:e,codec:a,container:r.container,levelCodec:r.levelCodec,metadata:r.metadata,id:r.id}}catch(bd){this.error("error while trying to add sourceBuffer: "+bd.message),this.hls.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:bd,sourceBufferName:n,mimeType:o})}}}get mediaSrc(){var e;const t=(null==(e=this.media)?void 0:e.firstChild)||this.media;return null==t?void 0:t.src}_onSBUpdateStart(e){const{operationQueue:t}=this,s=t.current(e);s.onStart()}_onSBUpdateEnd(e){var t;if("closed"===(null==(t=this.mediaSource)?void 0:t.readyState))return void this.resetBuffer(e);const{operationQueue:s}=this,i=s.current(e);i.onComplete(),s.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var s;const i=new Error(`${e} SourceBuffer error. MediaSource readyState: ${null==(s=this.mediaSource)?void 0:s.readyState}`);this.error(""+i,t),this.hls.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:i,fatal:!1});const n=this.operationQueue.current(e);n&&n.onError(i)}removeExecutor(e,t,s){const{media:i,mediaSource:n,operationQueue:r,sourceBuffer:a}=this,o=a[e];if(!i||!n||!o)return this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),void r.shiftAndExecuteNext(e);const d=c(i.duration)?i.duration:1/0,l=c(n.duration)?n.duration:1/0,u=Math.max(0,t),h=Math.min(s,d,l);h>u&&(!o.ending||o.ended)?(o.ended=!1,this.log(`Removing [${u},${h}] from the ${e} SourceBuffer`),o.remove(u,h)):r.shiftAndExecuteNext(e)}appendExecutor(e,t){const s=this.sourceBuffer[t];if(s)s.ended=!1,s.appendBuffer(e);else if(!this.pendingTracks[t])throw new Error(`Attempting to append to the ${t} SourceBuffer, but it does not exist`)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);const{operationQueue:s}=this,i=t.map(e=>s.appendBlocker(e));Promise.all(i).then(()=>{e(),t.forEach(e=>{const t=this.sourceBuffer[e];null!=t&&t.updating||s.shiftAndExecuteNext(e)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,s){const i=this.sourceBuffer[e];if(!i)return;const n=s.bind(this,e);this.listeners[e].push({event:t,listener:n}),i.addEventListener(t,n)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach(e=>{t.removeEventListener(e.event,e.listener)})}}function Rr(e){const t=e.querySelectorAll("source");[].slice.call(t).forEach(t=>{e.removeChild(t)})}function xr(e,t){const s=self.document.createElement("source");s.type="video/mp4",s.src=t,e.appendChild(s)}const Ir={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Pr=e=>String.fromCharCode(Ir[e]||e),Or=15,Cr=100,Fr={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Hr={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Nr={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},jr={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ur=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Br{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const s="function"===typeof t?t():t;k.log(`${this.time} [${e}] ${s}`)}}}const $r=function(e){const t=[];for(let s=0;s<e.length;s++)t.push(e[s].toString(16));return t};class Wr{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let s=0;s<t.length;s++){const i=t[s];e.hasOwnProperty(i)&&(this[i]=e[i])}}isDefault(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Gr{constructor(){this.uchar=" ",this.penState=new Wr}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return" "===this.uchar&&this.penState.isDefault()}}class Kr{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Wr,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<Cr;t++)this.chars.push(new Gr);this.logger=e}equals(e){for(let t=0;t<Cr;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Cr;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Cr;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Cr&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Cr)}moveCursor(e){const t=this.pos+e;if(e>1)for(let s=this.pos+1;s<t+1;s++)this.chars[s].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=Pr(e);this.pos>=Cr?this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))}clearFromPos(e){let t;for(t=e;t<Cr;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let s=0;s<Cr;s++){const i=this.chars[s].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e);const t=this.chars[this.pos];t.setPenState(this.currPenState)}}class Vr{constructor(e){this.rows=[],this.currRow=Or-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Or;t++)this.rows.push(new Kr(e));this.logger=e}reset(){for(let e=0;e<Or;e++)this.rows[e].clear();this.currRow=Or-1}equals(e){let t=!0;for(let s=0;s<Or;s++)if(!this.rows[s].equals(e.rows[s])){t=!1;break}return t}copy(e){for(let t=0;t<Or;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Or;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){const e=this.rows[this.currRow];e.backSpace()}clearToEndOfRow(){const e=this.rows[this.currRow];e.clearToEndOfRow()}insertChar(e){const t=this.rows[this.currRow];t.insertChar(e)}setPen(e){const t=this.rows[this.currRow];t.setPenStyles(e)}moveCursor(e){const t=this.rows[this.currRow];t.moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e);const t=this.rows[this.currRow];t.setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+JSON.stringify(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let t=0;t<Or;t++)this.rows[t].clear();const e=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const i=s.rows[e].cueStartTime,n=this.logger.time;if(null!==i&&null!==n&&i<n)for(let r=0;r<this.nrRollUpRows;r++)this.rows[t-this.nrRollUpRows+r+1].copy(s.rows[e+r])}}this.currRow=t;const s=this.rows[this.currRow];if(null!==e.indent){const t=e.indent,i=Math.max(t-1,0);s.setCursor(e.indent),e.color=s.chars[i].penState.foreground}const i={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(i)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(null===this.nrRollUpRows)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let s="",i=-1;for(let n=0;n<Or;n++){const s=this.rows[n].getTextString();s&&(i=n+1,e?t.push("Row "+i+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(s=e?"["+t.join(" | ")+"]":t.join("\n")),s}getTextAndFormat(){return this.rows}}class zr{constructor(e,t,s){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Vr(s),this.nonDisplayedMemory=new Vr(s),this.lastOutputScreen=new Vr(s),this.currRollUpRow=this.displayedMemory.rows[Or-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=s}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Or-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let s=0;s<e.length;s++)this.writeScreen.insertChar(e[s]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const s=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=i[s]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class qr{constructor(e,t,s){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Qr(),this.logger=void 0;const i=this.logger=new Br;this.channels=[null,new zr(e,t,i),new zr(e+1,s,i)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let s=0;s<t.length;s+=2){const e=127&t[s],i=127&t[s+1];let n=!1,r=null;if(0===e&&0===i)continue;this.logger.log(3,()=>"["+$r([t[s],t[s+1]])+"] -> ("+$r([e,i])+")");const a=this.cmdHistory,o=e>=16&&e<=31;if(o){if(Xr(e,i,a)){Jr(null,null,a),this.logger.log(3,()=>"Repeated command ("+$r([e,i])+") is dropped");continue}Jr(e,i,this.cmdHistory),n=this.parseCmd(e,i),n||(n=this.parseMidrow(e,i)),n||(n=this.parsePAC(e,i)),n||(n=this.parseBackgroundAttributes(e,i))}else Jr(null,null,a);if(!n&&(r=this.parseChars(e,i),r)){const e=this.currentChannel;if(e&&e>0){const t=this.channels[e];t.insertChars(r)}else this.logger.log(2,"No channel found yet. TEXT-MODE?")}n||r||this.logger.log(2,()=>"Couldn't parse cleaned data "+$r([e,i])+" orig: "+$r([t[s],t[s+1]]))}}parseCmd(e,t){const s=(20===e||28===e||21===e||29===e)&&t>=32&&t<=47,i=(23===e||31===e)&&t>=33&&t<=35;if(!s&&!i)return!1;const n=20===e||21===e||23===e?1:2,r=this.channels[n];return 20===e||21===e||28===e||29===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),this.currentChannel=n,!0}parseMidrow(e,t){let s=0;if((17===e||25===e)&&t>=32&&t<=47){if(s=17===e?1:2,s!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const i=this.channels[s];return!!i&&(i.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+$r([e,t])+")"),!0)}return!1}parsePAC(e,t){let s;const i=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,n=(16===e||24===e)&&t>=64&&t<=95;if(!i&&!n)return!1;const r=e<=23?1:2;s=t>=64&&t<=95?1===r?Fr[e]:Nr[e]:1===r?Hr[e]:jr[e];const a=this.channels[r];return!!a&&(a.setPAC(this.interpretPAC(s,t)),this.currentChannel=r,!0)}interpretPAC(e,t){let s;const i={color:null,italics:!1,indent:null,underline:!1,row:e};return s=t>95?t-96:t-64,i.underline=1===(1&s),s<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(s/2)]:s<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((s-16)/2),i}parseChars(e,t){let s,i=null,n=null;if(e>=25?(s=2,n=e-8):(s=1,n=e),n>=17&&n<=19){let e;e=17===n?t+80:18===n?t+112:t+144,this.logger.log(2,()=>"Special char '"+Pr(e)+"' in channel "+s),i=[e]}else e>=32&&e<=127&&(i=0===t?[e]:[e,t]);return i&&this.logger.log(3,()=>"Char codes = "+$r(i).join(",")),i}parseBackgroundAttributes(e,t){const s=(16===e||24===e)&&t>=32&&t<=47,i=(23===e||31===e)&&t>=45&&t<=47;if(!s&&!i)return!1;let n;const r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=Ur[n],t%2===1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));const a=e<=23?1:2,o=this.channels[a];return o.setBkgData(r),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}Jr(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const s=this.channels[t];s&&s.cueSplitAtTime(e)}}}function Jr(e,t,s){s.a=e,s.b=t}function Xr(e,t,s){return s.a===e&&s.b===t}function Qr(){return{a:null,b:null}}class Zr{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,s){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=s,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var ea=function(){if(null!=$&&$.VTTCue)return self.VTTCue;const e=["","lr","rl"],t=["start","middle","end","left","right"];function s(e,t){if("string"!==typeof t)return!1;if(!Array.isArray(e))return!1;const s=t.toLowerCase();return!!~e.indexOf(s)&&s}function i(t){return s(e,t)}function n(e){return s(t,e)}function r(e,...t){let s=1;for(;s<arguments.length;s++){const t=arguments[s];for(const s in t)e[s]=t[s]}return e}function a(e,t,s){const a=this,o={enumerable:!0};a.hasBeenReset=!1;let d="",l=!1,u=e,h=t,c=s,m=null,f="",_=!0,g="auto",p="start",y=50,L="middle",M=50,T="middle";Object.defineProperty(a,"id",r({},o,{get:function(){return d},set:function(e){d=""+e}})),Object.defineProperty(a,"pauseOnExit",r({},o,{get:function(){return l},set:function(e){l=!!e}})),Object.defineProperty(a,"startTime",r({},o,{get:function(){return u},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");u=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",r({},o,{get:function(){return h},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",r({},o,{get:function(){return c},set:function(e){c=""+e,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",r({},o,{get:function(){return m},set:function(e){m=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",r({},o,{get:function(){return f},set:function(e){const t=i(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");f=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",r({},o,{get:function(){return _},set:function(e){_=!!e,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",r({},o,{get:function(){return g},set:function(e){if("number"!==typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",r({},o,{get:function(){return p},set:function(e){const t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");p=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",r({},o,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",r({},o,{get:function(){return L},set:function(e){const t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");L=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",r({},o,{get:function(){return M},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");M=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",r({},o,{get:function(){return T},set:function(e){const t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");T=t,this.hasBeenReset=!0}})),a.displayState=void 0}return a.prototype.getCueAsHTML=function(){const e=self.WebVTT;return e.convertCueToDOMTree(self,this.text)},a}();class ta{decode(e,t){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function sa(e){function t(e,t,s,i){return 3600*(0|e)+60*(0|t)+(0|s)+parseFloat(i||0)}const s=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return s?parseFloat(s[2])>59?t(s[2],s[3],0,s[4]):t(s[1],s[2],s[3],s[4]):null}class ia{constructor(){this.values=Object.create(null)}set(e,t){this.get(e)||""===t||(this.values[e]=t)}get(e,t,s){return s?this.has(e)?this.values[e]:t[s]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,s){for(let i=0;i<s.length;++i)if(t===s[i]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const s=parseFloat(t);if(s>=0&&s<=100)return this.set(e,s),!0}return!1}}function na(e,t,s,i){const n=i?e.split(i):[e];for(const r in n){if("string"!==typeof n[r])continue;const e=n[r].split(s);if(2!==e.length)continue;const i=e[0],a=e[1];t(i,a)}}const ra=new ea(0,0,""),aa="middle"===ra.align?"middle":"center";function oa(e,t,s){const i=e;function n(){const t=sa(e);if(null===t)throw new Error("Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function r(e,t){const i=new ia;na(e,(function(e,t){let n;switch(e){case"region":for(let n=s.length-1;n>=0;n--)if(s[n].id===t){i.set(e,s[n].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":n=t.split(","),i.integer(e,n[0]),i.percent(e,n[0])&&i.set("snapToLines",!1),i.alt(e,n[0],["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",aa,"end"]);break;case"position":n=t.split(","),i.percent(e,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",aa,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",aa,"end","left","right"]);break}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");let n=i.get("line","auto");"auto"===n&&-1===ra.line&&(n=-1),t.line=n,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",aa);let r=i.get("position","auto");"auto"===r&&50===ra.position&&(r="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=r}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=n(),a(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.slice(3),a(),t.endTime=n(),a(),r(e,t)}function da(e){return e.replace(/<br(?: \/)?>/gi,"\n")}class la{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new ta,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;function s(){let e=t.buffer,s=0;e=da(e);while(s<e.length&&"\r"!==e[s]&&"\n"!==e[s])++s;const i=e.slice(0,s);return"\r"===e[s]&&++s,"\n"===e[s]&&++s,t.buffer=e.slice(s),i}function i(e){na(e,(function(e,t){}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{let e="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;e=s();const i=e.match(/^()?WEBVTT([ \t].*)?$/);if(null==i||!i[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let r=!1;while(t.buffer){if(!/\r\n|\n/.test(t.buffer))return this;switch(r?r=!1:e=s(),t.state){case"HEADER":/:/.test(e)?i(e):e||(t.state="ID");continue;case"NOTE":e||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(e)){t.state="NOTE";break}if(!e)continue;if(t.cue=new ea(0,0,""),t.state="CUE",-1===e.indexOf("--\x3e")){t.cue.id=e;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{oa(e,t.cue,t.regionList)}catch(n){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const s=-1!==e.indexOf("--\x3e");if(!e||s&&(r=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=e}continue;case"BADCUE":e||(t.state="ID")}}}catch(n){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const ua=/\r\n|\n\r|\n|\r/g,ha=function(e,t,s=0){return e.slice(s,s+t.length)===t},ca=function(e){let t=parseInt(e.slice(-3));const s=parseInt(e.slice(-6,-4)),i=parseInt(e.slice(-9,-7)),n=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!c(t)||!c(s)||!c(i)||!c(n))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*s,t+=6e4*i,t+=36e5*n,t},ma=function(e){let t=5381,s=e.length;while(s)t=33*t^e.charCodeAt(--s);return(t>>>0).toString()};function fa(e,t,s){return ma(e.toString())+ma(t.toString())+ma(s)}const _a=function(e,t,s){let i=e[t],n=e[i.prevCC];if(!n||!n.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);while(null!=(r=n)&&r.new){var r;e.ccOffset+=i.start-n.start,i.new=!1,i=n,n=e[i.prevCC]}e.presentationOffset=s};function ga(e,t,s,i,n,r,a){const o=new la,d=_e(new Uint8Array(e)).trim().replace(ua,"\n").split("\n"),l=[],u=t?Wn(t.baseTime,t.timescale):0;let h,c="00:00.000",m=0,f=0,_=!0;o.oncue=function(e){const r=s[i];let a=s.ccOffset;const o=(m-u)/9e4;if(null!=r&&r.new&&(void 0!==f?a=s.ccOffset=r.start:_a(s,i,o)),o){if(!t)return void(h=new Error("Missing initPTS for VTT MPEGTS"));a=o-s.presentationOffset}const d=e.endTime-e.startTime,c=Zn(9e4*(e.startTime+a-f),9e4*n)/9e4;e.startTime=Math.max(c,0),e.endTime=Math.max(c+d,0);const _=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(_)),e.id||(e.id=fa(e.startTime,e.endTime,_)),e.endTime>0&&l.push(e)},o.onparsingerror=function(e){h=e},o.onflush=function(){h?a(h):r(l)},d.forEach(e=>{if(_){if(ha(e,"X-TIMESTAMP-MAP=")){_=!1,e.slice(16).split(",").forEach(e=>{ha(e,"LOCAL:")?c=e.slice(6):ha(e,"MPEGTS:")&&(m=parseInt(e.slice(7)))});try{f=ca(c)/1e3}catch(t){h=t}return}""===e&&(_=!1)}o.parse(e+"\n")}),o.flush()}const pa="stpp.ttml.im1t",ya=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,La=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Ma={left:"start",center:"center",right:"end",start:"start",end:"end"};function Ta(e,t,s,i){const n=Ye(new Uint8Array(e),["mdat"]);if(0===n.length)return void i(new Error("Could not parse IMSC1 mdat"));const r=n.map(e=>_e(e)),a=Bn(t.baseTime,1,t.timescale);try{r.forEach(e=>s(va(e,a)))}catch(o){i(o)}}function va(e,t){const s=new DOMParser,i=s.parseFromString(e,"text/xml"),n=i.getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");const r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(r).reduce((e,t)=>(e[t]=n.getAttribute("ttp:"+t)||r[t],e),{}),o="preserve"!==n.getAttribute("xml:space"),d=ka(Da(n,"styling","style")),l=ka(Da(n,"layout","region")),u=Da(n,"body","[begin]");return[].map.call(u,e=>{const s=Sa(e,o);if(!s||!e.hasAttribute("begin"))return null;const i=Ya(e.getAttribute("begin"),a),n=Ya(e.getAttribute("dur"),a);let r=Ya(e.getAttribute("end"),a);if(null===i)throw Ea(e);if(null===r){if(null===n)throw Ea(e);r=i+n}const u=new ea(i-t,r-t,s);u.id=fa(u.startTime,u.endTime,u.text);const c=l[e.getAttribute("region")],m=d[e.getAttribute("style")],f=wa(c,m,d),{textAlign:_}=f;if(_){const e=Ma[_];e&&(u.lineAlign=e),u.align=_}return h(u,f),u}).filter(e=>null!==e)}function Da(e,t,s){const i=e.getElementsByTagName(t)[0];return i?[].slice.call(i.querySelectorAll(s)):[]}function ka(e){return e.reduce((e,t)=>{const s=t.getAttribute("xml:id");return s&&(e[s]=t),e},{})}function Sa(e,t){return[].slice.call(e.childNodes).reduce((e,s,i)=>{var n;return"br"===s.nodeName&&i?e+"\n":null!=(n=s.childNodes)&&n.length?Sa(s,t):t?e+s.textContent.trim().replace(/\s+/g," "):e+s.textContent},"")}function wa(e,t,s){const i="http://www.w3.org/ns/ttml#styling";let n=null;const r=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;return a&&s.hasOwnProperty(a)&&(n=s[a]),r.reduce((s,r)=>{const a=ba(t,i,r)||ba(e,i,r)||ba(n,i,r);return a&&(s[r]=a),s},{})}function ba(e,t,s){return e&&e.hasAttributeNS(t,s)?e.getAttributeNS(t,s):null}function Ea(e){return new Error("Could not parse ttml timestamp "+e)}function Ya(e,t){if(!e)return null;let s=sa(e);return null===s&&(ya.test(e)?s=Aa(e,t):La.test(e)&&(s=Ra(e,t))),s}function Aa(e,t){const s=ya.exec(e),i=(0|s[4])+(0|s[5])/t.subFrameRate;return 3600*(0|s[1])+60*(0|s[2])+(0|s[3])+i/t.frameRate}function Ra(e,t){const s=La.exec(e),i=Number(s[1]),n=s[2];switch(n){case"h":return 3600*i;case"m":return 60*i;case"ms":return 1e3*i;case"f":return i/t.frameRate;case"t":return i/t.tickRate}return i}class xa{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Ca(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(_.FRAG_LOADING,this.onFragLoading,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this),e.on(_.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(_.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(_.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(_.FRAG_LOADING,this.onFragLoading,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this),e.off(_.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(_.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(_.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new Zr(this,"textTrack1"),t=new Zr(this,"textTrack2"),s=new Zr(this,"textTrack3"),i=new Zr(this,"textTrack4");this.cea608Parser1=new qr(1,e,t),this.cea608Parser2=new qr(3,s,i)}}addCues(e,t,s,i,n){let r=!1;for(let a=n.length;a--;){const e=n[a],i=Oa(e[0],e[1],t,s);if(i>=0&&(e[0]=Math.min(e[0],t),e[1]=Math.max(e[1],s),r=!0,i/(s-t)>.5))return}if(r||n.push([t,s]),this.config.renderTextTracksNatively){const n=this.captionsTracks[e];this.Cues.newCue(n,t,s,i)}else{const n=this.Cues.newCue(null,t,s,i);this.hls.trigger(_.CUES_PARSED,{type:"captions",cues:n,track:e})}}onInitPtsFound(e,{frag:t,id:s,initPTS:i,timescale:n}){const{unparsedVttFrags:r}=this;"main"===s&&(this.initPTS[t.cc]={baseTime:i,timescale:n}),r.length&&(this.unparsedVttFrags=[],r.forEach(e=>{this.onFragLoaded(_.FRAG_LOADED,e)}))}getExistingTrack(e,t){const{media:s}=this;if(s)for(let i=0;i<s.textTracks.length;i++){const n=s.textTracks[i];if(Pa(n,{name:e,lang:t,attrs:{}}))return n}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:s,media:i}=this,{label:n,languageCode:r}=t[e],a=this.getExistingTrack(n,r);if(a)s[e]=a,Wt(s[e]),Bt(s[e],i);else{const t=this.createTextTrack("captions",n,r);t&&(t[e]=!0,s[e]=t)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const s=t.label,i={_id:e,label:s,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(_.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,t,s){const i=this.media;if(i)return i.addTextTrack(e,t,s)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(t=>{Wt(e[t]),delete e[t]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Ca(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let s=0;s<t.length;s++)Wt(t[s])}onSubtitleTracksUpdated(e,t){const s=t.subtitleTracks||[],i=s.some(e=>e.textCodec===pa);if(this.config.enableWebVTT||i&&this.config.enableIMSC1){const e=yr(this.tracks,s);if(e)return void(this.tracks=s);if(this.textTracks=[],this.tracks=s,this.config.renderTextTracksNatively){const e=this.media,t=e?zt(e.textTracks):null;if(this.tracks.forEach((e,s)=>{let i;if(t){let s=null;for(let i=0;i<t.length;i++)if(t[i]&&Pa(t[i],e)){s=t[i],t[i]=null;break}s&&(i=s)}if(i)Wt(i);else{const t=Ia(e);i=this.createTextTrack(t,e.name,e.lang),i&&(i.mode="disabled")}i&&this.textTracks.push(i)}),null!=t&&t.length){const e=t.filter(e=>null!==e).map(e=>e.label);e.length&&k.warn(`Media element contains unused subtitle tracks: ${e.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const e=this.tracks.map(e=>({label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}));this.hls.trigger(_.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(e=>{const t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(!t)return;const s="textTrack"+t[1],i=this.captionsProperties[s];i&&(i.label=e.name,e.lang&&(i.languageCode=e.lang),i.media=e)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===Ht.MAIN){var s,i;const{cea608Parser1:e,cea608Parser2:n,lastSn:r}=this,{cc:a,sn:o}=t.frag,d=null!=(s=null==(i=t.part)?void 0:i.index)?s:-1;e&&n&&(o!==r+1||o===r&&d!==this.lastPartIndex+1||a!==this.lastCc)&&(e.reset(),n.reset()),this.lastCc=a,this.lastSn=o,this.lastPartIndex=d}}onFragLoaded(e,t){const{frag:s,payload:i}=t;if(s.type===Ht.SUBTITLE)if(i.byteLength){const e=s.decryptdata,n="stats"in t;if(null==e||!e.encrypted||n){const e=this.tracks[s.level],n=this.vttCCs;n[s.cc]||(n[s.cc]={start:s.start,prevCC:this.prevCC,new:!0},this.prevCC=s.cc),e&&e.textCodec===pa?this._parseIMSC1(s,i):this._parseVTTs(t)}}else this.hls.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const s=this.hls;Ta(t,this.initPTS[e.cc],t=>{this._appendCues(t,e.level),s.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},t=>{k.log("Failed to parse IMSC1: "+t),s.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})})}_parseVTTs(e){var t;const{frag:s,payload:i}=e,{initPTS:n,unparsedVttFrags:r}=this,a=n.length-1;if(!n[s.cc]&&-1===a)return void r.push(e);const o=this.hls,d=null!=(t=s.initSegment)&&t.data?$e(s.initSegment.data,new Uint8Array(i)):i;ga(d,this.initPTS[s.cc],this.vttCCs,s.cc,s.start,e=>{this._appendCues(e,s.level),o.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},t=>{const n="Missing initPTS for VTT MPEGTS"===t.message;n?r.push(e):this._fallbackToIMSC1(s,i),k.log("Failed to parse VTT cue: "+t),n&&a>s.cc||o.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:t})})}_fallbackToIMSC1(e,t){const s=this.tracks[e.level];s.textCodec||Ta(t,this.initPTS[e.cc],()=>{s.textCodec=pa,this._parseIMSC1(e,t)},()=>{s.textCodec="wvtt"})}_appendCues(e,t){const s=this.hls;if(this.config.renderTextTracksNatively){const s=this.textTracks[t];if(!s||"disabled"===s.mode)return;e.forEach(e=>$t(s,e))}else{const i=this.tracks[t];if(!i)return;const n=i.default?"default":"subtitles"+t;s.trigger(_.CUES_PARSED,{type:"subtitles",cues:e,track:n})}}onFragDecrypted(e,t){const{frag:s}=t;s.type===Ht.SUBTITLE&&this.onFragLoaded(_.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:s,cea608Parser2:i}=this;if(!this.enabled||!s||!i)return;const{frag:n,samples:r}=t;if(n.type!==Ht.MAIN||"NONE"!==this.closedCaptionsForLevel(n))for(let a=0;a<r.length;a++){const e=r[a].bytes;if(e){const t=this.extractCea608Data(e);s.addData(r[a].pts,t[0]),i.addData(r[a].pts,t[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:s,endOffsetSubtitles:i,type:n}){const{media:r}=this;if(r&&!(r.currentTime<s)){if(!n||"video"===n){const{captionsTracks:e}=this;Object.keys(e).forEach(i=>Gt(e[i],t,s))}if(this.config.renderTextTracksNatively&&0===t&&void 0!==i){const{textTracks:e}=this;Object.keys(e).forEach(s=>Gt(e[s],t,i))}}}extractCea608Data(e){const t=[[],[]],s=31&e[0];let i=2;for(let n=0;n<s;n++){const s=e[i++],n=127&e[i++],r=127&e[i++];if(0===n&&0===r)continue;const a=0!==(4&s);if(a){const e=3&s;0!==e&&1!==e||(t[e].push(n),t[e].push(r))}}return t}}function Ia(e){return e.characteristics&&/transcribes-spoken-dialog/gi.test(e.characteristics)&&/describes-music-and-sound/gi.test(e.characteristics)?"captions":"subtitles"}function Pa(e,t){return!!e&&e.kind===Ia(t)&&Mr(t,e)}function Oa(e,t,s,i){return Math.min(t,i)-Math.max(e,s)}function Ca(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class Fa{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(_.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.BUFFER_CODECS,this.onBufferCodecs,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(_.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.BUFFER_CODECS,this.onBufferCodecs,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const s=this.hls.levels[t.droppedLevel];this.isLevelAllowed(s)&&this.restrictedLevels.push({bitrate:s.bitrate,height:s.height,width:s.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const s=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,s.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&c(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){const s=this.hls;s.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);const e=this.hls.levels;if(e.length){const t=this.hls,s=this.getMaxLevel(e.length-1);s!==this.autoLevelCapping&&k.log(`Setting autoLevelCapping to ${s}: ${e[s].height}p@${e[s].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=s,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const s=t.filter((t,s)=>this.isLevelAllowed(t)&&s<=e);return this.clientRect=null,Fa.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const s=e.getBoundingClientRect();t.width=s.width,t.height=s.height,t.width||t.height||(t.width=s.right-s.left||e.width||0,t.height=s.bottom-s.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return e}isLevelAllowed(e){const t=this.restrictedLevels;return!t.some(t=>e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height)}static getMaxLevelByMediaSize(e,t,s){if(null==e||!e.length)return-1;const i=(e,t)=>!t||(e.width!==t.width||e.height!==t.height);let n=e.length-1;const r=Math.max(t,s);for(let a=0;a<e.length;a+=1){const t=e[a];if((t.width>=r||t.height>=r)&&i(t,e[a+1])){n=a;break}}return n}}class Ha{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const s=this.hls.config;if(s.capLevelOnFPSDrop){const e=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=e,e&&"function"===typeof e.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),s.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,s){const i=performance.now();if(t){if(this.lastTime){const e=i-this.lastTime,n=s-this.lastDroppedFrames,r=t-this.lastDecodedFrames,a=1e3*n/e,o=this.hls;if(o.trigger(_.FPS_DROP,{currentDropped:n,currentDecoded:r,totalDroppedFrames:s}),a>0&&n>o.config.fpsDroppedMonitoringThreshold*r){let e=o.currentLevel;k.warn("drop FPS ratio greater than max allowed value for currentLevel: "+e),e>0&&(-1===o.autoLevelCapping||o.autoLevelCapping>=e)&&(e-=1,o.trigger(_.FPS_DROP_LEVEL_CAPPING,{level:e,droppedLevel:o.currentLevel}),o.autoLevelCapping=e,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=s,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}const Na="[eme]";class ja{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=ja.CDMCleanupPromise?[ja.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=k.debug.bind(k,Na),this.log=k.log.bind(k,Na),this.warn=k.warn.bind(k,Na),this.error=k.error.bind(k,Na),this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(_.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(_.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(_.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(_.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:s}=this.config,i=t[e];if(i)return i.licenseUrl;if(e===W.WIDEVINE&&s)return s;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,s=t[e];if(s)return s.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,s=(e,t,s)=>!!e&&s.indexOf(e)===t,i=t.map(e=>e.audioCodec).filter(s),n=t.map(e=>e.videoCodec).filter(s);return i.length+n.length===0&&n.push("avc1.42e01e"),new Promise((t,s)=>{const r=e=>{const a=e.shift();this.getMediaKeysPromise(a,i,n).then(e=>t({keySystem:a,mediaKeys:e})).catch(t=>{e.length?r(e):s(t instanceof Ua?t:new Ua({type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))})};r(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:s}=this.config;if("function"!==typeof s){let e="Configured requestMediaKeySystemAccess is not a function "+s;return null===X&&"http:"===self.location.protocol&&(e="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(e))}return s(e,t)}getMediaKeysPromise(e,t,s){const i=Q(e,t,s,this.config.drmSystemOptions),n=this.keySystemAccessPromises[e];let r=null==n?void 0:n.keySystemAccess;if(!r){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(i)}`),r=this.requestMediaKeySystemAccess(e,i);const t=this.keySystemAccessPromises[e]={keySystemAccess:r};return r.catch(t=>{this.log(`Failed to obtain access to key-system "${e}": ${t}`)}),r.then(s=>{this.log(`Access for key-system "${s.keySystem}" obtained`);const i=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),t.mediaKeys=s.createMediaKeys().then(t=>(this.log(`Media-keys created for "${e}"`),i.then(s=>s?this.setMediaKeysServerCertificate(t,e,s):t))),t.mediaKeys.catch(t=>{this.error(`Failed to create media-keys for "${e}"}: ${t}`)}),t.mediaKeys})}return r.then(()=>n.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:s}){this.log(`Creating key-system session "${t}" keyId: ${ye.hexDump(e.keyId||[])}`);const i=s.createSession(),n={decryptdata:e,keySystem:t,mediaKeys:s,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(n),n}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const s=this.createMediaKeySessionContext(e),i=this.getKeyIdString(t),n="cenc";this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(s,n,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return ye.hexDump(e.keyId)}updateKeySession(e,t){var s;const i=e.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyID ${ye.hexDump((null==(s=e.decryptdata)?void 0:s.keyId)||[])}\n } (data length: ${t?t.byteLength:t})`),i.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,s)=>{const i=J(this.config),n=e.map(K).filter(e=>!!e&&-1!==i.indexOf(e));return this.getKeySystemSelectionPromise(n).then(({keySystem:e})=>{const i=q(e);i?t(i):s(new Error(`Unable to find format for key-system "${e}"`))}).catch(s)})}loadKey(e){const t=e.keyInfo.decryptdata,s=this.getKeyIdString(t),i=`(keyId: ${s} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log("Starting session for key "+i);let n=this.keyIdToKeySessionPromise[s];return n||(n=this.keyIdToKeySessionPromise[s]=this.getKeySystemForKeyPromise(t).then(({keySystem:s,mediaKeys:n})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(s,n).then(()=>{this.throwIfDestroyed();const e=this.createMediaKeySessionContext({keySystem:s,mediaKeys:n,decryptdata:t}),i="cenc";return this.generateRequestWithPreferredKeySession(e,i,t.pssh,"playlist-key")}))),n.catch(e=>this.handleError(e))),n}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Ua?this.hls.trigger(_.ERROR,e.data):this.hls.trigger(_.ERROR,{type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),s=this.keyIdToKeySessionPromise[t];if(!s){const t=K(e.keyFormat),s=t?[t]:J(this.config);return this.attemptKeySystemAccess(s)}return s}getKeySystemSelectionPromise(e){if(e.length||(e=J(this.config)),0===e.length)throw new Ua({type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+JSON.stringify({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:s}=e;if(this.debug(`"${e.type}" event: init data type: "${t}"`),null===s)return;let i,n;if("sinf"===t&&this.config.drmSystems[W.FAIRPLAY]){const e=ve(new Uint8Array(s));try{const t=H(JSON.parse(e).sinf),s=Fe(new Uint8Array(t));if(!s)return;i=s.subarray(8,24),n=W.FAIRPLAY}catch(l){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{const e=Qe(s);if(null===e)return;0===e.version&&e.systemId===V.WIDEVINE&&e.data&&(i=e.data.subarray(8,24)),n=z(e.systemId)}if(!n||!i)return;const r=ye.hexDump(i),{keyIdToKeySessionPromise:a,mediaKeySessions:o}=this;let d=a[r];for(let u=0;u<o.length;u++){const e=o[u],n=e.decryptdata;if(n.pssh||!n.keyId)continue;const l=ye.hexDump(n.keyId);if(r===l||-1!==n.uri.replace(/-/g,"").indexOf(r)){d=a[l],delete a[l],n.pssh=new Uint8Array(s),n.keyId=i,d=a[r]=d.then(()=>this.generateRequestWithPreferredKeySession(e,t,s,"encrypted-event-key-match"));break}}d||(d=a[r]=this.getKeySystemSelectionPromise([n]).then(({keySystem:e,mediaKeys:n})=>{var a;this.throwIfDestroyed();const o=new et("ISO-23001-7",r,null!=(a=q(e))?a:"");return o.pssh=new Uint8Array(s),o.keyId=i,this.attemptSetMediaKeys(e,n).then(()=>{this.throwIfDestroyed();const i=this.createMediaKeySessionContext({decryptdata:o,keySystem:e,mediaKeys:n});return this.generateRequestWithPreferredKeySession(i,t,s,"encrypted-event-no-match")})})),d.catch(e=>this.handleError(e))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const s=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const i=Promise.all(s).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(i),i.then(()=>{this.log(`Media-keys set for "${e}"`),s.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(e=>-1===s.indexOf(e))})}generateRequestWithPreferredKeySession(e,t,s,i){var n,r;const a=null==(n=this.config.drmSystems)||null==(r=n[e.keySystem])?void 0:r.generateRequest;if(a)try{const i=a.call(this.hls,t,s,e);if(!i)throw new Error("Invalid response from configured generateRequest filter");t=i.initDataType,s=e.decryptdata.pssh=i.initData?new Uint8Array(i.initData):null}catch(m){var o;if(this.warn(m.message),null!=(o=this.hls)&&o.config.debug)throw m}if(null===s)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(e);const d=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${i}": ${d} (init data type: ${t} length: ${s?s.byteLength:null})`);const l=new gr,u=e._onmessage=t=>{const s=e.mediaKeysSession;if(!s)return void l.emit("error",new Error("invalid state"));const{messageType:i,message:n}=t;this.log(`"${i}" message event for session "${s.sessionId}" message size: ${n.byteLength}`),"license-request"===i||"license-renewal"===i?this.renewLicense(e,n).catch(e=>{this.handleError(e),l.emit("error",e)}):"license-release"===i?e.keySystem===W.FAIRPLAY&&(this.updateKeySession(e,B("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${i}"`)},h=e._onkeystatuseschange=t=>{const s=e.mediaKeysSession;if(!s)return void l.emit("error",new Error("invalid state"));this.onKeyStatusChange(e);const i=e.keyStatus;l.emit("keyStatus",i),"expired"===i&&(this.warn(`${e.keySystem} expired for key ${d}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",u),e.mediaKeysSession.addEventListener("keystatuseschange",h);const c=new Promise((e,t)=>{l.on("error",t),l.on("keyStatus",s=>{s.startsWith("usable")?e():"output-restricted"===s?t(new Ua({type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===s?t(new Ua({type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${s}"`)):"expired"===s?t(new Error("key expired while generating request")):this.warn(`unhandled key status change "${s}"`)})});return e.mediaKeysSession.generateRequest(t,s).then(()=>{var t;this.log(`Request generated for key-session "${null==(t=e.mediaKeysSession)?void 0:t.sessionId}" keyId: ${d}`)}).catch(e=>{throw new Ua({type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},"Error generating key-session request: "+e)}).then(()=>c).catch(t=>{throw l.removeAllListeners(),this.removeSession(e),t}).then(()=>(l.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,s)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${ye.hexDump("buffer"in s?new Uint8Array(s.buffer,s.byteOffset,s.byteLength):new Uint8Array(s))} session keyId: ${ye.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,s=t.loader,i=new s(t),n=this.getServerCertificateUrl(e);return n?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,r)=>{const a={responseType:"arraybuffer",url:n},d=t.certLoadPolicy.default,l={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},u={onSuccess:(e,t,i,n)=>{s(e.data)},onError:(t,s,i,d)=>{r(new Ua({type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:i,response:o({url:a.url,data:void 0},t)},`"${e}" certificate request failed (${n}). Status: ${t.code} (${t.text})`))},onTimeout:(t,s,i)=>{r(new Ua({type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:i,response:{url:a.url,data:void 0}},`"${e}" certificate request timed out (${n})`))},onAbort:(e,t,s)=>{r(new Error("aborted"))}};i.load(a,l,u)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,s){return new Promise((i,n)=>{e.setServerCertificate(s).then(n=>{this.log(`setServerCertificate ${n?"success":"not supported by CDM"} (${null==s?void 0:s.byteLength}) on "${t}"`),i(e)}).catch(e=>{n(new Ua({type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(t=>this.updateKeySession(e,new Uint8Array(t)).catch(e=>{throw new Ua({type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))}unpackPlayReadyKeyMessage(e,t){const s=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!s.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const i=(new DOMParser).parseFromString(s,"application/xml"),n=i.querySelectorAll("HttpHeader");if(n.length>0){let t;for(let s=0,i=n.length;s<i;s++){var r,a;t=n[s];const i=null==(r=t.querySelector("name"))?void 0:r.textContent,o=null==(a=t.querySelector("value"))?void 0:a.textContent;i&&o&&e.setRequestHeader(i,o)}}const o=i.querySelector("Challenge"),d=null==o?void 0:o.textContent;if(!d)throw new Error("Cannot find <Challenge> in key message");return B(atob(d))}setupLicenseXHR(e,t,s,i){const n=this.config.licenseXhrSetup;return n?Promise.resolve().then(()=>{if(!s.decryptdata)throw new Error("Key removed");return n.call(this.hls,e,t,s,i)}).catch(r=>{if(!s.decryptdata)throw r;return e.open("POST",t,!0),n.call(this.hls,e,t,s,i)}).then(s=>{e.readyState||e.open("POST",t,!0);const n=s||i;return{xhr:e,licenseChallenge:n}}):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:i}))}requestLicense(e,t){const s=this.config.keyLoadPolicy.default;return new Promise((i,n)=>{const r=this.getLicenseServerUrl(e.keySystem);this.log("Sending license request to URL: "+r);const a=new XMLHttpRequest;a.responseType="arraybuffer",a.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return n(new Error("invalid state"));if(4===a.readyState)if(200===a.status){this._requestLicenseFailureCount=0;let t=a.response;this.log("License received "+(t instanceof ArrayBuffer?t.byteLength:t));const s=this.config.licenseResponseCallback;if(s)try{t=s.call(this.hls,a,r,e)}catch(o){this.error(o)}i(t)}else{const o=s.errorRetry,d=o?o.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>d||a.status>=400&&a.status<500)n(new Ua({type:g.KEY_SYSTEM_ERROR,details:p.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:{url:r,data:void 0,code:a.status,text:a.statusText}},`License Request XHR failed (${r}). Status: ${a.status} (${a.statusText})`));else{const s=d-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${s} attempts left`),this.requestLicense(e,t).then(i,n)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=a,this.setupLicenseXHR(a,r,e,t).then(({xhr:t,licenseChallenge:s})=>{e.keySystem==W.PLAYREADY&&(s=this.unpackPlayReadyKeyMessage(t,s)),t.send(s)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const s=t.media;this.media=s,s.addEventListener("encrypted",this.onMediaEncrypted),s.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},et.clearKeyUriToKeyIdMap();const s=t.length;ja.CDMCleanupPromise=Promise.all(t.map(e=>this.removeSession(e)).concat(null==e?void 0:e.setMediaKeys(null).catch(e=>{this.log("Could not clear media keys: "+e)}))).then(()=>{s&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(e=>{this.log("Could not close sessions and clear media keys: "+e)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(t&&this.config.emeEnabled&&!this.keyFormatPromise){const e=t.reduce((e,t)=>(-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e),[]);this.log("Selecting key-system from session-keys "+e.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(e)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:s}=e;if(t){this.log("Remove licenses and keys and close session "+t.sessionId),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),s&&s.readyState!==XMLHttpRequest.DONE&&s.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),t.remove().catch(e=>{this.log("Could not remove session: "+e)}).then(()=>t.close()).catch(e=>{this.log("Could not close session: "+e)})}}}ja.CDMCleanupPromise=void 0;class Ua extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var Ba,$a,Wa;(function(e){e["MANIFEST"]="m",e["AUDIO"]="a",e["VIDEO"]="v",e["MUXED"]="av",e["INIT"]="i",e["CAPTION"]="c",e["TIMED_TEXT"]="tt",e["KEY"]="k",e["OTHER"]="o"})(Ba||(Ba={})),function(e){e["DASH"]="d",e["HLS"]="h",e["SMOOTH"]="s",e["OTHER"]="o"}($a||($a={})),function(e){e["OBJECT"]="CMCD-Object",e["REQUEST"]="CMCD-Request",e["SESSION"]="CMCD-Session",e["STATUS"]="CMCD-Status"}(Wa||(Wa={}));const Ga={[Wa.OBJECT]:["br","d","ot","tb"],[Wa.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Wa.SESSION]:["cid","pr","sf","sid","st","v"],[Wa.STATUS]:["bs","rtp"]};class Ka{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(e=>e instanceof Ka?e:new Ka(e))),this.value=e,this.params=t}}class Va{constructor(e){this.description=void 0,this.description=e}}const za="Dict";function qa(e){return Array.isArray(e)?JSON.stringify(e):e instanceof Map?"Map{}":e instanceof Set?"Set{}":"object"===typeof e?JSON.stringify(e):String(e)}function Ja(e,t,s,i){return new Error(`failed to ${e} "${qa(t)}" as ${s}`,{cause:i})}const Xa="Bare Item",Qa="Boolean",Za="Byte Sequence",eo="Decimal",to="Integer";function so(e){return e<-999999999999999||999999999999999<e}const io=/[\x00-\x1f\x7f]+/,no="Token",ro="Key";function ao(e,t,s){return Ja("serialize",e,t,s)}function oo(e){if("boolean"!==typeof e)throw ao(e,Qa);return e?"?1":"?0"}function lo(e){return btoa(String.fromCharCode(...e))}function uo(e){if(!1===ArrayBuffer.isView(e))throw ao(e,Za);return`:${lo(e)}:`}function ho(e){if(so(e))throw ao(e,to);return e.toString()}function co(e){return"@"+ho(e.getTime()/1e3)}function mo(e,t){if(e<0)return-mo(-e,t);const s=Math.pow(10,t),i=Math.abs(e*s%1-.5)<Number.EPSILON;if(i){const t=Math.floor(e*s);return(t%2===0?t:t+1)/s}return Math.round(e*s)/s}function fo(e){const t=mo(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw ao(e,eo);const s=t.toString();return s.includes(".")?s:s+".0"}const _o="String";function go(e){if(io.test(e))throw ao(e,_o);return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function po(e){return e.description||e.toString().slice(7,-1)}function yo(e){const t=po(e);if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw ao(t,no);return t}function Lo(e){switch(typeof e){case"number":if(!c(e))throw ao(e,Xa);return Number.isInteger(e)?ho(e):fo(e);case"string":return go(e);case"symbol":return yo(e);case"boolean":return oo(e);case"object":if(e instanceof Date)return co(e);if(e instanceof Uint8Array)return uo(e);if(e instanceof Va)return yo(e);default:throw ao(e,Xa)}}function Mo(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw ao(e,ro);return e}function To(e){return null==e?"":Object.entries(e).map(([e,t])=>!0===t?";"+Mo(e):`;${Mo(e)}=${Lo(t)}`).join("")}function vo(e){return e instanceof Ka?`${Lo(e.value)}${To(e.params)}`:Lo(e)}function Do(e){return`(${e.value.map(vo).join(" ")})${To(e.params)}`}function ko(e,t={whitespace:!0}){if("object"!==typeof e)throw ao(e,za);const s=e instanceof Map?e.entries():Object.entries(e),i=null!=t&&t.whitespace?" ":"";return Array.from(s).map(([e,t])=>{t instanceof Ka===!1&&(t=new Ka(t));let s=Mo(e);return!0===t.value?s+=To(t.params):(s+="=",Array.isArray(t.value)?s+=Do(t):s+=vo(t)),s}).join(","+i)}function So(e,t){return ko(e,t)}const wo=e=>"ot"===e||"sf"===e||"st"===e,bo=e=>"number"===typeof e?c(e):null!=e&&""!==e&&!1!==e;function Eo(e,t){const s=new URL(e),i=new URL(t);if(s.origin!==i.origin)return e;const n=s.pathname.split("/").slice(1),r=i.pathname.split("/").slice(1,-1);while(n[0]===r[0])n.shift(),r.shift();while(r.length)r.shift(),n.unshift("..");return n.join("/")}function Yo(){try{return crypto.randomUUID()}catch(e){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=(new Date).getTime();const s="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const s=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?s:3&s|8).toString(16)});return s}}}const Ao=e=>Math.round(e),Ro=(e,t)=>(null!=t&&t.baseUrl&&(e=Eo(e,t.baseUrl)),encodeURIComponent(e)),xo=e=>100*Ao(e/100),Io={br:Ao,d:Ao,bl:xo,dl:xo,mtp:xo,nor:Ro,rtp:xo,tb:Ao};function Po(e,t){const s={};if(null==e||"object"!==typeof e)return s;const i=Object.keys(e).sort(),n=h({},Io,null==t?void 0:t.formatters),r=null==t?void 0:t.filter;return i.forEach(i=>{if(null!=r&&r(i))return;let a=e[i];const o=n[i];o&&(a=o(a,t)),"v"===i&&1===a||"pr"==i&&1===a||bo(a)&&(wo(i)&&"string"===typeof a&&(a=new Va(a)),s[i]=a)}),s}function Oo(e,t={}){return e?So(Po(e,t),h({whitespace:!1},t)):""}function Co(e,t={}){if(!e)return{};const s=Object.entries(e),i=Object.entries(Ga).concat(Object.entries((null==t?void 0:t.customHeaderMap)||{})),n=s.reduce((e,t)=>{var s;const[n,r]=t,a=(null==(s=i.find(e=>e[1].includes(n)))?void 0:s[0])||Wa.REQUEST;return null!=e[a]||(e[a]={}),e[a][n]=r,e},{});return Object.entries(n).reduce((e,[s,i])=>(e[s]=Oo(i,t),e),{})}function Fo(e,t,s){return h(e,Co(t,s))}const Ho="CMCD";function No(e,t={}){if(!e)return"";const s=Oo(e,t);return`${Ho}=${encodeURIComponent(s)}`}const jo=/CMCD=[^&#]+/;function Uo(e,t,s){const i=No(t,s);if(!i)return e;if(jo.test(e))return e.replace(jo,i);const n=e.includes("?")?"&":"?";return`${e}${n}${i}`}class Bo{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=e=>{try{this.apply(e,{ot:Ba.MANIFEST,su:!this.initialized})}catch(t){k.warn("Could not generate manifest CMCD data.",t)}},this.applyFragmentData=e=>{try{const t=e.frag,s=this.hls.levels[t.level],i=this.getObjectType(t),n={d:1e3*t.duration,ot:i};i!==Ba.VIDEO&&i!==Ba.AUDIO&&i!=Ba.MUXED||(n.br=s.bitrate/1e3,n.tb=this.getTopBandwidth(i)/1e3,n.bl=this.getBufferLength(i)),this.apply(e,n)}catch(t){k.warn("Could not generate segment CMCD data.",t)}},this.hls=e;const t=this.config=e.config,{cmcd:s}=t;null!=s&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=s.sessionId||Yo(),this.cid=s.contentId,this.useHeaders=!0===s.useHeaders,this.includeKeys=s.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHED,this.onMediaDetached,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHED,this.onMediaDetached,this),e.off(_.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var s,i;this.audioBuffer=null==(s=t.tracks.audio)?void 0:s.buffer,this.videoBuffer=null==(i=t.tracks.video)?void 0:i.buffer}createData(){var e;return{v:1,sf:$a.HLS,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){h(t,this.createData());const s=t.ot===Ba.INIT||t.ot===Ba.VIDEO||t.ot===Ba.MUXED;this.starved&&s&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering);const{includeKeys:i}=this;i&&(t=Object.keys(t).reduce((e,s)=>(i.includes(s)&&(e[s]=t[s]),e),{})),this.useHeaders?(e.headers||(e.headers={}),Fo(e.headers,t)):e.url=Uo(e.url,t)}getObjectType(e){const{type:t}=e;return"subtitle"===t?Ba.TIMED_TEXT:"initSegment"===e.sn?Ba.INIT:"audio"===t?Ba.AUDIO:"main"===t?this.hls.audioTracks.length?Ba.VIDEO:Ba.MUXED:void 0}getTopBandwidth(e){let t,s=0;const i=this.hls;if(e===Ba.AUDIO)t=i.audioTracks;else{const e=i.maxAutoLevel,s=e>-1?e+1:i.levels.length;t=i.levels.slice(0,s)}for(const n of t)n.bitrate>s&&(s=n.bitrate);return s>0?s:NaN}getBufferLength(e){const t=this.hls.media,s=e===Ba.AUDIO?this.audioBuffer:this.videoBuffer;if(!s||!t)return NaN;const i=_i.bufferInfo(s,t.currentTime,this.config.maxBufferHole);return 1e3*i.len}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,s=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new s(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,s,i){t(e),this.loader.load(e,s,i)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,s=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new s(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,s,i){t(e),this.loader.load(e,s,i)}}}}const $o=3e5;class Wo{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=k.log.bind(k,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(t=>t!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:s}=t;null!==s&&(this.pathwayId=s.pathwayId,this.uri=s.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:s}=t;if((null==s?void 0:s.action)===Ns.SendAlternateToPenaltyBox&&s.flags===js.MoveAllAlternatesMatchingHost){const e=this.levels;let i=this.pathwayPriority,n=this.pathwayId;if(t.context){const{groupId:s,pathwayId:i,type:r}=t.context;s&&e?n=this.getPathwayForGroupId(s,r,n):i&&(n=i)}n in this.penalizedPathways||(this.penalizedPathways[n]=performance.now()),!i&&e&&(i=e.reduce((e,t)=>(-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e),[])),i&&i.length>1&&(this.updatePathwayPriority(i),s.resolved=this.pathwayId!==n),s.resolved||k.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${n} levels: ${e?e.length:e} priorities: ${JSON.stringify(i)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){const s=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${s}"`),t=this.getLevelsForPathway(s),this.pathwayId=s}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return null===this.levels?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){let t;this.pathwayPriority=e;const s=this.penalizedPathways,i=performance.now();Object.keys(s).forEach(e=>{i-s[e]>$o&&delete s[e]});for(let n=0;n<e.length;n++){const i=e[n];if(i in s)continue;if(i===this.pathwayId)return;const r=this.hls.nextLoadLevel,a=this.hls.levels[r];if(t=this.getLevelsForPathway(i),t.length>0){this.log(`Setting Pathway to "${i}"`),this.pathwayId=i,Ss(t),this.hls.trigger(_.LEVELS_UPDATED,{levels:t});const e=this.hls.levels[r];a&&e&&this.levels&&(e.attrs["STABLE-VARIANT-ID"]!==a.attrs["STABLE-VARIANT-ID"]&&e.bitrate!==a.bitrate&&this.log(`Unstable Pathways change from bitrate ${a.bitrate} to ${e.bitrate}`),this.hls.nextLoadLevel=r);break}}}getPathwayForGroupId(e,t,s){const i=this.getLevelsForPathway(s).concat(this.levels||[]);for(let n=0;n<i.length;n++)if(t===Ft.AUDIO_TRACK&&i[n].hasAudioGroup(e)||t===Ft.SUBTITLE_TRACK&&i[n].hasSubtitleGroup(e))return i[n].pathwayId;return s}clonePathways(e){const t=this.levels;if(!t)return;const s={},i={};e.forEach(e=>{const{ID:n,"BASE-ID":r,"URI-REPLACEMENT":a}=e;if(t.some(e=>e.pathwayId===n))return;const o=this.getLevelsForPathway(r).map(e=>{const t=new b(e.attrs);t["PATHWAY-ID"]=n;const r=t.AUDIO&&`${t.AUDIO}_clone_${n}`,o=t.SUBTITLES&&`${t.SUBTITLES}_clone_${n}`;r&&(s[t.AUDIO]=r,t.AUDIO=r),o&&(i[t.SUBTITLES]=o,t.SUBTITLES=o);const d=Ko(e.uri,t["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",a),l=new hs({attrs:t,audioCodec:e.audioCodec,bitrate:e.bitrate,height:e.height,name:e.name,url:d,videoCodec:e.videoCodec,width:e.width});if(e.audioGroups)for(let s=1;s<e.audioGroups.length;s++)l.addGroupId("audio",`${e.audioGroups[s]}_clone_${n}`);if(e.subtitleGroups)for(let s=1;s<e.subtitleGroups.length;s++)l.addGroupId("text",`${e.subtitleGroups[s]}_clone_${n}`);return l});t.push(...o),Go(this.audioTracks,s,a,n),Go(this.subtitleTracks,i,a,n)})}loadSteeringManifest(e){const t=this.hls.config,s=t.loader;let i;this.loader&&this.loader.destroy(),this.loader=new s(t);try{i=new self.URL(e)}catch(l){return this.enabled=!1,void this.log("Failed to parse Steering Manifest URI: "+e)}if("data:"!==i.protocol){const e=0|(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate);i.searchParams.set("_HLS_pathway",this.pathwayId),i.searchParams.set("_HLS_throughput",""+e)}const n={responseType:"json",url:i.href},r=t.steeringManifestLoadPolicy.default,a=r.errorRetry||r.timeoutRetry||{},o={loadPolicy:r,timeout:r.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},d={onSuccess:(e,t,s,n)=>{this.log(`Loaded steering manifest: "${i}"`);const r=e.data;if(1!==r.VERSION)return void this.log(`Steering VERSION ${r.VERSION} not supported!`);this.updated=performance.now(),this.timeToLoad=r.TTL;const{"RELOAD-URI":a,"PATHWAY-CLONES":o,"PATHWAY-PRIORITY":d}=r;if(a)try{this.uri=new self.URL(a,i).href}catch(l){return this.enabled=!1,void this.log("Failed to parse Steering Manifest RELOAD-URI: "+a)}this.scheduleRefresh(this.uri||s.url),o&&this.clonePathways(o);const u={steeringManifest:r,url:i.toString()};this.hls.trigger(_.STEERING_MANIFEST_LOADED,u),d&&this.updatePathwayPriority(d)},onError:(e,t,s,i)=>{if(this.log(`Error loading steering manifest: ${e.code} ${e.text} (${t.url})`),this.stopLoad(),410===e.code)return this.enabled=!1,void this.log(`Steering manifest ${t.url} no longer available`);let n=1e3*this.timeToLoad;if(429!==e.code)this.scheduleRefresh(this.uri||t.url,n);else{const e=this.loader;if("function"===typeof(null==e?void 0:e.getResponseHeader)){const t=e.getResponseHeader("Retry-After");t&&(n=1e3*parseFloat(t))}this.log(`Steering manifest ${t.url} rate limited`)}},onTimeout:(e,t,s)=>{this.log(`Timeout loading steering manifest (${t.url})`),this.scheduleRefresh(this.uri||t.url)}};this.log("Requesting steering manifest: "+i),this.loader.load(n,o,d)}scheduleRefresh(e,t=1e3*this.timeToLoad){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var t;const s=null==(t=this.hls)?void 0:t.media;!s||s.ended?this.scheduleRefresh(e,1e3*this.timeToLoad):this.loadSteeringManifest(e)},t)}}function Go(e,t,s,i){e&&Object.keys(t).forEach(n=>{const r=e.filter(e=>e.groupId===n).map(e=>{const r=h({},e);return r.details=void 0,r.attrs=new b(r.attrs),r.url=r.attrs.URI=Ko(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",s),r.groupId=r.attrs["GROUP-ID"]=t[n],r.attrs["PATHWAY-ID"]=i,r});e.push(...r)})}function Ko(e,t,s,i){const{HOST:n,PARAMS:r,[s]:a}=i;let o;t&&(o=null==a?void 0:a[t],o&&(e=o));const d=new self.URL(e);return n&&!o&&(d.host=n),r&&Object.keys(r).sort().forEach(e=>{e&&d.searchParams.set(e,r[e])}),d.href}const Vo=/^age:\s*[\d.]+\s*$/im;class zo{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new R,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,s){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=s,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const s=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const n=this.xhrSetup;n?Promise.resolve().then(()=>{if(this.loader===s&&!this.stats.aborted)return n(s,t.url)}).catch(e=>{if(this.loader===s&&!this.stats.aborted)return s.open("GET",t.url,!0),n(s,t.url)}).then(()=>{this.loader!==s||this.stats.aborted||this.openAndSendXhr(s,t,e)}).catch(e=>{this.callbacks.onError({code:s.status,text:e.message},t,s,i)}):this.openAndSendXhr(s,t,e)}openAndSendXhr(e,t,s){e.readyState||e.open("GET",t.url,!0);const i=t.headers,{maxTimeToFirstByteMs:n,maxLoadTimeMs:r}=s.loadPolicy;if(i)for(const a in i)e.setRequestHeader(a,i[a]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),s.timeout=n&&c(n)?n:r,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:s}=this;if(!e||!t)return;const i=t.readyState,n=this.config;if(!s.aborted&&i>=2&&(0===s.loading.first&&(s.loading.first=Math.max(self.performance.now(),s.loading.start),n.timeout!==n.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),n.timeout=n.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.loadPolicy.maxLoadTimeMs-(s.loading.first-s.loading.start)))),4===i)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const i=t.status,r="text"!==t.responseType;if(i>=200&&i<300&&(r&&t.response||null!==t.responseText)){s.loading.end=Math.max(self.performance.now(),s.loading.first);const n=r?t.response:t.responseText,a="arraybuffer"===t.responseType?n.byteLength:n.length;if(s.loaded=s.total=a,s.bwEstimate=8e3*s.total/(s.loading.end-s.loading.first),!this.callbacks)return;const o=this.callbacks.onProgress;if(o&&o(s,e,n,t),!this.callbacks)return;const d={url:t.responseURL,data:n,code:i};this.callbacks.onSuccess(d,s,e,t)}else{const r=n.loadPolicy.errorRetry,a=s.retry,o={url:e.url,data:void 0,code:i};As(r,a,!1,o)?this.retry(r):(k.error(`${i} while loading ${e.url}`),this.callbacks.onError({code:i,text:t.statusText},e,t,s))}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(As(e,t,!0))this.retry(e);else{var s;k.warn("timeout while loading "+(null==(s=this.context)?void 0:s.url));const e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:s}=this;this.retryDelay=Es(e,s.retry),s.retry++,k.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${null==t?void 0:t.url}, retrying ${s.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&Vo.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}function qo(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}const Jo=/(\d+)-(\d+)\/(\d+)/;class Xo{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||td,this.controller=new self.AbortController,this.stats=new R}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,s){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const n=Qo(e,this.controller.signal),r=s.onProgress,a="arraybuffer"===e.responseType,o=a?"byteLength":"length",{maxTimeToFirstByteMs:d,maxLoadTimeMs:l}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=s,this.request=this.fetchSetup(e,n),self.clearTimeout(this.requestTimeout),t.timeout=d&&c(d)?d:l,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),s.onTimeout(i,e,this.response)},t.timeout),self.fetch(this.request).then(n=>{this.response=this.loader=n;const o=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=l,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),s.onTimeout(i,e,this.response)},l-(o-i.loading.start)),!n.ok){const{status:e,statusText:t}=n;throw new sd(t||"fetch, bad network response",e,n)}return i.loading.first=o,i.total=ed(n.headers)||i.total,r&&c(t.highWaterMark)?this.loadProgressively(n,i,e,t.highWaterMark,r):a?n.arrayBuffer():"json"===e.responseType?n.json():n.text()}).then(n=>{const a=this.response;if(!a)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const d=n[o];d&&(i.loaded=i.total=d);const l={url:a.url,data:n,code:a.status};r&&!c(t.highWaterMark)&&r(i,e,n,a),s.onSuccess(l,i,e,a)}).catch(t=>{if(self.clearTimeout(this.requestTimeout),i.aborted)return;const n=t&&t.code||0,r=t?t.message:null;s.onError({code:n,text:r},e,t?t.details:null,i)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,s,i=0,n){const r=new ji,a=e.body.getReader(),o=()=>a.read().then(a=>{if(a.done)return r.dataLength&&n(t,s,r.flush(),e),Promise.resolve(new ArrayBuffer(0));const d=a.value,l=d.length;return t.loaded+=l,l<i||r.dataLength?(r.push(d),r.dataLength>=i&&n(t,s,r.flush(),e)):n(t,s,d,e),o()}).catch(()=>Promise.reject());return o()}}function Qo(e,t){const s={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(h({},e.headers))};return e.rangeEnd&&s.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),s}function Zo(e){const t=Jo.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}function ed(e){const t=e.get("Content-Range");if(t){const e=Zo(t);if(c(e))return e}const s=e.get("Content-Length");if(s)return parseInt(s)}function td(e,t){return new self.Request(e.url,t)}class sd extends Error{constructor(e,t,s){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=s}}const id=/\s/,nd={newCue(e,t,s,i){const n=[];let r,a,o,d,l;const u=self.VTTCue||self.TextTrackCue;for(let c=0;c<i.rows.length;c++)if(r=i.rows[c],o=!0,d=0,l="",!r.isEmpty()){var h;for(let e=0;e<r.chars.length;e++)id.test(r.chars[e].uchar)&&o?d++:(l+=r.chars[e].uchar,o=!1);r.cueStartTime=t,t===s&&(s+=1e-4),d>=16?d--:d++;const i=da(l.trim()),m=fa(t,s,i);null!=e&&null!=(h=e.cues)&&h.getCueById(m)||(a=new u(t,s,i),a.id=m,a.line=c+1,a.align="left",a.position=10+Math.min(80,10*Math.floor(8*d/32)),n.push(a))}return e&&n.length&&(n.sort((e,t)=>"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line),n.forEach(t=>$t(e,t))),n}},rd={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},ad=o(o({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:zo,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:di,bufferController:Ar,capLevelController:Fa,errorController:Us,fpsController:Ha,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:X,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:rd},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},od()),{},{subtitleStreamController:Sr,subtitleTrackController:br,timelineController:xa,audioStreamController:vr,audioTrackController:Dr,emeController:ja,cmcdController:Bo,contentSteeringController:Wo});function od(){return{cueHandler:nd,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function dd(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const s=ld(e),i=["manifest","level","frag"],n=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return i.forEach(e=>{const i=("level"===e?"playlist":e)+"LoadPolicy",r=void 0===t[i],a=[];n.forEach(n=>{const o=`${e}Loading${n}`,d=t[o];if(void 0!==d&&r){a.push(o);const e=s[i].default;switch(t[i]={default:e},n){case"TimeOut":e.maxLoadTimeMs=d,e.maxTimeToFirstByteMs=d;break;case"MaxRetry":e.errorRetry.maxNumRetry=d,e.timeoutRetry.maxNumRetry=d;break;case"RetryDelay":e.errorRetry.retryDelayMs=d,e.timeoutRetry.retryDelayMs=d;break;case"MaxRetryTimeout":e.errorRetry.maxRetryDelayMs=d,e.timeoutRetry.maxRetryDelayMs=d;break}}}),a.length&&k.warn(`hls.js config: "${a.join('", "')}" setting(s) are deprecated, use "${i}": ${JSON.stringify(t[i])}`)}),o(o({},s),t)}function ld(e){return e&&"object"===typeof e?Array.isArray(e)?e.map(ld):Object.keys(e).reduce((t,s)=>(t[s]=ld(e[s]),t),{}):e}function ud(e){const t=e.loader;if(t!==Xo&&t!==zo)k.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1;else{const t=qo();t&&(e.loader=Xo,e.progressive=!0,e.enableSoftwareAES=!0,k.log("[config]: Progressive streaming enabled, using FetchLoader"))}}let hd;class cd extends Bs{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this),e.on(_.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this),e.off(_.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){const e=this._levels;e.forEach(e=>{e.loadError=0,e.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const s=this.hls.config.preferManagedMediaSource,i=[],n={},r={};let a=!1,o=!1,d=!1;t.levels.forEach(e=>{var t,l;const u=e.attrs;let{audioCodec:h,videoCodec:c}=e;-1!==(null==(t=h)?void 0:t.indexOf("mp4a.40.34"))&&(hd||(hd=/chrome|firefox/i.test(navigator.userAgent)),hd&&(e.audioCodec=h=void 0)),h&&(e.audioCodec=h=Mt(h,s)),0===(null==(l=c)?void 0:l.indexOf("avc1"))&&(c=e.videoCodec=vt(c));const{width:m,height:f,unknownCodecs:_}=e;if(a||(a=!(!m||!f)),o||(o=!!c),d||(d=!!h),null!=_&&_.length||h&&!ct(h,"audio",s)||c&&!ct(c,"video",s))return;const{CODECS:g,"FRAME-RATE":p,"HDCP-LEVEL":y,"PATHWAY-ID":L,RESOLUTION:M,"VIDEO-RANGE":T}=u,v=(L||".")+"-",D=`${v}${e.bitrate}-${M}-${p}-${g}-${T}-${y}`;if(n[D])if(n[D].uri===e.url||e.attrs["PATHWAY-ID"])n[D].addGroupId("audio",u.AUDIO),n[D].addGroupId("text",u.SUBTITLES);else{const t=r[D]+=1;e.attrs["PATHWAY-ID"]=new Array(t+1).join(".");const s=new hs(e);n[D]=s,i.push(s)}else{const t=new hs(e);n[D]=t,r[D]=1,i.push(t)}}),this.filterAndSortMediaOptions(i,t,a,o,d)}filterAndSortMediaOptions(e,t,s,i,n){let r=[],a=[],o=e;if((s||i)&&n&&(o=o.filter(({videoCodec:e,videoRange:t,width:s,height:i})=>(!!e||!(!s||!i))&&os(t))),0===o.length)return void Promise.resolve().then(()=>{if(this.hls){t.levels.length&&this.warn("One or more CODECS in variant not supported: "+JSON.stringify(t.levels[0].attrs));const e=new Error("no level with compatible codecs found in manifest");this.hls.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:e,reason:e.message})}});if(t.audioTracks){const{preferManagedMediaSource:e}=this.hls.config;r=t.audioTracks.filter(t=>!t.audioCodec||ct(t.audioCodec,"audio",e)),md(r)}t.subtitles&&(a=t.subtitles,md(a));const d=o.slice(0);o.sort((e,t)=>{if(e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"])return(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1;if(s&&e.height!==t.height)return e.height-t.height;if(e.frameRate!==t.frameRate)return e.frameRate-t.frameRate;if(e.videoRange!==t.videoRange)return as.indexOf(e.videoRange)-as.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){const s=_t(e.videoCodec),i=_t(t.videoCodec);if(s!==i)return i-s}if(e.uri===t.uri&&e.codecSet!==t.codecSet){const s=gt(e.codecSet),i=gt(t.codecSet);if(s!==i)return i-s}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0});let l=d[0];if(this.steering&&(o=this.steering.filterParsedLevels(o),o.length!==d.length))for(let m=0;m<d.length;m++)if(d[m].pathwayId===o[0].pathwayId){l=d[m];break}this._levels=o;for(let m=0;m<o.length;m++)if(o[m]===l){var u;this._firstLevel=m;const e=l.bitrate,t=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${o.length} level(s) found, first bitrate: ${e}`),void 0===(null==(u=this.hls.userConfig)?void 0:u.abrEwmaDefaultEstimate)){const s=Math.min(e,this.hls.config.abrEwmaDefaultEstimateMax);s>t&&t===ad.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=s)}break}const h=n&&!i,c={levels:o,audioTracks:r,subtitleTracks:a,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:n,video:i,altAudio:!h&&r.some(e=>!!e.url)};this.hls.trigger(_.MANIFEST_PARSED,c),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return 0===this._levels.length?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(0===t.length)return;if(e<0||e>=t.length){const s=new Error("invalid level idx"),i=e<0;if(this.hls.trigger(_.ERROR,{type:g.OTHER_ERROR,details:p.LEVEL_SWITCH_ERROR,level:e,fatal:i,error:s,reason:s.message}),i)return;e=Math.min(e,t.length-1)}const s=this.currentLevelIndex,i=this.currentLevel,n=i?i.attrs["PATHWAY-ID"]:void 0,r=t[e],a=r.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=r,s===e&&r.details&&i&&n===a)return;this.log(`Switching to level ${e} (${r.height?r.height+"p ":""}${r.videoRange?r.videoRange+" ":""}${r.codecSet?r.codecSet+" ":""}@${r.bitrate})${a?" with Pathway "+a:""} from level ${s}${n?" with Pathway "+n:""}`);const o={level:e,attrs:r.attrs,details:r.details,bitrate:r.bitrate,averageBitrate:r.averageBitrate,maxBitrate:r.maxBitrate,realBitrate:r.realBitrate,width:r.width,height:r.height,codecSet:r.codecSet,audioCodec:r.audioCodec,videoCodec:r.videoCodec,audioGroups:r.audioGroups,subtitleGroups:r.subtitleGroups,loaded:r.loaded,loadError:r.loadError,fragmentError:r.fragmentError,name:r.name,id:r.id,uri:r.uri,url:r.url,urlId:0,audioGroupIds:r.audioGroupIds,textGroupIds:r.textGroupIds};this.hls.trigger(_.LEVEL_SWITCHING,o);const d=r.details;if(!d||d.live){const e=this.switchParams(r.uri,null==i?void 0:i.details,d);this.loadPlaylist(e)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(void 0===this._startLevel){const e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){!t.fatal&&t.context&&t.context.type===Ft.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(void 0!==t&&t.type===Ht.MAIN){const e=t.elementaryStreams;if(!Object.keys(e).some(t=>!!e[t]))return;const s=this._levels[t.level];null!=s&&s.loadError&&(this.log(`Resetting level error count of ${s.loadError} on frag buffered`),s.loadError=0)}}onLevelLoaded(e,t){var s;const{level:i,details:n}=t,r=this._levels[i];var a;if(!r)return this.warn("Invalid level index "+i),void(null!=(a=t.deliveryDirectives)&&a.skip&&(n.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===r.fragmentError&&(r.loadError=0),this.playlistLoaded(i,t,r.details)):null!=(s=t.deliveryDirectives)&&s.skip&&(n.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,s=this.currentLevel;if(s&&this.shouldLoadPlaylist(s)){let n=s.uri;if(e)try{n=e.addDirectives(n)}catch(i){this.warn("Could not construct new URL with HLS Delivery Directives: "+i)}const r=s.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${void 0!==(null==e?void 0:e.msn)?" at sn "+e.msn+" part "+e.part:""} with${r?" Pathway "+r:""} ${n}`),this.clearTimer(),this.hls.trigger(_.LEVEL_LOADING,{url:n,level:t,pathwayId:s.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const s=this._levels.filter((t,s)=>s!==e||(this.steering&&this.steering.removeLevel(t),t===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,t.details&&t.details.fragments.forEach(e=>e.level=-1)),!1));Ss(s),this._levels=s,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(_.LEVELS_UPDATED,{levels:s})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:s}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(_.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:s}))}}function md(e){const t={};e.forEach(e=>{const s=e.groupId||"";e.id=t[s]=t[s]||0,t[s]++})}class fd{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const s in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[s].loader;if(i){var t;if(e&&e!==(null==(t=i.context)?void 0:t.frag.type))return;i.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=p.KEY_LOAD_ERROR,s,i,n){return new Ai({type:g.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:n,error:s,networkDetails:i})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:s,cc:i}=e;for(let e=0;e<t.length;e++){const n=t[e];if(i<=n.cc&&("initSegment"===s||"initSegment"===n.sn||s<n.sn)){this.emeController.selectKeySystemFormat(n).then(e=>{n.setKeyFormat(e)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var s,i;t&&e.setKeyFormat(t);const n=e.decryptdata;if(!n){const s=new Error(t?"Expected frag.decryptdata to be defined after setting format "+t:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,p.KEY_LOAD_ERROR,s))}const r=n.uri;if(!r)return Promise.reject(this.createKeyLoadError(e,p.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${r}"`)));let a=this.keyUriToKeyInfo[r];if(null!=(s=a)&&s.decryptdata.key)return n.key=a.decryptdata.key,Promise.resolve({frag:e,keyInfo:a});var o;if(null!=(i=a)&&i.keyLoadPromise)switch(null==(o=a.mediaKeySessionContext)?void 0:o.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return a.keyLoadPromise.then(t=>(n.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:a}))}switch(a=this.keyUriToKeyInfo[r]={decryptdata:n,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},n.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===n.keyFormat?this.loadKeyHTTP(a,e):this.loadKeyEME(a,e);case"AES-128":return this.loadKeyHTTP(a,e);default:return Promise.reject(this.createKeyLoadError(e,p.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${n.method}"`)))}}loadKeyEME(e,t){const s={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const t=this.emeController.loadKey(s);if(t)return(e.keyLoadPromise=t.then(t=>(e.mediaKeySessionContext=t,s))).catch(t=>{throw e.keyLoadPromise=null,t})}return Promise.resolve(s)}loadKeyHTTP(e,t){const s=this.config,i=s.loader,n=new i(s);return t.keyLoader=e.loader=n,e.keyLoadPromise=new Promise((i,r)=>{const a={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},d=s.keyLoadPolicy.default,l={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},u={onSuccess:(e,t,s,n)=>{const{frag:a,keyInfo:o,url:d}=s;if(!a.decryptdata||o!==this.keyUriToKeyInfo[d])return r(this.createKeyLoadError(a,p.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),n));o.decryptdata.key=a.decryptdata.key=new Uint8Array(e.data),a.keyLoader=null,o.loader=null,i({frag:a,keyInfo:o})},onError:(e,s,i,n)=>{this.resetLoader(s),r(this.createKeyLoadError(t,p.KEY_LOAD_ERROR,new Error(`HTTP Error ${e.code} loading key ${e.text}`),i,o({url:a.url,data:void 0},e)))},onTimeout:(e,s,i)=>{this.resetLoader(s),r(this.createKeyLoadError(t,p.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),i))},onAbort:(e,s,i)=>{this.resetLoader(s),r(this.createKeyLoadError(t,p.INTERNAL_ABORTED,new Error("key loading aborted"),i))}};n.load(a,l,u)})}resetLoader(e){const{frag:t,keyInfo:s,url:i}=e,n=s.loader;t.keyLoader===n&&(t.keyLoader=null,s.loader=null),delete this.keyUriToKeyInfo[i],n&&n.destroy()}}function _d(){return self.SourceBuffer||self.WebKitSourceBuffer}function gd(){const e=dt();if(!e)return!1;const t=_d();return!t||t.prototype&&"function"===typeof t.prototype.appendBuffer&&"function"===typeof t.prototype.remove}function pd(){if(!gd())return!1;const e=dt();return"function"===typeof(null==e?void 0:e.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(t=>e.isTypeSupported(ft(t,"video")))||["mp4a.40.2","fLaC"].some(t=>e.isTypeSupported(ft(t,"audio"))))}function yd(){var e;const t=_d();return"function"===typeof(null==t||null==(e=t.prototype)?void 0:e.changeType)}const Ld=250,Md=2,Td=.1,vd=.05;class Dd{constructor(e,t,s,i){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=s,this.hls=i}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:s,media:i,stalled:n}=this;if(null===i)return;const{currentTime:r,seeking:a}=i,o=this.seeking&&!a,d=!this.seeking&&a;if(this.seeking=a,r!==e){if(this.moved=!0,a||(this.nudgeRetry=0),null!==n){if(this.stallReported){const e=self.performance.now()-n;k.warn(`playback not stuck anymore @${r}, after ${Math.round(e)}ms`),this.stallReported=!1}this.stalled=null}return}if(d||o)return void(this.stalled=null);if(i.paused&&!a||i.ended||0===i.playbackRate||!_i.getBuffered(i).length)return void(this.nudgeRetry=0);const l=_i.bufferInfo(i,r,0),u=l.nextStart||0;if(a){const e=l.len>Md,s=!u||t&&t.start<=r||u-r>Md&&!this.fragmentTracker.getPartialFragment(r);if(e||s)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var h;const e=l.len>0;if(!e&&!u)return;const t=Math.max(u,l.start||0)-r,s=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,n=null==s||null==(h=s.details)?void 0:h.live,a=n?2*s.details.targetduration:Md,o=this.fragmentTracker.getPartialFragment(r);if(t>0&&(t<=a||o))return void(i.paused||this._trySkipBufferHole(o))}const c=self.performance.now();if(null===n)return void(this.stalled=c);const m=c-n;if(!a&&m>=Ld&&(this._reportStall(l),!this.media))return;const f=_i.bufferInfo(i,r,s.maxBufferHole);this._tryFixBufferStall(f,m)}_tryFixBufferStall(e,t){const{config:s,fragmentTracker:i,media:n}=this;if(null===n)return;const r=n.currentTime,a=i.getPartialFragment(r);if(a){const e=this._trySkipBufferHole(a);if(e||!this.media)return}(e.len>s.maxBufferHole||e.nextStart&&e.nextStart-r<s.maxBufferHole)&&t>1e3*s.highBufferWatchdogPeriod&&(k.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:s,stallReported:i}=this;if(!i&&s){this.stallReported=!0;const i=new Error(`Playback stalling at @${s.currentTime} due to low buffer (${JSON.stringify(e)})`);k.warn(i.message),t.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.BUFFER_STALLED_ERROR,fatal:!1,error:i,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:s,media:i}=this;if(null===i)return 0;const n=i.currentTime,r=_i.bufferInfo(i,n,0),a=n<r.start?r.start:r.nextStart;if(a){const o=r.len<=t.maxBufferHole,d=r.len>0&&r.len<1&&i.readyState<3,l=a-n;if(l>0&&(o||d)){if(l>t.maxBufferHole){const{fragmentTracker:t}=this;let s=!1;if(0===n){const e=t.getAppendedFrag(0,Ht.MAIN);e&&a<e.end&&(s=!0)}if(!s){const s=e||t.getAppendedFrag(n,Ht.MAIN);if(s){let e=!1,i=s.end;while(i<a){const s=t.getPartialFragment(i);if(!s){e=!0;break}i+=s.duration}if(e)return 0}}}const r=Math.max(a+vd,n+Td);if(k.warn(`skipping hole, adjusting currentTime from ${n} to ${r}`),this.moved=!0,this.stalled=null,i.currentTime=r,e&&!e.gap){const t=new Error(`fragment loaded with buffer holes, seeking from ${n} to ${r}`);s.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:t,reason:t.message,frag:e})}return r}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:s,nudgeRetry:i}=this;if(null===s)return;const n=s.currentTime;if(this.nudgeRetry++,i<e.nudgeMaxRetry){const r=n+(i+1)*e.nudgeOffset,a=new Error(`Nudging 'currentTime' from ${n} to ${r}`);k.warn(a.message),s.currentTime=r,t.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.BUFFER_NUDGE_ON_STALL,error:a,fatal:!1})}else{const s=new Error(`Playhead still not moving while enough data buffered @${n} after ${e.nudgeMaxRetry} nudges`);k.error(s.message),t.trigger(_.ERROR,{type:g.MEDIA_ERROR,details:p.BUFFER_STALLED_ERROR,error:s,fatal:!0})}}}const kd=100;class Sd extends Ni{constructor(e,t,s){super(e,t,s,"[stream-controller]",Ht.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(_.ERROR,this.onError,this),e.on(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this),e.on(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(_.ERROR,this.onError,this),e.off(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(_.BUFFER_CREATED,this.onBufferCreated,this),e.off(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:s}=this;if(this.stopLoad(),this.setInterval(kd),this.level=-1,!this.startFragRequested){let e=s.startLevel;-1===e&&(s.config.testBandwidth&&this.levels.length>1?(e=0,this.bitrateTest=!0):e=s.firstAutoLevel),s.nextLoadLevel=e,this.level=s.loadLevel,this.loadedmetadata=!1}t>0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=Hi.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=Hi.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Hi.WAITING_LEVEL:{const{levels:e,level:t}=this,s=null==e?void 0:e[t],i=null==s?void 0:s.details;if(i&&(!i.live||this.levelLastLoaded===s)){if(this.waitForCdnTuneIn(i))break;this.state=Hi.IDLE;break}if(this.hls.nextLoadLevel!==this.level){this.state=Hi.IDLE;break}break}case Hi.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),s=this.retryDate;if(!s||t>=s||null!=(e=this.media)&&e.seeking){const{levels:e,level:t}=this,s=null==e?void 0:e[t];this.resetStartWhenNotLoaded(s||null),this.state=Hi.IDLE}}break}this.state===Hi.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:s,media:i}=this;if(null===t||!i&&(this.startFragRequested||!e.config.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;const n=e.nextLoadLevel;if(null==s||!s[n])return;const r=s[n],a=this.getMainFwdBufferInfo();if(null===a)return;const o=this.getLevelDetails();if(o&&this._streamEnded(a,o)){const e={};return this.altAudio&&(e.type="video"),this.hls.trigger(_.BUFFER_EOS,e),void(this.state=Hi.ENDED)}e.loadLevel!==n&&-1===e.manualLevel&&this.log(`Adapting to level ${n} from level ${this.level}`),this.level=e.nextLoadLevel=n;const d=r.details;if(!d||this.state===Hi.WAITING_LEVEL||d.live&&this.levelLastLoaded!==r)return this.level=n,void(this.state=Hi.WAITING_LEVEL);const l=a.len,u=this.getMaxBufferLength(r.maxBitrate);if(l>=u)return;this.backtrackFragment&&this.backtrackFragment.start>a.end&&(this.backtrackFragment=null);const h=this.backtrackFragment?this.backtrackFragment.start:a.end;let c=this.getNextFragment(h,d);if(this.couldBacktrack&&!this.fragPrevious&&c&&"initSegment"!==c.sn&&this.fragmentTracker.getState(c)!==ui.OK){var m;const e=(null!=(m=this.backtrackFragment)?m:c).sn,t=e-d.startSN,s=d.fragments[t-1];s&&c.cc===s.cc&&(c=s,this.fragmentTracker.removeFragment(s))}else this.backtrackFragment&&a.len&&(this.backtrackFragment=null);if(c&&this.isLoopLoading(c,h)){const e=c.gap;if(!e){const e=this.audioOnly&&!this.altAudio?x.AUDIO:x.VIDEO,t=(e===x.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;t&&this.afterBufferFlushed(t,e,Ht.MAIN)}c=this.getNextFragmentLoopLoading(c,d,a,Ht.MAIN,u)}c&&(!c.initSegment||c.initSegment.data||this.bitrateTest||(c=c.initSegment),this.loadFragment(c,r,h))}loadFragment(e,t,s){const i=this.fragmentTracker.getState(e);this.fragCurrent=e,i===ui.NOT_LOADED||i===ui.PARTIAL?"initSegment"===e.sn?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,s)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,Ht.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(null!=t&&t.readyState){let s;const i=this.getAppendedFrag(t.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const n=this.getLevelDetails();if(null!=n&&n.live){const e=this.getMainFwdBufferInfo();if(!e||e.len<2*n.targetduration)return}if(!t.paused&&e){const t=this.hls.nextLoadLevel,i=e[t],n=this.fragLastKbps;s=n&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*n)+1:0}else s=0;const r=this.getBufferedFrag(t.currentTime+s);if(r){const e=this.followingBufferedFrag(r);if(e){this.abortCurrentFrag();const t=e.maxStartPTS?e.maxStartPTS:e.start,s=e.duration,i=Math.max(r.end,t+Math.min(Math.max(s-this.config.maxFragLookUpTolerance,s*(this.couldBacktrack?.5:.125)),s*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(i,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Hi.KEY_LOADING:case Hi.FRAG_LOADING:case Hi.FRAG_LOADING_WAITING_RETRY:case Hi.PARSING:case Hi.PARSED:this.state=Hi.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const s=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),s.addEventListener("playing",this.onvplaying),s.addEventListener("seeked",this.onvseeked),this.gapController=new Dd(this.config,s,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;c(t)&&this.log("Media seeked to "+t.toFixed(3));const s=this.getMainFwdBufferInfo();null!==s&&0!==s.len?this.tick():this.warn(`Main forward buffer length on "seeked" event ${s?s.len:"empty"})`)}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(_.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let s=!1,i=!1;t.levels.forEach(e=>{const t=e.audioCodec;t&&(s=s||-1!==t.indexOf("mp4a.40.2"),i=i||-1!==t.indexOf("mp4a.40.5"))}),this.audioCodecSwitch=s&&i&&!yd(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:s}=this;if(!s||this.state!==Hi.IDLE)return;const i=s[t.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=Hi.WAITING_LEVEL)}onLevelLoaded(e,t){var s;const{levels:i}=this,n=t.level,r=t.details,a=r.totalduration;if(!i)return void this.warn("Levels were reset while loading level "+n);this.log(`Level ${n} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""}, cc [${r.startCC}, ${r.endCC}] duration:${a}`);const o=i[n],d=this.fragCurrent;!d||this.state!==Hi.FRAG_LOADING&&this.state!==Hi.FRAG_LOADING_WAITING_RETRY||d.level!==t.level&&d.loader&&this.abortCurrentFrag();let l=0;if(r.live||null!=(s=o.details)&&s.live){var u;if(this.checkLiveUpdate(r),r.deltaUpdateFailed)return;l=this.alignPlaylists(r,o.details,null==(u=this.levelLastLoaded)?void 0:u.details)}if(o.details=r,this.levelLastLoaded=o,this.hls.trigger(_.LEVEL_UPDATED,{details:r,level:n}),this.state===Hi.WAITING_LEVEL){if(this.waitForCdnTuneIn(r))return;this.state=Hi.IDLE}this.startFragRequested?r.live&&this.synchronizeToLiveEdge(r):this.setStartPosition(r,l),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:s,part:i,payload:n}=e,{levels:r}=this;if(!r)return void this.warn(`Levels were reset while fragment load was in progress. Fragment ${s.sn} of level ${s.level} will not be buffered`);const a=r[s.level],o=a.details;if(!o)return this.warn(`Dropping fragment ${s.sn} of level ${s.level} after level details were reset`),void this.fragmentTracker.removeFragment(s);const d=a.videoCodec,l=o.PTSKnown||!o.live,u=null==(t=s.initSegment)?void 0:t.data,h=this._getAudioCodec(a),c=this.transmuxer=this.transmuxer||new pr(this.hls,Ht.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=i?i.index:-1,f=-1!==m,_=new gi(s.level,s.sn,s.stats.chunkCount,n.byteLength,m,f),g=this.initPTS[s.cc];c.push(n,u,h,d,s,i,o.totalduration,l,_,g)}onAudioTrackSwitching(e,t){const s=this.altAudio,i=!!t.url;if(!i){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const e=this.fragCurrent;e&&(this.log("Switching to main audio track, cancel main fragment load"),e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const e=this.hls;s&&(e.trigger(_.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),e.trigger(_.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const s=t.id,i=!!this.hls.audioTracks[s].url;if(i){const e=this.videoBuffer;e&&this.mediaBuffer!==e&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=e)}this.altAudio=i,this.tick()}onBufferCreated(e,t){const s=t.tracks;let i,n,r=!1;for(const a in s){const e=s[a];if("main"===e.id){if(n=a,i=e,"video"===a){const e=s[a];e&&(this.videoBuffer=e.buffer)}}else r=!0}r&&i?(this.log(`Alternate track found, use ${n}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:s,part:i}=t;if(s&&s.type!==Ht.MAIN)return;if(this.fragContextChanged(s))return this.warn(`Fragment ${s.sn}${i?" p: "+i.index:""} of level ${s.level} finished buffering, but was aborted. state: ${this.state}`),void(this.state===Hi.PARSED&&(this.state=Hi.IDLE));const n=i?i.stats:s.stats;this.fragLastKbps=Math.round(8*n.total/(n.buffering.end-n.loading.first)),"initSegment"!==s.sn&&(this.fragPrevious=s),this.fragBufferedComplete(s,i)}onError(e,t){var s;if(t.fatal)this.state=Hi.ERROR;else switch(t.details){case p.FRAG_GAP:case p.FRAG_PARSING_ERROR:case p.FRAG_DECRYPT_ERROR:case p.FRAG_LOAD_ERROR:case p.FRAG_LOAD_TIMEOUT:case p.KEY_LOAD_ERROR:case p.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ht.MAIN,t);break;case p.LEVEL_LOAD_ERROR:case p.LEVEL_LOAD_TIMEOUT:case p.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==Hi.WAITING_LEVEL||(null==(s=t.context)?void 0:s.type)!==Ft.LEVEL||(this.state=Hi.IDLE);break;case p.BUFFER_APPEND_ERROR:case p.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;if(t.details===p.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case p.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(e&&t&&e.readyState){if(this.loadedmetadata||!_i.getBuffered(e).length){const e=this.state!==Hi.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,e)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=Hi.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==x.AUDIO||this.audioOnly&&!this.altAudio){const e=(t===x.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(e,t,Ht.MAIN),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let s=this.startPosition;if(s>=0&&t<s){if(e.seeking)return void this.log(`could not seek to ${s}, already seeking at ${t}`);const i=_i.getBuffered(e),n=i.length?i.start(0):0,r=n-s;r>0&&(r<this.config.maxBufferHole||r<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${r} to match buffer start`),s+=r,this.startPosition=s),this.log(`seek to target start position ${s} from current time ${t}`),e.currentTime=s}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(s=>{const{hls:i}=this;if(!s||this.fragContextChanged(e))return;t.fragmentError=0,this.state=Hi.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const n=e.stats;n.parsing.start=n.parsing.end=n.buffering.start=n.buffering.end=self.performance.now(),i.trigger(_.FRAG_LOADED,s),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const s="main",{hls:i}=this,{remuxResult:n,chunkMeta:r}=e,a=this.getCurrentContext(r);if(!a)return void this.resetWhenMissingContext(r);const{frag:o,part:d,level:l}=a,{video:u,text:h,id3:m,initSegment:f}=n,{details:g}=l,p=this.altAudio?void 0:n.audio;if(this.fragContextChanged(o))this.fragmentTracker.removeFragment(o);else{if(this.state=Hi.PARSING,f){if(null!=f&&f.tracks){const e=o.initSegment||o;this._bufferInitSegment(l,f.tracks,e,r),i.trigger(_.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:s,tracks:f.tracks})}const e=f.initPTS,t=f.timescale;c(e)&&(this.initPTS[o.cc]={baseTime:e,timescale:t},i.trigger(_.INIT_PTS_FOUND,{frag:o,id:s,initPTS:e,timescale:t}))}if(u&&g&&"initSegment"!==o.sn){const e=g.fragments[o.sn-1-g.startSN],t=o.sn===g.startSN,s=!e||o.cc>e.cc;if(!1!==n.independent){const{startPTS:e,endPTS:i,startDTS:n,endDTS:a}=u;if(d)d.elementaryStreams[u.type]={startPTS:e,endPTS:i,startDTS:n,endDTS:a};else if(u.firstKeyFrame&&u.independent&&1===r.id&&!s&&(this.couldBacktrack=!0),u.dropped&&u.independent){const n=this.getMainFwdBufferInfo(),r=(n?n.end:this.getLoadPosition())+this.config.maxBufferHole,d=u.firstKeyFramePTS?u.firstKeyFramePTS:e;if(!t&&r<d-this.config.maxBufferHole&&!s)return void this.backtrack(o);s&&(o.gap=!0),o.setElementaryStreamInfo(u.type,o.start,i,o.start,a,!0)}else t&&e>Md&&(o.gap=!0);o.setElementaryStreamInfo(u.type,e,i,n,a),this.backtrackFragment&&(this.backtrackFragment=o),this.bufferFragmentData(u,o,d,r,t||s)}else{if(!t&&!s)return void this.backtrack(o);o.gap=!0}}if(p){const{startPTS:e,endPTS:t,startDTS:s,endDTS:i}=p;d&&(d.elementaryStreams[x.AUDIO]={startPTS:e,endPTS:t,startDTS:s,endDTS:i}),o.setElementaryStreamInfo(x.AUDIO,e,t,s,i),this.bufferFragmentData(p,o,d,r)}if(g&&null!=m&&null!=(t=m.samples)&&t.length){const e={id:s,frag:o,details:g,samples:m.samples};i.trigger(_.FRAG_PARSING_METADATA,e)}if(g&&h){const e={id:s,frag:o,details:g,samples:h.samples};i.trigger(_.FRAG_PARSING_USERDATA,e)}}}_bufferInitSegment(e,t,s,i){if(this.state!==Hi.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:n,video:r,audiovideo:a}=t;if(n){let t=e.audioCodec;const s=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5");const e=n.metadata;e&&"channelCount"in e&&1!==(e.channelCount||1)&&-1===s.indexOf("firefox")&&(t="mp4a.40.5")}t&&-1!==t.indexOf("mp4a.40.5")&&-1!==s.indexOf("android")&&"audio/mpeg"!==n.container&&(t="mp4a.40.2",this.log("Android: force audio codec to "+t)),e.audioCodec&&e.audioCodec!==t&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${t}"`),n.levelCodec=t,n.id="main",this.log(`Init audio buffer, container:${n.container}, codecs[selected/level/parsed]=[${t||""}/${e.audioCodec||""}/${n.codec}]`)}r&&(r.levelCodec=e.videoCodec,r.id="main",this.log(`Init video buffer, container:${r.container}, codecs[level/parsed]=[${e.videoCodec||""}/${r.codec}]`)),a&&this.log(`Init audiovideo buffer, container:${a.container}, codecs[level/parsed]=[${e.codecs}/${a.codec}]`),this.hls.trigger(_.BUFFER_CODECS,t),Object.keys(t).forEach(e=>{const n=t[e],r=n.initSegment;null!=r&&r.byteLength&&this.hls.trigger(_.BUFFER_APPENDING,{type:e,data:r,frag:s,part:null,chunkMeta:i,parent:s.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,Ht.MAIN)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Hi.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&!1===e.seeking){const s=e.currentTime;if(_i.isBuffered(e,s)?t=this.getAppendedFrag(s):_i.isBuffered(e,s+.1)&&(t=this.getAppendedFrag(s+.1)),t){this.backtrackFragment=null;const e=this.fragPlaying,s=t.level;e&&t.sn===e.sn&&e.level===s||(this.fragPlaying=t,this.hls.trigger(_.FRAG_CHANGED,{frag:t}),e&&e.level===s||this.hls.trigger(_.LEVEL_SWITCHED,{level:s}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,s=this.currentFrag;if(s&&c(t)&&c(s.programDateTime)){const e=s.programDateTime+1e3*(t-s.start);return new Date(e)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class wd{static get version(){return"1.5.11"}static isMSESupported(){return gd()}static isSupported(){return pd()}static getMediaSource(){return dt()}static get Events(){return _}static get ErrorTypes(){return g}static get ErrorDetails(){return p}static get DefaultConfig(){return wd.defaultConfig?wd.defaultConfig:ad}static set DefaultConfig(e){wd.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new gr,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,D(e.debug||!1,"Hls instance");const t=this.config=dd(wd.DefaultConfig,e);this.userConfig=e,t.progressive&&ud(t);const{abrController:s,bufferController:i,capLevelController:n,errorController:r,fpsController:a}=t,o=new r(this),d=this.abrController=new s(this),l=this.bufferController=new i(this),u=this.capLevelController=new n(this),h=new a(this),c=new Ut(this),m=new ss(this),f=t.contentSteeringController,g=f?new f(this):null,p=this.levelController=new cd(this,g),y=new hi(this),L=new fd(this.config),M=this.streamController=new Sd(this,y,L);u.setStreamController(M),h.setStreamController(M);const T=[c,p,M];g&&T.splice(1,0,g),this.networkControllers=T;const v=[d,l,u,h,m,y];this.audioTrackController=this.createController(t.audioTrackController,T);const k=t.audioStreamController;k&&T.push(new k(this,y,L)),this.subtitleTrackController=this.createController(t.subtitleTrackController,T);const S=t.subtitleStreamController;S&&T.push(new S(this,y,L)),this.createController(t.timelineController,v),L.emeController=this.emeController=this.createController(t.emeController,v),this.cmcdController=this.createController(t.cmcdController,v),this.latencyController=this.createController(is,v),this.coreComponents=v,T.push(o);const w=o.onErrorOut;"function"===typeof w&&this.on(_.ERROR,w,o)}createController(e,t){if(e){const s=new e(this);return t&&t.push(s),s}return null}on(e,t,s=this){this._emitter.on(e,t,s)}once(e,t,s=this){this._emitter.once(e,t,s)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,s=this,i){this._emitter.off(e,t,s,i)}listeners(e){return this._emitter.listeners(e)}emit(e,t,s){return this._emitter.emit(e,t,s)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(s){if(k.error("An internal error happened while handling event "+e+'. Error message: "'+s.message+'". Here is a stacktrace:',s),!this.triggeringException){this.triggeringException=!0;const t=e===_.ERROR;this.trigger(_.ERROR,{type:g.OTHER_ERROR,details:p.INTERNAL_EXCEPTION,fatal:t,event:e,error:s}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){k.log("destroy"),this.trigger(_.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(e=>e.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(e=>e.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){k.log("attachMedia"),this._media=e,this.trigger(_.MEDIA_ATTACHING,{media:e})}detachMedia(){k.log("detachMedia"),this.trigger(_.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,s=this.url,i=this.url=r.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,k.log("loadSource:"+i),t&&s&&(s!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(_.MANIFEST_LOADING,{url:e})}startLoad(e=-1){k.log(`startLoad(${e})`),this.started=!0,this.networkControllers.forEach(t=>{t.startLoad(e)})}stopLoad(){k.log("stopLoad"),this.started=!1,this.networkControllers.forEach(e=>{e.stopLoad()})}resumeBuffering(){this.started&&this.networkControllers.forEach(e=>{"fragmentLoader"in e&&e.startLoad(-1)})}pauseBuffering(){this.networkControllers.forEach(e=>{"fragmentLoader"in e&&e.stopLoad()})}swapAudioCodec(){k.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){k.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){k.log("set currentLevel:"+e),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){k.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){k.log("set loadLevel:"+e),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){k.log("set firstLevel:"+e),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return-1===e&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){k.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(k.log("set autoLevelCapping:"+e),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){rs(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return-1===this.levelController.manualLevel}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const s=e.length;for(let i=0;i<s;i++)if(e[i].maxBitrate>=t)return i;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:s}=this;let i;if(i=-1===t&&null!=e&&e.length?e.length-1:t,s)for(let n=i;n--;){const t=e[n].attrs["HDCP-LEVEL"];if(t&&t<=s)return n}return i}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(e){var t;return null==(t=this.audioTrackController)?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return null==(t=this.subtitleTrackController)||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}wd.defaultConfig=void 0},a7fa:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});return t}))},aaf2:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){var n={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return i?n[s][0]:n[s][1]}var s=e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){switch(t){case"D":return e+"वेर";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,s){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}});return s}))},ada2:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t){var s=e.split("_");return t%10===1&&t%100!==11?s[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?s[1]:s[2]}function s(e,s,i){var n={ss:s?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:s?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:s?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===i?s?"хвилина":"хвилину":"h"===i?s?"година":"годину":e+" "+t(n[i],+e)}function i(e,t){var s,i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?i["nominative"].slice(1,7).concat(i["nominative"].slice(0,1)):e?(s=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative",i[s][e.day()]):i["nominative"]}function n(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var r=e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:i,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:s,m:s,mm:s,h:"годину",hh:s,d:"день",dd:s,M:"місяць",MM:s,y:"рік",yy:s},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,s){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});return r}))},b29d:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,s){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});return t}))},b3eb:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?n[s][0]:n[s][1]}var s=e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},b469:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?n[s][0]:n[s][1]}var s=e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},b53d:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});return t}))},b540:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,s){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}});return t}))},b5b7:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),s="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],n=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,r=e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?s[e.month()]:t[e.month()]:t},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"});return r}))},b7e9:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s},week:{dow:1,doy:4}});return t}))},b84c:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},b97c:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function s(e,t,s){return s?t%10===1&&t%100!==11?e[2]:e[3]:t%10===1&&t%100!==11?e[0]:e[1]}function i(e,i,n){return e+" "+s(t[n],e,i)}function n(e,i,n){return s(t[n],e,i)}function r(e,t){return t?"dažas sekundes":"dažām sekundēm"}var a=e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:r,ss:i,m:n,mm:i,h:n,hh:i,d:n,dd:i,M:n,MM:i,y:n,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}))},bb71:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?n[s][0]:n[s][1]}var s=e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},bb8f:function(e,t,s){},bbce:function(e,t,s){},c109:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});return t}))},c1df:function(e,t,s){(function(e){var t;//! moment.js
- //! version : 2.30.1
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
- //! license : MIT
- //! momentjs.com
- (function(t,s){e.exports=s()})(0,(function(){"use strict";var i,n;function r(){return i.apply(null,arguments)}function a(e){i=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function d(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(l(e,t))return!1;return!0}function h(e){return void 0===e}function c(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function m(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var s,i=[],n=e.length;for(s=0;s<n;++s)i.push(t(e[s],s));return i}function _(e,t){for(var s in t)l(t,s)&&(e[s]=t[s]);return l(t,"toString")&&(e.toString=t.toString),l(t,"valueOf")&&(e.valueOf=t.valueOf),e}function g(e,t,s,i){return qs(e,t,s,i,!0).utc()}function p(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function y(e){return null==e._pf&&(e._pf=p()),e._pf}function L(e){var t=null,s=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=y(e),s=n.call(t.parsedDateParts,(function(e){return null!=e})),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function M(e){var t=g(NaN);return null!=e?_(y(t),e):y(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,s=Object(this),i=s.length>>>0;for(t=0;t<i;t++)if(t in s&&e.call(this,s[t],t,s))return!0;return!1};var T=r.momentProperties=[],v=!1;function D(e,t){var s,i,n,r=T.length;if(h(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),h(t._i)||(e._i=t._i),h(t._f)||(e._f=t._f),h(t._l)||(e._l=t._l),h(t._strict)||(e._strict=t._strict),h(t._tzm)||(e._tzm=t._tzm),h(t._isUTC)||(e._isUTC=t._isUTC),h(t._offset)||(e._offset=t._offset),h(t._pf)||(e._pf=y(t)),h(t._locale)||(e._locale=t._locale),r>0)for(s=0;s<r;s++)i=T[s],n=t[i],h(n)||(e[i]=n);return e}function k(e){D(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,r.updateOffset(this),v=!1)}function S(e){return e instanceof k||null!=e&&null!=e._isAMomentObject}function w(e){!1===r.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function b(e,t){var s=!0;return _((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),s){var i,n,a,o=[],d=arguments.length;for(n=0;n<d;n++){if(i="","object"===typeof arguments[n]){for(a in i+="\n["+n+"] ",arguments[0])l(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[n];o.push(i)}w(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),s=!1}return t.apply(this,arguments)}),t)}var E,Y={};function A(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),Y[e]||(w(t),Y[e]=!0)}function R(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(e){var t,s;for(s in e)l(e,s)&&(t=e[s],R(t)?this[s]=t:this["_"+s]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function I(e,t){var s,i=_({},e);for(s in t)l(t,s)&&(d(e[s])&&d(t[s])?(i[s]={},_(i[s],e[s]),_(i[s],t[s])):null!=t[s]?i[s]=t[s]:delete i[s]);for(s in e)l(e,s)&&!l(t,s)&&d(e[s])&&(i[s]=_({},i[s]));return i}function P(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,s=[];for(t in e)l(e,t)&&s.push(t);return s};var O={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function C(e,t,s){var i=this._calendar[e]||this._calendar["sameElse"];return R(i)?i.call(t,s):i}function F(e,t,s){var i=""+Math.abs(e),n=t-i.length,r=e>=0;return(r?s?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+i}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},U={};function B(e,t,s,i){var n=i;"string"===typeof i&&(n=function(){return this[i]()}),e&&(U[e]=n),t&&(U[t[0]]=function(){return F(n.apply(this,arguments),t[1],t[2])}),s&&(U[s]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function $(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function W(e){var t,s,i=e.match(H);for(t=0,s=i.length;t<s;t++)U[i[t]]?i[t]=U[i[t]]:i[t]=$(i[t]);return function(t){var n,r="";for(n=0;n<s;n++)r+=R(i[n])?i[n].call(t,e):i[n];return r}}function G(e,t){return e.isValid()?(t=K(t,e.localeData()),j[t]=j[t]||W(t),j[t](e)):e.localeData().invalidDate()}function K(e,t){var s=5;function i(e){return t.longDateFormat(e)||e}N.lastIndex=0;while(s>=0&&N.test(e))e=e.replace(N,i),N.lastIndex=0,s-=1;return e}var V={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function z(e){var t=this._longDateFormat[e],s=this._longDateFormat[e.toUpperCase()];return t||!s?t:(this._longDateFormat[e]=s.match(H).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var q="Invalid date";function J(){return this._invalidDate}var X="%d",Q=/\d{1,2}/;function Z(e){return this._ordinal.replace("%d",e)}var ee={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function te(e,t,s,i){var n=this._relativeTime[s];return R(n)?n(e,t,s,i):n.replace(/%d/i,e)}function se(e,t){var s=this._relativeTime[e>0?"future":"past"];return R(s)?s(t):s.replace(/%s/i,t)}var ie={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return"string"===typeof e?ie[e]||ie[e.toLowerCase()]:void 0}function re(e){var t,s,i={};for(s in e)l(e,s)&&(t=ne(s),t&&(i[t]=e[s]));return i}var ae={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function oe(e){var t,s=[];for(t in e)l(e,t)&&s.push({unit:t,priority:ae[t]});return s.sort((function(e,t){return e.priority-t.priority})),s}var de,le=/\d/,ue=/\d\d/,he=/\d{3}/,ce=/\d{4}/,me=/[+-]?\d{6}/,fe=/\d\d?/,_e=/\d\d\d\d?/,ge=/\d\d\d\d\d\d?/,pe=/\d{1,3}/,ye=/\d{1,4}/,Le=/[+-]?\d{1,6}/,Me=/\d+/,Te=/[+-]?\d+/,ve=/Z|[+-]\d\d:?\d\d/gi,De=/Z|[+-]\d\d(?::?\d\d)?/gi,ke=/[+-]?\d+(\.\d{1,3})?/,Se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,we=/^[1-9]\d?/,be=/^([1-9]\d|\d)/;function Ee(e,t,s){de[e]=R(t)?t:function(e,i){return e&&s?s:t}}function Ye(e,t){return l(de,e)?de[e](t._strict,t._locale):new RegExp(Ae(e))}function Ae(e){return Re(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,s,i,n){return t||s||i||n})))}function Re(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function xe(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ie(e){var t=+e,s=0;return 0!==t&&isFinite(t)&&(s=xe(t)),s}de={};var Pe={};function Oe(e,t){var s,i,n=t;for("string"===typeof e&&(e=[e]),c(t)&&(n=function(e,s){s[t]=Ie(e)}),i=e.length,s=0;s<i;s++)Pe[e[s]]=n}function Ce(e,t){Oe(e,(function(e,s,i,n){i._w=i._w||{},t(e,i._w,i,n)}))}function Fe(e,t,s){null!=t&&l(Pe,e)&&Pe[e](t,s._a,s,e)}function He(e){return e%4===0&&e%100!==0||e%400===0}var Ne=0,je=1,Ue=2,Be=3,$e=4,We=5,Ge=6,Ke=7,Ve=8;function ze(e){return He(e)?366:365}B("Y",0,0,(function(){var e=this.year();return e<=9999?F(e,4):"+"+e})),B(0,["YY",2],0,(function(){return this.year()%100})),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),Ee("Y",Te),Ee("YY",fe,ue),Ee("YYYY",ye,ce),Ee("YYYYY",Le,me),Ee("YYYYYY",Le,me),Oe(["YYYYY","YYYYYY"],Ne),Oe("YYYY",(function(e,t){t[Ne]=2===e.length?r.parseTwoDigitYear(e):Ie(e)})),Oe("YY",(function(e,t){t[Ne]=r.parseTwoDigitYear(e)})),Oe("Y",(function(e,t){t[Ne]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return Ie(e)+(Ie(e)>68?1900:2e3)};var qe,Je=Qe("FullYear",!0);function Xe(){return He(this.year())}function Qe(e,t){return function(s){return null!=s?(et(this,e,s),r.updateOffset(this,t),this):Ze(this,e)}}function Ze(e,t){if(!e.isValid())return NaN;var s=e._d,i=e._isUTC;switch(t){case"Milliseconds":return i?s.getUTCMilliseconds():s.getMilliseconds();case"Seconds":return i?s.getUTCSeconds():s.getSeconds();case"Minutes":return i?s.getUTCMinutes():s.getMinutes();case"Hours":return i?s.getUTCHours():s.getHours();case"Date":return i?s.getUTCDate():s.getDate();case"Day":return i?s.getUTCDay():s.getDay();case"Month":return i?s.getUTCMonth():s.getMonth();case"FullYear":return i?s.getUTCFullYear():s.getFullYear();default:return NaN}}function et(e,t,s){var i,n,r,a,o;if(e.isValid()&&!isNaN(s)){switch(i=e._d,n=e._isUTC,t){case"Milliseconds":return void(n?i.setUTCMilliseconds(s):i.setMilliseconds(s));case"Seconds":return void(n?i.setUTCSeconds(s):i.setSeconds(s));case"Minutes":return void(n?i.setUTCMinutes(s):i.setMinutes(s));case"Hours":return void(n?i.setUTCHours(s):i.setHours(s));case"Date":return void(n?i.setUTCDate(s):i.setDate(s));case"FullYear":break;default:return}r=s,a=e.month(),o=e.date(),o=29!==o||1!==a||He(r)?o:28,n?i.setUTCFullYear(r,a,o):i.setFullYear(r,a,o)}}function tt(e){return e=ne(e),R(this[e])?this[e]():this}function st(e,t){if("object"===typeof e){e=re(e);var s,i=oe(e),n=i.length;for(s=0;s<n;s++)this[i[s].unit](e[i[s].unit])}else if(e=ne(e),R(this[e]))return this[e](t);return this}function it(e,t){return(e%t+t)%t}function nt(e,t){if(isNaN(e)||isNaN(t))return NaN;var s=it(t,12);return e+=(t-s)/12,1===s?He(e)?29:28:31-s%7%2}qe=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},B("M",["MM",2],"Mo",(function(){return this.month()+1})),B("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),B("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),Ee("M",fe,we),Ee("MM",fe,ue),Ee("MMM",(function(e,t){return t.monthsShortRegex(e)})),Ee("MMMM",(function(e,t){return t.monthsRegex(e)})),Oe(["M","MM"],(function(e,t){t[je]=Ie(e)-1})),Oe(["MMM","MMMM"],(function(e,t,s,i){var n=s._locale.monthsParse(e,i,s._strict);null!=n?t[je]=n:y(s).invalidMonth=e}));var rt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),at="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ot=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,dt=Se,lt=Se;function ut(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ot).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months["standalone"]}function ht(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ot.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort["standalone"]}function ct(e,t,s){var i,n,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=g([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return s?"MMM"===t?(n=qe.call(this._shortMonthsParse,a),-1!==n?n:null):(n=qe.call(this._longMonthsParse,a),-1!==n?n:null):"MMM"===t?(n=qe.call(this._shortMonthsParse,a),-1!==n?n:(n=qe.call(this._longMonthsParse,a),-1!==n?n:null)):(n=qe.call(this._longMonthsParse,a),-1!==n?n:(n=qe.call(this._shortMonthsParse,a),-1!==n?n:null))}function mt(e,t,s){var i,n,r;if(this._monthsParseExact)return ct.call(this,e,t,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(n=g([2e3,i]),s&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),s||this._monthsParse[i]||(r="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),s&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(s&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!s&&this._monthsParse[i].test(e))return i}}function ft(e,t){if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=Ie(t);else if(t=e.localeData().monthsParse(t),!c(t))return e;var s=t,i=e.date();return i=i<29?i:Math.min(i,nt(e.year(),s)),e._isUTC?e._d.setUTCMonth(s,i):e._d.setMonth(s,i),e}function _t(e){return null!=e?(ft(this,e),r.updateOffset(this,!0),this):Ze(this,"Month")}function gt(){return nt(this.year(),this.month())}function pt(e){return this._monthsParseExact?(l(this,"_monthsRegex")||Lt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=dt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function yt(e){return this._monthsParseExact?(l(this,"_monthsRegex")||Lt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=lt),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Lt(){function e(e,t){return t.length-e.length}var t,s,i,n,r=[],a=[],o=[];for(t=0;t<12;t++)s=g([2e3,t]),i=Re(this.monthsShort(s,"")),n=Re(this.months(s,"")),r.push(i),a.push(n),o.push(n),o.push(i);r.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Mt(e,t,s,i,n,r,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,s,i,n,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,s,i,n,r,a),o}function Tt(e){var t,s;return e<100&&e>=0?(s=Array.prototype.slice.call(arguments),s[0]=e+400,t=new Date(Date.UTC.apply(null,s)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function vt(e,t,s){var i=7+t-s,n=(7+Tt(e,0,i).getUTCDay()-t)%7;return-n+i-1}function Dt(e,t,s,i,n){var r,a,o=(7+s-i)%7,d=vt(e,i,n),l=1+7*(t-1)+o+d;return l<=0?(r=e-1,a=ze(r)+l):l>ze(e)?(r=e+1,a=l-ze(e)):(r=e,a=l),{year:r,dayOfYear:a}}function kt(e,t,s){var i,n,r=vt(e.year(),t,s),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?(n=e.year()-1,i=a+St(n,t,s)):a>St(e.year(),t,s)?(i=a-St(e.year(),t,s),n=e.year()+1):(n=e.year(),i=a),{week:i,year:n}}function St(e,t,s){var i=vt(e,t,s),n=vt(e+1,t,s);return(ze(e)-i+n)/7}function wt(e){return kt(e,this._week.dow,this._week.doy).week}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),Ee("w",fe,we),Ee("ww",fe,ue),Ee("W",fe,we),Ee("WW",fe,ue),Ce(["w","ww","W","WW"],(function(e,t,s,i){t[i.substr(0,1)]=Ie(e)}));var bt={dow:0,doy:6};function Et(){return this._week.dow}function Yt(){return this._week.doy}function At(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Rt(e){var t=kt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function xt(e,t){return"string"!==typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"===typeof e?e:null):parseInt(e,10)}function It(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pt(e,t){return e.slice(t,7).concat(e.slice(0,t))}B("d",0,"do","day"),B("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),B("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),B("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),Ee("d",fe),Ee("e",fe),Ee("E",fe),Ee("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ee("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ee("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ce(["dd","ddd","dddd"],(function(e,t,s,i){var n=s._locale.weekdaysParse(e,i,s._strict);null!=n?t.d=n:y(s).invalidWeekday=e})),Ce(["d","e","E"],(function(e,t,s,i){t[i]=Ie(e)}));var Ot="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ct="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ft="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ht=Se,Nt=Se,jt=Se;function Ut(e,t){var s=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Pt(s,this._week.dow):e?s[e.day()]:s}function Bt(e){return!0===e?Pt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function $t(e){return!0===e?Pt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Wt(e,t,s){var i,n,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=g([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return s?"dddd"===t?(n=qe.call(this._weekdaysParse,a),-1!==n?n:null):"ddd"===t?(n=qe.call(this._shortWeekdaysParse,a),-1!==n?n:null):(n=qe.call(this._minWeekdaysParse,a),-1!==n?n:null):"dddd"===t?(n=qe.call(this._weekdaysParse,a),-1!==n?n:(n=qe.call(this._shortWeekdaysParse,a),-1!==n?n:(n=qe.call(this._minWeekdaysParse,a),-1!==n?n:null))):"ddd"===t?(n=qe.call(this._shortWeekdaysParse,a),-1!==n?n:(n=qe.call(this._weekdaysParse,a),-1!==n?n:(n=qe.call(this._minWeekdaysParse,a),-1!==n?n:null))):(n=qe.call(this._minWeekdaysParse,a),-1!==n?n:(n=qe.call(this._weekdaysParse,a),-1!==n?n:(n=qe.call(this._shortWeekdaysParse,a),-1!==n?n:null)))}function Gt(e,t,s){var i,n,r;if(this._weekdaysParseExact)return Wt.call(this,e,t,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(n=g([2e3,1]).day(i),s&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),s&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(s&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(s&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!s&&this._weekdaysParse[i].test(e))return i}}function Kt(e){if(!this.isValid())return null!=e?this:NaN;var t=Ze(this,"Day");return null!=e?(e=xt(e,this.localeData()),this.add(e-t,"d")):t}function Vt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function zt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=It(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function qt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Ht),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Jt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Nt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Xt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=jt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,s,i,n,r,a=[],o=[],d=[],l=[];for(t=0;t<7;t++)s=g([2e3,1]).day(t),i=Re(this.weekdaysMin(s,"")),n=Re(this.weekdaysShort(s,"")),r=Re(this.weekdays(s,"")),a.push(i),o.push(n),d.push(r),l.push(i),l.push(n),l.push(r);a.sort(e),o.sort(e),d.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Zt(){return this.hours()%12||12}function es(){return this.hours()||24}function ts(e,t){B(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function ss(e,t){return t._meridiemParse}function is(e){return"p"===(e+"").toLowerCase().charAt(0)}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Zt),B("k",["kk",2],0,es),B("hmm",0,0,(function(){return""+Zt.apply(this)+F(this.minutes(),2)})),B("hmmss",0,0,(function(){return""+Zt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),B("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),B("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),ts("a",!0),ts("A",!1),Ee("a",ss),Ee("A",ss),Ee("H",fe,be),Ee("h",fe,we),Ee("k",fe,we),Ee("HH",fe,ue),Ee("hh",fe,ue),Ee("kk",fe,ue),Ee("hmm",_e),Ee("hmmss",ge),Ee("Hmm",_e),Ee("Hmmss",ge),Oe(["H","HH"],Be),Oe(["k","kk"],(function(e,t,s){var i=Ie(e);t[Be]=24===i?0:i})),Oe(["a","A"],(function(e,t,s){s._isPm=s._locale.isPM(e),s._meridiem=e})),Oe(["h","hh"],(function(e,t,s){t[Be]=Ie(e),y(s).bigHour=!0})),Oe("hmm",(function(e,t,s){var i=e.length-2;t[Be]=Ie(e.substr(0,i)),t[$e]=Ie(e.substr(i)),y(s).bigHour=!0})),Oe("hmmss",(function(e,t,s){var i=e.length-4,n=e.length-2;t[Be]=Ie(e.substr(0,i)),t[$e]=Ie(e.substr(i,2)),t[We]=Ie(e.substr(n)),y(s).bigHour=!0})),Oe("Hmm",(function(e,t,s){var i=e.length-2;t[Be]=Ie(e.substr(0,i)),t[$e]=Ie(e.substr(i))})),Oe("Hmmss",(function(e,t,s){var i=e.length-4,n=e.length-2;t[Be]=Ie(e.substr(0,i)),t[$e]=Ie(e.substr(i,2)),t[We]=Ie(e.substr(n))}));var ns=/[ap]\.?m?\.?/i,rs=Qe("Hours",!0);function as(e,t,s){return e>11?s?"pm":"PM":s?"am":"AM"}var os,ds={calendar:O,longDateFormat:V,invalidDate:q,ordinal:X,dayOfMonthOrdinalParse:Q,relativeTime:ee,months:rt,monthsShort:at,week:bt,weekdays:Ot,weekdaysMin:Ft,weekdaysShort:Ct,meridiemParse:ns},ls={},us={};function hs(e,t){var s,i=Math.min(e.length,t.length);for(s=0;s<i;s+=1)if(e[s]!==t[s])return s;return i}function cs(e){return e?e.toLowerCase().replace("_","-"):e}function ms(e){var t,s,i,n,r=0;while(r<e.length){n=cs(e[r]).split("-"),t=n.length,s=cs(e[r+1]),s=s?s.split("-"):null;while(t>0){if(i=_s(n.slice(0,t).join("-")),i)return i;if(s&&s.length>=t&&hs(n,s)>=t-1)break;t--}r++}return os}function fs(e){return!(!e||!e.match("^[^/\\\\]*$"))}function _s(i){var n=null;if(void 0===ls[i]&&"undefined"!==typeof e&&e&&e.exports&&fs(i))try{n=os._abbr,t,s("4678")("./"+i),gs(n)}catch(r){ls[i]=null}return ls[i]}function gs(e,t){var s;return e&&(s=h(t)?Ls(e):ps(e,t),s?os=s:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),os._abbr}function ps(e,t){if(null!==t){var s,i=ds;if(t.abbr=e,null!=ls[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=ls[e]._config;else if(null!=t.parentLocale)if(null!=ls[t.parentLocale])i=ls[t.parentLocale]._config;else{if(s=_s(t.parentLocale),null==s)return us[t.parentLocale]||(us[t.parentLocale]=[]),us[t.parentLocale].push({name:e,config:t}),null;i=s._config}return ls[e]=new P(I(i,t)),us[e]&&us[e].forEach((function(e){ps(e.name,e.config)})),gs(e),ls[e]}return delete ls[e],null}function ys(e,t){if(null!=t){var s,i,n=ds;null!=ls[e]&&null!=ls[e].parentLocale?ls[e].set(I(ls[e]._config,t)):(i=_s(e),null!=i&&(n=i._config),t=I(n,t),null==i&&(t.abbr=e),s=new P(t),s.parentLocale=ls[e],ls[e]=s),gs(e)}else null!=ls[e]&&(null!=ls[e].parentLocale?(ls[e]=ls[e].parentLocale,e===gs()&&gs(e)):null!=ls[e]&&delete ls[e]);return ls[e]}function Ls(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return os;if(!o(e)){if(t=_s(e),t)return t;e=[e]}return ms(e)}function Ms(){return E(ls)}function Ts(e){var t,s=e._a;return s&&-2===y(e).overflow&&(t=s[je]<0||s[je]>11?je:s[Ue]<1||s[Ue]>nt(s[Ne],s[je])?Ue:s[Be]<0||s[Be]>24||24===s[Be]&&(0!==s[$e]||0!==s[We]||0!==s[Ge])?Be:s[$e]<0||s[$e]>59?$e:s[We]<0||s[We]>59?We:s[Ge]<0||s[Ge]>999?Ge:-1,y(e)._overflowDayOfYear&&(t<Ne||t>Ue)&&(t=Ue),y(e)._overflowWeeks&&-1===t&&(t=Ke),y(e)._overflowWeekday&&-1===t&&(t=Ve),y(e).overflow=t),e}var vs=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ds=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ks=/Z|[+-]\d\d(?::?\d\d)?/,Ss=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ws=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],bs=/^\/?Date\((-?\d+)/i,Es=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ys={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function As(e){var t,s,i,n,r,a,o=e._i,d=vs.exec(o)||Ds.exec(o),l=Ss.length,u=ws.length;if(d){for(y(e).iso=!0,t=0,s=l;t<s;t++)if(Ss[t][1].exec(d[1])){n=Ss[t][0],i=!1!==Ss[t][2];break}if(null==n)return void(e._isValid=!1);if(d[3]){for(t=0,s=u;t<s;t++)if(ws[t][1].exec(d[3])){r=(d[2]||" ")+ws[t][0];break}if(null==r)return void(e._isValid=!1)}if(!i&&null!=r)return void(e._isValid=!1);if(d[4]){if(!ks.exec(d[4]))return void(e._isValid=!1);a="Z"}e._f=n+(r||"")+(a||""),Bs(e)}else e._isValid=!1}function Rs(e,t,s,i,n,r){var a=[xs(e),at.indexOf(t),parseInt(s,10),parseInt(i,10),parseInt(n,10)];return r&&a.push(parseInt(r,10)),a}function xs(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Is(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ps(e,t,s){if(e){var i=Ct.indexOf(e),n=new Date(t[0],t[1],t[2]).getDay();if(i!==n)return y(s).weekdayMismatch=!0,s._isValid=!1,!1}return!0}function Os(e,t,s){if(e)return Ys[e];if(t)return 0;var i=parseInt(s,10),n=i%100,r=(i-n)/100;return 60*r+n}function Cs(e){var t,s=Es.exec(Is(e._i));if(s){if(t=Rs(s[4],s[3],s[2],s[5],s[6],s[7]),!Ps(s[1],t,e))return;e._a=t,e._tzm=Os(s[8],s[9],s[10]),e._d=Tt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),y(e).rfc2822=!0}else e._isValid=!1}function Fs(e){var t=bs.exec(e._i);null===t?(As(e),!1===e._isValid&&(delete e._isValid,Cs(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Hs(e,t,s){return null!=e?e:null!=t?t:s}function Ns(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function js(e){var t,s,i,n,r,a=[];if(!e._d){for(i=Ns(e),e._w&&null==e._a[Ue]&&null==e._a[je]&&Us(e),null!=e._dayOfYear&&(r=Hs(e._a[Ne],i[Ne]),(e._dayOfYear>ze(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),s=Tt(r,0,e._dayOfYear),e._a[je]=s.getUTCMonth(),e._a[Ue]=s.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=i[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Be]&&0===e._a[$e]&&0===e._a[We]&&0===e._a[Ge]&&(e._nextDay=!0,e._a[Be]=0),e._d=(e._useUTC?Tt:Mt).apply(null,a),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Be]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==n&&(y(e).weekdayMismatch=!0)}}function Us(e){var t,s,i,n,r,a,o,d,l;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(r=1,a=4,s=Hs(t.GG,e._a[Ne],kt(Js(),1,4).year),i=Hs(t.W,1),n=Hs(t.E,1),(n<1||n>7)&&(d=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,l=kt(Js(),r,a),s=Hs(t.gg,e._a[Ne],l.year),i=Hs(t.w,l.week),null!=t.d?(n=t.d,(n<0||n>6)&&(d=!0)):null!=t.e?(n=t.e+r,(t.e<0||t.e>6)&&(d=!0)):n=r),i<1||i>St(s,r,a)?y(e)._overflowWeeks=!0:null!=d?y(e)._overflowWeekday=!0:(o=Dt(s,i,n,r,a),e._a[Ne]=o.year,e._dayOfYear=o.dayOfYear)}function Bs(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],y(e).empty=!0;var t,s,i,n,a,o,d,l=""+e._i,u=l.length,h=0;for(i=K(e._f,e._locale).match(H)||[],d=i.length,t=0;t<d;t++)n=i[t],s=(l.match(Ye(n,e))||[])[0],s&&(a=l.substr(0,l.indexOf(s)),a.length>0&&y(e).unusedInput.push(a),l=l.slice(l.indexOf(s)+s.length),h+=s.length),U[n]?(s?y(e).empty=!1:y(e).unusedTokens.push(n),Fe(n,s,e)):e._strict&&!s&&y(e).unusedTokens.push(n);y(e).charsLeftOver=u-h,l.length>0&&y(e).unusedInput.push(l),e._a[Be]<=12&&!0===y(e).bigHour&&e._a[Be]>0&&(y(e).bigHour=void 0),y(e).parsedDateParts=e._a.slice(0),y(e).meridiem=e._meridiem,e._a[Be]=$s(e._locale,e._a[Be],e._meridiem),o=y(e).era,null!==o&&(e._a[Ne]=e._locale.erasConvertYear(o,e._a[Ne])),js(e),Ts(e)}else Cs(e);else As(e)}function $s(e,t,s){var i;return null==s?t:null!=e.meridiemHour?e.meridiemHour(t,s):null!=e.isPM?(i=e.isPM(s),i&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function Ws(e){var t,s,i,n,r,a,o=!1,d=e._f.length;if(0===d)return y(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;n<d;n++)r=0,a=!1,t=D({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[n],Bs(t),L(t)&&(a=!0),r+=y(t).charsLeftOver,r+=10*y(t).unusedTokens.length,y(t).score=r,o?r<i&&(i=r,s=t):(null==i||r<i||a)&&(i=r,s=t,a&&(o=!0));_(e,s||t)}function Gs(e){if(!e._d){var t=re(e._i),s=void 0===t.day?t.date:t.day;e._a=f([t.year,t.month,s,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),js(e)}}function Ks(e){var t=new k(Ts(Vs(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Vs(e){var t=e._i,s=e._f;return e._locale=e._locale||Ls(e._l),null===t||void 0===s&&""===t?M({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new k(Ts(t)):(m(t)?e._d=t:o(s)?Ws(e):s?Bs(e):zs(e),L(e)||(e._d=null),e))}function zs(e){var t=e._i;h(t)?e._d=new Date(r.now()):m(t)?e._d=new Date(t.valueOf()):"string"===typeof t?Fs(e):o(t)?(e._a=f(t.slice(0),(function(e){return parseInt(e,10)})),js(e)):d(t)?Gs(e):c(t)?e._d=new Date(t):r.createFromInputFallback(e)}function qs(e,t,s,i,n){var r={};return!0!==t&&!1!==t||(i=t,t=void 0),!0!==s&&!1!==s||(i=s,s=void 0),(d(e)&&u(e)||o(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=n,r._l=s,r._i=e,r._f=t,r._strict=i,Ks(r)}function Js(e,t,s,i){return qs(e,t,s,i,!1)}r.createFromInputFallback=b("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Xs=b("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Js.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:M()})),Qs=b("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Js.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:M()}));function Zs(e,t){var s,i;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Js();for(s=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](s)||(s=t[i]);return s}function ei(){var e=[].slice.call(arguments,0);return Zs("isBefore",e)}function ti(){var e=[].slice.call(arguments,0);return Zs("isAfter",e)}var si=function(){return Date.now?Date.now():+new Date},ii=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ni(e){var t,s,i=!1,n=ii.length;for(t in e)if(l(e,t)&&(-1===qe.call(ii,t)||null!=e[t]&&isNaN(e[t])))return!1;for(s=0;s<n;++s)if(e[ii[s]]){if(i)return!1;parseFloat(e[ii[s]])!==Ie(e[ii[s]])&&(i=!0)}return!0}function ri(){return this._isValid}function ai(){return Yi(NaN)}function oi(e){var t=re(e),s=t.year||0,i=t.quarter||0,n=t.month||0,r=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,d=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=ni(t),this._milliseconds=+u+1e3*l+6e4*d+1e3*o*60*60,this._days=+a+7*r,this._months=+n+3*i+12*s,this._data={},this._locale=Ls(),this._bubble()}function di(e){return e instanceof oi}function li(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ui(e,t,s){var i,n=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(i=0;i<n;i++)(s&&e[i]!==t[i]||!s&&Ie(e[i])!==Ie(t[i]))&&a++;return a+r}function hi(e,t){B(e,0,0,(function(){var e=this.utcOffset(),s="+";return e<0&&(e=-e,s="-"),s+F(~~(e/60),2)+t+F(~~e%60,2)}))}hi("Z",":"),hi("ZZ",""),Ee("Z",De),Ee("ZZ",De),Oe(["Z","ZZ"],(function(e,t,s){s._useUTC=!0,s._tzm=mi(De,e)}));var ci=/([\+\-]|\d\d)/gi;function mi(e,t){var s,i,n,r=(t||"").match(e);return null===r?null:(s=r[r.length-1]||[],i=(s+"").match(ci)||["-",0,0],n=60*i[1]+Ie(i[2]),0===n?0:"+"===i[0]?n:-n)}function fi(e,t){var s,i;return t._isUTC?(s=t.clone(),i=(S(e)||m(e)?e.valueOf():Js(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),r.updateOffset(s,!1),s):Js(e).local()}function _i(e){return-Math.round(e._d.getTimezoneOffset())}function gi(e,t,s){var i,n=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(e=mi(De,e),null===e)return this}else Math.abs(e)<16&&!s&&(e*=60);return!this._isUTC&&t&&(i=_i(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),n!==e&&(!t||this._changeInProgress?Pi(this,Yi(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?n:_i(this)}function pi(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function yi(e){return this.utcOffset(0,e)}function Li(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(_i(this),"m")),this}function Mi(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=mi(ve,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Ti(e){return!!this.isValid()&&(e=e?Js(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function vi(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Di(){if(!h(this._isDSTShifted))return this._isDSTShifted;var e,t={};return D(t,this),t=Vs(t),t._a?(e=t._isUTC?g(t._a):Js(t._a),this._isDSTShifted=this.isValid()&&ui(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ki(){return!!this.isValid()&&!this._isUTC}function Si(){return!!this.isValid()&&this._isUTC}function wi(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}r.updateOffset=function(){};var bi=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ei=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Yi(e,t){var s,i,n,r=e,a=null;return di(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(a=bi.exec(e))?(s="-"===a[1]?-1:1,r={y:0,d:Ie(a[Ue])*s,h:Ie(a[Be])*s,m:Ie(a[$e])*s,s:Ie(a[We])*s,ms:Ie(li(1e3*a[Ge]))*s}):(a=Ei.exec(e))?(s="-"===a[1]?-1:1,r={y:Ai(a[2],s),M:Ai(a[3],s),w:Ai(a[4],s),d:Ai(a[5],s),h:Ai(a[6],s),m:Ai(a[7],s),s:Ai(a[8],s)}):null==r?r={}:"object"===typeof r&&("from"in r||"to"in r)&&(n=xi(Js(r.from),Js(r.to)),r={},r.ms=n.milliseconds,r.M=n.months),i=new oi(r),di(e)&&l(e,"_locale")&&(i._locale=e._locale),di(e)&&l(e,"_isValid")&&(i._isValid=e._isValid),i}function Ai(e,t){var s=e&&parseFloat(e.replace(",","."));return(isNaN(s)?0:s)*t}function Ri(e,t){var s={};return s.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(s.months,"M").isAfter(t)&&--s.months,s.milliseconds=+t-+e.clone().add(s.months,"M"),s}function xi(e,t){var s;return e.isValid()&&t.isValid()?(t=fi(t,e),e.isBefore(t)?s=Ri(e,t):(s=Ri(t,e),s.milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0}}function Ii(e,t){return function(s,i){var n,r;return null===i||isNaN(+i)||(A(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=s,s=i,i=r),n=Yi(s,i),Pi(this,n,e),this}}function Pi(e,t,s,i){var n=t._milliseconds,a=li(t._days),o=li(t._months);e.isValid()&&(i=null==i||i,o&&ft(e,Ze(e,"Month")+o*s),a&&et(e,"Date",Ze(e,"Date")+a*s),n&&e._d.setTime(e._d.valueOf()+n*s),i&&r.updateOffset(e,a||o))}Yi.fn=oi.prototype,Yi.invalid=ai;var Oi=Ii(1,"add"),Ci=Ii(-1,"subtract");function Fi(e){return"string"===typeof e||e instanceof String}function Hi(e){return S(e)||m(e)||Fi(e)||c(e)||ji(e)||Ni(e)||null===e||void 0===e}function Ni(e){var t,s,i=d(e)&&!u(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=r.length;for(t=0;t<a;t+=1)s=r[t],n=n||l(e,s);return i&&n}function ji(e){var t=o(e),s=!1;return t&&(s=0===e.filter((function(t){return!c(t)&&Fi(e)})).length),t&&s}function Ui(e){var t,s,i=d(e)&&!u(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)s=r[t],n=n||l(e,s);return i&&n}function Bi(e,t){var s=e.diff(t,"days",!0);return s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse"}function $i(e,t){1===arguments.length&&(arguments[0]?Hi(arguments[0])?(e=arguments[0],t=void 0):Ui(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||Js(),i=fi(s,this).startOf("day"),n=r.calendarFormat(this,i)||"sameElse",a=t&&(R(t[n])?t[n].call(this,s):t[n]);return this.format(a||this.localeData().calendar(n,this,Js(s)))}function Wi(){return new k(this)}function Gi(e,t){var s=S(e)?e:Js(e);return!(!this.isValid()||!s.isValid())&&(t=ne(t)||"millisecond","millisecond"===t?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(t).valueOf())}function Ki(e,t){var s=S(e)?e:Js(e);return!(!this.isValid()||!s.isValid())&&(t=ne(t)||"millisecond","millisecond"===t?this.valueOf()<s.valueOf():this.clone().endOf(t).valueOf()<s.valueOf())}function Vi(e,t,s,i){var n=S(e)?e:Js(e),r=S(t)?t:Js(t);return!!(this.isValid()&&n.isValid()&&r.isValid())&&(i=i||"()",("("===i[0]?this.isAfter(n,s):!this.isBefore(n,s))&&(")"===i[1]?this.isBefore(r,s):!this.isAfter(r,s)))}function zi(e,t){var s,i=S(e)?e:Js(e);return!(!this.isValid()||!i.isValid())&&(t=ne(t)||"millisecond","millisecond"===t?this.valueOf()===i.valueOf():(s=i.valueOf(),this.clone().startOf(t).valueOf()<=s&&s<=this.clone().endOf(t).valueOf()))}function qi(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Ji(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Xi(e,t,s){var i,n,r;if(!this.isValid())return NaN;if(i=fi(e,this),!i.isValid())return NaN;switch(n=6e4*(i.utcOffset()-this.utcOffset()),t=ne(t),t){case"year":r=Qi(this,i)/12;break;case"month":r=Qi(this,i);break;case"quarter":r=Qi(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-n)/864e5;break;case"week":r=(this-i-n)/6048e5;break;default:r=this-i}return s?r:xe(r)}function Qi(e,t){if(e.date()<t.date())return-Qi(t,e);var s,i,n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return t-r<0?(s=e.clone().add(n-1,"months"),i=(t-r)/(r-s)):(s=e.clone().add(n+1,"months"),i=(t-r)/(s-r)),-(n+i)||0}function Zi(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function en(e){if(!this.isValid())return null;var t=!0!==e,s=t?this.clone().utc():this;return s.year()<0||s.year()>9999?G(s,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):R(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(s,"Z")):G(s,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function tn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,s,i,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",i=r+'[")]',this.format(e+t+s+i)}function sn(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)}function nn(e,t){return this.isValid()&&(S(e)&&e.isValid()||Js(e).isValid())?Yi({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function rn(e){return this.from(Js(),e)}function an(e,t){return this.isValid()&&(S(e)&&e.isValid()||Js(e).isValid())?Yi({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function on(e){return this.to(Js(),e)}function dn(e){var t;return void 0===e?this._locale._abbr:(t=Ls(e),null!=t&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ln=b("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function un(){return this._locale}var hn=1e3,cn=60*hn,mn=60*cn,fn=3506328*mn;function _n(e,t){return(e%t+t)%t}function gn(e,t,s){return e<100&&e>=0?new Date(e+400,t,s)-fn:new Date(e,t,s).valueOf()}function pn(e,t,s){return e<100&&e>=0?Date.UTC(e+400,t,s)-fn:Date.UTC(e,t,s)}function yn(e){var t,s;if(e=ne(e),void 0===e||"millisecond"===e||!this.isValid())return this;switch(s=this._isUTC?pn:gn,e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=_n(t+(this._isUTC?0:this.utcOffset()*cn),mn);break;case"minute":t=this._d.valueOf(),t-=_n(t,cn);break;case"second":t=this._d.valueOf(),t-=_n(t,hn);break}return this._d.setTime(t),r.updateOffset(this,!0),this}function Ln(e){var t,s;if(e=ne(e),void 0===e||"millisecond"===e||!this.isValid())return this;switch(s=this._isUTC?pn:gn,e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=mn-_n(t+(this._isUTC?0:this.utcOffset()*cn),mn)-1;break;case"minute":t=this._d.valueOf(),t+=cn-_n(t,cn)-1;break;case"second":t=this._d.valueOf(),t+=hn-_n(t,hn)-1;break}return this._d.setTime(t),r.updateOffset(this,!0),this}function Mn(){return this._d.valueOf()-6e4*(this._offset||0)}function Tn(){return Math.floor(this.valueOf()/1e3)}function vn(){return new Date(this.valueOf())}function Dn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function kn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Sn(){return this.isValid()?this.toISOString():null}function wn(){return L(this)}function bn(){return _({},y(this))}function En(){return y(this).overflow}function Yn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function An(e,t){var s,i,n,a=this._eras||Ls("en")._eras;for(s=0,i=a.length;s<i;++s){switch(typeof a[s].since){case"string":n=r(a[s].since).startOf("day"),a[s].since=n.valueOf();break}switch(typeof a[s].until){case"undefined":a[s].until=1/0;break;case"string":n=r(a[s].until).startOf("day").valueOf(),a[s].until=n.valueOf();break}}return a}function Rn(e,t,s){var i,n,r,a,o,d=this.eras();for(e=e.toUpperCase(),i=0,n=d.length;i<n;++i)if(r=d[i].name.toUpperCase(),a=d[i].abbr.toUpperCase(),o=d[i].narrow.toUpperCase(),s)switch(t){case"N":case"NN":case"NNN":if(a===e)return d[i];break;case"NNNN":if(r===e)return d[i];break;case"NNNNN":if(o===e)return d[i];break}else if([r,a,o].indexOf(e)>=0)return d[i]}function xn(e,t){var s=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*s}function In(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until)return i[e].name;if(i[e].until<=s&&s<=i[e].since)return i[e].name}return""}function Pn(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until)return i[e].narrow;if(i[e].until<=s&&s<=i[e].since)return i[e].narrow}return""}function On(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until)return i[e].abbr;if(i[e].until<=s&&s<=i[e].since)return i[e].abbr}return""}function Cn(){var e,t,s,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(s=n[e].since<=n[e].until?1:-1,i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until||n[e].until<=i&&i<=n[e].since)return(this.year()-r(n[e].since).year())*s+n[e].offset;return this.year()}function Fn(e){return l(this,"_erasNameRegex")||Wn.call(this),e?this._erasNameRegex:this._erasRegex}function Hn(e){return l(this,"_erasAbbrRegex")||Wn.call(this),e?this._erasAbbrRegex:this._erasRegex}function Nn(e){return l(this,"_erasNarrowRegex")||Wn.call(this),e?this._erasNarrowRegex:this._erasRegex}function jn(e,t){return t.erasAbbrRegex(e)}function Un(e,t){return t.erasNameRegex(e)}function Bn(e,t){return t.erasNarrowRegex(e)}function $n(e,t){return t._eraYearOrdinalRegex||Me}function Wn(){var e,t,s,i,n,r=[],a=[],o=[],d=[],l=this.eras();for(e=0,t=l.length;e<t;++e)s=Re(l[e].name),i=Re(l[e].abbr),n=Re(l[e].narrow),a.push(s),r.push(i),o.push(n),d.push(s),d.push(i),d.push(n);this._erasRegex=new RegExp("^("+d.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function Gn(e,t){B(0,[e,e.length],0,t)}function Kn(e){return Qn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Vn(e){return Qn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function zn(){return St(this.year(),1,4)}function qn(){return St(this.isoWeekYear(),1,4)}function Jn(){var e=this.localeData()._week;return St(this.year(),e.dow,e.doy)}function Xn(){var e=this.localeData()._week;return St(this.weekYear(),e.dow,e.doy)}function Qn(e,t,s,i,n){var r;return null==e?kt(this,i,n).year:(r=St(e,i,n),t>r&&(t=r),Zn.call(this,e,t,s,i,n))}function Zn(e,t,s,i,n){var r=Dt(e,t,s,i,n),a=Tt(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function er(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),Ee("N",jn),Ee("NN",jn),Ee("NNN",jn),Ee("NNNN",Un),Ee("NNNNN",Bn),Oe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,s,i){var n=s._locale.erasParse(e,i,s._strict);n?y(s).era=n:y(s).invalidEra=e})),Ee("y",Me),Ee("yy",Me),Ee("yyy",Me),Ee("yyyy",Me),Ee("yo",$n),Oe(["y","yy","yyy","yyyy"],Ne),Oe(["yo"],(function(e,t,s,i){var n;s._locale._eraYearOrdinalRegex&&(n=e.match(s._locale._eraYearOrdinalRegex)),s._locale.eraYearOrdinalParse?t[Ne]=s._locale.eraYearOrdinalParse(e,n):t[Ne]=parseInt(e,10)})),B(0,["gg",2],0,(function(){return this.weekYear()%100})),B(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Gn("gggg","weekYear"),Gn("ggggg","weekYear"),Gn("GGGG","isoWeekYear"),Gn("GGGGG","isoWeekYear"),Ee("G",Te),Ee("g",Te),Ee("GG",fe,ue),Ee("gg",fe,ue),Ee("GGGG",ye,ce),Ee("gggg",ye,ce),Ee("GGGGG",Le,me),Ee("ggggg",Le,me),Ce(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,s,i){t[i.substr(0,2)]=Ie(e)})),Ce(["gg","GG"],(function(e,t,s,i){t[i]=r.parseTwoDigitYear(e)})),B("Q",0,"Qo","quarter"),Ee("Q",le),Oe("Q",(function(e,t){t[je]=3*(Ie(e)-1)})),B("D",["DD",2],"Do","date"),Ee("D",fe,we),Ee("DD",fe,ue),Ee("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Oe(["D","DD"],Ue),Oe("Do",(function(e,t){t[Ue]=Ie(e.match(fe)[0])}));var tr=Qe("Date",!0);function sr(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}B("DDD",["DDDD",3],"DDDo","dayOfYear"),Ee("DDD",pe),Ee("DDDD",he),Oe(["DDD","DDDD"],(function(e,t,s){s._dayOfYear=Ie(e)})),B("m",["mm",2],0,"minute"),Ee("m",fe,be),Ee("mm",fe,ue),Oe(["m","mm"],$e);var ir=Qe("Minutes",!1);B("s",["ss",2],0,"second"),Ee("s",fe,be),Ee("ss",fe,ue),Oe(["s","ss"],We);var nr,rr,ar=Qe("Seconds",!1);for(B("S",0,0,(function(){return~~(this.millisecond()/100)})),B(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),B(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),B(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),B(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),B(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),B(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Ee("S",pe,le),Ee("SS",pe,ue),Ee("SSS",pe,he),nr="SSSS";nr.length<=9;nr+="S")Ee(nr,Me);function or(e,t){t[Ge]=Ie(1e3*("0."+e))}for(nr="S";nr.length<=9;nr+="S")Oe(nr,or);function dr(){return this._isUTC?"UTC":""}function lr(){return this._isUTC?"Coordinated Universal Time":""}rr=Qe("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var ur=k.prototype;function hr(e){return Js(1e3*e)}function cr(){return Js.apply(null,arguments).parseZone()}function mr(e){return e}ur.add=Oi,ur.calendar=$i,ur.clone=Wi,ur.diff=Xi,ur.endOf=Ln,ur.format=sn,ur.from=nn,ur.fromNow=rn,ur.to=an,ur.toNow=on,ur.get=tt,ur.invalidAt=En,ur.isAfter=Gi,ur.isBefore=Ki,ur.isBetween=Vi,ur.isSame=zi,ur.isSameOrAfter=qi,ur.isSameOrBefore=Ji,ur.isValid=wn,ur.lang=ln,ur.locale=dn,ur.localeData=un,ur.max=Qs,ur.min=Xs,ur.parsingFlags=bn,ur.set=st,ur.startOf=yn,ur.subtract=Ci,ur.toArray=Dn,ur.toObject=kn,ur.toDate=vn,ur.toISOString=en,ur.inspect=tn,"undefined"!==typeof Symbol&&null!=Symbol.for&&(ur[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ur.toJSON=Sn,ur.toString=Zi,ur.unix=Tn,ur.valueOf=Mn,ur.creationData=Yn,ur.eraName=In,ur.eraNarrow=Pn,ur.eraAbbr=On,ur.eraYear=Cn,ur.year=Je,ur.isLeapYear=Xe,ur.weekYear=Kn,ur.isoWeekYear=Vn,ur.quarter=ur.quarters=er,ur.month=_t,ur.daysInMonth=gt,ur.week=ur.weeks=At,ur.isoWeek=ur.isoWeeks=Rt,ur.weeksInYear=Jn,ur.weeksInWeekYear=Xn,ur.isoWeeksInYear=zn,ur.isoWeeksInISOWeekYear=qn,ur.date=tr,ur.day=ur.days=Kt,ur.weekday=Vt,ur.isoWeekday=zt,ur.dayOfYear=sr,ur.hour=ur.hours=rs,ur.minute=ur.minutes=ir,ur.second=ur.seconds=ar,ur.millisecond=ur.milliseconds=rr,ur.utcOffset=gi,ur.utc=yi,ur.local=Li,ur.parseZone=Mi,ur.hasAlignedHourOffset=Ti,ur.isDST=vi,ur.isLocal=ki,ur.isUtcOffset=Si,ur.isUtc=wi,ur.isUTC=wi,ur.zoneAbbr=dr,ur.zoneName=lr,ur.dates=b("dates accessor is deprecated. Use date instead.",tr),ur.months=b("months accessor is deprecated. Use month instead",_t),ur.years=b("years accessor is deprecated. Use year instead",Je),ur.zone=b("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",pi),ur.isDSTShifted=b("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Di);var fr=P.prototype;function _r(e,t,s,i){var n=Ls(),r=g().set(i,t);return n[s](r,e)}function gr(e,t,s){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return _r(e,t,s,"month");var i,n=[];for(i=0;i<12;i++)n[i]=_r(e,i,s,"month");return n}function pr(e,t,s,i){"boolean"===typeof e?(c(t)&&(s=t,t=void 0),t=t||""):(t=e,s=t,e=!1,c(t)&&(s=t,t=void 0),t=t||"");var n,r=Ls(),a=e?r._week.dow:0,o=[];if(null!=s)return _r(t,(s+a)%7,i,"day");for(n=0;n<7;n++)o[n]=_r(t,(n+a)%7,i,"day");return o}function yr(e,t){return gr(e,t,"months")}function Lr(e,t){return gr(e,t,"monthsShort")}function Mr(e,t,s){return pr(e,t,s,"weekdays")}function Tr(e,t,s){return pr(e,t,s,"weekdaysShort")}function vr(e,t,s){return pr(e,t,s,"weekdaysMin")}fr.calendar=C,fr.longDateFormat=z,fr.invalidDate=J,fr.ordinal=Z,fr.preparse=mr,fr.postformat=mr,fr.relativeTime=te,fr.pastFuture=se,fr.set=x,fr.eras=An,fr.erasParse=Rn,fr.erasConvertYear=xn,fr.erasAbbrRegex=Hn,fr.erasNameRegex=Fn,fr.erasNarrowRegex=Nn,fr.months=ut,fr.monthsShort=ht,fr.monthsParse=mt,fr.monthsRegex=yt,fr.monthsShortRegex=pt,fr.week=wt,fr.firstDayOfYear=Yt,fr.firstDayOfWeek=Et,fr.weekdays=Ut,fr.weekdaysMin=$t,fr.weekdaysShort=Bt,fr.weekdaysParse=Gt,fr.weekdaysRegex=qt,fr.weekdaysShortRegex=Jt,fr.weekdaysMinRegex=Xt,fr.isPM=is,fr.meridiem=as,gs("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,s=1===Ie(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s}}),r.lang=b("moment.lang is deprecated. Use moment.locale instead.",gs),r.langData=b("moment.langData is deprecated. Use moment.localeData instead.",Ls);var Dr=Math.abs;function kr(){var e=this._data;return this._milliseconds=Dr(this._milliseconds),this._days=Dr(this._days),this._months=Dr(this._months),e.milliseconds=Dr(e.milliseconds),e.seconds=Dr(e.seconds),e.minutes=Dr(e.minutes),e.hours=Dr(e.hours),e.months=Dr(e.months),e.years=Dr(e.years),this}function Sr(e,t,s,i){var n=Yi(t,s);return e._milliseconds+=i*n._milliseconds,e._days+=i*n._days,e._months+=i*n._months,e._bubble()}function wr(e,t){return Sr(this,e,t,1)}function br(e,t){return Sr(this,e,t,-1)}function Er(e){return e<0?Math.floor(e):Math.ceil(e)}function Yr(){var e,t,s,i,n,r=this._milliseconds,a=this._days,o=this._months,d=this._data;return r>=0&&a>=0&&o>=0||r<=0&&a<=0&&o<=0||(r+=864e5*Er(Rr(o)+a),a=0,o=0),d.milliseconds=r%1e3,e=xe(r/1e3),d.seconds=e%60,t=xe(e/60),d.minutes=t%60,s=xe(t/60),d.hours=s%24,a+=xe(s/24),n=xe(Ar(a)),o+=n,a-=Er(Rr(n)),i=xe(o/12),o%=12,d.days=a,d.months=o,d.years=i,this}function Ar(e){return 4800*e/146097}function Rr(e){return 146097*e/4800}function xr(e){if(!this.isValid())return NaN;var t,s,i=this._milliseconds;if(e=ne(e),"month"===e||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,s=this._months+Ar(t),e){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(t=this._days+Math.round(Rr(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function Ir(e){return function(){return this.as(e)}}var Pr=Ir("ms"),Or=Ir("s"),Cr=Ir("m"),Fr=Ir("h"),Hr=Ir("d"),Nr=Ir("w"),jr=Ir("M"),Ur=Ir("Q"),Br=Ir("y"),$r=Pr;function Wr(){return Yi(this)}function Gr(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Kr(e){return function(){return this.isValid()?this._data[e]:NaN}}var Vr=Kr("milliseconds"),zr=Kr("seconds"),qr=Kr("minutes"),Jr=Kr("hours"),Xr=Kr("days"),Qr=Kr("months"),Zr=Kr("years");function ea(){return xe(this.days()/7)}var ta=Math.round,sa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ia(e,t,s,i,n){return n.relativeTime(t||1,!!s,e,i)}function na(e,t,s,i){var n=Yi(e).abs(),r=ta(n.as("s")),a=ta(n.as("m")),o=ta(n.as("h")),d=ta(n.as("d")),l=ta(n.as("M")),u=ta(n.as("w")),h=ta(n.as("y")),c=r<=s.ss&&["s",r]||r<s.s&&["ss",r]||a<=1&&["m"]||a<s.m&&["mm",a]||o<=1&&["h"]||o<s.h&&["hh",o]||d<=1&&["d"]||d<s.d&&["dd",d];return null!=s.w&&(c=c||u<=1&&["w"]||u<s.w&&["ww",u]),c=c||l<=1&&["M"]||l<s.M&&["MM",l]||h<=1&&["y"]||["yy",h],c[2]=t,c[3]=+e>0,c[4]=i,ia.apply(null,c)}function ra(e){return void 0===e?ta:"function"===typeof e&&(ta=e,!0)}function aa(e,t){return void 0!==sa[e]&&(void 0===t?sa[e]:(sa[e]=t,"s"===e&&(sa.ss=t-1),!0))}function oa(e,t){if(!this.isValid())return this.localeData().invalidDate();var s,i,n=!1,r=sa;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(n=e),"object"===typeof t&&(r=Object.assign({},sa,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),s=this.localeData(),i=na(this,!n,r,s),n&&(i=s.pastFuture(+this,i)),s.postformat(i)}var da=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ua(){if(!this.isValid())return this.localeData().invalidDate();var e,t,s,i,n,r,a,o,d=da(this._milliseconds)/1e3,l=da(this._days),u=da(this._months),h=this.asSeconds();return h?(e=xe(d/60),t=xe(e/60),d%=60,e%=60,s=xe(u/12),u%=12,i=d?d.toFixed(3).replace(/\.?0+$/,""):"",n=h<0?"-":"",r=la(this._months)!==la(h)?"-":"",a=la(this._days)!==la(h)?"-":"",o=la(this._milliseconds)!==la(h)?"-":"",n+"P"+(s?r+s+"Y":"")+(u?r+u+"M":"")+(l?a+l+"D":"")+(t||e||d?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(d?o+i+"S":"")):"P0D"}var ha=oi.prototype;return ha.isValid=ri,ha.abs=kr,ha.add=wr,ha.subtract=br,ha.as=xr,ha.asMilliseconds=Pr,ha.asSeconds=Or,ha.asMinutes=Cr,ha.asHours=Fr,ha.asDays=Hr,ha.asWeeks=Nr,ha.asMonths=jr,ha.asQuarters=Ur,ha.asYears=Br,ha.valueOf=$r,ha._bubble=Yr,ha.clone=Wr,ha.get=Gr,ha.milliseconds=Vr,ha.seconds=zr,ha.minutes=qr,ha.hours=Jr,ha.days=Xr,ha.weeks=ea,ha.months=Qr,ha.years=Zr,ha.humanize=oa,ha.toISOString=ua,ha.toString=ua,ha.toJSON=ua,ha.locale=dn,ha.localeData=un,ha.toIsoString=b("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ua),ha.lang=ln,B("X",0,0,"unix"),B("x",0,0,"valueOf"),Ee("x",Te),Ee("X",ke),Oe("X",(function(e,t,s){s._d=new Date(1e3*parseFloat(e))})),Oe("x",(function(e,t,s){s._d=new Date(Ie(e))})),
- //! moment.js
- r.version="2.30.1",a(Js),r.fn=ur,r.min=ei,r.max=ti,r.now=si,r.utc=g,r.unix=hr,r.months=yr,r.isDate=m,r.locale=gs,r.invalid=M,r.duration=Yi,r.isMoment=S,r.weekdays=Mr,r.parseZone=cr,r.localeData=Ls,r.isDuration=di,r.monthsShort=Lr,r.weekdaysMin=vr,r.defineLocale=ps,r.updateLocale=ys,r.locales=Ms,r.weekdaysShort=Tr,r.normalizeUnits=ne,r.relativeTimeRounding=ra,r.relativeTimeThreshold=aa,r.calendarFormat=Bi,r.prototype=ur,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}))}).call(this,s("62e4")(e))},c4bf:function(e,t,s){e.exports=s.p+"static/img/play.91da1167.png"},c7aa:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10===0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,s){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?s?'לפנה"צ':"לפני הצהריים":e<18?s?'אחה"צ':"אחרי הצהריים":"בערב"}});return t}))},c8f3:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,s){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},cf1e:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10===1?t[0]:t[1]:t[2]},translate:function(e,s,i,n){var r,a=t.words[i];return 1===i.length?"y"===i&&s?"jedna godina":n||s?a[0]:a[1]:(r=t.correctGrammaticalCase(e,a),"yy"===i&&s&&"godinu"===r?e+" godina":e+" "+r)}},s=e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return s}))},cf2f:function(e,t,s){"use strict";s("bbce")},cf51:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,s){return e>11?s?"d'o":"D'O":s?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});function s(e,t,s,i){var n={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return i||t?n[s][0]:n[s][1]}return t}))},cf75:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function s(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq",t}function i(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret",t}function n(e,t,s,i){var n=r(e);switch(s){case"ss":return n+" lup";case"mm":return n+" tup";case"hh":return n+" rep";case"dd":return n+" jaj";case"MM":return n+" jar";case"yy":return n+" DIS"}}function r(e){var s=Math.floor(e%1e3/100),i=Math.floor(e%100/10),n=e%10,r="";return s>0&&(r+=t[s]+"vatlh"),i>0&&(r+=(""!==r?" ":"")+t[i]+"maH"),n>0&&(r+=(""!==r?" ":"")+t[n]),""===r?"pagh":r}var a=e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:s,past:i,s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}))},d26a:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},s={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},i=e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,s){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}});return i}))},d2d4:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"});return t}))},d69a:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},d6b6:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}});return t}))},d716:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var s=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(s="a"),e+s},week:{dow:1,doy:4}});return t}))},d944:function(e,t,s){"use strict";s("bb8f")},d9f8:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}});return t}))},db29:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),s="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],n=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,r=e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?s[e.month()]:t[e.month()]:t},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return r}))},dc4d:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},s={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},i=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i],n=[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],r=e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:i,longMonthsParse:i,shortMonthsParse:n,monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,s){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}});return r}))},e0c5:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},s={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"},i=e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,s){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}});return i}))},e1d3:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s},week:{dow:1,doy:4}});return t}))},e81d:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},s={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"},i=e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,s){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}});return i}))},ebe4:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,s){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},ec18:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,s,i){var n={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?n[s][2]?n[s][2]:n[s][1]:i?n[s][0]:n[s][1]}var s=e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},ec2e:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s},week:{dow:0,doy:6}});return t}))},ed08:function(e,t,s){"use strict";s.d(t,"e",(function(){return i})),s.d(t,"f",(function(){return n})),s.d(t,"b",(function(){return r})),s.d(t,"c",(function(){return a})),s.d(t,"h",(function(){return o})),s.d(t,"d",(function(){return d})),s.d(t,"a",(function(){return l})),s.d(t,"i",(function(){return u})),s.d(t,"g",(function(){return h}));s("53ca"),s("d9e2"),s("a630"),s("a15b"),s("d81d"),s("14d9"),s("fb6a"),s("b64b"),s("d3b7"),s("4d63"),s("c607"),s("ac1f"),s("2c3e"),s("00b4"),s("25f0"),s("6062"),s("3ca3"),s("466d"),s("5319"),s("159b"),s("ddb0"),s("c38a");function i(e){if(null==e||""==e)return"";var t=new Date(e),s=t.getFullYear(),i=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,n=t.getDate()<10?"0"+t.getDate():t.getDate(),r=t.getHours()<10?"0"+t.getHours():t.getHours(),a=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),o=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return s+"-"+i+"-"+n+" "+r+":"+a+":"+o}function n(e){if(null==e||""==e)return"";var t=new Date(e),s=t.getFullYear(),i=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,n=t.getDate()<10?"0"+t.getDate():t.getDate();t.getHours(),t.getHours(),t.getMinutes(),t.getMinutes(),t.getSeconds(),t.getSeconds();return s+"/"+i+"/"+n}function r(e){for(var t=e.length,s=e.length-1;s>=0;s--){var i=e.charCodeAt(s);i>127&&i<=2047?t++:i>2047&&i<=65535&&(t+=2),i>=56320&&i<=57343&&s--}return t}function a(e,t,s){var i,n,r,a,o,d=function d(){var l=+new Date-a;l<t&&l>0?i=setTimeout(d,t-l):(i=null,s||(o=e.apply(r,n),i||(r=n=null)))};return function(){for(var n=arguments.length,l=new Array(n),u=0;u<n;u++)l[u]=arguments[u];r=this,a=+new Date;var h=s&&!i;return i||(i=setTimeout(d,t)),h&&(o=e.apply(r,l),r=l=null),o}}function o(e,t){for(var s=Object.create(null),i=e.split(","),n=0;n<i.length;n++)s[i[n]]=!0;return t?function(e){return s[e.toLowerCase()]}:function(e){return s[e]}}var d="export default ",l={html:{indent_size:"2",indent_char:" ",max_preserve_newlines:"-1",preserve_newlines:!1,keep_array_indentation:!1,break_chained_methods:!1,indent_scripts:"separate",brace_style:"end-expand",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"110",indent_inner_html:!0,comma_first:!1,e4x:!0,indent_empty_lines:!0},js:{indent_size:"2",indent_char:" ",max_preserve_newlines:"-1",preserve_newlines:!1,keep_array_indentation:!1,break_chained_methods:!1,indent_scripts:"normal",brace_style:"end-expand",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!0,end_with_newline:!0,wrap_line_length:"110",indent_inner_html:!0,comma_first:!1,e4x:!0,indent_empty_lines:!0}};function u(e){return e.replace(/( |^)[a-z]/g,(function(e){return e.toUpperCase()}))}function h(e){return/^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(e)}},eda5:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,s){return e>11?s?"ප.ව.":"පස් වරු":s?"පෙ.ව.":"පෙර වරු"}});return t}))},f260:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},f3d9:function(e,t,s){},f3ff:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},s={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},i=e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return s[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,s){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});return i}))},f6b46:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],s=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],i=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],n=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],r=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],a=e.defineLocale("gd",{months:t,monthsShort:s,monthsParseExact:!0,weekdays:i,weekdaysShort:n,weekdaysMin:r,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return a}))},facd:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),s="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],n=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,r=e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?s[e.month()]:t[e.month()]:t},monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return r}))},fd7e:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,s=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+s},week:{dow:1,doy:4}});return t}))},fe1d:function(e,t,s){"use strict";s.d(t,"c",(function(){return n})),s.d(t,"d",(function(){return r})),s.d(t,"a",(function(){return a})),s.d(t,"e",(function(){return o})),s.d(t,"b",(function(){return d}));var i=s("b775");function n(e){return Object(i["a"])({url:"/sis/videoRecordPlay/findContinuous",method:"get",params:e})}function r(e){return Object(i["a"])({url:"/sis/videoRecordPlay/play",method:"get",params:e})}function a(e){return Object(i["a"])({url:"/sis/videoRecordPlay/downLoadRecord",method:"get",params:e})}function o(e){return Object(i["a"])({url:"/sis/videoRecordPlay/setRecordPlay",method:"get",params:e})}function d(){return Object(i["a"])({url:"/sis/videoRecordPlay/getPlayParam",method:"get"})}},ff0b:function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("canvas",{ref:"canvas",style:"background-color: "+this.colors.background+";position: none; cursor: "+(e.isMobile?"default":"pointer"),attrs:{onselectstart:"return false;",height:e.height},on:{touchmove:e.touchmove,touchend:e.touchend,touchstart:e.touchstart}})},n=[],r=(s("7db0"),s("caad"),s("4057"),s("a9e3"),s("d3b7"),s("ac1f"),s("00b4"),s("8a79"),s("5319"),s("159b"),s("c1df")),a=s.n(r),o={props:{width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:60},startMeddleTime:String,timeRange:{type:[Array,String],default:function(){return""}},markTime:{type:Array,default:function(){return[]}},isAutoPlay:{type:Boolean,default:!1},colors:{type:Object,default:function(){return{background:"#051c38",meddleLine:"#33CC33",meddleDate:"#33CC33",moveLine:"#808080",moveDate:"#009966",scaleLine:"#a1a1a1",scaleBar:"#042555"}}},minPxSecond:{type:Number,default:65}},data:function(){return{dpr:1,whole_hour:24,canvasWidth:1e3,meddleTime:"",mouseDown:!1,mouseDownPosition:"",mouseDownMeddleTime:"",isMove:!1,isMobile:!1,distance:0,isPlay:!1}},mounted:function(){this.canvas=this.$refs.canvas,this.isMobile=/Mobi/i.test(navigator.userAgent),this.isMobile||(this.canvas.addEventListener("mousewheel",this.mousewheel),this.canvas.addEventListener("mousemove",this.mousemove),this.canvas.addEventListener("mousedown",this.mousedown),this.canvas.addEventListener("mouseup",this.mouseup),this.canvas.addEventListener("mouseleave",this.mouseleave)),window.addEventListener("onorientationchange"in window?"orientationchange":"resize",this.resize,!1),this.setStartMeddleTime(),this.ctx=this.canvas.getContext("2d"),this.init(),this.isAutoPlay&&this.play()},methods:{init:function(){this.canvas=this.$refs.canvas;var e=this.width,t=this.canvas.parentElement.clientWidth;/^(\d|[1-9]\d|100)%$/.test(this.width)&&(e=Math.floor(this.width.replace("%","")/100*t)),this.dpr=window.devicePixelRatio,this.canvas.style.width="".concat(e,"px"),this.canvas.style.height="".concat(this.height,"px"),this.canvas.width=Math.round(e*this.dpr),this.canvas.height=Math.round(this.height*this.dpr),this.ctx.scale(this.dpr,this.dpr),this.canvasWidth=this.canvas.width/this.dpr,this.drow()},resize:function(){var e=this;180===window.orientation||window.orientation,90===window.orientation||window.orientation,this.canvas.parentElement&&this.canvas.style.width===this.canvas.parentElement.clientWidth+"px"?setTimeout((function(){e.resize()}),10):this.init()},stop:function(){this.isPlay&&(this.isPlay=!1,this.$emit("change",this.meddleTime,"stop")),this.interval_play&&clearInterval(this.interval_play)},play:function(e,t){var s,i=this;this.isPlay=!0,clearInterval(this.interval_play),e&&(this.meddleTime=e),s=t?1e3/t:1e3,console.log(s),this.interval_play=setInterval((function(){i.meddleTime=a()(i.meddleTime).add(1,"s").format("YYYY-MM-DD HH:mm:ss");var e=i.realTimeRange[1]&&new Date(i.meddleTime).getTime()>=new Date(i.realTimeRange[1]).getTime()?"end":"play";i.$emit("change",i.meddleTime,e);try{i.drow()}catch(t){console.log(t),clearInterval(i.interval_play)}i.isPlay&&"end"!=e||clearInterval(i.interval_play)}),s)},touchmove:function(e){var t=e.touches;if(e.offsetX=t[0].pageX,e.offsetY=t[0].pageY,t.length>=2){e.preventDefault();var s=Date.now();if(this._moveTime){if(s-this._moveTime>100){var i=this.getDistance({x:e.offsetX,y:e.offsetY},{x:t[1].pageX,y:t[1].pageY});i>this.distance?e.wheelDelta=1:e.wheelDelta=-1,this.distance=i,this._moveTime=null,this.mousewheel(e)}}else this._moveTime=s}else this.mousemove(e)},touchend:function(e){var t=e.changedTouches;e.offsetX=t[0].pageX,e.offsetY=t[0].pageY,this.mouseup(e)},touchstart:function(e){var t=e.touches;e.offsetX=t[0].pageX,e.offsetY=t[0].pageY,t.length>=2&&(e.preventDefault(),this.distance=this.getDistance({x:e.offsetX,y:e.offsetY},{x:t[1].pageX,y:t[1].pageX})),this.mousedown(e)},mouseleave:function(e){this.drow(),this.mouseDown?this.mouseup(e):this.mouseDown=!1},mousemove:function(e){this.drow(),this.isMobile||this.drowMoveLine(e),this.mouseDown&&(this.mouseDownMove(e),this.isMove=!0)},mousewheel:function(e){e.preventDefault(),e.wheelDelta>0?(this.whole_hour-=4,this.whole_hour<1&&(this.whole_hour=1)):this.whole_hour<4?this.whole_hour=4:(this.whole_hour+=4,this.whole_hour>24&&(this.whole_hour=24)),this.drow()},mousedown:function(e){this.mouseDown=!0,this.mouseDownPosition=e.offsetX,this.mouseDownMeddleTime=this.meddleTime,this.isMove=!1},mouseup:function(e){if(this.mouseDown=!1,!this.isMove){var t=e.offsetX*this.px_second*1e3+this.firstTime;t=this.boundary_time(t);var s=a()(t).format("YYYY-MM-DD HH:mm:ss");this.meddleTime=s,this.drow(),this.isMobile||this.drowMoveLine(e)}this.$emit("change",this.meddleTime,"start"),this.$emit("click",this.meddleTime),this.isAutoPlay&&this.play()},mouseDownMove:function(e){this.stop();var t=this.mouseDownPosition-e.offsetX,s=new Date(this.mouseDownMeddleTime).getTime()+t*this.px_second*1e3;s=this.boundary_time(s),this.meddleTime=a()(s).format("YYYY-MM-DD HH:mm:ss")},drow:function(){this.canvas.width=this.canvas.width,this.canvas.height=this.canvas.height,this.ctx.scale(this.dpr,this.dpr),this.drowMark(),this.drowScaleLine(),this.drowMeddleLine(this.meddleTime)},drowMoveLine:function(e){var t,s=e.offsetX*this.px_second*1e3+this.firstTime;if(!(this.realTimeRange[0]&&s<new Date(this.realTimeRange[0]).getTime()||this.realTimeRange[1]&&s>new Date(this.realTimeRange[1]).getTime())){this.ctx.beginPath(),this.ctx.moveTo(e.offsetX-1,0),this.ctx.lineTo(e.offsetX-1,45),this.ctx.strokeStyle=this.colors.moveLine,this.ctx.lineWidth=1,this.ctx.stroke(),this.ctx.fillStyle=this.colors.moveDate;var i=null===(t=this.getMark(s))||void 0===t?void 0:t.text;i=i?" (".concat(i,")"):"",this.ctx.font="".concat(16,"px serif"),this.ctx.fillText(a()(s).format("YYYY-MM-DD HH:mm:ss")+i,e.offsetX-50,55)}},drowMeddleLine:function(e){this.ctx.beginPath(),this.ctx.moveTo(this.canvasWidth/2,0),this.ctx.lineTo(this.canvasWidth/2,30),this.ctx.strokeStyle=this.colors.meddleLine,this.ctx.lineWidth=1,this.ctx.stroke(),this.ctx.fillStyle=this.colors.meddleLine,this.ctx.font="18px Microsoft YaHei",this.ctx.fillText(e,this.canvasWidth/2-50,40)},drowScaleLine:function(){for(var e=new Date(this.getFirstLineTime()).getTime()-this.firstTime,t=e/1e3/this.px_second,s=60*this.scaleLine_minute/this.px_second,i=t;i<=this.canvasWidth;i+=s){var n=this.firstTime+i*this.px_second*1e3;if(!(this.realTimeRange[0]&&n<new Date(this.realTimeRange[0]).getTime()||this.realTimeRange[1]&&n>new Date(this.realTimeRange[1]).getTime())){var r=a()(n).format("HH:mm");if(this.ctx.beginPath(),this.ctx.moveTo(i,0),this.ctx.lineTo(i,this.showTime(r)?20:10),this.ctx.strokeStyle=this.colors.scaleLine,this.ctx.lineWidth=1,this.ctx.stroke(),this.ctx.fillStyle=this.colors.scaleLine,this.ctx.font="14px serif","00:00"==r){var o=a()(n).format("YYYY-MM-DD");this.ctx.fillText(o,i-28,30)}else this.showTime(r)&&this.ctx.fillText(r,i-10,30)}}},setStartMeddleTime:function(){var e;this.realTimeRange[0]&&this.realTimeRange[1]&&(e=a()((new Date(this.realTimeRange[0]).getTime()+new Date(this.realTimeRange[1]).getTime())/2).format("YYYY-MM-DD HH:mm:ss")),this.meddleTime=this.startMeddleTime||e||a()(new Date).format("YYYY-MM-DD HH:mm:ss")},getFirstLineTime:function(){var e=a()(this.firstTime),t=this.scaleLine_minute-e.minute()%this.scaleLine_minute;return e.add(t,"minutes").format("YYYY-MM-DD HH:mm")},showTime:function(e){return this.whole_hour>=16?["00:00","02:00","04:00","06:00","08:00","10:00","12:00","14:00","16:00","18:00","20:00","22:00"].includes(e):this.whole_hour>=8?["00:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00"].includes(e):this.whole_hour>=4?["00","20","40"].find((function(t){return e.endsWith(t)})):["00","10","20","30","40","50"].find((function(t){return e.endsWith(t)}))},drowMark:function(){var e=this;this.ctx.fillStyle=this.colors.scaleBar,this.ctx.fillRect(0,0,this.canvasWidth,20),this.markTime.forEach((function(t){if(!(e.realTimeRange[0]&&new Date(t.endTime).getTime()<new Date(e.realTimeRange[0]).getTime()||e.realTimeRange[1]&&new Date(t.beginTime).getTime()>new Date(e.realTimeRange[1]).getTime())){e.ctx.fillStyle=t.bgColor;var s=e.realTimeRange[0]&&new Date(t.beginTime).getTime()<new Date(e.realTimeRange[0]).getTime()?e.realTimeRange[0]:t.beginTime,i=e.realTimeRange[1]&&new Date(t.endTime).getTime()>new Date(e.realTimeRange[1]).getTime()?e.realTimeRange[1]:t.endTime,n=(new Date(s).getTime()-e.firstTime)/1e3/e.px_second,r=(new Date(i).getTime()-e.firstTime)/1e3/e.px_second;e.ctx.fillRect(n,0,r-n,20)}}))},getDistance:function(e,t){var s=e.x-t.x,i=e.y-t.y;return Math.hypot(s,i)},boundary_time:function(e){return this.realTimeRange[0]&&e<new Date(this.realTimeRange[0]).getTime()?new Date(this.realTimeRange[0]).getTime():this.realTimeRange[1]&&e>new Date(this.realTimeRange[1]).getTime()?new Date(this.realTimeRange[1]).getTime():e},getMark:function(e){return this.markTime.find((function(t){return new Date(t.beginTime).getTime()<new Date(e).getTime()&&new Date(e).getTime()<new Date(t.endTime).getTime()}))}},computed:{firstTime:function(){return new Date(this.meddleTime).getTime()-this.px_second*this.canvasWidth/2*1e3},px_second:function(){var e=60*this.whole_hour*60/this.canvasWidth;return e>this.minPxSecond&&(e=this.minPxSecond),e},realTimeRange:function(){if("string"==typeof this.timeRange){var e=this.timeRange?a()(this.timeRange).format("YYYY-MM-DD"):a()().format("YYYY-MM-DD");return[e+" 00:00:00",e+" 23:59:59:59"]}return this.timeRange},scaleLine_minute:function(){return this.whole_hour>=20?30:this.whole_hour>=16?20:this.whole_hour>=12?15:this.whole_hour>=8?10:this.whole_hour>=4?5:2},changeProps:function(){var e=this.startMeddleTime,t=this.markTime,s=this.timeRange;return this.setStartMeddleTime(),{startMeddleTime:e,markTime:t,timeRange:s}}},watch:{changeProps:function(e){this.drow()}}},d=o,l=(s("a0f3"),s("2877")),u=Object(l["a"])(d,i,n,!1,null,null,null);t["a"]=u.exports},ffff:function(e,t,s){(function(e,t){t(s("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))}}]);
|