Files
PORTAL_COD2/src/front/dist/assets/HomePage-e73e7f99.js
T

7 lines
92 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as U,r as f,aG as te,D as h,E as k,F as u,Z as m,a0 as O,$ as x,aE as X,G as c,S as P,J as ne,L as $,M,H as S,ae as b,ar as ke,K as se,p as je,ai as Ie,a2 as Pe,aH as Ye,aj as Fe,aI as Re,aJ as Be,ak as Ne,a5 as ze,a6 as Ue,a7 as Ee,a9 as Ge,al as Ke,am as qe,an as Xe,aK as Ze,ao as Je,aL as Qe,aM as et,ap as tt,ad as it,Y as H,a as st,o as le,ag as B,B as ve,aN as at,aO as nt,aP as Te,w as pe,c as lt,W as Ce,X as Me,N as ot,aQ as rt,af as w,T as V,O as dt,P as ut,aR as K,aS as D,aF as j,aT as R,R as _e,aU as ct,aA as re,aV as he,aW as ht,aX as ge,I as de,aY as g,V as J,C as vt,aZ as mt}from"./index-5aaf1e46.js";import{V as pt,a as _t}from"./VCarouselItem-1849b795.js";import{V as xe}from"./VContainer-3aa301f8.js";import{V as gt}from"./VTextarea-715309a3.js";import{V as wt,a as Se,C as Ve}from"./cardUsers-6ff29a01.js";import{m as yt,b as ft,V as ae,c as Dt}from"./VBtn-295a3d51.js";import{n as Oe}from"./news-card-3a9577c1.js";import{f as bt,V as kt}from"./VSwitch-9c01050b.js";import{a as ue}from"./VListItem-8c994867.js";import{V as me,a as Ae}from"./VTooltip-8bc893b7.js";import{V as Et,L as Tt}from"./load-round-f0c01e95.js";import{V as Ct,a as Mt,c as xt}from"./VList-d3a59e47.js";import"./VWindowItem-62b1c64f.js";import"./ssrBoot-e414b582.js";/* empty css */import"./VInput-023c66d9.js";import"./moment-fbc5633a.js";import"./VSelectionControl-bbff33e3.js";import"./VChip-dc927196.js";import"./VAlert-53de3b17.js";const St={setup(){const e=X.slice(0,-1),t=f([{link:"newsimage/default.jpg"}]);return te("api/navigation/carousels/",t),{burl:e,carous:t}}};function Vt(e,t,i,a,o,s){return h(),k(pt,{cycle:"",interval:"10000",cover:"",height:"450","hide-delimiters":"","hide-delimiter-background":"","show-arrows":"hover",color:"white"},{default:u(()=>[(h(!0),m(x,null,O(a.carous,(l,n)=>(h(),k(_t,{key:n,src:`${a.burl}${l.link}`,cover:"",eager:""},{default:u(()=>[c(xe,{"fill-height":"",fluid:"","pa-0":"","ma-0":"","pb-3":"",class:"flex-column h-100 d-flex"},{default:u(()=>[c(P,{class:"bgCard h-100 d-flex flex-column"},{default:u(()=>[c(ne,{class:"ma-2 text-h3 text-uppercase titles text-text_carous py-5 flex-column"},{default:u(()=>[c($,null,{default:u(()=>[c(M,{class:"pa-0 pl-1 align-self-center"},{default:u(()=>[S(b(l.title),1)]),_:2},1024),c(M,{class:"flex-grow-0 pa-0 pr-1"},{default:u(()=>[c(ke,{width:"50","aspect-ratio":1,src:`${a.burl}${l.sender}`,cover:""},null,8,["src"])]),_:2},1024)]),_:2},1024)]),_:2},1024),c(se,{class:"ml-2 mb-0 mb-2 w-50 flex-grow-0 pb-3 text-h6 bgText overflow-auto"},{default:u(()=>[c(gt,{class:"text-text_carous mt-n3 text-black textareas pt-2 font-weight-medium","model-value":l.text,variant:"plain",readonly:"","auto-grow":"",rows:"1","hide-details":""},null,8,["model-value"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1032,["src"]))),128))]),_:1})}const Ot=U(St,[["render",Vt]]);const At=je({color:String,...Ie(),...Pe(),...Ye(),...Fe(),...Re(),...Be(),...Ne(),...ze(),...Ue()},"VSheet"),$e=Ee()({name:"VSheet",props:At(),setup(e,t){let{slots:i}=t;const{themeClasses:a}=Ge(e),{backgroundColorClasses:o,backgroundColorStyles:s}=Ke(qe(e,"color")),{borderClasses:l}=Xe(e),{dimensionStyles:n}=Ze(e),{elevationClasses:d}=Je(e),{locationStyles:r}=Qe(e),{positionClasses:v}=et(e),{roundedClasses:p}=tt(e);return it(()=>c(e.tag,{class:["v-sheet",a.value,o.value,l.value,d.value,v.value,p.value,e.class],style:[s.value,n.value,r.value,e.style]},i)),{}}}),Le=Ee()({name:"VSlideGroupItem",props:yt(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:i}=t;const a=ft(e,wt);return()=>{var o;return(o=i.default)==null?void 0:o.call(i,{isSelected:a.isSelected.value,select:a.select,toggle:a.toggle,selectedClass:a.selectedClass.value})}}}),$t={props:{digitalData:{type:Object,default:{}}},setup(){const e=X.slice(0,-1);return{model:f(!1),burl:e}}};function Lt(e,t,i,a,o,s){const l=H("vue3-autocounter");return h(),k(P,{class:"d-flex ml-3"},{default:u(()=>[c($e,{class:"mx-auto",elevation:"0","max-width":"813"},{default:u(()=>[c(Se,{modelValue:a.model,"onUpdate:modelValue":t[0]||(t[0]=n=>a.model=n),class:"pa-0","selected-class":"bg-primary",mandatory:"","show-arrows":""},{default:u(()=>[(h(!0),m(x,null,O(i.digitalData,n=>(h(),k(Le,{key:n},{default:u(()=>[c(P,{class:"ma-2 mt-4 d-flex flex-column",height:"100",width:"169",elevation:"0"},{default:u(()=>[c(P,{class:"h-100 text-center g text-black_grey"},{default:u(()=>[c(ne,{class:"statstyle my-2 py-0 text-overline font-weight-bold"},{default:u(()=>[S(b(n.status),1)]),_:2},1024),c(se,{class:"numstyle mt-4 py-0 font-weight-bold"},{default:u(()=>[c(l,{ref_for:!0,ref:"counter",startAmount:0,endAmount:Number(n.num),duration:1},null,8,["endAmount"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})}const Ht=U($t,[["render",Lt]]);const Wt={name:"calendar-full",props:{initial:{type:String,default:"multiMonthYear"}},setup(e){const t=st({plugins:[dayGridPlugin,interactionPlugin,timeGridPlugin,listPlugin,multiMonthPlugin],initialView:e.initial,dayMaxEventRows:3,locale:"ru",buttonText:{today:"Сегодня",month:"Месяц",week:"Неделя",day:"День",list:"Список",year:"Год"},firstDay:"1",events:[],editable:!0,headerToolbar:{left:"prev",center:"title",right:"next"},aspectRatio:1,multiMonthMaxColumns:2,displayEventEnd:!0,height:"100%",stickyHeaderDates:!0,dayMaxEventRows:2,moreLinkContent:function(a){return a.shortText+" события"},views:{multiMonthYear:{moreLinkContent:function(a){return a.num}}},allDayText:"Весь день",noEventsContent:"На сегодня событий нет",selectable:!0,dateClick:a=>{console.log(a.date)}});function i(){B.get("api/general_vacation/generalvacation/").then(a=>{for(let o in a.data)o=="План-график"&&a.data[o].map(s=>{t.events.push({description:"description for All Day Event",title:s.name,start:s.start_work_period,end:s.end_work_period})})})}return le(()=>{i()}),{calendarOptions:t}}};function jt(e,t,i,a,o,s){const l=H("full-calendar");return h(),k(l,{options:a.calendarOptions},null,8,["options"])}const It=U(Wt,[["render",jt]]);const we=ve(),Pt={components:{myHelper:at,newsCard:Oe},setup(){const e=f([]);nt(()=>{e.value=[]});const t=f([]),i=X.slice(0,-1),a=f(""),o=f(0),s=f(1),l=f(2),n=Te();let d=`api/navigation/news/?name=${n.path}&page=${s.value-1}&selected=${l.value}`;n.path=="/news"&&"id"in n.query&&(d=`api/navigation/news/?name=${n.path}&page=${s.value-1}&selected=${l.value}&id=${n.query.id}`),te(d,t);const r=(y,W)=>{B.post("api/navigation/news/",{news:y,scores:W}).then(A=>{t.value.result[t.value.result.findIndex(L=>L.id==y)].scores=A.data})},v=()=>{B.post("api/navigation/news/",{news:o.value,text:a.value}).then(y=>{t.value.result[t.value.result.findIndex(W=>W.id==y.data.news)].comment=y.data.comment}),a.value=""},p=(y,W)=>{B.post("api/navigation/news/",{delid:y,news:W}).then(A=>{t.value.result[t.value.result.findIndex(L=>L.id==A.data.news)].comment=A.data.comment})},_=()=>{te(`api/navigation/news/?name=${n.path}&page=${s.value-1}&selected=${l.value}`,t)};return pe(()=>we.cod2user,(y,W)=>{y&&te(`api/navigation/news/?name=${n.path}&page=${s.value-1}&selected=${l.value}`,t)},{deep:!0}),pe(()=>l,(y,W)=>{y&&te(`api/navigation/news/?name=${n.path}&page=${s.value-1}&selected=${y.value}`,t)},{deep:!0}),{newss:t,burl:i,limitText:y=>{let A=new DOMParser().parseFromString(y,"text/html").body.textContent||"";A=A.replaceAll('src="/media/uploads',`src="${X}media/uploads`);const L=A.split(" ").slice(0,25);return`${A.split(" ").slice(0,25).join(" ")} ${L.length<25?"":"..."}`},toggleIncrementLike:r,accountStore:we,dateformat:y=>bt(new Date(y),"dd.MM.yyyy HH:mm"),splitname:y=>y.familyname+" "+y.name[0]+"."+y.parentname[0]+".",textcomment:a,openComent:y=>{o.value=y},addComment:v,idnews:o,deletComment:p,pagelistNews:_,divs:e,page:s,selecnews:l,route:n}}},Yt={class:"flex-column h-100"};function Ft(e,t,i,a,o,s){const l=H("news-card");return h(),m("div",Yt,[(h(!0),m(x,null,O(a.newss.result,(n,d)=>(h(),m("div",{key:d},[c(l,{news:n},null,8,["news"])]))),128))])}const Rt=U(Pt,[["render",Ft],["__scopeId","data-v-a0a26455"]]),Bt={components:{newsCard:Oe},setup(){const e=f([]),t=f(0),i=f(1),a=f(8),o=Te(),s=f(""),l=f(!1),n=()=>{B.get(`api/navigation/newscrossroad/?name=${o.path}&page=${i.value-1}&countpage=${a.value}`).then(d=>{e.value=d.data.result,t.value=d.data.countpage})};return n(),{newsAll:e,countetnews:t,page:i,countpage:a,loadNewsAll:n,galleryimges:s,dialogfotoOne:l}}};function Nt(e,t,i,a,o,s){const l=H("news-card");return h(),k($,null,{default:u(()=>[c(M,{class:"flex-column d-flex"},{default:u(()=>[c($,{class:"mt-0 h-0 overflow-auto"},{default:u(()=>[(h(!0),m(x,null,O(a.newsAll,(n,d)=>(h(),k(M,{key:d,class:"pb-1 pt-0",lg:"12",md:"6",sm:"6"},{default:u(()=>[c(l,{news:n},null,8,["news"]),c(me,{modelValue:a.dialogfotoOne,"onUpdate:modelValue":t[1]||(t[1]=r=>a.dialogfotoOne=r),width:"w-100",height:"900",class:"flex-column"},{default:u(()=>[c(P,{class:"pa-4 h-100 flex-column d-flex"},{default:u(()=>[c($,{class:"flex-grow-0 justify-end"},{default:u(()=>[c(M,{class:"pa-0 flex-grow-0"},{default:u(()=>[c(ae,{density:"compact",variant:"text",icon:"mdi-close",onClick:t[0]||(t[0]=r=>a.dialogfotoOne=!1)})]),_:1})]),_:1}),c($,null,{default:u(()=>[c(M,{class:"flex-column h_cards pa-0"},{default:u(()=>[c(ke,{class:"d-flex",src:`${e.burl}${a.galleryimges}`},null,8,["src"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:2},1024))),128))]),_:1}),c(ue,{class:"mt-3"}),c($,{class:"flex-grow-0 ma-0 align-items-center"},{default:u(()=>[c(M,{class:"flex-column d-flex pa-0 align-end"},{default:u(()=>[c(ae,{size:"small",variant:"text",icon:"mdi-newspaper",color:"blue-darken-4",to:"/news"})]),_:1}),c(M,{class:"py-0 pl-0 flex-grow-0 text-end align-self-center text-caption font-weight-bold text-no-wrap"},{default:u(()=>[S(" Всего новостей: "+b(a.countetnews),1)]),_:1})]),_:1})]),_:1})]),_:1})}const zt=U(Bt,[["render",Nt]]),Ut={components:{CardUsers:Ve},props:{idpos:{type:Number,default:""},namepos:{type:Text,default:""}},setup(e,{emit:t}){const i=f(!1),a=f({}),o=f(""),s=f(""),l=()=>{t("searchClose")};le(()=>{B.get(`api/general_vacation/dailyload/?id=${e.idpos}`).then(r=>{a.value=r.data.daily,console.log(r.data.daily,"-------------------------")})});const n=async r=>{i.value=!0,o.value=r},d=lt({get(){let r={};return Object.keys(a.value).map(v=>{let p=a.value[v].filter(_=>_.fio.toLowerCase().includes(s.value.toLowerCase()));p.length>0&&(r[v]=p)}),r}});return{onSubmit:l,checkremote:Ce,searchname:s,spravURL:Me,t_dailyRound:a,result:d,menuGetUserDialog:i,getcard:n,iduser:o}}};function Gt(e,t,i,a,o,s){const l=H("Card-users");return h(),m("div",null,[c(P,{class:"bg-white pa-1 px-0",width:"550"},{default:u(()=>[c(P,{class:"mx-auto overflow-auto mx-0 px-0",width:"550",height:"600",flat:""},{default:u(()=>[c(ne,{class:"fixed-bar bg-white"},{default:u(()=>[c($,{class:"bggrad"},{default:u(()=>[c(M,{class:"text-center text-black_and_white"},{default:u(()=>[S(b(i.namepos),1)]),_:1})]),_:1}),c($,null,{default:u(()=>[c(M,{class:"pa-0 mb-1"},{default:u(()=>[c(ue,{class:""}),c(Ct,{modelValue:a.searchname,"onUpdate:modelValue":t[0]||(t[0]=n=>a.searchname=n),clearable:"","prepend-inner-icon":"mdi-magnify","hide-details":"",class:"ma-0",label:"Поиск",rows:"1","no-resize":""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),(h(!0),m(x,null,O(a.result,(n,d)=>(h(),m("div",{key:d,class:"px-3 ddd"},[c(Mt,{class:"py-0"},{default:u(()=>[c(xt,null,{default:u(()=>[S(b(d),1)]),_:2},1024)]),_:2},1024),(h(!0),m(x,null,O(n,r=>(h(),k(P,{key:r,class:"bg-transparent",density:"compact","prepend-avatar":a.checkremote(`${a.spravURL}${r.login}.jpg`),title:r.fio,subtitle:r.post,variant:"text",onClick:v=>a.getcard(r.login)},null,8,["prepend-avatar","title","subtitle","onClick"]))),128))]))),128))]),_:1}),c(ue,{class:""}),c(ot,{class:"pb-0",style:{"place-content":"end"}},{default:u(()=>[c(ae,{color:"more_details_btn",variant:"text",onClick:a.onSubmit},{default:u(()=>[S(" Закрыть ")]),_:1},8,["onClick"])]),_:1})]),_:1}),c(me,{modelValue:a.menuGetUserDialog,"onUpdate:modelValue":t[2]||(t[2]=n=>a.menuGetUserDialog=n),persistent:"",width:"800"},{default:u(()=>[c(l,{menuGetUserDialog:a.menuGetUserDialog,loging:a.iduser,onMenusClose:t[1]||(t[1]=n=>a.menuGetUserDialog=!1)},null,8,["menuGetUserDialog","loging"])]),_:1},8,["modelValue"])])}const Kt=U(Ut,[["render",Gt]]);const qt={components:{CardUsers:Ve,DialogSearch:Kt},setup(){const e=f([]),t=f(""),i=f(""),a=f(""),o=f(!1),s=f({}),l=f([]),n=f({}),d=f(""),r=f(!1),v=f(""),p=f({}),_=f(!1),I=ve(),E=async L=>{r.value=!0,v.value=L},Y=(L,G)=>{i.value=L,a.value=G,o.value=!o.value,B.get(`api/general_vacation/dailyload/?id=${L}`).then(oe=>{s.value=oe.data,p.value=JSON.parse(JSON.stringify(oe.data.daily))})},N=X.slice(0,-1);function y(){B.get("api/feedback/feedbackdata/").then(L=>{e.value=L.data.results})}const W=L=>{const G=new FormData;G.append("dailyfiles",l.value[0]),B.post(`api/general_vacation/dailyroundup/?excel=${L}`,G).then(oe=>{n.value=oe.data,A()}),l.value=""};function A(){B.get("api/general_vacation/dailyload/").then(L=>{t.value=L.data.daily})}return rt(),le(()=>{A(),y()}),{t_daily:t,detailRound:Y,dialogDetailRound:o,t_dailyRound:s,dailyfiles:l,onPickFile:W,info:n,checkremote:Ce,searchname:d,spravURL:Me,menuGetUserDialog:r,iduser:v,getcard:E,result:p,idpos:i,namepos:a,changeData:_,baseURL:X,burl:N,accountStore:I}}},Xt={class:"d-flex h-100"},Zt={class:"text-center"};function Jt(e,t,i,a,o,s){const l=H("vue3-autocounter"),n=H("dialog-search");return h(),m("div",Xt,[a.t_daily.length>0?(h(),k(P,{key:0,class:"h-100 w-100 d-flex flex-column"},{default:u(()=>[(h(!0),m(x,null,O(a.t_daily,d=>dt((h(),k($,{key:d},{default:u(()=>[c(ue),c(M,null,{default:u(()=>[c(P,{class:"ma-2 d-flex flex-column",height:"100",elevation:"0"},{default:u(()=>[c(P,{class:"h-100 text-center text-black_grey bg-black_and_white"},{default:u(()=>[c(ne,{class:"statstyle py-0 text-xl-overline text-lg-subtitle-1 text-md-h5 font-weight-bold bg-black_and_white"},{default:u(()=>[S(b(d.position__name),1)]),_:2},1024),c(se,{onClick:r=>a.detailRound(d.position,d.position__name),class:"numstyle mt-2 py-0 font-weight-bold pointer bg-black_and_white"},{default:u(()=>[c(l,{ref_for:!0,ref:"counter",startAmount:0,endAmount:Number(d.user__count),duration:2},null,8,["endAmount"])]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)),[[ut,d.position!=6]])),128))]),_:1})):(h(),k(P,{key:1,class:"h-100 w-100 d-flex justify-center flex-column",image:`${a.burl}/media/newsimage/2023/09/28/sea.jpg`},{default:u(()=>[c($,{class:"flex-grow-0"},{default:u(()=>[c(M,{class:"py-0"},{default:u(()=>[a.accountStore.user.is_staff?(h(),k(kt,{key:0,modelValue:a.changeData,"onUpdate:modelValue":t[0]||(t[0]=d=>a.changeData=d),class:"pl-3 d-flex justify-end",color:"white",onClick:t[1]||(t[1]=d=>a.changeData=!a.changeData)},null,8,["modelValue"])):w("",!0)]),_:1})]),_:1}),c($,{class:"ma-3"},{default:u(()=>[a.changeData?(h(),k(se,{key:0,class:"d-flex flex-column align-self-center"},{default:u(()=>[c(Et,{accept:".xlsx",modelValue:a.dailyfiles,"onUpdate:modelValue":t[2]||(t[2]=d=>a.dailyfiles=d),variant:"underlined",density:"compact","hide-details":"",class:"pt-2 ml-0 text-white"},null,8,["modelValue"]),c(ae,{class:"align-self-center",icon:"mdi-google-play text-white",size:"x-large",variant:"text",color:"teal-darken-4",disabled:a.dailyfiles==0,onClick:t[3]||(t[3]=d=>a.onPickFile("roundfilse"))},null,8,["disabled"])]),_:1})):(h(),k(se,{key:1,class:"w-100"},{default:u(()=>[c($,{class:"text-white text-center text-lg-h5 h-100","align-content":"center",justify:"center"},{default:u(()=>[S(" Данные не загружены ")]),_:1})]),_:1}))]),_:1})]),_:1},8,["image"])),V("div",Zt,[c(me,{modelValue:a.dialogDetailRound,"onUpdate:modelValue":t[5]||(t[5]=d=>a.dialogDetailRound=d),width:"500"},{default:u(()=>[c(n,{idpos:a.idpos,namepos:a.namepos,onSearchClose:t[4]||(t[4]=d=>a.dialogDetailRound=!a.dialogDetailRound)},null,8,["idpos","namepos"])]),_:1},8,["modelValue"])])])}const Qt=U(qt,[["render",Jt]]);var ei=Object.defineProperty,ti=(e,t,i)=>t in e?ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,z=(e,t,i)=>(ti(e,typeof t!="symbol"?t+"":t,i),i);/**
* vue-cal v4.8.1
* (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
* @license MIT
*/let Q,ye,fe,F,ee={},q={};class ii{constructor(t){z(this,"_vuecal",null),z(this,"selectCell",(i=!1,a,o)=>{this._vuecal.$emit("cell-click",o?{date:a,split:o}:a),this._vuecal.clickToNavigate||i?this._vuecal.switchToNarrowerView():this._vuecal.dblclickToNavigate&&"ontouchstart"in window&&(this._vuecal.domEvents.dblTapACell.taps++,setTimeout(()=>this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.domEvents.dblTapACell.timeout),this._vuecal.domEvents.dblTapACell.taps>=2&&(this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.switchToNarrowerView(),this._vuecal.$emit("cell-dblclick",o?{date:a,split:o}:a)))}),z(this,"keyPressEnterCell",(i,a)=>{this._vuecal.$emit("cell-keypress-enter",a?{date:i,split:a}:i),this._vuecal.switchToNarrowerView()}),z(this,"getPosition",i=>{const{left:a,top:o}=this._vuecal.cellsEl.getBoundingClientRect(),{clientX:s,clientY:l}="ontouchstart"in window&&i.touches?i.touches[0]:i;return{x:s-a,y:l-o}}),z(this,"minutesAtCursor",i=>{let a=0,o={x:0,y:0};const{timeStep:s,timeCellHeight:l,timeFrom:n}=this._vuecal.$props;return typeof i=="number"?a=i:typeof i=="object"&&(o=this.getPosition(i),a=Math.round(o.y*s/parseInt(l)+n)),{minutes:Math.max(Math.min(a,1440),0),cursorCoords:o}}),this._vuecal=t}}let T,C,ce;class si{constructor(t,i){z(this,"_vuecal",null),z(this,"eventDefaults",{_eid:null,start:"",startTimeMinutes:0,end:"",endTimeMinutes:0,title:"",content:"",background:!1,allDay:!1,segments:null,repeat:null,daysCount:1,deletable:!0,deleting:!1,titleEditable:!0,resizable:!0,resizing:!1,draggable:!0,dragging:!1,draggingStatic:!1,focused:!1,class:""}),this._vuecal=t,T=i}createAnEvent(t,i,a){if(typeof t=="string"&&(t=T.stringToDate(t)),!(t instanceof Date))return!1;const o=T.dateToMinutes(t),s=o+(i=1*i||120),l=T.addMinutes(new Date(t),i);a.end&&(typeof a.end=="string"&&(a.end=T.stringToDate(a.end)),a.endTimeMinutes=T.dateToMinutes(a.end));const n={...this.eventDefaults,_eid:`${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`,start:t,startTimeMinutes:o,end:l,endTimeMinutes:s,segments:null,...a};return typeof this._vuecal.onEventCreate!="function"||this._vuecal.onEventCreate(n,()=>this.deleteAnEvent(n))?(n.startDateF!==n.endDateF&&(n.daysCount=T.countDays(n.start,n.end)),this._vuecal.mutableEvents.push(n),this._vuecal.addEventsToView([n]),this._vuecal.emitWithEvent("event-create",n),this._vuecal.$emit("event-change",{event:this._vuecal.cleanupEvent(n),originalEvent:null}),n):void 0}addEventSegment(t){t.segments||(t.segments={},t.segments[T.formatDateLite(t.start)]={start:t.start,startTimeMinutes:t.startTimeMinutes,endTimeMinutes:1440,isFirstDay:!0,isLastDay:!1});const i=t.segments[T.formatDateLite(t.end)];i&&(i.isLastDay=!1,i.endTimeMinutes=1440);const a=T.addDays(t.end,1),o=T.formatDateLite(a);return a.setHours(0,0,0,0),t.segments[o]={start:a,startTimeMinutes:0,endTimeMinutes:t.endTimeMinutes,isFirstDay:!1,isLastDay:!0},t.end=T.addMinutes(a,t.endTimeMinutes),t.daysCount=Object.keys(t.segments).length,o}removeEventSegment(t){let i=Object.keys(t.segments).length;if(i<=1)return T.formatDateLite(t.end);delete t.segments[T.formatDateLite(t.end)],i--;const a=T.subtractDays(t.end,1),o=T.formatDateLite(a),s=t.segments[o];return i?s&&(s.isLastDay=!0,s.endTimeMinutes=t.endTimeMinutes):t.segments=null,t.daysCount=i||1,t.end=a,o}createEventSegments(t,i,a){const o=i.getTime(),s=a.getTime();let l,n,d,r=t.start.getTime(),v=t.end.getTime(),p=!1;for(t.end.getHours()||t.end.getMinutes()||(v-=1e3),t.segments={},t.repeat?(l=o,n=Math.min(s,t.repeat.until?T.stringToDate(t.repeat.until).getTime():s)):(l=Math.max(o,r),n=Math.min(s,v));l<=n;){let _=!1;const I=T.addDays(new Date(l),1).setHours(0,0,0,0);let E,Y,N,y;if(t.repeat){const W=new Date(l),A=T.formatDateLite(W);(p||t.occurrences&&t.occurrences[A])&&(p||(r=t.occurrences[A].start,d=new Date(r).setHours(0,0,0,0),v=t.occurrences[A].end),p=!0,_=!0),E=l===d,Y=A===T.formatDateLite(new Date(v)),N=new Date(E?r:l),y=T.formatDateLite(N),Y&&(p=!1)}else _=!0,E=l===r,Y=n===v&&I>n,N=E?t.start:new Date(l),y=T.formatDateLite(E?t.start:N);_&&(t.segments[y]={start:N,startTimeMinutes:E?t.startTimeMinutes:0,endTimeMinutes:Y?t.endTimeMinutes:1440,isFirstDay:E,isLastDay:Y}),l=I}return t}deleteAnEvent(t){this._vuecal.emitWithEvent("event-delete",t),this._vuecal.mutableEvents=this._vuecal.mutableEvents.filter(i=>i._eid!==t._eid),this._vuecal.view.events=this._vuecal.view.events.filter(i=>i._eid!==t._eid)}checkCellOverlappingEvents(t,i){ce=t.slice(0),C={},t.forEach(o=>{ce.shift(),C[o._eid]||(C[o._eid]={overlaps:[],start:o.start,position:0}),C[o._eid].position=0,ce.forEach(s=>{C[s._eid]||(C[s._eid]={overlaps:[],start:s.start,position:0});const l=this.eventInRange(s,o.start,o.end),n=i.overlapsPerTimeStep?T.datesInSameTimeStep(o.start,s.start,i.timeStep):1;if(o.background||o.allDay||s.background||s.allDay||!l||!n){let d,r;(d=(C[o._eid]||{overlaps:[]}).overlaps.indexOf(s._eid))>-1&&C[o._eid].overlaps.splice(d,1),(r=(C[s._eid]||{overlaps:[]}).overlaps.indexOf(o._eid))>-1&&C[s._eid].overlaps.splice(r,1),C[s._eid].position--}else C[o._eid].overlaps.push(s._eid),C[o._eid].overlaps=[...new Set(C[o._eid].overlaps)],C[s._eid].overlaps.push(o._eid),C[s._eid].overlaps=[...new Set(C[s._eid].overlaps)],C[s._eid].position++})});let a=0;for(const o in C){const s=C[o],l=s.overlaps.map(n=>({id:n,start:C[n].start}));l.push({id:o,start:s.start}),l.sort((n,d)=>n.start<d.start?-1:n.start>d.start?1:n.id>d.id?-1:1),s.position=l.findIndex(n=>n.id===o),a=Math.max(this.getOverlapsStreak(s,C),a)}return[C,a]}getOverlapsStreak(t,i={}){let a=t.overlaps.length+1,o=[];return t.overlaps.forEach(s=>{o.includes(s)||t.overlaps.filter(l=>l!==s).forEach(l=>{i[l].overlaps.includes(s)||o.push(l)})}),o=[...new Set(o)],a-=o.length,a}eventInRange(t,i,a){if(t.allDay||!this._vuecal.time){const l=new Date(t.start).setHours(0,0,0,0);return new Date(t.end).setHours(23,59,0,0)>=new Date(i).setHours(0,0,0,0)&&l<=new Date(a).setHours(0,0,0,0)}const o=t.start.getTime(),s=t.end.getTime();return o<a.getTime()&&s>i.getTime()}}const ai={class:"vuecal__flex vuecal__weekdays-headings"},ni=["onClick"],li={class:"vuecal__flex weekday-label",grow:""},oi={class:"full"},ri={class:"small"},di={class:"xsmall"},ui={key:0},ci={key:0,class:"vuecal__flex vuecal__split-days-headers",grow:""},Z=(e,t)=>{const i=e.__vccOpts||e;for(const[a,o]of t)i[a]=o;return i},He=Z({inject:["vuecal","utils","view"],props:{transitionDirection:{type:String,default:"right"},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},methods:{selectCell(e,t){e.getTime()!==this.view.selectedDate.getTime()&&(this.view.selectedDate=e),this.utils.cell.selectCell(!1,e,t)},cleanupHeading:e=>({label:e.full,date:e.date,...e.today?{today:e.today}:{}})},computed:{headings(){if(!["month","week"].includes(this.view.id))return[];let e=!1;return this.weekDays.map((t,i)=>{const a=this.utils.date.addDays(this.view.startDate,this.vuecal.startWeekOnSunday?i-1:i);return{hide:t.hide,full:t.label,small:t.short||t.label.substr(0,3),xsmall:t.short||t.label.substr(0,1),...this.view.id==="week"?{dayOfMonth:a.getDate(),date:a,today:!e&&this.utils.date.isToday(a)&&!e++}:{}}})},cellWidth(){return 100/(7-this.weekDays.reduce((e,t)=>e+t.hide,0))},weekdayCellStyles(){return{...this.vuecal.hideWeekdays.length?{width:`${this.cellWidth}%`}:{}}},cellHeadingsClickable(){return this.view.id==="week"&&(this.vuecal.clickToNavigate||this.vuecal.dblclickToNavigate)}}},[["render",function(e,t,i,a,o,s){return h(),m("div",ai,[(h(!0),m(x,null,O(s.headings,(l,n)=>(h(),m(x,{key:n},[l.hide?w("",!0):(h(),m("div",{key:0,class:j(["vuecal__flex vuecal__heading",{today:l.today,clickable:s.cellHeadingsClickable}]),style:R(s.weekdayCellStyles),onClick:d=>s.view.id==="week"&&s.selectCell(l.date,d),onDblclick:t[0]||(t[0]=d=>s.view.id==="week"&&s.vuecal.dblclickToNavigate&&i.switchToNarrowerView())},[c(re,{name:`slide-fade--${i.transitionDirection}`,appear:s.vuecal.transitions},{default:u(()=>[(h(),m("div",{class:"vuecal__flex",column:"",key:!!s.vuecal.transitions&&`${n}-${l.dayOfMonth}`},[V("div",li,[D(e.$slots,"weekday-heading",{heading:s.cleanupHeading(l),view:s.view},()=>[V("span",oi,b(l.full),1),V("span",ri,b(l.small),1),V("span",di,b(l.xsmall),1),l.dayOfMonth?(h(),m("span",ui," "+b(l.dayOfMonth),1)):w("",!0)])]),s.vuecal.hasSplits&&s.vuecal.stickySplitLabels?(h(),m("div",ci,[(h(!0),m(x,null,O(s.vuecal.daySplits,(d,r)=>(h(),m("div",{class:j(["day-split-header",d.class||!1]),key:r},[D(e.$slots,"split-label",{split:d,view:s.view},()=>[S(b(d.label),1)])],2))),128))])):w("",!0)]))]),_:2},1032,["name","appear"])],46,ni))],64))),128))])}]]),hi={class:"vuecal__header"},vi={key:0,class:"vuecal__flex vuecal__menu",role:"tablist","aria-label":"Calendar views navigation"},mi=["onDragenter","onDragleave","onClick","aria-label"],pi={key:1,class:"vuecal__title-bar"},_i=["aria-label"],gi={class:"vuecal__flex vuecal__title",grow:""},wi=["aria-label"],yi={key:0,class:"vuecal__flex vuecal__split-days-headers"},fi=Z({inject:["vuecal","previous","next","switchView","updateSelectedDate","modules","view"],components:{WeekdaysHeadings:He},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},hasSplits:{type:[Boolean,Number],default:!1},daySplits:{type:Array,default:()=>[]},viewProps:{type:Object,default:()=>({})},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},data:()=>({highlightedControl:null}),methods:{goToToday(){this.updateSelectedDate(new Date(new Date().setHours(0,0,0,0)))},switchToBroaderView(){this.transitionDirection="left",this.broaderView&&this.switchView(this.broaderView)}},computed:{transitionDirection:{get(){return this.vuecal.transitionDirection},set(e){this.vuecal.transitionDirection=e}},broaderView(){const{enabledViews:e}=this.vuecal;return e[e.indexOf(this.view.id)-1]},showDaySplits(){return this.view.id==="day"&&this.hasSplits&&this.options.stickySplitLabels&&!this.options.minSplitWidth},dnd(){return this.modules.dnd}}},[["render",function(e,t,i,a,o,s){const l=H("weekdays-headings");return h(),m("div",hi,[i.options.hideViewSelector?w("",!0):(h(),m("div",vi,[(h(!0),m(x,null,O(i.viewProps.views,(n,d)=>(h(),m(x,{key:d},[n.enabled?(h(),m("button",{key:0,class:j(["vuecal__view-btn",{"vuecal__view-btn--active":s.view.id===d,"vuecal__view-btn--highlighted":e.highlightedControl===d}]),type:"button",onDragenter:r=>i.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragEnter(r,d,e.$data),onDragleave:r=>i.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragLeave(r,d,e.$data),onClick:r=>s.switchView(d,null,!0),"aria-label":`${n.label} view`},b(n.label),43,mi)):w("",!0)],64))),128))])),i.options.hideTitleBar?w("",!0):(h(),m("div",pi,[V("button",{class:j(["vuecal__arrow vuecal__arrow--prev",{"vuecal__arrow--highlighted":e.highlightedControl==="previous"}]),type:"button",onClick:t[0]||(t[0]=(...n)=>s.previous&&s.previous(...n)),onDragenter:t[1]||(t[1]=n=>i.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragEnter(n,"previous",e.$data)),onDragleave:t[2]||(t[2]=n=>i.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragLeave(n,"previous",e.$data)),"aria-label":`Previous ${s.view.id}`},[D(e.$slots,"arrow-prev")],42,_i),V("div",gi,[c(re,{name:i.options.transitions?`slide-fade--${s.transitionDirection}`:""},{default:u(()=>[(h(),k(ct(s.broaderView?"button":"span"),{type:!!s.broaderView&&"button",key:`${s.view.id}${s.view.startDate.toString()}`,onClick:t[3]||(t[3]=n=>!!s.broaderView&&s.switchToBroaderView()),"aria-label":!!s.broaderView&&`Go to ${s.broaderView} view`},{default:u(()=>[D(e.$slots,"title")]),_:3},8,["type","aria-label"]))]),_:3},8,["name"])]),i.options.todayButton?(h(),m("button",{key:0,class:j(["vuecal__today-btn",{"vuecal__today-btn--highlighted":e.highlightedControl==="today"}]),type:"button",onClick:t[4]||(t[4]=(...n)=>s.goToToday&&s.goToToday(...n)),onDragenter:t[5]||(t[5]=n=>i.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragEnter(n,"today",e.$data)),onDragleave:t[6]||(t[6]=n=>i.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragLeave(n,"today",e.$data)),"aria-label":"Today"},[D(e.$slots,"today-button")],34)):w("",!0),V("button",{class:j(["vuecal__arrow vuecal__arrow--next",{"vuecal__arrow--highlighted":e.highlightedControl==="next"}]),type:"button",onClick:t[7]||(t[7]=(...n)=>s.next&&s.next(...n)),onDragenter:t[8]||(t[8]=n=>i.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragEnter(n,"next",e.$data)),onDragleave:t[9]||(t[9]=n=>i.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragLeave(n,"next",e.$data)),"aria-label":`Next ${s.view.id}`},[D(e.$slots,"arrow-next")],42,wi)])),i.viewProps.weekDaysInHeader?(h(),k(l,{key:2,"week-days":i.weekDays,"transition-direction":s.transitionDirection,"switch-to-narrower-view":i.switchToNarrowerView},he({_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:u(({heading:n,view:d})=>[D(e.$slots,"weekday-heading",{heading:n,view:d})]),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:u(({split:n})=>[D(e.$slots,"split-label",{split:n,view:s.view})]),key:"1"}:void 0]),1032,["week-days","transition-direction","switch-to-narrower-view"])):w("",!0),c(re,{name:`slide-fade--${s.transitionDirection}`},{default:u(()=>[s.showDaySplits?(h(),m("div",yi,[(h(!0),m(x,null,O(i.daySplits,(n,d)=>(h(),m("div",{class:j(["day-split-header",n.class||!1]),key:d},[D(e.$slots,"split-label",{split:n,view:s.view.id},()=>[S(b(n.label),1)])],2))),128))])):w("",!0)]),_:3},8,["name"])])}]]),Di=["draggable"],bi={inject:["vuecal","utils","modules","view","domEvents","editEvents"],props:{cellFormattedDate:{type:String,default:""},event:{type:Object,default:()=>({})},cellEvents:{type:Array,default:()=>[]},overlaps:{type:Array,default:()=>[]},eventPosition:{type:Number,default:0},overlapsStreak:{type:Number,default:0},allDay:{type:Boolean,default:!1}},data:()=>({touch:{dragThreshold:30,startX:0,startY:0,dragged:!1}}),methods:{onMouseDown(e,t=!1){if("ontouchstart"in window&&!t)return!1;const{clickHoldAnEvent:i,focusAnEvent:a,resizeAnEvent:o,dragAnEvent:s}=this.domEvents;if(a._eid===this.event._eid&&i._eid===this.event._eid)return!0;this.focusEvent(),i._eid=null,this.vuecal.editEvents.delete&&this.event.deletable&&(i.timeoutId=setTimeout(()=>{o._eid||s._eid||(i._eid=this.event._eid,this.event.deleting=!0)},i.timeout))},onMouseUp(e){this.domEvents.focusAnEvent._eid!==this.event._eid||this.touch.dragged||(this.domEvents.focusAnEvent.mousedUp=!0),this.touch.dragged=!1},onMouseEnter(e){e.preventDefault(),this.vuecal.emitWithEvent("event-mouse-enter",this.event)},onMouseLeave(e){e.preventDefault(),this.vuecal.emitWithEvent("event-mouse-leave",this.event)},onTouchMove(e){if(typeof this.vuecal.onEventClick!="function")return;const{clientX:t,clientY:i}=e.touches[0],{startX:a,startY:o,dragThreshold:s}=this.touch;(Math.abs(t-a)>s||Math.abs(i-o)>s)&&(this.touch.dragged=!0)},onTouchStart(e){this.touch.startX=e.touches[0].clientX,this.touch.startY=e.touches[0].clientY,this.onMouseDown(e,!0)},onEnterKeypress(e){if(typeof this.vuecal.onEventClick=="function")return this.vuecal.onEventClick(this.event,e)},onDblClick(e){if(typeof this.vuecal.onEventDblclick=="function")return this.vuecal.onEventDblclick(this.event,e)},onDragStart(e){this.dnd&&this.dnd.eventDragStart(e,this.event)},onDragEnd(){this.dnd&&this.dnd.eventDragEnd(this.event)},onResizeHandleMouseDown(){this.focusEvent(),this.domEvents.dragAnEvent._eid=null,this.domEvents.resizeAnEvent=Object.assign(this.domEvents.resizeAnEvent,{_eid:this.event._eid,start:(this.segment||this.event).start,split:this.event.split||null,segment:!!this.segment&&this.utils.date.formatDateLite(this.segment.start),originalEnd:new Date((this.segment||this.event).end),originalEndTimeMinutes:this.event.endTimeMinutes}),this.event.resizing=!0},deleteEvent(e=!1){if("ontouchstart"in window&&!e)return!1;this.utils.event.deleteAnEvent(this.event)},touchDeleteEvent(e){this.deleteEvent(!0)},cancelDeleteEvent(){this.event.deleting=!1},focusEvent(){const{focusAnEvent:e}=this.domEvents,t=e._eid;if(t!==this.event._eid){if(t){const i=this.view.events.find(a=>a._eid===t);i&&(i.focused=!1)}this.vuecal.cancelDelete(),this.vuecal.emitWithEvent("event-focus",this.event),e._eid=this.event._eid,this.event.focused=!0}}},computed:{eventDimensions(){const{startTimeMinutes:e,endTimeMinutes:t}=this.segment||this.event;let i=e-this.vuecal.timeFrom;const a=Math.max(Math.round(i*this.vuecal.timeCellHeight/this.vuecal.timeStep),0);i=Math.min(t,this.vuecal.timeTo)-this.vuecal.timeFrom;const o=Math.round(i*this.vuecal.timeCellHeight/this.vuecal.timeStep);return{top:a,height:Math.max(o-a,5)}},eventStyles(){if(this.event.allDay||!this.vuecal.time||!this.event.endTimeMinutes||this.view.id==="month"||this.allDay)return{};let e=100/Math.min(this.overlaps.length+1,this.overlapsStreak),t=100/(this.overlaps.length+1)*this.eventPosition;this.vuecal.minEventWidth&&e<this.vuecal.minEventWidth&&(e=this.vuecal.minEventWidth,t=(100-this.vuecal.minEventWidth)/this.overlaps.length*this.eventPosition);const{top:i,height:a}=this.eventDimensions;return{top:`${i}px`,height:`${a}px`,width:`${e}%`,left:this.event.left&&`${this.event.left}px`||`${t}%`}},eventClasses(){const{isFirstDay:e,isLastDay:t}=this.segment||{};return{[this.event.class]:!!this.event.class,"vuecal__event--focus":this.event.focused,"vuecal__event--resizing":this.event.resizing,"vuecal__event--background":this.event.background,"vuecal__event--deletable":this.event.deleting,"vuecal__event--all-day":this.event.allDay,"vuecal__event--dragging":!this.event.draggingStatic&&this.event.dragging,"vuecal__event--static":this.event.dragging&&this.event.draggingStatic,"vuecal__event--multiple-days":!!this.segment,"event-start":this.segment&&e&&!t,"event-middle":this.segment&&!e&&!t,"event-end":this.segment&&t&&!e}},segment(){return this.event.segments&&this.event.segments[this.cellFormattedDate]||null},draggable(){const{draggable:e,background:t,daysCount:i}=this.event;return this.vuecal.editEvents.drag&&e&&!t&&i===1},resizable(){const{editEvents:e,time:t}=this.vuecal;return e.resize&&this.event.resizable&&t&&!this.allDay&&(!this.segment||this.segment&&this.segment.isLastDay)&&this.view.id!=="month"},dnd(){return this.modules.dnd}}},ki=["data-split","aria-label","onTouchstart","onMousedown","onDragover","onDrop"],Ei={key:0,class:"cell-time-labels"},Ti=["innerHTML"],Ci={key:2,class:"vuecal__cell-events"},Mi=["title"],We=Z({inject:["vuecal","utils","modules","view","domEvents"],components:{Event:Z(bi,[["render",function(e,t,i,a,o,s){return h(),m("div",{class:j(["vuecal__event",s.eventClasses]),style:R(s.eventStyles),tabindex:"0",onFocus:t[4]||(t[4]=(...l)=>s.focusEvent&&s.focusEvent(...l)),onKeypress:t[5]||(t[5]=_e(K((...l)=>s.onEnterKeypress&&s.onEnterKeypress(...l),["stop"]),["enter"])),onMouseenter:t[6]||(t[6]=(...l)=>s.onMouseEnter&&s.onMouseEnter(...l)),onMouseleave:t[7]||(t[7]=(...l)=>s.onMouseLeave&&s.onMouseLeave(...l)),onTouchstart:t[8]||(t[8]=K((...l)=>s.onTouchStart&&s.onTouchStart(...l),["stop"])),onMousedown:t[9]||(t[9]=l=>s.onMouseDown(l)),onMouseup:t[10]||(t[10]=(...l)=>s.onMouseUp&&s.onMouseUp(...l)),onTouchend:t[11]||(t[11]=(...l)=>s.onMouseUp&&s.onMouseUp(...l)),onTouchmove:t[12]||(t[12]=(...l)=>s.onTouchMove&&s.onTouchMove(...l)),onDblclick:t[13]||(t[13]=(...l)=>s.onDblClick&&s.onDblClick(...l)),draggable:s.draggable,onDragstart:t[14]||(t[14]=l=>s.draggable&&s.onDragStart(l)),onDragend:t[15]||(t[15]=l=>s.draggable&&s.onDragEnd())},[s.vuecal.editEvents.delete&&i.event.deletable?(h(),m("div",{key:0,class:"vuecal__event-delete",onClick:t[0]||(t[0]=K((...l)=>s.deleteEvent&&s.deleteEvent(...l),["stop"])),onTouchstart:t[1]||(t[1]=K((...l)=>s.touchDeleteEvent&&s.touchDeleteEvent(...l),["stop"]))},b(s.vuecal.texts.deleteEvent),33)):w("",!0),D(e.$slots,"event",{event:i.event,view:s.view.id}),s.resizable?(h(),m("div",{key:1,class:"vuecal__event-resize-handle",contenteditable:"false",onMousedown:t[2]||(t[2]=K((...l)=>s.onResizeHandleMouseDown&&s.onResizeHandleMouseDown(...l),["stop","prevent"])),onTouchstart:t[3]||(t[3]=K((...l)=>s.onResizeHandleMouseDown&&s.onResizeHandleMouseDown(...l),["stop","prevent"]))},null,32)):w("",!0)],46,Di)}]])},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},data:{type:Object,required:!0},cellSplits:{type:Array,default:()=>[]},minTimestamp:{type:[Number,null],default:null},maxTimestamp:{type:[Number,null],default:null},cellWidth:{type:[Number,Boolean],default:!1},allDay:{type:Boolean,default:!1}},data:()=>({cellOverlaps:{},cellOverlapsStreak:1,timeAtCursor:null,highlighted:!1,highlightedSplit:null}),methods:{getSplitAtCursor({target:e}){let t=e.classList.contains("vuecal__cell-split")?e:this.vuecal.findAncestor(e,"vuecal__cell-split");return t&&(t=t.attributes["data-split"].value,parseInt(t).toString()===t.toString()&&(t=parseInt(t))),t||null},splitClasses(e){return{"vuecal__cell-split":!0,"vuecal__cell-split--highlighted":this.highlightedSplit===e.id,[e.class]:!!e.class}},checkCellOverlappingEvents(){this.options.time&&this.eventsCount&&!this.splitsCount&&(this.eventsCount===1?(this.cellOverlaps=[],this.cellOverlapsStreak=1):[this.cellOverlaps,this.cellOverlapsStreak]=this.utils.event.checkCellOverlappingEvents(this.events,this.options))},isDOMElementAnEvent(e){return this.vuecal.isDOMElementAnEvent(e)},selectCell(e,t=!1){const i=this.splitsCount?this.getSplitAtCursor(e):null;this.utils.cell.selectCell(t,this.timeAtCursor,i),this.timeAtCursor=null},onCellkeyPressEnter(e){this.isSelected||this.onCellFocus(e);const t=this.splitsCount?this.getSplitAtCursor(e):null;this.utils.cell.keyPressEnterCell(this.timeAtCursor,t),this.timeAtCursor=null},onCellFocus(e){if(!this.isSelected&&!this.isDisabled){this.isSelected=this.data.startDate;const t=this.splitsCount?this.getSplitAtCursor(e):null,i=this.timeAtCursor||this.data.startDate;this.vuecal.$emit("cell-focus",t?{date:i,split:t}:i)}},onCellMouseDown(e,t=null,i=!1){if("ontouchstart"in window&&!i)return!1;this.isSelected||this.onCellFocus(e);const{clickHoldACell:a,focusAnEvent:o}=this.domEvents;this.domEvents.cancelClickEventCreation=!1,a.eventCreated=!1,this.timeAtCursor=new Date(this.data.startDate);const{minutes:s,cursorCoords:{y:l}}=this.vuecal.minutesAtCursor(e);this.timeAtCursor.setMinutes(s);const n=this.isDOMElementAnEvent(e.target);!n&&o._eid&&((this.view.events.find(d=>d._eid===o._eid)||{}).focused=!1),this.editEvents.create&&!n&&this.setUpEventCreation(e,l)},setUpEventCreation(e,t){if(this.options.dragToCreateEvent&&["week","day"].includes(this.view.id)){const{dragCreateAnEvent:i}=this.domEvents;if(i.startCursorY=t,i.split=this.splitsCount?this.getSplitAtCursor(e):null,i.start=this.timeAtCursor,this.options.snapToTime){let a=60*this.timeAtCursor.getHours()+this.timeAtCursor.getMinutes();const o=a+this.options.snapToTime/2;a=o-o%this.options.snapToTime,i.start.setHours(0,a,0,0)}}else this.options.cellClickHold&&["month","week","day"].includes(this.view.id)&&this.setUpCellHoldTimer(e)},setUpCellHoldTimer(e){const{clickHoldACell:t}=this.domEvents;t.cellId=`${this.vuecal._.uid}_${this.data.formattedDate}`,t.split=this.splitsCount?this.getSplitAtCursor(e):null,t.timeoutId=setTimeout(()=>{if(t.cellId&&!this.domEvents.cancelClickEventCreation){const{_eid:i}=this.utils.event.createAnEvent(this.timeAtCursor,null,t.split?{split:t.split}:{});t.eventCreated=i}},t.timeout)},onCellTouchStart(e,t=null){this.onCellMouseDown(e,t,!0)},onCellClick(e){this.isDOMElementAnEvent(e.target)||this.selectCell(e)},onCellDblClick(e){const t=new Date(this.data.startDate);t.setMinutes(this.vuecal.minutesAtCursor(e).minutes);const i=this.splitsCount?this.getSplitAtCursor(e):null;this.vuecal.$emit("cell-dblclick",i?{date:t,split:i}:t),this.options.dblclickToNavigate&&this.vuecal.switchToNarrowerView()},onCellContextMenu(e){e.stopPropagation(),e.preventDefault();const t=new Date(this.data.startDate),{cursorCoords:i,minutes:a}=this.vuecal.minutesAtCursor(e);t.setMinutes(a);const o=this.splitsCount?this.getSplitAtCursor(e):null;this.vuecal.$emit("cell-contextmenu",{date:t,...i,...o||{},e})}},computed:{dnd(){return this.modules.dnd},nowInMinutes(){return this.utils.date.dateToMinutes(this.vuecal.now)},isBeforeMinDate(){return this.minTimestamp!==null&&this.minTimestamp>this.data.endDate.getTime()},isAfterMaxDate(){return this.maxTimestamp&&this.maxTimestamp<this.data.startDate.getTime()},isDisabled(){const{disableDays:e}=this.options,{isYearsOrYearView:t}=this.vuecal;return!(!e.length||!e.includes(this.data.formattedDate)||t)||this.isBeforeMinDate||this.isAfterMaxDate},isSelected:{get(){let e=!1;const{selectedDate:t}=this.view;return e=this.view.id==="years"?t.getFullYear()===this.data.startDate.getFullYear():this.view.id==="year"?t.getFullYear()===this.data.startDate.getFullYear()&&t.getMonth()===this.data.startDate.getMonth():t.getTime()===this.data.startDate.getTime(),e},set(e){this.view.selectedDate=e,this.vuecal.$emit("update:selected-date",this.view.selectedDate)}},isWeekOrDayView(){return["week","day"].includes(this.view.id)},transitionDirection(){return this.vuecal.transitionDirection},specialHours(){return this.data.specialHours.map(e=>{let{from:t,to:i}=e;return t=Math.max(t,this.options.timeFrom),i=Math.min(i,this.options.timeTo),{...e,height:(i-t)*this.timeScale,top:(t-this.options.timeFrom)*this.timeScale}})},events(){const{startDate:e,endDate:t}=this.data;let i=[];if(!["years","year"].includes(this.view.id)||this.options.eventsCountOnYearView){if(i=this.view.events.slice(0),this.view.id==="month"&&i.push(...this.view.outOfScopeEvents),i=i.filter(a=>this.utils.event.eventInRange(a,e,t)),this.options.showAllDayEvents&&this.view.id!=="month"&&(i=i.filter(a=>!!a.allDay===this.allDay)),this.options.time&&this.isWeekOrDayView&&!this.allDay){const{timeFrom:a,timeTo:o}=this.options;i=i.filter(s=>{const l=s.daysCount>1&&s.segments[this.data.formattedDate]||{},n=s.daysCount===1&&s.startTimeMinutes<o&&s.endTimeMinutes>a,d=s.daysCount>1&&l.startTimeMinutes<o&&l.endTimeMinutes>a;return s.allDay||n||d||!1})}!this.options.time||!this.isWeekOrDayView||this.options.showAllDayEvents&&this.allDay||i.sort((a,o)=>a.start<o.start?-1:1),this.cellSplits.length||this.$nextTick(this.checkCellOverlappingEvents)}return i},eventsCount(){return this.events.length},splits(){return this.cellSplits.map((e,t)=>{const i=this.events.filter(s=>s.split===e.id),[a,o]=this.utils.event.checkCellOverlappingEvents(i.filter(s=>!s.background&&!s.allDay),this.options);return{...e,overlaps:a,overlapsStreak:o,events:i}})},splitsCount(){return this.splits.length},cellClasses(){return{[this.data.class]:!!this.data.class,"vuecal__cell--current":this.data.current,"vuecal__cell--today":this.data.today,"vuecal__cell--out-of-scope":this.data.outOfScope,"vuecal__cell--before-min":this.isDisabled&&this.isBeforeMinDate,"vuecal__cell--after-max":this.isDisabled&&this.isAfterMaxDate,"vuecal__cell--disabled":this.isDisabled,"vuecal__cell--selected":this.isSelected,"vuecal__cell--highlighted":this.highlighted,"vuecal__cell--has-splits":this.splitsCount,"vuecal__cell--has-events":this.eventsCount}},cellStyles(){return{...this.cellWidth?{width:`${this.cellWidth}%`}:{}}},timelineVisible(){const{time:e,timeTo:t}=this.options;return this.data.today&&this.isWeekOrDayView&&e&&!this.allDay&&this.nowInMinutes<=t},todaysTimePosition(){if(!this.data.today||!this.options.time)return;const e=this.nowInMinutes-this.options.timeFrom;return Math.round(e*this.timeScale)},timeScale(){return this.options.timeCellHeight/this.options.timeStep}}},[["render",function(e,t,i,a,o,s){const l=H("event");return h(),k(ht,{class:j(["vuecal__cell",s.cellClasses]),name:`slide-fade--${s.transitionDirection}`,tag:"div",appear:i.options.transitions,style:R(s.cellStyles)},{default:u(()=>[(h(!0),m(x,null,O(s.splitsCount?s.splits:1,(n,d)=>(h(),m("div",{class:j(["vuecal__flex vuecal__cell-content",s.splitsCount&&s.splitClasses(n)]),key:i.options.transitions?`${s.view.id}-${i.data.content}-${d}`:d,"data-split":!!s.splitsCount&&n.id,column:"",tabindex:"0","aria-label":i.data.content,onFocus:t[0]||(t[0]=r=>s.onCellFocus(r)),onKeypress:t[1]||(t[1]=_e(r=>s.onCellkeyPressEnter(r),["enter"])),onTouchstart:r=>!s.isDisabled&&s.onCellTouchStart(r,s.splitsCount?n.id:null),onMousedown:r=>!s.isDisabled&&s.onCellMouseDown(r,s.splitsCount?n.id:null),onClick:t[2]||(t[2]=r=>!s.isDisabled&&s.onCellClick(r)),onDblclick:t[3]||(t[3]=r=>!s.isDisabled&&s.onCellDblClick(r)),onContextmenu:t[4]||(t[4]=r=>!s.isDisabled&&i.options.cellContextmenu&&s.onCellContextMenu(r)),onDragenter:t[5]||(t[5]=r=>!s.isDisabled&&i.editEvents.drag&&s.dnd&&s.dnd.cellDragEnter(r,e.$data,i.data.startDate)),onDragover:r=>!s.isDisabled&&i.editEvents.drag&&s.dnd&&s.dnd.cellDragOver(r,e.$data,i.data.startDate,s.splitsCount?n.id:null),onDragleave:t[6]||(t[6]=r=>!s.isDisabled&&i.editEvents.drag&&s.dnd&&s.dnd.cellDragLeave(r,e.$data,i.data.startDate)),onDrop:r=>!s.isDisabled&&i.editEvents.drag&&s.dnd&&s.dnd.cellDragDrop(r,e.$data,i.data.startDate,s.splitsCount?n.id:null)},[i.options.showTimeInCells&&i.options.time&&s.isWeekOrDayView&&!i.allDay?(h(),m("div",Ei,[(h(!0),m(x,null,O(s.vuecal.timeCells,(r,v)=>(h(),m("span",{class:"cell-time-label",key:v},b(r.label),1))),128))])):w("",!0),s.isWeekOrDayView&&!i.allDay&&s.specialHours.length?(h(!0),m(x,{key:1},O(s.specialHours,(r,v)=>(h(),m("div",{class:j(["vuecal__special-hours",`vuecal__special-hours--day${r.day} ${r.class}`]),style:R(`height: ${r.height}px;top: ${r.top}px`)},[r.label?(h(),m("div",{key:0,class:"special-hours-label",innerHTML:r.label},null,8,Ti)):w("",!0)],6))),256)):w("",!0),D(e.$slots,"cell-content",{events:s.events,selectCell:r=>s.selectCell(r,!0),split:!!s.splitsCount&&n}),s.eventsCount&&(s.isWeekOrDayView||s.view.id==="month"&&i.options.eventsOnMonthView)?(h(),m("div",Ci,[(h(!0),m(x,null,O(s.splitsCount?n.events:s.events,(r,v)=>(h(),k(l,{key:v,"cell-formatted-date":i.data.formattedDate,event:r,"all-day":i.allDay,"cell-events":s.splitsCount?n.events:s.events,overlaps:((s.splitsCount?n.overlaps[r._eid]:e.cellOverlaps[r._eid])||[]).overlaps,"event-position":((s.splitsCount?n.overlaps[r._eid]:e.cellOverlaps[r._eid])||[]).position,"overlaps-streak":s.splitsCount?n.overlapsStreak:e.cellOverlapsStreak},{event:u(({event:p,view:_})=>[D(e.$slots,"event",{view:_,event:p})]),_:2},1032,["cell-formatted-date","event","all-day","cell-events","overlaps","event-position","overlaps-streak"]))),128))])):w("",!0)],42,ki))),128)),s.timelineVisible?(h(),m("div",{class:"vuecal__now-line",style:R(`top: ${s.todaysTimePosition}px`),key:i.options.transitions?`${s.view.id}-now-line`:"now-line",title:s.utils.date.formatTime(s.vuecal.now)},null,12,Mi)):w("",!0)]),_:3},8,["class","name","appear","style"])}]]),xi={key:0,class:"vuecal__all-day-text",style:{width:"3em"}},Si=Z({inject:["vuecal","view","editEvents"],components:{"vuecal-cell":We},props:{options:{type:Object,required:!0},cells:{type:Array,required:!0},label:{type:String,required:!0},daySplits:{type:Array,default:()=>[]},shortEvents:{type:Boolean,default:!0},height:{type:String,default:""},cellOrSplitMinWidth:{type:Number,default:null}},computed:{hasCellOrSplitWidth(){return!!(this.options.minCellWidth||this.daySplits.length&&this.options.minSplitWidth)}}},[["render",function(e,t,i,a,o,s){const l=H("vuecal-cell");return h(),m("div",{class:"vuecal__flex vuecal__all-day",style:R(i.cellOrSplitMinWidth&&{height:i.height})},[i.cellOrSplitMinWidth?w("",!0):(h(),m("div",xi,[V("span",null,b(i.label),1)])),V("div",{class:j(["vuecal__flex vuecal__cells",`${s.view.id}-view`]),grow:"",style:R(i.cellOrSplitMinWidth?`min-width: ${i.cellOrSplitMinWidth}px`:"")},[(h(!0),m(x,null,O(i.cells,(n,d)=>(h(),k(l,{key:d,options:i.options,"edit-events":s.editEvents,data:n,"all-day":!0,"cell-width":i.options.hideWeekdays.length&&(s.vuecal.isWeekView||s.vuecal.isMonthView)&&s.vuecal.cellWidth,"min-timestamp":i.options.minTimestamp,"max-timestamp":i.options.maxTimestamp,"cell-splits":i.daySplits},{event:u(({event:r,view:v})=>[D(e.$slots,"event",{view:v,event:r})]),_:2},1032,["options","edit-events","data","cell-width","min-timestamp","max-timestamp","cell-splits"]))),128))],6)],4)}]]),Vi=["lang"],Oi=V("i",{class:"angle"},null,-1),Ai=V("i",{class:"angle"},null,-1),$i={class:"default"},Li={key:0,class:"vuecal__flex vuecal__body",grow:""},Hi=["onBlur","innerHTML"],Wi=["innerHTML"],ji=["innerHTML"],Ii={class:"vuecal__flex",row:"",grow:""},Pi={key:0,class:"vuecal__time-column"},Yi=V("span",{class:"vuecal__time-cell-line"},null,-1),Fi={class:"vuecal__time-cell-label"},Ri={key:1,class:"vuecal__flex vuecal__week-numbers",column:""},Bi=["wrap","column"],Ni=["onBlur","innerHTML"],zi=["innerHTML"],Ui=["innerHTML"],Gi=["wrap"],Ki=["innerHTML"],qi=["innerHTML"],Xi={key:2,class:"vuecal__cell-events-count"},Zi={key:3,class:"vuecal__no-event"},Ji=["onBlur","innerHTML"],Qi=["innerHTML"],es={key:2,class:"vuecal__event-time"},ts={key:0},is={key:1,class:"days-to-end"},ss=["innerHTML"],as={key:0,class:"vuecal__scrollbar-check"},ns=[V("div",null,null,-1)],ie={weekDays:Array(7).fill(""),weekDaysShort:[],months:Array(12).fill(""),years:"",year:"",month:"",week:"",day:"",today:"",noEvent:"",allDay:"",deleteEvent:"",createEvent:"",dateFormat:"dddd MMMM D, YYYY",am:"am",pm:"pm"},De=["years","year","month","week","day"],be=new class{constructor(e,t=!1){z(this,"texts",{}),z(this,"dateToMinutes",i=>60*i.getHours()+i.getMinutes()),F=this,this._texts=e,t||!Date||Date.prototype.addDays||this._initDatePrototypes()}_initDatePrototypes(){Date.prototype.addDays=function(e){return F.addDays(this,e)},Date.prototype.subtractDays=function(e){return F.subtractDays(this,e)},Date.prototype.addHours=function(e){return F.addHours(this,e)},Date.prototype.subtractHours=function(e){return F.subtractHours(this,e)},Date.prototype.addMinutes=function(e){return F.addMinutes(this,e)},Date.prototype.subtractMinutes=function(e){return F.subtractMinutes(this,e)},Date.prototype.getWeek=function(){return F.getWeek(this)},Date.prototype.isToday=function(){return F.isToday(this)},Date.prototype.isLeapYear=function(){return F.isLeapYear(this)},Date.prototype.format=function(e="YYYY-MM-DD"){return F.formatDate(this,e)},Date.prototype.formatTime=function(e="HH:mm"){return F.formatTime(this,e)}}removePrototypes(){delete Date.prototype.addDays,delete Date.prototype.subtractDays,delete Date.prototype.addHours,delete Date.prototype.subtractHours,delete Date.prototype.addMinutes,delete Date.prototype.subtractMinutes,delete Date.prototype.getWeek,delete Date.prototype.isToday,delete Date.prototype.isLeapYear,delete Date.prototype.format,delete Date.prototype.formatTime}updateTexts(e){this._texts=e}_todayFormatted(){return ye!==new Date().getDate()&&(Q=new Date,ye=Q.getDate(),fe=`${Q.getFullYear()}-${Q.getMonth()}-${Q.getDate()}`),fe}addDays(e,t){const i=new Date(e.valueOf());return i.setDate(i.getDate()+t),i}subtractDays(e,t){const i=new Date(e.valueOf());return i.setDate(i.getDate()-t),i}addHours(e,t){const i=new Date(e.valueOf());return i.setHours(i.getHours()+t),i}subtractHours(e,t){const i=new Date(e.valueOf());return i.setHours(i.getHours()-t),i}addMinutes(e,t){const i=new Date(e.valueOf());return i.setMinutes(i.getMinutes()+t),i}subtractMinutes(e,t){const i=new Date(e.valueOf());return i.setMinutes(i.getMinutes()-t),i}getWeek(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),i=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-i);const a=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t-a)/864e5+1)/7)}isToday(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`===this._todayFormatted()}isLeapYear(e){const t=e.getFullYear();return!(t%400)||t%100&&!(t%4)}getPreviousFirstDayOfWeek(e=null,t){const i=e&&new Date(e.valueOf())||new Date,a=t?7:6;return i.setDate(i.getDate()-(i.getDay()+a)%7),i}stringToDate(e){return e instanceof Date?e:(e.length===10&&(e+=" 00:00"),new Date(e.replace(/-/g,"/")))}countDays(e,t){typeof e=="string"&&(e=e.replace(/-/g,"/")),typeof t=="string"&&(t=t.replace(/-/g,"/")),e=new Date(e).setHours(0,0,0,0),t=new Date(t).setHours(0,0,1,0);const i=60*(new Date(t).getTimezoneOffset()-new Date(e).getTimezoneOffset())*1e3;return Math.ceil((t-e-i)/864e5)}datesInSameTimeStep(e,t,i){return Math.abs(e.getTime()-t.getTime())<=60*i*1e3}formatDate(e,t="YYYY-MM-DD",i=null){if(i||(i=this._texts),t||(t="YYYY-MM-DD"),t==="YYYY-MM-DD")return this.formatDateLite(e);ee={},q={};const a={YYYY:()=>this._hydrateDateObject(e,i).YYYY,YY:()=>this._hydrateDateObject(e,i).YY(),M:()=>this._hydrateDateObject(e,i).M,MM:()=>this._hydrateDateObject(e,i).MM(),MMM:()=>this._hydrateDateObject(e,i).MMM(),MMMM:()=>this._hydrateDateObject(e,i).MMMM(),MMMMG:()=>this._hydrateDateObject(e,i).MMMMG(),D:()=>this._hydrateDateObject(e,i).D,DD:()=>this._hydrateDateObject(e,i).DD(),S:()=>this._hydrateDateObject(e,i).S(),d:()=>this._hydrateDateObject(e,i).d,dd:()=>this._hydrateDateObject(e,i).dd(),ddd:()=>this._hydrateDateObject(e,i).ddd(),dddd:()=>this._hydrateDateObject(e,i).dddd(),HH:()=>this._hydrateTimeObject(e,i).HH,H:()=>this._hydrateTimeObject(e,i).H,hh:()=>this._hydrateTimeObject(e,i).hh,h:()=>this._hydrateTimeObject(e,i).h,am:()=>this._hydrateTimeObject(e,i).am,AM:()=>this._hydrateTimeObject(e,i).AM,mm:()=>this._hydrateTimeObject(e,i).mm,m:()=>this._hydrateTimeObject(e,i).m};return t.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,(o,s)=>{const l=a[s.replace(/\{|\}/g,"")];return l!==void 0?l():s})}formatDateLite(e){const t=e.getMonth()+1,i=e.getDate();return`${e.getFullYear()}-${t<10?"0":""}${t}-${i<10?"0":""}${i}`}formatTime(e,t="HH:mm",i=null,a=!1){let o=!1;if(a){const[n,d,r]=[e.getHours(),e.getMinutes(),e.getSeconds()];n+d+r===141&&(o=!0)}if(e instanceof Date&&t==="HH:mm")return o?"24:00":this.formatTimeLite(e);q={},i||(i=this._texts);const s=this._hydrateTimeObject(e,i),l=t.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,(n,d)=>{const r=s[d.replace(/\{|\}/g,"")];return r!==void 0?r:d});return o?l.replace("23:59","24:00"):l}formatTimeLite(e){const t=e.getHours(),i=e.getMinutes();return`${(t<10?"0":"")+t}:${(i<10?"0":"")+i}`}_nth(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}_hydrateDateObject(e,t){if(ee.D)return ee;const i=e.getFullYear(),a=e.getMonth()+1,o=e.getDate(),s=(e.getDay()-1+7)%7;return ee={YYYY:i,YY:()=>i.toString().substring(2),M:a,MM:()=>(a<10?"0":"")+a,MMM:()=>t.months[a-1].substring(0,3),MMMM:()=>t.months[a-1],MMMMG:()=>(t.monthsGenitive||t.months)[a-1],D:o,DD:()=>(o<10?"0":"")+o,S:()=>this._nth(o),d:s+1,dd:()=>t.weekDays[s][0],ddd:()=>t.weekDays[s].substr(0,3),dddd:()=>t.weekDays[s]},ee}_hydrateTimeObject(e,t){if(q.am)return q;let i,a;e instanceof Date?(i=e.getHours(),a=e.getMinutes()):(i=Math.floor(e/60),a=Math.floor(e%60));const o=i%12?i%12:12,s=(t||{am:"am",pm:"pm"})[i===24||i<12?"am":"pm"];return q={H:i,h:o,HH:(i<10?"0":"")+i,hh:(o<10?"0":"")+o,am:s,AM:s.toUpperCase(),m:a,mm:(a<10?"0":"")+a},q}}(ie),ls={name:"vue-cal",components:{"vuecal-cell":We,"vuecal-header":fi,WeekdaysHeadings:He,AllDayBar:Si},provide(){return{vuecal:this,utils:this.utils,modules:this.modules,previous:this.previous,next:this.next,switchView:this.switchView,updateSelectedDate:this.updateSelectedDate,editEvents:this.editEvents,view:this.view,domEvents:this.domEvents}},props:{activeView:{type:String,default:"week"},allDayBarHeight:{type:[String,Number],default:"25px"},cellClickHold:{type:Boolean,default:!0},cellContextmenu:{type:Boolean,default:!1},clickToNavigate:{type:Boolean,default:!1},dblclickToNavigate:{type:Boolean,default:!0},disableDatePrototypes:{type:Boolean,default:!1},disableDays:{type:Array,default:()=>[]},disableViews:{type:Array,default:()=>[]},dragToCreateEvent:{type:Boolean,default:!0},dragToCreateThreshold:{type:Number,default:15},editableEvents:{type:[Boolean,Object],default:!1},events:{type:Array,default:()=>[]},eventsCountOnYearView:{type:Boolean,default:!1},eventsOnMonthView:{type:[Boolean,String],default:!1},hideBody:{type:Boolean,default:!1},hideTitleBar:{type:Boolean,default:!1},hideViewSelector:{type:Boolean,default:!1},hideWeekdays:{type:Array,default:()=>[]},hideWeekends:{type:Boolean,default:!1},locale:{type:[String,Object],default:"en"},maxDate:{type:[String,Date],default:""},minCellWidth:{type:Number,default:0},minDate:{type:[String,Date],default:""},minEventWidth:{type:Number,default:0},minSplitWidth:{type:Number,default:0},onEventClick:{type:[Function,null],default:null},onEventCreate:{type:[Function,null],default:null},onEventDblclick:{type:[Function,null],default:null},overlapsPerTimeStep:{type:Boolean,default:!1},resizeX:{type:Boolean,default:!1},selectedDate:{type:[String,Date],default:""},showAllDayEvents:{type:[Boolean,String],default:!1},showTimeInCells:{type:Boolean,default:!1},showWeekNumbers:{type:[Boolean,String],default:!1},snapToTime:{type:Number,default:0},small:{type:Boolean,default:!1},specialHours:{type:Object,default:()=>({})},splitDays:{type:Array,default:()=>[]},startWeekOnSunday:{type:Boolean,default:!1},stickySplitLabels:{type:Boolean,default:!1},time:{type:Boolean,default:!0},timeCellHeight:{type:Number,default:40},timeFormat:{type:String,default:""},timeFrom:{type:Number,default:0},timeStep:{type:Number,default:60},timeTo:{type:Number,default:1440},todayButton:{type:Boolean,default:!1},transitions:{type:Boolean,default:!0},twelveHour:{type:Boolean,default:!1},watchRealTime:{type:Boolean,default:!1},xsmall:{type:Boolean,default:!1}},data(){return{ready:!1,texts:{...ie},utils:{date:!!this.disableDatePrototypes&&be.removePrototypes()||be,cell:null,event:null},modules:{dnd:null},cellsEl:null,view:{id:"",title:"",startDate:null,endDate:null,firstCellDate:null,lastCellDate:null,selectedDate:null,events:[]},eventIdIncrement:1,now:new Date,timeTickerIds:[null,null],domEvents:{resizeAnEvent:{_eid:null,start:null,split:null,segment:null,originalEndTimeMinutes:0,originalEnd:null,end:null,startCell:null,endCell:null},dragAnEvent:{_eid:null},dragCreateAnEvent:{startCursorY:null,start:null,split:null,event:null},focusAnEvent:{_eid:null,mousedUp:!1},clickHoldAnEvent:{_eid:null,timeout:1200,timeoutId:null},dblTapACell:{taps:0,timeout:500},clickHoldACell:{cellId:null,split:null,timeout:1200,timeoutId:null,eventCreated:!1},cancelClickEventCreation:!1},mutableEvents:[],transitionDirection:"right"}},methods:{async loadLocale(e){if(typeof this.locale=="object")return this.texts=Object.assign({},ie,e),void this.utils.date.updateTexts(this.texts);if(this.locale==="en"){const t=await g(()=>import("./en.es-713916b0.js"),[]);this.texts=Object.assign({},ie,t)}else((t,i)=>{const a=t[i];return a?typeof a=="function"?a():Promise.resolve(a):new Promise((o,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+i)))})})(Object.assign({"./i18n/ar.json":()=>g(()=>import("./ar.es-4173cb29.js"),[]),"./i18n/bg.json":()=>g(()=>import("./bg.es-3542f853.js"),[]),"./i18n/bn.json":()=>g(()=>import("./bn.es-55ab5212.js"),[]),"./i18n/bs.json":()=>g(()=>import("./bs.es-ba9dd541.js"),[]),"./i18n/ca.json":()=>g(()=>import("./ca.es-3f4af411.js"),[]),"./i18n/cs.json":()=>g(()=>import("./cs.es-4bf8e61a.js"),[]),"./i18n/da.json":()=>g(()=>import("./da.es-084484fb.js"),[]),"./i18n/de.json":()=>g(()=>import("./de.es-0185602c.js"),[]),"./i18n/el.json":()=>g(()=>import("./el.es-b3db55e7.js"),[]),"./i18n/en.json":()=>g(()=>import("./en.es-713916b0.js"),[]),"./i18n/es.json":()=>g(()=>import("./es.es-2f81ef8f.js"),[]),"./i18n/et.json":()=>g(()=>import("./et.es-feab242e.js"),[]),"./i18n/fa.json":()=>g(()=>import("./fa.es-e30ec481.js"),[]),"./i18n/fr.json":()=>g(()=>import("./fr.es-fd781cdb.js"),[]),"./i18n/he.json":()=>g(()=>import("./he.es-ab017da7.js"),[]),"./i18n/hr.json":()=>g(()=>import("./hr.es-8ff4208c.js"),[]),"./i18n/hu.json":()=>g(()=>import("./hu.es-a826dbea.js"),[]),"./i18n/id.json":()=>g(()=>import("./id.es-09894c24.js"),[]),"./i18n/is.json":()=>g(()=>import("./is.es-9608cdad.js"),[]),"./i18n/it.json":()=>g(()=>import("./it.es-8f484e02.js"),[]),"./i18n/ja.json":()=>g(()=>import("./ja.es-b7fc0eb9.js"),[]),"./i18n/ka.json":()=>g(()=>import("./ka.es-446e6e19.js"),[]),"./i18n/ko.json":()=>g(()=>import("./ko.es-45e7d699.js"),[]),"./i18n/lt.json":()=>g(()=>import("./lt.es-bc184482.js"),[]),"./i18n/mn.json":()=>g(()=>import("./mn.es-5fa17a96.js"),[]),"./i18n/nl.json":()=>g(()=>import("./nl.es-f5998f61.js"),[]),"./i18n/no.json":()=>g(()=>import("./no.es-7a7b8685.js"),[]),"./i18n/pl.json":()=>g(()=>import("./pl.es-2dc4cbea.js"),[]),"./i18n/pt-br.json":()=>g(()=>import("./pt-br.es-82c2bfad.js"),[]),"./i18n/ro.json":()=>g(()=>import("./ro.es-0b230c59.js"),[]),"./i18n/ru.json":()=>g(()=>import("./ru.es-3bc3c295.js"),[]),"./i18n/sk.json":()=>g(()=>import("./sk.es-477d958c.js"),[]),"./i18n/sl.json":()=>g(()=>import("./sl.es-7f9e39ca.js"),[]),"./i18n/sq.json":()=>g(()=>import("./sq.es-484abfbf.js"),[]),"./i18n/sr.json":()=>g(()=>import("./sr.es-79173882.js"),[]),"./i18n/sv.json":()=>g(()=>import("./sv.es-cc28424b.js"),[]),"./i18n/tr.json":()=>g(()=>import("./tr.es-73d31d0a.js"),[]),"./i18n/uk.json":()=>g(()=>import("./uk.es-72aa5132.js"),[]),"./i18n/vi.json":()=>g(()=>import("./vi.es-e48f04c7.js"),[]),"./i18n/zh-cn.json":()=>g(()=>import("./zh-cn.es-d3b0ce92.js"),[]),"./i18n/zh-hk.json":()=>g(()=>import("./zh-hk.es-f0804a56.js"),[])}),`./i18n/${e}.json`).then(t=>{this.texts=Object.assign({},ie,t.default),this.utils.date.updateTexts(this.texts)})},loadDragAndDrop(){g(()=>import("./drag-and-drop.es-801b9187.js"),[]).then(e=>{const{DragAndDrop:t}=e;this.modules.dnd=new t(this)}).catch(()=>console.warn("Vue Cal: Missing drag & drop module."))},validateView(e){return De.includes(e)||(console.error(`Vue Cal: invalid active-view parameter provided: "${e}".
A valid view must be one of: ${De.join(", ")}.`),e="week"),this.enabledViews.includes(e)||(console.warn(`Vue Cal: the provided active-view "${e}" is disabled. Using the "${this.enabledViews[0]}" view instead.`),e=this.enabledViews[0]),e},switchToNarrowerView(e=null){this.transitionDirection="right";const t=this.enabledViews[this.enabledViews.indexOf(this.view.id)+1];t&&this.switchView(t,e)},switchView(e,t=null,i=!1){e=this.validateView(e);const a=this.utils.date,o=this.view.startDate&&this.view.startDate.getTime();if(this.transitions&&i){if(this.view.id===e)return;const n=this.enabledViews;this.transitionDirection=n.indexOf(this.view.id)>n.indexOf(e)?"left":"right"}const s=this.view.id;switch(this.view.events=[],this.view.id=e,this.view.firstCellDate=null,this.view.lastCellDate=null,t||(t=this.view.selectedDate||this.view.startDate),e){case"years":this.view.startDate=new Date(25*Math.floor(t.getFullYear()/25)||2e3,0,1),this.view.endDate=new Date(this.view.startDate.getFullYear()+25,0,1),this.view.endDate.setSeconds(-1);break;case"year":this.view.startDate=new Date(t.getFullYear(),0,1),this.view.endDate=new Date(t.getFullYear()+1,0,1),this.view.endDate.setSeconds(-1);break;case"month":{this.view.startDate=new Date(t.getFullYear(),t.getMonth(),1),this.view.endDate=new Date(t.getFullYear(),t.getMonth()+1,1),this.view.endDate.setSeconds(-1);let n=new Date(this.view.startDate);if(n.getDay()!==(this.startWeekOnSunday?0:1)&&(n=a.getPreviousFirstDayOfWeek(n,this.startWeekOnSunday)),this.view.firstCellDate=n,this.view.lastCellDate=a.addDays(n,41),this.view.lastCellDate.setHours(23,59,59,0),this.hideWeekends){if([0,6].includes(this.view.firstCellDate.getDay())){const d=this.view.firstCellDate.getDay()!==6||this.startWeekOnSunday?1:2;this.view.firstCellDate=a.addDays(this.view.firstCellDate,d)}if([0,6].includes(this.view.startDate.getDay())){const d=this.view.startDate.getDay()===6?2:1;this.view.startDate=a.addDays(this.view.startDate,d)}if([0,6].includes(this.view.lastCellDate.getDay())){const d=this.view.lastCellDate.getDay()!==0||this.startWeekOnSunday?1:2;this.view.lastCellDate=a.subtractDays(this.view.lastCellDate,d)}if([0,6].includes(this.view.endDate.getDay())){const d=this.view.endDate.getDay()===0?2:1;this.view.endDate=a.subtractDays(this.view.endDate,d)}}break}case"week":{t=a.getPreviousFirstDayOfWeek(t,this.startWeekOnSunday);const n=this.hideWeekends?5:7;this.view.startDate=this.hideWeekends&&this.startWeekOnSunday?a.addDays(t,1):t,this.view.startDate.setHours(0,0,0,0),this.view.endDate=a.addDays(t,n),this.view.endDate.setSeconds(-1);break}case"day":this.view.startDate=t,this.view.startDate.setHours(0,0,0,0),this.view.endDate=new Date(t),this.view.endDate.setHours(23,59,59,0)}this.addEventsToView();const l=this.view.startDate&&this.view.startDate.getTime();if((s!==e||l!==o)&&(this.$emit("update:activeView",e),this.ready)){const n=this.view.startDate,d={view:e,startDate:n,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate,outOfScopeEvents:this.view.outOfScopeEvents.map(this.cleanupEvent)}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:a.getWeek(this.startWeekOnSunday?a.addDays(n,1):n)}:{}};this.$emit("view-change",d)}},previous(){this.previousNext(!1)},next(){this.previousNext()},previousNext(e=!0){const t=this.utils.date;this.transitionDirection=e?"right":"left";const i=e?1:-1;let a=null;const{startDate:o,id:s}=this.view;switch(s){case"years":a=new Date(o.getFullYear()+25*i,0,1);break;case"year":a=new Date(o.getFullYear()+1*i,1,1);break;case"month":a=new Date(o.getFullYear(),o.getMonth()+1*i,1);break;case"week":a=t[e?"addDays":"subtractDays"](t.getPreviousFirstDayOfWeek(o,this.startWeekOnSunday),7);break;case"day":a=t[e?"addDays":"subtractDays"](o,1);const l=a.getDay(),n=this.startWeekOnSunday?l:(l||7)-1;if(this.weekDays[n].hide){const d=this.weekDays.map((v,p)=>({...v,i:p}));let r=0;e?([...d.slice(n),...d].find(v=>(r++,!v.hide)).i,r--):[...d,...d.slice(0,n)].reverse().find(v=>(r++,!v.hide)).i,a=t[e?"addDays":"subtractDays"](a,r)}}a&&this.switchView(s,a)},addEventsToView(e=[]){const t=this.utils.event,{startDate:i,endDate:a,firstCellDate:o,lastCellDate:s}=this.view;if(e.length||(this.view.events=[]),!(e=e.length?e:[...this.mutableEvents])||this.isYearsOrYearView&&!this.eventsCountOnYearView)return;let l=e.filter(n=>t.eventInRange(n,i,a));this.isYearsOrYearView||this.isMonthView&&!this.eventsOnMonthView||(l=l.map(n=>n.daysCount>1?t.createEventSegments(n,o||i,s||a):n)),this.view.events.push(...l),this.isMonthView&&(this.view.outOfScopeEvents=[],e.forEach(n=>{(t.eventInRange(n,o,i)||t.eventInRange(n,a,s))&&(this.view.events.some(d=>d._eid===n._eid)||this.view.outOfScopeEvents.push(n))}))},findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e},isDOMElementAnEvent(e){return e.classList.contains("vuecal__event")||this.findAncestor(e,"vuecal__event")},onMouseMove(e){const{resizeAnEvent:t,dragAnEvent:i,dragCreateAnEvent:a}=this.domEvents;(t._eid!==null||i._eid!==null||a.start)&&(e.preventDefault(),t._eid?this.eventResizing(e):this.dragToCreateEvent&&a.start&&this.eventDragCreation(e))},onMouseUp(e){const{focusAnEvent:t,resizeAnEvent:i,clickHoldAnEvent:a,clickHoldACell:o,dragCreateAnEvent:s}=this.domEvents,{_eid:l}=a,{_eid:n}=i;let d=!1;const{event:r,start:v}=s,p=this.isDOMElementAnEvent(e.target),_=t.mousedUp;if(t.mousedUp=!1,p&&(this.domEvents.cancelClickEventCreation=!0),o.eventCreated)return;if(n){const{originalEnd:E,originalEndTimeMinutes:Y,endTimeMinutes:N}=i,y=this.view.events.find(W=>W._eid===i._eid);if(d=N&&N!==Y,y&&y.end.getTime()!==E.getTime()){const W=this.mutableEvents.find(G=>G._eid===i._eid);W.endTimeMinutes=y.endTimeMinutes,W.end=y.end;const A=this.cleanupEvent(y),L={...this.cleanupEvent(y),end:E,endTimeMinutes:y.originalEndTimeMinutes};this.$emit("event-duration-change",{event:A,oldDate:i.originalEnd,originalEvent:L}),this.$emit("event-change",{event:A,originalEvent:L})}y&&(y.resizing=!1),i._eid=null,i.start=null,i.split=null,i.segment=null,i.originalEndTimeMinutes=null,i.originalEnd=null,i.endTimeMinutes=null,i.startCell=null,i.endCell=null}else v&&(r&&(this.emitWithEvent("event-drag-create",r),s.event.resizing=!1),s.start=null,s.split=null,s.event=null);p||n||this.unfocusEvent(),a.timeoutId&&!l&&(clearTimeout(a.timeoutId),a.timeoutId=null),o.timeoutId&&(clearTimeout(o.timeoutId),o.timeoutId=null);const I=typeof this.onEventClick=="function";if(_&&!d&&!l&&!r&&I){let E=this.view.events.find(Y=>Y._eid===t._eid);return!E&&this.isMonthView&&(E=this.view.outOfScopeEvents.find(Y=>Y._eid===t._eid)),E&&this.onEventClick(E,e)}},onKeyUp(e){e.keyCode===27&&this.cancelDelete()},eventResizing(e){const{resizeAnEvent:t}=this.domEvents,i=this.view.events.find(r=>r._eid===t._eid)||{segments:{}},{minutes:a,cursorCoords:o}=this.minutesAtCursor(e),s=i.segments&&i.segments[t.segment],{date:l,event:n}=this.utils,d=Math.max(a,this.timeFrom+1,(s||i).startTimeMinutes+1);if(i.endTimeMinutes=t.endTimeMinutes=d,this.snapToTime){const r=i.endTimeMinutes+this.snapToTime/2;i.endTimeMinutes=r-r%this.snapToTime}if(s&&(s.endTimeMinutes=i.endTimeMinutes),i.end.setHours(0,i.endTimeMinutes,i.endTimeMinutes===1440?-1:0,0),this.resizeX&&this.isWeekView){i.daysCount=l.countDays(i.start,i.end);const r=this.cellsEl,v=r.offsetWidth/r.childElementCount,p=Math.floor(o.x/v);if(t.startCell===null&&(t.startCell=p-(i.daysCount-1)),t.endCell!==p){t.endCell=p;const _=l.addDays(i.start,p-t.startCell),I=Math.max(l.countDays(i.start,_),1);if(I!==i.daysCount){let E=null;E=I>i.daysCount?n.addEventSegment(i):n.removeEventSegment(i),t.segment=E,i.endTimeMinutes+=.001}}}this.$emit("event-resizing",{_eid:i._eid,end:i.end,endTimeMinutes:i.endTimeMinutes})},eventDragCreation(e){const{dragCreateAnEvent:t}=this.domEvents,{start:i,startCursorY:a,split:o}=t,s=new Date(i),{minutes:l,cursorCoords:{y:n}}=this.minutesAtCursor(e);if(t.event||!(Math.abs(a-n)<this.dragToCreateThreshold))if(t.event){if(s.setHours(0,l,l===1440?-1:0,0),this.snapToTime){let v=60*s.getHours()+s.getMinutes();const p=v+this.snapToTime/2;v=p-p%this.snapToTime,s.setHours(0,v,0,0)}const d=i<s,{event:r}=t;r.start=d?i:s,r.end=d?s:i,r.startTimeMinutes=60*r.start.getHours()+r.start.getMinutes(),r.endTimeMinutes=60*r.end.getHours()+r.end.getMinutes()}else{if(t.event=this.utils.event.createAnEvent(i,1,{split:o}),!t.event)return t.start=null,t.split=null,void(t.event=null);t.event.resizing=!0}},unfocusEvent(){const{focusAnEvent:e,clickHoldAnEvent:t}=this.domEvents,i=this.view.events.find(a=>a._eid===(e._eid||t._eid));e._eid=null,t._eid=null,i&&(i.focused=!1,i.deleting=!1)},cancelDelete(){const{clickHoldAnEvent:e}=this.domEvents;if(e._eid){const t=this.view.events.find(i=>i._eid===e._eid);t&&(t.deleting=!1),e._eid=null,e.timeoutId=null}},onEventTitleBlur(e,t){if(t.title===e.target.innerHTML)return;const i=t.title;t.title=e.target.innerHTML;const a=this.cleanupEvent(t);this.$emit("event-title-change",{event:a,oldTitle:i}),this.$emit("event-change",{event:a,originalEvent:{...a,title:i}})},updateMutableEvents(){const e=this.utils.date;this.mutableEvents=[],this.events.forEach(t=>{const i=typeof t.start=="string"?e.stringToDate(t.start):t.start,a=e.formatDateLite(i),o=e.dateToMinutes(i);let s=null;typeof t.end=="string"&&t.end.includes("24:00")?(s=new Date(t.end.replace(" 24:00","")),s.setHours(23,59,59,0)):s=typeof t.end=="string"?e.stringToDate(t.end):t.end;let l=e.formatDateLite(s),n=e.dateToMinutes(s);n&&n!==1440||(!this.time||typeof t.end=="string"&&t.end.length===10?s.setHours(23,59,59,0):s.setSeconds(s.getSeconds()-1),l=e.formatDateLite(s),n=1440);const d=a!==l;t=Object.assign({...this.utils.event.eventDefaults},t,{_eid:`${this._.uid}_${this.eventIdIncrement++}`,segments:d?{}:null,start:i,startTimeMinutes:o,end:s,endTimeMinutes:n,daysCount:d?e.countDays(i,s):1,class:t.class}),this.mutableEvents.push(t)})},minutesAtCursor(e){return this.utils.cell.minutesAtCursor(e)},createEvent(e,t,i={}){return this.utils.event.createAnEvent(e,t,i)},cleanupEvent(e){return e={...e},["segments","deletable","deleting","titleEditable","resizable","resizing","draggable","dragging","draggingStatic","focused"].forEach(t=>{t in e&&delete e[t]}),e.repeat||delete e.repeat,e},emitWithEvent(e,t){this.$emit(e,this.cleanupEvent(t))},updateSelectedDate(e){if((e=e&&typeof e=="string"?this.utils.date.stringToDate(e):new Date(e))&&e instanceof Date){const{selectedDate:t}=this.view;t&&(this.transitionDirection=t.getTime()>e.getTime()?"left":"right"),e.setHours(0,0,0,0),t&&t.getTime()===e.getTime()||(this.view.selectedDate=e),this.switchView(this.view.id)}this.$emit("update:selected-date",this.view.selectedDate)},getWeekNumber(e){const t=this.utils.date,i=this.firstCellDateWeekNumber+e,a=this.startWeekOnSunday?1:0;return i>52?t.getWeek(t.addDays(this.view.firstCellDate,7*e+a)):i},timeTick(){this.now=new Date,this.timeTickerIds[1]=setTimeout(this.timeTick,6e4)},updateDateTexts(){this.utils.date.updateTexts(this.texts)},alignWithScrollbar(){if(document.getElementById("vuecal-align-with-scrollbar"))return;const e=this.$refs.vuecal.getElementsByClassName("vuecal__scrollbar-check")[0],t=e.offsetWidth-e.children[0].offsetWidth;if(t){const i=document.createElement("style");i.id="vuecal-align-with-scrollbar",i.type="text/css",i.innerHTML=`.vuecal--view-with-time .vuecal__weekdays-headings,.vuecal--view-with-time .vuecal__all-day {padding-right: ${t}px}`,document.head.appendChild(i)}},cellOrSplitHasEvents:(e,t=null)=>e.length&&(!t&&e.length||t&&e.some(i=>i.split===t.id))},created(){this.utils.cell=new ii(this),this.utils.event=new si(this,this.utils.date),this.loadLocale(this.locale),this.editEvents.drag&&this.loadDragAndDrop(),this.updateMutableEvents(this.events),this.view.id=this.currentView,this.selectedDate?this.updateSelectedDate(this.selectedDate):(this.view.selectedDate=new Date,this.switchView(this.currentView)),this.time&&this.watchRealTime&&(this.timeTickerIds[0]=setTimeout(this.timeTick,1e3*(60-this.now.getSeconds())))},mounted(){const e=this.utils.date,t="ontouchstart"in window,{resize:i,drag:a,create:o,delete:s,title:l}=this.editEvents,n=this.onEventClick&&typeof this.onEventClick=="function";(i||a||o||s||l||n)&&window.addEventListener(t?"touchend":"mouseup",this.onMouseUp),(i||a||o&&this.dragToCreateEvent)&&window.addEventListener(t?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),l&&window.addEventListener("keyup",this.onKeyUp),t&&(this.$refs.vuecal.oncontextmenu=function(v){v.preventDefault(),v.stopPropagation()}),this.hideBody||this.alignWithScrollbar();const d=this.view.startDate,r={view:this.view.id,startDate:d,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:e.getWeek(this.startWeekOnSunday?e.addDays(d,1):d)}:{}};this.$emit("ready",r),this.ready=!0},beforeUnmount(){const e="ontouchstart"in window;window.removeEventListener(e?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),window.removeEventListener(e?"touchend":"mouseup",this.onMouseUp),window.removeEventListener("keyup",this.onKeyUp),this.timeTickerIds[0]&&clearTimeout(this.timeTickerIds[0]),this.timeTickerIds[1]&&clearTimeout(this.timeTickerIds[1]),this.timeTickerIds=[null,null]},computed:{editEvents(){return this.editableEvents&&typeof this.editableEvents=="object"?{title:!!this.editableEvents.title,drag:!!this.editableEvents.drag,resize:!!this.editableEvents.resize,create:!!this.editableEvents.create,delete:!!this.editableEvents.delete}:{title:!!this.editableEvents,drag:!!this.editableEvents,resize:!!this.editableEvents,create:!!this.editableEvents,delete:!!this.editableEvents}},views(){return{years:{label:this.texts.years,enabled:!this.disableViews.includes("years")},year:{label:this.texts.year,enabled:!this.disableViews.includes("year")},month:{label:this.texts.month,enabled:!this.disableViews.includes("month")},week:{label:this.texts.week,enabled:!this.disableViews.includes("week")},day:{label:this.texts.day,enabled:!this.disableViews.includes("day")}}},currentView(){return this.validateView(this.activeView)},enabledViews(){return Object.keys(this.views).filter(e=>this.views[e].enabled)},hasTimeColumn(){return this.time&&this.isWeekOrDayView},isShortMonthView(){return this.isMonthView&&this.eventsOnMonthView==="short"},firstCellDateWeekNumber(){const e=this.utils.date,t=this.view.firstCellDate;return e.getWeek(this.startWeekOnSunday?e.addDays(t,1):t)},timeCells(){const e=[];for(let t=this.timeFrom,i=this.timeTo;t<i;t+=this.timeStep)e.push({hours:Math.floor(t/60),minutes:t%60,label:this.utils.date.formatTime(t,this.TimeFormat),value:t});return e},TimeFormat(){return this.timeFormat||(this.twelveHour?"h:mm{am}":"HH:mm")},daySplits(){return(this.splitDays.filter(e=>!e.hide)||[]).map((e,t)=>({...e,id:e.id||t+1}))},hasSplits(){return this.daySplits.length&&this.isWeekOrDayView},hasShortEvents(){return this.showAllDayEvents==="short"},cellOrSplitMinWidth(){let e=null;return this.hasSplits&&this.minSplitWidth?e=this.visibleDaysCount*this.minSplitWidth*this.daySplits.length:this.minCellWidth&&this.isWeekView&&(e=this.visibleDaysCount*this.minCellWidth),e},allDayBar(){let e=this.allDayBarHeight||null;return e&&!isNaN(e)&&(e+="px"),{cells:this.viewCells,options:this.$props,label:this.texts.allDay,shortEvents:this.hasShortEvents,daySplits:this.hasSplits&&this.daySplits||[],cellOrSplitMinWidth:this.cellOrSplitMinWidth,height:e}},minTimestamp(){let e=null;return this.minDate&&typeof this.minDate=="string"?e=this.utils.date.stringToDate(this.minDate):this.minDate&&this.minDate instanceof Date&&(e=this.minDate),e?e.getTime():null},maxTimestamp(){let e=null;return this.maxDate&&typeof this.maxDate=="string"?e=this.utils.date.stringToDate(this.maxDate):this.maxDate&&this.minDate instanceof Date&&(e=this.maxDate),e?e.getTime():null},weekDays(){let{weekDays:e,weekDaysShort:t=[]}=this.texts;return e=e.slice(0).map((i,a)=>({label:i,...t.length?{short:t[a]}:{},hide:this.hideWeekends&&a>=5||this.hideWeekdays.length&&this.hideWeekdays.includes(a+1)})),this.startWeekOnSunday&&e.unshift(e.pop()),e},weekDaysInHeader(){return this.isMonthView||this.isWeekView&&!this.minCellWidth&&!(this.hasSplits&&this.minSplitWidth)},months(){return this.texts.months.map(e=>({label:e}))},specialDayHours(){return this.specialHours&&Object.keys(this.specialHours).length?Array(7).fill("").map((e,t)=>{let i=this.specialHours[t+1]||[];return Array.isArray(i)||(i=[i]),e=[],i.forEach(({from:a,to:o,class:s,label:l},n)=>{e[n]={day:t+1,from:[null,void 0].includes(a)?null:1*a,to:[null,void 0].includes(o)?null:1*o,class:s||"",label:l||""}}),e}):{}},viewTitle(){const e=this.utils.date;let t="";const i=this.view.startDate,a=i.getFullYear(),o=i.getMonth();switch(this.view.id){case"years":t=this.texts.years;break;case"year":t=a;break;case"month":t=`${this.months[o].label} ${a}`;break;case"week":{const s=this.view.endDate,l=i.getFullYear();let n=this.texts.months[i.getMonth()];this.xsmall&&(n=n.substring(0,3));let d=`${n} ${l}`;if(s.getMonth()!==i.getMonth()){const r=s.getFullYear();let v=this.texts.months[s.getMonth()];this.xsmall&&(v=v.substring(0,3)),d=l===r?`${n} - ${v} ${l}`:this.small?`${n.substring(0,3)} ${l} - ${v.substring(0,3)} ${r}`:`${n} ${l} - ${v} ${r}`}t=`${this.texts.week} ${e.getWeek(this.startWeekOnSunday?e.addDays(i,1):i)} (${d})`;break}case"day":t=this.utils.date.formatDate(i,this.texts.dateFormat,this.texts)}return t},viewCells(){const e=this.utils.date;let t=[],i=null,a=!1;this.watchRealTime||(this.now=new Date);const o=this.now;switch(this.view.id){case"years":i=this.view.startDate.getFullYear(),t=Array.apply(null,Array(25)).map((s,l)=>{const n=new Date(i+l,0,1),d=new Date(i+l+1,0,1);return d.setSeconds(-1),{startDate:n,formattedDate:e.formatDateLite(n),endDate:d,content:i+l,current:i+l===o.getFullYear()}});break;case"year":i=this.view.startDate.getFullYear(),t=Array.apply(null,Array(12)).map((s,l)=>{const n=new Date(i,l,1),d=new Date(i,l+1,1);return d.setSeconds(-1),{startDate:n,formattedDate:e.formatDateLite(n),endDate:d,content:this.xsmall?this.months[l].label.substr(0,3):this.months[l].label,current:l===o.getMonth()&&i===o.getFullYear()}});break;case"month":{const s=this.view.startDate.getMonth(),l=new Date(this.view.firstCellDate);a=!1,t=Array.apply(null,Array(42)).map((n,d)=>{const r=e.addDays(l,d),v=new Date(r);v.setHours(23,59,59,0);const p=!a&&e.isToday(r)&&!a++;return{startDate:r,formattedDate:e.formatDateLite(r),endDate:v,content:r.getDate(),today:p,outOfScope:r.getMonth()!==s,class:`vuecal__cell--day${r.getDay()||7}`}}),(this.hideWeekends||this.hideWeekdays.length)&&(t=t.filter(n=>{const d=n.startDate.getDay()||7;return!(this.hideWeekends&&d>=6||this.hideWeekdays.length&&this.hideWeekdays.includes(d))}));break}case"week":{a=!1;const s=this.view.startDate,l=this.weekDays;t=l.map((n,d)=>{const r=e.addDays(s,this.startWeekOnSunday?d-1:d),v=new Date(r);v.setHours(23,59,59,0);const p=(r.getDay()||7)-1;return{startDate:r,formattedDate:e.formatDateLite(r),endDate:v,today:!a&&e.isToday(r)&&!a++,specialHours:this.specialDayHours[p]||[]}}).filter((n,d)=>!l[d].hide);break}case"day":{const s=this.view.startDate,l=new Date(this.view.startDate);l.setHours(23,59,59,0);const n=(s.getDay()||7)-1;t=[{startDate:s,formattedDate:e.formatDateLite(s),endDate:l,today:e.isToday(s),specialHours:this.specialDayHours[n]||[]}];break}}return t},visibleDaysCount(){return this.isDayView?1:7-this.weekDays.reduce((e,t)=>e+t.hide,0)},cellWidth(){return 100/this.visibleDaysCount},cssClasses(){const{resizeAnEvent:e,dragAnEvent:t,dragCreateAnEvent:i}=this.domEvents;return{[`vuecal--${this.view.id}-view`]:!0,[`vuecal--${this.locale}`]:this.locale,"vuecal--no-time":!this.time,"vuecal--view-with-time":this.hasTimeColumn,"vuecal--week-numbers":this.showWeekNumbers&&this.isMonthView,"vuecal--twelve-hour":this.twelveHour,"vuecal--click-to-navigate":this.clickToNavigate,"vuecal--hide-weekends":this.hideWeekends,"vuecal--split-days":this.hasSplits,"vuecal--sticky-split-labels":this.hasSplits&&this.stickySplitLabels,"vuecal--overflow-x":this.minCellWidth&&this.isWeekView||this.hasSplits&&this.minSplitWidth,"vuecal--small":this.small,"vuecal--xsmall":this.xsmall,"vuecal--resizing-event":e._eid,"vuecal--drag-creating-event":i.event,"vuecal--dragging-event":t._eid,"vuecal--events-on-month-view":this.eventsOnMonthView,"vuecal--short-events":this.isMonthView&&this.eventsOnMonthView==="short","vuecal--has-touch":typeof window<"u"&&"ontouchstart"in window}},isYearsOrYearView(){return["years","year"].includes(this.view.id)},isYearsView(){return this.view.id==="years"},isYearView(){return this.view.id==="year"},isMonthView(){return this.view.id==="month"},isWeekOrDayView(){return["week","day"].includes(this.view.id)},isWeekView(){return this.view.id==="week"},isDayView(){return this.view.id==="day"}},watch:{events:{handler(e,t){this.updateMutableEvents(e),this.addEventsToView()},deep:!0},locale(e){this.loadLocale(e)},selectedDate(e){this.updateSelectedDate(e)},activeView(e){this.switchView(e)}}},os=Z(ls,[["render",function(e,t,i,a,o,s){const l=H("vuecal-header"),n=H("all-day-bar"),d=H("weekdays-headings"),r=H("vuecal-cell");return h(),m("div",{class:j(["vuecal__flex vuecal",s.cssClasses]),column:"",ref:"vuecal",lang:i.locale},[c(l,{options:e.$props,"edit-events":s.editEvents,"view-props":{views:s.views,weekDaysInHeader:s.weekDaysInHeader},"week-days":s.weekDays,"has-splits":s.hasSplits,"day-splits":s.daySplits,"switch-to-narrower-view":s.switchToNarrowerView},he({"arrow-prev":u(()=>[D(e.$slots,"arrow-prev",{},()=>[S(" "),Oi,S(" ")])]),"arrow-next":u(()=>[D(e.$slots,"arrow-next",{},()=>[S(" "),Ai,S(" ")])]),"today-button":u(()=>[D(e.$slots,"today-button",{},()=>[V("span",$i,b(o.texts.today),1)])]),title:u(()=>[D(e.$slots,"title",{title:s.viewTitle,view:o.view},()=>[S(b(s.viewTitle),1)])]),_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:u(({heading:v,view:p})=>[D(e.$slots,"weekday-heading",{heading:v,view:p})]),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:u(({split:v})=>[D(e.$slots,"split-label",{split:v,view:o.view.id})]),key:"1"}:void 0]),1032,["options","edit-events","view-props","week-days","has-splits","day-splits","switch-to-narrower-view"]),i.hideBody?w("",!0):(h(),m("div",Li,[c(re,{name:`slide-fade--${o.transitionDirection}`,appear:i.transitions},{default:u(()=>[(h(),m("div",{class:"vuecal__flex",style:{"min-width":"100%"},key:!!i.transitions&&o.view.id,column:""},[i.showAllDayEvents&&s.hasTimeColumn&&(!s.cellOrSplitMinWidth||s.isDayView&&!i.minSplitWidth)?(h(),k(n,ge(de({key:0},s.allDayBar)),{event:u(({event:v,view:p})=>[D(e.$slots,"event",{view:p,event:v},()=>[s.editEvents.title&&v.titleEditable?(h(),m("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:_=>s.onEventTitleBlur(_,v),innerHTML:v.title},null,40,Hi)):v.title?(h(),m("div",{key:1,class:"vuecal__event-title",innerHTML:v.title},null,8,Wi)):w("",!0),!v.content||s.hasShortEvents||s.isShortMonthView?w("",!0):(h(),m("div",{key:2,class:"vuecal__event-content",innerHTML:v.content},null,8,ji))])]),_:3},16)):w("",!0),V("div",{class:j(["vuecal__bg",{vuecal__flex:!s.hasTimeColumn}]),column:""},[V("div",Ii,[s.hasTimeColumn?(h(),m("div",Pi,[i.showAllDayEvents&&s.cellOrSplitMinWidth&&(!s.isDayView||i.minSplitWidth)?(h(),m("div",{key:0,class:"vuecal__all-day-text",style:R({height:s.allDayBar.height})},[V("span",null,b(o.texts.allDay),1)],4)):w("",!0),(h(!0),m(x,null,O(s.timeCells,(v,p)=>(h(),m("div",{class:"vuecal__time-cell",key:p,style:R(`height: ${i.timeCellHeight}px`)},[D(e.$slots,"time-cell",{hours:v.hours,minutes:v.minutes},()=>[Yi,V("span",Fi,b(v.label),1)])],4))),128))])):w("",!0),i.showWeekNumbers&&s.isMonthView?(h(),m("div",Ri,[(h(),m(x,null,O(6,v=>V("div",{class:"vuecal__flex vuecal__week-number-cell",key:v,grow:""},[D(e.$slots,"week-number-cell",{week:s.getWeekNumber(v-1)},()=>[S(b(s.getWeekNumber(v-1)),1)])])),64))])):w("",!0),V("div",{class:j(["vuecal__flex vuecal__cells",`${o.view.id}-view`]),grow:"",wrap:!s.cellOrSplitMinWidth||!s.isWeekView,column:!!s.cellOrSplitMinWidth},[s.cellOrSplitMinWidth&&s.isWeekView?(h(),k(d,{key:0,"transition-direction":o.transitionDirection,"week-days":s.weekDays,"switch-to-narrower-view":s.switchToNarrowerView,style:R(s.cellOrSplitMinWidth?`min-width: ${s.cellOrSplitMinWidth}px`:"")},he({_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:u(({heading:v,view:p})=>[D(e.$slots,"weekday-heading",{heading:v,view:p})]),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:u(({split:v})=>[D(e.$slots,"split-label",{split:v,view:o.view.id})]),key:"1"}:void 0]),1032,["transition-direction","week-days","switch-to-narrower-view","style"])):s.hasSplits&&i.stickySplitLabels&&i.minSplitWidth?(h(),m("div",{key:1,class:"vuecal__flex vuecal__split-days-headers",style:R(s.cellOrSplitMinWidth?`min-width: ${s.cellOrSplitMinWidth}px`:"")},[(h(!0),m(x,null,O(s.daySplits,(v,p)=>(h(),m("div",{class:j(["day-split-header",v.class||!1]),key:p},[D(e.$slots,"split-label",{split:v,view:o.view.id},()=>[S(b(v.label),1)])],2))),128))],4)):w("",!0),i.showAllDayEvents&&s.hasTimeColumn&&(s.isWeekView&&s.cellOrSplitMinWidth||s.isDayView&&s.hasSplits&&i.minSplitWidth)?(h(),k(n,ge(de({key:2},s.allDayBar)),{event:u(({event:v,view:p})=>[D(e.$slots,"event",{view:p,event:v},()=>[s.editEvents.title&&v.titleEditable?(h(),m("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:_=>s.onEventTitleBlur(_,v),innerHTML:v.title},null,40,Ni)):v.title?(h(),m("div",{key:1,class:"vuecal__event-title",innerHTML:v.title},null,8,zi)):w("",!0),!v.content||s.hasShortEvents||s.isShortMonthView?w("",!0):(h(),m("div",{key:2,class:"vuecal__event-content",innerHTML:v.content},null,8,Ui))])]),_:3},16)):w("",!0),V("div",{class:"vuecal__flex",ref:v=>o.cellsEl=v,grow:"",wrap:!s.cellOrSplitMinWidth||!s.isWeekView,style:R(s.cellOrSplitMinWidth?`min-width: ${s.cellOrSplitMinWidth}px`:"")},[(h(!0),m(x,null,O(s.viewCells,(v,p)=>(h(),k(r,{key:p,options:e.$props,"edit-events":s.editEvents,data:v,"cell-width":i.hideWeekdays.length&&(s.isWeekView||s.isMonthView)&&s.cellWidth,"min-timestamp":s.minTimestamp,"max-timestamp":s.maxTimestamp,"cell-splits":s.hasSplits&&s.daySplits||[]},{"cell-content":u(({events:_,split:I,selectCell:E})=>[D(e.$slots,"cell-content",{cell:v,view:o.view,goNarrower:E,events:_},()=>[I&&!i.stickySplitLabels?(h(),m("div",{key:0,class:"split-label",innerHTML:I.label},null,8,Ki)):w("",!0),v.content?(h(),m("div",{key:1,class:"vuecal__cell-date",innerHTML:v.content},null,8,qi)):w("",!0),(s.isMonthView&&!i.eventsOnMonthView||s.isYearsOrYearView&&i.eventsCountOnYearView)&&_.length?(h(),m("div",Xi,[D(e.$slots,"events-count",{view:o.view,events:_},()=>[S(b(_.length),1)])])):w("",!0),!s.cellOrSplitHasEvents(_,I)&&s.isWeekOrDayView?(h(),m("div",Zi,[D(e.$slots,"no-event",{},()=>[S(b(o.texts.noEvent),1)])])):w("",!0)])]),event:u(({event:_,view:I})=>[D(e.$slots,"event",{view:I,event:_},()=>[s.editEvents.title&&_.titleEditable?(h(),m("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:E=>s.onEventTitleBlur(E,_),innerHTML:_.title},null,40,Ji)):_.title?(h(),m("div",{key:1,class:"vuecal__event-title",innerHTML:_.title},null,8,Qi)):w("",!0),!i.time||_.allDay||s.isMonthView&&(_.allDay||i.showAllDayEvents==="short")||s.isShortMonthView?w("",!0):(h(),m("div",es,[S(b(o.utils.date.formatTime(_.start,s.TimeFormat)),1),_.endTimeMinutes?(h(),m("span",ts," - "+b(o.utils.date.formatTime(_.end,s.TimeFormat,null,!0)),1)):w("",!0),_.daysCount>1&&(_.segments[v.formattedDate]||{}).isFirstDay?(h(),m("small",is," +"+b(_.daysCount-1)+b((o.texts.day[0]||"").toLowerCase()),1)):w("",!0)])),!_.content||s.isMonthView&&_.allDay&&i.showAllDayEvents==="short"||s.isShortMonthView?w("",!0):(h(),m("div",{key:3,class:"vuecal__event-content",innerHTML:_.content},null,8,ss))])]),"no-event":u(()=>[D(e.$slots,"no-event",{},()=>[S(b(o.texts.noEvent),1)])]),_:2},1032,["options","edit-events","data","cell-width","min-timestamp","max-timestamp","cell-splits"]))),128))],12,Gi)],10,Bi)])],2)]))]),_:3},8,["name","appear"]),o.ready?w("",!0):(h(),m("div",as,ns))]))],10,Vi)}]]);const rs={components:{VueCal:os},setup(){const e=f([]);function t(){B.get("api/general_vacation/generalvacation/").then(o=>{console.log(o.data,"----------------------");for(let s in o.data)s=="План-график"&&o.data[s].map(l=>{e.value.push({name:l.name,start:l.start_work_period,end:l.end_work_period,content:l.name})})})}le(()=>{t()});const i=f(null);function a(o){const s=new Date(o);let l="сегодня";return s.getFullYear()!="1970"&&(l=`${s.getDate()} число`),l}return{events:e,selectedDate:i,f_generalvacation:t,dayformat:a}}};function ds(e,t,i,a,o,s){const l=H("vue-cal");return h(),k($,null,{default:u(()=>[c(M,{class:"flex-column pr-0"},{default:u(()=>[c(P,{class:"h-100"},{default:u(()=>[c(l,{locale:"ru",xsmall:"",time:!1,"hide-view-selector":"","disable-views":["years","year","week","day"],"events-count-on-year-view":"","active-view":"month",events:a.events,todayButton:"",onCellFocus:t[1]||(t[1]=n=>a.selectedDate=n)},{"arrow-prev":u(()=>[c(J,{icon:"mdi-menu-left"})]),"arrow-next":u(()=>[c(J,{icon:"mdi-menu-right"})]),"today-button":u(()=>[c(Ae,{text:"Сегодня",location:"bottom"},{activator:u(({props:n})=>[c(J,de({onClick:t[0]||(t[0]=d=>a.selectedDate=new Date)},n,{icon:"mdi-crosshairs-gps",size:"x-small",class:"pt-1 pr-3",color:"more_details_btn"}),null,16)]),_:1})]),_:1},8,["events"])]),_:1})]),_:1}),c(M,null,{default:u(()=>[c(P,{class:"h-100"},{default:u(()=>[c(ne,{class:"text-center"},{default:u(()=>[S("События на "+b(a.dayformat(a.selectedDate)),1)]),_:1}),c(l,{locale:"ru",xsmall:"",time:!1,"hide-view-selector":"",hideTitleBar:"",split:"","header-format":"DD",events:a.events,"active-view":"day","disable-views":["years","year","month","week"],"selected-date":a.selectedDate},{"arrow-prev":u(()=>[c(J,{icon:"mdi-menu-left"})]),"arrow-next":u(()=>[c(J,{icon:"mdi-menu-right"})]),"today-button":u(()=>[]),_:1},8,["events","selected-date"])]),_:1})]),_:1})]),_:1})}const us=U(rs,[["render",ds]]);const cs={components:{CarouselList:Ot,CarouselNumbers:Ht,CalendarFull:It,NewsListHome:Rt,LoadRound:Tt,DigitalLetna:Qt,EventCalendar:us,NewsHome:zt},setup(){const e=vt(),t=f([]),i=f(null),a=ve();mt(),le(()=>{o()});const o=()=>{B.get("api/watcher/selectedlinks/").then(s=>{t.value=s.data})};return{accountStore:a,appStore:e,favoritLinks:o,favorit:t,toggle:i}}};function hs(e,t,i,a,o,s){const l=H("Carousel-list"),n=H("event-calendar"),d=H("digital-letna"),r=H("news-home");return h(),k(xe,{fluid:"",class:"d-flex mx-0 pa-0"},{default:u(()=>[c($,{class:"ma-2"},{default:u(()=>[c(M,{class:"d-flex flex-column",lg:"7",md:"12",cols:"12"},{default:u(()=>[c($,{class:"flex-grow-0"},{default:u(()=>[c(M,{class:"pa-1"},{default:u(()=>[c(l)]),_:1})]),_:1}),c($,{style:{height:"250px"}},{default:u(()=>[c(M,{class:"d-flex flex-column pa-1"},{default:u(()=>[c(n)]),_:1})]),_:1})]),_:1}),c(M,{class:"d-flex flex-column",lg:"5",md:"12",cols:"12"},{default:u(()=>[c($,null,{default:u(()=>[c(M,{class:"d-flex flex-column"},{default:u(()=>[c($,null,{default:u(()=>[c(M,{lg:"4",md:"2",cols:"12",class:"pa-1",style:{"min-height":"250px"}},{default:u(()=>[c(d)]),_:1}),c(M,{class:"d-flex flex-column pa-1",lg:"8",md:"10",cols:"12",style:{"min-height":"550px"}},{default:u(()=>[c(P,{class:"h-100 d-flex flex-column"},{default:u(()=>[c($,{class:"d-flex justify-md-center"},{default:u(()=>[c(M,{class:"flex-column d-flex"},{default:u(()=>[c(r)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),c($,{class:"flex-grow-0"},{default:u(()=>[c(M,{class:"pa-1"},{default:u(()=>[c(P,{class:"flex-colmn"},{default:u(()=>[c($e,{class:j(["mx-auto",a.favorit.length>10?"mx-n3":""]),"max-width":"800"},{default:u(()=>[c(Se,{"show-arrows":""},{default:u(()=>[(h(!0),m(x,null,O(a.favorit,v=>(h(),k(Le,{key:v},{default:u(()=>[c(Dt,{modelValue:a.toggle,"onUpdate:modelValue":t[0]||(t[0]=p=>a.toggle=p),divided:"",variant:"outlined"},{default:u(()=>[c(Ae,{text:v.pages__page,location:"top"},{activator:u(({props:p})=>[c(ae,de(p,{icon:v.pages__ico,to:v.pages__fullPath}),null,16,["icon","to"])]),_:2},1032,["text"])]),_:2},1032,["modelValue"])]),_:2},1024))),128))]),_:1})]),_:1},8,["class"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}const $s=U(cs,[["render",hs]]);export{$s as default};