1import{a4 as qs,a5 as z,a6 as q,a7 as c,a8 as Xt,a9 as Ht,aa as _e,ab as Ys,ac as ee,ad as Ke,ae as Jt,af as Ie,ag as Kt,ah as ut,ai as Qt,aj as Zt,ak as es,al as ce,am as V,an as et,ao as ye,ap as Xs,aq as mt,ar as vt,as as ts,at as se,au as ss,av as is,aw as ns,ax as ke,ay as At,az as ls,aA as Pe,aB as rs,aC as as,aD as X,aE as qe,aF as os,aG as ds,aH as cs,aI as us,aJ as Me,aK as Js,aL as yt,aM as Ks,aN as ie,aO as hs,aP as bt,aQ as tt,aR as G,aS as st,aT as ht,aU as gs,aV as he,aW as ue,aX as fs,aY as ps,aZ as Ye,a_ as St,a$ as xt,b0 as Xe,b1 as Qs,b2 as Zs,b3 as ei,b4 as ti,b5 as si,b6 as ii,b7 as ni,b8 as wt,b9 as li,ba as ri,bb as be,bc as Qe,bd as ms,be as ai,bf as vs,bg as ys,bh as oi,bi as di,bj as ci,bk as ui,bl as hi,bm as gi,bn as ot,bo as fi,bp as pi,bq as mi,br as vi,bs as Et,bt as yi,bu as bi,bv as Si,bw as xi,bx as wi,by as Ei,bz as Se,bA as Di,bB as Ri,bC as Ci,bD as Ti,bE as ki,bF as Dt,bG as me,bH as Rt,bI as Mi,bJ as gt,bK as _i,bL as Ii,bM as Pi,bN as Ni,bO as Hi,bP as Ai,bQ as Li,bR as zi,bS as Oi,bT as Wi,Q as ji,Y as Fi,o as Bi,w as Ge,bU as Vi,h as M,i as f,p as oe,G as Gi,z as Ee,t as C,U as D,v as F,H as pe,F as De,y as Re,f as B,s as dt,e as Ue,bV as Ui,A as Lt,T as $i,P as qi,a as A,B as re,j as Yi,d as k,n as Ce}from"./vendor-vue-Ns5D07Xf.js";import{u as Xi,f as Z,d as Ji,p as Ki,B as zt,s as Qi,D as Zi,j as Ot}from"./vendor-primevue-CDtTrPAe.js";import{g as Wt}from"./useFormatters-SBiPWniw.js";import{g as en,u as jt}from"./jobs-e9NYugDP.js";import{g as tn}from"./employees-CDF8Tg2L.js";import{g as sn,a as nn}from"./index-Ckj6hzUu.js";import{J as ln}from"./JobDetailDrawer-Bs7OGeOd.js";import{l as de}from"./leaflet-TXLVDKDQ.js";import{_ as rn}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./customers-BqF3Gnp_.js";class an extends ee{constructor(){super(...arguments),this.headerElRef=q()}renderSimpleLayout(e,t){let{props:s,context:i}=this,n=[],l=Ke(i.options);return e&&n.push({type:"header",key:"header",isSticky:l,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),n.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}
vendor: 3,905 bytes, line 1
1),c(Ie,{elClasses:["fc-daygrid"],viewSpec:i.viewSpec},c(Jt,{liquid:!s.isHeightAuto&&!s.forPrint,collapsibleWidth:s.forPrint,cols:[],sections:n}))}renderHScrollLayout(e,t,s,i){let n=this.context.pluginHooks.scrollGridImpl;if(!n)throw new Error("No ScrollGrid implementation");let{props:l,context:a}=this,o=!l.forPrint&&Ke(a.options),d=!l.forPrint&&Kt(a.options),g=[];return e&&g.push({type:"header",key:"header",isSticky:o,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),g.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),d&&g.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:ut}]}),c(Ie,{elClasses:["fc-daygrid"],viewSpec:a.viewSpec},c(n,{liquid:!l.isHeightAuto&&!l.forPrint,forPrint:l.forPrint,collapsibleWidth:l.forPrint,colGroups:[{cols:[{span:s,minWidth:i}]}],sections:g}))}}function Je(r,e){let t=[];for(let s=0;s<e;s+=1)t[s]=[];for(let s of r)t[s.row].push(s);return t}function $e(r,e){let t=[];for(let s=0;s<e;s+=1)t[s]=[];for(let s of r)t[s.firstCol].push(s);return t}function Ft(r,e){let t=[];if(r){for(let s=0;s<e;s+=1)t[s]={affectedInstances:r.affectedInstances,isEvent:r.isEvent,segs:[]};for(let s of r.segs)t[s.row].segs.push(s)}else for(let s=0;s<e;s+=1)t[s]=null;return t}const bs=ie({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Ss(r){let{display:e}=r.eventRange.ui;return e==="list-item"||e==="auto"&&!r.eventRange.def.allDay&&r.firstCol===r.lastCol&&r.isStart&&r.isEnd}class xs extends X{render(){let{props:e}=this;return c(cs,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:bs,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class ws extends X{render(){let{props:e,context:t}=this,{options:s}=t,{seg:i}=e,n=s.eventTimeFormat||bs,l=qe(i,n,t,!0,e.defaultDisplayEventEnd);return c(ds,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:os(e.seg,t),defaultGenerator:on,timeText:l,isResizing:!1,isDateSelecting:!1}))}}function on(r){return c(V,null,c("div",{className:"fc-daygrid-event-dot",style:{borderColor:r.borderColor||r.backgroundColor}}),r.timeText&&c("div",{className:"fc-event-time"},r.timeText),c("div",{className:"fc-event-title"},r.event.title||c(V,null,"Â ")))}class dn extends X{constructor(){super(...arguments),this.compileSegs=z(cn)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:s}=this.compileSegs(e.singlePlacements);return c(hs,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:s,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let i=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return c(V,null,t.map(n=>{let l=n.eventRange.instance.instanceId;return c("div",{className:"fc-daygrid-event-harness",key:l,style:{visibility:i[l]?"hidden":""}},Ss(n)?c(ws,Object.assign({seg:n,isDragging:!1,isSelected:l===e.eventSelection,defaultDisplayEventEnd:!1},se(n,e.todayRange))):c(xs,Object.assign({seg:n,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:l===e.eventSelection,defaultDisplayEventEnd:!1},se(n,e.todayRange))))}))}})}}function cn(r){let e=[],t=[];for(let s of r)e.push(s.seg),s.isVisible||t.push(s.seg);return{allSegs:e,invisibleSegs:t}}const un=ie({week:"narrow"});class hn extends ee{constructor(){super(...arguments),this.rootElRef=q(),this.state={dayNumberId:ke()},this.handleRootEl=e=>{At(this.rootElRef,e),At(this.props.elRef,e)}}render(){let{context:e,props:t,state:s,rootElRef:i}=this,{options:n,dateEnv:l}=e,{date:a,dateProfile:o}=t;const d=t.showDayNumber&&fn(a,o.currentRange,l);return c(as,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygri
1d-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":s.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:gn,date:a,dateProfile:o,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:d,extraRenderProps:t.extraRenderProps},(g,p)=>c("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&c(ls,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Pe(e,a,"week"),date:a,defaultFormat:un}),!p.isDisabled&&(t.showDayNumber||rs(n)||t.forceDayTop)?c("div",{className:"fc-daygrid-day-top"},c(g,{elTag:"a",elClasses:["fc-daygrid-day-number",d&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Pe(e,a)),{id:s.dayNumberId})})):t.showDayNumber?c("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},c("a",{className:"fc-daygrid-day-number"},"Â ")):void 0,c("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,c("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},c(dn,{allDayDate:a,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:i,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),c("div",{className:"fc-daygrid-day-bg"},t.bgContent)))}}function gn(r){return r.dayNumberText||c(V,null,"Â ")}function fn(r,e,t){const{start:s,end:i}=e,n=Ks(i,-1),l=t.getYear(s),a=t.getMonth(s),o=t.getYear(n),d=t.getMonth(n);return!(l===o&&a===d)&&(r.valueOf()===s.valueOf()||t.getDay(r)===1&&r.valueOf()<i.valueOf())}function Es(r){return r.eventRange.instance.instanceId+":"+r.firstCol}function Ds(r){return Es(r)+":"+r.lastCol}function pn(r,e,t,s,i,n,l){let a=new yn(R=>{let T=r[R.index].eventRange.instance.instanceId+":"+R.span.start+":"+(R.span.end-1);return i[T]||1});a.allowReslicing=!0,a.strictOrder=s,e===!0||t===!0?(a.maxCoord=n,a.hiddenConsumes=!0):typeof e=="number"?a.maxStackCnt=e:typeof t=="number"&&(a.maxStackCnt=t,a.hiddenConsumes=!0);let o=[],d=[];for(let R=0;R<r.length;R+=1){let T=r[R],H=Ds(T);i[H]!=null?o.push({index:R,span:{start:T.firstCol,end:T.lastCol+1}}):d.push(T)}let g=a.addSegs(o),p=a.toRects(),{singleColPlacements:v,multiColPlacements:m,leftoverMargins:x}=mn(p,r,l),y=[],w=[];for(let R of d){m[R.firstCol].push({seg:R,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let T=R.firstCol;T<=R.lastCol;T+=1)v[T].push({seg:ve(R,T,T+1,l),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let R=0;R<l.length;R+=1)y.push(0);for(let R of g){let T=r[R.index],H=R.span;m[H.start].push({seg:ve(T,H.start,H.end,l),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let P=H.start;P<H.end;P+=1)y[P]+=1,v[P].push({seg:ve(T,P,P+1,l),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let R=0;R<l.length;R+=1)w.push(x[R]);return{singleColPlacements:v,multiColPlacements:m,moreCnts:y,moreMarginTops:w}}function mn(r,e,t){let s=vn(r,t.length),i=[],n=[],l=[];for(let a=0;a<t.length;a+=1){let o=s[a],d=[],g=0,p=0;for(let m of o){let x=e[m.index];d.push({seg:ve(x,a,a+1,t),isVisible:!0,isAbsolute:!1,absoluteTop:m.levelCoord,marginTop:m.levelCoord-g}),g=m.levelCoord+m.thickness}let v=[];g=0,p=0;for(let m of o){let x=e[m.index],y=m.span.end-m.span.start>1,w=m.span.start===a;p+=m.levelCoord-g,g=m.levelCoord+m.thickness,y?(p+=m.thickness,w&&v.push({seg:ve(x,m.span.start,m.span.end,t),isVisible:!0,isAbsolute:!0,absoluteTop:m.levelCoord,marginTop:0})):w&&(v.push({seg:ve(x,m.span.start,m.span.end,t),isVisible:!0,isAbsolute:!1,absoluteTop:m.levelCoord,marginTop:p}),p=0)}i.push(d),n.push(v),l.push(p)}return{singleColPlacements:i,multiColPlacements:n,leftoverMargins:l}}function vn(r,e){let t=[];for(let s=0;s<e;s+=1)t.push([]);for(let s of r)for(let i=s.span.start;i<s.span.end;i+=1)t[i].push(s);return t}
vendor: 8,649 bytes, line 1
1function ve(r,e,t,s){if(r.firstCol===e&&r.lastCol===t-1)return r;let i=r.eventRange,n=i.range,l=yt(n,{start:s[e].date,end:_e(s[t-1].date,1)});return Object.assign(Object.assign({},r),{firstCol:e,lastCol:t-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:l},isStart:r.isStart&&l.start.valueOf()===n.start.valueOf(),isEnd:r.isEnd&&l.end.valueOf()===n.end.valueOf()})}class yn extends us{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const t=super.addSegs(e),{entriesByLevel:s}=this,i=n=>!this.forceHidden[Me(n)];for(let n=0;n<s.length;n+=1)s[n]=s[n].filter(i);return t}handleInvalidInsertion(e,t,s){const{entriesByLevel:i,forceHidden:n}=this,{touchingEntry:l,touchingLevel:a,touchingLateral:o}=e;if(this.hiddenConsumes&&l){const d=Me(l);if(!n[d])if(this.allowReslicing){const g=Object.assign(Object.assign({},l),{span:Js(l.span,t.span)}),p=Me(g);n[p]=!0,i[a][o]=g,s.push(g),this.splitEntry(l,t,s)}else n[d]=!0,s.push(l)}super.handleInvalidInsertion(e,t,s)}}class Rs extends ee{constructor(){super(...arguments),this.cellElRefs=new ce,this.frameElRefs=new ce,this.fgElRefs=new ce,this.segHarnessRefs=new ce,this.rootElRef=q(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:s}=this,{options:i}=s,n=e.cells.length,l=$e(e.businessHourSegs,n),a=$e(e.bgEventSegs,n),o=$e(this.getHighlightSegs(),n),d=$e(this.getMirrorSegs(),n),{singleColPlacements:g,multiColPlacements:p,moreCnts:v,moreMarginTops:m}=pn(vt(e.fgEventSegs,i.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,i.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),x=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return c("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map((y,w)=>{let R=this.renderFgSegs(w,e.forPrint?g[w]:p[w],e.todayRange,x),T=this.renderFgSegs(w,bn(d[w],p),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return c(hn,{key:y.key,elRef:this.cellElRefs.createRef(y.key),innerElRef:this.frameElRefs.createRef(y.key),dateProfile:e.dateProfile,date:y.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&w===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:y.extraRenderProps,extraDataAttrs:y.extraDataAttrs,extraClassNames:y.extraClassNames,extraDateSpan:y.extraDateSpan,moreCnt:v[w],moreMarginTop:m[w],singlePlacements:g[w],fgContentElRef:this.fgElRefs.createRef(y.key),fgContent:c(V,null,c(V,null,R),c(V,null,T)),bgContent:c(V,null,this.renderFillSegs(o[w],"highlight"),this.renderFillSegs(l[w],"non-business"),this.renderFillSegs(a[w],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let s=this.props;this.updateSizing(!ts(e,s))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,s,i,n,l,a){let{context:o}=this,{eventSelection:d}=this.props,{framePositions:g}=this.state,p=this.props.cells.length===1,v=n||l||a,m=[];if(g)for(let x of t){let{seg:y}=x,{instanceId:w}=y.eventRange.instance,R=x.isVisible&&!i[w],T=x.isAbsolute,H="",P="";T&&(o.isRtl?(P=0,H=g.lefts[y.lastCol]-g.lefts[y.firstCol]):(H=0,P=g.rights[y.firstCol]-g.rights[y.lastCol])),m.push(c("div",{className:"fc-daygrid-event-harness"+(T?" fc-daygrid-event-harness-abs":""),key:Es(y),ref:v?null:this.segHarnessRefs.createRef(Ds(y)),style:{visibility:R?"":"hidden",marginTop:T?"":x.marginTop,top:T?x.absoluteTop:"",left:H,right:P}},Ss(y)?c(ws,Object.assign({seg:y,isDragging:n,isSelected:w===d,defaultDisplayEventEnd:p},se(y,s))):c(xs,Object.assign({seg:y,isDragging:n,isResizing:l,isDateSelecting:a,isSelected:w===d,defaultDisplayEventEnd:p},se(y,s)))))}return m}renderFillSegs(e,t){let{isRtl:s}=this.context,{todayRange:i}=this.props,{framePositions:n}=this.state,l=[];if(n)for(let a of e){let o=s?{right:0,left:n.lefts[a.lastCol]-n.lefts[a.firstCol]}:{left:0,right:n.rights[a.firstCol]-n.rights[a.lastCol]};l.push(c("div",{key:ns(a.eventRange),className:"fc-daygrid-bg-harness",style:o},t==="bg-event"?c(ss,Object.assign({seg:a},se(a,i))):is(t)))}return c(V,{},...l)}updateSizing(e){let{props:t,state:s,frameElRefs:i}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let o=t.cells.map(d=>i.currentMap[d.key]);if(o.length){let d=this.rootElRef.current,g=new ye(d,o,!0,!1);(!s.framePositions||!s.framePositions.similarTo(g))&&this.setState({framePositions:new ye(d,o,!0,!1)})}}const n=this.state.segHeights,l=this.querySegHeights(),a=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},n),l),maxContentHeight:a?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let s in e){let i=Math.round(e[s].getBoundingClientRect().height);t[s]=Math.max(t[s]||0,i)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],s=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-s.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}}Rs.addStateEquality({segHeights:ts});function bn(r,e){if(!r.length)return[];let t=Sn(e);return r.map(s=>({seg:s,isVisible:!0,isAbsolute:!0,absoluteTop:t[s.eventRange.instance.instanceId],marginTop:0}))}function Sn(r){let e={};for(let t of r)for(let s of t)e[s.seg.eventRange.instance.instanceId]=s.absoluteTop;return e}class xn extends ee{constructor(){super(...arguments),this.splitBusinessHourSegs=z(Je),this.splitBgEventSegs=z(wn),this.splitFgEventSegs=z(Je),this.splitDateSelectionSegs=z(Je),this.splitEventDrag=z(Ft),this.splitEventResize=z(Ft),this.rowRefs=new ce}render(){let{props:e,context:t}=this,s=e.cells.length,i=this.splitBusinessHourSegs(e.businessHourSegs,s),n=this.splitBgEventSegs(e.bgEventSegs,s),l=this.splitFgEventSegs(e.fgEventSegs,s),a=this.splitDateSelectionSegs(e.dateSelectionSegs,s),o=this.splitEventDrag(e.eventDrag,s),d=this.splitEventResize(e.eventResize,s),g=s>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return c(et,{unit:"day"},(p,v)=>c(V,null,e.cells.map((m,x)=>c(Rs,{ref:this.rowRefs.createRef(x),key:m.length?m[0].date.toISOString():x,showDayNumbers:s>1,showWeekNumbers:e.showWeekNumbers,todayRange:v,dateProfile:e.dateProfile,cells:m,renderIntro:e.renderRowIntro,businessHourSegs:i[x],eventSelection:e.eventSelection,bgEventSegs:n[x],fgEventSegs:l[x],dateSelectionSegs:a[x],eventDrag:o[x],eventResize:d[x],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:g,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(".fc-daygrid-body"):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new ye(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new ye(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:s,rowPositions:i}=this,n=s.leftToIndex(e),l=i.topToIndex(t);if(l!=null&&n!=null){let a=this.props.cells[l][n];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(l,n),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(l,n),rect:{left:s.lefts[n],right:s.rights[n],top:i.tops[l],bottom:i.bottoms[l]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let s=this.props.cells[e][t].date,i=_e(s,1);return{start:s,end:i}}}function wn(r,e){return Je(r.filter(En),e)}function En(r){return r.eventRange.def.allDay}class Dn extends ee{constructor(){super(...arguments),this.elRef=q(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:s,expandRows:i}=e,n=s===!0||t===!0;n&&!i&&(n=!1,t=null,s=null);
1let l=["fc-daygrid-body",n?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return c("div",{ref:this.elRef,className:l.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},c("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:i?e.clientHeight:""}},e.colGroupNode,c("tbody",{role:"presentation"},c(xn,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:s,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=Rn(this.elRef.current,this.props.dateProfile);if(e){const t=e.closest(".fc-daygrid-body"),s=t.closest(".fc-scroller"),i=e.getBoundingClientRect().top-t.getBoundingClientRect().top;s.scrollTop=i?i+1:0}this.needsScrollReset=!1}}}function Rn(r,e){let t;return e.currentRangeUnit.match(/year|month/)&&(t=r.querySelector(`[data-date="${Xs(e.currentDate)}-01"]`)),t||(t=r.querySelector(`[data-date="${mt(e.currentDate)}"]`)),t}class Cn extends es{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}}class Cs extends ee{constructor(){super(...arguments),this.slicer=new Cn,this.tableRef=q()}render(){let{props:e,context:t}=this;return c(Dn,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}class Tn extends an{constructor(){super(...arguments),this.buildDayTableModel=z(kn),this.headerRef=q(),this.tableRef=q()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:s}=this,i=this.buildDayTableModel(s.dateProfile,t),n=e.dayHeaders&&c(Xt,{ref:this.headerRef,dateProfile:s.dateProfile,dates:i.headerDates,datesRepDistinctDays:i.rowCnt===1}),l=a=>c(Cs,{ref:this.tableRef,dateProfile:s.dateProfile,dayTableModel:i,businessHours:s.businessHours,dateSelection:s.dateSelection,eventStore:s.eventStore,eventUiBases:s.eventUiBases,eventSelection:s.eventSelection,eventDrag:s.eventDrag,eventResize:s.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:a.tableColGroupNode,tableMinWidth:a.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!s.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:a.clientWidth,clientHeight:a.clientHeight,forPrint:s.forPrint});return e.dayMinWidth?this.renderHScrollLayout(n,l,i.colCnt,e.dayMinWidth):this.renderSimpleLayout(n,l)}}function kn(r,e){let t=new Qt(r.renderRange,e);return new Zt(t,/year|month|week/.test(r.currentRangeUnit))}class Mn extends qs{buildRenderRange(e,t,s){let i=super.buildRenderRange(e,t,s),{props:n}=this;return _n({currentRange:i,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:n.fixedWeekCount,dateEnv:n.dateEnv})}}function _n(r){let{dateEnv:e,currentRange:t}=r,{start:s,end:i}=t,n;if(r.snapToWeek&&(s=e.startOfWeek(s),n=e.startOfWeek(i),n.valueOf()!==i.valueOf()&&(i=Ht(n,1))),r.fixedWeekCount){let l=e.startOfWeek(e.startOfMonth(_e(t.end,-1))),a=Math.ceil(Ys(l,i));i=Ht(i,6-a)}return{start:s,end:i}}var In
vendor: 3,524 bytes, line 1
1=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';
vendor: 61,801 bytes, line 1
1bt(In);var Pn=tt({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:Tn,dateProfileGeneratorClass:Mn},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});Et.touchMouseIgnoreWait=500;let ft=0,Ze=0,pt=!1;class Ts{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=t=>{if(!this.shouldIgnoreMouse()&&Nn(t)&&this.tryStart(t)){let s=this.createEventFromMouse(t,!0);this.emitter.trigger("pointerdown",s),this.initScrollWatch(s),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=t=>{let s=this.createEventFromMouse(t);this.recordCoords(s),this.emitter.trigger("pointermove",s)},this.handleMouseUp=t=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(t)),this.cleanup()},this.handleTouchStart=t=>{if(this.tryStart(t)){this.isTouchDragging=!0;let s=this.createEventFromTouch(t,!0);this.emitter.trigger("pointerdown",s),this.initScrollWatch(s);let i=t.target;this.shouldIgnoreMove||i.addEventListener("touchmove",this.handleTouchMove),i.addEventListener("touchend",this.handleTouchEnd),i.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=t=>{let s=this.createEventFromTouch(t);this.recordCoords(s),this.emitter.trigger("pointermove",s)},this.handleTouchEnd=t=>{if(this.isDragging){let s=t.target;s.removeEventListener("touchmove",this.handleTouchMove),s.removeEventListener("touchend",this.handleTouchEnd),s.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(t)),this.cleanup(),this.isTouchDragging=!1,Hn()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=t=>{if(!this.shouldIgnoreMove){let s=window.scrollX-this.prevScrollX+this.prevPageX,i=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:t,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:s,pageY:i,deltaX:s-this.origPageX,deltaY:i-this.origPageY})}},this.containerEl=e,this.emitter=new vs,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),An()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),Ln()}tryStart(e){let t=this.querySubjectEl(e),s=e.target;return t&&(!this.handleSelector||he(s,this.handleSelector))?(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){pt=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?he(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return ft||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(pt=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,t){let s=0,i=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(s=e.pageX-this.origPageX,i=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:s,deltaY:i}}createEventFromTouch(e,t){let s=e.touches,i,n,l=0,a=0;return s&&s.length?(i=s[0].pageX,n=s[0].pageY):(i=e.pageX,n=e.pageY),t?(this.origPageX=i,this.origPageY=n):(l=i-this.origPageX,a=n-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:i,pageY:n,deltaX:l,deltaY:a}}}function Nn(r){return r.button===0&&!r.ctrlKey}function Hn(){ft+=1,setTimeout(()=>{ft-=1},Et.touchMouseIgnoreWait)}function An(){Ze+=1,Ze===1&&window.addEventListener("touchmove",ks,{passive:!1})}function Ln(){Ze-=1,Ze||window.removeEventListener("touchmove",ks,{passive:!1})}function ks(r){pt&&r.preventDefault()}class zn{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,t,s){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.scrollX,this.origScreenY=s-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,t){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=t-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)}stop(e,t){let s=()=>{this.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(s,this.revertDuration):setTimeout(s,0)}doRevertAnimation(e,t){let s=this.mirrorEl,i=this.sourceEl.getBoundingClientRect();s.style.transition="top "+t+"ms,left "+t+"ms",ot(s,{left:i.left,top:i.top}),fi(s,()=>{s.style.transition="",e()})}cleanup(){this.mirrorEl&&(pi(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&ot(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,t=this.mirrorEl;return t||(t=this.mirrorEl=this.sourceEl.cloneNode(!0),t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.pointerEvents="none",t.classList.add("fc-event-dragging"),ot(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t}}class Ms extends xi{constructor(e,t){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=t,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class _s extends Ms{constructor(e,t){super(new bi(e),t)}getEventTarget(){return this.scrollController.el}computeClientRect(){return Si(this.scrollController.el)}}class On extends Ms{constructor(e){super(new yi,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const Bt=typeof performance=="function"?performance.now:Date.now;class Wn{constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(e){let t=Bt();this.handleSide(e,(t-this.msSinceRequest)/1e3),this.requestAnimation(t)}else this.isAnimating=!1}}}start(e,t,s){this.isEnabled&&(this.scrollCaches=this.buildCaches(s),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))}handleMove(e,t){if(this.isEnabled){let s=e-window.scrollX,i=t-window.scrollY,n=this.pointerScreenY===null?0:i-this.pointerScreenY,l=this.pointerScreenX===null?0:s-this.pointerScreenX;n<0?this.everMovedUp=!0:n>0&&(this.everMovedDown=!0),l<0?this.everMovedLeft=!0:l>0&&(this.everMovedRight=!0),this.pointerScreenX=s,this.pointerScreenY=i,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Bt()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,t){let{scrollCache:s}=e,{edgeThreshold:i}=this,n=i-e.distance,l=n*n/(i*i)*this.maxVelocity*t,a=1;switch(e.name){case"left":a=-1;case"right":s.setScrollLeft(s.getScrollLeft()+l*a);break;case"top":a=-1;case"bottom":s.setScrollTop(s.getScrollTop()+l*a);break}}computeBestEdge(e,t){let{edgeThreshold:s}=this,i=null,n=this.scrollCaches||[];for(let l of n){let a=l.clientRect,o=e-a.left,d=a.right-e,g=t-a.top,p=a.bottom-t;o>=0&&d>=0&&g>=0&&p>=0&&(g<=s&&this.everMovedUp&&l.canScrollUp()&&(!i||i.distance>g)&&(i={scrollCache:l,name:"top",distance:g}),p<=s&&this.everMovedDown&&l.canScrollDown()&&(!i||i.distance>p)&&(i={scrollCache:l,name:"bottom",distance:p}),o<=s&&this.everMovedLeft&&l.canScrollLeft()&&(!i||i.distance>o)&&(i={scrollCache:l,name:"left",distance:o}),d<=s&&this.everMovedRight&&l.canScrollRight()&&(!i||i.distance>d)&&(i={scrollCache:l,name:"right",distance:d}))}return i}buildCaches(e){return this.queryScrollEls(e).map(t=>t===window?new On(!1):new _s(t,!1))}queryScrollEls(e){let t=[];for(let s of this.scrollQuery)typeof s=="object"?t.push(s):t.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(s)));return t}}class Ne extends Zs{constructor(e,t){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=i=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,ei(document.body),ti(document.body),i.isTouch||i.origEvent.preventDefault(),this.emitter.trigger("pointerdown",i),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(i.subjectEl,i.pageX,i.pageY),this.startDelay(i),this.minDistance||this.handleDistanceSurpassed(i)))},this.onPointerMove=i=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",i),!this.isDistanceSurpassed){let n=this.minDistance,l,{deltaX:a,deltaY:o}=i;l=a*a+o*o,l>=n*n&&this.handleDistanceSurpassed(i)}this.isDragging&&(i.origEvent.type!=="scroll"&&(this.mirror.handleMove(i.pageX,i.pageY),this.autoScroller.handleMove(i.pageX,i.pageY)),this.emitter.trigger("dragmove",i))}},this.onPointerUp=i=>{this.isInteracting&&(this.isInteracting=!1,si(document.body),ii(document.body),this.emitter.trigger("pointerup",i),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(i)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let s=this.pointer=new Ts(e);s.emitter.on("pointerdown",this.onPointerDown),s.emitter.on("pointermove",this.onPointerMove),s.emitter.on("pointerup",this.onPointerUp),t&&(s.selector=t),this.mirror=new zn,this.autoScroller=new Wn}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}}class jn{constructor(e){this.el=e,this.origRect=ys(e),this.scrollCaches=mi(e).map(t=>new _s(t,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let t of this.scrollCaches)e+=t.origScrollLeft-t.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let t of this.scrollCaches)e+=t.origScrollTop-t.getScrollTop();return e}isWithinClipping(e,t){let s={left:e,top:t};for(let i of this.scrollCaches)if(!Fn(i.getEventTarget())&&!vi(s,i.clientRect))return!1;return!0}}function Fn(r){let e=r.tagName;return e==="HTML"||e==="BODY"}class it{constructor(e,t){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=s=>{let{dragging:i}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(s),this.initialHit||!this.requireInitial?(i.setIgnoreMove(!1),this.emitter.trigger("pointerdown",s)):i.setIgnoreMove(!0)},this.handleDragStart=s=>{this.emitter.trigger("dragstart",s),this.handleMove(s,!0)},this.handleDragMove=s=>{this.emitter.trigger("dragmove",s),this.handleMove(s)},this.handlePointerUp=s=>{this.releaseHits(),this.emitter.trigger("pointerup",s)},this.handleDragEnd=s=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,s),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",s)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new vs}processFirstCoord(e){let t={left:e.pageX,top:e.pageY},s=t,i=e.subjectEl,n;i instanceof HTMLElement&&(n=ys(i),s=oi(s,n));let l=this.initialHit=this.queryHitForOffset(s.left,s.top);if(l){if(this.useSubjectCenter&&n){let a=di(n,l.rect);a&&(s=ci(a))}this.coordAdjust=ui(s,t)}else this.coordAdjust={left:0,top:0}}handleMove(e,t){let s=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(t||!nt(this.movingHit,s))&&(this.movingHit=s,this.emitter.trigger("hitupdate",s,!1,e))}prepareHits(){this.offsetTrackers=hi(this.droppableStore,e=>(e.component.prepareHits(),new jn(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let t in e)e[t].destroy();this.offsetTrackers={}}queryHitForOffset(e,t){let{droppableStore:s,offsetTrackers:i}=this,n=null;for(let l in s){let a=s[l].component,o=i[l];if(o&&o.isWithinClipping(e,t)){let d=o.computeLeft(),g=o.computeTop(),p=e-d,v=t-g,{origRect:m}=o,x=m.right-m.left,y=m.bottom-m.top;if(p>=0&&p<x&&v>=0&&v<y){let w=a.queryHit(p,v,x,y);w&&gi(w.dateProfile.activeRange,w.dateSpan.range)&&(this.disablePointCheck||o.el.contains(o.el.getRootNode().elementFromPoint(p+d-window.scrollX,v+g-window.scrollY)))&&(!n||w.layer>n.layer)&&(w.componentId=l,w.context=a.context,w.rect.left+=d,w.rect.right+=d,w.rect.top+=g,w.rect.bottom+=g,n=w)}}}return n}}function nt(r,e){return!r&&!e?!0:!!r!=!!e?!1:ai(r.dateSpan,e.dateSpan)}function Is(r,e){let t={};for(let s of e.pluginHooks.datePointTransforms)Object.assign(t,s(r,e));return Object.assign(t,Bn(r,e.dateEnv)),t}function Bn(r,e){return{date:e.toDate(r.range.start),dateStr:e.formatIso(r.range.start,{omitTime:r.allDay}),allDay:r.allDay}}class Vn extends st{constructor(e){super(e),this.handlePointerDown=s=>{let{dragging:i}=this,n=s.origEvent.target;i.setIgnoreMove(!this.component.isValidDateDownEl(n))},this.handleDragEnd=s=>{let{component:i}=this,{pointer:n}=this.dragging;if(!n.wasTouchScroll){let{initialHit:l,finalHit:a}=this.hitDragging;if(l&&a&&nt(l,a)){let{context:o}=i,d=Object.assign(Object.assign({},Is(l.dateSpan,o)),{dayEl:l.dayEl,jsEvent:s.origEvent,view:o.viewApi||o.calendarApi.view});o.emitter.trigger("dateClick",d)}}},this.dragging=new Ne(e.el),this.dragging.autoScroller.isEnabled=!1;let t=this.hitDragging=new it(this.dragging,wt(e));t.emitter.on("pointerdown",this.handlePointerDown),t.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class Gn extends st{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=l=>{let{component:a,dragging:o}=this,{options:d}=a.context,g=d.selectable&&a.isValidDateDownEl(l.origEvent.target);o.setIgnoreMove(!g),o.delay=l.isTouch?Un(a):null},this.handleDragStart=l=>{this.component.context.calendarApi.unselect(l)},this.handleHitUpdate=(l,a)=>{let{context:o}=this.component,d=null,g=!1;if(l){let p=this.hitDragging.initialHit;l.componentId===p.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(p,l)||(d=$n(p,l,o.pluginHooks.dateSelectionTransformers)),(!d||!li(d,l.dateProfile,o))&&(g=!0,d=null)}d?o.dispatch({type:"SELECT_DATES",selection:d}):a||o.dispatch({type:"UNSELECT_DATES"}),g?xt():St(),a||(this.dragSelection=d)},this.handlePointerUp=l=>{this.dragSelection&&(ri(this.dragSelection,l,this.component.context),this.dragSelection=null)};let{component:t}=e,{options:s}=t.context,i=this.dragging=new Ne(e.el);i.touchScrollAllowed=!1,i.minDistance=s.selectMinDistance||0,i.autoScroller.isEnabled=s.dragScroll;let n=this.hitDragging=new it(this.dragging,wt(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragstart",this.handleDragStart),n.emitter.on("hitupdate",this.handleHitUpdate),n.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function Un(r){let{options:e}=r.context,t=e.selectLongPressDelay;return t==null&&(t=e.longPressDelay),t}function $n(r,e,t){let s=r.dateSpan,i=e.dateSpan,n=[s.range.start,s.range.end,i.range.start,i.range.end];n.sort(wi);let l={};for(let a of t){let o=a(r,e);if(o===!1)return null;o&&Object.assign(l,o)}return l.range={start:n[0],end:n[3]},l.allDay=s.allDay,l}class He extends st{constructor(e){super(e),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=l=>{let a=l.origEvent.target,{component:o,dragging:d}=this,{mirror:g}=d,{options:p}=o.context,v=o.context;this.subjectEl=l.subjectEl;let m=this.subjectSeg=ht(l.subjectEl),y=(this.eventRange=m.eventRange).instance.instanceId;this.relevantEvents=gs(v.getCurrentData().eventStore,y),d.minDistance=l.isTouch?0:p.eventDragMinDistance,d.delay=l.isTouch&&y!==o.props.eventSelection?Yn(o):null,p.fixedMirrorParent?g.parentNode=p.fixedMirrorParent:g.parentNode=he(a,".fc"),g.revertDuration=p.dragRevertDuration;let w=o.isValidSegDownEl(a)&&!he(a,".fc-event-resizer");d.setIgnoreMove(!w),this.isDragging=w&&l.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=l=>{let a=this.component.context,o=this.eventRange,d=o.instance.instanceId;l.isTouch?d!==this.component.props.eventSelection&&a.dispatch({type:"SELECT_EVENT",eventInstanceId:d}):a.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(a.calendarApi.unselect(l),a.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new ue(a,o.def,o.instance),jsEvent:l.origEvent,view:a.viewApi}))},this.handleHitUpdate=(l,a)=>{if(!this.isDragging)return;let o=this.relevantEvents,d=this.hitDragging.initialHit,g=this.component.context,p=null,v=null,m=null,x=!1,y={affectedEvents:o,mutatedEvents:Ye(),isEvent:!0};if(l){p=l.context;let w=p.options;g===p||w.editable&&w.droppable?(v=qn(d,l,this.eventRange.instance.range.start,p.getCurrentData().pluginHooks.eventDragMutationMassagers),v&&(m=fs(o,p.getCurrentData().eventUiBases,v,p),y.mutatedEvents=m,ps(y,l.dateProfile,p)||(x=!0,v=null,m=null,y.mutatedEvents=Ye()))):p=null}this.displayDrag(p,y),x?xt():St(),a||(g===p&&nt(d,l)&&(v=null),this.dragging.setMirrorNeedsRevert(!v),this.dragging.setMirrorIsVisible(!l||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=p,this.validMutation=v,this.mutatedRelevantEvents=m)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=l=>{if(this.isDragging){let a=this.component.context,o=a.viewApi,{receivingContext:d,validMutation:g}=this,p=this.eventRange.def,v=this.eventRange.instance,m=new ue(a,p,v),x=this.relevantEvents,y=this.mutatedRelevantEvents,{finalHit:w}=this.hitDragging;if(this.clearDrag(),a.emitter.trigger("eventDragStop",{el:this.subjectEl,event:m,jsEvent:l.origEvent,view:o}),g){if(d===a){let R=new ue(a,y.defs[p.defId],v?y.instances[v.instanceId]:null);a.dispatch({type:"MERGE_EVENTS",eventStore:y});let T={oldEvent:m,event:R,relatedEvents:Xe(y,a,v),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:x})}},H={};for(let P of a.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(H,P(g,a));a.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},T),H),{el:l.subjectEl,delta:g.datesDelta,jsEvent:l.origEvent,view:o})),a.emitter.trigger("eventChange",T)}else if(d){let R={event:m,relatedEvents:Xe(x,a,v),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:x})}};a.emitter.trigger("eventLeave",Object.assign(Object.assign({},R),{draggedEl:l.subjectEl,view:o})),a.dispatch({type:"REMOVE_EVENTS",eventStore:x}),a.emitter.trigger("eventRemove",R);let T=y.defs[p.defId],H=y.instances[v.instanceId],P=new ue(d,T,H);d.dispatch({type:"MERGE_EVENTS",eventStore:y});let J={event:P,relatedEvents:Xe(y,d,H),revert(){d.dispatch({type:"REMOVE_EVENTS",eventStore:y})}};d.emitter.trigger("eventAdd",J),l.isTouch&&d.dispatch({type:"SELECT_EVENT",eventInstanceId:v.instanceId}),d.emitter.trigger("drop",Object.assign(Object.assign({},Is(w.dateSpan,d)),{draggedEl:l.subjectEl,jsEvent:l.origEvent,view:w.context.viewApi})),d.emitter.trigger("eventReceive",Object.assign(Object.assign({},J),{draggedEl:l.subjectEl,view:w.context.viewApi}))}}else a.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:t}=this,{options:s}=t.context,i=this.dragging=new Ne(e.el);i.pointer.selector=He.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=s.dragScroll;let n=this.hitDragging=new it(this.dragging,Qs);n.useSubjectCenter=e.useEventCenter,n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragstart",this.handleDragStart),n.emitter.on("hitupdate",this.handleHitUpdate),n.emitter.on("pointerup",this.handlePointerUp),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,t){let s=this.component.context,i=this.receivingContext;i&&i!==e&&(i===s?i.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:Ye(),isEvent:!0}}):i.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})}clearDrag(){let e=this.component.context,{receivingContext:t}=this;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}He.SELECTOR=".fc-event-draggable, .fc-event-resizable";function qn(r,e,t,s){let i=r.dateSpan,n=e.dateSpan,l=i.range.start,a=n.range.start,o={};i.allDay!==n.allDay&&(o.allDay=n.allDay,o.hasEnd=e.context.options.allDayMaintainDuration,n.allDay?l=Qe(t):l=t);let d=ms(l,a,r.context.dateEnv,r.componentId===e.componentId?r.largeUnit:null);d.milliseconds&&(o.allDay=!1);let g={datesDelta:d,standardProps:o};for(let p of s)p(g,r,e);return g}function Yn(r){let{options:e}=r.context,t=e.eventLongPressDelay;return t==null&&(t=e.longPressDelay),t}class Xn extends st{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=n=>{let{component:l}=this,a=this.querySegEl(n),o=ht(a),d=this.eventRange=o.eventRange;this.dragging.minDistance=l.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(n.origEvent.target)||n.isTouch&&this.component.props.eventSelection!==d.instance.instanceId)},this.handleDragStart=n=>{let{context:l}=this.component,a=this.eventRange;this.relevantEvents=gs(l.getCurrentData().eventStore,this.eventRange.instance.instanceId);let o=this.querySegEl(n);this.draggingSegEl=o,this.draggingSeg=ht(o),l.calendarApi.unselect(),l.emitter.trigger("eventResizeStart",{el:o,event:new ue(l,a.def,a.instance),jsEvent:n.origEvent,view:l.viewApi})},this.handleHitUpdate=(n,l,a)=>{let{context:o}=this.component,d=this.relevantEvents,g=this.hitDragging.initialHit,p=this.eventRange.instance,v=null,m=null,x=!1,y={affectedEvents:d,mutatedEvents:Ye(),isEvent:!0};n&&(n.componentId===g.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(g,n)||(v=Jn(g,n,a.subjectEl.classList.contains("fc-event-resizer-start"),p.range))),v&&(m=fs(d,o.getCurrentData().eventUiBases,v,o),y.mutatedEvents=m,ps(y,n.dateProfile,o)||(x=!0,v=null,m=null,y.mutatedEvents=null)),m?o.dispatch({type:"SET_EVENT_RESIZE",state:y}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),x?xt():St(),l||(v&&nt(g,n)&&(v=null),this.validMutation=v,this.mutatedRelevantEvents=m)},this.handleDragEnd=n=>{let{context:l}=this.component,a=this.eventRange.def,o=this.eventRange.instance,d=new ue(l,a,o),g=this.relevantEvents,p=this.mutatedRelevantEvents;if(l.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:d,jsEvent:n.origEvent,view:l.viewApi}),this.validMutation){let v=new ue(l,p.defs[a.defId],o?p.instances[o.instanceId]:null);l.dispatch({type:"MERGE_EVENTS",eventStore:p});let m={oldEvent:d,event:v,relatedEvents:Xe(p,l,o),revert(){l.dispatch({type:"MERGE_EVENTS",eventStore:g})}};l.emitter.trigger("eventResize",Object.assign(Object.assign({},m),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||be(0),endDelta:this.validMutation.endDelta||be(0),jsEvent:n.origEvent,view:l.viewApi})),l.emitter.trigger("eventChange",m)}else l.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:t}=e,s=this.dragging=new Ne(e.el);s.pointer.selector=".fc-event-resizer",s.touchScrollAllowed=!1,s.autoScroller.isEnabled=t.context.options.dragScroll;let i=this.hitDragging=new it(this.dragging,wt(e));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return he(e.subjectEl,".fc-event")}}function Jn(r,e,t,s){let i=r.context.dateEnv,n=r.dateSpan.range.start,l=e.dateSpan.range.start,a=ms(n,l,i,r.largeUnit);if(t){if(i.add(s.start,a)<s.end)return{startDelta:a}}else if(i.add(s.end,a)>s.start)return{endDelta:a};return null}class Kn{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=s=>{s.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=s=>{let i=this.context.options.unselectCancel,n=ni(s.origEvent);this.matchesCancel=!!he(n,i),this.matchesEvent=!!he(n,He.SELECTOR)},this.onDocumentPointerUp=s=>{let{context:i}=this,{documentPointer:n}=this,l=i.getCurrentData();if(!n.wasTouchScroll){if(l.dateSelection&&!this.isRecentPointerDateSelect){let a=i.options.unselectAuto;a&&(!a||!this.matchesCancel)&&i.calendarApi.unselect(s)}l.eventSelection&&!this.matchesEvent&&i.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let t=this.documentPointer=new Ts(document);t.shouldIgnoreMove=!0,t.shouldWatchScroll=!1,t.emitter.on("pointerdown",this.onDocumentPointerDown),t.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}const Qn={fixedMirrorParent:G},Zn={dateClick:G,eventDragStart:G,eventDragStop:G,eventDrop:G,eventResizeStart:G,eventResizeStop:G,eventResize:G,drop:G,eventReceive:G,eventLeave:G};Et.dataAttrPrefix="";var el=tt({name:"@fullcalendar/interaction",componentInteractions:[Vn,Gn,He,Xn],calendarInteractions:[Kn],elementDraggingImpl:Ne,optionRefiners:Qn,listenerRefiners:Zn});class tl extends X{constructor(){super(...arguments),this.state={textId:ke()}}render(){let{theme:e,dateEnv:t,options:s,viewApi:i}=this.context,{cellId:n,dayDate:l,todayRange:a}=this.props,{textId:o}=this.state,d=Ri(l,a),g=s.listDayFormat?t.format(l,s.listDayFormat):"",p=s.listDaySideFormat?t.format(l,s.listDaySideFormat):"",v=Object.assign({date:t.toDate(l),view:i,textId:o,text:g,sideText:p,navLinkAttrs:Pe(this.context,l),sideNavLinkAttrs:Pe(this.context,l,"day",!1)},d);return c(Se,{elTag:"tr",elClasses:["fc-list-day",...Ci(d,e)],elAttrs:{"data-date":mt(l)},renderProps:v,generatorName:"dayHeaderContent",customGenerator:s.dayHeaderContent,defaultGenerator:sl,classNameGenerator:s.dayHeaderClassNames,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},m=>c("th",{scope:"colgroup",colSpan:3,id:n,"aria-labelledby":o},c(m,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]})))}}function sl(r){return c(V,null,r.text&&c("a",Object.assign({id:r.textId,className:"fc-list-day-text"},r.navLinkAttrs),r.text),r.sideText&&c("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},r.sideNavLinkAttrs),r.sideText))}const il=ie({hour:"numeric",minute:"2-digit",meridiem:"short"});class nl extends X{render(){let{props:e,context:t}=this,{options:s}=t,{seg:i,timeHeaderId:n,eventHeaderId:l,dateHeaderId:a}=e,o=s.eventTimeFormat||il;return c(ds,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",i.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>ll(i,t),seg:i,timeText:"",disableDragging:!0,disableResizing:!0}),(d,g)=>c(V,null,rl(i,o,t,n,a),c("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},c("span",{className:"fc-list-event-dot",style:{borderColor:g.borderColor||g.backgroundColor}})),c(d,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${l} ${a}`}})))}}function ll(r,e){let t=os(r,e);return c("a",Object.assign({},t),r.eventRange.def.title)}function rl(r,e,t,s,i){let{options:n}=t;if(n.displayEventTime!==!1){let l=r.eventRange.def,a=r.eventRange.instance,o=!1,d;if(l.allDay?o=!0:Ti(r.eventRange.range)?r.isStart?d=qe(r,e,t,null,null,a.range.start,r.end):r.isEnd?d=qe(r,e,t,null,null,r.start,a.range.end):o=!0:d=qe(r,e,t),o){let g={text:t.options.allDayText,view:t.viewApi};return c(Se,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${s} ${i}`},renderProps:g,generatorName:"allDayContent",customGenerator:n.allDayContent,defaultGenerator:al,classNameGenerator:n.allDayClassNames,didMount:n.allDayDidMount,willUnmount:n.allDayWillUnmount})}return c("td",{className:"fc-list-event-time"},d)}return null}function al(r){return r.text}class ol extends ee{constructor(){super(...arguments),this.computeDateVars=z(cl),this.eventStoreToSegs=z(this._eventStoreToSegs),this.state={timeHeaderId:ke(),eventHeaderId:ke(),dateHeaderIdRoot:ke()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:s,dayRanges:i}=this.computeDateVars(e.dateProfile),n=this.eventStoreToSegs(e.eventStore,e.eventUiBases,i);return c(Ie,{elRef:this.setRootEl,elClasses:["fc-list",t.theme.getClass("table"),t.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:t.viewSpec},c(Ei,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},n.length>0?this.renderSegList(n,s):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context,s={text:e.noEventsText,view:t};return c(Se,{elTag:"div",elClasses:["fc-list-empty"],renderProps:s,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:dl,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},i=>c(i,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(e,t){let{theme:s,options:i}=this.context,{timeHeaderId:n,eventHeaderId:l,dateHeaderIdRoot:a}=this.state,o=ul(e);return c(et,{unit:"day"},(d,g)=>{let p=[];for(let v=0;v<o.length;v+=1){let m=o[v];if(m){let x=mt(t[v]),y=a+"-"+x;p.push(c(tl,{key:x,cellId:y,dayDate:t[v],todayRange:g})),m=vt(m,i.eventOrder);for(let w of m)p.push(c(nl,Object.assign({key:x+":"+w.eventRange.instance.instanceId,seg:w,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:n,eventHeaderId:l,dateHeaderId:y},se(w,g,d))))}}return c("table",{className:"fc-list-table "+s.getClass("table")},c("thead",null,c("tr",null,c("th",{scope:"col",id:n},i.timeHint),c("th",{scope:"col","aria-hidden":!0}),c("th",{scope:"col",id:l},i.eventHint))),c("tbody",null,p))})}_eventStoreToSegs(e,t,s){return this.eventRangesToSegs(Di(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,s)}eventRangesToSegs(e,t){let s=[];for(let i of e)s.push(...this.eventRangeToSegs(i,t));return s}eventRangeToSegs(e,t){let{dateEnv:s}=this.context,{nextDayThreshold:i}=this.context.options,n=e.range,l=e.def.allDay,a,o,d,g=[];for(a=0;a<t.length;a+=1)if(o=yt(n,t[a]),o&&(d={component:this,eventRange:e,start:o.start,end:o.end,isStart:e.isStart&&o.start.valueOf()===n.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===n.end.valueOf(),dayIndex:a},g.push(d),!d.isEnd&&!l&&a+1<t.length&&n.end<s.add(t[a+1].start,i))){d.end=n.end,d.isEnd=!0;break}return g}}function dl(r){return r.text}function cl(r){let e=Qe(r.renderRange.start),t=r.renderRange.end,s=[],i=[];for(;e<t;)s.push(e),i.push({start:e,end:_e(e,1)}),e=_e(e,1);return{dayDates:s,dayRanges:i}}function ul(r){let e=[],t,s;for(t=0;t<r.length;t+=1)s=r[t],(e[s.dayIndex]||(e[s.dayIndex]=[])).push(s);return e}var hl=':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}';bt(hl);const gl={listDayFormat:Vt,listDaySideFormat:Vt,noEventsClassNames:G,noEventsContent:G,noEventsDidMount:G,noEventsWillUnmount:G};function Vt(r){return r===!1?null:ie(r)}var fl=tt({name:"@fullcalendar/list",optionRefiners:gl,views:{list:{component:ol,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});class pl extends _i{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?Ii(e)?["timed","allDay"]:["allDay"]:["timed"]}}const ml=ie({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Ps(r){let e=["fc-timegrid-slot","fc-timegrid-slot-label",r.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return c(Pi.Consumer,null,t=>{if(!r.isLabeled)return c("td",{className:e.join(" "),"data-time":r.isoTimeStr});let{dateEnv:s,options:i,viewApi:n}=t,l=i.slotLabelFormat==null?ml:Array.isArray(i.slotLabelFormat)?ie(i.slotLabelFormat[0]):ie(i.slotLabelFormat),a={level:0,time:r.time,date:s.toDate(r.date),view:n,text:s.format(r.date,l)};return c(Se,{elTag:"td",elClasses:e,elAttrs:{"data-time":r.isoTimeStr},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:vl,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},o=>c("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},c(o,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function vl(r){return r.text}class yl extends X{render(){return this.props.slatMetas.map(e=>c("tr",{key:e.key},c(Ps,Object.assign({},e))))}}const bl=ie({week:"short"}),Sl=5;class xl extends ee{constructor(){super(...arguments),this.allDaySplitter=new pl,this.headerElRef=q(),this.rootElRef=q(),this.scrollerElRef=q(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:s}=this.context,{dateProfile:i}=this.props,n=i.renderRange,a=ki(n.start,n.end)===1?Pe(this.context,n.start,"week"):{};return s.weekNumbers&&e==="day"?c(ls,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:n.start,defaultFormat:bl},o=>c("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:t}},c(o,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:a}))):c("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},c("div",{className:"fc-timegrid-axis-frame",style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:s}=this.context,i={text:t.allDayText,view:s};return c(Se,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:i,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:wl,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},n=>c("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},c(n,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,s){let{context:i,props:n}=this,l=[],a=Ke(i.options);return e&&l.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(l.push({type:"body",key:"all-day",chunk:{content:t}}),l.push({type:"body",key:"all-day-divider",outerContent:c("tr",{role:"presentation",className:"fc-scrollgrid-section"},c("td",{className:"fc-timegrid-divider "+i.theme.getClass("tableCellShaded")}))})),l.push({type:"body",key:"body",liquid:!0,expandRows:!!i.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:s}}),c(Ie,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:i.viewSpec},c(Jt,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[{width:"shrink"}],sections:l}))}renderHScrollLayout(e,t,s,i,n,l,a){let o=this.context.pluginHooks.scrollGridImpl;if(!o)throw new Error("No ScrollGrid implementation");let{context:d,props:g}=this,p=!g.forPrint&&Ke(d.options),v=!g.forPrint&&Kt(d.options),m=[];e&&m.push({type:"header",key:"header",isSticky:p,syncRowHeights:!0,chunks:[{key:"axis",rowContent:y=>c("tr",{role:"presentation"},this.renderHeadAxis("day",y.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(m.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:y=>c("tr",{role:"presentation"},this.renderTableRowAxis(y.rowSyncHeights[0]))},{key:"cols",content:t}]}),m.push({key:"all-day-divider",type:"body",outerContent:c("tr",{role:"presentation",className:"fc-scrollgrid-section"},c("td",{colSpan:2,className:"fc-timegrid-divider "+d.theme.getClass("tableCellShaded")}))}));let x=d.options.nowIndicator;return m.push({type:"body",key:"body",liquid:!0,expandRows:!!d.options.expandRows,chunks:[{key:"axis",content:y=>c("div",{className:"fc-timegrid-axis-chunk"},c("table",{"aria-hidden":!0,style:{height:y.expandRows?y.clientHeight:""}},y.tableColGroupNode,c("tbody",null,c(yl,{slatMetas:l}))),c("div",{className:"fc-timegrid-now-indicator-container"},c(et,{unit:x?"minute":"day"},w=>{let R=x&&a&&a.safeComputeTop(w);return typeof R=="number"?c(Dt,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:R},isAxis:!0,date:w}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:s}]}),v&&m.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:ut},{key:"cols",content:ut}]}),c(Ie,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:d.viewSpec},c(o,{liquid:!g.isHeightAuto&&!g.forPrint,forPrint:g.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:i,minWidth:n}]}],sections:m}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return(e===!0||t===!0)&&(e=void 0,t=Sl),{dayMaxEvents:e,dayMaxEventRows:t}}}function wl(r){return r.text}class El{constructor(e,t,s){this.positions=e,this.dateProfile=t,this.slotDuration=s}safeComputeTop(e){let{dateProfile:t}=this;if(Li(t.currentRange,e)){let s=Qe(e),i=e.valueOf()-s.valueOf();if(i>=me(t.slotMinTime)&&i<me(t.slotMaxTime))return this.computeTimeTop(be(i))}return null}computeDateTop(e,t){return t||(t=Qe(e)),this.computeTimeTop(be(e.valueOf()-t.valueOf()))}computeTimeTop(e){let{positions:t,dateProfile:s}=this,i=t.els.length,n=(e.milliseconds-me(s.slotMinTime))/me(this.slotDuration),l,a;return n=Math.max(0,n),n=Math.min(i,n),l=Math.floor(n),l=Math.min(l,i-1),a=n-l,t.tops[l]+t.getHeight(l)*a}}class Dl extends X{render(){let{props:e,context:t}=this,{options:s}=t,{slatElRefs:i}=e;return c("tbody",null,e.slatMetas.map((n,l)=>{let a={time:n.time,date:t.dateEnv.toDate(n.date),view:t.viewApi};return c("tr",{key:n.key,ref:i.createRef(n.key)},e.axis&&c(Ps,Object.assign({},n)),c(Se,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!n.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":n.isoTimeStr},renderProps:a,generatorName:"slotLaneContent",customGenerator:s.slotLaneContent,classNameGenerator:s.slotLaneClassNames,didMount:s.slotLaneDidMount,willUnmount:s.slotLaneWillUnmount}))}))}}class Rl extends X{constructor(){super(...arguments),this.rootElRef=q(),this.slatElRefs=new ce}render(){let{props:e,context:t}=this;return c("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},c("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,c(Dl,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;t.onCoords&&t.clientWidth!==null&&this.rootElRef.current.offsetHeight&&t.onCoords(new El(new ye(this.rootElRef.current,Cl(this.slatElRefs.currentMap,t.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function Cl(r,e){return e.map(t=>r[t.key])}function Te(r,e){let t=[],s;for(s=0;s<e;s+=1)t.push([]);if(r)for(s=0;s<r.length;s+=1)t[r[s].col].push(r[s]);return t}function Gt(r,e){let t=[];if(r){for(let s=0;s<e;s+=1)t[s]={affectedInstances:r.affectedInstances,isEvent:r.isEvent,segs:[]};for(let s of r.segs)t[s.col].segs.push(s)}else for(let s=0;s<e;s+=1)t[s]=null;return t}class Tl extends X{render(){let{props:e}=this;return c(hs,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>Hs(e.hiddenSegs,e),defaultGenerator:kl,forceTimed:!0},t=>c(t,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function kl(r){return r.shortText}function Ml(r,e,t){let s=new us;e!=null&&(s.strictOrder=e),t!=null&&(s.maxStackCnt=t);let i=s.addSegs(r),n=zi(i),l=_l(s);return l=Hl(l,1),{segRects:Al(l),hiddenGroups:n}}function _l(r){const{entriesByLevel:e}=r,t=Ct((s,i)=>s+":"+i,(s,i)=>{let n=Nl(r,s,i),l=Ut(n,t),a=e[s][i];return[Object.assign(Object.assign({},a),{nextLevelNodes:l[0]}),a.thickness+l[1]]});return Ut(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,t)[0]}function Ut(r,e){if(!r)return[[],0];let{level:t,lateralStart:s,lateralEnd:i}=r,n=s,l=[];for(;n<i;)l.push(e(t,n)),n+=1;return l.sort(Il),[l.map(Pl),l[0][1]]}function Il(r,e){return e[1]-r[1]}function Pl(r){return r[0]}function Nl(r,e,t){let{levelCoords:s,entriesByLevel:i}=r,n=i[e][t],l=s[e]+n.thickness,a=s.length,o=e;for(;o<a&&s[o]<l;o+=1);for(;o<a;o+=1){let d=i[o],g,p=Oi(d,n.span.start,Wi),v=p[0]+p[1],m=v;for(;(g=d[m])&&g.span.start<n.span.end;)m+=1;if(v<m)return{level:o,lateralStart:v,lateralEnd:m}}return null}function Hl(r,e){const t=Ct((s,i,n)=>Me(s),(s,i,n)=>{let{nextLevelNodes:l,thickness:a}=s,o=a+n,d=a/o,g,p=[];if(!l.length)g=e;else for(let m of l)if(g===void 0){let x=t(m,i,o);g=x[0],p.push(x[1])}else{let x=t(m,g,0);p.push(x[1])}let v=(g-i)*d;return[g-v,Object.assign(Object.assign({},s),{thickness:v,nextLevelNodes:p})]});return r.map(s=>t(s,0,0)[1])}function Al(r){let e=[];const t=Ct((i,n,l)=>Me(i),(i,n,l)=>{let a=Object.assign(Object.assign({},i),{levelCoord:n,stackDepth:l,stackForward:0});return e.push(a),a.stackForward=s(i.nextLevelNodes,n+i.thickness,l+1)+1});function s(i,n,l){let a=0;for(let o of i)a=Math.max(t(o,n,l),a);return a}return s(r,0,0),e}function Ct(r,e){const t={};return(...s)=>{let i=r(...s);return i in t?t[i]:t[i]=e(...s)}}function $t(r,e,t=null,s=0){let i=[];if(t)for(let n=0;n<r.length;n+=1){let l=r[n],a=t.computeDateTop(l.start,e),o=Math.max(a+(s||0),t.computeDateTop(l.end,e));i.push({start:Math.round(a),end:Math.round(o)})}return i}function Ll(r,e,t,s){let i=[],n=[];for(let d=0;d<r.length;d+=1){let g=e[d];g?i.push({index:d,thickness:1,span:g}):n.push(r[d])}let{segRects:l,hiddenGroups:a}=Ml(i,t,s),o=[];for(let d of l)o.push({seg:r[d.index],rect:d});for(let d of n)o.push({seg:d,rect:null});return{segPlacements:o,hiddenGroups:a}}const zl=ie({hour:"numeric",minute:"2-digit",meridiem:!1});class Ns extends X{render(){return c(cs,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:zl}))}}class Ol extends X{constructor(){super(...arguments),this.sortEventSegs=z(vt)}render(){let{props:e,context:t}=this,{options:s}=t,i=s.selectMirror,n=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||i&&e.dateSelectionSegs||[],l=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},a=this.sortEventSegs(e.fgEventSegs,s.eventOrder);return c(as,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},o=>c("div",{className:"fc-timegrid-col-frame"},c("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),c("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(a,l,!1,!1,!1)),c("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(n,{},!!e.eventDrag,!!e.eventResize,!!i,"mirror")),c("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),rs(s)&&c(o,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,t,s,i,n,l){let{props:a}=this;return a.forPrint?Hs(e,a):this.renderPositionedFgSegs(e,t,s,i,n,l)}renderPositionedFgSegs(e,t,s,i,n,l){let{eventMaxStack:a,eventShortHeight:o,eventOrderStrict:d,eventMinHeight:g}=this.context.options,{date:p,slatCoords:v,eventSelection:m,todayRange:x,nowDate:y}=this.props,w=s||i||n,R=$t(e,p,v,g),{segPlacements:T,hiddenGroups:H}=Ll(e,R,d,a);return c(V,null,this.renderHiddenGroups(H,e),T.map(P=>{let{seg:J,rect:U}=P,_=J.eventRange.instance.instanceId,Ae=w||!!(!t[_]&&U),lt=ct(U&&U.span),rt=!w&&U?this.computeSegHStyle(U):{left:0,right:0},Le=!!U&&U.stackForward>0,ze=!!U&&U.span.end-U.span.start<o;return c("div",{className:"fc-timegrid-event-harness"+(Le?" fc-timegrid-event-harness-inset":""),key:l||_,style:Object.assign(Object.assign({visibility:Ae?"":"hidden"},lt),rt)},c(Ns,Object.assign({seg:J,isDragging:s,isResizing:i,isDateSelecting:n,isSelected:_===m,isShort:ze},se(J,x,y))))}))}renderHiddenGroups(e,t){let{extraDateSpan:s,dateProfile:i,todayRange:n,nowDate:l,eventSelection:a,eventDrag:o,eventResize:d}=this.props;return c(V,null,e.map(g=>{let p=ct(g.span),v=Wl(g.entries,t);return c(Tl,{key:Hi(Ai(v)),hiddenSegs:v,top:p.top,bottom:p.bottom,extraDateSpan:s,dateProfile:i,todayRange:n,nowDate:l,eventSelection:a,eventDrag:o,eventResize:d})}))}renderFillSegs(e,t){let{props:s,context:i}=this,l=$t(e,s.date,s.slatCoords,i.options.eventMinHeight).map((a,o)=>{let d=e[o];return c("div",{key:ns(d.eventRange),className:"fc-timegrid-bg-harness",style:ct(a)},t==="bg-event"?c(ss,Object.assign({seg:d},se(d,s.todayRange,s.nowDate))):is(t))});return c(V,null,l)}renderNowIndicator(e){let{slatCoords:t,date:s}=this.props;return t?e.map((i,n)=>c(Dt,{key:n,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(i.start,s)},isAxis:!1,date:s})):null}computeSegHStyle(e){let{isRtl:t,options:s}=this.context,i=s.slotEventOverlap,n=e.levelCoord,l=e.levelCoord+e.thickness,a,o;i&&(l=Math.min(1,n+(l-n)*2)),t?(a=1-l,o=n):(a=n,o=1-l);let d={zIndex:e.stackDepth+1,left:a*100+"%",right:o*100+"%"};return i&&!e.stackForward&&(d[t?"marginLeft":"marginRight"]=20),d}}function Hs(r,{todayRange:e,nowDate:t,eventSelection:s,eventDrag:i,eventResize:n}){let l=(i?i.affectedInstances:null)||(n?n.affectedInstances:null)||{};return c(V,null,r.map(a=>{let o=a.eventRange.instance.instanceId;return c("div",{key:o,style:{visibility:l[o]?"hidden":""}},c(Ns,Object.assign({seg:a,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:o===s,isShort:!1},se(a,e,t))))}))}function ct(r){return r?{top:r.start,bottom:-r.end}:{top:"",bottom:""}}function Wl(r,e){return r.map(t=>e[t.index])}class jl extends X{constructor(){super(...arguments),this.splitFgEventSegs=z(Te),this.splitBgEventSegs=z(Te),this.splitBusinessHourSegs=z(Te),this.splitNowIndicatorSegs=z(Te),this.splitDateSelectionSegs=z(Te),this.splitEventDrag=z(Gt),this.splitEventResize=z(Gt),this.rootElRef=q(),this.cellElRefs=new ce}render(){let{props:e,context:t}=this,s=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),i=e.cells.length,n=this.splitFgEventSegs(e.fgEventSegs,i),l=this.splitBgEventSegs(e.bgEventSegs,i),a=this.splitBusinessHourSegs(e.businessHourSegs,i),o=this.splitNowIndicatorSegs(e.nowIndicatorSegs,i),d=this.splitDateSelectionSegs(e.dateSelectionSegs,i),g=this.splitEventDrag(e.eventDrag,i),p=this.splitEventResize(e.eventResize,i);return c("div",{className:"fc-timegrid-cols",ref:this.rootElRef},c("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,c("tbody",{role:"presentation"},c("tr",{role:"row"},e.axis&&c("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},c("div",{className:"fc-timegrid-col-frame"},c("div",{className:"fc-timegrid-now-indicator-container"},typeof s=="number"&&c(Dt,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:s},isAxis:!0,date:e.nowDate})))),e.cells.map((v,m)=>c(Ol,{key:v.key,elRef:this.cellElRefs.createRef(v.key),dateProfile:e.dateProfile,date:v.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:v.extraRenderProps,extraDataAttrs:v.extraDataAttrs,extraClassNames:v.extraClassNames,extraDateSpan:v.extraDateSpan,fgEventSegs:n[m],bgEventSegs:l[m],businessHourSegs:a[m],nowIndicatorSegs:o[m],dateSelectionSegs:d[m],eventDrag:g[m],eventResize:p[m],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;e.onColCoords&&e.clientWidth!==null&&e.onColCoords(new ye(this.rootElRef.current,Fl(this.cellElRefs.currentMap,e.cells),!0,!1))}}function Fl(r,e){return e.map(t=>r[t.key])}class Bl extends ee{constructor(){super(...arguments),this.processSlotOptions=z(Vl),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:s}=this.state;if(t&&s){if(e.time){let i=s.computeTimeTop(e.time);i=Math.ceil(i),i&&(i+=1),t(i)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return c("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},c(Rl,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),c(jl,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:s,options:i}=this.context,{colCoords:n}=this,{dateProfile:l}=this.props,{slatCoords:a}=this.state,{snapDuration:o,snapsPerSlot:d}=this.processSlotOptions(this.props.slotDuration,i.snapDuration),g=n.leftToIndex(e),p=a.positions.topToIndex(t);if(g!=null&&p!=null){let v=this.props.cells[g],m=a.positions.tops[p],x=a.positions.getHeight(p),y=(t-m)/x,w=Math.floor(y*d),R=p*d+w,T=this.props.cells[g].date,H=gt(l.slotMinTime,Ni(o,R)),P=s.add(T,H),J=s.add(P,o);return{dateProfile:l,dateSpan:Object.assign({range:{start:P,end:J},allDay:!1},v.extraDateSpan),dayEl:n.els[g],rect:{left:n.lefts[g],right:n.rights[g],top:m,bottom:m+x},layer:0}}return null}}function Vl(r,e){let t=e||r,s=Rt(r,t);return s===null&&(t=r,s=1),{snapDuration:t,snapsPerSlot:s}}class Gl extends es{sliceRange(e,t){let s=[];for(let i=0;i<t.length;i+=1){let n=yt(e,t[i]);n&&s.push({start:n.start,end:n.end,isStart:n.start.valueOf()===e.start.valueOf(),isEnd:n.end.valueOf()===e.end.valueOf(),col:i})}return s}}class Ul extends ee{constructor(){super(...arguments),this.buildDayRanges=z($l),this.slicer=new Gl,this.timeColsRef=q()}render(){let{props:e,context:t}=this,{dateProfile:s,dayTableModel:i}=e,{nowIndicator:n,nextDayThreshold:l}=t.options,a=this.buildDayRanges(i,s,t.dateEnv);return c(et,{unit:n?"minute":"day"},(o,d)=>c(Bl,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,s,null,t,a),{forPrint:e.forPrint,axis:e.axis,dateProfile:s,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:i.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:o,nowIndicatorSegs:n&&this.slicer.sliceNowDate(o,s,l,t,a),todayRange:d,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}}function $l(r,e,t){let s=[];for(let i of r.headerDates)s.push({start:t.add(i,e.slotMinTime),end:t.add(i,e.slotMaxTime)});return s}const qt=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function ql(r,e,t,s,i){let n=new Date(0),l=r,a=be(0),o=t||Yl(s),d=[];for(;me(l)<me(e);){let g=i.add(n,l),p=Rt(a,o)!==null;d.push({date:g,time:l,key:g.toISOString(),isoTimeStr:Mi(g),isLabeled:p}),l=gt(l,s),a=gt(a,s)}return d}function Yl(r){let e,t,s;for(e=qt.length-1;e>=0;e-=1)if(t=be(qt[e]),s=Rt(t,r),s!==null&&s>1)return t;return r}class Xl extends xl{constructor(){super(...arguments),this.buildTimeColsModel=z(Jl),this.buildSlatMetas=z(ql)}render(){let{options:e,dateEnv:t,dateProfileGenerator:s}=this.context,{props:i}=this,{dateProfile:n}=i,l=this.buildTimeColsModel(n,s),a=this.allDaySplitter.splitProps(i),o=this.buildSlatMetas(n.slotMinTime,n.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:d}=e,g=!d,p=d,v=e.dayHeaders&&c(Xt,{dates:l.headerDates,dateProfile:n,datesRepDistinctDays:!0,renderIntro:g?this.renderHeadAxis:null}),m=e.allDaySlot!==!1&&(y=>c(Cs,Object.assign({},a.allDay,{dateProfile:n,dayTableModel:l,nextDayThreshold:e.nextDayThreshold,tableMinWidth:y.tableMinWidth,colGroupNode:y.tableColGroupNode,renderRowIntro:g?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:y.clientWidth,clientHeight:y.clientHeight,forPrint:i.forPrint},this.getAllDayMaxEventProps()))),x=y=>c(Ul,Object.assign({},a.timed,{dayTableModel:l,dateProfile:n,axis:g,slotDuration:e.slotDuration,slatMetas:o,forPrint:i.forPrint,tableColGroupNode:y.tableColGroupNode,tableMinWidth:y.tableMinWidth,clientWidth:y.clientWidth,clientHeight:y.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:y.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return p?this.renderHScrollLayout(v,m,x,l.colCnt,d,o,this.state.slatCoords):this.renderSimpleLayout(v,m,x)}}function Jl(r,e){let t=new Qt(r.renderRange,e);return new Zt(t,!1)}var Kl='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}
1.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';bt(Kl);const Ql={allDaySlot:Boolean};var Zl=tt({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:Ql,views:{timeGrid:{component:Xl,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});const er={class:"page-header-left"},tr={class:"page-title"},sr={class:"page-subtitle"},ir={class:"page-header-actions"},nr={class:"flex items-center bg-gray-100 dark:bg-gray-800 p-1 rounded-xl mr-2"},lr={key:0,class:"cal-header animate-fade-in"},rr={class:"cal-nav"},ar={class:"cal-period-title"},or={class:"cal-view-tabs"},dr=["onClick"],cr={class:"glass-container mb-4 animate-fade-in p-4"},ur={class:"flex items-center gap-4"},hr={class:"flex-1 min-w-[200px]"},gr={key:0,class:"w-72"},fr={class:"w-64"},pr={class:"w-64"},mr={class:"flex items-center gap-2"},vr={class:"flex items-center gap-2 shrink-0"},yr={key:1,class:"calendar-wrapper animate-fade-in shadow-premium-lg"},br={class:"calendar-glass"},Sr={key:2,class:"map-view-wrapper animate-fade-in"},xr={class:"map-container-outer shadow-premium-lg"},wr={class:"map-header"},Er={class:"flex items-center gap-2"},Dr={class:"font-bold text-sm text-gray-700 dark:text-gray-200"},Rr={class:"flex items-center gap-3"},Cr={class:"map-legend"},Tr={class:"text-[10px] text-gray-500"},kr={class:"text-[10px] text-gray-500"},Mr={class:"text-[10px] text-gray-500"},_r={class:"text-[10px] text-gray-500"},Ir={class:"text-xs text-gray-400 font-mono"},Pr={key:0,class:"map-status-overlay"},Nr={class:"map-status-content"},Hr={class:"text-sm text-gray-600 dark:text-gray-300"},Ar={key:1,class:"map-error-overlay"},Lr={class:"map-error-content"},zr={class:"text-sm text-red-600"},Or={key:2,class:"map-status-bar"},Wr={class:"text-xs text-gray-500 dark:text-gray-400"},jr={key:3,class:"map-empty-state"},Fr={class:"map-empty-content"},Br={key:0},Vr={key:1},Gr={key:0,class:"unmapped-jobs-panel shadow-premium"},Ur={key:0},$r={class:"unmapped-header"},qr={class:"font-semibold text-sm"},Yr={class:"unmapped-list"},Xr=["onClick"],Jr={class:"flex items-center gap-2"},Kr={class:"font-medium text-sm text-gray-800 dark:text-gray-200 truncate"},Qr={class:"text-[10px] text-gray-400 uppercase font-bold"},Zr={key:1,class:"mt-4"},ea={class:"unmapped-header"},ta={class:"font-semibold text-sm"},sa={class:"unmapped-list"},ia=["onClick"],na={class:"flex items-center gap-2"},la={class:"flex flex-col overflow-hidden"},ra={class:"font-medium text-sm text-gray-800 dark:text-gray-200 truncate"},aa=["title"],oa={style:{display:"flex","flex-direction":"column",gap:"1rem"}},da={class:"flex gap-4 items-center"},ca={class:"schedule-date-badge"},ua={class:"schedule-date-month"},ha={class:"schedule-date-day"},ga={class:"name-info"},fa={class:"name-primary",style:{"font-size":"1rem"}},pa={class:"name-secondary flex items-center gap-1"},ma={key:0,class:"name-secondary flex items-center gap-1"},va={class:"flex items-center gap-3"},ya={class:"empty-state"},ba={class:"flex items-start justify-between border-b border-gray-100 dark:border-gray-700 pb-3"},Sa={class:"font-bold text-gray-900 dark:text-white text-base leading-tight mb-1"},xa={class:"flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400 font-medium"},wa={key:0},Ea={class:"mt-2"},Da={class:"space-y-3"},Ra={class:"flex items-start gap-3"}
1,Ca={class:"w-8 h-8 rounded-full bg-indigo-50 dark:bg-indigo-900/30 flex items-center justify-center text-indigo-600 dark:text-indigo-400 shrink-0 border border-indigo-100 dark:border-indigo-800"},Ta={class:"font-bold text-xs"},ka={class:"font-bold text-gray-800 dark:text-gray-200 text-sm"},Ma={class:"flex items-center gap-1.5 text-gray-500 text-xs"},_a={class:"grid grid-cols-1 gap-2 pl-1"},Ia={key:0,class:"flex items-center gap-2"},Pa={class:"text-gray-600 dark:text-gray-300 text-xs font-mono"},Na={key:1,class:"flex items-start gap-2"},Ha={class:"text-gray-600 dark:text-gray-300 text-xs line-clamp-2 leading-relaxed"},Aa={key:0,class:"flex items-start gap-2 border-t border-gray-100 dark:border-gray-700 pt-3"},La={class:"flex flex-wrap items-center gap-x-2 gap-y-1"},Yt="fsm_schedule_view_config",za=ji({__name:"ScheduleView",setup(r){const e=qi(),{t,locale:s}=Fi(),i=A(!1),n=A(null),l=h=>{n.value=h,i.value=!0},a=A([]),o=A([]),d=A(null),g=A(!0),p=A("month"),v=Xi(),m=A(""),x=A([]),y=A([]),w=A([]),R=re(()=>[{label:t("jobs.statusDraft"),value:"draft"},{label:t("jobs.statusScheduled"),value:"scheduled"},{label:t("jobs.statusDispatched"),value:"dispatched"},{label:t("jobs.statusInProgress"),value:"in_progress"},{label:t("jobs.statusCompleted"),value:"completed"},{label:t("jobs.statusCanceled"),value:"canceled"},{label:t("jobs.statusOnHold"),value:"on_hold"}]);Bi(async()=>{try{const[h,u,S]=await Promise.all([en(),tn(),sn()]);a.value=h,o.value=u,d.value=S;const b=localStorage.getItem(Yt);if(b)try{const E=JSON.parse(b);p.value=E.viewMode&&E.viewMode!=="map"?E.viewMode:"month",m.value=E.searchQuery||"",x.value=E.selectedStatuses||[],y.value=Array.isArray(E.selectedTechnician)?E.selectedTechnician:[]}catch(E){console.error("Failed to parse saved view",E)}}catch{v.add({severity:"error",summary:t("common.error"),detail:t("schedule.loadFailed"),life:4e3})}finally{g.value=!1}document.addEventListener("mouseover",Le)});const T=()=>{const h={viewMode:p.value,searchQuery:m.value,selectedStatuses:x.value,selectedTechnician:y.value};localStorage.setItem(Yt,JSON.stringify(h)),v.add({severity:"success",summary:t("schedule.viewSaved"),detail:t("schedule.filtersSaved"),life:3e3})},H=re(()=>o.value.filter(h=>h.role==="technician"||h.role==="field_tech"||h.role==="admin")),P=re(()=>{const[h,u]=w.value.length===2?w.value:[null,null];return a.value.filter(S=>{const b=m.value.toLowerCase(),E=!b||S.title.toLowerCase().includes(b)||S.customer?.first_name?.toLowerCase().includes(b)||S.customer?.last_name?.toLowerCase().includes(b)||S.customer?.company_name?.toLowerCase().includes(b),N=!x.value?.length||x.value.includes(S.status),I=!y.value.length||S.assignments?.some(W=>y.value.includes(W.user_id));let $=!0;if(h&&u){const W=S.scheduled_start?new Date(S.scheduled_start):null;if(!W)$=!1;else{const L=new Date(h);L.setHours(0,0,0,0);const j=new Date(u);j.setHours(23,59,59,999),$=W>=L&&W<=j}}return E&&N&&I&&$})}),J=re(()=>[...P.value].sort((h,u)=>{const S=h.scheduled_start?new Date(h.scheduled_start).getTime():0;return(u.scheduled_start?new Date(u.scheduled_start).getTime():0)-S})),U=re(()=>P.value.filter(h=>h.scheduled_start&&h.status!=="canceled").map(h=>({id:h.id,title:h.title,start:h.scheduled_start,end:h.scheduled_end||void 0,backgroundColor:xe(h.status),extendedProps:{...h}}))),_=A(null),Ae=A({top:"0px",left:"0px"}),lt=h=>{const u=h.el.getBoundingClientRect();_.value=h.event.extendedProps;const S=window.innerWidth,b=320;let E=u.right+12,N=u.top;E+b>S&&(E=u.left-b-12);const I=window.innerHeight;N+200>I&&(N=Math.max(10,I-220)),Ae.value={top:`${N}px`,left:`${E}px`}},rt=()=>{_.value=null},Le=h=>{_.value&&(h.target?.closest?.(".fc-event")||(_.value=null))},ze=(h,u,S)=>{if(!d.value||d.value.scheduling_allow_double_booking)return null;const b=a.value.find(W=>W.id===h);if(!b)return null;const E=(b.assignments||[]).map(W=>W.user_id);if(E.length===0)return null;const N=new Date(u).getTime(),I=S?new Date(S).getTime():N+(b.estimated_duration||60)*60*1e3,$=(d.value.scheduling_buffer_time_minutes||0)*60*1e3;for(const W of E){const L=a.value.find(j=>j.id!==h&&j.scheduled_start&&j.scheduled_end&&(j.assignments||[]).some(te=>te.user_id===W)&&new Date(j.scheduled_start).getTime()<I+$&&new Date(j.scheduled_end).getTime()>N-$);if(L){const j=b.assignments?.find(Ve=>Ve.user_id===W)?.technician_name||"Technician",te=d.value.scheduling_buffer_time_minutes||0;return`${j} has a conflicting appointment with "${L.title}"${te?` (including ${te}min buffer)`:""}. Double booking is disabled.`}}return null},K=A(),Tt=A(0),kt=A(""),at=A("dayGridMonth"),As=[{key:"dayGridMonth",label:"Month"},{key:"timeGridWeek",label:"Week"},{key:"timeGridDay",label:"Day"}],Ls={plugins:[Pn,Zl,el,fl],initialView:"dayGridMonth",headerToolbar:!1,height:"auto",events:[],eventMouseEnter:lt,eventMouseLeave:rt,eventClick:h=>{l(h.event.id)},eventDragStop:()=>{setTimeout(()=>{K.value?.getApi()?.render(),K.value?.getApi()?.unselect(),document.querySelectorAll(".fc-event-dragging, .fc-event-mirror").forEach(u=>{u.remove()}),document.body.classList.remove("fc-not-allowed","fc-unselectable"),document.body.style.pointerEvents="auto";const h=document.querySelector(".fc-view-harness");h&&(h.style.pointerEvents="auto")},150)},dragRevertDuration:0,eventDrop:async h=>{const u=a.value.find(L=>
1L.id===h.event.id);let S=h.event.startStr,b=h.event.endStr;if(S&&!S.includes("T")&&u?.scheduled_start){const L=new Date(u.scheduled_start),j=new Date(S+"T00:00:00");if(j.setHours(L.getHours(),L.getMinutes(),L.getSeconds()),Math.abs(L.getTime()-j.getTime())<1e3){h.revert();return}if(S=j.toISOString(),u.scheduled_end){const te=new Date(u.scheduled_end).getTime()-L.getTime();b=new Date(j.getTime()+te).toISOString()}}else if(!b&&u?.scheduled_start&&u?.scheduled_end){const L=new Date(u.scheduled_end).getTime()-new Date(u.scheduled_start).getTime();b=new Date(new Date(S).getTime()+L).toISOString()}const N=ze(h.event.id,S,b||null);if(N){h.revert(),v.add({severity:"error",summary:t("schedule.schedulingConflict"),detail:N,life:5e3});return}const I=a.value.findIndex(L=>L.id===h.event.id),$=I>=0?a.value[I].scheduled_start:null,W=I>=0?a.value[I].scheduled_end:null;I>=0&&(a.value[I]={...a.value[I],scheduled_start:S,scheduled_end:b||a.value[I].scheduled_end});try{await jt(h.event.id,{scheduled_start:S,scheduled_end:b||void 0}),v.add({severity:"success",summary:t("schedule.jobRescheduled"),detail:t("schedule.movedTo",{datetime:new Date(S).toLocaleString()}),life:3e3})}catch(L){I>=0&&(a.value[I]={...a.value[I],scheduled_start:$,scheduled_end:W}),h.revert(),v.add({severity:"error",summary:t("schedule.schedulingConflict"),detail:L?.response?.data?.detail||"Could not sync new time to server.",life:5e3})}},eventResize:async h=>{const u=ze(h.event.id,h.event.startStr,h.event.endStr||null);if(u){h.revert(),v.add({severity:"error",summary:t("schedule.schedulingConflict"),detail:u,life:5e3});return}const S=a.value.findIndex(N=>N.id===h.event.id),b=S>=0?a.value[S].scheduled_start:null,E=S>=0?a.value[S].scheduled_end:null;S>=0&&(a.value[S]={...a.value[S],scheduled_start:h.event.startStr,scheduled_end:h.event.endStr||a.value[S].scheduled_end});try{await jt(h.event.id,{scheduled_start:h.event.startStr,scheduled_end:h.event.endStr||void 0}),v.add({severity:"success",summary:t("schedule.durationUpdated"),detail:t("schedule.timeframeSaved"),life:3e3})}catch(N){S>=0&&(a.value[S]={...a.value[S],scheduled_start:b,scheduled_end:E}),h.revert(),v.add({severity:"error",summary:t("schedule.schedulingConflict"),detail:N?.response?.data?.detail||"Could not update job duration.",life:5e3})}},eventContent:h=>{const u=h.event.extendedProps,S=h.view.type.startsWith("timeGrid"),b=h.isMirror,E=h.isResizing,N=h.event.backgroundColor||"#3b82f6",I=h.event.start?new Date(h.event.start).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"",$=h.event.end?new Date(h.event.end).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"",W=u.customer?.first_name?`${u.customer.first_name} ${u.customer.last_name||""}`.trim():"",j={completed:"pi-check-circle",in_progress:"pi-play-circle",scheduled:"pi-calendar",dispatched:"pi-send",canceled:"pi-times-circle",on_hold:"pi-pause-circle",draft:"pi-file-edit"}[u.status]||"pi-briefcase",te=(u.assignments||[]).map(Q=>Q.technician_name||"").filter(Boolean),Ve=(u.assignments||[]).map(Q=>({id:Q.user_id,initials:(Q.technician_name||"").split(" ").map(fe=>fe[0]).join("").toUpperCase().substring(0,2)})).filter(Q=>Q.initials);if(S){const Q=b&&I?` 2 <div class="fc-evt-drop-badge"> 3 <i class="pi pi-clock" style="font-size:0.65rem"></i> 4 ${I} 5 </div>`:"",fe=E&&$?` 6 <div class="fc-evt-resize-badge"> 7 <i class="pi pi-clock" style="font-size:0.65rem"></i> 8 ends ${$} 9 </div>`:"",$s=te.length>0?`<div class="fc-evt-techs"> 10 <i class="pi pi-wrench" style="font-size:0.6rem;opacity:0.8"></i> 11 ${te.join(", ")} 12 </div>`:"";return{html:` 13 ${Q} 14 <div class="fc-evt-wrap" style="background:${N};${b||E?"opacity:0.92;box-shadow:0 6px 24px rgba(0,0,0,0.25)":""}"> 15 <div class="fc-evt-row"> 16 <i class="pi ${j} fc-evt-icon"></i> 17 <span class="fc-evt-title">${h.event.title}</span> 18 </div> 19 ${W?`<div class="fc-evt-sub">${W}</div>`:""} 20 ${$s} 21 ${I?`<div class="fc-evt-time">${I}</div>`:""} 22 </div> 23 ${fe} 24 `}}else{const Q=Ve.length>0?`<span class="fc-evt-chip-techs">${Ve.map(fe=>`<span class="fc-evt-chip-avatar" style="background:${It(fe.id)};border:1.5px solid rgba(255,255,255,0.85)">${fe.initials}</span>`).join("")}</span>`:"";return{html:` 25 <div class="fc-evt-chip" style="background:${N}"> 26 <i class="pi ${j} fc-evt-chip-icon"></i>
27 <span class="fc-evt-chip-title">${h.event.title}</span> 28 ${Q} 29 ${I?`<span class="fc-evt-chip-time">${I}</span>`:""} 30 </div> 31 `}}},editable:!0,selectable:!0,snapDuration:"00:01:00",eventDragMinDistance:3,dayMaxEvents:4,themeSystem:"standard",slotMinTime:"00:00:00",slotMaxTime:"24:00:00",scrollTime:"07:00:00",allDaySlot:!1,slotLabelFormat:{hour:"2-digit",minute:"2-digit",meridiem:"short"},datesSet:h=>{kt.value=h.view.title,U.value.length&&h.view.calendar.setOption("events",U.value)}},zs=()=>{K.value?.getApi().next()},Os=()=>{K.value?.getApi().prev()},Ws=()=>{K.value?.getApi().today()},Mt=h=>h.startsWith("timeGrid")?Y.value?"calc(100vh - 180px)":"calc(100vh - 320px)":Y.value?"calc(100vh - 200px)":"auto",js=h=>{const u=K.value?.getApi();u&&(u.setOption("height",Mt(h)),u.changeView(h),at.value=h)};Ge(U,h=>{K.value?.getApi()?.setOption("events",h)}),Ge([d,Tt],()=>{d.value?.scheduling_working_hours_start&&Ce(()=>{K.value?.getApi()?.setOption("scrollTime",d.value.scheduling_working_hours_start)})});const xe=h=>({draft:"#94a3b8",scheduled:"#3b82f6",dispatched:"#f59e0b",in_progress:"#6366f1",completed:"#10b981",canceled:"#ef4444"})[h]||"#3b82f6",_t=["#3b82f6","#10b981","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#06b6d4","#84cc16"],It=h=>{if(!h)return"#94a3b8";let u=0;for(let S=0;S<h.length;S++)u=u*31+h.charCodeAt(S)>>>0;return _t[u%_t.length]},Fs=h=>{const u={emergency:{label:"Emergency",color:"#ef4444",icon:"pi-exclamation-triangle"},high:{label:"High",color:"#f59e0b",icon:"pi-arrow-up"},normal:{label:"Normal",color:"#64748b",icon:"pi-minus"},low:{label:"Low",color:"#94a3b8",icon:"pi-arrow-down"}};return u[h||"normal"]||u.normal},Oe=re(()=>Fs(_.value?.priority)),Pt=h=>({draft:"secondary",scheduled:"info",dispatched:"warning",in_progress:"primary",completed:"success",canceled:"danger",on_hold:"warning"})[h]||"info",ge=A(null);let O=null,We=[];const je={},ne=A(""),we=A(""),ae=A(!1),le=A([]),Fe=re(()=>P.value.filter(h=>h.customer?.address)),Be=re(()=>P.value.filter(h=>!h.customer?.address)),Bs=async h=>{const u=h.address||"";if(!u)return null;if(je[u])return je[u];try{const S={street:h.street||void 0,city:h.city||void 0,state:h.state||void 0,postal_code:h.postal_code||void 0,country:"USA",address:u},b=await nn.post("/utils/geocode",S);if(b.data&&typeof b.data.lat=="number"&&typeof b.data.lon=="number"){const E=[b.data.lat,b.data.lon];return je[u]=E,E}}catch(S){S.response&&S.response.status===404?console.warn("Address not found:",u):console.warn("Backend geocoding error:",S)}return null},Vs=h=>{const u=Math.random().toString(36).substring(2,8),S=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 36" width="32" height="48"> 32 <defs> 33 <filter id="fs-shadow-${u}" x="-20%" y="-10%" width="140%" height="140%"> 34 <feDropShadow dx="0" dy="2" stdDeviation="2" flood-color="rgba(0,0,0,0.3)"/> 35 </filter> 36 </defs> 37 <path d="M12 0C5.4 0 0 5.4 0 12c0 9 12 24 12 24s12-15 12-24C24 5.4 18.6 0 12 0z" fill="${h}" filter="url(#fs-shadow-${u})"/> 38 <circle cx="12" cy="11" r="5" fill="white" opacity="0.9"/> 39 <circle cx="12" cy="11" r="3" fill="${h}"/> 40 </svg>`;return de.divIcon({html:S,className:"custom-map-marker",iconSize:[32,48],iconAnchor:[16,48],popupAnchor:[0,-48]})},Gs=h=>{const u=xe(h.status),S=Wt(h.status,t),b=h.customer?`${h.customer.first_name||""} ${h.customer.last_name||""}`.trim():"Unknown",E=h.scheduled_start?new Date(h.scheduled_start).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"Unscheduled";return` 41 <div style="min-width:260px;font-family:Inter,system-ui,sans-serif;padding:0;"> 42 <div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;"> 43 <span style="font-weight:700;font-size:14px;color:#1e293b;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">${h.title}</span> 44 <span style="background:${u};color:white;font-size:9px;font-weight:700;padding:3px 8px;border-radius:6px;letter-spacing:0.5px;">${S}</span> 45 </div> 46 <div style="display:flex;flex-direction:column;gap:6px;"> 47 <div style="display:flex;align-items:center;gap:8px;">
48 <span style="width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg,#6366f1,#8b5cf6);display:flex;align-items:center;justify-content:center;color:white;font-size:10px;font-weight:700;flex-shrink:0;">${(h.customer?.first_name?.[0]||"")+(h.customer?.last_name?.[0]||"")}</span> 49 <span style="font-size:12px;color:#475569;font-weight:500;">${b}</span> 50 </div> 51 <div style="display:flex;align-items:center;gap:6px;padding-left:2px;"> 52 <svg width="12" height="12" fill="none" stroke="#94a3b8" stroke-width="2" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg> 53 <span style="font-size:11px;color:#64748b;font-family:monospace;">${E}</span> 54 </div> 55 ${h.customer?.address?` 56 <div style="display:flex;align-items:start;gap:6px;padding-left:2px;"> 57 <svg width="12" height="12" fill="none" stroke="#94a3b8" stroke-width="2" viewBox="0 0 24 24" style="flex-shrink:0;margin-top:1px;"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"/><circle cx="12" cy="10" r="3"/></svg> 58 <span style="font-size:10px;color:#94a3b8;line-height:1.4;">${h.customer.address}</span> 59 </div>`:""} 60 </div> 61 <a href="#" data-sched-job-id="${h.id}" class="sched-popup-job-link" style="display:block;margin-top:12px;padding:8px;background:linear-gradient(135deg,#6366f1,#4f46e5);color:white;text-align:center;border-radius:8px;font-size:12px;font-weight:600;text-decoration:none;transition:opacity 0.2s;" onmouseover="this.style.opacity='0.9'" onmouseout="this.style.opacity='1'">View Job Details â</a> 62 </div>`},Nt=async()=>{ne.value="Initializing map...",we.value="",le.value=[],ae.value=!0;try{if(await Ce(),!ge.value){we.value="Map container not found",ae.value=!1;return}O&&(O.remove(),O=null),O=de.map(ge.value,{zoomControl:!1,attributionControl:!1}).setView([39.8283,-98.5795],4),ge.value.dataset.jobLinkBound||(ge.value.dataset.jobLinkBound="1",ge.value.addEventListener("click",S=>{const b=S.target.closest(".sched-popup-job-link");if(b){S.preventDefault();const E=b.dataset.schedJobId;E&&l(E)}})),de.control.zoom({position:"topright"}).addTo(O),de.control.attribution({position:"bottomleft",prefix:!1}).addTo(O),de.tileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",{attribution:'© <a href="https://carto.com/">CARTO</a> © <a href="https://www.openstreetmap.org/copyright">OSM</a>',maxZoom:19,subdomains:"abcd"}).addTo(O),We.forEach(S=>S.remove()),We=[];const h=[],u=Fe.value;if(u.length===0){ne.value="",ae.value=!1;return}for(let S=0;S<u.length;S++){const b=u[S];if(!b)continue;const E=b.customer?.address;if(!E)continue;ne.value=`Geocoding ${S+1}/${u.length}: ${E.substring(0,40)}...`,!je[E]&&S>0&&await new Promise(L=>setTimeout(L,1100));const N=await Bs(b.customer);if(!N){le.value.push({job:b,address:E});continue}const I=xe(b.status),$=Vs(I),W=de.marker(N,{icon:$}).addTo(O).bindPopup(Gs(b),{maxWidth:300,className:"premium-popup",closeButton:!0});We.push(W),h.push(N)}if(h.length>0&&O){const S=de.latLngBounds(h);O.fitBounds(S,{padding:[50,50],maxZoom:14})}le.value.length>0?ne.value=`${h.length} pinned, ${le.value.length} could not be geocoded`:ne.value=""}catch(h){console.error("Map initialization error:",h),we.value=`Map error: ${h?.message||"Unknown error"}`}finally{ae.value=!1}};Ge(p,async h=>{h==="map"?(await Ce(),await Nt()):O&&(O&&typeof O.remove=="function"&&O.remove(),O=null,We=[])}),Ge(Fe,async()=>{p.value==="map"&&(await Ce(),await Nt())},{deep:!0});const Y=A(!1),Us=()=>{Y.value=!Y.value,document.body.classList.toggle("schedule-maximized",Y.value),Ce(()=>{const h=K.value?.getApi();h&&h.setOption("height",Mt(at.value)),O&&O.invalidateSize()})};return Vi(()=>{document.removeEventListener("mouseover",Le),document.body.classList.remove("schedule-maximized"),O&&(O.remove(),O=null)}),(h,u)=>{const S=Yi("tooltip");return k(),M("div",null,[f("div",{class:"page-header",style:pe(Y.value?"margin-bottom: 0.5rem":"")},[oe(f("div",er,[f("h1",tr,[u[12]||(u[12]=f("i",{class:"pi pi-calendar"},null,-1)),Ee(" "+C(D(t)("schedule.title")),1)]),f("p",sr,C(D(t)("schedule.subtitle")),1)],512),[[Gi,!Y.value]]),f("div",ir,[oe(F(D(Z),{icon:Y.value?"pi pi-window-minimize":"pi pi-window-maximize",onClick:Us,severity:Y.value?"warn":"secondary",text:!Y.value,raised:Y.value,rounded:"",size:"small",class:"mr-1"},null,8,["icon","severity","text","raised"]),[[S,Y.value?"Exit Full Screen":"Full Screen",void 0,{bottom:!0}]]),f("div",nr,[oe(F(D(Z),{icon:"pi pi-calendar",onClick:u[0]||(u[0]=b=>p.value="month"),severity:p.value==="month"?"primary":"secondary",text:"",rounded:"",size:"small"},null,8,["severity"]),[[S,"Calendar View",void 0,{bottom:!0}]]),oe(F(D(Z),{icon:"pi pi-list",onClick:u[1]||(u[1]=b=>p.value="list"),severity:p.value==="list"?"primary":"secondary",text:"",rounded:"",size:"small"},null,8,["severity"]),[[S,"List View",void 0,{bottom:!0}]]),oe(F(D(Z),{icon:"pi pi-map",onClick:u[2]||(u[2]=b=>p.value="map"),severity:p.value==="map"?"primary":"secondary",text:"",rounded:"",size:"small"},null,8,["severity"]),[[S,"Map View",void 0,{bottom:!0}]])]),F(D(Z),{icon:"pi pi-plus",label:D(t)("schedule.newJob"),severity:"primary",onClick:u[3]||(u[3]=b=>D(e).push("/jobs/new"))},null,8,["label"])])],4),p.value==="month"?(k(),M("div",lr,[f("div",rr,[f("button",{class:"cal-nav-btn",onClick:Os,"aria-label":"Previous"},[...u[13]||(u[13]=[f("i",{class:"pi pi-chevron-left"}
62,null,-1)])]),f("h2",ar,C(kt.value||"Â "),1),f("button",{class:"cal-nav-btn",onClick:zs,"aria-label":"Next"},[...u[14]||(u[14]=[f("i",{class:"pi pi-chevron-right"},null,-1)])])]),f("button",{class:"cal-today-btn",onClick:Ws},C(D(t)("common.today")),1),f("div",or,[(k(),M(De,null,Re(As,b=>f("button",{key:b.key,class:Lt(["cal-view-tab",{active:at.value===b.key}]),onClick:E=>js(b.key)},C(b.label),11,dr)),64))])])):B("",!0),f("div",cr,[f("div",ur,[f("div",hr,[F(D(Ji),{modelValue:m.value,"onUpdate:modelValue":u[4]||(u[4]=b=>m.value=b),placeholder:D(t)("schedule.searchPlaceholder"),class:"w-full !h-11"},null,8,["modelValue","placeholder"])]),p.value!=="month"?(k(),M("div",gr,[F(D(Ki),{selectOtherMonths:"",modelValue:w.value,"onUpdate:modelValue":u[5]||(u[5]=b=>w.value=b),selectionMode:"range",manualInput:!1,placeholder:D(t)("schedule.filterByDate"),class:"w-full !h-11",showButtonBar:"",dateFormat:"M dd, yy"},null,8,["modelValue","placeholder"])])):B("",!0),f("div",fr,[F(D(zt),{modelValue:x.value,"onUpdate:modelValue":u[6]||(u[6]=b=>x.value=b),options:R.value,optionLabel:"label",optionValue:"value",placeholder:D(t)("schedule.filterStats"),class:"w-full !h-11 items-center",display:"chip",maxSelectedLabels:1},null,8,["modelValue","options","placeholder"])]),f("div",pr,[F(D(zt),{modelValue:y.value,"onUpdate:modelValue":u[7]||(u[7]=b=>y.value=b),options:H.value,optionLabel:"full_name",optionValue:"id",placeholder:D(t)("schedule.allTechnicians"),class:"w-full !h-11 items-center",display:"chip",maxSelectedLabels:1},{option:dt(b=>[f("div",mr,[u[15]||(u[15]=f("i",{class:"pi pi-wrench text-xs opacity-50"},null,-1)),f("span",null,C(b.option.full_name),1)])]),_:1},8,["modelValue","options","placeholder"])]),f("div",vr,[m.value||x.value.length||y.value.length||w.value.length?oe((k(),Ue(D(Z),{key:0,icon:"pi pi-filter-slash",text:"",rounded:"",severity:"secondary",onClick:u[8]||(u[8]=b=>{m.value="",x.value=[],y.value=[],w.value=[]})},null,512)),[[S,"Clear Filters",void 0,{top:!0}]]):B("",!0),oe(F(D(Z),{icon:"pi pi-bookmark",text:"",rounded:"",severity:"primary",onClick:T},null,512),[[S,"Save Current View",void 0,{top:!0}]])])])]),F(D(Qi)),p.value==="month"?(k(),M("div",yr,[f("div",br,[(k(),Ue(D(Ui),{key:Tt.value,ref_key:"calendarRef",ref:K,options:Ls}))])])):p.value==="map"?(k(),M("div",Sr,[f("div",xr,[f("div",wr,[f("div",Er,[u[16]||(u[16]=f("i",{class:"pi pi-map text-indigo-500"},null,-1)),f("span",Dr,C(D(t)("schedule.mapView")),1)]),f("div",Rr,[f("div",Cr,[u[17]||(u[17]=f("span",{class:"legend-dot",style:{background:"#22c55e"}},null,-1)),f("span",Tr,C(D(t)("dashboard.completed")),1),u[18]||(u[18]=f("span",{class:"legend-dot",style:{background:"#3b82f6"}},null,-1)),f("span",kr,C(D(t)("dashboard.scheduled")),1),u[19]||(u[19]=f("span",{class:"legend-dot",style:{background:"#f59e0b"}},null,-1)),f("span",Mr,C(D(t)("dashboard.inProgress")),1),u[20]||(u[20]=f("span",{class:"legend-dot",style:{background:"#ef4444"}},null,-1)),f("span",_r,C(D(t)("common.all")),1)]),f("span",Ir,C(Fe.value.length)+" jobs",1)])]),f("div",{ref_key:"mapContainerRef",ref:ge,class:"map-container"},null,512),ae.value?(k(),M("div",Pr,[f("div",Nr,[u[21]||(u[21]=f("i",{class:"pi pi-spin pi-spinner",style:{"font-size":"1.5rem",color:"#6366f1"}},null,-1)),f("span",Hr,C(ne.value),1)])])):B("",!0),we.value?(k(),M("div",Ar,[f("div",Lr,[u[22]||(u[22]=f("i",{class:"pi pi-exclamation-triangle",style:{"font-size":"1.5rem",color:"#ef4444"}},null,-1)),f("span",zr,C(we.value),1)])])):B("",!0),!ae.value&&ne.value?(k(),M("div",Or,[u[23]||(u[23]=f("i",{class:"pi pi-info-circle text-amber-500"},null,-1)),f("span",Wr,C(ne.value),1)])):B("",!0),!g.value&&!ae.value&&Fe.value.length===0?(k(),M("div",jr,[f("div",Fr,[u[24]||(u[24]=f("div",{class:"map-empty-icon"},[f("i",{class:"pi pi-map-marker"})],-1)),u[25]||(u[25]=f("h3",null,"No Job Locations",-1)),P.value.length===0?(k(),M("p",Br," No jobs found. Create a job with a customer address to see it on the map. ")):(k(),M("p",Vr,C(P.value.length)+" job(s) found, but none have a customer address. Add addresses to your customers to see pinpoints here. ",1)),F(D(Z),{label:D(t)("schedule.createNewJob"),icon:"pi pi-plus",severity:"primary",onClick:u[9]||(u[9]=b=>D(e).push("/jobs/new")),class:"mt-3"},null,8,["label"])])])):B("",!0)]),Be.value.length>0||le.value.length>0?(k(),M("div",Gr,[Be.value.length>0?(k(),M("div",Ur,[f("div",$r,[u[26]||(u[26]=f("i",{class:"pi pi-info-circle text-gray-500"},null,-1)),f("span",qr,"Missing Info ("+C(Be.value.length)+")",1)]),f("div",Yr,[(k(!0),M(De,null,Re(Be.value,b=>(k(),M("div",{key:b.id,class:"unmapped-item",onClick:E=>l(b.id)},[f("div",Jr,[f("span",{class:"unmapped-dot",style:pe({background:xe(b.status)})}
62,null,4),f("span",Kr,C(b.title),1)]),f("span",Qr,C(b.status.replace("_"," ")),1)],8,Xr))),128))])])):B("",!0),le.value.length>0?(k(),M("div",Zr,[f("div",ea,[u[27]||(u[27]=f("i",{class:"pi pi-exclamation-triangle text-red-500"},null,-1)),f("span",ta,"Location Not Found ("+C(le.value.length)+")",1)]),f("div",sa,[(k(!0),M(De,null,Re(le.value,(b,E)=>(k(),M("div",{key:E,class:"unmapped-item",onClick:N=>l(b.job.id)},[f("div",na,[u[28]||(u[28]=f("span",{class:"unmapped-dot",style:{background:"#ef4444"}},null,-1)),f("div",la,[f("span",ra,C(b.job.title),1),f("span",{class:"text-[10px] text-red-400 truncate w-full",title:b.address},C(b.address),9,aa)])])],8,ia))),128))])])):B("",!0)])):B("",!0)])):p.value==="list"?(k(),Ue(D(Zi),{key:3,value:J.value,loading:g.value,paginator:"",rows:10},{list:dt(b=>[f("div",oa,[(k(!0),M(De,null,Re(b.items,(E,N)=>(k(),M("div",{key:N,class:"schedule-item"},[f("div",da,[f("div",ca,[f("div",ua,C(E.scheduled_start?new Date(E.scheduled_start).toLocaleDateString(D(s),{month:"short"}):"N/A"),1),f("div",ha,C(E.scheduled_start?new Date(E.scheduled_start).getDate():"??"),1)]),f("div",ga,[f("span",fa,C(E.title),1),f("span",pa,[u[29]||(u[29]=f("i",{class:"pi pi-clock",style:{"font-size":"0.7rem"}},null,-1)),Ee(" "+C(E.scheduled_start?new Date(E.scheduled_start).toLocaleTimeString(D(s),{hour:"2-digit",minute:"2-digit"}):D(t)("schedule.notSet")),1)]),E.customer?.address?(k(),M("span",ma,[u[30]||(u[30]=f("i",{class:"pi pi-map-marker",style:{"font-size":"0.7rem"}},null,-1)),Ee(" "+C(E.customer.address),1)])):B("",!0)])]),f("div",va,[F(D(Ot),{value:D(Wt)(E.status,D(t)),severity:Pt(E.status),rounded:""},null,8,["value","severity"]),F(D(Z),{icon:"pi pi-chevron-right",text:"",rounded:"",severity:"secondary",onClick:I=>l(E.id)},null,8,["onClick"])])]))),128))])]),empty:dt(()=>[f("div",ya,[u[31]||(u[31]=f("i",{class:"pi pi-calendar-times"},null,-1)),f("p",null,C(D(t)("schedule.noJobs")),1),F(D(Z),{label:D(t)("schedule.scheduleJob"),icon:"pi pi-plus",onClick:u[10]||(u[10]=b=>D(e).push("/jobs/new"))},null,8,["label"])])]),_:1},8,["value","loading"])):B("",!0),(k(),Ue($i,{to:"body"},[_.value?(k(),M("div",{key:0,class:"fixed z-[9999] bg-white dark:bg-gray-800 rounded-xl shadow-premium border border-gray-100 dark:border-gray-700 w-80 p-5 animate-fade-in pointer-events-none flex flex-col gap-3 overflow-hidden",style:pe(Ae.value)},[f("div",{class:"absolute left-0 top-0 bottom-0 w-1.5",style:pe({background:xe(_.value.status)})},null,4),f("div",ba,[f("div",null,[f("h3",Sa,C(_.value.title),1),f("div",xa,[u[32]||(u[32]=f("i",{class:"pi pi-clock text-[11px]"},null,-1)),f("span",null,C(new Date(_.value.scheduled_start).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})),1),_.value.scheduled_end?(k(),M("span",wa,"- "+C(new Date(_.value.scheduled_end).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})),1)):B("",!0)]),f("div",Ea,[f("span",{class:"inline-flex items-center gap-1 text-[10px] font-bold uppercase px-1.5 py-0.5 rounded",style:pe({color:Oe.value.color,background:Oe.value.color+"1a"})},[f("i",{class:Lt(`pi ${Oe.value.icon} text-[9px]`)},null,2),Ee(" "+C(Oe.value.label),1)],4)])]),F(D(Ot),{value:_.value.status.replace("_"," "),severity:Pt(_.value.status),class:"uppercase text-[10px] font-bold"},null,8,["value","severity"])]),f("div",Da,[f("div",Ra,[f("div",Ca,[f("span",Ta,C((_.value.customer?.first_name?.[0]||"")+(_.value.customer?.last_name?.[0]||"")),1)]),f("div",null,[f("div",ka,C(_.value.customer?.first_name)+" "+C(_.value.customer?.last_name),1),f("div",Ma,[u[33]||(u[33]=f("i",{class:"pi pi-building text-[11px] opacity-70"},null,-1)),f("span",null,C(_.value.customer?.company_name||"Individual"),1)])])]),f("div",_a,[_.value.customer?.phone?(k(),M("div",Ia,[u[34]||(u[34]=f("i",{class:"pi pi-phone text-gray-400 text-xs"},null,-1)),f("span",Pa,C(_.value.customer.phone),1)])):B("",!0),_.value.customer?.address?(k(),M("div",Na,[u[35]||(u[35]=f("i",{class:"pi pi-map-marker text-gray-400 text-xs mt-0.5"},null,-1)),f("span",Ha,C(_.value.customer.address),1)])):B("",!0)])]),_.value.assignments?.length?(k(),M("div",Aa,[u[36]||(u[36]=f("i",{class:"pi pi-wrench text-gray-400 text-xs w-4 text-center mt-0.5"},null,-1)),f("div",La,[(k(!0),M(De,null,Re(_.value.assignments,b=>(k(),M("span",{key:b.user_id,class:"inline-flex items-center gap-1 text-xs text-gray-600 dark:text-gray-300"},[f("span",{class:"w-4 h-4 rounded-full text-white text-[8px] font-bold flex items-center justify-center shrink-0",style:pe({background:It(b.user_id)})},C((b.technician_name||"?").split(" ").map(E=>E[0]).join("").toUpperCase().substring(0,2)),5),Ee(" "+C(b.technician_name),1)]))),128))])])):B("",!0)],4)):B("",!0)])),F(ln,{visible:i.value,"onUpdate:visible":u[11]||(u[11]=b=>i.value=b),"job-id":n.value},null,8,["visible","job-id"])])}}}),Ya=rn(za,[["__scopeId","data-v-412aff0f"]]);export{Ya as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.