0,f<=p.r||!p.r){f<=1&&m>0&&(p=_[m-1]);var y=u[p.l];s&&(f=s(""+f)),l="string"==typeof y?y.replace("%d",f):y(f,r,p.l,c);break}}if(r)return l;var g=c?u.future:u.past;return"function"==typeof g?g(l):g.replace("%s",l)},r.to=function(e,t){return i(e,t,this,!0)},r.from=function(e,t){return i(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}),Gn.exports),Xn=Jn(Qn),er={exports:{}};Zn||(Zn=1,er.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"bg",weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekStart:1,ordinal:function(e){var t=e%100;if(t>10&&t<20)return e+"-ти";var n=e%10;return 1===n?e+"-ви":2===n?e+"-ри":7===n||8===n?e+"-ми":e+"-ти"},formats:{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"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"}};return n.default.locale(r,null,!0),r}(Bn()));var tr,nr={exports:{}};tr||(tr=1,nr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"ca",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("_"),months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Març_Abr._Maig_Juny_Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",ll:"D MMM YYYY",lll:"D MMM YYYY, H:mm",llll:"ddd D MMM YYYY, H:mm"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns 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"},ordinal:function(e){return e+(1===e||3===e?"r":2===e?"n":4===e?"t":"è")}};return n.default.locale(r,null,!0),r}(Bn()));var rr,ar={exports:{}};rr||(rr=1,ar.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e){return e>1&&e<5&&1!=~~(e/10)}function a(e,t,n,a){var i=e+" ";switch(n){case"s":return t||a?"pár sekund":"pár sekundami";case"m":return t?"minuta":a?"minutu":"minutou";case"mm":return t||a?i+(r(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":a?"hodinu":"hodinou";case"hh":return t||a?i+(r(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||a?"den":"dnem";case"dd":return t||a?i+(r(e)?"dny":"dní"):i+"dny";case"M":return t||a?"měsíc":"měsícem";case"MM":return t||a?i+(r(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||a?"rok":"rokem";case"yy":return t||a?i+(r(e)?"roky":"let"):i+"lety"}}var i={name:"cs",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("_"),months:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),monthsShort:"led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{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"},relativeTime:{future:"za %s",past:"před %s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a}};return n.default.locale(i,null,!0),i}(Bn()));var ir,or={exports:{}};ir||(ir=1,or.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"da",weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn._man._tirs._ons._tors._fre._lør.".split("_"),weekdaysMin:"sø._ma._ti._on._to._fr._lø.".split("_"),months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{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"},relativeTime:{future:"om %s",past:"%s siden",s:"få 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"}};return n.default.locale(r,null,!0),r}(Bn()));var sr,dr={exports:{}};sr||(sr=1,dr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function a(e,t,n){var a=r[n];return Array.isArray(a)&&(a=a[t?0:1]),a.replace("%d",e)}var i={name:"de",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("_"),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._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a}};return n.default.locale(i,null,!0),i}(Bn()));var lr,cr={exports:{}};lr||(lr=1,cr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"el",weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),months:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαι_Ιουν_Ιουλ_Αυγ_Σεπτ_Οκτ_Νοε_Δεκ".split("_"),ordinal:function(e){return e},weekStart:1,relativeTime:{future:"σε %s",past:"πριν %s",s:"μερικά δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένα μήνα",MM:"%d μήνες",y:"ένα χρόνο",yy:"%d χρόνια"},formats:{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"}};return n.default.locale(r,null,!0),r}(Bn()));var ur,_r={exports:{}};ur||(ur=1,_r.exports={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}});var hr,mr={exports:{}};hr||(hr=1,mr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),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("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{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"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"}};return n.default.locale(r,null,!0),r}(Bn()));var pr,fr={exports:{}};pr||(pr=1,fr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e,t,n,r){var a={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:["%d minuti","%d minutit"],h:["ühe tunni","tund aega","üks tund"],hh:["%d tunni","%d tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:["%d kuu","%d kuud"],y:["ühe aasta","aasta","üks aasta"],yy:["%d aasta","%d aastat"]};return t?(a[n][2]?a[n][2]:a[n][1]).replace("%d",e):(r?a[n][0]:a[n][1]).replace("%d",e)}var a={name:"et",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("_"),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("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"%s pärast",past:"%s tagasi",s:r,m:r,mm:r,h:r,hh:r,d:r,dd:"%d päeva",M:r,MM:r,y:r,yy:r},formats:{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"}};return n.default.locale(a,null,!0),a}(Bn()));var yr,gr={exports:{}};yr||(yr=1,gr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e,t,n,r){var a={s:"muutama sekunti",m:"minuutti",mm:"%d minuuttia",h:"tunti",hh:"%d tuntia",d:"päivä",dd:"%d päivää",M:"kuukausi",MM:"%d kuukautta",y:"vuosi",yy:"%d vuotta",numbers:"nolla_yksi_kaksi_kolme_neljä_viisi_kuusi_seitsemän_kahdeksan_yhdeksän".split("_")},i={s:"muutaman sekunnin",m:"minuutin",mm:"%d minuutin",h:"tunnin",hh:"%d tunnin",d:"päivän",dd:"%d päivän",M:"kuukauden",MM:"%d kuukauden",y:"vuoden",yy:"%d vuoden",numbers:"nollan_yhden_kahden_kolmen_neljän_viiden_kuuden_seitsemän_kahdeksan_yhdeksän".split("_")},o=r&&!t?i:a,s=o[n];return e<10?s.replace("%d",o.numbers[e]):s.replace("%d",e)}var a={name:"fi",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("_"),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("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,relativeTime:{future:"%s päästä",past:"%s sitten",s:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM[ta] YYYY",LLL:"D. MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, D. MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"D. MMM YYYY",lll:"D. MMM YYYY, [klo] HH.mm",llll:"ddd, D. MMM YYYY, [klo] HH.mm"}};return n.default.locale(a,null,!0),a}(Bn()));var vr,wr={exports:{}};vr||(vr=1,wr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"fr",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("_"),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("_"),weekStart:1,yearStart:4,formats:{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"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques 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"},ordinal:function(e){return e+(1===e?"er":"")}};return n.default.locale(r,null,!0),r}(Bn()));var Mr,br={exports:{}};Mr||(Mr=1,br.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:"%d שעות",hh2:"שעתיים",d:"יום",dd:"%d ימים",dd2:"יומיים",M:"חודש",MM:"%d חודשים",MM2:"חודשיים",y:"שנה",yy:"%d שנים",yy2:"שנתיים"};function a(e,t,n){return(r[n+(2===e?"2":"")]||r[n]).replace("%d",e)}var i={name:"he",weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א׳_ב׳_ג׳_ד׳_ה׳_ו_ש׳".split("_"),months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו_פבר_מרץ_אפר_מאי_יונ_יול_אוג_ספט_אוק_נוב_דצמ".split("_"),relativeTime:{future:"בעוד %s",past:"לפני %s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},ordinal:function(e){return e},format:{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"},formats:{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"}};return n.default.locale(i,null,!0),i}(Bn()));var kr,Dr={exports:{}};kr||(kr=1,Dr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r="siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),a="siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),i=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/,o=function(e,t){return i.test(t)?r[e.month()]:a[e.month()]};o.s=a,o.f=r;var s={name:"hr",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("_"),months:o,monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekStart:1,formats:{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"},relativeTime:{future:"za %s",past:"prije %s",s:"sekunda",m:"minuta",mm:"%d minuta",h:"sat",hh:"%d sati",d:"dan",dd:"%d dana",M:"mjesec",MM:"%d mjeseci",y:"godina",yy:"%d godine"},ordinal:function(e){return e+"."}};return n.default.locale(s,null,!0),s}(Bn()));var Yr,$r={exports:{}};Yr||(Yr=1,$r.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"hu",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("_"),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("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"%s múlva",past:"%s",s:function(e,t,n,r){return"néhány másodperc"+(r||t?"":"e")},m:function(e,t,n,r){return"egy perc"+(r||t?"":"e")},mm:function(e,t,n,r){return e+" perc"+(r||t?"":"e")},h:function(e,t,n,r){return"egy "+(r||t?"óra":"órája")},hh:function(e,t,n,r){return e+" "+(r||t?"óra":"órája")},d:function(e,t,n,r){return"egy "+(r||t?"nap":"napja")},dd:function(e,t,n,r){return e+" "+(r||t?"nap":"napja")},M:function(e,t,n,r){return"egy "+(r||t?"hónap":"hónapja")},MM:function(e,t,n,r){return e+" "+(r||t?"hónap":"hónapja")},y:function(e,t,n,r){return"egy "+(r||t?"év":"éve")},yy:function(e,t,n,r){return e+" "+(r||t?"év":"éve")}},formats:{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"}};return n.default.locale(r,null,!0),r}(Bn()));var Sr,Lr={exports:{}};Sr||(Sr=1,Lr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={s:["nokkrar sekúndur","nokkrar sekúndur","nokkrum sekúndum"],m:["mínúta","mínútu","mínútu"],mm:["mínútur","mínútur","mínútum"],h:["klukkustund","klukkustund","klukkustund"],hh:["klukkustundir","klukkustundir","klukkustundum"],d:["dagur","dag","degi"],dd:["dagar","daga","dögum"],M:["mánuður","mánuð","mánuði"],MM:["mánuðir","mánuði","mánuðum"],y:["ár","ár","ári"],yy:["ár","ár","árum"]};function a(e,t,n,a){var i=function(e,t,n,a){var i=a?0:n?1:2,o=2===e.length&&t%10==1?e[0]:e,s=r[o][i];return 1===e.length?s:"%d "+s}(n,e,a,t);return i.replace("%d",e)}var i={name:"is",weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),weekStart:1,weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),ordinal:function(e){return e},formats:{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"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a}};return n.default.locale(i,null,!0),i}(Bn()));var xr,Tr={exports:{}};xr||(xr=1,Tr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"it",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("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{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"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",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"},ordinal:function(e){return e+"º"}};return n.default.locale(r,null,!0),r}(Bn()));var jr,Hr={exports:{}};jr||(jr=1,Hr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r="sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),a="sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),i=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,o=function(e,t){return i.test(t)?r[e.month()]:a[e.month()]};o.s=a,o.f=r;var s={name:"lt",weekdays:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),weekdaysShort:"sek_pir_ant_tre_ket_pen_šeš".split("_"),weekdaysMin:"s_p_a_t_k_pn_š".split("_"),months:o,monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"už %s",past:"prieš %s",s:"kelias sekundes",m:"minutę",mm:"%d minutes",h:"valandą",hh:"%d valandas",d:"dieną",dd:"%d dienas",M:"mėnesį",MM:"%d mėnesius",y:"metus",yy:"%d metus"},format:{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.]"},formats:{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.]"}};return n.default.locale(s,null,!0),s}(Bn()));var zr,Or={exports:{}};zr||(zr=1,Or.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"lv",weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),weekStart:1,weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),ordinal:function(e){return e},formats:{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"},relativeTime:{future:"pēc %s",past:"pirms %s",s:"dažām sekundēm",m:"minūtes",mm:"%d minūtēm",h:"stundas",hh:"%d stundām",d:"dienas",dd:"%d dienām",M:"mēneša",MM:"%d mēnešiem",y:"gada",yy:"%d gadiem"}};return n.default.locale(r,null,!0),r}(Bn()));var Ar,Er={exports:{}};Ar||(Ar=1,Er.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"nb",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("_"),months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,formats:{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"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"}};return n.default.locale(r,null,!0),r}(Bn()));var Cr,Pr={exports:{}};Cr||(Cr=1,Pr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"nl",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("_"),months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),ordinal:function(e){return"["+e+(1===e||8===e||e>=20?"ste":"de")+"]"},weekStart:1,yearStart:4,formats:{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"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"een minuut",mm:"%d minuten",h:"een uur",hh:"%d uur",d:"een dag",dd:"%d dagen",M:"een maand",MM:"%d maanden",y:"een jaar",yy:"%d jaar"}};return n.default.locale(r,null,!0),r}(Bn()));var Ir,Nr={exports:{}};Ir||(Ir=1,Nr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"nn",weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"om %s",past:"for %s sidan",s:"nokre sekund",m:"eitt minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månadar",y:"eitt år",yy:"%d år"},formats:{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"}};return n.default.locale(r,null,!0),r}(Bn()));var Wr,Fr={exports:{}};Wr||(Wr=1,Fr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function a(e,t,n){var a=e+" ";switch(n){case"m":return t?"minuta":"minutę";case"mm":return a+(r(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return a+(r(e)?"godziny":"godzin");case"MM":return a+(r(e)?"miesiące":"miesięcy");case"yy":return a+(r(e)?"lata":"lat")}}var i="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),o="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),s=/D MMMM/,d=function(e,t){return s.test(t)?i[e.month()]:o[e.month()]};d.s=o,d.f=i;var l={name:"pl",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("_"),months:d,monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:a,mm:a,h:a,hh:a,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:a,y:"rok",yy:a},formats:{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"}};return n.default.locale(l,null,!0),l}(Bn()));var Ur,Jr={exports:{}};Ur||(Ur=1,Jr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"pt",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sab".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sa".split("_"),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("_"),ordinal:function(e){return e+"º"},weekStart:1,yearStart:4,formats:{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"},relativeTime:{future:"em %s",past:"há %s",s:"alguns 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"}};return n.default.locale(r,null,!0),r}(Bn()));var Rr,Vr={exports:{}};Rr||(Rr=1,Vr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"ro",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("_"),months:"Ianuarie_Februarie_Martie_Aprilie_Mai_Iunie_Iulie_August_Septembrie_Octombrie_Noiembrie_Decembrie".split("_"),monthsShort:"Ian._Febr._Mart._Apr._Mai_Iun._Iul._Aug._Sept._Oct._Nov._Dec.".split("_"),weekStart:1,formats:{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"},relativeTime:{future:"peste %s",past:"acum %s",s:"câteva secunde",m:"un minut",mm:"%d minute",h:"o oră",hh:"%d ore",d:"o zi",dd:"%d zile",M:"o lună",MM:"%d luni",y:"un an",yy:"%d ani"},ordinal:function(e){return e}};return n.default.locale(r,null,!0),r}(Bn()));var Br,Kr={exports:{}};Br||(Br=1,Kr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),a="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),i="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),o="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),s=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function d(e,t,n){var r,a;return"m"===n?t?"минута":"минуту":e+" "+(r=+e,a={mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?a[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?a[1]:a[2])}var l=function(e,t){return s.test(t)?r[e.month()]:a[e.month()]};l.s=a,l.f=r;var c=function(e,t){return s.test(t)?i[e.month()]:o[e.month()]};c.s=o,c.f=i;var u={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:l,monthsShort:c,weekStart:1,yearStart:4,formats:{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"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:d,mm:d,h:"час",hh:d,d:"день",dd:d,M:"месяц",MM:d,y:"год",yy:d},ordinal:function(e){return e},meridiem:function(e){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"}};return n.default.locale(u,null,!0),u}(Bn()));var qr,Gr={exports:{}};qr||(qr=1,Gr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e){return e>1&&e<5&&1!=~~(e/10)}function a(e,t,n,a){var i=e+" ";switch(n){case"s":return t||a?"pár sekúnd":"pár sekundami";case"m":return t?"minúta":a?"minútu":"minútou";case"mm":return t||a?i+(r(e)?"minúty":"minút"):i+"minútami";case"h":return t?"hodina":a?"hodinu":"hodinou";case"hh":return t||a?i+(r(e)?"hodiny":"hodín"):i+"hodinami";case"d":return t||a?"deň":"dňom";case"dd":return t||a?i+(r(e)?"dni":"dní"):i+"dňami";case"M":return t||a?"mesiac":"mesiacom";case"MM":return t||a?i+(r(e)?"mesiace":"mesiacov"):i+"mesiacmi";case"y":return t||a?"rok":"rokom";case"yy":return t||a?i+(r(e)?"roky":"rokov"):i+"rokmi"}}var i={name:"sk",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("_"),months:"január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),monthsShort:"jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{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"},relativeTime:{future:"za %s",past:"pred %s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a}};return n.default.locale(i,null,!0),i}(Bn()));var Zr,Qr={exports:{}};Zr||(Zr=1,Qr.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e){return e%100==2}function a(e){return e%100==3||e%100==4}function i(e,t,n,i){var o=e+" ";switch(n){case"s":return t||i?"nekaj sekund":"nekaj sekundami";case"m":return t?"ena minuta":"eno minuto";case"mm":return r(e)?o+(t||i?"minuti":"minutama"):a(e)?o+(t||i?"minute":"minutami"):o+(t||i?"minut":"minutami");case"h":return t?"ena ura":"eno uro";case"hh":return r(e)?o+(t||i?"uri":"urama"):a(e)?o+(t||i?"ure":"urami"):o+(t||i?"ur":"urami");case"d":return t||i?"en dan":"enim dnem";case"dd":return r(e)?o+(t||i?"dneva":"dnevoma"):o+(t||i?"dni":"dnevi");case"M":return t||i?"en mesec":"enim mesecem";case"MM":return r(e)?o+(t||i?"meseca":"mesecema"):a(e)?o+(t||i?"mesece":"meseci"):o+(t||i?"mesecev":"meseci");case"y":return t||i?"eno leto":"enim letom";case"yy":return r(e)?o+(t||i?"leti":"letoma"):a(e)?o+(t||i?"leta":"leti"):o+(t||i?"let":"leti")}}var o={name:"sl",weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),weekStart:1,weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),ordinal:function(e){return e+"."},formats:{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"},relativeTime:{future:"čez %s",past:"pred %s",s:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i}};return n.default.locale(o,null,!0),o}(Bn()));var Xr,ea={exports:{}};Xr||(Xr=1,ea.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"sv",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("_"),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("_"),weekStart:1,yearStart:4,ordinal:function(e){var t=e%10;return"["+e+(1===t||2===t?"a":"e")+"]"},formats:{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"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några 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"}};return n.default.locale(r,null,!0),r}(Bn()));var ta,na={exports:{}};ta||(ta=1,na.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"th",weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),formats:{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"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"},ordinal:function(e){return e+"."}};return n.default.locale(r,null,!0),r}(Bn()));var ra,aa={exports:{}};ra||(ra=1,aa.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"tr",weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),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("_"),weekStart:1,formats:{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"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e){return e+"."}};return n.default.locale(r,null,!0),r}(Bn()));var ia,oa={exports:{}};ia||(ia=1,oa.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r="січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),a="січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),i=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function o(e,t,n){var r,a;return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(r=+e,a={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?a[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?a[1]:a[2])}var s=function(e,t){return i.test(t)?r[e.month()]:a[e.month()]};s.s=a,s.f=r;var d={name:"uk",weekdays:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),weekdaysShort:"ндл_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:s,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekStart:1,relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:o,mm:o,h:o,hh:o,d:"день",dd:o,M:"місяць",MM:o,y:"рік",yy:o},ordinal:function(e){return e},formats:{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"}};return n.default.locale(d,null,!0),d}(Bn()));var sa,da={exports:{}};sa||(sa=1,da.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"vi",weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),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("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(e){return e},formats:{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"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài 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",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"}};return n.default.locale(r,null,!0),r}(Bn()));var la,ca={exports:{}};la||(la=1,ca.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,t){return"W"===t?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{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"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,t){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1100?"上午":n<1300?"中午":n<1800?"下午":"晚上"}};return n.default.locale(r,null,!0),r}(Bn()));var ua,_a={exports:{}};function ha(e,t,n){const r=function(e){const t=e.toLowerCase();if("zh-cn"===t||"zh-tw"===t)return t;const n=t.split("-")[0];return["bg","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","is","it","lt","lv","nb","nl","nn","pl","pt","ro","ru","sk","sl","sv","th","tr","uk","vi","zh-cn","zh-tw"].includes(n)?n:"en"}(t),a=qn(e).locale(r);return n?a.from(qn(n)):a.fromNow()}function ma(e,t,n,r){const a=!e.start.dateTime;let i,o;a?(i=va(e.start.date||""),o=va(e.end.date||"")):(i=new Date(e.start.dateTime||""),o=new Date(e.end.dateTime||""));const s=Fn(n);if(a){const e=new Date(o);return e.setDate(e.getDate()-1),i.toDateString()!==e.toDateString()?ga(function(e,t,n){const r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),i=new Date(a);if(i.setDate(i.getDate()+1),e.toDateString()===a.toDateString())return`${n.allDay}, ${n.endsToday}`;if(e.toDateString()===i.toDateString())return`${n.allDay}, ${n.endsTomorrow}`;const o=e.getDate(),s=n.months[e.getMonth()],d=n.fullDaysOfWeek[e.getDay()];switch(Un(t)){case"day-dot-month":return`${n.allDay}, ${n.multiDay} ${d}, ${o}. ${s}`;case"month-day":return`${n.allDay}, ${n.multiDay} ${d}, ${s} ${o}`;default:return`${n.allDay}, ${n.multiDay} ${d}, ${o} ${s}`}}(e,n,s)):ga(s.allDay)}const d=!("system"!==t.time_24h||!(null==r?void 0:r.locale)),l=!0===t.time_24h;return i.toDateString()!==o.toDateString()?ga(function(e,t,n,r,a,i=!0,o=!1,s){const d=new Date,l=new Date(d.getFullYear(),d.getMonth(),d.getDate()),c=new Date(l);c.setDate(c.getDate()+1);const u=e=>{if(a&&(null==s?void 0:s.locale)){return Ma(e,Oe(s.locale,i),o)}return Ma(e,i,o)};let _;if(t.toDateString()===l.toDateString())_=`${r.endsToday} ${r.at} ${u(t)}`;else if(t.toDateString()===c.toDateString())_=`${r.endsTomorrow} ${r.at} ${u(t)}`;else{const e=t.getDate(),a=r.months[t.getMonth()],i=r.fullDaysOfWeek[t.getDay()],o=u(t);switch(Un(n)){case"day-dot-month":_=`${i}, ${e}. ${a} ${r.at} ${o}`;break;case"month-day":_=`${i}, ${a} ${e} ${r.at} ${o}`;break;default:_=`${i}, ${e} ${a} ${r.at} ${o}`}}if(l.getTime()<=e.getTime()){return`${u(e)} ${r.multiDay} ${_}`}return t.toDateString()===l.toDateString()||t.toDateString()===c.toDateString()?_:`${r.multiDay} ${_}`}(i,o,n,s,d,l,t.time_two_digit_hours,r)):ga(function(e,t,n,r,a=!0,i=!1,o){if(r&&(null==o?void 0:o.locale)){const r=Oe(o.locale,a);return n?`${Ma(e,r,i)} - ${Ma(t,r,i)}`:Ma(e,r,i)}return n?`${Ma(e,a,i)} - ${Ma(t,a,i)}`:Ma(e,a,i)}(i,o,t.show_end_time,d,l,t.time_two_digit_hours,r))}ua||(ua=1,_a.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,t){return"W"===t?e+"週":e+"日"},formats:{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"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(e,t){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1100?"上午":n<1300?"中午":n<1800?"下午":"晚上"}};return n.default.locale(r,null,!0),r}(Bn())),qn.extend(Xn);const pa=new Map;function fa(e,t=!0){if(!e)return"";if(!1===t)return e;const n=e.trim();if("string"==typeof t&&"true"!==t){const e=function(e){var t;if(pa.has(e))return null!=(t=pa.get(e))?t:null;let n=null;try{n=new RegExp(`(${e})\\s*$`,"i")}catch(t){Ze(`Ignoring "remove_location_country": ${JSON.stringify(e)} is not a valid regular expression. Locations are shown unchanged.`)}return pa.set(e,n),n}(t);return null===e?n:n.replace(e,"").replace(/,?\s*$/,"")}for(const e of De)if(n.endsWith(e))return n.slice(0,n.length-e.length).replace(/,?\s*$/,"");return n}function ya(e){if(!e)return"";const t=e.replace(/<[^>]*>/g,""),n=document.createElement("textarea");return n.innerHTML=t,n.value.trim()}function ga(e){return e&&0!==e.length?e.charAt(0).toUpperCase()+e.slice(1):e}function va(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function wa(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Ma(e,t=!0,n=!1){let r=e.getHours();const a=e.getMinutes();if(!t){const e=r>=12?"PM":"AM";return r=r%12||12,`${n?ba(r):r}:${ba(a)} ${e}`}return`${n?ba(r):r}:${ba(a)}`}function ba(e){return e.toString().padStart(2,"0")}function ka(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));t.setUTCDate(t.getUTCDate()+4-(t.getUTCDay()||7));const n=Date.UTC(t.getUTCFullYear(),0,1);return Math.ceil(((t.getTime()-n)/864e5+1)/7)}const Da=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Ya={af:0,ar:6,bn:0,en:0,"en-gb":1,fa:6,he:0,hi:0,id:0,is:0,ja:0,ko:0,ml:0,pt:0,"pt-br":0,ta:0,te:0,th:0,ur:0,"zh-hans":1,"zh-hant":0};function $a(e,t){var n;if("sunday"===e)return 0;if("monday"===e)return 1;const r=Da.indexOf(null!=(n=null==t?void 0:t.first_weekday)?n:"");return-1!==r?r:(null==t?void 0:t.language)?function(e){var t,n;const r=e.toLowerCase();return null!=(n=null!=(t=Ya[r])?t:Ya[r.split("-")[0]])?n:1}(t.language):1}function Sa(e,t,n){const r=t||"iso";return"iso"===r?ka(e):"simple"===r?function(e,t=0){const n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Date.UTC(e.getFullYear(),0,1),a=Math.round((n-r)/864e5),i=(new Date(r).getUTCDay()-t+7)%7;return Math.ceil((a+i+1)/7)}(e,n):null}const La={sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},xa="start_of_week";function Ta(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function ja(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function Ha(e,t){const n=(t-e.getDay()+7)%7;return ja(e,n)}function za(e,t){const n=(e.getDay()-t+7)%7;return ja(e,-n)}function Oa(e){const t=[];let n="";for(const r of e)"+"===r||"-"===r?(t.push(n),n=r):n+=r;return t.push(n),t}function Aa(e,t,n){const r=String(e).replace(/\s+/g,"").toLowerCase();if(""===r)return{kind:"nomatch"};const a=Oa(r),i=a[0],o=a.slice(1);let s;if("today"===i)s=Ta(n);else if(i===xa)s=function(e,t){return za(e,(t%7+7)%7)}(n,t);else if(i in La)s=Ha(Ta(n),La[i]);else{if(""!==i)return{kind:"nomatch"};s=Ta(n)}if(o.length>8)return{kind:"error",message:"too many operators (maximum 8)"};for(const e of o){const t="-"===e[0]?-1:1,n=e.slice(1);if(""===n)return{kind:"error",message:`dangling "${e[0]}" with no value`};if(n in La){const e=La[n];s=t>0?Ha(s,e):za(s,e);continue}const r=n.match(/^(\d+)w$/);if(r){s=ja(s,t*parseInt(r[1],10)*7);continue}const a=n.match(/^(\d+)$/);if(!a)return{kind:"error",message:`unrecognized operand "${n}"`};s=ja(s,t*parseInt(a[1],10))}return{kind:"ok",date:s}}var Ea=Object.defineProperty,Ca=Object.defineProperties,Pa=Object.getOwnPropertyDescriptors,Ia=Object.getOwnPropertySymbols,Na=Object.prototype.hasOwnProperty,Wa=Object.prototype.propertyIsEnumerable,Fa=(e,t,n)=>t in e?Ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ua=(e,t)=>{for(var n in t||(t={}))Na.call(t,n)&&Fa(e,n,t[n]);if(Ia)for(var n of Ia(t))Wa.call(t,n)&&Fa(e,n,t[n]);return e},Ja=(e,t)=>Ca(e,Pa(t));const Ra=new Map;async function Va(e,t,n,r=!1){const a=$a(t.first_day_of_week,e.locale),i=function(e,t,n,r,a){const i=t.map((e=>"string"==typeof e?e:e.entity)).sort().join("_");let o="";if(r)try{o=r.includes("T")?r.split("T")[0]:r}catch(e){o=r}const s=o?`_${o}`:"",d=function(e){const t=String(e).replace(/\s+/g,"").toLowerCase();return""!==t&&Oa(t)[0]===xa}(o)&&void 0!==a?`_fdw${a}`:"";return`${he}${e}_${i}_${n}${s}${d}${le}`}(n,t.entities,t.days_to_show,t.start_date,a),o=function(){if(window.performance&&window.performance.navigation)return 1===window.performance.navigation.type;if(window.performance&&window.performance.getEntriesByType){const e=window.performance.getEntriesByType("navigation");if(e.length>0&&"type"in e[0])return"reload"===e[0].type}return!1}();if(!r){const e=function(e,t,n=!1){const r=di(e,t,n);if(r)return[...r.events];return null}(i,t,o);if(e)return Xe(`Using ${e.length} events from cache`),{events:Ba(e,t,a),failedEntities:[]}}let s=Ra.get(i);s?Xe("Joining an in-flight request for the same calendars and window"):(s=async function(e,t,n,r){try{Xe("Fetching events from API");const a=t.entities.map((e=>"string"==typeof e?{entity:e,color:"var(--primary-text-color)"}:e)),i=oi(t.days_to_show,t.start_date,r),{events:o,failedEntities:s}=await async function(e,t,n){const r=[],a=[],i=new Set;for(const o of t)if(!i.has(o.entity))try{const t=`calendars/${o.entity}?start=${n.start.toISOString()}&end=${n.end.toISOString()}`;Xe(`Fetching calendar events with path: ${t}`);const s=await e.callApi("GET",t);if(!s||!Array.isArray(s)){Ze(`Invalid response for ${o.entity}`),a.push(o.entity);continue}const d=s.map((e=>Ja(Ua({},e),{_entityId:o.entity})));r.push(...d),i.add(o.entity)}catch(t){Ge(`Failed to fetch events for ${o.entity}:`,t),a.push(o.entity);try{Xe("Available hass API methods:",Object.keys(e).filter((t=>"function"==typeof e[t])))}catch(e){}}return{events:r,failedEntities:a}}(e,a,i);if(o.length>0)si(n,o);else if(s.length>0)Ze(`No events returned and ${s.length} calendar(s) failed to load; not caching empty result`);else{const e=1e3*_e;Xe(`No events returned; caching empty result briefly (${_e}s)`),si(n,o,e)}return{events:o,failedEntities:s}}finally{Ra.delete(n)}}(e,t,i,a),Ra.set(i,s));const{events:d,failedEntities:l}=await s;return{events:Ba(d,t,a),failedEntities:l}}function Ba(e,t,n){const r=function(e,t){const n=[],r=Ka(e),a=e.length-r.length;a>0&&Ze(`Ignoring ${a} calendar event(s) missing a start or end; the calendar integration returned an incomplete payload`);return t.entities.forEach((e=>{const a="string"==typeof e?e:e.entity,i=r.filter((e=>e._entityId===a));if(0===i.length)return;const o=function(e,t){if("string"==typeof t)return[...e];let n=[...e];if(t.allowlist)try{const e=new RegExp(t.allowlist,"i");n=n.filter((t=>t.summary&&e.test(t.summary)))}catch(e){Ze(`Invalid allowlist pattern: ${t.allowlist}`,e)}else if(t.blocklist)try{const e=new RegExp(t.blocklist,"i");n=n.filter((t=>!(t.summary&&e.test(t.summary))))}catch(e){Ze(`Invalid blocklist pattern: ${t.blocklist}`,e)}return n}(i,e),s=o.map((n=>{const r=Ja(Ua({},n),{_matchedConfig:"object"==typeof e?e:void 0});return r._entityLabel=ri(a,t,r),r}));n.push(...s)})),et(`Processed ${n.length} events after filtering`),n}(e,t),a=li(t,n),i=new Date(a);return i.setDate(i.getDate()+t.days_to_show),r.filter((e=>{if(!e.start)return!1;let t;if(e.start.dateTime)t=new Date(e.start.dateTime);else{if(!e.start.date)return!1;t=va(e.start.date)}return tBoolean(e.start)&&Boolean(e.end)))}function qa(e,t,n,r,a="list",i){const o=Rt(t,a),s=function(e,t,n){if(!n||e.length<2)return e;const r=new Set,a=new Set;for(const n of t.entities){const t="string"==typeof n?n:n.entity;for(const n of e){if(n._entityId!==t)continue;const e=ti(n);r.has(e)||(r.add(e),a.add(n))}}return e.filter((e=>a.has(e)||!r.has(ti(e))))}(Ka(e),o,o.filter_duplicates),d=o.show_empty_days,l=!n&&Ut(a),c=function(e,t,n=!1){const r=[];for(const a of e){if(!Qa(a,t,n)){r.push(a);continue}if(!Za(a)){r.push(a);continue}const e=ei(a);r.push(...e)}return r}(s,o,"column"===a);const u=li(o,$a(o.first_day_of_week,i)),_=new Date(u),h=new Date(_);h.setHours(23,59,59,999);const m=new Date(_);m.setDate(m.getDate()+o.days_to_show);const p=new Date,f=c.filter((e=>{if(!(null==e?void 0:e.start)||!(null==e?void 0:e.end))return!1;const t=!e.start.dateTime;let n,r;if(t){if(n=e.start.date?va(e.start.date):null,r=e.end.date?va(e.end.date):null,r){const e=new Date(r);e.setDate(e.getDate()-1),r=e}}else n=e.start.dateTime?new Date(e.start.dateTime):null,r=e.end.dateTime?new Date(e.end.dateTime):null;if(!n||!r)return!1;if(e._isMultiDaySegment&&n>=m)return!1;return!!(n>=_&&n<=h||n>h||r>=_)&&!(!o.show_past_events&&!t&&r0&&f.forEach((e=>{var t,n;let a,i,s;if(!e.start.dateTime){if(a=e.start.date?va(e.start.date):null,i=e.end.date?va(e.end.date):null,i){const e=new Date(i);e.setDate(e.getDate()-1),i=e}}else a=e.start.dateTime?new Date(e.start.dateTime):null,i=e.end.dateTime?new Date(e.end.dateTime):null;if(!a||!i)return;s=a>=_?a:i.toDateString()===_.toDateString()||a<_&&i>_?_:a;const d=wa(s),l=Fn(r);y[d]||(y[d]={weekday:l.daysOfWeek[s.getDay()],day:s.getDate(),month:l.months[s.getMonth()],timestamp:s.getTime(),events:[]}),y[d].events.push({summary:e.summary||"",location:(null!=(t=ai(e._entityId,"show_location",o,e))?t:o.show_location)?fa(e.location||"",o.remove_location_country):"",description:(null!=(n=ai(e._entityId,"show_description",o,e))?n:o.show_description)?ya(e.description||""):"",start:e.start,end:e.end,_entityId:e._entityId,_entityLabel:ri(e._entityId,o,e),_matchedConfig:e._matchedConfig,_isEmptyDay:e._isEmptyDay,_isCustomEmptyText:e._isCustomEmptyText,_isMultiDaySegment:e._isMultiDaySegment})}));const g=$a(o.first_day_of_week,i);Object.values(y).forEach((e=>{const t=new Date(e.timestamp);e.weekNumber=ci(t,o,g),e.monthNumber=t.getMonth()})),Object.values(y).forEach((e=>{e.events.sort(((e,t)=>{const n=!e.start.dateTime,r=!t.start.dateTime;if(n&&!r)return-1;if(!n&&r)return 1;let a,i;if(a=n&&e.start.date?va(e.start.date).getTime():e.start.dateTime?new Date(e.start.dateTime).getTime():0,i=r&&t.start.date?va(t.start.date).getTime():t.start.dateTime?new Date(t.start.dateTime).getTime():0,n&&r&&a===i){const n=Ga(e._entityId,o),r=Ga(t._entityId,o);return n!==r?n-r:(e.summary||"").localeCompare(t.summary||"",void 0,{sensitivity:"base"})}return a-i}))}));const v=l?Math.min(o.compact_days_to_show||o.days_to_show,o.days_to_show):o.days_to_show;let w=Object.values(y).sort(((e,t)=>e.timestamp-t.timestamp)).slice(0,v||3);if(l){const e=new Map;for(const t of w){const n=[];for(const r of t.events){if(r._isEmptyDay){n.push(r);continue}const t=r._entityId,a=r._matchedConfig;let i=-1;a?i=o.entities.findIndex((e=>"object"==typeof e&&e===a)):t&&(i=o.entities.findIndex((e=>"string"==typeof e&&e===t)));const s=-1!==i?`${t}__${i}`:t||"",d=null==a?void 0:a.compact_events_to_show;if("number"!=typeof d||!Number.isFinite(d)){n.push(r);continue}const l=e.get(s)||0;le.events.length>0&&!(1===e.events.length&&e.events[0]._isEmptyDay)))),l){const e=o.compact_events_to_show;if("number"==typeof e&&Number.isFinite(e)){let t=[],n=0;if(o.compact_events_complete_days){const r=new Set;for(const t of w)if((1!==t.events.length||!t.events[0]._isEmptyDay)&&n0){const a=Math.min(t.events.length,e-n);a>0&&(r.add(wa(new Date(t.timestamp))),n+=a)}t=w.filter((e=>{const t=wa(new Date(e.timestamp));return r.has(t)}))}else{t=[];for(const r of w){if(n>=e&&(1!==r.events.length||!r.events[0]._isEmptyDay))break;if(1===r.events.length&&r.events[0]._isEmptyDay){t.push(r);continue}const a=e-n;if(a>0&&r.events.length>0){const e=Ja(Ua({},r),{events:r.events.slice(0,a)});t.push(e),n+=e.events.length}}}w=t}}if(d||0===w.length){const e=Fn(r),t=o.empty_day_text,a=Boolean(t),i=t||e.noEvents,s=new Date(u);let c;if(n)c=new Date(u),c.setDate(c.getDate()+v-1);else if(0===w.length)d?(c=new Date(u),c.setDate(c.getDate()+v-1)):c=new Date(u);else if(l&&o.compact_events_to_show)if(w.length>0){const e=Math.max(...w.map((e=>e.timestamp)));c=new Date(e)}else c=new Date(u);else c=new Date(u),c.setDate(c.getDate()+v-1);const _=new Set(w.map((e=>wa(new Date(e.timestamp))))),h=[...w],m=function(e,t){const n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((r-n)/864e5)}(s,c);for(let t=0;t<=m;t++){const n=new Date(s);n.setDate(s.getDate()+t);const r=wa(n);if(!_.has(r)){const t=ci(n,o,g),s={weekday:e.daysOfWeek[n.getDay()],day:n.getDate(),month:e.months[n.getMonth()],timestamp:n.getTime(),events:[{summary:i,start:{date:r},end:{date:r},_entityId:"_empty_day_",_isEmptyDay:!0,_isCustomEmptyText:a,location:""}],weekNumber:t,monthNumber:n.getMonth()};h.push(s)}}h.sort(((e,t)=>e.timestamp-t.timestamp)),w=h}return w.slice(0,v)}function Ga(e,t){if(!e)return Number.MAX_SAFE_INTEGER;const n=t.entities.findIndex((t=>"string"==typeof t?t===e:t.entity===e));return-1!==n?n:Number.MAX_SAFE_INTEGER}function Za(e){if(!e.start||!e.end)return!1;if(e.start.date&&e.end.date){const t=new Date(e.start.date),n=new Date(e.end.date);return n.setDate(n.getDate()-1),t.toDateString()!==n.toDateString()}if(e.start.dateTime&&e.end.dateTime){const t=new Date(e.start.dateTime),n=new Date(e.end.dateTime);return t.toDateString()!==n.toDateString()}return!1}function Qa(e,t,n=!1){return!n&&e._entityId&&e._matchedConfig&&void 0!==e._matchedConfig.split_multiday_events?e._matchedConfig.split_multiday_events:t.split_multiday_events}function Xa(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function ei(e){const t=[];if(e.start.date&&e.end.date){const n=va(e.start.date),r=va(e.end.date);r.setDate(r.getDate()-1);for(let a=new Date(n);a<=r;a.setDate(a.getDate()+1)){const n=Xa(a),r=new Date(a);r.setDate(r.getDate()+1);const i=Xa(r),o=Ja(Ua({},e),{start:{date:n},end:{date:i},_isMultiDaySegment:!0});t.push(o)}}else if(e.start.dateTime&&e.end.dateTime){const n=new Date(e.start.dateTime),r=new Date(e.end.dateTime),a=new Date(n);a.setHours(23,59,59,999);if(new Date(a.getTime()+1)"string"==typeof t&&t===e||"object"==typeof t&&t.entity===e));const i="string"==typeof a?t.accent_color:(null==a?void 0:a.accent_color)||t.accent_color;return void 0===n||0===n||isNaN(n)?i:$e(i,n)}function ri(e,t,n){if(!e)return;if(n&&n._matchedConfig)return n._matchedConfig.label;const r=t.entities.find((t=>"string"==typeof t&&t===e||"object"==typeof t&&t.entity===e));return r&&"string"!=typeof r?r.label:void 0}function ai(e,t,n,r){if(!e)return;if(r&&r._matchedConfig)return r._matchedConfig[t];const a=n.entities.find((t=>"string"==typeof t&&t===e||"object"==typeof t&&t.entity===e));return a&&"string"!=typeof a?a[t]:void 0}function ii(e){if(!e||e._isEmptyDay)return!1;const t=new Date;if(!e.start.dateTime)return!1;const n=e.start.dateTime?new Date(e.start.dateTime):null,r=e.end.dateTime?new Date(e.end.dateTime):null;return!(!n||!r)&&(t>=n&&t{const e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())},i=null==t?"":String(t);if(""!==i.trim())try{const e=i.trim(),t=Aa(e,n,new Date);if("ok"===t.kind)r=t.date,isNaN(r.getTime())?(Ze(`start_date "${e}" resolved outside the supported date range. Falling back to today.`),r=a()):Xe(`Resolved start_date "${e}" to ${wa(r)}`);else if("error"===t.kind)Ze(`Invalid start_date "${e}": ${t.message}. Falling back to today.`),r=a();else if(e.includes("T"))r=new Date(e),isNaN(r.getTime())&&(Ze(`Invalid ISO date: ${e}, falling back to today`),r=a());else{const[t,n,i]=e.split("-").map(Number);t&&n&&i&&n>=1&&n<=12&&i>=1&&i<=31?(r=new Date(t,n-1,i),r.getFullYear()===t&&r.getMonth()===n-1&&r.getDate()===i||(Ze(`Impossible date: ${e}, falling back to today`),r=a())):(Ze(`Malformed date: ${e}, falling back to today`),r=a())}}catch(e){Ze(`Error parsing date: ${i}, falling back to today`,e),r=a()}else r=a();r.setHours(0,0,0,0);const o=new Date(r),s=parseInt(e.toString())||3;return o.setDate(r.getDate()+s),o.setHours(23,59,59,999),{start:r,end:o}}function si(e,t,n){try{Xe(`Caching ${t.length} events`);const r={events:t,timestamp:Date.now()};return"number"==typeof n&&n>0&&(r.ttlMs=n),localStorage.setItem(e,JSON.stringify(r)),null!==di(e)}catch(e){return Ge("Failed to cache calendar events:",e),!1}}function di(e,t,n=!1){try{const r=localStorage.getItem(e);if(!r)return null;const a=JSON.parse(r);if(!function(e){if("object"!=typeof e||null===e||Array.isArray(e))return!1;const t=e;return!("number"!=typeof t.timestamp||!Number.isFinite(t.timestamp))&&!!Array.isArray(t.events)&&t.events.every((e=>"object"==typeof e&&null!==e&&!Array.isArray(e)))}(a))return localStorage.removeItem(e),Ze(`Malformed cache entry removed for ${e}`),null;const i=a,o=Date.now();let s;s="number"==typeof i.ttlMs&&i.ttlMs>0?i.ttlMs:n&&(null==t?void 0:t.refresh_on_navigate)?1e3*ue:function(e){return 60*((null==e?void 0:e.refresh_interval)||ce)*1e3}(t);return o-i.timestamp{const t=function(e){const t=null==e?void 0:e.resources;if(!t)return{};const n={};for(const[e,r]of Object.entries(t))e.startsWith(_i)&&"string"==typeof r&&r&&(n[e.slice(43)]=r);return n}(e);if(0!==Object.keys(t).length){pi.set(r,t),function(e,t){const n=hi.filter((e=>!t[e]));if(0===n.length)return;et(`Home Assistant returned ${Object.keys(t).length} weather conditions for ${e}, without ${n.join(", ")}; those will follow the instance's language instead`)}(r,t),et(`Loaded ${Object.keys(t).length} weather conditions in ${r}`);for(const e of o)e()}else Mi(r,"Home Assistant returned no condition strings")})).catch((e=>{Mi(r,String(e))})).finally((()=>{fi.delete(r)}))}function Mi(e,t){yi.has(e)||(yi.add(e),et(`Could not load weather conditions in ${e} (${t}); conditions will follow Home Assistant's language instead`))}function bi(e){return(null==e?void 0:e.position)||"date"}function ki(e,t){const n={};return e&&Array.isArray(e)?(e.forEach((e=>{if(!e.datetime)return;let r,a,i;"hourly"===t?(i=new Date(e.datetime),a=i.getHours(),r=`${wa(i)}_${a}`):(i=new Date(e.datetime),r=wa(i));const o=function(e,t){const n=void 0!==t&&(t>=18||t<6);if(n&&Yi[e])return Yi[e];return Di[e]||"mdi:weather-cloudy-alert"}(e.condition,a);n[r]={icon:o,condition:e.condition,temperature:Math.round(e.temperature),templow:void 0!==e.templow?Math.round(e.templow):void 0,datetime:e.datetime,hour:a,uv_index:void 0!==e.uv_index?Math.round(e.uv_index):void 0}})),n):n}const Di={"clear-night":"mdi:weather-night",cloudy:"mdi:weather-cloudy",fog:"mdi:weather-fog",hail:"mdi:weather-hail",lightning:"mdi:weather-lightning","lightning-rainy":"mdi:weather-lightning-rainy",partlycloudy:"mdi:weather-partly-cloudy",pouring:"mdi:weather-pouring",rainy:"mdi:weather-rainy",snowy:"mdi:weather-snowy","snowy-rainy":"mdi:weather-snowy-rainy",sunny:"mdi:weather-sunny",windy:"mdi:weather-windy","windy-variant":"mdi:weather-windy-variant",exceptional:"mdi:weather-cloudy-alert"},Yi={sunny:"mdi:weather-night",partlycloudy:"mdi:weather-night-partly-cloudy","lightning-rainy":"mdi:weather-lightning"};const $i=new Set;async function Si(e,t,n,r){var a;if(!(null==e?void 0:e.connection)||!(null==(a=null==t?void 0:t.weather)?void 0:a.entity))return;const i=t.weather.entity;try{return await e.connection.subscribeMessage((e=>{if(e&&Array.isArray(e.forecast)){const t=ki(e.forecast,n);r(t)}}),{type:"weather/subscribe_forecast",forecast_type:n,entity_id:i})}catch(e){return void Ge("Failed to subscribe to weather forecast",{entity:i,forecast_type:n,error:e})}}function Li(e,t,n){var r,a,i;const o=bi(t.weather);if(!(("date"===o||"both"===o)&&(null==(r=t.weather)?void 0:r.entity))||!(null==n?void 0:n.daily))return F;const s=function(e,t){if(!t)return;return t[wa(e)]}(e,n.daily);if(!s)return F;const d=(null==(a=t.weather)?void 0:a.date)||{},l=!1!==d.show_conditions,c=!1!==d.show_high_temp,u=!0===d.show_uv_index&&void 0!==s.uv_index&&s.uv_index>=(null!=(i=d.uv_index_threshold)?i:0),_=!0===d.show_low_temp&&!u&&void 0!==s.templow;return N`
${l?N``:F}${c?N`${s.temperature}°`:F}${_?N`/${s.templow}°`:F}${u?N`UV${s.uv_index}`:F}
`}function xi(e){const t=e.getDay();return 0===t||6===t}function Ti(e){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(e).toDateString(),a=new Date(n);return a.setDate(a.getDate()+1),{isToday:r===n.toDateString(),isTomorrow:r===a.toDateString()}}function ji(e,t,n,r,a=F){const i=xi(e);let o=t.weekday_color,s=t.day_color,d=t.month_color;i&&(o=t.weekend_weekday_color||o,s=t.weekend_day_color||s,d=t.weekend_month_color||d),r&&(o=t.today_weekday_color||o,s=t.today_day_color||s,d=t.today_month_color||d);const l=Fn(n),c=l.daysOfWeek[e.getDay()],u=e.getDate(),_=l.months[e.getMonth()];return N`
${c}
${u}
${t.show_month?N`
${_}
`:F}
${a}
`}const Hi=/[\u2000-\u3300]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|\uD83E[\uDC00-\uDFFF]/,zi=/[\s\p{L}]/u;function Oi(e,t,n){if(!e)return F;const r=xe(e,n);if("none"===r)return F;if("icon"===r)return N``;if("image"===r)return N`
`;const a=function(e){return Hi.test(e)&&!zi.test(e)}(e)?" label-emoji":"";return N`${e}`}function Ai(e){var t;const n=bi(e.weather);return!(!(null==(t=e.weather)?void 0:t.entity)||"event"!==n&&"both"!==n)}function Ei(e,t,n,r="title",a){var i,o,s,d;if(!Ai(t)||!(null==n?void 0:n.hourly))return N``;if(null==(i=e.end)?void 0:i.dateTime){const t=new Date;if(new Date(e.end.dateTime){if(e.startsWith(i)){const t=e.split("_")[1],a=parseInt(t);if(!isNaN(a)){const e=Math.abs(a-o);e=0)return t[`${i}_${n}`]}return r&&n?n[i]:void 0}(e,n.hourly,n.daily,!1!==l.daily_forecast_fallback);if(!c)return N``;const u=!1!==l.show_conditions,_=!1!==l.show_temp,h=!0===l.show_uv_index&&void 0!==c.uv_index&&c.uv_index>=(null!=(s=l.uv_index_threshold)?s:0),m="row"===r,p=m||u,f=m&&u?function(e,t,n,r){var a;if(!e||!t||!n)return;const i=mi(e,r);if(i){const e=gi(i,n);if(e)return e}const o=null==(a=e.states)?void 0:a[t];if(!o||"function"!=typeof e.formatEntityState)return;const s=e.formatEntityState(o,n);return s?(s!==n||$i.has(n)||($i.add(n),et(`Weather condition "${n}" came back untranslated from ${t}; Home Assistant returned the raw token, so the row will show it as-is`)),s):void 0}(a,null==(d=t.weather)?void 0:d.entity,c.condition,t.language):void 0;return N`
${p?N``:F}${_?N`${c.temperature}°`:F}${h?N`UV${c.uv_index}`:F}${f?N`${f}`:F}
`}function Ci(e,t,n,r={}){const{weatherForecasts:a,weatherPlacement:i="title",progressPlacement:o="inline",countdownPlacement:s="trailing",hass:d}=r,{eventTime:l,eventLocation:c,eventDescription:u,shouldShowTime:_,countdownStr:h,progressPercentage:m}=n,p=null!==m&&t.show_progress_bar,f=p&&"inline"===o,y=p&&"row"===o?N`
`:F,g="title"===i?a:void 0,v="row"===i&&Ai(t)?Ei(e,t,a,"row",d):F,w="text"===s&&null!==h,M=w?null:h,b=w?N`${l}${h}`:N`${l}`;return N`
${function(e,t,n){var r,a,i;const o=!!e._isEmptyDay,s=o&&!e._isCustomEmptyText,d=o?"var(--calendar-card-empty-day-color)":(null==(r=e._matchedConfig)?void 0:r.color)||t.event_color,l=ri(e._entityId,t,e),c=null==(a=e._matchedConfig)?void 0:a.label_icon_color,u=null==(i=e._matchedConfig)?void 0:i.label_type;return N`
${l?Oi(l,c,u):F}
${s?`✓ ${e.summary}`:e.summary}
${Ei(e,t,n)}
`}(e,t,g)}
${y}
${_?N`
${b}
${M?N`
${M}
`:f?N`
`:F}
`:h?N`
`:f?N`
`:F}
${v}
${c?N`
${c}
`:""}
${u?N`
${u}
`:""}
`}function Pi(e,t,n="absolute"){if(!e.today_indicator||!t)return F;const r=e.today_indicator,a=function(e){if(void 0===e||!1===e)return"none";if(!0===e)return"dot";if("string"==typeof e)return"pulse"===e||"glow"===e?e:Se(e)?"mdi":e.startsWith("/")||e.includes(".png")||e.includes(".jpg")||e.includes(".svg")||e.includes(".webp")||e.includes(".gif")?"image":/[\p{Emoji}]/u.test(e)?"emoji":"dot";return"none"}(r);if("none"===a)return F;const i="inline"===n?{}:function(e){const t={position:"absolute",transform:"translate(-50%, -50%)"},n=e.trim().split(/\s+/);return n.length>=1&&(t.left=n[0]),n.length>=2?t.top=n[1]:t.top="50%",t}(e.today_indicator_position);return N`
${function(e,t,n){let r="";switch(e){case"dot":case"pulse":case"glow":r="mdi:circle";break;case"mdi":r="string"==typeof t?t:"mdi:circle";break;case"image":return"string"==typeof t?N`

`:F;case"emoji":return"string"==typeof t?N`
${t}
`:F;default:return F}if(r)return N`
`;return F}(a,r,i)}
`}function Ii(e,t,n,r){var a;const i=Boolean(e._isEmptyDay),o=new Date,s=new Date(o.getFullYear(),o.getMonth(),o.getDate());let d=!1;if(!i){if(!e.start.dateTime){let t=e.end.date?va(e.end.date):null;if(t){const e=new Date(t);e.setDate(e.getDate()-1),t=e}d=null!==t&&s>t}else{const t=e.end.dateTime?new Date(e.end.dateTime):null;d=null!==t&&o>t}}const l=ni(e._entityId,t,void 0,e),c=t.event_background_opacity>0?t.event_background_opacity:0,u=c>0?ni(e._entityId,t,c,e):"",_=null!=(a=ai(e._entityId,"show_time",t,e))?a:t.show_time,h=!e.start.dateTime,m=function(e){if(e.start.dateTime)return!1;const t=va(e.start.date||""),n=va(e.end.date||"");return n.setDate(n.getDate()-1),t.toDateString()!==n.toDateString()}(e),p=_&&!(h&&!m&&!t.show_single_allday_time)&&!i;let f=null;!t.show_countdown||h&&!t.show_countdown_allday||i||d||(f=function(e,t="en"){if(e._isEmptyDay||!e.start)return null;const n=new Date,r=!e.start.dateTime,a=e.start.dateTime?new Date(e.start.dateTime):e.start.date?va(e.start.date):null;if(!a||a<=n)return null;const i=r||Boolean(e._isMultiDaySegment),o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),s=new Date(a.getFullYear(),a.getMonth(),a.getDate());return i&&s>o?ha(s,t,o):ha(a,t)}(e,n));const y=ii(e)&&t.show_progress_bar?function(e){if(!ii(e))return null;const t=new Date,n=new Date(e.start.dateTime),r=new Date(e.end.dateTime).getTime()-n.getTime(),a=t.getTime()-n.getTime();return Math.min(100,Math.max(0,Math.floor(a/r*100)))}(e):null;return{isEmptyDay:i,isPastEvent:d,entityAccentColor:l,entityAccentBackgroundColor:u,contentParts:{eventTime:ma(e,t,n,r),eventLocation:e.location||"",eventDescription:e.description||"",shouldShowTime:p,countdownStr:f,progressPercentage:y}}}var Ni=Object.defineProperty,Wi=Object.getOwnPropertySymbols,Fi=Object.prototype.hasOwnProperty,Ui=Object.prototype.propertyIsEnumerable,Ji=(e,t,n)=>t in e?Ni(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function Ri(e,t){return e.isNewMonth&&!It(t.month_separator_width)?{kind:"month",width:t.month_separator_width,color:t.month_separator_color}:e.isNewWeek&&!It(t.week_separator_width)?{kind:"week",width:t.week_separator_width,color:t.week_separator_color}:It(t.day_separator_width)?null:{kind:"day",width:t.day_separator_width,color:t.day_separator_color}}function Vi(e,t,n,r,a,i){const o=new Date(e.timestamp),{isToday:s,isTomorrow:d}=Ti(e.timestamp),l=xi(o),c=Li(o,t,a),u=Pt(t,"day_header_separator_width"),_=Pt(t,"day_header_separator_color"),h=It(u)?F:N``,m=Pi(t,s,"inline"),p=m!==F;return N`
${h}
${fn(e.events,((e,t)=>`${e._entityId}-${e.summary}-${t}`),((r,o)=>function(e,t,n,r,a,i,o){const s=Ii(e,r,a,o),d=0===n,l=n===t.events.length-1,c={event:!0,"event-first":d,"event-middle":!d&&!l,"event-last":l,"past-event":s.isPastEvent};return N`
${Ci(e,r,s.contentParts,{weatherForecasts:i,weatherPlacement:"row",progressPlacement:"row",countdownPlacement:"text",hass:o})}
`}(r,e,o,t,n,a,i)))}
`}function Bi(e,t,n){return N`
{for(var n in t||(t={}))Fi.call(t,n)&&Ji(e,n,t[n]);if(Wi)for(var n of Wi(t))Ui.call(t,n)&&Ji(e,n,t[n]);return e})({gridColumn:String(n+1),gridRow:"1"},t?{}:{visibility:"hidden"}))}
>
${null!=e?e:""}
`}function Ki(e,t,n,r,a){const i=Pt(t,"day_header_gap"),o=Bt(t.day_spacing),s=function(e){return e.map(((t,n)=>{const r=n>0?e[n-1]:void 0;return{isNewWeek:!r||t.weekNumber!==r.weekNumber,isNewMonth:Boolean(r&&t.monthNumber!==r.monthNumber)}}))}(e),d=function(e,t,n){const r=t.map(((e,t)=>e.isNewWeek&&!(0===t&&!n.show_current_week_number)));return null!==n.show_week_numbers&&r.some(Boolean)?e.map(((e,t)=>Bi(e.weekNumber,r[t],t))):e.map((()=>F))}(e,s,t),l=s.map(((e,n)=>({separator:Ri(e,t),index:n}))).filter((({separator:e,index:t})=>null!==e&&t>0)).map((({separator:e,index:t})=>function(e,t,n){return N`
`}(e,t,o)));return N`
${d}
${e.map(((e,i)=>Vi(e,t,n,i,r,a)))}
${l}
`}function qi(e,t){const n=Fn(t);return"loading"===e?N`
`:N`
`}function Gi(e,t,n,r="day"){if("day"===r)return{borderTopWidth:e,borderTopColor:t,borderTopStyle:"solid",marginTop:"0px",marginBottom:n.day_spacing};let a=Me.WEEK;"month"===r&&(a=Me.MONTH);const i=Nt(n.day_spacing,a);return{borderTopWidth:e,borderTopColor:t,borderTopStyle:"solid",marginTop:i,marginBottom:i}}function Zi(e,t,n,r,a=!1,i="day"){if(It(e)||a)return F;const o=Gi(e,t,r,i);return N``}function Qi(e){return Zi(e.month_separator_width,e.month_separator_color,"month-separator",e,!1,"month")}function Xi(e,t=!1){return Zi(e.week_separator_width,e.week_separator_color,"week-separator",e,t,"week")}function eo(e,t,n,r,a,i,o){const{isToday:s,isTomorrow:d}=Ti(e.timestamp),l=xi(new Date(e.timestamp));let c=F;const u=(null==a?void 0:a.isNewMonth)||!1,_=(null==a?void 0:a.isNewWeek)||!1,h=u&&!It(t.month_separator_width),m=_&&(null!==t.show_week_numbers||!It(t.week_separator_width)),p=t.day_separator_width,f=t.day_separator_color;if(r&&!It(p)&&!h&&!m){const e=Gi(p,f,t,"day");c=N``}return N`
${c}
${fn(e.events,((e,t)=>`${e._entityId}-${e.summary}-${t}`),((r,a)=>function(e,t,n,r,a,i,o,s){const d=Ii(e,r,a,s),l=new Date(t.timestamp),c=xi(l),u=0===n,_=n===t.events.length-1,h={event:!0,"event-first":u,"event-middle":!u&&!_,"event-last":_,"past-event":d.isPastEvent};return N`
${0===n?N`
|
${function(e,t,n,r,a){return ji(e,t,n,r,Li(e,t,a))}(l,r,a,i,o)}
${Pi(r,i)}
|
`:""}
${Ci(e,r,d.contentParts,{weatherForecasts:o})}
|
`}(r,e,a,t,n,s,i,o)))}
`}function to(e,t,n,r,a){return N`
${e.map(((i,o)=>{var s;const d=o>0?e[o-1]:void 0,l=null!=(s=i.weekNumber)?s:null;let c=!1;if(d){c=i.weekNumber!==d.weekNumber}else c=!0;const u=d&&i.monthNumber!==d.monthNumber,_=0===o,h={isNewWeek:c,isNewMonth:Boolean(u)};let m=F;return!u||It(t.month_separator_width)||c&&null!==t.show_week_numbers?c&&(m=_&&null!==t.show_week_numbers&&!t.show_current_week_number?u?Qi(t):Xi(t,_):null!==t.show_week_numbers?function(e,t,n,r=!1){if(null===e)return F;const a=t?Me.MONTH:Me.WEEK,i={marginTop:r?"0px":Nt(n.day_spacing,a/2-1),marginBottom:Nt(n.day_spacing,a/2)},o={};return r?o["--separator-display"]="none":t&&!It(n.month_separator_width)?(o["--separator-border-width"]=n.month_separator_width,o["--separator-border-color"]=n.month_separator_color,o["--separator-display"]="block"):It(n.week_separator_width)?o["--separator-display"]="none":(o["--separator-border-width"]=n.week_separator_width,o["--separator-border-color"]=n.week_separator_color,o["--separator-display"]="block"),N`
`}(l,Boolean(u),t,_):Xi(t,_)):m=Qi(t),N`
${m}
${eo(i,t,n,d,h,r,a)}
`}))}
`}const no=((e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[r+1]),e[0]);return new a(r,e,n)})`
:host {
display: block;
height: 100%;
}
ha-card {
display: flex;
flex-direction: column;
height: 100%;
position: relative;
overflow: hidden;
box-sizing: border-box;
padding: calc(var(--calendar-card-spacing-additional) + 16px) 16px
calc(var(--calendar-card-spacing-additional) + 16px) 8px;
background: var(--calendar-card-background-color, var(--card-background-color));
cursor: pointer;
}
ha-card:focus {
outline: none;
}
ha-card:focus-visible {
outline: 2px solid var(--calendar-card-line-color-vertical);
}
.header-container,
.content-container {
width: 100%;
}
.content-container {
max-height: var(--calendar-card-max-height, none);
height: var(--calendar-card-height, auto);
overflow-x: hidden;
overflow-y: auto;
padding-bottom: 1px;
hyphens: auto;
scrollbar-width: none;
-ms-overflow-style: none;
}
.content-container:hover {
scrollbar-width: thin;
scrollbar-color: var(--secondary-text-color) transparent;
-ms-overflow-style: auto;
}
.card-header-placeholder {
height: 0;
}
.card-header {
float: left;
margin: 0 0 16px 8px;
padding: 0;
color: var(--calendar-card-color-title, var(--primary-text-color));
font-size: var(--calendar-card-font-size-title, var(--ha-card-header-font-size, 24px));
font-weight: var(--ha-font-weight-normal, 400);
letter-spacing: -0.012em;
line-height: 1.33;
}
.week-row-table {
height: calc(var(--calendar-card-week-number-font-size) * 1.5);
width: 100%;
table-layout: fixed;
padding-left: 8px;
border-spacing: 0;
border: none !important;
}
.week-number-cell,
.separator-cell {
height: 100%;
}
.week-number-cell {
width: var(--calendar-card-date-column-width);
position: relative;
text-align: center;
vertical-align: middle;
padding-right: 12px;
}
.week-number {
width: calc(var(--calendar-card-week-number-font-size) * 2.5);
height: calc(var(--calendar-card-week-number-font-size) * 1.5);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: var(--calendar-card-week-number-font-size);
font-weight: 500;
color: var(--calendar-card-week-number-color);
background-color: var(--calendar-card-week-number-bg-color);
border-radius: 999px;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
@supports (-webkit-touch-callout: none) {
.week-number {
padding-top: calc(var(--calendar-card-week-number-font-size) * 0.1);
}
}
.separator-cell {
vertical-align: middle;
}
.separator-line {
width: 100%;
height: var(--separator-border-width, 0);
background-color: var(--separator-border-color, transparent);
display: var(--separator-display, none);
}
.separator {
width: 100%;
margin-left: 8px;
}
.week-separator {
width: 100%;
margin-left: 8px;
border-top-style: solid;
}
.month-separator {
width: 100%;
margin-left: 8px;
border-top-style: solid;
}
table {
width: 100%;
table-layout: fixed;
border-spacing: 0;
border-collapse: separate;
margin-bottom: var(--calendar-card-day-spacing);
}
.day-table {
border: none !important;
}
table:last-of-type {
margin-bottom: 0;
border-bottom: 0;
}
.date-column {
width: var(--calendar-card-date-column-width);
min-width: var(--calendar-card-date-column-width);
max-width: var(--calendar-card-date-column-width);
vertical-align: var(--calendar-card-date-column-vertical-alignment);
text-align: center;
position: relative;
padding-left: 8px;
padding-right: 12px;
}
.today-indicator-container:not(.inline) {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 1;
}
.weekday {
font-size: var(--calendar-card-font-size-weekday);
line-height: var(--calendar-card-font-size-weekday);
color: var(--calendar-card-color-weekday);
}
.day {
font-size: var(--calendar-card-font-size-day);
line-height: var(--calendar-card-font-size-day);
font-weight: 500;
color: var(--calendar-card-color-day);
}
.month {
font-size: var(--calendar-card-font-size-month);
line-height: var(--calendar-card-font-size-month);
text-transform: uppercase;
color: var(--calendar-card-color-month);
}
.today-indicator-container {
color: var(--calendar-card-today-indicator-color);
pointer-events: none;
z-index: 1;
}
.today-indicator-container.inline {
display: flex;
align-items: center;
justify-content: flex-start;
}
ha-icon.today-indicator {
--mdc-icon-size: var(--calendar-card-today-indicator-size);
}
img.today-indicator.image {
width: var(--calendar-card-today-indicator-size);
height: auto;
max-height: var(--calendar-card-today-indicator-size);
object-fit: contain;
}
span.today-indicator.emoji {
font-size: var(--calendar-card-today-indicator-size);
line-height: 1;
}
ha-icon.today-indicator.pulse {
animation: pulse-animation 2s infinite ease-in-out;
}
ha-icon.today-indicator.glow {
filter: drop-shadow(
0 0 calc(var(--calendar-card-today-indicator-size) * 0.5)
var(--calendar-card-today-indicator-color)
);
}
@keyframes pulse-animation {
0% {
transform: scale(0.95);
opacity: 0.7;
}
50% {
transform: scale(1.1);
opacity: 1;
}
100% {
transform: scale(0.95);
opacity: 0.7;
}
}
.date-column .weather,
.column-date-content .weather {
font-size: var(--calendar-card-weather-date-font-size, 12px);
color: var(--calendar-card-weather-date-color, var(--primary-text-color));
}
.date-column .weather {
display: flex;
align-items: center;
justify-content: center;
}
.weather ha-icon {
margin-right: 1px;
}
.date-column .weather ha-icon,
.column-date-content .weather ha-icon {
--mdc-icon-size: var(--calendar-card-weather-date-icon-size, 14px);
}
.weather-temp-high,
.weather-temp-low {
line-height: 1;
vertical-align: middle;
}
.weather-temp-high {
font-weight: 500;
}
.weather-temp-low {
opacity: 0.8;
}
.weather .weather-uv-index {
line-height: 1;
vertical-align: middle;
font-weight: 500;
margin-left: 2px;
}
.event-weather .weather-uv-index {
font-weight: 500;
margin-left: 2px;
}
.event {
padding: var(--calendar-card-event-spacing) 0 var(--calendar-card-event-spacing) 12px;
border-radius: 0;
}
.event-first.event-last {
border-start-start-radius: 0;
border-start-end-radius: var(--calendar-card-event-border-radius);
border-end-end-radius: var(--calendar-card-event-border-radius);
border-end-start-radius: 0;
}
.event-first {
border-start-end-radius: var(--calendar-card-event-border-radius);
border-start-start-radius: 0;
}
.event-last {
border-end-end-radius: var(--calendar-card-event-border-radius);
border-end-start-radius: 0;
}
.past-event .event-content {
opacity: 0.6;
}
.event-content {
display: flex;
flex-direction: column;
}
.summary-row {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.summary {
flex: 1;
margin-right: 12px;
overflow: hidden;
overflow-wrap: break-word;
font-size: var(--calendar-card-font-size-event);
line-height: 1.2;
padding-block: 0.2em;
}
.event-title {
font-size: var(--calendar-card-font-size-event);
font-weight: 500;
line-height: 1.2;
color: var(--calendar-card-color-event);
padding-bottom: 2px;
text-indent: 0;
display: var(--calendar-card-title-display);
-webkit-box-orient: vertical;
-webkit-line-clamp: var(--calendar-card-title-max-lines);
overflow: hidden;
}
.summary:has(> .label-icon),
.summary:has(> .label-image) {
text-indent: calc(-1 * (var(--calendar-card-font-size-event) + 4px));
padding-inline-start: calc(var(--calendar-card-font-size-event) + 4px);
}
.summary:has(> .label-emoji) {
text-indent: calc(-1 * (var(--calendar-card-font-size-event) * 1.25 + 4px));
padding-inline-start: calc(var(--calendar-card-font-size-event) * 1.25 + 4px);
}
.calendar-label {
display: inline;
margin-right: 4px;
}
.label-icon {
--mdc-icon-size: var(--calendar-card-font-size-event);
vertical-align: middle;
margin-right: 4px;
}
.label-image {
height: var(--calendar-card-font-size-event);
width: auto;
vertical-align: middle;
margin-right: 4px;
}
.event-weather {
display: flex;
align-items: center;
font-weight: 500;
margin-left: 8px;
margin-right: 12px;
}
.event-weather ha-icon {
margin-right: 2px;
--mdc-icon-size: var(--calendar-card-weather-event-icon-size, 14px);
color: var(--calendar-card-weather-event-color, var(--secondary-text-color));
}
.event-weather .event-weather-text {
color: var(--calendar-card-weather-event-color, var(--secondary-text-color));
font-size: var(--calendar-card-weather-event-font-size, 12px);
}
.time-location {
display: flex;
flex-direction: column;
margin-top: 0;
}
.time,
.location,
.description {
display: flex;
align-items: var(--calendar-card-event-icon-vertical-alignment);
line-height: 1.2;
margin-top: 2px;
margin-right: 12px;
}
.time span,
.location span,
.description span {
display: inline-block;
vertical-align: middle;
overflow-wrap: break-word;
}
.time {
font-size: var(--calendar-card-font-size-time);
color: var(--calendar-card-color-time);
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
flex-wrap: wrap;
row-gap: 2px;
column-gap: 8px;
}
.time-actual {
display: flex;
align-items: var(--calendar-card-event-icon-vertical-alignment);
}
.time .time-actual .time-text {
min-width: 0;
flex: 1 1 auto;
}
.time .time-actual .time-text > span {
display: var(--calendar-card-time-display);
vertical-align: baseline;
-webkit-box-orient: vertical;
-webkit-line-clamp: var(--calendar-card-time-max-lines);
overflow: hidden;
}
.time .time-actual .time-text > .time-countdown {
display: inline;
-webkit-line-clamp: none;
overflow: visible;
margin-inline-start: 4px;
margin-inline-end: 0;
white-space: normal;
}
.time .time-actual .time-text > .time-countdown::before {
content: '\\2060·\\200B';
margin-inline-end: 4px;
}
.time-countdown {
text-align: right;
color: var(--calendar-card-color-time);
font-size: var(--calendar-card-font-size-time);
margin-inline-start: auto;
margin-inline-end: 12px;
white-space: nowrap;
}
.location {
font-size: var(--calendar-card-font-size-location);
color: var(--calendar-card-color-location);
}
.description {
font-size: var(--calendar-card-font-size-description);
color: var(--calendar-card-color-description);
}
.time-location .event-weather {
display: flex;
flex-wrap: nowrap;
row-gap: 2px;
align-items: var(--calendar-card-event-icon-vertical-alignment);
font-size: var(--calendar-card-weather-event-font-size, 12px);
line-height: 1.2;
font-weight: normal;
margin-top: 2px;
margin-inline-start: 0;
margin-inline-end: 12px;
padding-inline-start: calc(var(--calendar-card-weather-event-icon-size, 14px) + 4px);
}
.time-location .event-weather ha-icon {
margin-inline-end: 4px;
margin-inline-start: calc(-1 * (var(--calendar-card-weather-event-icon-size, 14px) + 4px));
color: var(--calendar-card-weather-event-color, var(--secondary-text-color));
}
.time-location .event-weather .event-weather-text {
min-width: 0;
flex: 1 1 auto;
color: var(--calendar-card-weather-event-color, var(--secondary-text-color));
overflow-wrap: break-word;
}
.time-location .event-weather .weather-condition {
display: var(--calendar-card-weather-event-condition-display);
-webkit-box-orient: vertical;
-webkit-line-clamp: var(--calendar-card-weather-event-max-lines);
overflow: hidden;
hyphens: manual;
}
.time-location .event-weather .event-weather-text > span + span::before {
content: '\\2060·\\200B';
margin-inline-start: 4px;
margin-inline-end: 4px;
}
.time-location .event-weather .weather-uv-index {
margin-inline-start: 0;
font-weight: normal;
}
.description span {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: var(--calendar-card-description-max-lines);
overflow: hidden;
}
.time .time-actual > span:not(.time-text) {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: var(--calendar-card-time-max-lines);
overflow: hidden;
}
.location span {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: var(--calendar-card-location-max-lines);
overflow: hidden;
}
.progress-bar {
width: var(--calendar-card-progress-bar-width, 60px);
height: var(--calendar-card-progress-bar-height);
background-color: color-mix(in srgb, var(--calendar-card-progress-bar-color) 20%, transparent);
border-radius: 999px;
overflow: hidden;
margin-inline-start: auto;
margin-inline-end: 12px;
}
.progress-bar-row {
width: var(--calendar-card-progress-bar-width, 80%);
margin-inline-start: 0;
margin-top: 2px;
}
.progress-bar-filled {
height: 100%;
background-color: var(--calendar-card-progress-bar-color);
border-radius: 999px 0 0 999px;
}
ha-icon {
display: inline-flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
position: relative;
vertical-align: top;
top: 0;
margin-right: 4px;
}
.time ha-icon {
--mdc-icon-size: var(--calendar-card-icon-size-time, 14px);
}
.location ha-icon {
--mdc-icon-size: var(--calendar-card-icon-size-location, 14px);
}
.description ha-icon {
--mdc-icon-size: var(--calendar-card-icon-size-description, 14px);
}
.loading,
.error {
text-align: center;
padding: 16px;
}
.error {
color: var(--error-color);
}
.loading-indicator {
position: absolute;
top: calc(var(--ha-card-border-radius, 12px) * 0.5 + 2px);
right: calc(var(--ha-card-border-radius, 12px) * 0.5 + 2px);
width: 16px;
height: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
z-index: 5;
pointer-events: none;
}
.loading-indicator .spinner {
box-sizing: border-box;
width: 14px;
height: 14px;
border: 2px solid color-mix(in srgb, var(--primary-text-color) 25%, transparent);
border-top-color: var(--primary-text-color);
border-radius: 50%;
animation: ccp-spin 0.8s linear infinite;
}
@keyframes ccp-spin {
to {
transform: rotate(360deg);
}
}
.calendar-card-pro.column-view {
padding-inline: 16px;
}
.calendar-card-pro.column-view .card-header {
margin-inline-start: 0;
}
.column-grid {
display: grid;
grid-template-rows: auto auto;
align-items: start;
width: 100%;
}
.day-column {
display: flex;
flex-direction: column;
min-width: 0;
}
.column-day-header {
position: relative;
padding-bottom: var(--calendar-card-column-header-gap, 8px);
}
.column-date-content {
display: grid;
grid-template-columns: auto auto 1fr;
grid-template-areas:
'weekday weekday .'
'day month weather';
align-items: baseline;
column-gap: 6px;
row-gap: 2px;
position: relative;
z-index: 2;
min-width: 0;
}
.column-date-content .weekday {
grid-area: weekday;
}
.column-date-content .day {
grid-area: day;
}
.column-date-content .month {
grid-area: month;
}
.column-date-content .today-indicator-container.inline {
grid-area: weekday;
justify-self: start;
align-self: center;
z-index: 3;
}
.column-date-content.with-today-indicator .weekday {
padding-inline-start: calc(var(--calendar-card-today-indicator-size, 6px) + 4px);
}
.column-date-content .weather {
grid-area: weather;
justify-self: start;
align-self: baseline;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.column-header-separator {
margin-bottom: var(--calendar-card-column-header-gap, 8px);
}
.column-grid > .column-week-number {
justify-self: start;
margin-bottom: 2px;
}
.column-events {
display: flex;
flex-direction: column;
min-width: 0;
}
.column-events .time-countdown,
.column-events .progress-bar {
margin-inline-end: 0;
}
.column-events .time {
justify-content: flex-start;
box-sizing: border-box;
column-gap: 4px;
padding-inline-start: calc(var(--calendar-card-icon-size-time, 14px) + 4px);
}
.column-events .time-actual {
margin-inline-start: calc(-1 * (var(--calendar-card-icon-size-time, 14px) + 4px));
}
.column-events .time-countdown {
margin-inline-start: 0;
text-align: start;
white-space: normal;
}
.column-events .time-countdown::before {
content: '·';
margin-inline-end: 4px;
}
.column-separator {
align-self: stretch;
justify-self: start;
pointer-events: none;
}
`;var ro=Object.defineProperty,ao=Object.getOwnPropertySymbols,io=Object.prototype.hasOwnProperty,oo=Object.prototype.propertyIsEnumerable,so=(e,t,n)=>t in e?ro(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let lo=!0;function co(e){return"string"==typeof e&&(e.includes("{{")||e.includes("{%"))}async function uo(e,t,n){const r=null==e?void 0:e.connection;if(!r||!t)return;const a=e=>{if(e&&"error"in e)return"WARNING"===e.level?void et("Template warning",{template:t,error:e.error}):(Ge("Template render error",{template:t,error:e.error}),void n.onError(e.error));var r;e&&"result"in e&&n.onResult(null==(r=e.result)?"":"string"==typeof r?r:String(r))},i=e=>r.subscribeMessage(a,((e,t)=>{for(var n in t||(t={}))io.call(t,n)&&so(e,n,t[n]);if(ao)for(var n of ao(t))oo.call(t,n)&&so(e,n,t[n]);return e})({type:"render_template",template:t},e?{report_errors:!0}:{}));try{return await i(lo)}catch(e){if(lo&&function(e){return"invalid_format"===(null==e?void 0:e.code)}(e)){lo=!1,Ze("Home Assistant rejected the render_template `report_errors` option; falling back to basic template rendering (requires 2023.9+ for error reporting)");try{return await i(!1)}catch(e){return void Ge("Failed to subscribe to template",{template:t,error:e})}}const r=null==e?void 0:e.message;return Ge("Failed to subscribe to template",{template:t,error:e}),void n.onError(null!=r?r:String(e))}}class _o{constructor(e){this.callbacks=e,this._hasConnected=!1,this._version=0}update(e,t){const n=co(t)?t:void 0,r=null==e?void 0:e.connection,a=!this._hasConnected&&Boolean(r);r&&(this._hasConnected=!0),n===this._template&&r===this._connection||(this._template=n,this._connection=r,this._version++,this._clearPending(),this._teardown(),n&&e&&(a?this._subscribe(e,n,this._version):this._debounceId=setTimeout((()=>{this._debounceId=void 0,this._subscribe(e,n,this._version)}),300)))}destroy(){this._version++,this._template=void 0,this._connection=void 0,this._hasConnected=!1,this._clearPending(),this._teardown()}async _subscribe(e,t,n){const r=await uo(e,t,{onResult:e=>{n===this._version&&this.callbacks.onResult(e)},onError:e=>{n===this._version&&this.callbacks.onError(e)}});r&&(n===this._version?this._unsubscribe=r:r())}_clearPending(){this._debounceId&&(clearTimeout(this._debounceId),this._debounceId=void 0)}_teardown(){if(this._unsubscribe){try{this._unsubscribe()}catch(e){Ze("Failed to unsubscribe from template",e)}this._unsubscribe=void 0}}}var ho=Object.defineProperty,mo=Object.defineProperties,po=Object.getOwnPropertyDescriptor,fo=Object.getOwnPropertyDescriptors,yo=Object.getOwnPropertySymbols,go=Object.prototype.hasOwnProperty,vo=Object.prototype.propertyIsEnumerable,wo=(e,t,n)=>t in e?ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mo=(e,t)=>{for(var n in t||(t={}))go.call(t,n)&&wo(e,n,t[n]);if(yo)for(var n of yo(t))vo.call(t,n)&&wo(e,n,t[n]);return e},bo=(e,t)=>mo(e,fo(t)),ko=(e,t,n,r)=>{for(var a,i=r>1?void 0:r?po(t,n):t,o=e.length-1;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&ho(t,n,i),i};function Do(e,t){const n=e,r=null==n?void 0:n.CalendarCardProEditor;if("function"!=typeof r)throw new Error("Calendar Card Pro: the editor file was found but is not the card’s editor. This usually means another file of the same name is installed alongside it — put the card’s files in a folder of their own, or reinstall through HACS, which does that for you. The card itself is unaffected.");const a=null==n?void 0:n.EDITOR_VERSION;a!==le&&Ze(`Editor file is v${null!=a?a:"unknown"} but the card is v${le}. Both files come from the same release, so one of them is stale — hard-refresh the browser, and if that does not help, reinstall so the card and editor files are replaced together.`),customElements.get(t)||customElements.define(t,r)}let Yo=class extends ae{constructor(){super(),this.config=Mo({},_t),this.events=[],this.isInitialLoad=!0,this.isLoading=!1,this.isExpanded=!1,this.weatherForecasts={daily:{},hourly:{}},this.preview=!1,this.editMode=!1,this.connectedWhileHidden=!0,this._instanceId=Te(),this._eventsInstanceId="",this._eventRequestGeneration=0,this._language="",this._lastUpdateTime=0,this._weatherUnsubscribers=[],this._weatherSetupVersion=0,this._weatherSetupPending=!1,this._hasFetchError=!1,this._activePointerId=null,this._holdTriggered=!1,this._holdTimer=null,this._holdIndicator=null,this._measuredWidthPx=null,this._effectiveView="list",this._columnCount=0,this._resizeObserver=null,this._widthSettleTimerId=null,this._handleVisibilityChange=()=>{if("visible"===document.visibilityState){Date.now()-this._lastUpdateTime>ve&&(et("Visibility changed to visible, updating events"),this.updateEvents())}},this._instanceId=Te(),qe(le)}static async getConfigElement(){if(!customElements.get("calendar-card-pro-editor"))try{Do(await import(function(e){const t=new URL("./editor.js",e);return t.search=new URL(e).search,t.href}(import.meta.url)),"calendar-card-pro-editor")}catch(e){const t=e instanceof Error?e.message:String(e);throw Ge(e,"loading the editor file"),new Error(`Calendar Card Pro: the editor could not be loaded because one of the card’s files is missing. Reinstalling the card in HACS restores it. The card itself is unaffected. (${t})`)}return document.createElement("calendar-card-pro-editor")}getGridOptions(){return{columns:"full",rows:"auto"}}get safeHass(){return this.hass||null}get effectiveLanguage(){return!this._language&&this.hass&&(this._language=Wn(this.config.language,this.hass.locale)),this._language||"en"}get groupedEvents(){var e;return qa(this.events,this.effectiveConfig,this.isExpanded,this.effectiveLanguage,this.effectiveView,null==(e=this.hass)?void 0:e.locale)}get requestedView(){return this.config.view}get effectiveView(){return this.preview||this.editMode?this.requestedView:this._effectiveView}get effectiveConfig(){const e=this.effectiveView,t=this._effectiveConfigCache;if(t&&t.config===this.config&&t.view===e)return t.resolved;const n=Rt(this.config,e);return this._effectiveConfigCache={config:this.config,view:e,resolved:n},n}get effectiveTitle(){var e;return co(this.config.title)?null!=(e=this.renderedTitle)?e:"":this.config.title}get isTitlePending(){return co(this.config.title)&&void 0===this.renderedTitle}get visibleEventCount(){var e,t;const n=this.effectiveLanguage,r=this.effectiveView,a=$a(this.config.first_day_of_week,null==(e=this.hass)?void 0:e.locale),i=this._visibleCountCache;if(i&&i.events===this.events&&i.config===this.config&&i.view===r&&i.language===n&&i.firstWeekday===a)return i.count;const o=this.events.length?qa(this.events,this.effectiveConfig,!0,n,r,null==(t=this.hass)?void 0:t.locale).reduce(((e,t)=>e+t.events.filter((e=>!e._isEmptyDay)).length),0):0;return this._visibleCountCache={events:this.events,config:this.config,view:r,language:n,firstWeekday:a,count:o},o}static get styles(){return no}connectedCallback(){super.connectedCallback(),et("Component connected"),this.startRefreshTimer(),this.updateEvents(),this._scheduleWeatherSetup(),this._updateTitleSubscription(),document.addEventListener("visibilitychange",this._handleVisibilityChange),this._startWidthObserver()}disconnectedCallback(){var e;super.disconnectedCallback(),this._stopWidthObserver(),this._weatherSetupVersion++,this._weatherSetupPending=!1,this._cleanupWeatherSubscriptions(),null==(e=this._titleSubscription)||e.destroy(),this._titleSubscription=void 0,this._refreshTimerId&&clearTimeout(this._refreshTimerId),this._initialLoadRetryId&&(clearTimeout(this._initialLoadRetryId),this._initialLoadRetryId=void 0),this._holdTimer&&(clearTimeout(this._holdTimer),this._holdTimer=null),this._holdIndicator&&(tn(this._holdIndicator),this._holdIndicator=null),document.removeEventListener("visibilitychange",this._handleVisibilityChange),et("Component disconnected")}_startWidthObserver(){this._resizeObserver||"undefined"==typeof ResizeObserver||(this._resizeObserver=new ResizeObserver((e=>{var t,n;const r=null==(n=null==(t=e[0])?void 0:t.contentRect)?void 0:n.width;"number"==typeof r&&r>0&&this._scheduleWidthMeasurement(r)})),this._resizeObserver.observe(this))}_scheduleWidthMeasurement(e){null!==this._widthSettleTimerId&&clearTimeout(this._widthSettleTimerId),this._widthSettleTimerId=window.setTimeout((()=>{this._widthSettleTimerId=null,this._handleWidthMeasured(e)}),we)}_stopWidthObserver(){var e;null==(e=this._resizeObserver)||e.disconnect(),this._resizeObserver=null,null!==this._widthSettleTimerId&&(clearTimeout(this._widthSettleTimerId),this._widthSettleTimerId=null)}_handleWidthMeasured(e){const t=(n=this.requestedView,r=this.config,a=this._measuredWidthPx,i=e,o={view:this._effectiveView,columns:this._columnCount},Xt(n,r,i,null===a?null:o));var n,r,a,i,o;this._measuredWidthPx=e,t.view===this._effectiveView&&t.columns===this._columnCount||(et(`Layout changed from ${this._effectiveView}/${this._columnCount} to ${t.view}/${t.columns} at ${Math.round(e)}px`),this._effectiveView=t.view,this._columnCount=t.columns,this.requestUpdate())}updated(e){var t,n,r,a,i,o,s,d,l,c,u;e.has("hass")&&this.hass&&!e.get("hass")&&this.updateEvents(!0),(e.has("hass")&&(null==(t=this.hass)?void 0:t.locale)||e.has("config")&&(null==(n=e.get("config"))?void 0:n.language)!==this.config.language)&&(this._language=Wn(this.config.language,null==(r=this.hass)?void 0:r.locale));const _=e.has("hass")&&this.hass&&!e.get("hass"),h=e.get("config"),m=e.has("config")&&(null==(i=null==(a=this.config)?void 0:a.weather)?void 0:i.entity)!==(null==(o=null==h?void 0:h.weather)?void 0:o.entity),p=m||e.has("config")&&(null==(d=null==(s=this.config)?void 0:s.weather)?void 0:d.position)!==(null==(l=null==h?void 0:h.weather)?void 0:l.position);m&&(this.weatherForecasts={daily:{},hourly:{}}),(_||p)&&this._scheduleWeatherSetup(),(null==(u=null==(c=this.config)?void 0:c.weather)?void 0:u.entity)&&wi(this.hass,this.config.language,(()=>this.requestUpdate())),(e.has("hass")||e.has("config"))&&this._updateTitleSubscription(),this._applyVisibility()}_updateTitleSubscription(){if(!co(this.config.title))return this._titleSubscription&&(this._titleSubscription.destroy(),this._titleSubscription=void 0),void(this.renderedTitle=void 0);this._titleSubscription||(this._titleSubscription=new _o({onResult:e=>{this.renderedTitle=e},onError:()=>{void 0===this.renderedTitle&&(this.renderedTitle="")}})),this._titleSubscription.update(this.hass,this.config.title)}_applyVisibility(){const e=!(this.isInitialLoad||this.safeHass&&0!==this.config.entities.length),t=!(!0!==this.config.hide_when_empty||this.preview||this.editMode||e||this._hasFetchError||0!==this.visibleEventCount);this.hidden!==t&&(et(`hide_when_empty: ${t?"hiding":"revealing"} card`),this.hidden=t,this.style.display=t?"none":"",this.dispatchEvent(new CustomEvent("card-visibility-changed",{detail:{value:!t},bubbles:!0,composed:!0})))}getCustomStyles(){return function(e){var t,n,r,a,i,o,s,d,l,c,u,_,h,m,p,f,y,g,v,w;const M={"--calendar-card-background-color":e.background_color,"--calendar-card-font-size-weekday":e.weekday_font_size,"--calendar-card-font-size-day":e.day_font_size,"--calendar-card-font-size-month":e.month_font_size,"--calendar-card-font-size-event":e.event_font_size,"--calendar-card-font-size-time":e.time_font_size,"--calendar-card-font-size-location":e.location_font_size,"--calendar-card-font-size-description":e.description_font_size,"--calendar-card-color-weekday":e.weekday_color,"--calendar-card-color-day":e.day_color,"--calendar-card-color-month":e.month_color,"--calendar-card-color-event":e.event_color,"--calendar-card-color-time":e.time_color,"--calendar-card-color-location":e.location_color,"--calendar-card-color-description":e.description_color,"--calendar-card-line-color-vertical":e.accent_color,"--calendar-card-line-width-vertical":e.vertical_line_width,"--calendar-card-day-spacing":e.day_spacing,"--calendar-card-event-spacing":e.event_spacing,"--calendar-card-spacing-additional":e.additional_card_spacing,"--calendar-card-height":e.height||"auto","--calendar-card-max-height":e.max_height,"--calendar-card-progress-bar-color":e.progress_bar_color,"--calendar-card-progress-bar-height":e.progress_bar_height,"--calendar-card-icon-size-time":e.time_icon_size||"14px","--calendar-card-icon-size-location":e.location_icon_size||"14px","--calendar-card-icon-size-description":e.description_icon_size||"14px","--calendar-card-description-max-lines":e.description_max_lines>0?String(e.description_max_lines):"none","--calendar-card-title-max-lines":e.title_max_lines>0?String(e.title_max_lines):"none","--calendar-card-time-max-lines":e.time_max_lines>0?String(e.time_max_lines):"none","--calendar-card-location-max-lines":e.location_max_lines>0?String(e.location_max_lines):"none","--calendar-card-title-display":e.title_max_lines>0?"-webkit-box":"inline","--calendar-card-time-display":e.time_max_lines>0?"-webkit-box":"inline","--calendar-card-date-column-width":Nt(e.day_font_size,1.75),"--calendar-card-date-column-vertical-alignment":e.date_vertical_alignment,"--calendar-card-event-icon-vertical-alignment":"top"===e.event_icon_vertical_alignment?"flex-start":"bottom"===e.event_icon_vertical_alignment?"flex-end":"center","--calendar-card-event-border-radius":"calc(var(--ha-card-border-radius, 10px) / 2)","--ha-ripple-hover-opacity":"0.04","--ha-ripple-hover-color":e.accent_color,"--ha-ripple-pressed-opacity":"0.12","--ha-ripple-pressed-color":e.accent_color,"--calendar-card-today-indicator-color":e.today_indicator_color,"--calendar-card-today-indicator-size":e.today_indicator_size,"--calendar-card-week-number-font-size":e.week_number_font_size,"--calendar-card-week-number-color":e.week_number_color,"--calendar-card-week-number-bg-color":e.week_number_background_color,"--calendar-card-empty-day-color":e.empty_day_color===_t.empty_day_color?"color-mix(in srgb, var(--primary-text-color) 60%, transparent)":e.empty_day_color,"--calendar-card-weather-date-icon-size":(null==(n=null==(t=e.weather)?void 0:t.date)?void 0:n.icon_size)||"14px","--calendar-card-weather-date-font-size":(null==(a=null==(r=e.weather)?void 0:r.date)?void 0:a.font_size)||"12px","--calendar-card-weather-date-color":(null==(o=null==(i=e.weather)?void 0:i.date)?void 0:o.color)||"var(--primary-text-color)","--calendar-card-weather-event-icon-size":(null==(d=null==(s=e.weather)?void 0:s.event)?void 0:d.icon_size)||"14px","--calendar-card-weather-event-font-size":(null==(c=null==(l=e.weather)?void 0:l.event)?void 0:c.font_size)||"12px","--calendar-card-weather-event-max-lines":(null!=(h=null==(_=null==(u=e.weather)?void 0:u.event)?void 0:_.max_lines)?h:0)>0?String(null==(p=null==(m=e.weather)?void 0:m.event)?void 0:p.max_lines):"none","--calendar-card-weather-event-condition-display":(null!=(g=null==(y=null==(f=e.weather)?void 0:f.event)?void 0:y.max_lines)?g:0)>0?"-webkit-box":"inline"};return e.progress_bar_width&&(M["--calendar-card-progress-bar-width"]=e.progress_bar_width),e.title_font_size&&(M["--calendar-card-font-size-title"]=e.title_font_size),e.title_color&&(M["--calendar-card-color-title"]=e.title_color),(null==(w=null==(v=e.weather)?void 0:v.event)?void 0:w.color)&&(M["--calendar-card-weather-event-color"]=e.weather.event.color),M}(this.effectiveConfig)}startRefreshTimer(){this._refreshTimerId&&clearTimeout(this._refreshTimerId);const e=this.config.refresh_interval||ce,t=60*e*1e3;this._refreshTimerId=window.setTimeout((()=>{this.updateEvents(),this.startRefreshTimer()}),t),et(`Scheduled next refresh in ${e} minutes`)}_scheduleWeatherSetup(){this._weatherSetupPending||(this._weatherSetupPending=!0,queueMicrotask((()=>{this._weatherSetupPending=!1,this.isConnected&&this._setupWeatherSubscriptions()})))}async _setupWeatherSubscriptions(){var e,t;const n=++this._weatherSetupVersion;if(this._cleanupWeatherSubscriptions(),!(null==(t=null==(e=this.config)?void 0:e.weather)?void 0:t.entity)||!this.hass)return;const r=function(e){if(!e||!e.entity)return[];const t=bi(e);return"none"===t?[]:"date"===t?["daily"]:["daily","hourly"]}(this.config.weather);for(const e of r){if(this._weatherSetupVersion!==n)return;const t=await Si(this.hass,this.config,e,(t=>{this.weatherForecasts=bo(Mo({},this.weatherForecasts),{[e]:t}),this.requestUpdate()}));if(this._weatherSetupVersion!==n)return void(t&&t());t&&this._weatherUnsubscribers.push(t)}}_cleanupWeatherSubscriptions(){const e=this._weatherUnsubscribers.length;e>0&&et(`Unsubscribing ${e} weather forecast subscription(s)`),this._weatherUnsubscribers.forEach((e=>{try{"function"==typeof e&&e()}catch(e){Ze("Failed to unsubscribe weather forecast",e)}})),this._weatherUnsubscribers=[]}_handlePointerDown(e){this._activePointerId=e.pointerId,this._holdTriggered=!1,this.config.hold_action&&"none"!==this.config.hold_action.action&&(this._holdTimer&&clearTimeout(this._holdTimer),this._holdTimer=window.setTimeout((()=>{this._activePointerId===e.pointerId&&(this._holdTriggered=!0,this._holdIndicator=function(e,t){const n=document.createElement("div");n.style.position="absolute",n.style.pointerEvents="none",n.style.borderRadius="50%",n.style.backgroundColor=t.accent_color,n.style.opacity=`${be}`,n.style.transform="translate(-50%, -50%) scale(0)",n.style.transition=`transform ${ye}ms ease-out`,n.style.left=e.pageX+"px",n.style.top=e.pageY+"px";const r="touch"===e.pointerType?ke.TOUCH_SIZE:ke.POINTER_SIZE;return n.style.width=`${r}px`,n.style.height=`${r}px`,document.body.appendChild(n),setTimeout((()=>{n.style.transform="translate(-50%, -50%) scale(1)"}),10),et("Created hold indicator"),n}(e,this.config))}),fe))}_handlePointerUp(e){e.pointerId===this._activePointerId&&(this._holdTimer&&(clearTimeout(this._holdTimer),this._holdTimer=null),this._holdTriggered&&this.config.hold_action?(et("Executing hold action"),en(this,this.config,"hold",(()=>this.toggleExpanded()))):!this._holdTriggered&&this.config.tap_action&&(et("Executing tap action"),en(this,this.config,"tap",(()=>this.toggleExpanded()))),this._activePointerId=null,this._holdTriggered=!1,this._holdIndicator&&(tn(this._holdIndicator),this._holdIndicator=null))}_handlePointerCancel(){this._holdTimer&&(clearTimeout(this._holdTimer),this._holdTimer=null),this._activePointerId=null,this._holdTriggered=!1,this._holdIndicator&&(tn(this._holdIndicator),this._holdIndicator=null)}_handleKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),en(this,this.config,"tap",(()=>this.toggleExpanded())))}setConfig(e){const t=this.config;for(const t of function(e){const t=e,n=[];for(const[e,r]of Object.entries(mt))e in t&&n.push(`"${e}" was removed in v3.0.0 and is being ignored — use "${r}"`);const r=t.entities;return Array.isArray(r)&&r.forEach(((e,t)=>{if("object"!=typeof e||null===e)return;const r=e;for(const[e,a]of Object.entries(pt))e in r&&n.push(`"${e}" on entities[${t}] was removed in v3.0.0 and is being ignored — use "${a}"`)})),n}(e))Qe(t);const n=ft(_t,e);var r;this.config=n,this.config.entities=(r=this.config.entities,Array.isArray(r)?r.map((e=>"string"==typeof e?{entity:e,color:void 0,accent_color:void 0,label_icon_color:void 0}:e&&"object"==typeof e&&e.entity?{entity:e.entity,label:e.label,label_type:Le(e.label_type)?e.label_type:void 0,color:e.color||void 0,accent_color:e.accent_color||void 0,label_icon_color:e.label_icon_color||void 0,show_time:e.show_time,show_location:e.show_location,show_description:e.show_description,compact_events_to_show:ht(e.compact_events_to_show,0),blocklist:e.blocklist,allowlist:e.allowlist,split_multiday_events:e.split_multiday_events}:null)).filter(Boolean):[]),function(e){var t,n,r;e.days_to_show=null!=(t=ht(e.days_to_show,1))?t:_t.days_to_show,e.refresh_interval=null!=(n=ht(e.refresh_interval,1))?n:_t.refresh_interval,e.event_background_opacity=null!=(r=ht(e.event_background_opacity,0))?r:_t.event_background_opacity,e.compact_days_to_show=ht(e.compact_days_to_show,1),e.compact_events_to_show=ht(e.compact_events_to_show,0)}(this.config),wt(this.config),function(e){const t=e.view;"list"!==t&&"column"!==t&&(Ze(`Ignoring "view: ${JSON.stringify(t)}": not a recognized view. Expected "list" or "column". Falling back to "list".`),e.view="list")}(this.config),Vt(this.config);const a=Xt(this.config.view,this.config,this._measuredWidthPx,null===this._measuredWidthPx?null:{view:this._effectiveView,columns:this._columnCount});this._effectiveView=a.view,this._columnCount=a.columns,this._instanceId=je(this.config.entities,this.config.days_to_show,this.config.start_date,this.config.first_day_of_week);const i=function(e,t){if(!e||0===Object.keys(e).length)return!0;const n=(e.entities||[]).map((e=>"string"==typeof e?e:e.entity)).sort().join(","),r=(t.entities||[]).map((e=>"string"==typeof e?e:e.entity)).sort().join(","),a=(null==e?void 0:e.refresh_interval)!==(null==t?void 0:t.refresh_interval),i=n!==r||e.days_to_show!==t.days_to_show||e.start_date!==t.start_date||e.first_day_of_week!==t.first_day_of_week;return(i||a)&&et("Configuration change requires data refresh"),i||a}(t,this.config);var o,s;i?(et("Configuration changed, refreshing data"),this.updateEvents(!0)):(o=t,s=this.config,o&&0!==Object.keys(o).length&&kt(o.entities)!==kt(s.entities)&&(et("Per-calendar configuration changed, reprocessing cached data"),this.updateEvents(!1))),this.startRefreshTimer()}async updateEvents(e=!1){et(`Updating events (force=${e})`);const t=++this._eventRequestGeneration,n=()=>t!==this._eventRequestGeneration;if(this.safeHass&&this._initialLoadRetryId&&(clearTimeout(this._initialLoadRetryId),this._initialLoadRetryId=void 0),!this.safeHass||!this.config.entities.length)return this.isLoading=!1,void(this.safeHass?this.isInitialLoad=!1:(this._initialLoadRetryId&&clearTimeout(this._initialLoadRetryId),this._initialLoadRetryId=window.setTimeout((()=>{this.updateEvents(!0)}),1500)));try{this.isLoading=!0,await this.updateComplete;const{events:t,failedEntities:r}=await Va(this.safeHass,this.config,this._instanceId,e);if(n())return void et("Discarding a superseded event response");if(this._hasFetchError=r.length>0,this._hasFetchError&&Ze(`Could not load calendar(s): ${r.join(", ")}`),this.isLoading=!1,this.isInitialLoad=!1,await this.updateComplete,n())return void et("Discarding a superseded event response");const a=this._eventsInstanceId===this._instanceId;this._hasFetchError&&0===t.length&&this.events.length>0&&a?Ze("Refresh failed and returned nothing — keeping previously loaded events"):(this.events=[...t],this._eventsInstanceId=this._instanceId),this._hasFetchError||(this._lastUpdateTime=Date.now(),Xe("Event update completed successfully"))}catch(e){if(n())return void et("Ignoring a failure from a superseded event request");Ge("Failed to update events:",e),this._hasFetchError=!0,this.isLoading=!1,this.isInitialLoad=!1}}hasCompactModeLimits(){var e;if(!Ut(this.effectiveView))return!1;const t=e=>"number"==typeof e&&Number.isFinite(e);return!(!t(this.config.compact_events_to_show)&&!t(this.config.compact_days_to_show))||(null!=(e=this.config.entities)?e:[]).some((e=>"object"==typeof e&&null!==e&&t(e.compact_events_to_show)))}toggleExpanded(){this.hasCompactModeLimits()&&(this.isExpanded=!this.isExpanded)}handleAction(e){const t=e===this.config.hold_action?"hold":"tap";en(this,this.config,t,(()=>this.toggleExpanded()))}render(){const e=this.getCustomStyles(),t={keyDown:e=>this._handleKeyDown(e),pointerDown:e=>this._handlePointerDown(e),pointerUp:e=>this._handlePointerUp(e),pointerCancel:()=>this._handlePointerCancel(),pointerLeave:()=>this._handlePointerCancel()};let n;const r=e=>"column"===this.effectiveView?Ki(this._columnCount>0&&this._columnCount""!==e)).join(" ");return N`
${a?N`
`:F}
${n}
`}(e,this.effectiveTitle,n,t,this.isLoading,this.isTitlePending,this.effectiveView)}};Yo.getStubConfig=$t,ko([de({attribute:!1})],Yo.prototype,"hass",2),ko([de({attribute:!1})],Yo.prototype,"config",2),ko([de({attribute:!1})],Yo.prototype,"events",2),ko([de({attribute:!1})],Yo.prototype,"isInitialLoad",2),ko([de({attribute:!1})],Yo.prototype,"isLoading",2),ko([de({attribute:!1})],Yo.prototype,"isExpanded",2),ko([de({attribute:!1})],Yo.prototype,"weatherForecasts",2),ko([de({attribute:!1})],Yo.prototype,"renderedTitle",2),ko([de({type:Boolean})],Yo.prototype,"preview",2),ko([de({type:Boolean})],Yo.prototype,"editMode",2),Yo=ko([(e=>(t,n)=>{void 0!==n?n.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)})("calendar-card-pro")],Yo);const $o=customElements.get("calendar-card-pro");$o&&($o.getStubConfig=$t),window.customCards=window.customCards||[],window.customCards.push({type:"calendar-card-pro",name:"Calendar Card Pro",preview:!0,description:"A calendar card that supports multiple calendars with individual styling.",documentationURL:"https://github.com/alexpfau/calendar-card-pro",getEntitySuggestion:function(e,t){if("string"!=typeof t||"calendar"!==t.split(".")[0])return null;if(!e||"object"!=typeof e)return null;const n=e.states;return n&&"object"==typeof n&&n[t]?[{config:ut(ct({},Yt([t])),{grid_options:ct({},Dt)})},{label:"Columns",config:ut(ct({},Yt([t])),{view:"column",grid_options:ct({},Dt)})}]:null}});export{Do as adoptEditorComponent};